this.config.scaleMin){this._hideBeforeAnimation();var s=this;r?(clearTimeout(s._timeout),OrgChart.anim(this.getSvg(),{viewbox:this.getViewBox()},{viewbox:i},this.config.anim.duration,this.config.anim.func,function(){clearTimeout(s._timeout),s._timeout=setTimeout(function(){s._draw(!0,OrgChart.action.zoom)},500)})):(this.setViewBox(i),clearTimeout(s._timeout),s._timeout=setTimeout(function(){s._draw(!0,OrgChart.action.zoom)},500))}},OrgChart.loading={},OrgChart.loading.show=function(t){var e=document.createElement(\"div\");e.id=\"bg-loading\",e.innerHTML='',t.element.appendChild(e)},OrgChart.loading.hide=function(t){var e=t.element.querySelector(\"#bg-loading\");e&&e.parentNode.removeChild(e)},OrgChart.pdfPrevUI={},OrgChart.loc||(OrgChart.loc={}),OrgChart.loc.ppdfCmdTitle=\"PDF Preview\",OrgChart.loc.ppdfSave=\"Save\",OrgChart.loc.ppdfCancel=\"Cancel\",OrgChart.loc.ppdfFormat=\"Format\",OrgChart.loc.ppdfFitToDrwaing=\"Fit\",OrgChart.loc.ppdfA4=\"A4\",OrgChart.loc.ppdfA3=\"A3\",OrgChart.loc.ppdfA2=\"A2\",OrgChart.loc.ppdfA1=\"A1\",OrgChart.loc.ppdfLetter=\"Letter\",OrgChart.loc.ppdfLegal=\"Legal\",OrgChart.loc.ppdfLayout=\"Layout\",OrgChart.loc.ppdfPortrait=\"Portrait\",OrgChart.loc.ppdfLandscape=\"Landscape\",OrgChart.loc.ppdfFittopagewidth=\"Fit to page width\",OrgChart.loc.ppdfMargin=\"Margin\",OrgChart.loc.ppdfHeader=\"Header\",OrgChart.loc.ppdfFooter=\"Footer\",OrgChart.loc.ppdfScale=\"Scale\",OrgChart.pdfPrevUI.show=function(r,i){i=r._defaultExportOptions(i,\"pdf\");var t=document.createElement(\"div\");t.id=\"bg-ppdf-btns\",Object.assign(t.style,{position:\"absolute\",top:0,left:0,\"background-color\":\"#fff\",\"z-index\":5,margin:\"0 0 0 -250px\",\"box-shadow\":\"0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)\",width:\"250px\",height:\"100%\",\"font-family\":\"Roboto,Helvetica\",color:\"#757575\",\"text-align\":\"right\",padding:\"10px\"}),r.element.appendChild(t),t.innerHTML=\"\"+OrgChart.loc.ppdfCmdTitle+'
';var e=document.createElement(\"div\");e.id=\"bg-ppdf-wrapper\",Object.assign(e.style,{\"overflow-y\":\"scroll\",position:\"absolute\",top:0,left:\"270px\",\"background-color\":\"#eee\",width:r.width()-270+\"px\",height:\"100%\"}),r.element.appendChild(e),e.innerHTML='';var a,n,o,l=r.element.querySelector(\"#bg-ppdf-size\"),s=r.element.querySelector(\"#bg-ppdf-layout\"),h=r.element.querySelector(\"#bg-ppdf-scale\"),d=r.element.querySelector(\"#bg-ppdf-margin\"),c=r.element.querySelector(\"#bg-ppdf-header\"),g=r.element.querySelector(\"#bg-ppdf-footer\");l.value=i.format,s.value=i.landscape,h.value=i.scale,d.value=i.margin,c.value=i.header,g.value=i.footer,OrgChart.anim(r.element.querySelector(\"#bg-ppdf-btns\"),{margin:[0,0,0,-250]},{margin:[0,0,0,0]},300,OrgChart.anim.outSin,function(){r.exportPDF(i,OrgChart.pdfPrevUI._handler)}),r.element.querySelector(\"#bg-prev-cancel\").addEventListener(\"click\",function(){OrgChart.pdfPrevUI.hide(r)}),r.element.querySelector(\"#bg-prev-save\").addEventListener(\"click\",function(){r.exportPDF(i),OrgChart.pdfPrevUI.hide(r)}),OrgChart.pdfPrevUI._showHide(l,s,h),l.addEventListener(\"change\",function(){OrgChart.anim(r.element.querySelector(\"#bg-ppdf-content\"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector(\"#bg-ppdf-content\").innerHTML=\"\",i.format=l.value,r.exportPDF(i,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)})}),s.addEventListener(\"change\",function(){OrgChart.anim(r.element.querySelector(\"#bg-ppdf-content\"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector(\"#bg-ppdf-content\").innerHTML=\"\",i.landscape=\"true\"==s.value,r.exportPDF(i,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)})}),h.addEventListener(\"change\",function(){OrgChart.anim(r.element.querySelector(\"#bg-ppdf-content\"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector(\"#bg-ppdf-content\").innerHTML=\"\",i.scale=h.value,r.exportPDF(i,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)})}),d.addEventListener(\"keyup\",function(){clearTimeout(a),a=setTimeout(function(){OrgChart.anim(r.element.querySelector(\"#bg-ppdf-content\"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector(\"#bg-ppdf-content\").innerHTML=\"\";var t=d.value.split(\",\");if(4==t.length){for(var e=0;e';return a&&(s+='\"),s+=t,n&&(s+='\"),s+=\"\",s+=\"