sccfclib 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/SccfClientApi.js +1 -1
  2. package/package.json +2 -2
package/SccfClientApi.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see SccfClientApi.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios"),require("https")):"function"==typeof define&&define.amd?define(["axios","https"],t):"object"==typeof exports?exports.SccfClientApi=t(require("axios"),require("https")):e.SccfClientApi=t(e.axios,e.https)}(this,((e,t)=>(()=>{var n={46:(e,t,n)=>{var r=n(948),i=n(31);e.exports=function(){var e;(e=this).log=null,e.cyto={},e.initCallback=null,e.tassativi=null,e.tiedStdMandNodeList=null,e.configurazione=[],e.incompatibiliConConfig=[],e.checkConfigurazione=[],e.incompatibiliConCheckConfig=[],e.maxDepth=3,e.loopScenarios=[],e.getVersion=function(){return"114"},e.init=function(t,n,r,i,o){e.selectionLogDiv=r,e.log=i,e.initCallback=o,e.log.info("RuleEngine.init - dataElements:["+t.length+"]"),e.createCytoscape(t,n,e.postCreate)},e.postCreate=function(){e.log.debug("RuleEngine.postCreate - begin"),e.cyto.add({group:"nodes",data:{id:"config"}}),e.cyto.$("#config").addClass("config"),e.cyto.elements("edge[type='I']").forEach((function(e){e.addClass("incompatibile")})),e.cyto.elements("edge[type='V']").forEach((function(e){e.addClass("vincolo")})),e.cyto.elements("edge[type='A']").forEach((function(e){e.addClass("alternativo")})),e.cyto.elements("edge[type='E']").forEach((function(e){e.addClass("esclusivo")})),e.setHandlers(),e.log.debug("RuleEngine.postCreate - end")},e.setHandlers=function(){e.log.debug("RuleEngine.setHandlers - begin"),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.checkConfigurazione=e.cyto.collection(),e.cyto.nodes().on("click",e.onClickNodeHandler),e.initCallback(),e.log.debug("RuleEngine.setHandlers - end")},e.onClickNodeHandler=function(t){var n,r;e.log.debug("RuleEngine.onClickNodeHandler"),n=t.target,r=e.processNode(n),e.selectionLogDiv&&(e.selectionLogDiv.append(" - selezionato : ( "+n.id()+" )<br/>"),e.selectionLogDiv.append(r.message+" )<br/>"))},e.createCytoscape=function(t,n,r){var o;o=i.stylesheet().selector("node").css({content:"data(id)"}).selector("edge").css({"curve-style":"bezier","target-arrow-shape":"triangle","target-arrow-color":"gold",width:1,"line-color":"gold","target-arrow-color":"gold"}).selector(".config").css({"background-color":"gold"}).selector(".selected").css({"background-color":"LimeGreen"}).selector(".highlighted").css({"background-color":"red"}).selector(".vincolo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"magenta","target-arrow-color":"magenta"}).selector(".incompatibile").css({"curve-style":"bezier","target-arrow-shape":"triangle","target-arrow-fill":"filled",width:2,"line-color":"skyblue","target-arrow-color":"skyblue"}).selector(".alternativo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"darkblue","target-arrow-color":"darkblue"}).selector(".esclusivo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"orange","target-arrow-color":"orange"}),e.cyto=i(n?{container:n,boxSelectionEnabled:!1,autounselectify:!0,elements:t,layout:{name:"concentric",minNodeSpacing:20,padding:10},style:o}:{boxSelectionEnabled:!1,autounselectify:!0,elements:t,style:o}),e.cyto.ready((function(){r()}))},e.ruleNodeList=function(r,i,a){"use strict";var l,u;switch({},"",u=t(),[],e.log.debug("RuleEngine.ruleNodeList - begin"),e.log.debug("RuleEngine.ruleNodeList - toAddList:["+o(r)+"] - toRemoveList:["+o(i)+"]"),l=e.processScenario(r,i),s(l.data.scenarios),l=e.getStdScenarios(l,r,i),s(l.data.scenarios),l.data.scenarios.length){case 0:u=n(!1,l.code,l.message,[],[],[],[],l.data.scenarios,l.data.extra);break;case 1:a&&l.success&&(removeToConfig(l.data.scenarios[0].removeList),addToConfig(l.data.scenarios[0].addList),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.cyto.elements().removeClass("highlighted"),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted")),u=n(l.success,l.code,l.message,[],[],[],[],l.data.scenarios,l.data.extra);break;default:u=a?n(!1,560,l.message,[],[],[],[],l.data.scenarios):n(!0,200,l.message,[],[],[],[],l.data.scenarios)}return e.log.debug("RuleEngine.ruleNodeList - end"),u},e.processScenario=function(r,i){"use strict";var a,l,u,c,d,p,f,h;p="",f=t(),h=[],e.log.debug("RuleEngine.processScenario - toAddList:["+o(r)+"] toRemoveList:["+o(i)+"] - tiedStdMandNodeList:["+o(e.tiedStdMandNodeList)+"]"),r=r.union(e.tiedStdMandNodeList),i=i.difference(e.tassativi);var g=r.intersection(i);if(g.nonempty())return p=p+" Options ["+o(g)+"] it should be added and contemporaneously removed",f=n(!1,530,p,[],[],[],[],[]);for(var v=e.cyto.collection(),m=0;m<r.length;m++){for(var y=r[m],C=e.getVincolatiDiretti(y),b=0;b<C.length;b++){var x=C[b];if(i.contains(x)&&!r.contains(x)&&x.outgoers("edge[type='A']").size()<=1)return p=p+" - Option {"+y.id()+"} constrains Option {"+o(x)+"} that must be removed",e.log.debug("RuleEngine.processScenario - 510 message_:["+p+"]"),f=n(!1,510,p,[],[],[],[],[])}v=v.union(C)}e.log.debug("RuleEngine.processScenario - tiedByList_:["+o(v)+"]");var S=(L=e.getTiedToList(r,i)).tiedToList;p+=L.message,c=S,u=i.union(c),l=v,e.log.debug("RuleEngine.processScenario - toAddJoinList_:["+o(l)+"]"),a=l.union(r),e.log.debug("RuleEngine.processScenario - toAddAllList_:["+o(a)+"]");var E=e.getNodiIncompatibili(a),w=a.intersection(E);if(w.nonempty())return p=p+" Options ["+o(w)+"] are incompatibles each others",f=n(!1,520,p,[],[],[],[],[]);var O=e.configurazione.difference(u);e.log.debug("RuleEngine.processScenario - configDiffList_:["+o(O)+"]");var _=e.getIncSelectionMap(a,O);if(_.size>0){_.forEach((function(e,t){p=p+" - Option {"+t+"} is incompatibile with ["+o(e)+"]",u=u.union(e)}));var L;S=(L=e.getTiedToList(a,u)).tiedToList;p+=L.message,c=c.union(S),u=u.union(c),e.log.debug("RuleEngine.processScenario - toRemoveAllList_:["+o(u)+"]")}if(e.log.debug("RuleEngine.processScenario - me_.configurazione:["+o(e.configurazione)+"]"),u=u.difference(a.intersection(c)),e.log.debug("RuleEngine.processScenario -----------------------------------------------"),e.log.debug("RuleEngine.processScenario - toAddAllList_:["+o(a)+"]"),e.log.debug("RuleEngine.processScenario - toRemoveAllList_:["+o(u)+"]"),e.log.debug("RuleEngine.processScenario - toAddJoinList_:["+o(l)+"]"),e.log.debug("RuleEngine.processScenario - toRemoveJoinList_:["+o(c)+"]"),e.log.debug("RuleEngine.processScenario - incAddList :["+o(E)+"]"),e.log.debug("RuleEngine.processScenario -----------------------------------------------"),d=e.findAltPaths(a,u,c,E),p+=d.message,e.log.debug("RuleEngine.processScenario - toAddAllList_:["+o(a)+"]"),d.altGrExist){f=n(!1,522,p,{});var R=d.altGrList;e.log.debug("RuleEngine.processScenario - altGrList_:["+o(R)+"]");for(m=0;m<R.length;m++){var D=R[m];e.log.debug("RuleEngine.processScenario - altGr_:["+o(D)+"]");var N=a.union(D);e.log.debug("RuleEngine.processScenario - PRE - alt scenario - add:["+o(N)+"] remove:["+o(u)+"]"),u=u.difference(N).union(u.intersection(E)),e.log.debug("RuleEngine.processScenario - POST - alt scenario - add:["+o(N)+"] remove:["+o(u)+"]"),N=N.difference(e.configurazione),e.log.debug("RuleEngine.processScenario - POST2 - alt scenario - add:["+o(N)+"] remove:["+o(u)+"]"),h.push({addList:N,removeList:u}),f=n(!0,210,p,[],[],[],[],h)}}else{d.solvedTargetList_.nonempty()&&(e.log.debug("RuleEngine.processScenario - solvedTargetList_ :["+o(d.solvedTargetList_)+"]"),u=u.difference(d.solvedTargetList_),e.log.debug("RuleEngine.processScenario - toRemoveAllList_ :["+o(u)+"]")),e.log.debug("RuleEngine.processScenario - alreadySolvedTargetAltGroupNodeList :["+o(d.alreadySolvedTargetAltGroupNodeList)+"]");var I=a.union(d.alreadySolvedTargetAltGroupNodeList);e.log.debug("RuleEngine.processScenario - PRE - alt scenario - add:["+o(I)+"] remove:["+o(u)+"]"),u=u.difference(I).union(u.intersection(E)),e.log.debug("RuleEngine.processScenario - POST - alt scenario - add:["+o(I)+"] remove:["+o(u)+"]"),I=I.difference(e.configurazione),h.push({addList:I,removeList:u}),f=n(!0,200,p,[],[],[],[],h)}return e.log.debug("RuleEngine.processScenario - me_.tassativi:["+o(e.tassativi)+"]"),e.log.debug("RuleEngine.processScenario - me_.tiedStdMandNodeList:["+o(e.tiedStdMandNodeList)+"]"),s(h),f},e.processRuleMaxIter=function(t,n){"use strict";var r=[],i=[];for(r.push(t);r.length>0&&n>0;){var o=r.pop(),a=e.ruleNodeList(o.addList,o.removeList,!1);if(a&&a.data&&a.data.scenarios){var s=a.data.scenarios;if(0==s.length);else if(1==s.length)i.push(s[0]);else{for(var l=0;l<s.length;l++)r.push(s[l]);n--}n<=0&&e.loopScenarios.push(s)}}return i},e.processRuleActResMaxIterDepth=function(n,r,i,a){"use strict";var s=0,l=[],u=t(),c=t(),d=[];for(l.push({Scenario:n,Depth:s}),e.log.debug(" --- DEPTH - "+s+" --- START SCENARIO :toAddList:["+o(n.addList)+"] toRemoveList:["+o(n.removeList)+"]");l.length>0&&r>0;){var p=l.pop();s=p.Depth+1;var f=e.ruleNodeList(p.Scenario.addList,p.Scenario.removeList,a);if(f&&f.data&&f.data.scenarios){var h=f.data.scenarios;if(0===h.length)c.success=f.success,c.code=f.code,c.message=f.message;else if(1===h.length){e.insertIdAddList(d,h[0].addList)||(u.success=f.success,u.code=f.code,u.message=f.message,u.data.scenarios.push(h[0]),u.data.extra=f.data.extra)}else{for(var g=0;g<h.length;g++)s<=i&&l.push({Scenario:h[g],Depth:s});r--}}}return 0===u.data.scenarios.length&&(u=c),u},e.getStdScenarios=function(t,n,i){"use strict";for(var a=t,s=function(t,n,r,i){var o=null;switch(n.id()){case"ME_C":var a=e.cyto.getElementById("ME_I").outgoers("edge[type='E']").targets().intersection(i);if(a.nonempty()){var s=a[0];if(s.outgoers("edge[type='I']").targets().intersection(t).nonempty()){var l=r.difference(t),u=s.outgoers("edge[type='I']").targets(),c=l.intersection(u),d=l.difference(c);d.nonempty()&&(o=d[0])}}break;case"ME_I":var p=e.cyto.getElementById("ME_C").outgoers("edge[type='E']").targets().intersection(i);if(p.nonempty()){var f=p[0];if(f.outgoers("edge[type='I']").targets().intersection(t).nonempty()){var h=r.difference(t),g=f.outgoers("edge[type='I']").targets(),v=h.intersection(g),m=h.difference(v);m.nonempty()&&(o=m[0])}}}return o},l=[],u=[],c=[],d=0;d<a.data.scenarios.length;d++){var p=a.data.scenarios[d],f=!0,h=!1,g=p.removeList,v=p.addList;if(g.size()>0)for(var m=0;m<g.size()&&f;m++)for(var y=g[m],C=y.incomers("edge[type='E']"),b=0;b<C.size();b++){var x=C[b].source();if("ME_K"!==x.id()&&"ME_J"!==x.id()){e.log.debug("RuleEngine.getStdScenarios - toRemNode_:["+o(y)+"] ");var S=x.outgoers("edge[type='E']").targets();if(S.intersection(v).empty())if(h=!0,y.data().isStandard){var E=S.difference(y);if(e.log.debug("RuleEngine.getStdScenarios - nonStdNodeList_:["+o(E)+"] "),E.forEach((function(t){var n=e.processScenario(v.union(t),i);if(n.success)for(var r=0;r<n.data.scenarios.length;r++){e.insertIdAddList(c,n.data.scenarios[r].addList)||u.push(n.data.scenarios[r])}})),0===u.length){l.push(d);var w=582,O="It is not possible to add Options ["+o(E)+"] in removing of STD Option of the same family",_={nonStdList:r.map(S.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}}else{var L=e.getStdExcFromNode(x);e.log.debug("RuleEngine.getStdScenarios - stdExNode_:["+o(L)+"] ");var R=s(L,x,S,v);if(R){var D=e.processScenario(v.union(R),i);if(!D.success){l.push(d);w=584,O="It is not possible to add Candidate Option {"+R.id()+"} ",_={nonStdList:r.map(S.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}for(I=0;I<D.data.scenarios.length;I++){e.insertIdAddList(c,D.data.scenarios[I].addList)||u.push(D.data.scenarios[I])}}else{var N=e.processScenario(v.union(L),i);if(!N.success){l.push(d);var w=580,O="It is not possible to add STD Option {"+L.id()+"} ",_={nonStdList:r.map(S.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}for(var I=0;I<N.data.scenarios.length;I++){e.insertIdAddList(c,N.data.scenarios[I].addList)||u.push(N.data.scenarios[I])}}}}}h||u.push(p)}return l.length>0&&u.length<=1&&(a.success=!1,a.code=w,a.message=O,a.data.extra=_),a.data.scenarios=u,a},e.processNode=function(r){"use strict";var i,a,s,l,u,c;if(e.log.debug("RuleEngine.processNode - begin"),l={},u="",c=t(),i=(i=e.cyto.collection()).union(r),r.hasClass("highlighted")){var d=e.getNodiIncompatibiliConSelezionati(r);return u=u+" - Node {"+r.id()+"} ",d.forEach((function(e,t){u=u+" is incompatibile with: ["+o(e)+"] "})),c=n(!1,501,u,[],[],[],d)}if((a=e.getNodiVincolati(r,i)).size()>0&&(u=u+" - Option {"+o(i)+"} constraints ["+o(a)+"}",i=i.union(a)),u=u+" - To be evaluated ["+o(i)+"]",s=e.verificaAlternativi(r,i,!1),u+=s.message,s.altGrExist)c=n(!1,502,u,[],[],s.altGrList,[]);else if(r.hasClass("selected")){var p=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(r,i);i=p.selection,u+=p.message;for(var f=0;f<i.length;f++){var h=i[f];if(e.vincolantiInConfig(r,h,!1).nonempty())return u=u+" - Option {"+h.id()+"} is bound by an Option in Configuration)",c=n(!1,501,u,{})}i.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]'),i=n.intersection(r);e.cyto.remove(i),t.removeClass("selected")})),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.cyto.elements().removeClass("highlighted"),u=u+" - Options ["+o(i)+"] have been removed from configuration",c=n(!0,211,u,[],i,[],[])}else{var g=e.getNodiIncompatibiliConSelezionati(i);g.size>0?(g.forEach((function(e,t){u=u+" - Option {"+t+"} is incompatible with ["+o(e)+"]"})),c=n(!1,501,u,[],[],[],g)):(e.configurazione=e.configurazione.union(i),i.addClass("selected"),i.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),l.incompatibiliConSelezionato=[],u=u+" - Options ["+o(i)+"] have been added to configuration",c=n(!0,201,u,i,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),e.log.debug("RuleEngine.processNode - end"),c},e.checkProcessNode=function(r){"use strict";var i,a,s,l,u,c;if(e.log.debug("RuleEngine.checkProcessNode"),l={},u="",c=t(),i=(i=e.cyto.collection()).union(r),(a=e.getNodiVincolati(r,i)).size()>0&&(u=u+" - Option {"+o(i)+"} costraints ["+o(a)+"]",i=i.union(a)),u=u+" - To be evaluate ["+o(i)+"]",s=e.verificaAlternativi(r,i,!0),u+=s.message,s.altGrExist)c=n(!1,502,u,l);else if(r.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(r,i);i=d.selection,u+=d.message;for(var p=0;p<i.length;p++){var f=i[p];if(e.vincolantiInConfig(r,f,!0).nonempty())return u=u+" - Option {"+f.id()+"} is bound by an Option in Configuration",c=n(!1,501,u,{})}i.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]');n.intersection(r)})),e.checkConfigurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),u=u+" - Should remove ["+o(i)+"]",c=n(!0,211,u,[],i,[],[])}else{var h=e.getNodiIncompatibiliConSelezionati(i);h.size>0?(h.forEach((function(e,t){u=u+" - Option ( "+t+") is incompatible with ["+o(e)+"]"})),c=n(!1,501,u,[],[],[],h)):(e.checkConfigurazione=e.checkConfigurazione.union(i),u=u+" - Should add ["+o(i)+"]",c=n(!0,201,u,i,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),c},e.addNode=function(r){"use strict";var i,a,s,l,u;if({},l="",u=t(),e.log.debug("RuleEngine.addNode :["+r.id()+"]"),i=(i=e.cyto.collection()).union(r),r.hasClass("selected"))return e.log.debug("RuleEngine.addNode - il nodo {"+r.id()+"} è già in configurazione "),l=l+" - Option {"+r.id()+"} is already in Configuration",u=n(!1,501,l,{});if(r.hasClass("highlighted")){var c=e.getNodiIncompatibiliConSelezionati(r);return l=l+" - Option {"+r.id()+"} ",c.forEach((function(e,t){l=l+" is incompatibile with ["+o(e)+"] "})),u=n(!1,501,l,[],[],[],c)}if((a=e.getNodiVincolati(r,i)).size()>0&&(l=l+" - Option {"+o(i)+"} costraints ["+o(a)+"]",i=i.union(a)),l=l+" - To be evaluate [ "+o(i)+"]",s=e.verificaAlternativi(r,i,!1),l+=s.message,s.altGrExist)u=n(!1,502,l,[],[],s.altGrList,[]);else{var d=e.getNodiIncompatibiliConSelezionati(i);d.size>0?(d.forEach((function(e,t){l=l+" - Option { "+t+"} is incompatible with {"+o(e)+"}"})),u=n(!1,501,l,[],[],[],d)):(e.configurazione=e.configurazione.union(i),i.addClass("selected"),i.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),l=l+" - Options added [ "+o(i)+"]",u=n(!0,201,l,i,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),u},e.checkAddNode=function(r){"use strict";var i,a,s,l,u;if(e.log.debug("RuleEngine.checkAddNode"),{},l="",u=t(),i=(i=e.cyto.collection()).union(r),r.intersection(e.checkConfigurazione).nonempty())return e.log.debug("RuleEngine.addNode - Option {"+r.id()+"} is already in configuration "),l=l+" - Option {"+r.id()+"} is already in configuration",u=n(!1,501,l,{});if(r.hasClass("highlighted")){var c=e.getNodiIncompatibiliConSelezionati(r);return l=l+" - Option {"+r.id()+"} ",c.forEach((function(e,t){l=l+" is incompatible with {"+o(e)+"} "})),u=n(!1,501,l,[],[],[],c)}if((a=e.getNodiVincolati(r,i)).size()>0&&(l=l+" - Option {"+o(i)+"} costraints Options ["+o(a)+"]",i=i.union(a)),l=l+" - To be evaluate: ( "+o(i)+" )",s=e.verificaAlternativi(r,i,!0),l+=s.message,s.altGrExist)u=n(!1,502,l,[],[],s.altGrList,[]);else{var d=e.getNodiIncompatibiliConSelezionati(i);d.size>0?(d.forEach((function(e,t){l=l+" - Option ( "+t+") is incompatible with Options ["+o(e)+"]"})),u=n(!1,501,l,[],[],[],d)):(e.checkConfigurazione=e.checkConfigurazione.union(i),l=l+" - Should add ( "+o(i)+")",u=n(!0,201,l,i,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),u},e.removeNode=function(r){"use strict";var i,a,s,l,u,c;if(e.log.debug("RuleEngine.removeNode"),l={},u="",c=t(),i=(i=e.cyto.collection()).union(r),!r.hasClass("selected"))return e.log.debug("RuleEngine.removeNode - Option {"+r.id()+"} is NOT in Configuration "),u=u+" - Option {"+r.id()+"} is NOT in Configuration",c=n(!1,501,u,{});if((a=e.getNodiVincolati(r,i)).size()>0&&(u=u+" - Option "+o(i)+" constraints Options ["+o(a)+"]",i=i.union(a)),u=u+" - To be evaluate ["+o(i)+"]",u+=(s=e.verificaAlternativi(r,i,!1)).message,s.altGrExist)c=n(!1,502,u,l);else if(r.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(r,i);i=d.selection,u+=d.message;for(var p=0;p<i.length;p++){var f=i[p];if(e.vincolantiInConfig(r,f,!1).nonempty())return u=u+" Option {"+f.id()+"} is bound by an Option in Configuration",c=n(!1,501,u,{})}i.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]'),i=n.intersection(r);e.cyto.remove(i),t.removeClass("selected")})),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.cyto.elements().removeClass("highlighted"),u=u+"rimossi: ( "+o(i)+")",c=n(!0,211,u,[],i,[],[])}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),c},e.checkRemoveNode=function(r){"use strict";var i,a,s,l,u,c;if(e.log.debug("RuleEngine.removeNode"),l={},u="",c=t(),i=(i=e.cyto.collection()).union(r),!r.hasClass("selected"))return e.log.debug("RuleEngine.removeNode - Option {"+r.id()+"} is NOT in Configuration "),u=u+" - Option {"+r.id()+"} is NOT in Configuration ",c=n(!1,501,u,{});if((a=e.getNodiVincolati(r,i)).size()>0&&(u=u+" - Option "+o(i)+" constraints Options ["+o(a)+"]",i=i.union(a)),u=u+" - To be evaluate: ( "+o(i)+" )",u+=(s=e.verificaAlternativi(r,i,!0)).message,s.altGrExist)c=n(!1,502,u,l);else if(r.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(r,i);i=d.selection,u+=d.message;for(var p=0;p<i.length;p++){var f=i[p];if(e.vincolantiInConfig(r,f,!0).nonempty())return u=u+" - Option {"+f.id()+"} is bound by an Option in Configurazion)",c=n(!1,501,u,{})}e.checkConfigurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),u=u+" - Should remove Option { "+o(i)+"}",c=n(!0,211,u,[],i,[],[])}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),c},e.getTiedToList=function(t,n){"use strict";var r,i;r="",i={};for(var s=function(n){for(var r=function(n){var r=n.incomers("edge[type='V']").sources(),i=n.incomers("edge[type='A']").sources(),o=r.union(i),s=n.union(o).intersection(e.configurazione);a("RuleEngine.getTiedToList vincolantiInConfig_ iniziali :",s);for(var l=0;l<i.length;l++){var u=i[l];e.log.debug("RuleEngine.getTiedToList - altNode_:["+u.id()+"]"),u.outgoers("edge[type='A']").targets().intersection(t).nonempty()&&(s=s.difference(u),a("RuleEngine.getTiedToList vincolantiInConfig_ rimanenti :",s))}return s},i=0,o=r(n);o.size()>i;)i=o.size(),o=r(o),a("RuleEngine.getTiedToList vincolanti:",o);return o},l=e.cyto.collection(),u=0;u<n.length;u++){var c=n[u],d=s(c);(d=d.difference(n)).nonempty()&&(e.log.debug("RuleEngine.getTiedToList - vincolantiInConfig_:["+o(d)+"]"),r=r+" - Option {"+c.id()+"} is bound by ["+o(d)+"] in Configuration ",l=l.union(d))}return i.message=r,i.tiedToList=l,i},e.getNodiVincolati=function(e,t){"use strict";var n,r;for(r=(r=(r=(n=e.outgoers("edge[type='V']").targets()).outgoers("edge[type='V']").targets()).difference(t)).difference(n),a("RuleEngine.getNodiVincolati ",r);r.size()>0;)r=(r=(r=(n=n.union(r)).outgoers("edge[type='V']").targets()).difference(t)).difference(n);return n.nonempty()&&a("RuleEngine.getNodiVincolati ",n),n},e.getVincolatiDiretti=function(e){"use strict";var t,n;for(n=(n=(n=(t=e.outgoers("edge[type='V']").targets()).outgoers("edge[type='V']").targets()).difference(e)).difference(t);n.size()>0;)n=(n=(n=(t=t.union(n)).outgoers("edge[type='V']").targets()).difference(e)).difference(t);return t.nonempty()&&a("RuleEngine.getVincolatiDiretti ",t),t},e.getVincolatiDiretti_=function(t){"use strict";var n,r;for(n=t.outgoers("edge[type='V']").targets(),a("RuleEngine.getVincolatiDiretti 0",n),r=(r=n.outgoers("edge[type='V']").targets()).difference(e.configurazione.union(t)),a("RuleEngine.getVincolatiDiretti 1",r);r.difference(n).nonempty();)r=n.outgoers("edge[type='V']").targets(),(n=(r=r.difference(e.configurazione)).union(n)).nonempty()&&a("RuleEngine.getVincolatiDiretti 2",n);return n=n.difference(e.configurazione)},e.verificaEsclusivi=function(t,n){"use strict";var r;r={},e.log.debug("RuleEngine.verificaEsclusivi - initNode:["+t.id()+"] - evalSelection:["+o(n)+"]");var i=n.incomers("edge[type='E']");if(e.log.debug("RuleEngine.verificaEsclusivi - Archi Esclusivi :["+o(i)+"]"),i.nonempty()){var a=i.sources();e.log.debug("RuleEngine.verificaEsclusivi - Gruppi Alternativi :["+o(a)+"]");for(var s=0;s<a.length;s++){var l=a[s].outgoers("edge[type='E']").targets().filter((function(e){if(e.hasClass("selected"))return e}));e.log.debug("RuleEngine.verificaEsclusivi - initNode:["+t.id()+"] - excSelectedNodeList_:["+o(l)+"]"),1!==l.size()||t.hasClass("selected")||l[0].removeClass("selected")}}return r.message="",e.log.debug("RuleEngine.verificaEsclusivi - result message:[]"),r},e.findAltPaths=function(t,n,r,i){"use strict";var a,s;a="",(s={}).altGrExist=!1,s.altGrList=[],s.solvedTargetList_=e.cyto.collection(),s.alreadySolvedTargetAltGroupNodeList=e.cyto.collection();var l=t.outgoers("edge[type='A']");if(l.size()>0){var u=l.targets();e.log.debug("RuleEngine.findAltPaths - Gruppi Alternativi :["+o(u)+"]");for(var c=l.sources(),d=e.cyto.collection(),p=e.cyto.collection(),f=0;f<c.length;f++){var h=!1,g=c[f],v=g.outgoers("edge[type='A']");e.log.debug("RuleEngine.findAltPaths -----------------------------------------------"),e.log.debug("RuleEngine.findAltPaths - targetAltEdgeList_ :["+v.size()+"] di sourceAltNode_:["+o(g)+"]"),e.log.debug("RuleEngine.findAltPaths - me_.configurazione :["+o(e.configurazione)+"]"),e.log.debug("RuleEngine.findAltPaths - toAddList :["+o(t)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveList :["+o(n)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveJoinList :["+o(r)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveList.difference(toRemoveJoinList) :["+o(n.difference(r))+"]"),e.log.debug("RuleEngine.findAltPaths - incAddList :["+o(i)+"]");var m=t.union(e.configurazione.difference(n).difference(i));e.log.debug("RuleEngine.findAltPaths - toAddAllConfigList_ :["+o(m)+"]");for(var y=0;y<v.length;y++){var C=v[y].target();e.log.debug("RuleEngine.findAltPaths - isSolved Test targetAltNode_ :["+o(C)+"] - targetAltNodeList_:["+o(b)+"] - toRemoveList:["+o(n)+"]");var b=e.cyto.collection();b="AG"===C.data().type?b=C.outgoers("edge[type='V']").targets():C,m.contains(b)&&b.intersection(i).empty()&&(h=!0,e.log.debug("RuleEngine.findAltPaths - isSolved TRUE targetAltNode_ :["+o(C)+"] - targetAltNodeList_:["+o(b)+"] - toRemoveList:["+o(n)+"]"),r.contains(b)&&(p=p.union(b),e.log.debug("RuleEngine.findAltPaths - solvedTargetList_ :["+o(b)+"]")),"AG"===C.data().type&&(s.alreadySolvedTargetAltGroupNodeList=s.alreadySolvedTargetAltGroupNodeList.union(C))),e.log.debug("RuleEngine.findAltPaths - isSolved Test targetAltNode_ :["+o(C)+"] - ["+h+"]")}s.solvedTargetList_=p,h||(d=d.add(g),e.log.debug("RuleEngine.findAltPaths - sourceRemainAltNodeList_ :["+o(d)+"] di sourceAltNode_:["+o(g)+"]")),e.log.debug("RuleEngine.findAltPaths -----------------------------------------------")}if(d.nonempty()){for(f=0;f<d.length;f++){var x=d[f],S=x.outgoers("edge[type='A']").targets();a=a+" - Option {"+x.id()+"} binds alternatively Options ";for(y=0;y<S.length;y++){var E=S[y],w=E.outgoers("edge[type='V']").targets();w=w.union(w.outgoers("edge[type='V']").targets()),a=a+" ("+o(E)+" ["+o(w)+"]) ";var O=e.cyto.collection();O=E.union(w),e.log.debug("RuleEngine.findAltPaths - altGrElement_ :["+o(O)+"] - toRemoveList :["+o(n)+"] - intersection :["+o(O.intersection(n))+"]"),O.intersection(i).empty()?s.altGrList.push(O):a=a+" - Options ["+o(O.intersection(i))+"] are incompatibles with needed selection from ("+x.id()+") "}}s.altGrExist=!0}}return s.message=a,e.log.debug("RuleEngine.findAltPaths - result message:["+a+"]"),s},e.verificaAlternativi=function(t,n,r){"use strict";var i,a;i="",(a={}).altGrExist=!1,a.altGrList=[];var s=r?e.checkConfigurazione:e.configurazione,l=n.outgoers("edge[type='A']");if(l.size()>0){var u=l.targets();e.log.debug("RuleEngine.verificaAlternativi - Gruppi Alternativi :["+o(u)+"]");for(var c=l.sources(),d=e.cyto.collection(),p=0;p<c.length;p++){var f=!1,h=c[p],g=h.outgoers("edge[type='A']");e.log.debug("RuleEngine.verificaAlternativi - targetAltEdgeList_ :["+o(g)+"] di sourceAltNode_:["+o(h)+"]");for(var v=0;v<g.length;v++){g[v].target().intersection(s).nonempty()&&(f=!0)}f||(d=d.add(h),e.log.debug("RuleEngine.verificaAlternativi - sourceRemainAltNodeList_ :["+o(d)+"] di sourceAltNode_:["+o(h)+"]"))}if(d.nonempty()&&!t.hasClass("selected")){for(p=0;p<d.length;p++){var m=d[p].outgoers("edge[type='A']").targets();i=i+" - Option { "+t.id()+" } binds alternatively Options ";for(v=0;v<m.length;v++){var y=m[v];if(y===t)return i=" "+o(y)+" auto-resolve selection",a.altGrExist=!1,a.altGrList=[],a;var C=y.outgoers("edge[type='V']").targets();i=i+" ("+o(y)+" ["+o(C)+"]) ";var b;b=y.union(C),a.altGrList.push(b)}}a.altGrExist=!0}}return a.message=i,""!==i&&e.log.debug("RuleEngine.verificaAlternativi - result message:["+i+"]"),a},e.getNodiIncompatibiliConSelezionati=function(t){"use strict";var n,r,i,o,a,s,l;n=new Map;for(var u=0;u<t.size();u++){var c=t[u];s=[],o=e.configurazione.intersection(c.outgoers("edge[type='I']").targets()),a=e.configurazione.intersection(c.incomers("edge[type='I']").sources()),l=e.configurazione.intersection(e.getEsclusivi(c)),(s=o.union(a).union(l)).size()>0&&(r=c.id(),i=s,n.set(r,i))}return n},e.getNodiIncompatibiliConSelezioneCorrente=function(t){"use strict";var n,r;return[],n=e.configurazione.intersection(t.outgoers("edge[type='I']").targets()),r=e.configurazione.intersection(t.incomers("edge[type='I']").sources()),n.union(r)},e.getNodiIncompatibiliConConfig=function(){"use strict";var t,n,r,i;return t=[],n=e.configurazione.outgoers("edge[type='I']").targets(),r=e.configurazione.incomers("edge[type='I']").sources(),t=n.union(r),i=e.getEsclusiviDaConfig(),t=t.union(i)},e.getNodiIncompatibili=function(t){"use strict";var n,r,i,o;return n=e.cyto.collection(),r=e.cyto.collection(),e.cyto.collection(),e.cyto.collection(),r=t.outgoers("edge[type='I']").targets(),i=t.incomers("edge[type='I']").sources(),n=r.union(i),o=e.getEsclusivi(t),n=n.union(o)},e.getIncSelectionMap=function(t,n){"use strict";var r,i,o,a,s,l,u;r=new Map;for(var c=0;c<t.size();c++){var d=t[c];l=[],a=n.intersection(d.outgoers("edge[type='I']").targets()),s=n.intersection(d.incomers("edge[type='I']").sources()),u=n.intersection(e.getExcFromNode(d)),(l=a.union(s).union(u)).size()>0&&(i=d.id(),o=l,r.set(i,o))}return r},e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati=function(e,t){"use strict";var n,r;n="",(r={}).selection=t;var i=t.incomers("edge[type='A']").sources();return a("nodiVincolatiAlternativiDaNodiSelezionati:",i),i.hasClass("selected")&&(n=n+" - Option {"+e.id()+"} is bound by Options ["+o(i)+"]",r.selection=t.union(i)),r.message=n,r},e.getStdExcFromNode=function(t){"use strict";var n,r;n=null,r=t.outgoers("edge[type='E']").targets();for(var i=0;i<r.length;i++)r[i].data().isStandard&&(n=r[i]);return e.log.debug("RuleEngine.getStdExcFromNode - standard_:["+o(n)+"]"),n},e.getExcFromNode=function(t){"use strict";var n,r,i;n=e.cyto.collection(),r=t.incomers("edge[type='E']");for(var a=0;a<r.size();a++)i=r[a].source().outgoers("edge[type='E']").targets().difference(t),n=n.union(i);return n.nonempty()&&e.log.debug("RuleEngine.getExcFromNode - Esclusivi all:["+o(n)+"]"),n},e.getEsclusiviDaConfig=function(){var t;t=e.cyto.collection();var n=e.configurazione.incomers("edge[type='E']");if(n.nonempty()){for(var r=0;r<n.length;r++){var i=n[r].source(),a=i.outgoers("edge[type='E']").targets(),s=n[r].target();e.log.debug("RuleEngine.getEsclusiviDaConfig - Gruppo Esclusivo :["+i.id()+"] - Nodi Esclusivi del Gruppo :["+o(a)+"] - Nodo Esclusivo :["+s.id()+"]"),t=t.union(a.difference(s))}e.log.debug("RuleEngine.getEsclusiviDaConfig - Esclusivi:["+o(t)+"]")}return t},e.getEsclusivi=function(t){var n;n=e.cyto.collection();var r=t.incomers("edge[type='E']");if(r.nonempty()){for(var i=0;i<r.length;i++){var a=r[i].source().outgoers("edge[type='E']").targets(),s=r[i].target();n=n.union(a.difference(s))}e.log.debug("RuleEngine.getEsclusivi - Esclusivi:["+o(n)+"]")}return n},e.vincolantiInConfig=function(t,n,r){"use strict";var i=r?e.checkConfigurazione:e.configurazione;a("RuleEngine.vincolantiInConfig initNode:",n);var o=e.cyto.collection(),s=n.incomers("edge[type='V'],edge[type='A']").sources();return a("RuleEngine.vincolantiInConfig vincolanti:",s),o=s.intersection(i).difference(t),a("RuleEngine.vincolantiInConfig vincolantiInConfig:",o),o},e.getVincolantiDaConfig=function(t){"use strict";e.cyto.collection();var n=t.incomers("edge[type='V'],edge[type='A']").sources();return a("RuleEngine.getVincolantiDaConfig vincolanti:",n),n.intersection(e.configurazione)},e.getVincolantiConfigIterMax_=function(t,n){"use strict";var r=e.cyto.collection(),i=t.incomers("edge[type='V'],edge[type='A']").sources();r=r.union(i).intersection(e.configurazione);for(var o=n;o>0;o--)i=r.incomers("edge[type='V'],edge[type='A']").sources(),r=r.union(i).intersection(e.configurazione),a("RuleEngine.getVincolantiConfigRecMax vincolanti:",r);return r},e.getVincolantiConfigIterMax=function(t){"use strict";var n,r,i;for(n=e.cyto.collection(),i=0,r=t.incomers("edge[type='V'],edge[type='A']").sources(),n=n.union(r).intersection(e.configurazione);n>i;)i=n.size(),r=n.incomers("edge[type='V'],edge[type='A']").sources(),n=n.union(r).intersection(e.configurazione),a("RuleEngine.getVincolantiConfigRecMax vincolanti:",n);return n},e.getVincolantiDirettiDaConfig=function(t){"use strict";e.cyto.collection();var n=t.incomers("edge[type='V']").sources();return a("RuleEngine.getVincolantiDirettiDaConfig vincolanti dir:",n),n.intersection(e.configurazione)},e.getVincolantiAltDaConfig=function(t){"use strict";e.cyto.collection();var n=t.incomers("edge[type='A']").sources();return a("RuleEngine.getVincolantiAltDaConfig vincolanti alt:",n),n.intersection(e.configurazione)},addToConfig=function(t){"use strict";e.configurazione=e.configurazione.union(t),t.addClass("selected"),t.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),a("RuleEngine.addToConfig me_.configurazione:",e.configurazione)},removeToConfig=function(t){"use strict";e.configurazione=e.configurazione.difference(t),t.removeClass("selected"),t.forEach((function(t){e.cyto.remove("edge[source='config'][target='"+t.id()+"']")})),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig()},e.insertIdAddList=function(t,n){var r=e.getIdList(n).sort();this.compareOrdIdList=function(e,t){if(e.length<t.length)return 1;if(e.length>t.length)return-1;for(var n=0;n<e.length;n++){var r=t[n].localeCompare(e[n]);if(0!==r)return r}return 0};var i=!1;if(t[r.length]&&0!==t[r.length].length){for(var o=t[r.length],a=0,s=o.length-1,l=0,u=this.compareOrdIdList(o[l],r);a<=s&&!i;)switch(l=parseInt(a+(s-a)/2,10),u=this.compareOrdIdList(o[l],r)){case 0:i=!0;break;case-1:s=l-1;break;case 1:a=l+1}if(!i){var c=1===u?l+1:l;o.splice(c,0,r)}return i}for(var d=0;d<r.length;d++)void 0===t[d]&&(t[d]=[]);return t[r.length]=[],t[r.length].push(r),i},e.getNodeList=function(t){"use strict";for(var n=e.cyto.collection(),r=0;r<t.length;r++){var i=e.cyto.getElementById(t[r]);i&&(n=n.union(i))}return n},e.getIdList=function(e){"use strict";for(var t=[],n=0;n<e.size();n++){var r=e[n].id();r&&t.push(r)}return t};var t=function(){"use strict";var e={success:!1,code:500,message:"Generic Error",data:{}};return e.data.addList=[],e.data.remList=[],e.data.altGrList=[],e.data.incList=[],e.data.scenarios=[],e.data.extra={},e},n=function(e,t,n,r,i,o,a,s,l){"use strict";var u={};return u.success=e,u.code=t,u.message=n,u.data={},u.data.addList=r||[],u.data.remList=i||[],u.data.altGrList=o||[],u.data.incList=a||[],u.data.scenarios=s||[],u.data.extra=l||{},u},o=function(e){return r.join(r.map(e,(function(e){return e.id()}))," ")},a=function(t,n){"use strict";var r="";n.forEach((function(e){r=r+" "+e.id()})),e.log.debug(t+":["+r+"]")},s=function(t){"use strict";e.log.debug(" -- SCENARIOS: ["+t.length+"]");for(var n=0;n<t.length;n++)e.log.debug(" ------ ("+n+") --- Add:["+o(t[n].addList)+"] - Remove:["+o(t[n].removeList)+"]")}}},317:(e,t,n)=>{var r=n(300),i=n(799),o=n(948),a=n(321).JL,s=n(677),l=n(46);a().setOptions({appenders:[]}),e.exports=function(){var e;(e=this).ver="142",e.onInitCallback=null,e.onSetVehicleCallback=null,e.onSetVehicleErrorCallback=null,e.cytoComModDiv=null,e.cytoVehicleDiv=null,e.selectionLogDiv=null,e.sccf={},e.fccf={},e.sccf=e.fccf,e.npe={},e.fccfVehicleSelected={},e.fccfVehicleSelected.Groups=[],e.fccfVehicleSelected.BaseAttributes=[],e.optionalCustomConfig=null,e.ECommOrdValidOverride=null,e.isQualModActive=!1,e.cmRuleEngine=null,e.ruleEngine=null,e.initCallback=null,e.now=null,e.log=null,e.jsonpath=s;var t={},n={},u=null;e.axiosInstance=r.create({httpsAgent:new i.Agent({rejectUnauthorized:!1})}),e.isLazyVehLoad=!0,e.vehBufferLength=100,e.Env=null,e.Scope=null,e.BrandCod=null,e.BrandName=null,e.MarketName=null,e.LangName=null,e.MVS=null,e.modelNSPathMap=new Map,e.treeScopeOverride=!1,e.addStdOpts=!0,e.dcTypeMap=new Map,e.dictOgMap=new Map,e.dictBodyCtMap=new Map,e.dictBodyCgMap=new Map,e.dictSeatItMap=new Map,e.dictSeatIgMap=new Map,e.ftTypeMap=new Map,e.BAttrs=[],e.BaseAttrValues={},e.BaseAttributes={},e.bAttrValMap=new Map,e.Vehicles={},e.ScopeConfigOverUrl="https://carconfigurator.fcagroup.it/preview.www.fiat.it/bp_data/fccf_mv/scopeJson/fclibScopeConfig230.json",e.apiName="SccfClientApi",e.maxIter=48;var c={Vehicle:{PriceIndex:"-1",PriceNoVatIndex:"-1"},Option:{PriceIndex:"-1",PriceNoVatIndex:"-1",PriceVatPerc:null,PriceVatPercMkt:null},MapConfig:{},RefColByGraph:!0,OptGroupCod:{CL:!0,IN:!0},MvsFile:{Prefix:"MVS_T5_",Extension:"json"},QualModel:{LoadMng:!0}},d=!0;e.scopeConfig={Brand:{abarth:{Cod:"66",Des:"Abarth",BrandDomSlug:"abarth",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3548",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3224",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3545",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3175",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3547",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},alfaromeo:{Cod:"83",Des:"Alfa Romeo",BrandDomSlug:"alfaromeo",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3472",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3576",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3486",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3470",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3471",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},citroen:{Cod:"CC",Des:"Citroen",BrandDomSlug:"citroen",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3472",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3576",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3486",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3470",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3471",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},ds:{Cod:"SS",Des:"DS",BrandDomSlug:"dsautomobiles",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3472",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3576",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3486",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3470",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3471",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},fiat:{Cod:"00",Des:"Fiat",BrandDomSlug:"fiat",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3548",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3224",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3545",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3175",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3547",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},fiatprofessional:{Cod:"77",Des:"Fiat Professional",BrandDomSlug:"fiatprofessional",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3548",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3224",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3545",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3175",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3547",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},jeep:{Cod:"57",Des:"JEEP",BrandDomSlug:"jeep-official",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3548",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3224",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3545",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3175",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3547",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},lancia:{Cod:"70",Des:"Lancia",BrandDomSlug:"lancia",Mkt:{IT:{Cod:"1000",Lng:{it:{Cod:"5"}}}}},opel:{Cod:"GG",Des:"Opel",BrandDomSlug:"opel",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3472",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3576",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3486",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3470",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3471",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},peugeot:{Cod:"PP",Des:"Peugeot",BrandDomSlug:"peugeot",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3472",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3576",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3486",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3470",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3471",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},tofas:{Cod:"85",BrandDomSlug:"tofas",Mkt:{IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}}}},tofasprofessional:{Cod:"87",BrandDomSlug:"tofasprofessional",Mkt:{IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}}}}},Env:{devprev:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/aemdevms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584924",SiteEnv:"dev",DataEnv:"preview",RelEnvPrev:"devprev",RelEnvPub:"devpub"},devpub:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/aemdevms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584924",SiteEnv:"dev",DataEnv:"publish",RelEnvPrev:"devprev",RelEnvPub:"devpub"},certprev:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/preview.aemcertms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584926",SiteEnv:"cert",DataEnv:"preview",RelEnvPrev:"certprev",RelEnvPub:"certpub"},certpub:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/aemcertms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584926",SiteEnv:"cert",DataEnv:"publish",RelEnvPrev:"certprev",RelEnvPub:"certpub"},preview:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/preview.www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584925",SiteEnv:"prod",DataEnv:"preview",RelEnvPrev:"preview",RelEnvPub:"publish"},publish:{NSAbsSlugPath:"https://www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584925",SiteEnv:"prod",DataEnv:"publish",RelEnvPrev:"preview",RelEnvPub:"publish"},envList:["devprev","devpub","certprev","certpub","preview","publish"],ContextMode:"absolute",ProxySlug:"/sccfns/",ProxySlugEvo:"/sccf/",ConfigUrl:"https://carconfigurator.fcagroup.it"},Mode:{initScopeType:"sccfC2evo"}},e.getVersion=function(){"use strict";var t=e.cmRuleEngine?e.cmRuleEngine.getVersion():"rei";return e.ver+t},e.init=function(t,n,r,i,l,u,d,p,f){"use strict";e.mbPath=n,e.cmPath=r,e.onInitCallback=i,e.onInitErrorCallback=l,e.log=a();var h=a.createConsoleAppender("consoleAppender");h.level=a.getWarnLevel(),e.log.setOptions({appenders:[h]}),e.log.info(e.apiName+".init - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".init - begin"),e.log.debug(e.apiName+".init - lodash:"+o.VERSION),e.log.debug(e.apiName+".init - Params - cmDataSource:["+t+"] mbPath:["+n+"] cmPath:["+n+"]"),e.createFccf(),e.log.debug(e.apiName+".init - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=d,e.cytoVehicleDiv=p,e.selectionLogDiv=f,e.optionalCustomConfig=u,e.jsonpath=s,t?e.createComModRuleEngine(t):c.QualModel&&c.QualModel.LoadMng?e.getCMDataAndQCDataSequentialCall():e.getCMDataCall(),e.log.debug(e.apiName+".init - end")},e.initScope=function(t,n,r,i,l,u,c,d,f,h){"use strict";e.onInitScopeSuccessCallback=l,e.onInitScopeErrorCallback=u,e.log=a();var g=a.createConsoleAppender("consoleAppender");g.level=a.getWarnLevel(),e.log.setOptions({appenders:[g]}),e.log.info(e.apiName+".initScope - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".initScope - begin"),e.log.debug(e.apiName+".initScope - lodash:"+o.VERSION),e.log.debug(e.apiName+".initScope - Params - Brand:["+t+"] Market:["+n+"] Lang:["+r+"] Env:["+i+"]"),e.createFccf(),e.log.debug(e.apiName+".initScope - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=d,e.cytoVehicleDiv=f,e.selectionLogDiv=h,e.optionalCustomConfig=c,c&&c.scopeConfig&&o.merge(e.scopeConfig,e.optionalCustomConfig.scopeConfig),e.jsonpath=s,p(t,n,r,i)?e.getScopeDataCall():(e.log.warn(e.apiName+".initScope - Internal Scope Not found WARN - external search"),e.getScopeConfigCall(t,n,r,i)),e.log.debug(e.apiName+".initScope - end")},e.getScopeConfigCall=function(t,n,r,i){"use strict";var o=v(),a=function(t){e.log.error(e.apiName+".getScopeConfigCall - ERROR["+t.message+"]");var n=ie(!1,542,"InitScope - getScopeConfigCall ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getScopeConfigCall - begin");var s="";try{s=e.ScopeConfigOverUrl,e.log.info(e.apiName+".getScopeConfigCall - wsUrl:["+s+"]"),e.log.warn(e.apiName+".getScopeConfigCall - wsUrl:["+s+"]")}catch(t){var l={};e.log.error(e.apiName+".getScopeConfigCall - ERROR["+t+"] - wsUrl:["+s+"]"),l.message="Malformed wsUrl",a(l)}e.axiosInstance.get(s,o).then((function(o){if(o&&o.data)if(e.log.debug(e.apiName+".getScopeConfigCall - success"),e.timeEnd(),e.log.debug(e.apiName+".getScopeConfigCall - pre-scopeConfig:["+e.scopeConfig+"]"),e.scopeConfig=o.data,e.log.debug(e.apiName+".getScopeConfigCall - post-scopeConfig:["+e.scopeConfig+"]"),e.log.debug(e.apiName+".getScopeConfigCall - ScopeConfig overwrited"),p(t,n,r,i))e.getScopeDataCall();else{e.log.warn(e.apiName+".initScope - Scope Not found WARN");var a=ie(!1,590,e.apiName+".initScope - Scope Not found ERROR",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(a)}else{e.log.error(e.apiName+".getScopeConfigCall - JSON.parse ERROR["+o+"]");a=ie(!1,542,"Init - getScopeConfigCall ERROR[Content parse error]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(a)}}),a)},e.getScopeDataCall=function(){"use strict";var t=v(),n=function(t){e.log.error(e.apiName+".getScopeDataCall - ERROR["+t.message+"]");var n=ie(!1,592,"InitScope - getScopeDataCall ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getScopeDataCall - begin");var r="";try{"undefined"!=typeof document&&(document.cookie="cc_cookie=cookieisset;path=/;"),r=f(),e.log.info(e.apiName+".getScopeDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getScopeDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}e.axiosInstance.get(r,t).then((function(t){if(t&&t.data){e.log.debug(e.apiName+".getScopeDataCall - success:["+t.data+"]");var n=t.data;if(n&&n.brand&&n.comMods){e.fccf.Scope.Brand={},e.fccf.Scope.Brand.Cod=e.BrandCod,e.fccf.Scope.Brand.SrcCod=n.brandSrcCod,e.fccf.Scope.Brand.Key=e.BrandName,e.fccf.Scope.Brand.Des=e.scopeConfig.Brand[e.BrandName].Des,e.fccf.Scope.Language={},e.fccf.Scope.Language.Cod=n.language,e.fccf.Scope.Language.Key=e.LangName,e.fccf.Scope.Language.Des=n.languageDes,e.fccf.Scope.Market={},e.fccf.Scope.Market.Cod=n.market,e.fccf.Scope.Market.Key=e.MarketName,e.fccf.Scope.Market.Des=n.marketDes;for(var r=0;r<n.comMods.length;r++){for(var i=n.comMods[r],a=n.comMods[r].mvss,s={Vehicles:{}},l=0;l<a.length;l++){var u=a[l];"preview"===e.scopeConfig.Env[e.Env].DataEnv&&"1"!==u.status&&(s.Vehicles[u.code]={},s.Vehicles[u.code].Cod=u.code,s.Vehicles[u.code].Des=u.desc),"publish"===e.scopeConfig.Env[e.Env].DataEnv&&"2"!==u.status&&(s.Vehicles[u.code]={},s.Vehicles[u.code].Cod=u.code,s.Vehicles[u.code].Des=u.desc)}o.isEmpty(s.Vehicles)||(s.Cod=i.code,s.Des=i.desc,e.fccf.Scope.ComModels[i.code]=s,e.modelNSPathMap.set(i.code,i.nsbpath?i.nsbpath:null))}}e.log.info(e.apiName+".getScopeDataCall - SUCCESS["+t+"]");var c=ie(!0,200,"InitScope - getScopeDataCall SUCCESS",{});e.onInitScopeSuccessCallback&&e.onInitScopeSuccessCallback(c)}else{e.log.error(e.apiName+".getScopeDataCall - JSON.parse ERROR["+t+"]");c=ie(!1,592,"Init - getScopeDataCall ERROR[Content parse error]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(c)}}),n)},e.setModel=function(t,n,r){"use strict";var i;e.log.info(e.apiName+".setModel - getVersion["+e.getVersion()+"]"),e.log.info(e.apiName+".setModel - ChangeRequest["+H(t)+"]"),e.onInitCallback=n,e.onSetModelErrorCallback=r;var o=!0;!o||t&&t.Selections&&1===t.Selections.length&&t.Selections[0].Cod||(o=!1,i=ie(!1,510,"setModel ERROR[ChangeRequest malformed]",Z([])),e.log.debug(e.apiName+".setModel ERROR[ChangeRequest malformed]"),e.onSetModelErrorCallback&&e.onSetModelErrorCallback(i)),o&&(e.CModel=t.Selections[0].Cod,e.log.debug(e.apiName+".setModel - Commercial Model:["+e.CModel+"]"),e.CModel&&(o=!1,e.getModelBuildCall(e.CModel)))},e.getModelBuildCall=function(){"use strict";var t=v(),n=function(t){e.log.error(e.apiName+".getModelBuildCall - ERROR["+t.message+"]"),e.log.debug(e.apiName+".getModelBuildCall - ERROR["+t.message+"]");var n=ie(!1,540,"SetModel - getModelBuildCall ERROR["+t.message+"]",{});e.onSetModelErrorCallback&&e.onSetModelErrorCallback(n)},r=function(t){if(t&&t.data){e.log.debug(e.apiName+".getModelBuildCall - success"),e.log.debug(e.apiName+".getModelBuildCall - response.data["+t.data+"]"),e.timeEnd();var n=h();g(t.data,n),e.log.debug(e.apiName+".getModelBuildCall - me_.mbPath["+e.mbPath+"]"),c.QualModel&&c.QualModel.LoadMng?e.getCMDataAndQCDataSequentialCall():e.getCMDataCall()}else{e.log.error(e.apiName+".getModelBuildCall - JSON.parse ERROR["+t+"]");var r=ie(!1,550,"SetModel - getModelBuildCall ERROR[Content parse error]",{});e.onSetModelErrorCallback&&e.onSetModelErrorCallback(r)}};e.timeBegin(),e.log.debug(e.apiName+".getModelBuildCall - begin");try{"undefined"!=typeof document&&(document.cookie="cc_cookie=cookieisset;path=/;");var i="";switch(e.scopeConfig.Env.ContextMode){case"revproxy":i=e.scopeConfig.Env.ProxySlug+"fiat/"+e.Env+"/data/fccf_mv/scopeTree/"+e.Scope+"_"+e.CModel+".json";break;case"absolute":i=e.scopeConfig.Env[e.Env].NSAbsSlugPath+"fiat.it/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF+"scopeTree/"+e.Scope+"_"+e.CModel+".json";break;case"cclocal":i=e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeTree/"+e.Scope+"_"+e.CModel+".json"}}catch(t){var o={};e.log.error(e.apiName+".getScopeDataCall - ERROR["+t+"] - wsUrl:["+i+"]"),o.message="Malformed wsUrl",n(o)}if("sccfC2evo"===e.scopeConfig.Mode.initScopeType||"sccfC2"===e.scopeConfig.Mode.initScopeType&&e.CModel&&null!==e.modelNSPathMap.get(e.CModel)){var a={};a.data=e.modelNSPathMap.get(e.CModel),e.log.info(e.apiName+".getModelBuildCall - nsbpath:["+a.data+"]"),r(a)}else e.treeScopeOverride=!0,e.log.info(e.apiName+".getModelBuildCall - wsUrl:["+i+"]"),e.axiosInstance.get(i,t).then(r,n)},e.loadECommOrdConfig=function(t){t&&t.Configurations&&(t.Configurations.Vehicle&&t.Configurations.Vehicle.ECommOrdValidOverride&&(e.ECommOrdValidOverride="true"===t.Configurations.Vehicle.ECommOrdValidOverride.toLowerCase()),t.Configurations.Ecommerce&&t.Configurations.Ecommerce.ECommOrdValidOverride&&("object"==typeof t.Configurations.Ecommerce.ECommOrdValidOverride&&0===t.Configurations.Ecommerce.ECommOrdValidOverride.length?e.ECommOrdValidOverride=null:e.ECommOrdValidOverride="true"===t.Configurations.Ecommerce.ECommOrdValidOverride.toLowerCase()),t.Configurations.Ecommerce&&t.Configurations.Ecommerce.isQualModActive&&"true"===t.Configurations.Ecommerce.isQualModActive.toLowerCase()&&(e.isQualModActive=!0))},e.getCMDataCall=function(){"use strict";var t=v(),n=function(t){e.log.error(e.apiName+".getCMDataCall - ERROR["+t.message+"]");var n=ie(!1,540,"Init - getCMDataCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getCMDataCall - begin");var r="";try{r=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getCMDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}e.axiosInstance.get(r,t).then((function(t){if(t&&t.data)e.log.debug(e.apiName+".getCMDataCall - success"),e.timeEnd(),e.loadECommOrdConfig(t.data),e.createComModRuleEngine(t.data);else{e.log.error(e.apiName+".getCMDataCall - JSON.parse ERROR["+t+"]");var n=ie(!1,550,"Init - getCMDataCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)}}),n)},e.getCMDataAndQCDataParallelCall=function(){"use strict";var t,n,r={isSuccCM:!1,isSuccQC:!1},i=v(),o=function(t){e.log.error(e.apiName+".getCMDataCall - ERROR["+t.message+"]");var n=ie(!1,540,"Init - getCMDataAndQCDataParallelCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - begin");var a="";try{a=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataAndQCDataParallelCall - wsUrl:["+a+"]")}catch(t){var s={};e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - ERROR["+t+"] - wsUrl:["+a+"]"),s.message="Malformed wsUrl",o(s)}e.axiosInstance.get(function(){var t=null;try{if(t=e.cmPath?e.mbPath+"/"+e.cmPath+"/QC.json":e.mbPath.replace("CM_T5_","QM_"),e.mbPath.indexOf("?")>0)t=t+"?"+e.mbPath.split("?")[1];e.log.debug(e.apiName+".getQCDataUrl - qcUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getQCDataUrl - qcUrl ERROR["+t.message+"]")}return t}(),i).then((function(i){if(i&&i.data)r.isSuccQC=!0,n=i.data,r.isSuccCM&&r.isSuccQC&&(e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - success"),e.timeEnd(),e.createComModRuleEngine(t,n));else{e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - JSON.parse ERROR["+i+"]");var o=ie(!1,550,"Init - getCMDataAndQCDataParallelCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(o)}}),(function(t){e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - ERROR["+t.message+"]");var n=ie(!1,540,"Init - getCMDataAndQCDataParallelCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)})),e.axiosInstance.get(a,i).then((function(i){if(i&&i.data)r.isSuccCM=!0,t=i.data,e.loadECommOrdConfig(t),r.isSuccCM&&r.isSuccQC&&(e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - success"),e.timeEnd(),e.createComModRuleEngine(t,n));else{e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - JSON.parse ERROR["+i+"]");var o=ie(!1,550,"Init - getCMDataAndQCDataParallelCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(o)}}),o)},e.getCMDataAndQCDataSequentialCall=function(){"use strict";var t,n,r=v(),i=function(t){e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t.message+"]");var n=ie(!1,540,"Init - getCMDataAndQCDataSequentialCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)},o=function(t){e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t.message+"]");var n=ie(!1,540,"Init - getCMDataAndQCDataSequentialCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)},a=function(r){if(r&&r.data)n=r.data,e.createComModRuleEngine(t,n);else{e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - JSON.parse ERROR["+r+"]");var i=ie(!1,550,"Init - getCMDataAndQCDataSequentialCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(i)}};e.timeBegin(),e.log.debug(e.apiName+".getCMDataAndQCDataSequentialCall - begin");var s="";try{s=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataAndQCDataSequentialCall - wsUrl:["+s+"]")}catch(t){var l={};e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t+"] - wsUrl:["+s+"]"),l.message="Malformed wsUrl",i(l)}e.axiosInstance.get(s,r).then((function(n){if(n&&n.data)t=n.data,e.loadECommOrdConfig(t),null===e.ECommOrdValidOverride&&e.isQualModActive?e.axiosInstance.get(function(){var t=null;try{t=e.cmPath?e.mbPath+"/"+e.cmPath+"/QC.json":e.mbPath.replace("CM_T5_","QM_"),e.mbPath.indexOf("?")>0&&(t=t+"?"+e.mbPath.split("?")[1]),e.log.debug(e.apiName+".getQCDataUrl - qcUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getQCDataUrl - qcUrl ERROR["+t.message+"]")}return t}(),r).then(a,o):e.createComModRuleEngine(t);else{e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - JSON.parse ERROR["+n+"]");var i=ie(!1,550,"Init - getCMDataAndQCDataSequentialCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(i)}}),i)},e.initStock=function(t,n,r,i,l,u,c,d,p){"use strict";e.mbPath=n,e.cmPath=r,e.onInitStockCallback=i,e.onInitStockErrorCallback=l,e.log=a();var f=a.createConsoleAppender("consoleAppender");f.level=a.getWarnLevel(),e.log.setOptions({appenders:[f]}),e.log.info(e.apiName+".initStock - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".initStock - begin"),e.log.debug(e.apiName+".initStock - lodash:"+o.VERSION),e.log.debug(e.apiName+".initStock - Params - cmDataSource:["+t+"] mbPath:["+n+"] cmPath:["+n+"]"),e.createFccf(),e.log.debug(e.apiName+".initStock - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=c,e.cytoVehicleDiv=d,e.selectionLogDiv=p,e.optionalCustomConfig=u,e.jsonpath=s,t||e.getStockDataCall(),e.log.debug(e.apiName+".initStock - end")},e.getStockDataCall=function(){"use strict";var t=v(),n=function(t){e.log.error(e.apiName+".getStockDataCall - ERROR["+t.message+"]");var n=ie(!1,540,"Init - getStockDataCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getStockDataCall - begin");var r="";try{r=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getStockDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getStockDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}e.axiosInstance.get(r,t).then((function(t){if(t&&t.data)e.log.debug(e.apiName+".getStockDataCall - success"),e.timeEnd(),e.createStockRuleEngine(t.data);else{e.log.error(e.apiName+".getStockDataCall - JSON.parse ERROR["+t+"]");var n=ie(!1,550,"Init - getStockDataCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)}}),n)},e.createStockRuleEngine=function(n){if(e.timeBegin(),e.log.debug(e.apiName+".createStockRuleEngine - begin"),n&&n.BapContent&&(t=n.BapContent),n&&n.ComModGraph&&(t=n),t&&t.ComModGraph)u={},u=t.ComModGraph,e.log.debug(e.apiName+".createStockRuleEngine - Valid Commercial Model Data"),e.cmRuleEngine=new l,e.cmRuleEngine.init(u,e.cytoComModDiv,e.selectionLogDiv,e.log,e.populateFccfStock);else{e.log.error(e.apiName+".createStockRuleEngine - ERROR[Invalid Commercial Model Data]");var r=ie(!1,560,"Init - ERROR[Invalid Commercial Model Data]",{});e.onInitStockErrorCallback&&e.onInitStockErrorCallback(r)}},e.populateFccfStock=function(){"use strict";e.timeEnd(),e.timeBegin(),e.log.debug(e.apiName+".populateFccfStock - begin");var n=ie(!0,200,"",{});try{e.fccf.ComMod.Cod=t.ComModCod.toString(),e.fccf.ComMod.Des=t.ComModDes.toString(),e.fccf.VINs=t.VINs}catch(t){e.log.error(e.apiName+".populateFccfStock - ERROR["+t.message+"]"),n=ie(!1,540,"InitStock - populateFccfStock ERROR["+t.message+"]",{}),e.onInitStockErrorCallback&&e.onInitStockErrorCallback(n)}e.onInitStockCallback(n)},e.getMVSFileName=function(t){r="";try{var n=c&&c.HeaderScopeContextCod?c.HeaderScopeContextCod:e.fccf.Header.Scope.Market.Cod+e.fccf.Header.Scope.Language.Cod+e.fccf.Header.Scope.Brand.Cod,r=c.MvsFile.Prefix+n+"_"+e.fccf.ComMod.Cod+"_"+t+"."+c.MvsFile.Extension}catch(t){e.log.debug(e.apiName+".getMVSDataCall - wsUrl ERROR - "+t.message)}return r},e.getMVSDataCall=function(n,r){"use strict";var o=v(),a=(new i.Agent({rejectUnauthorized:!1,headers:{"Access-Control-Allow-Origin":"*"}}),function(t){e.log.error(e.apiName+".getMVSDataCall - ERROR["+t.message+"]"),e.log.debug(e.apiName+".getMVSDataCall - ERROR["+t.message+"]");var n=ie(!1,540,"setVehicle ERROR["+t.message+"]",{});e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(n)});e.timeBegin(),e.log.debug(e.apiName+".getMVSDataCall - begin");var s=function(){var t=null;try{var r=e.getMVSFileName(n);e.log.debug(e.apiName+".getMVSDataCall - mvsFileName:["+r+"]");var i=e.mbPath.split("/"),o=e.mbPath.substr(0,e.mbPath.length-i[i.length-1].length);if(t=e.cmPath?e.mbPath+"/"+e.cmPath+"/"+r:o+r,e.mbPath.indexOf("?")>0)t=t+"?"+e.mbPath.split("?")[1];e.log.debug(e.apiName+".getMVSDataCall - wsUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getMVSDataCall - wsUrl ERROR["+t.message+"]")}return t}();if(s&&"string"==typeof s)e.log.info(e.apiName+".getMVSDataCall - wsUrl:["+s+"]"),e.axiosInstance.get(s,o).then((function(r){if(r&&r.data&&r.data.Cod){e.log.debug(e.apiName+".getMVSDataCall - success"),e.timeEnd(),t.Vehs.length>e.vehBufferLength&&t.Vehs.shift(),t.Vehs.push(r.data);for(var i=t.Vehs,o=0;o<i.length;o++){var a=i[o];if(a.Cod===n){E(a),e.createVehicleRuleEngine(n);break}}}else{e.log.error(e.apiName+".getMVSDataCall - MVS Data JSON.parse ERROR");var s=ie(!1,550,"setVehicle ERROR[Content parse error]",{});e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)}}),a);else{var l={message:"Malformed wsUrl"};a(l)}};e.mergeFccfLibConfig=function(e){e&&o.merge(c,e)},e.createComModRuleEngine=function(r,i){if(e.timeBegin(),e.log.debug(e.apiName+".createComModRuleEngine - begin"),n=i,r&&r.BapContent&&(t=r.BapContent),r&&r.ComMod&&(t=r),t&&t.Configurations&&t.ComMod&&t.ComMod.ComModGraph)e.npe={},e.createECommerceDateBaseAttrs(t),e.checkECommerceValidVehicle(t,n),u={},u=t.ComMod.ComModGraph,e.log.debug(e.apiName+".createComModRuleEngine - Valid Commercial Model Data"),e.cmRuleEngine=new l,e.cmRuleEngine.init(u,e.cytoComModDiv,e.selectionLogDiv,e.log,e.populateFccf);else{e.log.error(e.apiName+".createComModRuleEngine - ERROR[Invalid Commercial Model Data]");var o=ie(!1,560,"Init - ERROR[Invalid Commercial Model Data]",{});e.onInitErrorCallback&&e.onInitErrorCallback(o)}},e.createFccf=function(){"use strict";e.log.debug(e.apiName+".createFccf"),e.fccf.Header={},e.fccf.Header.ContentConfig={},e.fccf.ComMod={},e.fccf.Action={},e.fccf.Scope={},e.fccf.ComMod.Cod="",e.fccf.ComMod.Des="",e.fccf.ComMod.AddAttrs=[],e.fccf.ComMod.CommonData={},e.fccf.ComMod.CommonData.VehsData={},e.fccf.Action.changeScenarios=[],e.fccf.Action.ChangeRequest={},e.fccf.Action.ChangeRequest.selections=[],e.fccf.Scope.ComModels={},e.npe={}},e.populateFccf=function(){"use strict";e.timeEnd(),e.timeBegin(),e.log.debug(e.apiName+".populateFccf - begin");var n=ie(!0,200,"",{});try{c.Vehicle.PriceIndex=t.Configurations.Vehicle.PriceIndex,c.Vehicle.PriceNoVatIndex=t.Configurations.Vehicle.PriceNoVatIndex,c.Option.PriceIndex=t.Configurations.Option.PriceIndex,c.Option.PriceNoVatIndex=t.Configurations.Option.PriceNoVatIndex,c.Option.PriceVatPerc=t.Configurations.Option.PriceVatPerc,c.Option.PriceVatPercMkt=t.Configurations.Option.PriceVatPercMkt,c.MapConfig=t.Configurations.MapConfig,e.optionalCustomConfig&&o.merge(c,e.optionalCustomConfig),e.fccf.Header=t.Header,e.fccf.Header.ContentConfig=t.Configurations,e.fccf.ComMod.Cod=t.ComMod.ComModCod.toString(),e.fccf.ComMod.Des=t.ComMod.ComModDes.toString(),e.fccf.ComMod.CommonData.Currency=t.MarketBrand.Currency,m(t.ComMod.AddAttrs,e.fccf.ComMod.AddAttrs),y(),C(),e.timeEnd(" --- Dictionaries - 01 END"),e.timeBegin(),b(),x(),e.timeEnd(" --- Comm Opt/Veh Groups - 02 END"),e.timeBegin(),S(),e.timeEnd(" --- BaseAttributes - 03 END"),e.timeBegin(),w(),e.timeEnd(" --- Vehicles - 08 END"),e.timeBegin(),e.timeBegin(),e.npe=t.NPE?t.NPE:{},e.timeEnd(" --- NPE - 09 END"),e.timeBegin(),e.log.debug(e.apiName+".populateFccf - end")}catch(t){e.log.error(e.apiName+".populateFccf - ERROR["+t.message+"]"),n=ie(!1,540,"Init - populateFccf ERROR["+t.message+"]",{}),e.onInitErrorCallback&&e.onInitErrorCallback(n)}e.onInitCallback(n)},e.createECommerceDateBaseAttrs=function(t){"use strict";var n=function(t){var n=null;try{if(""!==t){var r=t.split("-");n=new Date(r[2]+"-"+r[1]+"-"+r[0]+"T00:00:00.000Z").getTime()}}catch(n){e.log.warn(e.apiName+".createECommerceDateBaseAttrs - dateStr conversion WARN: ["+t+"]")}return n};if(t.ComMod.VehsData){e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList=[],e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList=[],e.fccf.ComMod.CommonData.VehsData.Vehs={};t.ComMod.ComModGraph.push({group:"nodes",data:{id:"ECD0_1",type:"BAV"}});t.ComMod.BAttrs.push({BAttrCod:"ECD0",BAttrType:"D",BAttrDes:[],BAttrVals:[{BAttrValCod:"1",BAttrValDes:[]}]});for(var r=(new Date).getTime(),i=0;i<t.ComMod.VehsData.length;i++){var o=t.ComMod.VehsData[i];e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod]={};var a=null,s=null,l=!1;if(o&&o.EcomStartDate&&"string"==typeof o.EcomStartDate&&10===o.EcomStartDate.length&&(a=n(o.EcomStartDate))&&!isNaN(a)&&(o.EcomEndDate&&"string"==typeof o.EcomEndDate&&(s=n(o.EcomEndDate)),s&&!isNaN(s)?l=a<=r&&r<=s:isNaN(s)||(l=a<=r),l)){var u={group:"edges",data:{source:o.Cod,target:"ECD0_1",type:"V",altGroupId:[]}};t.ComMod.ComModGraph.push(u),e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList.push(o.Cod)}e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod].ProdStartDate=o.ProdStartDate?o.ProdStartDate.toString():"",e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod].ProdEndDate=o.ProdEndDate?o.ProdEndDate.toString():""}}},e.checkECommerceValidVehicle=function(t,n){"use strict";e.timeBegin();var r=function(t){var n=null;try{if(""!==t){var r=t.split("-");n=new Date(r[2]+"-"+r[1]+"-"+r[0]+"T00:00:00.000Z").getTime()}}catch(n){e.log.warn(e.apiName+".checkECommerceValidVehicle - dateStr conversion WARN: ["+t+"]")}return n},i=function(e,t){var n=!1;return e&&e.OSD&&"string"==typeof e.OSD&&10===e.OSD.length&&(n=r(e.OSD)-5184e6<t),n&&e&&e.OED&&"string"==typeof e.OED&&10===e.OED.length&&(n=t<r(e.OED)),n};if(c.QualModel&&c.QualModel.LoadMng&&n){var a=(new Date).getTime(),s=[];n.Vehs.length?s=n.Vehs:n.Vehs&&n.Vehs.MVS&&s.push(n.Vehs.MVS);for(var l=0;l<s.length;l++){var u=s[l];e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidIntColList=[],e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidOptList=[],"PUBLISH"!==t.Header.Env||"10"!==u.Status&&"11"!==u.Status||(e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidIntColList="string"==typeof u.ecomData.Pub.ColIns?u.ecomData.Pub.ColIns.split(";"):[],e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidOptList="string"==typeof u.ecomData.Pub.Opts?u.ecomData.Pub.Opts.split(";"):[]),"PREVIEW"!==t.Header.Env||"10"!==u.Status&&"12"!==u.Status&&"14"!==u.Status||(e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidIntColList="string"==typeof u.ecomData.Prev.ColIns?u.ecomData.Prev.ColIns.split(";"):[],e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidOptList="string"==typeof u.ecomData.Prev.Opts?u.ecomData.Prev.Opts.split(";"):[]),e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidIntColList.length>0||e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidOptList.length>0||e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.push(u.MVS)}}else{if(t.ComMod.VehsData)for(a=(new Date).getTime(),l=0;l<t.Vehs.length;l++){u=t.Vehs[l];if(e.fccf.ComMod.CommonData.VehsData.Vehs[u.Cod].OrdInvalidIntColList=[],e.fccf.ComMod.CommonData.VehsData.Vehs[u.Cod].OrdInvalidOptList=[],u.ColInDatas&&u.OptDatas){for(var d=[],p=[],f=[],h=[],g=0;g<u.OptGroups.length;g++){var v=u.OptGroups[g];switch(v.Cod){case"IN":for(var m=0;m<v.Opts.length;m++)for(var y=v.Opts[m].AddAttrs,C=0;C<y.length;C++)y[C].AttrCod&&"RC"===y[C].AttrCod&&d.push(v.Opts[m].Cod.concat("_").concat(y[C].AttrVal));break;case"CL":break;default:for(var b=0;b<v.Opts.length;b++)"BO"!==v.Cod&&"IO"!==v.Cod&&"PK"!==v.Cod&&f.push(v.Opts[b].Cod)}}for(g=0;g<u.ColInDatas.length;g++){var x=u.ColInDatas[g];i(x,a)||p.push(x.IntCode.concat("_").concat(x.ColCode))}for(g=0;g<u.OptDatas.length;g++){var S=u.OptDatas[g];i(S,a)||h.push(S.CodOpt)}var E=o.intersection(p,d),w=o.intersection(h,f);E.length>0&&(e.fccf.ComMod.CommonData.VehsData.Vehs[u.Cod].OrdInvalidIntColList=E),w.length>0&&(e.fccf.ComMod.CommonData.VehsData.Vehs[u.Cod].OrdInvalidOptList=w),E.length>0||w.length>0||e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.push(u.Cod)}}e.timeEnd("ECommerceValidVehicle - end")}},e.getCMData=function(){"use strict";return t},e.getQMData=function(){"use strict";return n};var p=function(t,n,r,i){"use strict";var o=!1;e.log.debug(e.apiName+".selectScope - begin");try{var a=e.scopeConfig.Brand[t]?e.scopeConfig.Brand[t].Cod:null,s=a&&e.scopeConfig.Brand[t]&&e.scopeConfig.Brand[t].Mkt[n]?e.scopeConfig.Brand[t].Mkt[n].Cod:null,l=a&&e.scopeConfig.Brand[t]&&e.scopeConfig.Brand[t].Mkt[n]&&e.scopeConfig.Brand[t].Mkt[n].Lng[r]?e.scopeConfig.Brand[t].Mkt[n].Lng[r].Cod:null,u=e.scopeConfig.Env.envList.includes(i.toLowerCase())?i.toLowerCase():null;a&&s&&l&&u&&(e.Scope=s+l+a,e.Env=u,e.BrandName=t,e.BrandCod=a,e.MarketName=n,e.LangName=r,o=!0),e.log.info(e.apiName+".selectScope - me_.Scope:["+e.Scope+"] scopeFound:["+o+"]")}catch(t){e.log.error(e.apiName+".selectScope - ERROR["+t.message+"]");var c=ie(!1,594,"InitScope - selectScope ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(c)}return o},f=function(){"use strict";var t=e.scopeConfig.Env[e.Env].RelEnvPrev,n={fccfC3:{},sccfC2:{},sccfC2evo:{}};n.fccfC3.revproxy=e.scopeConfig.Env.ProxySlug+"fiat/"+t+"/data/fccf_mv/scopeJson/"+e.Scope+".json",n.fccfC3.absolute=e.scopeConfig.Env[t].NSAbsSlugPath+"fiat.it/"+e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeJson/"+e.Scope+".json",n.fccfC3.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeJson/"+e.Scope+".json",n.sccfC2.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/sccf/scope/"+e.Scope+".json",n.sccfC2.absolute=e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".at/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json",n.sccfC2.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json";var r=e.scopeConfig.Env.ProxySlugEvo+e.scopeConfig.Env[e.Env].SiteEnv+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/sccf/scope/"+e.Scope+".json";return n.sccfC2evo.revproxy=r,n.sccfC2evo.absolute=e.scopeConfig.Env.ConfigUrl+r,n.sccfC2evo.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json",n[e.scopeConfig.Mode.initScopeType][e.scopeConfig.Env.ContextMode]},h=function(){"use strict";var t,n={fccfC3:{},sccfC2:{},sccfC2evo:{}};n.fccfC3.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/fccf_mv/",n.fccfC3.absolute="fiatprofessional"!==e.BrandName?e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".it/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF:e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".com/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF,n.fccfC3.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF,n.sccfC2.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/sccf/",n.sccfC2.absolute="fiatprofessional"!==e.BrandName?e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".at/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS:e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".com/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS,n.sccfC2.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS;var r=e.scopeConfig.Env.ProxySlugEvo+e.scopeConfig.Env[e.Env].SiteEnv+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/sccf/";return n.sccfC2evo.revproxy=r,n.sccfC2evo.absolute=e.scopeConfig.Env.ConfigUrl+r,n.sccfC2evo.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS,t=n[e.scopeConfig.Mode.initScopeType][e.scopeConfig.Env.ContextMode],e.log.debug(">>>>>>>>> prePath_:["+t+"]"),t},g=function(t,n){"use strict";var r=t.toString().split("/");10===r.length?e.mbPath=n+r[6]+"/"+r[7]+"/"+r[8]+"/"+r[9]+"/CM_T5_"+e.Scope+"_"+e.CModel+".json":e.mbPath=n+r[1]+"/"+r[2]+"/"+r[3]+"/"+r[4]+"/CM_T5_"+e.Scope+"_"+e.CModel+".json",0===n.indexOf("https://www.tofas.it")&&(e.mbPath="https://otomobil.fiat.com.tr/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF+r[6]+"/"+r[7]+"/"+r[8]+"/"+r[9]+"/CM_T5_"+e.Scope+"_"+e.CModel+".json?brand=tofas")},v=function(){"use strict";var t={method:"HEAD",mode:"cors",headers:{"Access-Control-Allow-Origin":"*",Accept:"application/json","Content-Type":"application/json"},withCredentials:!1,crossdomain:!0};return"absolute"===e.scopeConfig.Env.ContextMode&&(t.headers.Cookie="cc_cookie=cookieisset;path=/;"),t},m=function(e,t){"use strict";for(var n=0;n<e.length;n++)t[e[n].AttrCod]||(t[e[n].AttrCod]=[]),t[e[n].AttrCod].push(e[n].AttrVal.toString())},y=function(){"use strict";for(var n=t.MarketBrand.DcTypes,r=0;r<n.length;r++)for(var i=n[r],o=i.DcTypeCod,a=i.Itms,s=0;s<a.length;s++){var l=a[s].ItmCod,u=a[s].ItmDes.toString();e.dcTypeMap.set(o+l,u),"OG"===o&&e.dictOgMap.set(l,u),"CT"===o&&e.dictBodyCtMap.set(l,u),"CG"===o&&e.dictBodyCgMap.set(l,u),"IT"===o&&e.dictSeatItMap.set(l,u),"IG"===o&&e.dictSeatIgMap.set(l,u)}},C=function(){"use strict";e.fccf.ComMod.CommonData.FeatureTypes={};for(var n=t.MarketBrand.FtTypeCats,r=0;r<n.length;r++)for(var i=n[r],o=i.FtTypeCatCod,a=i.FtTypeCatDes.toString(),s=i.FtTypes,l=0;l<s.length;l++){var u=s[l],c=u.FtTypeCod;u.FtTypeCatCod=o,u.FtTypeCatDes=a,e.ftTypeMap.set(c,u),e.fccf.ComMod.CommonData.FeatureTypes[c]={},e.fccf.ComMod.CommonData.FeatureTypes[c]=u}},b=function(){"use strict";e.fccf.ComMod.CommonData.OptionGroups={},e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES={},e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS={},e.fccf.ComMod.CommonData.OptionGroups.BODYCT={},e.fccf.ComMod.CommonData.OptionGroups.BODYCG={},e.fccf.ComMod.CommonData.OptionGroups.SEATIT={},e.fccf.ComMod.CommonData.OptionGroups.SEATIG={},e.dictOgMap.forEach((function(t,n){var r={};r.Des=t.toString();var i=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS[n]:c.MapConfig[0].OPTGROUPS[n];i&&i.Key?(r.Cod=i.Key,r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),r.Type="CONFIGKEYS",e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[i.Key]=r):(i&&!i.Key?r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()):(c.MapConfig.all&&c.MapConfig.all.CATGROUPS?i=c.MapConfig.all.CATGROUPS[n]:c.MapConfig[0]&&c.MapConfig[0].CATGROUPS&&(i=c.MapConfig[0].CATGROUPS[n]),i&&i.Key?(r.Cod=i.Key,r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),r.isChgVis=!i.isChgVis||JSON.parse(i.isChgVis.toLowerCase())):(r.isVisible=!0,r.isChgVis=!0)),r.Cod=n,r.Type="CATEGORIES",e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[n]=r)}));var t=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS.NOTIN:c.MapConfig[0].OPTGROUPS.NOTIN;t&&((n={}).Cod=t.Key,n.isVisible=JSON.parse(t.isOutsideVis.toLowerCase()),n.Type="CONFIGKEYS",n.Des=t.Des,e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[n.Cod]=n);var n,r=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS.NONE:c.MapConfig[0].OPTGROUPS.NONE;r&&((n={}).Cod=r.Key,n.isVisible=JSON.parse(r.isOutsideVis.toLowerCase()),n.Type="CONFIGKEYS",n.Des=r.Des,e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[n.Cod]=n);F(e.dictBodyCtMap,"BODYCT",e.fccf.ComMod.CommonData.OptionGroups.BODYCT),F(e.dictBodyCgMap,"BODYCG",e.fccf.ComMod.CommonData.OptionGroups.BODYCG),F(e.dictSeatItMap,"SEATIT",e.fccf.ComMod.CommonData.OptionGroups.SEATIT),F(e.dictSeatIgMap,"SEATIG",e.fccf.ComMod.CommonData.OptionGroups.SEATIG)},x=function(){"use strict";var n=t.ComMod.VehGroups,r=[];e.fccf.ComMod.CommonData.VehicleGroups={},e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS={},e.fccf.ComMod.CommonData.VehicleGroups.MODELYEARS={},e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel={},e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle={},e.fccf.ComMod.CommonData.VehicleGroups.Trim={},e.fccf.ComMod.CommonData.VehCods=[];for(var i=0;i<n.length;i++){var a,s=n[i];e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod]={},e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].Cod=s.VehGroupCod,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].Des=s.VehGroupDes.toString(),e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].VehCods=s.VehCods,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].AddAttrs=[],c.MapConfig.all&&c.MapConfig.all.VEHGROUPS?a=c.MapConfig.all.VEHGROUPS[s.VehGroupCod]:c.MapConfig[0]&&c.MapConfig[0].VEHGROUPS&&(a=c.MapConfig[0].VEHGROUPS[s.VehGroupCod]),e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].isVisible=!a||JSON.parse(a.isOutsideVis.toLowerCase()),m(s.AddAttrs,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].AddAttrs),r=o.union(r,s.VehCods)}if(e.fccf.ComMod.CommonData.VehCods=r,e.fccf.ComMod.CommonData.VehicleGroups.Trim=e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS,t.ComMod.Groups&&t.ComMod.Groups.DerivedModel){var l=t.ComMod.Groups.DerivedModel;for(i=0;i<l.length;i++){var u=l[i];e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[u.Cod]={},e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[u.Cod].Cod=u.Cod,e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[u.Cod].Des=u.Des.toString(),e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[u.Cod].VehCods=u.VehCods}}if(t.ComMod.Groups&&t.ComMod.Groups.BodyStyle){var d=t.ComMod.Groups.BodyStyle;for(i=0;i<d.length;i++){var p=d[i];e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod]={},e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].Cod=p.Cod,e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].Des=p.Des.toString(),e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].VehCods=p.VehCods}}},S=function(){"use strict";var n;e.BAttrs=t.ComMod.BAttrs,e.fccf.ComMod.CommonData.BaseAttribute={},e.log.debug(e.apiName+".populateFccf - Populate Base Attributes"),n=e.BAttrs;for(var r=0;r<n.length;r++){var i=n[r];switch(i.BAttrType){case"F":var o=e.ftTypeMap.get(i.BAttrCod);if(o){i.BAttrDes=o.FtTypeDes.toString();for(var a=0;a<i.BAttrVals.length;a++){var s=i.BAttrVals[a];if(o.Fts.length>0)for(var l=0;l<o.Fts.length;l++){var u=o.Fts[l];if(s.BAttrValCod===u.FtCod){s.BAttrValDes=u.FtDes.toString(),M(i,s);break}}else s.BAttrValCod=s.BAttrValDes,M(i,s);G(s,0)}}break;case"V":for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];M(i,s),G(s,0)}break;case"O":var c=e.dcTypeMap.get("OG".concat(i.BAttrCod));i.BAttrDes=c.toString();for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];var d=e.dcTypeMap.get("OD".concat(s.BAttrValCod));s.BAttrValDes=d||"",M(i,s),G(s,0)}break;case"D":for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];M(i,s),G(s,0)}}P(i)}},E=function(t){"use strict";var n=O(t);_(n),e.fccf.Vehicles[t.Cod]=n},w=function(){"use strict";e.log.debug(e.apiName+".populateFccf - Populate Vehicles "),e.fccf.Vehicles={};for(var n=t.Vehs,r=0;r<n.length;r++){var i=n[r];E(i)}},O=function(n){"use strict";var r={};r.Cod=n.Cod?n.Cod.toString():"",r.Des=n.Des?n.Des.toString():"",r.UseCod=n.UseCod?n.UseCod.toString():"",r.Price=n.Price,r.PriceArray=n.PriceArray,r.ECommStartDate=n.EcomStartDate?n.EcomStartDate.toString():"",r.ECommEndDate=n.EcomEndDate?n.EcomEndDate.toString():"",r.isECommDateOpen=e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList?e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList.includes(r.Cod):null,null!==e.ECommOrdValidOverride?r.isECommOrdValid=e.ECommOrdValidOverride:r.isECommOrdValid=e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList?e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.includes(r.Cod):null,G(r,2),L(r,n),R(r,n),r.VehGroup={};for(var i=t.ComMod.VehGroups,a=0;a<i.length;a++){var s=i[a];if(-1!==s.VehCods.indexOf(r.Cod)){r.VehGroup.VERSIONS={},r.VehGroup.VERSIONS.Cod=s.VehGroupCod,r.VehGroup.VERSIONS.Des=s.VehGroupDes.toString(),r.VehGroup.Trim={},r.VehGroup.Trim.Cod=s.VehGroupCod,r.VehGroup.Trim.Des=s.VehGroupDes.toString();break}}if(t.ComMod.Groups&&t.ComMod.Groups.DerivedModel)for(var l=t.ComMod.Groups.DerivedModel,u=0;u<l.length;u++){var c=l[u];if(-1!==c.VehCods.indexOf(r.Cod)){r.VehGroup.DerivedModel={},r.VehGroup.DerivedModel.Cod=c.Cod,r.VehGroup.DerivedModel.Des=c.Des.toString();break}}if(t.ComMod.Groups&&t.ComMod.Groups.BodyStyle){var d=t.ComMod.Groups.BodyStyle;for(u=0;u<d.length;u++){var p=d[u];if(-1!==p.VehCods.indexOf(r.Cod)){r.VehGroup.BodyStyle={},r.VehGroup.BodyStyle.Cod=p.Cod,r.VehGroup.BodyStyle.Des=p.Des.toString();break}}}var f=r.Cod;e.Vehicles[f]={},e.Vehicles[f].Options={},e.Vehicles[f].OptionGroupsCod={},r.OptionGroups={},r.OptionGroups.WHEEL||(r.OptionGroups.WHEEL={});for(var h=0;h<n.OptGroups.length;h++){var g=n.OptGroups[h];k(g),g.Options={};var v=D(f,g.Cod);r.OptionGroups[v]||(r.OptionGroups[v]={});for(var y=0;y<g.Opts.length;y++){var C=g.Opts[y];if(C.OptGroupCod=g.Cod,G(C,3),C.NodeCod=g.Cod.concat("-").concat(C.Cod),e.Vehicles[f].Options[C.NodeCod]=C,g.Options[C.NodeCod]=C,v&&(!I(f)||I(f)&&0==n.Packs.filter((function(e){return e.Cod===C.Cod})).length)){if(r.OptionGroups[v]||(r.OptionGroups[v]={}),r.OptionGroups[v].Options||(r.OptionGroups[v].Options={}),C.OptGroupKey=v,r.OptionGroups[v].Key=v,r.OptionGroups[v].Options[C.NodeCod]=C,C.AddAttrs){var b={};m(C.AddAttrs,b),r.OptionGroups[v].Options[C.NodeCod].AddAttrs=b}N(n.OptGroups,C.Cod,v,C.NodeCod)&&(r.OptionGroups[v].Options[C.NodeCod].isVisible=!1)}}if(v&&"BODY"===v&&r.OptionGroups[v]&&r.OptionGroups[v].Options){var x=o.toArray(r.OptionGroups[v].Options);x=o.sortBy(x,["Des"]),r.OptionGroups[v].Options=o.chain(x).keyBy("NodeCod").value()}e.Vehicles[f].OptionGroupsCod[g.Cod]=g}A(r,n),r.Options=e.Vehicles[f].Options;var S=I(f);if(S&&S.Key&&!r.OptionGroups[S.Key]&&(r.OptionGroups[S.Key]={},r.OptionGroups[S.Key].Key=S.Key,S.isPack))for(var E in r.OptionGroups[S.Key].Options={},r.Options)r.Packs[E]&&(r.OptionGroups[S.Key].Options[E]=r.Options[E]);return r},_=function(t){"use strict";for(var n in t.OptionLMFICodes={},t.Options)if(!(n.startsWith("BO-")||n.startsWith("IO-")||t.Options["BO-"+t.Options[n].Cod]&&"PACK"!=t.Options[n].OptGroupKey||t.Options["IO-"+t.Options[n].Cod]&&"PACK"!=t.Options[n].OptGroupKey)){if(t.Options[n].CodLMFI=[],t.Options[n]&&t.Options[n].AddAttrs&&t.Options[n].AddAttrs.RO&&t.Options[n].AddAttrs.RO.length>1&&o.map(t.OptionGroups.PACK.Options,"Cod").includes(t.Options[n].AddAttrs.RO[0])){var r=t.Options[n].AddAttrs.RO.shift();t.Options[n].AddAttrs.RO.push(r)}if(t.Options[n]&&t.Options[n].AddAttrs&&t.Options[n].AddAttrs.RO&&t.Options[n].AddAttrs.RO.length>1){e.log.debug("veh.Options[optKey_].AddAttrs['RO'] :"+t.Options[n].AddAttrs.RO+"]");for(var i=t.Options[n].AddAttrs.RO,a=o.values(t.Options),s=[],l=0;l<i.length;l++){var u={};u.Cod=i[l],u.NodeCod=o.find(a,{Cod:u.Cod}).NodeCod,e.log.debug("pCompEle_.NodeCod:["+u.NodeCod+" - veh.Options[pCompEle_.NodeCod] :"+JSON.stringify(t.Options[u.NodeCod])),u.Price=t.Options[u.NodeCod].Price?t.Options[u.NodeCod].Price.toString():null,s.push(u)}var c=o.orderBy(s,"Price","asc"),d=o.map(c,"Cod");t.Options[n].AddAttrs.RO=d}if(n.startsWith("CL-"))if(t.Options[n].AddAttrs.RO)for(var p in t.Options[n].AddAttrs.RO)t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]]={},t.Options[n].AddAttrs.RO.length<2?(t.Options[n].PriceLmfi=t.Options["BO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["BO-"+t.Options[n].AddAttrs.RO[p]].PriceLmfi:null,t.Options[n].PriceNoVatLmfi=t.Options["BO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["BO-"+t.Options[n].AddAttrs.RO[p]].PriceNoVatLmfi:null):(t.Options[n].PriceLmfi="nan",t.Options[n].PriceNoVatLmfi="nan"),t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]].CodLMFI.push(t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]);else t.Options[n].AddAttrs.RO=[],t.OptionLMFICodes[t.Options[n].Cod+"$-"]={},t.OptionLMFICodes[t.Options[n].Cod+"$-"]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"$-"].CodLMFI.push(t.Options[n].Cod+"$-");else if(n.startsWith("IN-"))if(t.Options[n].AddAttrs.RO)for(var p in t.Options[n].AddAttrs.RO)t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]]={},t.Options[n].AddAttrs.RO.length<2?(t.Options[n].PriceLmfi=t.Options["IO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["IO-"+t.Options[n].AddAttrs.RO[p]].PriceLmfi:null,t.Options[n].PriceNoVatLmfi=t.Options["IO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["IO-"+t.Options[n].AddAttrs.RO[p]].PriceNoVatLmfi:null):(t.Options[n].PriceLmfi="nan",t.Options[n].PriceNoVatLmfi="nan"),t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]].CodLMFI.push(t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]);else t.Options[n].AddAttrs.RO=[],t.OptionLMFICodes[t.Options[n].Cod+"#-"]={},t.OptionLMFICodes[t.Options[n].Cod+"#-"]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"#-"].CodLMFI.push(t.Options[n].Cod+"#-");else t.OptionLMFICodes[t.Options[n].Cod]={},t.OptionLMFICodes[t.Options[n].Cod]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod].CodLMFI.push(t.Options[n].Cod)}},L=function(t,n){"use strict";t.FeatureCategories={};for(var r=0;r<n.VehFts.length;r++){var i=n.VehFts[r],a={},s=i.TypeCod,l=e.ftTypeMap.get(s);if(l){if(a.Cod=l.FtTypeCod,a.Des=l.FtTypeDes.toString(),i.Val&&0!==i.Val.length)a.Value=i.Val;else{var u=o.findIndex(l.Fts,["FtCod",i.Cod]);a.Value=-1!==u?l.Fts[u].FtDes:i.Val}t.FeatureCategories[l.FtTypeCatCod]||(t.FeatureCategories[l.FtTypeCatCod]={},t.FeatureCategories[l.FtTypeCatCod].Cod=l.FtTypeCatCod,t.FeatureCategories[l.FtTypeCatCod].Des=l.FtTypeCatDes,t.FeatureCategories[l.FtTypeCatCod].Features={}),t.FeatureCategories[l.FtTypeCatCod].Features[l.FtTypeCod]=a}else e.log.error(e.apiName+".createVehicleRuleEngine - Empty popVehFeatures ERROR: ftTypeCod_"+s+" - "+t.Cod)}},R=function(t,n){"use strict";for(var r=e.getBaseAttributeByVehicle(t.Cod),i=c.MapConfig.all?c.MapConfig.all.BASEATTRS:c.MapConfig[0].BASEATTRS,o=c.MapConfig[t.Cod]&&c.MapConfig[t.Cod].BASEATTRS?c.MapConfig[t.Cod].BASEATTRS:i,a=0;a<r.length;a++){var s=r[a];if(s){var l={},u=o[s.BAttrCod]&&o[s.BAttrCod].Key?o[s.BAttrCod].Key:s.BAttrCod,d=o[s.BAttrCod]&&o[s.BAttrCod].KeyDes?o[s.BAttrCod].KeyDes:s.BAttrDes;l.Key=u,l.KeyDes=d,l.Cod=s.BAttrCod,l.Des=s.BAttrDes,l.Values={},l.Values[s.BAttrValCod]={},l.Values[s.BAttrValCod].Cod=s.BAttrValCod,l.Values[s.BAttrValCod].Des=s.BAttrValDes,t.BaseAttributes||(t.BaseAttributes={}),t.BaseAttributes[u]=l}}},D=function(e,t){"use strict";var n=null,r=c.MapConfig.all?c.MapConfig.all.OPTGROUPS:c.MapConfig[0].OPTGROUPS,i=c.MapConfig[e]?c.MapConfig[e].OPTGROUPS:r;return i&&i[t]?n=i[t].Key:i.NOTIN&&(n=i.NOTIN.Key),n},N=function(e,t,n,r){"use strict";if("BODY"===n||"SEAT"===n||"BODYOPT"===n||"SEATOPT"===n||"PACK"===n)return!1;var i=e.filter((function(e){return"BO"===e.Cod||"IO"===e.Cod}));if(i&&i.length>0)for(var o=0;o<i.length;o++){if(i[o].Opts.filter((function(e){return e.Cod===t})).length>0)return!0}return!1},I=function(e){"use strict";var t=null,n=c.MapConfig.all?c.MapConfig.all.OPTGROUPS:c.MapConfig[0].OPTGROUPS,r=c.MapConfig[e]?c.MapConfig[e].OPTGROUPS:n;return r&&r.NONE&&(t=r.NONE),t},A=function(t,n){"use strict";var r=t.Cod,i=n.Packs;t.Packs={};for(var a=0;a<i.length;a++){var s=o.findKey(e.Vehicles[r].Options,["Cod",i[a].Cod]),l=e.Vehicles[r].Options[s];if(l){for(var u={OptRelCods:[]},c=0;c<i[a].OptRelCods.length;c++)for(var d=i[a].OptRelCods[c],p=0;p<n.OptGroups.length;p++){var f=n.OptGroups[p];if("CL"!=f.Cod&&"IN"!=f.Cod)for(var h=0;h<f.Opts.length;h++){var g=f.Opts[h];if(d==g.Cod){var v=f.Cod.concat("-").concat(g.Cod);"BO"!==f.Cod&&"IO"!==f.Cod&&(u.OptRelCods.push(v),g.ContainerPackCod=l.NodeCod)}}}u.NodeCod=l.OptGroupCod.concat("-").concat(i[a].Cod),t.Packs[u.NodeCod]=u}}},M=function(t,n){"use strict";var r=t.BAttrCod+"_"+n.BAttrValCod;e.bAttrValMap.set(r,{BAttrCod:t.BAttrCod,BAttrDes:t.BAttrDes,BAttrValCod:n.BAttrValCod,BAttrValDes:n.BAttrValDes}),e.BaseAttrValues[r]=n},P=function(t){"use strict";var n=c.MapConfig.all?c.MapConfig.all.BASEATTRS:c.MapConfig[0].BASEATTRS;if(n[t.BAttrCod]){var r=n[t.BAttrCod].Key;t.Key=r;var i={};i.Key=t.Key,i.Cod=t.BAttrCod,i.Des=n[t.BAttrCod].Des?n[t.BAttrCod].Des:t.BAttrDes.toString(),i.Type=t.BAttrType,i.Values={},i.ValKeys={};for(var o=0;o<t.BAttrVals.length;o++)i.Values[t.BAttrVals[o].BAttrValCod]=t.BAttrVals[o];i.ValKeys=Object.keys(i.Values),e.fccf.ComMod.CommonData.BaseAttribute[r]=i}e.BaseAttributes[t.BAttrCod]=t},k=function(t){"use strict";var n=e.dcTypeMap.get("OG".concat(t.Cod));n&&(t.Des=n)};e.createVehicleRuleEngine=function(n){"use strict";var r;if(e.timeEnd(),e.log.debug(e.apiName+".createVehicleRuleEngine - begin"),e.timeBegin(),t&&t.Vehs){r='$.Vehs[?(@.Cod=="'+n+'")].VehGraph.*';var i=s.query(t,r);if(e.timeEnd(),i&&i.length>0)console.log(e.apiName+".createVehicleRuleEngine - Valid Vehicle Data - Found Vehicle:["+n+"]"),e.log.info(e.apiName+".createVehicleRuleEngine - Valid Vehicle Data - Found Vehicle:["+n+"]"),e.ruleEngine=new l,e.ruleEngine.init(i,e.cytoVehicleDiv,e.selectionLogDiv,e.log,e.configVehicleRuleEngine);else{console.log(e.apiName+".createVehicleRuleEngine - Empty vehicleGraphData ERROR "),e.log.error(e.apiName+".createVehicleRuleEngine - Empty vehicleGraphData ERROR ");var o=ie(!1,560,"setVehicle ERROR - vehicleGraphData empty or invalid",{});e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(o)}}},e.configVehicleRuleEngine=function(){"use strict";e.timeEnd(),e.log.debug(e.apiName+".configVehicleRuleEngine - begin"),e.timeBegin();var t=ie(!0,200,"",{});z();var n=e.addStandardOpts(),r=e.getBaseAttributeByVehicle(e.MVS).map((function(e){return e?e.BAttrCod+"_"+e.BAttrValCod:""})),i=e.BaseAttrValues;for(var o in i)i[o]&&(i[o].isSelected=-1!==r.indexOf(o));for(var a in e.fccf.Vehicles){var s=e.fccf.Vehicles[a];s.isSelected=s.Cod===e.MVS}e.log.debug(e.apiName+".configVehicleRuleEngine - end"),n.success||(t=n),e.onSetVehicleCallback(t)},e.addStandardOpts=function(){"use strict";var t=re();t=ie(!0,200,"",{});try{if(W(),e.addStdOpts){var n=e.ruleEngine.cyto.collection();for(var r in e.Vehicles[e.MVS].Options){var i=e.Vehicles[e.MVS].Options[r];if(i.isStandard){var o=e.ruleEngine.cyto.getElementById(i.NodeCod);o.data("isStandard",!0),o.data("isMandatory",i.isMandatory),n=n.union(o)}if(i.OptGroupCod&&c.OptGroupCod[i.OptGroupCod]){i.getRefColOptIdList=function(){if(c.RefColByGraph){var t=e.ruleEngine.cyto.getElementById(this.NodeCod).outgoers("edge[type='V']","edge[type='A']").targets(),n=[];t.forEach((function(e){n.push(e.id())}))}else for(var r=this.AddAttrs,i=(n=[],0);i<r.length;i++){var o=r[i];"RO"===o.AttrCod&&n.push(o.AttrCod)}return n}}}if(n.size()>0){e.ruleEngine.tassativi=n.filter((function(e){if(e.data().isMandatory)return e})),e.ruleEngine.tiedStdMandNodeList=n.filter((function(e){if(e.data().isMandatory&&(e.incomers().nonempty()||e.outgoers().nonempty()))return e}));var a=e.ruleEngine.ruleNodeList(n,e.ruleEngine.cyto.collection(),!0);a.success||(e.log.error(e.apiName+".addStandardOpts - Standard Nodes add ERROR["+a.message+"]"),t=ie(!1,530,a.message,{}))}j(),e.log.debug(e.apiName+".addStandardOpts - Option List length:["+Object.keys(e.Vehicles[e.MVS].Options).length+"]")}e.timeEnd(" addStandardOpts END")}catch(n){t=ie(!1,530,n.message,{}),e.log.error(e.apiName+".addStandardOpts - Standard Nodes add ERROR["+n.message+"]")}return t},e.VehicleGraphOverride={Config:null,getConfig:function(){"use strict";return this.Config},setConfig:function(e){"use strict";this.Config=e},override:function(){"use strict";var t=this.Config;if(t&&t.length>0)for(var n=0;n<t.length;n++){var r=t[n];if(r.mvs&&"all"===r.mvs||r.mvs===e.MVS)switch(r.action){case"delete":if(r.elem&&r.elem.group&&r.elem.data&&"edges"===r.elem.group){var i='edge[type="'+r.elem.data.type+'"][source="'+r.elem.data.source+'"][target="'+r.elem.data.target+'"]',o=e.ruleEngine.cyto.elements(i);e.log.debug(e.apiName+".setVehicleGraphOverride ["+o.length+"]"),e.ruleEngine.cyto.remove(o)}break;case"insert":r.elem&&r.elem.group&&r.elem.data&&"edges"===r.elem.group&&e.ruleEngine.cyto.add(r.elem)}}}},e.applyBaseAttrsChange=function(t){"use strict";var n,r,i;if(e.log.info(e.apiName+".applyBaseAttributes - begin - ChangeRequest["+H(t)+"]"),n=re(),t&&t.Selections&&t.Selections.length>0){e.log.debug(e.apiName+".getVheicleByBaseAttributes - ChangeRequest.Selections.length {"+t.Selections.length+"} "),i=t.Selections;for(var o=0;o<i.length;o++){var a=i[o];if(a.Cod&&a.ChangeType){var s=e.cmRuleEngine.cyto.getElementById(a.Cod);s&&("add"===a.ChangeType?n=e.cmRuleEngine.addNode(s):"remove"===a.ChangeType&&(n=e.cmRuleEngine.removeNode(s)))}}}return z(),r=Z(i),"Changes have been applied",n=ie(!0,200,"Changes have been applied",r),e.log.info(e.apiName+".applyBaseAttributes - end "),n},e.getVehiclesByBaseAttributes=function(){"use strict";var t,n,r;e.log.debug(e.apiName+".getVheicleByBaseAttributes"),re(),r=q(),e.log.debug(e.apiName+".getVheicleByBaseAttributes - vehicleList_.length ["+r.length+"] "),n=[];for(var i=0;i<r.length;i++){var o=Q(r[i].id(),null,null);n.push(o)}return t=Z(n),"Vehicles (MVS) list",ie(!0,200,"Vehicles (MVS) list",t)},e.setVehicle=function(n,r,i,a){"use strict";var s;e.log.info(e.apiName+".setVehicle - ChangeRequest["+H(n)+"]"),e.onSetVehicleCallback=r,e.onSetVehicleErrorCallback=i;var l=!0;if(!l||n&&n.Selections&&1===n.Selections.length&&n.Selections[0].Cod||(l=!1,s=ie(!1,510,"setVehicle ERROR[ChangeRequest malformed]",Z([])),e.log.debug(e.apiName+".setVehicle ERROR[ChangeRequest malformed]"),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)),l&&(e.MVS=n.Selections[0].Cod,e.log.debug(e.apiName+".setVehicle - MVS:["+e.MVS+"] - isLazyVehLoad:["+e.isLazyVehLoad+"]"),e.Vehicles[e.MVS]&&(l=!1,e.log.debug(e.apiName+".setVehicle - found vehicle -call createVehicleRuleEngine "),e.createVehicleRuleEngine(e.MVS))),l&&a){var u=null;if(a.Cod&&a.Cod===e.MVS)try{t.Vehs.push(a);var c=t.Vehs;(u=o.filter(c,["Cod",e.MVS])[0])&&(l=!1,E(u),e.createVehicleRuleEngine(e.MVS))}catch(t){e.log.debug(e.apiName+".setVehicle ERROR - cmVeh invalid["+t.message+"]")}u||(l=!1,s=ie(!1,512,"setVehicle ERROR[vehicleDataSource MVS inchoerency]",{}),e.log.debug(e.apiName+".setVehicle ERROR - vehicleDataSource MVS inchoerency "),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s))}l&&e.isLazyVehLoad&&(l=!1,e.log.debug(e.apiName+".setVehicle - LAZY load - load Vehicle Data "),e.getMVSDataCall(e.MVS)),l&&(s=ie(!1,514,"setVehicle ERROR[Vehicle NOT found]",{}),e.log.debug(e.apiName+".setVehicle ERROR[Vehicle NOT found]"),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)),e.log.debug(e.apiName+".setVehicle - end")},e.testChange=function(t,n){"use strict";var r,i,o,a,s;e.log.info(e.apiName+".testChange - begin - ChangeRequest["+H(t)+"]"),r=re(),o=e.getVersion()+" - ",s=[];try{if(t&&t.Selections&&t.Selections.length>0)if(e.log.debug(e.apiName+".testChange - ChangeRequest.Selections.length {"+t.Selections.length+"} "),a=t.Selections,d){var l=Y(a),u={};if(n&&"number"==typeof n&&n>1){var c={addList:l.toAddList,removeList:l.toRemoveList};u=e.ruleEngine.processRuleActResMaxIterDepth(c,e.maxIter,n,!1)}else u=e.ruleEngine.ruleNodeList(l.toAddList,l.toRemoveList,!1);l.addictionalData&&l.addictionalData.InPack&&(u.code=u.success?230:530),s=ee(u,l.toAddCodList,l.toRemoveCodList),r=ie(u.success,u.code,o+u.message,{ChangeScenarios:s,Extra:u.data.extra})}else{e.ruleEngine.checkConfigurazione=e.ruleEngine.configurazione,e.ruleEngine.incompatibiliConCheckConfig=e.ruleEngine.incompatibiliConConfig;for(var p=0;p<a.length;p++){var f=a[p],h=K(f);if(1===h.length&&([],"add"===f.ChangeType?i=e.ruleEngine.checkAddNode(h):"remove"===f.ChangeType&&(i=e.ruleEngine.checkRemoveNode(h)),o+=i.message,s=J(i,h,f.ChangeType,s),!i.success))break}r=ie(!0,201,o,{ChangeScenarios:s})}B(r,t)}catch(t){e.log.error(e.apiName+".testChange ERROR {"+t.stack+"} ")}return e.log.info(e.apiName+".testChange - end - result["+H(r)+"]"),r};var T=function(t){if(t&&t.Selections&&t.Selections.length>0){changeList_=t.Selections;for(var n=[],r=0;r<changeList_.length;r++){var i=changeList_[r];if(i.Cod.includes("$")||i.Cod.includes("#")){if(i.Cod.includes("$")){var o,a="CL-"+i.Cod.substring(0,i.Cod.indexOf("$")),s=i.Cod.substring(i.Cod.indexOf("$")+1);for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(s)||(o=l);if(i.Cod=a,o)(c={}).Cod=o,c.ChangeType=i.ChangeType,n.push(c)}else if(i.Cod.includes("#")){var u,c,d="IN-"+i.Cod.substring(0,i.Cod.indexOf("#")),p=i.Cod.substring(i.Cod.indexOf("#")+1);for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(p)||(u=l);if(i.Cod=d,u)(c={}).Cod=u,c.ChangeType=i.ChangeType,n.push(c)}}else{var f;for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(i.Cod)||(f=l);i.Cod=f}}n&&n.length>0&&(changeList_=changeList_.concat(n))}return t},V=function(t){if(t.data.ChangeScenarios&&t.data.ChangeScenarios.length>0)for(var n in t.data.ChangeScenarios){var r=t.data.ChangeScenarios[n],i=[];for(var o in r.Changes){var a=r.Changes[o];if(a.Cod.startsWith("CL-")||a.Cod.startsWith("IN-")){if(a.Cod.startsWith("CL-"))if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO){if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&1==e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length)a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[0];else if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length>1)for(var s in r.Changes){if(-1!=(l=r.Changes[s]).Cod.indexOf("-")){if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1))){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1)),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}else if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod)){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$-"}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1);if(a.Cod.startsWith("IN-"))if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO){if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&1==e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length)a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[0];else if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length>1)for(var s in r.Changes){var l;if(-1!=(l=r.Changes[s]).Cod.indexOf("-")){if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1))){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1)),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}else if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod)){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#-"}if(i&&i.length>0)for(var u in i)r.Changes.splice(i[u],1)}return t};e.testChangeLMFICodes=function(t,n){var r=JSON.parse(JSON.stringify(t));r=T(r);var i=e.testChange(r,n);return i=V(i)},e.applyChangeLMFICodes=function(t){var n=JSON.parse(JSON.stringify(t));n=T(n);var r=e.applyChange(n);return r=V(r)},e.applyChange=function(t){"use strict";var n,r,i,o,a;e.log.info(e.apiName+".applyChange - begin - ChangeRequest["+H(t)+"]"),n=re(),i="",a=[];try{if(t&&t.Selections&&t.Selections.length>0){if(e.log.debug(e.apiName+".applyChange - ChangeRequest.Selections.length {"+t.Selections.length+"} "),o=t.Selections,d){var s=Y(o),l={};l=e.ruleEngine.ruleNodeList(s.toAddList,s.toRemoveList,!0),s.addictionalData&&s.addictionalData.InPack&&(l.code=l.success?230:530),a=ee(l,s.toAddCodList,s.toRemoveCodList,!0),n=ie(l.success,l.code,l.message,{ChangeScenarios:a,Extra:l.data.extra})}else{for(var u=0;u<o.length;u++){var c=o[u],p=K(c);if(p&&([],"add"===c.ChangeType?r=e.ruleEngine.addNode(p):"remove"===c.ChangeType&&(r=e.ruleEngine.removeNode(p)),i+=r.message,a=J(r,p,c.ChangeType,a,!0),!r.success))break}n=ie(!0,201,i,{ChangeScenarios:a})}j()}}catch(t){e.log.error(e.apiName+".applyChange ERROR {"+t.stack+"} ")}return e.log.info(e.apiName+".applyChange - end - result["+H(n)+"]"),n},e.getVehicleConfString=function(){"use strict";var t,n,r,i;for(var o in r={},i="",re(),t=[],n=[],e.ruleEngine.configurazione.forEach((function(e){"AG"!==e.data().type&&"VG"!==e.data().type&&t.push(e.id())})),e.fccf.Vehicles[e.MVS].Options)e.fccf.Vehicles[e.MVS].Options[o].isSelected&&e.fccf.Vehicles[e.MVS].Options[o].SelectedInPacks&&e.fccf.Vehicles[e.MVS].Options[o].SelectedInPacks.length>0&&n.push(o);return e.log.debug(e.apiName+".getVehicleConfString: ["+t+"]"),e.log.debug(e.apiName+".getVehicleConfString in pack: ["+n+"]"),r.configurazione=t,r.configurazioneInPack=n,ie(!0,200,i=(i=i+" - Configuration: ( "+t+")")+" - Configuration in Pack: ( "+n+")",r)},e.getVehicleConfStringLmfiCodes=function(){"use strict";var t,n,r,i;r={},i="",re(),t=[],n=[];var a=[];for(var s in e.fccf.Vehicles[e.MVS].OptionLMFICodes)!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].isSelected||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks&&0!=e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks.length||(s.includes("$")?(!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)]||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)]&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)].isSelected)&&(a.push(s.substring(s.indexOf("$")+1)),t.push(s)):s.includes("#")?(!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)]||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)]&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)].isSelected)&&(a.push(s.substring(s.indexOf("#")+1)),t.push(s)):t.push(s)),o.pullAll(t,a),e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].isSelected&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks.length>0&&n.push(s);return e.log.debug(e.apiName+".getVehicleConfStringLmfiCodes: ["+t+"]"),e.log.debug(e.apiName+".getVehicleConfStringLmfiCodes in pack: ["+n+"]"),r.configurazione=t,r.configurazioneInPack=n,ie(!0,200,i=(i=i+" - Configuration: ( "+t+")")+" - Configuration in Pack: ( "+n+")",r)};var B=function(t,n){"use strict";var r=function(e){return e.Cod.substring(0,e.Cod.indexOf("-"))};if(t.data.ChangeScenarios&&t.data.ChangeScenarios.length>0)for(var i=0;i<t.data.ChangeScenarios.length;i++)if(t.data.ChangeScenarios[i].Changes){for(var a=t.data.ChangeScenarios[i].Changes,s=o.keyBy(o.filter(a,(function(e){return e.CodRefList.length>0&&("BODY"==e.CodType||"SEAT"==e.CodType)})),"CodRefList"),l=0;l<a.length;l++){var u=a[l];u.IsUserVisible=!0;var c=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[u.CodType];c&&(u.IsUserVisible=c.isVisible);var d=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[r(u)];d&&(u.IsUserVisible=d.isVisible,!d.isChgVis&&u.IsUserRequest&&o.each(o.filter(a,(function(e){return d.Cod===r(e)})),(function(e){o.merge(e,{IsUserVisible:!1})}))),u.IsUserRequest&&(u.IsUserVisible=!1);var p=u.CodType;if(u.IsUserRequest)switch(p){case"BODY":o.each(o.filter(a,["CodType","BODY"]),(function(e){o.merge(e,{IsUserVisible:!1})}));break;case"SEAT":o.each(o.filter(a,["CodType","SEAT"]),(function(e){o.merge(e,{IsUserVisible:!1})}));break;case"WHEEL":o.each(o.filter(a,["CodType","WHEEL"]),(function(e){o.merge(e,{IsUserVisible:!1})}))}s[u.Cod]&&"PACK"!=u.CodType&&(o.merge(u,{IsUserVisible:!1}),e.log.debug(e.apiName+".evaluateIf: relatedChange_2 ["+JSON.stringify(u)+"]"))}e.log.debug(e.apiName+".evaluateIf: changes_ ["+JSON.stringify(a)+"]")}},z=function(){"use strict";e.log.debug(e.apiName+".setCmStatus - begin ");var t=[];e.cmRuleEngine.configurazione.forEach((function(e){t.push(e.id())}));for(var n=[],r=e.cmRuleEngine.cyto.collection('node[type="BAV"]').filter((function(e){if(!e.hasClass("selected"))return e})),i=(e.cmRuleEngine.configurazione,q()),o=0;o<r.size();o++){0==i.intersection(r[o].incomers("edge[type='V']").sources()).length&&n.push(r[o].id())}var a=e.BaseAttrValues;for(var s in a)a[s]&&(a[s].isSelected=-1!==t.indexOf(s),a[s].isSelectable=-1==n.indexOf(s));e.log.debug(e.apiName+".setCmStatus - end ")},j=function(){"use strict";e.log.debug(e.apiName+".setStatus - begin "),e.timeBegin();e.fccf.Vehicles[e.MVS].OptConfigPriceSum=0;var t=[];e.ruleEngine.configurazione.forEach((function(n){t.push(n.id()),function(t){if(e.log.info(e.apiName+".setStatus node.id(): ["+t+"]"),e.fccf.Vehicles[e.MVS].Options[t]&&e.fccf.Vehicles[e.MVS].Options[t].Price){var n=e.fccf.Vehicles[e.MVS].Options[t].Price;try{e.log.debug(e.apiName+".setStatus - updateOptPriceSum -optPrice: ["+n+"]");var r=Math.round(100*Number(n))/100;e.fccf.Vehicles[e.MVS].OptConfigPriceSum=e.fccf.Vehicles[e.MVS].OptConfigPriceSum+r}catch(n){e.log.warn(e.apiName+".setStatus - updateOptPriceSum WARN: ["+t+"]")}}}(n.id())})),e.log.debug(e.apiName+".setStatus Selected: ["+t+"]");var n=[];e.ruleEngine.incompatibiliConConfig.forEach((function(e){n.push(e.id())})),e.log.debug(e.apiName+".setStatus Unselectables: ["+n+"]");var r,i,a=[];for(var s in e.Vehicles[e.MVS].Options){var l=e.Vehicles[e.MVS].Options[s];"BO"!=l.OptGroupCod&&"IO"!=l.OptGroupCod&&"PK"!=l.OptGroupCod&&(l.isSelected=-1!==t.indexOf(l.NodeCod),l.isSelectable=-1==n.indexOf(l.NodeCod),"CL"!=l.OptGroupCod&&"IN"!=l.OptGroupCod||(l.compatible=!1),e.Vehicles[e.MVS].Options["BO-"+l.Cod]&&"PACK"!=l.OptGroupKey&&(e.Vehicles[e.MVS].Options["BO-"+l.Cod].isSelected=l.isSelected,e.Vehicles[e.MVS].Options["BO-"+l.Cod].isSelectable=l.isSelectable),e.Vehicles[e.MVS].Options["IO-"+l.Cod]&&"PACK"!=l.OptGroupKey&&(e.Vehicles[e.MVS].Options["IO-"+l.Cod].isSelected=l.isSelected,e.Vehicles[e.MVS].Options["IO-"+l.Cod].isSelectable=l.isSelectable)),e.fccf.Vehicles[e.MVS].Packs[l.NodeCod]&&a.push(e.fccf.Vehicles[e.MVS].Packs[l.NodeCod])}for(var u=0;u<a.length;u++)for(var c=a[u],d=e.Vehicles[e.MVS].Options[c.NodeCod],p=0;p<c.OptRelCods.length;p++){var f=c.OptRelCods[p],h=e.Vehicles[e.MVS].Options[f];h&&(r=h,i=c.NodeCod,d.isSelected?(r.SelectedInPacks?r.SelectedInPacks=o.union(r.SelectedInPacks,new Array(i)):(r.SelectedInPacks=[],r.SelectedInPacks.push(i)),r.isSelected=!0):r.SelectedInPacks&&(r.SelectedInPacks=o.difference(r.SelectedInPacks,new Array(i)),0==r.SelectedInPacks.length&&(e.ruleEngine.cyto.getElementById(r.NodeCod).empty()&&(r.isSelected=!1),delete r.SelectedInPacks)))}e.log.debug(e.apiName+".setStatus - fccfVehicleSelected ");var g=e.fccf.Vehicles[e.MVS].OptionGroups;for(var v in g){var m=g[v];e.fccfVehicleSelected.Groups[v]=[],e.fccfVehicleSelected.Groups[v]=$(m.Options)}o.each(e.fccfVehicleSelected.Groups.BODY,(function(t){o.each(t.AddAttrs.RI,(function(t){e.fccf.Vehicles[e.MVS].Options["IN-"+t].compatible=!0}))})),o.each(e.fccfVehicleSelected.Groups.SEAT,(function(t){o.each(t.AddAttrs.RC,(function(t){e.fccf.Vehicles[e.MVS].Options["CL-"+t].compatible=!0}))}));var y=e.fccf.ComMod.CommonData.BaseAttribute;for(var v in y){m=y[v];e.fccfVehicleSelected.BaseAttributes[v]=e.fccf.Vehicles[e.MVS].BaseAttributes[v]}e.timeEnd("setStatus - END"),e.log.debug(e.apiName+".setStatus - end ")},F=function(e,t,n){"use strict";e.forEach((function(e,r){var i,o={};o.Des=e.toString(),c.MapConfig.all&&c.MapConfig.all.CATGROUPS?i=c.MapConfig.all.CATGROUPS[r]:c.MapConfig[0]&&c.MapConfig[0].CATGROUPS&&(i=c.MapConfig[0].CATGROUPS[r]),i&&i.Key?(o.Cod=i.Key,o.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),o.Type=t,n[i.Key]=o):(i&&!i.Key?o.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()):o.isVisible=!0,o.Cod=r,o.Type=t,n[r]=o)}))},G=function(t,n){"use strict";switch(t.isSelected=!1,n){case 0:t.isSelectable=!0;break;case 1:t.isVisible=!0;break;case 2:t.isSelectable=!0,t.isDefault=!1,t.Price=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[c.Vehicle.PriceIndex]?t.PriceArray[c.Vehicle.PriceIndex]:null,t.PriceNoVat=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[c.Vehicle.PriceNoVatIndex]?t.PriceArray[c.Vehicle.PriceNoVatIndex]:null;break;case 3:if(t.isSelectable=!0,t.isIndipendent=!1,t.isStandard="Y"===t.Type,t.isMandatory="Y"===t.Mand,!t.OptGroupKey&&e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[t.OptGroupCod]?t.isVisible=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[t.OptGroupCod].isVisible:e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[t.OptGroupKey]?t.isVisible=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[t.OptGroupKey].isVisible:t.isVisible=!0,t.isUserRequest=!1,t.compatible=!0,t.Price=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[c.Option.PriceIndex]?t.PriceArray[c.Option.PriceIndex]:null,t.PriceNoVat=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[c.Option.PriceNoVatIndex]?t.PriceArray[c.Option.PriceNoVatIndex]:null,c.Option.PriceVatPercMkt&&e.fccf.Header.Scope.Market.Cod===c.Option.PriceVatPercMkt&&c.Option.PriceVatPerc&&t.PriceNoVat&&"0.00"!==t.PriceNoVat)try{t.Price=(Math.round(parseFloat(c.Option.PriceVatPerc)*Number(t.PriceNoVat)*100)/100).toString()}catch(e){}if(t.PriceLmfi=t.Price,t.PriceNoVatLmfi=t.PriceNoVat,t.Des&&0===t.Des.length&&(t.Des=e.dcTypeMap.get("OD"+t.Cod)),t.AddAttrs&&t.AddAttrs.Attr)if(t.AddAttrs.Attr.length)for(var r=0;r<t.AddAttrs.Attr.length;r++){var i;(i=t.AddAttrs.Attr[r]).AttrDes=e.dcTypeMap.get(i.AttrCod+i.AttrVal)}else(i=t.AddAttrs.Attr).AttrDes=e.dcTypeMap.get(i.AttrCod+i.AttrVal)}},U=function(t){"use strict";var n={CodType:"",CodRefList:[]},r=e.Vehicles[e.MVS].Options[t];if(r)if(o=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS[r.OptGroupCod]:c.MapConfig[0].OPTGROUPS[r.OptGroupCod]){n.CodType=o.Key,"CL"!==r.OptGroupCod&&"IN"!==r.OptGroupCod||(n.CodRefList=r.getRefColOptIdList());var i=e.fccf.Vehicles[e.MVS].Packs[t];i&&(n.CodRefList=i.OptRelCods)}else if(r.OptGroupKey)n.CodType=r.OptGroupKey;else{var o;if(e.Vehicles[e.MVS].Options["BO-"+r.Cod])(o=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS.BO:c.MapConfig[0].OPTGROUPS.BO)&&(n.CodType=o.Key);if(e.Vehicles[e.MVS].Options["IO-"+r.Cod])(o=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS.IO:c.MapConfig[0].OPTGROUPS.IO)&&(n.CodType=o.Key)}return n};e.getBaseAttributeByVehicle=function(t){"use strict";var n=[];if(e.cmRuleEngine&&e.cmRuleEngine.cyto)for(var r=e.cmRuleEngine.cyto.getElementById(t).outgoers("edge[type='V']").targets(),i=0;i<r.size();i++){var o=e.bAttrValMap.get(r[i].id());n.push(o)}return n},e.getBaseAttributeViewByVehicle=function(t){"use strict";var n=[];for(var r in e.fccf.Vehicles[t].BaseAttributes){var i=e.fccf.Vehicles[t].BaseAttributes[r],o={};for(var a in o[i.KeyDes]={},o[i.KeyDes].Key=i.KeyDes,i.Values)o[i.KeyDes].Cod=i.Values[a].Cod,o[i.KeyDes].Des=i.Values[a].Des;n.push(o)}return n},e.getFeatureByVehicle=function(t){"use strict";var n=[];for(var r in e.fccf.Vehicles[t].FeatureCategories){var i=e.fccf.Vehicles[t].FeatureCategories[r];n.push(i)}return n},e.getStandardsByVehicle=function(t){"use strict";var n={};try{for(var r in e.fccf.Vehicles[t].Options){var i=e.fccf.Vehicles[t].Options[r];if(i.isStandard&&"CL"!==i.OptGroupCod&&"IN"!==i.OptGroupCod)if(n[i.OptGroupCod]?(n[i.OptGroupCod].Features[i.Cod]={},n[i.OptGroupCod].Features[i.Cod].Cod=i.Cod,n[i.OptGroupCod].Features[i.Cod].Des=i.Des,n[i.OptGroupCod].Features[i.Cod].isVisible=i.isVisible):(n[i.OptGroupCod]={},n[i.OptGroupCod].Cod=i.OptGroupCod,n[i.OptGroupCod].Features={},n[i.OptGroupCod].Features[i.Cod]={},n[i.OptGroupCod].Features[i.Cod].Cod=i.Cod,n[i.OptGroupCod].Features[i.Cod].Des=i.Des,n[i.OptGroupCod].Features[i.Cod].isVisible=i.isVisible),e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod])n[i.OptGroupCod].Des=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod].Des,n[i.OptGroupCod].isVisible=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod].isVisible;else{var o=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS[i.OptGroupCod]:c.MapConfig[0].OPTGROUPS[i.OptGroupCod];o&&o.Key&&(n[i.OptGroupCod].Des=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[o.Key].Des,n[i.OptGroupCod].isVisible=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[o.Key].isVisible)}}}catch(t){e.log.warn(e.apiName+".getStandardsByVehicle - WARN:["+t.message+"]")}return n};var q=function(){"use strict";var t=e.cmRuleEngine.cyto.collection(),n=e.cmRuleEngine.cyto.collection();n=e.cmRuleEngine.configurazione;for(var r=0;r<n.size();r++){var i=n[r];t=0===r?i.incomers("edge[type='V']").sources():t.intersection(i.incomers("edge[type='V']").sources())}return t};e.checkAddOption=function(t){var n,r;return n=re(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.checkAddNode(r),e.log.debug(e.apiName+".checkAddOption - check processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.addOption=function(t){var n,r;return n=re(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.addNode(r),e.log.debug(e.apiName+".addOption - check processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.removeOption=function(t){var n,r;return n=re(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.removeNode(r),e.log.debug(e.apiName+".removeOption - processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.getConfiguration=function(){var t,n,r;return n={},r="",re(),t=[],e.ruleEngine.configurazione.forEach((function(e){"AG"!==e.data().type&&"VG"!==e.data().type&&t.push(e.id())})),e.log.debug(e.apiName+".getConfiguration: ["+t+"]"),n.configurazione=t,ie(!0,200,r=r+" - configuration: ( "+t+")",n)},e.getUnselectables=function(){var t,n,r;return n={},r="",re(),t=[],e.ruleEngine.incompatibiliConConfig.forEach((function(e){t.push(e.id())})),e.log.debug(e.apiName+".getUnselectables: ["+t+"]"),n.incompatibili=t,ie(!0,200,r=r+" - incompatible opt list: ( "+t+")",n)},e.addOptionList=function(t){var n,r;for(e.log.debug(e.apiName+".addOptionList"),n=0;n<t.length;n++)r=t[n],e.addOption(r)};var W=function(){"use strict";e.log.debug(e.apiName+".selectSingleStd - begin");var t=function(t,n){for(var r in t){var i=e.ruleEngine.cyto.getElementById(r).outgoers("edge[type='V'],edge[type='A']").targets(),o="";i.each((function(e){o=o+" "+e.id()})),e.log.debug(e.apiName+".selectSingleStd - mapRow:"+r+">"+o),n.set(r,i)}},n=function(e){var t=[];if(!o.isEmpty(e)){var n=null,r=null,i=o.filter(e,["Price",null]);if(i.length>=1)t.push(i[0].NodeCod);else{for(var a in e)(null==n&&"string"==typeof e[a].Price||Number(e[a].Price)<n)&&(n=Number(e[a].Price),r=a);t.push(e[r].NodeCod)}}return t},r=function(t){var n=[];if(!o.isEmpty(t)){var r=null,i=null;for(var a in t){e.log.debug(e.apiName+".selectSingleStd - stdOptionCod_:["+a+"]");var s,l=e.ruleEngine.cyto.getElementById(a),u=e.ruleEngine.cyto.collection(),c={addList:u=l?u.union(l):e.ruleEngine.cyto.collection(),removeList:e.ruleEngine.cyto.collection()};s=e.ruleEngine.processRuleMaxIter(c,e.maxIter);var d=null;o.forEach(s,(function(t){var n=e.ruleEngine.getIdList(t.addList),r=[],i=(o.filter(n,(function(t){var n=e.Vehicles[e.MVS].Options[t];if(n&&"string"==typeof n.Price)return r.push(Number(n.Price)),n})),o.sum(r));e.log.debug(e.apiName+".selectSingleStd - scenarioPrice_:["+i+"]"),d=null===d||i<d?i:d,e.log.debug(e.apiName+".selectSingleStd - scenarioPriceMin_:["+d+"]")})),(o.isNumber(r)&&o.isNumber(d)&&r>d||!o.isNumber(r)&&o.isNumber(d))&&(r=d,i=a)}for(var a in t)a===i&&n.push(i)}return n},i=e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,a=e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,s=o.filter(i,["isStandard",!0]),l=o.filter(a,["isStandard",!0]),u=new Map,c=new Map;t(i,u),t(a,c);var d=[],p=[];if(s.length>1||l.length>1)return e.log.debug(e.apiName+".selectSingleStd - rebuild by selectSingleStdLegacy LEGACY"),void function(){e.log.debug(e.apiName+".selectSingleStdLegacy - begin");var t=function(t){if(t.length>1){for(var n=null,r=null,i=0;i<t.length;i++){var a,s=t[i],l=e.ruleEngine.cyto.getElementById(s.NodeCod),u=e.ruleEngine.cyto.collection(),c={addList:u=l?u.union(l):e.ruleEngine.cyto.collection(),removeList:e.ruleEngine.cyto.collection()};a=e.ruleEngine.processRuleMaxIter(c,e.maxIter);var d=null;o.forEach(a,(function(t){var n=e.ruleEngine.getIdList(t.addList),r=[],i=(o.filter(n,(function(t){var n=e.Vehicles[e.MVS].Options[t];if(n&&"string"==typeof n.Price)return r.push(Number(n.Price)),n})),o.sum(r));i&&(d=d?i<d?i:d:i)})),n?n>d&&(n=d,r=s):(n=d,r=s)}o.forEach(t,(function(e){e.isStandard=e.Cod===r.Cod}))}},n=o.filter(e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,["isStandard",!0]);0===n.length&&e.log.error(e.apiName+".selectSingleStdLegacy - Standard Nodes add ERROR - CL group without Std"),t(n);var r=o.filter(e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,["isStandard",!0]);0===r.length&&e.log.error(e.apiName+".selectSingleStdLegacy - Standard Nodes add ERROR - IN group without Std"),t(r)}();if(1===s.length?(d.push(s[0].NodeCod),e.log.debug(e.apiName+".selectSingleStd - Colors Standard Node already exists")):s.length>1?e.log.error(e.apiName+".selectSingleStd - Colors Standard Nodes add ERROR - CL group with more than one Std"):0===s.length&&(u.forEach((function(e,t){e.empty()&&d.push(t)})),Object.keys(i).length===d.length&&(d=n(i)),0===d.length&&u.forEach((function(t,n){t.size()>0&&t.forEach((function(t){e.Vehicles[e.MVS].Options[t.id()].isStandard&&d.push(n)}))})),0===d.length&&(d=r(i))),1===l.length?(p.push(l[0].NodeCod),e.log.debug(e.apiName+".selectSingleStd - Interiors Standard Node already exists")):l.length>1?e.log.error(e.apiName+".selectSingleStd - Interiors Standard Nodes add ERROR - IN group with more than one Std"):0===l.length&&(c.forEach((function(e,t){e.empty()&&p.push(t)})),Object.keys(a).length===p.length&&(p=n(a)),0===p.length&&u.forEach((function(t,n){t.size()>0&&t.forEach((function(t){e.Vehicles[e.MVS].Options[t.id()].isStandard&&p.push(n)}))})),0===p.length&&(p=r(a))),0===d.length||0===p.length)e.log.error(e.apiName+".selectSingleStd - Colors/Interiors Standard Nodes add ERROR - colorCandidateStd:["+d.length+"] - interiorCandidateStd:["+p.length+"]");else for(var f=!1,h=0;h<d.length&&!f;h++)for(var g=d[h],v=0;v<p.length&&!f;v++){var m=p[v],y=e.ruleEngine.cyto.getElementById(g),C=e.ruleEngine.cyto.getElementById(m);y.outgoers("edge[type='I']").targets().intersection(C).empty()&&(e.Vehicles[e.MVS].Options[g].isStandard=!0,e.Vehicles[e.MVS].Options[m].isStandard=!0,e.log.debug(e.apiName+".selectSingleStd - Colors/Interiors Standard Nodes Found"),f=!0)}if(0===o.filter(e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,["isStandard",!0]).length)throw e.log.error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - CL group without Std"),new Error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - CL group without Std");if(0===o.filter(e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,["isStandard",!0]).length)throw e.log.error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - IN group without Std"),new Error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - IN group without Std")};e.timeBegin=function(){e.now=(new Date).getTime(),e.log.debug("timeBegin - T0")},e.timeEnd=function(t){var n=t||"",r=(new Date).getTime()-e.now;return e.log.debug("timeEnd - "+n+" - T1 delta:["+r+"]"),r};var $=function(e){return o.filter(e,(function(e){return!0===e.isSelected||e.SelectedInPacks&&e.SelectedInPacks.length>0}))},H=function(e){var t="Malfomed Object";try{t=JSON.stringify(e,null,0)}catch(e){}return t},X=function(t){"use strict";var n=[],r=e.Vehicles[e.MVS].Options[t.Cod];if(r)if(r.isSelected&&r.SelectedInPacks&&r.SelectedInPacks&&r.SelectedInPacks.length>0&&"remove"===t.ChangeType)for(var i=0;i<r.SelectedInPacks.length;i++){var o=r.SelectedInPacks[i],a=Q(r.NodeCod,"remove",!0,{CodType:"INPACK"});n.push(a);var s=Q(o,"remove",!1,{CodType:"INPACK",CodRefList:[o]});n.push(s)}else t.IsUserRequest=!0,n.push(t);else e.log.warn(e.apiName+".getRuleChange - Not Valid Opt Change - Change:["+JSON.stringify(t)+"]");return n},Y=function(t){"use strict";for(var n={},r=e.ruleEngine.cyto.collection(),i=e.ruleEngine.cyto.collection(),a=[],s=[],l={},u=0;u<t.length;u++){var c=t[u];if(c.Cod&&c.ChangeType){var d=X(c);o.forEach(d,(function(t){var n=t.Cod,o=e.ruleEngine.cyto.getElementById(n);1===o.length&&("add"===t.ChangeType?(r=r.union(o),t.IsUserRequest&&a.push(n)):"remove"===t.ChangeType&&(i=i.union(o),t.IsUserRequest&&s.push(n)),t.CodType&&"INPACK"===t.CodType&&(l.InPack=!0))}))}}return n.toAddList=r,n.toRemoveList=i,n.toAddCodList=a,n.toRemoveCodList=s,n.addictionalData=l,n},K=function(t){"use strict";var n=null;if(change_.Cod&&change_.ChangeType){var r=change_.Cod;n=e.ruleEngine.cyto.getElementById(r)}return n},Z=function(e){"use strict";var t={Changes:[]};return t.Changes=e,t},Q=function(e,t,n,r){"use strict";var i={};return i.ChangeType=t,i.Cod=e,i.CodRefList=[],i.CodType="",r&&(i.CodType=r.CodType,i.CodRefList=r.CodRefList),i.IsUserRequest=n,i},J=function(t,n,r,i,o){"use strict";var a,s=[];0===i.length&&(a=Z([]),i.push(a));for(var l=0;l<i.length;l++){var u=i[l].Changes;if(t.data.altGrList.length>0)for(l=0;l<t.data.altGrList.length;l++){var c=t.data.altGrList[l];e.log.debug(e.apiName+".setChangeScenarioList - altGrElement_: ["+c[0].id()+"]");var d=te(c,n,r,o),p=ne(t,n,r,o);u=d.concat(p),a=Z(u),s.push(a)}else{p=ne(t,n,r,o);a=Z(u.concat(p)),s.push(a)}}return s},ee=function(t,n,r,i){"use strict";var o,a=[],s=[];if(t&&t.data&&t.data.scenarios)for(var l=t.data.scenarios,u=0;u<l.length;u++){var c=l[u],d=[],p=c.addList.filter((function(e){return"AG"!==e.data("type")&&"VG"!==e.data("type")}));if(!e.ruleEngine.insertIdAddList(s,p)){for(var f=0;f<c.removeList.size();f++){var h=c.removeList[f];if("VG"!==h.data().type&&"AG"!==h.data().type){var g=h.id(),v=U(g),m=Q(g,"remove",r.includes(g),v);d.push(m),i&&(e.Vehicles[e.MVS].Options[m.Cod].isUserRequest=!1)}}for(f=0;f<c.addList.size();f++){var y=c.addList[f];if("VG"!==y.data().type&&"AG"!==y.data().type){var C=y.id();v=U(C),m=Q(C,"add",n.includes(C),v);d.push(m),i&&(e.Vehicles[e.MVS].Options[m.Cod].isUserRequest=m.IsUserRequest)}}o=Z(d),a.push(o)}}return a};e.getChangeList=function(e,t){"use strict";for(var n=[],r=0;r<t.length;r++){var i=t[r],o=Q(i,"remove",!0);n.push(o)}for(r=0;r<e.length;r++){i=e[r],o=Q(i,"add",!0);n.push(o)}return n};var te=function(t,n,r,i){"use strict";for(var o=[],a=0;a<t.length;a++){var s=t[a].id(),l=Q(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest="remove"!=r&&l.IsUserRequest)}return o},ne=function(t,n,r,i){"use strict";for(var o=[],a=0;a<t.data.addList.length;a++){var s=t.data.addList[a].id(),l=Q(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest=l.IsUserRequest)}for(a=0;a<t.data.remList.length;a++){s=t.data.remList[a].id(),l=Q(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest=!1)}return o},re=function(){"use strict";var e={success:!1,code:500,message:"Generic Error",data:{}};return e},ie=function(e,t,n,r){"use strict";var i={};return i.success=e,i.code=t,i.message=n,i.data=r,i}}},31:e=>{e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){var n=t[a][1][e];return i(n||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){},{}],2:[function(e,t,n){"use strict";var r=e("./util"),i=e("./is"),o=e("./promise"),a=function(e,t,n){var o=this._private=r.extend({duration:1e3},t,n);o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&i.fn(o.complete)&&o.completes.push(o.complete),this.length=1,this[0]=this},s=a.prototype;r.extend(s,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t=e.target._private.animation;(e.queue?t.queue:t.current).push(this),i.elementOrCollection(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,n=t.playing;return void 0===e?t.progress:(n&&this.pause(),t.progress=e,t.started=!1,n&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(t,n){var r=e[t];null!=r&&(e[t]=e[n],e[n]=r)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var r=0;r<e.style.length;r++){var i=e.style[r],o=i.name,a=e.startStyle[o];e.startStyle[o]=i,e.style[r]=a}return t&&this.play(),this},promise:function(e){var t,n=this._private;return t="frame"===e?n.frames:n.completes,new o((function(e,n){t.push((function(){e()}))}))}}),s.complete=s.completed,t.exports=a},{"./is":91,"./promise":94,"./util":108}],3:[function(e,t,n){"use strict";var r=e("../../is"),i={aStar:function(e){var t=this;e=e||{};var n=function(e,t,r,i){if(e==t)return i.unshift(o.getElementById(t)),i;if(t in r){var a=r[t],s=v[t];return i.unshift(o.getElementById(s)),i.unshift(o.getElementById(t)),n(e,a,r,i)}},i=function(e,t){if(0!==e.length){for(var n=0,r=t[e[0]],i=1;i<e.length;i++){var o=t[e[i]];o<r&&(r=o,n=i)}return n}},o=this._private.cy;if(null!=e&&null!=e.root){var a=r.string(e.root)?this.filter(e.root)[0]:e.root[0];if(null!=e.goal){var s=r.string(e.goal)?this.filter(e.goal)[0]:e.goal[0];if(null!=e.heuristic&&r.fn(e.heuristic))var l=e.heuristic;else l=function(){return 0};if(null!=e.weight&&r.fn(e.weight))var u=e.weight;else u=function(e){return 1};if(null!=e.directed)var c=e.directed;else c=!1;var d=a.id(),p=s.id(),f=[],h=[d],g={},v={},m={},y={};m[d]=0,y[d]=l(a);for(var C=0;h.length>0;){var b=i(h,y),x=o.getElementById(h[b]),S=x.id();if(C++,S==p){var E=n(d,p,g,[]);return{found:!0,distance:m[S],path:t.spawn(E),steps:C}}f.push(S),h.splice(b,1);for(var w=x._private.edges,O=0;O<w.length;O++){var _=w[O];if(this.hasElementWithId(_.id())&&(!c||_.data("source")===S)){var L=_.source(),R=_.target(),D=L.id()!==S?L:R,N=D.id();if(this.hasElementWithId(N)&&-1==f.indexOf(N)){var I=m[S]+u(_);-1!=h.indexOf(N)?I<m[N]&&(m[N]=I,y[N]=I+l(D),g[N]=S):(m[N]=I,y[N]=I+l(D),h.push(N),g[N]=S,v[N]=_.id())}}}}return{found:!1,distance:void 0,path:void 0,steps:C}}}}};t.exports=i},{"../../is":91}],4:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../util"),o={bellmanFord:function(e){var t=this;if(null!=(e=e||{}).weight&&r.fn(e.weight))var n=e.weight;else n=function(e){return 1};if(null!=e.directed)var o=e.directed;else o=!1;if(null!=e.root){if(r.string(e.root))var a=this.filter(e.root)[0];else a=e.root[0];for(var s=this._private.cy,l=this.edges().stdFilter((function(e){return!e.isLoop()})),u=this.nodes(),c=u.length,d={},p=0;p<c;p++)d[u[p].id()]=p;var f=[],h=[],g=[];for(p=0;p<c;p++)u[p].id()===a.id()?f[p]=0:f[p]=1/0,h[p]=void 0;var v=!1;for(p=1;p<c;p++){v=!1;for(var m=0;m<l.length;m++){var y,C=d[l[m].source().id()],b=d[l[m].target().id()],x=n(l[m]);(y=f[C]+x)<f[b]&&(f[b]=y,h[b]=C,g[b]=l[m],v=!0),o||(y=f[b]+x)<f[C]&&(f[C]=y,h[C]=b,g[C]=l[m],v=!0)}if(!v)break}if(v)for(m=0;m<l.length;m++)if(C=d[l[m].source().id()],b=d[l[m].target().id()],x=n(l[m]),f[C]+x<f[b])return i.error("Graph contains a negative weight cycle for Bellman-Ford"),{pathTo:void 0,distanceTo:void 0,hasNegativeWeightCycle:!0};var S=[];for(p=0;p<c;p++)S.push(u[p].id());var E={distanceTo:function(e){if(r.string(e))var t=s.filter(e)[0].id();else t=e.id();return f[d[t]]},pathTo:function(e){var n=function(e,t,n,r,i,o){for(;;){if(i.push(s.getElementById(r[n])),i.push(o[n]),t===n)return i;var a=e[n];if(void 0===a)return;n=a}};if(r.string(e))var i=s.filter(e)[0].id();else i=e.id();var o=[],l=n(h,d[a.id()],d[i],S,o,g);return null!=l&&l.reverse(),t.spawn(l)},hasNegativeWeightCycle:!1};return E}}};t.exports=o},{"../../is":91,"../../util":108}],5:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../heap"),o={betweennessCentrality:function(e){var t,n;e=e||{},r.fn(e.weight)?(n=e.weight,t=!0):t=!1;for(var o=null!=e.directed&&e.directed,a=this._private.cy,s=this.nodes(),l={},u={},c=0,d={set:function(e,t){u[e]=t,t>c&&(c=t)},get:function(e){return u[e]}},p=0;p<s.length;p++)l[b=(x=s[p]).id()]=o?x.outgoers().nodes():x.openNeighborhood().nodes(),d.set(b,0);for(var f=0;f<s.length;f++){var h=s[f].id(),g=[],v={},m={},y={},C=new i((function(e,t){return y[e]-y[t]}));for(p=0;p<s.length;p++){var b;v[b=s[p].id()]=[],m[b]=0,y[b]=1/0}for(m[h]=1,y[h]=0,C.push(h);!C.empty();){var x=C.pop();if(g.push(x),t)for(var S=0;S<l[x].length;S++){var E=l[x][S],w=a.getElementById(x),O=n(w.edgesTo(E).length>0?w.edgesTo(E)[0]:E.edgesTo(w)[0]);E=E.id(),y[E]>y[x]+O&&(y[E]=y[x]+O,C.nodes.indexOf(E)<0?C.push(E):C.updateItem(E),m[E]=0,v[E]=[]),y[E]==y[x]+O&&(m[E]=m[E]+m[x],v[E].push(x))}else for(S=0;S<l[x].length;S++)E=l[x][S].id(),y[E]==1/0&&(C.push(E),y[E]=y[x]+1),y[E]==y[x]+1&&(m[E]=m[E]+m[x],v[E].push(x))}var _={};for(p=0;p<s.length;p++)_[s[p].id()]=0;for(;g.length>0;)for(E=g.pop(),S=0;S<v[E].length;S++)_[x=v[E][S]]=_[x]+m[x]/m[E]*(1+_[E]),E!=s[f].id()&&d.set(E,d.get(E)+_[E])}var L={betweenness:function(e){return e=r.string(e)?a.filter(e).id():e.id(),d.get(e)},betweennessNormalized:function(e){return 0==c?0:(e=r.string(e)?a.filter(e).id():e.id(),d.get(e)/c)}};return L.betweennessNormalised=L.betweennessNormalized,L}};o.bc=o.betweennessCentrality,t.exports=o},{"../../heap":89,"../../is":91}],6:[function(e,t,n){"use strict";var r=e("../../is"),i=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(t,n,i){var o;r.plainObject(t)&&!r.elementOrCollection(t)&&(t=(o=t).roots||o.root,n=o.visit,i=o.directed),i=2!==arguments.length||r.fn(n)?i:n,n=r.fn(n)?n:function(){};for(var a,s=this._private.cy,l=t=r.string(t)?this.filter(t):t,u=[],c=[],d={},p={},f={},h=0,g=this.nodes(),v=this.edges(),m=0;m<l.length;m++)l[m].isNode()&&(u.unshift(l[m]),e.bfs&&(f[l[m].id()]=!0,c.push(l[m])),p[l[m].id()]=0);for(;0!==u.length;){if(l=e.bfs?u.shift():u.pop(),e.dfs){if(f[l.id()])continue;f[l.id()]=!0,c.push(l)}var y,C=p[l.id()],b=d[l.id()],x=null==b?void 0:b.connectedNodes().not(l)[0];if(!0===(y=n(l,b,x,h++,C))){a=l;break}if(!1===y)break;var S=l.connectedEdges(i?function(e){return e.data("source")===l.id()}:void 0).intersect(v);for(m=0;m<S.length;m++){var E=S[m],w=E.connectedNodes((function(e){return e.id()!==l.id()})).intersect(g);0===w.length||f[w.id()]||(w=w[0],u.push(w),e.bfs&&(f[w.id()]=!0,c.push(w)),d[w.id()]=E,p[w.id()]=p[l.id()]+1)}}var O=[];for(m=0;m<c.length;m++){var _=c[m],L=d[_.id()];L&&O.push(L),O.push(_)}return{path:s.collection(O,{unique:!0}),found:s.collection(a)}}},o={breadthFirstSearch:i({bfs:!0}),depthFirstSearch:i({dfs:!0})};o.bfs=o.breadthFirstSearch,o.dfs=o.depthFirstSearch,t.exports=o},{"../../is":91}],7:[function(e,t,n){"use strict";var r=e("../../is"),i={closenessCentralityNormalized:function(e){e=e||{};var t=this.cy(),n=e.harmonic;void 0===n&&(n=!0);for(var i={},o=0,a=this.nodes(),s=this.floydWarshall({weight:e.weight,directed:e.directed}),l=0;l<a.length;l++){for(var u=0,c=0;c<a.length;c++)if(l!=c){var d=s.distance(a[l],a[c]);u+=n?1/d:d}n||(u=1/u),o<u&&(o=u),i[a[l].id()]=u}return{closeness:function(e){return 0==o?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),i[e]/o)}}},closenessCentrality:function(e){if(null!=(e=e||{}).root){if(r.string(e.root))var t=this.filter(e.root)[0];else t=e.root[0];if(null!=e.weight&&r.fn(e.weight))var n=e.weight;else n=function(){return 1};if(null!=e.directed&&r.bool(e.directed))var i=e.directed;else i=!1;var o=e.harmonic;void 0===o&&(o=!0);for(var a=this.dijkstra({root:t,weight:n,directed:i}),s=0,l=this.nodes(),u=0;u<l.length;u++)if(l[u].id()!=t.id()){var c=a.distanceTo(l[u]);s+=o?1/c:c}return o?s:1/s}}};i.cc=i.closenessCentrality,i.ccn=i.closenessCentralityNormalised=i.closenessCentralityNormalized,t.exports=i},{"../../is":91}],8:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../util"),o={degreeCentralityNormalized:function(e){e=e||{};var t=this.cy();if(null!=e.directed)var n=e.directed;else n=!1;var o=this.nodes(),a=o.length;if(n){for(var s={},l={},u=0,c=0,d=0;d<a;d++){var p=o[d],f=this.degreeCentrality(i.extend({},e,{root:p}));u<f.indegree&&(u=f.indegree),c<f.outdegree&&(c=f.outdegree),s[p.id()]=f.indegree,l[p.id()]=f.outdegree}return{indegree:function(e){return 0==u?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),s[e]/u)},outdegree:function(e){return 0==c?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),l[e]/c)}}}var h={},g=0;for(d=0;d<a;d++)p=o[d],f=this.degreeCentrality(i.extend({},e,{root:p})),g<f.degree&&(g=f.degree),h[p.id()]=f.degree;return{degree:function(e){return 0==g?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),h[e]/g)}}},degreeCentrality:function(e){var t=this;if(null!=(e=e||{})&&null!=e.root){var n=r.string(e.root)?this.filter(e.root)[0]:e.root[0];if(null!=e.weight&&r.fn(e.weight))var i=e.weight;else i=function(e){return 1};if(null!=e.directed)var o=e.directed;else o=!1;if(null!=e.alpha&&r.number(e.alpha))var a=e.alpha;else a=0;if(o){for(var s=n.connectedEdges('edge[target = "'+n.id()+'"]').intersection(t),l=n.connectedEdges('edge[source = "'+n.id()+'"]').intersection(t),u=s.length,c=l.length,d=0,p=0,f=0;f<s.length;f++)d+=i(s[f]);for(f=0;f<l.length;f++)p+=i(l[f]);return{indegree:Math.pow(u,1-a)*Math.pow(d,a),outdegree:Math.pow(c,1-a)*Math.pow(p,a)}}var h=n.connectedEdges().intersection(t),g=h.length,v=0;for(f=0;f<h.length;f++)v+=i(h[f]);return{degree:Math.pow(g,1-a)*Math.pow(v,a)}}}};o.dc=o.degreeCentrality,o.dcn=o.degreeCentralityNormalised=o.degreeCentralityNormalized,t.exports=o},{"../../is":91,"../../util":108}],9:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../heap"),o={dijkstra:function(e,t,n){var o;r.plainObject(e)&&!r.elementOrCollection(e)&&(e=(o=e).root,t=o.weight,n=o.directed);var a=this._private.cy;t=r.fn(t)?t:function(){return 1};for(var s=r.string(e)?this.filter(e)[0]:e[0],l={},u={},c={},d=this.edges().filter((function(e){return!e.isLoop()})),p=this.nodes(),f=function(e){return l[e.id()]},h=function(e,t){l[e.id()]=t,g.updateItem(e)},g=new i((function(e,t){return f(e)-f(t)})),v=0;v<p.length;v++){var m=p[v];l[m.id()]=m.same(s)?0:1/0,g.push(m)}for(var y=function(e,r){for(var i,o=(n?e.edgesTo(r):e.edgesWith(r)).intersect(d),a=1/0,s=0;s<o.length;s++){var l=o[s],u=t(l);(u<a||!i)&&(a=u,i=l)}return{edge:i,dist:a}};g.size()>0;){var C=g.pop(),b=f(C),x=C.id();if(c[x]=b,b===Math.Infinite)break;var S=C.neighborhood().intersect(p);for(v=0;v<S.length;v++){var E=S[v],w=E.id(),O=y(C,E),_=b+O.dist;_<f(E)&&(h(E,_),u[w]={node:C,edge:O.edge})}}return{distanceTo:function(e){var t=r.string(e)?p.filter(e)[0]:e[0];return c[t.id()]},pathTo:function(e){var t=r.string(e)?p.filter(e)[0]:e[0],n=[],i=t;if(t.length>0)for(n.unshift(t);u[i.id()];){var o=u[i.id()];n.unshift(o.edge),n.unshift(o.node),i=o.node}return a.collection(n)}}}};t.exports=o},{"../../heap":89,"../../is":91}],10:[function(e,t,n){"use strict";var r=e("../../is"),i={floydWarshall:function(e){e=e||{};var t=this.cy();if(null!=e.weight&&r.fn(e.weight))var n=e.weight;else n=function(e){return 1};if(null!=e.directed)var i=e.directed;else i=!1;for(var o=this.edges().stdFilter((function(e){return!e.isLoop()})),a=this.nodes(),s=a.length,l={},u=0;u<s;u++)l[a[u].id()]=u;var c=[];for(u=0;u<s;u++){for(var d=new Array(s),p=0;p<s;p++)d[p]=u==p?0:1/0;c.push(d)}var f=[],h=[],g=function(e){for(var t=0;t<s;t++){for(var n=new Array(s),r=0;r<s;r++)n[r]=void 0;e.push(n)}};for(g(f),g(h),u=0;u<o.length;u++){var v=l[o[u].source().id()],m=l[o[u].target().id()],y=n(o[u]);c[v][m]>y&&(c[v][m]=y,f[v][m]=m,h[v][m]=o[u])}if(!i)for(u=0;u<o.length;u++)v=l[o[u].target().id()],m=l[o[u].source().id()],y=n(o[u]),c[v][m]>y&&(c[v][m]=y,f[v][m]=m,h[v][m]=o[u]);for(var C=0;C<s;C++)for(u=0;u<s;u++)for(p=0;p<s;p++)c[u][C]+c[C][p]<c[u][p]&&(c[u][p]=c[u][C]+c[C][p],f[u][p]=f[u][C]);var b=[];for(u=0;u<s;u++)b.push(a[u].id());var x={distance:function(e,n){if(r.string(e))var i=t.filter(e)[0].id();else i=e.id();if(r.string(n))var o=t.filter(n)[0].id();else o=n.id();return c[l[i]][l[o]]},path:function(e,n){var i=function(e,n,r,i,o){if(e===n)return t.getElementById(i[e]);if(void 0!==r[e][n]){for(var a=[t.getElementById(i[e])],s=e;e!==n;){s=e,e=r[e][n];var l=o[s][e];a.push(l),a.push(t.getElementById(i[e]))}return a}};if(r.string(e))var o=t.filter(e)[0].id();else o=e.id();if(r.string(n))var a=t.filter(n)[0].id();else a=n.id();var s=i(l[o],l[a],f,b,h);return t.collection(s)}};return x}};t.exports=i},{"../../is":91}],11:[function(e,t,n){"use strict";var r=e("../../util"),i={};[e("./bfs-dfs"),e("./dijkstra"),e("./kruskal"),e("./a-star"),e("./floyd-warshall"),e("./bellman-ford"),e("./kerger-stein"),e("./page-rank"),e("./degree-centrality"),e("./closeness-centrality"),e("./betweenness-centrality")].forEach((function(e){r.extend(i,e)})),t.exports=i},{"../../util":108,"./a-star":3,"./bellman-ford":4,"./betweenness-centrality":5,"./bfs-dfs":6,"./closeness-centrality":7,"./degree-centrality":8,"./dijkstra":9,"./floyd-warshall":10,"./kerger-stein":12,"./kruskal":13,"./page-rank":14}],12:[function(e,t,n){"use strict";var r=e("../../util"),i={kargerStein:function(e){var t=this;e=e||{};var n=function(e,t,n){for(var r=n[e],i=r[1],o=r[2],a=t[i],s=t[o],l=n.filter((function(e){return!(t[e[1]]===a&&t[e[2]]===s||t[e[1]]===s&&t[e[2]]===a)})),u=0;u<l.length;u++){var c=l[u];c[1]===s?(l[u]=c.slice(0),l[u][1]=a):c[2]===s&&(l[u]=c.slice(0),l[u][2]=a)}for(u=0;u<t.length;u++)t[u]===s&&(t[u]=a);return l},i=function(e,t,r,o){if(r<=o)return t;var a=Math.floor(Math.random()*t.length),s=n(a,e,t);return i(e,s,r-1,o)},o=this._private.cy,a=this.edges().stdFilter((function(e){return!e.isLoop()})),s=this.nodes(),l=s.length,u=a.length,c=Math.ceil(Math.pow(Math.log(l)/Math.LN2,2)),d=Math.floor(l/Math.sqrt(2));if(!(l<2)){for(var p={},f=0;f<l;f++)p[s[f].id()]=f;var h=[];for(f=0;f<u;f++){var g=a[f];h.push([f,p[g.source().id()],p[g.target().id()]])}var v,m=1/0,y=[];for(f=0;f<l;f++)y.push(f);for(var C=0;C<=c;C++){var b=y.slice(0),x=i(b,h,l,d),S=b.slice(0),E=i(b,x,d,2),w=i(S,x,d,2);E.length<=w.length&&E.length<m?(m=E.length,v=[E,b]):w.length<=E.length&&w.length<m&&(m=w.length,v=[w,S])}var O=v[0].map((function(e){return a[e[0]]})),_=[],L=[],R=v[1][0];for(f=0;f<v[1].length;f++)v[1][f]===R?_.push(s[f]):L.push(s[f]);return{cut:t.spawn(o,O),partition1:t.spawn(_),partition2:t.spawn(L)}}r.error("At least 2 nodes are required for Karger-Stein algorithm")}};t.exports=i},{"../../util":108}],13:[function(e,t,n){"use strict";var r=e("../../is"),i={kruskal:function(e){function t(e){for(var t=0;t<o.length;t++){var n=o[t];if(n.anySame(e))return{eles:n,index:t}}}var n=this.cy();e=r.fn(e)?e:function(){return 1};for(var i=n.collection(n,[]),o=[],a=this.nodes(),s=0;s<a.length;s++)o.push(a[s].collection());var l=this.edges().toArray().sort((function(t,n){return e(t)-e(n)}));for(s=0;s<l.length;s++){var u=l[s],c=u.source()[0],d=u.target()[0],p=t(c),f=t(d);p.index!==f.index&&(i=i.add(u),o[p.index]=p.eles.add(f.eles),o.splice(f.index,1))}return a.add(i)}};t.exports=i},{"../../is":91}],14:[function(e,t,n){"use strict";var r=e("../../is"),i={pageRank:function(e){var t=function(e){for(var t=e.length,n=0,r=0;r<t;r++)n+=e[r];for(r=0;r<t;r++)e[r]=e[r]/n};if(null!=(e=e||{})&&null!=e.dampingFactor)var n=e.dampingFactor;else n=.8;if(null!=e&&null!=e.precision)var i=e.precision;else i=1e-6;if(null!=e&&null!=e.iterations)var o=e.iterations;else o=200;if(null!=e&&null!=e.weight&&r.fn(e.weight))var a=e.weight;else a=function(e){return 1};for(var s=this._private.cy,l=this.edges().stdFilter((function(e){return!e.isLoop()})),u=this.nodes(),c=u.length,d=l.length,p={},f=0;f<c;f++)p[u[f].id()]=f;var h=[],g=[],v=(1-n)/c;for(f=0;f<c;f++){for(var m=[],y=0;y<c;y++)m.push(0);h.push(m),g.push(0)}for(f=0;f<d;f++){var C=l[f],b=p[C.source().id()],x=p[C.target().id()],S=a(C);h[x][b]+=S,g[b]+=S}var E=1/c+v;for(y=0;y<c;y++)if(0===g[y])for(f=0;f<c;f++)h[f][y]=E;else for(f=0;f<c;f++)h[f][y]=h[f][y]/g[y]+v;var w,O=[],_=[];for(f=0;f<c;f++)O.push(1),_.push(0);for(var L=0;L<o;L++){var R=_.slice(0);for(f=0;f<c;f++)for(y=0;y<c;y++)R[f]+=h[f][y]*O[y];t(R),w=O,O=R;var D=0;for(f=0;f<c;f++)D+=Math.pow(w[f]-O[f],2);if(D<i)break}var N={rank:function(e){if(r.string(e))var t=s.filter(e)[0].id();else t=e.id();return O[p[t]]}};return N}};t.exports=i},{"../../is":91}],15:[function(e,t,n){"use strict";var r=e("../define"),i={animate:r.animate(),animation:r.animation(),animated:r.animated(),clearQueue:r.clearQueue(),delay:r.delay(),delayAnimation:r.delayAnimation(),stop:r.stop()};t.exports=i},{"../define":44}],16:[function(e,t,n){"use strict";var r=e("../util"),i={classes:function(e){e=(e||"").match(/\S+/g)||[];for(var t=this,n=[],i={},o=0;o<e.length;o++)i[e[o]]=!0;for(var a=0;a<t.length;a++){var s=t[a],l=s._private,u=l.classes,c=!1;for(o=0;o<e.length;o++)if(!(p=u[e[o]])){c=!0;break}if(!c)for(e=Object.keys(u),o=0;o<e.length;o++){var d=e[o],p=u[d],f=i[d];if(p&&!f){c=!0;break}}c&&(l.classes=r.copy(i),n.push(s))}return n.length>0&&this.spawn(n).updateStyle().trigger("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return!(null==t||!t._private.classes[e])},toggleClass:function(e,t){for(var n=e.match(/\S+/g)||[],r=this,i=[],o=0,a=r.length;o<a;o++)for(var s=r[o],l=!1,u=0;u<n.length;u++){var c=n[u],d=s._private.classes,p=d[c];t||void 0===t&&!p?(d[c]=!0,p||l||(i.push(s),l=!0)):(d[c]=!1,p&&!l&&(i.push(s),l=!0))}return i.length>0&&this.spawn(i).updateStyle().trigger("class"),r},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};t.exports=i},{"../util":108}],17:[function(e,t,n){"use strict";var r=(e("../is"),e("../selector")),i={allAre:function(e){var t=new r(e);return this.every((function(e){return t.matches(e)}))},is:function(e){var t=new r(e);return this.some((function(e){return t.matches(e)}))},some:function(e,t){for(var n=0;n<this.length;n++)if(t?e.apply(t,[this[n],n,this]):e(this[n],n,this))return!0;return!1},every:function(e,t){for(var n=0;n<this.length;n++)if(!(t?e.apply(t,[this[n],n,this]):e(this[n],n,this)))return!1;return!0},same:function(e){return e=this.cy().collection(e),this.length===e.length&&this.every((function(t){return e.hasElementWithId(t.id())}))},anySame:function(e){return e=this.cy().collection(e),this.some((function(t){return e.hasElementWithId(t.id())}))},allAreNeighbors:function(e){e=this.cy().collection(e);var t=this.neighborhood();return e.every((function(e){return t.hasElementWithId(e.id())}))},contains:function(e){e=this.cy().collection(e);var t=this;return e.every((function(e){return t.hasElementWithId(e.id())}))}};i.allAreNeighbours=i.allAreNeighbors,i.has=i.contains,t.exports=i},{"../is":91,"../selector":95}],18:[function(e,t,n){"use strict";var r={parent:function(e){var t=[];if(this._private.cy,1===this.length&&(r=this[0]._private.parent))return r;for(var n=0;n<this.length;n++){var r;(r=this[n]._private.parent)&&t.push(r)}return this.spawn(t,{unique:!0}).filter(e)},parents:function(e){for(var t=[],n=this.parent();n.nonempty();){for(var r=0;r<n.length;r++){var i=n[r];t.push(i)}n=n.parent()}return this.spawn(t,{unique:!0}).filter(e)},commonAncestors:function(e){for(var t,n=0;n<this.length;n++){var r=this[n].parents();t=(t=t||r).intersect(r)}return t.filter(e)},orphans:function(e){return this.stdFilter((function(e){return e.isOrphan()})).filter(e)},nonorphans:function(e){return this.stdFilter((function(e){return e.isChild()})).filter(e)},children:function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];t=t.concat(r._private.children)}return this.spawn(t,{unique:!0}).filter(e)},siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&0!==e._private.children.length},isChildless:function(){var e=this[0];if(e)return e.isNode()&&0===e._private.children.length},isChild:function(){var e=this[0];if(e)return e.isNode()&&null!=e._private.parent},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&null==e._private.parent},descendants:function(e){function t(e){for(var r=0;r<e.length;r++){var i=e[r];n.push(i),i.children().nonempty()&&t(i.children())}}var n=[];return t(this.children()),this.spawn(n,{unique:!0}).filter(e)}};r.ancestors=r.parents,t.exports=r},{}],19:[function(e,t,n){"use strict";var r,i,o=e("../define");r=i={data:o.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:o.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:o.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:o.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:o.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:o.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}},r.attr=r.data,r.removeAttr=r.removeData,t.exports=i},{"../define":44}],20:[function(e,t,n){"use strict";function r(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],o=i._private.edges,a=0;a<o.length;a++){var s=o[a];!t&&s.isLoop()||(r+=e(i,s))}return r}}}function i(e,t){return function(n){for(var r,i=this.nodes(),o=0;o<i.length;o++){var a=i[o][e](n);void 0===a||void 0!==r&&!t(a,r)||(r=a)}return r}}var o=e("../util"),a={};o.extend(a,{degree:r((function(e,t){return t.source().same(t.target())?2:1})),indegree:r((function(e,t){return t.target().same(e)?1:0})),outdegree:r((function(e,t){return t.source().same(e)?1:0}))}),o.extend(a,{minDegree:i("degree",(function(e,t){return e<t})),maxDegree:i("degree",(function(e,t){return e>t})),minIndegree:i("indegree",(function(e,t){return e<t})),maxIndegree:i("indegree",(function(e,t){return e>t})),minOutdegree:i("outdegree",(function(e,t){return e<t})),maxOutdegree:i("outdegree",(function(e,t){return e>t}))}),o.extend(a,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r<n.length;r++)t+=n[r].degree(e);return t}}),t.exports=a},{"../util":108}],21:[function(e,t,n){"use strict";function r(e){return{includeNodes:l.default(e.includeNodes,b.includeNodes),includeEdges:l.default(e.includeEdges,b.includeEdges),includeLabels:l.default(e.includeLabels,b.includeLabels),includeOverlays:l.default(e.includeOverlays,b.includeOverlays),useCache:l.default(e.useCache,b.useCache)}}var i,o,a=e("../define"),s=e("../is"),l=e("../util"),u=e("../math");i=o={position:a.data({field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"rtrigger",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()&&!e.isParent()}}),silentPosition:a.data({field:"position",bindingEvent:"position",allowBinding:!1,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!1,triggerFnName:"trigger",allowGetting:!1,validKeys:["x","y"],onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()&&!e.isParent()}}),positions:function(e,t){if(s.plainObject(e))t?this.silentPosition(e):this.position(e);else if(s.fn(e)){for(var n=e,r=0;r<this.length;r++){var i=this[r];if(!i.locked()&&!i.isParent()&&(e=n(i,r))){var o=i._private.position;o.x=e.x,o.y=e.y}}this.dirtyCompoundBoundsCache(),t?this.trigger("position"):this.rtrigger("position")}return this},silentPositions:function(e){return this.positions(e,!0)},renderedPosition:function(e,t){var n=this[0],r=this.cy(),i=r.zoom(),o=r.pan(),a=s.plainObject(e)?e:void 0,l=void 0!==a||void 0!==t&&s.string(e);if(n&&n.isNode()){if(!l){var u=n.position();return a={x:u.x*i+o.x,y:u.y*i+o.y},void 0===e?a:a[e]}for(var c=0;c<this.length;c++)n=this[c],void 0!==t?n.position(e,(t-o[e])/i):void 0!==a&&n.position({x:(a.x-o.x)/i,y:(a.y-o.y)/i})}else if(!l)return;return this},relativePosition:function(e,t){var n=this[0],r=this.cy(),i=s.plainObject(e)?e:void 0,o=void 0!==i||void 0!==t&&s.string(e),a=r.hasCompoundNodes();if(n&&n.isNode()){if(!o){var l=n.position(),u=f=(p=a?n.parent():null)&&p.length>0;f&&(p=p[0]);var c=u?p.position():{x:0,y:0};return i={x:l.x-c.x,y:l.y-c.y},void 0===e?i:i[e]}for(var d=0;d<this.length;d++){var p,f;n=this[d],u=f=(p=a?n.parent():null)&&p.length>0,f&&(p=p[0]),c=u?p.position():{x:0,y:0},void 0!==t?n.position(e,t+c[e]):void 0!==i&&n.position({x:i.x+c.x,y:i.y+c.y})}}else if(!o)return;return this},renderedBoundingBox:function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),o=t.x1*r+i.x,a=t.x2*r+i.x,s=t.y1*r+i.y,l=t.y2*r+i.y;return{x1:o,x2:a,y1:s,y2:l,w:a-o,h:l-s}},dirtyCompoundBoundsCache:function(){var e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;for(var t=this,n=[],r=0;r<t.length;r++)n.push(t[r]);for(;n.length>0;){var i=n.shift();i._private.compoundBoundsClean=!1,i.isParent()&&i.trigger("bounds"),i.isChild()&&n.push(i.parent())}return this},updateCompoundBounds:function(){function e(e){function t(e,t,n){var r=0,i=0,o=t+n;return e>0&&o>0&&(r=t/o*e,i=n/o*e),{biasDiff:r,biasComplementDiff:i}}function r(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}if(e.isParent()){var o=e._private,a=e.children(),s="include"===e.pstyle("compound-sizing-wrt-labels").value,l={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},u=a.boundingBox({includeLabels:s,includeOverlays:!1,useCache:!1}),c=o.position,d=l.width.left.value;"px"===l.width.left.units&&l.width.val>0&&(d=100*d/l.width.val);var p=l.width.right.value;"px"===l.width.right.units&&l.width.val>0&&(p=100*p/l.width.val);var f=l.height.top.value;"px"===l.height.top.units&&l.height.val>0&&(f=100*f/l.height.val);var h=l.height.bottom.value;"px"===l.height.bottom.units&&l.height.val>0&&(h=100*h/l.height.val);var g=t(l.width.val-u.w,d,p),v=g.biasDiff,m=g.biasComplementDiff,y=t(l.height.val-u.h,f,h),C=y.biasDiff,b=y.biasComplementDiff;o.autoPadding=r(u.w,u.h,i.pstyle("padding"),i.pstyle("padding-relative-to").value),o.autoWidth=Math.max(u.w,l.width.val),c.x=(-v+u.x1+u.x2+m)/2,o.autoHeight=Math.max(u.h,l.height.val),c.y=(-b+u.y1+u.y2+C)/2,n.push(e)}}var t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;for(var n=[],r=0;r<this.length;r++){var i=this[r],o=i._private;o.compoundBoundsClean||(e(i),t._private.batchingStyle||(o.compoundBoundsClean=!0))}return this}};var c=function(e){return e===1/0||e===-1/0?0:e},d=function(e,t,n,r,i){r-t!=0&&i-n!=0&&(e.x1=t<e.x1?t:e.x1,e.x2=r>e.x2?r:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=i>e.y2?i:e.y2)},p=function(e,t){return d(e,t.x1,t.y1,t.x2,t.y2)},f=function(e,t,n){return l.getPrefixedProperty(e,t,n)},h=function(e,t,n,r){var i,o,a=t._private.rstyle,s=a.arrowWidth/2;"none"!==t.pstyle(n+"-arrow-shape").value&&("source"===n?(i=a.srcX,o=a.srcY):"target"===n?(i=a.tgtX,o=a.tgtY):(i=a.midX,o=a.midY),d(e,i-s,o-s,i+s,o+s))},g=function(e,t,n,r){var i;i=n?n+"-":"";var o=t._private,a=o.rstyle;if(t.pstyle(i+"label").strValue){var s,l,u,c,p=t.pstyle("text-halign"),h=t.pstyle("text-valign"),g=f(a,"labelWidth",n),v=f(a,"labelHeight",n),m=f(a,"labelX",n),y=f(a,"labelY",n),C=t.pstyle(i+"text-margin-x").pfValue,b=t.pstyle(i+"text-margin-y").pfValue,x=t.isEdge(),S=t.pstyle(i+"text-rotation"),E=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,O=t.pstyle("text-background-padding").pfValue,_=v+2*O,L=g+2*O,R=L/2,D=_/2;if(x)s=m-R,l=m+R,u=y-D,c=y+D;else{switch(p.value){case"left":s=m-L,l=m;break;case"center":s=m-R,l=m+R;break;case"right":s=m,l=m+L}switch(h.value){case"top":u=y-_,c=y;break;case"center":u=y-D,c=y+D;break;case"bottom":u=y,c=y+_}}var N=x&&"autorotate"===S.strValue,I=null!=S.pfValue&&0!==S.pfValue;if(N||I){var A=N?f(o.rstyle,"labelAngle",n):S.pfValue,M=Math.cos(A),P=Math.sin(A),k=function(e,t){return{x:(e-=m)*M-(t-=y)*P+m,y:e*P+t*M+y}},T=k(s,u),V=k(s,c),B=k(l,u),z=k(l,c);s=Math.min(T.x,V.x,B.x,z.x),l=Math.max(T.x,V.x,B.x,z.x),u=Math.min(T.y,V.y,B.y,z.y),c=Math.max(T.y,V.y,B.y,z.y)}s+=C-Math.max(E,w),l+=C+Math.max(E,w),u+=b-Math.max(E,w),c+=b+Math.max(E,w),d(e,s,u,l,c)}return e},v=function(e,t){var n,r,i,o,a,s,l=e._private.cy._private.styleEnabled,p={x1:1/0,y1:1/0,x2:-1/0,y2:-1/0},f=e._private,v=l?e.pstyle("display").value:"element",m=e.isNode(),y=e.isEdge(),C="none"!==v;if(C){var b=0;l&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(b=e.pstyle("overlay-padding").value);var x=0;if(l&&(x=e.pstyle("width").pfValue/2),m&&t.includeNodes){var S=e.position();a=S.x,s=S.y;var E=e.outerWidth()/2,w=e.outerHeight()/2;d(p,n=a-E-b,i=s-w-b,r=a+E+b,o=s+w+b)}else if(y&&t.includeEdges){var O=f.rstyle||{};if(l&&(n=Math.min(O.srcX,O.midX,O.tgtX),r=Math.max(O.srcX,O.midX,O.tgtX),i=Math.min(O.srcY,O.midY,O.tgtY),o=Math.max(O.srcY,O.midY,O.tgtY),d(p,n-=x,i-=x,r+=x,o+=x)),l&&"haystack"===e.pstyle("curve-style").strValue){var _=O.haystackPts;if(n=_[0].x,i=_[0].y,n>(r=_[1].x)){var L=n;n=r,r=L}i>(o=_[1].y)&&(L=i,i=o,o=L),d(p,n-x,i-x,r+x,o+x)}else{for(var R=O.bezierPts||O.linePts||[],D=0;D<R.length;D++){var N=R[D];n=N.x-x,r=N.x+x,i=N.y-x,o=N.y+x,d(p,n,i,r,o)}if(0===R.length){var I=e.source().position(),A=e.target().position();(n=I.x)>(r=A.x)&&(L=n,n=r,r=L),(i=I.y)>(o=A.y)&&(L=i,i=o,o=L),d(p,n-=x,i-=x,r+=x,o+=x)}}}l&&(n=p.x1,r=p.x2,i=p.y1,o=p.y2,d(p,n-b,i-b,r+b,o+b)),l&&t.includeEdges&&y&&(h(p,e,"mid-source",t),h(p,e,"mid-target",t),h(p,e,"source",t),h(p,e,"target",t)),l&&t.includeLabels&&(g(p,e,null,t),y&&(g(p,e,"source",t),g(p,e,"target",t)))}return p.x1=c(p.x1),p.y1=c(p.y1),p.x2=c(p.x2),p.y2=c(p.y2),p.w=c(p.x2-p.x1),p.h=c(p.y2-p.y1),p.w>0&&p.h>0&&C&&u.expandBoundingBox(p,1),p},m=function(e){return e?"t":"f"},y=function(e){var t="";return t+=m(e.incudeNodes),t+=m(e.includeEdges),(t+=m(e.includeLabels))+m(e.includeOverlays)},C=function(e,t){var n,r=e._private,i=e.cy().headless(),o=t===b?x:y(t);return t.useCache&&!i&&r.bbCache&&r.bbCache[o]?n=r.bbCache[o]:(n=v(e,t),i||(r.bbCache=r.bbCache||{},r.bbCache[o]=n)),n},b={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeOverlays:!0,useCache:!0},x=y(b);o.recalculateRenderedStyle=function(e){var t=this.cy(),n=t.renderer(),r=t.styleEnabled();return n&&r&&n.recalculateRenderedStyle(this,e),this},o.boundingBox=function(e){if(1===this.length&&this[0]._private.bbCache&&(void 0===e||void 0===e.useCache||!0===e.useCache))return e=void 0===e?b:r(e),C(this[0],e);var t={x1:1/0,y1:1/0,x2:-1/0,y2:-1/0},n=r(e=e||l.staticEmptyObject()),i=this,o=i.cy().styleEnabled();o&&this.recalculateRenderedStyle(n.useCache),this.updateCompoundBounds();for(var a={},s=0;s<i.length;s++){var u=i[s];if(o&&u.isEdge()&&"bezier"===u.pstyle("curve-style").strValue&&!a[u.id()]){for(var d=u.parallelEdges(),f=0;f<d.length;f++)a[d[f].id()]=!0;d.recalculateRenderedStyle(n.useCache)}p(t,C(u,n))}return t.x1=c(t.x1),t.y1=c(t.y1),t.x2=c(t.x2),t.y2=c(t.y2),t.w=c(t.x2-t.x1),t.h=c(t.y2-t.y1),t},o.boundingBoxAt=function(e){var t=this.nodes();if(s.plainObject(e)){var n=e;e=function(){return n}}for(var r=0;r<t.length;r++){var i=(u=(l=t[r])._private).position,o=e.call(l,r,l);u.bbAtOldPos={x:i.x,y:i.y},o&&(i.x=o.x,i.y=o.y)}this.trigger("dirty"),t.dirtyCompoundBoundsCache().updateCompoundBounds();var a=this.boundingBox({useCache:!1});for(r=0;r<t.length;r++){var l,u=(l=t[r])._private,c=(i=l._private.position,u.bbAtOldPos);i.x=c.x,i.y=c.y}return t.dirtyCompoundBoundsCache(),this.trigger("dirty"),a};var S=function(e){e.uppercaseName=l.capitalize(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=l.capitalize(e.outerName),i[e.name]=function(){var t=this[0],n=t._private,r=n.cy._private.styleEnabled;if(t){if(!r)return 1;if(t.isParent())return t.updateCompoundBounds(),n[e.autoName]||0;var i=t.pstyle(e.name);return"label"===i.strValue?(t.recalculateRenderedStyle(),n.rstyle[e.labelName]||0):i.pfValue}},i["outer"+e.uppercaseName]=function(){var t=this[0],n=t._private.cy._private.styleEnabled;if(t)return n?t[e.name]()+t.pstyle("border-width").pfValue+2*t.padding():1},i["rendered"+e.uppercaseName]=function(){var t=this[0];if(t)return t[e.name]()*this.cy().zoom()},i["rendered"+e.uppercaseOuterName]=function(){var t=this[0];if(t)return t[e.outerName]()*this.cy().zoom()}};S({name:"width"}),S({name:"height"}),o.padding=function(){var e=this[0],t=e._private;return e.isParent()?(e.updateCompoundBounds(),void 0!==t.autoPadding?t.autoPadding:e.pstyle("padding").pfValue):e.pstyle("padding").pfValue},i.modelPosition=i.point=i.position,i.modelPositions=i.points=i.positions,i.renderedPoint=i.renderedPosition,i.relativePoint=i.relativePosition,i.boundingbox=i.boundingBox,i.renderedBoundingbox=i.renderedBoundingBox,t.exports=o},{"../define":44,"../is":91,"../math":93,"../util":108}],22:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=function(e,t,n){if(n=!(void 0!==n&&!n),void 0!==e&&void 0!==t&&i.core(e)){var o=t.group;if(null==o&&(o=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===o||"edges"===o){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:o,style:{},rstyle:{},styleCxts:[],removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,active:!1,classes:{},animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:null,traversalCache:{}};if(t.renderedPosition){var s=t.renderedPosition,l=e.pan(),u=e.zoom();a.position={x:(s.x-l.x)/u,y:(s.y-l.y)/u}}if(i.string(t.classes))for(var c=t.classes.split(/\s+/),d=0,p=c.length;d<p;d++){var f=c[d];f&&""!==f&&(a.classes[f]=!0)}(t.style||t.css)&&e.style().applyBypass(this,t.style||t.css),(void 0===n||n)&&this.restore()}else r.error("An element must be of type `nodes` or `edges`; you specified `"+o+"`")}else r.error("An element must have a core reference and parameters set")};t.exports=o},{"../is":91,"../util":108}],23:[function(e,t,n){"use strict";var r=e("../define"),i={on:r.on(),one:r.on({unbindSelfOnTrigger:!0}),once:r.on({unbindAllBindersOnTrigger:!0}),off:r.off(),trigger:r.trigger(),rtrigger:function(e,t){if(0!==this.length)return this.cy().notify({type:e,eles:this}),this.trigger(e,t),this}};r.eventAliasesOn(i),t.exports=i},{"../define":44}],24:[function(e,t,n){"use strict";var r=e("../is"),i=e("../selector"),o={nodes:function(e){return this.filter((function(e,t){return e.isNode()})).filter(e)},edges:function(e){return this.filter((function(e,t){return e.isEdge()})).filter(e)},filter:function(e,t){if(void 0===e)return this;if(r.string(e)||r.elementOrCollection(e))return new i(e).filter(this);if(r.fn(e)){for(var n=this.spawn(),o=this,a=0;a<o.length;a++){var s=o[a];(t?e.apply(t,[s,a,o]):e(s,a,o))&&n.merge(s)}return n}return this.spawn()},not:function(e){if(e){r.string(e)&&(e=this.filter(e));for(var t=[],n=e._private.map,i=0;i<this.length;i++){var o=this[i];n.has(o.id())||t.push(o)}return this.spawn(t)}return this},absoluteComplement:function(){return this._private.cy.mutableElements().not(this)},intersect:function(e){if(r.string(e)){var t=e;return this.filter(t)}for(var n=[],i=this,o=e,a=this.length<e.length,s=a?o._private.map:i._private.map,l=a?i:o,u=0;u<l.length;u++){var c=l[u]._private.data.id,d=s.get(c);d&&n.push(d.ele)}return this.spawn(n)},xor:function(e){var t=this._private.cy;r.string(e)&&(e=t.$(e));var n=[],i=this,o=e,a=function(e,t){for(var r=0;r<e.length;r++){var i=e[r],o=i._private.data.id;t.hasElementWithId(o)||n.push(i)}};return a(i,o),a(o,i),this.spawn(n)},diff:function(e){var t=this._private.cy;r.string(e)&&(e=t.$(e));var n=[],i=[],o=[],a=this,s=e,l=function(e,t,n){for(var r=0;r<e.length;r++){var i=e[r],a=i._private.data.id;t.hasElementWithId(a)?o.push(i):n.push(i)}};return l(a,s,n),l(s,a,i),{left:this.spawn(n,{unique:!0}),right:this.spawn(i,{unique:!0}),both:this.spawn(o,{unique:!0})}},add:function(e){var t=this._private.cy;if(!e)return this;if(r.string(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=[],o=0;o<this.length;o++)i.push(this[o]);var a=this._private.map;for(o=0;o<e.length;o++)!a.has(e[o].id())&&i.push(e[o]);return this.spawn(i)},merge:function(e){var t=this._private,n=t.cy;if(!e)return this;if(e&&r.string(e)){var i=e;e=n.mutableElements().filter(i)}for(var o=t.map,a=0;a<e.length;a++){var s,l=e[a],u=l._private.data.id;o.has(u)?(this[s=o.get(u).index]=l,o.set(u,{ele:l,index:s})):(this[s=this.length++]=l,o.set(u,{ele:l,index:s}))}return this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map,i=r.get(n);if(!i)return this;var o=i.index;this[o]=void 0,r.delete(n);var a=o===this.length-1;if(this.length>1&&!a){var s=this.length-1,l=this[s],u=l._private.data.id;this[s]=void 0,this[o]=l,r.set(u,{ele:l,index:o})}return this.length--,this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&r.string(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=0;i<e.length;i++)this.unmergeOne(e[i]);return this},map:function(e,t){for(var n=[],r=this,i=0;i<r.length;i++){var o=r[i],a=t?e.apply(t,[o,i,r]):e(o,i,r);n.push(a)}return n},reduce:function(e,t){for(var n=t,r=this,i=0;i<r.length;i++)n=e(n,r[i],i,r);return n},max:function(e,t){for(var n,r=-1/0,i=this,o=0;o<i.length;o++){var a=i[o],s=t?e.apply(t,[a,o,i]):e(a,o,i);s>r&&(r=s,n=a)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=this,o=0;o<i.length;o++){var a=i[o],s=t?e.apply(t,[a,o,i]):e(a,o,i);s<r&&(r=s,n=a)}return{value:r,ele:n}}},a=o;a.u=a["|"]=a["+"]=a.union=a.or=a.add,a["\\"]=a["!"]=a["-"]=a.difference=a.relativeComplement=a.subtract=a.not,a.n=a["&"]=a["."]=a.and=a.intersection=a.intersect,a["^"]=a["(+)"]=a["(-)"]=a.symmetricDifference=a.symdiff=a.xor,a.fnFilter=a.filterFn=a.stdFilter=a.filter,a.complement=a.abscomp=a.absoluteComplement,t.exports=o},{"../is":91,"../selector":95}],25:[function(e,t,n){"use strict";var r={isNode:function(){return"nodes"===this.group()},isEdge:function(){return"edges"===this.group()},isLoop:function(){return this.isEdge()&&this.source().id()===this.target().id()},isSimple:function(){return this.isEdge()&&this.source().id()!==this.target().id()},group:function(){var e=this[0];if(e)return e._private.group}};t.exports=r},{}],26:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../map"),a=e("../set"),s=e("./element"),l={generate:function(e,t,n){for(var i=null!=n?n:r.uuid();e.hasElementWithId(i);)i=r.uuid();return i}},u=function(e,t,n){if(void 0!==e&&i.core(e)){var u=new o,c=!1;if(t){if(t.length>0&&i.plainObject(t[0])&&!i.element(t[0])){c=!0;for(var d=[],p=new a,f=0,h=t.length;f<h;f++){var g=t[f];null==g.data&&(g.data={});var v=g.data;if(null==v.id)v.id=l.generate(e,g);else if(e.hasElementWithId(v.id)||p.has(v.id))continue;var m=new s(e,g,!1);d.push(m),p.add(v.id)}t=d}}else t=[];for(this.length=0,f=0,h=t.length;f<h;f++){var y=t[f];if(y){var C=y._private.data.id;(!n||n.unique&&!u.has(C))&&(u.set(C,{index:this.length,ele:y}),this[this.length]=y,this.length++)}}this._private={cy:e,map:u},c&&this.restore()}else r.error("A collection must have a reference to the core")},c=s.prototype=u.prototype;c.instanceString=function(){return"collection"},c.spawn=function(e,t,n){return i.core(e)||(n=t,t=e,e=this.cy()),new u(e,t,n)},c.spawnSelf=function(){return this.spawn(this)},c.cy=function(){return this._private.cy},c.element=function(){return this[0]},c.collection=function(){return i.collection(this)?this:new u(this._private.cy,[this])},c.unique=function(){return new u(this._private.cy,this,{unique:!0})},c.hasElementWithId=function(e){return this._private.map.has(e)},c.getElementById=function(e){var t=this._private.cy,n=this._private.map.get(e);return n?n.ele:new u(t)},c.poolIndex=function(){var e=this._private.cy._private.elements,t=this._private.data.id;return e._private.map.get(t).index},c.json=function(e){var t=this.element(),n=this.cy();if(null==t&&e)return this;if(null!=t){var o=t._private;if(i.plainObject(e)){n.startBatch(),e.data&&t.data(e.data),e.position&&t.position(e.position);var a=function(n,r,i){var a=e[n];null!=a&&a!==o[n]&&(a?t[r]():t[i]())};return a("removed","remove","restore"),a("selected","select","unselect"),a("selectable","selectify","unselectify"),a("locked","lock","unlock"),a("grabbable","grabify","ungrabify"),null!=e.classes&&t.classes(e.classes),n.endBatch(),this}if(void 0===e){var s={data:r.copy(o.data),position:r.copy(o.position),group:o.group,removed:o.removed,selected:o.selected,selectable:o.selectable,locked:o.locked,grabbable:o.grabbable,classes:null};return s.classes=Object.keys(o.classes).filter((function(e){return o.classes[e]})).join(" "),s}}},c.jsons=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t].json();e.push(n)}return e},c.clone=function(){for(var e=this.cy(),t=[],n=0;n<this.length;n++){var r=this[n].json(),i=new s(e,r,!1);t.push(i)}return new u(e,t)},c.copy=c.clone,c.restore=function(e){var t=this,n=t.cy(),a=n._private;void 0===e&&(e=!0);for(var s,c=[],d=[],p=0,f=t.length;p<f;p++)(P=t[p]).removed()&&(P.isNode()?c.push(P):d.push(P));s=c.concat(d);var h=function(){s.splice(p,1),p--};for(p=0;p<s.length;p++){var g=(P=s[p])._private,v=g.data;if(P.clearTraversalCache(),void 0===v.id)v.id=l.generate(n,P);else if(i.number(v.id))v.id=""+v.id;else{if(i.emptyString(v.id)||!i.string(v.id)){r.error("Can not create element with invalid string ID `"+v.id+"`"),h();continue}if(n.hasElementWithId(v.id)){r.error("Can not create second element with ID `"+v.id+"`"),h();continue}}var m=v.id;if(P.isNode()){var y=P,C=g.position;null==C.x&&(C.x=0),null==C.y&&(C.y=0)}if(P.isEdge()){for(var b=P,x=["source","target"],S=x.length,E=!1,w=0;w<S;w++){var O=x[w],_=v[O];i.number(_)&&(_=v[O]=""+v[O]),null==_||""===_?(r.error("Can not create edge `"+m+"` with unspecified "+O),E=!0):n.hasElementWithId(_)||(r.error("Can not create edge `"+m+"` with nonexistant "+O+" `"+_+"`"),E=!0)}if(E){h();continue}var L=n.getElementById(v.source),R=n.getElementById(v.target);L._private.edges.push(b),R._private.edges.push(b),b._private.source=L,b._private.target=R}g.map=new o,g.map.set(m,{ele:P,index:0}),g.removed=!1,n.addToPool(P)}for(p=0;p<c.length;p++){v=(y=c[p])._private.data,i.number(v.parent)&&(v.parent=""+v.parent);var D=v.parent;if(null!=D){var N=n.getElementById(D);if(N.empty())v.parent=void 0;else{for(var I=!1,A=N;!A.empty();){if(y.same(A)){I=!0,v.parent=void 0;break}A=A.parent()}I||(N[0]._private.children.push(y),y._private.parent=N[0],a.hasCompoundNodes=!0)}}}if(s.length>0){var M=new u(n,s);for(p=0;p<M.length;p++){var P;(P=M[p]).isNode()||(P.parallelEdges().clearTraversalCache(),P.source().clearTraversalCache(),P.target().clearTraversalCache())}(a.hasCompoundNodes?n.collection().merge(M).merge(M.connectedNodes()).merge(M.parent()):M).dirtyCompoundBoundsCache().updateStyle(e),e?M.rtrigger("add"):M.trigger("add")}return t},c.removed=function(){var e=this[0];return e&&e._private.removed},c.inside=function(){var e=this[0];return e&&!e._private.removed},c.remove=function(e){function t(e){for(var t=e._private.edges,n=0;n<t.length;n++)i(t[n])}function n(e){for(var t=e._private.children,n=0;n<t.length;n++)i(t[n])}function i(e){p[e.id()]||(p[e.id()]=!0,e.isNode()?(d.push(e),t(e),n(e)):d.unshift(e))}function o(e,t){var n=e._private.edges;r.removeFromArray(n,t),e.clearTraversalCache()}function a(e){e.parallelEdges().clearTraversalCache()}function s(e,t){t=t[0];var n=(e=e[0])._private.children,i=e.id();r.removeFromArray(n,t),v.ids[i]||(v.ids[i]=!0,v.push(e))}var l=this,c=[],d=[],p={},f=l._private.cy;void 0===e&&(e=!0);for(var h=0,g=l.length;h<g;h++)i(S=l[h]);var v=[];for(v.ids={},l.dirtyCompoundBoundsCache(),f.removeFromPool(d),h=0;h<d.length;h++)if((S=d[h])._private.removed=!0,c.push(S),S.isEdge()){var m=S.source()[0],y=S.target()[0];o(m,S),o(y,S),a(S)}else{var C=S.parent();0!==C.length&&s(C,S)}var b=f._private.elements;for(f._private.hasCompoundNodes=!1,h=0;h<b.length;h++)if((S=b[h]).isParent()){f._private.hasCompoundNodes=!0;break}var x=new u(this.cy(),c);for(x.size()>0&&(e&&this.cy().notify({type:"remove",eles:x}),x.trigger("remove")),h=0;h<v.length;h++){var S;(S=v[h]).removed()||S.updateStyle()}return new u(f,c)},c.move=function(e){var t=this._private.cy;if(void 0!==e.source||void 0!==e.target){var n=e.source,r=e.target,i=t.hasElementWithId(n),o=t.hasElementWithId(r);if(i||o){var a=this.jsons();this.remove();for(var s=0;s<a.length;s++){var l=a[s],u=this[s];"edges"===l.group&&(i&&(l.data.source=n),o&&(l.data.target=r),l.scratch=u._private.scratch)}return t.add(a)}}else if(void 0!==e.parent){var c=e.parent;if(null===c||t.hasElementWithId(c)){a=this.jsons();var d=this.descendants(),p=d.union(d.union(this).connectedEdges()).jsons();for(this.remove(),s=0;s<a.length;s++)l=a[s],u=this[s],"nodes"===l.group&&(l.data.parent=null===c?void 0:c,l.scratch=u._private.scratch);return t.add(a.concat(p))}}return this},[e("./algorithms"),e("./animation"),e("./class"),e("./comparators"),e("./compounds"),e("./data"),e("./degree"),e("./dimensions"),e("./events"),e("./filter"),e("./group"),e("./index"),e("./iteration"),e("./layout"),e("./style"),e("./switch-functions"),e("./traversing")].forEach((function(e){r.extend(c,e)})),t.exports=u},{"../is":91,"../map":92,"../set":96,"../util":108,"./algorithms":11,"./animation":15,"./class":16,"./comparators":17,"./compounds":18,"./data":19,"./degree":20,"./dimensions":21,"./element":22,"./events":23,"./filter":24,"./group":25,"./index":26,"./iteration":27,"./layout":28,"./style":29,"./switch-functions":30,"./traversing":31}],27:[function(e,t,n){"use strict";var r=e("../is"),i=e("./zsort"),o={forEach:function(e,t){if(r.fn(e))for(var n=0;n<this.length;n++){var i=this[n];if(!1===(t?e.apply(t,[i,n,this]):e(i,n,this)))break}return this},toArray:function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t]);return e},slice:function(e,t){var n=[],r=this.length;null==t&&(t=r),null==e&&(e=0),e<0&&(e=r+e),t<0&&(t=r+t);for(var i=e;i>=0&&i<t&&i<r;i++)n.push(this[i]);return this.spawn(n)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return 0===this.length},nonempty:function(){return!this.empty()},sort:function(e){if(!r.fn(e))return this;var t=this.toArray().sort(e);return this.spawn(t)},sortByZIndex:function(){return this.sort(i)},zDepth:function(){var e=this[0];if(e){var t=e._private;if("nodes"===t.group){var n=t.data.parent?e.parents().size():0;return e.isParent()?n:Number.MAX_SAFE_INTEGER-1}var r=t.source,i=t.target,o=r.zDepth(),a=i.zDepth();return Math.max(o,a,0)}}};o.each=o.forEach,t.exports=o},{"../is":91,"./zsort":32}],28:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../promise"),a=e("../math"),s={layoutDimensions:function(e){if(e.nodeDimensionsIncludeLabels){var t=this.boundingBox();return{w:t.w,h:t.h}}return{w:this.outerWidth(),h:this.outerHeight()}},layoutPositions:function(e,t,n){var s=this.nodes(),l=this.cy(),u=t.eles,c=i.memoize(n,(function(e,t){return e.id()+"$"+t}));e.trigger({type:"layoutstart",layout:e}),e.animations=[];var d=function(e,t,n){var r={x:t.x1+t.w/2,y:t.y1+t.h/2},i={x:(n.x-r.x)*e,y:(n.y-r.y)*e};return{x:r.x+i.x,y:r.y+i.y}},p=function(){for(var e=a.makeBoundingBox(),t=0;t<s.length;t++){var n=s[t],r=c(n,t);a.expandBoundingBoxByPoint(e,r.x,r.y)}return e};if(t.animate){for(var f=p(),h={},g=0;g<s.length;g++){var v=s[g],m=c(v,g),y=v.position();if(r.number(y.x)&&r.number(y.y)||v.silentPosition({x:0,y:0}),t.spacingFactor&&1!==t.spacingFactor){var C=Math.abs(t.spacingFactor);m=d(C,f,m)}h[v.id()]=m}for(g=0;g<s.length;g++){v=s[g],m=h[v.id()];var b=v.animation({position:m,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(b),b.play()}if(t.fit){var x=l.animation({fit:{boundingBox:u.boundingBoxAt((function(e,t){return h[t.id()]})),padding:t.padding},duration:t.animationDuration,easing:t.animationEasing});e.animations.push(x),x.play()}else if(void 0!==t.zoom&&void 0!==t.pan){var S=l.animation({zoom:t.zoom,pan:t.pan,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(S),S.play()}e.one("layoutready",t.ready),e.trigger({type:"layoutready",layout:e}),o.all(e.animations.map((function(e){return e.promise()}))).then((function(){e.one("layoutstop",t.stop),e.trigger({type:"layoutstop",layout:e})}))}else t.spacingFactor&&1!==t.spacingFactor?(C=Math.abs(t.spacingFactor),f=p(),s.positions((function(e,t){var n=c(e,t);return d(C,f,n)}))):s.positions(n),t.fit&&l.fit(t.eles,t.padding),null!=t.zoom&&l.zoom(t.zoom),t.pan&&l.pan(t.pan),e.one("layoutready",t.ready),e.trigger({type:"layoutready",layout:e}),e.one("layoutstop",t.stop),e.trigger({type:"layoutstop",layout:e});return this},layout:function(e){return this.cy().makeLayout(i.extend({},e,{eles:this}))}};s.createLayout=s.makeLayout=s.layout,t.exports=s},{"../is":91,"../math":93,"../promise":94,"../util":108}],29:[function(e,t,n){"use strict";function r(e){var t=e.ok,n=e.edgeOkViaNode||e.ok,r=e.parentOk||e.ok;return function(){var e=this.cy();if(!e.styleEnabled())return!0;var i=this[0],o=e.hasCompoundNodes();if(i){var a=i._private;if(!t(i))return!1;if(i.isNode()){if(o){var s=a.data.parent?i.parents():null;if(s)for(var l=0;l<s.length;l++){var u=s[l];if(!r(u))return!1}}return!0}return n(a.source)&&n(a.target)}}}var i=e("../is"),o={updateStyle:function(e){var t=this._private.cy;if(!t.styleEnabled())return this;if(t._private.batchingStyle)return t._private.batchStyleEles.merge(this),this;var n=t.hasCompoundNodes(),r=t.style(),i=this;e=!(!e&&void 0!==e),n&&(i=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var o=r.apply(i);return e?o.rtrigger("style"):o.trigger("style"),this},updateMappers:function(e){var t=this._private.cy,n=t.style();if(e=!(!e&&void 0!==e),!t.styleEnabled())return this;var r=n.updateMappers(this);return this.dirtyCompoundBoundsCache(e),e?r.rtrigger("style"):r.trigger("style"),this},parsedStyle:function(e){var t=this[0],n=t.cy();if(n.styleEnabled())return t?t._private.style[e]||n.style().getDefaultProperty(e):void 0},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,o=n.style();if(i.plainObject(e)){var a=e;o.applyBypass(this,a,r),this.dirtyCompoundBoundsCache(),this.rtrigger("style")}else if(i.string(e)){if(void 0===t)return(s=this[0])?o.getStylePropertyValue(s,e):void 0;o.applyBypass(this,e,t,r),this.dirtyCompoundBoundsCache(),this.rtrigger("style")}else if(void 0===e){var s;return(s=this[0])?o.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(void 0===e)for(var o=0;o<i.length;o++){var a=i[o];r.removeAllBypasses(a,n)}else for(e=e.split(/\s+/),o=0;o<i.length;o++)a=i[o],r.removeBypasses(a,e,n);return this.dirtyCompoundBoundsCache(),this.rtrigger("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var t=e.hasCompoundNodes(),n=this[0];if(n){var r=n._private,i=n.pstyle("opacity").value;if(!t)return i;var o=r.data.parent?n.parents():null;if(o)for(var a=0;a<o.length;a++)i*=o[a].pstyle("opacity").value;return i}},transparent:function(){if(!this.cy().styleEnabled())return!1;var e=this[0],t=e.cy().hasCompoundNodes();return e?t?0===e.effectiveOpacity():0===e.pstyle("opacity").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}},a=function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())};o.takesUpSpace=r({ok:a});var s=function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&a(e)},l=function(e){return"visible"===e.pstyle("visibility").value&&a(e)};o.interactive=r({ok:s,parentOk:l,edgeOkViaNode:a}),o.noninteractive=function(){var e=this[0];if(e)return!e.interactive()};var u=function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&a(e)},c=a;o.visible=r({ok:u,edgeOkViaNode:c}),o.hidden=function(){var e=this[0];if(e)return!e.visible()},o.bypass=o.css=o.style,o.renderedCss=o.renderedStyle,o.removeBypass=o.removeCss=o.removeStyle,o.pstyle=o.parsedStyle,t.exports=o},{"../is":91}],30:[function(e,t,n){"use strict";function r(e){return function(){var t=arguments,n=[];if(2===t.length){var r=t[0],i=t[1];this.on(e.event,r,i)}else if(1===t.length)i=t[0],this.on(e.event,i);else if(0===t.length){for(var o=0;o<this.length;o++){var a=this[o],s=!e.ableField||a._private[e.ableField],l=a._private[e.field]!=e.value;if(e.overrideAble){var u=e.overrideAble(a);if(void 0!==u&&(s=u,!u))return this}s&&(a._private[e.field]=e.value,l&&n.push(a))}var c=this.spawn(n);c.updateStyle(),c.trigger(e.event)}return this}}function i(e){o[e.field]=function(){var t=this[0];if(t){if(e.overrideField){var n=e.overrideField(t);if(void 0!==n)return n}return t._private[e.field]}},o[e.on]=r({event:e.on,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!0}),o[e.off]=r({event:e.off,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!1})}var o={};i({field:"locked",overrideField:function(e){return!!e.cy().autolock()||void 0},on:"lock",off:"unlock"}),i({field:"grabbable",overrideField:function(e){return!e.cy().autoungrabify()&&void 0},on:"grabify",off:"ungrabify"}),i({field:"selected",ableField:"selectable",overrideAble:function(e){return!e.cy().autounselectify()&&void 0},on:"select",off:"unselect"}),i({field:"selectable",overrideField:function(e){return!e.cy().autounselectify()&&void 0},on:"selectify",off:"unselectify"}),o.deselect=o.unselect,o.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},i({field:"active",on:"activate",off:"unactivate"}),o.inactive=function(){var e=this[0];if(e)return!e._private.active},t.exports=o},{}],31:[function(e,t,n){"use strict";function r(e){return function(t){for(var n=[],r=0;r<this.length;r++){var i=this[r]._private[e.attr];i&&n.push(i)}return this.spawn(n,{unique:!0}).filter(t)}}function i(e){return function(t){var n=[],r=this._private.cy,i=e||{};s.string(t)&&(t=r.$(t));for(var o=0;o<t.length;o++)for(var a=t[o]._private.edges,l=0;l<a.length;l++){var u=a[l],c=u._private.data,d=this.hasElementWithId(c.source)&&t.hasElementWithId(c.target),p=t.hasElementWithId(c.source)&&this.hasElementWithId(c.target);if(d||p){if(i.thisIsSrc||i.thisIsTgt){if(i.thisIsSrc&&!d)continue;if(i.thisIsTgt&&!p)continue}n.push(u)}}return this.spawn(n,{unique:!0})}}function o(e){var t={codirected:!1};return e=a.extend({},t,e),function(t){for(var n=[],r=this.edges(),i=e,o=0;o<r.length;o++)for(var a=r[o]._private,s=a.source,l=s._private.data.id,u=a.data.target,c=s._private.edges,d=0;d<c.length;d++){var p=c[d],f=p._private.data,h=f.target,g=f.source,v=h===u&&g===l,m=l===h&&u===g;(i.codirected&&v||!i.codirected&&(v||m))&&n.push(p)}return this.spawn(n,{unique:!0}).filter(t)}}var a=e("../util"),s=e("../is"),l={},u=function(e,t){return function(n,r,i,o){var a,l=n,u=this;if(null==l?a="null":s.elementOrCollection(l)&&1===l.length&&(a="#"+l.id()),1===u.length&&a){var c=u[0]._private,d=c.traversalCache=c.traversalCache||{},p=d[t]=d[t]||{},f=p[a];return f||(p[a]=e.call(u,n,r,i,o))}return e.call(u,n,r,i,o)}},c=function(e){return function(t){for(var n=this,r=[],i=0;i<n.length;i++){var o=n[i];if(o.isNode()){for(var a=!1,s=o.connectedEdges(),l=0;l<s.length;l++){var u=s[l],c=u.source(),d=u.target();if(e.noIncomingEdges&&d===o&&c!==o||e.noOutgoingEdges&&c===o&&d!==o){a=!0;break}}a||r.push(o)}}return this.spawn(r,{unique:!0}).filter(t)}},d=function(e){return function(t){for(var n=this,r=[],i=0;i<n.length;i++){var o=n[i];if(o.isNode())for(var a=o.connectedEdges(),s=0;s<a.length;s++){var l=a[s],u=l.source(),c=l.target();e.outgoing&&u===o?(r.push(l),r.push(c)):e.incoming&&c===o&&(r.push(l),r.push(u))}}return this.spawn(r,{unique:!0}).filter(t)}},p=function(e){return function(t){for(var n=this,r=[],i={};;){var o=e.outgoing?n.outgoers():n.incomers();if(0===o.length)break;for(var a=!1,s=0;s<o.length;s++){var l=o[s],u=l.id();i[u]||(i[u]=!0,r.push(l),a=!0)}if(!a)break;n=o}return this.spawn(r,{unique:!0}).filter(t)}};l.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},a.extend(l,{roots:c({noIncomingEdges:!0}),leaves:c({noOutgoingEdges:!0}),outgoers:u(d({outgoing:!0}),"outgoers"),successors:p({outgoing:!0}),incomers:u(d({incoming:!0}),"incomers"),predecessors:p({incoming:!0})}),a.extend(l,{neighborhood:u((function(e){for(var t=[],n=this.nodes(),r=0;r<n.length;r++)for(var i=n[r],o=i.connectedEdges(),a=0;a<o.length;a++){var s=o[a],l=s.source(),u=s.target(),c=i===l?u:l;c.length>0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,{unique:!0}).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),l.neighbourhood=l.neighborhood,l.closedNeighbourhood=l.closedNeighborhood,l.openNeighbourhood=l.openNeighborhood,a.extend(l,{source:u((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:u((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:r({attr:"source"}),targets:r({attr:"target"})}),a.extend(l,{edgesWith:u(i(),"edgesWith",!0),edgesTo:u(i({thisIsSrc:!0}),"edgesTo",!0)}),a.extend(l,{connectedEdges:u((function(e){for(var t=[],n=this,r=0;r<n.length;r++){var i=n[r];if(i.isNode())for(var o=i._private.edges,a=0;a<o.length;a++){var s=o[a];t.push(s)}}return this.spawn(t,{unique:!0}).filter(e)}),"connectedEdges"),connectedNodes:u((function(e){for(var t=[],n=this,r=0;r<n.length;r++){var i=n[r];i.isEdge()&&(t.push(i.source()[0]),t.push(i.target()[0]))}return this.spawn(t,{unique:!0}).filter(e)}),"connectedNodes"),parallelEdges:u(o(),"parallelEdges"),codirectedEdges:u(o({codirected:!0}),"codirectedEdges")}),a.extend(l,{components:function(){var e=this,t=e.cy(),n=e.spawn(),r=e.nodes().spawnSelf(),i=[],o=function(e,t){n.merge(e),r.unmerge(e),t.merge(e)};if(r.empty())return e.spawn();do{var a=t.collection();i.push(a);var s=r[0];o(s,a),e.bfs({directed:!1,roots:s,visit:function(e,t,n,r,i){o(e,a)}})}while(r.length>0);return i.map((function(e){var t=e.connectedEdges().stdFilter((function(t){return e.anySame(t.source())&&e.anySame(t.target())}));return e.union(t)}))}}),t.exports=l},{"../is":91,"../util":108}],32:[function(e,t,n){"use strict";var r=function(e,t){function n(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?i?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?Number.MAX_SAFE_INTEGER:0}function r(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}var i=e.cy().hasCompoundNodes(),o=n(e)-n(t);if(0!==o)return o;var a=r(e)-r(t);if(0!==a)return a;var s=e.pstyle("z-index").value-t.pstyle("z-index").value;return 0!==s?s:e.poolIndex()-t.poolIndex()};t.exports=r},{}],33:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../collection"),a=e("../collection/element"),s={add:function(e){var t,n=this;if(r.elementOrCollection(e)){var s=e;if(s._private.cy===n)t=s.restore();else{for(var l=[],u=0;u<s.length;u++){var c=s[u];l.push(c.json())}t=new o(n,l)}}else if(r.array(e))t=new o(n,l=e);else if(r.plainObject(e)&&(r.array(e.nodes)||r.array(e.edges))){for(var d=e,p=(l=[],["nodes","edges"]),f=(u=0,p.length);u<f;u++){var h=p[u],g=d[h];if(r.array(g))for(var v=0,m=g.length;v<m;v++){var y=i.extend({group:h},g[v]);l.push(y)}}t=new o(n,l)}else t=new a(n,y=e).collection();return t},remove:function(e){if(r.elementOrCollection(e));else if(r.string(e)){var t=e;e=this.$(t)}return e.remove()}};t.exports=s},{"../collection":26,"../collection/element":22,"../is":91,"../util":108}],34:[function(e,t,n){"use strict";var r=e("../define"),i=e("../util"),o=e("../is"),a={animate:r.animate(),animation:r.animation(),animated:r.animated(),clearQueue:r.clearQueue(),delay:r.delay(),delayAnimation:r.delayAnimation(),stop:r.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){function e(){d._private.animationsRunning&&i.requestAnimationFrame((function(n){t(n),e()}))}function t(e){function t(t,i){var a=t._private,s=a.animation.current,l=a.animation.queue,u=!1;if(!i&&"none"===t.pstyle("display").value){s=s.splice(0,s.length).concat(l.splice(0,l.length));for(var c=0;c<s.length;c++)s[c].stop()}if(0===s.length){var d=l.shift();d&&s.push(d)}var p=function(e){for(var t=e.length-1;t>=0;t--)(0,e[t])();e.splice(0,e.length)};for(c=s.length-1;c>=0;c--){var f=s[c],h=f._private;h.stopped?(s.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,p(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||n(t,f,e),r(t,f,e,i),h.applying&&(h.applying=!1),p(h.frames),f.completed()&&(s.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,p(h.completes)),u=!0)}return i||0!==s.length||0!==l.length||o.push(t),u}for(var i=d._private.aniEles,o=[],a=!1,s=0;s<i.length;s++){var l=t(i[s]);a=a||l}var u=t(d,!0);(a||u)&&(i.length>0?(i.dirtyCompoundBoundsCache(),d.notify({type:"draw",eles:i})):d.notify({type:"draw"})),i.unmerge(o),d.trigger("step")}function n(e,t,n){var r=o.core(e),i=!r,a=e,s=t._private;if(i){var l=a.position();s.startPosition=s.startPosition||{x:l.x,y:l.y},s.startStyle=s.startStyle||p.getAnimationStartStyle(a,s.style)}if(r){var u=d._private.pan;s.startPan=s.startPan||{x:u.x,y:u.y},s.startZoom=null!=s.startZoom?s.startZoom:d._private.zoom}s.started=!0,s.startTime=n-s.progress*s.duration}function r(e,t,n,r){var i=!r,s=e._private,l=t._private,u=l.easing,d=l.startTime;if(!l.easingImpl)if(null==u)l.easingImpl=g.linear;else{var f,h;f=o.string(u)?p.parse("transition-timing-function",u).value:u,o.string(f)?(I=f,h=[]):(I=f[1],h=f.slice(2).map((function(e){return+e}))),h.length>0?("spring"===I&&h.push(l.duration),l.easingImpl=g[I].apply(null,h)):l.easingImpl=g[I]}var v,m=l.easingImpl;if(v=0===l.duration?1:(n-d)/l.duration,l.applying&&(v=l.progress),v<0?v=0:v>1&&(v=1),null==l.delay){var y=l.startPosition,C=l.position;if(C&&i){var b=e.position();a(y.x,C.x)&&(b.x=c(y.x,C.x,v,m)),a(y.y,C.y)&&(b.y=c(y.y,C.y,v,m)),e.trigger("position")}var x=l.startPan,S=l.pan,E=s.pan,w=null!=S&&r;w&&(a(x.x,S.x)&&(E.x=c(x.x,S.x,v,m)),a(x.y,S.y)&&(E.y=c(x.y,S.y,v,m)),e.trigger("pan"));var O=l.startZoom,_=l.zoom,L=null!=_&&r;L&&(a(O,_)&&(s.zoom=c(O,_,v,m)),e.trigger("zoom")),(w||L)&&e.trigger("viewport");var R=l.style;if(R&&R.length>0&&i){for(var D=0;D<R.length;D++){var N=R[D],I=N.name,A=N,M=c(l.startStyle[I],A,v,m);p.overrideBypass(e,I,M)}e.trigger("style")}}return l.progress=v,v}function a(e,t){return!(null==e||null==t||!(o.number(e)&&o.number(t)||e&&t))}function s(e,t,n){var r=1-n,i=n*n;return 3*r*r*n*e+3*r*i*t+i*n}function l(e,t){return function(n,r,i){return n+(r-n)*s(e,t,i)}}function u(e,t,n,r,i){var o=i(t,n,r);return null==e||((e.roundValue||e.color)&&(o=Math.round(o)),void 0!==e.min&&(o=Math.max(o,e.min)),void 0!==e.max&&(o=Math.min(o,e.max))),o}function c(e,t,n,r){var i,a,s=null!=e.name?p.properties[e.name]:null,l=null!=s?s.type:null;if(n<0?n=0:n>1&&(n=1),i=null!=e.pfValue||null!=e.value?null!=e.pfValue?e.pfValue:e.value:e,a=null!=t.pfValue||null!=t.value?null!=t.pfValue?t.pfValue:t.value:t,o.number(i)&&o.number(a))return u(l,i,a,n,r);if(o.array(i)&&o.array(a)){for(var c=[],d=0;d<a.length;d++){var f=i[d],h=a[d];if(null!=f&&null!=h){var g=u(l,f,h,n,r);c.push(g)}else c.push(h)}return c}}var d=this;if(d._private.animationsRunning=!0,d.styleEnabled()){var p=d.style(),f=d.renderer();f&&f.beforeRender?f.beforeRender((function(e,n){t(n)}),f.beforeRenderPriorities.animations):e();var h=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},o=t(n,.5*r,i),a=t(n,.5*r,o),s=t(n,r,a),l=1/6*(i.dx+2*(o.dx+a.dx)+s.dx),u=1/6*(i.dv+2*(o.dv+a.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,i){var o,a,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1e-4,p=.016;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,l.tension=t,l.friction=r,a=(o=null!==i)?(c=e(t,r))/i*p:p;s=n(s||l,a),u.push(1+s.x),c+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return o?function(e){return u[e*(u.length-1)|0]}:c}}(),g={linear:function(e,t,n){return e+(t-e)*n},ease:l(.25,.1,.25,1),"ease-in":l(.42,0,1,1),"ease-out":l(0,0,.58,1),"ease-in-out":l(.42,0,.58,1),"ease-in-sine":l(.47,0,.745,.715),"ease-out-sine":l(.39,.575,.565,1),"ease-in-out-sine":l(.445,.05,.55,.95),"ease-in-quad":l(.55,.085,.68,.53),"ease-out-quad":l(.25,.46,.45,.94),"ease-in-out-quad":l(.455,.03,.515,.955),"ease-in-cubic":l(.55,.055,.675,.19),"ease-out-cubic":l(.215,.61,.355,1),"ease-in-out-cubic":l(.645,.045,.355,1),"ease-in-quart":l(.895,.03,.685,.22),"ease-out-quart":l(.165,.84,.44,1),"ease-in-out-quart":l(.77,0,.175,1),"ease-in-quint":l(.755,.05,.855,.06),"ease-out-quint":l(.23,1,.32,1),"ease-in-out-quint":l(.86,0,.07,1),"ease-in-expo":l(.95,.05,.795,.035),"ease-out-expo":l(.19,1,.22,1),"ease-in-out-expo":l(1,0,0,1),"ease-in-circ":l(.6,.04,.98,.335),"ease-out-circ":l(.075,.82,.165,1),"ease-in-out-circ":l(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return g.linear;var r=h(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":function(e,t,n,r){return l(e,t,n,r)}}}}};t.exports=a},{"../define":44,"../is":91,"../util":108}],35:[function(e,t,n){"use strict";var r=e("../define"),i={on:r.on(),one:r.on({unbindSelfOnTrigger:!0}),once:r.on({unbindAllBindersOnTrigger:!0}),off:r.off(),trigger:r.trigger()};r.eventAliasesOn(i),t.exports=i},{"../define":44}],36:[function(e,t,n){"use strict";var r={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};r.jpeg=r.jpg,t.exports=r},{}],37:[function(e,t,n){"use strict";var r=e("../window"),i=e("../util"),o=e("../collection"),a=e("../is"),s=e("../promise"),l=e("../define"),u=function(e){var t=this,n=(e=i.extend({},e)).container;n&&!a.htmlElement(n)&&a.htmlElement(n[0])&&(n=n[0]);var l=n?n._cyreg:null;(l=l||{})&&l.cy&&(l.cy.destroy(),l={});var u=l.readies=l.readies||[];n&&(n._cyreg=l),l.cy=t;var c=void 0!==r&&void 0!==n&&!e.headless,d=e;d.layout=i.extend({name:c?"grid":"null"},d.layout),d.renderer=i.extend({name:c?"canvas":"null"},d.renderer);var p=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},f=this._private={container:n,ready:!1,options:d,elements:new o(this),listeners:[],aniEles:new o(this),scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:p(!0,d.zoomingEnabled),userZoomingEnabled:p(!0,d.userZoomingEnabled),panningEnabled:p(!0,d.panningEnabled),userPanningEnabled:p(!0,d.userPanningEnabled),boxSelectionEnabled:p(!0,d.boxSelectionEnabled),autolock:p(!1,d.autolock,d.autolockNodes),autoungrabify:p(!1,d.autoungrabify,d.autoungrabifyNodes),autounselectify:p(!1,d.autounselectify),styleEnabled:void 0===d.styleEnabled?c:d.styleEnabled,zoom:a.number(d.zoom)?d.zoom:1,pan:{x:a.plainObject(d.pan)&&a.number(d.pan.x)?d.pan.x:0,y:a.plainObject(d.pan)&&a.number(d.pan.y)?d.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1},h=d.selectionType;f.selectionType=void 0===h||"additive"!==h&&"single"!==h?"single":h,a.number(d.minZoom)&&a.number(d.maxZoom)&&d.minZoom<d.maxZoom?(f.minZoom=d.minZoom,f.maxZoom=d.maxZoom):a.number(d.minZoom)&&void 0===d.maxZoom?f.minZoom=d.minZoom:a.number(d.maxZoom)&&void 0===d.minZoom&&(f.maxZoom=d.maxZoom);var g=function(e,t){return e.some(a.promise)?s.all(e).then(t):void t(e)};t.initRenderer(i.extend({hideEdgesOnViewport:d.hideEdgesOnViewport,textureOnViewport:d.textureOnViewport,wheelSensitivity:a.number(d.wheelSensitivity)&&d.wheelSensitivity>0?d.wheelSensitivity:1,motionBlur:void 0!==d.motionBlur&&d.motionBlur,motionBlurOpacity:void 0===d.motionBlurOpacity?.05:d.motionBlurOpacity,pixelRatio:a.number(d.pixelRatio)&&d.pixelRatio>0?d.pixelRatio:void 0,desktopTapThreshold:void 0===d.desktopTapThreshold?4:d.desktopTapThreshold,touchTapThreshold:void 0===d.touchTapThreshold?8:d.touchTapThreshold},d.renderer));var v=function(e,n,r){t.notifications(!1);var o=t.mutableElements();o.length>0&&o.remove(),null!=e&&(a.plainObject(e)||a.array(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.trigger(e),t.notify({type:"load",eles:t.mutableElements()}),t.one("load",n),t.trigger("load")})).one("layoutstop",(function(){t.one("done",r),t.trigger("done")}));var s=i.extend({},t._private.options.layout);s.eles=t.elements(),t.layout(s).run()};g([d.style,d.elements],(function(e){var n=e[0],r=e[1];f.styleEnabled&&t.setStyle(n),v(r,(function(){t.startAnimationLoop(),f.ready=!0,a.fn(d.ready)&&t.on("ready",d.ready);for(var e=0;e<u.length;e++){var n=u[e];t.on("ready",n)}l&&(l.readies=[]),t.trigger("ready")}),d.done)}))},c=u.prototype;i.extend(c,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},isDestroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.trigger("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.isDestroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.trigger("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},selectionType:function(){return this._private.selectionType},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return"null"===this._private.options.renderer.name},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container},options:function(){return i.copy(this._private.options)},json:function(e){var t=this,n=t._private,r=t.mutableElements();if(a.plainObject(e)){if(t.startBatch(),e.elements){var o={},s=function(e,n){for(var r=0;r<e.length;r++){var a=e[r],s=a.data.id,l=t.getElementById(s);o[s]=!0,0!==l.length?l.json(a):n?t.add(i.extend({group:n},a)):t.add(a)}};if(a.array(e.elements))s(e.elements);else for(var l=["nodes","edges"],u=0;u<l.length;u++){var c=l[u],d=e.elements[c];a.array(d)&&s(d,c)}r.stdFilter((function(e){return!o[e.id()]})).remove()}e.style&&t.style(e.style),null!=e.zoom&&e.zoom!==n.zoom&&t.zoom(e.zoom),e.pan&&(e.pan.x===n.pan.x&&e.pan.y===n.pan.y||t.pan(e.pan));var p=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify"];for(u=0;u<p.length;u++){var f=p[u];null!=e[f]&&t[f](e[f])}return t.endBatch(),this}if(void 0===e){var h={elements:{}};return r.forEach((function(e){var t=e.group();h.elements[t]||(h.elements[t]=[]),h.elements[t].push(e.json())})),this._private.styleEnabled&&(h.style=t.style().json()),h.zoomingEnabled=t._private.zoomingEnabled,h.userZoomingEnabled=t._private.userZoomingEnabled,h.zoom=t._private.zoom,h.minZoom=t._private.minZoom,h.maxZoom=t._private.maxZoom,h.panningEnabled=t._private.panningEnabled,h.userPanningEnabled=t._private.userPanningEnabled,h.pan=i.copy(t._private.pan),h.boxSelectionEnabled=t._private.boxSelectionEnabled,h.renderer=i.copy(t._private.options.renderer),h.hideEdgesOnViewport=t._private.options.hideEdgesOnViewport,h.textureOnViewport=t._private.options.textureOnViewport,h.wheelSensitivity=t._private.options.wheelSensitivity,h.motionBlur=t._private.options.motionBlur,h}},scratch:l.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0}),removeScratch:l.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0})}),c.$id=c.getElementById,[e("./add-remove"),e("./animation"),e("./events"),e("./export"),e("./layout"),e("./notification"),e("./renderer"),e("./search"),e("./style"),e("./viewport")].forEach((function(e){i.extend(c,e)})),t.exports=u},{"../collection":26,"../define":44,"../is":91,"../promise":94,"../util":108,"../window":116,"./add-remove":33,"./animation":34,"./events":35,"./export":36,"./layout":38,"./notification":39,"./renderer":40,"./search":41,"./style":42,"./viewport":43}],38:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n,o=e.name,a=t.extension("layout",o);if(null!=a)return n=i.string(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new a(r.extend({},e,{cy:t,eles:n}));r.error("Can not apply layout: No such layout `"+o+"` found; did you include its JS file?")}else r.error("A `name` must be specified to make a layout");else r.error("Layout options must be specified to make a layout")}};o.createLayout=o.makeLayout=o.layout,t.exports=o},{"../is":91,"../util":108}],39:[function(e,t,n){"use strict";var r={notify:function(e){var t=this._private;if(t.batchingNotify){var n=t.batchNotifyEles,r=t.batchNotifyTypes;return e.eles&&n.merge(e.eles),void(r.ids[e.type]||(r.push(e.type),r.ids[e.type]=!0))}if(t.notificationsEnabled){var i=this.renderer();!this.isDestroyed()&&i&&i.notify(e)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:void(t.notificationsEnabled=!!e)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchingStyle=e.batchingNotify=!0,e.batchStyleEles=this.collection(),e.batchNotifyEles=this.collection(),e.batchNotifyTypes=[],e.batchNotifyTypes.ids={}),e.batchCount++,this},endBatch:function(){var e=this._private;return e.batchCount--,0===e.batchCount&&(e.batchingStyle=!1,e.batchStyleEles.updateStyle(),e.batchingNotify=!1,this.notify({type:e.batchNotifyTypes,eles:e.batchNotifyEles})),this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r<n.length;r++){var i=n[r],o=e[i];t.getElementById(i).data(o)}}))}};t.exports=r},{}],40:[function(e,t,n){"use strict";var r=e("../util"),i={renderTo:function(e,t,n,r){return this._private.renderer.renderTo(e,t,n,r),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify({type:"draw"}),this},resize:function(){return this.invalidateSize(),this.notify({type:"resize"}),this.trigger("resize"),this},initRenderer:function(e){var t=this,n=t.extension("renderer",e.name);if(null!=n){var i=r.extend({},e,{cy:t});t._private.renderer=new n(i)}else r.error("Can not initialise: No such renderer `%s` found; did you include its JS file?",e.name)},destroyRenderer:function(){var e=this;e.notify({type:"destroy"});var t=e.container();if(t)for(t._cyreg=null;t.childNodes.length>0;)t.removeChild(t.childNodes[0]);e._private.renderer=null},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};i.invalidateDimensions=i.resize,t.exports=i},{"../util":108}],41:[function(e,t,n){"use strict";var r=e("../is"),i=e("../collection"),o={collection:function(e,t){return r.string(e)?this.$(e):r.elementOrCollection(e)?e.collection():r.array(e)?new i(this,e,t):new i(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};o.elements=o.filter=o.$,t.exports=o},{"../collection":26,"../is":91}],42:[function(e,t,n){"use strict";var r=e("../is"),i=e("../style"),o={style:function(e){return e&&this.setStyle(e).update(),this._private.style},setStyle:function(e){var t=this._private;return r.stylesheet(e)?t.style=e.generateStyle(this):r.array(e)?t.style=i.fromJson(this,e):r.string(e)?t.style=i.fromString(this,e):t.style=i(this),t.style}};t.exports=o},{"../is":91,"../style":101}],43:[function(e,t,n){"use strict";var r=e("../is"),i=e("../window"),o={autolock:function(e){return void 0===e?this._private.autolock:(this._private.autolock=!!e,this)},autoungrabify:function(e){return void 0===e?this._private.autoungrabify:(this._private.autoungrabify=!!e,this)},autounselectify:function(e){return void 0===e?this._private.autounselectify:(this._private.autounselectify=!!e,this)},panningEnabled:function(e){return void 0===e?this._private.panningEnabled:(this._private.panningEnabled=!!e,this)},userPanningEnabled:function(e){return void 0===e?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!e,this)},zoomingEnabled:function(e){return void 0===e?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!e,this)},userZoomingEnabled:function(e){return void 0===e?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!e,this)},boxSelectionEnabled:function(e){return void 0===e?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!e,this)},pan:function(){var e,t,n,i,o,a=arguments,s=this._private.pan;switch(a.length){case 0:return s;case 1:if(r.string(a[0]))return s[e=a[0]];if(r.plainObject(a[0])){if(!this._private.panningEnabled)return this;i=(n=a[0]).x,o=n.y,r.number(i)&&(s.x=i),r.number(o)&&(s.y=o),this.trigger("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=a[0],t=a[1],"x"!==e&&"y"!==e||!r.number(t)||(s[e]=t),this.trigger("pan viewport")}return this.notify({type:"viewport"}),this},panBy:function(e){var t,n,i,o,a,s=arguments,l=this._private.pan;if(!this._private.panningEnabled)return this;switch(s.length){case 1:r.plainObject(s[0])&&(o=(i=s[0]).x,a=i.y,r.number(o)&&(l.x+=o),r.number(a)&&(l.y+=a),this.trigger("pan viewport"));break;case 2:t=s[0],n=s[1],"x"!==t&&"y"!==t||!r.number(n)||(l[t]+=n),this.trigger("pan viewport")}return this.notify({type:"viewport"}),this},fit:function(e,t){var n=this.getFitViewport(e,t);if(n){var r=this._private;r.zoom=n.zoom,r.pan=n.pan,this.trigger("pan zoom viewport"),this.notify({type:"viewport"})}return this},getFitViewport:function(e,t){if(r.number(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled){var n;if(r.string(e)){var i=e;e=this.$(i)}else if(r.boundingBox(e)){var o=e;(n={x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2}).w=n.x2-n.x1,n.h=n.y2-n.y1}else r.elementOrCollection(e)||(e=this.mutableElements());n=n||e.boundingBox();var a,s=this.width(),l=this.height();if(t=r.number(t)?t:0,!isNaN(s)&&!isNaN(l)&&s>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:a)<this._private.minZoom?this._private.minZoom:a,pan:{x:(s-a*(n.x1+n.x2))/2,y:(l-a*(n.y1+n.y2))/2}}}},minZoom:function(e){return void 0===e?this._private.minZoom:(r.number(e)&&(this._private.minZoom=e),this)},maxZoom:function(e){return void 0===e?this._private.maxZoom:(r.number(e)&&(this._private.maxZoom=e),this)},zoom:function(e){var t,n;if(void 0===e)return this._private.zoom;if(r.number(e))n=e;else if(r.plainObject(e)){if(n=e.level,e.position){var i=e.position,o=this._private.pan,a=this._private.zoom;t={x:i.x*a+o.x,y:i.y*a+o.y}}else e.renderedPosition&&(t=e.renderedPosition);if(t&&!this._private.panningEnabled)return this}if(!this._private.zoomingEnabled)return this;if(!r.number(n)||t&&(!r.number(t.x)||!r.number(t.y)))return this;if(n=(n=n>this._private.maxZoom?this._private.maxZoom:n)<this._private.minZoom?this._private.minZoom:n,t){var s=this._private.pan,l=this._private.zoom,u=n,c={x:-u/l*(t.x-s.x)+t.x,y:-u/l*(t.y-s.y)+t.y};this._private.zoom=n,this._private.pan=c;var d=s.x!==c.x||s.y!==c.y;this.trigger(" zoom "+(d?" pan ":"")+" viewport ")}else this._private.zoom=n,this.trigger("zoom viewport");return this.notify({type:"viewport"}),this},viewport:function(e){var t=this._private,n=!0,i=!0,o=[],a=!1,s=!1;if(!e)return this;if(r.number(e.zoom)||(n=!1),r.plainObject(e.pan)||(i=!1),!n&&!i)return this;if(n){var l=e.zoom;l<t.minZoom||l>t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=l,o.push("zoom"))}if(i&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var u=e.pan;r.number(u.x)&&(t.pan.x=u.x,s=!1),r.number(u.y)&&(t.pan.y=u.y,s=!1),s||o.push("pan")}return o.length>0&&(o.push("viewport"),this.trigger(o.join(" ")),this.notify({type:"viewport"})),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.trigger("pan viewport"),this.notify({type:"viewport"})),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(r.string(e)){var n=e;e=this.mutableElements().filter(n)}else r.elementOrCollection(e)||(e=this.mutableElements());var i=e.boundingBox(),o=this.width(),a=this.height();return{x:(o-(t=void 0===t?this._private.zoom:t)*(i.x1+i.x2))/2,y:(a-t*(i.y1+i.y2))/2}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container;return e.sizeCache=e.sizeCache||(t?function(){var e=t.getBoundingClientRect(),n=i.getComputedStyle(t),r=function(e){return parseFloat(n.getPropertyValue(e))};return{width:e.width-r("padding-left")-r("padding-right")-r("border-left-width")-r("border-right-width"),height:e.height-r("padding-top")-r("padding-bottom")-r("border-top-width")-r("border-bottom-width")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}}};o.centre=o.center,o.autolockNodes=o.autolock,o.autoungrabifyNodes=o.autoungrabify,t.exports=o},{"../is":91,"../window":116}],44:[function(e,t,n){"use strict";var r=e("./util"),i=e("./is"),o=e("./selector"),a=e("./promise"),s=e("./event"),l=e("./animation"),u={data:function(e){var t={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(e){},onSet:function(e){},canSet:function(e){return!0}};return e=r.extend({},t,e),function(t,n){var r=e,o=this,a=void 0!==o.length,s=a?o:[o],l=a?o[0]:o;if(i.string(t)){if(r.allowGetting&&void 0===n)return l&&(r.beforeGet(l),y=l._private[r.field][t]),y;if(r.allowSetting&&void 0!==n&&!r.immutableKeys[t]){for(var u=0,c=s.length;u<c;u++)r.canSet(s[u])&&(s[u]._private[r.field][t]=n);r.updateStyle&&o.updateStyle(),r.onSet(o),r.settingTriggersEvent&&o[r.triggerFnName](r.settingEvent)}}else if(r.allowSetting&&i.plainObject(t)){var d,p,f=t,h=Object.keys(f);for(u=0;u<h.length;u++)if(p=f[d=h[u]],!r.immutableKeys[d])for(var g=0;g<s.length;g++){var v=s[g];r.canSet(v)&&(v._private[r.field][d]=p)}r.updateStyle&&o.updateStyle(),r.onSet(o),r.settingTriggersEvent&&o[r.triggerFnName](r.settingEvent)}else if(r.allowBinding&&i.fn(t)){var m=t;o.on(r.bindingEvent,m)}else if(r.allowGetting&&void 0===t){var y;return l&&(r.beforeGet(l),y=l._private[r.field]),y}return o}},removeData:function(e){var t={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=r.extend({},t,e),function(t){var n=e,r=this,o=void 0!==r.length?r:[r];if(i.string(t)){for(var a=(p=t.split(/\s+/)).length,s=0;s<a;s++){var l=p[s];if(!i.emptyString(l)&&!n.immutableKeys[l])for(var u=0,c=o.length;u<c;u++)o[u]._private[n.field][l]=void 0}n.triggerEvent&&r[n.triggerFnName](n.event)}else if(void 0===t){for(u=0,c=o.length;u<c;u++){var d=o[u]._private[n.field],p=Object.keys(d);for(s=0;s<p.length;s++)l=p[s],!n.immutableKeys[l]&&(d[l]=void 0)}n.triggerEvent&&r[n.triggerFnName](n.event)}return r}},event:{regex:/(\w+)(\.(?:\w+|\*))?/,universalNamespace:".*",optionalTypeRegex:/(\w+)?(\.(?:\w+|\*))?/,falseCallback:function(){return!1}},on:function(e){var t={unbindSelfOnTrigger:!1,unbindAllBindersOnTrigger:!1};return e=r.extend({},t,e),function(t,n,r){var a=this,s=void 0!==a.length?a:[a],l=i.string(t),c=e;if(i.fn(n)&&(r=n,n=void 0),!i.fn(r)&&!1!==r&&l)return a;if(l){var d={};d[t]=r,t=d}for(var p=Object.keys(t),f=0;f<p.length;f++){var h=p[f];if(!1===(r=t[h])&&(r=u.event.falseCallback),i.fn(r)){h=h.split(/\s+/);for(var g=0;g<h.length;g++){var v=h[g];if(!i.emptyString(v)){var m=v.match(u.event.regex);if(m)for(var y=m[1],C=m[2]?m[2]:void 0,b={callback:r,delegated:!!n,selector:n,selObj:new o(n),type:y,namespace:C,unbindSelfOnTrigger:c.unbindSelfOnTrigger,unbindAllBindersOnTrigger:c.unbindAllBindersOnTrigger,binders:s},x=0;x<s.length;x++){var S=s[x]._private=s[x]._private||{};S.listeners=S.listeners||[],S.listeners.push(b)}}}}}return a}},eventAliasesOn:function(e){var t=e;t.addListener=t.listen=t.bind=t.on,t.removeListener=t.unlisten=t.unbind=t.off,t.emit=t.trigger,t.pon=t.promiseOn=function(e,t){var n=this,r=Array.prototype.slice.call(arguments,0);return new a((function(e,t){var i=function(t){n.off.apply(n,a),e(t)},o=r.concat([i]),a=o.concat([]);n.on.apply(n,o)}))}},off:function(e){var t={};return e=r.extend({},t,e),function(e,t,n){var r=this,o=void 0!==r.length?r:[r],a=i.string(e);if(0===arguments.length){for(var s=0;s<o.length;s++)o[s]._private=o[s]._private||{},y.listeners=[];return r}if((i.fn(t)||!1===t)&&(n=t,t=void 0),a){var l={};l[e]=n,e=l}for(var c=Object.keys(e),d=0;d<c.length;d++){var p=c[d];!1===(n=e[p])&&(n=u.event.falseCallback),p=p.split(/\s+/);for(var f=0;f<p.length;f++){var h=p[f];if(!i.emptyString(h)){var g=h.match(u.event.optionalTypeRegex);if(g){var v=g[1]?g[1]:void 0,m=g[2]?g[2]:void 0;for(s=0;s<o.length;s++)for(var y=o[s]._private=o[s]._private||{},C=y.listeners=y.listeners||[],b=0;b<C.length;b++){var x=C[b],S=!m||m===x.namespace,E=!v||x.type===v,w=!n||n===x.callback;S&&E&&w&&(C.splice(b,1),b--)}}}}}return r}},trigger:function(e){var t={};return e=r.extend({},t,e),function(t,n,r){var o=this,a=void 0!==o.length?o:[o],l=i.string(t),c=i.plainObject(t),d=i.event(t),p=(S=this._private=this._private||{}).cy||(i.core(this)?this:null),f=!!p&&p.hasCompoundNodes();if(l){var h=t.split(/\s+/);t=[];for(var g=0;g<h.length;g++){var v=h[g];if(!i.emptyString(v)){var m=v.match(u.event.regex),y=m[1],C=m[2]?m[2]:void 0;t.push({type:y,namespace:C})}}}else c&&(t=[t]);for(n?i.array(n)||(n=[n]):n=[],g=0;g<t.length;g++)for(var b=t[g],x=0;x<a.length;x++){var S,E=a[x],w=(S=E._private=E._private||{}).listeners=S.listeners||[],O=i.element(E)||e.layout;if(d?((v=b).target=v.target||E,v.cy=v.cy||p):v=new s(b,{target:E,cy:p,namespace:b.namespace}),b.layout&&(v.layout=b.layout),e.layout&&(v.layout=E),v.position){var _=v.position,L=p.zoom(),R=p.pan();v.renderedPosition={x:_.x*L+R.x,y:_.y*L+R.y}}r&&(w=[{namespace:v.namespace,type:v.type,callback:r}]);for(var D=0;D<w.length;D++){var N=w[D],I=!N.namespace||N.namespace===v.namespace||N.namespace===u.event.universalNamespace,A=N.type===v.type,M=!N.delegated||E!==v.target&&i.element(v.target)&&N.selObj.matches(v.target);if(I&&A&&M){var P=[v];if(P=P.concat(n),(N.unbindSelfOnTrigger||N.unbindAllBindersOnTrigger)&&(w.splice(D,1),D--),N.unbindAllBindersOnTrigger)for(var k=N.binders,T=0;T<k.length;T++){var V=k[T];if(V&&V!==E)for(var B=V._private.listeners,z=0;z<B.length;z++)B[z]===N&&(B.splice(z,1),z--)}var j=N.delegated?v.target:E,F=N.callback.apply(j,P);(!1===F||v.isPropagationStopped())&&(O=!1,!1===F&&(v.stopPropagation(),v.preventDefault()))}}if(O){var G=f?E._private.parent:null;null!=G&&0!==G.length?(G=G[0]).trigger(v):p.trigger(v)}}return o}},animated:function(e){var t={};return e=r.extend({},t,e),function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return!1;var n=t[0];return n?n._private.animation.current.length>0:void 0}},clearQueue:function(e){var t={};return e=r.extend({},t,e),function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n<t.length;n++)t[n]._private.animation.queue=[];return this}},delay:function(e){var t={};return e=r.extend({},t,e),function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this}},delayAnimation:function(e){var t={};return e=r.extend({},t,e),function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this}},animation:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,i=void 0!==n.length,o=i?n:[n],a=this._private.cy||this,s=!i,u=!s;if(!a.styleEnabled())return this;var c=a.style();if(e=r.extend({},e,t),0===Object.keys(e).length)return new l(o[0],e);switch(void 0===e.duration&&(e.duration=400),e.duration){case"slow":e.duration=600;break;case"fast":e.duration=200}if(u&&(e.style=c.getPropsList(e.style||e.css),e.css=void 0),e.renderedPosition&&u){var d=e.renderedPosition,p=a.pan(),f=a.zoom();e.position={x:(d.x-p.x)/f,y:(d.y-p.y)/f}}if(e.panBy&&s){var h=e.panBy,g=a.pan();e.pan={x:g.x+h.x,y:g.y+h.y}}var v=e.center||e.centre;if(v&&s){var m=a.getCenterPan(v.eles,e.zoom);m&&(e.pan=m)}if(e.fit&&s){var y=e.fit,C=a.getFitViewport(y.eles||y.boundingBox,y.padding);C&&(e.pan=C.pan,e.zoom=C.zoom)}return new l(o[0],e)}},animate:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,i=void 0!==n.length?n:[n];if(!(this._private.cy||this).styleEnabled())return this;t&&(e=r.extend({},e,t));for(var o=0;o<i.length;o++){var a=i[o],s=a.animated()&&(void 0===e.queue||e.queue);a.animation(e,s?{queue:!0}:void 0).play()}return this}},stop:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,r=void 0!==n.length?n:[n],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var o=0;o<r.length;o++){for(var a=r[o]._private,s=a.animation.current,l=0;l<s.length;l++){var u=s[l]._private;t&&(u.duration=0)}e&&(a.animation.queue=[]),t||(a.animation.current=[])}return i.notify({eles:this,type:"draw"}),this}}};t.exports=u},{"./animation":2,"./event":45,"./is":91,"./promise":94,"./selector":95,"./util":108}],45:[function(e,t,n){"use strict";function r(){return!1}function i(){return!0}var o=function(e,t){return this instanceof o?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?i:r):this.type=e,t&&(this.type=void 0!==t.type?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout,this.message=t.message),void(this.timeStamp=e&&e.timeStamp||Date.now())):new o(e,t)};o.prototype={instanceString:function(){return"event"},preventDefault:function(){this.isDefaultPrevented=i;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=i;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()},isDefaultPrevented:r,isPropagationStopped:r,isImmediatePropagationStopped:r},t.exports=o},{}],46:[function(e,t,n){"use strict";function r(e,t,n){var r=n,o=function(n){s.error("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===e){if(c.prototype[t])return o(t);c.prototype[t]=n}else if("collection"===e){if(u.prototype[t])return o(t);u.prototype[t]=n}else if("layout"===e){for(var a=function(e){this.options=e,n.call(this,e),p.plainObject(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[]},d=a.prototype=Object.create(n.prototype),h=[],g=0;g<h.length;g++){var v=h[g];d[v]=d[v]||function(){return this}}d.start&&!d.run?d.run=function(){return this.start(),this}:!d.start&&d.run&&(d.start=function(){return this.run(),this});var m=n.prototype.stop;d.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var n=0;n<t.length;n++)t[n].stop()}return m?m.call(this):this.trigger("layoutstop"),this},d.destroy||(d.destroy=function(){return this}),d.on=l.on({layout:!0}),d.one=l.on({layout:!0,unbindSelfOnTrigger:!0}),d.once=l.on({layout:!0,unbindAllBindersOnTrigger:!0}),d.off=l.off({layout:!0}),d.trigger=l.trigger({layout:!0}),l.eventAliasesOn(d),r=a}else if("renderer"===e&&"null"!==t&&"base"!==t){var y=i("renderer","base"),C=y.prototype,b=n,x=n.prototype,S=function(){y.apply(this,arguments),b.apply(this,arguments)},E=S.prototype;for(var w in C){var O=C[w];if(null!=x[w])return o(w);E[w]=O}for(var w in x)E[w]=x[w];C.clientFunctions.forEach((function(e){E[e]=E[e]||function(){s.error("Renderer does not implement `renderer."+e+"()` on its prototype")}})),r=S}return s.setMap({map:f,keys:[e,t],value:r})}function i(e,t){return s.getMap({map:f,keys:[e,t]})}function o(e,t,n,r,i){return s.setMap({map:h,keys:[e,t,n,r],value:i})}function a(e,t,n,r){return s.getMap({map:h,keys:[e,t,n,r]})}var s=e("./util"),l=e("./define"),u=e("./collection"),c=e("./core"),d=e("./extensions"),p=e("./is"),f={},h={},g=function(){return 2===arguments.length?i.apply(null,arguments):3===arguments.length?r.apply(null,arguments):4===arguments.length?a.apply(null,arguments):5===arguments.length?o.apply(null,arguments):void s.error("Invalid extension access syntax")};c.prototype.extension=g,d.forEach((function(e){e.extensions.forEach((function(t){r(e.type,t.name,t.impl)}))})),t.exports=g},{"./collection":26,"./core":37,"./define":44,"./extensions":47,"./is":91,"./util":108}],47:[function(e,t,n){"use strict";t.exports=[{type:"layout",extensions:e("./layout")},{type:"renderer",extensions:e("./renderer")}]},{"./layout":53,"./renderer":87}],48:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},s,e)}var i=e("../../util"),o=e("../../math"),a=e("../../is"),s={fit:!0,directed:!1,padding:30,circle:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,maximalAdjustments:0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e,t=this.options,n=t,r=t.cy,i=n.eles,s=i.nodes().not(":parent"),l=i,u=o.makeBoundingBox(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.elementOrCollection(n.roots))e=n.roots;else if(a.array(n.roots)){for(var c=[],d=0;d<n.roots.length;d++){var p=n.roots[d],f=r.getElementById(p);c.push(f)}e=r.collection(c)}else if(a.string(n.roots))e=r.$(n.roots);else if(n.directed)e=s.roots();else{for(var h=[],g=s;g.length>0;){var v=r.collection();i.bfs({roots:g[0],visit:function(e,t,n,r,i){v=v.add(e)},directed:!1}),g=g.not(v),h.push(v)}for(e=r.collection(),d=0;d<h.length;d++){var m=h[d],y=m.maxDegree(!1),C=m.filter((function(e){return e.degree(!1)===y}));e=e.add(C)}}var b=[],x={},S={},E={},w={},O={};l.bfs({roots:e,directed:n.directed,visit:function(e,t,n,r,i){var o=e[0],a=o.id();if(b[i]||(b[i]=[]),b[i].push(o),x[a]=!0,S[a]=i,E[a]=n,w[a]=t,n){var s=n.id();(O[s]=O[s]||[]).push(e)}}});var _=[];for(d=0;d<s.length;d++)f=s[d],x[f.id()]||_.push(f);for(var L=3*_.length,R=0;0!==_.length&&R<L;){var D=(I=_.shift()).neighborhood().nodes(),N=!1;for(d=0;d<D.length;d++)if(void 0!==(te=S[D[d].id()])){b[te].push(I),N=!0;break}N||_.push(I),R++}for(;0!==_.length;){var I=_.shift();(N=!1)||(0===b.length&&b.push([]),b[0].push(I))}var A=function(){for(var e=0;e<b.length;e++)for(var t=b[e],n=0;n<t.length;n++)t[n]._private.scratch.breadthfirst={depth:e,index:n}};A();for(var M=function(e){for(var t,n=e.connectedEdges((function(t){return t.data("target")===e.id()})),r=e._private.scratch.breadthfirst,i=0,o=0;o<n.length;o++){var a=n[o].source()[0],s=a._private.scratch.breadthfirst;r.depth<=s.depth&&i<s.depth&&(i=s.depth,t=a)}return t},P=0;P<n.maximalAdjustments;P++){var k=b.length,T=[];for(d=0;d<k;d++)for(var V=(te=b[d]).length,B=0;B<V;B++){var z=(f=te[B])._private.scratch.breadthfirst;(j=M(f))&&(z.intEle=j,T.push(f))}for(d=0;d<T.length;d++){var j,F=(j=(z=(f=T[d])._private.scratch.breadthfirst).intEle)._private.scratch.breadthfirst;b[z.depth].splice(z.index,1);for(var G=F.depth+1;G>b.length-1;)b.push([]);b[G].push(f),z.depth=G,z.index=b[G].length-1}A()}var U=0;if(n.avoidOverlap)for(d=0;d<s.length;d++){var q=s[d].layoutDimensions(n),W=q.w,$=q.h;U=Math.max(U,W,$)}for(var H={},X=function(e){if(H[e.id()])return H[e.id()];for(var t=e._private.scratch.breadthfirst.depth,n=e.neighborhood().nodes().not(":parent").intersection(s),r=0,i=0,o=0;o<n.length;o++){var a=n[o]._private.scratch.breadthfirst,l=a.index,u=a.depth,c=b[u].length;(t>u||0===t)&&(r+=l/c,i++)}return r/=i=Math.max(1,i),0===i&&(r=void 0),H[e.id()]=r,r},Y=function(e,t){return X(e)-X(t)},K=0;K<3;K++){for(d=0;d<b.length;d++)b[d]=b[d].sort(Y);A()}var Z=0;for(d=0;d<b.length;d++)Z=Math.max(b[d].length,Z);var Q={x:u.x1+u.w/2,y:u.x1+u.h/2},J=function(e,t){var r=e._private.scratch.breadthfirst,i=r.depth,o=r.index,a=b[i].length,s=Math.max(u.w/(a+1),U),l=Math.max(u.h/(b.length+1),U),c=Math.min(u.w/2/b.length,u.h/2/b.length);if(c=Math.max(c,U),n.circle){if(n.circle){var d=c*i+c-(b.length>0&&b[0].length<=3?c/2:0),p=2*Math.PI/b[i].length*o;return 0===i&&1===b[0].length&&(d=1),{x:Q.x+d*Math.cos(p),y:Q.y+d*Math.sin(p)}}return{x:Q.x+(o+1-(a+1)/2)*s,y:(i+1)*l}}var f={x:Q.x+(o+1-(a+1)/2)*s,y:(i+1)*l};return f},ee={};for(d=b.length-1;d>=0;d--){var te=b[d];for(B=0;B<te.length;B++)I=te[B],ee[I.id()]=J(I,d===b.length-1)}return s.layoutPositions(this,n,(function(e){return ee[e.id()]})),this},t.exports=r},{"../../is":91,"../../math":93,"../../util":108}],49:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},s,e)}var i=e("../../util"),o=e("../../math"),a=e("../../is"),s={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,s=r.nodes().not(":parent");t.sort&&(s=s.sort(t.sort));for(var l,u=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),c={x:u.x1+u.w/2,y:u.y1+u.h/2},d=(void 0===t.sweep?2*Math.PI-2*Math.PI/s.length:t.sweep)/Math.max(1,s.length-1),p=0,f=0;f<s.length;f++){var h=s[f].layoutDimensions(t),g=h.w,v=h.h;p=Math.max(p,g,v)}if(l=a.number(t.radius)?t.radius:s.length<=1?0:Math.min(u.h,u.w)/2-p,s.length>1&&t.avoidOverlap){p*=1.75;var m=Math.cos(d)-Math.cos(0),y=Math.sin(d)-Math.sin(0),C=Math.sqrt(p*p/(m*m+y*y));l=Math.max(C,l)}var b=function(e,n){var r=t.startAngle+n*d*(i?1:-1),o=l*Math.cos(r),a=l*Math.sin(r);return{x:c.x+o,y:c.y+a}};return s.layoutPositions(this,t,b),this},t.exports=r},{"../../is":91,"../../math":93,"../../util":108}],50:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles.nodes().not(":parent"),a=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:a.x1+a.w/2,y:a.y1+a.h/2},l=[],u=t.startAngle,c=0,d=0;d<i.length;d++){var p,f=i[d];p=t.concentric(f),l.push({value:p,node:f}),f._private.scratch.concentric=p}for(i.updateStyle(),d=0;d<i.length;d++){var h=(f=i[d]).layoutDimensions(t);c=Math.max(c,h.w,h.h)}l.sort((function(e,t){return t.value-e.value}));var g=t.levelWidth(i),v=[[]],m=v[0];for(d=0;d<l.length;d++){var y=l[d];m.length>0&&Math.abs(m[0].value-y.value)>=g&&(m=[],v.push(m)),m.push(y)}var C=c+t.minNodeSpacing;if(!t.avoidOverlap){var b=v.length>0&&v[0].length>1,x=(Math.min(a.w,a.h)/2-C)/(v.length+b?1:0);C=Math.min(C,x)}var S=0;for(d=0;d<v.length;d++){var E=v[d],w=void 0===t.sweep?2*Math.PI-2*Math.PI/E.length:t.sweep,O=E.dTheta=w/Math.max(1,E.length-1);if(E.length>1&&t.avoidOverlap){var _=Math.cos(O)-Math.cos(0),L=Math.sin(O)-Math.sin(0),R=Math.sqrt(C*C/(_*_+L*L));S=Math.max(R,S)}E.r=S,S+=C}if(t.equidistant){var D=0;for(S=0,d=0;d<v.length;d++){var N=(E=v[d]).r-S;D=Math.max(D,N)}for(S=0,d=0;d<v.length;d++)E=v[d],0===d&&(S=E.r),E.r=S,S+=D}var I={};for(d=0;d<v.length;d++){O=(E=v[d]).dTheta,S=E.r;for(var A=0;A<E.length;A++){y=E[A],u=t.startAngle+(n?1:-1)*O*A;var M={x:s.x+S*Math.cos(u),y:s.y+S*Math.sin(u)};I[y.node.id()]=M}}return i.layoutPositions(this,t,(function(e){var t=e.id();return I[t]})),this},t.exports=r},{"../../math":93,"../../util":108}],51:[function(e,t,n){"use strict";function r(e){this.options=o.extend({},u,e),this.options.layout=this}var i,o=e("../../util"),a=e("../../math"),s=e("../../is"),l=e("../../promise"),u={ready:function(){},stop:function(){},animate:!0,animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:100,nodeRepulsion:function(e){return 4e5},nodeOverlap:10,idealEdgeLength:function(e){return 10},edgeElasticity:function(e){return 100},nestingFactor:5,gravity:80,numIter:1e3,initialTemp:200,coolingFactor:.95,minTemp:1,weaver:!1};r.prototype.run=function(){function e(e){var t={type:"message",message:e};d.trigger(t)}var t=this.options,n=t.cy,r=this,a=this.thread,u=t.weaver?t.weaver.Thread:null,d={listeners:[],on:function(e,t){return this.listeners.push({event:e,callback:t}),this},trigger:function(e){s.string(e)&&(e={type:e});var t=function(t){return t.event===e.type},n=function(t){t.callback(e)};return this.listeners.filter(t).forEach(n),this},pass:function(e){return this.pass=e,this},run:function(e){var t=this.pass;return new l((function(n){n(e(t))}))},stop:function(){return this}};a&&!a.stopped()||(a=this.thread=u?new u:d),r.stopped=!1,r.trigger({type:"layoutstart",layout:r}),i=!0===t.debug;var p=c(n,r,t);i&&f(p),t.randomize&&h(p,n);var v=Date.now(),m=!1,y=function(e){e=e||{},m&&!e.next||!e.force&&Date.now()-v<t.animationThreshold||(m=!0,o.requestAnimationFrame((function(){g(p,n,t),!0===t.fit&&n.fit(t.padding),m=!1,e.next&&e.next()})))};a.on("message",(function(e){var t=e.message;p.layoutNodes=t,y()})),a.pass({layoutInfo:p,options:{animate:t.animate,refresh:t.refresh,componentSpacing:t.componentSpacing,nodeOverlap:t.nodeOverlap,nestingFactor:t.nestingFactor,gravity:t.gravity,numIter:t.numIter,initialTemp:t.initialTemp,coolingFactor:t.coolingFactor,minTemp:t.minTemp}}).run((function(t){var n=t.layoutInfo,r=t.options,i=!1,o=function(e,t,n){a(e,t),d(e,t),p(e,t),f(e,t),h(e,t)},a=function(e,t){for(var n=0;n<e.graphSet.length;n++)for(var r=e.graphSet[n],i=r.length,o=0;o<i;o++)for(var a=e.layoutNodes[e.idToIndex[r[o]]],s=o+1;s<i;s++){var u=e.layoutNodes[e.idToIndex[r[s]]];l(a,u,e,t)}},s=function(e){return-e+2*e*Math.random()},l=function(e,t,n,r){if(e.cmptId===t.cmptId||n.isCompound){var i=t.positionX-e.positionX,o=t.positionY-e.positionY,a=1;0===i&&0===o&&(i=s(a),o=s(a));var l=u(e,t,i,o);if(l>0)var d=(f=r.nodeOverlap*l)*i/(C=Math.sqrt(i*i+o*o)),p=f*o/C;else{var f,h=c(e,i,o),g=c(t,-1*i,-1*o),v=g.x-h.x,m=g.y-h.y,y=v*v+m*m,C=Math.sqrt(y);d=(f=(e.nodeRepulsion+t.nodeRepulsion)/y)*v/C,p=f*m/C}e.isLocked||(e.offsetX-=d,e.offsetY-=p),t.isLocked||(t.offsetX+=d,t.offsetY+=p)}},u=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var o=e.maxY-t.minY;else o=t.maxY-e.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},c=function(e,t,n){var r=e.positionX,i=e.positionY,o=e.height||1,a=e.width||1,s=n/t,l=o/a,u={};return 0===t&&0<n||0===t&&0>n?(u.x=r,u.y=i+o/2,u):0<t&&-1*l<=s&&s<=l?(u.x=r+a/2,u.y=i+a*n/2/t,u):0>t&&-1*l<=s&&s<=l?(u.x=r-a/2,u.y=i-a*n/2/t,u):0<n&&(s<=-1*l||s>=l)?(u.x=r+o*t/2/n,u.y=i+o/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-o*t/2/n,u.y=i-o/2,u):u},d=function(e,t){for(var n=0;n<e.edgeSize;n++){var r=e.layoutEdges[n],i=e.idToIndex[r.sourceId],o=e.layoutNodes[i],a=e.idToIndex[r.targetId],s=e.layoutNodes[a],l=s.positionX-o.positionX,u=s.positionY-o.positionY;if(0===l&&0===u)return;var d=c(o,l,u),p=c(s,-1*l,-1*u),f=p.x-d.x,h=p.y-d.y,g=Math.sqrt(f*f+h*h),v=Math.pow(r.idealLength-g,2)/r.elasticity;if(0!==g)var m=v*f/g,y=v*h/g;else m=0,y=0;o.isLocked||(o.offsetX+=m,o.offsetY+=y),s.isLocked||(s.offsetX-=m,s.offsetY-=y)}},p=function(e,t){for(var n=1,r=0;r<e.graphSet.length;r++){var i=e.graphSet[r],o=i.length;if(0===r)var a=e.clientHeight/2,s=e.clientWidth/2;else{var l=e.layoutNodes[e.idToIndex[i[0]]],u=e.layoutNodes[e.idToIndex[l.parentId]];a=u.positionX,s=u.positionY}for(var c=0;c<o;c++){var d=e.layoutNodes[e.idToIndex[i[c]]];if(!d.isLocked){var p=a-d.positionX,f=s-d.positionY,h=Math.sqrt(p*p+f*f);if(h>n){var g=t.gravity*p/h,v=t.gravity*f/h;d.offsetX+=g,d.offsetY+=v}}}}},f=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var o=n[r++],a=e.idToIndex[o],s=e.layoutNodes[a],l=s.children;if(0<l.length&&!s.isLocked){for(var u=s.offsetX,c=s.offsetY,d=0;d<l.length;d++){var p=e.layoutNodes[e.idToIndex[l[d]]];p.offsetX+=u,p.offsetY+=c,n[++i]=l[d]}s.offsetX=0,s.offsetY=0}}},h=function(e,t){for(var n=0;n<e.nodeSize;n++)0<(i=e.layoutNodes[n]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0);for(n=0;n<e.nodeSize;n++)if(!(0<(i=e.layoutNodes[n]).children.length||i.isLocked)){var r=g(i.offsetX,i.offsetY,e.temperature);i.positionX+=r.x,i.positionY+=r.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,v(i,e)}for(n=0;n<e.nodeSize;n++){var i;0<(i=e.layoutNodes[n]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)}},g=function(e,t,n){var r=Math.sqrt(e*e+t*t);if(r>n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},v=function(e,t){var n=e.parentId;if(null!=n){var r=t.layoutNodes[t.idToIndex[n]],i=!1;return(null==r.maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(null==r.minX||e.minX-r.padLeft<r.minX)&&(r.minX=e.minX-r.padLeft,i=!0),(null==r.maxY||e.maxY+r.padBottom>r.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(null==r.minY||e.minY-r.padTop<r.minY)&&(r.minY=e.minY-r.padTop,i=!0),i?v(r,t):void 0}},m=function(e,t){for(var r=n.layoutNodes,i=[],o=0;o<r.length;o++){var a=r[o],s=a.cmptId;(i[s]=i[s]||[]).push(a)}var l=0;for(o=0;o<i.length;o++)if(v=i[o]){v.x1=1/0,v.x2=-1/0,v.y1=1/0,v.y2=-1/0;for(var u=0;u<v.length;u++){var c=v[u];v.x1=Math.min(v.x1,c.positionX-c.width/2),v.x2=Math.max(v.x2,c.positionX+c.width/2),v.y1=Math.min(v.y1,c.positionY-c.height/2),v.y2=Math.max(v.y2,c.positionY+c.height/2)}v.w=v.x2-v.x1,v.h=v.y2-v.y1,l+=v.w*v.h}i.sort((function(e,t){return t.w*t.h-e.w*e.h}));var d=0,p=0,f=0,h=0,g=Math.sqrt(l)*n.clientWidth/n.clientHeight;for(o=0;o<i.length;o++){var v;if(v=i[o]){for(u=0;u<v.length;u++)(c=v[u]).isLocked||(c.positionX+=d,c.positionY+=p);d+=v.w+t.componentSpacing,f+=v.w+t.componentSpacing,h=Math.max(h,v.h),f>g&&(p+=h+t.componentSpacing,d=0,f=0,h=0)}}},y=function(e){return!(i||(o(n,r,e),n.temperature=n.temperature*r.coolingFactor,n.temperature<r.minTemp))},C=0;do{for(var b=0;b<r.refresh&&C<r.numIter;){var x;if(!(x=y(C)))break;b++,C++}r.animate&&e(n.layoutNodes)}while(x&&C+1<r.numIter);return m(n,r),n})).then((function(e){p.layoutNodes=e.layoutNodes,a.stop(),C()}));var C=function(){y({force:!0,next:function(){r.one("layoutstop",t.stop),r.trigger({type:"layoutstop",layout:r})}})};return this},r.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.trigger("layoutstop"),this},r.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var c=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:a.makeBoundingBox(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},l=n.eles.components(),u={},c=0;c<l.length;c++)for(var p=l[c],f=0;f<p.length;f++)u[p[f].id()]=c;for(c=0;c<o.nodeSize;c++){var h=(C=i[c]).layoutDimensions(n);(k={}).isLocked=C.locked(),k.id=C.data("id"),k.parentId=C.data("parent"),k.cmptId=u[C.id()],k.children=[],k.positionX=C.position("x"),k.positionY=C.position("y"),k.offsetX=0,k.offsetY=0,k.height=h.w,k.width=h.h,k.maxX=k.positionX+k.width/2,k.minX=k.positionX-k.width/2,k.maxY=k.positionY+k.height/2,k.minY=k.positionY-k.height/2,k.padLeft=parseFloat(C.style("padding")),k.padRight=parseFloat(C.style("padding")),k.padTop=parseFloat(C.style("padding")),k.padBottom=parseFloat(C.style("padding")),k.nodeRepulsion=s.fn(n.nodeRepulsion)?n.nodeRepulsion(C):n.nodeRepulsion,o.layoutNodes.push(k),o.idToIndex[k.id]=c}var g=[],v=0,m=-1,y=[];for(c=0;c<o.nodeSize;c++){var C,b=(C=o.layoutNodes[c]).parentId;null!=b?o.layoutNodes[o.idToIndex[b]].children.push(C.id):(g[++m]=C.id,y.push(C.id))}for(o.graphSet.push(y);v<=m;){var x=g[v++],S=o.idToIndex[x],E=o.layoutNodes[S].children;if(E.length>0)for(o.graphSet.push(E),c=0;c<E.length;c++)g[++m]=E[c]}for(c=0;c<o.graphSet.length;c++){var w=o.graphSet[c];for(f=0;f<w.length;f++){var O=o.idToIndex[w[f]];o.indexToGraph[O]=c}}for(c=0;c<o.edgeSize;c++){var _=r[c],L={};L.id=_.data("id"),L.sourceId=_.data("source"),L.targetId=_.data("target");var R=s.fn(n.idealEdgeLength)?n.idealEdgeLength(_):n.idealEdgeLength,D=s.fn(n.edgeElasticity)?n.edgeElasticity(_):n.edgeElasticity,N=o.idToIndex[L.sourceId],I=o.idToIndex[L.targetId];if(o.indexToGraph[N]!=o.indexToGraph[I]){for(var A=d(L.sourceId,L.targetId,o),M=o.graphSet[A],P=0,k=o.layoutNodes[N];-1===M.indexOf(k.id);)k=o.layoutNodes[o.idToIndex[k.parentId]],P++;for(k=o.layoutNodes[I];-1===M.indexOf(k.id);)k=o.layoutNodes[o.idToIndex[k.parentId]],P++;R*=P*n.nestingFactor}L.idealLength=R,L.elasticity=D,o.layoutEdges.push(L)}return o},d=function(e,t,n){var r=p(e,t,0,n);return 2>r.count?0:r.graph},p=function(e,t,n,r){var i=r.graphSet[n];if(-1<i.indexOf(e)&&-1<i.indexOf(t))return{count:2,graph:n};for(var o=0,a=0;a<i.length;a++){var s=i[a],l=r.idToIndex[s],u=r.layoutNodes[l].children;if(0!==u.length){var c=r.indexToGraph[r.idToIndex[u[0]]],d=p(e,t,c,r);if(0!==d.count){if(1!==d.count)return d;if(2==++o)break}}}return{count:o,graph:n}},f=function(e){if(i){console.debug("layoutNodes:");for(var t=0;t<e.nodeSize;t++){var n=e.layoutNodes[t],r="\nindex: "+t+"\nId: "+n.id+"\nChildren: "+n.children.toString()+"\nparentId: "+n.parentId+"\npositionX: "+n.positionX+"\npositionY: "+n.positionY+"\nOffsetX: "+n.offsetX+"\nOffsetY: "+n.offsetY+"\npadLeft: "+n.padLeft+"\npadRight: "+n.padRight+"\npadTop: "+n.padTop+"\npadBottom: "+n.padBottom;console.debug(r)}for(var t in console.debug("idToIndex"),e.idToIndex)console.debug("Id: "+t+"\nIndex: "+e.idToIndex[t]);console.debug("Graph Set");var o=e.graphSet;for(t=0;t<o.length;t++)console.debug("Set : "+t+": "+o[t].toString());for(r="IndexToGraph",t=0;t<e.indexToGraph.length;t++)r+="\nIndex : "+t+" Graph: "+e.indexToGraph[t];for(console.debug(r),r="Layout Edges",t=0;t<e.layoutEdges.length;t++){var a=e.layoutEdges[t];r+="\nEdge Index: "+t+" ID: "+a.id+" SouceID: "+a.sourceId+" TargetId: "+a.targetId+" Ideal Length: "+a.idealLength}console.debug(r),r="nodeSize: "+e.nodeSize,r+="\nedgeSize: "+e.edgeSize,r+="\ntemperature: "+e.temperature,console.debug(r)}},h=function(e,t){for(var n=e.clientWidth,r=e.clientHeight,i=0;i<e.nodeSize;i++){var o=e.layoutNodes[i];0!==o.children.length||o.isLocked||(o.positionX=Math.random()*n,o.positionY=Math.random()*r)}},g=function(e,t,n){var r=n.layout,i=n.eles.nodes(),o=e.boundingBox,a={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};n.boundingBox&&(i.forEach((function(t){var n=e.layoutNodes[e.idToIndex[t.data("id")]];a.x1=Math.min(a.x1,n.positionX),a.x2=Math.max(a.x2,n.positionX),a.y1=Math.min(a.y1,n.positionY),a.y2=Math.max(a.y2,n.positionY)})),a.w=a.x2-a.x1,a.h=a.y2-a.y1),i.positions((function(t,r){var i=e.layoutNodes[e.idToIndex[t.data("id")]];if(n.boundingBox){var s=(i.positionX-a.x1)/a.w,l=(i.positionY-a.y1)/a.h;return{x:o.x1+s*o.w,y:o.y1+l*o.h}}return{x:i.positionX,y:i.positionY}})),!0!==e.ready&&(e.ready=!0,r.one("layoutready",n.ready),r.trigger({type:"layoutready",layout:this}))};t.exports=r},{"../../is":91,"../../math":93,"../../promise":94,"../../util":108}],52:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles.nodes().not(":parent");t.sort&&(r=r.sort(t.sort));var i=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.layoutPositions(this,t,(function(e){return{x:i.x1,y:i.y1}}));else{var a=r.size(),s=Math.sqrt(a*i.h/i.w),l=Math.round(s),u=Math.round(i.w/i.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},d=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},p=t.rows,f=null!=t.cols?t.cols:t.columns;if(null!=p&&null!=f)l=p,u=f;else if(null!=p&&null==f)l=p,u=Math.ceil(a/l);else if(null==p&&null!=f)u=f,l=Math.ceil(a/u);else if(u*l>a)((g=c())-1)*(h=d())>=a?c(g-1):(h-1)*g>=a&&d(h-1);else for(;u*l<a;){var h,g=c();((h=d())+1)*g>=a?d(h+1):c(g+1)}var v=i.w/u,m=i.h/l;if(t.condense&&(v=0,m=0),t.avoidOverlap)for(var y=0;y<r.length;y++){null!=(A=(N=r[y])._private.position).x&&null!=A.y||(A.x=0,A.y=0);var C=N.layoutDimensions(t),b=t.avoidOverlapPadding,x=C.w+b,S=C.h+b;v=Math.max(v,x),m=Math.max(m,S)}var E={},w=function(e,t){return!!E["c-"+e+"-"+t]},O=function(e,t){E["c-"+e+"-"+t]=!0},_=0,L=0,R=function(){++L>=u&&(L=0,_++)},D={};for(y=0;y<r.length;y++){var N=r[y],I=t.position(N);if(I&&(void 0!==I.row||void 0!==I.col)){var A;if(void 0===(A={row:I.row,col:I.col}).col)for(A.col=0;w(A.row,A.col);)A.col++;else if(void 0===A.row)for(A.row=0;w(A.row,A.col);)A.row++;D[N.id()]=A,O(A.row,A.col)}}var M=function(e,t){var n,r;if(e.locked()||e.isParent())return!1;var o=D[e.id()];if(o)n=o.col*v+v/2+i.x1,r=o.row*m+m/2+i.y1;else{for(;w(_,L);)R();n=L*v+v/2+i.x1,r=_*m+m/2+i.y1,O(_,L),R()}return{x:n,y:r}};r.layoutPositions(this,t,M)}return this},t.exports=r},{"../../math":93,"../../util":108}],53:[function(e,t,n){"use strict";t.exports=[{name:"breadthfirst",impl:e("./breadthfirst")},{name:"circle",impl:e("./circle")},{name:"concentric",impl:e("./concentric")},{name:"cose",impl:e("./cose")},{name:"grid",impl:e("./grid")},{name:"null",impl:e("./null")},{name:"preset",impl:e("./preset")},{name:"random",impl:e("./random")}]},{"./breadthfirst":48,"./circle":49,"./concentric":50,"./cose":51,"./grid":52,"./null":54,"./preset":55,"./random":56}],54:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},o,e)}var i=e("../../util"),o={ready:function(){},stop:function(){}};r.prototype.run=function(){var e=this.options,t=e.eles,n=this;return e.cy,n.trigger("layoutstart"),t.nodes().positions((function(){return{x:0,y:0}})),n.one("layoutready",e.ready),n.trigger("layoutready"),n.one("layoutstop",e.stop),n.trigger("layoutstop"),this},r.prototype.stop=function(){return this},t.exports=r},{"../../util":108}],55:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../is"),a={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){function e(e){if(null==t.positions)return null;if(r)return t.positions(e);var n=t.positions[e._private.data.id];return null==n?null:n}var t=this.options,n=t.eles.nodes(),r=o.fn(t.positions);return n.layoutPositions(this,t,(function(t,n){var r=e(t);return!t.locked()&&null!=r&&r})),this},t.exports=r},{"../../is":91,"../../util":108}],56:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles.nodes().not(":parent"),r=o.makeBoundingBox(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),i=function(e,t){return{x:r.x1+Math.round(Math.random()*r.w),y:r.y1+Math.round(Math.random()*r.h)}};return n.layoutPositions(this,e,i),this},t.exports=r},{"../../math":93,"../../util":108}],57:[function(e,t,n){"use strict";var r=e("../../../math"),i=e("../../../is"),o=e("../../../util"),a={arrowShapeWidth:.3,registerArrowShapes:function(){var e=this.arrowShapes={},t=this,n=function(e,t,n,r,i,o){var a=i.x-n/2-o,s=i.x+n/2+o,l=i.y-n/2-o,u=i.y+n/2+o;return a<=e&&e<=s&&l<=t&&t<=u},a=function(e,t,n,r,i){var o=e*Math.cos(r)-t*Math.sin(r),a=(e*Math.sin(r)+t*Math.cos(r))*n;return{x:o*n+i.x,y:a+i.y}},s=function(e,t,n,r){for(var i=[],o=0;o<e.length;o+=2){var s=e[o],l=e[o+1];i.push(a(s,l,t,n,r))}return i},l=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r.x,r.y)}return t},u=function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").pfValue*2},c=function(a,c){i.string(c)&&(c=e[c]),e[a]=o.extend({name:a,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(e,t,n,i,o,a){var u=l(s(this.points,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,u)},roughCollide:n,draw:function(e,n,r,i){var o=s(this.points,n,r,i);t.arrowShapeImpl("polygon")(e,o)},spacing:function(e){return 0},gap:u},c)};c("none",{collide:o.falsify,roughCollide:o.falsify,draw:o.noop,spacing:o.zeroify,gap:o.zeroify}),c("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),c("arrow","triangle"),c("triangle-backcurve",{points:e.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:function(e,n,r,i){var o=s(this.points,n,r,i),l=this.controlPoint,u=a(l[0],l[1],n,r,i);t.arrowShapeImpl(this.name)(e,o,u)},gap:function(e){return.985*u(e)}}),c("triangle-tee",{points:[-.15,-.3,0,0,.15,-.3,-.15,-.3],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(e,t,n,i,o,a){var u=l(s(this.points,n+2*a,i,o)),c=l(s(this.pointsTee,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,u)||r.pointInsidePolygonPoints(e,t,c)},draw:function(e,n,r,i){var o=s(this.points,n,r,i),a=s(this.pointsTee,n,r,i);t.arrowShapeImpl(this.name)(e,o,a)}}),c("triangle-cross",{points:[-.15,-.3,0,0,.15,-.3,-.15,-.3],crossLinePoints:[-.24175,-.4,.24175,-.4],forceStroke:!0,matchEdgeWidth:!0,scaleCoord:function(e,t,n){return e+.012*n+.001*r.log2(t-28.95)},scaleCrossLineXCoord:function(e,t){return this.scaleCoord(.42,e,t)},scaleCrossLineYCoord:function(e,t){return this.scaleCoord(-.01,e,t)},collide:function(e,t,n,i,o,a){var u=l(s(this.points,n+2*a,i,o)),c=l(s(this.crossLinePoints,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,u)||r.inLineVicinity(e,t,c[0],c[1],c[2],c[3],a)},draw:function(e,n,r,i,o){var a=[this.crossLinePoints[0]+this.scaleCrossLineXCoord(n,o),this.crossLinePoints[1]-this.scaleCrossLineYCoord(n,o),this.crossLinePoints[2]-this.scaleCrossLineXCoord(n,o),this.crossLinePoints[3]-this.scaleCrossLineYCoord(n,o)],l=s(this.points,n,r,i),u=s(a,n,r,i);t.arrowShapeImpl(this.name)(e,l,u)}}),c("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(e){return.985*u(e)}}),c("circle",{radius:.15,collide:function(e,t,n,r,i,o){var a=i;return Math.pow(a.x-e,2)+Math.pow(a.y-t,2)<=Math.pow((n+2*o)*this.radius,2)},draw:function(e,n,r,i){t.arrowShapeImpl(this.name)(e,i.x,i.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius}}),c("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(e){return 1},gap:function(e){return 1}}),c("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),c("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}})}};t.exports=a},{"../../../is":91,"../../../math":93,"../../../util":108}],58:[function(e,t,n){"use strict";var r=e("../../../../window"),i=e("../../../../math"),o=e("../../../../util"),a=(r=e("../../../../window"),{projectIntoViewport:function(e,t){var n=this.cy,r=this.findContainerClientCoords(),i=r[0],o=r[1],a=n.pan(),s=n.zoom();return[(e-i-a.x)/s,(t-o-a.y)/s]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var e=this.container,t=e.getBoundingClientRect(),n=r.getComputedStyle(e),i=function(e){return parseFloat(n.getPropertyValue(e))},o={left:i("padding-left")+i("border-left-width"),right:i("padding-right")+i("border-right-width"),top:i("padding-top")+i("border-top-width"),bottom:i("padding-bottom")+i("border-bottom-width")};return this.containerBB=[t.left+o.left,t.top+o.top,t.right-t.left-o.left-o.right,t.bottom-t.top-o.top-o.bottom]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,n,r){return this.findNearestElements(e,t,n,r)[0]},findNearestElements:function(e,t,n,r){function a(e,t){if(e.isNode()){if(p)return;p=e,v.push(e)}if(e.isEdge()&&(null==t||t<S))if(d){if(d.pstyle("z-index").value===e.pstyle("z-index").value)for(var n=0;n<v.length;n++)if(v[n].isEdge()){v[n]=e,d=e,S=null!=t?t:S;break}}else v.push(e),d=e,S=null!=t?t:S}function s(n){var r=n.outerWidth()+2*b,i=n.outerHeight()+2*b,o=r/2,s=i/2,l=n.position();if(l.x-o<=e&&e<=l.x+o&&l.y-s<=t&&t<=l.y+s&&h.nodeShapes[f.getNodeShape(n)].checkPoint(e,t,0,r,i,l.x,l.y))return a(n,0),!0}function l(n){var r,o=n._private,l=o.rscratch,u=n.pstyle("width").pfValue,c=n.pstyle("arrow-scale").value,d=u/2+C,p=d*d,g=2*d,m=o.source,b=o.target;if("segments"===l.edgeType||"straight"===l.edgeType||"haystack"===l.edgeType){for(var x=l.allpts,S=0;S+3<x.length;S+=2)if(i.inLineVicinity(e,t,x[S],x[S+1],x[S+2],x[S+3],g)&&p>(r=i.sqdistToFiniteLine(e,t,x[S],x[S+1],x[S+2],x[S+3])))return a(n,r),!0}else if("bezier"===l.edgeType||"multibezier"===l.edgeType||"self"===l.edgeType||"compound"===l.edgeType)for(x=l.allpts,S=0;S+5<l.allpts.length;S+=4)if(i.inBezierVicinity(e,t,x[S],x[S+1],x[S+2],x[S+3],x[S+4],x[S+5],g)&&p>(r=i.sqdistToQuadraticBezier(e,t,x[S],x[S+1],x[S+2],x[S+3],x[S+4],x[S+5])))return a(n,r),!0;m=m||o.source,b=b||o.target;var E=f.getArrowWidth(u,c),w=[{name:"source",x:l.arrowStartX,y:l.arrowStartY,angle:l.srcArrowAngle},{name:"target",x:l.arrowEndX,y:l.arrowEndY,angle:l.tgtArrowAngle},{name:"mid-source",x:l.midX,y:l.midY,angle:l.midsrcArrowAngle},{name:"mid-target",x:l.midX,y:l.midY,angle:l.midtgtArrowAngle}];for(S=0;S<w.length;S++){var O=w[S],_=h.arrowShapes[n.pstyle(O.name+"-arrow-shape").value];if(_.roughCollide(e,t,E,O.angle,{x:O.x,y:O.y},C)&&_.collide(e,t,E,O.angle,{x:O.x,y:O.y},C))return a(n),!0}y&&v.length>0&&(s(m),s(b))}function u(e,t,n){return o.getPrefixedProperty(e,t,n)}function c(n,r){var o,s=n._private,l=x;o=r?r+"-":"";var c=n.pstyle(o+"label").value;if("yes"===n.pstyle("text-events").strValue&&c){var d=s.rstyle,p=n.pstyle("text-border-width").pfValue,f=n.pstyle("text-background-padding").pfValue,h=u(d,"labelWidth",r)+p+2*l+2*f,g=u(d,"labelHeight",r)+p+2*l+2*f,v=u(d,"labelX",r),m=u(d,"labelY",r),y=u(s.rscratch,"labelAngle",r),C=v-h/2,b=v+h/2,S=m-g/2,E=m+g/2;if(y){var w=Math.cos(y),O=Math.sin(y),_=function(e,t){return{x:(e-=v)*w-(t-=m)*O+v,y:e*O+t*w+m}},L=_(C,S),R=_(C,E),D=_(b,S),N=_(b,E),I=[L.x,L.y,D.x,D.y,N.x,N.y,R.x,R.y];if(i.pointInsidePolygonPoints(e,t,I))return a(n),!0}else{var A={w:h,h:g,x1:C,x2:b,y1:S,y2:E};if(i.inBoundingBox(A,e,t))return a(n),!0}}}var d,p,f=this,h=this,g=h.getCachedZSortedEles(),v=[],m=h.cy.zoom(),y=h.cy.hasCompoundNodes(),C=(r?24:8)/m,b=(r?8:2)/m,x=(r?8:2)/m,S=1/0;n&&(g=g.interactive);for(var E=g.length-1;E>=0;E--){var w=g[E];w.isNode()?s(w)||c(w):l(w)||c(w)||c(w,"source")||c(w,"target")}return v},getAllInBox:function(e,t,n,r){var o=this.getCachedZSortedEles().interactive,a=[],s=Math.min(e,n),l=Math.max(e,n),u=Math.min(t,r),c=Math.max(t,r);e=s,n=l,t=u,r=c;for(var d=i.makeBoundingBox({x1:e,y1:t,x2:n,y2:r}),p=0;p<o.length;p++){var f=o[p];if(f.isNode()){var h=f,g=h.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});i.boundingBoxesIntersect(d,g)&&!i.boundingBoxInBoundingBox(g,d)&&a.push(h)}else{var v=f,m=v._private,y=m.rscratch;if(null!=y.startX&&null!=y.startY&&!i.inBoundingBox(d,y.startX,y.startY))continue;if(null!=y.endX&&null!=y.endY&&!i.inBoundingBox(d,y.endX,y.endY))continue;if("bezier"===y.edgeType||"multibezier"===y.edgeType||"self"===y.edgeType||"compound"===y.edgeType||"segments"===y.edgeType||"haystack"===y.edgeType){for(var C=m.rstyle.bezierPts||m.rstyle.linePts||m.rstyle.haystackPts,b=!0,x=0;x<C.length;x++)if(!i.pointInBoundingBox(d,C[x])){b=!1;break}b&&a.push(v)}else"haystack"!==y.edgeType&&"straight"!==y.edgeType||a.push(v)}}return a}});t.exports=a},{"../../../../math":93,"../../../../util":108,"../../../../window":116}],59:[function(e,t,n){"use strict";var r=e("../../../../math"),i={calculateArrowAngles:function(e){var t,n,i,o,a,s,l=e._private.rscratch,u="haystack"===l.edgeType,c="bezier"===l.edgeType,d="multibezier"===l.edgeType,p="segments"===l.edgeType,f="compound"===l.edgeType,h="self"===l.edgeType;if(u?(i=l.haystackPts[0],o=l.haystackPts[1],a=l.haystackPts[2],s=l.haystackPts[3]):(i=l.arrowStartX,o=l.arrowStartY,a=l.arrowEndX,s=l.arrowEndY),v=l.midX,m=l.midY,p)t=i-l.segpts[0],n=o-l.segpts[1];else if(d||f||h||c){var g=l.allpts;t=i-r.qbezierAt(g[0],g[2],g[4],.1),n=o-r.qbezierAt(g[1],g[3],g[5],.1)}else t=i-v,n=o-m;l.srcArrowAngle=r.getAngleFromDisp(t,n);var v=l.midX,m=l.midY;if(u&&(v=(i+a)/2,m=(o+s)/2),t=a-i,n=s-o,p)if((g=l.allpts).length/2%2==0){var y=(C=g.length/2)-2;t=g[C]-g[y],n=g[C+1]-g[y+1]}else{y=(C=g.length/2-1)-2;var C,b=C+2;t=g[C]-g[y],n=g[C+1]-g[y+1]}else if(d||f||h){var x,S,E,w,g=l.allpts;if(l.ctrlpts.length/2%2==0){var O=2+(_=2+(L=g.length/2-1));x=r.qbezierAt(g[L],g[_],g[O],0),S=r.qbezierAt(g[L+1],g[_+1],g[O+1],0),E=r.qbezierAt(g[L],g[_],g[O],1e-4),w=r.qbezierAt(g[L+1],g[_+1],g[O+1],1e-4)}else{var _,L=(_=g.length/2-1)-2;O=_+2,x=r.qbezierAt(g[L],g[_],g[O],.4999),S=r.qbezierAt(g[L+1],g[_+1],g[O+1],.4999),E=r.qbezierAt(g[L],g[_],g[O],.5),w=r.qbezierAt(g[L+1],g[_+1],g[O+1],.5)}t=E-x,n=w-S}if(l.midtgtArrowAngle=r.getAngleFromDisp(t,n),l.midDispX=t,l.midDispY=n,t*=-1,n*=-1,p&&((g=l.allpts).length/2%2==0||(t=-(g[b=2+(C=g.length/2-1)]-g[C]),n=-(g[b+1]-g[C+1]))),l.midsrcArrowAngle=r.getAngleFromDisp(t,n),p)t=a-l.segpts[l.segpts.length-2],n=s-l.segpts[l.segpts.length-1];else if(d||f||h||c){var R=(g=l.allpts).length;t=a-r.qbezierAt(g[R-6],g[R-4],g[R-2],.9),n=s-r.qbezierAt(g[R-5],g[R-3],g[R-1],.9)}else t=a-v,n=s-m;l.tgtArrowAngle=r.getAngleFromDisp(t,n)}};i.getArrowWidth=i.getArrowHeight=function(e,t){var n=this.arrowWidthCache=this.arrowWidthCache||{},r=n[e+", "+t];return r||(r=Math.max(Math.pow(13.37*e,.9),29)*t,n[e+", "+t]=r,r)},t.exports=i},{"../../../../math":93}],60:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o={findEdgeControlPoints:function(e){if(e&&0!==e.length){for(var t,n=this,o=n.cy.hasCompoundNodes(),a={},s=[],l=[],u=0;u<e.length;u++){var c=(St=(xt=e[u])._private).data,d="unbundled-bezier"===(I=xt.pstyle("curve-style").value)||"segments"===I;if("none"!==xt.pstyle("display").value)if("haystack"!==I){var p=c.source,f=c.target;t=p>f?f+"$-$"+p:p+"$-$"+f,d&&(t="unbundled$-$"+c.id),null==a[t]&&(a[t]=[],s.push(t)),a[t].push(xt),d&&(a[t].hasUnbundled=!0)}else l.push(xt)}for(var h,g,v,m,y=0;y<s.length;y++){var C=a[t=s[y]];if(C.sort((function(e,t){return e.poolIndex()-t.poolIndex()})),_t=C[0]._private.source,Lt=C[0]._private.target,!C.hasUnbundled&&_t.id()>Lt.id()){var b=_t;_t=Lt,Lt=b}_t._private,Lt._private,Rt=_t.position(),Dt=Lt.position(),Nt=_t.outerWidth(),At=_t.outerHeight(),It=Lt.outerWidth(),Mt=Lt.outerHeight(),h=n.nodeShapes[this.getNodeShape(_t)],g=n.nodeShapes[this.getNodeShape(Lt)],m=!1;var x={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0},S=Rt.x,E=Rt.y,w=Nt,O=At,_=Dt.x,L=Dt.y,R=It,D=Mt,N=C.length;for(u=0;u<C.length;u++){var I,A=(wt=(xt=C[u])._private.rscratch).lastEdgeIndex,M=u,P=wt.lastNumEdges,k=(d="unbundled-bezier"===(I=xt.pstyle("curve-style").value)||"segments"===I,xt.pstyle("control-point-distances")),T=xt.pstyle("loop-direction").pfValue,V=xt.pstyle("loop-sweep").pfValue,B=xt.pstyle("control-point-weights"),z=k&&B?Math.min(k.value.length,B.value.length):1,j=xt.pstyle("control-point-step-size").pfValue,F=k?k.pfValue[0]:void 0,G=B.value[0],U=xt.pstyle("edge-distances").value,q=xt.pstyle("segment-weights"),W=xt.pstyle("segment-distances"),$=Math.min(q.pfValue.length,W.pfValue.length),H=wt.lastSrcCtlPtX,X=wt.lastSrcCtlPtY,Y=wt.lastSrcCtlPtW,K=wt.lastSrcCtlPtH,Z=wt.lastTgtCtlPtX,Q=wt.lastTgtCtlPtY,J=wt.lastTgtCtlPtW,ee=wt.lastTgtCtlPtH,te=wt.lastCurveStyle,ne=I,re=wt.lastCtrlptDists,ie=k?k.strValue:null,oe=wt.lastCtrlptWs,ae=B.strValue,se=wt.lastSegmentWs,le=q.strValue,ue=wt.lastSegmentDs,ce=W.strValue,de=wt.lastStepSize,pe=j,fe=wt.lastLoopDir,he=T,ge=wt.lastLoopSwp,ve=V,me=wt.lastEdgeDistances,ye=U;if(wt.badBezier=!!m,H!==S||X!==E||Y!==w||K!==O||Z!==_||Q!==L||J!==R||ee!==D||te!==ne||re!==ie||oe!==ae||se!==le||ue!==ce||de!==pe||fe!==he||ge!==ve||me!==ye||!(A===M&&P===N||d)){if(wt.lastSrcCtlPtX=S,wt.lastSrcCtlPtY=E,wt.lastSrcCtlPtW=w,wt.lastSrcCtlPtH=O,wt.lastTgtCtlPtX=_,wt.lastTgtCtlPtY=L,wt.lastTgtCtlPtW=R,wt.lastTgtCtlPtH=D,wt.lastEdgeIndex=M,wt.lastNumEdges=N,wt.lastCurveStyle=ne,wt.lastCtrlptDists=ie,wt.lastCtrlptWs=ae,wt.lastSegmentDs=ce,wt.lastSegmentWs=le,wt.lastStepSize=pe,wt.lastLoopDir=he,wt.lastLoopSwp=ve,wt.lastEdgeDistances=ye,!C.calculatedIntersection&&(C.length>1&&_t!==Lt||C.hasUnbundled)){C.calculatedIntersection=!0;var Ce=h.intersectLine(Rt.x,Rt.y,Nt,At,Dt.x,Dt.y,0),be=g.intersectLine(Dt.x,Dt.y,It,Mt,Rt.x,Rt.y,0),xe={x1:Ce[0],x2:be[0],y1:Ce[1],y2:be[1]},Se={x1:Rt.x,x2:Dt.x,y1:Rt.y,y2:Dt.y},Ee=be[1]-Ce[1],we=be[0]-Ce[0],Oe=Math.sqrt(we*we+Ee*Ee),_e={x:we,y:Ee},Le={x:_e.x/Oe,y:_e.y/Oe};v={x:-Le.y,y:Le.x},g.checkPoint(Ce[0],Ce[1],0,It,Mt,Dt.x,Dt.y)&&h.checkPoint(be[0],be[1],0,Nt,At,Rt.x,Rt.y)&&(v={},m=!0)}if(wt.srcIntn=Ce,wt.tgtIntn=be,_t===Lt){wt.edgeType="self";var Re=u,De=j;d&&(Re=0,De=F);var Ne=T-Math.PI/2,Ie=Ne-V/2,Ae=Ne+V/2,Me=String(T+"_"+V);Re=void 0===x[Me]?x[Me]=0:++x[Me],wt.ctrlpts=[Rt.x+1.4*Math.cos(Ie)*De*(Re/3+1),Rt.y+1.4*Math.sin(Ie)*De*(Re/3+1),Rt.x+1.4*Math.cos(Ae)*De*(Re/3+1),Rt.y+1.4*Math.sin(Ae)*De*(Re/3+1)]}else if(o&&(_t.isParent()||_t.isChild()||Lt.isParent()||Lt.isChild())&&(_t.parents().anySame(Lt)||Lt.parents().anySame(_t))){wt.edgeType="compound",wt.badBezier=!1,Re=u,De=j,d&&(Re=0,De=F);var Pe=50,ke={x:Rt.x-Nt/2,y:Rt.y-At/2},Te={x:Dt.x-It/2,y:Dt.y-Mt/2},Ve={x:Math.min(ke.x,Te.x),y:Math.min(ke.y,Te.y)},Be=.5,ze=Math.max(Be,Math.log(.01*Nt)),je=Math.max(Be,Math.log(.01*It));wt.ctrlpts=[Ve.x,Ve.y-(1+Math.pow(Pe,1.12)/100)*De*(Re/3+1)*ze,Ve.x-(1+Math.pow(Pe,1.12)/100)*De*(Re/3+1)*je,Ve.y]}else if("segments"===I){wt.edgeType="segments",wt.segpts=[];for(var Fe=0;Fe<$;Fe++){var Ge=q.pfValue[Fe],Ue=W.pfValue[Fe],qe=1-Ge,We=Ge,$e={x:(Qe="node-position"===U?Se:xe).x1*qe+Qe.x2*We,y:Qe.y1*qe+Qe.y2*We};wt.segpts.push($e.x+v.x*Ue,$e.y+v.y*Ue)}}else if(C.length%2!=1||u!==Math.floor(C.length/2)||d){var He=d;wt.edgeType=He?"multibezier":"bezier",wt.ctrlpts=[];for(var Xe=0;Xe<z;Xe++){var Ye,Ke=(.5-C.length/2+u)*j,Ze=r.signum(Ke);He&&(F=k?k.pfValue[Xe]:j,G=B.value[Xe]);var Qe,Je=void 0!==(Ye=d?F:void 0!==F?Ze*F:void 0)?Ye:Ke;qe=1-G,We=G,$e={x:(Qe="node-position"===U?Se:xe).x1*qe+Qe.x2*We,y:Qe.y1*qe+Qe.y2*We},wt.ctrlpts.push($e.x+v.x*Je,$e.y+v.y*Je)}}else wt.edgeType="straight";this.findEndpoints(xt);var et=!i.number(wt.startX)||!i.number(wt.startY),tt=!i.number(wt.arrowStartX)||!i.number(wt.arrowStartY),nt=!i.number(wt.endX)||!i.number(wt.endY),rt=!i.number(wt.arrowEndX)||!i.number(wt.arrowEndY),it=this.getArrowWidth(xt.pstyle("width").pfValue,xt.pstyle("arrow-scale").value)*this.arrowShapeWidth*3;if("bezier"===wt.edgeType){var ot=r.dist({x:wt.ctrlpts[0],y:wt.ctrlpts[1]},{x:wt.startX,y:wt.startY}),at=ot<it,st=r.dist({x:wt.ctrlpts[0],y:wt.ctrlpts[1]},{x:wt.endX,y:wt.endY}),lt=st<it,ut=!1;if(et||tt||at){ut=!0;var ct={x:wt.ctrlpts[0]-Rt.x,y:wt.ctrlpts[1]-Rt.y},dt=Math.sqrt(ct.x*ct.x+ct.y*ct.y),pt={x:ct.x/dt,y:ct.y/dt},ft=Math.max(Nt,At),ht={x:wt.ctrlpts[0]+2*pt.x*ft,y:wt.ctrlpts[1]+2*pt.y*ft},gt=h.intersectLine(Rt.x,Rt.y,Nt,At,ht.x,ht.y,0);at?(wt.ctrlpts[0]=wt.ctrlpts[0]+pt.x*(it-ot),wt.ctrlpts[1]=wt.ctrlpts[1]+pt.y*(it-ot)):(wt.ctrlpts[0]=gt[0]+pt.x*it,wt.ctrlpts[1]=gt[1]+pt.y*it)}if(nt||rt||lt){ut=!0,ct={x:wt.ctrlpts[0]-Dt.x,y:wt.ctrlpts[1]-Dt.y},dt=Math.sqrt(ct.x*ct.x+ct.y*ct.y),pt={x:ct.x/dt,y:ct.y/dt},ft=Math.max(Nt,At),ht={x:wt.ctrlpts[0]+2*pt.x*ft,y:wt.ctrlpts[1]+2*pt.y*ft};var vt=g.intersectLine(Dt.x,Dt.y,It,Mt,ht.x,ht.y,0);lt?(wt.ctrlpts[0]=wt.ctrlpts[0]+pt.x*(it-st),wt.ctrlpts[1]=wt.ctrlpts[1]+pt.y*(it-st)):(wt.ctrlpts[0]=vt[0]+pt.x*it,wt.ctrlpts[1]=vt[1]+pt.y*it)}ut&&this.findEndpoints(xt)}if("multibezier"===wt.edgeType||"bezier"===wt.edgeType||"self"===wt.edgeType||"compound"===wt.edgeType){for(wt.allpts=[],wt.allpts.push(wt.startX,wt.startY),Xe=0;Xe+1<wt.ctrlpts.length;Xe+=2)wt.allpts.push(wt.ctrlpts[Xe],wt.ctrlpts[Xe+1]),Xe+3<wt.ctrlpts.length&&wt.allpts.push((wt.ctrlpts[Xe]+wt.ctrlpts[Xe+2])/2,(wt.ctrlpts[Xe+1]+wt.ctrlpts[Xe+3])/2);var mt,yt;wt.allpts.push(wt.endX,wt.endY),wt.ctrlpts.length/2%2==0?(mt=wt.allpts.length/2-1,wt.midX=wt.allpts[mt],wt.midY=wt.allpts[mt+1]):(mt=wt.allpts.length/2-3,yt=.5,wt.midX=r.qbezierAt(wt.allpts[mt],wt.allpts[mt+2],wt.allpts[mt+4],yt),wt.midY=r.qbezierAt(wt.allpts[mt+1],wt.allpts[mt+3],wt.allpts[mt+5],yt))}else if("straight"===wt.edgeType)wt.allpts=[wt.startX,wt.startY,wt.endX,wt.endY],wt.midX=(wt.startX+wt.endX+wt.arrowStartX+wt.arrowEndX)/4,wt.midY=(wt.startY+wt.endY+wt.arrowStartY+wt.arrowEndY)/4;else if("segments"===wt.edgeType)if(wt.allpts=[],wt.allpts.push(wt.startX,wt.startY),wt.allpts.push.apply(wt.allpts,wt.segpts),wt.allpts.push(wt.endX,wt.endY),wt.segpts.length%4==0){var Ct=wt.segpts.length/2,bt=Ct-2;wt.midX=(wt.segpts[bt]+wt.segpts[Ct])/2,wt.midY=(wt.segpts[bt+1]+wt.segpts[Ct+1])/2}else bt=wt.segpts.length/2-1,wt.midX=wt.segpts[bt],wt.midY=wt.segpts[bt+1];this.storeEdgeProjections(xt),this.calculateArrowAngles(xt),this.recalculateEdgeLabelProjections(xt),this.calculateLabelAngles(xt)}}}for(u=0;u<l.length;u++){var xt,St,Et=(St=(xt=l[u])._private).rscratch,wt=Et;if(!Et.haystack){var Ot=2*Math.random()*Math.PI;Et.source={x:Math.cos(Ot),y:Math.sin(Ot)},Ot=2*Math.random()*Math.PI,Et.target={x:Math.cos(Ot),y:Math.sin(Ot)}}var _t=St.source,Lt=St.target,Rt=_t.position(),Dt=Lt.position(),Nt=_t.width(),It=Lt.width(),At=_t.height(),Mt=Lt.height(),Pt=(ft=xt.pstyle("haystack-radius").value)/2;wt.haystackPts=wt.allpts=[wt.source.x*Nt*Pt+Rt.x,wt.source.y*At*Pt+Rt.y,wt.target.x*It*Pt+Dt.x,wt.target.y*Mt*Pt+Dt.y],wt.midX=(wt.allpts[0]+wt.allpts[2])/2,wt.midY=(wt.allpts[1]+wt.allpts[3])/2,Et.edgeType="haystack",Et.haystack=!0,this.storeEdgeProjections(xt),this.calculateArrowAngles(xt),this.recalculateEdgeLabelProjections(xt),this.calculateLabelAngles(xt)}}}};t.exports=o},{"../../../../is":91,"../../../../math":93}],61:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o={manualEndptToPx:function(e,t){var n=this,r=e.position(),i=e.outerWidth(),o=e.outerHeight();if(2===t.value.length){var a=[t.pfValue[0],t.pfValue[1]];return"%"===t.units[0]&&(a[0]=a[0]*i),"%"===t.units[1]&&(a[1]=a[1]*o),a[0]+=r.x,a[1]+=r.y,a}var s=t.pfValue[0];s=-Math.PI/2+s;var l=2*Math.max(i,o);return a=[r.x+Math.cos(s)*l,r.y+Math.sin(s)*l],n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x,r.y,i,o,a[0],a[1],0)},findEndpoints:function(e){var t,n,o,a,s,l=this,u=e.source()[0],c=e.target()[0],d=u.position(),p=c.position(),f=e.pstyle("target-arrow-shape").value,h=e.pstyle("source-arrow-shape").value,g=e.pstyle("target-distance-from-node").pfValue,v=e.pstyle("source-distance-from-node").pfValue,m=e._private.rscratch,y=m.edgeType,C="bezier"===y||"multibezier"===y||"self"===y||"compound"===y,b="bezier"!==y,x="straight"===y||"segments"===y,S="segments"===y,E=C||b||x,w=e.pstyle("source-endpoint"),O=e.pstyle("target-endpoint");if(m.srcManEndpt=w,m.tgtManEndpt=O,C){var _=[m.ctrlpts[0],m.ctrlpts[1]];n=b?[m.ctrlpts[m.ctrlpts.length-2],m.ctrlpts[m.ctrlpts.length-1]]:_,o=_}else if(x){var L=S?m.segpts.slice(0,2):[p.x,p.y];n=S?m.segpts.slice(m.segpts.length-2):[d.x,d.y],o=L}"inside-to-node"===O.value?t=[p.x,p.y]:O.units?t=this.manualEndptToPx(c,O):"outside-to-line"===O.value?t=m.tgtIntn:("outside-to-node"===O.value?a=n:"outside-to-line"===O.value&&(a=[d.x,d.y]),t=l.nodeShapes[this.getNodeShape(c)].intersectLine(p.x,p.y,c.outerWidth(),c.outerHeight(),a[0],a[1],0));var R=r.shortenIntersection(t,n,l.arrowShapes[f].spacing(e)+g),D=r.shortenIntersection(t,n,l.arrowShapes[f].gap(e)+g);m.endX=D[0],m.endY=D[1],m.arrowEndX=R[0],m.arrowEndY=R[1],"inside-to-node"===w.value?t=[d.x,d.y]:w.units?t=this.manualEndptToPx(u,w):"outside-to-line"===w.value?t=m.srcIntn:("outside-to-node"===w.value?s=o:"outside-to-line"===w.value&&(s=[p.x,p.y]),t=l.nodeShapes[this.getNodeShape(u)].intersectLine(d.x,d.y,u.outerWidth(),u.outerHeight(),s[0],s[1],0));var N=r.shortenIntersection(t,o,l.arrowShapes[h].spacing(e)+v),I=r.shortenIntersection(t,o,l.arrowShapes[h].gap(e)+v);m.startX=I[0],m.startY=I[1],m.arrowStartX=N[0],m.arrowStartY=N[1],E&&(i.number(m.startX)&&i.number(m.startY)&&i.number(m.endX)&&i.number(m.endY)?m.badLine=!1:m.badLine=!0)}};t.exports=o},{"../../../../is":91,"../../../../math":93}],62:[function(e,t,n){"use strict";function r(e,t,n){for(var r=function(e,t,n,r){return i.qbezierAt(e,t,n,r)},o=t._private.rstyle.bezierPts,a=0;a<e.bezierProjPcts.length;a++){var s=e.bezierProjPcts[a];o.push({x:r(n[0],n[2],n[4],s),y:r(n[1],n[3],n[5],s)})}}var i=e("../../../../math"),o={storeEdgeProjections:function(e){var t=e._private,n=t.rscratch,i=n.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===i||"bezier"===i||"self"===i||"compound"===i)for(var o=(t.rstyle.bezierPts=[],0);o+5<n.allpts.length;o+=4)r(this,e,n.allpts.slice(o,o+6));else if("segments"===i){var a=t.rstyle.linePts=[];for(o=0;o+1<n.allpts.length;o+=2)a.push({x:n.allpts[o],y:n.allpts[o+1]})}else if("haystack"===i){var s=n.haystackPts;t.rstyle.haystackPts=[{x:s[0],y:s[1]},{x:s[2],y:s[3]}]}t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},recalculateEdgeProjections:function(e){this.findEdgeControlPoints(e)}};t.exports=o},{"../../../../math":93}],63:[function(e,t,n){"use strict";var r=e("../../../../util"),i={};[e("./coords"),e("./edge-arrows"),e("./edge-control-points"),e("./edge-endpoints"),e("./edge-projection"),e("./labels"),e("./nodes"),e("./rendered-style"),e("./z-ordering")].forEach((function(e){r.extend(i,e)})),t.exports=i},{"../../../../util":108,"./coords":58,"./edge-arrows":59,"./edge-control-points":60,"./edge-endpoints":61,"./edge-projection":62,"./labels":64,"./nodes":65,"./rendered-style":66,"./z-ordering":67}],64:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o=e("../../../../util"),a={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!i.emptyString(t)){var n,r,o=e._private,a=e.width(),s=e.height(),l=e.padding(),u=e.position(),c=e.pstyle("text-halign").strValue,d=e.pstyle("text-valign").strValue,p=o.rscratch,f=o.rstyle;switch(c){case"left":n=u.x-a/2-l;break;case"right":n=u.x+a/2+l;break;default:n=u.x}switch(d){case"top":r=u.y-s/2-l;break;case"bottom":r=u.y+s/2+l;break;default:r=u.y}p.labelX=n,p.labelY=r,f.labelX=n,f.labelY=r,this.applyLabelDimensions(e)}},recalculateEdgeLabelProjections:function(e){var t,n=e._private,i=n.rscratch,a=this,s={mid:e.pstyle("label").strValue,source:e.pstyle("source-label").strValue,target:e.pstyle("target-label").strValue};if(s.mid||s.source||s.target){t={x:i.midX,y:i.midY};var l=function(e,t,r){o.setPrefixedProperty(n.rscratch,e,t,r),o.setPrefixedProperty(n.rstyle,e,t,r)};l("labelX",null,t.x),l("labelY",null,t.y);var u=function(){function e(e,t,n,i,o){var a=r.dist(t,n),s=e.segments[e.segments.length-1],l={p0:t,p1:n,t0:i,t1:o,startDist:s?s.startDist+s.length:0,length:a};e.segments.push(l),e.length+=a}if(u.cache)return u.cache;for(var t=[],o=0;o+5<i.allpts.length;o+=4){var s={x:i.allpts[o],y:i.allpts[o+1]},l={x:i.allpts[o+2],y:i.allpts[o+3]},c={x:i.allpts[o+4],y:i.allpts[o+5]};t.push({p0:s,p1:l,p2:c,startDist:0,length:0,segments:[]})}var d=n.rstyle.bezierPts,p=a.bezierProjPcts.length;for(o=0;o<t.length;o++){var f=t[o],h=t[o-1];h&&(f.startDist=h.startDist+h.length),e(f,f.p0,d[o*p],0,a.bezierProjPcts[0]);for(var g=0;g<p-1;g++)e(f,d[o*p+g],d[o*p+g+1],a.bezierProjPcts[g],a.bezierProjPcts[g+1]);e(f,d[o*p+p-1],f.p2,a.bezierProjPcts[p-1],1)}return u.cache=t},c=function(n){var o,a="source"===n;if(s[n]){var c=e.pstyle(n+"-text-offset").pfValue,d=function(e,t){var n=t.x-e.x,r=t.y-e.y;return Math.atan(r/n)},p=function(e,t,n,i){var o=r.bound(0,i-.001,1),a=r.bound(0,i+.001,1),s=r.qbezierPtAt(e,t,n,o),l=r.qbezierPtAt(e,t,n,a);return d(s,l)};switch(i.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var f,h=u(),g=0,v=0,m=0;m<h.length;m++){for(var y=h[a?m:h.length-1-m],C=0;C<y.segments.length;C++){var b=y.segments[a?C:y.segments.length-1-C],x=m===h.length-1&&C===y.segments.length-1;if(g=v,(v+=b.length)>=c||x){f={cp:y,segment:b};break}}if(f)break}y=f.cp;var S=(c-g)/(b=f.segment).length,E=b.t1-b.t0,w=a?b.t0+E*S:b.t1-E*S;w=r.bound(0,w,1),t=r.qbezierPtAt(y.p0,y.p1,y.p2,w),o=p(y.p0,y.p1,y.p2,w,t);break;case"straight":case"segments":case"haystack":var O,_,L,R,D=0,N=i.allpts.length;for(m=0;m+3<N&&(a?(L={x:i.allpts[m],y:i.allpts[m+1]},R={x:i.allpts[m+2],y:i.allpts[m+3]}):(L={x:i.allpts[N-2-m],y:i.allpts[N-1-m]},R={x:i.allpts[N-4-m],y:i.allpts[N-3-m]}),_=D,!((D+=O=r.dist(L,R))>=c));m+=2);w=(c-_)/O,w=r.bound(0,w,1),t=r.lineAt(L,R,w),o=d(L,R)}l("labelX",n,t.x),l("labelY",n,t.y),l("labelAutoAngle",n,o)}};c("source"),c("target"),this.applyLabelDimensions(e)}},applyLabelDimensions:function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},applyPrefixedLabelDimensions:function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r);o.setPrefixedProperty(n.rstyle,"labelWidth",t,i.width),o.setPrefixedProperty(n.rscratch,"labelWidth",t,i.width),o.setPrefixedProperty(n.rstyle,"labelHeight",t,i.height),o.setPrefixedProperty(n.rscratch,"labelHeight",t,i.height)},getLabelText:function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,a=e.pstyle("text-transform").value,s=function(e,r){return r?(o.setPrefixedProperty(n.rscratch,e,t,r),r):o.getPrefixedProperty(n.rscratch,e,t)};"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var l=e.pstyle("text-wrap").value;if("wrap"===l){var u=s("labelKey");if(u&&s("labelWrapKey")===u)return s("labelWrapCachedText");for(var c=i.split("\n"),d=e.pstyle("text-max-width").pfValue,p=[],f=0;f<c.length;f++){var h=c[f];if(this.calculateLabelDimensions(e,h,"line="+h).width>d){for(var g=h.split(/\s+/),v="",m=0;m<g.length;m++){var y=g[m],C=0===v.length?y:v+" "+y;this.calculateLabelDimensions(e,C,"testLine="+C).width<=d?v+=y+" ":(p.push(v),v=y+" ")}v.match(/^\s+$/)||p.push(v)}else p.push(h)}s("labelWrapCachedLines",p),i=s("labelWrapCachedText",p.join("\n")),s("labelWrapKey",u)}else if("ellipsis"===l){d=e.pstyle("text-max-width").pfValue;for(var b="",x="…",S=!1,E=0;E<i.length&&!(this.calculateLabelDimensions(e,b+i[E]+x).width>d);E++)b+=i[E],E===i.length-1&&(S=!0);return S||(b+=x),b}return i},calculateLabelDimensions:function(e,t,n){var r=this,i=e._private.labelStyleKey+"$@$"+t;n&&(i+="$@$"+n);var o=r.labelDimCache||(r.labelDimCache={});if(o[i])return o[i];var a=1,s=e.pstyle("font-style").strValue,l=a*e.pstyle("font-size").pfValue+"px",u=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,d=this.labelCalcDiv;d||(d=this.labelCalcDiv=document.createElement("div"),document.body.appendChild(d));var p=d.style;return p.fontFamily=u,p.fontStyle=s,p.fontSize=l,p.fontWeight=c,p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none",p.padding="0",p.lineHeight="1","wrap"===e.pstyle("text-wrap").value?p.whiteSpace="pre":p.whiteSpace="normal",d.textContent=t,o[i]={width:Math.ceil(d.clientWidth/a),height:Math.ceil(d.clientHeight/a)},o[i]},calculateLabelAngles:function(e){var t=e._private.rscratch,n=e.isEdge(),r=e.pstyle("text-rotation"),i=r.strValue;"none"===i?t.labelAngle=t.sourceLabelAngle=t.targetLabelAngle=0:n&&"autorotate"===i?(t.labelAngle=Math.atan(t.midDispY/t.midDispX),t.sourceLabelAngle=t.sourceLabelAutoAngle,t.targetLabelAngle=t.targetLabelAutoAngle):t.labelAngle=t.sourceLabelAngle=t.targetLabelAngle="autorotate"===i?0:r.pfValue}};t.exports=a},{"../../../../is":91,"../../../../math":93,"../../../../util":108}],65:[function(e,t,n){"use strict";var r={getNodeShape:function(e){var t=this,n=e.pstyle("shape").value;if(e.isParent())return"rectangle"===n||"roundrectangle"===n||"cutrectangle"===n?n:"rectangle";if("polygon"===n){var r=e.pstyle("shape-polygon-points").value;return t.nodeShapes.makePolygon(r).name}return n}};t.exports=r},{}],66:[function(e,t,n){"use strict";var r={registerCalculationListeners:function(){var e=this.cy,t=e.collection(),n=this,r=function(e,n,r){if(t.merge(e),!0===r||void 0===r)for(var i=0;i<e.length;i++){var o=e[i]._private,a=o.rstyle;a.clean=!1,o.bbCache=null;var s=a.dirtyEvents=a.dirtyEvents||{length:0};s[n.type]||(s[n.type]=!0,s.length++)}};n.binder(e).on("position.* style.* free.* bounds.*","node",(function(e){var t=e.target;r(t,e),r(t.connectedEdges(),e)})).on("add.*","node",(function(e){var t=e.target;r(t,e)})).on("background.*","node",(function(e){var t=e.target;r(t,e,!1)})).on("add.* style.*","edge",(function(e){var t=e.target;r(t,e),r(t.parallelEdges(),e)})).on("remove.*","edge",(function(e){for(var t=e.target.parallelEdges(),n=0;n<t.length;n++){var i=t[n];i.removed()||r(i,e)}})).on("dirty.*","node",(function(e){var t=e.target;r(t,e)}));var i=function(r){if(r){var i=n.onUpdateEleCalcsFns;if(i)for(var o=0;o<i.length;o++)(0,i[o])(r,t);for(n.recalculateRenderedStyle(t,!1),o=0;o<t.length;o++)t[o]._private.rstyle.dirtyEvents=null;t=e.collection()}};n.beforeRender(i,n.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},recalculateRenderedStyle:function(e,t){var n=[],r=[];if(!this.destroyed){void 0===t&&(t=!0);for(var i=0;i<e.length;i++){var o=(l=(s=e[i])._private).rstyle;t&&o.clean||s.removed()||"none"!==s.pstyle("display").value&&("nodes"===l.group?r.push(s):n.push(s),o.clean=!0)}for(i=0;i<r.length;i++){o=(l=(s=r[i])._private).rstyle;var a=s.position();this.recalculateNodeLabelProjection(s),o.nodeX=a.x,o.nodeY=a.y,o.nodeW=s.pstyle("width").pfValue,o.nodeH=s.pstyle("height").pfValue}for(this.recalculateEdgeProjections(n),i=0;i<n.length;i++){o=(l=(s=n[i])._private).rstyle;var s,l,u=l.rscratch;this.recalculateEdgeLabelProjections(s),o.srcX=u.arrowStartX,o.srcY=u.arrowStartY,o.tgtX=u.arrowEndX,o.tgtY=u.arrowEndY,o.midX=u.midX,o.midY=u.midY,o.labelAngle=u.labelAngle,o.sourceLabelAngle=u.sourceLabelAngle,o.targetLabelAngle=u.targetLabelAngle}}}};t.exports=r},{}],67:[function(e,t,n){"use strict";var r=e("../../../../collection/zsort"),i={updateCachedGrabbedEles:function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],n=0;n<e.length;n++){var r=(i=e[n])._private.rscratch;i.grabbed()&&!i.isParent()?t.push(i):r.inDragLayer?e.drag.push(i):e.nondrag.push(i)}for(n=0;n<t.length;n++){var i=t[n];e.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){if(e||!this.cachedZSortedEles){var t=this.cy.mutableElements().toArray();t.sort(r),t.interactive=t.filter((function(e){return e.interactive()})),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()}else t=this.cachedZSortedEles;return t}};t.exports=i},{"../../../../collection/zsort":32}],68:[function(e,t,n){"use strict";var r={getCachedImage:function(e,t,n){var r=this,i=r.imageCache=r.imageCache||{},o=i[e];if(o)return o.image.complete||o.image.addEventListener("load",n),o.image;var a=(o=i[e]=i[e]||{}).image=new Image;a.addEventListener("load",n);var s="data:";return e.substring(0,s.length).toLowerCase()===s||(a.crossOrigin=t),a.src=e,a}};t.exports=r},{}],69:[function(e,t,n){"use strict";var r=e("../../../is"),i=e("../../../util"),o=e("../../../window"),a=function(e){this.init(e)},s=a,l=s.prototype;l.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],l.init=function(e){var t=this;t.options=e,t.cy=e.cy;var n=t.container=e.cy.container();if(o){var r=o.document,a=r.head,s="__________cytoscape_stylesheet",l="__________cytoscape_container",u=null!=r.getElementById(s);if(n.className=(n.className||"")+" "+l,!u){var c=r.createElement("style");c.id=s,c.innerHTML="."+l+" { position: relative; }",a.insertBefore(c,a.children[0])}"static"===o.getComputedStyle(n).getPropertyValue("position")&&i.error("A Cytoscape container has style position:static and so can not use UI extensions properly")}t.selection=[void 0,void 0,void 0,void 0,0],t.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],t.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},t.dragData={possibleDragElements:[]},t.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},t.redraws=0,t.showFps=e.showFps,t.debug=e.debug,t.hideEdgesOnViewport=e.hideEdgesOnViewport,t.hideLabelsOnViewport=e.hideLabelsOnViewport,t.textureOnViewport=e.textureOnViewport,t.wheelSensitivity=e.wheelSensitivity,t.motionBlurEnabled=e.motionBlur,t.forcedPixelRatio=e.pixelRatio,t.motionBlur=e.motionBlur,t.motionBlurOpacity=e.motionBlurOpacity,t.motionBlurTransparency=1-t.motionBlurOpacity,t.motionBlurPxRatio=1,t.mbPxRBlurry=1,t.minMbLowQualFrames=4,t.fullQualityMb=!1,t.clearedForMotionBlur=[],t.desktopTapThreshold=e.desktopTapThreshold,t.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,t.touchTapThreshold=e.touchTapThreshold,t.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,t.tapholdDuration=500,t.bindings=[],t.beforeRenderCallbacks=[],t.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:100},t.registerNodeShapes(),t.registerArrowShapes(),t.registerCalculationListeners(),t.load()},l.notify=function(e){var t,n=this;if(!this.destroyed){t=r.array(e.type)?e.type:[e.type];for(var i={},o=0;o<t.length;o++)i[t[o]]=!0;if(i.destroy)return void n.destroy();(i.add||i.remove||i.load||i.zorder)&&n.invalidateCachedZSortedEles(),i.viewport&&n.redrawHint("select",!0),(i.load||i.resize)&&(n.invalidateContainerClientCoordsCache(),n.matchCanvasSize(n.container)),n.redrawHint("eles",!0),n.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},l.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var n=e.bindings[t],r=n.target;(r.off||r.removeEventListener).apply(r,n.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch(e){}},[e("./arrow-shapes"),e("./coord-ele-math"),e("./images"),e("./load-listeners"),e("./node-shapes"),e("./redraw")].forEach((function(e){i.extend(l,e)})),t.exports=s},{"../../../is":91,"../../../util":108,"../../../window":116,"./arrow-shapes":57,"./coord-ele-math":63,"./images":68,"./load-listeners":70,"./node-shapes":71,"./redraw":72}],70:[function(e,t,n){"use strict";var r=e("../../../is"),i=e("../../../util"),o=e("../../../math"),a=e("../../../event"),s={registerBinding:function(e,t,n,r){var i=Array.prototype.slice.apply(arguments,[1]),o=this.binder(e);return o.on.apply(o,i)},binder:function(e){var t=this,n=e===window||e===document||e===document.body||r.domElement(e);if(null==t.supportsPassiveEvents){var i=!1;try{var o=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("test",null,o)}catch(e){}t.supportsPassiveEvents=i}var a=function(r,i,o){var a=Array.prototype.slice.call(arguments);return n&&t.supportsPassiveEvents&&(a[2]={capture:null!=o&&o,passive:!1,once:!1}),t.bindings.push({target:e,args:a}),(e.addEventListener||e.on).apply(e,a),this};return{on:a,addEventListener:a,addListener:a,bind:a}},nodeIsDraggable:function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},nodeIsGrabbable:function(e){return this.nodeIsDraggable(e)&&e.interactive()},load:function(){var e=this,t=function(t,n,r,o){null==t&&(t=e.cy);for(var s=0;s<n.length;s++){var l=n[s],u=new a(r,i.extend({type:l},o));t.trigger(u)}},n=function(e){return e.shiftKey||e.metaKey||e.ctrlKey},s=function(t,n){var r=!0;if(e.cy.hasCompoundNodes()&&t&&t.isEdge()){for(var i=0;n&&i<n.length;i++)if((t=n[i]).isNode()&&t.isParent()){r=!1;break}}else r=!0;return r},l=function(t){var n;if(t.addToList&&e.cy.hasCompoundNodes()){if(!t.addToList.hasId){t.addToList.hasId={};for(var r=0;r<t.addToList.length;r++){var i=t.addToList[r];t.addToList.hasId[i.id()]=!0}}n=t.addToList.hasId}return n||{}},u=function(e){e[0]._private.grabbed=!0},c=function(e){e[0]._private.grabbed=!1},d=function(e){e[0]._private.rscratch.inDragLayer=!0},p=function(e){e[0]._private.rscratch.inDragLayer=!1},f=function(e){e[0]._private.rscratch.isGrabTarget=!0},h=function(e){e[0]._private.rscratch.isGrabTarget=!1},g=function(e,t){var n=l(t);n[e.id()]||(t.addToList.push(e),n[e.id()]=!0,u(e))},v=function(e,t){if(e.cy().hasCompoundNodes()&&(null!=t.inDragLayer||null!=t.addToList)){var n=e.descendants();t.inDragLayer&&(n.forEach(d),n.connectedEdges().forEach(d)),t.addToList&&n.forEach((function(e){g(e,t)}))}},m=function(t,n){n=n||{};var r=t.cy().hasCompoundNodes();n.inDragLayer&&(t.forEach(d),t.neighborhood().stdFilter((function(e){return!r||e.isEdge()})).forEach(d)),n.addToList&&t.forEach((function(e){g(e,n)})),v(t,n),b(t,{inDragLayer:n.inDragLayer}),e.updateCachedGrabbedEles()},y=m,C=function(t){t&&(t.hasId={},e.getCachedZSortedEles().forEach((function(e){c(e),p(e),h(e)})),e.updateCachedGrabbedEles())},b=function(e,t){if((null!=t.inDragLayer||null!=t.addToList)&&e.cy().hasCompoundNodes()){var n=e.ancestors().orphans();if(!n.same(e)){var r=n.descendants().spawnSelf().merge(n).unmerge(e).unmerge(e.descendants()),i=r.connectedEdges();t.inDragLayer&&(i.forEach(d),r.forEach(d)),t.addToList&&r.forEach((function(e){g(e,t)}))}}},x="undefined"!=typeof MutationObserver;x?(e.removeObserver=new MutationObserver((function(t){for(var n=0;n<t.length;n++){var r=t[n].removedNodes;if(r)for(var i=0;i<r.length;i++)if(r[i]===e.container){e.destroy();break}}})),e.container.parentNode&&e.removeObserver.observe(e.container.parentNode,{childList:!0})):e.registerBinding(e.container,"DOMNodeRemoved",(function(t){e.destroy()}));var S=i.debounce((function(){e.cy.resize()}),100);x&&(e.styleObserver=new MutationObserver(S),e.styleObserver.observe(e.container,{attributes:!0})),e.registerBinding(window,"resize",S);for(var E=function(t){e.registerBinding(t,"scroll",(function(t){e.invalidateContainerClientCoordsCache()}))},w=e.cy.container();E(w),w.parentNode;)w=w.parentNode;e.registerBinding(e.container,"contextmenu",(function(e){e.preventDefault()}));var O=function(){return 0!==e.selection[4]},_=function(t){for(var n=e.findContainerClientCoords(),r=n[0],i=n[1],o=n[2],a=n[3],s=t.touches?t.touches:[t],l=!1,u=0;u<s.length;u++){var c=s[u];if(r<=c.clientX&&c.clientX<=r+o&&i<=c.clientY&&c.clientY<=i+a){l=!0;break}}if(!l)return!1;for(var d=e.container,p=t.target.parentNode,f=!1;p;){if(p===d){f=!0;break}p=p.parentNode}return!!f};e.registerBinding(e.container,"mousedown",(function(n){if(_(n)){n.preventDefault(),e.hoverData.capture=!0,e.hoverData.which=n.which;var r=e.cy,i=[n.clientX,n.clientY],o=e.projectIntoViewport(i[0],i[1]),s=e.selection,l=e.findNearestElements(o[0],o[1],!0,!1),u=l[0],c=e.dragData.possibleDragElements;e.hoverData.mdownPos=o,e.hoverData.mdownGPos=i;var d=function(){e.hoverData.tapholdCancelled=!1,clearTimeout(e.hoverData.tapholdTimeout),e.hoverData.tapholdTimeout=setTimeout((function(){if(!e.hoverData.tapholdCancelled){var t=e.hoverData.down;t?t.trigger(new a(n,{type:"taphold",position:{x:o[0],y:o[1]}})):r.trigger(new a(n,{type:"taphold",position:{x:o[0],y:o[1]}}))}}),e.tapholdDuration)};if(3==n.which){e.hoverData.cxtStarted=!0;var p=new a(n,{type:"cxttapstart",position:{x:o[0],y:o[1]}});u?(u.activate(),u.trigger(p),e.hoverData.down=u):r.trigger(p),e.hoverData.downTime=(new Date).getTime(),e.hoverData.cxtDragged=!1}else if(1==n.which){if(u&&u.activate(),null!=u&&e.nodeIsGrabbable(u)){var h=function(e){return new a(n,{type:e,position:{x:o[0],y:o[1]}})},g=function(e){e.trigger(h("grab"))};if(f(u),u.selected()){c=e.dragData.possibleDragElements=[];var v=r.$((function(t){return t.isNode()&&t.selected()&&e.nodeIsGrabbable(t)}));m(v,{addToList:c}),u.trigger(h("grabon")),v.forEach(g)}else c=e.dragData.possibleDragElements=[],y(u,{addToList:c}),u.trigger(h("grabon")).trigger(h("grab"));e.redrawHint("eles",!0),e.redrawHint("drag",!0)}e.hoverData.down=u,e.hoverData.downs=l,e.hoverData.downTime=(new Date).getTime(),t(u,["mousedown","tapstart","vmousedown"],n,{position:{x:o[0],y:o[1]}}),null==u?(s[4]=1,e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()):u.isEdge()&&(s[4]=1),d()}s[0]=s[2]=o[0],s[1]=s[3]=o[1]}}),!1),e.registerBinding(window,"mousemove",(function(i){if(e.hoverData.capture||_(i)){var l=!1,u=e.cy,c=u.zoom(),d=[i.clientX,i.clientY],p=e.projectIntoViewport(d[0],d[1]),f=e.hoverData.mdownPos,h=e.hoverData.mdownGPos,g=e.selection,v=null;e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.selecting||(v=e.findNearestElement(p[0],p[1],!0,!1));var y,b=e.hoverData.last,x=e.hoverData.down,S=[p[0]-g[2],p[1]-g[3]],E=e.dragData.possibleDragElements;if(h){var w=d[0]-h[0],O=w*w,L=d[1]-h[1],R=O+L*L;e.hoverData.isOverThresholdDrag=y=R>=e.desktopTapThreshold2}var D=n(i);y&&(e.hoverData.tapholdCancelled=!0);var N=function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(S[0]),t.push(S[1])):(t[0]+=S[0],t[1]+=S[1])};l=!0,t(v,["mousemove","vmousemove","tapdrag"],i,{position:{x:p[0],y:p[1]}});var I=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||u.trigger("boxstart"),g[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(y){var A=new a(i,{type:"cxtdrag",position:{x:p[0],y:p[1]}});x?x.trigger(A):u.trigger(A),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&v===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.trigger(new a(i,{type:"cxtdragout",position:{x:p[0],y:p[1]}})),e.hoverData.cxtOver=v,v&&v.trigger(new a(i,{type:"cxtdragover",position:{x:p[0],y:p[1]}})))}}else if(e.hoverData.dragging){if(l=!0,u.panningEnabled()&&u.userPanningEnabled()){var M;if(e.hoverData.justStartedPan){var P=e.hoverData.mdownPos;M={x:(p[0]-P[0])*c,y:(p[1]-P[1])*c},e.hoverData.justStartedPan=!1}else M={x:S[0]*c,y:S[1]*c};u.panBy(M),e.hoverData.dragged=!0}p=e.projectIntoViewport(i.clientX,i.clientY)}else if(1!=g[4]||null!=x&&!x.isEdge()){if(x&&x.isEdge()&&x.active()&&x.unactivate(),x&&x.grabbed()||v==b||(b&&t(b,["mouseout","tapdragout"],i,{position:{x:p[0],y:p[1]}}),v&&t(v,["mouseover","tapdragover"],i,{position:{x:p[0],y:p[1]}}),e.hoverData.last=v),x&&e.nodeIsDraggable(x))if(y)if(u.boxSelectionEnabled()&&D)x&&x.grabbed()&&(C(E),x.trigger("free")),I();else{var k=!e.dragData.didDrag;k&&e.redrawHint("eles",!0),e.dragData.didDrag=!0;var T=[];e.hoverData.draggingEles||m(u.collection(E),{inDragLayer:!0});for(var V=0;V<E.length;V++){var B=E[V];if(e.nodeIsDraggable(B)&&B.grabbed()){var z=B.position();if(T.push(B),r.number(S[0])&&r.number(S[1])){var j=!B.isParent();if(j&&(z.x+=S[0],z.y+=S[1]),k){var F=e.hoverData.dragDelta;j&&F&&r.number(F[0])&&r.number(F[1])&&(z.x+=F[0],z.y+=F[1])}}}}e.hoverData.draggingEles=!0;var G=u.collection(T);G.dirtyCompoundBoundsCache(),G.trigger("position drag"),e.redrawHint("drag",!0),e.redraw()}else N();l=!0}else y&&(e.hoverData.dragging||!u.boxSelectionEnabled()||!D&&u.panningEnabled()&&u.userPanningEnabled()?!e.hoverData.selecting&&u.panningEnabled()&&u.userPanningEnabled()&&s(x,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,g[4]=0,e.data.bgActivePosistion=o.array2point(f),e.redrawHint("select",!0),e.redraw()):I(),x&&x.isEdge()&&x.active()&&x.unactivate());return g[2]=p[0],g[3]=p[1],l?(i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),!1):void 0}}),!1),e.registerBinding(window,"mouseup",(function(r){if(e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,o=e.projectIntoViewport(r.clientX,r.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,d=n(r);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var p=new a(r,{type:"cxttapend",position:{x:o[0],y:o[1]}});if(c?c.trigger(p):i.trigger(p),!e.hoverData.cxtDragged){var f=new a(r,{type:"cxttap",position:{x:o[0],y:o[1]}});c?c.trigger(f):i.trigger(f)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||n(r)||(i.$((function(e){return e.selected()})).unselect(),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=[]),t(l,["mouseup","tapend","vmouseup"],r,{position:{x:o[0],y:o[1]}}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||t(c,["click","tap","vclick"],r,{position:{x:o[0],y:o[1]}}),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||d?l.selected()?l.unselect():l.select():d||(i.$(":selected").unmerge(l).unselect(),l.select())),e.redrawHint("eles",!0)),e.hoverData.selecting){var h=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),h.length>0&&e.redrawHint("eles",!0),i.trigger("boxend");var g=function(e){return e.selectable()&&!e.selected()};"additive"===i.selectionType()||d||i.$(":selected").unmerge(h).unselect(),h.trigger("box").stdFilter(g).select().trigger("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var v=c&&c.grabbed();C(u),v&&c.trigger("free")}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var L=function(t){if(!e.scrollingPage){var n,r=e.cy,i=e.projectIntoViewport(t.clientX,t.clientY),o=[i[0]*r.zoom()+r.pan().x,i[1]*r.zoom()+r.pan().y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||O())return void t.preventDefault();r.panningEnabled()&&r.userPanningEnabled()&&r.zoomingEnabled()&&r.userZoomingEnabled()&&(t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),n=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,n*=e.wheelSensitivity,1===t.deltaMode&&(n*=33),r.zoom({level:r.zoom()*Math.pow(10,n),renderedPosition:{x:o[0],y:o[1]}}))}};e.registerBinding(e.container,"wheel",L,!0),e.registerBinding(window,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.trigger(new a(t,{type:"mouseout",position:{x:n[0],y:n[1]}}))}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.trigger(new a(t,{type:"mouseover",position:{x:n[0],y:n[1]}}))}),!1);var R,D,N,I,A,M,P,k,T,V,B,z,j,F,G,U,q,W=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},$=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",F=function(n){if(_(n)){e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var r=e.cy,i=e.touchData.now,o=e.touchData.earlier;if(n.touches[0]){var s=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);i[0]=s[0],i[1]=s[1]}if(n.touches[1]&&(s=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),i[2]=s[0],i[3]=s[1]),n.touches[2]&&(s=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),i[4]=s[0],i[5]=s[1]),n.touches[1]){C(e.dragData.touchDragEles);var l=e.findContainerClientCoords();T=l[0],V=l[1],B=l[2],z=l[3],R=n.touches[0].clientX-T,D=n.touches[0].clientY-V,N=n.touches[1].clientX-T,I=n.touches[1].clientY-V,j=0<=R&&R<=B&&0<=N&&N<=B&&0<=D&&D<=z&&0<=I&&I<=z;var u=r.pan(),c=r.zoom();A=W(R,D,N,I),M=$(R,D,N,I),k=[((P=[(R+N)/2,(D+I)/2])[0]-u.x)/c,(P[1]-u.y)/c];var d=200;if(M<d*d&&!n.touches[2]){var p=e.findNearestElement(i[0],i[1],!0,!0),h=e.findNearestElement(i[2],i[3],!0,!0);return p&&p.isNode()?(p.activate().trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start=p):h&&h.isNode()?(h.activate().trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start=h):r.trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(n.touches[2]);else if(n.touches[1]);else if(n.touches[0]){var g=e.findNearestElements(i[0],i[1],!0,!0),v=g[0];if(null!=v&&(v.activate(),e.touchData.start=v,e.touchData.starts=g,e.nodeIsGrabbable(v))){var b=e.dragData.touchDragEles=[],x=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),v.selected()?(x=r.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),m(x,{addToList:b})):y(v,{addToList:b}),f(v);var S=function(e){return new a(n,{type:e,position:{x:i[0],y:i[1]}})};v.trigger(S("grabon")),x?x.forEach((function(e){e.trigger(S("grab"))})):v.trigger(S("grab"))}t(v,["touchstart","tapstart","vmousedown"],n,{position:{x:i[0],y:i[1]}}),null==v&&(e.data.bgActivePosistion={x:s[0],y:s[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||(t(e.touchData.start,["taphold"],n,{position:{x:i[0],y:i[1]}}),e.touchData.start||r.$(":selected").unselect())}),e.tapholdDuration)}if(n.touches.length>=1){for(var E=e.touchData.startPosition=[],w=0;w<i.length;w++)E[w]=o[w]=i[w];var O=n.touches[0];e.touchData.startGPosition=[O.clientX,O.clientY]}}},!1),e.registerBinding(window,"touchmove",G=function(n){var i=e.touchData.capture;if(i||_(n)){var l=e.selection,u=e.cy,c=e.touchData.now,d=e.touchData.earlier,p=u.zoom();if(n.touches[0]){var f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);c[0]=f[0],c[1]=f[1]}n.touches[1]&&(f=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),c[2]=f[0],c[3]=f[1]),n.touches[2]&&(f=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),c[4]=f[0],c[5]=f[1]);var h,g=e.touchData.startGPosition;if(i&&n.touches[0]&&g){for(var v=[],y=0;y<c.length;y++)v[y]=c[y]-d[y];var b=n.touches[0].clientX-g[0],x=b*b,S=n.touches[0].clientY-g[1];h=x+S*S>=e.touchTapThreshold2}if(i&&e.touchData.cxt){n.preventDefault();var E=n.touches[0].clientX-T,w=n.touches[0].clientY-V,O=n.touches[1].clientX-T,L=n.touches[1].clientY-V,P=$(E,w,O,L),B=150,z=1.5;if(P/M>=z*z||P>=B*B){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var F=new a(n,{type:"cxttapend",position:{x:c[0],y:c[1]}});e.touchData.start?(e.touchData.start.unactivate().trigger(F),e.touchData.start=null):u.trigger(F)}}if(i&&e.touchData.cxt){F=new a(n,{type:"cxtdrag",position:{x:c[0],y:c[1]}}),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.trigger(F):u.trigger(F),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var G=e.findNearestElement(c[0],c[1],!0,!0);e.touchData.cxtOver&&G===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.trigger(new a(n,{type:"cxtdragout",position:{x:c[0],y:c[1]}})),e.touchData.cxtOver=G,G&&G.trigger(new a(n,{type:"cxtdragover",position:{x:c[0],y:c[1]}})))}else if(i&&n.touches[2]&&u.boxSelectionEnabled())n.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||u.trigger("boxstart"),e.touchData.selecting=!0,e.redrawHint("select",!0),l&&0!==l.length&&void 0!==l[0]?(l[2]=(c[0]+c[2]+c[4])/3,l[3]=(c[1]+c[3]+c[5])/3):(l[0]=(c[0]+c[2]+c[4])/3,l[1]=(c[1]+c[3]+c[5])/3,l[2]=(c[0]+c[2]+c[4])/3+1,l[3]=(c[1]+c[3]+c[5])/3+1),l[4]=1,e.touchData.selecting=!0,e.redraw();else if(i&&n.touches[1]&&u.zoomingEnabled()&&u.panningEnabled()&&u.userZoomingEnabled()&&u.userPanningEnabled()){if(n.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),re=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var U=0;U<re.length;U++){var q=re[U]._private;q.grabbed=!1,q.rscratch.inDragLayer=!1}}E=n.touches[0].clientX-T,w=n.touches[0].clientY-V,O=n.touches[1].clientX-T,L=n.touches[1].clientY-V;var H=W(E,w,O,L),X=H/A;if(j){var Y=(E-R+(O-N))/2,K=(w-D+(L-I))/2,Z=u.zoom(),Q=Z*X,J=u.pan(),ee=k[0]*Z+J.x,te=k[1]*Z+J.y,ne={x:-Q/Z*(ee-J.x-Y)+ee,y:-Q/Z*(te-J.y-K)+te};if(e.touchData.start&&e.touchData.start.active()){var re=e.dragData.touchDragEles;C(re),e.redrawHint("drag",!0),e.redrawHint("eles",!0),e.touchData.start.unactivate().trigger("free")}u.viewport({zoom:Q,pan:ne,cancelOnFailedZoom:!0}),A=H,R=E,D=w,N=O,I=L,e.pinching=!0}n.touches[0]&&(f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY),c[0]=f[0],c[1]=f[1]),n.touches[1]&&(f=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),c[2]=f[0],c[3]=f[1]),n.touches[2]&&(f=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),c[4]=f[0],c[5]=f[1])}else if(n.touches[0]){var ie=e.touchData.start,oe=e.touchData.last;if(e.hoverData.draggingEles||e.swipePanning||(G=e.findNearestElement(c[0],c[1],!0,!0)),i&&null!=ie&&n.preventDefault(),i&&null!=ie&&e.nodeIsDraggable(ie))if(h){re=e.dragData.touchDragEles;var ae=!e.dragData.didDrag;ae&&m(u.collection(re),{inDragLayer:!0});for(var se=0;se<re.length;se++){var le=re[se];if(e.nodeIsDraggable(le)&&le.grabbed()){e.dragData.didDrag=!0;var ue=le.position(),ce=!le.isParent();if(ce&&r.number(v[0])&&r.number(v[1])&&(ue.x+=v[0],ue.y+=v[1]),ae){e.redrawHint("eles",!0);var de=e.touchData.dragDelta;ce&&de&&r.number(de[0])&&r.number(de[1])&&(ue.x+=de[0],ue.y+=de[1])}}}var pe=u.collection(re);pe.dirtyCompoundBoundsCache(),pe.trigger("position drag"),e.hoverData.draggingEles=!0,e.redrawHint("drag",!0),e.touchData.startPosition[0]==d[0]&&e.touchData.startPosition[1]==d[1]&&e.redrawHint("eles",!0),e.redraw()}else 0===(de=e.touchData.dragDelta=e.touchData.dragDelta||[]).length?(de.push(v[0]),de.push(v[1])):(de[0]+=v[0],de[1]+=v[1]);if(t(ie||G,["touchmove","tapdrag","vmousemove"],n,{position:{x:c[0],y:c[1]}}),ie&&ie.grabbed()||G==oe||(oe&&oe.trigger(new a(n,{type:"tapdragout",position:{x:c[0],y:c[1]}})),G&&G.trigger(new a(n,{type:"tapdragover",position:{x:c[0],y:c[1]}}))),e.touchData.last=G,i)for(U=0;U<c.length;U++)c[U]&&e.touchData.startPosition[U]&&h&&(e.touchData.singleTouchMoved=!0);i&&(null==ie||ie.isEdge())&&u.panningEnabled()&&u.userPanningEnabled()&&(s(ie,e.touchData.starts)&&(n.preventDefault(),e.swipePanning?u.panBy({x:v[0]*p,y:v[1]*p}):h&&(e.swipePanning=!0,u.panBy({x:b*p,y:S*p}),ie&&(ie.unactivate(),e.data.bgActivePosistion||(e.data.bgActivePosistion=o.array2point(e.touchData.startPosition)),e.redrawHint("select",!0),e.touchData.start=null))),f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY),c[0]=f[0],c[1]=f[1])}for(y=0;y<c.length;y++)d[y]=c[y]}},!1),e.registerBinding(window,"touchcancel",U=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(window,"touchend",q=function(n){var r=e.touchData.start;if(e.touchData.capture){e.touchData.capture=!1,n.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(n.touches[0]){var d=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);u[0]=d[0],u[1]=d[1]}if(n.touches[1]&&(d=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),u[2]=d[0],u[3]=d[1]),n.touches[2]&&(d=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),u[4]=d[0],u[5]=d[1]),r&&r.unactivate(),e.touchData.cxt){if(o=new a(n,{type:"cxttapend",position:{x:u[0],y:u[1]}}),r?r.trigger(o):s.trigger(o),!e.touchData.cxtDragged){var p=new a(n,{type:"cxttap",position:{x:u[0],y:u[1]}});r?r.trigger(p):s.trigger(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!n.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var f=s.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),s.trigger("boxend");var h=function(e){return e.selectable()&&!e.selected()};f.trigger("box").stdFilter(h).select().trigger("boxselect"),f.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=r&&r.unactivate(),n.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(n.touches[1]);else if(n.touches[0]);else if(!n.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var g=e.dragData.touchDragEles;if(null!=r){var v=r._private.grabbed;C(g),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&r.trigger("free"),t(r,["touchend","tapend","vmouseup","tapdragout"],n,{position:{x:u[0],y:u[1]}}),r.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(u[0],u[1],!0,!0);t(m,["touchend","tapend","vmouseup","tapdragout"],n,{position:{x:u[0],y:u[1]}})}var y=e.touchData.startPosition[0]-u[0],b=y*y,x=e.touchData.startPosition[1]-u[1],S=(b+x*x)*l*l;null!=r&&!e.dragData.didDrag&&r._private.selectable&&S<e.touchTapThreshold2&&!e.pinching&&("single"===s.selectionType()?(s.$(":selected").unmerge(r).unselect(),r.select()):r.selected()?r.unselect():r.select(),e.redrawHint("eles",!0)),e.touchData.singleTouchMoved||t(r,["tap","vclick"],n,{position:{x:u[0],y:u[1]}}),e.touchData.singleTouchMoved=!0}for(var E=0;E<u.length;E++)c[E]=u[E];e.dragData.didDrag=!1,0===n.touches.length&&(e.touchData.dragDelta=[],e.touchData.startPosition=null,e.touchData.startGPosition=null),n.touches.length<2&&(e.pinching=!1,e.redrawHint("eles",!0),e.redraw())}},!1),"undefined"==typeof TouchEvent){var H=[],X=function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},Y=function(e){return{event:e,touch:X(e)}},K=function(e){H.push(Y(e))},Z=function(e){for(var t=0;t<H.length;t++)if(H[t].event.pointerId===e.pointerId)return void H.splice(t,1)},Q=function(e){var t=H.filter((function(t){return t.event.pointerId===e.pointerId}))[0];t.event=e,t.touch=X(e)},J=function(e){e.touches=H.map((function(e){return e.touch}))};e.registerBinding(e.container,"pointerdown",(function(e){"mouse"!==e.pointerType&&(e.preventDefault(),K(e),J(e),F(e))})),e.registerBinding(e.container,"pointerup",(function(e){"mouse"!==e.pointerType&&(Z(e),J(e),q(e))})),e.registerBinding(e.container,"pointercancel",(function(e){"mouse"!==e.pointerType&&(Z(e),J(e),U(e))})),e.registerBinding(e.container,"pointermove",(function(e){"mouse"!==e.pointerType&&(e.preventDefault(),Q(e),J(e),G(e))}))}}};t.exports=s},{"../../../event":45,"../../../is":91,"../../../math":93,"../../../util":108}],71:[function(e,t,n){"use strict";var r=e("../../../math"),i=(e("../../../util"),{});i.generatePolygon=function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl("polygon",e,t,n,r,i,this.points)},intersectLine:function(e,t,n,i,o,a,s){return r.polygonIntersectLine(o,a,this.points,e,t,n/2,i/2,s)},checkPoint:function(e,t,n,i,o,a,s){return r.pointInsidePolygon(e,t,this.points,a,s,i,o,[0,-1],n)}}},i.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,i,o,a,s){return r.intersectLineEllipse(o,a,e,t,n/2+s,i/2+s)},checkPoint:function(e,t,n,r,i,o,a){return e-=o,t-=a,(e/=r/2+n)*e+(t/=i/2+n)*t<=1}}},i.generateRoundRectangle=function(){return this.nodeShapes.roundrectangle={renderer:this,name:"roundrectangle",points:r.generateUnitNgonPointsFitToSquare(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,i,o,a,s){return r.roundRectangleIntersectLine(o,a,e,t,n,i,s)},checkPoint:function(e,t,n,i,o,a,s){var l=r.getRoundRectangleRadius(i,o);if(r.pointInsidePolygon(e,t,this.points,a,s,i,o-2*l,[0,-1],n))return!0;if(r.pointInsidePolygon(e,t,this.points,a,s,i-2*l,o,[0,-1],n))return!0;var u=function(e,t,n,r,i,o,a){return e-=n,t-=r,(e/=i/2+a)*e+(t/=o/2+a)*t<=1};return!!(u(e,t,a-i/2+l,s-o/2+l,2*l,2*l,n)||u(e,t,a+i/2-l,s-o/2+l,2*l,2*l,n)||u(e,t,a+i/2-l,s+o/2-l,2*l,2*l,n)||u(e,t,a-i/2+l,s+o/2-l,2*l,2*l,n))}}},i.generateCutRectangle=function(){return this.nodeShapes.cutrectangle={renderer:this,name:"cutrectangle",cornerLength:r.getCutRectangleCornerLength(),points:r.generateUnitNgonPointsFitToSquare(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},generateCutTrianglePts:function(e,t,n,r){var i=this.cornerLength,o=t/2,a=e/2,s=n-a,l=n+a,u=r-o,c=r+o;return{topLeft:[s,u+i,s+i,u,s+i,u+i],topRight:[l-i,u,l,u+i,l-i,u+i],bottomRight:[l,c-i,l-i,c,l-i,c-i],bottomLeft:[s+i,c,s,c-i,s+i,c-i]}},intersectLine:function(e,t,n,i,o,a,s){var l=this.generateCutTrianglePts(n+2*s,i+2*s,e,t),u=[].concat.apply([],[l.topLeft.splice(0,4),l.topRight.splice(0,4),l.bottomRight.splice(0,4),l.bottomLeft.splice(0,4)]);return r.polygonIntersectLine(o,a,u,e,t)},checkPoint:function(e,t,n,i,o,a,s){if(r.pointInsidePolygon(e,t,this.points,a,s,i,o-2*this.cornerLength,[0,-1],n))return!0;if(r.pointInsidePolygon(e,t,this.points,a,s,i-2*this.cornerLength,o,[0,-1],n))return!0;var l=this.generateCutTrianglePts(i,o,a,s);return r.pointInsidePolygonPoints(e,t,l.topLeft)||r.pointInsidePolygonPoints(e,t,l.topRight)||r.pointInsidePolygonPoints(e,t,l.bottomRight)||r.pointInsidePolygonPoints(e,t,l.bottomLeft)}}},i.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",r.generateUnitNgonPointsFitToSquare(3,0)),this.generatePolygon("rectangle",r.generateUnitNgonPointsFitToSquare(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generatePolygon("diamond",[0,1,1,0,0,-1,-1,0]),this.generatePolygon("pentagon",r.generateUnitNgonPointsFitToSquare(5,0)),this.generatePolygon("hexagon",r.generateUnitNgonPointsFitToSquare(6,0)),this.generatePolygon("heptagon",r.generateUnitNgonPointsFitToSquare(7,0)),this.generatePolygon("octagon",r.generateUnitNgonPointsFitToSquare(8,0));var n=new Array(20),i=r.generateUnitNgonPoints(5,0),o=r.generateUnitNgonPoints(5,Math.PI/5),a=.5*(3-Math.sqrt(5));a*=1.57;for(var s=0;s<o.length/2;s++)o[2*s]*=a,o[2*s+1]*=a;for(s=0;s<5;s++)n[4*s]=i[2*s],n[4*s+1]=i[2*s+1],n[4*s+2]=o[2*s],n[4*s+3]=o[2*s+1];n=r.fitPolygonToSquare(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),e.makePolygon=function(e){var n,r="polygon-"+e.join("$");return(n=this[r])?n:t.generatePolygon(r,e)}},t.exports=i},{"../../../math":93,"../../../util":108}],72:[function(e,t,n){"use strict";var r=e("../../../util"),i={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||r.staticEmptyObject();var t=this;void 0===t.averageRedrawTime&&(t.averageRedrawTime=0),void 0===t.lastRedrawTime&&(t.lastRedrawTime=0),void 0===t.lastDrawTime&&(t.lastDrawTime=0),t.requestedFrame=!0,t.renderOptions=e},beforeRender:function(e,t){if(!this.destroyed){t=t||0;var n=this.beforeRenderCallbacks;n.push({fn:e,priority:t}),n.sort((function(e,t){return t.priority-e.priority}))}}},o=function(e,t,n){for(var r=e.beforeRenderCallbacks,i=0;i<r.length;i++)r[i].fn(t,n)};i.startRenderLoop=function(){var e=this;if(!e.renderLoopStarted){e.renderLoopStarted=!0;var t=function(n){if(!e.destroyed){if(e.requestedFrame&&!e.skipFrame){o(e,!0,n);var i=r.performanceNow();e.render(e.renderOptions);var a=e.lastDrawTime=r.performanceNow();void 0===e.averageRedrawTime&&(e.averageRedrawTime=a-i),void 0===e.redrawCount&&(e.redrawCount=0),e.redrawCount++,void 0===e.redrawTotalTime&&(e.redrawTotalTime=0);var s=a-i;e.redrawTotalTime+=s,e.lastRedrawTime=s,e.averageRedrawTime=e.averageRedrawTime/2+s/2,e.requestedFrame=!1}else o(e,!1,n);e.skipFrame=!1,r.requestAnimationFrame(t)}};r.requestAnimationFrame(t)}},t.exports=i},{"../../../util":108}],73:[function(e,t,n){"use strict";var r,i={arrowShapeImpl:function(e){return(r||(r={polygon:function(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.lineTo(r.x,r.y)}},"triangle-backcurve":function(e,t,n){for(var r,i=0;i<t.length;i++){var o=t[i];0===i&&(r=o),e.lineTo(o.x,o.y)}e.quadraticCurveTo(n.x,n.y,r.x,r.y)},"triangle-tee":function(e,t,n){e.beginPath&&e.beginPath();for(var r=t,i=0;i<r.length;i++){var o=r[i];e.lineTo(o.x,o.y)}e.closePath&&e.closePath(),e.beginPath&&e.beginPath();var a=n,s=n[0];for(e.moveTo(s.x,s.y),i=0;i<a.length;i++)o=a[i],e.lineTo(o.x,o.y);e.closePath&&e.closePath()},"triangle-cross":function(e,t,n){e.beginPath&&e.beginPath();for(var r=t,i=0;i<r.length;i++){var o=r[i];e.lineTo(o.x,o.y)}e.closePath&&e.closePath(),e.beginPath&&e.beginPath();var a=n,s=n[0];for(e.moveTo(s.x,s.y),i=0;i<a.length;i++)o=a[i],e.lineTo(o.x,o.y);e.closePath&&e.closePath()},circle:function(e,t,n,r){e.arc(t,n,r,0,2*Math.PI,!1)}}))[e]}};t.exports=i},{}],74:[function(e,t,n){"use strict";var r={drawEdge:function(e,t,n,r,i){var o=t._private.rscratch,a=this.usePaths();if(!o.badLine&&!isNaN(o.allpts[0])&&t.visible()){var s;n&&(s=n,e.translate(-s.x1,-s.y1));var l=t.pstyle("overlay-padding").pfValue,u=t.pstyle("overlay-opacity").value,c=t.pstyle("overlay-color").value;if(i){if(0===u)return;this.strokeStyle(e,c[0],c[1],c[2],u),e.lineCap="round","self"!=o.edgeType||a||(e.lineCap="butt")}else{var d=t.pstyle("line-color").value;this.strokeStyle(e,d[0],d[1],d[2],t.pstyle("opacity").value),e.lineCap="butt"}e.lineJoin="round";var p=t.pstyle("width").pfValue+(i?2*l:0),f=i?"solid":t.pstyle("line-style").value;e.lineWidth=p,this.drawEdgePath(t,e,o.allpts,f,p),this.drawArrowheads(e,t,i),i||this.drawEdge(e,t,!1,r,!0),this.drawElementText(e,t,r),n&&e.translate(s.x1,s.y1)}},drawEdgePath:function(e,t,n,r,i){var o,a=e._private.rscratch,s=t,l=!1,u=this.usePaths();if(u){var c=n.join("$");a.pathCacheKey&&a.pathCacheKey===c?(o=t=a.pathCache,l=!0):(o=t=new Path2D,a.pathCacheKey=c,a.pathCache=o)}if(s.setLineDash)switch(r){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash([6,3]);break;case"solid":s.setLineDash([])}if(!l&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+3<n.length;d+=4)t.quadraticCurveTo(n[d],n[d+1],n[d+2],n[d+3]);break;case"straight":case"segments":case"haystack":for(d=2;d+1<n.length;d+=2)t.lineTo(n[d],n[d+1])}t=s,u?t.stroke(o):t.stroke(),t.setLineDash&&t.setLineDash([])},drawArrowheads:function(e,t,n){if(!n){var r=t._private.rscratch,i="haystack"===r.edgeType;i||this.drawArrowhead(e,t,"source",r.arrowStartX,r.arrowStartY,r.srcArrowAngle),this.drawArrowhead(e,t,"mid-target",r.midX,r.midY,r.midtgtArrowAngle),this.drawArrowhead(e,t,"mid-source",r.midX,r.midY,r.midsrcArrowAngle),i||this.drawArrowhead(e,t,"target",r.arrowEndX,r.arrowEndY,r.tgtArrowAngle)}},drawArrowhead:function(e,t,n,r,i,o){if(!(isNaN(r)||null==r||isNaN(i)||null==i||isNaN(o)||null==o)){var a=this,s=t.pstyle(n+"-arrow-shape").value;if("none"!==s){var l="hollow"===t.pstyle(n+"-arrow-fill").value?"both":"filled",u=t.pstyle(n+"-arrow-fill").value,c=t.pstyle("width").pfValue,d=t.pstyle("opacity").value,p=e.globalCompositeOperation;a.arrowShapes[s].forceStroke&&"filled"===u&&(u="both"),1===d&&"hollow"!==u||(e.globalCompositeOperation="destination-out",a.fillStyle(e,255,255,255,1),a.strokeStyle(e,255,255,255,1),a.drawArrowShape(t,n,e,l,c,s,r,i,o),e.globalCompositeOperation=p);var f=t.pstyle(n+"-arrow-color").value;a.fillStyle(e,f[0],f[1],f[2],d),a.strokeStyle(e,f[0],f[1],f[2],d),a.drawArrowShape(t,n,e,u,c,s,r,i,o)}}},drawArrowShape:function(e,t,n,r,i,o,a,s,l){var u,c=this,d=this.usePaths(),p=e._private.rscratch,f=!1,h=n,g={x:a,y:s},v=e.pstyle("arrow-scale").value,m=this.getArrowWidth(i,v),y=c.arrowShapes[o];if(d){var C=m+"$"+o+"$"+l+"$"+a+"$"+s;p.arrowPathCacheKey=p.arrowPathCacheKey||{},p.arrowPathCache=p.arrowPathCache||{},p.arrowPathCacheKey[t]===C?(u=n=p.arrowPathCache[t],f=!0):(u=n=new Path2D,p.arrowPathCacheKey[t]=C,p.arrowPathCache[t]=u)}n.beginPath&&n.beginPath(),f||y.draw(n,m,l,g,i),!y.leavePathOpen&&n.closePath&&n.closePath(),n=h,"filled"!==r&&"both"!==r||(d?n.fill(u):n.fill()),"hollow"!==r&&"both"!==r||(n.lineWidth=y.matchEdgeWidth?i:1,n.lineJoin="miter",d?n.stroke(u):n.stroke())}};t.exports=r},{}],75:[function(e,t,n){"use strict";var r=e("../../../math"),i={drawElement:function(e,t,n,r){var i=this;t.isNode()?i.drawNode(e,t,n,r):i.drawEdge(e,t,n,r)},drawCachedElement:function(e,t,n,i){var o=this,a=t.boundingBox();if(0!==a.w&&0!==a.h&&(!i||r.boundingBoxesIntersect(a,i))){var s=o.data.eleTxrCache.getElement(t,a,n);s?e.drawImage(s.texture.canvas,s.x,0,s.width,s.height,a.x1,a.y1,a.w,a.h):o.drawElement(e,t)}},drawElements:function(e,t){for(var n=this,r=0;r<t.length;r++){var i=t[r];n.drawElement(e,i)}},drawCachedElements:function(e,t,n,r){for(var i=this,o=0;o<t.length;o++){var a=t[o];i.drawCachedElement(e,a,n,r)}},drawCachedNodes:function(e,t,n,r){for(var i=this,o=0;o<t.length;o++){var a=t[o];a.isNode()&&i.drawCachedElement(e,a,n,r)}},drawLayeredElements:function(e,t,n,r){var i=this,o=i.data.lyrTxrCache.getLayers(t,n);if(o)for(var a=0;a<o.length;a++){var s=o[a],l=s.bb;0!==l.w&&0!==l.h&&e.drawImage(s.canvas,l.x1,l.y1,l.w,l.h)}else i.drawCachedElements(e,t,n,r)},drawDebugPoints:function(e,t){for(var n=function(t,n,r){e.fillStyle=r,e.fillRect(t-1,n-1,3,3)},r=0;r<t.length;r++){var i=t[r],o=i._private.rscratch;if(i.isNode()){var a=i.position();n(a.x,a.y,"magenta")}else{for(var s=o.allpts,l=0;l+1<s.length;l+=2)n(s[l],s[l+1],"cyan");n(o.midX,o.midY,"yellow")}}}};t.exports=i},{"../../../math":93}],76:[function(e,t,n){"use strict";var r={safeDrawImage:function(e,t,n,r,i,o,a,s,l,u){i<=0||o<=0||l<=0||u<=0||e.drawImage(t,n,r,i,o,a,s,l,u)},drawInscribedImage:function(e,t,n,r){var i=this,o=n.position(),a=o.x,s=o.y,l=n.cy().style(),u=l.getIndexedStyle.bind(l),c=u(n,"background-fit","value",r),d=u(n,"background-repeat","value",r),p=n.width(),f=n.height(),h=2*n.padding(),g=p+("inner"===u(n,"background-width-relative-to","value",r)?0:h),v=f+("inner"===u(n,"background-height-relative-to","value",r)?0:h),m=n._private.rscratch,y="node"===n.pstyle("background-clip").value,C=u(n,"background-image-opacity","value",r),b=t.width||t.cachedW,x=t.height||t.cachedH;null!=b&&null!=x||(document.body.appendChild(t),b=t.cachedW=t.width||t.offsetWidth,x=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t));var S=b,E=x;if("auto"!==u(n,"background-width","value",r)&&(S="%"===u(n,"background-width","units",r)?u(n,"background-width","pfValue",r)*g:u(n,"background-width","pfValue",r)),"auto"!==u(n,"background-height","value",r)&&(E="%"===u(n,"background-height","units",r)?u(n,"background-height","pfValue",r)*v:u(n,"background-height","pfValue",r)),0!==S&&0!==E){if("contain"===c)S*=w=Math.min(g/S,v/E),E*=w;else if("cover"===c){var w;S*=w=Math.max(g/S,v/E),E*=w}var O=a-g/2;O+="%"===u(n,"background-position-x","units",r)?(g-S)*u(n,"background-position-x","pfValue",r):u(n,"background-position-x","pfValue",r);var _=s-v/2;_+="%"===u(n,"background-position-y","units",r)?(v-E)*u(n,"background-position-y","pfValue",r):u(n,"background-position-y","pfValue",r),m.pathCache&&(O-=a,_-=s,a=0,s=0);var L=e.globalAlpha;if(e.globalAlpha=C,"no-repeat"===d)y&&(e.save(),m.pathCache?e.clip(m.pathCache):(i.nodeShapes[i.getNodeShape(n)].draw(e,a,s,g,v),e.clip())),i.safeDrawImage(e,t,0,0,b,x,O,_,S,E),y&&e.restore();else{var R=e.createPattern(t,d);e.fillStyle=R,i.nodeShapes[i.getNodeShape(n)].draw(e,a,s,g,v),e.translate(O,_),e.fill(),e.translate(-O,-_)}e.globalAlpha=L}}};t.exports=r},{}],77:[function(e,t,n){"use strict";function r(e,t,n,r,i,o){o=o||5,e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath(),e.fill()}var i=e("../../../util"),o=e("../../../math"),a={eleTextBiggerThanMin:function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(o.log2(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},drawElementText:function(e,t,n){var r=this;if(void 0===n){if(!r.eleTextBiggerThanMin(t))return}else if(!n)return;if(t.isNode()){if(!(o=t.pstyle("label"))||!o.value)return;var i=t.pstyle("text-halign").strValue;switch(t.pstyle("text-valign").strValue,i){case"left":e.textAlign="right";break;case"right":e.textAlign="left";break;default:e.textAlign="center"}e.textBaseline="bottom"}else{var o=t.pstyle("label"),a=t.pstyle("source-label"),s=t.pstyle("target-label");if(!(o&&o.value||a&&a.value||s&&s.value))return;e.textAlign="center",e.textBaseline="bottom"}r.drawText(e,t),t.isEdge()&&(r.drawText(e,t,"source"),r.drawText(e,t,"target"))}};a.drawNodeText=a.drawEdgeText=a.drawElementText,a.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n<this.fontCaches.length;n++)if((t=this.fontCaches[n]).context===e)return t;return t={context:e},this.fontCaches.push(t),t},a.setupTextStyle=function(e,t){var n=t.effectiveOpacity(),r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",o=t.pstyle("font-family").strValue,a=t.pstyle("font-weight").strValue,s=t.pstyle("text-opacity").value*t.pstyle("opacity").value*n,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value,d=t._private.fontKey,p=this.getFontCache(e);p.key!==d&&(e.font=r+" "+a+" "+i+" "+o,p.key=d),e.lineJoin="round",this.fillStyle(e,u[0],u[1],u[2],s),this.strokeStyle(e,c[0],c[1],c[2],l)},a.drawText=function(e,t,n){var o=t._private.rscratch,a=t.effectiveOpacity();if(0!==a&&0!==t.pstyle("text-opacity").value){var s=i.getPrefixedProperty(o,"labelX",n),l=i.getPrefixedProperty(o,"labelY",n),u=this.getLabelText(t,n);if(null!=u&&""!==u&&!isNaN(s)&&!isNaN(l)){this.setupTextStyle(e,t);var c=n?n+"-":"",d=i.getPrefixedProperty(o,"labelWidth",n),p=i.getPrefixedProperty(o,"labelHeight",n),f=i.getPrefixedProperty(o,"labelAngle",n),h=t.pstyle(c+"text-margin-x").pfValue,g=t.pstyle(c+"text-margin-y").pfValue,v=t.isEdge(),m=(t.isNode(),t.pstyle("text-halign").value),y=t.pstyle("text-valign").value;v&&(m="center",y="center"),s+=h,l+=g;var C,b=t.pstyle("text-rotation");if(0!==(C="autorotate"===b.strValue?v?f:0:"none"===b.strValue?0:b.pfValue)){var x=s,S=l;e.translate(x,S),e.rotate(C),s=0,l=0}switch(y){case"top":break;case"center":l+=p/2;break;case"bottom":l+=p}var E=t.pstyle("text-background-opacity").value,w=t.pstyle("text-border-opacity").value,O=t.pstyle("text-border-width").pfValue,_=t.pstyle("text-background-padding").pfValue;if(E>0||O>0&&w>0){var L=s-_;switch(m){case"left":L-=d;break;case"center":L-=d/2}var R=l-p-_,D=d+2*_,N=p+2*_;if(E>0){var I=e.fillStyle,A=t.pstyle("text-background-color").value;e.fillStyle="rgba("+A[0]+","+A[1]+","+A[2]+","+E*a+")","roundrectangle"==t.pstyle("text-background-shape").strValue?r(e,L,R,D,N,2):e.fillRect(L,R,D,N),e.fillStyle=I}if(O>0&&w>0){var M=e.strokeStyle,P=e.lineWidth,k=t.pstyle("text-border-color").value,T=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+k[0]+","+k[1]+","+k[2]+","+w*a+")",e.lineWidth=O,e.setLineDash)switch(T){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=O/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(L,R,D,N),"double"===T){var V=O/2;e.strokeRect(L+V,R+V,D-2*V,N-2*V)}e.setLineDash&&e.setLineDash([]),e.lineWidth=P,e.strokeStyle=M}}var B=2*t.pstyle("text-outline-width").pfValue;if(B>0&&(e.lineWidth=B),"wrap"===t.pstyle("text-wrap").value){var z=i.getPrefixedProperty(o,"labelWrapCachedLines",n),j=p/z.length;switch(y){case"top":case"center":case"bottom":l-=(z.length-1)*j}for(var F=0;F<z.length;F++)B>0&&e.strokeText(z[F],s,l),e.fillText(z[F],s,l),l+=j}else B>0&&e.strokeText(u,s,l),e.fillText(u,s,l);0!==C&&(e.rotate(-C),e.translate(-x,-S))}}},t.exports=a},{"../../../math":93,"../../../util":108}],78:[function(e,t,n){"use strict";var r=e("../../../is"),i={drawNode:function(e,t,n,i){var o,a,s=this,l=t._private.rscratch,u=t._private,c=c||t.position();if(r.number(c.x)&&r.number(c.y)&&t.visible()){var d,p,f=t.effectiveOpacity(),h=this.usePaths(),g=!1,v=t.padding();o=t.width()+2*v,a=t.height()+2*v,e.lineWidth=t.pstyle("border-width").pfValue,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m,y=t.pstyle("background-image").value,C=[],b=[],x=y.length,S=0;S<x;S++)if(m=y[S],C[S]=null!=m&&"none"!==m,C[S]){var E=t.cy().style().getIndexedStyle(t,"background-image-crossorigin","value",S);b[S]=this.getCachedImage(m,E,(function(){t.rtrigger("background")}))}var w=t.pstyle("background-color").value,O=t.pstyle("border-color").value,_=t.pstyle("border-style").value;if(this.fillStyle(e,w[0],w[1],w[2],t.pstyle("background-opacity").value*f),this.strokeStyle(e,O[0],O[1],O[2],t.pstyle("border-opacity").value*f),e.lineJoin="miter",e.setLineDash)switch(_){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var L=t.pstyle("shape").strValue,R=t.pstyle("shape-polygon-points").pfValue;if(h){var D=L+"$"+o+"$"+a+("polygon"===L?"$"+R.join("$"):"");e.translate(c.x,c.y),l.pathCacheKey===D?(d=l.pathCache,g=!0):(d=new Path2D,l.pathCacheKey=D,l.pathCache=d)}if(!g){var N=c;h&&(N={x:0,y:0}),s.nodeShapes[this.getNodeShape(t)].draw(d||e,N.x,N.y,o,a)}h?e.fill(d):e.fill();var I=u.backgrounding,A=0;for(S=0;S<x;S++)C[S]&&b[S].complete&&(A++,this.drawInscribedImage(e,b[S],t,S));u.backgrounding=!(A===x),I!==u.backgrounding&&t.updateStyle(!1);var M=t.pstyle("background-blacken").value,P=t.pstyle("border-width").pfValue;if(this.hasPie(t)&&(this.drawPie(e,t,f),0===M&&0===P||h||s.nodeShapes[this.getNodeShape(t)].draw(e,c.x,c.y,o,a)),M>0?(this.fillStyle(e,0,0,0,M),h?e.fill(d):e.fill()):M<0&&(this.fillStyle(e,255,255,255,-M),h?e.fill(d):e.fill()),P>0&&(h?e.stroke(d):e.stroke(),"double"===_)){e.lineWidth=t.pstyle("border-width").pfValue/3;var k=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",h?e.stroke(d):e.stroke(),e.globalCompositeOperation=k}h&&e.translate(-c.x,-c.y),e.setLineDash&&e.setLineDash([]),s.drawElementText(e,t,i);var T=t.pstyle("overlay-padding").pfValue,V=t.pstyle("overlay-opacity").value,B=t.pstyle("overlay-color").value;V>0&&(this.fillStyle(e,B[0],B[1],B[2],V),s.nodeShapes.roundrectangle.draw(e,c.x,c.y,o+2*T,a+2*T),e.fill()),n&&e.translate(p.x1,p.y1)}},hasPie:function(e){return(e=e[0])._private.hasPie},drawPie:function(e,t,n,r){var i=(t=t[0]).cy().style(),o=t.pstyle("pie-size"),a=t.width(),s=t.height(),l=(r=r||t.position()).x,u=r.y,c=Math.min(a,s)/2,d=0;this.usePaths()&&(l=0,u=0),"%"===o.units?c*=o.pfValue:void 0!==o.pfValue&&(c=o.pfValue/2);for(var p=1;p<=i.pieBackgroundN;p++){var f=t.pstyle("pie-"+p+"-background-size").value,h=t.pstyle("pie-"+p+"-background-color").value,g=t.pstyle("pie-"+p+"-background-opacity").value*n,v=f/100;v+d>1&&(v=1-d);var m=1.5*Math.PI+2*Math.PI*d,y=m+2*Math.PI*v;0===f||d>=1||d+v>1||(e.beginPath(),e.moveTo(l,u),e.arc(l,u,c,m,y),e.closePath(),this.fillStyle(e,h[0],h[1],h[2],g),e.fill(),d+=v)}}};t.exports=i},{"../../../is":91}],79:[function(e,t,n){"use strict";var r={},i=e("../../../util"),o=100;r.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},r.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;i<n.length;i++)if((t=n[i]).context===e){r=!1;break}return r&&(t={context:e},n.push(t)),t},r.fillStyle=function(e,t,n,r,i){e.fillStyle="rgba("+t+","+n+","+r+","+i+")"},r.strokeStyle=function(e,t,n,r,i){e.strokeStyle="rgba("+t+","+n+","+r+","+i+")"},r.matchCanvasSize=function(e){var t=this,n=t.data,r=t.findContainerClientCoords(),i=r[2],o=r[3],a=t.getPixelRatio(),s=t.motionBlurPxRatio;e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE]&&e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG]||(a=s);var l,u=i*a,c=o*a;if(u!==t.canvasWidth||c!==t.canvasHeight){t.fontCaches=null;var d=n.canvasContainer;d.style.width=i+"px",d.style.height=o+"px";for(var p=0;p<t.CANVAS_LAYERS;p++)(l=n.canvases[p]).width=u,l.height=c,l.style.width=i+"px",l.style.height=o+"px";for(p=0;p<t.BUFFER_COUNT;p++)(l=n.bufferCanvases[p]).width=u,l.height=c,l.style.width=i+"px",l.style.height=o+"px";t.textureMult=1,a<=1&&(l=n.bufferCanvases[t.TEXTURE_BUFFER],t.textureMult=2,l.width=u*t.textureMult,l.height=c*t.textureMult),t.canvasWidth=u,t.canvasHeight=c}},r.renderTo=function(e,t,n,r){this.render({forcedContext:e,forcedZoom:t,forcedPan:n,drawAllLayers:!0,forcedPxRatio:r})},r.render=function(e){function t(e,t,n,r,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",c.fillStyle(e,255,255,255,c.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=o}function n(e,n){var i,o,s,d;c.clearingMotionBlur||e!==f.bufferContexts[c.MOTIONBLUR_BUFFER_NODE]&&e!==f.bufferContexts[c.MOTIONBLUR_BUFFER_DRAG]?(i=_,o=w,s=c.canvasWidth,d=c.canvasHeight):(i={x:O.x*m,y:O.y*m},o=E*m,s=c.canvasWidth*m,d=c.canvasHeight*m),e.setTransform(1,0,0,1,0,0),"motionBlur"===n?t(e,0,0,s,d):r||void 0!==n&&!n||e.clearRect(0,0,s,d),a||(e.translate(i.x,i.y),e.scale(o,o)),u&&e.translate(u.x,u.y),l&&e.scale(l,l)}var r=(e=e||i.staticEmptyObject()).forcedContext,a=e.drawAllLayers,s=e.drawOnlyNodeLayer,l=e.forcedZoom,u=e.forcedPan,c=this,d=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,p=c.cy,f=c.data,h=f.canvasNeedsRedraw,g=c.textureOnViewport&&!r&&(c.pinching||c.hoverData.dragging||c.swipePanning||c.data.wheelZooming),v=void 0!==e.motionBlur?e.motionBlur:c.motionBlur,m=c.motionBlurPxRatio,y=p.hasCompoundNodes(),C=c.hoverData.draggingEles,b=!(!c.hoverData.selecting&&!c.touchData.selecting),x=v=v&&!r&&c.motionBlurEnabled&&!b;r||(c.prevPxRatio!==d&&(c.invalidateContainerClientCoordsCache(),c.matchCanvasSize(c.container),c.redrawHint("eles",!0),c.redrawHint("drag",!0)),c.prevPxRatio=d),!r&&c.motionBlurTimeout&&clearTimeout(c.motionBlurTimeout),v&&(null==c.mbFrames&&(c.mbFrames=0),c.mbFrames++,c.mbFrames<3&&(x=!1),c.mbFrames>c.minMbLowQualFrames&&(c.motionBlurPxRatio=c.mbPxRBlurry)),c.clearingMotionBlur&&(c.motionBlurPxRatio=1),c.textureDrawLastFrame&&!g&&(h[c.NODE]=!0,h[c.SELECT_BOX]=!0);var S=p.style()._private.coreStyle,E=p.zoom(),w=void 0!==l?l:E,O=p.pan(),_={x:O.x,y:O.y},L={zoom:E,pan:{x:O.x,y:O.y}},R=c.prevViewport;void 0===R||L.zoom!==R.zoom||L.pan.x!==R.pan.x||L.pan.y!==R.pan.y||C&&!y||(c.motionBlurPxRatio=1),u&&(_=u),w*=d,_.x*=d,_.y*=d;var D=c.getCachedZSortedEles();if(g||(c.textureDrawLastFrame=!1),g){if(c.textureDrawLastFrame=!0,!c.textureCache){c.textureCache={},c.textureCache.bb=p.mutableElements().boundingBox(),c.textureCache.texture=c.data.bufferCanvases[c.TEXTURE_BUFFER];var N=c.data.bufferContexts[c.TEXTURE_BUFFER];N.setTransform(1,0,0,1,0,0),N.clearRect(0,0,c.canvasWidth*c.textureMult,c.canvasHeight*c.textureMult),c.render({forcedContext:N,drawOnlyNodeLayer:!0,forcedPxRatio:d*c.textureMult}),(L=c.textureCache.viewport={zoom:p.zoom(),pan:p.pan(),width:c.canvasWidth,height:c.canvasHeight}).mpan={x:(0-L.pan.x)/L.zoom,y:(0-L.pan.y)/L.zoom}}h[c.DRAG]=!1,h[c.NODE]=!1;var I=f.contexts[c.NODE],A=c.textureCache.texture;L=c.textureCache.viewport,c.textureCache.bb,I.setTransform(1,0,0,1,0,0),v?t(I,0,0,L.width,L.height):I.clearRect(0,0,L.width,L.height);var M=S["outside-texture-bg-color"].value,P=S["outside-texture-bg-opacity"].value;c.fillStyle(I,M[0],M[1],M[2],P),I.fillRect(0,0,L.width,L.height),E=p.zoom(),n(I,!1),I.clearRect(L.mpan.x,L.mpan.y,L.width/L.zoom/d,L.height/L.zoom/d),I.drawImage(A,L.mpan.x,L.mpan.y,L.width/L.zoom/d,L.height/L.zoom/d)}else c.textureOnViewport&&!r&&(c.textureCache=null);var k=p.extent(),T=c.pinching||c.hoverData.dragging||c.swipePanning||c.data.wheelZooming||c.hoverData.draggingEles,V=c.hideEdgesOnViewport&&T,B=[];if(B[c.NODE]=!h[c.NODE]&&v&&!c.clearedForMotionBlur[c.NODE]||c.clearingMotionBlur,B[c.NODE]&&(c.clearedForMotionBlur[c.NODE]=!0),B[c.DRAG]=!h[c.DRAG]&&v&&!c.clearedForMotionBlur[c.DRAG]||c.clearingMotionBlur,B[c.DRAG]&&(c.clearedForMotionBlur[c.DRAG]=!0),h[c.NODE]||a||s||B[c.NODE]){var z=v&&!B[c.NODE]&&1!==m;n(I=r||(z?c.data.bufferContexts[c.MOTIONBLUR_BUFFER_NODE]:f.contexts[c.NODE]),v&&!z?"motionBlur":void 0),V?c.drawCachedNodes(I,D.nondrag,d,k):c.drawLayeredElements(I,D.nondrag,d,k),c.debug&&c.drawDebugPoints(I,D.nondrag),a||v||(h[c.NODE]=!1)}if(!s&&(h[c.DRAG]||a||B[c.DRAG])&&(z=v&&!B[c.DRAG]&&1!==m,n(I=r||(z?c.data.bufferContexts[c.MOTIONBLUR_BUFFER_DRAG]:f.contexts[c.DRAG]),v&&!z?"motionBlur":void 0),V?c.drawCachedNodes(I,D.drag,d,k):c.drawCachedElements(I,D.drag,d,k),c.debug&&c.drawDebugPoints(I,D.drag),a||v||(h[c.DRAG]=!1)),c.showFps||!s&&h[c.SELECT_BOX]&&!a){if(n(I=r||f.contexts[c.SELECT_BOX]),1==c.selection[4]&&(c.hoverData.selecting||c.touchData.selecting)){E=c.cy.zoom();var j=S["selection-box-border-width"].value/E;I.lineWidth=j,I.fillStyle="rgba("+S["selection-box-color"].value[0]+","+S["selection-box-color"].value[1]+","+S["selection-box-color"].value[2]+","+S["selection-box-opacity"].value+")",I.fillRect(c.selection[0],c.selection[1],c.selection[2]-c.selection[0],c.selection[3]-c.selection[1]),j>0&&(I.strokeStyle="rgba("+S["selection-box-border-color"].value[0]+","+S["selection-box-border-color"].value[1]+","+S["selection-box-border-color"].value[2]+","+S["selection-box-opacity"].value+")",I.strokeRect(c.selection[0],c.selection[1],c.selection[2]-c.selection[0],c.selection[3]-c.selection[1]))}if(f.bgActivePosistion&&!c.hoverData.selecting){E=c.cy.zoom();var F=f.bgActivePosistion;I.fillStyle="rgba("+S["active-bg-color"].value[0]+","+S["active-bg-color"].value[1]+","+S["active-bg-color"].value[2]+","+S["active-bg-opacity"].value+")",I.beginPath(),I.arc(F.x,F.y,S["active-bg-size"].pfValue/E,0,2*Math.PI),I.fill()}var G=c.lastRedrawTime;if(c.showFps&&G){G=Math.round(G);var U=Math.round(1e3/G);I.setTransform(1,0,0,1,0,0),I.fillStyle="rgba(255, 0, 0, 0.75)",I.strokeStyle="rgba(255, 0, 0, 0.75)",I.lineWidth=1,I.fillText("1 frame = "+G+" ms = "+U+" fps",0,20);var q=60;I.strokeRect(0,30,250,20),I.fillRect(0,30,250*Math.min(U/q,1),20)}a||(h[c.SELECT_BOX]=!1)}if(v&&1!==m){var W=f.contexts[c.NODE],$=c.data.bufferCanvases[c.MOTIONBLUR_BUFFER_NODE],H=f.contexts[c.DRAG],X=c.data.bufferCanvases[c.MOTIONBLUR_BUFFER_DRAG],Y=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!x?e.clearRect(0,0,c.canvasWidth,c.canvasHeight):t(e,0,0,c.canvasWidth,c.canvasHeight);var i=m;e.drawImage(n,0,0,c.canvasWidth*i,c.canvasHeight*i,0,0,c.canvasWidth,c.canvasHeight)};(h[c.NODE]||B[c.NODE])&&(Y(W,$,B[c.NODE]),h[c.NODE]=!1),(h[c.DRAG]||B[c.DRAG])&&(Y(H,X,B[c.DRAG]),h[c.DRAG]=!1)}c.prevViewport=L,c.clearingMotionBlur&&(c.clearingMotionBlur=!1,c.motionBlurCleared=!0,c.motionBlur=!0),v&&(c.motionBlurTimeout=setTimeout((function(){c.motionBlurTimeout=null,c.clearedForMotionBlur[c.NODE]=!1,c.clearedForMotionBlur[c.DRAG]=!1,c.motionBlur=!1,c.clearingMotionBlur=!g,c.mbFrames=0,h[c.NODE]=!0,h[c.DRAG]=!0,c.redraw()}),o)),r||p.trigger("render")},t.exports=r},{"../../../util":108}],80:[function(e,t,n){"use strict";for(var r=e("../../../math"),i={drawPolygonPath:function(e,t,n,r,i,o){var a=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+a*o[0],n+s*o[1]);for(var l=1;l<o.length/2;l++)e.lineTo(t+a*o[2*l],n+s*o[2*l+1]);e.closePath()},drawRoundRectanglePath:function(e,t,n,i,o){var a=i/2,s=o/2,l=r.getRoundRectangleRadius(i,o);e.beginPath&&e.beginPath(),e.moveTo(t,n-s),e.arcTo(t+a,n-s,t+a,n,l),e.arcTo(t+a,n+s,t,n+s,l),e.arcTo(t-a,n+s,t-a,n,l),e.arcTo(t-a,n-s,t,n-s,l),e.lineTo(t,n-s),e.closePath()},drawCutRectanglePath:function(e,t,n,i,o){var a=i/2,s=o/2,l=r.getCutRectangleCornerLength();e.beginPath&&e.beginPath(),e.moveTo(t-a+l,n-s),e.lineTo(t+a-l,n-s),e.lineTo(t+a,n-s+l),e.lineTo(t+a,n+s-l),e.lineTo(t+a-l,n+s),e.lineTo(t-a+l,n+s),e.lineTo(t-a,n+s-l),e.lineTo(t-a,n-s+l),e.closePath()}},o=Math.sin(0),a=Math.cos(0),s={},l={},u=Math.PI/40,c=0*Math.PI;c<2*Math.PI;c+=u)s[c]=Math.sin(c),l[c]=Math.cos(c);i.drawEllipsePath=function(e,t,n,r,i){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,n,r/2,i/2,0,0,2*Math.PI);else for(var c,d,p=r/2,f=i/2,h=0*Math.PI;h<2*Math.PI;h+=u)c=t-p*s[h]*o+p*l[h]*a,d=n+f*l[h]*o+f*s[h]*a,0===h?e.moveTo(c,d):e.lineTo(c,d);e.closePath()},t.exports=i},{"../../../math":93}],81:[function(e,t,n){"use strict";var r=e("../../../math"),i=e("../../../util"),o=e("../../../heap"),a=e("./texture-cache-defs"),s=25,l=50,u=-4,c=2,d=3.99,p=8,f=1024,h=1024,g=1024,v=.5,m=.8,y=10,C=!1,b=!1,x=.15,S=.1,E=.9,w=.9,O=100,_=1,L={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},R=function(e){var t=this;t.renderer=e,t.onDequeues=[],t.setupDequeueing()},D=R.prototype;D.reasons=L,D.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},D.getRetiredTextureQueue=function(e){var t=this,n=t.eleImgCaches.retired=t.eleImgCaches.retired||{};return n[e]=n[e]||[]},D.getElementQueue=function(){var e=this;return e.eleCacheQueue=e.eleCacheQueue||new o((function(e,t){return t.reqs-e.reqs}))},D.getElementIdToQueue=function(){var e=this;return e.eleIdToCacheQueue=e.eleIdToCacheQueue||{}},D.getElement=function(e,t,n,i,o){var a=this,f=this.renderer,v=e._private.rscratch,m=f.cy.zoom();if(0===t.w||0===t.h)return null;if(null==i&&(i=Math.ceil(r.log2(m*n))),i<u)i=u;else if(m>=d||i>c)return null;var y,x=Math.pow(2,i),S=t.h*x,E=t.w*x,w=v.imgCaches=v.imgCaches||{},O=w[i];if(O)return O;if(y=S<=s?s:S<=l?l:Math.ceil(S/l)*l,S>g||E>h||!C&&e.isEdge()||!b&&e.isParent())return null;var _=a.getTextureQueue(y),R=_[_.length-2],D=function(){return a.recycleTexture(y,E)||a.addTexture(y,E)};R||(R=_[_.length-1]),R||(R=D()),R.width-R.usedWidth<E&&(R=D());for(var N,I=f.eleTextBiggerThanMin(e,x),A=function(e){return e&&e.scaledLabelShown===I},M=o&&o===L.dequeue,P=o&&o===L.highQuality,k=o&&o===L.downscale,T=i+1;T<=c;T++)if(j=w[T]){N=j;break}var V=N&&N.level===i+1?N:null,B=function(){R.context.drawImage(V.texture.canvas,V.x,0,V.width,V.height,R.usedWidth,0,E,S)};if(R.context.setTransform(1,0,0,1,0,0),R.context.clearRect(R.usedWidth,0,E,y),A(V))B();else if(A(N)){if(!P)return a.queueElement(e,t,N.level-1),N;for(T=N.level;T>i;T--)V=a.getElement(e,t,n,T,L.downscale);B()}else{var z;if(!M&&!P&&!k)for(T=i-1;T>=u;T--){var j;if(j=w[T]){z=j;break}}if(A(z))return a.queueElement(e,t,i),z;R.context.translate(R.usedWidth,0),R.context.scale(x,x),f.drawElement(R.context,e,t,I),R.context.scale(1/x,1/x),R.context.translate(-R.usedWidth,0)}return O=w[i]={ele:e,x:R.usedWidth,texture:R,level:i,scale:x,width:E,height:S,scaledLabelShown:I},R.usedWidth+=Math.ceil(E+p),R.eleCaches.push(O),a.checkTextureFullness(R),O},D.invalidateElement=function(e){var t=this,n=e._private.rscratch.imgCaches;if(n)for(var r=u;r<=c;r++){var o=n[r];if(o){var a=o.texture;a.invalidatedWidth+=o.width,n[r]=null,i.removeFromArray(a.eleCaches,o),t.checkTextureUtility(a)}}},D.checkTextureUtility=function(e){e.invalidatedWidth>=v*e.width&&this.retireTexture(e)},D.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>m&&e.fullnessChecks>=y?i.removeFromArray(t,e):e.fullnessChecks++},D.retireTexture=function(e){var t=this,n=e.height,r=t.getTextureQueue(n);i.removeFromArray(r,e),e.retired=!0;for(var o=e.eleCaches,a=0;a<o.length;a++){var s=o[a],l=s.ele,u=s.level,c=l._private.rscratch.imgCaches;c&&(c[u]=null)}i.clearArray(o),t.getRetiredTextureQueue(n).push(e)},D.addTexture=function(e,t){var n={};return this.getTextureQueue(e).push(n),n.eleCaches=[],n.height=e,n.width=Math.max(f,t),n.usedWidth=0,n.invalidatedWidth=0,n.fullnessChecks=0,n.canvas=document.createElement("canvas"),n.canvas.width=n.width,n.canvas.height=n.height,n.context=n.canvas.getContext("2d"),n},D.recycleTexture=function(e,t){for(var n=this,r=n.getTextureQueue(e),o=n.getRetiredTextureQueue(e),a=0;a<o.length;a++){var s=o[a];if(s.width>=t)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,i.clearArray(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),i.removeFromArray(o,s),r.push(s),s}},D.queueElement=function(e,t,n){var i=this,o=i.getElementQueue(),a=i.getElementIdToQueue(),s=e.id(),l=a[s];if(l)l.level=Math.max(l.level,n),l.reqs++,o.updateItem(l);else{var u={ele:e,bb:t,position:r.copyPosition(e.position()),level:n,reqs:1};e.isEdge()&&(u.positions={source:r.copyPosition(e.source().position()),target:r.copyPosition(e.target().position())}),o.push(u),a[s]=u}},D.dequeue=function(e){for(var t=this,n=t.getElementQueue(),i=t.getElementIdToQueue(),o=[],a=0;a<_&&n.size()>0;a++){var s=n.pop();i[s.ele.id()]=null,o.push(s);var l,u=s.ele;l=(!u.isEdge()||r.arePositionsSame(u.source().position(),s.positions.source)&&r.arePositionsSame(u.target().position(),s.positions.target))&&r.arePositionsSame(u.position(),s.position)?s.bb:u.boundingBox(),t.getElement(s.ele,l,e,s.level,L.dequeue)}return o},D.onDequeue=function(e){this.onDequeues.push(e)},D.offDequeue=function(e){i.removeFromArray(this.onDequeues,e)},D.setupDequeueing=a.setupDequeueing({deqRedrawThreshold:O,deqCost:x,deqAvgCost:S,deqNoDrawCost:E,deqFastCost:w,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n<e.onDequeues.length;n++)(0,e.onDequeues[n])(t)},shouldRedraw:function(e,t,n,i){for(var o=0;o<t.length;o++){var a=t[o].bb;if(r.boundingBoxesIntersect(a,i))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}}),t.exports=R},{"../../../heap":89,"../../../math":93,"../../../util":108,"./texture-cache-defs":86}],82:[function(e,t,n){"use strict";function r(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),i=new Uint8Array(r),o=0;o<n.length;o++)i[o]=n.charCodeAt(o);return new Blob([r],{type:t})}function i(e){var t=e.indexOf(",");return e.substr(t+1)}function o(e,t,n){var o=t.toDataURL(n,e.quality);switch(e.output){case"blob":return r(i(o),n);case"base64":return i(o);default:return o}}var a=e("../../../is"),s={createBuffer:function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,[n,n.getContext("2d")]},bufferCanvasImage:function(e){var t=this.cy,n=t.mutableElements().boundingBox(),r=this.findContainerClientCoords(),i=e.full?Math.ceil(n.w):r[2],o=e.full?Math.ceil(n.h):r[3],s=a.number(e.maxWidth)||a.number(e.maxHeight),l=this.getPixelRatio(),u=1;if(void 0!==e.scale)i*=e.scale,o*=e.scale,u=e.scale;else if(s){var c=1/0,d=1/0;a.number(e.maxWidth)&&(c=u*e.maxWidth/i),a.number(e.maxHeight)&&(d=u*e.maxHeight/o),i*=u=Math.min(c,d),o*=u}s||(i*=l,o*=l,u*=l);var p=document.createElement("canvas");p.width=i,p.height=o,p.style.width=i+"px",p.style.height=o+"px";var f=p.getContext("2d");if(i>0&&o>0){f.clearRect(0,0,i,o),e.bg&&(f.fillStyle=e.bg,f.rect(0,0,i,o),f.fill()),f.globalCompositeOperation="source-over";var h=this.getCachedZSortedEles();if(e.full)f.translate(-n.x1*u,-n.y1*u),f.scale(u,u),this.drawElements(f,h);else{var g=t.pan(),v={x:g.x*u,y:g.y*u};u*=t.zoom(),f.translate(v.x,v.y),f.scale(u,u),this.drawElements(f,h)}}return p},png:function(e){return o(e,this.bufferCanvasImage(e),"image/png")},jpg:function(e){return o(e,this.bufferCanvasImage(e),"image/jpeg")}};t.exports=s},{"../../../is":91}],83:[function(e,t,n){"use strict";function r(e){var t=this;t.data={canvases:new Array(u.CANVAS_LAYERS),contexts:new Array(u.CANVAS_LAYERS),canvasNeedsRedraw:new Array(u.CANVAS_LAYERS),bufferCanvases:new Array(u.BUFFER_COUNT),bufferContexts:new Array(u.CANVAS_LAYERS)},t.data.canvasContainer=document.createElement("div");var n=t.data.canvasContainer.style;t.data.canvasContainer.setAttribute("style","-webkit-tap-highlight-color: rgba(0,0,0,0);"),n.position="relative",n.zIndex="0",n.overflow="hidden";var r=e.cy.container();r.appendChild(t.data.canvasContainer),r.setAttribute("style",(r.getAttribute("style")||"")+"-webkit-tap-highlight-color: rgba(0,0,0,0);");for(var i=0;i<u.CANVAS_LAYERS;i++){var l=t.data.canvases[i]=document.createElement("canvas");t.data.contexts[i]=l.getContext("2d"),l.setAttribute("style","-webkit-user-select: none; -moz-user-select: -moz-none; user-select: none; -webkit-tap-highlight-color: rgba(0,0,0,0); outline-style: none;"+(o.ms()?" -ms-touch-action: none; touch-action: none; ":"")),l.style.position="absolute",l.setAttribute("data-id","layer"+i),l.style.zIndex=String(u.CANVAS_LAYERS-i),t.data.canvasContainer.appendChild(l),t.data.canvasNeedsRedraw[i]=!1}for(t.data.topCanvas=t.data.canvases[0],t.data.canvases[u.NODE].setAttribute("data-id","layer"+u.NODE+"-node"),t.data.canvases[u.SELECT_BOX].setAttribute("data-id","layer"+u.SELECT_BOX+"-selectbox"),t.data.canvases[u.DRAG].setAttribute("data-id","layer"+u.DRAG+"-drag"),i=0;i<u.BUFFER_COUNT;i++)t.data.bufferCanvases[i]=document.createElement("canvas"),t.data.bufferContexts[i]=t.data.bufferCanvases[i].getContext("2d"),t.data.bufferCanvases[i].style.position="absolute",t.data.bufferCanvases[i].setAttribute("data-id","buffer"+i),t.data.bufferCanvases[i].style.zIndex=String(-i-1),t.data.bufferCanvases[i].style.visibility="hidden";t.pathsEnabled=!0,t.data.eleTxrCache=new a(t),t.data.lyrTxrCache=new s(t,t.data.eleTxrCache),t.onUpdateEleCalcs((function(e,n){for(var r=0;r<n.length;r++){var i=n[r],o=i._private.rstyle.dirtyEvents;i.isNode()&&o&&1===o.length&&o.position||t.data.eleTxrCache.invalidateElement(i)}n.length>0&&t.data.lyrTxrCache.invalidateElements(n)}))}var i=e("../../../util"),o=e("../../../is"),a=e("./ele-texture-cache"),s=e("./layered-texture-cache"),l=r,u=r.prototype;u.CANVAS_LAYERS=3,u.SELECT_BOX=0,u.DRAG=1,u.NODE=2,u.BUFFER_COUNT=3,u.TEXTURE_BUFFER=0,u.MOTIONBLUR_BUFFER_NODE=1,u.MOTIONBLUR_BUFFER_DRAG=2,u.redrawHint=function(e,t){var n=this;switch(e){case"eles":n.data.canvasNeedsRedraw[u.NODE]=t;break;case"drag":n.data.canvasNeedsRedraw[u.DRAG]=t;break;case"select":n.data.canvasNeedsRedraw[u.SELECT_BOX]=t}};var c="undefined"!=typeof Path2D;u.path2dEnabled=function(e){return void 0===e?this.pathsEnabled:void(this.pathsEnabled=!!e)},u.usePaths=function(){return c&&this.pathsEnabled},[e("./arrow-shapes"),e("./drawing-elements"),e("./drawing-edges"),e("./drawing-images"),e("./drawing-label-text"),e("./drawing-nodes"),e("./drawing-redraw"),e("./drawing-shapes"),e("./export-image"),e("./node-shapes")].forEach((function(e){i.extend(u,e)})),t.exports=l},{"../../../is":91,"../../../util":108,"./arrow-shapes":73,"./drawing-edges":74,"./drawing-elements":75,"./drawing-images":76,"./drawing-label-text":77,"./drawing-nodes":78,"./drawing-redraw":79,"./drawing-shapes":80,"./ele-texture-cache":81,"./export-image":82,"./layered-texture-cache":84,"./node-shapes":85}],84:[function(e,t,n){"use strict";function r(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)}var i=e("../../../util"),o=e("../../../math"),a=e("../../../heap"),s=e("../../../is"),l=e("./texture-cache-defs"),u=1,c=-4,d=2,p=3.99,f=50,h=50,g=!0,v=.15,m=.1,y=.9,C=.9,b=1,x=250,S=16e6,E=!0,w=!0,O=!0,_=function(e,t){var n=this,r=n.renderer=e;n.layersByLevel={},n.firstGet=!0,n.lastInvalidationTime=i.performanceNow()-2*x,n.skipping=!1,r.beforeRender((function(e,t){t-n.lastInvalidationTime<=x?n.skipping=!0:n.skipping=!1}));var o=function(e,t){return t.reqs-e.reqs};n.layersQueue=new a(o),n.eleTxrCache=t,n.setupEleCacheInvalidation(),n.setupDequeueing()},L=_.prototype,R=0,D=Math.pow(2,53)-1;L.makeLayer=function(e,t){var n=Math.pow(2,t),r=Math.ceil(e.w*n),i=Math.ceil(e.h*n),o=document.createElement("canvas");o.width=r,o.height=i;var a={id:R=++R%D,bb:e,level:t,width:r,height:i,canvas:o,context:o.getContext("2d"),eles:[],elesQueue:[],reqs:0},s=a.context,l=-a.bb.x1,u=-a.bb.y1;return s.scale(n,n),s.translate(l,u),a},L.getLayers=function(e,t,n){var r=this,a=r.renderer.cy.zoom(),s=r.firstGet;if(r.firstGet=!1,null==n)if((n=Math.ceil(o.log2(a*t)))<c)n=c;else if(a>=p||n>d)return null;r.validateLayersElesOrdering(n,e);var l,f,h=r.layersByLevel,g=Math.pow(2,n),v=h[n]=h[n]||[],m=function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return f=h[t],!0},o=function(e){if(!f)for(var r=n+e;c<=r&&r<=d&&!t(r);r+=e);};o(1),o(-1);for(var a=v.length-1;a>=0;a--){var s=v[a];s.invalid&&i.removeFromArray(v,s)}};if(r.levelIsComplete(n,e))return v;m();var y=function(){if(!l){l=o.makeBoundingBox();for(var t=0;t<e.length;t++)o.updateBoundingBox(l,e[t].boundingBox())}return l},C=function(e){var t=(e=e||{}).after;if(y(),l.w*g*(l.h*g)>S)return null;var i=r.makeLayer(l,n);if(null!=t){var o=v.indexOf(t)+1;v.splice(o,0,i)}else(void 0===e.insert||e.insert)&&v.unshift(i);return i};if(r.skipping&&!s)return null;for(var b=null,x=e.length/u,w=E&&!s,O=0;O<e.length;O++){var _=e[O],L=_._private.rscratch,R=L.imgLayerCaches=L.imgLayerCaches||{},D=R[n];if(D)b=D;else{if((!b||b.eles.length>=x||!o.boundingBoxInBoundingBox(b.bb,_.boundingBox()))&&!(b=C({insert:!0,after:b})))return null;f||w?r.queueLayer(b,_):r.drawEleInLayer(b,_,n,t),b.eles.push(_),R[n]=b}}return f||(w?null:v)},L.getEleLevelForLayerLevel=function(e,t){return e},L.drawEleInLayer=function(e,t,n,i){var o=this,a=this.renderer,s=e.context,l=t.boundingBox();if(0!==l.w&&0!==l.h){var u=o.eleTxrCache,c=w?u.reasons.highQuality:void 0;n=o.getEleLevelForLayerLevel(n,i);var d=O?u.getElement(t,l,null,n,c):null;d?(g&&r(s,!1),s.drawImage(d.texture.canvas,d.x,0,d.width,d.height,l.x1,l.y1,l.w,l.h),g&&r(s,!0)):a.drawElement(s,t)}},L.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i<n.length;i++){var o=n[i];if(o.reqs>0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===t.length},L.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r<n.length;r++){for(var i=n[r],o=-1,a=0;a<t.length;a++)if(i.eles[0]===t[a]){o=a;break}if(o<0)this.invalidateLayer(i);else{var s=o;for(a=0;a<i.eles.length;a++)if(i.eles[a]!==t[s+a]){this.invalidateLayer(i);break}}}},L.updateElementsInLayers=function(e,t){for(var n=this,r=s.element(e[0]),i=0;i<e.length;i++)for(var o=r?null:e[i],a=r?e[i]:e[i].ele,l=a._private.rscratch,u=l.imgLayerCaches=l.imgLayerCaches||{},p=c;p<=d;p++){var f=u[p];f&&(o&&n.getEleLevelForLayerLevel(f.level)!==o.level||t(f,a,o))}},L.haveLayers=function(){for(var e=this,t=!1,n=c;n<=d;n++){var r=e.layersByLevel[n];if(r&&r.length>0){t=!0;break}}return t},L.invalidateElements=function(e){var t=this;t.lastInvalidationTime=i.performanceNow(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)}))},L.invalidateLayer=function(e){if(this.lastInvalidationTime=i.performanceNow(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];i.removeFromArray(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var o=0;o<n.length;o++){var a=n[o]._private.rscratch.imgLayerCaches;a&&(a[t]=null)}}},L.refineElementTextures=function(e){var t=this;t.updateElementsInLayers(e,(function(e,n,r){var i=e.replacement;if(i||((i=e.replacement=t.makeLayer(e.bb,e.level)).replaces=e,i.eles=e.eles),!i.reqs)for(var o=0;o<i.eles.length;o++)t.queueLayer(i,i.eles[o])}))},L.setupEleCacheInvalidation=function(){var e=this,t=[];if(O){var n=i.debounce((function(){e.refineElementTextures(t),t=[]}),h);e.eleTxrCache.onDequeue((function(e){for(var r=0;r<e.length;r++)t.push(e[r]);n()}))}},L.queueLayer=function(e,t){var n=this.layersQueue,r=e.elesQueue,i=r.hasId=r.hasId||{};if(!e.replacement){if(t){if(i[t.id()])return;r.push(t),i[t.id()]=!0}e.reqs?(e.reqs++,n.updateItem(e)):(e.reqs=1,n.push(e))}},L.dequeue=function(e){for(var t=this,n=t.layersQueue,r=[],i=0;i<b&&0!==n.size();){var o=n.peek();if(o.replacement)n.pop();else if(o.replaces&&o!==o.replaces.replacement)n.pop();else if(o.invalid)n.pop();else{var a=o.elesQueue.shift();a&&(t.drawEleInLayer(o,a,o.level,e),i++),0===r.length&&r.push(!0),0===o.elesQueue.length&&(n.pop(),o.reqs=0,o.replaces&&t.applyLayerReplacement(o),t.requestRedraw())}}return r},L.applyLayerReplacement=function(e){var t=this,n=t.layersByLevel[e.level],r=e.replaces,i=n.indexOf(r);if(!(i<0||r.invalid)){n[i]=e;for(var o=0;o<e.eles.length;o++){var a=e.eles[o]._private,s=a.imgLayerCaches=a.imgLayerCaches||{};s&&(s[e.level]=e)}t.requestRedraw()}},L.requestRedraw=i.debounce((function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()}),100),L.setupDequeueing=l.setupDequeueing({deqRedrawThreshold:f,deqCost:v,deqAvgCost:m,deqNoDrawCost:y,deqFastCost:C,deq:function(e,t){return e.dequeue(t)},onDeqd:i.noop,shouldRedraw:i.trueify,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}}),t.exports=_},{"../../../heap":89,"../../../is":91,"../../../math":93,"../../../util":108,"./texture-cache-defs":86}],85:[function(e,t,n){"use strict";var r={nodeShapeImpl:function(e,t,n,r,i,o,a){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,i,o);case"polygon":return this.drawPolygonPath(t,n,r,i,o,a);case"roundrectangle":return this.drawRoundRectanglePath(t,n,r,i,o);case"cutrectangle":return this.drawCutRectanglePath(t,n,r,i,o)}}};t.exports=r},{}],86:[function(e,t,n){"use strict";var r=e("../../../util"),i=1e3/60;t.exports={setupDequeueing:function(e){return function(){var t=this,n=this.renderer;if(!t.dequeueingSetup){t.dequeueingSetup=!0;var o=r.debounce((function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()}),e.deqRedrawThreshold),a=function(a,s){for(var l=r.performanceNow(),u=n.averageRedrawTime,c=n.lastRedrawTime,d=[],p=n.cy.extent(),f=n.getPixelRatio();;){var h=r.performanceNow(),g=h-l,v=h-s;if(c<i){var m=i-(a?u:0);if(v>=e.deqFastCost*m)break}else if(a){if(g>=e.deqCost*c||g>=e.deqAvgCost*u)break}else if(v>=e.deqNoDrawCost*i)break;var y=e.deq(t,f,p);if(!(y.length>0))break;for(var C=0;C<y.length;C++)d.push(y[C])}d.length>0&&(e.onDeqd(t,d),!a&&e.shouldRedraw(t,d,f,p)&&o())},s=e.priority||r.noop;n.beforeRender(a,s(t))}}}}},{"../../../util":108}],87:[function(e,t,n){"use strict";t.exports=[{name:"null",impl:e("./null")},{name:"base",impl:e("./base")},{name:"canvas",impl:e("./canvas")}]},{"./base":69,"./canvas":83,"./null":88}],88:[function(e,t,n){"use strict";function r(e){this.options=e,this.notifications=0}var i=function(){};r.prototype={recalculateRenderedStyle:i,notify:function(){this.notifications++},init:i},t.exports=r},{}],89:[function(e,t,n){"use strict";var r,i,o,a,s,l,u,c,d,p,f,h,g,v,m;o=Math.floor,p=Math.min,i=function(e,t){return e<t?-1:e>t?1:0},d=function(e,t,n,r,a){var s;if(null==n&&(n=0),null==a&&(a=i),n<0)throw new Error("lo must be non-negative");for(null==r&&(r=e.length);n<r;)a(t,e[s=o((n+r)/2)])<0?r=s:n=s+1;return[].splice.apply(e,[n,n-n].concat(t)),t},l=function(e,t,n){return null==n&&(n=i),e.push(t),v(e,0,e.length-1,n)},s=function(e,t){var n,r;return null==t&&(t=i),n=e.pop(),e.length?(r=e[0],e[0]=n,m(e,0,t)):r=n,r},c=function(e,t,n){var r;return null==n&&(n=i),r=e[0],e[0]=t,m(e,0,n),r},u=function(e,t,n){var r;return null==n&&(n=i),e.length&&n(e[0],t)<0&&(t=(r=[e[0],t])[0],e[0]=r[1],m(e,0,n)),t},a=function(e,t){var n,r,a,s,l,u;for(null==t&&(t=i),s=function(){u=[];for(var t=0,n=o(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse(),l=[],r=0,a=s.length;r<a;r++)n=s[r],l.push(m(e,n,t));return l},g=function(e,t,n){var r;if(null==n&&(n=i),-1!==(r=e.indexOf(t)))return v(e,0,r,n),m(e,r,n)},f=function(e,t,n){var r,o,s,l,c;if(null==n&&(n=i),!(o=e.slice(0,t)).length)return o;for(a(o,n),s=0,l=(c=e.slice(t)).length;s<l;s++)r=c[s],u(o,r,n);return o.sort(n).reverse()},h=function(e,t,n){var r,o,l,u,c,f,h,g,v;if(null==n&&(n=i),10*t<=e.length){if(!(l=e.slice(0,t).sort(n)).length)return l;for(o=l[l.length-1],u=0,f=(h=e.slice(t)).length;u<f;u++)n(r=h[u],o)<0&&(d(l,r,0,null,n),l.pop(),o=l[l.length-1]);return l}for(a(e,n),v=[],c=0,g=p(t,e.length);0<=g?c<g:c>g;0<=g?++c:--c)v.push(s(e,n));return v},v=function(e,t,n,r){var o,a,s;for(null==r&&(r=i),o=e[n];n>t&&r(o,a=e[s=n-1>>1])<0;)e[n]=a,n=s;return e[n]=o},m=function(e,t,n){var r,o,a,s,l;for(null==n&&(n=i),o=e.length,l=t,a=e[t],r=2*t+1;r<o;)(s=r+1)<o&&!(n(e[r],e[s])<0)&&(r=s),e[t]=e[r],r=2*(t=r)+1;return e[t]=a,v(e,l,t,n)},r=function(){function e(e){this.cmp=null!=e?e:i,this.nodes=[]}return e.push=l,e.pop=s,e.replace=c,e.pushpop=u,e.heapify=a,e.updateItem=g,e.nlargest=f,e.nsmallest=h,e.prototype.push=function(e){return l(this.nodes,e,this.cmp)},e.prototype.pop=function(){return s(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return c(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return u(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return a(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return g(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),t.exports=r},{}],90:[function(e,t,n){"use strict";e("./-preamble");var r=(e("./window"),e("./is")),i=e("./core"),o=e("./extension"),a=e("./stylesheet"),s=function(e){return void 0===e&&(e={}),r.plainObject(e)?new i(e):r.string(e)?o.apply(o,arguments):void 0};s.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(s),e.apply(null,t),this},s.version=e("./version"),s.stylesheet=s.Stylesheet=a,t.exports=s},{"./-preamble":1,"./core":37,"./extension":46,"./is":91,"./stylesheet":106,"./version":115,"./window":116}],91:[function(e,t,n){"use strict";var r=e("./window"),i=r?r.navigator:null,o=r?r.document:null,a="string",s=typeof{},l="function",u=typeof HTMLElement,c=function(e){return e&&e.instanceString&&d.fn(e.instanceString)?e.instanceString():null},d={defined:function(e){return null!=e},string:function(e){return null!=e&&typeof e==a},fn:function(e){return null!=e&&typeof e===l},array:function(e){return Array.isArray?Array.isArray(e):null!=e&&e instanceof Array},plainObject:function(e){return null!=e&&typeof e===s&&!d.array(e)&&e.constructor===Object},object:function(e){return null!=e&&typeof e===s},number:function(e){return null!=e&&"number"==typeof e&&!isNaN(e)},integer:function(e){return d.number(e)&&Math.floor(e)===e},bool:function(e){return null!=e&&"boolean"==typeof e},htmlElement:function(e){return"undefined"===u?void 0:null!=e&&e instanceof HTMLElement},elementOrCollection:function(e){return d.element(e)||d.collection(e)},element:function(e){return"collection"===c(e)&&e._private.single},collection:function(e){return"collection"===c(e)&&!e._private.single},core:function(e){return"core"===c(e)},style:function(e){return"style"===c(e)},stylesheet:function(e){return"stylesheet"===c(e)},event:function(e){return"event"===c(e)},thread:function(e){return"thread"===c(e)},fabric:function(e){return"fabric"===c(e)},emptyString:function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},nonemptyString:function(e){return!(!e||!d.string(e)||""===e||e.match(/^\s+$/))},domElement:function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement},boundingBox:function(e){return d.plainObject(e)&&d.number(e.x1)&&d.number(e.x2)&&d.number(e.y1)&&d.number(e.y2)},promise:function(e){return d.object(e)&&d.fn(e.then)},touch:function(){return r&&("ontouchstart"in r||r.DocumentTouch&&o instanceof DocumentTouch)},gecko:function(){return r&&("undefined"!=typeof InstallTrigger||"MozAppearance"in o.documentElement.style)},webkit:function(){return r&&("undefined"!=typeof webkitURL||"WebkitAppearance"in o.documentElement.style)},chromium:function(){return r&&"undefined"!=typeof chrome},khtml:function(){return i&&i.vendor.match(/kde/i)},khtmlEtc:function(){return d.khtml()||d.webkit()||d.chromium()},ms:function(){return i&&i.userAgent.match(/msie|trident|edge/i)},windows:function(){return i&&i.appVersion.match(/Win/i)},mac:function(){return i&&i.appVersion.match(/Mac/i)},linux:function(){return i&&i.appVersion.match(/Linux/i)},unix:function(){return i&&i.appVersion.match(/X11/i)}};t.exports=d},{"./window":116}],92:[function(e,t,n){function r(){this._obj={}}var i=r.prototype;i.set=function(e,t){this._obj[e]=t},i.delete=function(e){this._obj[e]=null},i.has=function(e){return null!=this._obj[e]},i.get=function(e){return this._obj[e]},t.exports="undefined"!=typeof Map?Map:r},{}],93:[function(e,t,n){"use strict";var r={arePositionsSame:function(e,t){return e.x===t.x&&e.y===t.y},copyPosition:function(e){return{x:e.x,y:e.y}},array2point:function(e){return{x:e[0],y:e[1]}},deg2rad:function(e){return Math.PI*e/180},getAngleFromDisp:function(e,t){return Math.atan2(t,e)-Math.PI/2}};r.log2=Math.log2||function(e){return Math.log(e)/Math.log(2)},r.signum=function(e){return e>0?1:e<0?-1:0},r.dist=function(e,t){return Math.sqrt(r.sqdist(e,t))},r.sqdist=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},r.qbezierAt=function(e,t,n,r){return(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n},r.qbezierPtAt=function(e,t,n,i){return{x:r.qbezierAt(e.x,t.x,n.x,i),y:r.qbezierAt(e.y,t.y,n.y,i)}},r.lineAt=function(e,t,n,i){var o={x:t.x-e.x,y:t.y-e.y},a=r.dist(e,t),s={x:o.x/a,y:o.y/a};return n=null==n?0:n,i=null!=i?i:n*a,{x:e.x+s.x*i,y:e.y+s.y*i}},r.lineAtDist=function(e,t,n){return r.lineAt(e,t,void 0,n)},r.triangleAngle=function(e,t,n){var i=r.dist(t,n),o=r.dist(e,n),a=r.dist(e,t);return Math.acos((i*i+o*o-a*a)/(2*i*o))},r.bound=function(e,t,n){return Math.max(e,Math.min(n,t))},r.makeBoundingBox=function(e){if(null==e)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(null!=e.x1&&null!=e.y1){if(null!=e.x2&&null!=e.y2&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},r.updateBoundingBox=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},r.expandBoundingBoxByPoint=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},r.expandBoundingBox=function(e,t){return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},r.boundingBoxesIntersect=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2<t.x1||t.x2<e.x1||e.y2<t.y1||t.y2<e.y1||e.y1>t.y2||t.y1>e.y2)},r.inBoundingBox=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},r.pointInBoundingBox=function(e,t){return this.inBoundingBox(e,t.x,t.y)},r.boundingBoxInBoundingBox=function(e,t){return r.inBoundingBox(e,t.x1,t.y1)&&r.inBoundingBox(e,t.x2,t.y2)},r.roundRectangleIntersectLine=function(e,t,n,r,i,o,a){var s,l=this.getRoundRectangleRadius(i,o),u=i/2,c=o/2,d=n-u+l-a,p=r-c-a,f=n+u-l+a,h=p;if((s=this.finiteLinesIntersect(e,t,n,r,d,p,f,h,!1)).length>0)return s;var g=n+u+a,v=r-c+l-a,m=g,y=r+c-l+a;if((s=this.finiteLinesIntersect(e,t,n,r,g,v,m,y,!1)).length>0)return s;var C=n-u+l-a,b=r+c+a,x=n+u-l+a,S=b;if((s=this.finiteLinesIntersect(e,t,n,r,C,b,x,S,!1)).length>0)return s;var E=n-u-a,w=r-c+l-a,O=E,_=r+c-l+a;if((s=this.finiteLinesIntersect(e,t,n,r,E,w,O,_,!1)).length>0)return s;var L,R=n-u+l,D=r-c+l;if((L=this.intersectLineCircle(e,t,n,r,R,D,l+a)).length>0&&L[0]<=R&&L[1]<=D)return[L[0],L[1]];var N=n+u-l,I=r-c+l;if((L=this.intersectLineCircle(e,t,n,r,N,I,l+a)).length>0&&L[0]>=N&&L[1]<=I)return[L[0],L[1]];var A=n+u-l,M=r+c-l;if((L=this.intersectLineCircle(e,t,n,r,A,M,l+a)).length>0&&L[0]>=A&&L[1]>=M)return[L[0],L[1]];var P=n-u+l,k=r+c-l;return(L=this.intersectLineCircle(e,t,n,r,P,k,l+a)).length>0&&L[0]<=P&&L[1]>=k?[L[0],L[1]]:[]},r.inLineVicinity=function(e,t,n,r,i,o,a){var s=a,l=Math.min(n,i),u=Math.max(n,i),c=Math.min(r,o),d=Math.max(r,o);return l-s<=e&&e<=u+s&&c-s<=t&&t<=d+s},r.inBezierVicinity=function(e,t,n,r,i,o,a,s,l){var u={x1:Math.min(n,a,i)-l,x2:Math.max(n,a,i)+l,y1:Math.min(r,s,o)-l,y2:Math.max(r,s,o)+l};return!(e<u.x1||e>u.x2||t<u.y1||t>u.y2)},r.solveCubic=function(e,t,n,r,i){var o,a,s,l,u,c,d,p;return s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),o=(a=(3*n-t*t)/9)*a*a+(s/=54)*s,i[1]=0,d=t/3,o>0?(u=(u=s+Math.sqrt(o))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(o))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-d+u+c,d+=(u+c)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-c+u)/2,i[3]=d,void(i[5]=-d)):(i[5]=i[3]=0,0===o?(p=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*p-d,void(i[4]=i[2]=-(p+d))):(l=(a=-a)*a*a,l=Math.acos(s/Math.sqrt(l)),p=2*Math.sqrt(a),i[0]=-d+p*Math.cos(l/3),i[2]=-d+p*Math.cos((l+2*Math.PI)/3),void(i[4]=-d+p*Math.cos((l+4*Math.PI)/3))))},r.sqdistToQuadraticBezier=function(e,t,n,r,i,o,a,s){var l=1*n*n-4*n*i+2*n*a+4*i*i-4*i*a+a*a+r*r-4*r*o+2*r*s+4*o*o-4*o*s+s*s,u=9*n*i-3*n*n-3*n*a-6*i*i+3*i*a+9*r*o-3*r*r-3*r*s-6*o*o+3*o*s,c=3*n*n-6*n*i+n*a-n*e+2*i*i+2*i*e-a*e+3*r*r-6*r*o+r*s-r*t+2*o*o+2*o*t-s*t,d=1*n*i-n*n+n*e-i*e+r*o-r*r+r*t-o*t,p=[];this.solveCubic(l,u,c,d,p);for(var f=1e-7,h=[],g=0;g<6;g+=2)Math.abs(p[g+1])<f&&p[g]>=0&&p[g]<=1&&h.push(p[g]);h.push(1),h.push(0);for(var v,m,y,C=-1,b=0;b<h.length;b++)v=Math.pow(1-h[b],2)*n+2*(1-h[b])*h[b]*i+h[b]*h[b]*a,m=Math.pow(1-h[b],2)*r+2*(1-h[b])*h[b]*o+h[b]*h[b]*s,y=Math.pow(v-e,2)+Math.pow(m-t,2),C>=0?y<C&&(C=y,h[b]):(C=y,h[b]);return C},r.sqdistToFiniteLine=function(e,t,n,r,i,o){var a=[e-n,t-r],s=[i-n,o-r],l=s[0]*s[0]+s[1]*s[1],u=a[0]*a[0]+a[1]*a[1],c=a[0]*s[0]+a[1]*s[1],d=c*c/l;return c<0?u:d>l?(e-i)*(e-i)+(t-o)*(t-o):u-d},r.pointInsidePolygonPoints=function(e,t,n){for(var r,i,o,a,s=0,l=0;l<n.length/2;l++)if(r=n[2*l],i=n[2*l+1],l+1<n.length/2?(o=n[2*(l+1)],a=n[2*(l+1)+1]):(o=n[2*(l+1-n.length/2)],a=n[2*(l+1-n.length/2)+1]),r==e&&o==e);else{if(!(r>=e&&e>=o||r<=e&&e<=o))continue;(e-r)/(o-r)*(a-i)+i>t&&s++}return s%2!=0},r.pointInsidePolygon=function(e,t,n,i,o,a,s,l,u){var c,d,p=new Array(n.length);null!=l[0]?(c=Math.atan(l[1]/l[0]),l[0]<0?c+=Math.PI/2:c=-c-Math.PI/2):c=l;for(var f=Math.cos(-c),h=Math.sin(-c),g=0;g<p.length/2;g++)p[2*g]=a/2*(n[2*g]*f-n[2*g+1]*h),p[2*g+1]=s/2*(n[2*g+1]*f+n[2*g]*h),p[2*g]+=i,p[2*g+1]+=o;if(u>0){var v=this.expandPolygon(p,-u);d=this.joinLines(v)}else d=p;return r.pointInsidePolygonPoints(e,t,d)},r.joinLines=function(e){for(var t,n,r,i,o,a,s,l,u=new Array(e.length/2),c=0;c<e.length/4;c++){t=e[4*c],n=e[4*c+1],r=e[4*c+2],i=e[4*c+3],c<e.length/4-1?(o=e[4*(c+1)],a=e[4*(c+1)+1],s=e[4*(c+1)+2],l=e[4*(c+1)+3]):(o=e[0],a=e[1],s=e[2],l=e[3]);var d=this.finiteLinesIntersect(t,n,r,i,o,a,s,l,!0);u[2*c]=d[0],u[2*c+1]=d[1]}return u},r.expandPolygon=function(e,t){for(var n,r,i,o,a=new Array(2*e.length),s=0;s<e.length/2;s++){n=e[2*s],r=e[2*s+1],s<e.length/2-1?(i=e[2*(s+1)],o=e[2*(s+1)+1]):(i=e[0],o=e[1]);var l=o-r,u=-(i-n),c=Math.sqrt(l*l+u*u),d=l/c,p=u/c;a[4*s]=n+d*t,a[4*s+1]=r+p*t,a[4*s+2]=i+d*t,a[4*s+3]=o+p*t}return a},r.intersectLineEllipse=function(e,t,n,r,i,o){var a=n-e,s=r-t;a/=i,s/=o;var l=Math.sqrt(a*a+s*s),u=l-1;if(u<0)return[];var c=u/l;return[(n-e)*c+e,(r-t)*c+t]},r.intersectLineCircle=function(e,t,n,r,i,o,a){var s=[n-e,r-t],l=[e-i,t-o],u=s[0]*s[0]+s[1]*s[1],c=2*(l[0]*s[0]+l[1]*s[1]),d=c*c-4*u*(l[0]*l[0]+l[1]*l[1]-a*a);if(d<0)return[];var p=(-c+Math.sqrt(d))/(2*u),f=(-c-Math.sqrt(d))/(2*u),h=Math.min(p,f),g=Math.max(p,f),v=[];if(h>=0&&h<=1&&v.push(h),g>=0&&g<=1&&v.push(g),0===v.length)return[];var m=v[0]*s[0]+e,y=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[m,y]:[m,y,v[1]*s[0]+e,v[1]*s[1]+t]:[m,y]},r.findCircleNearPoint=function(e,t,n,r,i){var o=r-e,a=i-t,s=Math.sqrt(o*o+a*a);return[e+o/s*n,t+a/s*n]},r.findMaxSqDistanceToOrigin=function(e){for(var t,n=1e-6,r=0;r<e.length/2;r++)(t=e[2*r]*e[2*r]+e[2*r+1]*e[2*r+1])>n&&(n=t);return n},r.midOfThree=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},r.finiteLinesIntersect=function(e,t,n,r,i,o,a,s,l){var u=e-i,c=n-e,d=a-i,p=t-o,f=r-t,h=s-o,g=d*p-h*u,v=c*p-f*u,m=h*c-d*f;if(0!==m){var y=g/m,C=v/m,b=.001,x=0-b,S=1+b;return x<=y&&y<=S&&x<=C&&C<=S||l?[e+y*c,t+y*f]:[]}return 0===g||0===v?this.midOfThree(e,n,a)===a?[a,s]:this.midOfThree(e,n,i)===i?[i,o]:this.midOfThree(i,a,n)===n?[n,r]:[]:[]},r.polygonIntersectLine=function(e,t,n,i,o,a,s,l){var u,c,d,p,f,h,g=[],v=new Array(n.length),m=!0;if(5===arguments.length&&(m=!1),m){for(var y=0;y<v.length/2;y++)v[2*y]=n[2*y]*a+i,v[2*y+1]=n[2*y+1]*s+o;if(l>0){var C=r.expandPolygon(v,-l);c=r.joinLines(C)}else c=v}else c=n;for(y=0;y<c.length/2;y++)d=c[2*y],p=c[2*y+1],y<c.length/2-1?(f=c[2*(y+1)],h=c[2*(y+1)+1]):(f=c[0],h=c[1]),0!==(u=this.finiteLinesIntersect(e,t,i,o,d,p,f,h)).length&&g.push(u[0],u[1]);return g},r.shortenIntersection=function(e,t,n){var r=[e[0]-t[0],e[1]-t[1]],i=Math.sqrt(r[0]*r[0]+r[1]*r[1]),o=(i-n)/i;return o<0&&(o=1e-5),[t[0]+o*r[0],t[1]+o*r[1]]},r.generateUnitNgonPointsFitToSquare=function(e,t){var n=r.generateUnitNgonPoints(e,t);return r.fitPolygonToSquare(n)},r.fitPolygonToSquare=function(e){for(var t,n,r=e.length/2,i=1/0,o=1/0,a=-1/0,s=-1/0,l=0;l<r;l++)t=e[2*l],n=e[2*l+1],i=Math.min(i,t),a=Math.max(a,t),o=Math.min(o,n),s=Math.max(s,n);var u=2/(a-i),c=2/(s-o);for(l=0;l<r;l++)t=e[2*l]=e[2*l]*u,n=e[2*l+1]=e[2*l+1]*c,i=Math.min(i,t),a=Math.max(a,t),o=Math.min(o,n),s=Math.max(s,n);if(o<-1)for(l=0;l<r;l++)n=e[2*l+1]=e[2*l+1]+(-1-o);return e},r.generateUnitNgonPoints=function(e,t){var n=1/e*2*Math.PI,r=e%2==0?Math.PI/2+n/2:Math.PI/2;r+=t;for(var i,o=new Array(2*e),a=0;a<e;a++)i=a*n+r,o[2*a]=Math.cos(i),o[2*a+1]=Math.sin(-i);return o},r.getRoundRectangleRadius=function(e,t){return Math.min(e/4,t/4,8)},r.getCutRectangleCornerLength=function(){return 8},t.exports=r},{}],94:[function(e,t,n){"use strict";var r=0,i=1,o=2,a=function(e){return this instanceof a?(this.id="Thenable/1.0.7",this.state=r,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},void("function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this)))):new a(e)};a.prototype={fulfill:function(e){return s(this,i,"fulfillValue",e)},reject:function(e){return s(this,o,"rejectReason",e)},then:function(e,t){var n=this,r=new a;return n.onFulfilled.push(c(e,r,"fulfill")),n.onRejected.push(c(t,r,"reject")),l(n),r.proxy}};var s=function(e,t,n,i){return e.state===r&&(e.state=t,e[n]=i,l(e)),e},l=function(e){e.state===i?u(e,"onFulfilled",e.fulfillValue):e.state===o&&u(e,"onRejected",e.rejectReason)},u=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e<r.length;e++)r[e](n)};"function"==typeof setImmediate?setImmediate(i):setTimeout(i,0)}},c=function(e,t,n){return function(r){if("function"!=typeof e)t[n].call(t,r);else{var i;try{i=e(r)}catch(e){return void t.reject(e)}d(t,i)}}},d=function(e,t){if(e!==t&&e.proxy!==t){var n;if("object"==typeof t&&null!==t||"function"==typeof t)try{n=t.then}catch(t){return void e.reject(t)}if("function"!=typeof n)e.fulfill(t);else{var r=!1;try{n.call(t,(function(n){r||(r=!0,n===t?e.reject(new TypeError("circular thenable chain")):d(e,n))}),(function(t){r||(r=!0,e.reject(t))}))}catch(t){r||e.reject(t)}}}else e.reject(new TypeError("cannot resolve promise with itself"))};a.all=function(e){return new a((function(t,n){for(var r=new Array(e.length),i=0,o=function(n,o){r[n]=o,++i===e.length&&t(r)},a=0;a<e.length;a++)!function(t){var r=e[t];null!=r&&null!=r.then?r.then((function(e){o(t,e)}),(function(e){n(e)})):o(t,r)}(a)}))},a.resolve=function(e){return new a((function(t,n){t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},t.exports="undefined"!=typeof Promise?Promise:a},{}],95:[function(e,t,n){"use strict";var r=e("./is"),i=e("./util"),o=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return i.sort.descending(e.selector,t.selector)})),a=function(e,t){var n=a.lookup=a.lookup||function(){for(var e,t={},n=0;n<o.length;n++)t[(e=o[n]).selector]=e.matches;return t}();return n[e](t)},s="("+o.map((function(e){return e.selector})).join("|")+")",l=function(e){var t=this;t._private={selectorText:null,invalid:!0};var n=function(){return{length:0,classes:[],colonSelectors:[],data:[],group:null,ids:[],meta:[],collection:null,filter:null,parent:null,ancestor:null,subject:null,child:null,descendant:null}};if(!e||r.string(e)&&e.match(/^\s*$/))t.length=0;else if("*"===e||"edge"===e||"node"===e)t[0]=n(),t[0].group="*"===e?e:e+"s",t[0].groupOnly=!0,t[0].length=1,t._private.invalid=!1,t._private.selectorText=e,t.length=1;else if(r.elementOrCollection(e)){var o=e.collection();t[0]=n(),t[0].collection=o,t[0].length=1,t.length=1}else if(r.fn(e))t[0]=n(),t[0].filter=e,t[0].length=1,t.length=1;else{if(!r.string(e))return void i.error("A selector must be created from a string; found "+e);var a=null,l={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:i.regex.number,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$"};l.variable="(?:[\\w-]|(?:\\\\"+l.metaChar+"))+",l.value=l.string+"|"+l.number,l.className=l.variable,l.id=l.variable;var u,c,d,p=function(e){return e.replace(new RegExp("\\\\("+l.metaChar+")","g"),(function(e,t){return t}))};for(u=l.comparatorOp.split("|"),d=0;d<u.length;d++)c=u[d],l.comparatorOp+="|@"+c;for(u=l.comparatorOp.split("|"),d=0;d<u.length;d++)(c=u[d]).indexOf("!")>=0||"="!==c&&(l.comparatorOp+="|\\!"+c);var f=[{name:"group",query:!0,regex:"(node|edge|\\*)",populate:function(e){this.group="*"===e?e:e+"s"}},{name:"state",query:!0,regex:s,populate:function(e){this.colonSelectors.push(e)}},{name:"id",query:!0,regex:"\\#("+l.id+")",populate:function(e){this.ids.push(p(e))}},{name:"className",query:!0,regex:"\\.("+l.className+")",populate:function(e){this.classes.push(p(e))}},{name:"dataExists",query:!0,regex:"\\[\\s*("+l.variable+")\\s*\\]",populate:function(e){this.data.push({field:p(e)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+l.variable+")\\s*("+l.comparatorOp+")\\s*("+l.value+")\\s*\\]",populate:function(e,t,n){n=null!=new RegExp("^"+l.string+"$").exec(n)?n.substring(1,n.length-1):parseFloat(n),this.data.push({field:p(e),operator:t,value:n})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+l.boolOp+")\\s*("+l.variable+")\\s*\\]",populate:function(e,t){this.data.push({field:p(t),operator:e})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+l.meta+")\\s*("+l.comparatorOp+")\\s*("+l.number+")\\s*\\]\\]",populate:function(e,t,n){this.meta.push({field:p(e),operator:t,value:parseFloat(n)})}},{name:"nextQuery",separator:!0,regex:l.separator,populate:function(){t[++d]=n(),a=null}},{name:"child",separator:!0,regex:l.child,populate:function(){var e=n();e.parent=this,e.subject=a,t[d]=e}},{name:"descendant",separator:!0,regex:l.descendant,populate:function(){var e=n();e.ancestor=this,e.subject=a,t[d]=e}},{name:"subject",modifier:!0,regex:l.subject,populate:function(){return null!=a&&this.subject!=this?(i.error("Redefinition of subject in selector `"+e+"`"),!1):(a=this,void(this.subject=this))}}];t._private.selectorText=e;var h=e;d=0;var g,v=function(e){for(var t,n,i,o=0;o<f.length;o++){var a=f[o],s=a.name;if(!r.fn(e)||e(s,a)){var l=h.match(new RegExp("^"+a.regex));if(null!=l){n=l,t=a,i=s;var u=l[0];h=h.substring(u.length);break}}}return{expr:t,match:n,name:i}},m=function(){var e=h.match(/^\s+/);if(e){var t=e[0];h=h.substring(t.length)}};for(t[0]=n(),m();;){var y=v();if(null==y.expr)return void i.error("The selector `"+e+"`is invalid");var C=[];for(g=1;g<y.match.length;g++)C.push(y.match[g]);if(t[d].length++,!1===y.expr.populate.apply(t[d],C))return;if(h.match(/^\s*$/))break}for(t.length=d+1,g=0;g<t.length;g++){var b=t[g];if(null!=b.subject){for(;b.subject!=b;)if(null!=b.parent){var x=b.parent,S=b;S.parent=null,x.child=S,b=x}else{if(null==b.ancestor){i.error("When adjusting references for the selector `"+b+"`, neither parent nor ancestor was found");break}var E=b.ancestor,w=b;w.ancestor=null,E.descendant=w,b=E}t[g]=b.subject}}}t._private.invalid=!1},u=l.prototype;u.size=function(){return this.length},u.eq=function(e){return this[e]};var c=function(e,t){if(e.groupOnly)return"*"===e.group||e.group===t.group();if(null!=e.group&&"*"!=e.group&&e.group!=t.group())return!1;var n,i=t.cy(),o=!0;for(n=0;n<e.colonSelectors.length;n++){var s=e.colonSelectors[n];if(!(o=a(s,t)))break}if(!o)return!1;var l=!0;for(n=0;n<e.ids.length;n++){var u=e.ids[n],d=t.id();if(!(l=l&&u==d))break}if(!l)return!1;var p=!0;for(n=0;n<e.classes.length;n++){var f=e.classes[n];if(!(p=p&&t.hasClass(f)))break}if(!p)return!1;var h=function(t){for(var n=!0,i=0;i<e[t.name].length;i++){var o,a=e[t.name][i],s=a.operator,l=a.value,u=a.field,c=t.fieldValue(u);if(null!=s&&null!=l){var d=r.string(c)||r.number(c)?""+c:"",p=""+l,f=!1;s.indexOf("@")>=0&&(d=d.toLowerCase(),p=p.toLowerCase(),s=s.replace("@",""),f=!0);var h=!1;s.indexOf("!")>=0&&(s=s.replace("!",""),h=!0),f&&(l=p.toLowerCase(),c=d.toLowerCase());var g=!1;switch(s){case"*=":o=d.indexOf(p)>=0;break;case"$=":o=d.indexOf(p,d.length-p.length)>=0;break;case"^=":o=0===d.indexOf(p);break;case"=":o=c===l;break;case">":g=!0,o=c>l;break;case">=":g=!0,o=c>=l;break;case"<":g=!0,o=c<l;break;case"<=":g=!0,o=c<=l;break;default:o=!1}!h||null==c&&g||(o=!o)}else if(null!=s)switch(s){case"?":o=!!c;break;case"!":o=!c;break;case"^":o=void 0===c}else o=void 0!==c;if(!o){n=!1;break}}return n},g=h({name:"data",fieldValue:function(e){return t.data(e)}});if(!g)return!1;var v=h({name:"meta",fieldValue:function(e){return t[e]()}});if(!v)return!1;if(null!=e.collection&&!e.collection.hasElementWithId(t.id()))return!1;if(null!=e.filter&&t.collection().some(e.filter))return!1;var m=function(e,t){if(null!=e){var n=!1;if(!i.hasCompoundNodes())return!1;t=t();for(var r=0;r<t.length;r++)if(c(e,t[r])){n=!0;break}return n}return!0};return!!(m(e.parent,(function(){return t.parent()}))&&m(e.ancestor,(function(){return t.parents()}))&&m(e.child,(function(){return t.children()}))&&m(e.descendant,(function(){return t.descendants()})))};u.filter=function(e){var t=this,n=e.cy();if(t._private.invalid)return n.collection();if(1===t.length&&1===t[0].length&&1===t[0].ids.length)return e.getElementById(t[0].ids[0]).collection();var r=function(e){for(var n=0;n<t.length;n++){var r=t[n];if(c(r,e))return!0}return!1};return null==t._private.selectorText&&(r=function(){return!0}),e.filter(r)},u.matches=function(e){var t=this;if(t._private.invalid)return!1;for(var n=0;n<t.length;n++){var r=t[n];if(c(r,e))return!0}return!1},u.toString=u.selector=function(){for(var e="",t=function(e){return null==e?"":e},n=function(e){return r.string(e)?'"'+e+'"':t(e)},i=function(e){return" "+e+" "},o=function(e){var r,s="";e.subject===e&&(s+="$");var l=t(e.group);for(s+=l.substring(0,l.length-1),r=0;r<e.data.length;r++){var u=e.data[r];s+=u.value?"["+u.field+i(t(u.operator))+n(u.value)+"]":"["+t(u.operator)+u.field+"]"}for(r=0;r<e.meta.length;r++){var c=e.meta[r];s+="[["+c.field+i(t(c.operator))+n(c.value)+"]]"}for(r=0;r<e.colonSelectors.length;r++)s+=e.colonSelectors[a];for(r=0;r<e.ids.length;r++)s+="#"+e.ids[a];for(r=0;r<e.classes.length;r++)s+="."+e.classes[r];return null!=e.parent&&(s=o(e.parent)+" > "+s),null!=e.ancestor&&(s=o(e.ancestor)+" "+s),null!=e.child&&(s+=" > "+o(e.child)),null!=e.descendant&&(s+=" "+o(e.descendant)),s},a=0;a<this.length;a++){var s=this[a];e+=o(s),this.length>1&&a<this.length-1&&(e+=", ")}return e},t.exports=l},{"./is":91,"./util":108}],96:[function(e,t,n){function r(){this._obj={}}var i=r.prototype;i.add=function(e){this._obj[e]=1},i.remove=function(e){this._obj[e]=0},i.has=function(e){return 1===this._obj[e]},t.exports="undefined"!=typeof Set?Set:r},{}],97:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../promise"),a={apply:function(e){var t=this,n=t._private,r=n.cy.collection();n.newStyle&&(n.contextStyles={},n.propDiffs={},t.cleanElements(e,!0));for(var i=0;i<e.length;i++){var o=e[i],a=t.getContextMeta(o);if(!a.empty){r.merge(o);var s=t.getContextStyle(a),l=t.applyContextStyle(a,s,o);n.newStyle||t.updateTransitions(o,l.diffProps),t.updateStyleHints(o)}}return n.newStyle=!1,r},getPropertiesDiff:function(e,t){var n=this,r=n._private.propDiffs=n._private.propDiffs||{},i=e+"-"+t,o=r[i];if(o)return o;for(var a=[],s={},l=0;l<n.length;l++){var u=n[l],c="t"===e[l]!=("t"===t[l]),d=u.mappedProperties.length>0;if(c||d){var p;c&&d||c?p=u.properties:d&&(p=u.mappedProperties);for(var f=0;f<p.length;f++){for(var h=p[f],g=h.name,v=!1,m=l+1;m<n.length;m++){var y=n[m];if("t"===t[m]&&(v=null!=y.properties[h.name]))break}s[g]||v||(s[g]=!0,a.push(g))}}}return r[i]=a,a},getContextMeta:function(e){var t,n=this,r="",i=e._private.styleCxtKey||"";n._private.newStyle&&(i="");for(var o=0;o<n.length;o++){var a=n[o];r+=a.selector&&a.selector.matches(e)?"t":"f"}return t=n.getPropertiesDiff(i,r),e._private.styleCxtKey=r,{key:r,diffPropNames:t,empty:0===t.length}},getContextStyle:function(e){var t=e.key,n=this,r=this._private.contextStyles=this._private.contextStyles||{};if(r[t])return r[t];for(var i={_private:{key:t}},o=0;o<n.length;o++){var a=n[o];if("t"===t[o])for(var s=0;s<a.properties.length;s++){var l=a.properties[s];i[l.name]=l}}return r[t]=i,i},applyContextStyle:function(e,t,n){for(var r=this,i=e.diffPropNames,o={},a=0;a<i.length;a++){var s=i[a],l=t[s],u=n.pstyle(s);if(!l){if(!u)continue;l=u.bypass?{name:s,deleteBypassed:!0}:{name:s,delete:!0}}if(u!==l){var c=o[s]={prev:u};r.applyParsedProperty(n,l),c.next=n.pstyle(s),c.next&&c.next.bypass&&(c.next=c.next.bypassed)}}return{diffProps:o}},updateStyleHints:function(e){var t=e._private,n=this;if(!e.removed()){var r=!1;if("nodes"===t.group)for(var i=1;i<=n.pieBackgroundN;i++)if((c=e.pstyle("pie-"+i+"-background-size").value)>0){r=!0;break}t.hasPie=r;var o=e.pstyle("text-transform").strValue,a=e.pstyle("label").strValue,s=e.pstyle("source-label").strValue,l=e.pstyle("target-label").strValue,u=e.pstyle("font-style").strValue,c=e.pstyle("font-size").pfValue+"px",d=e.pstyle("font-family").strValue,p=e.pstyle("font-weight").strValue,f=u+"$"+c+"$"+d+"$"+p+"$"+o+"$"+e.pstyle("text-valign").strValue+"$"+e.pstyle("text-valign").strValue+"$"+e.pstyle("text-outline-width").pfValue+"$"+e.pstyle("text-wrap").strValue+"$"+e.pstyle("text-max-width").pfValue;t.labelStyleKey=f,t.sourceLabelKey=f+"$"+s,t.targetLabelKey=f+"$"+l,t.labelKey=f+"$"+a,t.fontKey=u+"$"+p+"$"+c+"$"+d,t.styleKey=Date.now()}},applyParsedProperty:function(e,t){var n,o=this,a=t,s=e._private.style,l=o.types,u=o.properties[a.name].type,c=a.bypass,d=s[a.name],p=d&&d.bypass,f=e._private,h="mapping";if("curve-style"===t.name&&"haystack"===t.value&&e.isEdge()&&(e.isLoop()||e.source().isParent()||e.target().isParent())&&(a=t=this.parse(t.name,"bezier",c)),a.delete)return s[a.name]=void 0,!0;if(a.deleteBypassed)return!d||!!d.bypass&&(d.bypassed=void 0,!0);if(a.deleteBypass)return!d||!!d.bypass&&(s[a.name]=d.bypassed,!0);var g=function(){r.error("Do not assign mappings to elements without corresponding data (e.g. ele `"+e.id()+"` for property `"+a.name+"` with data field `"+a.field+"`); try a `["+a.field+"]` selector to limit scope to elements with `"+a.field+"` defined")};switch(a.mapped){case l.mapData:for(var v=a.field.split("."),m=f.data,y=0;y<v.length&&m;y++)m=m[v[y]];var C;if((C=i.number(m)?(m-a.fieldMin)/(a.fieldMax-a.fieldMin):0)<0?C=0:C>1&&(C=1),u.color){var b=a.valueMin[0],x=a.valueMax[0],S=a.valueMin[1],E=a.valueMax[1],w=a.valueMin[2],O=a.valueMax[2],_=null==a.valueMin[3]?1:a.valueMin[3],L=null==a.valueMax[3]?1:a.valueMax[3],R=[Math.round(b+(x-b)*C),Math.round(S+(E-S)*C),Math.round(w+(O-w)*C),Math.round(_+(L-_)*C)];n={bypass:a.bypass,name:a.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else{if(!u.number)return!1;var D=a.valueMin+(a.valueMax-a.valueMin)*C;n=this.parse(a.name,D,a.bypass,h)}n||(n=this.parse(a.name,d.strValue,a.bypass,h)),n||g(),n.mapping=a,a=n;break;case l.data:if(v=a.field.split("."),m=f.data)for(y=0;y<v.length;y++)m=m[v[y]];if(!(n=this.parse(a.name,m,a.bypass,h))){var N=d?d.strValue:"";n=this.parse(a.name,N,a.bypass,h)}n||g(),n.mapping=a,a=n;break;case l.fn:var I=(0,a.value)(e);(n=this.parse(a.name,I,a.bypass,h)).mapping=a,a=n;break;case void 0:break;default:return!1}return c?(a.bypassed=p?d.bypassed:d,s[a.name]=a):p?d.bypassed=a:s[a.name]=a,this.checkZOrderTrigger(e,a.name,d?d.value:null,a.value),!0},cleanElements:function(e,t){for(var n=this.properties,r=0;r<e.length;r++){var i=e[r];if(t)for(var o=i._private.style,a=0;a<n.length;a++){var s=n[a],l=o[s.name];l&&(l.bypass?l.bypassed=null:o[s.name]=null)}else i._private.style={}}},update:function(){this._private.cy.mutableElements().updateStyle()},updateMappers:function(e){for(var t=this,n=this._private.cy.collection(),r=0;r<e.length;r++){for(var i=e[r],o=i._private.style,a=!1,s=0;s<t.properties.length;s++){var l=o[t.properties[s].name];if(l&&l.mapping){var u=l.mapping;this.applyParsedProperty(i,u),a=!0}}a&&(this.updateStyleHints(i),n.merge(i))}return n},updateTransitions:function(e,t,n){var r=this,a=e._private,s=e.pstyle("transition-property").value,l=e.pstyle("transition-duration").pfValue,u=e.pstyle("transition-delay").pfValue;if(s.length>0&&l>0){for(var c={},d=!1,p=0;p<s.length;p++){var f=s[p],h=e.pstyle(f),g=t[f];if(g){var v,m=g.prev,y=null!=g.next?g.next:h,C=!1,b=1e-6;m&&(i.number(m.pfValue)&&i.number(y.pfValue)?(C=y.pfValue-m.pfValue,v=m.pfValue+b*C):i.number(m.value)&&i.number(y.value)?(C=y.value-m.value,v=m.value+b*C):i.array(m.value)&&i.array(y.value)&&(C=m.value[0]!==y.value[0]||m.value[1]!==y.value[1]||m.value[2]!==y.value[2],v=m.strValue),C&&(c[f]=y.strValue,this.applyBypass(e,f,v),d=!0))}}if(!d)return;a.transitioning=!0,new o((function(t){u>0?e.delayAnimation(u).play().promise().then(t):t()})).then((function(){return e.animation({style:c,duration:l,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){r.removeBypasses(e,s),e.rtrigger("style"),a.transitioning=!1}))}else a.transitioning&&(this.removeBypasses(e,s),e.rtrigger("style"),a.transitioning=!1)},checkZOrderTrigger:function(e,t,n,r){var i=this.properties[t];i.triggersZOrder&&(null==n||i.triggersZOrder(n,r))&&this._private.cy.notify({type:"zorder",eles:e})}};t.exports=a},{"../is":91,"../promise":94,"../util":108}],98:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o={applyBypass:function(e,t,n,o){var a=this,s=[],l=!0;if("*"===t||"**"===t){if(void 0!==n)for(var u=0;u<a.properties.length;u++)t=(f=a.properties[u]).name,(p=this.parse(t,n,!0))&&s.push(p)}else if(r.string(t))(p=this.parse(t,n,!0))&&s.push(p);else{if(!r.plainObject(t))return!1;var c=t;o=n;var d=Object.keys(c);for(u=0;u<d.length;u++){t=d[u];var p,f=a.properties[t];void 0===(n=c[t])&&(n=c[i.dash2camel(t)]),void 0!==n&&(p=this.parse(t,n,!0))&&s.push(p)}}if(0===s.length)return!1;var h=!1;for(u=0;u<e.length;u++){for(var g,v=e[u],m={},y=0;y<s.length;y++){if(f=s[y],o){var C=v.pstyle(f.name);g=m[f.name]={prev:C}}h=this.applyParsedProperty(v,f)||h,o&&(g.next=v.pstyle(f.name))}h&&this.updateStyleHints(v),o&&this.updateTransitions(v,m,l)}return h},overrideBypass:function(e,t,n){t=i.camel2dash(t);for(var r=0;r<e.length;r++){var o=e[r],a=o._private.style[t],s=this.properties[t].type,l=s.color,u=s.mutiple;if(a&&a.bypass){var c=null!=a.pfValue?a.pfValue:a.value;a.value=n,null!=a.pfValue&&(a.pfValue=n),a.strValue=l?"rgb("+n.join(",")+")":u?n.join(" "):""+n,this.checkZOrderTrigger(o,t,c,n)}else this.applyBypass(o,t,n)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,n){for(var r=!0,i=0;i<e.length;i++){for(var o=e[i],a={},s=0;s<t.length;s++){var l=t[s],u=this.properties[l],c=o.pstyle(u.name);if(c&&c.bypass){var d="",p=this.parse(l,d,!0),f=a[u.name]={prev:c};this.applyParsedProperty(o,p),f.next=o.pstyle(u.name)}}this.updateStyleHints(o),n&&this.updateTransitions(o,a,r)}}};t.exports=o},{"../is":91,"../util":108}],99:[function(e,t,n){"use strict";var r=e("../window"),i={getEmSizeInPixels:function(){var e=this.containerCss("font-size");return null!=e?parseFloat(e):1},containerCss:function(e){var t=this._private.cy.container();if(r&&t&&r.getComputedStyle)return r.getComputedStyle(t).getPropertyValue(e)}};t.exports=i},{"../window":116}],100:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={getRenderedStyle:function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},getRawStyle:function(e,t){var n=this;if(e=e[0]){for(var i={},o=0;o<n.properties.length;o++){var a=n.properties[o],s=n.getStylePropertyValue(e,a.name,t);null!=s&&(i[a.name]=s,i[r.dash2camel(a.name)]=s)}return i}},getIndexedStyle:function(e,t,n,r){var i=e.pstyle(t)[n][r];return null!=i?i:e.cy().style().getDefaultProperty(t)[n][0]},getStylePropertyValue:function(e,t,n){var r=this;if(e=e[0]){var i=r.properties[t];i.alias&&(i=i.pointsTo);var o=i.type,a=e.pstyle(i.name),s=e.cy().zoom();if(a){var l=a.units?o.implicitUnits||"px":null,u=l?[].concat(a.pfValue).map((function(e){return e*(n?s:1)+l})).join(" "):a.strValue;return u}}},getAnimationStartStyle:function(e,t){for(var n={},r=0;r<t.length;r++){var o=t[r].name,a=e.pstyle(o);void 0!==a&&(a=i.plainObject(a)?this.parse(o,a.strValue):this.parse(o,a)),a&&(n[o]=a)}return n},getPropsList:function(e){var t=[],n=e,i=this.properties;if(n)for(var o=Object.keys(n),a=0;a<o.length;a++){var s=o[a],l=n[s],u=i[s]||i[r.camel2dash(s)],c=this.parse(u.name,l);c&&t.push(c)}return t}};t.exports=o},{"../is":91,"../util":108}],101:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../selector"),a=function(e){return this instanceof a?r.core(e)?(this._private={cy:e,coreStyle:{}},this.length=0,void this.resetToDefault()):void i.error("A style must have a core reference"):new a(e)},s=a.prototype;s.instanceString=function(){return"style"},s.clear=function(){for(var e=0;e<this.length;e++)this[e]=void 0;return this.length=0,this._private.newStyle=!0,this},s.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},s.core=function(){return this._private.coreStyle},s.selector=function(e){var t="core"===e?null:new o(e),n=this.length++;return this[n]={selector:t,properties:[],mappedProperties:[],index:n},this},s.css=function(){var e=this,t=arguments;switch(t.length){case 1:for(var n=t[0],r=0;r<e.properties.length;r++){var o=e.properties[r],a=n[o.name];void 0===a&&(a=n[i.dash2camel(o.name)]),void 0!==a&&this.cssRule(o.name,a)}break;case 2:this.cssRule(t[0],t[1])}return this},s.style=s.css,s.cssRule=function(e,t){var n=this.parse(e,t);if(n){var r=this.length-1;this[r].properties.push(n),this[r].properties[n.name]=n,n.name.match(/pie-(\d+)-background-size/)&&n.value&&(this._private.hasPie=!0),n.mapped&&this[r].mappedProperties.push(n),!this[r].selector&&(this._private.coreStyle[n.name]=n)}return this},a.fromJson=function(e,t){var n=new a(e);return n.fromJson(t),n},a.fromString=function(e,t){return new a(e).fromString(t)},[e("./apply"),e("./bypass"),e("./container"),e("./get-for-ele"),e("./json"),e("./string-sheet"),e("./properties"),e("./parse")].forEach((function(e){i.extend(s,e)})),a.types=s.types,a.properties=s.properties,t.exports=a},{"../is":91,"../selector":95,"../util":108,"./apply":97,"./bypass":98,"./container":99,"./get-for-ele":100,"./json":102,"./parse":103,"./properties":104,"./string-sheet":105}],102:[function(e,t,n){"use strict";var r={applyFromJson:function(e){for(var t=this,n=0;n<e.length;n++){var r=e[n],i=r.selector,o=r.style||r.css,a=Object.keys(o);t.selector(i);for(var s=0;s<a.length;s++){var l=a[s],u=o[l];t.css(l,u)}}return t},fromJson:function(e){var t=this;return t.resetToDefault(),t.applyFromJson(e),t},json:function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var n=this[t],r=n.selector,i=n.properties,o={},a=0;a<i.length;a++){var s=i[a];o[s.name]=s.strValue}e.push({selector:r?r.toString():"core",style:o})}return e}};t.exports=r},{}],103:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../math"),a={parse:function(e,t,n,o){var a=this;if(i.fn(t))return a.parseImplWarn(e,t,n,o);var s,l=[e,t,n,"mapping"===o||!0===o||!1===o||null==o?"dontcare":o].join("$"),u=a.propCache=a.propCache||{};return(s=u[l])||(s=u[l]=a.parseImplWarn(e,t,n,o)),(n||"mapping"===o)&&(s=r.copy(s))&&(s.value=r.copy(s.value)),s},parseImplWarn:function(e,t,n,i){var o=this.parseImpl(e,t,n,i);return o||null==t||r.error("The style property `%s: %s` is invalid",e,t),o},parseImpl:function(e,t,n,a){var s=this;e=r.camel2dash(e);var l=s.properties[e],u=t,c=s.types;if(!l)return null;if(null==t)return null;l.alias&&(l=l.pointsTo,e=l.name);var d=i.string(t);d&&(t=t.trim());var p,f,h=l.type;if(!h)return null;if(n&&(""===t||null===t))return{name:e,value:t,bypass:!0,deleteBypass:!0};if(i.fn(t))return{name:e,value:t,strValue:"fn",mapped:c.fn,bypass:n};if(!d||a);else{if(p=new RegExp(c.data.regex).exec(t)){if(n)return!1;var g=c.data;return{name:e,value:p,strValue:""+t,mapped:g,field:p[1],bypass:n}}if(f=new RegExp(c.mapData.regex).exec(t)){if(n)return!1;if(h.multiple)return!1;if(g=c.mapData,!h.color&&!h.number)return!1;var v=this.parse(e,f[4]);if(!v||v.mapped)return!1;var m=this.parse(e,f[5]);if(!m||m.mapped)return!1;if(v.value===m.value)return!1;if(h.color){var y=v.value,C=m.value;if(!(y[0]!==C[0]||y[1]!==C[1]||y[2]!==C[2]||y[3]!==C[3]&&(null!=y[3]&&1!==y[3]||null!=C[3]&&1!==C[3])))return!1}return{name:e,value:f,strValue:""+t,mapped:g,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:v.value,valueMax:m.value,bypass:n}}}if(h.multiple&&"multiple"!==a){var b;if(b=d?t.split(/\s+/):i.array(t)?t:[t],h.evenMultiple&&b.length%2!=0)return null;for(var x=[],S=[],E=[],w=!1,O=0;O<b.length;O++){var _=s.parse(e,b[O],n,"multiple");w=w||i.string(_.value),x.push(_.value),E.push(null!=_.pfValue?_.pfValue:_.value),S.push(_.units)}return h.validate&&!h.validate(x,S)?null:h.singleEnum&&w?1===x.length&&i.string(x[0])?{name:e,value:x[0],strValue:x[0],bypass:n}:null:{name:e,value:x,pfValue:E,strValue:x.join(" "),bypass:n,units:S}}var L=function(){for(var r=0;r<h.enums.length;r++)if(h.enums[r]===t)return{name:e,value:t,strValue:""+t,bypass:n};return null};if(h.number){var R,D="px";if(h.units&&(R=h.units),h.implicitUnits&&(D=h.implicitUnits),!h.unitless)if(d){var N="px|em"+(h.allowPercent?"|\\%":"");R&&(N=R);var I=t.match("^("+r.regex.number+")("+N+")?$");I&&(t=I[1],R=I[2]||D)}else R&&!h.implicitUnits||(R=D);if(t=parseFloat(t),isNaN(t)&&void 0===h.enums)return null;if(isNaN(t)&&void 0!==h.enums)return t=u,L();if(h.integer&&!i.integer(t))return null;if(void 0!==h.min&&(t<h.min||h.strictMin&&t===h.min)||void 0!==h.max&&(t>h.max||h.strictMax&&t===h.max))return null;var A={name:e,value:t,strValue:""+t+(R||""),units:R,bypass:n};return h.unitless||"px"!==R&&"em"!==R?A.pfValue=t:A.pfValue="px"!==R&&R?this.getEmSizeInPixels()*t:t,"ms"!==R&&"s"!==R||(A.pfValue="ms"===R?t:1e3*t),"deg"!==R&&"rad"!==R||(A.pfValue="rad"===R?t:o.deg2rad(t)),"%"===R&&(A.pfValue=t/100),A}if(h.propList){var M=[],P=""+t;if("none"===P);else{var k=P.split(",");for(O=0;O<k.length;O++){var T=k[O].trim();s.properties[T]&&M.push(T)}if(0===M.length)return null}return{name:e,value:M,strValue:0===M.length?"none":M.join(", "),bypass:n}}if(h.color){var V=r.color2tuple(t);return V?{name:e,value:V,pfValue:V,strValue:""+t,bypass:n}:null}if(h.regex||h.regexes){if(h.enums){var B=L();if(B)return B}var z=h.regexes?h.regexes:[h.regex];for(O=0;O<z.length;O++){var j=new RegExp(z[O]).exec(t);if(j)return{name:e,value:h.singleRegexMatchValue?j[1]:j,strValue:""+t,bypass:n}}return null}return h.string?{name:e,value:""+t,strValue:""+t,bypass:n}:h.enums?L():null}};t.exports=a},{"../is":91,"../math":93,"../util":108}],104:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={};!function(){var e=r.regex.number,t=r.regex.rgbaNoBackRefs,n=r.regex.hslaNoBackRefs,a=r.regex.hex3,s=r.regex.hex6,l=function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},u=function(r){var i=e+"|\\w+|"+t+"|"+n+"|"+a+"|"+s;return"^"+r+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+e+")\\s*\\,\\s*("+e+")\\s*,\\s*("+i+")\\s*\\,\\s*("+i+")\\)$"},c=["^url\\s*\\(\\s*['\"]?(.+?)['\"]?\\s*\\)$","^(none)$","^(.+)$"];o.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials"],multiple:!0},bgClip:{enums:["none","node"]},color:{color:!0},bool:{enums:["yes","no"]},lineStyle:{enums:["solid","dotted","dashed"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments"]},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontVariant:{enums:["small-caps","normal"]},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textBackgroundShape:{enums:["rectangle","roundrectangle"]},nodeShape:{enums:["rectangle","roundrectangle","cutrectangle","ellipse","triangle","square","pentagon","hexagon","heptagon","octagon","star","diamond","vee","rhomboid","polygon"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","triangle-cross","triangle-backcurve","half-triangle-overshot","vee","square","circle","diamond","none"]},arrowFill:{enums:["filled","hollow"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},text:{string:!0},data:{mapping:!0,regex:l("data")},layoutData:{mapping:!0,regex:l("layoutData")},scratch:{mapping:!0,regex:l("scratch")},mapData:{mapping:!0,regex:u("mapData")},mapLayoutData:{mapping:!0,regex:u("mapLayoutData")},mapScratch:{mapping:!0,regex:u("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:c,singleRegexMatchValue:!0},urls:{regexes:c,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-line"],singleEnum:!0,validate:function(e,t){switch(e.length){case 2:return"deg"!==t[0]&&"rad"!==t[0]&&"deg"!==t[1]&&"rad"!==t[1];case 1:return i.string(e[0])||"deg"===t[0]||"rad"===t[0];default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]}};var d={zeroNonZero:function(e,t){return 0===e&&0!==t||0!==e&&0===t},anyDiff:function(e,t){return e!==t}},p=d,f=o.types,h=o.properties=[{name:"label",type:f.text},{name:"text-rotation",type:f.textRotation},{name:"text-margin-x",type:f.bidirectionalSize},{name:"text-margin-y",type:f.bidirectionalSize},{name:"source-label",type:f.text},{name:"source-text-rotation",type:f.textRotation},{name:"source-text-margin-x",type:f.bidirectionalSize},{name:"source-text-margin-y",type:f.bidirectionalSize},{name:"source-text-offset",type:f.size},{name:"target-label",type:f.text},{name:"target-text-rotation",type:f.textRotation},{name:"target-text-margin-x",type:f.bidirectionalSize},{name:"target-text-margin-y",type:f.bidirectionalSize},{name:"target-text-offset",type:f.size},{name:"text-valign",type:f.valign},{name:"text-halign",type:f.halign},{name:"color",type:f.color},{name:"text-outline-color",type:f.color},{name:"text-outline-width",type:f.size},{name:"text-outline-opacity",type:f.zeroOneNumber},{name:"text-opacity",type:f.zeroOneNumber},{name:"text-background-color",type:f.color},{name:"text-background-opacity",type:f.zeroOneNumber},{name:"text-background-padding",type:f.size},{name:"text-border-opacity",type:f.zeroOneNumber},{name:"text-border-color",type:f.color},{name:"text-border-width",type:f.size},{name:"text-border-style",type:f.borderStyle},{name:"text-background-shape",type:f.textBackgroundShape},{name:"text-transform",type:f.textTransform},{name:"text-wrap",type:f.textWrap},{name:"text-max-width",type:f.size},{name:"text-events",type:f.bool},{name:"font-family",type:f.fontFamily},{name:"font-style",type:f.fontStyle},{name:"font-weight",type:f.fontWeight},{name:"font-size",type:f.size},{name:"min-zoomed-font-size",type:f.size},{name:"events",type:f.bool},{name:"display",type:f.display,triggersZOrder:p.anyDiff},{name:"visibility",type:f.visibility,triggersZOrder:p.anyDiff},{name:"opacity",type:f.zeroOneNumber,triggersZOrder:p.zeroNonZero},{name:"z-compound-depth",type:f.zCompoundDepth,triggersZOrder:p.anyDiff},{name:"z-index-compare",type:f.zIndexCompare,triggersZOrder:p.anyDiff},{name:"z-index",type:f.nonNegativeInt,triggersZOrder:p.anyDiff},{name:"overlay-padding",type:f.size},{name:"overlay-color",type:f.color},{name:"overlay-opacity",type:f.zeroOneNumber},{name:"transition-property",type:f.propList},{name:"transition-duration",type:f.time},{name:"transition-delay",type:f.time},{name:"transition-timing-function",type:f.easing},{name:"height",type:f.nodeSize},{name:"width",type:f.nodeSize},{name:"shape",type:f.nodeShape},{name:"shape-polygon-points",type:f.polygonPointList},{name:"background-color",type:f.color},{name:"background-opacity",type:f.zeroOneNumber},{name:"background-blacken",type:f.nOneOneNumber},{name:"padding",type:f.sizeMaybePercent},{name:"padding-relative-to",type:f.paddingRelativeTo},{name:"border-color",type:f.color},{name:"border-opacity",type:f.zeroOneNumber},{name:"border-width",type:f.size},{name:"border-style",type:f.borderStyle},{name:"background-image",type:f.urls},{name:"background-image-crossorigin",type:f.bgCrossOrigin},{name:"background-image-opacity",type:f.zeroOneNumbers},{name:"background-position-x",type:f.bgPos},{name:"background-position-y",type:f.bgPos},{name:"background-width-relative-to",type:f.bgRelativeTo},{name:"background-height-relative-to",type:f.bgRelativeTo},{name:"background-repeat",type:f.bgRepeat},{name:"background-fit",type:f.bgFit},{name:"background-clip",type:f.bgClip},{name:"background-width",type:f.bgWH},{name:"background-height",type:f.bgWH},{name:"position",type:f.position},{name:"compound-sizing-wrt-labels",type:f.compoundIncludeLabels},{name:"min-width",type:f.size},{name:"min-width-bias-left",type:f.sizeMaybePercent},{name:"min-width-bias-right",type:f.sizeMaybePercent},{name:"min-height",type:f.size},{name:"min-height-bias-top",type:f.sizeMaybePercent},{name:"min-height-bias-bottom",type:f.sizeMaybePercent},{name:"line-style",type:f.lineStyle},{name:"line-color",type:f.color},{name:"curve-style",type:f.curveStyle},{name:"haystack-radius",type:f.zeroOneNumber},{name:"source-endpoint",type:f.edgeEndpoint},{name:"target-endpoint",type:f.edgeEndpoint},{name:"control-point-step-size",type:f.size},{name:"control-point-distances",type:f.bidirectionalSizes},{name:"control-point-weights",type:f.numbers},{name:"segment-distances",type:f.bidirectionalSizes},{name:"segment-weights",type:f.numbers},{name:"edge-distances",type:f.edgeDistances},{name:"arrow-scale",type:f.positiveNumber},{name:"loop-direction",type:f.angle},{name:"loop-sweep",type:f.angle},{name:"source-distance-from-node",type:f.size},{name:"target-distance-from-node",type:f.size},{name:"selection-box-color",type:f.color},{name:"selection-box-opacity",type:f.zeroOneNumber},{name:"selection-box-border-color",type:f.color},{name:"selection-box-border-width",type:f.size},{name:"active-bg-color",type:f.color},{name:"active-bg-opacity",type:f.zeroOneNumber},{name:"active-bg-size",type:f.size},{name:"outside-texture-bg-color",type:f.color},{name:"outside-texture-bg-opacity",type:f.zeroOneNumber}],g=o.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];o.pieBackgroundN=16,h.push({name:"pie-size",type:f.sizeMaybePercent});for(var v=1;v<=o.pieBackgroundN;v++)h.push({name:"pie-"+v+"-background-color",type:f.color}),h.push({name:"pie-"+v+"-background-size",type:f.percent}),h.push({name:"pie-"+v+"-background-opacity",type:f.zeroOneNumber});var m=o.arrowPrefixes=["source","mid-source","target","mid-target"];for([{name:"arrow-shape",type:f.arrowShape},{name:"arrow-color",type:f.color},{name:"arrow-fill",type:f.arrowFill}].forEach((function(e){m.forEach((function(t){var n=t+"-"+e.name,r=e.type;h.push({name:n,type:r})}))}),{}),o.propertyNames=h.map((function(e){return e.name})),v=0;v<h.length;v++){var y=h[v];h[y.name]=y}for(v=0;v<g.length;v++){var C=g[v],b=h[C.pointsTo],x={name:C.name,alias:!0,pointsTo:b};h.push(x),h[C.name]=x}}(),o.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},o.getDefaultProperties=r.memoize((function(){for(var e=r.extend({events:"yes","text-events":"no","text-valign":"top","text-halign":"center",color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-position-x":"50%","background-position-y":"50%","background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1",padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce((function(e,t){for(var n=1;n<=o.pieBackgroundN;n++){var r=t.name.replace("{{i}}",n),i=t.value;e[r]=i}return e}),{}),{"line-style":"solid","line-color":"#999","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"edge-distances":"intersection","curve-style":"bezier","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node"},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"}].reduce((function(e,t){return o.arrowPrefixes.forEach((function(n){var r=n+"-"+t.name,i=t.value;e[r]=i})),e}),{})),t={},n=0;n<this.properties.length;n++){var i=this.properties[n];if(!i.pointsTo){var a=i.name,s=e[a],l=this.parse(a,s);t[a]=l}}return t})),o.addDefaultStylesheet=function(){this.selector("$node > node").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3,"curve-style":"haystack"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector("node:parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}).selector("core").css({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125}),this.defaultLength=this.length},t.exports=o},{"../is":91,"../util":108}],105:[function(e,t,n){"use strict";var r=e("../util"),i=e("../selector"),o={applyFromString:function(e){function t(){c=c.length>o.length?c.substr(o.length):""}function n(){a=a.length>s.length?a.substr(s.length):""}var o,a,s,l=this,u=this,c=""+e;for(c=c.replace(/[\/][*](\s|.)+?[*][\/]/g,"");!c.match(/^\s*$/);){var d=c.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!d){r.error("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+c);break}o=d[0];var p=d[1];if("core"!==p&&new i(p)._private.invalid)r.error("Skipping parsing of block: Invalid selector found in string stylesheet: "+p),t();else{var f=d[2],h=!1;a=f;for(var g=[];!a.match(/^\s*$/);){var v=a.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!v){r.error("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+f),h=!0;break}s=v[0];var m=v[1],y=v[2];(b=l.properties[m])?u.parse(m,y)?(g.push({name:m,val:y}),n()):(r.error("Skipping property: Invalid property definition in: "+s),n()):(r.error("Skipping property: Invalid property name in: "+s),n())}if(h){t();break}u.selector(p);for(var C=0;C<g.length;C++){var b=g[C];u.css(b.name,b.val)}t()}}return u},fromString:function(e){var t=this;return t.resetToDefault(),t.applyFromString(e),t}};t.exports=o},{"../selector":95,"../util":108}],106:[function(e,t,n){"use strict";var r=e("./is"),i=e("./util"),o=e("./style"),a=function(){return this instanceof a?void(this.length=0):new a},s=a.prototype;s.instanceString=function(){return"stylesheet"},s.selector=function(e){return this[this.length++]={selector:e,properties:[]},this},s.css=function(e,t){var n=this.length-1;if(r.string(e))this[n].properties.push({name:e,value:t});else if(r.plainObject(e))for(var a=e,s=0;s<o.properties.length;s++){var l=o.properties[s],u=a[l.name];void 0===u&&(u=a[i.dash2camel(l.name)]),void 0!==u&&(e=l.name,t=u,this[n].properties.push({name:e,value:t}))}return this},s.style=s.css,s.generateStyle=function(e){for(var t=new o(e),n=0;n<this.length;n++){var r=this[n],i=r.selector,a=r.properties;t.selector(i);for(var s=0;s<a.length;s++){var l=a[s];t.css(l.name,l.value)}}return t},t.exports=a},{"./is":91,"./style":101,"./util":108}],107:[function(e,t,n){"use strict";var r=e("../is");t.exports={hex2tuple:function(e){if((4===e.length||7===e.length)&&"#"===e[0]){var t,n,r,i=16;return 4===e.length?(t=parseInt(e[1]+e[1],i),n=parseInt(e[2]+e[2],i),r=parseInt(e[3]+e[3],i)):(t=parseInt(e[1]+e[2],i),n=parseInt(e[3]+e[4],i),r=parseInt(e[5]+e[6],i)),[t,n,r]}},hsl2tuple:function(e){function t(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var n,r,i,o,a,s,l,u,c=new RegExp("^"+this.regex.hsla+"$").exec(e);if(c){if((r=parseInt(c[1]))<0?r=(360- -1*r%360)%360:r>360&&(r%=360),r/=360,(i=parseFloat(c[2]))<0||i>100)return;if(i/=100,(o=parseFloat(c[3]))<0||o>100)return;if(o/=100,void 0!==(a=c[4])&&((a=parseFloat(a))<0||a>1))return;if(0===i)s=l=u=Math.round(255*o);else{var d=o<.5?o*(1+i):o+i-o*i,p=2*o-d;s=Math.round(255*t(p,d,r+1/3)),l=Math.round(255*t(p,d,r)),u=Math.round(255*t(p,d,r-1/3))}n=[s,l,u,a]}return n},rgb2tuple:function(e){var t,n=new RegExp("^"+this.regex.rgba+"$").exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var o=n[i];if("%"===o[o.length-1]&&(r[i]=!0),o=parseFloat(o),r[i]&&(o=o/100*255),o<0||o>255)return;t.push(Math.floor(o))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t},colorname2tuple:function(e){return this.colors[e.toLowerCase()]},color2tuple:function(e){return(r.array(e)?e:null)||this.colorname2tuple(e)||this.hex2tuple(e)||this.rgb2tuple(e)||this.hsl2tuple(e)},colors:{transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}},{"../is":91}],108:[function(e,t,n){"use strict";var r=e("../is"),i=e("../math"),o={trueify:function(){return!0},falsify:function(){return!1},zeroify:function(){return 0},noop:function(){},error:function(e){console.error?(console.error.apply(console,arguments),console.trace&&console.trace()):(console.log.apply(console,arguments),console.trace&&console.trace())},clone:function(e){return this.extend({},e)},copy:function(e){return null==e?e:r.array(e)?e.slice():r.plainObject(e)?this.clone(e):e},clonePosition:function(e){return{x:e.x,y:e.y}},uuid:function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t}};o.makeBoundingBox=i.makeBoundingBox.bind(i),o._staticEmptyObject={},o.staticEmptyObject=function(){return o._staticEmptyObject},o.extend=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n<t.length;n++){var r=t[n];if(r)for(var i=Object.keys(r),o=0;o<i.length;o++){var a=i[o];e[a]=r[a]}}return e},o.default=function(e,t){return void 0===e?t:e},o.removeFromArray=function(e,t,n){for(var r=e.length;r>=0&&(e[r]!==t||(e.splice(r,1),n));r--);},o.clearArray=function(e){e.splice(0,e.length)},o.push=function(e){var t=Array.prototype.slice.call(arguments,1);Array.prototype.push.apply(e,t)},o.getPrefixedProperty=function(e,t,n){return n&&(t=this.prependCamel(n,t)),e[t]},o.setPrefixedProperty=function(e,t,n,r){n&&(t=this.prependCamel(n,t)),e[t]=r},[e("./colors"),e("./maps"),{memoize:e("./memoize")},e("./regex"),e("./strings"),e("./timing"),e("./sort")].forEach((function(e){o.extend(o,e)})),t.exports=o},{"../is":91,"../math":93,"./colors":107,"./maps":109,"./memoize":110,"./regex":111,"./sort":112,"./strings":113,"./timing":114}],109:[function(e,t,n){"use strict";var r=e("../is");t.exports={mapEmpty:function(e){var t=!0;return null!=e?0===Object.keys(e).length:t},pushMap:function(e){var t=this.getMap(e);null==t?this.setMap(this.extend({},e,{value:[e.value]})):t.push(e.value)},setMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=0;o<i;o++){var a=n[o];r.plainObject(a)&&this.error("Tried to set map with object key"),o<n.length-1?(null==t[a]&&(t[a]={}),t=t[a]):t[a]=e.value}},getMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=0;o<i;o++){var a=n[o];if(r.plainObject(a)&&this.error("Tried to get map with object key"),null==(t=t[a]))return t}return t},deleteMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=e.keepChildren,a=0;a<i;a++){var s=n[a];if(r.plainObject(s)&&this.error("Tried to delete map with object key"),a===e.keys.length-1)if(o)for(var l=Object.keys(t),u=0;u<l.length;u++){var c=l[u];o[c]||(t[c]=void 0)}else t[s]=void 0;else t=t[s]}}}},{"../is":91}],110:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")});var n=function(){var r,i=this,o=arguments,a=t.apply(i,o),s=n.cache;return(r=s[a])||(r=s[a]=e.apply(i,o)),r};return n.cache={},n}},{}],111:[function(e,t,n){"use strict";var r="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",i="rgb[a]?\\(("+r+"[%]?)\\s*,\\s*("+r+"[%]?)\\s*,\\s*("+r+"[%]?)(?:\\s*,\\s*("+r+"))?\\)",o="rgb[a]?\\((?:"+r+"[%]?)\\s*,\\s*(?:"+r+"[%]?)\\s*,\\s*(?:"+r+"[%]?)(?:\\s*,\\s*(?:"+r+"))?\\)",a="hsl[a]?\\(("+r+")\\s*,\\s*("+r+"[%])\\s*,\\s*("+r+"[%])(?:\\s*,\\s*("+r+"))?\\)",s="hsl[a]?\\((?:"+r+")\\s*,\\s*(?:"+r+"[%])\\s*,\\s*(?:"+r+"[%])(?:\\s*,\\s*(?:"+r+"))?\\)",l="\\#[0-9a-fA-F]{3}",u="\\#[0-9a-fA-F]{6}";t.exports={regex:{number:r,rgba:i,rgbaNoBackRefs:o,hsla:a,hslaNoBackRefs:s,hex3:l,hex6:u}}},{}],112:[function(e,t,n){function r(e,t){return e<t?-1:e>t?1:0}function i(e,t){return-1*r(e,t)}t.exports={sort:{ascending:r,descending:i}}},{}],113:[function(e,t,n){"use strict";var r=e("./memoize"),i=e("../is");t.exports={camel2dash:r((function(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))})),dash2camel:r((function(e){return e.replace(/(-\w)/g,(function(e){return e[1].toUpperCase()}))})),prependCamel:r((function(e,t){return e+t[0].toUpperCase()+t.substring(1)}),(function(e,t){return e+"$"+t})),capitalize:function(e){return i.emptyString(e)?e:e.charAt(0).toUpperCase()+e.substring(1)}}},{"../is":91,"./memoize":110}],114:[function(e,t,n){"use strict";var r=e("../window"),i=e("../is"),o=r?r.performance:null,a={},s=o&&o.now?function(){return o.now()}:function(){return Date.now()},l=function(){if(r){if(r.requestAnimationFrame)return function(e){r.requestAnimationFrame(e)};if(r.mozRequestAnimationFrame)return function(e){r.mozRequestAnimationFrame(e)};if(r.webkitRequestAnimationFrame)return function(e){r.webkitRequestAnimationFrame(e)};if(r.msRequestAnimationFrame)return function(e){r.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(s())}),1e3/60)}}();a.requestAnimationFrame=function(e){l(e)},a.performanceNow=s,a.throttle=function(e,t,n){var r=!0,o=!0;return!1===n?r=!1:i.plainObject(n)&&(r="leading"in n?n.leading:r,o="trailing"in n?n.trailing:o),(n=n||{}).leading=r,n.maxWait=t,n.trailing=o,a.debounce(e,t,n)},a.now=function(){return Date.now()},a.debounce=function(e,t,n){var r,o,a,s,l,u,c,d=this,p=0,f=!1,h=!0;if(i.fn(e)){if(t=Math.max(0,t)||0,!0===n){var g=!0;h=!1}else i.plainObject(n)&&(g=n.leading,f="maxWait"in n&&(Math.max(t,n.maxWait)||0),h="trailing"in n?n.trailing:h);var v=function(){var n=t-(d.now()-s);if(n<=0){o&&clearTimeout(o);var i=c;o=u=c=void 0,i&&(p=d.now(),a=e.apply(l,r),u||o||(r=l=null))}else u=setTimeout(v,n)},m=function(){u&&clearTimeout(u),o=u=c=void 0,(h||f!==t)&&(p=d.now(),a=e.apply(l,r),u||o||(r=l=null))};return function(){if(r=arguments,s=d.now(),l=this,c=h&&(u||!g),!1===f)var n=g&&!u;else{o||g||(p=s);var i=f-(s-p),y=i<=0;y?(o&&(o=clearTimeout(o)),p=s,a=e.apply(l,r)):o||(o=setTimeout(m,i))}return y&&u?u=clearTimeout(u):u||t===f||(u=setTimeout(v,t)),n&&(y=!0,a=e.apply(l,r)),!y||u||o||(r=l=null),a}}},t.exports=a},{"../is":91,"../window":116}],115:[function(e,t,n){t.exports="3.1.0"},{}],116:[function(e,t,n){t.exports="undefined"==typeof window?null:window},{}]},{},[90])(90)},321:function(e,t,n){var r=r||{};r.scope={},r.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},r.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:void 0!==n.g&&null!=n.g?n.g:e},r.global=r.getGlobal(this),r.polyfill=function(e,t,n,i){if(t){for(n=r.global,e=e.split("."),i=0;i<e.length-1;i++){var o=e[i];o in n||(n[o]={}),n=n[o]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&r.defineProperty(n,e,{configurable:!0,writable:!0,value:t})}},r.polyfill("Object.setPrototypeOf",(function(e){return e||("object"!=typeof"".__proto__?null:function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e})}),"es6","es5");var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function a(e){if(!e)return a.__;Array.prototype.reduce||(Array.prototype.reduce=function(e,t){for(var n=t,r=0;r<this.length;r++)n=e(n,this[r],r,this);return n});var t="";return("."+e).split(".").reduce((function(e,n,r,i){return void 0===(n=e["__"+(t=t?t+"."+n:n)])&&(a.Logger.prototype=e,n=new a.Logger(t),e["__"+t]=n),n}),a.__)}!function(e){function t(e,t,n){void 0!==t[e]&&(null===t[e]?delete n[e]:n[e]=t[e])}function n(t){if(null!=e.enabled&&!e.enabled||null!=e.maxMessages&&1>e.maxMessages)return!1;try{if(t.userAgentRegex&&!new RegExp(t.userAgentRegex).test(navigator.userAgent))return!1}catch(e){}try{if(t.ipRegex&&e.clientIP&&!new RegExp(t.ipRegex).test(e.clientIP))return!1}catch(e){}return!0}function r(e,t){try{if(e.disallow&&new RegExp(e.disallow).test(t))return!1}catch(e){}return!0}function i(e){return"function"==typeof e?e instanceof RegExp?e.toString():e():e}function a(t){switch(typeof(t=i(t))){case"string":return new s(t,null,t);case"number":var n=t.toString();return new s(n,null,n);case"boolean":return n=t.toString(),new s(n,null,n);case"undefined":return new s("undefined",null,"undefined");case"object":return t instanceof RegExp||t instanceof String||t instanceof Number||t instanceof Boolean?(n=t.toString(),new s(n,null,n)):(n="function"==typeof e.serialize?e.serialize.call(this,t):JSON.stringify(t),new s(null,t,n));default:return new s("unknown",null,"unknown")}}e.requestId="";var s=function(e,t,n){this.msg=e,this.meta=t,this.finalString=n};e.setOptions=function(e){return t("enabled",e,this),t("maxMessages",e,this),t("defaultAjaxUrl",e,this),t("clientIP",e,this),t("requestId",e,this),t("defaultBeforeSend",e,this),t("serialize",e,this),this},e.getAllLevel=function(){return-2147483648},e.getTraceLevel=function(){return 1e3},e.getDebugLevel=function(){return 2e3},e.getInfoLevel=function(){return 3e3},e.getWarnLevel=function(){return 4e3},e.getErrorLevel=function(){return 5e3},e.getFatalLevel=function(){return 6e3},e.getOffLevel=function(){return 2147483647};var l=function(e,t){this.inner=t,this.name="JL.Exception",this.message=a(e).finalString};e.Exception=l,l.prototype=Error();var u=function(e,t,n,r){this.l=e,this.m=t,this.n=n,this.t=r};e.LogItem=u,l=function(){function i(t,n){this.appenderName=t,this.sendLogItems=n,this.level=e.getTraceLevel(),this.sendWithBufferLevel=2147483647,this.storeInBufferLevel=-2147483648,this.bufferSize=0,this.batchSize=1,this.batchTimeout=2147483647,this.buffer=[],this.batchBuffer=[],this.batchTimeoutTimer=null}return i.prototype.clearTimeoutTimer=function(){this.batchTimeoutTimer&&(clearTimeout(this.batchTimeoutTimer),this.batchTimeoutTimer=null)},i.prototype.addLogItemToBuffer=function(e){this.batchBuffer.push(e);var t=this;this.batchTimeoutTimer||(this.batchTimeoutTimer=setTimeout((function(){t.sendBatch.call(t)}),this.batchTimeout))},i.prototype.setOptions=function(e){return t("level",e,this),t("ipRegex",e,this),t("userAgentRegex",e,this),t("disallow",e,this),t("sendWithBufferLevel",e,this),t("storeInBufferLevel",e,this),t("bufferSize",e,this),t("batchSize",e,this),t("batchTimeout",e,this),this.bufferSize<this.buffer.length&&(this.buffer.length=this.bufferSize),this},i.prototype.log=function(e,t,i,o,a,s,l){!n(this)||!r(this,s)||a<this.storeInBufferLevel||(e=new u(a,s,l,(new Date).getTime()),a<this.level?0<this.bufferSize&&(this.buffer.push(e),this.buffer.length>this.bufferSize&&this.buffer.shift()):(a<this.sendWithBufferLevel||!this.buffer.length||(this.batchBuffer=this.batchBuffer.concat(this.buffer),this.buffer.length=0),this.addLogItemToBuffer(e),this.batchBuffer.length>=this.batchSize&&this.sendBatch()))},i.prototype.sendBatch=function(){this.clearTimeoutTimer(),0==this.batchBuffer.length||null!=e.maxMessages&&1>e.maxMessages||(null!=e.maxMessages&&(e.maxMessages-=this.batchBuffer.length),this.sendLogItems(this.batchBuffer),this.batchBuffer.length=0)},i}(),e.Appender=l;var c=function(n){function r(e){return n.call(this,e,r.prototype.sendLogItemsAjax)||this}return o(r,n),r.prototype.setOptions=function(e){return t("url",e,this),t("beforeSend",e,this),n.prototype.setOptions.call(this,e),this},r.prototype.sendLogItemsAjax=function(t){try{var n="/jsnlog.logger";null!=e.defaultAjaxUrl&&(n=e.defaultAjaxUrl),this.url&&(n=this.url);var r=this.getXhr(n),i={r:e.requestId,lg:t};"function"==typeof this.beforeSend?this.beforeSend.call(this,r,i):"function"==typeof e.defaultBeforeSend&&e.defaultBeforeSend.call(this,r,i);var o=JSON.stringify(i);r.send(o)}catch(e){}},r.prototype.getXhr=function(t){var n=new XMLHttpRequest;return"withCredentials"in n||"undefined"==typeof XDomainRequest?(n.open("POST",t),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("JSNLog-RequestId",e.requestId),n):((n=new XDomainRequest).open("POST",t),n)},r}(l);e.AjaxAppender=c;var d=function(t){function n(e){return t.call(this,e,n.prototype.sendLogItemsConsole)||this}return o(n,t),n.prototype.clog=function(e){console.log(e)},n.prototype.cerror=function(e){console.error?console.error(e):this.clog(e)},n.prototype.cwarn=function(e){console.warn?console.warn(e):this.clog(e)},n.prototype.cinfo=function(e){console.info?console.info(e):this.clog(e)},n.prototype.cdebug=function(e){console.debug?console.debug(e):this.cinfo(e)},n.prototype.sendLogItemsConsole=function(t){try{var n;if(console)for(n=0;n<t.length;++n){var r=t[n],i=r.n+": "+r.m;"undefined"==typeof window&&(i=new Date(r.t)+" | "+i),r.l<=e.getDebugLevel()?this.cdebug(i):r.l<=e.getInfoLevel()?this.cinfo(i):r.l<=e.getWarnLevel()?this.cwarn(i):this.cerror(i)}}catch(e){}},n}(l);e.ConsoleAppender=d,l=function(){function e(e){this.loggerName=e,this.seenRegexes=[]}return e.prototype.setOptions=function(e){return t("level",e,this),t("userAgentRegex",e,this),t("disallow",e,this),t("ipRegex",e,this),t("appenders",e,this),t("onceOnly",e,this),this.seenRegexes=[],this},e.prototype.buildExceptionObject=function(e){var t={};return e.stack?t.stack=e.stack:t.e=e,e.message&&(t.message=e.message),e.name&&(t.name=e.name),e.data&&(t.data=e.data),e.inner&&(t.inner=this.buildExceptionObject(e.inner)),t},e.prototype.log=function(e,t,o){var s=0;if(!this.appenders)return this;if(e>=this.level&&n(this)&&(o?(s=this.buildExceptionObject(o)).logData=i(t):s=t,r(this,(t=a(s)).finalString))){if(this.onceOnly)for(s=this.onceOnly.length-1;0<=s;){if(new RegExp(this.onceOnly[s]).test(t.finalString)){if(this.seenRegexes[s])return this;this.seenRegexes[s]=!0}s--}for(t.meta=t.meta||{},t.meta.loggerName=this.loggerName,s=this.appenders.length-1;0<=s;)this.appenders[s].log(1e3>=e?"trace":2e3>=e?"debug":3e3>=e?"info":4e3>=e?"warn":5e3>=e?"error":"fatal",t.msg,t.meta,(function(){}),e,t.finalString,this.loggerName),s--}return this},e.prototype.trace=function(e){return this.log(1e3,e)},e.prototype.debug=function(e){return this.log(2e3,e)},e.prototype.info=function(e){return this.log(3e3,e)},e.prototype.warn=function(e){return this.log(4e3,e)},e.prototype.error=function(e){return this.log(5e3,e)},e.prototype.fatal=function(e){return this.log(6e3,e)},e.prototype.fatalException=function(e,t){return this.log(6e3,e,t)},e}(),e.Logger=l,e.createAjaxAppender=function(e){return new c(e)},e.createConsoleAppender=function(e){return new d(e)},l=new c(""),"undefined"==typeof window&&(l=new d("")),e.__=new e.Logger(""),e.__.setOptions({level:e.getDebugLevel(),appenders:[l]})}(a||(a={})),t.JL=a,"function"==typeof __jsnlog_configure&&__jsnlog_configure(a),"undefined"==typeof window||window.onerror||(window.onerror=function(e,t,n,r,i){return a("onerrorLogger").fatalException({msg:"Uncaught Exception",errorMsg:e,url:t,"line number":n,column:r},i),!1}),"undefined"==typeof window||window.onunhandledrejection||(window.onunhandledrejection=function(e){a("onerrorLogger").fatalException({msg:"unhandledrejection",errorMsg:e.reason?e.reason.message:null},e.reason)})},677:(e,t,n)=>{var r;e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){var n=t[a][1][e];return i(n||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({"./aesprim":[function(e,t,n){!function(e,t){"use strict";"function"==typeof r&&r.amd?r(["exports"],t):t(void 0!==n?n:e.esprima={})}(this,(function(e){"use strict";function t(e,t){if(!e)throw new Error("ASSERT: "+t)}function n(e){return e>=48&&e<=57}function r(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function i(e){return"01234567".indexOf(e)>=0}function o(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function a(e){return 10===e||13===e||8232===e||8233===e}function s(e){return 64==e||36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&it.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function l(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&it.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function u(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function c(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function d(e){return"eval"===e||"arguments"===e}function p(e){if(st&&c(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function f(e,n,r,i,o){var a;t("number"==typeof r,"Comment must have valid position"),ht.lastCommentStart>=r||(ht.lastCommentStart=r,a={type:e,value:n},gt.range&&(a.range=[r,i]),gt.loc&&(a.loc=o),gt.comments.push(a),gt.attachComment&&(gt.leadingComments.push(a),gt.trailingComments.push(a)))}function h(e){var t,n,r,i;for(t=lt-e,n={start:{line:ut,column:lt-ct-e}};lt<dt;)if(r=at.charCodeAt(lt),++lt,a(r))return gt.comments&&(i=at.slice(t+e,lt-1),n.end={line:ut,column:lt-ct-1},f("Line",i,t,lt-1,n)),13===r&&10===at.charCodeAt(lt)&&++lt,++ut,void(ct=lt);gt.comments&&(i=at.slice(t+e,lt),n.end={line:ut,column:lt-ct},f("Line",i,t,lt,n))}function g(){var e,t,n,r;for(gt.comments&&(e=lt-2,t={start:{line:ut,column:lt-ct-2}});lt<dt;)if(a(n=at.charCodeAt(lt)))13===n&&10===at.charCodeAt(lt+1)&&++lt,++ut,++lt,ct=lt,lt>=dt&&j({},rt.UnexpectedToken,"ILLEGAL");else if(42===n){if(47===at.charCodeAt(lt+1))return++lt,++lt,void(gt.comments&&(r=at.slice(e+2,lt-2),t.end={line:ut,column:lt-ct},f("Block",r,e,lt,t)));++lt}else++lt;j({},rt.UnexpectedToken,"ILLEGAL")}function v(){var e,t;for(t=0===lt;lt<dt;)if(o(e=at.charCodeAt(lt)))++lt;else if(a(e))++lt,13===e&&10===at.charCodeAt(lt)&&++lt,++ut,ct=lt,t=!0;else if(47===e)if(47===(e=at.charCodeAt(lt+1)))++lt,++lt,h(2),t=!0;else{if(42!==e)break;++lt,++lt,g()}else if(t&&45===e){if(45!==at.charCodeAt(lt+1)||62!==at.charCodeAt(lt+2))break;lt+=3,h(3)}else{if(60!==e)break;if("!--"!==at.slice(lt+1,lt+4))break;++lt,++lt,++lt,++lt,h(4)}}function m(e){var t,n,i,o=0;for(n="u"===e?4:2,t=0;t<n;++t){if(!(lt<dt&&r(at[lt])))return"";i=at[lt++],o=16*o+"0123456789abcdef".indexOf(i.toLowerCase())}return String.fromCharCode(o)}function y(){var e,t;for(e=at.charCodeAt(lt++),t=String.fromCharCode(e),92===e&&(117!==at.charCodeAt(lt)&&j({},rt.UnexpectedToken,"ILLEGAL"),++lt,(e=m("u"))&&"\\"!==e&&s(e.charCodeAt(0))||j({},rt.UnexpectedToken,"ILLEGAL"),t=e);lt<dt&&l(e=at.charCodeAt(lt));)++lt,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==at.charCodeAt(lt)&&j({},rt.UnexpectedToken,"ILLEGAL"),++lt,(e=m("u"))&&"\\"!==e&&l(e.charCodeAt(0))||j({},rt.UnexpectedToken,"ILLEGAL"),t+=e);return t}function C(){var e,t;for(e=lt++;lt<dt;){if(92===(t=at.charCodeAt(lt)))return lt=e,y();if(!l(t))break;++lt}return at.slice(e,lt)}function b(){var e,t;return e=lt,{type:1===(t=92===at.charCodeAt(lt)?y():C()).length?Qe.Identifier:p(t)?Qe.Keyword:"null"===t?Qe.NullLiteral:"true"===t||"false"===t?Qe.BooleanLiteral:Qe.Identifier,value:t,lineNumber:ut,lineStart:ct,start:e,end:lt}}function x(){var e,t,n,r,i=lt,o=at.charCodeAt(lt),a=at[lt];switch(o){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++lt,gt.tokenize&&(40===o?gt.openParenToken=gt.tokens.length:123===o&&(gt.openCurlyToken=gt.tokens.length)),{type:Qe.Punctuator,value:String.fromCharCode(o),lineNumber:ut,lineStart:ct,start:i,end:lt};default:if(61===(e=at.charCodeAt(lt+1)))switch(o){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return lt+=2,{type:Qe.Punctuator,value:String.fromCharCode(o)+String.fromCharCode(e),lineNumber:ut,lineStart:ct,start:i,end:lt};case 33:case 61:return lt+=2,61===at.charCodeAt(lt)&&++lt,{type:Qe.Punctuator,value:at.slice(i,lt),lineNumber:ut,lineStart:ct,start:i,end:lt}}}return">>>="===(r=at.substr(lt,4))?(lt+=4,{type:Qe.Punctuator,value:r,lineNumber:ut,lineStart:ct,start:i,end:lt}):">>>"===(n=r.substr(0,3))||"<<="===n||">>="===n?(lt+=3,{type:Qe.Punctuator,value:n,lineNumber:ut,lineStart:ct,start:i,end:lt}):a===(t=n.substr(0,2))[1]&&"+-<>&|".indexOf(a)>=0||"=>"===t?(lt+=2,{type:Qe.Punctuator,value:t,lineNumber:ut,lineStart:ct,start:i,end:lt}):"<>=!+-*%&|^/".indexOf(a)>=0?(++lt,{type:Qe.Punctuator,value:a,lineNumber:ut,lineStart:ct,start:i,end:lt}):void j({},rt.UnexpectedToken,"ILLEGAL")}function S(e){for(var t="";lt<dt&&r(at[lt]);)t+=at[lt++];return 0===t.length&&j({},rt.UnexpectedToken,"ILLEGAL"),s(at.charCodeAt(lt))&&j({},rt.UnexpectedToken,"ILLEGAL"),{type:Qe.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:ut,lineStart:ct,start:e,end:lt}}function E(e){for(var t="0"+at[lt++];lt<dt&&i(at[lt]);)t+=at[lt++];return(s(at.charCodeAt(lt))||n(at.charCodeAt(lt)))&&j({},rt.UnexpectedToken,"ILLEGAL"),{type:Qe.NumericLiteral,value:parseInt(t,8),octal:!0,lineNumber:ut,lineStart:ct,start:e,end:lt}}function w(){var e,r,o;if(t(n((o=at[lt]).charCodeAt(0))||"."===o,"Numeric literal must start with a decimal digit or a decimal point"),r=lt,e="","."!==o){if(e=at[lt++],o=at[lt],"0"===e){if("x"===o||"X"===o)return++lt,S(r);if(i(o))return E(r);o&&n(o.charCodeAt(0))&&j({},rt.UnexpectedToken,"ILLEGAL")}for(;n(at.charCodeAt(lt));)e+=at[lt++];o=at[lt]}if("."===o){for(e+=at[lt++];n(at.charCodeAt(lt));)e+=at[lt++];o=at[lt]}if("e"===o||"E"===o)if(e+=at[lt++],"+"!==(o=at[lt])&&"-"!==o||(e+=at[lt++]),n(at.charCodeAt(lt)))for(;n(at.charCodeAt(lt));)e+=at[lt++];else j({},rt.UnexpectedToken,"ILLEGAL");return s(at.charCodeAt(lt))&&j({},rt.UnexpectedToken,"ILLEGAL"),{type:Qe.NumericLiteral,value:parseFloat(e),lineNumber:ut,lineStart:ct,start:r,end:lt}}function O(){var e,n,r,o,s,l,u,c,d="",p=!1;for(u=ut,c=ct,t("'"===(e=at[lt])||'"'===e,"String literal must starts with a quote"),n=lt,++lt;lt<dt;){if((r=at[lt++])===e){e="";break}if("\\"===r)if((r=at[lt++])&&a(r.charCodeAt(0)))++ut,"\r"===r&&"\n"===at[lt]&&++lt,ct=lt;else switch(r){case"u":case"x":l=lt,(s=m(r))?d+=s:(lt=l,d+=r);break;case"n":d+="\n";break;case"r":d+="\r";break;case"t":d+="\t";break;case"b":d+="\b";break;case"f":d+="\f";break;case"v":d+="\v";break;default:i(r)?(0!==(o="01234567".indexOf(r))&&(p=!0),lt<dt&&i(at[lt])&&(p=!0,o=8*o+"01234567".indexOf(at[lt++]),"0123".indexOf(r)>=0&&lt<dt&&i(at[lt])&&(o=8*o+"01234567".indexOf(at[lt++]))),d+=String.fromCharCode(o)):d+=r}else{if(a(r.charCodeAt(0)))break;d+=r}}return""!==e&&j({},rt.UnexpectedToken,"ILLEGAL"),{type:Qe.StringLiteral,value:d,octal:p,startLineNumber:u,startLineStart:c,lineNumber:ut,lineStart:ct,start:n,end:lt}}function _(e,t){var n;try{n=new RegExp(e,t)}catch(e){j({},rt.InvalidRegExp)}return n}function L(){var e,n,r,i;for(t("/"===(e=at[lt]),"Regular expression literal must start with a slash"),n=at[lt++],r=!1,i=!1;lt<dt;)if(n+=e=at[lt++],"\\"===e)a((e=at[lt++]).charCodeAt(0))&&j({},rt.UnterminatedRegExp),n+=e;else if(a(e.charCodeAt(0)))j({},rt.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){i=!0;break}"["===e&&(r=!0)}return i||j({},rt.UnterminatedRegExp),{value:n.substr(1,n.length-2),literal:n}}function R(){var e,t,n,r;for(t="",n="";lt<dt&&l((e=at[lt]).charCodeAt(0));)if(++lt,"\\"===e&&lt<dt)if("u"===(e=at[lt])){if(r=++lt,e=m("u"))for(n+=e,t+="\\u";r<lt;++r)t+=at[r];else lt=r,n+="u",t+="\\u";F({},rt.UnexpectedToken,"ILLEGAL")}else t+="\\",F({},rt.UnexpectedToken,"ILLEGAL");else n+=e,t+=e;return{value:n,literal:t}}function D(){var e,t,n,r;return ft=null,v(),e=lt,t=L(),n=R(),r=_(t.value,n.value),gt.tokenize?{type:Qe.RegularExpression,value:r,lineNumber:ut,lineStart:ct,start:e,end:lt}:{literal:t.literal+n.literal,value:r,start:e,end:lt}}function N(){var e,t,n,r;return v(),e=lt,t={start:{line:ut,column:lt-ct}},n=D(),t.end={line:ut,column:lt-ct},gt.tokenize||(gt.tokens.length>0&&(r=gt.tokens[gt.tokens.length-1]).range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||gt.tokens.pop()),gt.tokens.push({type:"RegularExpression",value:n.literal,range:[e,lt],loc:t})),n}function I(e){return e.type===Qe.Identifier||e.type===Qe.Keyword||e.type===Qe.BooleanLiteral||e.type===Qe.NullLiteral}function A(){var e,t;if(!(e=gt.tokens[gt.tokens.length-1]))return N();if("Punctuator"===e.type){if("]"===e.value)return x();if(")"===e.value)return!(t=gt.tokens[gt.openParenToken-1])||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?x():N();if("}"===e.value){if(gt.tokens[gt.openCurlyToken-3]&&"Keyword"===gt.tokens[gt.openCurlyToken-3].type){if(!(t=gt.tokens[gt.openCurlyToken-4]))return x()}else{if(!gt.tokens[gt.openCurlyToken-4]||"Keyword"!==gt.tokens[gt.openCurlyToken-4].type)return x();if(!(t=gt.tokens[gt.openCurlyToken-5]))return N()}return et.indexOf(t.value)>=0?x():N()}return N()}return"Keyword"===e.type?N():x()}function M(){var e;return v(),lt>=dt?{type:Qe.EOF,lineNumber:ut,lineStart:ct,start:lt,end:lt}:s(e=at.charCodeAt(lt))?b():40===e||41===e||59===e?x():39===e||34===e?O():46===e?n(at.charCodeAt(lt+1))?w():x():n(e)?w():gt.tokenize&&47===e?A():x()}function P(){var e,t,n;return v(),e={start:{line:ut,column:lt-ct}},t=M(),e.end={line:ut,column:lt-ct},t.type!==Qe.EOF&&(n=at.slice(t.start,t.end),gt.tokens.push({type:Je[t.type],value:n,range:[t.start,t.end],loc:e})),t}function k(){var e;return lt=(e=ft).end,ut=e.lineNumber,ct=e.lineStart,ft=void 0!==gt.tokens?P():M(),lt=e.end,ut=e.lineNumber,ct=e.lineStart,e}function T(){var e,t,n;e=lt,t=ut,n=ct,ft=void 0!==gt.tokens?P():M(),lt=e,ut=t,ct=n}function V(e,t){this.line=e,this.column=t}function B(e,t,n,r){this.start=new V(e,t),this.end=new V(n,r)}function z(){var e,t,n,r;return e=lt,t=ut,n=ct,v(),r=ut!==t,lt=e,ut=t,ct=n,r}function j(e,n){var r,i=Array.prototype.slice.call(arguments,2),o=n.replace(/%(\d)/g,(function(e,n){return t(n<i.length,"Message reference must be in range"),i[n]}));throw"number"==typeof e.lineNumber?((r=new Error("Line "+e.lineNumber+": "+o)).index=e.start,r.lineNumber=e.lineNumber,r.column=e.start-ct+1):((r=new Error("Line "+ut+": "+o)).index=lt,r.lineNumber=ut,r.column=lt-ct+1),r.description=o,r}function F(){try{j.apply(null,arguments)}catch(e){if(!gt.errors)throw e;gt.errors.push(e)}}function G(e){if(e.type===Qe.EOF&&j(e,rt.UnexpectedEOS),e.type===Qe.NumericLiteral&&j(e,rt.UnexpectedNumber),e.type===Qe.StringLiteral&&j(e,rt.UnexpectedString),e.type===Qe.Identifier&&j(e,rt.UnexpectedIdentifier),e.type===Qe.Keyword){if(u(e.value))j(e,rt.UnexpectedReserved);else if(st&&c(e.value))return void F(e,rt.StrictReservedWord);j(e,rt.UnexpectedToken,e.value)}j(e,rt.UnexpectedToken,e.value)}function U(e){var t=k();t.type===Qe.Punctuator&&t.value===e||G(t)}function q(e){var t=k();t.type===Qe.Keyword&&t.value===e||G(t)}function W(e){return ft.type===Qe.Punctuator&&ft.value===e}function $(e){return ft.type===Qe.Keyword&&ft.value===e}function H(){var e;return ft.type===Qe.Punctuator&&("="===(e=ft.value)||"*="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function X(){var e;return 59===at.charCodeAt(lt)||W(";")?void k():(e=ut,v(),void(ut===e&&(ft.type===Qe.EOF||W("}")||G(ft))))}function Y(e){return e.type===tt.Identifier||e.type===tt.MemberExpression}function K(){var e,t=[];for(e=ft,U("[");!W("]");)W(",")?(k(),t.push(null)):(t.push(ge()),W("]")||U(","));return k(),pt.markEnd(pt.createArrayExpression(t),e)}function Z(e,t){var n,r,i;return n=st,i=ft,r=Ge(),t&&st&&d(e[0].name)&&F(t,rt.StrictParamName),st=n,pt.markEnd(pt.createFunctionExpression(null,e,[],r),i)}function Q(){var e,t;return t=ft,(e=k()).type===Qe.StringLiteral||e.type===Qe.NumericLiteral?(st&&e.octal&&F(e,rt.StrictOctalLiteral),pt.markEnd(pt.createLiteral(e),t)):pt.markEnd(pt.createIdentifier(e.value),t)}function J(){var e,t,n,r,i,o;return o=ft,(e=ft).type===Qe.Identifier?(n=Q(),"get"!==e.value||W(":")?"set"!==e.value||W(":")?(U(":"),r=ge(),pt.markEnd(pt.createProperty("init",n,r),o)):(t=Q(),U("("),(e=ft).type!==Qe.Identifier?(U(")"),F(e,rt.UnexpectedToken,e.value),r=Z([])):(i=[Ce()],U(")"),r=Z(i,e)),pt.markEnd(pt.createProperty("set",t,r),o)):(t=Q(),U("("),U(")"),r=Z([]),pt.markEnd(pt.createProperty("get",t,r),o))):e.type!==Qe.EOF&&e.type!==Qe.Punctuator?(t=Q(),U(":"),r=ge(),pt.markEnd(pt.createProperty("init",t,r),o)):void G(e)}function ee(){var e,t,n,r,i,o=[],a={},s=String;for(i=ft,U("{");!W("}");)t=(e=J()).key.type===tt.Identifier?e.key.name:s(e.key.value),r="init"===e.kind?nt.Data:"get"===e.kind?nt.Get:nt.Set,n="$"+t,Object.prototype.hasOwnProperty.call(a,n)?(a[n]===nt.Data?st&&r===nt.Data?F({},rt.StrictDuplicateProperty):r!==nt.Data&&F({},rt.AccessorDataProperty):r===nt.Data?F({},rt.AccessorDataProperty):a[n]&r&&F({},rt.AccessorGetSet),a[n]|=r):a[n]=r,o.push(e),W("}")||U(",");return U("}"),pt.markEnd(pt.createObjectExpression(o),i)}function te(){var e;return U("("),e=ve(),U(")"),e}function ne(){var e,t,n,r;if(W("("))return te();if(W("["))return K();if(W("{"))return ee();if(e=ft.type,r=ft,e===Qe.Identifier)n=pt.createIdentifier(k().value);else if(e===Qe.StringLiteral||e===Qe.NumericLiteral)st&&ft.octal&&F(ft,rt.StrictOctalLiteral),n=pt.createLiteral(k());else if(e===Qe.Keyword){if($("function"))return We();$("this")?(k(),n=pt.createThisExpression()):G(k())}else e===Qe.BooleanLiteral?((t=k()).value="true"===t.value,n=pt.createLiteral(t)):e===Qe.NullLiteral?((t=k()).value=null,n=pt.createLiteral(t)):W("/")||W("/=")?(n=void 0!==gt.tokens?pt.createLiteral(N()):pt.createLiteral(D()),T()):G(k());return pt.markEnd(n,r)}function re(){var e=[];if(U("("),!W(")"))for(;lt<dt&&(e.push(ge()),!W(")"));)U(",");return U(")"),e}function ie(){var e,t;return t=ft,I(e=k())||G(e),pt.markEnd(pt.createIdentifier(e.value),t)}function oe(){return U("."),ie()}function ae(){var e;return U("["),e=ve(),U("]"),e}function se(){var e,t,n;return n=ft,q("new"),e=ue(),t=W("(")?re():[],pt.markEnd(pt.createNewExpression(e,t),n)}function le(){var e,t,n,r,i;for(i=ft,e=ht.allowIn,ht.allowIn=!0,t=$("new")?se():ne(),ht.allowIn=e;;){if(W("."))r=oe(),t=pt.createMemberExpression(".",t,r);else if(W("("))n=re(),t=pt.createCallExpression(t,n);else{if(!W("["))break;r=ae(),t=pt.createMemberExpression("[",t,r)}pt.markEnd(t,i)}return t}function ue(){var e,t,n,r;for(r=ft,e=ht.allowIn,t=$("new")?se():ne(),ht.allowIn=e;W(".")||W("[");)W("[")?(n=ae(),t=pt.createMemberExpression("[",t,n)):(n=oe(),t=pt.createMemberExpression(".",t,n)),pt.markEnd(t,r);return t}function ce(){var e,t,n=ft;return e=le(),ft.type===Qe.Punctuator&&(!W("++")&&!W("--")||z()||(st&&e.type===tt.Identifier&&d(e.name)&&F({},rt.StrictLHSPostfix),Y(e)||F({},rt.InvalidLHSInAssignment),t=k(),e=pt.markEnd(pt.createPostfixExpression(t.value,e),n))),e}function de(){var e,t,n;return ft.type!==Qe.Punctuator&&ft.type!==Qe.Keyword?t=ce():W("++")||W("--")?(n=ft,e=k(),t=de(),st&&t.type===tt.Identifier&&d(t.name)&&F({},rt.StrictLHSPrefix),Y(t)||F({},rt.InvalidLHSInAssignment),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n)):W("+")||W("-")||W("~")||W("!")?(n=ft,e=k(),t=de(),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n)):$("delete")||$("void")||$("typeof")?(n=ft,e=k(),t=de(),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n),st&&"delete"===t.operator&&t.argument.type===tt.Identifier&&F({},rt.StrictDelete)):t=ce(),t}function pe(e,t){var n=0;if(e.type!==Qe.Punctuator&&e.type!==Qe.Keyword)return 0;switch(e.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=t?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function fe(){var e,t,n,r,i,o,a,s,l,u;if(e=ft,l=de(),0===(i=pe(r=ft,ht.allowIn)))return l;for(r.prec=i,k(),t=[e,ft],o=[l,r,a=de()];(i=pe(ft,ht.allowIn))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,l=o.pop(),n=pt.createBinaryExpression(s,l,a),t.pop(),e=t[t.length-1],pt.markEnd(n,e),o.push(n);(r=k()).prec=i,o.push(r),t.push(ft),n=de(),o.push(n)}for(n=o[u=o.length-1],t.pop();u>1;)n=pt.createBinaryExpression(o[u-1].value,o[u-2],n),u-=2,e=t.pop(),pt.markEnd(n,e);return n}function he(){var e,t,n,r,i;return i=ft,e=fe(),W("?")&&(k(),t=ht.allowIn,ht.allowIn=!0,n=ge(),ht.allowIn=t,U(":"),r=ge(),e=pt.createConditionalExpression(e,n,r),pt.markEnd(e,i)),e}function ge(){var e,t,n,r,i;return e=ft,i=ft,r=t=he(),H()&&(Y(t)||F({},rt.InvalidLHSInAssignment),st&&t.type===tt.Identifier&&d(t.name)&&F(e,rt.StrictLHSAssignment),e=k(),n=ge(),r=pt.markEnd(pt.createAssignmentExpression(e.value,t,n),i)),r}function ve(){var e,t=ft;if(e=ge(),W(",")){for(e=pt.createSequenceExpression([e]);lt<dt&&W(",");)k(),e.expressions.push(ge());pt.markEnd(e,t)}return e}function me(){for(var e,t=[];lt<dt&&!W("}")&&void 0!==(e=$e());)t.push(e);return t}function ye(){var e,t;return t=ft,U("{"),e=me(),U("}"),pt.markEnd(pt.createBlockStatement(e),t)}function Ce(){var e,t;return t=ft,(e=k()).type!==Qe.Identifier&&G(e),pt.markEnd(pt.createIdentifier(e.value),t)}function be(e){var t,n,r=null;return n=ft,t=Ce(),st&&d(t.name)&&F({},rt.StrictVarName),"const"===e?(U("="),r=ge()):W("=")&&(k(),r=ge()),pt.markEnd(pt.createVariableDeclarator(t,r),n)}function xe(e){var t=[];do{if(t.push(be(e)),!W(","))break;k()}while(lt<dt);return t}function Se(){var e;return q("var"),e=xe(),X(),pt.createVariableDeclaration(e,"var")}function Ee(e){var t,n;return n=ft,q(e),t=xe(e),X(),pt.markEnd(pt.createVariableDeclaration(t,e),n)}function we(){return U(";"),pt.createEmptyStatement()}function Oe(){var e=ve();return X(),pt.createExpressionStatement(e)}function _e(){var e,t,n;return q("if"),U("("),e=ve(),U(")"),t=Fe(),$("else")?(k(),n=Fe()):n=null,pt.createIfStatement(e,t,n)}function Le(){var e,t,n;return q("do"),n=ht.inIteration,ht.inIteration=!0,e=Fe(),ht.inIteration=n,q("while"),U("("),t=ve(),U(")"),W(";")&&k(),pt.createDoWhileStatement(e,t)}function Re(){var e,t,n;return q("while"),U("("),e=ve(),U(")"),n=ht.inIteration,ht.inIteration=!0,t=Fe(),ht.inIteration=n,pt.createWhileStatement(e,t)}function De(){var e,t,n;return n=ft,e=k(),t=xe(),pt.markEnd(pt.createVariableDeclaration(t,e.value),n)}function Ne(){var e,t,n,r,i,o,a;return e=t=n=null,q("for"),U("("),W(";")?k():($("var")||$("let")?(ht.allowIn=!1,e=De(),ht.allowIn=!0,1===e.declarations.length&&$("in")&&(k(),r=e,i=ve(),e=null)):(ht.allowIn=!1,e=ve(),ht.allowIn=!0,$("in")&&(Y(e)||F({},rt.InvalidLHSInForIn),k(),r=e,i=ve(),e=null)),void 0===r&&U(";")),void 0===r&&(W(";")||(t=ve()),U(";"),W(")")||(n=ve())),U(")"),a=ht.inIteration,ht.inIteration=!0,o=Fe(),ht.inIteration=a,void 0===r?pt.createForStatement(e,t,n,o):pt.createForInStatement(r,i,o)}function Ie(){var e,t=null;return q("continue"),59===at.charCodeAt(lt)?(k(),ht.inIteration||j({},rt.IllegalContinue),pt.createContinueStatement(null)):z()?(ht.inIteration||j({},rt.IllegalContinue),pt.createContinueStatement(null)):(ft.type===Qe.Identifier&&(e="$"+(t=Ce()).name,Object.prototype.hasOwnProperty.call(ht.labelSet,e)||j({},rt.UnknownLabel,t.name)),X(),null!==t||ht.inIteration||j({},rt.IllegalContinue),pt.createContinueStatement(t))}function Ae(){var e,t=null;return q("break"),59===at.charCodeAt(lt)?(k(),ht.inIteration||ht.inSwitch||j({},rt.IllegalBreak),pt.createBreakStatement(null)):z()?(ht.inIteration||ht.inSwitch||j({},rt.IllegalBreak),pt.createBreakStatement(null)):(ft.type===Qe.Identifier&&(e="$"+(t=Ce()).name,Object.prototype.hasOwnProperty.call(ht.labelSet,e)||j({},rt.UnknownLabel,t.name)),X(),null!==t||ht.inIteration||ht.inSwitch||j({},rt.IllegalBreak),pt.createBreakStatement(t))}function Me(){var e=null;return q("return"),ht.inFunctionBody||F({},rt.IllegalReturn),32===at.charCodeAt(lt)&&s(at.charCodeAt(lt+1))?(e=ve(),X(),pt.createReturnStatement(e)):z()?pt.createReturnStatement(null):(W(";")||W("}")||ft.type===Qe.EOF||(e=ve()),X(),pt.createReturnStatement(e))}function Pe(){var e,t;return st&&(v(),F({},rt.StrictModeWith)),q("with"),U("("),e=ve(),U(")"),t=Fe(),pt.createWithStatement(e,t)}function ke(){var e,t,n,r=[];for(n=ft,$("default")?(k(),e=null):(q("case"),e=ve()),U(":");lt<dt&&!(W("}")||$("default")||$("case"));)t=Fe(),r.push(t);return pt.markEnd(pt.createSwitchCase(e,r),n)}function Te(){var e,t,n,r,i;if(q("switch"),U("("),e=ve(),U(")"),U("{"),t=[],W("}"))return k(),pt.createSwitchStatement(e,t);for(r=ht.inSwitch,ht.inSwitch=!0,i=!1;lt<dt&&!W("}");)null===(n=ke()).test&&(i&&j({},rt.MultipleDefaultsInSwitch),i=!0),t.push(n);return ht.inSwitch=r,U("}"),pt.createSwitchStatement(e,t)}function Ve(){var e;return q("throw"),z()&&j({},rt.NewlineAfterThrow),e=ve(),X(),pt.createThrowStatement(e)}function Be(){var e,t,n;return n=ft,q("catch"),U("("),W(")")&&G(ft),e=Ce(),st&&d(e.name)&&F({},rt.StrictCatchVariable),U(")"),t=ye(),pt.markEnd(pt.createCatchClause(e,t),n)}function ze(){var e,t=[],n=null;return q("try"),e=ye(),$("catch")&&t.push(Be()),$("finally")&&(k(),n=ye()),0!==t.length||n||j({},rt.NoCatchOrFinally),pt.createTryStatement(e,[],t,n)}function je(){return q("debugger"),X(),pt.createDebuggerStatement()}function Fe(){var e,t,n,r,i=ft.type;if(i===Qe.EOF&&G(ft),i===Qe.Punctuator&&"{"===ft.value)return ye();if(r=ft,i===Qe.Punctuator)switch(ft.value){case";":return pt.markEnd(we(),r);case"(":return pt.markEnd(Oe(),r)}if(i===Qe.Keyword)switch(ft.value){case"break":return pt.markEnd(Ae(),r);case"continue":return pt.markEnd(Ie(),r);case"debugger":return pt.markEnd(je(),r);case"do":return pt.markEnd(Le(),r);case"for":return pt.markEnd(Ne(),r);case"function":return pt.markEnd(qe(),r);case"if":return pt.markEnd(_e(),r);case"return":return pt.markEnd(Me(),r);case"switch":return pt.markEnd(Te(),r);case"throw":return pt.markEnd(Ve(),r);case"try":return pt.markEnd(ze(),r);case"var":return pt.markEnd(Se(),r);case"while":return pt.markEnd(Re(),r);case"with":return pt.markEnd(Pe(),r)}return(e=ve()).type===tt.Identifier&&W(":")?(k(),n="$"+e.name,Object.prototype.hasOwnProperty.call(ht.labelSet,n)&&j({},rt.Redeclaration,"Label",e.name),ht.labelSet[n]=!0,t=Fe(),delete ht.labelSet[n],pt.markEnd(pt.createLabeledStatement(e,t),r)):(X(),pt.markEnd(pt.createExpressionStatement(e),r))}function Ge(){var e,t,n,r,i,o,a,s,l=[];for(s=ft,U("{");lt<dt&&ft.type===Qe.StringLiteral&&(t=ft,e=$e(),l.push(e),e.expression.type===tt.Literal);)"use strict"===at.slice(t.start+1,t.end-1)?(st=!0,n&&F(n,rt.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(r=ht.labelSet,i=ht.inIteration,o=ht.inSwitch,a=ht.inFunctionBody,ht.labelSet={},ht.inIteration=!1,ht.inSwitch=!1,ht.inFunctionBody=!0;lt<dt&&!W("}")&&void 0!==(e=$e());)l.push(e);return U("}"),ht.labelSet=r,ht.inIteration=i,ht.inSwitch=o,ht.inFunctionBody=a,pt.markEnd(pt.createBlockStatement(l),s)}function Ue(e){var t,n,r,i,o,a,s=[];if(U("("),!W(")"))for(i={};lt<dt&&(n=ft,t=Ce(),o="$"+n.value,st?(d(n.value)&&(r=n,a=rt.StrictParamName),Object.prototype.hasOwnProperty.call(i,o)&&(r=n,a=rt.StrictParamDupe)):e||(d(n.value)?(e=n,a=rt.StrictParamName):c(n.value)?(e=n,a=rt.StrictReservedWord):Object.prototype.hasOwnProperty.call(i,o)&&(e=n,a=rt.StrictParamDupe)),s.push(t),i[o]=!0,!W(")"));)U(",");return U(")"),{params:s,stricted:r,firstRestricted:e,message:a}}function qe(){var e,t,n,r,i,o,a,s,l,u=[];return l=ft,q("function"),n=ft,e=Ce(),st?d(n.value)&&F(n,rt.StrictFunctionName):d(n.value)?(o=n,a=rt.StrictFunctionName):c(n.value)&&(o=n,a=rt.StrictReservedWord),u=(i=Ue(o)).params,r=i.stricted,o=i.firstRestricted,i.message&&(a=i.message),s=st,t=Ge(),st&&o&&j(o,a),st&&r&&F(r,a),st=s,pt.markEnd(pt.createFunctionDeclaration(e,u,[],t),l)}function We(){var e,t,n,r,i,o,a,s,l=null,u=[];return s=ft,q("function"),W("(")||(e=ft,l=Ce(),st?d(e.value)&&F(e,rt.StrictFunctionName):d(e.value)?(n=e,r=rt.StrictFunctionName):c(e.value)&&(n=e,r=rt.StrictReservedWord)),u=(i=Ue(n)).params,t=i.stricted,n=i.firstRestricted,i.message&&(r=i.message),a=st,o=Ge(),st&&n&&j(n,r),st&&t&&F(t,r),st=a,pt.markEnd(pt.createFunctionExpression(l,u,[],o),s)}function $e(){if(ft.type===Qe.Keyword)switch(ft.value){case"const":case"let":return Ee(ft.value);case"function":return qe();default:return Fe()}if(ft.type!==Qe.EOF)return Fe()}function He(){for(var e,t,n,r=[];lt<dt&&(t=ft).type===Qe.StringLiteral&&(e=$e(),r.push(e),e.expression.type===tt.Literal);)"use strict"===at.slice(t.start+1,t.end-1)?(st=!0,n&&F(n,rt.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(;lt<dt&&void 0!==(e=$e());)r.push(e);return r}function Xe(){var e,t;return v(),T(),t=ft,st=!1,e=He(),pt.markEnd(pt.createProgram(e),t)}function Ye(){var e,t,n,r=[];for(e=0;e<gt.tokens.length;++e)n={type:(t=gt.tokens[e]).type,value:t.value},gt.range&&(n.range=t.range),gt.loc&&(n.loc=t.loc),r.push(n);gt.tokens=r}function Ke(e,t){var n;"string"==typeof e||e instanceof String||(e=String(e)),pt=ot,lt=0,ut=(at=e).length>0?1:0,ct=0,dt=at.length,ft=null,ht={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},gt={},(t=t||{}).tokens=!0,gt.tokens=[],gt.tokenize=!0,gt.openParenToken=-1,gt.openCurlyToken=-1,gt.range="boolean"==typeof t.range&&t.range,gt.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&(gt.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(gt.errors=[]);try{if(T(),ft.type===Qe.EOF)return gt.tokens;for(k();ft.type!==Qe.EOF;)try{k()}catch(e){if(gt.errors){gt.errors.push(e);break}throw e}Ye(),n=gt.tokens,void 0!==gt.comments&&(n.comments=gt.comments),void 0!==gt.errors&&(n.errors=gt.errors)}catch(e){throw e}finally{gt={}}return n}function Ze(e,t){var n,r;r=String,"string"==typeof e||e instanceof String||(e=r(e)),pt=ot,lt=0,ut=(at=e).length>0?1:0,ct=0,dt=at.length,ft=null,ht={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},gt={},void 0!==t&&(gt.range="boolean"==typeof t.range&&t.range,gt.loc="boolean"==typeof t.loc&&t.loc,gt.attachComment="boolean"==typeof t.attachComment&&t.attachComment,gt.loc&&null!==t.source&&void 0!==t.source&&(gt.source=r(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(gt.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(gt.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(gt.errors=[]),gt.attachComment&&(gt.range=!0,gt.comments=[],gt.bottomRightStack=[],gt.trailingComments=[],gt.leadingComments=[]));try{n=Xe(),void 0!==gt.comments&&(n.comments=gt.comments),void 0!==gt.tokens&&(Ye(),n.tokens=gt.tokens),void 0!==gt.errors&&(n.errors=gt.errors)}catch(e){throw e}finally{gt={}}return n}var Qe,Je,et,tt,nt,rt,it,ot,at,st,lt,ut,ct,dt,pt,ft,ht,gt;(Je={})[(Qe={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",Je[Qe.EOF]="<end>",Je[Qe.Identifier]="Identifier",Je[Qe.Keyword]="Keyword",Je[Qe.NullLiteral]="Null",Je[Qe.NumericLiteral]="Numeric",Je[Qe.Punctuator]="Punctuator",Je[Qe.StringLiteral]="String",Je[Qe.RegularExpression]="RegularExpression",et=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],tt={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},nt={Data:1,Get:2,Set:4},rt={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},it={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},ot={name:"SyntaxTree",processComment:function(e){var t,n;if(!(e.type===tt.Program&&e.body.length>0)){for(gt.trailingComments.length>0?gt.trailingComments[0].range[0]>=e.range[1]?(n=gt.trailingComments,gt.trailingComments=[]):gt.trailingComments.length=0:gt.bottomRightStack.length>0&&gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments&&gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(n=gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments,delete gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments);gt.bottomRightStack.length>0&&gt.bottomRightStack[gt.bottomRightStack.length-1].range[0]>=e.range[0];)t=gt.bottomRightStack.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):gt.leadingComments.length>0&&gt.leadingComments[gt.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=gt.leadingComments,gt.leadingComments=[]),n&&(e.trailingComments=n),gt.bottomRightStack.push(e)}},markEnd:function(e,t){return gt.range&&(e.range=[t.start,lt]),gt.loc&&(e.loc=new B(void 0===t.startLineNumber?t.lineNumber:t.startLineNumber,t.start-(void 0===t.startLineStart?t.lineStart:t.startLineStart),ut,lt-ct),this.postProcess(e)),gt.attachComment&&this.processComment(e),e},postProcess:function(e){return gt.source&&(e.loc.source=gt.source),e},createArrayExpression:function(e){return{type:tt.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,n){return{type:tt.AssignmentExpression,operator:e,left:t,right:n}},createBinaryExpression:function(e,t,n){return{type:"||"===e||"&&"===e?tt.LogicalExpression:tt.BinaryExpression,operator:e,left:t,right:n}},createBlockStatement:function(e){return{type:tt.BlockStatement,body:e}},createBreakStatement:function(e){return{type:tt.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:tt.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:tt.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,n){return{type:tt.ConditionalExpression,test:e,consequent:t,alternate:n}},createContinueStatement:function(e){return{type:tt.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:tt.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:tt.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:tt.EmptyStatement}},createExpressionStatement:function(e){return{type:tt.ExpressionStatement,expression:e}},createForStatement:function(e,t,n,r){return{type:tt.ForStatement,init:e,test:t,update:n,body:r}},createForInStatement:function(e,t,n){return{type:tt.ForInStatement,left:e,right:t,body:n,each:!1}},createFunctionDeclaration:function(e,t,n,r){return{type:tt.FunctionDeclaration,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(e,t,n,r){return{type:tt.FunctionExpression,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createIdentifier:function(e){return{type:tt.Identifier,name:e}},createIfStatement:function(e,t,n){return{type:tt.IfStatement,test:e,consequent:t,alternate:n}},createLabeledStatement:function(e,t){return{type:tt.LabeledStatement,label:e,body:t}},createLiteral:function(e){return{type:tt.Literal,value:e.value,raw:at.slice(e.start,e.end)}},createMemberExpression:function(e,t,n){return{type:tt.MemberExpression,computed:"["===e,object:t,property:n}},createNewExpression:function(e,t){return{type:tt.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:tt.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:tt.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:tt.Program,body:e}},createProperty:function(e,t,n){return{type:tt.Property,key:t,value:n,kind:e}},createReturnStatement:function(e){return{type:tt.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:tt.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:tt.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:tt.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:tt.ThisExpression}},createThrowStatement:function(e){return{type:tt.ThrowStatement,argument:e}},createTryStatement:function(e,t,n,r){return{type:tt.TryStatement,block:e,guardedHandlers:t,handlers:n,finalizer:r}},createUnaryExpression:function(e,t){return"++"===e||"--"===e?{type:tt.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:tt.UnaryExpression,operator:e,argument:t,prefix:!0}},createVariableDeclaration:function(e,t){return{type:tt.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:tt.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:tt.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:tt.WithStatement,object:e,body:t}}},e.version="1.2.2",e.tokenize=Ke,e.parse=Ze,e.Syntax=function(){var e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),tt)tt.hasOwnProperty(e)&&(t[e]=tt[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}))},{}],1:[function(e,t,n){(function(r){var i=function(){function e(){this.yy={}}var t={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(e,t,r,i,o,a,s){i.ast||(i.ast=n,n.initialize());var l=a.length-1;switch(o){case 1:return i.ast.set({expression:{type:"root",value:a[l]}}),i.ast.unshift(),i.ast.yield();case 2:return i.ast.set({expression:{type:"root",value:a[l-1]}}),i.ast.unshift(),i.ast.yield();case 3:return i.ast.unshift(),i.ast.yield();case 4:return i.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:a[l-1]}}),i.ast.unshift(),i.ast.yield();case 5:case 6:case 11:case 13:case 18:case 21:case 22:case 23:break;case 7:i.ast.set({operation:"member"}),i.ast.push();break;case 8:i.ast.set({operation:"subscript"}),i.ast.push();break;case 9:case 19:i.ast.set({scope:"child"});break;case 10:case 20:i.ast.set({scope:"descendant"});break;case 12:i.ast.set({scope:"child",operation:"member"});break;case 14:i.ast.set({expression:{type:"wildcard",value:a[l]}});break;case 15:i.ast.set({expression:{type:"identifier",value:a[l]}});break;case 16:i.ast.set({expression:{type:"script_expression",value:a[l]}});break;case 17:i.ast.set({expression:{type:"numeric_literal",value:parseInt(a[l])}});break;case 24:a[l].length>1?i.ast.set({expression:{type:"union",value:a[l]}}):this.$=a[l];break;case 25:this.$=[a[l]];break;case 26:this.$=a[l-2].concat(a[l]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(a[l])}},i.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:a[l]}},i.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:a[l]}},i.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:a[l]}},i.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:a[l]}},i.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:a[l]}},i.ast.set(this.$);break;case 33:case 34:this.$=a[l]}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){function t(){var e;return"number"!=typeof(e=n.lexer.lex()||p)&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],o=[],a=this.table,s="",l=0,u=0,c=0,d=2,p=1,f=o.slice.call(arguments,1);this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;o.push(h);var g=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,m,y,C,b,x,S,E,w,O={};;){if(y=r[r.length-1],this.defaultActions[y]?C=this.defaultActions[y]:(null!=v||(v=t()),C=a[y]&&a[y][v]),void 0===C||!C.length||!C[0]){var _="";for(x in w=[],a[y])this.terminals_[x]&&x>d&&w.push("'"+this.terminals_[x]+"'");_=this.lexer.showPosition?"Parse error on line "+(l+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(v==p?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[v]||v,line:this.lexer.yylineno,loc:h,expected:w})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+v);switch(C[0]){case 1:r.push(v),i.push(this.lexer.yytext),o.push(this.lexer.yylloc),r.push(C[1]),v=null,m?(v=m,m=null):(u=this.lexer.yyleng,s=this.lexer.yytext,l=this.lexer.yylineno,h=this.lexer.yylloc,c>0&&c--);break;case 2:if(S=this.productions_[C[1]][1],O.$=i[i.length-S],O._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},g&&(O._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(b=this.performAction.apply(O,[s,u,l,this.yy,C[1],i,o].concat(f))))return b;S&&(r=r.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),r.push(this.productions_[C[1]][0]),i.push(O.$),o.push(O._$),E=a[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}},n={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(e){for(var t in e)this._node[t]=e[t];return this._node},node:function(e){return arguments.length&&(this._node=e),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var e=this._nodes;return this.initialize(),e}},r=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;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-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){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=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!t||n[0].length>t[0].length)){if(t=n,r=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[o])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===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 e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},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(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return t.yytext=t.yytext.substr(1,t.yyleng-2),32;case 11:return t.yytext=t.yytext.substr(1,t.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return e}();return t.lexer=r,e.prototype=t,t.Parser=e,new e}();void 0!==e&&void 0!==n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),r.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return n.parser.parse(i)},void 0!==t&&e.main===t&&n.main(r.argv.slice(1)))}).call(this,e("_process"))},{_process:11,fs:9,path:10}],2:[function(e,t,n){t.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(e,t,n){var r=e("./dict"),i=e("fs"),o={lex:{macros:{esc:"\\\\",int:r.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],["\\*","return 'STAR'"],[r.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[r.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[r.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?=\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?=\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};i.readFileSync&&(o.moduleInclude=i.readFileSync(e.resolve("../include/module.js")),o.actionInclude=i.readFileSync(e.resolve("../include/action.js"))),t.exports=o},{"./dict":2,fs:9}],4:[function(e,t,n){function r(t,n,r){var i=e("./index"),o=u(p.parse(n).body[0].expression,{"@":t.value}),a=r.replace(/\{\{\s*value\s*\}\}/g,o),s=i.nodes(t.value,a);return s.forEach((function(e){e.path=t.path.concat(e.path.slice(1))})),s}function i(e){return Array.isArray(e)}function o(e){return e&&!(e instanceof Array)&&e instanceof Object}function a(e){return function(t,n,r,a){var s=t.value,l=t.path,u=[],c=function(t,s){i(t)?(t.forEach((function(e,t){u.length>=a||r(t,e,n)&&u.push({path:s.concat(t),value:e})})),t.forEach((function(t,n){u.length>=a||e&&c(t,s.concat(n))}))):o(t)&&(this.keys(t).forEach((function(e){u.length>=a||r(e,t[e],n)&&u.push({path:s.concat(e),value:t[e]})})),this.keys(t).forEach((function(n){u.length>=a||e&&c(t[n],s.concat(n))})))}.bind(this);return c(s,l),u}}function s(e){return function(t,n,r){return this.descend(n,t.expression.value,e,r)}}function l(e){return function(t,n,r){return this.traverse(n,t.expression.value,e,r)}}function u(){try{return h.apply(this,arguments)}catch(e){}}function c(e){return g(e,(function(e){return e.path.map((function(e){return String(e).replace("-","--")})).join("-")}))}function d(e){var t=String(e);return t.match(/^-?[0-9]+$/)?parseInt(t):null}var p=e("./aesprim"),f=e("./slice"),h=e("static-eval"),g=e("underscore").uniq,v=function(){return this.initialize.apply(this,arguments)};v.prototype.initialize=function(){this.traverse=a(!0),this.descend=a()},v.prototype.keys=Object.keys,v.prototype.resolve=function(e){var t=[e.operation,e.scope,e.expression.type].join("-"),n=this._fns[t];if(!n)throw new Error("couldn't resolve key: "+t);return n.bind(this)},v.prototype.register=function(e,t){if(!t instanceof Function)throw new Error("handler must be a function");this._fns[e]=t},v.prototype._fns={"member-child-identifier":function(e,t){var n=e.expression.value,r=t.value;if(r instanceof Object&&n in r)return[{value:r[n],path:t.path.concat(n)}]},"member-descendant-identifier":l((function(e,t,n){return e==n})),"subscript-child-numeric_literal":s((function(e,t,n){return e===n})),"member-child-numeric_literal":s((function(e,t,n){return String(e)===String(n)})),"subscript-descendant-numeric_literal":l((function(e,t,n){return e===n})),"member-child-wildcard":s((function(){return!0})),"member-descendant-wildcard":l((function(){return!0})),"subscript-descendant-wildcard":l((function(){return!0})),"subscript-child-wildcard":s((function(){return!0})),"subscript-child-slice":function(e,t){if(i(t.value)){var n=e.expression.value.split(":").map(d),r=t.value.map((function(e,n){return{value:e,path:t.path.concat(n)}}));return f.apply(null,[r].concat(n))}},"subscript-child-union":function(e,t){var n=[];return e.expression.value.forEach((function(e){var r={operation:"subscript",scope:"child",expression:e.expression},i=this.resolve(r)(r,t);i&&(n=n.concat(i))}),this),c(n)},"subscript-descendant-union":function(t,n,r){var i=e(".."),o=this,a=[];return i.nodes(n,"$..*").slice(1).forEach((function(e){a.length>=r||t.expression.value.forEach((function(t){var n={operation:"subscript",scope:"child",expression:t.expression},r=o.resolve(n)(n,e);a=a.concat(r)}))})),c(a)},"subscript-child-filter_expression":function(e,t,n){var r=e.expression.value.slice(2,-1),i=p.parse(r).body[0].expression,o=function(e,t){return u(i,{"@":t})};return this.descend(t,null,o,n)},"subscript-descendant-filter_expression":function(e,t,n){var r=e.expression.value.slice(2,-1),i=p.parse(r).body[0].expression,o=function(e,t){return u(i,{"@":t})};return this.traverse(t,null,o,n)},"subscript-child-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$[{{value}}]")},"member-child-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$.{{value}}")},"member-descendant-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$..value")}},v.prototype._fns["subscript-child-string_literal"]=v.prototype._fns["member-child-identifier"],v.prototype._fns["member-descendant-numeric_literal"]=v.prototype._fns["subscript-descendant-string_literal"]=v.prototype._fns["member-descendant-identifier"],t.exports=v},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":12,underscore:9}],5:[function(e,t,n){function r(e){return"[object String]"==Object.prototype.toString.call(e)}var i=e("assert"),o=e("./dict"),a=e("./parser"),s=e("./handlers"),l=function(){this.initialize.apply(this,arguments)};l.prototype.initialize=function(){this.parser=new a,this.handlers=new s},l.prototype.parse=function(e){return i.ok(r(e),"we need a path"),this.parser.parse(e)},l.prototype.parent=function(e,t){i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path");var n=this.nodes(e,t)[0];return n.path.pop(),this.value(e,n.path)},l.prototype.apply=function(e,t,n){i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),i.equal(typeof n,"function","fn needs to be function");var r=this.nodes(e,t).sort((function(e,t){return t.path.length-e.path.length}));return r.forEach((function(t){var r=t.path.pop(),i=this.value(e,this.stringify(t.path)),o=t.value=n.call(e,i[r]);i[r]=o}),this),r},l.prototype.value=function(e,t,n){if(i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),arguments.length>=3){var r=this.nodes(e,t).shift();if(!r)return this._vivify(e,t,n);var o=r.path.slice(-1).shift();this.parent(e,this.stringify(r.path))[o]=n}return this.query(e,this.stringify(t),1).shift()},l.prototype._vivify=function(e,t,n){var r=this;i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path");var o=this.parser.parse(t).map((function(e){return e.expression.value})),a=function(t,n){var i=t.pop(),o=r.value(e,t);o||(a(t.concat(),"string"==typeof i?{}:[]),o=r.value(e,t)),o[i]=n};return a(o,n),this.query(e,t)[0]},l.prototype.query=function(e,t,n){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(r(t),"we need a path"),this.nodes(e,t,n).map((function(e){return e.value}))},l.prototype.paths=function(e,t,n){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),this.nodes(e,t,n).map((function(e){return e.path}))},l.prototype.nodes=function(e,t,n){if(i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),0===n)return[];var r=this.parser.parse(t),o=this.handlers,a=[{path:["$"],value:e}],s=[];return r.length&&"root"==r[0].expression.type&&r.shift(),r.length?(r.forEach((function(e,t){if(!(s.length>=n)){var i=o.resolve(e),l=[];a.forEach((function(o){if(!(s.length>=n)){var a=i(e,o,n);t==r.length-1?s=s.concat(a||[]):l=l.concat(a||[])}})),a=l}})),n?s.slice(0,n):s):a},l.prototype.stringify=function(e){i.ok(e,"we need a path");var t="$",n={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return(e=this._normalize(e)).forEach((function(e){if("root"!=e.expression.type){var r,i=[e.scope,e.operation].join("-"),o=n[i];if(r="string_literal"==e.expression.type?JSON.stringify(e.expression.value):e.expression.value,!o)throw new Error("couldn't find template "+i);t+=o.replace(/{{value}}/,r)}})),t},l.prototype._normalize=function(e){if(i.ok(e,"we need a path"),"string"==typeof e)return this.parser.parse(e);if(Array.isArray(e)&&"string"==typeof e[0]){var t=[{expression:{type:"root",value:"$"}}];return e.forEach((function(e,n){if("$"!=e||0!==n)if("string"==typeof e&&e.match("^"+o.identifier+"$"))t.push({operation:"member",scope:"child",expression:{value:e,type:"identifier"}});else{var r="number"==typeof e?"numeric_literal":"string_literal";t.push({operation:"subscript",scope:"child",expression:{value:e,type:r}})}})),t}if(Array.isArray(e)&&"object"==typeof e[0])return e;throw new Error("couldn't understand path "+e)},l.Handlers=s,l.Parser=a;var u=new l;u.JSONPath=l,t.exports=u},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(e,t,n){var r=e("./grammar"),i=e("../generated/parser"),o=function(){var e=new i.Parser,t=e.parseError;return e.yy.parseError=function(){e.yy.ast&&e.yy.ast.initialize(),t.apply(e,arguments)},e};o.grammar=r,t.exports=o},{"../generated/parser":1,"./grammar":3}],7:[function(e,t,n){function r(e){return String(e).match(/^[0-9]+$/)?parseInt(e):Number.isFinite(e)?parseInt(e,10):0}t.exports=function(e,t,n,i){if("string"==typeof t)throw new Error("start cannot be a string");if("string"==typeof n)throw new Error("end cannot be a string");if("string"==typeof i)throw new Error("step cannot be a string");var o=e.length;if(0===i)throw new Error("step cannot be zero");if(i=i?r(i):1,n=n<0?o+n:n,t=r(0===(t=t<0?o+t:t)?0:t||(i>0?0:o-1)),n=r(0===n?0:n||(i>0?o:-1)),t=i>0?Math.max(0,t):Math.min(o,t),n=i>0?Math.min(n,o):Math.max(-1,n),i>0&&n<=t)return[];if(i<0&&t<=n)return[];for(var a=[],s=t;s!=n&&!(i<0&&s<=n||i>0&&s>=n);s+=i)a.push(e[s]);return a}},{}],8:[function(e,t,n){function r(e,t){return f.isUndefined(t)?""+t:f.isNumber(t)&&!isFinite(t)||f.isFunction(t)||f.isRegExp(t)?t.toString():t}function i(e,t){return f.isString(e)?e.length<t?e:e.slice(0,t):e}function o(e){return i(JSON.stringify(e.actual,r),128)+" "+e.operator+" "+i(JSON.stringify(e.expected,r),128)}function a(e,t,n,r,i){throw new v.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function s(e,t){e||a(e,!0,t,"==",v.ok)}function l(e,t){if(e===t)return!0;if(f.isBuffer(e)&&f.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return f.isDate(e)&&f.isDate(t)?e.getTime()===t.getTime():f.isRegExp(e)&&f.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:f.isObject(e)||f.isObject(t)?c(e,t):e==t}function u(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function c(e,t){if(f.isNullOrUndefined(e)||f.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(f.isPrimitive(e)||f.isPrimitive(t))return e===t;var n=u(e),r=u(t);if(n&&!r||!n&&r)return!1;if(n)return l(e=h.call(e),t=h.call(t));var i,o,a=m(e),s=m(t);if(a.length!=s.length)return!1;for(a.sort(),s.sort(),o=a.length-1;o>=0;o--)if(a[o]!=s[o])return!1;for(o=a.length-1;o>=0;o--)if(!l(e[i=a[o]],t[i]))return!1;return!0}function d(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||!0===t.call({},e))}function p(e,t,n,r){var i;f.isString(n)&&(r=n,n=null);try{t()}catch(e){i=e}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&a(i,n,"Missing expected exception"+r),!e&&d(i,n)&&a(i,n,"Got unwanted exception"+r),e&&i&&n&&!d(i,n)||!e&&i)throw i}var f=e("util/"),h=Array.prototype.slice,g=Object.prototype.hasOwnProperty,v=t.exports=s;v.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var t=e.stackStartFunction||a;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,s=r.indexOf("\n"+i);if(s>=0){var l=r.indexOf("\n",s+1);r=r.substring(l+1)}this.stack=r}}},f.inherits(v.AssertionError,Error),v.fail=a,v.ok=s,v.equal=function(e,t,n){e!=t&&a(e,t,n,"==",v.equal)},v.notEqual=function(e,t,n){e==t&&a(e,t,n,"!=",v.notEqual)},v.deepEqual=function(e,t,n){l(e,t)||a(e,t,n,"deepEqual",v.deepEqual)},v.notDeepEqual=function(e,t,n){l(e,t)&&a(e,t,n,"notDeepEqual",v.notDeepEqual)},v.strictEqual=function(e,t,n){e!==t&&a(e,t,n,"===",v.strictEqual)},v.notStrictEqual=function(e,t,n){e===t&&a(e,t,n,"!==",v.notStrictEqual)},v.throws=function(e,t,n){p.apply(this,[!0].concat(h.call(arguments)))},v.doesNotThrow=function(e,t){p.apply(this,[!1].concat(h.call(arguments)))},v.ifError=function(e){if(e)throw e};var m=Object.keys||function(e){var t=[];for(var n in e)g.call(e,n)&&t.push(n);return t}},{"util/":15}],9:[function(e,t,n){},{}],10:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(e){return i.exec(e).slice(1)};n.resolve=function(){for(var n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return n=t(r(n.split("/"),(function(e){return!!e})),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),o="/"===a(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&o&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),o=r(t.split("/")),a=Math.min(i.length,o.length),s=a,l=0;l<a;l++)if(i[l]!==o[l]){s=l;break}var u=[];for(l=s;l<i.length;l++)u.push("..");return(u=u.concat(o.slice(s))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=o(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=o(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return o(e)[3]};var a=function(e,t,n){return e.substr(t,n)}}).call(this,e("_process"))},{_process:11}],11:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(d===setTimeout)return setTimeout(e,0);if((d===r||!d)&&setTimeout)return d=setTimeout,setTimeout(e,0);try{return d(e,0)}catch(t){try{return d.call(null,e,0)}catch(t){return d.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function s(){v&&h&&(v=!1,h.length?g=h.concat(g):m=-1,g.length&&l())}function l(){if(!v){var e=o(s);v=!0;for(var t=g.length;t;){for(h=g,g=[];++m<t;)h&&h[m].run();m=-1,t=g.length}h=null,v=!1,a(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var d,p,f=t.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:r}catch(e){d=r}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(e){p=i}}();var h,g=[],v=!1,m=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];g.push(new u(e,t)),1!==g.length||v||o(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],12:[function(e,t,n){var r=e("escodegen").generate;t.exports=function(e,t){t||(t={});var n={},i=function e(i){if("Literal"===i.type)return i.value;if("UnaryExpression"===i.type){var o=e(i.argument);return"+"===i.operator?+o:"-"===i.operator?-o:"~"===i.operator?~o:"!"===i.operator?!o:n}if("ArrayExpression"===i.type){for(var a=[],s=0,l=i.elements.length;s<l;s++){if((v=e(i.elements[s]))===n)return n;a.push(v)}return a}if("ObjectExpression"===i.type){var u={};for(s=0;s<i.properties.length;s++){var c=null===(m=i.properties[s]).value?m.value:e(m.value);if(c===n)return n;u[m.key.value||m.key.name]=c}return u}if("BinaryExpression"===i.type||"LogicalExpression"===i.type){if((l=e(i.left))===n)return n;var d=e(i.right);if(d===n)return n;var p=i.operator;return"=="===p?l==d:"==="===p?l===d:"!="===p?l!=d:"!=="===p?l!==d:"+"===p?l+d:"-"===p?l-d:"*"===p?l*d:"/"===p?l/d:"%"===p?l%d:"<"===p?l<d:"<="===p?l<=d:">"===p?l>d:">="===p?l>=d:"|"===p?l|d:"&"===p?l&d:"^"===p?l^d:"&&"===p?l&&d:"||"===p?l||d:n}if("Identifier"===i.type)return{}.hasOwnProperty.call(t,i.name)?t[i.name]:n;if("CallExpression"===i.type){var f=e(i.callee);if(f===n)return n;var h=i.callee.object?e(i.callee.object):n;h===n&&(h=null);var g=[];for(s=0,l=i.arguments.length;s<l;s++){var v;if((v=e(i.arguments[s]))===n)return n;g.push(v)}return f.apply(h,g)}var m;return"MemberExpression"===i.type?(u=e(i.object))===n?n:"Identifier"===i.property.type?u[i.property.name]:(m=e(i.property))===n?n:u[m]:"ConditionalExpression"===i.type?(o=e(i.test))===n?n:e(o?i.consequent:i.alternate):"FunctionExpression"===i.type?Function("return "+r(i))():n}(e);return i===n?void 0:i}},{escodegen:9}],13:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],14:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],15:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(t)?n.showHidden=t:t&&r._extend(n,t),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),l(n,e,n.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}function l(e,t,n){if(e.customInspect&&t&&_(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return C(i)||(i=l(e,i,n)),i}var o=u(e,t);if(o)return o;var a=Object.keys(t),g=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),O(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(t);if(0===a.length){if(_(t)){var v=t.name?": "+t.name:"";return e.stylize("[Function"+v+"]","special")}if(S(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(w(t))return e.stylize(Date.prototype.toString.call(t),"date");if(O(t))return c(t)}var m,y="",b=!1,x=["{","}"];return h(t)&&(b=!0,x=["[","]"]),_(t)&&(y=" [Function"+(t.name?": "+t.name:"")+"]"),S(t)&&(y=" "+RegExp.prototype.toString.call(t)),w(t)&&(y=" "+Date.prototype.toUTCString.call(t)),O(t)&&(y=" "+c(t)),0!==a.length||b&&0!=t.length?n<0?S(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),m=b?d(e,t,n,g,a):a.map((function(r){return p(e,t,n,g,r,b)})),e.seen.pop(),f(m,y,x)):x[0]+y+x[1]}function u(e,t){if(x(t))return e.stylize("undefined","undefined");if(C(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)I(t,String(a))?o.push(p(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(e,t,n,r,i,!0))})),o}function p(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),I(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=v(n)?l(e,u.value,null):l(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function f(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function m(e){return null==e}function y(e){return"number"==typeof e}function C(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function x(e){return void 0===e}function S(e){return E(e)&&"[object RegExp]"===R(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===R(e)}function O(e){return E(e)&&("[object Error]"===R(e)||e instanceof Error)}function _(e){return"function"==typeof e}function L(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function R(e){return Object.prototype.toString.call(e)}function D(e){return e<10?"0"+e.toString(10):e.toString(10)}function N(){var e=new Date,t=[D(e.getHours()),D(e.getMinutes()),D(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var A=/%[sdj%]/g;r.format=function(e){if(!C(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(A,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<o;s=r[++n])a+=v(s)||!E(s)?" "+s:" "+i(s);return a},r.deprecate=function(e,i){function o(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}if(x(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return o};var M,P={};r.debuglog=function(e){if(x(M)&&(M=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!P[e])if(new RegExp("\\b"+e+"\\b","i").test(M)){var n=t.pid;P[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else P[e]=function(){};return P[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=g,r.isNull=v,r.isNullOrUndefined=m,r.isNumber=y,r.isString=C,r.isSymbol=b,r.isUndefined=x,r.isRegExp=S,r.isObject=E,r.isDate=w,r.isError=O,r.isFunction=_,r.isPrimitive=L,r.isBuffer=e("./support/isBuffer");var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",N(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":14,_process:11,inherits:13}],jsonpath:[function(e,t,n){t.exports=e("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")},948:function(e,t,n){var r;e=n.nmd(e),function(){function i(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function a(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function s(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function l(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function u(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function c(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function d(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function p(e,t){return!(null==e||!e.length)&&-1<x(e,t,0)}function f(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function h(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function g(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function v(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function m(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function y(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function C(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function b(e,t,n,r){var i=e.length;for(n+=r?1:-1;r?n--:++n<i;)if(t(e[n],n,e))return n;return-1}function x(e,t,n){if(t==t)e:{--n;for(var r=e.length;++n<r;)if(e[n]===t){e=n;break e}e=-1}else e=b(e,E,n);return e}function S(e,t,n,r){--n;for(var i=e.length;++n<i;)if(r(e[n],t))return n;return-1}function E(e){return e!=e}function w(e,t){var n=null==e?0:e.length;return n?R(e,t)/n:q}function O(e){return function(t){return null==t?G:t[e]}}function _(e){return function(t){return null==e?G:e[t]}}function L(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function R(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);o!==G&&(n=n===G?o:n+o)}return n}function D(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function N(e){return function(t){return e(t)}}function I(e,t){return h(t,(function(t){return e[t]}))}function A(e,t){return e.has(t)}function M(e,t){for(var n=-1,r=e.length;++n<r&&-1<x(t,e[n],0););return n}function P(e,t){for(var n=e.length;n--&&-1<x(t,e[n],0););return n}function k(e){return"\\"+Be[e]}function T(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function V(e,t){return function(n){return e(t(n))}}function B(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&"__lodash_placeholder__"!==a||(e[n]="__lodash_placeholder__",o[i++]=n)}return o}function z(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function j(e){if(Ae.test(e)){for(var t=Ne.lastIndex=0;Ne.test(e);)++t;e=t}else e=et(e);return e}function F(e){return Ae.test(e)?e.match(Ne)||[]:e.split("")}var G,U=1/0,q=NaN,W=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],$=/\b__p\+='';/g,H=/\b(__p\+=)''\+/g,X=/(__e\(.*?\)|\b__t\))\+'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Z=RegExp(Y.source),Q=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,te=/<%=([\s\S]+?)%>/g,ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ie=/^\./,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ae=/[\\^$.*+?()[\]{}|]/g,se=RegExp(ae.source),le=/^\s+|\s+$/g,ue=/^\s+/,ce=/\s+$/,de=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pe=/\{\n\/\* \[wrapped with (.+)\] \*/,fe=/,? & /,he=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ge=/\\(\\)?/g,ve=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ye=/^[-+]0x[0-9a-f]+$/i,Ce=/^0b[01]+$/i,be=/^\[object .+?Constructor\]$/,xe=/^0o[0-7]+$/i,Se=/^(?:0|[1-9]\d*)$/,Ee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,Oe=/['\n\r\u2028\u2029\\]/g,_e="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",Le="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+_e,Re=RegExp("['’]","g"),De=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Ne=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])"+_e,"g"),Ie=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",Le].join("|"),"g"),Ae=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Me=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pe="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),ke={};ke["[object Float32Array]"]=ke["[object Float64Array]"]=ke["[object Int8Array]"]=ke["[object Int16Array]"]=ke["[object Int32Array]"]=ke["[object Uint8Array]"]=ke["[object Uint8ClampedArray]"]=ke["[object Uint16Array]"]=ke["[object Uint32Array]"]=!0,ke["[object Arguments]"]=ke["[object Array]"]=ke["[object ArrayBuffer]"]=ke["[object Boolean]"]=ke["[object DataView]"]=ke["[object Date]"]=ke["[object Error]"]=ke["[object Function]"]=ke["[object Map]"]=ke["[object Number]"]=ke["[object Object]"]=ke["[object RegExp]"]=ke["[object Set]"]=ke["[object String]"]=ke["[object WeakMap]"]=!1;var Te={};Te["[object Arguments]"]=Te["[object Array]"]=Te["[object ArrayBuffer]"]=Te["[object DataView]"]=Te["[object Boolean]"]=Te["[object Date]"]=Te["[object Float32Array]"]=Te["[object Float64Array]"]=Te["[object Int8Array]"]=Te["[object Int16Array]"]=Te["[object Int32Array]"]=Te["[object Map]"]=Te["[object Number]"]=Te["[object Object]"]=Te["[object RegExp]"]=Te["[object Set]"]=Te["[object String]"]=Te["[object Symbol]"]=Te["[object Uint8Array]"]=Te["[object Uint8ClampedArray]"]=Te["[object Uint16Array]"]=Te["[object Uint32Array]"]=!0,Te["[object Error]"]=Te["[object Function]"]=Te["[object WeakMap]"]=!1;var Ve,Be={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ze=parseFloat,je=parseInt,Fe="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Ge="object"==typeof self&&self&&self.Object===Object&&self,Ue=Fe||Ge||Function("return this")(),qe=t&&!t.nodeType&&t,We=qe&&e&&!e.nodeType&&e,$e=We&&We.exports===qe,He=$e&&Fe.process;e:{try{Ve=He&&He.binding&&He.binding("util");break e}catch(i){}Ve=void 0}var Xe=Ve&&Ve.isArrayBuffer,Ye=Ve&&Ve.isDate,Ke=Ve&&Ve.isMap,Ze=Ve&&Ve.isRegExp,Qe=Ve&&Ve.isSet,Je=Ve&&Ve.isTypedArray,et=O("length"),tt=_({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),nt=_({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),rt=_({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),it=function e(t){function n(e){if(Qr(e)&&!ja(e)&&!(e instanceof _e)){if(e instanceof _)return e;if(ji.call(e,"__wrapped__"))return wr(e)}return new _(e)}function r(){}function _(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=G}function _e(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Le(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Be(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ve;++t<n;)this.add(e[t])}function Fe(e){this.size=(this.__data__=new Ne(e)).size}function Ge(e,t){var n,r=ja(e),i=!r&&za(e),o=!r&&!i&&Ga(e),a=!r&&!i&&!o&&Ha(e),s=(i=(r=r||i||o||a)?D(e.length,Pi):[]).length;for(n in e)!t&&!ji.call(e,n)||r&&("length"==n||o&&("offset"==n||"parent"==n)||a&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||dr(n,s))||i.push(n);return i}function qe(e){var t=e.length;return t?e[Ht(0,t-1)]:G}function We(e,t){return br(wn(e),dt(t,0,e.length))}function He(e){return br(wn(e))}function et(e,t,n){(n===G||qr(e[t],n))&&(n!==G||t in e)||ut(e,t,n)}function ot(e,t,n){var r=e[t];ji.call(e,t)&&qr(r,n)&&(n!==G||t in e)||ut(e,t,n)}function at(e,t){for(var n=e.length;n--;)if(qr(e[n][0],t))return n;return-1}function st(e,t,n,r){return zo(e,(function(e,i,o){t(r,e,n(e),o)})),r}function lt(e,t){return e&&On(t,pi(t),e)}function ut(e,t,n){"__proto__"==t&&io?io(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ct(e,t){for(var n=-1,r=t.length,i=Li(r),o=null==e;++n<r;)i[n]=o?G:ci(e,t[n]);return i}function dt(e,t,n){return e==e&&(n!==G&&(e=e<=n?e:n),t!==G&&(e=e>=t?e:t)),e}function pt(e,t,n,r,i,o){var a,s=1&t,u=2&t,c=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),a!==G)return a;if(!Zr(e))return e;if(r=ja(e)){if(a=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&ji.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return wn(e,a)}else{var d=Ko(e),p="[object Function]"==d||"[object GeneratorFunction]"==d;if(Ga(e))return yn(e,s);if("[object Object]"==d||"[object Arguments]"==d||p&&!i){if(a=u||p?{}:lr(e),!s)return u?function(e,t){return On(e,Yo(e),t)}(e,function(e,t){return e&&On(t,fi(t),e)}(a,e)):function(e,t){return On(e,Xo(e),t)}(e,lt(a,e))}else{if(!Te[d])return i?e:{};a=ur(e,d,pt,s)}}if(o||(o=new Fe),i=o.get(e))return i;o.set(e,a);u=c?u?er:Jn:u?fi:pi;var f=r?G:u(e);return l(f||e,(function(r,i){f&&(r=e[i=r]),ot(a,i,pt(r,t,n,i,e,o))})),a}function ft(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ai(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===G&&!(i in e)||!o(a))return!1}return!0}function ht(e,t,n){if("function"!=typeof e)throw new ki("Expected a function");return Jo((function(){e.apply(G,n)}),t)}function gt(e,t,n,r){var i=-1,o=p,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=h(t,N(n))),r?(o=f,a=!1):200<=t.length&&(o=A,a=!1,t=new Be(t));e:for(;++i<s;){var c=e[i],d=null==n?c:n(c);c=r||0!==c?c:0;if(a&&d==d){for(var g=u;g--;)if(t[g]===d)continue e;l.push(c)}else o(t,d,r)||l.push(c)}return l}function vt(e,t){var n=!0;return zo(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function mt(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(s===G?a==a&&!ni(a):n(a,s)))var s=a,l=o}return l}function yt(e,t){var n=[];return zo(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Ct(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=cr),i||(i=[]);++o<a;){var s=e[o];0<t&&n(s)?1<t?Ct(s,t-1,n,r,i):g(i,s):r||(i[i.length]=s)}return i}function bt(e,t){return e&&Fo(e,t,pi)}function xt(e,t){return e&&Go(e,t,pi)}function St(e,t){return d(t,(function(t){return Xr(e[t])}))}function Et(e,t){for(var n=0,r=(t=vn(t,e)).length;null!=e&&n<r;)e=e[xr(t[n++])];return n&&n==r?e:G}function wt(e,t,n){return t=t(e),ja(e)?t:g(t,n(e))}function Ot(e){if(null==e)e=e===G?"[object Undefined]":"[object Null]";else if(ro&&ro in Ai(e)){var t=ji.call(e,ro),n=e[ro];try{e[ro]=G;var r=!0}catch(e){}var i=Ui.call(e);r&&(t?e[ro]=n:delete e[ro]),e=i}else e=Ui.call(e);return e}function _t(e,t){return e>t}function Lt(e,t){return null!=e&&ji.call(e,t)}function Rt(e,t){return null!=e&&t in Ai(e)}function Dt(e,t,n){for(var r=n?f:p,i=e[0].length,o=e.length,a=o,s=Li(o),l=1/0,u=[];a--;){var c=e[a];a&&t&&(c=h(c,N(t))),l=mo(c.length,l),s[a]=!n&&(t||120<=i&&120<=c.length)?new Be(a&&c):G}c=e[0];var d=-1,g=s[0];e:for(;++d<i&&u.length<l;){var v=c[d],m=t?t(v):v;v=n||0!==v?v:0;if(g?!A(g,m):!r(u,m,n)){for(a=o;--a;){var y=s[a];if(y?!A(y,m):!r(e[a],m,n))continue e}g&&g.push(m),u.push(v)}}return u}function Nt(e,t,n){return null==(t=null==(e=2>(t=vn(t,e)).length?e:Et(e,en(t,0,-1)))?e:e[xr(Dr(t))])?G:a(t,e,n)}function It(e){return Qr(e)&&"[object Arguments]"==Ot(e)}function At(e,t,n,r,i){if(e===t)t=!0;else if(null==e||null==t||!Qr(e)&&!Qr(t))t=e!=e&&t!=t;else e:{var o,a,s=ja(e),l=ja(t),u="[object Object]"==(o="[object Arguments]"==(o=s?"[object Array]":Ko(e))?"[object Object]":o);l="[object Object]"==(a="[object Arguments]"==(a=l?"[object Array]":Ko(t))?"[object Object]":a);if((a=o==a)&&Ga(e)){if(!Ga(t)){t=!1;break e}s=!0,u=!1}if(a&&!u)i||(i=new Fe),t=s||Ha(e)?Zn(e,t,n,r,At,i):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new Yi(e),new Yi(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return qr(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=T;case"[object Set]":if(s||(s=z),e.size!=t.size&&!(1&r))break;return(n=a.get(e))?n==t:(r|=2,a.set(e,t),t=Zn(s(e),s(t),r,i,o,a),a.delete(e),t);case"[object Symbol]":if(To)return To.call(e)==To.call(t)}return!1}(e,t,o,n,r,At,i);else{if(!(1&n)&&(s=u&&ji.call(e,"__wrapped__"),o=l&&ji.call(t,"__wrapped__"),s||o)){e=s?e.value():e,t=o?t.value():t,i||(i=new Fe),t=At(e,t,n,r,i);break e}if(a)t:if(i||(i=new Fe),s=1&n,o=Jn(e),l=o.length,a=Jn(t).length,l==a||s){for(u=l;u--;){var c=o[u];if(!(s?c in t:ji.call(t,c))){t=!1;break t}}if((a=i.get(e))&&i.get(t))t=a==t;else{a=!0,i.set(e,t),i.set(t,e);for(var d=s;++u<l;){var p=e[c=o[u]],f=t[c];if(r)var h=s?r(f,p,c,t,e,i):r(p,f,c,e,t,i);if(h===G?p!==f&&!At(p,f,n,r,i):!h){a=!1;break}d||(d="constructor"==c)}a&&!d&&((n=e.constructor)!=(r=t.constructor)&&"constructor"in e&&"constructor"in t&&!("function"==typeof n&&n instanceof n&&"function"==typeof r&&r instanceof r)&&(a=!1)),i.delete(e),i.delete(t),t=a}}else t=!1;else t=!1}}return t}function Mt(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Ai(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],u=e[l],c=s[1];if(a&&s[2]){if(u===G&&!(l in e))return!1}else{if(s=new Fe,r)var d=r(u,c,l,e,t,s);if(d===G?!At(c,u,3,r,s):!d)return!1}}return!0}function Pt(e){return!(!Zr(e)||Gi&&Gi in e)&&(Xr(e)?$i:be).test(Sr(e))}function kt(e){return"function"==typeof e?e:null==e?bi:"object"==typeof e?ja(e)?jt(e[0],e[1]):zt(e):wi(e)}function Tt(e){if(!gr(e))return go(e);var t,n=[];for(t in Ai(e))ji.call(e,t)&&"constructor"!=t&&n.push(t);return n}function Vt(e,t){return e<t}function Bt(e,t){var n=-1,r=Wr(e)?Li(e.length):[];return zo(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function zt(e){var t=or(e);return 1==t.length&&t[0][2]?vr(t[0][0],t[0][1]):function(n){return n===e||Mt(n,e,t)}}function jt(e,t){return fr(e)&&t==t&&!Zr(t)?vr(xr(e),t):function(n){var r=ci(n,e);return r===G&&r===t?di(n,e):At(t,r,3)}}function Ft(e,t,n,r,i){e!==t&&Fo(t,(function(o,a){if(Zr(o)){i||(i=new Fe);var s=i,l=e[a],u=t[a];if(h=s.get(u))et(e,a,h);else{var c=(h=r?r(l,u,a+"",e,t,s):G)===G;if(c){var d=ja(u),p=!d&&Ga(u),f=!d&&!p&&Ha(u),h=u;d||p||f?ja(l)?h=l:$r(l)?h=wn(l):p?(c=!1,h=yn(u,!0)):f?(c=!1,h=bn(u,!0)):h=[]:ei(u)||za(u)?(h=l,za(l)?h=li(l):(!Zr(l)||n&&Xr(l))&&(h=lr(u))):c=!1}c&&(s.set(u,h),Ft(h,u,n,r,s),s.delete(u)),et(e,a,h)}}else(s=r?r(e[a],o,a+"",e,t,i):G)===G&&(s=o),et(e,a,s)}),fi)}function Gt(e,t){var n=e.length;if(n)return dr(t+=0>t?n:0,n)?e[t]:G}function Ut(e,t,n){var r=-1;return t=h(t.length?t:[bi],N(rr())),e=Bt(e,(function(e){return{a:h(t,(function(t){return t(e)})),b:++r,c:e}})),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].c;return e}(e,(function(e,t){var r;e:{r=-1;for(var i=e.a,o=t.a,a=i.length,s=n.length;++r<a;){var l=xn(i[r],o[r]);if(l){r=r>=s?l:l*("desc"==n[r]?-1:1);break e}}r=e.b-t.b}return r}))}function qt(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Et(e,a);n(s,a)&&Qt(o,vn(a,e),s)}return o}function Wt(e,t,n,r){var i=r?S:x,o=-1,a=t.length,s=e;for(e===t&&(t=wn(t)),n&&(s=h(e,N(n)));++o<a;){var l=0,u=t[o];for(u=n?n(u):u;-1<(l=i(s,u,l,r));)s!==e&&eo.call(s,l,1),eo.call(e,l,1)}return e}function $t(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;dr(i)?eo.call(e,i,1):un(e,i)}}}function Ht(e,t){return e+uo(bo()*(t-e+1))}function Xt(e,t){var n="";if(!e||1>t||9007199254740991<t)return n;do{t%2&&(n+=e),(t=uo(t/2))&&(e+=e)}while(t);return n}function Yt(e,t){return ea(mr(e,t,bi),e+"")}function Kt(e){return qe(gi(e))}function Zt(e,t){var n=gi(e);return br(n,dt(t,0,n.length))}function Qt(e,t,n,r){if(!Zr(e))return e;for(var i=-1,o=(t=vn(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var l=xr(t[i]),u=n;if(i!=a){var c=s[l];(u=r?r(c,l,s):G)===G&&(u=Zr(c)?c:dr(t[i+1])?[]:{})}ot(s,l,u),s=s[l]}return e}function Jt(e){return br(gi(e))}function en(e,t,n){var r=-1,i=e.length;for(0>t&&(t=-t>i?0:i+t),0>(n=n>i?i:n)&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0,n=Li(i);++r<i;)n[r]=e[r+t];return n}function tn(e,t){var n;return zo(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function nn(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&2147483647>=i){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ni(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return rn(e,t,bi,n)}function rn(e,t,n,r){t=n(t);for(var i=0,o=null==e?0:e.length,a=t!=t,s=null===t,l=ni(t),u=t===G;i<o;){var c=uo((i+o)/2),d=n(e[c]),p=d!==G,f=null===d,h=d==d,g=ni(d);(a?r||h:u?h&&(r||p):s?h&&p&&(r||!f):l?h&&p&&!f&&(r||!g):!f&&!g&&(r?d<=t:d<t))?i=c+1:o=c}return mo(o,4294967294)}function on(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!qr(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function an(e){return"number"==typeof e?e:ni(e)?q:+e}function sn(e){if("string"==typeof e)return e;if(ja(e))return h(e,sn)+"";if(ni(e))return Vo?Vo.call(e):"";var t=e+"";return"0"==t&&1/e==-U?"-0":t}function ln(e,t,n){var r=-1,i=p,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=f;else if(200<=o){if(i=t?null:$o(e))return z(i);a=!1,i=A,l=new Be}else l=t?[]:s;e:for(;++r<o;){var u=e[r],c=t?t(u):u;u=n||0!==u?u:0;if(a&&c==c){for(var d=l.length;d--;)if(l[d]===c)continue e;t&&l.push(c),s.push(u)}else i(l,c,n)||(l!==s&&l.push(c),s.push(u))}return s}function un(e,t){return null==(e=2>(t=vn(t,e)).length?e:Et(e,en(t,0,-1)))||delete e[xr(Dr(t))]}function cn(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?en(e,r?0:o,r?o+1:i):en(e,r?o+1:0,r?i:o)}function dn(e,t){var n=e;return n instanceof _e&&(n=n.value()),v(t,(function(e,t){return t.func.apply(t.thisArg,g([e],t.args))}),n)}function pn(e,t,n){var r=e.length;if(2>r)return r?ln(e[0]):[];for(var i=-1,o=Li(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=gt(o[i]||a,e[s],t,n));return ln(Ct(o,1),t,n)}function fn(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;)n(a,e[r],r<o?t[r]:G);return a}function hn(e){return $r(e)?e:[]}function gn(e){return"function"==typeof e?e:bi}function vn(e,t){return ja(e)?e:fr(e,t)?[e]:ta(ui(e))}function mn(e,t,n){var r=e.length;return n=n===G?r:n,!t&&n>=r?e:en(e,t,n)}function yn(e,t){if(t)return e.slice();var n=e.length;n=Ki?Ki(n):new e.constructor(n);return e.copy(n),n}function Cn(e){var t=new e.constructor(e.byteLength);return new Yi(t).set(new Yi(e)),t}function bn(e,t){return new e.constructor(t?Cn(e.buffer):e.buffer,e.byteOffset,e.length)}function xn(e,t){if(e!==t){var n=e!==G,r=null===e,i=e==e,o=ni(e),a=t!==G,s=null===t,l=t==t,u=ni(t);if(!s&&!u&&!o&&e>t||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e<t||u&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}function Sn(e,t,n,r){var i=-1,o=e.length,a=n.length,s=-1,l=t.length,u=vo(o-a,0),c=Li(l+u);for(r=!r;++s<l;)c[s]=t[s];for(;++i<a;)(r||i<o)&&(c[n[i]]=e[i]);for(;u--;)c[s++]=e[i++];return c}function En(e,t,n,r){var i=-1,o=e.length,a=-1,s=n.length,l=-1,u=t.length,c=vo(o-s,0),d=Li(c+u);for(r=!r;++i<c;)d[i]=e[i];for(c=i;++l<u;)d[c+l]=t[l];for(;++a<s;)(r||i<o)&&(d[c+n[a]]=e[i++]);return d}function wn(e,t){var n=-1,r=e.length;for(t||(t=Li(r));++n<r;)t[n]=e[n];return t}function On(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):G;l===G&&(l=e[s]),i?ut(n,s,l):ot(n,s,l)}return n}function _n(e,t){return function(n,r){var i=ja(n)?s:st,o=t?t():{};return i(n,e,rr(r,2),o)}}function Ln(e){return Yt((function(t,n){var r=-1,i=n.length,o=1<i?n[i-1]:G,a=2<i?n[2]:G;o=3<e.length&&"function"==typeof o?(i--,o):G;for(a&&pr(n[0],n[1],a)&&(o=3>i?G:o,i=1),t=Ai(t);++r<i;)(a=n[r])&&e(t,a,r,o);return t}))}function Rn(e,t){return function(n,r){if(null==n)return n;if(!Wr(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ai(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Dn(e){return function(t,n,r){for(var i=-1,o=Ai(t),a=(r=r(t)).length;a--;){var s=r[e?a:++i];if(!1===n(o[s],s,o))break}return t}}function Nn(e){return function(t){t=ui(t);var n=Ae.test(t)?F(t):G,r=n?n[0]:t.charAt(0);return t=n?mn(n,1).join(""):t.slice(1),r[e]()+t}}function In(e){return function(t){return v(yi(mi(t).replace(Re,"")),e,"")}}function An(e){return function(){switch((t=arguments).length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var t,n=Bo(e.prototype);return Zr(t=e.apply(n,t))?t:n}}function Mn(e,t,n){var r=An(e);return function i(){for(var o=arguments.length,s=Li(o),l=o,u=nr(i);l--;)s[l]=arguments[l];return(o-=(l=3>o&&s[0]!==u&&s[o-1]!==u?[]:B(s,u)).length)<n?qn(e,t,Tn,i.placeholder,G,s,l,G,G,n-o):a(this&&this!==Ue&&this instanceof i?r:e,this,s)}}function Pn(e){return function(t,n,r){var i=Ai(t);if(!Wr(t)){var o=rr(n,3);t=pi(t),n=function(e){return o(i[e],e,i)}}return-1<(n=e(t,n,r))?i[o?t[n]:n]:G}}function kn(e){return Qn((function(t){var n=t.length,r=n,i=_.prototype.thru;for(e&&t.reverse();r--;){if("function"!=typeof(a=t[r]))throw new ki("Expected a function");if(i&&!o&&"wrapper"==tr(a))var o=new _([],!0)}for(r=o?r:n;++r<n;){var a,s="wrapper"==(i=tr(a=t[r]))?Ho(a):G;o=s&&hr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?o[tr(s[0])].apply(o,s[3]):1==a.length&&hr(a)?o[i]():o.thru(a)}return function(){var e=(i=arguments)[0];if(o&&1==i.length&&ja(e))return o.plant(e).value();for(var r=0,i=n?t[r].apply(this,i):e;++r<n;)i=t[r].call(this,i);return i}}))}function Tn(e,t,n,r,i,o,a,s,l,u){var c=128&t,d=1&t,p=2&t,f=24&t,h=512&t,g=p?G:An(e);return function v(){for(var m=arguments.length,y=Li(m),C=m;C--;)y[C]=arguments[C];if(f){var b,x=nr(v);C=y.length;for(b=0;C--;)y[C]===x&&++b}if(r&&(y=Sn(y,r,i,f)),o&&(y=En(y,o,a,f)),m-=b,f&&m<u)return x=B(y,x),qn(e,t,Tn,v.placeholder,n,y,x,s,l,u-m);if(x=d?n:this,C=p?x[e]:e,m=y.length,s){b=y.length;for(var S=mo(s.length,b),E=wn(y);S--;){var w=s[S];y[S]=dr(w,b)?E[w]:G}}else h&&1<m&&y.reverse();return c&&l<m&&(y.length=l),this&&this!==Ue&&this instanceof v&&(C=g||An(C)),C.apply(x,y)}}function Vn(e,t){return function(n,r){return function(e,t,n){var r={};return bt(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r))}}function Bn(e,t){return function(n,r){var i;if(n===G&&r===G)return t;if(n!==G&&(i=n),r!==G){if(i===G)return r;"string"==typeof n||"string"==typeof r?(n=sn(n),r=sn(r)):(n=an(n),r=an(r)),i=e(n,r)}return i}}function zn(e){return Qn((function(t){return t=h(t,N(rr())),Yt((function(n){var r=this;return e(t,(function(e){return a(e,r,n)}))}))}))}function jn(e,t){var n=(t=t===G?" ":sn(t)).length;return 2>n?n?Xt(t,e):t:(n=Xt(t,lo(e/j(t))),Ae.test(t)?mn(F(n),0,e).join(""):n.slice(0,e))}function Fn(e,t,n,r){var i=1&t,o=An(e);return function t(){for(var s=-1,l=arguments.length,u=-1,c=r.length,d=Li(c+l),p=this&&this!==Ue&&this instanceof t?o:e;++u<c;)d[u]=r[u];for(;l--;)d[u++]=arguments[++s];return a(p,i?n:this,d)}}function Gn(e){return function(t,n,r){r&&"number"!=typeof r&&pr(t,n,r)&&(n=r=G),t=ii(t),n===G?(n=t,t=0):n=ii(n),r=r===G?t<n?1:-1:ii(r);var i=-1;n=vo(lo((n-t)/(r||1)),0);for(var o=Li(n);n--;)o[e?n:++i]=t,t+=r;return o}}function Un(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=si(t),n=si(n)),e(t,n)}}function qn(e,t,n,r,i,o,a,s,l,u){var c=8&t;return 4&(t=(t|(c?32:64))&~(c?64:32))||(t&=-4),i=[e,t,i,c?o:G,c?a:G,o=c?G:o,a=c?G:a,s,l,u],n=n.apply(G,i),hr(e)&&Qo(n,i),n.placeholder=r,yr(n,e,t)}function Wn(e){var t=Ii[e];return function(e,n){if(e=si(e),n=null==n?0:mo(oi(n),292)){var r=(ui(e)+"e").split("e");return+((r=(ui(r=t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}function $n(e){return function(t){var n=Ko(t);return"[object Map]"==n?T(t):"[object Set]"==n?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return h(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Hn(e,t,n,r,i,o,a,s){var l=2&t;if(!l&&"function"!=typeof e)throw new ki("Expected a function");var u=r?r.length:0;if(u||(t&=-97,r=i=G),a=a===G?a:vo(oi(a),0),s=s===G?s:oi(s),u-=i?i.length:0,64&t){var c=r,d=i;r=i=G}var p=l?G:Ho(e);return o=[e,t,n,r,i,c,d,o,a,s],p&&(t=(n=o[1])|(e=p[1]),r=128==e&&8==n||128==e&&256==n&&o[7].length<=p[8]||384==e&&p[7].length<=p[8]&&8==n,131>t||r)&&(1&e&&(o[2]=p[2],t|=1&n?0:4),(n=p[3])&&(r=o[3],o[3]=r?Sn(r,n,p[4]):n,o[4]=r?B(o[3],"__lodash_placeholder__"):p[4]),(n=p[5])&&(r=o[5],o[5]=r?En(r,n,p[6]):n,o[6]=r?B(o[5],"__lodash_placeholder__"):p[6]),(n=p[7])&&(o[7]=n),128&e&&(o[8]=null==o[8]?p[8]:mo(o[8],p[8])),null==o[9]&&(o[9]=p[9]),o[0]=p[0],o[1]=t),e=o[0],t=o[1],n=o[2],r=o[3],i=o[4],!(s=o[9]=o[9]===G?l?0:e.length:vo(o[9]-u,0))&&24&t&&(t&=-25),yr((p?Uo:Qo)(t&&1!=t?8==t||16==t?Mn(e,t,s):32!=t&&33!=t||i.length?Tn.apply(G,o):Fn(e,t,n,r):function(e,t,n){var r=1&t,i=An(e);return function t(){return(this&&this!==Ue&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n),o),e,t)}function Xn(e,t,n,r){return e===G||qr(e,Vi[n])&&!ji.call(r,n)?t:e}function Yn(e,t,n,r,i,o){return Zr(e)&&Zr(t)&&(o.set(t,e),Ft(e,t,G,Yn,o),o.delete(t)),e}function Kn(e){return ei(e)?G:e}function Zn(e,t,n,r,i,o){var a=1&n,s=e.length;if(s!=(l=t.length)&&!(a&&l>s))return!1;if((l=o.get(e))&&o.get(t))return l==t;var l=-1,u=!0,c=2&n?new Be:G;for(o.set(e,t),o.set(t,e);++l<s;){var d=e[l],p=t[l];if(r)var f=a?r(p,d,l,t,e,o):r(d,p,l,e,t,o);if(f!==G){if(f)continue;u=!1;break}if(c){if(!y(t,(function(e,t){if(!A(c,t)&&(d===e||i(d,e,n,r,o)))return c.push(t)}))){u=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){u=!1;break}}return o.delete(e),o.delete(t),u}function Qn(e){return ea(mr(e,G,Lr),e+"")}function Jn(e){return wt(e,pi,Xo)}function er(e){return wt(e,fi,Yo)}function tr(e){for(var t=e.name+"",n=Do[t],r=ji.call(Do,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function nr(e){return(ji.call(n,"placeholder")?n:e).placeholder}function rr(){var e=(e=n.iteratee||xi)===xi?kt:e;return arguments.length?e(arguments[0],arguments[1]):e}function ir(e,t){var n=e.__data__,r=typeof t;return("string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function or(e){for(var t=pi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,i==i&&!Zr(i)]}return t}function ar(e,t){var n=null==e?G:e[t];return Pt(n)?n:G}function sr(e,t,n){for(var r=-1,i=(t=vn(t,e)).length,o=!1;++r<i;){var a=xr(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Kr(i)&&dr(a,i)&&(ja(e)||za(e))}function lr(e){return"function"!=typeof e.constructor||gr(e)?{}:Bo(Zi(e))}function ur(e,t,n,r){var a=e.constructor;switch(t){case"[object ArrayBuffer]":return Cn(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return t=r?Cn(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength);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 bn(e,r);case"[object Map]":return v(t=r?n(T(e),1):T(e),i,new e.constructor);case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(t=new e.constructor(e.source,me.exec(e))).lastIndex=e.lastIndex,t;case"[object Set]":return v(t=r?n(z(e),1):z(e),o,new e.constructor);case"[object Symbol]":return To?Ai(To.call(e)):{}}}function cr(e){return ja(e)||za(e)||!!(to&&e&&e[to])}function dr(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||Se.test(e))&&-1<e&&0==e%1&&e<t}function pr(e,t,n){if(!Zr(n))return!1;var r=typeof t;return!!("number"==r?Wr(n)&&dr(t,n.length):"string"==r&&t in n)&&qr(n[t],e)}function fr(e,t){if(ja(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ni(e))||re.test(e)||!ne.test(e)||null!=t&&e in Ai(t)}function hr(e){var t=tr(e),r=n[t];return"function"==typeof r&&t in _e.prototype&&(e===r||!!(t=Ho(r))&&e===t[0])}function gr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Vi)}function vr(e,t){return function(n){return null!=n&&n[e]===t&&(t!==G||e in Ai(n))}}function mr(e,t,n){return t=vo(t===G?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=vo(r.length-t,0),s=Li(o);++i<o;)s[i]=r[t+i];for(i=-1,o=Li(t+1);++i<t;)o[i]=r[i];return o[t]=n(s),a(e,this,o)}}function yr(e,t,n){var r=t+"";t=ea;var i,o=Er;return n=o(i=(i=r.match(pe))?i[1].split(fe):[],n),(o=n.length)&&(n[i=o-1]=(1<o?"& ":"")+n[i],n=n.join(2<o?", ":" "),r=r.replace(de,"{\n/* [wrapped with "+n+"] */\n")),t(e,r)}function Cr(e){var t=0,n=0;return function(){var r=yo(),i=16-(r-n);if(n=r,0<i){if(800<=++t)return arguments[0]}else t=0;return e.apply(G,arguments)}}function br(e,t){var n=-1,r=(i=e.length)-1;for(t=t===G?i:t;++n<t;){var i,o=e[i=Ht(n,r)];e[i]=e[n],e[n]=o}return e.length=t,e}function xr(e){if("string"==typeof e||ni(e))return e;var t=e+"";return"0"==t&&1/e==-U?"-0":t}function Sr(e){if(null!=e){try{return zi.call(e)}catch(e){}return e+""}return""}function Er(e,t){return l(W,(function(n){var r="_."+n[0];t&n[1]&&!p(e,r)&&e.push(r)})),e.sort()}function wr(e){if(e instanceof _e)return e.clone();var t=new _(e.__wrapped__,e.__chain__);return t.__actions__=wn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Or(e,t,n){var r=null==e?0:e.length;return r?(0>(n=null==n?0:oi(n))&&(n=vo(r+n,0)),b(e,rr(t,3),n)):-1}function _r(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==G&&(i=oi(n),i=0>n?vo(r+i,0):mo(i,r-1)),b(e,rr(t,3),i,!0)}function Lr(e){return null!=e&&e.length?Ct(e,1):[]}function Rr(e){return e&&e.length?e[0]:G}function Dr(e){var t=null==e?0:e.length;return t?e[t-1]:G}function Nr(e,t){return e&&e.length&&t&&t.length?Wt(e,t):e}function Ir(e){return null==e?e:xo.call(e)}function Ar(e){if(!e||!e.length)return[];var t=0;return e=d(e,(function(e){if($r(e))return t=vo(e.length,t),!0})),D(t,(function(t){return h(e,O(t))}))}function Mr(e,t){if(!e||!e.length)return[];var n=Ar(e);return null==t?n:h(n,(function(e){return a(t,G,e)}))}function Pr(e){return(e=n(e)).__chain__=!0,e}function kr(e,t){return t(e)}function Tr(e,t){return(ja(e)?l:zo)(e,rr(t,3))}function Vr(e,t){return(ja(e)?u:jo)(e,rr(t,3))}function Br(e,t){return(ja(e)?h:Bt)(e,rr(t,3))}function zr(e,t,n){return t=n?G:t,t=e&&null==t?e.length:t,Hn(e,128,G,G,G,G,t)}function jr(e,t){var n;if("function"!=typeof t)throw new ki("Expected a function");return e=oi(e),function(){return 0<--e&&(n=t.apply(this,arguments)),1>=e&&(t=G),n}}function Fr(e,t,n){function r(t){var n=l,r=u;return l=u=G,h=t,d=e.apply(r,n)}function i(e){var n=e-f;return e-=h,f===G||n>=t||0>n||v&&e>=c}function o(){var e=Ra();if(i(e))return a(e);var n,r=Jo;n=e-h,e=t-(e-f),n=v?mo(e,c-n):e,p=r(o,n)}function a(e){return p=G,m&&l?r(e):(l=u=G,d)}function s(){var e=Ra(),n=i(e);if(l=arguments,u=this,f=e,n){if(p===G)return h=e=f,p=Jo(o,t),g?r(e):d;if(v)return p=Jo(o,t),r(f)}return p===G&&(p=Jo(o,t)),d}var l,u,c,d,p,f,h=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new ki("Expected a function");return t=si(t)||0,Zr(n)&&(g=!!n.leading,c=(v="maxWait"in n)?vo(si(n.maxWait)||0,t):c,m="trailing"in n?!!n.trailing:m),s.cancel=function(){p!==G&&Wo(p),h=0,l=f=u=p=G},s.flush=function(){return p===G?d:a(Ra())},s}function Gr(e,t){function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;return o.has(i)?o.get(i):(r=e.apply(this,r),n.cache=o.set(i,r)||o,r)}if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ki("Expected a function");return n.cache=new(Gr.Cache||Ve),n}function Ur(e){if("function"!=typeof e)throw new ki("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function qr(e,t){return e===t||e!=e&&t!=t}function Wr(e){return null!=e&&Kr(e.length)&&!Xr(e)}function $r(e){return Qr(e)&&Wr(e)}function Hr(e){if(!Qr(e))return!1;var t=Ot(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ei(e)}function Xr(e){return!!Zr(e)&&("[object Function]"==(e=Ot(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function Yr(e){return"number"==typeof e&&e==oi(e)}function Kr(e){return"number"==typeof e&&-1<e&&0==e%1&&9007199254740991>=e}function Zr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Qr(e){return null!=e&&"object"==typeof e}function Jr(e){return"number"==typeof e||Qr(e)&&"[object Number]"==Ot(e)}function ei(e){return!(!Qr(e)||"[object Object]"!=Ot(e))&&(null===(e=Zi(e))||"function"==typeof(e=ji.call(e,"constructor")&&e.constructor)&&e instanceof e&&zi.call(e)==qi)}function ti(e){return"string"==typeof e||!ja(e)&&Qr(e)&&"[object String]"==Ot(e)}function ni(e){return"symbol"==typeof e||Qr(e)&&"[object Symbol]"==Ot(e)}function ri(e){if(!e)return[];if(Wr(e))return ti(e)?F(e):wn(e);if(no&&e[no]){e=e[no]();for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}return("[object Map]"==(t=Ko(e))?T:"[object Set]"==t?z:gi)(e)}function ii(e){return e?(e=si(e))===U||e===-U?17976931348623157e292*(0>e?-1:1):e==e?e:0:0===e?e:0}function oi(e){var t=(e=ii(e))%1;return e==e?t?e-t:e:0}function ai(e){return e?dt(oi(e),0,4294967295):0}function si(e){if("number"==typeof e)return e;if(ni(e))return q;if(Zr(e)&&(e=Zr(e="function"==typeof e.valueOf?e.valueOf():e)?e+"":e),"string"!=typeof e)return 0===e?e:+e;e=e.replace(le,"");var t=Ce.test(e);return t||xe.test(e)?je(e.slice(2),t?2:8):ye.test(e)?q:+e}function li(e){return On(e,fi(e))}function ui(e){return null==e?"":sn(e)}function ci(e,t,n){return(e=null==e?G:Et(e,t))===G?n:e}function di(e,t){return null!=e&&sr(e,t,Rt)}function pi(e){return Wr(e)?Ge(e):Tt(e)}function fi(e){if(Wr(e))e=Ge(e,!0);else if(Zr(e)){var t,n=gr(e),r=[];for(t in e)("constructor"!=t||!n&&ji.call(e,t))&&r.push(t);e=r}else{if(t=[],null!=e)for(n in Ai(e))t.push(n);e=t}return e}function hi(e,t){if(null==e)return{};var n=h(er(e),(function(e){return[e]}));return t=rr(t),qt(e,n,(function(e,n){return t(e,n[0])}))}function gi(e){return null==e?[]:I(e,pi(e))}function vi(e){return Cs(ui(e).toLowerCase())}function mi(e){return(e=ui(e))&&e.replace(Ee,tt).replace(De,"")}function yi(e,t,n){return e=ui(e),(t=n?G:t)===G?Me.test(e)?e.match(Ie)||[]:e.match(he)||[]:e.match(t)||[]}function Ci(e){return function(){return e}}function bi(e){return e}function xi(e){return kt("function"==typeof e?e:pt(e,1))}function Si(e,t,n){var r=pi(t),i=St(t,r);null!=n||Zr(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=St(t,pi(t)));var o=!(Zr(n)&&"chain"in n&&!n.chain),a=Xr(e);return l(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=wn(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,g([this.value()],arguments))})})),e}function Ei(){}function wi(e){return fr(e)?O(xr(e)):function(e){return function(t){return Et(t,e)}}(e)}function Oi(){return[]}function _i(){return!1}var Li=(t=null==t?Ue:it.defaults(Ue.Object(),t,it.pick(Ue,Pe))).Array,Ri=t.Date,Di=t.Error,Ni=t.Function,Ii=t.Math,Ai=t.Object,Mi=t.RegExp,Pi=t.String,ki=t.TypeError,Ti=Li.prototype,Vi=Ai.prototype,Bi=t["__core-js_shared__"],zi=Ni.prototype.toString,ji=Vi.hasOwnProperty,Fi=0,Gi=function(){var e=/[^.]+$/.exec(Bi&&Bi.keys&&Bi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ui=Vi.toString,qi=zi.call(Ai),Wi=Ue._,$i=Mi("^"+zi.call(ji).replace(ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hi=$e?t.Buffer:G,Xi=t.Symbol,Yi=t.Uint8Array,Ki=Hi?Hi.f:G,Zi=V(Ai.getPrototypeOf,Ai),Qi=Ai.create,Ji=Vi.propertyIsEnumerable,eo=Ti.splice,to=Xi?Xi.isConcatSpreadable:G,no=Xi?Xi.iterator:G,ro=Xi?Xi.toStringTag:G,io=function(){try{var e=ar(Ai,"defineProperty");return e({},"",{}),e}catch(e){}}(),oo=t.clearTimeout!==Ue.clearTimeout&&t.clearTimeout,ao=Ri&&Ri.now!==Ue.Date.now&&Ri.now,so=t.setTimeout!==Ue.setTimeout&&t.setTimeout,lo=Ii.ceil,uo=Ii.floor,co=Ai.getOwnPropertySymbols,po=Hi?Hi.isBuffer:G,fo=t.isFinite,ho=Ti.join,go=V(Ai.keys,Ai),vo=Ii.max,mo=Ii.min,yo=Ri.now,Co=t.parseInt,bo=Ii.random,xo=Ti.reverse,So=ar(t,"DataView"),Eo=ar(t,"Map"),wo=ar(t,"Promise"),Oo=ar(t,"Set"),_o=ar(t,"WeakMap"),Lo=ar(Ai,"create"),Ro=_o&&new _o,Do={},No=Sr(So),Io=Sr(Eo),Ao=Sr(wo),Mo=Sr(Oo),Po=Sr(_o),ko=Xi?Xi.prototype:G,To=ko?ko.valueOf:G,Vo=ko?ko.toString:G,Bo=function(){function e(){}return function(t){return Zr(t)?Qi?Qi(t):(e.prototype=t,t=new e,e.prototype=G,t):{}}}();n.templateSettings={escape:J,evaluate:ee,interpolate:te,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,_.prototype=Bo(r.prototype),_.prototype.constructor=_,_e.prototype=Bo(r.prototype),_e.prototype.constructor=_e,Le.prototype.clear=function(){this.__data__=Lo?Lo(null):{},this.size=0},Le.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},Le.prototype.get=function(e){var t=this.__data__;return Lo?"__lodash_hash_undefined__"===(e=t[e])?G:e:ji.call(t,e)?t[e]:G},Le.prototype.has=function(e){var t=this.__data__;return Lo?t[e]!==G:ji.call(t,e)},Le.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Lo&&t===G?"__lodash_hash_undefined__":t,this},Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(e){var t=this.__data__;return!(0>(e=at(t,e))||(e==t.length-1?t.pop():eo.call(t,e,1),--this.size,0))},Ne.prototype.get=function(e){var t=this.__data__;return 0>(e=at(t,e))?G:t[e][1]},Ne.prototype.has=function(e){return-1<at(this.__data__,e)},Ne.prototype.set=function(e,t){var n=this.__data__,r=at(n,e);return 0>r?(++this.size,n.push([e,t])):n[r][1]=t,this},Ve.prototype.clear=function(){this.size=0,this.__data__={hash:new Le,map:new(Eo||Ne),string:new Le}},Ve.prototype.delete=function(e){return e=ir(this,e).delete(e),this.size-=e?1:0,e},Ve.prototype.get=function(e){return ir(this,e).get(e)},Ve.prototype.has=function(e){return ir(this,e).has(e)},Ve.prototype.set=function(e,t){var n=ir(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Be.prototype.add=Be.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Be.prototype.has=function(e){return this.__data__.has(e)},Fe.prototype.clear=function(){this.__data__=new Ne,this.size=0},Fe.prototype.delete=function(e){var t=this.__data__;return e=t.delete(e),this.size=t.size,e},Fe.prototype.get=function(e){return this.__data__.get(e)},Fe.prototype.has=function(e){return this.__data__.has(e)},Fe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!Eo||199>r.length)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ve(r)}return n.set(e,t),this.size=n.size,this};var zo=Rn(bt),jo=Rn(xt,!0),Fo=Dn(),Go=Dn(!0),Uo=Ro?function(e,t){return Ro.set(e,t),e}:bi,qo=io?function(e,t){return io(e,"toString",{configurable:!0,enumerable:!1,value:Ci(t),writable:!0})}:bi,Wo=oo||function(e){return Ue.clearTimeout(e)},$o=Oo&&1/z(new Oo([,-0]))[1]==U?function(e){return new Oo(e)}:Ei,Ho=Ro?function(e){return Ro.get(e)}:Ei,Xo=co?function(e){return null==e?[]:(e=Ai(e),d(co(e),(function(t){return Ji.call(e,t)})))}:Oi,Yo=co?function(e){for(var t=[];e;)g(t,Xo(e)),e=Zi(e);return t}:Oi,Ko=Ot;(So&&"[object DataView]"!=Ko(new So(new ArrayBuffer(1)))||Eo&&"[object Map]"!=Ko(new Eo)||wo&&"[object Promise]"!=Ko(wo.resolve())||Oo&&"[object Set]"!=Ko(new Oo)||_o&&"[object WeakMap]"!=Ko(new _o))&&(Ko=function(e){var t=Ot(e);if(e=(e="[object Object]"==t?e.constructor:G)?Sr(e):"")switch(e){case No:return"[object DataView]";case Io:return"[object Map]";case Ao:return"[object Promise]";case Mo:return"[object Set]";case Po:return"[object WeakMap]"}return t});var Zo=Bi?Xr:_i,Qo=Cr(Uo),Jo=so||function(e,t){return Ue.setTimeout(e,t)},ea=Cr(qo),ta=function(e){var t=(e=Gr(e,(function(e){return 500===t.size&&t.clear(),e}))).cache;return e}((function(e){var t=[];return ie.test(e)&&t.push(""),e.replace(oe,(function(e,n,r,i){t.push(r?i.replace(ge,"$1"):n||e)})),t})),na=Yt((function(e,t){return $r(e)?gt(e,Ct(t,1,$r,!0)):[]})),ra=Yt((function(e,t){var n=Dr(t);return $r(n)&&(n=G),$r(e)?gt(e,Ct(t,1,$r,!0),rr(n,2)):[]})),ia=Yt((function(e,t){var n=Dr(t);return $r(n)&&(n=G),$r(e)?gt(e,Ct(t,1,$r,!0),G,n):[]})),oa=Yt((function(e){var t=h(e,hn);return t.length&&t[0]===e[0]?Dt(t):[]})),aa=Yt((function(e){var t=Dr(e),n=h(e,hn);return t===Dr(n)?t=G:n.pop(),n.length&&n[0]===e[0]?Dt(n,rr(t,2)):[]})),sa=Yt((function(e){var t=Dr(e),n=h(e,hn);return(t="function"==typeof t?t:G)&&n.pop(),n.length&&n[0]===e[0]?Dt(n,G,t):[]})),la=Yt(Nr),ua=Qn((function(e,t){var n=null==e?0:e.length,r=ct(e,t);return $t(e,h(t,(function(e){return dr(e,n)?+e:e})).sort(xn)),r})),ca=Yt((function(e){return ln(Ct(e,1,$r,!0))})),da=Yt((function(e){var t=Dr(e);return $r(t)&&(t=G),ln(Ct(e,1,$r,!0),rr(t,2))})),pa=Yt((function(e){var t="function"==typeof(t=Dr(e))?t:G;return ln(Ct(e,1,$r,!0),G,t)})),fa=Yt((function(e,t){return $r(e)?gt(e,t):[]})),ha=Yt((function(e){return pn(d(e,$r))})),ga=Yt((function(e){var t=Dr(e);return $r(t)&&(t=G),pn(d(e,$r),rr(t,2))})),va=Yt((function(e){var t="function"==typeof(t=Dr(e))?t:G;return pn(d(e,$r),G,t)})),ma=Yt(Ar),ya=Yt((function(e){var t="function"==typeof(t=1<(t=e.length)?e[t-1]:G)?(e.pop(),t):G;return Mr(e,t)})),Ca=Qn((function(e){function t(t){return ct(t,e)}var n=e.length,r=n?e[0]:0,i=this.__wrapped__;return!(1<n||this.__actions__.length)&&i instanceof _e&&dr(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:kr,args:[t],thisArg:G}),new _(i,this.__chain__).thru((function(e){return n&&!e.length&&e.push(G),e}))):this.thru(t)})),ba=_n((function(e,t,n){ji.call(e,n)?++e[n]:ut(e,n,1)})),xa=Pn(Or),Sa=Pn(_r),Ea=_n((function(e,t,n){ji.call(e,n)?e[n].push(t):ut(e,n,[t])})),wa=Yt((function(e,t,n){var r=-1,i="function"==typeof t,o=Wr(e)?Li(e.length):[];return zo(e,(function(e){o[++r]=i?a(t,e,n):Nt(e,t,n)})),o})),Oa=_n((function(e,t,n){ut(e,n,t)})),_a=_n((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),La=Yt((function(e,t){if(null==e)return[];var n=t.length;return 1<n&&pr(e,t[0],t[1])?t=[]:2<n&&pr(t[0],t[1],t[2])&&(t=[t[0]]),Ut(e,Ct(t,1),[])})),Ra=ao||function(){return Ue.Date.now()},Da=Yt((function(e,t,n){var r=1;if(n.length){var i=B(n,nr(Da));r=32|r}return Hn(e,r,t,n,i)})),Na=Yt((function(e,t,n){var r=3;if(n.length){var i=B(n,nr(Na));r=32|r}return Hn(t,r,e,n,i)})),Ia=Yt((function(e,t){return ht(e,1,t)})),Aa=Yt((function(e,t,n){return ht(e,si(t)||0,n)}));Gr.Cache=Ve;var Ma=Yt((function(e,t){var n=(t=1==t.length&&ja(t[0])?h(t[0],N(rr())):h(Ct(t,1),N(rr()))).length;return Yt((function(r){for(var i=-1,o=mo(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return a(e,this,r)}))})),Pa=Yt((function(e,t){return Hn(e,32,G,t,B(t,nr(Pa)))})),ka=Yt((function(e,t){return Hn(e,64,G,t,B(t,nr(ka)))})),Ta=Qn((function(e,t){return Hn(e,256,G,G,G,t)})),Va=Un(_t),Ba=Un((function(e,t){return e>=t})),za=It(function(){return arguments}())?It:function(e){return Qr(e)&&ji.call(e,"callee")&&!Ji.call(e,"callee")},ja=Li.isArray,Fa=Xe?N(Xe):function(e){return Qr(e)&&"[object ArrayBuffer]"==Ot(e)},Ga=po||_i,Ua=Ye?N(Ye):function(e){return Qr(e)&&"[object Date]"==Ot(e)},qa=Ke?N(Ke):function(e){return Qr(e)&&"[object Map]"==Ko(e)},Wa=Ze?N(Ze):function(e){return Qr(e)&&"[object RegExp]"==Ot(e)},$a=Qe?N(Qe):function(e){return Qr(e)&&"[object Set]"==Ko(e)},Ha=Je?N(Je):function(e){return Qr(e)&&Kr(e.length)&&!!ke[Ot(e)]},Xa=Un(Vt),Ya=Un((function(e,t){return e<=t})),Ka=Ln((function(e,t){if(gr(t)||Wr(t))On(t,pi(t),e);else for(var n in t)ji.call(t,n)&&ot(e,n,t[n])})),Za=Ln((function(e,t){On(t,fi(t),e)})),Qa=Ln((function(e,t,n,r){On(t,fi(t),e,r)})),Ja=Ln((function(e,t,n,r){On(t,pi(t),e,r)})),es=Qn(ct),ts=Yt((function(e){return e.push(G,Xn),a(Qa,G,e)})),ns=Yt((function(e){return e.push(G,Yn),a(ss,G,e)})),rs=Vn((function(e,t,n){e[t]=n}),Ci(bi)),is=Vn((function(e,t,n){ji.call(e,t)?e[t].push(n):e[t]=[n]}),rr),os=Yt(Nt),as=Ln((function(e,t,n){Ft(e,t,n)})),ss=Ln((function(e,t,n,r){Ft(e,t,n,r)})),ls=Qn((function(e,t){var n={};if(null==e)return n;var r=!1;t=h(t,(function(t){return t=vn(t,e),r||(r=1<t.length),t})),On(e,er(e),n),r&&(n=pt(n,7,Kn));for(var i=t.length;i--;)un(n,t[i]);return n})),us=Qn((function(e,t){return null==e?{}:function(e,t){return qt(e,t,(function(t,n){return di(e,n)}))}(e,t)})),cs=$n(pi),ds=$n(fi),ps=In((function(e,t,n){return t=t.toLowerCase(),e+(n?vi(t):t)})),fs=In((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),hs=In((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),gs=Nn("toLowerCase"),vs=In((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),ms=In((function(e,t,n){return e+(n?" ":"")+Cs(t)})),ys=In((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Cs=Nn("toUpperCase"),bs=Yt((function(e,t){try{return a(e,G,t)}catch(e){return Hr(e)?e:new Di(e)}})),xs=Qn((function(e,t){return l(t,(function(t){t=xr(t),ut(e,t,Da(e[t],e))})),e})),Ss=kn(),Es=kn(!0),ws=Yt((function(e,t){return function(n){return Nt(n,e,t)}})),Os=Yt((function(e,t){return function(n){return Nt(e,n,t)}})),_s=zn(h),Ls=zn(c),Rs=zn(y),Ds=Gn(),Ns=Gn(!0),Is=Bn((function(e,t){return e+t}),0),As=Wn("ceil"),Ms=Bn((function(e,t){return e/t}),1),Ps=Wn("floor"),ks=Bn((function(e,t){return e*t}),1),Ts=Wn("round"),Vs=Bn((function(e,t){return e-t}),0);return n.after=function(e,t){if("function"!=typeof t)throw new ki("Expected a function");return e=oi(e),function(){if(1>--e)return t.apply(this,arguments)}},n.ary=zr,n.assign=Ka,n.assignIn=Za,n.assignInWith=Qa,n.assignWith=Ja,n.at=es,n.before=jr,n.bind=Da,n.bindAll=xs,n.bindKey=Na,n.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return ja(e)?e:[e]},n.chain=Pr,n.chunk=function(e,t,n){if(t=(n?pr(e,t,n):t===G)?1:vo(oi(t),0),!(n=null==e?0:e.length)||1>t)return[];for(var r=0,i=0,o=Li(lo(n/t));r<n;)o[i++]=en(e,r,r+=t);return o},n.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},n.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Li(e-1),n=arguments[0];e--;)t[e-1]=arguments[e];return g(ja(n)?wn(n):[n],Ct(t,1))},n.cond=function(e){var t=null==e?0:e.length,n=rr();return e=t?h(e,(function(e){if("function"!=typeof e[1])throw new ki("Expected a function");return[n(e[0]),e[1]]})):[],Yt((function(n){for(var r=-1;++r<t;){var i=e[r];if(a(i[0],this,n))return a(i[1],this,n)}}))},n.conforms=function(e){return function(e){var t=pi(e);return function(n){return ft(n,e,t)}}(pt(e,1))},n.constant=Ci,n.countBy=ba,n.create=function(e,t){var n=Bo(e);return null==t?n:lt(n,t)},n.curry=function e(t,n,r){return(t=Hn(t,8,G,G,G,G,G,n=r?G:n)).placeholder=e.placeholder,t},n.curryRight=function e(t,n,r){return(t=Hn(t,16,G,G,G,G,G,n=r?G:n)).placeholder=e.placeholder,t},n.debounce=Fr,n.defaults=ts,n.defaultsDeep=ns,n.defer=Ia,n.delay=Aa,n.difference=na,n.differenceBy=ra,n.differenceWith=ia,n.drop=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0>(t=n||t===G?1:oi(t))?0:t,r):[]},n.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0,0>(t=r-(t=n||t===G?1:oi(t)))?0:t):[]},n.dropRightWhile=function(e,t){return e&&e.length?cn(e,rr(t,3),!0,!0):[]},n.dropWhile=function(e,t){return e&&e.length?cn(e,rr(t,3),!0):[]},n.fill=function(e,t,n,r){var i=null==e?0:e.length;if(!i)return[];for(n&&"number"!=typeof n&&pr(e,t,n)&&(n=0,r=i),i=e.length,0>(n=oi(n))&&(n=-n>i?0:i+n),0>(r=r===G||r>i?i:oi(r))&&(r+=i),r=n>r?0:ai(r);n<r;)e[n++]=t;return e},n.filter=function(e,t){return(ja(e)?d:yt)(e,rr(t,3))},n.flatMap=function(e,t){return Ct(Br(e,t),1)},n.flatMapDeep=function(e,t){return Ct(Br(e,t),U)},n.flatMapDepth=function(e,t,n){return n=n===G?1:oi(n),Ct(Br(e,t),n)},n.flatten=Lr,n.flattenDeep=function(e){return null!=e&&e.length?Ct(e,U):[]},n.flattenDepth=function(e,t){return null!=e&&e.length?Ct(e,t=t===G?1:oi(t)):[]},n.flip=function(e){return Hn(e,512)},n.flow=Ss,n.flowRight=Es,n.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},n.functions=function(e){return null==e?[]:St(e,pi(e))},n.functionsIn=function(e){return null==e?[]:St(e,fi(e))},n.groupBy=Ea,n.initial=function(e){return null!=e&&e.length?en(e,0,-1):[]},n.intersection=oa,n.intersectionBy=aa,n.intersectionWith=sa,n.invert=rs,n.invertBy=is,n.invokeMap=wa,n.iteratee=xi,n.keyBy=Oa,n.keys=pi,n.keysIn=fi,n.map=Br,n.mapKeys=function(e,t){var n={};return t=rr(t,3),bt(e,(function(e,r,i){ut(n,t(e,r,i),e)})),n},n.mapValues=function(e,t){var n={};return t=rr(t,3),bt(e,(function(e,r,i){ut(n,r,t(e,r,i))})),n},n.matches=function(e){return zt(pt(e,1))},n.matchesProperty=function(e,t){return jt(e,pt(t,1))},n.memoize=Gr,n.merge=as,n.mergeWith=ss,n.method=ws,n.methodOf=Os,n.mixin=Si,n.negate=Ur,n.nthArg=function(e){return e=oi(e),Yt((function(t){return Gt(t,e)}))},n.omit=ls,n.omitBy=function(e,t){return hi(e,Ur(rr(t)))},n.once=function(e){return jr(2,e)},n.orderBy=function(e,t,n,r){return null==e?[]:(ja(t)||(t=null==t?[]:[t]),ja(n=r?G:n)||(n=null==n?[]:[n]),Ut(e,t,n))},n.over=_s,n.overArgs=Ma,n.overEvery=Ls,n.overSome=Rs,n.partial=Pa,n.partialRight=ka,n.partition=_a,n.pick=us,n.pickBy=hi,n.property=wi,n.propertyOf=function(e){return function(t){return null==e?G:Et(e,t)}},n.pull=la,n.pullAll=Nr,n.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wt(e,t,rr(n,2)):e},n.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Wt(e,t,G,n):e},n.pullAt=ua,n.range=Ds,n.rangeRight=Ns,n.rearg=Ta,n.reject=function(e,t){return(ja(e)?d:yt)(e,Ur(rr(t,3)))},n.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=rr(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return $t(e,i),n},n.rest=function(e,t){if("function"!=typeof e)throw new ki("Expected a function");return Yt(e,t=t===G?t:oi(t))},n.reverse=Ir,n.sampleSize=function(e,t,n){return t=(n?pr(e,t,n):t===G)?1:oi(t),(ja(e)?We:Zt)(e,t)},n.set=function(e,t,n){return null==e?e:Qt(e,t,n)},n.setWith=function(e,t,n,r){return r="function"==typeof r?r:G,null==e?e:Qt(e,t,n,r)},n.shuffle=function(e){return(ja(e)?He:Jt)(e)},n.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&pr(e,t,n)?(t=0,n=r):(t=null==t?0:oi(t),n=n===G?r:oi(n)),en(e,t,n)):[]},n.sortBy=La,n.sortedUniq=function(e){return e&&e.length?on(e):[]},n.sortedUniqBy=function(e,t){return e&&e.length?on(e,rr(t,2)):[]},n.split=function(e,t,n){return n&&"number"!=typeof n&&pr(e,t,n)&&(t=n=G),(n=n===G?4294967295:n>>>0)?(e=ui(e))&&("string"==typeof t||null!=t&&!Wa(t))&&(!(t=sn(t))&&Ae.test(e))?mn(F(e),0,n):e.split(t,n):[]},n.spread=function(e,t){if("function"!=typeof e)throw new ki("Expected a function");return t=null==t?0:vo(oi(t),0),Yt((function(n){var r=n[t];return n=mn(n,0,t),r&&g(n,r),a(e,this,n)}))},n.tail=function(e){var t=null==e?0:e.length;return t?en(e,1,t):[]},n.take=function(e,t,n){return e&&e.length?en(e,0,0>(t=n||t===G?1:oi(t))?0:t):[]},n.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0>(t=r-(t=n||t===G?1:oi(t)))?0:t,r):[]},n.takeRightWhile=function(e,t){return e&&e.length?cn(e,rr(t,3),!1,!0):[]},n.takeWhile=function(e,t){return e&&e.length?cn(e,rr(t,3)):[]},n.tap=function(e,t){return t(e),e},n.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ki("Expected a function");return Zr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Fr(e,t,{leading:r,maxWait:t,trailing:i})},n.thru=kr,n.toArray=ri,n.toPairs=cs,n.toPairsIn=ds,n.toPath=function(e){return ja(e)?h(e,xr):ni(e)?[e]:wn(ta(ui(e)))},n.toPlainObject=li,n.transform=function(e,t,n){var r=ja(e),i=r||Ga(e)||Ha(e);if(t=rr(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Zr(e)&&Xr(o)?Bo(Zi(e)):{}}return(i?l:bt)(e,(function(e,r,i){return t(n,e,r,i)})),n},n.unary=function(e){return zr(e,1)},n.union=ca,n.unionBy=da,n.unionWith=pa,n.uniq=function(e){return e&&e.length?ln(e):[]},n.uniqBy=function(e,t){return e&&e.length?ln(e,rr(t,2)):[]},n.uniqWith=function(e,t){return t="function"==typeof t?t:G,e&&e.length?ln(e,G,t):[]},n.unset=function(e,t){return null==e||un(e,t)},n.unzip=Ar,n.unzipWith=Mr,n.update=function(e,t,n){return null==e?e:Qt(e,t,gn(n)(Et(e,t)),void 0)},n.updateWith=function(e,t,n,r){return r="function"==typeof r?r:G,null!=e&&(e=Qt(e,t,gn(n)(Et(e,t)),r)),e},n.values=gi,n.valuesIn=function(e){return null==e?[]:I(e,fi(e))},n.without=fa,n.words=yi,n.wrap=function(e,t){return Pa(gn(t),e)},n.xor=ha,n.xorBy=ga,n.xorWith=va,n.zip=ma,n.zipObject=function(e,t){return fn(e||[],t||[],ot)},n.zipObjectDeep=function(e,t){return fn(e||[],t||[],Qt)},n.zipWith=ya,n.entries=cs,n.entriesIn=ds,n.extend=Za,n.extendWith=Qa,Si(n,n),n.add=Is,n.attempt=bs,n.camelCase=ps,n.capitalize=vi,n.ceil=As,n.clamp=function(e,t,n){return n===G&&(n=t,t=G),n!==G&&(n=(n=si(n))==n?n:0),t!==G&&(t=(t=si(t))==t?t:0),dt(si(e),t,n)},n.clone=function(e){return pt(e,4)},n.cloneDeep=function(e){return pt(e,5)},n.cloneDeepWith=function(e,t){return pt(e,5,t="function"==typeof t?t:G)},n.cloneWith=function(e,t){return pt(e,4,t="function"==typeof t?t:G)},n.conformsTo=function(e,t){return null==t||ft(e,t,pi(t))},n.deburr=mi,n.defaultTo=function(e,t){return null==e||e!=e?t:e},n.divide=Ms,n.endsWith=function(e,t,n){e=ui(e),t=sn(t);var r=e.length;r=n=n===G?r:dt(oi(n),0,r);return 0<=(n-=t.length)&&e.slice(n,r)==t},n.eq=qr,n.escape=function(e){return(e=ui(e))&&Q.test(e)?e.replace(K,nt):e},n.escapeRegExp=function(e){return(e=ui(e))&&se.test(e)?e.replace(ae,"\\$&"):e},n.every=function(e,t,n){var r=ja(e)?c:vt;return n&&pr(e,t,n)&&(t=G),r(e,rr(t,3))},n.find=xa,n.findIndex=Or,n.findKey=function(e,t){return C(e,rr(t,3),bt)},n.findLast=Sa,n.findLastIndex=_r,n.findLastKey=function(e,t){return C(e,rr(t,3),xt)},n.floor=Ps,n.forEach=Tr,n.forEachRight=Vr,n.forIn=function(e,t){return null==e?e:Fo(e,rr(t,3),fi)},n.forInRight=function(e,t){return null==e?e:Go(e,rr(t,3),fi)},n.forOwn=function(e,t){return e&&bt(e,rr(t,3))},n.forOwnRight=function(e,t){return e&&xt(e,rr(t,3))},n.get=ci,n.gt=Va,n.gte=Ba,n.has=function(e,t){return null!=e&&sr(e,t,Lt)},n.hasIn=di,n.head=Rr,n.identity=bi,n.includes=function(e,t,n,r){return e=Wr(e)?e:gi(e),n=n&&!r?oi(n):0,r=e.length,0>n&&(n=vo(r+n,0)),ti(e)?n<=r&&-1<e.indexOf(t,n):!!r&&-1<x(e,t,n)},n.indexOf=function(e,t,n){var r=null==e?0:e.length;return r?(0>(n=null==n?0:oi(n))&&(n=vo(r+n,0)),x(e,t,n)):-1},n.inRange=function(e,t,n){return t=ii(t),n===G?(n=t,t=0):n=ii(n),(e=si(e))>=mo(t,n)&&e<vo(t,n)},n.invoke=os,n.isArguments=za,n.isArray=ja,n.isArrayBuffer=Fa,n.isArrayLike=Wr,n.isArrayLikeObject=$r,n.isBoolean=function(e){return!0===e||!1===e||Qr(e)&&"[object Boolean]"==Ot(e)},n.isBuffer=Ga,n.isDate=Ua,n.isElement=function(e){return Qr(e)&&1===e.nodeType&&!ei(e)},n.isEmpty=function(e){if(null==e)return!0;if(Wr(e)&&(ja(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||Ha(e)||za(e)))return!e.length;var t=Ko(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(gr(e))return!Tt(e).length;for(var n in e)if(ji.call(e,n))return!1;return!0},n.isEqual=function(e,t){return At(e,t)},n.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:G)?n(e,t):G;return r===G?At(e,t,G,n):!!r},n.isError=Hr,n.isFinite=function(e){return"number"==typeof e&&fo(e)},n.isFunction=Xr,n.isInteger=Yr,n.isLength=Kr,n.isMap=qa,n.isMatch=function(e,t){return e===t||Mt(e,t,or(t))},n.isMatchWith=function(e,t,n){return n="function"==typeof n?n:G,Mt(e,t,or(t),n)},n.isNaN=function(e){return Jr(e)&&e!=+e},n.isNative=function(e){if(Zo(e))throw new Di("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pt(e)},n.isNil=function(e){return null==e},n.isNull=function(e){return null===e},n.isNumber=Jr,n.isObject=Zr,n.isObjectLike=Qr,n.isPlainObject=ei,n.isRegExp=Wa,n.isSafeInteger=function(e){return Yr(e)&&-9007199254740991<=e&&9007199254740991>=e},n.isSet=$a,n.isString=ti,n.isSymbol=ni,n.isTypedArray=Ha,n.isUndefined=function(e){return e===G},n.isWeakMap=function(e){return Qr(e)&&"[object WeakMap]"==Ko(e)},n.isWeakSet=function(e){return Qr(e)&&"[object WeakSet]"==Ot(e)},n.join=function(e,t){return null==e?"":ho.call(e,t)},n.kebabCase=fs,n.last=Dr,n.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;if(n!==G&&(i=0>(i=oi(n))?vo(r+i,0):mo(i,r-1)),t==t){for(n=i+1;n--&&e[n]!==t;);e=n}else e=b(e,E,i,!0);return e},n.lowerCase=hs,n.lowerFirst=gs,n.lt=Xa,n.lte=Ya,n.max=function(e){return e&&e.length?mt(e,bi,_t):G},n.maxBy=function(e,t){return e&&e.length?mt(e,rr(t,2),_t):G},n.mean=function(e){return w(e,bi)},n.meanBy=function(e,t){return w(e,rr(t,2))},n.min=function(e){return e&&e.length?mt(e,bi,Vt):G},n.minBy=function(e,t){return e&&e.length?mt(e,rr(t,2),Vt):G},n.stubArray=Oi,n.stubFalse=_i,n.stubObject=function(){return{}},n.stubString=function(){return""},n.stubTrue=function(){return!0},n.multiply=ks,n.nth=function(e,t){return e&&e.length?Gt(e,oi(t)):G},n.noConflict=function(){return Ue._===this&&(Ue._=Wi),this},n.noop=Ei,n.now=Ra,n.pad=function(e,t,n){e=ui(e);var r=(t=oi(t))?j(e):0;return!t||r>=t?e:jn(uo(t=(t-r)/2),n)+e+jn(lo(t),n)},n.padEnd=function(e,t,n){e=ui(e);var r=(t=oi(t))?j(e):0;return t&&r<t?e+jn(t-r,n):e},n.padStart=function(e,t,n){e=ui(e);var r=(t=oi(t))?j(e):0;return t&&r<t?jn(t-r,n)+e:e},n.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Co(ui(e).replace(ue,""),t||0)},n.random=function(e,t,n){if(n&&"boolean"!=typeof n&&pr(e,t,n)&&(t=n=G),n===G&&("boolean"==typeof t?(n=t,t=G):"boolean"==typeof e&&(n=e,e=G)),e===G&&t===G?(e=0,t=1):(e=ii(e),t===G?(t=e,e=0):t=ii(t)),e>t){var r=e;e=t,t=r}return n||e%1||t%1?(n=bo(),mo(e+n*(t-e+ze("1e-"+((n+"").length-1))),t)):Ht(e,t)},n.reduce=function(e,t,n){var r=ja(e)?v:L,i=3>arguments.length;return r(e,rr(t,4),n,i,zo)},n.reduceRight=function(e,t,n){var r=ja(e)?m:L,i=3>arguments.length;return r(e,rr(t,4),n,i,jo)},n.repeat=function(e,t,n){return t=(n?pr(e,t,n):t===G)?1:oi(t),Xt(ui(e),t)},n.replace=function(){var e=arguments,t=ui(e[0]);return 3>e.length?t:t.replace(e[1],e[2])},n.result=function(e,t,n){var r=-1,i=(t=vn(t,e)).length;for(i||(i=1,e=G);++r<i;){var o=null==e?G:e[xr(t[r])];o===G&&(r=i,o=n),e=Xr(o)?o.call(e):o}return e},n.round=Ts,n.runInContext=e,n.sample=function(e){return(ja(e)?qe:Kt)(e)},n.size=function(e){if(null==e)return 0;if(Wr(e))return ti(e)?j(e):e.length;var t=Ko(e);return"[object Map]"==t||"[object Set]"==t?e.size:Tt(e).length},n.snakeCase=vs,n.some=function(e,t,n){var r=ja(e)?y:tn;return n&&pr(e,t,n)&&(t=G),r(e,rr(t,3))},n.sortedIndex=function(e,t){return nn(e,t)},n.sortedIndexBy=function(e,t,n){return rn(e,t,rr(n,2))},n.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=nn(e,t);if(r<n&&qr(e[r],t))return r}return-1},n.sortedLastIndex=function(e,t){return nn(e,t,!0)},n.sortedLastIndexBy=function(e,t,n){return rn(e,t,rr(n,2),!0)},n.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=nn(e,t,!0)-1;if(qr(e[n],t))return n}return-1},n.startCase=ms,n.startsWith=function(e,t,n){return e=ui(e),n=null==n?0:dt(oi(n),0,e.length),t=sn(t),e.slice(n,n+t.length)==t},n.subtract=Vs,n.sum=function(e){return e&&e.length?R(e,bi):0},n.sumBy=function(e,t){return e&&e.length?R(e,rr(t,2)):0},n.template=function(e,t,r){var i=n.templateSettings;r&&pr(e,t,r)&&(t=G),e=ui(e),t=Qa({},t,i,Xn);var o,a,s=pi(r=Qa({},t.imports,i.imports,Xn)),l=I(r,s),u=0;r=t.interpolate||we;var c="__p+='";r=Mi((t.escape||we).source+"|"+r.source+"|"+(r===te?ve:we).source+"|"+(t.evaluate||we).source+"|$","g");var d="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(e.replace(r,(function(t,n,r,i,s,l){return r||(r=i),c+=e.slice(u,l).replace(Oe,k),n&&(o=!0,c+="'+__e("+n+")+'"),s&&(a=!0,c+="';"+s+";\n__p+='"),r&&(c+="'+((__t=("+r+"))==null?'':__t)+'"),u=l+t.length,t})),c+="';",(t=t.variable)||(c="with(obj){"+c+"}"),c=(a?c.replace($,""):c).replace(H,"$1").replace(X,"$1;"),c="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(a?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}",(t=bs((function(){return Ni(s,d+"return "+c).apply(G,l)}))).source=c,Hr(t))throw t;return t},n.times=function(e,t){if(1>(e=oi(e))||9007199254740991<e)return[];var n=4294967295,r=mo(e,4294967295);for(e-=4294967295,r=D(r,t=rr(t));++n<e;)t(n);return r},n.toFinite=ii,n.toInteger=oi,n.toLength=ai,n.toLower=function(e){return ui(e).toLowerCase()},n.toNumber=si,n.toSafeInteger=function(e){return e?dt(oi(e),-9007199254740991,9007199254740991):0===e?e:0},n.toString=ui,n.toUpper=function(e){return ui(e).toUpperCase()},n.trim=function(e,t,n){return(e=ui(e))&&(n||t===G)?e.replace(le,""):e&&(t=sn(t))?mn(e=F(e),t=M(e,n=F(t)),n=P(e,n)+1).join(""):e},n.trimEnd=function(e,t,n){return(e=ui(e))&&(n||t===G)?e.replace(ce,""):e&&(t=sn(t))?mn(e=F(e),0,t=P(e,F(t))+1).join(""):e},n.trimStart=function(e,t,n){return(e=ui(e))&&(n||t===G)?e.replace(ue,""):e&&(t=sn(t))?mn(e=F(e),t=M(e,F(t))).join(""):e},n.truncate=function(e,t){var n=30,r="...";if(Zr(t)){var i="separator"in t?t.separator:i;n="length"in t?oi(t.length):n,r="omission"in t?sn(t.omission):r}var o=(e=ui(e)).length;if(Ae.test(e)){var a=F(e);o=a.length}if(n>=o)return e;if(1>(o=n-j(r)))return r;if(n=a?mn(a,0,o).join(""):e.slice(0,o),i===G)return n+r;if(a&&(o+=n.length-o),Wa(i)){if(e.slice(o).search(i)){var s=n;for(i.global||(i=Mi(i.source,ui(me.exec(i))+"g")),i.lastIndex=0;a=i.exec(s);)var l=a.index;n=n.slice(0,l===G?o:l)}}else e.indexOf(sn(i),o)!=o&&(-1<(i=n.lastIndexOf(i))&&(n=n.slice(0,i)));return n+r},n.unescape=function(e){return(e=ui(e))&&Z.test(e)?e.replace(Y,rt):e},n.uniqueId=function(e){var t=++Fi;return ui(e)+t},n.upperCase=ys,n.upperFirst=Cs,n.each=Tr,n.eachRight=Vr,n.first=Rr,Si(n,function(){var e={};return bt(n,(function(t,r){ji.call(n.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),n.VERSION="4.17.4",l("bind bindKey curry curryRight partial partialRight".split(" "),(function(e){n[e].placeholder=n})),l(["drop","take"],(function(e,t){_e.prototype[e]=function(n){n=n===G?1:vo(oi(n),0);var r=this.__filtered__&&!t?new _e(this):this.clone();return r.__filtered__?r.__takeCount__=mo(n,r.__takeCount__):r.__views__.push({size:mo(n,4294967295),type:e+(0>r.__dir__?"Right":"")}),r},_e.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),l(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;_e.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:rr(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),l(["head","last"],(function(e,t){var n="take"+(t?"Right":"");_e.prototype[e]=function(){return this[n](1).value()[0]}})),l(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");_e.prototype[e]=function(){return this.__filtered__?new _e(this):this[n](1)}})),_e.prototype.compact=function(){return this.filter(bi)},_e.prototype.find=function(e){return this.filter(e).head()},_e.prototype.findLast=function(e){return this.reverse().find(e)},_e.prototype.invokeMap=Yt((function(e,t){return"function"==typeof e?new _e(this):this.map((function(n){return Nt(n,e,t)}))})),_e.prototype.reject=function(e){return this.filter(Ur(rr(e)))},_e.prototype.slice=function(e,t){e=oi(e);var n=this;return n.__filtered__&&(0<e||0>t)?new _e(n):(0>e?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==G&&(n=0>(t=oi(t))?n.dropRight(-t):n.take(t-e)),n)},_e.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},_e.prototype.toArray=function(){return this.take(4294967295)},bt(_e.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=n[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(n.prototype[t]=function(){function t(e){return e=o.apply(n,g([e],l)),i&&p?e[0]:e}var s=this.__wrapped__,l=i?[1]:arguments,u=s instanceof _e,c=l[0],d=u||ja(s);d&&r&&"function"==typeof c&&1!=c.length&&(u=d=!1);var p=this.__chain__,f=!!this.__actions__.length;c=a&&!p,u=u&&!f;return!a&&d?(s=u?s:new _e(this),(s=e.apply(s,l)).__actions__.push({func:kr,args:[t],thisArg:G}),new _(s,p)):c&&u?e.apply(this,l):(s=this.thru(t),c?i?s.value()[0]:s.value():s)})})),l("pop push shift sort splice unshift".split(" "),(function(e){var t=Ti[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(ja(n)?n:[],e)}return this[r]((function(n){return t.apply(ja(n)?n:[],e)}))}})),bt(_e.prototype,(function(e,t){var r=n[t];if(r){var i=r.name+"";(Do[i]||(Do[i]=[])).push({name:t,func:r})}})),Do[Tn(G,2).name]=[{name:"wrapper",func:G}],_e.prototype.clone=function(){var e=new _e(this.__wrapped__);return e.__actions__=wn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=wn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=wn(this.__views__),e},_e.prototype.reverse=function(){if(this.__filtered__){var e=new _e(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},_e.prototype.value=function(){var e,t=this.__wrapped__.value(),n=this.__dir__,r=ja(t),i=0>n,o=r?t.length:0;e=o;for(var a=this.__views__,s=0,l=-1,u=a.length;++l<u;){var c=a[l],d=c.size;switch(c.type){case"drop":s+=d;break;case"dropRight":e-=d;break;case"take":e=mo(e,s+d);break;case"takeRight":s=vo(s,e-d)}}if(a=(e={start:s,end:e}).start,e=(s=e.end)-a,a=i?s:a-1,l=(s=this.__iteratees__).length,u=0,c=mo(e,this.__takeCount__),!r||!i&&o==e&&c==e)return dn(t,this.__actions__);r=[];e:for(;e--&&u<c;){for(i=-1,o=t[a+=n];++i<l;){d=(p=s[i]).type;var p=(0,p.iteratee)(o);if(2==d)o=p;else if(!p){if(1==d)continue e;break e}}r[u++]=o}return r},n.prototype.at=Ca,n.prototype.chain=function(){return Pr(this)},n.prototype.commit=function(){return new _(this.value(),this.__chain__)},n.prototype.next=function(){this.__values__===G&&(this.__values__=ri(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?G:this.__values__[this.__index__++]}},n.prototype.plant=function(e){for(var t,n=this;n instanceof r;){var i=wr(n);i.__index__=0,i.__values__=G,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},n.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof _e?(this.__actions__.length&&(e=new _e(this)),(e=e.reverse()).__actions__.push({func:kr,args:[Ir],thisArg:G}),new _(e,this.__chain__)):this.thru(Ir)},n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=function(){return dn(this.__wrapped__,this.__actions__)},n.prototype.first=n.prototype.head,no&&(n.prototype[no]=function(){return this}),n}();Ue._=it,void 0===(r=function(){return it}.call(t,n,t,e))||(e.exports=r)}.call(this)},300:t=>{"use strict";t.exports=e},799:e=>{"use strict";e.exports=t}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i(317)})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios"),require("https")):"function"==typeof define&&define.amd?define(["axios","https"],t):"object"==typeof exports?exports.SccfClientApi=t(require("axios"),require("https")):e.SccfClientApi=t(e.axios,e.https)}(this,((e,t)=>(()=>{var n={46:(e,t,n)=>{var r=n(948),i=n(31);e.exports=function(){var e;(e=this).log=null,e.cyto={},e.initCallback=null,e.tassativi=null,e.tiedStdMandNodeList=null,e.configurazione=[],e.incompatibiliConConfig=[],e.checkConfigurazione=[],e.incompatibiliConCheckConfig=[],e.maxDepth=3,e.loopScenarios=[],e.getVersion=function(){return"114"},e.init=function(t,n,r,i,o){e.selectionLogDiv=r,e.log=i,e.initCallback=o,e.log.info("RuleEngine.init - dataElements:["+t.length+"]"),e.createCytoscape(t,n,e.postCreate)},e.postCreate=function(){e.log.debug("RuleEngine.postCreate - begin"),e.cyto.add({group:"nodes",data:{id:"config"}}),e.cyto.$("#config").addClass("config"),e.cyto.elements("edge[type='I']").forEach((function(e){e.addClass("incompatibile")})),e.cyto.elements("edge[type='V']").forEach((function(e){e.addClass("vincolo")})),e.cyto.elements("edge[type='A']").forEach((function(e){e.addClass("alternativo")})),e.cyto.elements("edge[type='E']").forEach((function(e){e.addClass("esclusivo")})),e.setHandlers(),e.log.debug("RuleEngine.postCreate - end")},e.setHandlers=function(){e.log.debug("RuleEngine.setHandlers - begin"),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.checkConfigurazione=e.cyto.collection(),e.cyto.nodes().on("click",e.onClickNodeHandler),e.initCallback(),e.log.debug("RuleEngine.setHandlers - end")},e.onClickNodeHandler=function(t){var n,r;e.log.debug("RuleEngine.onClickNodeHandler"),n=t.target,r=e.processNode(n),e.selectionLogDiv&&(e.selectionLogDiv.append(" - selezionato : ( "+n.id()+" )<br/>"),e.selectionLogDiv.append(r.message+" )<br/>"))},e.createCytoscape=function(t,n,r){var o;o=i.stylesheet().selector("node").css({content:"data(id)"}).selector("edge").css({"curve-style":"bezier","target-arrow-shape":"triangle","target-arrow-color":"gold",width:1,"line-color":"gold","target-arrow-color":"gold"}).selector(".config").css({"background-color":"gold"}).selector(".selected").css({"background-color":"LimeGreen"}).selector(".highlighted").css({"background-color":"red"}).selector(".vincolo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"magenta","target-arrow-color":"magenta"}).selector(".incompatibile").css({"curve-style":"bezier","target-arrow-shape":"triangle","target-arrow-fill":"filled",width:2,"line-color":"skyblue","target-arrow-color":"skyblue"}).selector(".alternativo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"darkblue","target-arrow-color":"darkblue"}).selector(".esclusivo").css({"curve-style":"bezier","target-arrow-shape":"triangle",width:2,"line-color":"orange","target-arrow-color":"orange"}),e.cyto=i(n?{container:n,boxSelectionEnabled:!1,autounselectify:!0,elements:t,layout:{name:"concentric",minNodeSpacing:20,padding:10},style:o}:{boxSelectionEnabled:!1,autounselectify:!0,elements:t,style:o}),e.cyto.ready((function(){r()}))},e.ruleNodeList=function(r,i,a){"use strict";var l,u;switch({},"",u=t(),[],e.log.debug("RuleEngine.ruleNodeList - begin"),e.log.debug("RuleEngine.ruleNodeList - toAddList:["+o(r)+"] - toRemoveList:["+o(i)+"]"),l=e.processScenario(r,i),s(l.data.scenarios),l=e.getStdScenarios(l,r,i),s(l.data.scenarios),l.data.scenarios.length){case 0:u=n(!1,l.code,l.message,[],[],[],[],l.data.scenarios,l.data.extra);break;case 1:a&&l.success&&(removeToConfig(l.data.scenarios[0].removeList),addToConfig(l.data.scenarios[0].addList),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.cyto.elements().removeClass("highlighted"),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted")),u=n(l.success,l.code,l.message,[],[],[],[],l.data.scenarios,l.data.extra);break;default:u=a?n(!1,560,l.message,[],[],[],[],l.data.scenarios):n(!0,200,l.message,[],[],[],[],l.data.scenarios)}return e.log.debug("RuleEngine.ruleNodeList - end"),u},e.processScenario=function(r,i){"use strict";var a,l,u,c,d,p,f,h;p="",f=t(),h=[],e.log.debug("RuleEngine.processScenario - toAddList:["+o(r)+"] toRemoveList:["+o(i)+"] - tiedStdMandNodeList:["+o(e.tiedStdMandNodeList)+"]"),r=r.union(e.tiedStdMandNodeList),i=i.difference(e.tassativi);var g=r.intersection(i);if(g.nonempty())return p=p+" Options ["+o(g)+"] it should be added and contemporaneously removed",f=n(!1,530,p,[],[],[],[],[]);for(var v=e.cyto.collection(),m=0;m<r.length;m++){for(var y=r[m],C=e.getVincolatiDiretti(y),b=0;b<C.length;b++){var x=C[b];if(i.contains(x)&&!r.contains(x)&&x.outgoers("edge[type='A']").size()<=1)return p=p+" - Option {"+y.id()+"} constrains Option {"+o(x)+"} that must be removed",e.log.debug("RuleEngine.processScenario - 510 message_:["+p+"]"),f=n(!1,510,p,[],[],[],[],[])}v=v.union(C)}e.log.debug("RuleEngine.processScenario - tiedByList_:["+o(v)+"]");var S=(L=e.getTiedToList(r,i)).tiedToList;p+=L.message,c=S,u=i.union(c),l=v,e.log.debug("RuleEngine.processScenario - toAddJoinList_:["+o(l)+"]"),a=l.union(r),e.log.debug("RuleEngine.processScenario - toAddAllList_:["+o(a)+"]");var E=e.getNodiIncompatibili(a),w=a.intersection(E);if(w.nonempty())return p=p+" Options ["+o(w)+"] are incompatibles each others",f=n(!1,520,p,[],[],[],[],[]);var O=e.configurazione.difference(u);e.log.debug("RuleEngine.processScenario - configDiffList_:["+o(O)+"]");var _=e.getIncSelectionMap(a,O);if(_.size>0){_.forEach((function(e,t){p=p+" - Option {"+t+"} is incompatibile with ["+o(e)+"]",u=u.union(e)}));var L;S=(L=e.getTiedToList(a,u)).tiedToList;p+=L.message,c=c.union(S),u=u.union(c),e.log.debug("RuleEngine.processScenario - toRemoveAllList_:["+o(u)+"]")}if(e.log.debug("RuleEngine.processScenario - me_.configurazione:["+o(e.configurazione)+"]"),u=u.difference(a.intersection(c)),e.log.debug("RuleEngine.processScenario -----------------------------------------------"),e.log.debug("RuleEngine.processScenario - toAddAllList_:["+o(a)+"]"),e.log.debug("RuleEngine.processScenario - toRemoveAllList_:["+o(u)+"]"),e.log.debug("RuleEngine.processScenario - toAddJoinList_:["+o(l)+"]"),e.log.debug("RuleEngine.processScenario - toRemoveJoinList_:["+o(c)+"]"),e.log.debug("RuleEngine.processScenario - incAddList :["+o(E)+"]"),e.log.debug("RuleEngine.processScenario -----------------------------------------------"),d=e.findAltPaths(a,u,c,E),p+=d.message,e.log.debug("RuleEngine.processScenario - toAddAllList_:["+o(a)+"]"),d.altGrExist){f=n(!1,522,p,{});var R=d.altGrList;e.log.debug("RuleEngine.processScenario - altGrList_:["+o(R)+"]");for(m=0;m<R.length;m++){var D=R[m];e.log.debug("RuleEngine.processScenario - altGr_:["+o(D)+"]");var N=a.union(D);e.log.debug("RuleEngine.processScenario - PRE - alt scenario - add:["+o(N)+"] remove:["+o(u)+"]"),u=u.difference(N).union(u.intersection(E)),e.log.debug("RuleEngine.processScenario - POST - alt scenario - add:["+o(N)+"] remove:["+o(u)+"]"),N=N.difference(e.configurazione),e.log.debug("RuleEngine.processScenario - POST2 - alt scenario - add:["+o(N)+"] remove:["+o(u)+"]"),h.push({addList:N,removeList:u}),f=n(!0,210,p,[],[],[],[],h)}}else{d.solvedTargetList_.nonempty()&&(e.log.debug("RuleEngine.processScenario - solvedTargetList_ :["+o(d.solvedTargetList_)+"]"),u=u.difference(d.solvedTargetList_),e.log.debug("RuleEngine.processScenario - toRemoveAllList_ :["+o(u)+"]")),e.log.debug("RuleEngine.processScenario - alreadySolvedTargetAltGroupNodeList :["+o(d.alreadySolvedTargetAltGroupNodeList)+"]");var M=a.union(d.alreadySolvedTargetAltGroupNodeList);e.log.debug("RuleEngine.processScenario - PRE - alt scenario - add:["+o(M)+"] remove:["+o(u)+"]"),u=u.difference(M).union(u.intersection(E)),e.log.debug("RuleEngine.processScenario - POST - alt scenario - add:["+o(M)+"] remove:["+o(u)+"]"),M=M.difference(e.configurazione),h.push({addList:M,removeList:u}),f=n(!0,200,p,[],[],[],[],h)}return e.log.debug("RuleEngine.processScenario - me_.tassativi:["+o(e.tassativi)+"]"),e.log.debug("RuleEngine.processScenario - me_.tiedStdMandNodeList:["+o(e.tiedStdMandNodeList)+"]"),s(h),f},e.processRuleMaxIter=function(t,n){"use strict";var r=[],i=[];for(r.push(t);r.length>0&&n>0;){var o=r.pop(),a=e.ruleNodeList(o.addList,o.removeList,!1);if(a&&a.data&&a.data.scenarios){var s=a.data.scenarios;if(0==s.length);else if(1==s.length)i.push(s[0]);else{for(var l=0;l<s.length;l++)r.push(s[l]);n--}n<=0&&e.loopScenarios.push(s)}}return i},e.processRuleActResMaxIterDepth=function(n,r,i,a){"use strict";var s=0,l=[],u=t(),c=t(),d=[];for(l.push({Scenario:n,Depth:s}),e.log.debug(" --- DEPTH - "+s+" --- START SCENARIO :toAddList:["+o(n.addList)+"] toRemoveList:["+o(n.removeList)+"]");l.length>0&&r>0;){var p=l.pop();s=p.Depth+1;var f=e.ruleNodeList(p.Scenario.addList,p.Scenario.removeList,a);if(f&&f.data&&f.data.scenarios){var h=f.data.scenarios;if(0===h.length)c.success=f.success,c.code=f.code,c.message=f.message;else if(1===h.length){e.insertIdAddList(d,h[0].addList)||(u.success=f.success,u.code=f.code,u.message=f.message,u.data.scenarios.push(h[0]),u.data.extra=f.data.extra)}else{for(var g=0;g<h.length;g++)s<=i&&l.push({Scenario:h[g],Depth:s});r--}}}return 0===u.data.scenarios.length&&(u=c),u},e.getStdScenarios=function(t,n,i){"use strict";for(var a=t,s=function(t,n,r,i){var o=null;switch(n.id()){case"ME_C":var a=e.cyto.getElementById("ME_I").outgoers("edge[type='E']").targets().intersection(i);if(a.nonempty()){var s=a[0];if(s.outgoers("edge[type='I']").targets().intersection(t).nonempty()){var l=r.difference(t),u=s.outgoers("edge[type='I']").targets(),c=l.intersection(u),d=l.difference(c);d.nonempty()&&(o=d[0])}}break;case"ME_I":var p=e.cyto.getElementById("ME_C").outgoers("edge[type='E']").targets().intersection(i);if(p.nonempty()){var f=p[0];if(f.outgoers("edge[type='I']").targets().intersection(t).nonempty()){var h=r.difference(t),g=f.outgoers("edge[type='I']").targets(),v=h.intersection(g),m=h.difference(v);m.nonempty()&&(o=m[0])}}}return o},l=[],u=[],c=[],d=0;d<a.data.scenarios.length;d++){var p=a.data.scenarios[d],f=!0,h=!1,g=p.removeList,v=p.addList;if(g.size()>0)for(var m=0;m<g.size()&&f;m++)for(var y=g[m],C=y.incomers("edge[type='E']"),b=0;b<C.size();b++){var x=C[b].source();if("ME_K"!==x.id()&&"ME_J"!==x.id()){e.log.debug("RuleEngine.getStdScenarios - toRemNode_:["+o(y)+"] ");var S=x.outgoers("edge[type='E']").targets();if(S.intersection(v).empty())if(h=!0,y.data().isStandard){var E=S.difference(y);if(e.log.debug("RuleEngine.getStdScenarios - nonStdNodeList_:["+o(E)+"] "),E.forEach((function(t){var n=e.processScenario(v.union(t),i);if(n.success)for(var r=0;r<n.data.scenarios.length;r++){e.insertIdAddList(c,n.data.scenarios[r].addList)||u.push(n.data.scenarios[r])}})),0===u.length){l.push(d);var w=582,O="It is not possible to add Options ["+o(E)+"] in removing of STD Option of the same family",_={nonStdList:r.map(S.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}}else{var L=e.getStdExcFromNode(x);e.log.debug("RuleEngine.getStdScenarios - stdExNode_:["+o(L)+"] ");var R=s(L,x,S,v);if(R){var D=e.processScenario(v.union(R),i);if(!D.success){l.push(d);w=584,O="It is not possible to add Candidate Option {"+R.id()+"} ",_={nonStdList:r.map(S.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}for(M=0;M<D.data.scenarios.length;M++){e.insertIdAddList(c,D.data.scenarios[M].addList)||u.push(D.data.scenarios[M])}}else{var N=e.processScenario(v.union(L),i);if(!N.success){l.push(d);var w=580,O="It is not possible to add STD Option {"+L.id()+"} ",_={nonStdList:r.map(S.difference(y),(function(e){return e.id()}))};e.log.debug("RuleEngine.getStdScenarios - stdErrorCode_:["+w+"] "),f=!1;break}for(var M=0;M<N.data.scenarios.length;M++){e.insertIdAddList(c,N.data.scenarios[M].addList)||u.push(N.data.scenarios[M])}}}}}h||u.push(p)}return l.length>0&&u.length<=1&&(a.success=!1,a.code=w,a.message=O,a.data.extra=_),a.data.scenarios=u,a},e.processNode=function(r){"use strict";var i,a,s,l,u,c;if(e.log.debug("RuleEngine.processNode - begin"),l={},u="",c=t(),i=(i=e.cyto.collection()).union(r),r.hasClass("highlighted")){var d=e.getNodiIncompatibiliConSelezionati(r);return u=u+" - Node {"+r.id()+"} ",d.forEach((function(e,t){u=u+" is incompatibile with: ["+o(e)+"] "})),c=n(!1,501,u,[],[],[],d)}if((a=e.getNodiVincolati(r,i)).size()>0&&(u=u+" - Option {"+o(i)+"} constraints ["+o(a)+"}",i=i.union(a)),u=u+" - To be evaluated ["+o(i)+"]",s=e.verificaAlternativi(r,i,!1),u+=s.message,s.altGrExist)c=n(!1,502,u,[],[],s.altGrList,[]);else if(r.hasClass("selected")){var p=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(r,i);i=p.selection,u+=p.message;for(var f=0;f<i.length;f++){var h=i[f];if(e.vincolantiInConfig(r,h,!1).nonempty())return u=u+" - Option {"+h.id()+"} is bound by an Option in Configuration)",c=n(!1,501,u,{})}i.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]'),i=n.intersection(r);e.cyto.remove(i),t.removeClass("selected")})),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.cyto.elements().removeClass("highlighted"),u=u+" - Options ["+o(i)+"] have been removed from configuration",c=n(!0,211,u,[],i,[],[])}else{var g=e.getNodiIncompatibiliConSelezionati(i);g.size>0?(g.forEach((function(e,t){u=u+" - Option {"+t+"} is incompatible with ["+o(e)+"]"})),c=n(!1,501,u,[],[],[],g)):(e.configurazione=e.configurazione.union(i),i.addClass("selected"),i.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),l.incompatibiliConSelezionato=[],u=u+" - Options ["+o(i)+"] have been added to configuration",c=n(!0,201,u,i,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),e.log.debug("RuleEngine.processNode - end"),c},e.checkProcessNode=function(r){"use strict";var i,a,s,l,u,c;if(e.log.debug("RuleEngine.checkProcessNode"),l={},u="",c=t(),i=(i=e.cyto.collection()).union(r),(a=e.getNodiVincolati(r,i)).size()>0&&(u=u+" - Option {"+o(i)+"} costraints ["+o(a)+"]",i=i.union(a)),u=u+" - To be evaluate ["+o(i)+"]",s=e.verificaAlternativi(r,i,!0),u+=s.message,s.altGrExist)c=n(!1,502,u,l);else if(r.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(r,i);i=d.selection,u+=d.message;for(var p=0;p<i.length;p++){var f=i[p];if(e.vincolantiInConfig(r,f,!0).nonempty())return u=u+" - Option {"+f.id()+"} is bound by an Option in Configuration",c=n(!1,501,u,{})}i.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]');n.intersection(r)})),e.checkConfigurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),u=u+" - Should remove ["+o(i)+"]",c=n(!0,211,u,[],i,[],[])}else{var h=e.getNodiIncompatibiliConSelezionati(i);h.size>0?(h.forEach((function(e,t){u=u+" - Option ( "+t+") is incompatible with ["+o(e)+"]"})),c=n(!1,501,u,[],[],[],h)):(e.checkConfigurazione=e.checkConfigurazione.union(i),u=u+" - Should add ["+o(i)+"]",c=n(!0,201,u,i,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),c},e.addNode=function(r){"use strict";var i,a,s,l,u;if({},l="",u=t(),e.log.debug("RuleEngine.addNode :["+r.id()+"]"),i=(i=e.cyto.collection()).union(r),r.hasClass("selected"))return e.log.debug("RuleEngine.addNode - il nodo {"+r.id()+"} è già in configurazione "),l=l+" - Option {"+r.id()+"} is already in Configuration",u=n(!1,501,l,{});if(r.hasClass("highlighted")){var c=e.getNodiIncompatibiliConSelezionati(r);return l=l+" - Option {"+r.id()+"} ",c.forEach((function(e,t){l=l+" is incompatibile with ["+o(e)+"] "})),u=n(!1,501,l,[],[],[],c)}if((a=e.getNodiVincolati(r,i)).size()>0&&(l=l+" - Option {"+o(i)+"} costraints ["+o(a)+"]",i=i.union(a)),l=l+" - To be evaluate [ "+o(i)+"]",s=e.verificaAlternativi(r,i,!1),l+=s.message,s.altGrExist)u=n(!1,502,l,[],[],s.altGrList,[]);else{var d=e.getNodiIncompatibiliConSelezionati(i);d.size>0?(d.forEach((function(e,t){l=l+" - Option { "+t+"} is incompatible with {"+o(e)+"}"})),u=n(!1,501,l,[],[],[],d)):(e.configurazione=e.configurazione.union(i),i.addClass("selected"),i.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),l=l+" - Options added [ "+o(i)+"]",u=n(!0,201,l,i,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),u},e.checkAddNode=function(r){"use strict";var i,a,s,l,u;if(e.log.debug("RuleEngine.checkAddNode"),{},l="",u=t(),i=(i=e.cyto.collection()).union(r),r.intersection(e.checkConfigurazione).nonempty())return e.log.debug("RuleEngine.addNode - Option {"+r.id()+"} is already in configuration "),l=l+" - Option {"+r.id()+"} is already in configuration",u=n(!1,501,l,{});if(r.hasClass("highlighted")){var c=e.getNodiIncompatibiliConSelezionati(r);return l=l+" - Option {"+r.id()+"} ",c.forEach((function(e,t){l=l+" is incompatible with {"+o(e)+"} "})),u=n(!1,501,l,[],[],[],c)}if((a=e.getNodiVincolati(r,i)).size()>0&&(l=l+" - Option {"+o(i)+"} costraints Options ["+o(a)+"]",i=i.union(a)),l=l+" - To be evaluate: ( "+o(i)+" )",s=e.verificaAlternativi(r,i,!0),l+=s.message,s.altGrExist)u=n(!1,502,l,[],[],s.altGrList,[]);else{var d=e.getNodiIncompatibiliConSelezionati(i);d.size>0?(d.forEach((function(e,t){l=l+" - Option ( "+t+") is incompatible with Options ["+o(e)+"]"})),u=n(!1,501,l,[],[],[],d)):(e.checkConfigurazione=e.checkConfigurazione.union(i),l=l+" - Should add ( "+o(i)+")",u=n(!0,201,l,i,[],[],[]))}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),u},e.removeNode=function(r){"use strict";var i,a,s,l,u,c;if(e.log.debug("RuleEngine.removeNode"),l={},u="",c=t(),i=(i=e.cyto.collection()).union(r),!r.hasClass("selected"))return e.log.debug("RuleEngine.removeNode - Option {"+r.id()+"} is NOT in Configuration "),u=u+" - Option {"+r.id()+"} is NOT in Configuration",c=n(!1,501,u,{});if((a=e.getNodiVincolati(r,i)).size()>0&&(u=u+" - Option "+o(i)+" constraints Options ["+o(a)+"]",i=i.union(a)),u=u+" - To be evaluate ["+o(i)+"]",u+=(s=e.verificaAlternativi(r,i,!1)).message,s.altGrExist)c=n(!1,502,u,l);else if(r.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(r,i);i=d.selection,u+=d.message;for(var p=0;p<i.length;p++){var f=i[p];if(e.vincolantiInConfig(r,f,!1).nonempty())return u=u+" Option {"+f.id()+"} is bound by an Option in Configuration",c=n(!1,501,u,{})}i.forEach((function(t){var n=e.cyto.$("#config").outgoers("edge[type='C']"),r=e.cyto.elements('edge[target = "'+t.id()+'"]'),i=n.intersection(r);e.cyto.remove(i),t.removeClass("selected")})),e.configurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),e.cyto.elements().removeClass("highlighted"),u=u+"rimossi: ( "+o(i)+")",c=n(!0,211,u,[],i,[],[])}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),e.incompatibiliConConfig.size()>0&&e.incompatibiliConConfig.addClass("highlighted"),c},e.checkRemoveNode=function(r){"use strict";var i,a,s,l,u,c;if(e.log.debug("RuleEngine.removeNode"),l={},u="",c=t(),i=(i=e.cyto.collection()).union(r),!r.hasClass("selected"))return e.log.debug("RuleEngine.removeNode - Option {"+r.id()+"} is NOT in Configuration "),u=u+" - Option {"+r.id()+"} is NOT in Configuration ",c=n(!1,501,u,{});if((a=e.getNodiVincolati(r,i)).size()>0&&(u=u+" - Option "+o(i)+" constraints Options ["+o(a)+"]",i=i.union(a)),u=u+" - To be evaluate: ( "+o(i)+" )",u+=(s=e.verificaAlternativi(r,i,!0)).message,s.altGrExist)c=n(!1,502,u,l);else if(r.hasClass("selected")){var d=e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati(r,i);i=d.selection,u+=d.message;for(var p=0;p<i.length;p++){var f=i[p];if(e.vincolantiInConfig(r,f,!0).nonempty())return u=u+" - Option {"+f.id()+"} is bound by an Option in Configurazion)",c=n(!1,501,u,{})}e.checkConfigurazione=e.cyto.$("#config").outgoers("edge[type='C']").targets(),u=u+" - Should remove Option { "+o(i)+"}",c=n(!0,211,u,[],i,[],[])}return e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),c},e.getTiedToList=function(t,n){"use strict";var r,i;r="",i={};for(var s=function(n){for(var r=function(n){var r=n.incomers("edge[type='V']").sources(),i=n.incomers("edge[type='A']").sources(),o=r.union(i),s=n.union(o).intersection(e.configurazione);a("RuleEngine.getTiedToList vincolantiInConfig_ iniziali :",s);for(var l=0;l<i.length;l++){var u=i[l];e.log.debug("RuleEngine.getTiedToList - altNode_:["+u.id()+"]"),u.outgoers("edge[type='A']").targets().intersection(t).nonempty()&&(s=s.difference(u),a("RuleEngine.getTiedToList vincolantiInConfig_ rimanenti :",s))}return s},i=0,o=r(n);o.size()>i;)i=o.size(),o=r(o),a("RuleEngine.getTiedToList vincolanti:",o);return o},l=e.cyto.collection(),u=0;u<n.length;u++){var c=n[u],d=s(c);(d=d.difference(n)).nonempty()&&(e.log.debug("RuleEngine.getTiedToList - vincolantiInConfig_:["+o(d)+"]"),r=r+" - Option {"+c.id()+"} is bound by ["+o(d)+"] in Configuration ",l=l.union(d))}return i.message=r,i.tiedToList=l,i},e.getNodiVincolati=function(e,t){"use strict";var n,r;for(r=(r=(r=(n=e.outgoers("edge[type='V']").targets()).outgoers("edge[type='V']").targets()).difference(t)).difference(n),a("RuleEngine.getNodiVincolati ",r);r.size()>0;)r=(r=(r=(n=n.union(r)).outgoers("edge[type='V']").targets()).difference(t)).difference(n);return n.nonempty()&&a("RuleEngine.getNodiVincolati ",n),n},e.getVincolatiDiretti=function(e){"use strict";var t,n;for(n=(n=(n=(t=e.outgoers("edge[type='V']").targets()).outgoers("edge[type='V']").targets()).difference(e)).difference(t);n.size()>0;)n=(n=(n=(t=t.union(n)).outgoers("edge[type='V']").targets()).difference(e)).difference(t);return t.nonempty()&&a("RuleEngine.getVincolatiDiretti ",t),t},e.getVincolatiDiretti_=function(t){"use strict";var n,r;for(n=t.outgoers("edge[type='V']").targets(),a("RuleEngine.getVincolatiDiretti 0",n),r=(r=n.outgoers("edge[type='V']").targets()).difference(e.configurazione.union(t)),a("RuleEngine.getVincolatiDiretti 1",r);r.difference(n).nonempty();)r=n.outgoers("edge[type='V']").targets(),(n=(r=r.difference(e.configurazione)).union(n)).nonempty()&&a("RuleEngine.getVincolatiDiretti 2",n);return n=n.difference(e.configurazione)},e.verificaEsclusivi=function(t,n){"use strict";var r;r={},e.log.debug("RuleEngine.verificaEsclusivi - initNode:["+t.id()+"] - evalSelection:["+o(n)+"]");var i=n.incomers("edge[type='E']");if(e.log.debug("RuleEngine.verificaEsclusivi - Archi Esclusivi :["+o(i)+"]"),i.nonempty()){var a=i.sources();e.log.debug("RuleEngine.verificaEsclusivi - Gruppi Alternativi :["+o(a)+"]");for(var s=0;s<a.length;s++){var l=a[s].outgoers("edge[type='E']").targets().filter((function(e){if(e.hasClass("selected"))return e}));e.log.debug("RuleEngine.verificaEsclusivi - initNode:["+t.id()+"] - excSelectedNodeList_:["+o(l)+"]"),1!==l.size()||t.hasClass("selected")||l[0].removeClass("selected")}}return r.message="",e.log.debug("RuleEngine.verificaEsclusivi - result message:[]"),r},e.findAltPaths=function(t,n,r,i){"use strict";var a,s;a="",(s={}).altGrExist=!1,s.altGrList=[],s.solvedTargetList_=e.cyto.collection(),s.alreadySolvedTargetAltGroupNodeList=e.cyto.collection();var l=t.outgoers("edge[type='A']");if(l.size()>0){var u=l.targets();e.log.debug("RuleEngine.findAltPaths - Gruppi Alternativi :["+o(u)+"]");for(var c=l.sources(),d=e.cyto.collection(),p=e.cyto.collection(),f=0;f<c.length;f++){var h=!1,g=c[f],v=g.outgoers("edge[type='A']");e.log.debug("RuleEngine.findAltPaths -----------------------------------------------"),e.log.debug("RuleEngine.findAltPaths - targetAltEdgeList_ :["+v.size()+"] di sourceAltNode_:["+o(g)+"]"),e.log.debug("RuleEngine.findAltPaths - me_.configurazione :["+o(e.configurazione)+"]"),e.log.debug("RuleEngine.findAltPaths - toAddList :["+o(t)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveList :["+o(n)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveJoinList :["+o(r)+"]"),e.log.debug("RuleEngine.findAltPaths - toRemoveList.difference(toRemoveJoinList) :["+o(n.difference(r))+"]"),e.log.debug("RuleEngine.findAltPaths - incAddList :["+o(i)+"]");var m=t.union(e.configurazione.difference(n).difference(i));e.log.debug("RuleEngine.findAltPaths - toAddAllConfigList_ :["+o(m)+"]");for(var y=0;y<v.length;y++){var C=v[y].target();e.log.debug("RuleEngine.findAltPaths - isSolved Test targetAltNode_ :["+o(C)+"] - targetAltNodeList_:["+o(b)+"] - toRemoveList:["+o(n)+"]");var b=e.cyto.collection();b="AG"===C.data().type?b=C.outgoers("edge[type='V']").targets():C,m.contains(b)&&b.intersection(i).empty()&&(h=!0,e.log.debug("RuleEngine.findAltPaths - isSolved TRUE targetAltNode_ :["+o(C)+"] - targetAltNodeList_:["+o(b)+"] - toRemoveList:["+o(n)+"]"),r.contains(b)&&(p=p.union(b),e.log.debug("RuleEngine.findAltPaths - solvedTargetList_ :["+o(b)+"]")),"AG"===C.data().type&&(s.alreadySolvedTargetAltGroupNodeList=s.alreadySolvedTargetAltGroupNodeList.union(C))),e.log.debug("RuleEngine.findAltPaths - isSolved Test targetAltNode_ :["+o(C)+"] - ["+h+"]")}s.solvedTargetList_=p,h||(d=d.add(g),e.log.debug("RuleEngine.findAltPaths - sourceRemainAltNodeList_ :["+o(d)+"] di sourceAltNode_:["+o(g)+"]")),e.log.debug("RuleEngine.findAltPaths -----------------------------------------------")}if(d.nonempty()){for(f=0;f<d.length;f++){var x=d[f],S=x.outgoers("edge[type='A']").targets();a=a+" - Option {"+x.id()+"} binds alternatively Options ";for(y=0;y<S.length;y++){var E=S[y],w=E.outgoers("edge[type='V']").targets();w=w.union(w.outgoers("edge[type='V']").targets()),a=a+" ("+o(E)+" ["+o(w)+"]) ";var O=e.cyto.collection();O=E.union(w),e.log.debug("RuleEngine.findAltPaths - altGrElement_ :["+o(O)+"] - toRemoveList :["+o(n)+"] - intersection :["+o(O.intersection(n))+"]"),O.intersection(i).empty()?s.altGrList.push(O):a=a+" - Options ["+o(O.intersection(i))+"] are incompatibles with needed selection from ("+x.id()+") "}}s.altGrExist=!0}}return s.message=a,e.log.debug("RuleEngine.findAltPaths - result message:["+a+"]"),s},e.verificaAlternativi=function(t,n,r){"use strict";var i,a;i="",(a={}).altGrExist=!1,a.altGrList=[];var s=r?e.checkConfigurazione:e.configurazione,l=n.outgoers("edge[type='A']");if(l.size()>0){var u=l.targets();e.log.debug("RuleEngine.verificaAlternativi - Gruppi Alternativi :["+o(u)+"]");for(var c=l.sources(),d=e.cyto.collection(),p=0;p<c.length;p++){var f=!1,h=c[p],g=h.outgoers("edge[type='A']");e.log.debug("RuleEngine.verificaAlternativi - targetAltEdgeList_ :["+o(g)+"] di sourceAltNode_:["+o(h)+"]");for(var v=0;v<g.length;v++){g[v].target().intersection(s).nonempty()&&(f=!0)}f||(d=d.add(h),e.log.debug("RuleEngine.verificaAlternativi - sourceRemainAltNodeList_ :["+o(d)+"] di sourceAltNode_:["+o(h)+"]"))}if(d.nonempty()&&!t.hasClass("selected")){for(p=0;p<d.length;p++){var m=d[p].outgoers("edge[type='A']").targets();i=i+" - Option { "+t.id()+" } binds alternatively Options ";for(v=0;v<m.length;v++){var y=m[v];if(y===t)return i=" "+o(y)+" auto-resolve selection",a.altGrExist=!1,a.altGrList=[],a;var C=y.outgoers("edge[type='V']").targets();i=i+" ("+o(y)+" ["+o(C)+"]) ";var b;b=y.union(C),a.altGrList.push(b)}}a.altGrExist=!0}}return a.message=i,""!==i&&e.log.debug("RuleEngine.verificaAlternativi - result message:["+i+"]"),a},e.getNodiIncompatibiliConSelezionati=function(t){"use strict";var n,r,i,o,a,s,l;n=new Map;for(var u=0;u<t.size();u++){var c=t[u];s=[],o=e.configurazione.intersection(c.outgoers("edge[type='I']").targets()),a=e.configurazione.intersection(c.incomers("edge[type='I']").sources()),l=e.configurazione.intersection(e.getEsclusivi(c)),(s=o.union(a).union(l)).size()>0&&(r=c.id(),i=s,n.set(r,i))}return n},e.getNodiIncompatibiliConSelezioneCorrente=function(t){"use strict";var n,r;return[],n=e.configurazione.intersection(t.outgoers("edge[type='I']").targets()),r=e.configurazione.intersection(t.incomers("edge[type='I']").sources()),n.union(r)},e.getNodiIncompatibiliConConfig=function(){"use strict";var t,n,r,i;return t=[],n=e.configurazione.outgoers("edge[type='I']").targets(),r=e.configurazione.incomers("edge[type='I']").sources(),t=n.union(r),i=e.getEsclusiviDaConfig(),t=t.union(i)},e.getNodiIncompatibili=function(t){"use strict";var n,r,i,o;return n=e.cyto.collection(),r=e.cyto.collection(),e.cyto.collection(),e.cyto.collection(),r=t.outgoers("edge[type='I']").targets(),i=t.incomers("edge[type='I']").sources(),n=r.union(i),o=e.getEsclusivi(t),n=n.union(o)},e.getIncSelectionMap=function(t,n){"use strict";var r,i,o,a,s,l,u;r=new Map;for(var c=0;c<t.size();c++){var d=t[c];l=[],a=n.intersection(d.outgoers("edge[type='I']").targets()),s=n.intersection(d.incomers("edge[type='I']").sources()),u=n.intersection(e.getExcFromNode(d)),(l=a.union(s).union(u)).size()>0&&(i=d.id(),o=l,r.set(i,o))}return r},e.aggiungiNodiVincolatiAlternativiDaNodiSelezionati=function(e,t){"use strict";var n,r;n="",(r={}).selection=t;var i=t.incomers("edge[type='A']").sources();return a("nodiVincolatiAlternativiDaNodiSelezionati:",i),i.hasClass("selected")&&(n=n+" - Option {"+e.id()+"} is bound by Options ["+o(i)+"]",r.selection=t.union(i)),r.message=n,r},e.getStdExcFromNode=function(t){"use strict";var n,r;n=null,r=t.outgoers("edge[type='E']").targets();for(var i=0;i<r.length;i++)r[i].data().isStandard&&(n=r[i]);return e.log.debug("RuleEngine.getStdExcFromNode - standard_:["+o(n)+"]"),n},e.getExcFromNode=function(t){"use strict";var n,r,i;n=e.cyto.collection(),r=t.incomers("edge[type='E']");for(var a=0;a<r.size();a++)i=r[a].source().outgoers("edge[type='E']").targets().difference(t),n=n.union(i);return n.nonempty()&&e.log.debug("RuleEngine.getExcFromNode - Esclusivi all:["+o(n)+"]"),n},e.getEsclusiviDaConfig=function(){var t;t=e.cyto.collection();var n=e.configurazione.incomers("edge[type='E']");if(n.nonempty()){for(var r=0;r<n.length;r++){var i=n[r].source(),a=i.outgoers("edge[type='E']").targets(),s=n[r].target();e.log.debug("RuleEngine.getEsclusiviDaConfig - Gruppo Esclusivo :["+i.id()+"] - Nodi Esclusivi del Gruppo :["+o(a)+"] - Nodo Esclusivo :["+s.id()+"]"),t=t.union(a.difference(s))}e.log.debug("RuleEngine.getEsclusiviDaConfig - Esclusivi:["+o(t)+"]")}return t},e.getEsclusivi=function(t){var n;n=e.cyto.collection();var r=t.incomers("edge[type='E']");if(r.nonempty()){for(var i=0;i<r.length;i++){var a=r[i].source().outgoers("edge[type='E']").targets(),s=r[i].target();n=n.union(a.difference(s))}e.log.debug("RuleEngine.getEsclusivi - Esclusivi:["+o(n)+"]")}return n},e.vincolantiInConfig=function(t,n,r){"use strict";var i=r?e.checkConfigurazione:e.configurazione;a("RuleEngine.vincolantiInConfig initNode:",n);var o=e.cyto.collection(),s=n.incomers("edge[type='V'],edge[type='A']").sources();return a("RuleEngine.vincolantiInConfig vincolanti:",s),o=s.intersection(i).difference(t),a("RuleEngine.vincolantiInConfig vincolantiInConfig:",o),o},e.getVincolantiDaConfig=function(t){"use strict";e.cyto.collection();var n=t.incomers("edge[type='V'],edge[type='A']").sources();return a("RuleEngine.getVincolantiDaConfig vincolanti:",n),n.intersection(e.configurazione)},e.getVincolantiConfigIterMax_=function(t,n){"use strict";var r=e.cyto.collection(),i=t.incomers("edge[type='V'],edge[type='A']").sources();r=r.union(i).intersection(e.configurazione);for(var o=n;o>0;o--)i=r.incomers("edge[type='V'],edge[type='A']").sources(),r=r.union(i).intersection(e.configurazione),a("RuleEngine.getVincolantiConfigRecMax vincolanti:",r);return r},e.getVincolantiConfigIterMax=function(t){"use strict";var n,r,i;for(n=e.cyto.collection(),i=0,r=t.incomers("edge[type='V'],edge[type='A']").sources(),n=n.union(r).intersection(e.configurazione);n>i;)i=n.size(),r=n.incomers("edge[type='V'],edge[type='A']").sources(),n=n.union(r).intersection(e.configurazione),a("RuleEngine.getVincolantiConfigRecMax vincolanti:",n);return n},e.getVincolantiDirettiDaConfig=function(t){"use strict";e.cyto.collection();var n=t.incomers("edge[type='V']").sources();return a("RuleEngine.getVincolantiDirettiDaConfig vincolanti dir:",n),n.intersection(e.configurazione)},e.getVincolantiAltDaConfig=function(t){"use strict";e.cyto.collection();var n=t.incomers("edge[type='A']").sources();return a("RuleEngine.getVincolantiAltDaConfig vincolanti alt:",n),n.intersection(e.configurazione)},addToConfig=function(t){"use strict";e.configurazione=e.configurazione.union(t),t.addClass("selected"),t.forEach((function(t){e.cyto.add({group:"edges",data:{source:"config",target:t.data("id"),type:"C"}})})),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig(),a("RuleEngine.addToConfig me_.configurazione:",e.configurazione)},removeToConfig=function(t){"use strict";e.configurazione=e.configurazione.difference(t),t.removeClass("selected"),t.forEach((function(t){e.cyto.remove("edge[source='config'][target='"+t.id()+"']")})),e.incompatibiliConConfig=e.getNodiIncompatibiliConConfig()},e.insertIdAddList=function(t,n){var r=e.getIdList(n).sort();this.compareOrdIdList=function(e,t){if(e.length<t.length)return 1;if(e.length>t.length)return-1;for(var n=0;n<e.length;n++){var r=t[n].localeCompare(e[n]);if(0!==r)return r}return 0};var i=!1;if(t[r.length]&&0!==t[r.length].length){for(var o=t[r.length],a=0,s=o.length-1,l=0,u=this.compareOrdIdList(o[l],r);a<=s&&!i;)switch(l=parseInt(a+(s-a)/2,10),u=this.compareOrdIdList(o[l],r)){case 0:i=!0;break;case-1:s=l-1;break;case 1:a=l+1}if(!i){var c=1===u?l+1:l;o.splice(c,0,r)}return i}for(var d=0;d<r.length;d++)void 0===t[d]&&(t[d]=[]);return t[r.length]=[],t[r.length].push(r),i},e.getNodeList=function(t){"use strict";for(var n=e.cyto.collection(),r=0;r<t.length;r++){var i=e.cyto.getElementById(t[r]);i&&(n=n.union(i))}return n},e.getIdList=function(e){"use strict";for(var t=[],n=0;n<e.size();n++){var r=e[n].id();r&&t.push(r)}return t};var t=function(){"use strict";var e={success:!1,code:500,message:"Generic Error",data:{}};return e.data.addList=[],e.data.remList=[],e.data.altGrList=[],e.data.incList=[],e.data.scenarios=[],e.data.extra={},e},n=function(e,t,n,r,i,o,a,s,l){"use strict";var u={};return u.success=e,u.code=t,u.message=n,u.data={},u.data.addList=r||[],u.data.remList=i||[],u.data.altGrList=o||[],u.data.incList=a||[],u.data.scenarios=s||[],u.data.extra=l||{},u},o=function(e){return r.join(r.map(e,(function(e){return e.id()}))," ")},a=function(t,n){"use strict";var r="";n.forEach((function(e){r=r+" "+e.id()})),e.log.debug(t+":["+r+"]")},s=function(t){"use strict";e.log.debug(" -- SCENARIOS: ["+t.length+"]");for(var n=0;n<t.length;n++)e.log.debug(" ------ ("+n+") --- Add:["+o(t[n].addList)+"] - Remove:["+o(t[n].removeList)+"]")}}},317:(e,t,n)=>{var r=n(300),i=n(799),o=n(948),a=n(321).JL,s=n(677),l=n(46);a().setOptions({appenders:[]}),e.exports=function(){var e;(e=this).ver="147",e.onInitCallback=null,e.onSetVehicleCallback=null,e.onSetVehicleErrorCallback=null,e.cytoComModDiv=null,e.cytoVehicleDiv=null,e.selectionLogDiv=null,e.sccf={},e.fccf={},e.sccf=e.fccf,e.npe={},e.fccfVehicleSelected={},e.fccfVehicleSelected.Groups=[],e.fccfVehicleSelected.BaseAttributes=[],e.optionalCustomConfig=null,e.ECommOrdValidOverride=null,e.isQualModActive=!1,e.cmRuleEngine=null,e.ruleEngine=null,e.initCallback=null,e.now=null,e.log=null,e.jsonpath=s;var t={},n={},u=null;e.axiosInstance=r.create({httpsAgent:new i.Agent({rejectUnauthorized:!1})}),e.isLazyVehLoad=!0,e.vehBufferLength=100,e.Env=null,e.Scope=null,e.BrandCod=null,e.BrandName=null,e.MarketName=null,e.LangName=null,e.MVS=null,e.modelNSPathMap=new Map,e.treeScopeOverride=!1,e.addStdOpts=!0,e.dcTypeMap=new Map,e.dictOgMap=new Map,e.dictBodyCtMap=new Map,e.dictBodyCgMap=new Map,e.dictSeatItMap=new Map,e.dictSeatIgMap=new Map,e.ftTypeMap=new Map,e.BAttrs=[],e.BaseAttrValues={},e.BaseAttributes={},e.bAttrValMap=new Map,e.Vehicles={},e.ScopeConfigOverUrl="https://carconfigurator.fcagroup.it/preview.www.fiat.it/bp_data/fccf_mv/scopeJson/fclibScopeConfig230.json",e.apiName="SccfClientApi",e.maxIter=48;var c={Vehicle:{PriceIndex:"-1",PriceNoVatIndex:"-1"},Option:{PriceIndex:"-1",PriceNoVatIndex:"-1",PriceVatPerc:null,PriceVatPercMkt:null},MapConfig:{},RefColByGraph:!0,OptGroupCod:{CL:!0,IN:!0},MvsFile:{Prefix:"MVS_T5_",Extension:"json"},QualModel:{LoadMng:!0}},d=!0;e.scopeConfig={Brand:{abarth:{Cod:"66",Des:"Abarth",SrcCod:"AH",DataType:"xF",BrandDomSlug:"abarth",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3548",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3224",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3545",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3175",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3547",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},alfaromeo:{Cod:"83",Des:"Alfa Romeo",SrcCod:"AR",DataType:"xF",BrandDomSlug:"alfaromeo",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3472",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3576",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3486",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3470",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3471",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},citroen:{Cod:"CC",Des:"Citroen",SrcCod:"AC",DataType:"xP",BrandDomSlug:"citroen",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3472",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3576",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3486",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3470",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3471",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},ds:{Cod:"SS",Des:"DS",SrcCod:"DS",DataType:"xP",BrandDomSlug:"dsautomobiles",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3472",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3576",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3486",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3470",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3471",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},fiat:{Cod:"00",Des:"Fiat",SrcCod:"FT",DataType:"xF",BrandDomSlug:"fiat",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3548",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3224",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3545",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3175",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3547",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},fiatprofessional:{Cod:"77",Des:"Fiat Professional",SrcCod:"FO",DataType:"xF",BrandDomSlug:"fiatprofessional",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3548",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3224",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3545",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3175",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3547",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},jeep:{Cod:"57",Des:"JEEP",SrcCod:"JE",DataType:"xF",BrandDomSlug:"jeep-official",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3548",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3224",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3545",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3175",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3547",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},lancia:{Cod:"70",Des:"Lancia",SrcCod:"LA",DataType:"xF",BrandDomSlug:"lancia",Mkt:{IT:{Cod:"1000",Lng:{it:{Cod:"5"}}}}},opel:{Cod:"GG",Des:"Opel",SrcCod:"OV",DataType:"xP",BrandDomSlug:"opel",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3472",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3576",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3486",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3470",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3471",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},peugeot:{Cod:"PP",Des:"Peugeot",SrcCod:"AP",DataType:"xP",BrandDomSlug:"peugeot",Mkt:{AT:{Cod:"3103",Lng:{de:{Cod:"3"}}},BE:{Cod:"3104",Lng:{fr:{Cod:"2"},nl:{Cod:"H"}}},LU:{Cod:"8104",Lng:{fr:{Cod:"2"}}},HR:{Cod:"3472",Lng:{hr:{Cod:"G"}}},DK:{Cod:"3107",Lng:{da:{Cod:"7"}}},FI:{Cod:"3808",Lng:{fi:{Cod:"B"}}},FR:{Cod:"3109",Lng:{fr:{Cod:"2"}}},DE:{Cod:"3110",Lng:{de:{Cod:"3"}}},GR:{Cod:"3113",Lng:{el:{Cod:"9"}}},HU:{Cod:"3129",Lng:{cs:{Cod:"E"},hu:{Cod:"F"},sk:{Cod:"M"}}},HH:{Cod:"3879",Lng:{hu:{Cod:"F"}}},CZ:{Cod:"3876",Lng:{cs:{Cod:"E"}}},SK:{Cod:"3874",Lng:{sk:{Cod:"M"}}},IE:{Cod:"3873",Lng:{en:{Cod:"1"}}},IL:{Cod:"3576",Lng:{he:{Cod:"O"}}},IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},JP:{Cod:"3784",Lng:{en:{Cod:"1"},jp:{Cod:"Q"}}},LT:{Cod:"3486",Lng:{et:{Cod:"J"},lv:{Cod:"P"},lt:{Cod:"V"}}},NL:{Cod:"3122",Lng:{nl:{Cod:"4"}}},NO:{Cod:"3671",Lng:{no:{Cod:"U"}}},PL:{Cod:"3123",Lng:{pl:{Cod:"D"}}},PT:{Cod:"3124",Lng:{pt:{Cod:"A"}}},RO:{Cod:"3470",Lng:{ro:{Cod:"R"}}},RU:{Cod:"3458",Lng:{ru:{Cod:"N"}}},RS:{Cod:"3606",Lng:{sr:{Cod:"S"}}},SI:{Cod:"3471",Lng:{sl:{Cod:"X"}}},ZA:{Cod:"3353",Lng:{en:{Cod:"1"}}},ES:{Cod:"3136",Lng:{es:{Cod:"6"}}},SE:{Cod:"3127",Lng:{sv:{Cod:"8"}}},CH:{Cod:"3878",Lng:{de:{Cod:"3"},fr:{Cod:"2"},it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}},UK:{Cod:"3112",Lng:{en:{Cod:"1"}}}}},tofas:{Cod:"85",Des:"Tofas",SrcCod:"85",DataType:"xF",BrandDomSlug:"tofas",Mkt:{IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}}}},tofasprofessional:{Cod:"87",Des:"Tofas Professional",SrcCod:"87",DataType:"xF",BrandDomSlug:"tofasprofessional",Mkt:{IT:{Cod:"1000",Lng:{it:{Cod:"5"}}},TR:{Cod:"3239",Lng:{tr:{Cod:"C"}}}}}},Env:{devprev:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/aemdevms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584924",SiteEnv:"dev",DataEnv:"preview",RelEnvPrev:"devprev",RelEnvPub:"devpub"},devpub:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/aemdevms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584924",SiteEnv:"dev",DataEnv:"publish",RelEnvPrev:"devprev",RelEnvPub:"devpub"},certprev:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/preview.aemcertms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"/584926",SiteEnv:"cert",DataEnv:"preview",RelEnvPrev:"certprev",RelEnvPub:"certpub"},certpub:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/aemcertms-www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584926",SiteEnv:"cert",DataEnv:"publish",RelEnvPrev:"certprev",RelEnvPub:"certpub"},preview:{NSAbsSlugPath:"https://carconfigurator.fcagroup.it/preview.www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584925",SiteEnv:"prod",DataEnv:"preview",RelEnvPrev:"preview",RelEnvPub:"publish"},publish:{NSAbsSlugPath:"https://www.",NSLocSlugPathF:"bp_data/fccf_mv/",NSLocSlugPathS:"bp_data/sccf/",SiteNumber:"584925",SiteEnv:"prod",DataEnv:"publish",RelEnvPrev:"preview",RelEnvPub:"publish"},envList:["devprev","devpub","certprev","certpub","preview","publish"],ContextMode:"absolute",ProxySlug:"/sccfns/",ProxySlugEvo:"/sccf/",ConfigUrl:"https://carconfigurator.fcagroup.it"},Mode:{initScopeType:"sccfC2evo"}},e.getVersion=function(){"use strict";var t=e.cmRuleEngine?e.cmRuleEngine.getVersion():"rei";return e.ver+t},e.init=function(t,n,r,i,l,u,d,p,f){"use strict";e.mbPath=n,e.cmPath=r,e.onInitCallback=i,e.onInitErrorCallback=l,e.log=a();var h=a.createConsoleAppender("consoleAppender");h.level=a.getWarnLevel(),e.log.setOptions({appenders:[h]}),e.log.info(e.apiName+".init - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".init - begin"),e.log.debug(e.apiName+".init - lodash:"+o.VERSION),e.log.debug(e.apiName+".init - Params - cmDataSource:["+t+"] mbPath:["+n+"] cmPath:["+n+"]"),e.createFccf(),e.log.debug(e.apiName+".init - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=d,e.cytoVehicleDiv=p,e.selectionLogDiv=f,e.optionalCustomConfig=u,e.jsonpath=s,t?e.createComModRuleEngine(t):c.QualModel&&c.QualModel.LoadMng?e.getCMDataAndQCDataSequentialCall():e.getCMDataCall(),e.log.debug(e.apiName+".init - end")},e.initScope=function(t,n,r,i,l,u,c,d,f,h){"use strict";e.onInitScopeSuccessCallback=l,e.onInitScopeErrorCallback=u,e.log=a();var g=a.createConsoleAppender("consoleAppender");g.level=a.getWarnLevel(),e.log.setOptions({appenders:[g]}),e.log.info(e.apiName+".initScope - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".initScope - begin"),e.log.debug(e.apiName+".initScope - lodash:"+o.VERSION),e.log.debug(e.apiName+".initScope - Params - Brand:["+t+"] Market:["+n+"] Lang:["+r+"] Env:["+i+"]"),e.createFccf(),e.log.debug(e.apiName+".initScope - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=d,e.cytoVehicleDiv=f,e.selectionLogDiv=h,e.optionalCustomConfig=c,c&&c.scopeConfig&&o.merge(e.scopeConfig,e.optionalCustomConfig.scopeConfig),e.jsonpath=s,p(t,n,r,i)?e.getScopeDataCall():(e.log.warn(e.apiName+".initScope - Internal Scope Not found WARN - external search"),e.getScopeConfigCall(t,n,r,i)),e.log.debug(e.apiName+".initScope - end")},e.getScopeConfigCall=function(t,n,r,i){"use strict";var o=v(),a=function(t){e.log.error(e.apiName+".getScopeConfigCall - ERROR["+t.message+"]");var n=oe(!1,542,"InitScope - getScopeConfigCall ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getScopeConfigCall - begin");var s="";try{s=e.ScopeConfigOverUrl,e.log.info(e.apiName+".getScopeConfigCall - wsUrl:["+s+"]"),e.log.warn(e.apiName+".getScopeConfigCall - wsUrl:["+s+"]")}catch(t){var l={};e.log.error(e.apiName+".getScopeConfigCall - ERROR["+t+"] - wsUrl:["+s+"]"),l.message="Malformed wsUrl",a(l)}e.axiosInstance.get(s,o).then((function(o){if(o&&o.data)if(e.log.debug(e.apiName+".getScopeConfigCall - success"),e.timeEnd(),e.log.debug(e.apiName+".getScopeConfigCall - pre-scopeConfig:["+e.scopeConfig+"]"),e.scopeConfig=o.data,e.log.debug(e.apiName+".getScopeConfigCall - post-scopeConfig:["+e.scopeConfig+"]"),e.log.debug(e.apiName+".getScopeConfigCall - ScopeConfig overwrited"),p(t,n,r,i))e.getScopeDataCall();else{e.log.warn(e.apiName+".initScope - Scope Not found WARN");var a=oe(!1,590,e.apiName+".initScope - Scope Not found ERROR",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(a)}else{e.log.error(e.apiName+".getScopeConfigCall - JSON.parse ERROR["+o+"]");a=oe(!1,542,"Init - getScopeConfigCall ERROR[Content parse error]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(a)}}),a)},e.getScopeDataCall=function(){"use strict";var t=v(),n=function(t){e.log.error(e.apiName+".getScopeDataCall - ERROR["+t.message+"]");var n=oe(!1,592,"InitScope - getScopeDataCall ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getScopeDataCall - begin");var r="";try{"undefined"!=typeof document&&(document.cookie="cc_cookie=cookieisset;path=/;"),r=f(),e.log.info(e.apiName+".getScopeDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getScopeDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}e.axiosInstance.get(r,t).then((function(t){if(t&&t.data){e.log.debug(e.apiName+".getScopeDataCall - success:["+t.data+"]");var n=t.data;if(n&&n.brand&&n.comMods){e.fccf.Scope.Brand={},e.fccf.Scope.Brand.Cod=e.BrandCod,e.fccf.Scope.Brand.SrcCod=e.scopeConfig.Brand[e.BrandName].SrcCod,e.fccf.Scope.Brand.Key=e.BrandName,e.fccf.Scope.Brand.Des=e.scopeConfig.Brand[e.BrandName].Des,e.fccf.Scope.Brand.DataType=e.scopeConfig.Brand[e.BrandName].DataType,e.fccf.Scope.Language={},e.fccf.Scope.Language.Cod=n.language,e.fccf.Scope.Language.Key=e.LangName,e.fccf.Scope.Language.Des=n.languageDes,e.fccf.Scope.Market={},e.fccf.Scope.Market.Cod=n.market,e.fccf.Scope.Market.Key=e.MarketName,e.fccf.Scope.Market.Des=n.marketDes;for(var r=0;r<n.comMods.length;r++){for(var i=n.comMods[r],a=n.comMods[r].mvss,s={Vehicles:{}},l=0;l<a.length;l++){var u=a[l];"preview"===e.scopeConfig.Env[e.Env].DataEnv&&"1"!==u.status&&(s.Vehicles[u.code]={},s.Vehicles[u.code].Cod=u.code,s.Vehicles[u.code].Des=u.desc),"publish"===e.scopeConfig.Env[e.Env].DataEnv&&"2"!==u.status&&(s.Vehicles[u.code]={},s.Vehicles[u.code].Cod=u.code,s.Vehicles[u.code].Des=u.desc)}o.isEmpty(s.Vehicles)||(s.Cod=i.code,s.Des=i.desc,e.fccf.Scope.ComModels[i.code]=s,e.modelNSPathMap.set(i.code,i.nsbpath?i.nsbpath:null))}}e.log.info(e.apiName+".getScopeDataCall - SUCCESS["+t+"]");var c=oe(!0,200,"InitScope - getScopeDataCall SUCCESS",{});e.onInitScopeSuccessCallback&&e.onInitScopeSuccessCallback(c)}else{e.log.error(e.apiName+".getScopeDataCall - JSON.parse ERROR["+t+"]");c=oe(!1,592,"Init - getScopeDataCall ERROR[Content parse error]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(c)}}),n)},e.setModel=function(t,n,r){"use strict";var i;e.log.info(e.apiName+".setModel - getVersion["+e.getVersion()+"]"),e.log.info(e.apiName+".setModel - ChangeRequest["+X(t)+"]"),e.onInitCallback=n,e.onSetModelErrorCallback=r;var o=!0;!o||t&&t.Selections&&1===t.Selections.length&&t.Selections[0].Cod||(o=!1,i=oe(!1,510,"setModel ERROR[ChangeRequest malformed]",Q([])),e.log.debug(e.apiName+".setModel ERROR[ChangeRequest malformed]"),e.onSetModelErrorCallback&&e.onSetModelErrorCallback(i)),o&&(e.CModel=t.Selections[0].Cod,e.log.debug(e.apiName+".setModel - Commercial Model:["+e.CModel+"]"),e.CModel&&(o=!1,e.getModelBuildCall(e.CModel)))},e.getModelBuildCall=function(){"use strict";var t=v(),n=function(t){e.log.error(e.apiName+".getModelBuildCall - ERROR["+t.message+"]"),e.log.debug(e.apiName+".getModelBuildCall - ERROR["+t.message+"]");var n=oe(!1,540,"SetModel - getModelBuildCall ERROR["+t.message+"]",{});e.onSetModelErrorCallback&&e.onSetModelErrorCallback(n)},r=function(t){if(t&&t.data){e.log.debug(e.apiName+".getModelBuildCall - success"),e.log.debug(e.apiName+".getModelBuildCall - response.data["+t.data+"]"),e.timeEnd();var n=h();g(t.data,n),e.log.debug(e.apiName+".getModelBuildCall - me_.mbPath["+e.mbPath+"]"),c.QualModel&&c.QualModel.LoadMng?e.getCMDataAndQCDataSequentialCall():e.getCMDataCall()}else{e.log.error(e.apiName+".getModelBuildCall - JSON.parse ERROR["+t+"]");var r=oe(!1,550,"SetModel - getModelBuildCall ERROR[Content parse error]",{});e.onSetModelErrorCallback&&e.onSetModelErrorCallback(r)}};e.timeBegin(),e.log.debug(e.apiName+".getModelBuildCall - begin");try{"undefined"!=typeof document&&(document.cookie="cc_cookie=cookieisset;path=/;");var i="";switch(e.scopeConfig.Env.ContextMode){case"revproxy":i=e.scopeConfig.Env.ProxySlug+"fiat/"+e.Env+"/data/fccf_mv/scopeTree/"+e.Scope+"_"+e.CModel+".json";break;case"absolute":i=e.scopeConfig.Env[e.Env].NSAbsSlugPath+"fiat.it/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF+"scopeTree/"+e.Scope+"_"+e.CModel+".json";break;case"cclocal":i=e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeTree/"+e.Scope+"_"+e.CModel+".json"}}catch(t){var o={};e.log.error(e.apiName+".getScopeDataCall - ERROR["+t+"] - wsUrl:["+i+"]"),o.message="Malformed wsUrl",n(o)}if("sccfC2evo"===e.scopeConfig.Mode.initScopeType||"sccfC2"===e.scopeConfig.Mode.initScopeType&&e.CModel&&null!==e.modelNSPathMap.get(e.CModel)){var a={};a.data=e.modelNSPathMap.get(e.CModel),e.log.info(e.apiName+".getModelBuildCall - nsbpath:["+a.data+"]"),r(a)}else e.treeScopeOverride=!0,e.log.info(e.apiName+".getModelBuildCall - wsUrl:["+i+"]"),e.axiosInstance.get(i,t).then(r,n)},e.loadECommOrdConfig=function(t){t&&t.Configurations&&(t.Configurations.Vehicle&&t.Configurations.Vehicle.ECommOrdValidOverride&&(e.ECommOrdValidOverride="true"===t.Configurations.Vehicle.ECommOrdValidOverride.toLowerCase()),t.Configurations.Ecommerce&&t.Configurations.Ecommerce.ECommOrdValidOverride&&("object"==typeof t.Configurations.Ecommerce.ECommOrdValidOverride&&0===t.Configurations.Ecommerce.ECommOrdValidOverride.length?e.ECommOrdValidOverride=null:e.ECommOrdValidOverride="true"===t.Configurations.Ecommerce.ECommOrdValidOverride.toLowerCase()),t.Configurations.Ecommerce&&t.Configurations.Ecommerce.isQualModActive&&"true"===t.Configurations.Ecommerce.isQualModActive.toLowerCase()&&(e.isQualModActive=!0))},e.getCMDataCall=function(){"use strict";var t=v(),n=function(t){e.log.error(e.apiName+".getCMDataCall - ERROR["+t.message+"]");var n=oe(!1,540,"Init - getCMDataCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getCMDataCall - begin");var r="";try{r=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getCMDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}e.axiosInstance.get(r,t).then((function(t){if(t&&t.data)e.log.debug(e.apiName+".getCMDataCall - success"),e.timeEnd(),e.loadECommOrdConfig(t.data),e.createComModRuleEngine(t.data);else{e.log.error(e.apiName+".getCMDataCall - JSON.parse ERROR["+t+"]");var n=oe(!1,550,"Init - getCMDataCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)}}),n)},e.getCMDataAndQCDataParallelCall=function(){"use strict";var t,n,r={isSuccCM:!1,isSuccQC:!1},i=v(),o=function(t){e.log.error(e.apiName+".getCMDataCall - ERROR["+t.message+"]");var n=oe(!1,540,"Init - getCMDataAndQCDataParallelCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - begin");var a="";try{a=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataAndQCDataParallelCall - wsUrl:["+a+"]")}catch(t){var s={};e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - ERROR["+t+"] - wsUrl:["+a+"]"),s.message="Malformed wsUrl",o(s)}e.axiosInstance.get(function(){var t=null;try{if(t=e.cmPath?e.mbPath+"/"+e.cmPath+"/QC.json":e.mbPath.replace("CM_T5_","QM_"),e.mbPath.indexOf("?")>0)t=t+"?"+e.mbPath.split("?")[1];e.log.debug(e.apiName+".getQCDataUrl - qcUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getQCDataUrl - qcUrl ERROR["+t.message+"]")}return t}(),i).then((function(i){if(i&&i.data)r.isSuccQC=!0,n=i.data,r.isSuccCM&&r.isSuccQC&&(e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - success"),e.timeEnd(),e.createComModRuleEngine(t,n));else{e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - JSON.parse ERROR["+i+"]");var o=oe(!1,550,"Init - getCMDataAndQCDataParallelCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(o)}}),(function(t){e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - ERROR["+t.message+"]");var n=oe(!1,540,"Init - getCMDataAndQCDataParallelCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)})),e.axiosInstance.get(a,i).then((function(i){if(i&&i.data)r.isSuccCM=!0,t=i.data,e.loadECommOrdConfig(t),r.isSuccCM&&r.isSuccQC&&(e.log.debug(e.apiName+".getCMDataAndQCDataParallelCall - success"),e.timeEnd(),e.createComModRuleEngine(t,n));else{e.log.error(e.apiName+".getCMDataAndQCDataParallelCall - JSON.parse ERROR["+i+"]");var o=oe(!1,550,"Init - getCMDataAndQCDataParallelCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(o)}}),o)},e.getCMDataAndQCDataSequentialCall=function(){"use strict";var t,n,r=v(),i=function(t){e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t.message+"]");var n=oe(!1,540,"Init - getCMDataAndQCDataSequentialCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)},o=function(t){e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t.message+"]");var n=oe(!1,540,"Init - getCMDataAndQCDataSequentialCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)},a=function(r){if(r&&r.data)n=r.data,e.createComModRuleEngine(t,n);else{e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - JSON.parse ERROR["+r+"]");var i=oe(!1,550,"Init - getCMDataAndQCDataSequentialCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(i)}};e.timeBegin(),e.log.debug(e.apiName+".getCMDataAndQCDataSequentialCall - begin");var s="";try{s=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getCMDataAndQCDataSequentialCall - wsUrl:["+s+"]")}catch(t){var l={};e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - ERROR["+t+"] - wsUrl:["+s+"]"),l.message="Malformed wsUrl",i(l)}e.axiosInstance.get(s,r).then((function(n){if(n&&n.data)t=n.data,e.loadECommOrdConfig(t),null===e.ECommOrdValidOverride&&e.isQualModActive?e.axiosInstance.get(function(){var t=null;try{t=e.cmPath?e.mbPath+"/"+e.cmPath+"/QC.json":e.mbPath.replace("CM_T5_","QM_"),e.mbPath.indexOf("?")>0&&(t=t+"?"+e.mbPath.split("?")[1]),e.log.debug(e.apiName+".getQCDataUrl - qcUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getQCDataUrl - qcUrl ERROR["+t.message+"]")}return t}(),r).then(a,o):e.createComModRuleEngine(t);else{e.log.error(e.apiName+".getCMDataAndQCDataSequentialCall - JSON.parse ERROR["+n+"]");var i=oe(!1,550,"Init - getCMDataAndQCDataSequentialCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(i)}}),i)},e.initStock=function(t,n,r,i,l,u,c,d,p){"use strict";e.mbPath=n,e.cmPath=r,e.onInitStockCallback=i,e.onInitStockErrorCallback=l,e.log=a();var f=a.createConsoleAppender("consoleAppender");f.level=a.getWarnLevel(),e.log.setOptions({appenders:[f]}),e.log.info(e.apiName+".initStock - getVersion["+e.getVersion()+"]"),e.log.debug(e.apiName+".initStock - begin"),e.log.debug(e.apiName+".initStock - lodash:"+o.VERSION),e.log.debug(e.apiName+".initStock - Params - cmDataSource:["+t+"] mbPath:["+n+"] cmPath:["+n+"]"),e.createFccf(),e.log.debug(e.apiName+".initStock - Fccf instance:["+e.fccf+"]"),e.cytoComModDiv=c,e.cytoVehicleDiv=d,e.selectionLogDiv=p,e.optionalCustomConfig=u,e.jsonpath=s,t||e.getStockDataCall(),e.log.debug(e.apiName+".initStock - end")},e.getStockDataCall=function(){"use strict";var t=v(),n=function(t){e.log.error(e.apiName+".getStockDataCall - ERROR["+t.message+"]");var n=oe(!1,540,"Init - getStockDataCall ERROR["+t.message+"]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)};e.timeBegin(),e.log.debug(e.apiName+".getStockDataCall - begin");var r="";try{r=e.cmPath?e.mbPath+"/"+e.cmPath+"/CM.json":e.mbPath,e.log.info(e.apiName+".getStockDataCall - wsUrl:["+r+"]")}catch(t){var i={};e.log.error(e.apiName+".getStockDataCall - ERROR["+t+"] - wsUrl:["+r+"]"),i.message="Malformed wsUrl",n(i)}e.axiosInstance.get(r,t).then((function(t){if(t&&t.data)e.log.debug(e.apiName+".getStockDataCall - success"),e.timeEnd(),e.createStockRuleEngine(t.data);else{e.log.error(e.apiName+".getStockDataCall - JSON.parse ERROR["+t+"]");var n=oe(!1,550,"Init - getStockDataCall ERROR[Content parse error]",{});e.onInitErrorCallback&&e.onInitErrorCallback(n)}}),n)},e.createStockRuleEngine=function(n){if(e.timeBegin(),e.log.debug(e.apiName+".createStockRuleEngine - begin"),n&&n.BapContent&&(t=n.BapContent),n&&n.ComModGraph&&(t=n),t&&t.ComModGraph)u={},u=t.ComModGraph,e.log.debug(e.apiName+".createStockRuleEngine - Valid Commercial Model Data"),e.cmRuleEngine=new l,e.cmRuleEngine.init(u,e.cytoComModDiv,e.selectionLogDiv,e.log,e.populateFccfStock);else{e.log.error(e.apiName+".createStockRuleEngine - ERROR[Invalid Commercial Model Data]");var r=oe(!1,560,"Init - ERROR[Invalid Commercial Model Data]",{});e.onInitStockErrorCallback&&e.onInitStockErrorCallback(r)}},e.populateFccfStock=function(){"use strict";e.timeEnd(),e.timeBegin(),e.log.debug(e.apiName+".populateFccfStock - begin");var n=oe(!0,200,"",{});try{e.fccf.ComMod.Cod=t.ComModCod.toString(),e.fccf.ComMod.Des=t.ComModDes.toString(),e.fccf.VINs=t.VINs}catch(t){e.log.error(e.apiName+".populateFccfStock - ERROR["+t.message+"]"),n=oe(!1,540,"InitStock - populateFccfStock ERROR["+t.message+"]",{}),e.onInitStockErrorCallback&&e.onInitStockErrorCallback(n)}e.onInitStockCallback(n)},e.getMVSFileName=function(t){r="";try{var n=c&&c.HeaderScopeContextCod?c.HeaderScopeContextCod:e.fccf.Header.Scope.Market.Cod+e.fccf.Header.Scope.Language.Cod+e.fccf.Header.Scope.Brand.Cod,r=c.MvsFile.Prefix+n+"_"+e.fccf.ComMod.Cod+"_"+t+"."+c.MvsFile.Extension}catch(t){e.log.debug(e.apiName+".getMVSDataCall - wsUrl ERROR - "+t.message)}return r},e.getMVSDataCall=function(n,r){"use strict";var o=v(),a=(new i.Agent({rejectUnauthorized:!1,headers:{"Access-Control-Allow-Origin":"*"}}),function(t){e.log.error(e.apiName+".getMVSDataCall - ERROR["+t.message+"]"),e.log.debug(e.apiName+".getMVSDataCall - ERROR["+t.message+"]");var n=oe(!1,540,"setVehicle ERROR["+t.message+"]",{});e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(n)});e.timeBegin(),e.log.debug(e.apiName+".getMVSDataCall - begin");var s=function(){var t=null;try{var r=e.getMVSFileName(n);e.log.debug(e.apiName+".getMVSDataCall - mvsFileName:["+r+"]");var i=e.mbPath.split("/"),o=e.mbPath.substr(0,e.mbPath.length-i[i.length-1].length);if(t=e.cmPath?e.mbPath+"/"+e.cmPath+"/"+r:o+r,e.mbPath.indexOf("?")>0)t=t+"?"+e.mbPath.split("?")[1];e.log.debug(e.apiName+".getMVSDataCall - wsUrl:["+t+"]")}catch(t){e.log.debug(e.apiName+".getMVSDataCall - wsUrl ERROR["+t.message+"]")}return t}();if(s&&"string"==typeof s)e.log.info(e.apiName+".getMVSDataCall - wsUrl:["+s+"]"),e.axiosInstance.get(s,o).then((function(r){if(r&&r.data&&r.data.Cod){e.log.debug(e.apiName+".getMVSDataCall - success"),e.timeEnd(),t.Vehs.length>e.vehBufferLength&&t.Vehs.shift(),t.Vehs.push(r.data);for(var i=t.Vehs,o=0;o<i.length;o++){var a=i[o];if(a.Cod===n){w(a),e.createVehicleRuleEngine(n);break}}}else{e.log.error(e.apiName+".getMVSDataCall - MVS Data JSON.parse ERROR");var s=oe(!1,550,"setVehicle ERROR[Content parse error]",{});e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)}}),a);else{var l={message:"Malformed wsUrl"};a(l)}};e.mergeFccfLibConfig=function(e){e&&o.merge(c,e)},e.createComModRuleEngine=function(r,i){if(e.timeBegin(),e.log.debug(e.apiName+".createComModRuleEngine - begin"),n=i,r&&r.BapContent&&(t=r.BapContent),r&&r.ComMod&&(t=r),t&&t.Configurations&&t.ComMod&&t.ComMod.ComModGraph)e.npe={},e.createECommerceDateBaseAttrs(t),e.checkECommerceValidVehicle(t,n),u={},u=t.ComMod.ComModGraph,e.log.debug(e.apiName+".createComModRuleEngine - Valid Commercial Model Data"),e.cmRuleEngine=new l,e.cmRuleEngine.init(u,e.cytoComModDiv,e.selectionLogDiv,e.log,e.populateFccf);else{e.log.error(e.apiName+".createComModRuleEngine - ERROR[Invalid Commercial Model Data]");var o=oe(!1,560,"Init - ERROR[Invalid Commercial Model Data]",{});e.onInitErrorCallback&&e.onInitErrorCallback(o)}},e.createFccf=function(){"use strict";e.log.debug(e.apiName+".createFccf"),e.fccf.Header={},e.fccf.Header.ContentConfig={},e.fccf.ComMod={},e.fccf.Action={},e.fccf.Scope={},e.fccf.ComMod.Cod="",e.fccf.ComMod.Des="",e.fccf.ComMod.AddAttrs=[],e.fccf.ComMod.CommonData={},e.fccf.ComMod.CommonData.VehsData={},e.fccf.Action.changeScenarios=[],e.fccf.Action.ChangeRequest={},e.fccf.Action.ChangeRequest.selections=[],e.fccf.Scope.ComModels={},e.npe={}},e.populateFccf=function(){"use strict";e.timeEnd(),e.timeBegin(),e.log.debug(e.apiName+".populateFccf - begin");var n=oe(!0,200,"",{});try{c.Vehicle.PriceIndex=t.Configurations.Vehicle.PriceIndex,c.Vehicle.PriceNoVatIndex=t.Configurations.Vehicle.PriceNoVatIndex,c.Option.PriceIndex=t.Configurations.Option.PriceIndex,c.Option.PriceNoVatIndex=t.Configurations.Option.PriceNoVatIndex,c.Option.PriceVatPerc=t.Configurations.Option.PriceVatPerc,c.Option.PriceVatPercMkt=t.Configurations.Option.PriceVatPercMkt,c.MapConfig=t.Configurations.MapConfig,e.optionalCustomConfig&&o.merge(c,e.optionalCustomConfig),e.fccf.Header=t.Header,e.fccf.Header.ContentConfig=t.Configurations,e.fccf.ComMod.Cod=t.ComMod.ComModCod.toString(),e.fccf.ComMod.Des=t.ComMod.ComModDes.toString(),e.fccf.ComMod.FamilyCod=t.ComMod.ComModGlobalCod?t.ComMod.ComModGlobalCod.toString():"",e.fccf.ComMod.CommonData.Currency=t.MarketBrand.Currency,m(),y(t.ComMod.AddAttrs,e.fccf.ComMod.AddAttrs),C(),b(),e.timeEnd(" --- Dictionaries - 01 END"),e.timeBegin(),x(),S(),e.timeEnd(" --- Comm Opt/Veh Groups - 02 END"),e.timeBegin(),E(),e.timeEnd(" --- BaseAttributes - 03 END"),e.timeBegin(),O(),e.timeEnd(" --- Vehicles - 08 END"),e.timeBegin(),e.timeBegin(),e.npe=t.NPE?t.NPE:{},e.timeEnd(" --- NPE - 09 END"),e.timeBegin(),e.log.debug(e.apiName+".populateFccf - end")}catch(t){e.log.error(e.apiName+".populateFccf - ERROR["+t.message+"]"),n=oe(!1,540,"Init - populateFccf ERROR["+t.message+"]",{}),e.onInitErrorCallback&&e.onInitErrorCallback(n)}e.onInitCallback(n)},e.createECommerceDateBaseAttrs=function(t){"use strict";var n=function(t){var n=null;try{if(""!==t){var r=t.split("-");n=new Date(r[2]+"-"+r[1]+"-"+r[0]+"T00:00:00.000Z").getTime()}}catch(n){e.log.warn(e.apiName+".createECommerceDateBaseAttrs - dateStr conversion WARN: ["+t+"]")}return n};if(t.ComMod.VehsData){e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList=[],e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList=[],e.fccf.ComMod.CommonData.VehsData.Vehs={};t.ComMod.ComModGraph.push({group:"nodes",data:{id:"ECD0_1",type:"BAV"}});t.ComMod.BAttrs.push({BAttrCod:"ECD0",BAttrType:"D",BAttrDes:[],BAttrVals:[{BAttrValCod:"1",BAttrValDes:[]}]});for(var r=(new Date).getTime(),i=0;i<t.ComMod.VehsData.length;i++){var o=t.ComMod.VehsData[i];e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod]={};var a=null,s=null,l=!1;if(o&&o.EcomStartDate&&"string"==typeof o.EcomStartDate&&10===o.EcomStartDate.length&&(a=n(o.EcomStartDate))&&!isNaN(a)&&(o.EcomEndDate&&"string"==typeof o.EcomEndDate&&(s=n(o.EcomEndDate)),s&&!isNaN(s)?l=a<=r&&r<=s:isNaN(s)||(l=a<=r),l)){var u={group:"edges",data:{source:o.Cod,target:"ECD0_1",type:"V",altGroupId:[]}};t.ComMod.ComModGraph.push(u),e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList.push(o.Cod)}e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod].ProdStartDate=o.ProdStartDate?o.ProdStartDate.toString():"",e.fccf.ComMod.CommonData.VehsData.Vehs[o.Cod].ProdEndDate=o.ProdEndDate?o.ProdEndDate.toString():""}}},e.checkECommerceValidVehicle=function(t,n){"use strict";e.timeBegin();var r=function(t){var n=null;try{if(""!==t){var r=t.split("-");n=new Date(r[2]+"-"+r[1]+"-"+r[0]+"T00:00:00.000Z").getTime()}}catch(n){e.log.warn(e.apiName+".checkECommerceValidVehicle - dateStr conversion WARN: ["+t+"]")}return n},i=function(e,t){var n=!1;return e&&e.OSD&&"string"==typeof e.OSD&&10===e.OSD.length&&(n=r(e.OSD)-5184e6<t),n&&e&&e.OED&&"string"==typeof e.OED&&10===e.OED.length&&(n=t<r(e.OED)),n};if(c.QualModel&&c.QualModel.LoadMng&&n){var a=(new Date).getTime(),s=[];n.Vehs.length?s=n.Vehs:n.Vehs&&n.Vehs.MVS&&s.push(n.Vehs.MVS);for(var l=0;l<s.length;l++){var u=s[l];e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidIntColList=[],e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidOptList=[],"PUBLISH"!==t.Header.Env||"10"!==u.Status&&"11"!==u.Status||(e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidIntColList="string"==typeof u.ecomData.Pub.ColIns?u.ecomData.Pub.ColIns.split(";"):[],e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidOptList="string"==typeof u.ecomData.Pub.Opts?u.ecomData.Pub.Opts.split(";"):[]),"PREVIEW"!==t.Header.Env||"10"!==u.Status&&"12"!==u.Status&&"14"!==u.Status||(e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidIntColList="string"==typeof u.ecomData.Prev.ColIns?u.ecomData.Prev.ColIns.split(";"):[],e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidOptList="string"==typeof u.ecomData.Prev.Opts?u.ecomData.Prev.Opts.split(";"):[]),e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidIntColList.length>0||e.fccf.ComMod.CommonData.VehsData.Vehs[u.MVS].OrdInvalidOptList.length>0||e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.push(u.MVS)}}else{if(t.ComMod.VehsData)for(a=(new Date).getTime(),l=0;l<t.Vehs.length;l++){u=t.Vehs[l];if(e.fccf.ComMod.CommonData.VehsData.Vehs[u.Cod].OrdInvalidIntColList=[],e.fccf.ComMod.CommonData.VehsData.Vehs[u.Cod].OrdInvalidOptList=[],u.ColInDatas&&u.OptDatas){for(var d=[],p=[],f=[],h=[],g=0;g<u.OptGroups.length;g++){var v=u.OptGroups[g];switch(v.Cod){case"IN":for(var m=0;m<v.Opts.length;m++)for(var y=v.Opts[m].AddAttrs,C=0;C<y.length;C++)y[C].AttrCod&&"RC"===y[C].AttrCod&&d.push(v.Opts[m].Cod.concat("_").concat(y[C].AttrVal));break;case"CL":break;default:for(var b=0;b<v.Opts.length;b++)"BO"!==v.Cod&&"IO"!==v.Cod&&"PK"!==v.Cod&&f.push(v.Opts[b].Cod)}}for(g=0;g<u.ColInDatas.length;g++){var x=u.ColInDatas[g];i(x,a)||p.push(x.IntCode.concat("_").concat(x.ColCode))}for(g=0;g<u.OptDatas.length;g++){var S=u.OptDatas[g];i(S,a)||h.push(S.CodOpt)}var E=o.intersection(p,d),w=o.intersection(h,f);E.length>0&&(e.fccf.ComMod.CommonData.VehsData.Vehs[u.Cod].OrdInvalidIntColList=E),w.length>0&&(e.fccf.ComMod.CommonData.VehsData.Vehs[u.Cod].OrdInvalidOptList=w),E.length>0||w.length>0||e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.push(u.Cod)}}e.timeEnd("ECommerceValidVehicle - end")}},e.getCMData=function(){"use strict";return t},e.getQMData=function(){"use strict";return n};var p=function(t,n,r,i){"use strict";var o=!1;e.log.debug(e.apiName+".selectScope - begin");try{var a=e.scopeConfig.Brand[t]?e.scopeConfig.Brand[t].Cod:null,s=a&&e.scopeConfig.Brand[t]&&e.scopeConfig.Brand[t].Mkt[n]?e.scopeConfig.Brand[t].Mkt[n].Cod:null,l=a&&e.scopeConfig.Brand[t]&&e.scopeConfig.Brand[t].Mkt[n]&&e.scopeConfig.Brand[t].Mkt[n].Lng[r]?e.scopeConfig.Brand[t].Mkt[n].Lng[r].Cod:null,u=e.scopeConfig.Env.envList.includes(i.toLowerCase())?i.toLowerCase():null;a&&s&&l&&u&&(e.Scope=s+l+a,e.Env=u,e.BrandName=t,e.BrandCod=a,e.MarketName=n,e.LangName=r,o=!0),e.log.info(e.apiName+".selectScope - me_.Scope:["+e.Scope+"] scopeFound:["+o+"]")}catch(t){e.log.error(e.apiName+".selectScope - ERROR["+t.message+"]");var c=oe(!1,594,"InitScope - selectScope ERROR["+t.message+"]",{});e.onInitScopeErrorCallback&&e.onInitScopeErrorCallback(c)}return o},f=function(){"use strict";var t=e.scopeConfig.Env[e.Env].RelEnvPrev,n={fccfC3:{},sccfC2:{},sccfC2evo:{}};n.fccfC3.revproxy=e.scopeConfig.Env.ProxySlug+"fiat/"+t+"/data/fccf_mv/scopeJson/"+e.Scope+".json",n.fccfC3.absolute=e.scopeConfig.Env[t].NSAbsSlugPath+"fiat.it/"+e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeJson/"+e.Scope+".json",n.fccfC3.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathF+"scopeJson/"+e.Scope+".json",n.sccfC2.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/sccf/scope/"+e.Scope+".json",n.sccfC2.absolute=e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".at/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json",n.sccfC2.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json";var r=e.scopeConfig.Env.ProxySlugEvo+e.scopeConfig.Env[e.Env].SiteEnv+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/sccf/scope/"+e.Scope+".json";return n.sccfC2evo.revproxy=r,n.sccfC2evo.absolute=e.scopeConfig.Env.ConfigUrl+r,n.sccfC2evo.cclocal="/"+e.scopeConfig.Env.preview.NSLocSlugPathS+"scope/"+e.Scope+".json",n[e.scopeConfig.Mode.initScopeType][e.scopeConfig.Env.ContextMode]},h=function(){"use strict";var t,n={fccfC3:{},sccfC2:{},sccfC2evo:{}};n.fccfC3.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/fccf_mv/",n.fccfC3.absolute="fiatprofessional"!==e.BrandName?e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".it/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF:e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".com/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF,n.fccfC3.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF,n.sccfC2.revproxy=e.scopeConfig.Env.ProxySlug+e.BrandName+"/"+e.Env+"/data/sccf/",n.sccfC2.absolute="fiatprofessional"!==e.BrandName?e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".at/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS:e.scopeConfig.Env[e.Env].NSAbsSlugPath+e.scopeConfig.Brand[e.BrandName].BrandDomSlug+".com/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS,n.sccfC2.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS;var r=e.scopeConfig.Env.ProxySlugEvo+e.scopeConfig.Env[e.Env].SiteEnv+"/"+e.BrandName+"/"+e.scopeConfig.Env[e.Env].DataEnv+"/data/sccf/";return n.sccfC2evo.revproxy=r,n.sccfC2evo.absolute=e.scopeConfig.Env.ConfigUrl+r,n.sccfC2evo.cclocal="/"+e.scopeConfig.Env[e.Env].NSLocSlugPathS,t=n[e.scopeConfig.Mode.initScopeType][e.scopeConfig.Env.ContextMode],e.log.debug(">>>>>>>>> prePath_:["+t+"]"),t},g=function(t,n){"use strict";var r=t.toString().split("/");10===r.length?e.mbPath=n+r[6]+"/"+r[7]+"/"+r[8]+"/"+r[9]+"/CM_T5_"+e.Scope+"_"+e.CModel+".json":e.mbPath=n+r[1]+"/"+r[2]+"/"+r[3]+"/"+r[4]+"/CM_T5_"+e.Scope+"_"+e.CModel+".json",0===n.indexOf("https://www.tofas.it")&&(e.mbPath="https://otomobil.fiat.com.tr/"+e.scopeConfig.Env[e.Env].NSLocSlugPathF+r[6]+"/"+r[7]+"/"+r[8]+"/"+r[9]+"/CM_T5_"+e.Scope+"_"+e.CModel+".json?brand=tofas")},v=function(){"use strict";var t={method:"HEAD",mode:"cors",headers:{"Access-Control-Allow-Origin":"*",Accept:"application/json","Content-Type":"application/json"},withCredentials:!1,crossdomain:!0};return"absolute"===e.scopeConfig.Env.ContextMode&&(t.headers.Cookie="cc_cookie=cookieisset;path=/;"),t},m=function(){if(t.Header&&t.Header.Scope&&t.Header.Scope.Brand&&t.Header.Scope.Market&&t.Header.Scope.Language&&(!e.fccf.Scope.Brand||!e.fccf.Scope.Brand.Cod)){var n=t.Header.Scope.Brand.Cod?t.Header.Scope.Brand.Cod:null,r=t.Header.Scope.Market.Cod?t.Header.Scope.Market.Cod:null,i=t.Header.Scope.Language.Cod?t.Header.Scope.Language.Cod:null,a=o.findKey(e.scopeConfig.Brand,["Cod",n]),s=a?o.findKey(e.scopeConfig.Brand[a].Mkt,["Cod",r]):null,l=a&&s?o.findKey(e.scopeConfig.Brand[a].Mkt[s].Lng,["Cod",i]):null;e.fccf.Header&&e.fccf.Header.Scope&&a&&s&&l&&(e.BrandName=a,e.MarketName=s,e.LangName=l,e.fccf.Scope.Brand=e.fccf.Header.Scope.Brand,e.fccf.Scope.Brand.Key=e.BrandName,e.fccf.Scope.Brand.DataType=e.scopeConfig.Brand[e.BrandName].DataType,e.fccf.Scope.Market=e.fccf.Header.Scope.Market,e.fccf.Scope.Market.Key=e.MarketName,e.fccf.Scope.Language=e.fccf.Header.Scope.Language,e.fccf.Scope.Language.key=e.LangName)}},y=function(e,t){"use strict";for(var n=0;n<e.length;n++)t[e[n].AttrCod]||(t[e[n].AttrCod]=[]),t[e[n].AttrCod].push(e[n].AttrVal.toString())},C=function(){"use strict";for(var n=t.MarketBrand.DcTypes,r=0;r<n.length;r++)for(var i=n[r],o=i.DcTypeCod,a=i.Itms,s=0;s<a.length;s++){var l=a[s].ItmCod,u=a[s].ItmDes.toString(),c=a[s]&&a[s].ItmSeq?a[s].ItmSeq.toString():"";if(e.dcTypeMap.set(o+l,u),"OG"===o){var d={};d.Des=u,d.Seq=c,e.dictOgMap.set(l,d)}"CT"===o&&e.dictBodyCtMap.set(l,u),"CG"===o&&e.dictBodyCgMap.set(l,u),"IT"===o&&e.dictSeatItMap.set(l,u),"IG"===o&&e.dictSeatIgMap.set(l,u)}},b=function(){"use strict";e.fccf.ComMod.CommonData.FeatureTypes={};for(var n=t.MarketBrand.FtTypeCats,r=0;r<n.length;r++)for(var i=n[r],o=i.FtTypeCatCod,a=i.FtTypeCatDes.toString(),s=i.FtTypes,l=0;l<s.length;l++){var u=s[l],c=u.FtTypeCod;u.FtTypeCatCod=o,u.FtTypeCatDes=a,e.ftTypeMap.set(c,u),e.fccf.ComMod.CommonData.FeatureTypes[c]={},e.fccf.ComMod.CommonData.FeatureTypes[c]=u}},x=function(){"use strict";e.fccf.ComMod.CommonData.OptionGroups={},e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES={},e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS={},e.fccf.ComMod.CommonData.OptionGroups.BODYCT={},e.fccf.ComMod.CommonData.OptionGroups.BODYCG={},e.fccf.ComMod.CommonData.OptionGroups.SEATIT={},e.fccf.ComMod.CommonData.OptionGroups.SEATIG={},e.dictOgMap.forEach((function(t,n){var r={};"string"==typeof t&&(r.Des=t.toString(),r.DSeq=""),"object"==typeof t&&(r.Des=t.Des.toString(),r.DSeq=t.Seq.toString());var i=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS[n]:c.MapConfig[0].OPTGROUPS[n];i&&i.Key?(r.Cod=i.Key,r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),r.Type="CONFIGKEYS",e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[i.Key]=r):(i&&!i.Key?r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()):(c.MapConfig.all&&c.MapConfig.all.CATGROUPS?i=c.MapConfig.all.CATGROUPS[n]:c.MapConfig[0]&&c.MapConfig[0].CATGROUPS&&(i=c.MapConfig[0].CATGROUPS[n]),i&&i.Key?(r.Cod=i.Key,r.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),r.isChgVis=!i.isChgVis||JSON.parse(i.isChgVis.toLowerCase())):(r.isVisible=!0,r.isChgVis=!0)),r.Cod=n,r.Type="CATEGORIES",e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[n]=r)}));var t=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS.NOTIN:c.MapConfig[0].OPTGROUPS.NOTIN;t&&((n={}).Cod=t.Key,n.isVisible=JSON.parse(t.isOutsideVis.toLowerCase()),n.Type="CONFIGKEYS",n.Des=t.Des,e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[n.Cod]=n);var n,r=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS.NONE:c.MapConfig[0].OPTGROUPS.NONE;r&&((n={}).Cod=r.Key,n.isVisible=JSON.parse(r.isOutsideVis.toLowerCase()),n.Type="CONFIGKEYS",n.Des=r.Des,e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[n.Cod]=n);G(e.dictBodyCtMap,"BODYCT",e.fccf.ComMod.CommonData.OptionGroups.BODYCT),G(e.dictBodyCgMap,"BODYCG",e.fccf.ComMod.CommonData.OptionGroups.BODYCG),G(e.dictSeatItMap,"SEATIT",e.fccf.ComMod.CommonData.OptionGroups.SEATIT),G(e.dictSeatIgMap,"SEATIG",e.fccf.ComMod.CommonData.OptionGroups.SEATIG)},S=function(){"use strict";var n=t.ComMod.VehGroups,r=[];e.fccf.ComMod.CommonData.VehicleGroups={},e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS={},e.fccf.ComMod.CommonData.VehicleGroups.MODELYEARS={},e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel={},e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle={},e.fccf.ComMod.CommonData.VehicleGroups.Trim={},e.fccf.ComMod.CommonData.VehCods=[];for(var i=0;i<n.length;i++){var a,s=n[i];e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod]={},e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].Cod=s.VehGroupCod,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].Des=s.VehGroupDes.toString(),e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].VehCods=s.VehCods,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].AddAttrs=[],e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].SRelOpts=[],e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].URelOpts=[],c.MapConfig.all&&c.MapConfig.all.VEHGROUPS?a=c.MapConfig.all.VEHGROUPS[s.VehGroupCod]:c.MapConfig[0]&&c.MapConfig[0].VEHGROUPS&&(a=c.MapConfig[0].VEHGROUPS[s.VehGroupCod]),e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].isVisible=!a||JSON.parse(a.isOutsideVis.toLowerCase()),y(s.AddAttrs,e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].AddAttrs),e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].SRelOpts=s.SRelOpts?s.SRelOpts:[],e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS[s.VehGroupCod].URelOpts=s.URelOpts?s.URelOpts:[],r=o.union(r,s.VehCods)}if(e.fccf.ComMod.CommonData.VehCods=r,e.fccf.ComMod.CommonData.VehicleGroups.Trim=e.fccf.ComMod.CommonData.VehicleGroups.VERSIONS,t.ComMod.Groups&&t.ComMod.Groups.DerivedModel){var l=t.ComMod.Groups.DerivedModel;for(i=0;i<l.length;i++){var u=l[i];e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[u.Cod]={},e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[u.Cod].Cod=u.Cod,e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[u.Cod].Des=u.Des.toString(),e.fccf.ComMod.CommonData.VehicleGroups.DerivedModel[u.Cod].VehCods=u.VehCods}}if(t.ComMod.Groups&&t.ComMod.Groups.BodyStyle){var d=t.ComMod.Groups.BodyStyle;for(i=0;i<d.length;i++){var p=d[i];e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod]={},e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].Cod=p.Cod,e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].Des=p.Des.toString(),e.fccf.ComMod.CommonData.VehicleGroups.BodyStyle[p.Cod].VehCods=p.VehCods}}},E=function(){"use strict";var n;e.BAttrs=t.ComMod.BAttrs,e.fccf.ComMod.CommonData.BaseAttribute={},e.log.debug(e.apiName+".populateFccf - Populate Base Attributes"),n=e.BAttrs;for(var r=0;r<n.length;r++){var i=n[r];switch(i.BAttrType){case"F":var o=e.ftTypeMap.get(i.BAttrCod);if(o){i.BAttrDes=o.FtTypeDes.toString();for(var a=0;a<i.BAttrVals.length;a++){var s=i.BAttrVals[a];if(o.Fts.length>0)for(var l=0;l<o.Fts.length;l++){var u=o.Fts[l];if(s.BAttrValCod===u.FtCod){s.BAttrValDes=u.FtDes.toString(),P(i,s);break}}else s.BAttrValCod=s.BAttrValDes,P(i,s);U(s,0)}}break;case"V":for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];P(i,s),U(s,0)}break;case"O":var c=e.dcTypeMap.get("OG".concat(i.BAttrCod));i.BAttrDes=c.toString();for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];var d=e.dcTypeMap.get("OD".concat(s.BAttrValCod));s.BAttrValDes=d||"",P(i,s),U(s,0)}break;case"D":for(a=0;a<i.BAttrVals.length;a++){s=i.BAttrVals[a];P(i,s),U(s,0)}}k(i)}},w=function(t){"use strict";var n=_(t);L(n),e.fccf.Vehicles[t.Cod]=n},O=function(){"use strict";e.log.debug(e.apiName+".populateFccf - Populate Vehicles "),e.fccf.Vehicles={};for(var n=t.Vehs,r=0;r<n.length;r++){var i=n[r];w(i)}},_=function(n){"use strict";var r={};r.Cod=n.Cod?n.Cod.toString():"",r.Des=n.Des?n.Des.toString():"",r.UseCod=n.UseCod?n.UseCod.toString():"",r.Price=n.Price,r.PriceArray=n.PriceArray,r.ECommStartDate=n.EcomStartDate?n.EcomStartDate.toString():"",r.ECommEndDate=n.EcomEndDate?n.EcomEndDate.toString():"",r.isECommDateOpen=e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList?e.fccf.ComMod.CommonData.VehsData.ECommDateOpenMvsList.includes(r.Cod):null,null!==e.ECommOrdValidOverride?r.isECommOrdValid=e.ECommOrdValidOverride:r.isECommOrdValid=e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList?e.fccf.ComMod.CommonData.VehsData.OrdValidMvsList.includes(r.Cod):null,U(r,2),R(r,n),D(r,n),r.VehGroup={};for(var i=t.ComMod.VehGroups,a=0;a<i.length;a++){var s=i[a];if(-1!==s.VehCods.indexOf(r.Cod)){r.VehGroup.VERSIONS={},r.VehGroup.VERSIONS.Cod=s.VehGroupCod,r.VehGroup.VERSIONS.Des=s.VehGroupDes.toString(),r.VehGroup.Trim={},r.VehGroup.Trim.Cod=s.VehGroupCod,r.VehGroup.Trim.Des=s.VehGroupDes.toString();break}}if(t.ComMod.Groups&&t.ComMod.Groups.DerivedModel)for(var l=t.ComMod.Groups.DerivedModel,u=0;u<l.length;u++){var c=l[u];if(-1!==c.VehCods.indexOf(r.Cod)){r.VehGroup.DerivedModel={},r.VehGroup.DerivedModel.Cod=c.Cod,r.VehGroup.DerivedModel.Des=c.Des.toString();break}}if(t.ComMod.Groups&&t.ComMod.Groups.BodyStyle){var d=t.ComMod.Groups.BodyStyle;for(u=0;u<d.length;u++){var p=d[u];if(-1!==p.VehCods.indexOf(r.Cod)){r.VehGroup.BodyStyle={},r.VehGroup.BodyStyle.Cod=p.Cod,r.VehGroup.BodyStyle.Des=p.Des.toString();break}}}var f=r.Cod;e.Vehicles[f]={},e.Vehicles[f].Options={},e.Vehicles[f].OptionGroupsCod={},r.OptionGroups={},r.OptionGroups.WHEEL||(r.OptionGroups.WHEEL={});for(var h=0;h<n.OptGroups.length;h++){var g=n.OptGroups[h];T(g),g.Options={};var v=N(f,g.Cod);r.OptionGroups[v]||(r.OptionGroups[v]={});for(var m=0;m<g.Opts.length;m++){var C=g.Opts[m];if(C.OptGroupCod=g.Cod,U(C,3),C.NodeCod=g.Cod.concat("-").concat(C.Cod),e.Vehicles[f].Options[C.NodeCod]=C,g.Options[C.NodeCod]=C,v&&(!I(f)||I(f)&&0==n.Packs.filter((function(e){return e.Cod===C.Cod})).length)){if(r.OptionGroups[v]||(r.OptionGroups[v]={}),r.OptionGroups[v].Options||(r.OptionGroups[v].Options={}),C.OptGroupKey=v,r.OptionGroups[v].Key=v,r.OptionGroups[v].Options[C.NodeCod]=C,C.AddAttrs){var b={};y(C.AddAttrs,b),r.OptionGroups[v].Options[C.NodeCod].AddAttrs=b}M(n.OptGroups,C.Cod,v,C.NodeCod)&&(r.OptionGroups[v].Options[C.NodeCod].isVisible=!1)}}if(v&&"BODY"===v&&r.OptionGroups[v]&&r.OptionGroups[v].Options){var x=o.toArray(r.OptionGroups[v].Options);x=o.sortBy(x,["Des"]),r.OptionGroups[v].Options=o.chain(x).keyBy("NodeCod").value()}e.Vehicles[f].OptionGroupsCod[g.Cod]=g}A(r,n),r.Options=e.Vehicles[f].Options;var S=I(f);if(S&&S.Key&&!r.OptionGroups[S.Key]&&(r.OptionGroups[S.Key]={},r.OptionGroups[S.Key].Key=S.Key,S.isPack))for(var E in r.OptionGroups[S.Key].Options={},r.Options)r.Packs[E]&&(r.OptionGroups[S.Key].Options[E]=r.Options[E]);return r},L=function(t){"use strict";for(var n in t.OptionLMFICodes={},t.Options)if(!(n.startsWith("BO-")||n.startsWith("IO-")||t.Options["BO-"+t.Options[n].Cod]&&"PACK"!=t.Options[n].OptGroupKey||t.Options["IO-"+t.Options[n].Cod]&&"PACK"!=t.Options[n].OptGroupKey)){if(t.Options[n].CodLMFI=[],t.Options[n]&&t.Options[n].AddAttrs&&t.Options[n].AddAttrs.RO&&t.Options[n].AddAttrs.RO.length>1&&o.map(t.OptionGroups.PACK.Options,"Cod").includes(t.Options[n].AddAttrs.RO[0])){var r=t.Options[n].AddAttrs.RO.shift();t.Options[n].AddAttrs.RO.push(r)}if(t.Options[n]&&t.Options[n].AddAttrs&&t.Options[n].AddAttrs.RO&&t.Options[n].AddAttrs.RO.length>1){e.log.debug("veh.Options[optKey_].AddAttrs['RO'] :"+t.Options[n].AddAttrs.RO+"]");for(var i=t.Options[n].AddAttrs.RO,a=o.values(t.Options),s=[],l=0;l<i.length;l++){var u={};u.Cod=i[l],u.NodeCod=o.find(a,{Cod:u.Cod}).NodeCod,e.log.debug("pCompEle_.NodeCod:["+u.NodeCod+" - veh.Options[pCompEle_.NodeCod] :"+JSON.stringify(t.Options[u.NodeCod])),u.Price=t.Options[u.NodeCod].Price?t.Options[u.NodeCod].Price.toString():null,s.push(u)}var c=o.orderBy(s,"Price","asc"),d=o.map(c,"Cod");t.Options[n].AddAttrs.RO=d}if(n.startsWith("CL-"))if(t.Options[n].AddAttrs.RO)for(var p in t.Options[n].AddAttrs.RO)t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]]={},t.Options[n].AddAttrs.RO.length<2?(t.Options[n].PriceLmfi=t.Options["BO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["BO-"+t.Options[n].AddAttrs.RO[p]].PriceLmfi:null,t.Options[n].PriceNoVatLmfi=t.Options["BO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["BO-"+t.Options[n].AddAttrs.RO[p]].PriceNoVatLmfi:null):(t.Options[n].PriceLmfi="nan",t.Options[n].PriceNoVatLmfi="nan"),t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]].CodLMFI.push(t.Options[n].Cod+"$"+t.Options[n].AddAttrs.RO[p]);else t.Options[n].AddAttrs.RO=[],t.OptionLMFICodes[t.Options[n].Cod+"$-"]={},t.OptionLMFICodes[t.Options[n].Cod+"$-"]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"$-"].CodLMFI.push(t.Options[n].Cod+"$-");else if(n.startsWith("IN-"))if(t.Options[n].AddAttrs.RO)for(var p in t.Options[n].AddAttrs.RO)t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]]={},t.Options[n].AddAttrs.RO.length<2?(t.Options[n].PriceLmfi=t.Options["IO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["IO-"+t.Options[n].AddAttrs.RO[p]].PriceLmfi:null,t.Options[n].PriceNoVatLmfi=t.Options["IO-"+t.Options[n].AddAttrs.RO[p]]?t.Options["IO-"+t.Options[n].AddAttrs.RO[p]].PriceNoVatLmfi:null):(t.Options[n].PriceLmfi="nan",t.Options[n].PriceNoVatLmfi="nan"),t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]].CodLMFI.push(t.Options[n].Cod+"#"+t.Options[n].AddAttrs.RO[p]);else t.Options[n].AddAttrs.RO=[],t.OptionLMFICodes[t.Options[n].Cod+"#-"]={},t.OptionLMFICodes[t.Options[n].Cod+"#-"]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod+"#-"].CodLMFI.push(t.Options[n].Cod+"#-");else t.OptionLMFICodes[t.Options[n].Cod]={},t.OptionLMFICodes[t.Options[n].Cod]=t.Options[n],t.OptionLMFICodes[t.Options[n].Cod].CodLMFI.push(t.Options[n].Cod)}},R=function(t,n){"use strict";t.FeatureCategories={};for(var r=0;r<n.VehFts.length;r++){var i=n.VehFts[r],a={},s=i.TypeCod,l=e.ftTypeMap.get(s);if(l){if(a.Cod=l.FtTypeCod,a.Des=l.FtTypeDes.toString(),i.Val&&0!==i.Val.length)a.Value=i.Val;else{var u=o.findIndex(l.Fts,["FtCod",i.Cod]);a.Value=-1!==u?l.Fts[u].FtDes:i.Val}t.FeatureCategories[l.FtTypeCatCod]||(t.FeatureCategories[l.FtTypeCatCod]={},t.FeatureCategories[l.FtTypeCatCod].Cod=l.FtTypeCatCod,t.FeatureCategories[l.FtTypeCatCod].Des=l.FtTypeCatDes,t.FeatureCategories[l.FtTypeCatCod].Features={}),t.FeatureCategories[l.FtTypeCatCod].Features[l.FtTypeCod]=a}else e.log.error(e.apiName+".createVehicleRuleEngine - Empty popVehFeatures ERROR: ftTypeCod_"+s+" - "+t.Cod)}},D=function(t,n){"use strict";for(var r=e.getBaseAttributeByVehicle(t.Cod),i=c.MapConfig.all?c.MapConfig.all.BASEATTRS:c.MapConfig[0].BASEATTRS,o=c.MapConfig[t.Cod]&&c.MapConfig[t.Cod].BASEATTRS?c.MapConfig[t.Cod].BASEATTRS:i,a=0;a<r.length;a++){var s=r[a];if(s){var l={},u=o[s.BAttrCod]&&o[s.BAttrCod].Key?o[s.BAttrCod].Key:s.BAttrCod,d=o[s.BAttrCod]&&o[s.BAttrCod].KeyDes?o[s.BAttrCod].KeyDes:s.BAttrDes;l.Key=u,l.KeyDes=d,l.Cod=s.BAttrCod,l.Des=s.BAttrDes,l.Values={},l.Values[s.BAttrValCod]={},l.Values[s.BAttrValCod].Cod=s.BAttrValCod,l.Values[s.BAttrValCod].Des=s.BAttrValDes,t.BaseAttributes||(t.BaseAttributes={}),t.BaseAttributes[u]=l}}},N=function(e,t){"use strict";var n=null,r=c.MapConfig.all?c.MapConfig.all.OPTGROUPS:c.MapConfig[0].OPTGROUPS,i=c.MapConfig[e]?c.MapConfig[e].OPTGROUPS:r;return i&&i[t]?n=i[t].Key:i.NOTIN&&(n=i.NOTIN.Key),n},M=function(e,t,n,r){"use strict";if("BODY"===n||"SEAT"===n||"BODYOPT"===n||"SEATOPT"===n||"PACK"===n)return!1;var i=e.filter((function(e){return"BO"===e.Cod||"IO"===e.Cod}));if(i&&i.length>0)for(var o=0;o<i.length;o++){if(i[o].Opts.filter((function(e){return e.Cod===t})).length>0)return!0}return!1},I=function(e){"use strict";var t=null,n=c.MapConfig.all?c.MapConfig.all.OPTGROUPS:c.MapConfig[0].OPTGROUPS,r=c.MapConfig[e]?c.MapConfig[e].OPTGROUPS:n;return r&&r.NONE&&(t=r.NONE),t},A=function(t,n){"use strict";var r=t.Cod,i=n.Packs;t.Packs={};for(var a=0;a<i.length;a++){var s=o.findKey(e.Vehicles[r].Options,["Cod",i[a].Cod]),l=e.Vehicles[r].Options[s];if(l){for(var u={OptRelCods:[]},c=0;c<i[a].OptRelCods.length;c++)for(var d=i[a].OptRelCods[c],p=0;p<n.OptGroups.length;p++){var f=n.OptGroups[p];if("CL"!=f.Cod&&"IN"!=f.Cod)for(var h=0;h<f.Opts.length;h++){var g=f.Opts[h];if(d==g.Cod){var v=f.Cod.concat("-").concat(g.Cod);"BO"!==f.Cod&&"IO"!==f.Cod&&(u.OptRelCods.push(v),g.ContainerPackCod=l.NodeCod)}}}u.NodeCod=l.OptGroupCod.concat("-").concat(i[a].Cod),t.Packs[u.NodeCod]=u}}},P=function(t,n){"use strict";var r=t.BAttrCod+"_"+n.BAttrValCod;e.bAttrValMap.set(r,{BAttrCod:t.BAttrCod,BAttrDes:t.BAttrDes,BAttrValCod:n.BAttrValCod,BAttrValDes:n.BAttrValDes}),e.BaseAttrValues[r]=n},k=function(t){"use strict";var n=c.MapConfig.all?c.MapConfig.all.BASEATTRS:c.MapConfig[0].BASEATTRS;if(n[t.BAttrCod]){var r=n[t.BAttrCod].Key;t.Key=r;var i={};i.Key=t.Key,i.Cod=t.BAttrCod,i.Des=n[t.BAttrCod].Des?n[t.BAttrCod].Des:t.BAttrDes.toString(),i.Type=t.BAttrType,i.Values={},i.ValKeys={};for(var o=0;o<t.BAttrVals.length;o++)i.Values[t.BAttrVals[o].BAttrValCod]=t.BAttrVals[o];i.ValKeys=Object.keys(i.Values),e.fccf.ComMod.CommonData.BaseAttribute[r]=i}e.BaseAttributes[t.BAttrCod]=t},T=function(t){"use strict";var n=e.dcTypeMap.get("OG".concat(t.Cod));n&&(t.Des=n)};e.createVehicleRuleEngine=function(n){"use strict";var r;if(e.timeEnd(),e.log.debug(e.apiName+".createVehicleRuleEngine - begin"),e.timeBegin(),t&&t.Vehs){r='$.Vehs[?(@.Cod=="'+n+'")].VehGraph.*';var i=s.query(t,r);if(e.timeEnd(),i&&i.length>0)e.log.info(e.apiName+".createVehicleRuleEngine - Valid Vehicle Data - Found Vehicle:["+n+"]"),e.ruleEngine=new l,e.ruleEngine.init(i,e.cytoVehicleDiv,e.selectionLogDiv,e.log,e.configVehicleRuleEngine);else{e.log.error(e.apiName+".createVehicleRuleEngine - Empty vehicleGraphData ERROR ");var o=oe(!1,560,"setVehicle ERROR - vehicleGraphData empty or invalid",{});e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(o)}}},e.configVehicleRuleEngine=function(){"use strict";e.timeEnd(),e.log.debug(e.apiName+".configVehicleRuleEngine - begin"),e.timeBegin();var t=oe(!0,200,"",{});j();var n=e.addStandardOpts(),r=e.getBaseAttributeByVehicle(e.MVS).map((function(e){return e?e.BAttrCod+"_"+e.BAttrValCod:""})),i=e.BaseAttrValues;for(var o in i)i[o]&&(i[o].isSelected=-1!==r.indexOf(o));for(var a in e.fccf.Vehicles){var s=e.fccf.Vehicles[a];s.isSelected=s.Cod===e.MVS}e.log.debug(e.apiName+".configVehicleRuleEngine - end"),n.success||(t=n),e.onSetVehicleCallback(t)},e.addStandardOpts=function(){"use strict";var t=ie();t=oe(!0,200,"",{});try{if(W(),e.addStdOpts){var n=e.ruleEngine.cyto.collection();for(var r in e.Vehicles[e.MVS].Options){var i=e.Vehicles[e.MVS].Options[r];if(i.isStandard){var o=e.ruleEngine.cyto.getElementById(i.NodeCod);o.data("isStandard",!0),o.data("isMandatory",i.isMandatory),n=n.union(o)}if(i.OptGroupCod&&c.OptGroupCod[i.OptGroupCod]){i.getRefColOptIdList=function(){if(c.RefColByGraph){var t=e.ruleEngine.cyto.getElementById(this.NodeCod).outgoers("edge[type='V']","edge[type='A']").targets(),n=[];t.forEach((function(e){n.push(e.id())}))}else for(var r=this.AddAttrs,i=(n=[],0);i<r.length;i++){var o=r[i];"RO"===o.AttrCod&&n.push(o.AttrCod)}return n}}}if(n.size()>0){e.ruleEngine.tassativi=n.filter((function(e){if(e.data().isMandatory)return e})),e.ruleEngine.tiedStdMandNodeList=n.filter((function(e){if(e.data().isMandatory&&(e.incomers().nonempty()||e.outgoers().nonempty()))return e}));var a=e.ruleEngine.ruleNodeList(n,e.ruleEngine.cyto.collection(),!0);a.success||(e.log.error(e.apiName+".addStandardOpts - Standard Nodes add ERROR["+a.message+"]"),t=oe(!1,530,a.message,{}))}F(),e.log.debug(e.apiName+".addStandardOpts - Option List length:["+Object.keys(e.Vehicles[e.MVS].Options).length+"]")}e.timeEnd(" addStandardOpts END")}catch(n){t=oe(!1,530,n.message,{}),e.log.error(e.apiName+".addStandardOpts - Standard Nodes add ERROR["+n.message+"]")}return t},e.VehicleGraphOverride={Config:null,getConfig:function(){"use strict";return this.Config},setConfig:function(e){"use strict";this.Config=e},override:function(){"use strict";var t=this.Config;if(t&&t.length>0)for(var n=0;n<t.length;n++){var r=t[n];if(r.mvs&&"all"===r.mvs||r.mvs===e.MVS)switch(r.action){case"delete":if(r.elem&&r.elem.group&&r.elem.data&&"edges"===r.elem.group){var i='edge[type="'+r.elem.data.type+'"][source="'+r.elem.data.source+'"][target="'+r.elem.data.target+'"]',o=e.ruleEngine.cyto.elements(i);e.log.debug(e.apiName+".setVehicleGraphOverride ["+o.length+"]"),e.ruleEngine.cyto.remove(o)}break;case"insert":r.elem&&r.elem.group&&r.elem.data&&"edges"===r.elem.group&&e.ruleEngine.cyto.add(r.elem)}}}},e.applyBaseAttrsChange=function(t){"use strict";var n,r,i;if(e.log.info(e.apiName+".applyBaseAttributes - begin - ChangeRequest["+X(t)+"]"),n=ie(),t&&t.Selections&&t.Selections.length>0){e.log.debug(e.apiName+".getVheicleByBaseAttributes - ChangeRequest.Selections.length {"+t.Selections.length+"} "),i=t.Selections;for(var o=0;o<i.length;o++){var a=i[o];if(a.Cod&&a.ChangeType){var s=e.cmRuleEngine.cyto.getElementById(a.Cod);s&&("add"===a.ChangeType?n=e.cmRuleEngine.addNode(s):"remove"===a.ChangeType&&(n=e.cmRuleEngine.removeNode(s)))}}}return j(),r=Q(i),"Changes have been applied",n=oe(!0,200,"Changes have been applied",r),e.log.info(e.apiName+".applyBaseAttributes - end "),n},e.getVehiclesByBaseAttributes=function(){"use strict";var t,n,r;e.log.debug(e.apiName+".getVheicleByBaseAttributes"),ie(),r=H(),e.log.debug(e.apiName+".getVheicleByBaseAttributes - vehicleList_.length ["+r.length+"] "),n=[];for(var i=0;i<r.length;i++){var o=J(r[i].id(),null,null);n.push(o)}return t=Q(n),"Vehicles (MVS) list",oe(!0,200,"Vehicles (MVS) list",t)},e.setVehicle=function(n,r,i,a){"use strict";var s;e.log.info(e.apiName+".setVehicle - ChangeRequest["+X(n)+"]"),e.onSetVehicleCallback=r,e.onSetVehicleErrorCallback=i;var l=!0;if(!l||n&&n.Selections&&1===n.Selections.length&&n.Selections[0].Cod||(l=!1,s=oe(!1,510,"setVehicle ERROR[ChangeRequest malformed]",Q([])),e.log.debug(e.apiName+".setVehicle ERROR[ChangeRequest malformed]"),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)),l&&(e.MVS=n.Selections[0].Cod,e.log.debug(e.apiName+".setVehicle - MVS:["+e.MVS+"] - isLazyVehLoad:["+e.isLazyVehLoad+"]"),e.Vehicles[e.MVS]&&(l=!1,e.log.debug(e.apiName+".setVehicle - found vehicle -call createVehicleRuleEngine "),e.createVehicleRuleEngine(e.MVS))),l&&a){var u=null;if(a.Cod&&a.Cod===e.MVS)try{t.Vehs.push(a);var c=t.Vehs;(u=o.filter(c,["Cod",e.MVS])[0])&&(l=!1,w(u),e.createVehicleRuleEngine(e.MVS))}catch(t){e.log.debug(e.apiName+".setVehicle ERROR - cmVeh invalid["+t.message+"]")}u||(l=!1,s=oe(!1,512,"setVehicle ERROR[vehicleDataSource MVS inchoerency]",{}),e.log.debug(e.apiName+".setVehicle ERROR - vehicleDataSource MVS inchoerency "),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s))}l&&e.isLazyVehLoad&&(l=!1,e.log.debug(e.apiName+".setVehicle - LAZY load - load Vehicle Data "),e.getMVSDataCall(e.MVS)),l&&(s=oe(!1,514,"setVehicle ERROR[Vehicle NOT found]",{}),e.log.debug(e.apiName+".setVehicle ERROR[Vehicle NOT found]"),e.onSetVehicleErrorCallback&&e.onSetVehicleErrorCallback(s)),e.log.debug(e.apiName+".setVehicle - end")},e.testChange=function(t,n){"use strict";var r,i,o,a,s;e.log.info(e.apiName+".testChange - begin - ChangeRequest["+X(t)+"]"),r=ie(),o=e.getVersion()+" - ",s=[];try{if(t&&t.Selections&&t.Selections.length>0)if(e.log.debug(e.apiName+".testChange - ChangeRequest.Selections.length {"+t.Selections.length+"} "),a=t.Selections,d){var l=K(a),u={};if(n&&"number"==typeof n&&n>1){var c={addList:l.toAddList,removeList:l.toRemoveList};u=e.ruleEngine.processRuleActResMaxIterDepth(c,e.maxIter,n,!1)}else u=e.ruleEngine.ruleNodeList(l.toAddList,l.toRemoveList,!1);l.addictionalData&&l.addictionalData.InPack&&(u.code=u.success?230:530),s=te(u,l.toAddCodList,l.toRemoveCodList),r=oe(u.success,u.code,o+u.message,{ChangeScenarios:s,Extra:u.data.extra})}else{e.ruleEngine.checkConfigurazione=e.ruleEngine.configurazione,e.ruleEngine.incompatibiliConCheckConfig=e.ruleEngine.incompatibiliConConfig;for(var p=0;p<a.length;p++){var f=a[p],h=Z(f);if(1===h.length&&([],"add"===f.ChangeType?i=e.ruleEngine.checkAddNode(h):"remove"===f.ChangeType&&(i=e.ruleEngine.checkRemoveNode(h)),o+=i.message,s=ee(i,h,f.ChangeType,s),!i.success))break}r=oe(!0,201,o,{ChangeScenarios:s})}z(r,t)}catch(t){e.log.error(e.apiName+".testChange ERROR {"+t.stack+"} ")}return e.log.info(e.apiName+".testChange - end - result["+X(r)+"]"),r};var V=function(t){if(t&&t.Selections&&t.Selections.length>0){changeList_=t.Selections;for(var n=[],r=0;r<changeList_.length;r++){var i=changeList_[r];if(i.Cod.includes("$")||i.Cod.includes("#")){if(i.Cod.includes("$")){var o,a="CL-"+i.Cod.substring(0,i.Cod.indexOf("$")),s=i.Cod.substring(i.Cod.indexOf("$")+1);for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(s)||(o=l);if(i.Cod=a,o)(c={}).Cod=o,c.ChangeType=i.ChangeType,n.push(c)}else if(i.Cod.includes("#")){var u,c,d="IN-"+i.Cod.substring(0,i.Cod.indexOf("#")),p=i.Cod.substring(i.Cod.indexOf("#")+1);for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(p)||(u=l);if(i.Cod=d,u)(c={}).Cod=u,c.ChangeType=i.ChangeType,n.push(c)}}else{var f;for(var l in e.Vehicles[e.MVS].Options)l.startsWith("CL-")||l.startsWith("IN-")||l.startsWith("BO-")||l.startsWith("IO-")||!l.endsWith(i.Cod)||(f=l);i.Cod=f}}n&&n.length>0&&(changeList_=changeList_.concat(n))}return t},B=function(t){if(t.data.ChangeScenarios&&t.data.ChangeScenarios.length>0)for(var n in t.data.ChangeScenarios){var r=t.data.ChangeScenarios[n],i=[];for(var o in r.Changes){var a=r.Changes[o];if(a.Cod.startsWith("CL-")||a.Cod.startsWith("IN-")){if(a.Cod.startsWith("CL-"))if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO){if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&1==e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length)a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[0];else if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length>1)for(var s in r.Changes){if(-1!=(l=r.Changes[s]).Cod.indexOf("-")){if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1))){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1)),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}else if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod)){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"$-"}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1);if(a.Cod.startsWith("IN-"))if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO){if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&1==e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length)a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[0];else if(e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO&&e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.length>1)for(var s in r.Changes){var l;if(-1!=(l=r.Changes[s]).Cod.indexOf("-")){if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1))){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod.substring(l.Cod.indexOf("-")+1)),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}else if(-1!=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod)){roIdx_=e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO.indexOf(l.Cod),a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#"+e.Vehicles[e.MVS].Options[a.Cod].AddAttrs.RO[roIdx_],i.push(s);break}}}else a.Cod=a.Cod.substring(a.Cod.indexOf("-")+1)+"#-"}if(i&&i.length>0)for(var u in i)r.Changes.splice(i[u],1)}return t};e.testChangeLMFICodes=function(t,n){var r=JSON.parse(JSON.stringify(t));r=V(r);var i=e.testChange(r,n);return i=B(i)},e.applyChangeLMFICodes=function(t){var n=JSON.parse(JSON.stringify(t));n=V(n);var r=e.applyChange(n);return r=B(r)},e.applyChange=function(t){"use strict";var n,r,i,o,a;e.log.info(e.apiName+".applyChange - begin - ChangeRequest["+X(t)+"]"),n=ie(),i="",a=[];try{if(t&&t.Selections&&t.Selections.length>0){if(e.log.debug(e.apiName+".applyChange - ChangeRequest.Selections.length {"+t.Selections.length+"} "),o=t.Selections,d){var s=K(o),l={};l=e.ruleEngine.ruleNodeList(s.toAddList,s.toRemoveList,!0),s.addictionalData&&s.addictionalData.InPack&&(l.code=l.success?230:530),a=te(l,s.toAddCodList,s.toRemoveCodList,!0),n=oe(l.success,l.code,l.message,{ChangeScenarios:a,Extra:l.data.extra})}else{for(var u=0;u<o.length;u++){var c=o[u],p=Z(c);if(p&&([],"add"===c.ChangeType?r=e.ruleEngine.addNode(p):"remove"===c.ChangeType&&(r=e.ruleEngine.removeNode(p)),i+=r.message,a=ee(r,p,c.ChangeType,a,!0),!r.success))break}n=oe(!0,201,i,{ChangeScenarios:a})}F()}}catch(t){e.log.error(e.apiName+".applyChange ERROR {"+t.stack+"} ")}return e.log.info(e.apiName+".applyChange - end - result["+X(n)+"]"),n},e.getVehicleConfString=function(){"use strict";var t,n,r,i;for(var o in r={},i="",ie(),t=[],n=[],e.ruleEngine.configurazione.forEach((function(e){"AG"!==e.data().type&&"VG"!==e.data().type&&t.push(e.id())})),e.fccf.Vehicles[e.MVS].Options)e.fccf.Vehicles[e.MVS].Options[o].isSelected&&e.fccf.Vehicles[e.MVS].Options[o].SelectedInPacks&&e.fccf.Vehicles[e.MVS].Options[o].SelectedInPacks.length>0&&n.push(o);return e.log.debug(e.apiName+".getVehicleConfString: ["+t+"]"),e.log.debug(e.apiName+".getVehicleConfString in pack: ["+n+"]"),r.configurazione=t,r.configurazioneInPack=n,oe(!0,200,i=(i=i+" - Configuration: ( "+t+")")+" - Configuration in Pack: ( "+n+")",r)},e.getVehicleConfStringLmfiCodes=function(){"use strict";var t,n,r,i;r={},i="",ie(),t=[],n=[];var a=[];for(var s in e.fccf.Vehicles[e.MVS].OptionLMFICodes)!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].isSelected||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks&&0!=e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks.length||(s.includes("$")?(!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)]||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)]&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("$")+1)].isSelected)&&(a.push(s.substring(s.indexOf("$")+1)),t.push(s)):s.includes("#")?(!e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)]||e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)]&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s.substring(s.indexOf("#")+1)].isSelected)&&(a.push(s.substring(s.indexOf("#")+1)),t.push(s)):t.push(s)),o.pullAll(t,a),e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].isSelected&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks&&e.fccf.Vehicles[e.MVS].OptionLMFICodes[s].SelectedInPacks.length>0&&n.push(s);return e.log.debug(e.apiName+".getVehicleConfStringLmfiCodes: ["+t+"]"),e.log.debug(e.apiName+".getVehicleConfStringLmfiCodes in pack: ["+n+"]"),r.configurazione=t,r.configurazioneInPack=n,oe(!0,200,i=(i=i+" - Configuration: ( "+t+")")+" - Configuration in Pack: ( "+n+")",r)};var z=function(t,n){"use strict";var r=function(e){return e.Cod.substring(0,e.Cod.indexOf("-"))};if(t.data.ChangeScenarios&&t.data.ChangeScenarios.length>0)for(var i=0;i<t.data.ChangeScenarios.length;i++)if(t.data.ChangeScenarios[i].Changes){for(var a=t.data.ChangeScenarios[i].Changes,s=o.keyBy(o.filter(a,(function(e){return e.CodRefList.length>0&&("BODY"==e.CodType||"SEAT"==e.CodType)})),"CodRefList"),l=0;l<a.length;l++){var u=a[l];u.IsUserVisible=!0;var c=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[u.CodType];c&&(u.IsUserVisible=c.isVisible);var d=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[r(u)];d&&(u.IsUserVisible=d.isVisible,!d.isChgVis&&u.IsUserRequest&&o.each(o.filter(a,(function(e){return d.Cod===r(e)})),(function(e){o.merge(e,{IsUserVisible:!1})}))),u.IsUserRequest&&(u.IsUserVisible=!1);var p=u.CodType;if(u.IsUserRequest)switch(p){case"BODY":o.each(o.filter(a,["CodType","BODY"]),(function(e){o.merge(e,{IsUserVisible:!1})}));break;case"SEAT":o.each(o.filter(a,["CodType","SEAT"]),(function(e){o.merge(e,{IsUserVisible:!1})}));break;case"WHEEL":o.each(o.filter(a,["CodType","WHEEL"]),(function(e){o.merge(e,{IsUserVisible:!1})}))}s[u.Cod]&&"PACK"!=u.CodType&&(o.merge(u,{IsUserVisible:!1}),e.log.debug(e.apiName+".evaluateIf: relatedChange_2 ["+JSON.stringify(u)+"]"))}e.log.debug(e.apiName+".evaluateIf: changes_ ["+JSON.stringify(a)+"]")}},j=function(){"use strict";e.log.debug(e.apiName+".setCmStatus - begin ");var t=[];e.cmRuleEngine.configurazione.forEach((function(e){t.push(e.id())}));for(var n=[],r=e.cmRuleEngine.cyto.collection('node[type="BAV"]').filter((function(e){if(!e.hasClass("selected"))return e})),i=(e.cmRuleEngine.configurazione,H()),o=0;o<r.size();o++){0==i.intersection(r[o].incomers("edge[type='V']").sources()).length&&n.push(r[o].id())}var a=e.BaseAttrValues;for(var s in a)a[s]&&(a[s].isSelected=-1!==t.indexOf(s),a[s].isSelectable=-1==n.indexOf(s));e.log.debug(e.apiName+".setCmStatus - end ")},F=function(){"use strict";e.log.debug(e.apiName+".setStatus - begin "),e.timeBegin();e.fccf.Vehicles[e.MVS].OptConfigPriceSum=0;var t=[];e.ruleEngine.configurazione.forEach((function(n){t.push(n.id()),function(t){if(e.log.info(e.apiName+".setStatus node.id(): ["+t+"]"),e.fccf.Vehicles[e.MVS].Options[t]&&e.fccf.Vehicles[e.MVS].Options[t].Price){var n=e.fccf.Vehicles[e.MVS].Options[t].Price;try{e.log.debug(e.apiName+".setStatus - updateOptPriceSum -optPrice: ["+n+"]");var r=Math.round(100*Number(n))/100;e.fccf.Vehicles[e.MVS].OptConfigPriceSum=e.fccf.Vehicles[e.MVS].OptConfigPriceSum+r}catch(n){e.log.warn(e.apiName+".setStatus - updateOptPriceSum WARN: ["+t+"]")}}}(n.id())})),e.log.debug(e.apiName+".setStatus Selected: ["+t+"]");var n=[];e.ruleEngine.incompatibiliConConfig.forEach((function(e){n.push(e.id())})),e.log.debug(e.apiName+".setStatus Unselectables: ["+n+"]");var r,i,a=[];for(var s in e.Vehicles[e.MVS].Options){var l=e.Vehicles[e.MVS].Options[s];"BO"!=l.OptGroupCod&&"IO"!=l.OptGroupCod&&"PK"!=l.OptGroupCod&&(l.isSelected=-1!==t.indexOf(l.NodeCod),l.isSelectable=-1==n.indexOf(l.NodeCod),"CL"!=l.OptGroupCod&&"IN"!=l.OptGroupCod||(l.compatible=!1),e.Vehicles[e.MVS].Options["BO-"+l.Cod]&&"PACK"!=l.OptGroupKey&&(e.Vehicles[e.MVS].Options["BO-"+l.Cod].isSelected=l.isSelected,e.Vehicles[e.MVS].Options["BO-"+l.Cod].isSelectable=l.isSelectable),e.Vehicles[e.MVS].Options["IO-"+l.Cod]&&"PACK"!=l.OptGroupKey&&(e.Vehicles[e.MVS].Options["IO-"+l.Cod].isSelected=l.isSelected,e.Vehicles[e.MVS].Options["IO-"+l.Cod].isSelectable=l.isSelectable)),e.fccf.Vehicles[e.MVS].Packs[l.NodeCod]&&a.push(e.fccf.Vehicles[e.MVS].Packs[l.NodeCod])}for(var u=0;u<a.length;u++)for(var c=a[u],d=e.Vehicles[e.MVS].Options[c.NodeCod],p=0;p<c.OptRelCods.length;p++){var f=c.OptRelCods[p],h=e.Vehicles[e.MVS].Options[f];h&&(r=h,i=c.NodeCod,d.isSelected?(r.SelectedInPacks?r.SelectedInPacks=o.union(r.SelectedInPacks,new Array(i)):(r.SelectedInPacks=[],r.SelectedInPacks.push(i)),r.isSelected=!0):r.SelectedInPacks&&(r.SelectedInPacks=o.difference(r.SelectedInPacks,new Array(i)),0==r.SelectedInPacks.length&&(e.ruleEngine.cyto.getElementById(r.NodeCod).empty()&&(r.isSelected=!1),delete r.SelectedInPacks)))}e.log.debug(e.apiName+".setStatus - fccfVehicleSelected ");var g=e.fccf.Vehicles[e.MVS].OptionGroups;for(var v in g){var m=g[v];e.fccfVehicleSelected.Groups[v]=[],e.fccfVehicleSelected.Groups[v]=$(m.Options)}o.each(e.fccfVehicleSelected.Groups.BODY,(function(t){o.each(t.AddAttrs.RI,(function(t){e.fccf.Vehicles[e.MVS].Options["IN-"+t].compatible=!0}))})),o.each(e.fccfVehicleSelected.Groups.SEAT,(function(t){o.each(t.AddAttrs.RC,(function(t){e.fccf.Vehicles[e.MVS].Options["CL-"+t].compatible=!0}))}));var y=e.fccf.ComMod.CommonData.BaseAttribute;for(var v in y){m=y[v];e.fccfVehicleSelected.BaseAttributes[v]=e.fccf.Vehicles[e.MVS].BaseAttributes[v]}e.timeEnd("setStatus - END"),e.log.debug(e.apiName+".setStatus - end ")},G=function(e,t,n){"use strict";e.forEach((function(e,r){var i,o={};o.Des=e.toString(),c.MapConfig.all&&c.MapConfig.all.CATGROUPS?i=c.MapConfig.all.CATGROUPS[r]:c.MapConfig[0]&&c.MapConfig[0].CATGROUPS&&(i=c.MapConfig[0].CATGROUPS[r]),i&&i.Key?(o.Cod=i.Key,o.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()),o.Type=t,n[i.Key]=o):(i&&!i.Key?o.isVisible=JSON.parse(i.isOutsideVis.toLowerCase()):o.isVisible=!0,o.Cod=r,o.Type=t,n[r]=o)}))},U=function(t,n){"use strict";switch(t.isSelected=!1,n){case 0:t.isSelectable=!0;break;case 1:t.isVisible=!0;break;case 2:t.isSelectable=!0,t.isDefault=!1,t.Price=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[c.Vehicle.PriceIndex]?t.PriceArray[c.Vehicle.PriceIndex]:null,t.PriceNoVat=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[c.Vehicle.PriceNoVatIndex]?t.PriceArray[c.Vehicle.PriceNoVatIndex]:null;break;case 3:if(t.isSelectable=!0,t.isIndipendent=!1,t.isStandard="Y"===t.Type,t.isMandatory="Y"===t.Mand,!t.OptGroupKey&&e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[t.OptGroupCod]?t.isVisible=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[t.OptGroupCod].isVisible:e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[t.OptGroupKey]?t.isVisible=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[t.OptGroupKey].isVisible:t.isVisible=!0,t.isUserRequest=!1,t.compatible=!0,t.Price=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[c.Option.PriceIndex]?t.PriceArray[c.Option.PriceIndex]:null,t.PriceNoVat=t.PriceArray&&t.PriceArray.length>0&&t.PriceArray[c.Option.PriceNoVatIndex]?t.PriceArray[c.Option.PriceNoVatIndex]:null,c.Option.PriceVatPercMkt&&e.fccf.Header.Scope.Market.Cod===c.Option.PriceVatPercMkt&&c.Option.PriceVatPerc&&t.PriceNoVat&&"0.00"!==t.PriceNoVat)try{t.Price=(Math.round(parseFloat(c.Option.PriceVatPerc)*Number(t.PriceNoVat)*100)/100).toString()}catch(e){}if(t.PriceLmfi=t.Price,t.PriceNoVatLmfi=t.PriceNoVat,t.Des&&0===t.Des.length&&(t.Des=e.dcTypeMap.get("OD"+t.Cod)),t.AddAttrs&&t.AddAttrs.Attr)if(t.AddAttrs.Attr.length)for(var r=0;r<t.AddAttrs.Attr.length;r++){var i;(i=t.AddAttrs.Attr[r]).AttrDes=e.dcTypeMap.get(i.AttrCod+i.AttrVal)}else(i=t.AddAttrs.Attr).AttrDes=e.dcTypeMap.get(i.AttrCod+i.AttrVal)}},q=function(t){"use strict";var n={CodType:"",CodRefList:[]},r=e.Vehicles[e.MVS].Options[t];if(r)if(o=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS[r.OptGroupCod]:c.MapConfig[0].OPTGROUPS[r.OptGroupCod]){n.CodType=o.Key,"CL"!==r.OptGroupCod&&"IN"!==r.OptGroupCod||(n.CodRefList=r.getRefColOptIdList());var i=e.fccf.Vehicles[e.MVS].Packs[t];i&&(n.CodRefList=i.OptRelCods)}else if(r.OptGroupKey)n.CodType=r.OptGroupKey;else{var o;if(e.Vehicles[e.MVS].Options["BO-"+r.Cod])(o=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS.BO:c.MapConfig[0].OPTGROUPS.BO)&&(n.CodType=o.Key);if(e.Vehicles[e.MVS].Options["IO-"+r.Cod])(o=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS.IO:c.MapConfig[0].OPTGROUPS.IO)&&(n.CodType=o.Key)}return n};e.getBaseAttributeByVehicle=function(t){"use strict";var n=[];if(e.cmRuleEngine&&e.cmRuleEngine.cyto)for(var r=e.cmRuleEngine.cyto.getElementById(t).outgoers("edge[type='V']").targets(),i=0;i<r.size();i++){var o=e.bAttrValMap.get(r[i].id());n.push(o)}return n},e.getBaseAttributeViewByVehicle=function(t){"use strict";var n=[];for(var r in e.fccf.Vehicles[t].BaseAttributes){var i=e.fccf.Vehicles[t].BaseAttributes[r],o={};for(var a in o[i.KeyDes]={},o[i.KeyDes].Key=i.KeyDes,i.Values)o[i.KeyDes].Cod=i.Values[a].Cod,o[i.KeyDes].Des=i.Values[a].Des;n.push(o)}return n},e.getFeatureByVehicle=function(t){"use strict";var n=[];for(var r in e.fccf.Vehicles[t].FeatureCategories){var i=e.fccf.Vehicles[t].FeatureCategories[r];n.push(i)}return n},e.getStandardsByVehicle=function(t){"use strict";var n={};try{for(var r in e.fccf.Vehicles[t].Options){var i=e.fccf.Vehicles[t].Options[r];if(i.isStandard&&"CL"!==i.OptGroupCod&&"IN"!==i.OptGroupCod)if(n[i.OptGroupCod]?(n[i.OptGroupCod].Features[i.Cod]={},n[i.OptGroupCod].Features[i.Cod].Cod=i.Cod,n[i.OptGroupCod].Features[i.Cod].Des=i.Des,n[i.OptGroupCod].Features[i.Cod].isVisible=i.isVisible):(n[i.OptGroupCod]={},n[i.OptGroupCod].Cod=i.OptGroupCod,n[i.OptGroupCod].Features={},n[i.OptGroupCod].Features[i.Cod]={},n[i.OptGroupCod].Features[i.Cod].Cod=i.Cod,n[i.OptGroupCod].Features[i.Cod].Des=i.Des,n[i.OptGroupCod].Features[i.Cod].isVisible=i.isVisible),e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod])n[i.OptGroupCod].Des=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod].Des,n[i.OptGroupCod].isVisible=e.fccf.ComMod.CommonData.OptionGroups.CATEGORIES[i.OptGroupCod].isVisible;else{var o=c.MapConfig.all&&c.MapConfig.all.OPTGROUPS?c.MapConfig.all.OPTGROUPS[i.OptGroupCod]:c.MapConfig[0].OPTGROUPS[i.OptGroupCod];o&&o.Key&&(n[i.OptGroupCod].Des=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[o.Key].Des,n[i.OptGroupCod].isVisible=e.fccf.ComMod.CommonData.OptionGroups.CONFIGKEYS[o.Key].isVisible)}}}catch(t){e.log.warn(e.apiName+".getStandardsByVehicle - WARN:["+t.message+"]")}return n};var H=function(){"use strict";var t=e.cmRuleEngine.cyto.collection(),n=e.cmRuleEngine.cyto.collection();n=e.cmRuleEngine.configurazione;for(var r=0;r<n.size();r++){var i=n[r];t=0===r?i.incomers("edge[type='V']").sources():t.intersection(i.incomers("edge[type='V']").sources())}return t};e.checkAddOption=function(t){var n,r;return n=ie(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.checkAddNode(r),e.log.debug(e.apiName+".checkAddOption - check processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.addOption=function(t){var n,r;return n=ie(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.addNode(r),e.log.debug(e.apiName+".addOption - check processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.removeOption=function(t){var n,r;return n=ie(),e.ruleEngine&&e.ruleEngine.cyto&&(r=e.ruleEngine.cyto.getElementById(t),n=e.ruleEngine.removeNode(r),e.log.debug(e.apiName+".removeOption - processed node {"+r.id()+"} result:[\n"+n.message+"\n]")),n},e.getConfiguration=function(){var t,n,r;return n={},r="",ie(),t=[],e.ruleEngine.configurazione.forEach((function(e){"AG"!==e.data().type&&"VG"!==e.data().type&&t.push(e.id())})),e.log.debug(e.apiName+".getConfiguration: ["+t+"]"),n.configurazione=t,oe(!0,200,r=r+" - configuration: ( "+t+")",n)},e.getUnselectables=function(){var t,n,r;return n={},r="",ie(),t=[],e.ruleEngine.incompatibiliConConfig.forEach((function(e){t.push(e.id())})),e.log.debug(e.apiName+".getUnselectables: ["+t+"]"),n.incompatibili=t,oe(!0,200,r=r+" - incompatible opt list: ( "+t+")",n)},e.addOptionList=function(t){var n,r;for(e.log.debug(e.apiName+".addOptionList"),n=0;n<t.length;n++)r=t[n],e.addOption(r)};var W=function(){"use strict";e.log.debug(e.apiName+".selectSingleStd - begin");var t=function(t,n){for(var r in t){var i=e.ruleEngine.cyto.getElementById(r).outgoers("edge[type='V'],edge[type='A']").targets(),o="";i.each((function(e){o=o+" "+e.id()})),e.log.debug(e.apiName+".selectSingleStd - mapRow:"+r+">"+o),n.set(r,i)}},n=function(e){var t=[];if(!o.isEmpty(e)){var n=null,r=null,i=o.filter(e,["Price",null]);if(i.length>=1)t.push(i[0].NodeCod);else{for(var a in e)(null==n&&"string"==typeof e[a].Price||Number(e[a].Price)<n)&&(n=Number(e[a].Price),r=a);t.push(e[r].NodeCod)}}return t},r=function(t){var n=[];if(!o.isEmpty(t)){var r=null,i=null;for(var a in t){e.log.debug(e.apiName+".selectSingleStd - stdOptionCod_:["+a+"]");var s,l=e.ruleEngine.cyto.getElementById(a),u=e.ruleEngine.cyto.collection(),c={addList:u=l?u.union(l):e.ruleEngine.cyto.collection(),removeList:e.ruleEngine.cyto.collection()};s=e.ruleEngine.processRuleMaxIter(c,e.maxIter);var d=null;o.forEach(s,(function(t){var n=e.ruleEngine.getIdList(t.addList),r=[],i=(o.filter(n,(function(t){var n=e.Vehicles[e.MVS].Options[t];if(n&&"string"==typeof n.Price)return r.push(Number(n.Price)),n})),o.sum(r));e.log.debug(e.apiName+".selectSingleStd - scenarioPrice_:["+i+"]"),d=null===d||i<d?i:d,e.log.debug(e.apiName+".selectSingleStd - scenarioPriceMin_:["+d+"]")})),(o.isNumber(r)&&o.isNumber(d)&&r>d||!o.isNumber(r)&&o.isNumber(d))&&(r=d,i=a)}for(var a in t)a===i&&n.push(i)}return n},i=e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,a=e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,s=o.filter(i,["isStandard",!0]),l=o.filter(a,["isStandard",!0]),u=new Map,c=new Map;t(i,u),t(a,c);var d=[],p=[];if(s.length>1||l.length>1)return e.log.debug(e.apiName+".selectSingleStd - rebuild by selectSingleStdLegacy LEGACY"),void function(){e.log.debug(e.apiName+".selectSingleStdLegacy - begin");var t=function(t){if(t.length>1){for(var n=null,r=null,i=0;i<t.length;i++){var a,s=t[i],l=e.ruleEngine.cyto.getElementById(s.NodeCod),u=e.ruleEngine.cyto.collection(),c={addList:u=l?u.union(l):e.ruleEngine.cyto.collection(),removeList:e.ruleEngine.cyto.collection()};a=e.ruleEngine.processRuleMaxIter(c,e.maxIter);var d=null;o.forEach(a,(function(t){var n=e.ruleEngine.getIdList(t.addList),r=[],i=(o.filter(n,(function(t){var n=e.Vehicles[e.MVS].Options[t];if(n&&"string"==typeof n.Price)return r.push(Number(n.Price)),n})),o.sum(r));i&&(d=d?i<d?i:d:i)})),n?n>d&&(n=d,r=s):(n=d,r=s)}o.forEach(t,(function(e){e.isStandard=e.Cod===r.Cod}))}},n=o.filter(e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,["isStandard",!0]);0===n.length&&e.log.error(e.apiName+".selectSingleStdLegacy - Standard Nodes add ERROR - CL group without Std"),t(n);var r=o.filter(e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,["isStandard",!0]);0===r.length&&e.log.error(e.apiName+".selectSingleStdLegacy - Standard Nodes add ERROR - IN group without Std"),t(r)}();if(1===s.length?(d.push(s[0].NodeCod),e.log.debug(e.apiName+".selectSingleStd - Colors Standard Node already exists")):s.length>1?e.log.error(e.apiName+".selectSingleStd - Colors Standard Nodes add ERROR - CL group with more than one Std"):0===s.length&&(u.forEach((function(e,t){e.empty()&&d.push(t)})),Object.keys(i).length===d.length&&(d=n(i)),0===d.length&&u.forEach((function(t,n){t.size()>0&&t.forEach((function(t){e.Vehicles[e.MVS].Options[t.id()].isStandard&&d.push(n)}))})),0===d.length&&(d=r(i))),1===l.length?(p.push(l[0].NodeCod),e.log.debug(e.apiName+".selectSingleStd - Interiors Standard Node already exists")):l.length>1?e.log.error(e.apiName+".selectSingleStd - Interiors Standard Nodes add ERROR - IN group with more than one Std"):0===l.length&&(c.forEach((function(e,t){e.empty()&&p.push(t)})),Object.keys(a).length===p.length&&(p=n(a)),0===p.length&&u.forEach((function(t,n){t.size()>0&&t.forEach((function(t){e.Vehicles[e.MVS].Options[t.id()].isStandard&&p.push(n)}))})),0===p.length&&(p=r(a))),0===d.length||0===p.length)e.log.error(e.apiName+".selectSingleStd - Colors/Interiors Standard Nodes add ERROR - colorCandidateStd:["+d.length+"] - interiorCandidateStd:["+p.length+"]");else for(var f=!1,h=0;h<d.length&&!f;h++)for(var g=d[h],v=0;v<p.length&&!f;v++){var m=p[v],y=e.ruleEngine.cyto.getElementById(g),C=e.ruleEngine.cyto.getElementById(m);y.outgoers("edge[type='I']").targets().intersection(C).empty()&&(e.Vehicles[e.MVS].Options[g].isStandard=!0,e.Vehicles[e.MVS].Options[m].isStandard=!0,e.log.debug(e.apiName+".selectSingleStd - Colors/Interiors Standard Nodes Found"),f=!0)}if(0===o.filter(e.Vehicles[e.MVS].OptionGroupsCod.CL.Options,["isStandard",!0]).length)throw e.log.error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - CL group without Std"),new Error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - CL group without Std");if(0===o.filter(e.Vehicles[e.MVS].OptionGroupsCod.IN.Options,["isStandard",!0]).length)throw e.log.error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - IN group without Std"),new Error(e.apiName+".selectSingleStd - Standard Nodes add ERROR - IN group without Std")};e.timeBegin=function(){e.now=(new Date).getTime(),e.log.debug("timeBegin - T0")},e.timeEnd=function(t){var n=t||"",r=(new Date).getTime()-e.now;return e.log.debug("timeEnd - "+n+" - T1 delta:["+r+"]"),r};var $=function(e){return o.filter(e,(function(e){return!0===e.isSelected||e.SelectedInPacks&&e.SelectedInPacks.length>0}))},X=function(e){var t="Malfomed Object";try{t=JSON.stringify(e,null,0)}catch(e){}return t},Y=function(t){"use strict";var n=[],r=e.Vehicles[e.MVS].Options[t.Cod];if(r)if(r.isSelected&&r.SelectedInPacks&&r.SelectedInPacks&&r.SelectedInPacks.length>0&&"remove"===t.ChangeType)for(var i=0;i<r.SelectedInPacks.length;i++){var o=r.SelectedInPacks[i],a=J(r.NodeCod,"remove",!0,{CodType:"INPACK"});n.push(a);var s=J(o,"remove",!1,{CodType:"INPACK",CodRefList:[o]});n.push(s)}else t.IsUserRequest=!0,n.push(t);else e.log.warn(e.apiName+".getRuleChange - Not Valid Opt Change - Change:["+JSON.stringify(t)+"]");return n},K=function(t){"use strict";for(var n={},r=e.ruleEngine.cyto.collection(),i=e.ruleEngine.cyto.collection(),a=[],s=[],l={},u=0;u<t.length;u++){var c=t[u];if(c.Cod&&c.ChangeType){var d=Y(c);o.forEach(d,(function(t){var n=t.Cod,o=e.ruleEngine.cyto.getElementById(n);1===o.length&&("add"===t.ChangeType?(r=r.union(o),t.IsUserRequest&&a.push(n)):"remove"===t.ChangeType&&(i=i.union(o),t.IsUserRequest&&s.push(n)),t.CodType&&"INPACK"===t.CodType&&(l.InPack=!0))}))}}return n.toAddList=r,n.toRemoveList=i,n.toAddCodList=a,n.toRemoveCodList=s,n.addictionalData=l,n},Z=function(t){"use strict";var n=null;if(change_.Cod&&change_.ChangeType){var r=change_.Cod;n=e.ruleEngine.cyto.getElementById(r)}return n},Q=function(e){"use strict";var t={Changes:[]};return t.Changes=e,t},J=function(e,t,n,r){"use strict";var i={};return i.ChangeType=t,i.Cod=e,i.CodRefList=[],i.CodType="",r&&(i.CodType=r.CodType,i.CodRefList=r.CodRefList),i.IsUserRequest=n,i},ee=function(t,n,r,i,o){"use strict";var a,s=[];0===i.length&&(a=Q([]),i.push(a));for(var l=0;l<i.length;l++){var u=i[l].Changes;if(t.data.altGrList.length>0)for(l=0;l<t.data.altGrList.length;l++){var c=t.data.altGrList[l];e.log.debug(e.apiName+".setChangeScenarioList - altGrElement_: ["+c[0].id()+"]");var d=ne(c,n,r,o),p=re(t,n,r,o);u=d.concat(p),a=Q(u),s.push(a)}else{p=re(t,n,r,o);a=Q(u.concat(p)),s.push(a)}}return s},te=function(t,n,r,i){"use strict";var o,a=[],s=[];if(t&&t.data&&t.data.scenarios)for(var l=t.data.scenarios,u=0;u<l.length;u++){var c=l[u],d=[],p=c.addList.filter((function(e){return"AG"!==e.data("type")&&"VG"!==e.data("type")}));if(!e.ruleEngine.insertIdAddList(s,p)){for(var f=0;f<c.removeList.size();f++){var h=c.removeList[f];if("VG"!==h.data().type&&"AG"!==h.data().type){var g=h.id(),v=q(g),m=J(g,"remove",r.includes(g),v);d.push(m),i&&(e.Vehicles[e.MVS].Options[m.Cod].isUserRequest=!1)}}for(f=0;f<c.addList.size();f++){var y=c.addList[f];if("VG"!==y.data().type&&"AG"!==y.data().type){var C=y.id();v=q(C),m=J(C,"add",n.includes(C),v);d.push(m),i&&(e.Vehicles[e.MVS].Options[m.Cod].isUserRequest=m.IsUserRequest)}}o=Q(d),a.push(o)}}return a};e.getChangeList=function(e,t){"use strict";for(var n=[],r=0;r<t.length;r++){var i=t[r],o=J(i,"remove",!0);n.push(o)}for(r=0;r<e.length;r++){i=e[r],o=J(i,"add",!0);n.push(o)}return n};var ne=function(t,n,r,i){"use strict";for(var o=[],a=0;a<t.length;a++){var s=t[a].id(),l=J(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest="remove"!=r&&l.IsUserRequest)}return o},re=function(t,n,r,i){"use strict";for(var o=[],a=0;a<t.data.addList.length;a++){var s=t.data.addList[a].id(),l=J(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest=l.IsUserRequest)}for(a=0;a<t.data.remList.length;a++){s=t.data.remList[a].id(),l=J(s,r,s===n.id());o.push(l),i&&(e.Vehicles[e.MVS].Options[l.Cod].isUserRequest=!1)}return o},ie=function(){"use strict";var e={success:!1,code:500,message:"Generic Error",data:{}};return e},oe=function(e,t,n,r){"use strict";var i={};return i.success=e,i.code=t,i.message=n,i.data=r,i}}},31:e=>{e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){var n=t[a][1][e];return i(n||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){},{}],2:[function(e,t,n){"use strict";var r=e("./util"),i=e("./is"),o=e("./promise"),a=function(e,t,n){var o=this._private=r.extend({duration:1e3},t,n);o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&i.fn(o.complete)&&o.completes.push(o.complete),this.length=1,this[0]=this},s=a.prototype;r.extend(s,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t=e.target._private.animation;(e.queue?t.queue:t.current).push(this),i.elementOrCollection(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,n=t.playing;return void 0===e?t.progress:(n&&this.pause(),t.progress=e,t.started=!1,n&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(t,n){var r=e[t];null!=r&&(e[t]=e[n],e[n]=r)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var r=0;r<e.style.length;r++){var i=e.style[r],o=i.name,a=e.startStyle[o];e.startStyle[o]=i,e.style[r]=a}return t&&this.play(),this},promise:function(e){var t,n=this._private;return t="frame"===e?n.frames:n.completes,new o((function(e,n){t.push((function(){e()}))}))}}),s.complete=s.completed,t.exports=a},{"./is":91,"./promise":94,"./util":108}],3:[function(e,t,n){"use strict";var r=e("../../is"),i={aStar:function(e){var t=this;e=e||{};var n=function(e,t,r,i){if(e==t)return i.unshift(o.getElementById(t)),i;if(t in r){var a=r[t],s=v[t];return i.unshift(o.getElementById(s)),i.unshift(o.getElementById(t)),n(e,a,r,i)}},i=function(e,t){if(0!==e.length){for(var n=0,r=t[e[0]],i=1;i<e.length;i++){var o=t[e[i]];o<r&&(r=o,n=i)}return n}},o=this._private.cy;if(null!=e&&null!=e.root){var a=r.string(e.root)?this.filter(e.root)[0]:e.root[0];if(null!=e.goal){var s=r.string(e.goal)?this.filter(e.goal)[0]:e.goal[0];if(null!=e.heuristic&&r.fn(e.heuristic))var l=e.heuristic;else l=function(){return 0};if(null!=e.weight&&r.fn(e.weight))var u=e.weight;else u=function(e){return 1};if(null!=e.directed)var c=e.directed;else c=!1;var d=a.id(),p=s.id(),f=[],h=[d],g={},v={},m={},y={};m[d]=0,y[d]=l(a);for(var C=0;h.length>0;){var b=i(h,y),x=o.getElementById(h[b]),S=x.id();if(C++,S==p){var E=n(d,p,g,[]);return{found:!0,distance:m[S],path:t.spawn(E),steps:C}}f.push(S),h.splice(b,1);for(var w=x._private.edges,O=0;O<w.length;O++){var _=w[O];if(this.hasElementWithId(_.id())&&(!c||_.data("source")===S)){var L=_.source(),R=_.target(),D=L.id()!==S?L:R,N=D.id();if(this.hasElementWithId(N)&&-1==f.indexOf(N)){var M=m[S]+u(_);-1!=h.indexOf(N)?M<m[N]&&(m[N]=M,y[N]=M+l(D),g[N]=S):(m[N]=M,y[N]=M+l(D),h.push(N),g[N]=S,v[N]=_.id())}}}}return{found:!1,distance:void 0,path:void 0,steps:C}}}}};t.exports=i},{"../../is":91}],4:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../util"),o={bellmanFord:function(e){var t=this;if(null!=(e=e||{}).weight&&r.fn(e.weight))var n=e.weight;else n=function(e){return 1};if(null!=e.directed)var o=e.directed;else o=!1;if(null!=e.root){if(r.string(e.root))var a=this.filter(e.root)[0];else a=e.root[0];for(var s=this._private.cy,l=this.edges().stdFilter((function(e){return!e.isLoop()})),u=this.nodes(),c=u.length,d={},p=0;p<c;p++)d[u[p].id()]=p;var f=[],h=[],g=[];for(p=0;p<c;p++)u[p].id()===a.id()?f[p]=0:f[p]=1/0,h[p]=void 0;var v=!1;for(p=1;p<c;p++){v=!1;for(var m=0;m<l.length;m++){var y,C=d[l[m].source().id()],b=d[l[m].target().id()],x=n(l[m]);(y=f[C]+x)<f[b]&&(f[b]=y,h[b]=C,g[b]=l[m],v=!0),o||(y=f[b]+x)<f[C]&&(f[C]=y,h[C]=b,g[C]=l[m],v=!0)}if(!v)break}if(v)for(m=0;m<l.length;m++)if(C=d[l[m].source().id()],b=d[l[m].target().id()],x=n(l[m]),f[C]+x<f[b])return i.error("Graph contains a negative weight cycle for Bellman-Ford"),{pathTo:void 0,distanceTo:void 0,hasNegativeWeightCycle:!0};var S=[];for(p=0;p<c;p++)S.push(u[p].id());var E={distanceTo:function(e){if(r.string(e))var t=s.filter(e)[0].id();else t=e.id();return f[d[t]]},pathTo:function(e){var n=function(e,t,n,r,i,o){for(;;){if(i.push(s.getElementById(r[n])),i.push(o[n]),t===n)return i;var a=e[n];if(void 0===a)return;n=a}};if(r.string(e))var i=s.filter(e)[0].id();else i=e.id();var o=[],l=n(h,d[a.id()],d[i],S,o,g);return null!=l&&l.reverse(),t.spawn(l)},hasNegativeWeightCycle:!1};return E}}};t.exports=o},{"../../is":91,"../../util":108}],5:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../heap"),o={betweennessCentrality:function(e){var t,n;e=e||{},r.fn(e.weight)?(n=e.weight,t=!0):t=!1;for(var o=null!=e.directed&&e.directed,a=this._private.cy,s=this.nodes(),l={},u={},c=0,d={set:function(e,t){u[e]=t,t>c&&(c=t)},get:function(e){return u[e]}},p=0;p<s.length;p++)l[b=(x=s[p]).id()]=o?x.outgoers().nodes():x.openNeighborhood().nodes(),d.set(b,0);for(var f=0;f<s.length;f++){var h=s[f].id(),g=[],v={},m={},y={},C=new i((function(e,t){return y[e]-y[t]}));for(p=0;p<s.length;p++){var b;v[b=s[p].id()]=[],m[b]=0,y[b]=1/0}for(m[h]=1,y[h]=0,C.push(h);!C.empty();){var x=C.pop();if(g.push(x),t)for(var S=0;S<l[x].length;S++){var E=l[x][S],w=a.getElementById(x),O=n(w.edgesTo(E).length>0?w.edgesTo(E)[0]:E.edgesTo(w)[0]);E=E.id(),y[E]>y[x]+O&&(y[E]=y[x]+O,C.nodes.indexOf(E)<0?C.push(E):C.updateItem(E),m[E]=0,v[E]=[]),y[E]==y[x]+O&&(m[E]=m[E]+m[x],v[E].push(x))}else for(S=0;S<l[x].length;S++)E=l[x][S].id(),y[E]==1/0&&(C.push(E),y[E]=y[x]+1),y[E]==y[x]+1&&(m[E]=m[E]+m[x],v[E].push(x))}var _={};for(p=0;p<s.length;p++)_[s[p].id()]=0;for(;g.length>0;)for(E=g.pop(),S=0;S<v[E].length;S++)_[x=v[E][S]]=_[x]+m[x]/m[E]*(1+_[E]),E!=s[f].id()&&d.set(E,d.get(E)+_[E])}var L={betweenness:function(e){return e=r.string(e)?a.filter(e).id():e.id(),d.get(e)},betweennessNormalized:function(e){return 0==c?0:(e=r.string(e)?a.filter(e).id():e.id(),d.get(e)/c)}};return L.betweennessNormalised=L.betweennessNormalized,L}};o.bc=o.betweennessCentrality,t.exports=o},{"../../heap":89,"../../is":91}],6:[function(e,t,n){"use strict";var r=e("../../is"),i=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(t,n,i){var o;r.plainObject(t)&&!r.elementOrCollection(t)&&(t=(o=t).roots||o.root,n=o.visit,i=o.directed),i=2!==arguments.length||r.fn(n)?i:n,n=r.fn(n)?n:function(){};for(var a,s=this._private.cy,l=t=r.string(t)?this.filter(t):t,u=[],c=[],d={},p={},f={},h=0,g=this.nodes(),v=this.edges(),m=0;m<l.length;m++)l[m].isNode()&&(u.unshift(l[m]),e.bfs&&(f[l[m].id()]=!0,c.push(l[m])),p[l[m].id()]=0);for(;0!==u.length;){if(l=e.bfs?u.shift():u.pop(),e.dfs){if(f[l.id()])continue;f[l.id()]=!0,c.push(l)}var y,C=p[l.id()],b=d[l.id()],x=null==b?void 0:b.connectedNodes().not(l)[0];if(!0===(y=n(l,b,x,h++,C))){a=l;break}if(!1===y)break;var S=l.connectedEdges(i?function(e){return e.data("source")===l.id()}:void 0).intersect(v);for(m=0;m<S.length;m++){var E=S[m],w=E.connectedNodes((function(e){return e.id()!==l.id()})).intersect(g);0===w.length||f[w.id()]||(w=w[0],u.push(w),e.bfs&&(f[w.id()]=!0,c.push(w)),d[w.id()]=E,p[w.id()]=p[l.id()]+1)}}var O=[];for(m=0;m<c.length;m++){var _=c[m],L=d[_.id()];L&&O.push(L),O.push(_)}return{path:s.collection(O,{unique:!0}),found:s.collection(a)}}},o={breadthFirstSearch:i({bfs:!0}),depthFirstSearch:i({dfs:!0})};o.bfs=o.breadthFirstSearch,o.dfs=o.depthFirstSearch,t.exports=o},{"../../is":91}],7:[function(e,t,n){"use strict";var r=e("../../is"),i={closenessCentralityNormalized:function(e){e=e||{};var t=this.cy(),n=e.harmonic;void 0===n&&(n=!0);for(var i={},o=0,a=this.nodes(),s=this.floydWarshall({weight:e.weight,directed:e.directed}),l=0;l<a.length;l++){for(var u=0,c=0;c<a.length;c++)if(l!=c){var d=s.distance(a[l],a[c]);u+=n?1/d:d}n||(u=1/u),o<u&&(o=u),i[a[l].id()]=u}return{closeness:function(e){return 0==o?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),i[e]/o)}}},closenessCentrality:function(e){if(null!=(e=e||{}).root){if(r.string(e.root))var t=this.filter(e.root)[0];else t=e.root[0];if(null!=e.weight&&r.fn(e.weight))var n=e.weight;else n=function(){return 1};if(null!=e.directed&&r.bool(e.directed))var i=e.directed;else i=!1;var o=e.harmonic;void 0===o&&(o=!0);for(var a=this.dijkstra({root:t,weight:n,directed:i}),s=0,l=this.nodes(),u=0;u<l.length;u++)if(l[u].id()!=t.id()){var c=a.distanceTo(l[u]);s+=o?1/c:c}return o?s:1/s}}};i.cc=i.closenessCentrality,i.ccn=i.closenessCentralityNormalised=i.closenessCentralityNormalized,t.exports=i},{"../../is":91}],8:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../util"),o={degreeCentralityNormalized:function(e){e=e||{};var t=this.cy();if(null!=e.directed)var n=e.directed;else n=!1;var o=this.nodes(),a=o.length;if(n){for(var s={},l={},u=0,c=0,d=0;d<a;d++){var p=o[d],f=this.degreeCentrality(i.extend({},e,{root:p}));u<f.indegree&&(u=f.indegree),c<f.outdegree&&(c=f.outdegree),s[p.id()]=f.indegree,l[p.id()]=f.outdegree}return{indegree:function(e){return 0==u?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),s[e]/u)},outdegree:function(e){return 0==c?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),l[e]/c)}}}var h={},g=0;for(d=0;d<a;d++)p=o[d],f=this.degreeCentrality(i.extend({},e,{root:p})),g<f.degree&&(g=f.degree),h[p.id()]=f.degree;return{degree:function(e){return 0==g?0:(e=r.string(e)?t.filter(e)[0].id():e.id(),h[e]/g)}}},degreeCentrality:function(e){var t=this;if(null!=(e=e||{})&&null!=e.root){var n=r.string(e.root)?this.filter(e.root)[0]:e.root[0];if(null!=e.weight&&r.fn(e.weight))var i=e.weight;else i=function(e){return 1};if(null!=e.directed)var o=e.directed;else o=!1;if(null!=e.alpha&&r.number(e.alpha))var a=e.alpha;else a=0;if(o){for(var s=n.connectedEdges('edge[target = "'+n.id()+'"]').intersection(t),l=n.connectedEdges('edge[source = "'+n.id()+'"]').intersection(t),u=s.length,c=l.length,d=0,p=0,f=0;f<s.length;f++)d+=i(s[f]);for(f=0;f<l.length;f++)p+=i(l[f]);return{indegree:Math.pow(u,1-a)*Math.pow(d,a),outdegree:Math.pow(c,1-a)*Math.pow(p,a)}}var h=n.connectedEdges().intersection(t),g=h.length,v=0;for(f=0;f<h.length;f++)v+=i(h[f]);return{degree:Math.pow(g,1-a)*Math.pow(v,a)}}}};o.dc=o.degreeCentrality,o.dcn=o.degreeCentralityNormalised=o.degreeCentralityNormalized,t.exports=o},{"../../is":91,"../../util":108}],9:[function(e,t,n){"use strict";var r=e("../../is"),i=e("../../heap"),o={dijkstra:function(e,t,n){var o;r.plainObject(e)&&!r.elementOrCollection(e)&&(e=(o=e).root,t=o.weight,n=o.directed);var a=this._private.cy;t=r.fn(t)?t:function(){return 1};for(var s=r.string(e)?this.filter(e)[0]:e[0],l={},u={},c={},d=this.edges().filter((function(e){return!e.isLoop()})),p=this.nodes(),f=function(e){return l[e.id()]},h=function(e,t){l[e.id()]=t,g.updateItem(e)},g=new i((function(e,t){return f(e)-f(t)})),v=0;v<p.length;v++){var m=p[v];l[m.id()]=m.same(s)?0:1/0,g.push(m)}for(var y=function(e,r){for(var i,o=(n?e.edgesTo(r):e.edgesWith(r)).intersect(d),a=1/0,s=0;s<o.length;s++){var l=o[s],u=t(l);(u<a||!i)&&(a=u,i=l)}return{edge:i,dist:a}};g.size()>0;){var C=g.pop(),b=f(C),x=C.id();if(c[x]=b,b===Math.Infinite)break;var S=C.neighborhood().intersect(p);for(v=0;v<S.length;v++){var E=S[v],w=E.id(),O=y(C,E),_=b+O.dist;_<f(E)&&(h(E,_),u[w]={node:C,edge:O.edge})}}return{distanceTo:function(e){var t=r.string(e)?p.filter(e)[0]:e[0];return c[t.id()]},pathTo:function(e){var t=r.string(e)?p.filter(e)[0]:e[0],n=[],i=t;if(t.length>0)for(n.unshift(t);u[i.id()];){var o=u[i.id()];n.unshift(o.edge),n.unshift(o.node),i=o.node}return a.collection(n)}}}};t.exports=o},{"../../heap":89,"../../is":91}],10:[function(e,t,n){"use strict";var r=e("../../is"),i={floydWarshall:function(e){e=e||{};var t=this.cy();if(null!=e.weight&&r.fn(e.weight))var n=e.weight;else n=function(e){return 1};if(null!=e.directed)var i=e.directed;else i=!1;for(var o=this.edges().stdFilter((function(e){return!e.isLoop()})),a=this.nodes(),s=a.length,l={},u=0;u<s;u++)l[a[u].id()]=u;var c=[];for(u=0;u<s;u++){for(var d=new Array(s),p=0;p<s;p++)d[p]=u==p?0:1/0;c.push(d)}var f=[],h=[],g=function(e){for(var t=0;t<s;t++){for(var n=new Array(s),r=0;r<s;r++)n[r]=void 0;e.push(n)}};for(g(f),g(h),u=0;u<o.length;u++){var v=l[o[u].source().id()],m=l[o[u].target().id()],y=n(o[u]);c[v][m]>y&&(c[v][m]=y,f[v][m]=m,h[v][m]=o[u])}if(!i)for(u=0;u<o.length;u++)v=l[o[u].target().id()],m=l[o[u].source().id()],y=n(o[u]),c[v][m]>y&&(c[v][m]=y,f[v][m]=m,h[v][m]=o[u]);for(var C=0;C<s;C++)for(u=0;u<s;u++)for(p=0;p<s;p++)c[u][C]+c[C][p]<c[u][p]&&(c[u][p]=c[u][C]+c[C][p],f[u][p]=f[u][C]);var b=[];for(u=0;u<s;u++)b.push(a[u].id());var x={distance:function(e,n){if(r.string(e))var i=t.filter(e)[0].id();else i=e.id();if(r.string(n))var o=t.filter(n)[0].id();else o=n.id();return c[l[i]][l[o]]},path:function(e,n){var i=function(e,n,r,i,o){if(e===n)return t.getElementById(i[e]);if(void 0!==r[e][n]){for(var a=[t.getElementById(i[e])],s=e;e!==n;){s=e,e=r[e][n];var l=o[s][e];a.push(l),a.push(t.getElementById(i[e]))}return a}};if(r.string(e))var o=t.filter(e)[0].id();else o=e.id();if(r.string(n))var a=t.filter(n)[0].id();else a=n.id();var s=i(l[o],l[a],f,b,h);return t.collection(s)}};return x}};t.exports=i},{"../../is":91}],11:[function(e,t,n){"use strict";var r=e("../../util"),i={};[e("./bfs-dfs"),e("./dijkstra"),e("./kruskal"),e("./a-star"),e("./floyd-warshall"),e("./bellman-ford"),e("./kerger-stein"),e("./page-rank"),e("./degree-centrality"),e("./closeness-centrality"),e("./betweenness-centrality")].forEach((function(e){r.extend(i,e)})),t.exports=i},{"../../util":108,"./a-star":3,"./bellman-ford":4,"./betweenness-centrality":5,"./bfs-dfs":6,"./closeness-centrality":7,"./degree-centrality":8,"./dijkstra":9,"./floyd-warshall":10,"./kerger-stein":12,"./kruskal":13,"./page-rank":14}],12:[function(e,t,n){"use strict";var r=e("../../util"),i={kargerStein:function(e){var t=this;e=e||{};var n=function(e,t,n){for(var r=n[e],i=r[1],o=r[2],a=t[i],s=t[o],l=n.filter((function(e){return!(t[e[1]]===a&&t[e[2]]===s||t[e[1]]===s&&t[e[2]]===a)})),u=0;u<l.length;u++){var c=l[u];c[1]===s?(l[u]=c.slice(0),l[u][1]=a):c[2]===s&&(l[u]=c.slice(0),l[u][2]=a)}for(u=0;u<t.length;u++)t[u]===s&&(t[u]=a);return l},i=function(e,t,r,o){if(r<=o)return t;var a=Math.floor(Math.random()*t.length),s=n(a,e,t);return i(e,s,r-1,o)},o=this._private.cy,a=this.edges().stdFilter((function(e){return!e.isLoop()})),s=this.nodes(),l=s.length,u=a.length,c=Math.ceil(Math.pow(Math.log(l)/Math.LN2,2)),d=Math.floor(l/Math.sqrt(2));if(!(l<2)){for(var p={},f=0;f<l;f++)p[s[f].id()]=f;var h=[];for(f=0;f<u;f++){var g=a[f];h.push([f,p[g.source().id()],p[g.target().id()]])}var v,m=1/0,y=[];for(f=0;f<l;f++)y.push(f);for(var C=0;C<=c;C++){var b=y.slice(0),x=i(b,h,l,d),S=b.slice(0),E=i(b,x,d,2),w=i(S,x,d,2);E.length<=w.length&&E.length<m?(m=E.length,v=[E,b]):w.length<=E.length&&w.length<m&&(m=w.length,v=[w,S])}var O=v[0].map((function(e){return a[e[0]]})),_=[],L=[],R=v[1][0];for(f=0;f<v[1].length;f++)v[1][f]===R?_.push(s[f]):L.push(s[f]);return{cut:t.spawn(o,O),partition1:t.spawn(_),partition2:t.spawn(L)}}r.error("At least 2 nodes are required for Karger-Stein algorithm")}};t.exports=i},{"../../util":108}],13:[function(e,t,n){"use strict";var r=e("../../is"),i={kruskal:function(e){function t(e){for(var t=0;t<o.length;t++){var n=o[t];if(n.anySame(e))return{eles:n,index:t}}}var n=this.cy();e=r.fn(e)?e:function(){return 1};for(var i=n.collection(n,[]),o=[],a=this.nodes(),s=0;s<a.length;s++)o.push(a[s].collection());var l=this.edges().toArray().sort((function(t,n){return e(t)-e(n)}));for(s=0;s<l.length;s++){var u=l[s],c=u.source()[0],d=u.target()[0],p=t(c),f=t(d);p.index!==f.index&&(i=i.add(u),o[p.index]=p.eles.add(f.eles),o.splice(f.index,1))}return a.add(i)}};t.exports=i},{"../../is":91}],14:[function(e,t,n){"use strict";var r=e("../../is"),i={pageRank:function(e){var t=function(e){for(var t=e.length,n=0,r=0;r<t;r++)n+=e[r];for(r=0;r<t;r++)e[r]=e[r]/n};if(null!=(e=e||{})&&null!=e.dampingFactor)var n=e.dampingFactor;else n=.8;if(null!=e&&null!=e.precision)var i=e.precision;else i=1e-6;if(null!=e&&null!=e.iterations)var o=e.iterations;else o=200;if(null!=e&&null!=e.weight&&r.fn(e.weight))var a=e.weight;else a=function(e){return 1};for(var s=this._private.cy,l=this.edges().stdFilter((function(e){return!e.isLoop()})),u=this.nodes(),c=u.length,d=l.length,p={},f=0;f<c;f++)p[u[f].id()]=f;var h=[],g=[],v=(1-n)/c;for(f=0;f<c;f++){for(var m=[],y=0;y<c;y++)m.push(0);h.push(m),g.push(0)}for(f=0;f<d;f++){var C=l[f],b=p[C.source().id()],x=p[C.target().id()],S=a(C);h[x][b]+=S,g[b]+=S}var E=1/c+v;for(y=0;y<c;y++)if(0===g[y])for(f=0;f<c;f++)h[f][y]=E;else for(f=0;f<c;f++)h[f][y]=h[f][y]/g[y]+v;var w,O=[],_=[];for(f=0;f<c;f++)O.push(1),_.push(0);for(var L=0;L<o;L++){var R=_.slice(0);for(f=0;f<c;f++)for(y=0;y<c;y++)R[f]+=h[f][y]*O[y];t(R),w=O,O=R;var D=0;for(f=0;f<c;f++)D+=Math.pow(w[f]-O[f],2);if(D<i)break}var N={rank:function(e){if(r.string(e))var t=s.filter(e)[0].id();else t=e.id();return O[p[t]]}};return N}};t.exports=i},{"../../is":91}],15:[function(e,t,n){"use strict";var r=e("../define"),i={animate:r.animate(),animation:r.animation(),animated:r.animated(),clearQueue:r.clearQueue(),delay:r.delay(),delayAnimation:r.delayAnimation(),stop:r.stop()};t.exports=i},{"../define":44}],16:[function(e,t,n){"use strict";var r=e("../util"),i={classes:function(e){e=(e||"").match(/\S+/g)||[];for(var t=this,n=[],i={},o=0;o<e.length;o++)i[e[o]]=!0;for(var a=0;a<t.length;a++){var s=t[a],l=s._private,u=l.classes,c=!1;for(o=0;o<e.length;o++)if(!(p=u[e[o]])){c=!0;break}if(!c)for(e=Object.keys(u),o=0;o<e.length;o++){var d=e[o],p=u[d],f=i[d];if(p&&!f){c=!0;break}}c&&(l.classes=r.copy(i),n.push(s))}return n.length>0&&this.spawn(n).updateStyle().trigger("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return!(null==t||!t._private.classes[e])},toggleClass:function(e,t){for(var n=e.match(/\S+/g)||[],r=this,i=[],o=0,a=r.length;o<a;o++)for(var s=r[o],l=!1,u=0;u<n.length;u++){var c=n[u],d=s._private.classes,p=d[c];t||void 0===t&&!p?(d[c]=!0,p||l||(i.push(s),l=!0)):(d[c]=!1,p&&!l&&(i.push(s),l=!0))}return i.length>0&&this.spawn(i).updateStyle().trigger("class"),r},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};t.exports=i},{"../util":108}],17:[function(e,t,n){"use strict";var r=(e("../is"),e("../selector")),i={allAre:function(e){var t=new r(e);return this.every((function(e){return t.matches(e)}))},is:function(e){var t=new r(e);return this.some((function(e){return t.matches(e)}))},some:function(e,t){for(var n=0;n<this.length;n++)if(t?e.apply(t,[this[n],n,this]):e(this[n],n,this))return!0;return!1},every:function(e,t){for(var n=0;n<this.length;n++)if(!(t?e.apply(t,[this[n],n,this]):e(this[n],n,this)))return!1;return!0},same:function(e){return e=this.cy().collection(e),this.length===e.length&&this.every((function(t){return e.hasElementWithId(t.id())}))},anySame:function(e){return e=this.cy().collection(e),this.some((function(t){return e.hasElementWithId(t.id())}))},allAreNeighbors:function(e){e=this.cy().collection(e);var t=this.neighborhood();return e.every((function(e){return t.hasElementWithId(e.id())}))},contains:function(e){e=this.cy().collection(e);var t=this;return e.every((function(e){return t.hasElementWithId(e.id())}))}};i.allAreNeighbours=i.allAreNeighbors,i.has=i.contains,t.exports=i},{"../is":91,"../selector":95}],18:[function(e,t,n){"use strict";var r={parent:function(e){var t=[];if(this._private.cy,1===this.length&&(r=this[0]._private.parent))return r;for(var n=0;n<this.length;n++){var r;(r=this[n]._private.parent)&&t.push(r)}return this.spawn(t,{unique:!0}).filter(e)},parents:function(e){for(var t=[],n=this.parent();n.nonempty();){for(var r=0;r<n.length;r++){var i=n[r];t.push(i)}n=n.parent()}return this.spawn(t,{unique:!0}).filter(e)},commonAncestors:function(e){for(var t,n=0;n<this.length;n++){var r=this[n].parents();t=(t=t||r).intersect(r)}return t.filter(e)},orphans:function(e){return this.stdFilter((function(e){return e.isOrphan()})).filter(e)},nonorphans:function(e){return this.stdFilter((function(e){return e.isChild()})).filter(e)},children:function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];t=t.concat(r._private.children)}return this.spawn(t,{unique:!0}).filter(e)},siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&0!==e._private.children.length},isChildless:function(){var e=this[0];if(e)return e.isNode()&&0===e._private.children.length},isChild:function(){var e=this[0];if(e)return e.isNode()&&null!=e._private.parent},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&null==e._private.parent},descendants:function(e){function t(e){for(var r=0;r<e.length;r++){var i=e[r];n.push(i),i.children().nonempty()&&t(i.children())}}var n=[];return t(this.children()),this.spawn(n,{unique:!0}).filter(e)}};r.ancestors=r.parents,t.exports=r},{}],19:[function(e,t,n){"use strict";var r,i,o=e("../define");r=i={data:o.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:o.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:o.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:o.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:o.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:o.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}},r.attr=r.data,r.removeAttr=r.removeData,t.exports=i},{"../define":44}],20:[function(e,t,n){"use strict";function r(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],o=i._private.edges,a=0;a<o.length;a++){var s=o[a];!t&&s.isLoop()||(r+=e(i,s))}return r}}}function i(e,t){return function(n){for(var r,i=this.nodes(),o=0;o<i.length;o++){var a=i[o][e](n);void 0===a||void 0!==r&&!t(a,r)||(r=a)}return r}}var o=e("../util"),a={};o.extend(a,{degree:r((function(e,t){return t.source().same(t.target())?2:1})),indegree:r((function(e,t){return t.target().same(e)?1:0})),outdegree:r((function(e,t){return t.source().same(e)?1:0}))}),o.extend(a,{minDegree:i("degree",(function(e,t){return e<t})),maxDegree:i("degree",(function(e,t){return e>t})),minIndegree:i("indegree",(function(e,t){return e<t})),maxIndegree:i("indegree",(function(e,t){return e>t})),minOutdegree:i("outdegree",(function(e,t){return e<t})),maxOutdegree:i("outdegree",(function(e,t){return e>t}))}),o.extend(a,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r<n.length;r++)t+=n[r].degree(e);return t}}),t.exports=a},{"../util":108}],21:[function(e,t,n){"use strict";function r(e){return{includeNodes:l.default(e.includeNodes,b.includeNodes),includeEdges:l.default(e.includeEdges,b.includeEdges),includeLabels:l.default(e.includeLabels,b.includeLabels),includeOverlays:l.default(e.includeOverlays,b.includeOverlays),useCache:l.default(e.useCache,b.useCache)}}var i,o,a=e("../define"),s=e("../is"),l=e("../util"),u=e("../math");i=o={position:a.data({field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"rtrigger",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()&&!e.isParent()}}),silentPosition:a.data({field:"position",bindingEvent:"position",allowBinding:!1,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!1,triggerFnName:"trigger",allowGetting:!1,validKeys:["x","y"],onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()&&!e.isParent()}}),positions:function(e,t){if(s.plainObject(e))t?this.silentPosition(e):this.position(e);else if(s.fn(e)){for(var n=e,r=0;r<this.length;r++){var i=this[r];if(!i.locked()&&!i.isParent()&&(e=n(i,r))){var o=i._private.position;o.x=e.x,o.y=e.y}}this.dirtyCompoundBoundsCache(),t?this.trigger("position"):this.rtrigger("position")}return this},silentPositions:function(e){return this.positions(e,!0)},renderedPosition:function(e,t){var n=this[0],r=this.cy(),i=r.zoom(),o=r.pan(),a=s.plainObject(e)?e:void 0,l=void 0!==a||void 0!==t&&s.string(e);if(n&&n.isNode()){if(!l){var u=n.position();return a={x:u.x*i+o.x,y:u.y*i+o.y},void 0===e?a:a[e]}for(var c=0;c<this.length;c++)n=this[c],void 0!==t?n.position(e,(t-o[e])/i):void 0!==a&&n.position({x:(a.x-o.x)/i,y:(a.y-o.y)/i})}else if(!l)return;return this},relativePosition:function(e,t){var n=this[0],r=this.cy(),i=s.plainObject(e)?e:void 0,o=void 0!==i||void 0!==t&&s.string(e),a=r.hasCompoundNodes();if(n&&n.isNode()){if(!o){var l=n.position(),u=f=(p=a?n.parent():null)&&p.length>0;f&&(p=p[0]);var c=u?p.position():{x:0,y:0};return i={x:l.x-c.x,y:l.y-c.y},void 0===e?i:i[e]}for(var d=0;d<this.length;d++){var p,f;n=this[d],u=f=(p=a?n.parent():null)&&p.length>0,f&&(p=p[0]),c=u?p.position():{x:0,y:0},void 0!==t?n.position(e,t+c[e]):void 0!==i&&n.position({x:i.x+c.x,y:i.y+c.y})}}else if(!o)return;return this},renderedBoundingBox:function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),o=t.x1*r+i.x,a=t.x2*r+i.x,s=t.y1*r+i.y,l=t.y2*r+i.y;return{x1:o,x2:a,y1:s,y2:l,w:a-o,h:l-s}},dirtyCompoundBoundsCache:function(){var e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;for(var t=this,n=[],r=0;r<t.length;r++)n.push(t[r]);for(;n.length>0;){var i=n.shift();i._private.compoundBoundsClean=!1,i.isParent()&&i.trigger("bounds"),i.isChild()&&n.push(i.parent())}return this},updateCompoundBounds:function(){function e(e){function t(e,t,n){var r=0,i=0,o=t+n;return e>0&&o>0&&(r=t/o*e,i=n/o*e),{biasDiff:r,biasComplementDiff:i}}function r(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}if(e.isParent()){var o=e._private,a=e.children(),s="include"===e.pstyle("compound-sizing-wrt-labels").value,l={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},u=a.boundingBox({includeLabels:s,includeOverlays:!1,useCache:!1}),c=o.position,d=l.width.left.value;"px"===l.width.left.units&&l.width.val>0&&(d=100*d/l.width.val);var p=l.width.right.value;"px"===l.width.right.units&&l.width.val>0&&(p=100*p/l.width.val);var f=l.height.top.value;"px"===l.height.top.units&&l.height.val>0&&(f=100*f/l.height.val);var h=l.height.bottom.value;"px"===l.height.bottom.units&&l.height.val>0&&(h=100*h/l.height.val);var g=t(l.width.val-u.w,d,p),v=g.biasDiff,m=g.biasComplementDiff,y=t(l.height.val-u.h,f,h),C=y.biasDiff,b=y.biasComplementDiff;o.autoPadding=r(u.w,u.h,i.pstyle("padding"),i.pstyle("padding-relative-to").value),o.autoWidth=Math.max(u.w,l.width.val),c.x=(-v+u.x1+u.x2+m)/2,o.autoHeight=Math.max(u.h,l.height.val),c.y=(-b+u.y1+u.y2+C)/2,n.push(e)}}var t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;for(var n=[],r=0;r<this.length;r++){var i=this[r],o=i._private;o.compoundBoundsClean||(e(i),t._private.batchingStyle||(o.compoundBoundsClean=!0))}return this}};var c=function(e){return e===1/0||e===-1/0?0:e},d=function(e,t,n,r,i){r-t!=0&&i-n!=0&&(e.x1=t<e.x1?t:e.x1,e.x2=r>e.x2?r:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=i>e.y2?i:e.y2)},p=function(e,t){return d(e,t.x1,t.y1,t.x2,t.y2)},f=function(e,t,n){return l.getPrefixedProperty(e,t,n)},h=function(e,t,n,r){var i,o,a=t._private.rstyle,s=a.arrowWidth/2;"none"!==t.pstyle(n+"-arrow-shape").value&&("source"===n?(i=a.srcX,o=a.srcY):"target"===n?(i=a.tgtX,o=a.tgtY):(i=a.midX,o=a.midY),d(e,i-s,o-s,i+s,o+s))},g=function(e,t,n,r){var i;i=n?n+"-":"";var o=t._private,a=o.rstyle;if(t.pstyle(i+"label").strValue){var s,l,u,c,p=t.pstyle("text-halign"),h=t.pstyle("text-valign"),g=f(a,"labelWidth",n),v=f(a,"labelHeight",n),m=f(a,"labelX",n),y=f(a,"labelY",n),C=t.pstyle(i+"text-margin-x").pfValue,b=t.pstyle(i+"text-margin-y").pfValue,x=t.isEdge(),S=t.pstyle(i+"text-rotation"),E=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,O=t.pstyle("text-background-padding").pfValue,_=v+2*O,L=g+2*O,R=L/2,D=_/2;if(x)s=m-R,l=m+R,u=y-D,c=y+D;else{switch(p.value){case"left":s=m-L,l=m;break;case"center":s=m-R,l=m+R;break;case"right":s=m,l=m+L}switch(h.value){case"top":u=y-_,c=y;break;case"center":u=y-D,c=y+D;break;case"bottom":u=y,c=y+_}}var N=x&&"autorotate"===S.strValue,M=null!=S.pfValue&&0!==S.pfValue;if(N||M){var I=N?f(o.rstyle,"labelAngle",n):S.pfValue,A=Math.cos(I),P=Math.sin(I),k=function(e,t){return{x:(e-=m)*A-(t-=y)*P+m,y:e*P+t*A+y}},T=k(s,u),V=k(s,c),B=k(l,u),z=k(l,c);s=Math.min(T.x,V.x,B.x,z.x),l=Math.max(T.x,V.x,B.x,z.x),u=Math.min(T.y,V.y,B.y,z.y),c=Math.max(T.y,V.y,B.y,z.y)}s+=C-Math.max(E,w),l+=C+Math.max(E,w),u+=b-Math.max(E,w),c+=b+Math.max(E,w),d(e,s,u,l,c)}return e},v=function(e,t){var n,r,i,o,a,s,l=e._private.cy._private.styleEnabled,p={x1:1/0,y1:1/0,x2:-1/0,y2:-1/0},f=e._private,v=l?e.pstyle("display").value:"element",m=e.isNode(),y=e.isEdge(),C="none"!==v;if(C){var b=0;l&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(b=e.pstyle("overlay-padding").value);var x=0;if(l&&(x=e.pstyle("width").pfValue/2),m&&t.includeNodes){var S=e.position();a=S.x,s=S.y;var E=e.outerWidth()/2,w=e.outerHeight()/2;d(p,n=a-E-b,i=s-w-b,r=a+E+b,o=s+w+b)}else if(y&&t.includeEdges){var O=f.rstyle||{};if(l&&(n=Math.min(O.srcX,O.midX,O.tgtX),r=Math.max(O.srcX,O.midX,O.tgtX),i=Math.min(O.srcY,O.midY,O.tgtY),o=Math.max(O.srcY,O.midY,O.tgtY),d(p,n-=x,i-=x,r+=x,o+=x)),l&&"haystack"===e.pstyle("curve-style").strValue){var _=O.haystackPts;if(n=_[0].x,i=_[0].y,n>(r=_[1].x)){var L=n;n=r,r=L}i>(o=_[1].y)&&(L=i,i=o,o=L),d(p,n-x,i-x,r+x,o+x)}else{for(var R=O.bezierPts||O.linePts||[],D=0;D<R.length;D++){var N=R[D];n=N.x-x,r=N.x+x,i=N.y-x,o=N.y+x,d(p,n,i,r,o)}if(0===R.length){var M=e.source().position(),I=e.target().position();(n=M.x)>(r=I.x)&&(L=n,n=r,r=L),(i=M.y)>(o=I.y)&&(L=i,i=o,o=L),d(p,n-=x,i-=x,r+=x,o+=x)}}}l&&(n=p.x1,r=p.x2,i=p.y1,o=p.y2,d(p,n-b,i-b,r+b,o+b)),l&&t.includeEdges&&y&&(h(p,e,"mid-source",t),h(p,e,"mid-target",t),h(p,e,"source",t),h(p,e,"target",t)),l&&t.includeLabels&&(g(p,e,null,t),y&&(g(p,e,"source",t),g(p,e,"target",t)))}return p.x1=c(p.x1),p.y1=c(p.y1),p.x2=c(p.x2),p.y2=c(p.y2),p.w=c(p.x2-p.x1),p.h=c(p.y2-p.y1),p.w>0&&p.h>0&&C&&u.expandBoundingBox(p,1),p},m=function(e){return e?"t":"f"},y=function(e){var t="";return t+=m(e.incudeNodes),t+=m(e.includeEdges),(t+=m(e.includeLabels))+m(e.includeOverlays)},C=function(e,t){var n,r=e._private,i=e.cy().headless(),o=t===b?x:y(t);return t.useCache&&!i&&r.bbCache&&r.bbCache[o]?n=r.bbCache[o]:(n=v(e,t),i||(r.bbCache=r.bbCache||{},r.bbCache[o]=n)),n},b={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeOverlays:!0,useCache:!0},x=y(b);o.recalculateRenderedStyle=function(e){var t=this.cy(),n=t.renderer(),r=t.styleEnabled();return n&&r&&n.recalculateRenderedStyle(this,e),this},o.boundingBox=function(e){if(1===this.length&&this[0]._private.bbCache&&(void 0===e||void 0===e.useCache||!0===e.useCache))return e=void 0===e?b:r(e),C(this[0],e);var t={x1:1/0,y1:1/0,x2:-1/0,y2:-1/0},n=r(e=e||l.staticEmptyObject()),i=this,o=i.cy().styleEnabled();o&&this.recalculateRenderedStyle(n.useCache),this.updateCompoundBounds();for(var a={},s=0;s<i.length;s++){var u=i[s];if(o&&u.isEdge()&&"bezier"===u.pstyle("curve-style").strValue&&!a[u.id()]){for(var d=u.parallelEdges(),f=0;f<d.length;f++)a[d[f].id()]=!0;d.recalculateRenderedStyle(n.useCache)}p(t,C(u,n))}return t.x1=c(t.x1),t.y1=c(t.y1),t.x2=c(t.x2),t.y2=c(t.y2),t.w=c(t.x2-t.x1),t.h=c(t.y2-t.y1),t},o.boundingBoxAt=function(e){var t=this.nodes();if(s.plainObject(e)){var n=e;e=function(){return n}}for(var r=0;r<t.length;r++){var i=(u=(l=t[r])._private).position,o=e.call(l,r,l);u.bbAtOldPos={x:i.x,y:i.y},o&&(i.x=o.x,i.y=o.y)}this.trigger("dirty"),t.dirtyCompoundBoundsCache().updateCompoundBounds();var a=this.boundingBox({useCache:!1});for(r=0;r<t.length;r++){var l,u=(l=t[r])._private,c=(i=l._private.position,u.bbAtOldPos);i.x=c.x,i.y=c.y}return t.dirtyCompoundBoundsCache(),this.trigger("dirty"),a};var S=function(e){e.uppercaseName=l.capitalize(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=l.capitalize(e.outerName),i[e.name]=function(){var t=this[0],n=t._private,r=n.cy._private.styleEnabled;if(t){if(!r)return 1;if(t.isParent())return t.updateCompoundBounds(),n[e.autoName]||0;var i=t.pstyle(e.name);return"label"===i.strValue?(t.recalculateRenderedStyle(),n.rstyle[e.labelName]||0):i.pfValue}},i["outer"+e.uppercaseName]=function(){var t=this[0],n=t._private.cy._private.styleEnabled;if(t)return n?t[e.name]()+t.pstyle("border-width").pfValue+2*t.padding():1},i["rendered"+e.uppercaseName]=function(){var t=this[0];if(t)return t[e.name]()*this.cy().zoom()},i["rendered"+e.uppercaseOuterName]=function(){var t=this[0];if(t)return t[e.outerName]()*this.cy().zoom()}};S({name:"width"}),S({name:"height"}),o.padding=function(){var e=this[0],t=e._private;return e.isParent()?(e.updateCompoundBounds(),void 0!==t.autoPadding?t.autoPadding:e.pstyle("padding").pfValue):e.pstyle("padding").pfValue},i.modelPosition=i.point=i.position,i.modelPositions=i.points=i.positions,i.renderedPoint=i.renderedPosition,i.relativePoint=i.relativePosition,i.boundingbox=i.boundingBox,i.renderedBoundingbox=i.renderedBoundingBox,t.exports=o},{"../define":44,"../is":91,"../math":93,"../util":108}],22:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=function(e,t,n){if(n=!(void 0!==n&&!n),void 0!==e&&void 0!==t&&i.core(e)){var o=t.group;if(null==o&&(o=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===o||"edges"===o){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:o,style:{},rstyle:{},styleCxts:[],removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,active:!1,classes:{},animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:null,traversalCache:{}};if(t.renderedPosition){var s=t.renderedPosition,l=e.pan(),u=e.zoom();a.position={x:(s.x-l.x)/u,y:(s.y-l.y)/u}}if(i.string(t.classes))for(var c=t.classes.split(/\s+/),d=0,p=c.length;d<p;d++){var f=c[d];f&&""!==f&&(a.classes[f]=!0)}(t.style||t.css)&&e.style().applyBypass(this,t.style||t.css),(void 0===n||n)&&this.restore()}else r.error("An element must be of type `nodes` or `edges`; you specified `"+o+"`")}else r.error("An element must have a core reference and parameters set")};t.exports=o},{"../is":91,"../util":108}],23:[function(e,t,n){"use strict";var r=e("../define"),i={on:r.on(),one:r.on({unbindSelfOnTrigger:!0}),once:r.on({unbindAllBindersOnTrigger:!0}),off:r.off(),trigger:r.trigger(),rtrigger:function(e,t){if(0!==this.length)return this.cy().notify({type:e,eles:this}),this.trigger(e,t),this}};r.eventAliasesOn(i),t.exports=i},{"../define":44}],24:[function(e,t,n){"use strict";var r=e("../is"),i=e("../selector"),o={nodes:function(e){return this.filter((function(e,t){return e.isNode()})).filter(e)},edges:function(e){return this.filter((function(e,t){return e.isEdge()})).filter(e)},filter:function(e,t){if(void 0===e)return this;if(r.string(e)||r.elementOrCollection(e))return new i(e).filter(this);if(r.fn(e)){for(var n=this.spawn(),o=this,a=0;a<o.length;a++){var s=o[a];(t?e.apply(t,[s,a,o]):e(s,a,o))&&n.merge(s)}return n}return this.spawn()},not:function(e){if(e){r.string(e)&&(e=this.filter(e));for(var t=[],n=e._private.map,i=0;i<this.length;i++){var o=this[i];n.has(o.id())||t.push(o)}return this.spawn(t)}return this},absoluteComplement:function(){return this._private.cy.mutableElements().not(this)},intersect:function(e){if(r.string(e)){var t=e;return this.filter(t)}for(var n=[],i=this,o=e,a=this.length<e.length,s=a?o._private.map:i._private.map,l=a?i:o,u=0;u<l.length;u++){var c=l[u]._private.data.id,d=s.get(c);d&&n.push(d.ele)}return this.spawn(n)},xor:function(e){var t=this._private.cy;r.string(e)&&(e=t.$(e));var n=[],i=this,o=e,a=function(e,t){for(var r=0;r<e.length;r++){var i=e[r],o=i._private.data.id;t.hasElementWithId(o)||n.push(i)}};return a(i,o),a(o,i),this.spawn(n)},diff:function(e){var t=this._private.cy;r.string(e)&&(e=t.$(e));var n=[],i=[],o=[],a=this,s=e,l=function(e,t,n){for(var r=0;r<e.length;r++){var i=e[r],a=i._private.data.id;t.hasElementWithId(a)?o.push(i):n.push(i)}};return l(a,s,n),l(s,a,i),{left:this.spawn(n,{unique:!0}),right:this.spawn(i,{unique:!0}),both:this.spawn(o,{unique:!0})}},add:function(e){var t=this._private.cy;if(!e)return this;if(r.string(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=[],o=0;o<this.length;o++)i.push(this[o]);var a=this._private.map;for(o=0;o<e.length;o++)!a.has(e[o].id())&&i.push(e[o]);return this.spawn(i)},merge:function(e){var t=this._private,n=t.cy;if(!e)return this;if(e&&r.string(e)){var i=e;e=n.mutableElements().filter(i)}for(var o=t.map,a=0;a<e.length;a++){var s,l=e[a],u=l._private.data.id;o.has(u)?(this[s=o.get(u).index]=l,o.set(u,{ele:l,index:s})):(this[s=this.length++]=l,o.set(u,{ele:l,index:s}))}return this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map,i=r.get(n);if(!i)return this;var o=i.index;this[o]=void 0,r.delete(n);var a=o===this.length-1;if(this.length>1&&!a){var s=this.length-1,l=this[s],u=l._private.data.id;this[s]=void 0,this[o]=l,r.set(u,{ele:l,index:o})}return this.length--,this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&r.string(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=0;i<e.length;i++)this.unmergeOne(e[i]);return this},map:function(e,t){for(var n=[],r=this,i=0;i<r.length;i++){var o=r[i],a=t?e.apply(t,[o,i,r]):e(o,i,r);n.push(a)}return n},reduce:function(e,t){for(var n=t,r=this,i=0;i<r.length;i++)n=e(n,r[i],i,r);return n},max:function(e,t){for(var n,r=-1/0,i=this,o=0;o<i.length;o++){var a=i[o],s=t?e.apply(t,[a,o,i]):e(a,o,i);s>r&&(r=s,n=a)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=this,o=0;o<i.length;o++){var a=i[o],s=t?e.apply(t,[a,o,i]):e(a,o,i);s<r&&(r=s,n=a)}return{value:r,ele:n}}},a=o;a.u=a["|"]=a["+"]=a.union=a.or=a.add,a["\\"]=a["!"]=a["-"]=a.difference=a.relativeComplement=a.subtract=a.not,a.n=a["&"]=a["."]=a.and=a.intersection=a.intersect,a["^"]=a["(+)"]=a["(-)"]=a.symmetricDifference=a.symdiff=a.xor,a.fnFilter=a.filterFn=a.stdFilter=a.filter,a.complement=a.abscomp=a.absoluteComplement,t.exports=o},{"../is":91,"../selector":95}],25:[function(e,t,n){"use strict";var r={isNode:function(){return"nodes"===this.group()},isEdge:function(){return"edges"===this.group()},isLoop:function(){return this.isEdge()&&this.source().id()===this.target().id()},isSimple:function(){return this.isEdge()&&this.source().id()!==this.target().id()},group:function(){var e=this[0];if(e)return e._private.group}};t.exports=r},{}],26:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../map"),a=e("../set"),s=e("./element"),l={generate:function(e,t,n){for(var i=null!=n?n:r.uuid();e.hasElementWithId(i);)i=r.uuid();return i}},u=function(e,t,n){if(void 0!==e&&i.core(e)){var u=new o,c=!1;if(t){if(t.length>0&&i.plainObject(t[0])&&!i.element(t[0])){c=!0;for(var d=[],p=new a,f=0,h=t.length;f<h;f++){var g=t[f];null==g.data&&(g.data={});var v=g.data;if(null==v.id)v.id=l.generate(e,g);else if(e.hasElementWithId(v.id)||p.has(v.id))continue;var m=new s(e,g,!1);d.push(m),p.add(v.id)}t=d}}else t=[];for(this.length=0,f=0,h=t.length;f<h;f++){var y=t[f];if(y){var C=y._private.data.id;(!n||n.unique&&!u.has(C))&&(u.set(C,{index:this.length,ele:y}),this[this.length]=y,this.length++)}}this._private={cy:e,map:u},c&&this.restore()}else r.error("A collection must have a reference to the core")},c=s.prototype=u.prototype;c.instanceString=function(){return"collection"},c.spawn=function(e,t,n){return i.core(e)||(n=t,t=e,e=this.cy()),new u(e,t,n)},c.spawnSelf=function(){return this.spawn(this)},c.cy=function(){return this._private.cy},c.element=function(){return this[0]},c.collection=function(){return i.collection(this)?this:new u(this._private.cy,[this])},c.unique=function(){return new u(this._private.cy,this,{unique:!0})},c.hasElementWithId=function(e){return this._private.map.has(e)},c.getElementById=function(e){var t=this._private.cy,n=this._private.map.get(e);return n?n.ele:new u(t)},c.poolIndex=function(){var e=this._private.cy._private.elements,t=this._private.data.id;return e._private.map.get(t).index},c.json=function(e){var t=this.element(),n=this.cy();if(null==t&&e)return this;if(null!=t){var o=t._private;if(i.plainObject(e)){n.startBatch(),e.data&&t.data(e.data),e.position&&t.position(e.position);var a=function(n,r,i){var a=e[n];null!=a&&a!==o[n]&&(a?t[r]():t[i]())};return a("removed","remove","restore"),a("selected","select","unselect"),a("selectable","selectify","unselectify"),a("locked","lock","unlock"),a("grabbable","grabify","ungrabify"),null!=e.classes&&t.classes(e.classes),n.endBatch(),this}if(void 0===e){var s={data:r.copy(o.data),position:r.copy(o.position),group:o.group,removed:o.removed,selected:o.selected,selectable:o.selectable,locked:o.locked,grabbable:o.grabbable,classes:null};return s.classes=Object.keys(o.classes).filter((function(e){return o.classes[e]})).join(" "),s}}},c.jsons=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t].json();e.push(n)}return e},c.clone=function(){for(var e=this.cy(),t=[],n=0;n<this.length;n++){var r=this[n].json(),i=new s(e,r,!1);t.push(i)}return new u(e,t)},c.copy=c.clone,c.restore=function(e){var t=this,n=t.cy(),a=n._private;void 0===e&&(e=!0);for(var s,c=[],d=[],p=0,f=t.length;p<f;p++)(P=t[p]).removed()&&(P.isNode()?c.push(P):d.push(P));s=c.concat(d);var h=function(){s.splice(p,1),p--};for(p=0;p<s.length;p++){var g=(P=s[p])._private,v=g.data;if(P.clearTraversalCache(),void 0===v.id)v.id=l.generate(n,P);else if(i.number(v.id))v.id=""+v.id;else{if(i.emptyString(v.id)||!i.string(v.id)){r.error("Can not create element with invalid string ID `"+v.id+"`"),h();continue}if(n.hasElementWithId(v.id)){r.error("Can not create second element with ID `"+v.id+"`"),h();continue}}var m=v.id;if(P.isNode()){var y=P,C=g.position;null==C.x&&(C.x=0),null==C.y&&(C.y=0)}if(P.isEdge()){for(var b=P,x=["source","target"],S=x.length,E=!1,w=0;w<S;w++){var O=x[w],_=v[O];i.number(_)&&(_=v[O]=""+v[O]),null==_||""===_?(r.error("Can not create edge `"+m+"` with unspecified "+O),E=!0):n.hasElementWithId(_)||(r.error("Can not create edge `"+m+"` with nonexistant "+O+" `"+_+"`"),E=!0)}if(E){h();continue}var L=n.getElementById(v.source),R=n.getElementById(v.target);L._private.edges.push(b),R._private.edges.push(b),b._private.source=L,b._private.target=R}g.map=new o,g.map.set(m,{ele:P,index:0}),g.removed=!1,n.addToPool(P)}for(p=0;p<c.length;p++){v=(y=c[p])._private.data,i.number(v.parent)&&(v.parent=""+v.parent);var D=v.parent;if(null!=D){var N=n.getElementById(D);if(N.empty())v.parent=void 0;else{for(var M=!1,I=N;!I.empty();){if(y.same(I)){M=!0,v.parent=void 0;break}I=I.parent()}M||(N[0]._private.children.push(y),y._private.parent=N[0],a.hasCompoundNodes=!0)}}}if(s.length>0){var A=new u(n,s);for(p=0;p<A.length;p++){var P;(P=A[p]).isNode()||(P.parallelEdges().clearTraversalCache(),P.source().clearTraversalCache(),P.target().clearTraversalCache())}(a.hasCompoundNodes?n.collection().merge(A).merge(A.connectedNodes()).merge(A.parent()):A).dirtyCompoundBoundsCache().updateStyle(e),e?A.rtrigger("add"):A.trigger("add")}return t},c.removed=function(){var e=this[0];return e&&e._private.removed},c.inside=function(){var e=this[0];return e&&!e._private.removed},c.remove=function(e){function t(e){for(var t=e._private.edges,n=0;n<t.length;n++)i(t[n])}function n(e){for(var t=e._private.children,n=0;n<t.length;n++)i(t[n])}function i(e){p[e.id()]||(p[e.id()]=!0,e.isNode()?(d.push(e),t(e),n(e)):d.unshift(e))}function o(e,t){var n=e._private.edges;r.removeFromArray(n,t),e.clearTraversalCache()}function a(e){e.parallelEdges().clearTraversalCache()}function s(e,t){t=t[0];var n=(e=e[0])._private.children,i=e.id();r.removeFromArray(n,t),v.ids[i]||(v.ids[i]=!0,v.push(e))}var l=this,c=[],d=[],p={},f=l._private.cy;void 0===e&&(e=!0);for(var h=0,g=l.length;h<g;h++)i(S=l[h]);var v=[];for(v.ids={},l.dirtyCompoundBoundsCache(),f.removeFromPool(d),h=0;h<d.length;h++)if((S=d[h])._private.removed=!0,c.push(S),S.isEdge()){var m=S.source()[0],y=S.target()[0];o(m,S),o(y,S),a(S)}else{var C=S.parent();0!==C.length&&s(C,S)}var b=f._private.elements;for(f._private.hasCompoundNodes=!1,h=0;h<b.length;h++)if((S=b[h]).isParent()){f._private.hasCompoundNodes=!0;break}var x=new u(this.cy(),c);for(x.size()>0&&(e&&this.cy().notify({type:"remove",eles:x}),x.trigger("remove")),h=0;h<v.length;h++){var S;(S=v[h]).removed()||S.updateStyle()}return new u(f,c)},c.move=function(e){var t=this._private.cy;if(void 0!==e.source||void 0!==e.target){var n=e.source,r=e.target,i=t.hasElementWithId(n),o=t.hasElementWithId(r);if(i||o){var a=this.jsons();this.remove();for(var s=0;s<a.length;s++){var l=a[s],u=this[s];"edges"===l.group&&(i&&(l.data.source=n),o&&(l.data.target=r),l.scratch=u._private.scratch)}return t.add(a)}}else if(void 0!==e.parent){var c=e.parent;if(null===c||t.hasElementWithId(c)){a=this.jsons();var d=this.descendants(),p=d.union(d.union(this).connectedEdges()).jsons();for(this.remove(),s=0;s<a.length;s++)l=a[s],u=this[s],"nodes"===l.group&&(l.data.parent=null===c?void 0:c,l.scratch=u._private.scratch);return t.add(a.concat(p))}}return this},[e("./algorithms"),e("./animation"),e("./class"),e("./comparators"),e("./compounds"),e("./data"),e("./degree"),e("./dimensions"),e("./events"),e("./filter"),e("./group"),e("./index"),e("./iteration"),e("./layout"),e("./style"),e("./switch-functions"),e("./traversing")].forEach((function(e){r.extend(c,e)})),t.exports=u},{"../is":91,"../map":92,"../set":96,"../util":108,"./algorithms":11,"./animation":15,"./class":16,"./comparators":17,"./compounds":18,"./data":19,"./degree":20,"./dimensions":21,"./element":22,"./events":23,"./filter":24,"./group":25,"./index":26,"./iteration":27,"./layout":28,"./style":29,"./switch-functions":30,"./traversing":31}],27:[function(e,t,n){"use strict";var r=e("../is"),i=e("./zsort"),o={forEach:function(e,t){if(r.fn(e))for(var n=0;n<this.length;n++){var i=this[n];if(!1===(t?e.apply(t,[i,n,this]):e(i,n,this)))break}return this},toArray:function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t]);return e},slice:function(e,t){var n=[],r=this.length;null==t&&(t=r),null==e&&(e=0),e<0&&(e=r+e),t<0&&(t=r+t);for(var i=e;i>=0&&i<t&&i<r;i++)n.push(this[i]);return this.spawn(n)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return 0===this.length},nonempty:function(){return!this.empty()},sort:function(e){if(!r.fn(e))return this;var t=this.toArray().sort(e);return this.spawn(t)},sortByZIndex:function(){return this.sort(i)},zDepth:function(){var e=this[0];if(e){var t=e._private;if("nodes"===t.group){var n=t.data.parent?e.parents().size():0;return e.isParent()?n:Number.MAX_SAFE_INTEGER-1}var r=t.source,i=t.target,o=r.zDepth(),a=i.zDepth();return Math.max(o,a,0)}}};o.each=o.forEach,t.exports=o},{"../is":91,"./zsort":32}],28:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../promise"),a=e("../math"),s={layoutDimensions:function(e){if(e.nodeDimensionsIncludeLabels){var t=this.boundingBox();return{w:t.w,h:t.h}}return{w:this.outerWidth(),h:this.outerHeight()}},layoutPositions:function(e,t,n){var s=this.nodes(),l=this.cy(),u=t.eles,c=i.memoize(n,(function(e,t){return e.id()+"$"+t}));e.trigger({type:"layoutstart",layout:e}),e.animations=[];var d=function(e,t,n){var r={x:t.x1+t.w/2,y:t.y1+t.h/2},i={x:(n.x-r.x)*e,y:(n.y-r.y)*e};return{x:r.x+i.x,y:r.y+i.y}},p=function(){for(var e=a.makeBoundingBox(),t=0;t<s.length;t++){var n=s[t],r=c(n,t);a.expandBoundingBoxByPoint(e,r.x,r.y)}return e};if(t.animate){for(var f=p(),h={},g=0;g<s.length;g++){var v=s[g],m=c(v,g),y=v.position();if(r.number(y.x)&&r.number(y.y)||v.silentPosition({x:0,y:0}),t.spacingFactor&&1!==t.spacingFactor){var C=Math.abs(t.spacingFactor);m=d(C,f,m)}h[v.id()]=m}for(g=0;g<s.length;g++){v=s[g],m=h[v.id()];var b=v.animation({position:m,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(b),b.play()}if(t.fit){var x=l.animation({fit:{boundingBox:u.boundingBoxAt((function(e,t){return h[t.id()]})),padding:t.padding},duration:t.animationDuration,easing:t.animationEasing});e.animations.push(x),x.play()}else if(void 0!==t.zoom&&void 0!==t.pan){var S=l.animation({zoom:t.zoom,pan:t.pan,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(S),S.play()}e.one("layoutready",t.ready),e.trigger({type:"layoutready",layout:e}),o.all(e.animations.map((function(e){return e.promise()}))).then((function(){e.one("layoutstop",t.stop),e.trigger({type:"layoutstop",layout:e})}))}else t.spacingFactor&&1!==t.spacingFactor?(C=Math.abs(t.spacingFactor),f=p(),s.positions((function(e,t){var n=c(e,t);return d(C,f,n)}))):s.positions(n),t.fit&&l.fit(t.eles,t.padding),null!=t.zoom&&l.zoom(t.zoom),t.pan&&l.pan(t.pan),e.one("layoutready",t.ready),e.trigger({type:"layoutready",layout:e}),e.one("layoutstop",t.stop),e.trigger({type:"layoutstop",layout:e});return this},layout:function(e){return this.cy().makeLayout(i.extend({},e,{eles:this}))}};s.createLayout=s.makeLayout=s.layout,t.exports=s},{"../is":91,"../math":93,"../promise":94,"../util":108}],29:[function(e,t,n){"use strict";function r(e){var t=e.ok,n=e.edgeOkViaNode||e.ok,r=e.parentOk||e.ok;return function(){var e=this.cy();if(!e.styleEnabled())return!0;var i=this[0],o=e.hasCompoundNodes();if(i){var a=i._private;if(!t(i))return!1;if(i.isNode()){if(o){var s=a.data.parent?i.parents():null;if(s)for(var l=0;l<s.length;l++){var u=s[l];if(!r(u))return!1}}return!0}return n(a.source)&&n(a.target)}}}var i=e("../is"),o={updateStyle:function(e){var t=this._private.cy;if(!t.styleEnabled())return this;if(t._private.batchingStyle)return t._private.batchStyleEles.merge(this),this;var n=t.hasCompoundNodes(),r=t.style(),i=this;e=!(!e&&void 0!==e),n&&(i=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var o=r.apply(i);return e?o.rtrigger("style"):o.trigger("style"),this},updateMappers:function(e){var t=this._private.cy,n=t.style();if(e=!(!e&&void 0!==e),!t.styleEnabled())return this;var r=n.updateMappers(this);return this.dirtyCompoundBoundsCache(e),e?r.rtrigger("style"):r.trigger("style"),this},parsedStyle:function(e){var t=this[0],n=t.cy();if(n.styleEnabled())return t?t._private.style[e]||n.style().getDefaultProperty(e):void 0},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,o=n.style();if(i.plainObject(e)){var a=e;o.applyBypass(this,a,r),this.dirtyCompoundBoundsCache(),this.rtrigger("style")}else if(i.string(e)){if(void 0===t)return(s=this[0])?o.getStylePropertyValue(s,e):void 0;o.applyBypass(this,e,t,r),this.dirtyCompoundBoundsCache(),this.rtrigger("style")}else if(void 0===e){var s;return(s=this[0])?o.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(void 0===e)for(var o=0;o<i.length;o++){var a=i[o];r.removeAllBypasses(a,n)}else for(e=e.split(/\s+/),o=0;o<i.length;o++)a=i[o],r.removeBypasses(a,e,n);return this.dirtyCompoundBoundsCache(),this.rtrigger("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var t=e.hasCompoundNodes(),n=this[0];if(n){var r=n._private,i=n.pstyle("opacity").value;if(!t)return i;var o=r.data.parent?n.parents():null;if(o)for(var a=0;a<o.length;a++)i*=o[a].pstyle("opacity").value;return i}},transparent:function(){if(!this.cy().styleEnabled())return!1;var e=this[0],t=e.cy().hasCompoundNodes();return e?t?0===e.effectiveOpacity():0===e.pstyle("opacity").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}},a=function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())};o.takesUpSpace=r({ok:a});var s=function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&a(e)},l=function(e){return"visible"===e.pstyle("visibility").value&&a(e)};o.interactive=r({ok:s,parentOk:l,edgeOkViaNode:a}),o.noninteractive=function(){var e=this[0];if(e)return!e.interactive()};var u=function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&a(e)},c=a;o.visible=r({ok:u,edgeOkViaNode:c}),o.hidden=function(){var e=this[0];if(e)return!e.visible()},o.bypass=o.css=o.style,o.renderedCss=o.renderedStyle,o.removeBypass=o.removeCss=o.removeStyle,o.pstyle=o.parsedStyle,t.exports=o},{"../is":91}],30:[function(e,t,n){"use strict";function r(e){return function(){var t=arguments,n=[];if(2===t.length){var r=t[0],i=t[1];this.on(e.event,r,i)}else if(1===t.length)i=t[0],this.on(e.event,i);else if(0===t.length){for(var o=0;o<this.length;o++){var a=this[o],s=!e.ableField||a._private[e.ableField],l=a._private[e.field]!=e.value;if(e.overrideAble){var u=e.overrideAble(a);if(void 0!==u&&(s=u,!u))return this}s&&(a._private[e.field]=e.value,l&&n.push(a))}var c=this.spawn(n);c.updateStyle(),c.trigger(e.event)}return this}}function i(e){o[e.field]=function(){var t=this[0];if(t){if(e.overrideField){var n=e.overrideField(t);if(void 0!==n)return n}return t._private[e.field]}},o[e.on]=r({event:e.on,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!0}),o[e.off]=r({event:e.off,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!1})}var o={};i({field:"locked",overrideField:function(e){return!!e.cy().autolock()||void 0},on:"lock",off:"unlock"}),i({field:"grabbable",overrideField:function(e){return!e.cy().autoungrabify()&&void 0},on:"grabify",off:"ungrabify"}),i({field:"selected",ableField:"selectable",overrideAble:function(e){return!e.cy().autounselectify()&&void 0},on:"select",off:"unselect"}),i({field:"selectable",overrideField:function(e){return!e.cy().autounselectify()&&void 0},on:"selectify",off:"unselectify"}),o.deselect=o.unselect,o.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},i({field:"active",on:"activate",off:"unactivate"}),o.inactive=function(){var e=this[0];if(e)return!e._private.active},t.exports=o},{}],31:[function(e,t,n){"use strict";function r(e){return function(t){for(var n=[],r=0;r<this.length;r++){var i=this[r]._private[e.attr];i&&n.push(i)}return this.spawn(n,{unique:!0}).filter(t)}}function i(e){return function(t){var n=[],r=this._private.cy,i=e||{};s.string(t)&&(t=r.$(t));for(var o=0;o<t.length;o++)for(var a=t[o]._private.edges,l=0;l<a.length;l++){var u=a[l],c=u._private.data,d=this.hasElementWithId(c.source)&&t.hasElementWithId(c.target),p=t.hasElementWithId(c.source)&&this.hasElementWithId(c.target);if(d||p){if(i.thisIsSrc||i.thisIsTgt){if(i.thisIsSrc&&!d)continue;if(i.thisIsTgt&&!p)continue}n.push(u)}}return this.spawn(n,{unique:!0})}}function o(e){var t={codirected:!1};return e=a.extend({},t,e),function(t){for(var n=[],r=this.edges(),i=e,o=0;o<r.length;o++)for(var a=r[o]._private,s=a.source,l=s._private.data.id,u=a.data.target,c=s._private.edges,d=0;d<c.length;d++){var p=c[d],f=p._private.data,h=f.target,g=f.source,v=h===u&&g===l,m=l===h&&u===g;(i.codirected&&v||!i.codirected&&(v||m))&&n.push(p)}return this.spawn(n,{unique:!0}).filter(t)}}var a=e("../util"),s=e("../is"),l={},u=function(e,t){return function(n,r,i,o){var a,l=n,u=this;if(null==l?a="null":s.elementOrCollection(l)&&1===l.length&&(a="#"+l.id()),1===u.length&&a){var c=u[0]._private,d=c.traversalCache=c.traversalCache||{},p=d[t]=d[t]||{},f=p[a];return f||(p[a]=e.call(u,n,r,i,o))}return e.call(u,n,r,i,o)}},c=function(e){return function(t){for(var n=this,r=[],i=0;i<n.length;i++){var o=n[i];if(o.isNode()){for(var a=!1,s=o.connectedEdges(),l=0;l<s.length;l++){var u=s[l],c=u.source(),d=u.target();if(e.noIncomingEdges&&d===o&&c!==o||e.noOutgoingEdges&&c===o&&d!==o){a=!0;break}}a||r.push(o)}}return this.spawn(r,{unique:!0}).filter(t)}},d=function(e){return function(t){for(var n=this,r=[],i=0;i<n.length;i++){var o=n[i];if(o.isNode())for(var a=o.connectedEdges(),s=0;s<a.length;s++){var l=a[s],u=l.source(),c=l.target();e.outgoing&&u===o?(r.push(l),r.push(c)):e.incoming&&c===o&&(r.push(l),r.push(u))}}return this.spawn(r,{unique:!0}).filter(t)}},p=function(e){return function(t){for(var n=this,r=[],i={};;){var o=e.outgoing?n.outgoers():n.incomers();if(0===o.length)break;for(var a=!1,s=0;s<o.length;s++){var l=o[s],u=l.id();i[u]||(i[u]=!0,r.push(l),a=!0)}if(!a)break;n=o}return this.spawn(r,{unique:!0}).filter(t)}};l.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},a.extend(l,{roots:c({noIncomingEdges:!0}),leaves:c({noOutgoingEdges:!0}),outgoers:u(d({outgoing:!0}),"outgoers"),successors:p({outgoing:!0}),incomers:u(d({incoming:!0}),"incomers"),predecessors:p({incoming:!0})}),a.extend(l,{neighborhood:u((function(e){for(var t=[],n=this.nodes(),r=0;r<n.length;r++)for(var i=n[r],o=i.connectedEdges(),a=0;a<o.length;a++){var s=o[a],l=s.source(),u=s.target(),c=i===l?u:l;c.length>0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,{unique:!0}).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),l.neighbourhood=l.neighborhood,l.closedNeighbourhood=l.closedNeighborhood,l.openNeighbourhood=l.openNeighborhood,a.extend(l,{source:u((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:u((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:r({attr:"source"}),targets:r({attr:"target"})}),a.extend(l,{edgesWith:u(i(),"edgesWith",!0),edgesTo:u(i({thisIsSrc:!0}),"edgesTo",!0)}),a.extend(l,{connectedEdges:u((function(e){for(var t=[],n=this,r=0;r<n.length;r++){var i=n[r];if(i.isNode())for(var o=i._private.edges,a=0;a<o.length;a++){var s=o[a];t.push(s)}}return this.spawn(t,{unique:!0}).filter(e)}),"connectedEdges"),connectedNodes:u((function(e){for(var t=[],n=this,r=0;r<n.length;r++){var i=n[r];i.isEdge()&&(t.push(i.source()[0]),t.push(i.target()[0]))}return this.spawn(t,{unique:!0}).filter(e)}),"connectedNodes"),parallelEdges:u(o(),"parallelEdges"),codirectedEdges:u(o({codirected:!0}),"codirectedEdges")}),a.extend(l,{components:function(){var e=this,t=e.cy(),n=e.spawn(),r=e.nodes().spawnSelf(),i=[],o=function(e,t){n.merge(e),r.unmerge(e),t.merge(e)};if(r.empty())return e.spawn();do{var a=t.collection();i.push(a);var s=r[0];o(s,a),e.bfs({directed:!1,roots:s,visit:function(e,t,n,r,i){o(e,a)}})}while(r.length>0);return i.map((function(e){var t=e.connectedEdges().stdFilter((function(t){return e.anySame(t.source())&&e.anySame(t.target())}));return e.union(t)}))}}),t.exports=l},{"../is":91,"../util":108}],32:[function(e,t,n){"use strict";var r=function(e,t){function n(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?i?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?Number.MAX_SAFE_INTEGER:0}function r(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}var i=e.cy().hasCompoundNodes(),o=n(e)-n(t);if(0!==o)return o;var a=r(e)-r(t);if(0!==a)return a;var s=e.pstyle("z-index").value-t.pstyle("z-index").value;return 0!==s?s:e.poolIndex()-t.poolIndex()};t.exports=r},{}],33:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../collection"),a=e("../collection/element"),s={add:function(e){var t,n=this;if(r.elementOrCollection(e)){var s=e;if(s._private.cy===n)t=s.restore();else{for(var l=[],u=0;u<s.length;u++){var c=s[u];l.push(c.json())}t=new o(n,l)}}else if(r.array(e))t=new o(n,l=e);else if(r.plainObject(e)&&(r.array(e.nodes)||r.array(e.edges))){for(var d=e,p=(l=[],["nodes","edges"]),f=(u=0,p.length);u<f;u++){var h=p[u],g=d[h];if(r.array(g))for(var v=0,m=g.length;v<m;v++){var y=i.extend({group:h},g[v]);l.push(y)}}t=new o(n,l)}else t=new a(n,y=e).collection();return t},remove:function(e){if(r.elementOrCollection(e));else if(r.string(e)){var t=e;e=this.$(t)}return e.remove()}};t.exports=s},{"../collection":26,"../collection/element":22,"../is":91,"../util":108}],34:[function(e,t,n){"use strict";var r=e("../define"),i=e("../util"),o=e("../is"),a={animate:r.animate(),animation:r.animation(),animated:r.animated(),clearQueue:r.clearQueue(),delay:r.delay(),delayAnimation:r.delayAnimation(),stop:r.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){function e(){d._private.animationsRunning&&i.requestAnimationFrame((function(n){t(n),e()}))}function t(e){function t(t,i){var a=t._private,s=a.animation.current,l=a.animation.queue,u=!1;if(!i&&"none"===t.pstyle("display").value){s=s.splice(0,s.length).concat(l.splice(0,l.length));for(var c=0;c<s.length;c++)s[c].stop()}if(0===s.length){var d=l.shift();d&&s.push(d)}var p=function(e){for(var t=e.length-1;t>=0;t--)(0,e[t])();e.splice(0,e.length)};for(c=s.length-1;c>=0;c--){var f=s[c],h=f._private;h.stopped?(s.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,p(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||n(t,f,e),r(t,f,e,i),h.applying&&(h.applying=!1),p(h.frames),f.completed()&&(s.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,p(h.completes)),u=!0)}return i||0!==s.length||0!==l.length||o.push(t),u}for(var i=d._private.aniEles,o=[],a=!1,s=0;s<i.length;s++){var l=t(i[s]);a=a||l}var u=t(d,!0);(a||u)&&(i.length>0?(i.dirtyCompoundBoundsCache(),d.notify({type:"draw",eles:i})):d.notify({type:"draw"})),i.unmerge(o),d.trigger("step")}function n(e,t,n){var r=o.core(e),i=!r,a=e,s=t._private;if(i){var l=a.position();s.startPosition=s.startPosition||{x:l.x,y:l.y},s.startStyle=s.startStyle||p.getAnimationStartStyle(a,s.style)}if(r){var u=d._private.pan;s.startPan=s.startPan||{x:u.x,y:u.y},s.startZoom=null!=s.startZoom?s.startZoom:d._private.zoom}s.started=!0,s.startTime=n-s.progress*s.duration}function r(e,t,n,r){var i=!r,s=e._private,l=t._private,u=l.easing,d=l.startTime;if(!l.easingImpl)if(null==u)l.easingImpl=g.linear;else{var f,h;f=o.string(u)?p.parse("transition-timing-function",u).value:u,o.string(f)?(M=f,h=[]):(M=f[1],h=f.slice(2).map((function(e){return+e}))),h.length>0?("spring"===M&&h.push(l.duration),l.easingImpl=g[M].apply(null,h)):l.easingImpl=g[M]}var v,m=l.easingImpl;if(v=0===l.duration?1:(n-d)/l.duration,l.applying&&(v=l.progress),v<0?v=0:v>1&&(v=1),null==l.delay){var y=l.startPosition,C=l.position;if(C&&i){var b=e.position();a(y.x,C.x)&&(b.x=c(y.x,C.x,v,m)),a(y.y,C.y)&&(b.y=c(y.y,C.y,v,m)),e.trigger("position")}var x=l.startPan,S=l.pan,E=s.pan,w=null!=S&&r;w&&(a(x.x,S.x)&&(E.x=c(x.x,S.x,v,m)),a(x.y,S.y)&&(E.y=c(x.y,S.y,v,m)),e.trigger("pan"));var O=l.startZoom,_=l.zoom,L=null!=_&&r;L&&(a(O,_)&&(s.zoom=c(O,_,v,m)),e.trigger("zoom")),(w||L)&&e.trigger("viewport");var R=l.style;if(R&&R.length>0&&i){for(var D=0;D<R.length;D++){var N=R[D],M=N.name,I=N,A=c(l.startStyle[M],I,v,m);p.overrideBypass(e,M,A)}e.trigger("style")}}return l.progress=v,v}function a(e,t){return!(null==e||null==t||!(o.number(e)&&o.number(t)||e&&t))}function s(e,t,n){var r=1-n,i=n*n;return 3*r*r*n*e+3*r*i*t+i*n}function l(e,t){return function(n,r,i){return n+(r-n)*s(e,t,i)}}function u(e,t,n,r,i){var o=i(t,n,r);return null==e||((e.roundValue||e.color)&&(o=Math.round(o)),void 0!==e.min&&(o=Math.max(o,e.min)),void 0!==e.max&&(o=Math.min(o,e.max))),o}function c(e,t,n,r){var i,a,s=null!=e.name?p.properties[e.name]:null,l=null!=s?s.type:null;if(n<0?n=0:n>1&&(n=1),i=null!=e.pfValue||null!=e.value?null!=e.pfValue?e.pfValue:e.value:e,a=null!=t.pfValue||null!=t.value?null!=t.pfValue?t.pfValue:t.value:t,o.number(i)&&o.number(a))return u(l,i,a,n,r);if(o.array(i)&&o.array(a)){for(var c=[],d=0;d<a.length;d++){var f=i[d],h=a[d];if(null!=f&&null!=h){var g=u(l,f,h,n,r);c.push(g)}else c.push(h)}return c}}var d=this;if(d._private.animationsRunning=!0,d.styleEnabled()){var p=d.style(),f=d.renderer();f&&f.beforeRender?f.beforeRender((function(e,n){t(n)}),f.beforeRenderPriorities.animations):e();var h=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},o=t(n,.5*r,i),a=t(n,.5*r,o),s=t(n,r,a),l=1/6*(i.dx+2*(o.dx+a.dx)+s.dx),u=1/6*(i.dv+2*(o.dv+a.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,i){var o,a,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1e-4,p=.016;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,l.tension=t,l.friction=r,a=(o=null!==i)?(c=e(t,r))/i*p:p;s=n(s||l,a),u.push(1+s.x),c+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return o?function(e){return u[e*(u.length-1)|0]}:c}}(),g={linear:function(e,t,n){return e+(t-e)*n},ease:l(.25,.1,.25,1),"ease-in":l(.42,0,1,1),"ease-out":l(0,0,.58,1),"ease-in-out":l(.42,0,.58,1),"ease-in-sine":l(.47,0,.745,.715),"ease-out-sine":l(.39,.575,.565,1),"ease-in-out-sine":l(.445,.05,.55,.95),"ease-in-quad":l(.55,.085,.68,.53),"ease-out-quad":l(.25,.46,.45,.94),"ease-in-out-quad":l(.455,.03,.515,.955),"ease-in-cubic":l(.55,.055,.675,.19),"ease-out-cubic":l(.215,.61,.355,1),"ease-in-out-cubic":l(.645,.045,.355,1),"ease-in-quart":l(.895,.03,.685,.22),"ease-out-quart":l(.165,.84,.44,1),"ease-in-out-quart":l(.77,0,.175,1),"ease-in-quint":l(.755,.05,.855,.06),"ease-out-quint":l(.23,1,.32,1),"ease-in-out-quint":l(.86,0,.07,1),"ease-in-expo":l(.95,.05,.795,.035),"ease-out-expo":l(.19,1,.22,1),"ease-in-out-expo":l(1,0,0,1),"ease-in-circ":l(.6,.04,.98,.335),"ease-out-circ":l(.075,.82,.165,1),"ease-in-out-circ":l(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return g.linear;var r=h(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":function(e,t,n,r){return l(e,t,n,r)}}}}};t.exports=a},{"../define":44,"../is":91,"../util":108}],35:[function(e,t,n){"use strict";var r=e("../define"),i={on:r.on(),one:r.on({unbindSelfOnTrigger:!0}),once:r.on({unbindAllBindersOnTrigger:!0}),off:r.off(),trigger:r.trigger()};r.eventAliasesOn(i),t.exports=i},{"../define":44}],36:[function(e,t,n){"use strict";var r={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};r.jpeg=r.jpg,t.exports=r},{}],37:[function(e,t,n){"use strict";var r=e("../window"),i=e("../util"),o=e("../collection"),a=e("../is"),s=e("../promise"),l=e("../define"),u=function(e){var t=this,n=(e=i.extend({},e)).container;n&&!a.htmlElement(n)&&a.htmlElement(n[0])&&(n=n[0]);var l=n?n._cyreg:null;(l=l||{})&&l.cy&&(l.cy.destroy(),l={});var u=l.readies=l.readies||[];n&&(n._cyreg=l),l.cy=t;var c=void 0!==r&&void 0!==n&&!e.headless,d=e;d.layout=i.extend({name:c?"grid":"null"},d.layout),d.renderer=i.extend({name:c?"canvas":"null"},d.renderer);var p=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},f=this._private={container:n,ready:!1,options:d,elements:new o(this),listeners:[],aniEles:new o(this),scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:p(!0,d.zoomingEnabled),userZoomingEnabled:p(!0,d.userZoomingEnabled),panningEnabled:p(!0,d.panningEnabled),userPanningEnabled:p(!0,d.userPanningEnabled),boxSelectionEnabled:p(!0,d.boxSelectionEnabled),autolock:p(!1,d.autolock,d.autolockNodes),autoungrabify:p(!1,d.autoungrabify,d.autoungrabifyNodes),autounselectify:p(!1,d.autounselectify),styleEnabled:void 0===d.styleEnabled?c:d.styleEnabled,zoom:a.number(d.zoom)?d.zoom:1,pan:{x:a.plainObject(d.pan)&&a.number(d.pan.x)?d.pan.x:0,y:a.plainObject(d.pan)&&a.number(d.pan.y)?d.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1},h=d.selectionType;f.selectionType=void 0===h||"additive"!==h&&"single"!==h?"single":h,a.number(d.minZoom)&&a.number(d.maxZoom)&&d.minZoom<d.maxZoom?(f.minZoom=d.minZoom,f.maxZoom=d.maxZoom):a.number(d.minZoom)&&void 0===d.maxZoom?f.minZoom=d.minZoom:a.number(d.maxZoom)&&void 0===d.minZoom&&(f.maxZoom=d.maxZoom);var g=function(e,t){return e.some(a.promise)?s.all(e).then(t):void t(e)};t.initRenderer(i.extend({hideEdgesOnViewport:d.hideEdgesOnViewport,textureOnViewport:d.textureOnViewport,wheelSensitivity:a.number(d.wheelSensitivity)&&d.wheelSensitivity>0?d.wheelSensitivity:1,motionBlur:void 0!==d.motionBlur&&d.motionBlur,motionBlurOpacity:void 0===d.motionBlurOpacity?.05:d.motionBlurOpacity,pixelRatio:a.number(d.pixelRatio)&&d.pixelRatio>0?d.pixelRatio:void 0,desktopTapThreshold:void 0===d.desktopTapThreshold?4:d.desktopTapThreshold,touchTapThreshold:void 0===d.touchTapThreshold?8:d.touchTapThreshold},d.renderer));var v=function(e,n,r){t.notifications(!1);var o=t.mutableElements();o.length>0&&o.remove(),null!=e&&(a.plainObject(e)||a.array(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.trigger(e),t.notify({type:"load",eles:t.mutableElements()}),t.one("load",n),t.trigger("load")})).one("layoutstop",(function(){t.one("done",r),t.trigger("done")}));var s=i.extend({},t._private.options.layout);s.eles=t.elements(),t.layout(s).run()};g([d.style,d.elements],(function(e){var n=e[0],r=e[1];f.styleEnabled&&t.setStyle(n),v(r,(function(){t.startAnimationLoop(),f.ready=!0,a.fn(d.ready)&&t.on("ready",d.ready);for(var e=0;e<u.length;e++){var n=u[e];t.on("ready",n)}l&&(l.readies=[]),t.trigger("ready")}),d.done)}))},c=u.prototype;i.extend(c,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},isDestroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.trigger("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.isDestroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.trigger("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},selectionType:function(){return this._private.selectionType},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return"null"===this._private.options.renderer.name},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container},options:function(){return i.copy(this._private.options)},json:function(e){var t=this,n=t._private,r=t.mutableElements();if(a.plainObject(e)){if(t.startBatch(),e.elements){var o={},s=function(e,n){for(var r=0;r<e.length;r++){var a=e[r],s=a.data.id,l=t.getElementById(s);o[s]=!0,0!==l.length?l.json(a):n?t.add(i.extend({group:n},a)):t.add(a)}};if(a.array(e.elements))s(e.elements);else for(var l=["nodes","edges"],u=0;u<l.length;u++){var c=l[u],d=e.elements[c];a.array(d)&&s(d,c)}r.stdFilter((function(e){return!o[e.id()]})).remove()}e.style&&t.style(e.style),null!=e.zoom&&e.zoom!==n.zoom&&t.zoom(e.zoom),e.pan&&(e.pan.x===n.pan.x&&e.pan.y===n.pan.y||t.pan(e.pan));var p=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify"];for(u=0;u<p.length;u++){var f=p[u];null!=e[f]&&t[f](e[f])}return t.endBatch(),this}if(void 0===e){var h={elements:{}};return r.forEach((function(e){var t=e.group();h.elements[t]||(h.elements[t]=[]),h.elements[t].push(e.json())})),this._private.styleEnabled&&(h.style=t.style().json()),h.zoomingEnabled=t._private.zoomingEnabled,h.userZoomingEnabled=t._private.userZoomingEnabled,h.zoom=t._private.zoom,h.minZoom=t._private.minZoom,h.maxZoom=t._private.maxZoom,h.panningEnabled=t._private.panningEnabled,h.userPanningEnabled=t._private.userPanningEnabled,h.pan=i.copy(t._private.pan),h.boxSelectionEnabled=t._private.boxSelectionEnabled,h.renderer=i.copy(t._private.options.renderer),h.hideEdgesOnViewport=t._private.options.hideEdgesOnViewport,h.textureOnViewport=t._private.options.textureOnViewport,h.wheelSensitivity=t._private.options.wheelSensitivity,h.motionBlur=t._private.options.motionBlur,h}},scratch:l.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0}),removeScratch:l.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0})}),c.$id=c.getElementById,[e("./add-remove"),e("./animation"),e("./events"),e("./export"),e("./layout"),e("./notification"),e("./renderer"),e("./search"),e("./style"),e("./viewport")].forEach((function(e){i.extend(c,e)})),t.exports=u},{"../collection":26,"../define":44,"../is":91,"../promise":94,"../util":108,"../window":116,"./add-remove":33,"./animation":34,"./events":35,"./export":36,"./layout":38,"./notification":39,"./renderer":40,"./search":41,"./style":42,"./viewport":43}],38:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n,o=e.name,a=t.extension("layout",o);if(null!=a)return n=i.string(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new a(r.extend({},e,{cy:t,eles:n}));r.error("Can not apply layout: No such layout `"+o+"` found; did you include its JS file?")}else r.error("A `name` must be specified to make a layout");else r.error("Layout options must be specified to make a layout")}};o.createLayout=o.makeLayout=o.layout,t.exports=o},{"../is":91,"../util":108}],39:[function(e,t,n){"use strict";var r={notify:function(e){var t=this._private;if(t.batchingNotify){var n=t.batchNotifyEles,r=t.batchNotifyTypes;return e.eles&&n.merge(e.eles),void(r.ids[e.type]||(r.push(e.type),r.ids[e.type]=!0))}if(t.notificationsEnabled){var i=this.renderer();!this.isDestroyed()&&i&&i.notify(e)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:void(t.notificationsEnabled=!!e)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchingStyle=e.batchingNotify=!0,e.batchStyleEles=this.collection(),e.batchNotifyEles=this.collection(),e.batchNotifyTypes=[],e.batchNotifyTypes.ids={}),e.batchCount++,this},endBatch:function(){var e=this._private;return e.batchCount--,0===e.batchCount&&(e.batchingStyle=!1,e.batchStyleEles.updateStyle(),e.batchingNotify=!1,this.notify({type:e.batchNotifyTypes,eles:e.batchNotifyEles})),this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r<n.length;r++){var i=n[r],o=e[i];t.getElementById(i).data(o)}}))}};t.exports=r},{}],40:[function(e,t,n){"use strict";var r=e("../util"),i={renderTo:function(e,t,n,r){return this._private.renderer.renderTo(e,t,n,r),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify({type:"draw"}),this},resize:function(){return this.invalidateSize(),this.notify({type:"resize"}),this.trigger("resize"),this},initRenderer:function(e){var t=this,n=t.extension("renderer",e.name);if(null!=n){var i=r.extend({},e,{cy:t});t._private.renderer=new n(i)}else r.error("Can not initialise: No such renderer `%s` found; did you include its JS file?",e.name)},destroyRenderer:function(){var e=this;e.notify({type:"destroy"});var t=e.container();if(t)for(t._cyreg=null;t.childNodes.length>0;)t.removeChild(t.childNodes[0]);e._private.renderer=null},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};i.invalidateDimensions=i.resize,t.exports=i},{"../util":108}],41:[function(e,t,n){"use strict";var r=e("../is"),i=e("../collection"),o={collection:function(e,t){return r.string(e)?this.$(e):r.elementOrCollection(e)?e.collection():r.array(e)?new i(this,e,t):new i(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};o.elements=o.filter=o.$,t.exports=o},{"../collection":26,"../is":91}],42:[function(e,t,n){"use strict";var r=e("../is"),i=e("../style"),o={style:function(e){return e&&this.setStyle(e).update(),this._private.style},setStyle:function(e){var t=this._private;return r.stylesheet(e)?t.style=e.generateStyle(this):r.array(e)?t.style=i.fromJson(this,e):r.string(e)?t.style=i.fromString(this,e):t.style=i(this),t.style}};t.exports=o},{"../is":91,"../style":101}],43:[function(e,t,n){"use strict";var r=e("../is"),i=e("../window"),o={autolock:function(e){return void 0===e?this._private.autolock:(this._private.autolock=!!e,this)},autoungrabify:function(e){return void 0===e?this._private.autoungrabify:(this._private.autoungrabify=!!e,this)},autounselectify:function(e){return void 0===e?this._private.autounselectify:(this._private.autounselectify=!!e,this)},panningEnabled:function(e){return void 0===e?this._private.panningEnabled:(this._private.panningEnabled=!!e,this)},userPanningEnabled:function(e){return void 0===e?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!e,this)},zoomingEnabled:function(e){return void 0===e?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!e,this)},userZoomingEnabled:function(e){return void 0===e?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!e,this)},boxSelectionEnabled:function(e){return void 0===e?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!e,this)},pan:function(){var e,t,n,i,o,a=arguments,s=this._private.pan;switch(a.length){case 0:return s;case 1:if(r.string(a[0]))return s[e=a[0]];if(r.plainObject(a[0])){if(!this._private.panningEnabled)return this;i=(n=a[0]).x,o=n.y,r.number(i)&&(s.x=i),r.number(o)&&(s.y=o),this.trigger("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=a[0],t=a[1],"x"!==e&&"y"!==e||!r.number(t)||(s[e]=t),this.trigger("pan viewport")}return this.notify({type:"viewport"}),this},panBy:function(e){var t,n,i,o,a,s=arguments,l=this._private.pan;if(!this._private.panningEnabled)return this;switch(s.length){case 1:r.plainObject(s[0])&&(o=(i=s[0]).x,a=i.y,r.number(o)&&(l.x+=o),r.number(a)&&(l.y+=a),this.trigger("pan viewport"));break;case 2:t=s[0],n=s[1],"x"!==t&&"y"!==t||!r.number(n)||(l[t]+=n),this.trigger("pan viewport")}return this.notify({type:"viewport"}),this},fit:function(e,t){var n=this.getFitViewport(e,t);if(n){var r=this._private;r.zoom=n.zoom,r.pan=n.pan,this.trigger("pan zoom viewport"),this.notify({type:"viewport"})}return this},getFitViewport:function(e,t){if(r.number(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled){var n;if(r.string(e)){var i=e;e=this.$(i)}else if(r.boundingBox(e)){var o=e;(n={x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2}).w=n.x2-n.x1,n.h=n.y2-n.y1}else r.elementOrCollection(e)||(e=this.mutableElements());n=n||e.boundingBox();var a,s=this.width(),l=this.height();if(t=r.number(t)?t:0,!isNaN(s)&&!isNaN(l)&&s>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:a)<this._private.minZoom?this._private.minZoom:a,pan:{x:(s-a*(n.x1+n.x2))/2,y:(l-a*(n.y1+n.y2))/2}}}},minZoom:function(e){return void 0===e?this._private.minZoom:(r.number(e)&&(this._private.minZoom=e),this)},maxZoom:function(e){return void 0===e?this._private.maxZoom:(r.number(e)&&(this._private.maxZoom=e),this)},zoom:function(e){var t,n;if(void 0===e)return this._private.zoom;if(r.number(e))n=e;else if(r.plainObject(e)){if(n=e.level,e.position){var i=e.position,o=this._private.pan,a=this._private.zoom;t={x:i.x*a+o.x,y:i.y*a+o.y}}else e.renderedPosition&&(t=e.renderedPosition);if(t&&!this._private.panningEnabled)return this}if(!this._private.zoomingEnabled)return this;if(!r.number(n)||t&&(!r.number(t.x)||!r.number(t.y)))return this;if(n=(n=n>this._private.maxZoom?this._private.maxZoom:n)<this._private.minZoom?this._private.minZoom:n,t){var s=this._private.pan,l=this._private.zoom,u=n,c={x:-u/l*(t.x-s.x)+t.x,y:-u/l*(t.y-s.y)+t.y};this._private.zoom=n,this._private.pan=c;var d=s.x!==c.x||s.y!==c.y;this.trigger(" zoom "+(d?" pan ":"")+" viewport ")}else this._private.zoom=n,this.trigger("zoom viewport");return this.notify({type:"viewport"}),this},viewport:function(e){var t=this._private,n=!0,i=!0,o=[],a=!1,s=!1;if(!e)return this;if(r.number(e.zoom)||(n=!1),r.plainObject(e.pan)||(i=!1),!n&&!i)return this;if(n){var l=e.zoom;l<t.minZoom||l>t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=l,o.push("zoom"))}if(i&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var u=e.pan;r.number(u.x)&&(t.pan.x=u.x,s=!1),r.number(u.y)&&(t.pan.y=u.y,s=!1),s||o.push("pan")}return o.length>0&&(o.push("viewport"),this.trigger(o.join(" ")),this.notify({type:"viewport"})),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.trigger("pan viewport"),this.notify({type:"viewport"})),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(r.string(e)){var n=e;e=this.mutableElements().filter(n)}else r.elementOrCollection(e)||(e=this.mutableElements());var i=e.boundingBox(),o=this.width(),a=this.height();return{x:(o-(t=void 0===t?this._private.zoom:t)*(i.x1+i.x2))/2,y:(a-t*(i.y1+i.y2))/2}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container;return e.sizeCache=e.sizeCache||(t?function(){var e=t.getBoundingClientRect(),n=i.getComputedStyle(t),r=function(e){return parseFloat(n.getPropertyValue(e))};return{width:e.width-r("padding-left")-r("padding-right")-r("border-left-width")-r("border-right-width"),height:e.height-r("padding-top")-r("padding-bottom")-r("border-top-width")-r("border-bottom-width")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}}};o.centre=o.center,o.autolockNodes=o.autolock,o.autoungrabifyNodes=o.autoungrabify,t.exports=o},{"../is":91,"../window":116}],44:[function(e,t,n){"use strict";var r=e("./util"),i=e("./is"),o=e("./selector"),a=e("./promise"),s=e("./event"),l=e("./animation"),u={data:function(e){var t={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(e){},onSet:function(e){},canSet:function(e){return!0}};return e=r.extend({},t,e),function(t,n){var r=e,o=this,a=void 0!==o.length,s=a?o:[o],l=a?o[0]:o;if(i.string(t)){if(r.allowGetting&&void 0===n)return l&&(r.beforeGet(l),y=l._private[r.field][t]),y;if(r.allowSetting&&void 0!==n&&!r.immutableKeys[t]){for(var u=0,c=s.length;u<c;u++)r.canSet(s[u])&&(s[u]._private[r.field][t]=n);r.updateStyle&&o.updateStyle(),r.onSet(o),r.settingTriggersEvent&&o[r.triggerFnName](r.settingEvent)}}else if(r.allowSetting&&i.plainObject(t)){var d,p,f=t,h=Object.keys(f);for(u=0;u<h.length;u++)if(p=f[d=h[u]],!r.immutableKeys[d])for(var g=0;g<s.length;g++){var v=s[g];r.canSet(v)&&(v._private[r.field][d]=p)}r.updateStyle&&o.updateStyle(),r.onSet(o),r.settingTriggersEvent&&o[r.triggerFnName](r.settingEvent)}else if(r.allowBinding&&i.fn(t)){var m=t;o.on(r.bindingEvent,m)}else if(r.allowGetting&&void 0===t){var y;return l&&(r.beforeGet(l),y=l._private[r.field]),y}return o}},removeData:function(e){var t={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=r.extend({},t,e),function(t){var n=e,r=this,o=void 0!==r.length?r:[r];if(i.string(t)){for(var a=(p=t.split(/\s+/)).length,s=0;s<a;s++){var l=p[s];if(!i.emptyString(l)&&!n.immutableKeys[l])for(var u=0,c=o.length;u<c;u++)o[u]._private[n.field][l]=void 0}n.triggerEvent&&r[n.triggerFnName](n.event)}else if(void 0===t){for(u=0,c=o.length;u<c;u++){var d=o[u]._private[n.field],p=Object.keys(d);for(s=0;s<p.length;s++)l=p[s],!n.immutableKeys[l]&&(d[l]=void 0)}n.triggerEvent&&r[n.triggerFnName](n.event)}return r}},event:{regex:/(\w+)(\.(?:\w+|\*))?/,universalNamespace:".*",optionalTypeRegex:/(\w+)?(\.(?:\w+|\*))?/,falseCallback:function(){return!1}},on:function(e){var t={unbindSelfOnTrigger:!1,unbindAllBindersOnTrigger:!1};return e=r.extend({},t,e),function(t,n,r){var a=this,s=void 0!==a.length?a:[a],l=i.string(t),c=e;if(i.fn(n)&&(r=n,n=void 0),!i.fn(r)&&!1!==r&&l)return a;if(l){var d={};d[t]=r,t=d}for(var p=Object.keys(t),f=0;f<p.length;f++){var h=p[f];if(!1===(r=t[h])&&(r=u.event.falseCallback),i.fn(r)){h=h.split(/\s+/);for(var g=0;g<h.length;g++){var v=h[g];if(!i.emptyString(v)){var m=v.match(u.event.regex);if(m)for(var y=m[1],C=m[2]?m[2]:void 0,b={callback:r,delegated:!!n,selector:n,selObj:new o(n),type:y,namespace:C,unbindSelfOnTrigger:c.unbindSelfOnTrigger,unbindAllBindersOnTrigger:c.unbindAllBindersOnTrigger,binders:s},x=0;x<s.length;x++){var S=s[x]._private=s[x]._private||{};S.listeners=S.listeners||[],S.listeners.push(b)}}}}}return a}},eventAliasesOn:function(e){var t=e;t.addListener=t.listen=t.bind=t.on,t.removeListener=t.unlisten=t.unbind=t.off,t.emit=t.trigger,t.pon=t.promiseOn=function(e,t){var n=this,r=Array.prototype.slice.call(arguments,0);return new a((function(e,t){var i=function(t){n.off.apply(n,a),e(t)},o=r.concat([i]),a=o.concat([]);n.on.apply(n,o)}))}},off:function(e){var t={};return e=r.extend({},t,e),function(e,t,n){var r=this,o=void 0!==r.length?r:[r],a=i.string(e);if(0===arguments.length){for(var s=0;s<o.length;s++)o[s]._private=o[s]._private||{},y.listeners=[];return r}if((i.fn(t)||!1===t)&&(n=t,t=void 0),a){var l={};l[e]=n,e=l}for(var c=Object.keys(e),d=0;d<c.length;d++){var p=c[d];!1===(n=e[p])&&(n=u.event.falseCallback),p=p.split(/\s+/);for(var f=0;f<p.length;f++){var h=p[f];if(!i.emptyString(h)){var g=h.match(u.event.optionalTypeRegex);if(g){var v=g[1]?g[1]:void 0,m=g[2]?g[2]:void 0;for(s=0;s<o.length;s++)for(var y=o[s]._private=o[s]._private||{},C=y.listeners=y.listeners||[],b=0;b<C.length;b++){var x=C[b],S=!m||m===x.namespace,E=!v||x.type===v,w=!n||n===x.callback;S&&E&&w&&(C.splice(b,1),b--)}}}}}return r}},trigger:function(e){var t={};return e=r.extend({},t,e),function(t,n,r){var o=this,a=void 0!==o.length?o:[o],l=i.string(t),c=i.plainObject(t),d=i.event(t),p=(S=this._private=this._private||{}).cy||(i.core(this)?this:null),f=!!p&&p.hasCompoundNodes();if(l){var h=t.split(/\s+/);t=[];for(var g=0;g<h.length;g++){var v=h[g];if(!i.emptyString(v)){var m=v.match(u.event.regex),y=m[1],C=m[2]?m[2]:void 0;t.push({type:y,namespace:C})}}}else c&&(t=[t]);for(n?i.array(n)||(n=[n]):n=[],g=0;g<t.length;g++)for(var b=t[g],x=0;x<a.length;x++){var S,E=a[x],w=(S=E._private=E._private||{}).listeners=S.listeners||[],O=i.element(E)||e.layout;if(d?((v=b).target=v.target||E,v.cy=v.cy||p):v=new s(b,{target:E,cy:p,namespace:b.namespace}),b.layout&&(v.layout=b.layout),e.layout&&(v.layout=E),v.position){var _=v.position,L=p.zoom(),R=p.pan();v.renderedPosition={x:_.x*L+R.x,y:_.y*L+R.y}}r&&(w=[{namespace:v.namespace,type:v.type,callback:r}]);for(var D=0;D<w.length;D++){var N=w[D],M=!N.namespace||N.namespace===v.namespace||N.namespace===u.event.universalNamespace,I=N.type===v.type,A=!N.delegated||E!==v.target&&i.element(v.target)&&N.selObj.matches(v.target);if(M&&I&&A){var P=[v];if(P=P.concat(n),(N.unbindSelfOnTrigger||N.unbindAllBindersOnTrigger)&&(w.splice(D,1),D--),N.unbindAllBindersOnTrigger)for(var k=N.binders,T=0;T<k.length;T++){var V=k[T];if(V&&V!==E)for(var B=V._private.listeners,z=0;z<B.length;z++)B[z]===N&&(B.splice(z,1),z--)}var j=N.delegated?v.target:E,F=N.callback.apply(j,P);(!1===F||v.isPropagationStopped())&&(O=!1,!1===F&&(v.stopPropagation(),v.preventDefault()))}}if(O){var G=f?E._private.parent:null;null!=G&&0!==G.length?(G=G[0]).trigger(v):p.trigger(v)}}return o}},animated:function(e){var t={};return e=r.extend({},t,e),function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return!1;var n=t[0];return n?n._private.animation.current.length>0:void 0}},clearQueue:function(e){var t={};return e=r.extend({},t,e),function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n<t.length;n++)t[n]._private.animation.queue=[];return this}},delay:function(e){var t={};return e=r.extend({},t,e),function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this}},delayAnimation:function(e){var t={};return e=r.extend({},t,e),function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this}},animation:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,i=void 0!==n.length,o=i?n:[n],a=this._private.cy||this,s=!i,u=!s;if(!a.styleEnabled())return this;var c=a.style();if(e=r.extend({},e,t),0===Object.keys(e).length)return new l(o[0],e);switch(void 0===e.duration&&(e.duration=400),e.duration){case"slow":e.duration=600;break;case"fast":e.duration=200}if(u&&(e.style=c.getPropsList(e.style||e.css),e.css=void 0),e.renderedPosition&&u){var d=e.renderedPosition,p=a.pan(),f=a.zoom();e.position={x:(d.x-p.x)/f,y:(d.y-p.y)/f}}if(e.panBy&&s){var h=e.panBy,g=a.pan();e.pan={x:g.x+h.x,y:g.y+h.y}}var v=e.center||e.centre;if(v&&s){var m=a.getCenterPan(v.eles,e.zoom);m&&(e.pan=m)}if(e.fit&&s){var y=e.fit,C=a.getFitViewport(y.eles||y.boundingBox,y.padding);C&&(e.pan=C.pan,e.zoom=C.zoom)}return new l(o[0],e)}},animate:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,i=void 0!==n.length?n:[n];if(!(this._private.cy||this).styleEnabled())return this;t&&(e=r.extend({},e,t));for(var o=0;o<i.length;o++){var a=i[o],s=a.animated()&&(void 0===e.queue||e.queue);a.animation(e,s?{queue:!0}:void 0).play()}return this}},stop:function(e){var t={};return e=r.extend({},t,e),function(e,t){var n=this,r=void 0!==n.length?n:[n],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var o=0;o<r.length;o++){for(var a=r[o]._private,s=a.animation.current,l=0;l<s.length;l++){var u=s[l]._private;t&&(u.duration=0)}e&&(a.animation.queue=[]),t||(a.animation.current=[])}return i.notify({eles:this,type:"draw"}),this}}};t.exports=u},{"./animation":2,"./event":45,"./is":91,"./promise":94,"./selector":95,"./util":108}],45:[function(e,t,n){"use strict";function r(){return!1}function i(){return!0}var o=function(e,t){return this instanceof o?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?i:r):this.type=e,t&&(this.type=void 0!==t.type?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout,this.message=t.message),void(this.timeStamp=e&&e.timeStamp||Date.now())):new o(e,t)};o.prototype={instanceString:function(){return"event"},preventDefault:function(){this.isDefaultPrevented=i;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=i;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()},isDefaultPrevented:r,isPropagationStopped:r,isImmediatePropagationStopped:r},t.exports=o},{}],46:[function(e,t,n){"use strict";function r(e,t,n){var r=n,o=function(n){s.error("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===e){if(c.prototype[t])return o(t);c.prototype[t]=n}else if("collection"===e){if(u.prototype[t])return o(t);u.prototype[t]=n}else if("layout"===e){for(var a=function(e){this.options=e,n.call(this,e),p.plainObject(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[]},d=a.prototype=Object.create(n.prototype),h=[],g=0;g<h.length;g++){var v=h[g];d[v]=d[v]||function(){return this}}d.start&&!d.run?d.run=function(){return this.start(),this}:!d.start&&d.run&&(d.start=function(){return this.run(),this});var m=n.prototype.stop;d.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var n=0;n<t.length;n++)t[n].stop()}return m?m.call(this):this.trigger("layoutstop"),this},d.destroy||(d.destroy=function(){return this}),d.on=l.on({layout:!0}),d.one=l.on({layout:!0,unbindSelfOnTrigger:!0}),d.once=l.on({layout:!0,unbindAllBindersOnTrigger:!0}),d.off=l.off({layout:!0}),d.trigger=l.trigger({layout:!0}),l.eventAliasesOn(d),r=a}else if("renderer"===e&&"null"!==t&&"base"!==t){var y=i("renderer","base"),C=y.prototype,b=n,x=n.prototype,S=function(){y.apply(this,arguments),b.apply(this,arguments)},E=S.prototype;for(var w in C){var O=C[w];if(null!=x[w])return o(w);E[w]=O}for(var w in x)E[w]=x[w];C.clientFunctions.forEach((function(e){E[e]=E[e]||function(){s.error("Renderer does not implement `renderer."+e+"()` on its prototype")}})),r=S}return s.setMap({map:f,keys:[e,t],value:r})}function i(e,t){return s.getMap({map:f,keys:[e,t]})}function o(e,t,n,r,i){return s.setMap({map:h,keys:[e,t,n,r],value:i})}function a(e,t,n,r){return s.getMap({map:h,keys:[e,t,n,r]})}var s=e("./util"),l=e("./define"),u=e("./collection"),c=e("./core"),d=e("./extensions"),p=e("./is"),f={},h={},g=function(){return 2===arguments.length?i.apply(null,arguments):3===arguments.length?r.apply(null,arguments):4===arguments.length?a.apply(null,arguments):5===arguments.length?o.apply(null,arguments):void s.error("Invalid extension access syntax")};c.prototype.extension=g,d.forEach((function(e){e.extensions.forEach((function(t){r(e.type,t.name,t.impl)}))})),t.exports=g},{"./collection":26,"./core":37,"./define":44,"./extensions":47,"./is":91,"./util":108}],47:[function(e,t,n){"use strict";t.exports=[{type:"layout",extensions:e("./layout")},{type:"renderer",extensions:e("./renderer")}]},{"./layout":53,"./renderer":87}],48:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},s,e)}var i=e("../../util"),o=e("../../math"),a=e("../../is"),s={fit:!0,directed:!1,padding:30,circle:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,maximalAdjustments:0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e,t=this.options,n=t,r=t.cy,i=n.eles,s=i.nodes().not(":parent"),l=i,u=o.makeBoundingBox(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.elementOrCollection(n.roots))e=n.roots;else if(a.array(n.roots)){for(var c=[],d=0;d<n.roots.length;d++){var p=n.roots[d],f=r.getElementById(p);c.push(f)}e=r.collection(c)}else if(a.string(n.roots))e=r.$(n.roots);else if(n.directed)e=s.roots();else{for(var h=[],g=s;g.length>0;){var v=r.collection();i.bfs({roots:g[0],visit:function(e,t,n,r,i){v=v.add(e)},directed:!1}),g=g.not(v),h.push(v)}for(e=r.collection(),d=0;d<h.length;d++){var m=h[d],y=m.maxDegree(!1),C=m.filter((function(e){return e.degree(!1)===y}));e=e.add(C)}}var b=[],x={},S={},E={},w={},O={};l.bfs({roots:e,directed:n.directed,visit:function(e,t,n,r,i){var o=e[0],a=o.id();if(b[i]||(b[i]=[]),b[i].push(o),x[a]=!0,S[a]=i,E[a]=n,w[a]=t,n){var s=n.id();(O[s]=O[s]||[]).push(e)}}});var _=[];for(d=0;d<s.length;d++)f=s[d],x[f.id()]||_.push(f);for(var L=3*_.length,R=0;0!==_.length&&R<L;){var D=(M=_.shift()).neighborhood().nodes(),N=!1;for(d=0;d<D.length;d++)if(void 0!==(te=S[D[d].id()])){b[te].push(M),N=!0;break}N||_.push(M),R++}for(;0!==_.length;){var M=_.shift();(N=!1)||(0===b.length&&b.push([]),b[0].push(M))}var I=function(){for(var e=0;e<b.length;e++)for(var t=b[e],n=0;n<t.length;n++)t[n]._private.scratch.breadthfirst={depth:e,index:n}};I();for(var A=function(e){for(var t,n=e.connectedEdges((function(t){return t.data("target")===e.id()})),r=e._private.scratch.breadthfirst,i=0,o=0;o<n.length;o++){var a=n[o].source()[0],s=a._private.scratch.breadthfirst;r.depth<=s.depth&&i<s.depth&&(i=s.depth,t=a)}return t},P=0;P<n.maximalAdjustments;P++){var k=b.length,T=[];for(d=0;d<k;d++)for(var V=(te=b[d]).length,B=0;B<V;B++){var z=(f=te[B])._private.scratch.breadthfirst;(j=A(f))&&(z.intEle=j,T.push(f))}for(d=0;d<T.length;d++){var j,F=(j=(z=(f=T[d])._private.scratch.breadthfirst).intEle)._private.scratch.breadthfirst;b[z.depth].splice(z.index,1);for(var G=F.depth+1;G>b.length-1;)b.push([]);b[G].push(f),z.depth=G,z.index=b[G].length-1}I()}var U=0;if(n.avoidOverlap)for(d=0;d<s.length;d++){var q=s[d].layoutDimensions(n),H=q.w,W=q.h;U=Math.max(U,H,W)}for(var $={},X=function(e){if($[e.id()])return $[e.id()];for(var t=e._private.scratch.breadthfirst.depth,n=e.neighborhood().nodes().not(":parent").intersection(s),r=0,i=0,o=0;o<n.length;o++){var a=n[o]._private.scratch.breadthfirst,l=a.index,u=a.depth,c=b[u].length;(t>u||0===t)&&(r+=l/c,i++)}return r/=i=Math.max(1,i),0===i&&(r=void 0),$[e.id()]=r,r},Y=function(e,t){return X(e)-X(t)},K=0;K<3;K++){for(d=0;d<b.length;d++)b[d]=b[d].sort(Y);I()}var Z=0;for(d=0;d<b.length;d++)Z=Math.max(b[d].length,Z);var Q={x:u.x1+u.w/2,y:u.x1+u.h/2},J=function(e,t){var r=e._private.scratch.breadthfirst,i=r.depth,o=r.index,a=b[i].length,s=Math.max(u.w/(a+1),U),l=Math.max(u.h/(b.length+1),U),c=Math.min(u.w/2/b.length,u.h/2/b.length);if(c=Math.max(c,U),n.circle){if(n.circle){var d=c*i+c-(b.length>0&&b[0].length<=3?c/2:0),p=2*Math.PI/b[i].length*o;return 0===i&&1===b[0].length&&(d=1),{x:Q.x+d*Math.cos(p),y:Q.y+d*Math.sin(p)}}return{x:Q.x+(o+1-(a+1)/2)*s,y:(i+1)*l}}var f={x:Q.x+(o+1-(a+1)/2)*s,y:(i+1)*l};return f},ee={};for(d=b.length-1;d>=0;d--){var te=b[d];for(B=0;B<te.length;B++)M=te[B],ee[M.id()]=J(M,d===b.length-1)}return s.layoutPositions(this,n,(function(e){return ee[e.id()]})),this},t.exports=r},{"../../is":91,"../../math":93,"../../util":108}],49:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},s,e)}var i=e("../../util"),o=e("../../math"),a=e("../../is"),s={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,s=r.nodes().not(":parent");t.sort&&(s=s.sort(t.sort));for(var l,u=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),c={x:u.x1+u.w/2,y:u.y1+u.h/2},d=(void 0===t.sweep?2*Math.PI-2*Math.PI/s.length:t.sweep)/Math.max(1,s.length-1),p=0,f=0;f<s.length;f++){var h=s[f].layoutDimensions(t),g=h.w,v=h.h;p=Math.max(p,g,v)}if(l=a.number(t.radius)?t.radius:s.length<=1?0:Math.min(u.h,u.w)/2-p,s.length>1&&t.avoidOverlap){p*=1.75;var m=Math.cos(d)-Math.cos(0),y=Math.sin(d)-Math.sin(0),C=Math.sqrt(p*p/(m*m+y*y));l=Math.max(C,l)}var b=function(e,n){var r=t.startAngle+n*d*(i?1:-1),o=l*Math.cos(r),a=l*Math.sin(r);return{x:c.x+o,y:c.y+a}};return s.layoutPositions(this,t,b),this},t.exports=r},{"../../is":91,"../../math":93,"../../util":108}],50:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles.nodes().not(":parent"),a=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:a.x1+a.w/2,y:a.y1+a.h/2},l=[],u=t.startAngle,c=0,d=0;d<i.length;d++){var p,f=i[d];p=t.concentric(f),l.push({value:p,node:f}),f._private.scratch.concentric=p}for(i.updateStyle(),d=0;d<i.length;d++){var h=(f=i[d]).layoutDimensions(t);c=Math.max(c,h.w,h.h)}l.sort((function(e,t){return t.value-e.value}));var g=t.levelWidth(i),v=[[]],m=v[0];for(d=0;d<l.length;d++){var y=l[d];m.length>0&&Math.abs(m[0].value-y.value)>=g&&(m=[],v.push(m)),m.push(y)}var C=c+t.minNodeSpacing;if(!t.avoidOverlap){var b=v.length>0&&v[0].length>1,x=(Math.min(a.w,a.h)/2-C)/(v.length+b?1:0);C=Math.min(C,x)}var S=0;for(d=0;d<v.length;d++){var E=v[d],w=void 0===t.sweep?2*Math.PI-2*Math.PI/E.length:t.sweep,O=E.dTheta=w/Math.max(1,E.length-1);if(E.length>1&&t.avoidOverlap){var _=Math.cos(O)-Math.cos(0),L=Math.sin(O)-Math.sin(0),R=Math.sqrt(C*C/(_*_+L*L));S=Math.max(R,S)}E.r=S,S+=C}if(t.equidistant){var D=0;for(S=0,d=0;d<v.length;d++){var N=(E=v[d]).r-S;D=Math.max(D,N)}for(S=0,d=0;d<v.length;d++)E=v[d],0===d&&(S=E.r),E.r=S,S+=D}var M={};for(d=0;d<v.length;d++){O=(E=v[d]).dTheta,S=E.r;for(var I=0;I<E.length;I++){y=E[I],u=t.startAngle+(n?1:-1)*O*I;var A={x:s.x+S*Math.cos(u),y:s.y+S*Math.sin(u)};M[y.node.id()]=A}}return i.layoutPositions(this,t,(function(e){var t=e.id();return M[t]})),this},t.exports=r},{"../../math":93,"../../util":108}],51:[function(e,t,n){"use strict";function r(e){this.options=o.extend({},u,e),this.options.layout=this}var i,o=e("../../util"),a=e("../../math"),s=e("../../is"),l=e("../../promise"),u={ready:function(){},stop:function(){},animate:!0,animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:100,nodeRepulsion:function(e){return 4e5},nodeOverlap:10,idealEdgeLength:function(e){return 10},edgeElasticity:function(e){return 100},nestingFactor:5,gravity:80,numIter:1e3,initialTemp:200,coolingFactor:.95,minTemp:1,weaver:!1};r.prototype.run=function(){function e(e){var t={type:"message",message:e};d.trigger(t)}var t=this.options,n=t.cy,r=this,a=this.thread,u=t.weaver?t.weaver.Thread:null,d={listeners:[],on:function(e,t){return this.listeners.push({event:e,callback:t}),this},trigger:function(e){s.string(e)&&(e={type:e});var t=function(t){return t.event===e.type},n=function(t){t.callback(e)};return this.listeners.filter(t).forEach(n),this},pass:function(e){return this.pass=e,this},run:function(e){var t=this.pass;return new l((function(n){n(e(t))}))},stop:function(){return this}};a&&!a.stopped()||(a=this.thread=u?new u:d),r.stopped=!1,r.trigger({type:"layoutstart",layout:r}),i=!0===t.debug;var p=c(n,r,t);i&&f(p),t.randomize&&h(p,n);var v=Date.now(),m=!1,y=function(e){e=e||{},m&&!e.next||!e.force&&Date.now()-v<t.animationThreshold||(m=!0,o.requestAnimationFrame((function(){g(p,n,t),!0===t.fit&&n.fit(t.padding),m=!1,e.next&&e.next()})))};a.on("message",(function(e){var t=e.message;p.layoutNodes=t,y()})),a.pass({layoutInfo:p,options:{animate:t.animate,refresh:t.refresh,componentSpacing:t.componentSpacing,nodeOverlap:t.nodeOverlap,nestingFactor:t.nestingFactor,gravity:t.gravity,numIter:t.numIter,initialTemp:t.initialTemp,coolingFactor:t.coolingFactor,minTemp:t.minTemp}}).run((function(t){var n=t.layoutInfo,r=t.options,i=!1,o=function(e,t,n){a(e,t),d(e,t),p(e,t),f(e,t),h(e,t)},a=function(e,t){for(var n=0;n<e.graphSet.length;n++)for(var r=e.graphSet[n],i=r.length,o=0;o<i;o++)for(var a=e.layoutNodes[e.idToIndex[r[o]]],s=o+1;s<i;s++){var u=e.layoutNodes[e.idToIndex[r[s]]];l(a,u,e,t)}},s=function(e){return-e+2*e*Math.random()},l=function(e,t,n,r){if(e.cmptId===t.cmptId||n.isCompound){var i=t.positionX-e.positionX,o=t.positionY-e.positionY,a=1;0===i&&0===o&&(i=s(a),o=s(a));var l=u(e,t,i,o);if(l>0)var d=(f=r.nodeOverlap*l)*i/(C=Math.sqrt(i*i+o*o)),p=f*o/C;else{var f,h=c(e,i,o),g=c(t,-1*i,-1*o),v=g.x-h.x,m=g.y-h.y,y=v*v+m*m,C=Math.sqrt(y);d=(f=(e.nodeRepulsion+t.nodeRepulsion)/y)*v/C,p=f*m/C}e.isLocked||(e.offsetX-=d,e.offsetY-=p),t.isLocked||(t.offsetX+=d,t.offsetY+=p)}},u=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var o=e.maxY-t.minY;else o=t.maxY-e.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},c=function(e,t,n){var r=e.positionX,i=e.positionY,o=e.height||1,a=e.width||1,s=n/t,l=o/a,u={};return 0===t&&0<n||0===t&&0>n?(u.x=r,u.y=i+o/2,u):0<t&&-1*l<=s&&s<=l?(u.x=r+a/2,u.y=i+a*n/2/t,u):0>t&&-1*l<=s&&s<=l?(u.x=r-a/2,u.y=i-a*n/2/t,u):0<n&&(s<=-1*l||s>=l)?(u.x=r+o*t/2/n,u.y=i+o/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-o*t/2/n,u.y=i-o/2,u):u},d=function(e,t){for(var n=0;n<e.edgeSize;n++){var r=e.layoutEdges[n],i=e.idToIndex[r.sourceId],o=e.layoutNodes[i],a=e.idToIndex[r.targetId],s=e.layoutNodes[a],l=s.positionX-o.positionX,u=s.positionY-o.positionY;if(0===l&&0===u)return;var d=c(o,l,u),p=c(s,-1*l,-1*u),f=p.x-d.x,h=p.y-d.y,g=Math.sqrt(f*f+h*h),v=Math.pow(r.idealLength-g,2)/r.elasticity;if(0!==g)var m=v*f/g,y=v*h/g;else m=0,y=0;o.isLocked||(o.offsetX+=m,o.offsetY+=y),s.isLocked||(s.offsetX-=m,s.offsetY-=y)}},p=function(e,t){for(var n=1,r=0;r<e.graphSet.length;r++){var i=e.graphSet[r],o=i.length;if(0===r)var a=e.clientHeight/2,s=e.clientWidth/2;else{var l=e.layoutNodes[e.idToIndex[i[0]]],u=e.layoutNodes[e.idToIndex[l.parentId]];a=u.positionX,s=u.positionY}for(var c=0;c<o;c++){var d=e.layoutNodes[e.idToIndex[i[c]]];if(!d.isLocked){var p=a-d.positionX,f=s-d.positionY,h=Math.sqrt(p*p+f*f);if(h>n){var g=t.gravity*p/h,v=t.gravity*f/h;d.offsetX+=g,d.offsetY+=v}}}}},f=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var o=n[r++],a=e.idToIndex[o],s=e.layoutNodes[a],l=s.children;if(0<l.length&&!s.isLocked){for(var u=s.offsetX,c=s.offsetY,d=0;d<l.length;d++){var p=e.layoutNodes[e.idToIndex[l[d]]];p.offsetX+=u,p.offsetY+=c,n[++i]=l[d]}s.offsetX=0,s.offsetY=0}}},h=function(e,t){for(var n=0;n<e.nodeSize;n++)0<(i=e.layoutNodes[n]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0);for(n=0;n<e.nodeSize;n++)if(!(0<(i=e.layoutNodes[n]).children.length||i.isLocked)){var r=g(i.offsetX,i.offsetY,e.temperature);i.positionX+=r.x,i.positionY+=r.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,v(i,e)}for(n=0;n<e.nodeSize;n++){var i;0<(i=e.layoutNodes[n]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)}},g=function(e,t,n){var r=Math.sqrt(e*e+t*t);if(r>n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},v=function(e,t){var n=e.parentId;if(null!=n){var r=t.layoutNodes[t.idToIndex[n]],i=!1;return(null==r.maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(null==r.minX||e.minX-r.padLeft<r.minX)&&(r.minX=e.minX-r.padLeft,i=!0),(null==r.maxY||e.maxY+r.padBottom>r.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(null==r.minY||e.minY-r.padTop<r.minY)&&(r.minY=e.minY-r.padTop,i=!0),i?v(r,t):void 0}},m=function(e,t){for(var r=n.layoutNodes,i=[],o=0;o<r.length;o++){var a=r[o],s=a.cmptId;(i[s]=i[s]||[]).push(a)}var l=0;for(o=0;o<i.length;o++)if(v=i[o]){v.x1=1/0,v.x2=-1/0,v.y1=1/0,v.y2=-1/0;for(var u=0;u<v.length;u++){var c=v[u];v.x1=Math.min(v.x1,c.positionX-c.width/2),v.x2=Math.max(v.x2,c.positionX+c.width/2),v.y1=Math.min(v.y1,c.positionY-c.height/2),v.y2=Math.max(v.y2,c.positionY+c.height/2)}v.w=v.x2-v.x1,v.h=v.y2-v.y1,l+=v.w*v.h}i.sort((function(e,t){return t.w*t.h-e.w*e.h}));var d=0,p=0,f=0,h=0,g=Math.sqrt(l)*n.clientWidth/n.clientHeight;for(o=0;o<i.length;o++){var v;if(v=i[o]){for(u=0;u<v.length;u++)(c=v[u]).isLocked||(c.positionX+=d,c.positionY+=p);d+=v.w+t.componentSpacing,f+=v.w+t.componentSpacing,h=Math.max(h,v.h),f>g&&(p+=h+t.componentSpacing,d=0,f=0,h=0)}}},y=function(e){return!(i||(o(n,r,e),n.temperature=n.temperature*r.coolingFactor,n.temperature<r.minTemp))},C=0;do{for(var b=0;b<r.refresh&&C<r.numIter;){var x;if(!(x=y(C)))break;b++,C++}r.animate&&e(n.layoutNodes)}while(x&&C+1<r.numIter);return m(n,r),n})).then((function(e){p.layoutNodes=e.layoutNodes,a.stop(),C()}));var C=function(){y({force:!0,next:function(){r.one("layoutstop",t.stop),r.trigger({type:"layoutstop",layout:r})}})};return this},r.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.trigger("layoutstop"),this},r.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var c=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:a.makeBoundingBox(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},l=n.eles.components(),u={},c=0;c<l.length;c++)for(var p=l[c],f=0;f<p.length;f++)u[p[f].id()]=c;for(c=0;c<o.nodeSize;c++){var h=(C=i[c]).layoutDimensions(n);(k={}).isLocked=C.locked(),k.id=C.data("id"),k.parentId=C.data("parent"),k.cmptId=u[C.id()],k.children=[],k.positionX=C.position("x"),k.positionY=C.position("y"),k.offsetX=0,k.offsetY=0,k.height=h.w,k.width=h.h,k.maxX=k.positionX+k.width/2,k.minX=k.positionX-k.width/2,k.maxY=k.positionY+k.height/2,k.minY=k.positionY-k.height/2,k.padLeft=parseFloat(C.style("padding")),k.padRight=parseFloat(C.style("padding")),k.padTop=parseFloat(C.style("padding")),k.padBottom=parseFloat(C.style("padding")),k.nodeRepulsion=s.fn(n.nodeRepulsion)?n.nodeRepulsion(C):n.nodeRepulsion,o.layoutNodes.push(k),o.idToIndex[k.id]=c}var g=[],v=0,m=-1,y=[];for(c=0;c<o.nodeSize;c++){var C,b=(C=o.layoutNodes[c]).parentId;null!=b?o.layoutNodes[o.idToIndex[b]].children.push(C.id):(g[++m]=C.id,y.push(C.id))}for(o.graphSet.push(y);v<=m;){var x=g[v++],S=o.idToIndex[x],E=o.layoutNodes[S].children;if(E.length>0)for(o.graphSet.push(E),c=0;c<E.length;c++)g[++m]=E[c]}for(c=0;c<o.graphSet.length;c++){var w=o.graphSet[c];for(f=0;f<w.length;f++){var O=o.idToIndex[w[f]];o.indexToGraph[O]=c}}for(c=0;c<o.edgeSize;c++){var _=r[c],L={};L.id=_.data("id"),L.sourceId=_.data("source"),L.targetId=_.data("target");var R=s.fn(n.idealEdgeLength)?n.idealEdgeLength(_):n.idealEdgeLength,D=s.fn(n.edgeElasticity)?n.edgeElasticity(_):n.edgeElasticity,N=o.idToIndex[L.sourceId],M=o.idToIndex[L.targetId];if(o.indexToGraph[N]!=o.indexToGraph[M]){for(var I=d(L.sourceId,L.targetId,o),A=o.graphSet[I],P=0,k=o.layoutNodes[N];-1===A.indexOf(k.id);)k=o.layoutNodes[o.idToIndex[k.parentId]],P++;for(k=o.layoutNodes[M];-1===A.indexOf(k.id);)k=o.layoutNodes[o.idToIndex[k.parentId]],P++;R*=P*n.nestingFactor}L.idealLength=R,L.elasticity=D,o.layoutEdges.push(L)}return o},d=function(e,t,n){var r=p(e,t,0,n);return 2>r.count?0:r.graph},p=function(e,t,n,r){var i=r.graphSet[n];if(-1<i.indexOf(e)&&-1<i.indexOf(t))return{count:2,graph:n};for(var o=0,a=0;a<i.length;a++){var s=i[a],l=r.idToIndex[s],u=r.layoutNodes[l].children;if(0!==u.length){var c=r.indexToGraph[r.idToIndex[u[0]]],d=p(e,t,c,r);if(0!==d.count){if(1!==d.count)return d;if(2==++o)break}}}return{count:o,graph:n}},f=function(e){if(i){console.debug("layoutNodes:");for(var t=0;t<e.nodeSize;t++){var n=e.layoutNodes[t],r="\nindex: "+t+"\nId: "+n.id+"\nChildren: "+n.children.toString()+"\nparentId: "+n.parentId+"\npositionX: "+n.positionX+"\npositionY: "+n.positionY+"\nOffsetX: "+n.offsetX+"\nOffsetY: "+n.offsetY+"\npadLeft: "+n.padLeft+"\npadRight: "+n.padRight+"\npadTop: "+n.padTop+"\npadBottom: "+n.padBottom;console.debug(r)}for(var t in console.debug("idToIndex"),e.idToIndex)console.debug("Id: "+t+"\nIndex: "+e.idToIndex[t]);console.debug("Graph Set");var o=e.graphSet;for(t=0;t<o.length;t++)console.debug("Set : "+t+": "+o[t].toString());for(r="IndexToGraph",t=0;t<e.indexToGraph.length;t++)r+="\nIndex : "+t+" Graph: "+e.indexToGraph[t];for(console.debug(r),r="Layout Edges",t=0;t<e.layoutEdges.length;t++){var a=e.layoutEdges[t];r+="\nEdge Index: "+t+" ID: "+a.id+" SouceID: "+a.sourceId+" TargetId: "+a.targetId+" Ideal Length: "+a.idealLength}console.debug(r),r="nodeSize: "+e.nodeSize,r+="\nedgeSize: "+e.edgeSize,r+="\ntemperature: "+e.temperature,console.debug(r)}},h=function(e,t){for(var n=e.clientWidth,r=e.clientHeight,i=0;i<e.nodeSize;i++){var o=e.layoutNodes[i];0!==o.children.length||o.isLocked||(o.positionX=Math.random()*n,o.positionY=Math.random()*r)}},g=function(e,t,n){var r=n.layout,i=n.eles.nodes(),o=e.boundingBox,a={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};n.boundingBox&&(i.forEach((function(t){var n=e.layoutNodes[e.idToIndex[t.data("id")]];a.x1=Math.min(a.x1,n.positionX),a.x2=Math.max(a.x2,n.positionX),a.y1=Math.min(a.y1,n.positionY),a.y2=Math.max(a.y2,n.positionY)})),a.w=a.x2-a.x1,a.h=a.y2-a.y1),i.positions((function(t,r){var i=e.layoutNodes[e.idToIndex[t.data("id")]];if(n.boundingBox){var s=(i.positionX-a.x1)/a.w,l=(i.positionY-a.y1)/a.h;return{x:o.x1+s*o.w,y:o.y1+l*o.h}}return{x:i.positionX,y:i.positionY}})),!0!==e.ready&&(e.ready=!0,r.one("layoutready",n.ready),r.trigger({type:"layoutready",layout:this}))};t.exports=r},{"../../is":91,"../../math":93,"../../promise":94,"../../util":108}],52:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles.nodes().not(":parent");t.sort&&(r=r.sort(t.sort));var i=o.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.layoutPositions(this,t,(function(e){return{x:i.x1,y:i.y1}}));else{var a=r.size(),s=Math.sqrt(a*i.h/i.w),l=Math.round(s),u=Math.round(i.w/i.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},d=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},p=t.rows,f=null!=t.cols?t.cols:t.columns;if(null!=p&&null!=f)l=p,u=f;else if(null!=p&&null==f)l=p,u=Math.ceil(a/l);else if(null==p&&null!=f)u=f,l=Math.ceil(a/u);else if(u*l>a)((g=c())-1)*(h=d())>=a?c(g-1):(h-1)*g>=a&&d(h-1);else for(;u*l<a;){var h,g=c();((h=d())+1)*g>=a?d(h+1):c(g+1)}var v=i.w/u,m=i.h/l;if(t.condense&&(v=0,m=0),t.avoidOverlap)for(var y=0;y<r.length;y++){null!=(I=(N=r[y])._private.position).x&&null!=I.y||(I.x=0,I.y=0);var C=N.layoutDimensions(t),b=t.avoidOverlapPadding,x=C.w+b,S=C.h+b;v=Math.max(v,x),m=Math.max(m,S)}var E={},w=function(e,t){return!!E["c-"+e+"-"+t]},O=function(e,t){E["c-"+e+"-"+t]=!0},_=0,L=0,R=function(){++L>=u&&(L=0,_++)},D={};for(y=0;y<r.length;y++){var N=r[y],M=t.position(N);if(M&&(void 0!==M.row||void 0!==M.col)){var I;if(void 0===(I={row:M.row,col:M.col}).col)for(I.col=0;w(I.row,I.col);)I.col++;else if(void 0===I.row)for(I.row=0;w(I.row,I.col);)I.row++;D[N.id()]=I,O(I.row,I.col)}}var A=function(e,t){var n,r;if(e.locked()||e.isParent())return!1;var o=D[e.id()];if(o)n=o.col*v+v/2+i.x1,r=o.row*m+m/2+i.y1;else{for(;w(_,L);)R();n=L*v+v/2+i.x1,r=_*m+m/2+i.y1,O(_,L),R()}return{x:n,y:r}};r.layoutPositions(this,t,A)}return this},t.exports=r},{"../../math":93,"../../util":108}],53:[function(e,t,n){"use strict";t.exports=[{name:"breadthfirst",impl:e("./breadthfirst")},{name:"circle",impl:e("./circle")},{name:"concentric",impl:e("./concentric")},{name:"cose",impl:e("./cose")},{name:"grid",impl:e("./grid")},{name:"null",impl:e("./null")},{name:"preset",impl:e("./preset")},{name:"random",impl:e("./random")}]},{"./breadthfirst":48,"./circle":49,"./concentric":50,"./cose":51,"./grid":52,"./null":54,"./preset":55,"./random":56}],54:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},o,e)}var i=e("../../util"),o={ready:function(){},stop:function(){}};r.prototype.run=function(){var e=this.options,t=e.eles,n=this;return e.cy,n.trigger("layoutstart"),t.nodes().positions((function(){return{x:0,y:0}})),n.one("layoutready",e.ready),n.trigger("layoutready"),n.one("layoutstop",e.stop),n.trigger("layoutstop"),this},r.prototype.stop=function(){return this},t.exports=r},{"../../util":108}],55:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../is"),a={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){function e(e){if(null==t.positions)return null;if(r)return t.positions(e);var n=t.positions[e._private.data.id];return null==n?null:n}var t=this.options,n=t.eles.nodes(),r=o.fn(t.positions);return n.layoutPositions(this,t,(function(t,n){var r=e(t);return!t.locked()&&null!=r&&r})),this},t.exports=r},{"../../is":91,"../../util":108}],56:[function(e,t,n){"use strict";function r(e){this.options=i.extend({},a,e)}var i=e("../../util"),o=e("../../math"),a={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,ready:void 0,stop:void 0};r.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles.nodes().not(":parent"),r=o.makeBoundingBox(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),i=function(e,t){return{x:r.x1+Math.round(Math.random()*r.w),y:r.y1+Math.round(Math.random()*r.h)}};return n.layoutPositions(this,e,i),this},t.exports=r},{"../../math":93,"../../util":108}],57:[function(e,t,n){"use strict";var r=e("../../../math"),i=e("../../../is"),o=e("../../../util"),a={arrowShapeWidth:.3,registerArrowShapes:function(){var e=this.arrowShapes={},t=this,n=function(e,t,n,r,i,o){var a=i.x-n/2-o,s=i.x+n/2+o,l=i.y-n/2-o,u=i.y+n/2+o;return a<=e&&e<=s&&l<=t&&t<=u},a=function(e,t,n,r,i){var o=e*Math.cos(r)-t*Math.sin(r),a=(e*Math.sin(r)+t*Math.cos(r))*n;return{x:o*n+i.x,y:a+i.y}},s=function(e,t,n,r){for(var i=[],o=0;o<e.length;o+=2){var s=e[o],l=e[o+1];i.push(a(s,l,t,n,r))}return i},l=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r.x,r.y)}return t},u=function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").pfValue*2},c=function(a,c){i.string(c)&&(c=e[c]),e[a]=o.extend({name:a,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(e,t,n,i,o,a){var u=l(s(this.points,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,u)},roughCollide:n,draw:function(e,n,r,i){var o=s(this.points,n,r,i);t.arrowShapeImpl("polygon")(e,o)},spacing:function(e){return 0},gap:u},c)};c("none",{collide:o.falsify,roughCollide:o.falsify,draw:o.noop,spacing:o.zeroify,gap:o.zeroify}),c("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),c("arrow","triangle"),c("triangle-backcurve",{points:e.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:function(e,n,r,i){var o=s(this.points,n,r,i),l=this.controlPoint,u=a(l[0],l[1],n,r,i);t.arrowShapeImpl(this.name)(e,o,u)},gap:function(e){return.985*u(e)}}),c("triangle-tee",{points:[-.15,-.3,0,0,.15,-.3,-.15,-.3],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(e,t,n,i,o,a){var u=l(s(this.points,n+2*a,i,o)),c=l(s(this.pointsTee,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,u)||r.pointInsidePolygonPoints(e,t,c)},draw:function(e,n,r,i){var o=s(this.points,n,r,i),a=s(this.pointsTee,n,r,i);t.arrowShapeImpl(this.name)(e,o,a)}}),c("triangle-cross",{points:[-.15,-.3,0,0,.15,-.3,-.15,-.3],crossLinePoints:[-.24175,-.4,.24175,-.4],forceStroke:!0,matchEdgeWidth:!0,scaleCoord:function(e,t,n){return e+.012*n+.001*r.log2(t-28.95)},scaleCrossLineXCoord:function(e,t){return this.scaleCoord(.42,e,t)},scaleCrossLineYCoord:function(e,t){return this.scaleCoord(-.01,e,t)},collide:function(e,t,n,i,o,a){var u=l(s(this.points,n+2*a,i,o)),c=l(s(this.crossLinePoints,n+2*a,i,o));return r.pointInsidePolygonPoints(e,t,u)||r.inLineVicinity(e,t,c[0],c[1],c[2],c[3],a)},draw:function(e,n,r,i,o){var a=[this.crossLinePoints[0]+this.scaleCrossLineXCoord(n,o),this.crossLinePoints[1]-this.scaleCrossLineYCoord(n,o),this.crossLinePoints[2]-this.scaleCrossLineXCoord(n,o),this.crossLinePoints[3]-this.scaleCrossLineYCoord(n,o)],l=s(this.points,n,r,i),u=s(a,n,r,i);t.arrowShapeImpl(this.name)(e,l,u)}}),c("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(e){return.985*u(e)}}),c("circle",{radius:.15,collide:function(e,t,n,r,i,o){var a=i;return Math.pow(a.x-e,2)+Math.pow(a.y-t,2)<=Math.pow((n+2*o)*this.radius,2)},draw:function(e,n,r,i){t.arrowShapeImpl(this.name)(e,i.x,i.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius}}),c("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(e){return 1},gap:function(e){return 1}}),c("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),c("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}})}};t.exports=a},{"../../../is":91,"../../../math":93,"../../../util":108}],58:[function(e,t,n){"use strict";var r=e("../../../../window"),i=e("../../../../math"),o=e("../../../../util"),a=(r=e("../../../../window"),{projectIntoViewport:function(e,t){var n=this.cy,r=this.findContainerClientCoords(),i=r[0],o=r[1],a=n.pan(),s=n.zoom();return[(e-i-a.x)/s,(t-o-a.y)/s]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var e=this.container,t=e.getBoundingClientRect(),n=r.getComputedStyle(e),i=function(e){return parseFloat(n.getPropertyValue(e))},o={left:i("padding-left")+i("border-left-width"),right:i("padding-right")+i("border-right-width"),top:i("padding-top")+i("border-top-width"),bottom:i("padding-bottom")+i("border-bottom-width")};return this.containerBB=[t.left+o.left,t.top+o.top,t.right-t.left-o.left-o.right,t.bottom-t.top-o.top-o.bottom]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,n,r){return this.findNearestElements(e,t,n,r)[0]},findNearestElements:function(e,t,n,r){function a(e,t){if(e.isNode()){if(p)return;p=e,v.push(e)}if(e.isEdge()&&(null==t||t<S))if(d){if(d.pstyle("z-index").value===e.pstyle("z-index").value)for(var n=0;n<v.length;n++)if(v[n].isEdge()){v[n]=e,d=e,S=null!=t?t:S;break}}else v.push(e),d=e,S=null!=t?t:S}function s(n){var r=n.outerWidth()+2*b,i=n.outerHeight()+2*b,o=r/2,s=i/2,l=n.position();if(l.x-o<=e&&e<=l.x+o&&l.y-s<=t&&t<=l.y+s&&h.nodeShapes[f.getNodeShape(n)].checkPoint(e,t,0,r,i,l.x,l.y))return a(n,0),!0}function l(n){var r,o=n._private,l=o.rscratch,u=n.pstyle("width").pfValue,c=n.pstyle("arrow-scale").value,d=u/2+C,p=d*d,g=2*d,m=o.source,b=o.target;if("segments"===l.edgeType||"straight"===l.edgeType||"haystack"===l.edgeType){for(var x=l.allpts,S=0;S+3<x.length;S+=2)if(i.inLineVicinity(e,t,x[S],x[S+1],x[S+2],x[S+3],g)&&p>(r=i.sqdistToFiniteLine(e,t,x[S],x[S+1],x[S+2],x[S+3])))return a(n,r),!0}else if("bezier"===l.edgeType||"multibezier"===l.edgeType||"self"===l.edgeType||"compound"===l.edgeType)for(x=l.allpts,S=0;S+5<l.allpts.length;S+=4)if(i.inBezierVicinity(e,t,x[S],x[S+1],x[S+2],x[S+3],x[S+4],x[S+5],g)&&p>(r=i.sqdistToQuadraticBezier(e,t,x[S],x[S+1],x[S+2],x[S+3],x[S+4],x[S+5])))return a(n,r),!0;m=m||o.source,b=b||o.target;var E=f.getArrowWidth(u,c),w=[{name:"source",x:l.arrowStartX,y:l.arrowStartY,angle:l.srcArrowAngle},{name:"target",x:l.arrowEndX,y:l.arrowEndY,angle:l.tgtArrowAngle},{name:"mid-source",x:l.midX,y:l.midY,angle:l.midsrcArrowAngle},{name:"mid-target",x:l.midX,y:l.midY,angle:l.midtgtArrowAngle}];for(S=0;S<w.length;S++){var O=w[S],_=h.arrowShapes[n.pstyle(O.name+"-arrow-shape").value];if(_.roughCollide(e,t,E,O.angle,{x:O.x,y:O.y},C)&&_.collide(e,t,E,O.angle,{x:O.x,y:O.y},C))return a(n),!0}y&&v.length>0&&(s(m),s(b))}function u(e,t,n){return o.getPrefixedProperty(e,t,n)}function c(n,r){var o,s=n._private,l=x;o=r?r+"-":"";var c=n.pstyle(o+"label").value;if("yes"===n.pstyle("text-events").strValue&&c){var d=s.rstyle,p=n.pstyle("text-border-width").pfValue,f=n.pstyle("text-background-padding").pfValue,h=u(d,"labelWidth",r)+p+2*l+2*f,g=u(d,"labelHeight",r)+p+2*l+2*f,v=u(d,"labelX",r),m=u(d,"labelY",r),y=u(s.rscratch,"labelAngle",r),C=v-h/2,b=v+h/2,S=m-g/2,E=m+g/2;if(y){var w=Math.cos(y),O=Math.sin(y),_=function(e,t){return{x:(e-=v)*w-(t-=m)*O+v,y:e*O+t*w+m}},L=_(C,S),R=_(C,E),D=_(b,S),N=_(b,E),M=[L.x,L.y,D.x,D.y,N.x,N.y,R.x,R.y];if(i.pointInsidePolygonPoints(e,t,M))return a(n),!0}else{var I={w:h,h:g,x1:C,x2:b,y1:S,y2:E};if(i.inBoundingBox(I,e,t))return a(n),!0}}}var d,p,f=this,h=this,g=h.getCachedZSortedEles(),v=[],m=h.cy.zoom(),y=h.cy.hasCompoundNodes(),C=(r?24:8)/m,b=(r?8:2)/m,x=(r?8:2)/m,S=1/0;n&&(g=g.interactive);for(var E=g.length-1;E>=0;E--){var w=g[E];w.isNode()?s(w)||c(w):l(w)||c(w)||c(w,"source")||c(w,"target")}return v},getAllInBox:function(e,t,n,r){var o=this.getCachedZSortedEles().interactive,a=[],s=Math.min(e,n),l=Math.max(e,n),u=Math.min(t,r),c=Math.max(t,r);e=s,n=l,t=u,r=c;for(var d=i.makeBoundingBox({x1:e,y1:t,x2:n,y2:r}),p=0;p<o.length;p++){var f=o[p];if(f.isNode()){var h=f,g=h.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});i.boundingBoxesIntersect(d,g)&&!i.boundingBoxInBoundingBox(g,d)&&a.push(h)}else{var v=f,m=v._private,y=m.rscratch;if(null!=y.startX&&null!=y.startY&&!i.inBoundingBox(d,y.startX,y.startY))continue;if(null!=y.endX&&null!=y.endY&&!i.inBoundingBox(d,y.endX,y.endY))continue;if("bezier"===y.edgeType||"multibezier"===y.edgeType||"self"===y.edgeType||"compound"===y.edgeType||"segments"===y.edgeType||"haystack"===y.edgeType){for(var C=m.rstyle.bezierPts||m.rstyle.linePts||m.rstyle.haystackPts,b=!0,x=0;x<C.length;x++)if(!i.pointInBoundingBox(d,C[x])){b=!1;break}b&&a.push(v)}else"haystack"!==y.edgeType&&"straight"!==y.edgeType||a.push(v)}}return a}});t.exports=a},{"../../../../math":93,"../../../../util":108,"../../../../window":116}],59:[function(e,t,n){"use strict";var r=e("../../../../math"),i={calculateArrowAngles:function(e){var t,n,i,o,a,s,l=e._private.rscratch,u="haystack"===l.edgeType,c="bezier"===l.edgeType,d="multibezier"===l.edgeType,p="segments"===l.edgeType,f="compound"===l.edgeType,h="self"===l.edgeType;if(u?(i=l.haystackPts[0],o=l.haystackPts[1],a=l.haystackPts[2],s=l.haystackPts[3]):(i=l.arrowStartX,o=l.arrowStartY,a=l.arrowEndX,s=l.arrowEndY),v=l.midX,m=l.midY,p)t=i-l.segpts[0],n=o-l.segpts[1];else if(d||f||h||c){var g=l.allpts;t=i-r.qbezierAt(g[0],g[2],g[4],.1),n=o-r.qbezierAt(g[1],g[3],g[5],.1)}else t=i-v,n=o-m;l.srcArrowAngle=r.getAngleFromDisp(t,n);var v=l.midX,m=l.midY;if(u&&(v=(i+a)/2,m=(o+s)/2),t=a-i,n=s-o,p)if((g=l.allpts).length/2%2==0){var y=(C=g.length/2)-2;t=g[C]-g[y],n=g[C+1]-g[y+1]}else{y=(C=g.length/2-1)-2;var C,b=C+2;t=g[C]-g[y],n=g[C+1]-g[y+1]}else if(d||f||h){var x,S,E,w,g=l.allpts;if(l.ctrlpts.length/2%2==0){var O=2+(_=2+(L=g.length/2-1));x=r.qbezierAt(g[L],g[_],g[O],0),S=r.qbezierAt(g[L+1],g[_+1],g[O+1],0),E=r.qbezierAt(g[L],g[_],g[O],1e-4),w=r.qbezierAt(g[L+1],g[_+1],g[O+1],1e-4)}else{var _,L=(_=g.length/2-1)-2;O=_+2,x=r.qbezierAt(g[L],g[_],g[O],.4999),S=r.qbezierAt(g[L+1],g[_+1],g[O+1],.4999),E=r.qbezierAt(g[L],g[_],g[O],.5),w=r.qbezierAt(g[L+1],g[_+1],g[O+1],.5)}t=E-x,n=w-S}if(l.midtgtArrowAngle=r.getAngleFromDisp(t,n),l.midDispX=t,l.midDispY=n,t*=-1,n*=-1,p&&((g=l.allpts).length/2%2==0||(t=-(g[b=2+(C=g.length/2-1)]-g[C]),n=-(g[b+1]-g[C+1]))),l.midsrcArrowAngle=r.getAngleFromDisp(t,n),p)t=a-l.segpts[l.segpts.length-2],n=s-l.segpts[l.segpts.length-1];else if(d||f||h||c){var R=(g=l.allpts).length;t=a-r.qbezierAt(g[R-6],g[R-4],g[R-2],.9),n=s-r.qbezierAt(g[R-5],g[R-3],g[R-1],.9)}else t=a-v,n=s-m;l.tgtArrowAngle=r.getAngleFromDisp(t,n)}};i.getArrowWidth=i.getArrowHeight=function(e,t){var n=this.arrowWidthCache=this.arrowWidthCache||{},r=n[e+", "+t];return r||(r=Math.max(Math.pow(13.37*e,.9),29)*t,n[e+", "+t]=r,r)},t.exports=i},{"../../../../math":93}],60:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o={findEdgeControlPoints:function(e){if(e&&0!==e.length){for(var t,n=this,o=n.cy.hasCompoundNodes(),a={},s=[],l=[],u=0;u<e.length;u++){var c=(St=(xt=e[u])._private).data,d="unbundled-bezier"===(M=xt.pstyle("curve-style").value)||"segments"===M;if("none"!==xt.pstyle("display").value)if("haystack"!==M){var p=c.source,f=c.target;t=p>f?f+"$-$"+p:p+"$-$"+f,d&&(t="unbundled$-$"+c.id),null==a[t]&&(a[t]=[],s.push(t)),a[t].push(xt),d&&(a[t].hasUnbundled=!0)}else l.push(xt)}for(var h,g,v,m,y=0;y<s.length;y++){var C=a[t=s[y]];if(C.sort((function(e,t){return e.poolIndex()-t.poolIndex()})),_t=C[0]._private.source,Lt=C[0]._private.target,!C.hasUnbundled&&_t.id()>Lt.id()){var b=_t;_t=Lt,Lt=b}_t._private,Lt._private,Rt=_t.position(),Dt=Lt.position(),Nt=_t.outerWidth(),It=_t.outerHeight(),Mt=Lt.outerWidth(),At=Lt.outerHeight(),h=n.nodeShapes[this.getNodeShape(_t)],g=n.nodeShapes[this.getNodeShape(Lt)],m=!1;var x={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0},S=Rt.x,E=Rt.y,w=Nt,O=It,_=Dt.x,L=Dt.y,R=Mt,D=At,N=C.length;for(u=0;u<C.length;u++){var M,I=(wt=(xt=C[u])._private.rscratch).lastEdgeIndex,A=u,P=wt.lastNumEdges,k=(d="unbundled-bezier"===(M=xt.pstyle("curve-style").value)||"segments"===M,xt.pstyle("control-point-distances")),T=xt.pstyle("loop-direction").pfValue,V=xt.pstyle("loop-sweep").pfValue,B=xt.pstyle("control-point-weights"),z=k&&B?Math.min(k.value.length,B.value.length):1,j=xt.pstyle("control-point-step-size").pfValue,F=k?k.pfValue[0]:void 0,G=B.value[0],U=xt.pstyle("edge-distances").value,q=xt.pstyle("segment-weights"),H=xt.pstyle("segment-distances"),W=Math.min(q.pfValue.length,H.pfValue.length),$=wt.lastSrcCtlPtX,X=wt.lastSrcCtlPtY,Y=wt.lastSrcCtlPtW,K=wt.lastSrcCtlPtH,Z=wt.lastTgtCtlPtX,Q=wt.lastTgtCtlPtY,J=wt.lastTgtCtlPtW,ee=wt.lastTgtCtlPtH,te=wt.lastCurveStyle,ne=M,re=wt.lastCtrlptDists,ie=k?k.strValue:null,oe=wt.lastCtrlptWs,ae=B.strValue,se=wt.lastSegmentWs,le=q.strValue,ue=wt.lastSegmentDs,ce=H.strValue,de=wt.lastStepSize,pe=j,fe=wt.lastLoopDir,he=T,ge=wt.lastLoopSwp,ve=V,me=wt.lastEdgeDistances,ye=U;if(wt.badBezier=!!m,$!==S||X!==E||Y!==w||K!==O||Z!==_||Q!==L||J!==R||ee!==D||te!==ne||re!==ie||oe!==ae||se!==le||ue!==ce||de!==pe||fe!==he||ge!==ve||me!==ye||!(I===A&&P===N||d)){if(wt.lastSrcCtlPtX=S,wt.lastSrcCtlPtY=E,wt.lastSrcCtlPtW=w,wt.lastSrcCtlPtH=O,wt.lastTgtCtlPtX=_,wt.lastTgtCtlPtY=L,wt.lastTgtCtlPtW=R,wt.lastTgtCtlPtH=D,wt.lastEdgeIndex=A,wt.lastNumEdges=N,wt.lastCurveStyle=ne,wt.lastCtrlptDists=ie,wt.lastCtrlptWs=ae,wt.lastSegmentDs=ce,wt.lastSegmentWs=le,wt.lastStepSize=pe,wt.lastLoopDir=he,wt.lastLoopSwp=ve,wt.lastEdgeDistances=ye,!C.calculatedIntersection&&(C.length>1&&_t!==Lt||C.hasUnbundled)){C.calculatedIntersection=!0;var Ce=h.intersectLine(Rt.x,Rt.y,Nt,It,Dt.x,Dt.y,0),be=g.intersectLine(Dt.x,Dt.y,Mt,At,Rt.x,Rt.y,0),xe={x1:Ce[0],x2:be[0],y1:Ce[1],y2:be[1]},Se={x1:Rt.x,x2:Dt.x,y1:Rt.y,y2:Dt.y},Ee=be[1]-Ce[1],we=be[0]-Ce[0],Oe=Math.sqrt(we*we+Ee*Ee),_e={x:we,y:Ee},Le={x:_e.x/Oe,y:_e.y/Oe};v={x:-Le.y,y:Le.x},g.checkPoint(Ce[0],Ce[1],0,Mt,At,Dt.x,Dt.y)&&h.checkPoint(be[0],be[1],0,Nt,It,Rt.x,Rt.y)&&(v={},m=!0)}if(wt.srcIntn=Ce,wt.tgtIntn=be,_t===Lt){wt.edgeType="self";var Re=u,De=j;d&&(Re=0,De=F);var Ne=T-Math.PI/2,Me=Ne-V/2,Ie=Ne+V/2,Ae=String(T+"_"+V);Re=void 0===x[Ae]?x[Ae]=0:++x[Ae],wt.ctrlpts=[Rt.x+1.4*Math.cos(Me)*De*(Re/3+1),Rt.y+1.4*Math.sin(Me)*De*(Re/3+1),Rt.x+1.4*Math.cos(Ie)*De*(Re/3+1),Rt.y+1.4*Math.sin(Ie)*De*(Re/3+1)]}else if(o&&(_t.isParent()||_t.isChild()||Lt.isParent()||Lt.isChild())&&(_t.parents().anySame(Lt)||Lt.parents().anySame(_t))){wt.edgeType="compound",wt.badBezier=!1,Re=u,De=j,d&&(Re=0,De=F);var Pe=50,ke={x:Rt.x-Nt/2,y:Rt.y-It/2},Te={x:Dt.x-Mt/2,y:Dt.y-At/2},Ve={x:Math.min(ke.x,Te.x),y:Math.min(ke.y,Te.y)},Be=.5,ze=Math.max(Be,Math.log(.01*Nt)),je=Math.max(Be,Math.log(.01*Mt));wt.ctrlpts=[Ve.x,Ve.y-(1+Math.pow(Pe,1.12)/100)*De*(Re/3+1)*ze,Ve.x-(1+Math.pow(Pe,1.12)/100)*De*(Re/3+1)*je,Ve.y]}else if("segments"===M){wt.edgeType="segments",wt.segpts=[];for(var Fe=0;Fe<W;Fe++){var Ge=q.pfValue[Fe],Ue=H.pfValue[Fe],qe=1-Ge,He=Ge,We={x:(Qe="node-position"===U?Se:xe).x1*qe+Qe.x2*He,y:Qe.y1*qe+Qe.y2*He};wt.segpts.push(We.x+v.x*Ue,We.y+v.y*Ue)}}else if(C.length%2!=1||u!==Math.floor(C.length/2)||d){var $e=d;wt.edgeType=$e?"multibezier":"bezier",wt.ctrlpts=[];for(var Xe=0;Xe<z;Xe++){var Ye,Ke=(.5-C.length/2+u)*j,Ze=r.signum(Ke);$e&&(F=k?k.pfValue[Xe]:j,G=B.value[Xe]);var Qe,Je=void 0!==(Ye=d?F:void 0!==F?Ze*F:void 0)?Ye:Ke;qe=1-G,He=G,We={x:(Qe="node-position"===U?Se:xe).x1*qe+Qe.x2*He,y:Qe.y1*qe+Qe.y2*He},wt.ctrlpts.push(We.x+v.x*Je,We.y+v.y*Je)}}else wt.edgeType="straight";this.findEndpoints(xt);var et=!i.number(wt.startX)||!i.number(wt.startY),tt=!i.number(wt.arrowStartX)||!i.number(wt.arrowStartY),nt=!i.number(wt.endX)||!i.number(wt.endY),rt=!i.number(wt.arrowEndX)||!i.number(wt.arrowEndY),it=this.getArrowWidth(xt.pstyle("width").pfValue,xt.pstyle("arrow-scale").value)*this.arrowShapeWidth*3;if("bezier"===wt.edgeType){var ot=r.dist({x:wt.ctrlpts[0],y:wt.ctrlpts[1]},{x:wt.startX,y:wt.startY}),at=ot<it,st=r.dist({x:wt.ctrlpts[0],y:wt.ctrlpts[1]},{x:wt.endX,y:wt.endY}),lt=st<it,ut=!1;if(et||tt||at){ut=!0;var ct={x:wt.ctrlpts[0]-Rt.x,y:wt.ctrlpts[1]-Rt.y},dt=Math.sqrt(ct.x*ct.x+ct.y*ct.y),pt={x:ct.x/dt,y:ct.y/dt},ft=Math.max(Nt,It),ht={x:wt.ctrlpts[0]+2*pt.x*ft,y:wt.ctrlpts[1]+2*pt.y*ft},gt=h.intersectLine(Rt.x,Rt.y,Nt,It,ht.x,ht.y,0);at?(wt.ctrlpts[0]=wt.ctrlpts[0]+pt.x*(it-ot),wt.ctrlpts[1]=wt.ctrlpts[1]+pt.y*(it-ot)):(wt.ctrlpts[0]=gt[0]+pt.x*it,wt.ctrlpts[1]=gt[1]+pt.y*it)}if(nt||rt||lt){ut=!0,ct={x:wt.ctrlpts[0]-Dt.x,y:wt.ctrlpts[1]-Dt.y},dt=Math.sqrt(ct.x*ct.x+ct.y*ct.y),pt={x:ct.x/dt,y:ct.y/dt},ft=Math.max(Nt,It),ht={x:wt.ctrlpts[0]+2*pt.x*ft,y:wt.ctrlpts[1]+2*pt.y*ft};var vt=g.intersectLine(Dt.x,Dt.y,Mt,At,ht.x,ht.y,0);lt?(wt.ctrlpts[0]=wt.ctrlpts[0]+pt.x*(it-st),wt.ctrlpts[1]=wt.ctrlpts[1]+pt.y*(it-st)):(wt.ctrlpts[0]=vt[0]+pt.x*it,wt.ctrlpts[1]=vt[1]+pt.y*it)}ut&&this.findEndpoints(xt)}if("multibezier"===wt.edgeType||"bezier"===wt.edgeType||"self"===wt.edgeType||"compound"===wt.edgeType){for(wt.allpts=[],wt.allpts.push(wt.startX,wt.startY),Xe=0;Xe+1<wt.ctrlpts.length;Xe+=2)wt.allpts.push(wt.ctrlpts[Xe],wt.ctrlpts[Xe+1]),Xe+3<wt.ctrlpts.length&&wt.allpts.push((wt.ctrlpts[Xe]+wt.ctrlpts[Xe+2])/2,(wt.ctrlpts[Xe+1]+wt.ctrlpts[Xe+3])/2);var mt,yt;wt.allpts.push(wt.endX,wt.endY),wt.ctrlpts.length/2%2==0?(mt=wt.allpts.length/2-1,wt.midX=wt.allpts[mt],wt.midY=wt.allpts[mt+1]):(mt=wt.allpts.length/2-3,yt=.5,wt.midX=r.qbezierAt(wt.allpts[mt],wt.allpts[mt+2],wt.allpts[mt+4],yt),wt.midY=r.qbezierAt(wt.allpts[mt+1],wt.allpts[mt+3],wt.allpts[mt+5],yt))}else if("straight"===wt.edgeType)wt.allpts=[wt.startX,wt.startY,wt.endX,wt.endY],wt.midX=(wt.startX+wt.endX+wt.arrowStartX+wt.arrowEndX)/4,wt.midY=(wt.startY+wt.endY+wt.arrowStartY+wt.arrowEndY)/4;else if("segments"===wt.edgeType)if(wt.allpts=[],wt.allpts.push(wt.startX,wt.startY),wt.allpts.push.apply(wt.allpts,wt.segpts),wt.allpts.push(wt.endX,wt.endY),wt.segpts.length%4==0){var Ct=wt.segpts.length/2,bt=Ct-2;wt.midX=(wt.segpts[bt]+wt.segpts[Ct])/2,wt.midY=(wt.segpts[bt+1]+wt.segpts[Ct+1])/2}else bt=wt.segpts.length/2-1,wt.midX=wt.segpts[bt],wt.midY=wt.segpts[bt+1];this.storeEdgeProjections(xt),this.calculateArrowAngles(xt),this.recalculateEdgeLabelProjections(xt),this.calculateLabelAngles(xt)}}}for(u=0;u<l.length;u++){var xt,St,Et=(St=(xt=l[u])._private).rscratch,wt=Et;if(!Et.haystack){var Ot=2*Math.random()*Math.PI;Et.source={x:Math.cos(Ot),y:Math.sin(Ot)},Ot=2*Math.random()*Math.PI,Et.target={x:Math.cos(Ot),y:Math.sin(Ot)}}var _t=St.source,Lt=St.target,Rt=_t.position(),Dt=Lt.position(),Nt=_t.width(),Mt=Lt.width(),It=_t.height(),At=Lt.height(),Pt=(ft=xt.pstyle("haystack-radius").value)/2;wt.haystackPts=wt.allpts=[wt.source.x*Nt*Pt+Rt.x,wt.source.y*It*Pt+Rt.y,wt.target.x*Mt*Pt+Dt.x,wt.target.y*At*Pt+Dt.y],wt.midX=(wt.allpts[0]+wt.allpts[2])/2,wt.midY=(wt.allpts[1]+wt.allpts[3])/2,Et.edgeType="haystack",Et.haystack=!0,this.storeEdgeProjections(xt),this.calculateArrowAngles(xt),this.recalculateEdgeLabelProjections(xt),this.calculateLabelAngles(xt)}}}};t.exports=o},{"../../../../is":91,"../../../../math":93}],61:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o={manualEndptToPx:function(e,t){var n=this,r=e.position(),i=e.outerWidth(),o=e.outerHeight();if(2===t.value.length){var a=[t.pfValue[0],t.pfValue[1]];return"%"===t.units[0]&&(a[0]=a[0]*i),"%"===t.units[1]&&(a[1]=a[1]*o),a[0]+=r.x,a[1]+=r.y,a}var s=t.pfValue[0];s=-Math.PI/2+s;var l=2*Math.max(i,o);return a=[r.x+Math.cos(s)*l,r.y+Math.sin(s)*l],n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x,r.y,i,o,a[0],a[1],0)},findEndpoints:function(e){var t,n,o,a,s,l=this,u=e.source()[0],c=e.target()[0],d=u.position(),p=c.position(),f=e.pstyle("target-arrow-shape").value,h=e.pstyle("source-arrow-shape").value,g=e.pstyle("target-distance-from-node").pfValue,v=e.pstyle("source-distance-from-node").pfValue,m=e._private.rscratch,y=m.edgeType,C="bezier"===y||"multibezier"===y||"self"===y||"compound"===y,b="bezier"!==y,x="straight"===y||"segments"===y,S="segments"===y,E=C||b||x,w=e.pstyle("source-endpoint"),O=e.pstyle("target-endpoint");if(m.srcManEndpt=w,m.tgtManEndpt=O,C){var _=[m.ctrlpts[0],m.ctrlpts[1]];n=b?[m.ctrlpts[m.ctrlpts.length-2],m.ctrlpts[m.ctrlpts.length-1]]:_,o=_}else if(x){var L=S?m.segpts.slice(0,2):[p.x,p.y];n=S?m.segpts.slice(m.segpts.length-2):[d.x,d.y],o=L}"inside-to-node"===O.value?t=[p.x,p.y]:O.units?t=this.manualEndptToPx(c,O):"outside-to-line"===O.value?t=m.tgtIntn:("outside-to-node"===O.value?a=n:"outside-to-line"===O.value&&(a=[d.x,d.y]),t=l.nodeShapes[this.getNodeShape(c)].intersectLine(p.x,p.y,c.outerWidth(),c.outerHeight(),a[0],a[1],0));var R=r.shortenIntersection(t,n,l.arrowShapes[f].spacing(e)+g),D=r.shortenIntersection(t,n,l.arrowShapes[f].gap(e)+g);m.endX=D[0],m.endY=D[1],m.arrowEndX=R[0],m.arrowEndY=R[1],"inside-to-node"===w.value?t=[d.x,d.y]:w.units?t=this.manualEndptToPx(u,w):"outside-to-line"===w.value?t=m.srcIntn:("outside-to-node"===w.value?s=o:"outside-to-line"===w.value&&(s=[p.x,p.y]),t=l.nodeShapes[this.getNodeShape(u)].intersectLine(d.x,d.y,u.outerWidth(),u.outerHeight(),s[0],s[1],0));var N=r.shortenIntersection(t,o,l.arrowShapes[h].spacing(e)+v),M=r.shortenIntersection(t,o,l.arrowShapes[h].gap(e)+v);m.startX=M[0],m.startY=M[1],m.arrowStartX=N[0],m.arrowStartY=N[1],E&&(i.number(m.startX)&&i.number(m.startY)&&i.number(m.endX)&&i.number(m.endY)?m.badLine=!1:m.badLine=!0)}};t.exports=o},{"../../../../is":91,"../../../../math":93}],62:[function(e,t,n){"use strict";function r(e,t,n){for(var r=function(e,t,n,r){return i.qbezierAt(e,t,n,r)},o=t._private.rstyle.bezierPts,a=0;a<e.bezierProjPcts.length;a++){var s=e.bezierProjPcts[a];o.push({x:r(n[0],n[2],n[4],s),y:r(n[1],n[3],n[5],s)})}}var i=e("../../../../math"),o={storeEdgeProjections:function(e){var t=e._private,n=t.rscratch,i=n.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===i||"bezier"===i||"self"===i||"compound"===i)for(var o=(t.rstyle.bezierPts=[],0);o+5<n.allpts.length;o+=4)r(this,e,n.allpts.slice(o,o+6));else if("segments"===i){var a=t.rstyle.linePts=[];for(o=0;o+1<n.allpts.length;o+=2)a.push({x:n.allpts[o],y:n.allpts[o+1]})}else if("haystack"===i){var s=n.haystackPts;t.rstyle.haystackPts=[{x:s[0],y:s[1]},{x:s[2],y:s[3]}]}t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},recalculateEdgeProjections:function(e){this.findEdgeControlPoints(e)}};t.exports=o},{"../../../../math":93}],63:[function(e,t,n){"use strict";var r=e("../../../../util"),i={};[e("./coords"),e("./edge-arrows"),e("./edge-control-points"),e("./edge-endpoints"),e("./edge-projection"),e("./labels"),e("./nodes"),e("./rendered-style"),e("./z-ordering")].forEach((function(e){r.extend(i,e)})),t.exports=i},{"../../../../util":108,"./coords":58,"./edge-arrows":59,"./edge-control-points":60,"./edge-endpoints":61,"./edge-projection":62,"./labels":64,"./nodes":65,"./rendered-style":66,"./z-ordering":67}],64:[function(e,t,n){"use strict";var r=e("../../../../math"),i=e("../../../../is"),o=e("../../../../util"),a={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!i.emptyString(t)){var n,r,o=e._private,a=e.width(),s=e.height(),l=e.padding(),u=e.position(),c=e.pstyle("text-halign").strValue,d=e.pstyle("text-valign").strValue,p=o.rscratch,f=o.rstyle;switch(c){case"left":n=u.x-a/2-l;break;case"right":n=u.x+a/2+l;break;default:n=u.x}switch(d){case"top":r=u.y-s/2-l;break;case"bottom":r=u.y+s/2+l;break;default:r=u.y}p.labelX=n,p.labelY=r,f.labelX=n,f.labelY=r,this.applyLabelDimensions(e)}},recalculateEdgeLabelProjections:function(e){var t,n=e._private,i=n.rscratch,a=this,s={mid:e.pstyle("label").strValue,source:e.pstyle("source-label").strValue,target:e.pstyle("target-label").strValue};if(s.mid||s.source||s.target){t={x:i.midX,y:i.midY};var l=function(e,t,r){o.setPrefixedProperty(n.rscratch,e,t,r),o.setPrefixedProperty(n.rstyle,e,t,r)};l("labelX",null,t.x),l("labelY",null,t.y);var u=function(){function e(e,t,n,i,o){var a=r.dist(t,n),s=e.segments[e.segments.length-1],l={p0:t,p1:n,t0:i,t1:o,startDist:s?s.startDist+s.length:0,length:a};e.segments.push(l),e.length+=a}if(u.cache)return u.cache;for(var t=[],o=0;o+5<i.allpts.length;o+=4){var s={x:i.allpts[o],y:i.allpts[o+1]},l={x:i.allpts[o+2],y:i.allpts[o+3]},c={x:i.allpts[o+4],y:i.allpts[o+5]};t.push({p0:s,p1:l,p2:c,startDist:0,length:0,segments:[]})}var d=n.rstyle.bezierPts,p=a.bezierProjPcts.length;for(o=0;o<t.length;o++){var f=t[o],h=t[o-1];h&&(f.startDist=h.startDist+h.length),e(f,f.p0,d[o*p],0,a.bezierProjPcts[0]);for(var g=0;g<p-1;g++)e(f,d[o*p+g],d[o*p+g+1],a.bezierProjPcts[g],a.bezierProjPcts[g+1]);e(f,d[o*p+p-1],f.p2,a.bezierProjPcts[p-1],1)}return u.cache=t},c=function(n){var o,a="source"===n;if(s[n]){var c=e.pstyle(n+"-text-offset").pfValue,d=function(e,t){var n=t.x-e.x,r=t.y-e.y;return Math.atan(r/n)},p=function(e,t,n,i){var o=r.bound(0,i-.001,1),a=r.bound(0,i+.001,1),s=r.qbezierPtAt(e,t,n,o),l=r.qbezierPtAt(e,t,n,a);return d(s,l)};switch(i.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var f,h=u(),g=0,v=0,m=0;m<h.length;m++){for(var y=h[a?m:h.length-1-m],C=0;C<y.segments.length;C++){var b=y.segments[a?C:y.segments.length-1-C],x=m===h.length-1&&C===y.segments.length-1;if(g=v,(v+=b.length)>=c||x){f={cp:y,segment:b};break}}if(f)break}y=f.cp;var S=(c-g)/(b=f.segment).length,E=b.t1-b.t0,w=a?b.t0+E*S:b.t1-E*S;w=r.bound(0,w,1),t=r.qbezierPtAt(y.p0,y.p1,y.p2,w),o=p(y.p0,y.p1,y.p2,w,t);break;case"straight":case"segments":case"haystack":var O,_,L,R,D=0,N=i.allpts.length;for(m=0;m+3<N&&(a?(L={x:i.allpts[m],y:i.allpts[m+1]},R={x:i.allpts[m+2],y:i.allpts[m+3]}):(L={x:i.allpts[N-2-m],y:i.allpts[N-1-m]},R={x:i.allpts[N-4-m],y:i.allpts[N-3-m]}),_=D,!((D+=O=r.dist(L,R))>=c));m+=2);w=(c-_)/O,w=r.bound(0,w,1),t=r.lineAt(L,R,w),o=d(L,R)}l("labelX",n,t.x),l("labelY",n,t.y),l("labelAutoAngle",n,o)}};c("source"),c("target"),this.applyLabelDimensions(e)}},applyLabelDimensions:function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},applyPrefixedLabelDimensions:function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r);o.setPrefixedProperty(n.rstyle,"labelWidth",t,i.width),o.setPrefixedProperty(n.rscratch,"labelWidth",t,i.width),o.setPrefixedProperty(n.rstyle,"labelHeight",t,i.height),o.setPrefixedProperty(n.rscratch,"labelHeight",t,i.height)},getLabelText:function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,a=e.pstyle("text-transform").value,s=function(e,r){return r?(o.setPrefixedProperty(n.rscratch,e,t,r),r):o.getPrefixedProperty(n.rscratch,e,t)};"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var l=e.pstyle("text-wrap").value;if("wrap"===l){var u=s("labelKey");if(u&&s("labelWrapKey")===u)return s("labelWrapCachedText");for(var c=i.split("\n"),d=e.pstyle("text-max-width").pfValue,p=[],f=0;f<c.length;f++){var h=c[f];if(this.calculateLabelDimensions(e,h,"line="+h).width>d){for(var g=h.split(/\s+/),v="",m=0;m<g.length;m++){var y=g[m],C=0===v.length?y:v+" "+y;this.calculateLabelDimensions(e,C,"testLine="+C).width<=d?v+=y+" ":(p.push(v),v=y+" ")}v.match(/^\s+$/)||p.push(v)}else p.push(h)}s("labelWrapCachedLines",p),i=s("labelWrapCachedText",p.join("\n")),s("labelWrapKey",u)}else if("ellipsis"===l){d=e.pstyle("text-max-width").pfValue;for(var b="",x="…",S=!1,E=0;E<i.length&&!(this.calculateLabelDimensions(e,b+i[E]+x).width>d);E++)b+=i[E],E===i.length-1&&(S=!0);return S||(b+=x),b}return i},calculateLabelDimensions:function(e,t,n){var r=this,i=e._private.labelStyleKey+"$@$"+t;n&&(i+="$@$"+n);var o=r.labelDimCache||(r.labelDimCache={});if(o[i])return o[i];var a=1,s=e.pstyle("font-style").strValue,l=a*e.pstyle("font-size").pfValue+"px",u=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,d=this.labelCalcDiv;d||(d=this.labelCalcDiv=document.createElement("div"),document.body.appendChild(d));var p=d.style;return p.fontFamily=u,p.fontStyle=s,p.fontSize=l,p.fontWeight=c,p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none",p.padding="0",p.lineHeight="1","wrap"===e.pstyle("text-wrap").value?p.whiteSpace="pre":p.whiteSpace="normal",d.textContent=t,o[i]={width:Math.ceil(d.clientWidth/a),height:Math.ceil(d.clientHeight/a)},o[i]},calculateLabelAngles:function(e){var t=e._private.rscratch,n=e.isEdge(),r=e.pstyle("text-rotation"),i=r.strValue;"none"===i?t.labelAngle=t.sourceLabelAngle=t.targetLabelAngle=0:n&&"autorotate"===i?(t.labelAngle=Math.atan(t.midDispY/t.midDispX),t.sourceLabelAngle=t.sourceLabelAutoAngle,t.targetLabelAngle=t.targetLabelAutoAngle):t.labelAngle=t.sourceLabelAngle=t.targetLabelAngle="autorotate"===i?0:r.pfValue}};t.exports=a},{"../../../../is":91,"../../../../math":93,"../../../../util":108}],65:[function(e,t,n){"use strict";var r={getNodeShape:function(e){var t=this,n=e.pstyle("shape").value;if(e.isParent())return"rectangle"===n||"roundrectangle"===n||"cutrectangle"===n?n:"rectangle";if("polygon"===n){var r=e.pstyle("shape-polygon-points").value;return t.nodeShapes.makePolygon(r).name}return n}};t.exports=r},{}],66:[function(e,t,n){"use strict";var r={registerCalculationListeners:function(){var e=this.cy,t=e.collection(),n=this,r=function(e,n,r){if(t.merge(e),!0===r||void 0===r)for(var i=0;i<e.length;i++){var o=e[i]._private,a=o.rstyle;a.clean=!1,o.bbCache=null;var s=a.dirtyEvents=a.dirtyEvents||{length:0};s[n.type]||(s[n.type]=!0,s.length++)}};n.binder(e).on("position.* style.* free.* bounds.*","node",(function(e){var t=e.target;r(t,e),r(t.connectedEdges(),e)})).on("add.*","node",(function(e){var t=e.target;r(t,e)})).on("background.*","node",(function(e){var t=e.target;r(t,e,!1)})).on("add.* style.*","edge",(function(e){var t=e.target;r(t,e),r(t.parallelEdges(),e)})).on("remove.*","edge",(function(e){for(var t=e.target.parallelEdges(),n=0;n<t.length;n++){var i=t[n];i.removed()||r(i,e)}})).on("dirty.*","node",(function(e){var t=e.target;r(t,e)}));var i=function(r){if(r){var i=n.onUpdateEleCalcsFns;if(i)for(var o=0;o<i.length;o++)(0,i[o])(r,t);for(n.recalculateRenderedStyle(t,!1),o=0;o<t.length;o++)t[o]._private.rstyle.dirtyEvents=null;t=e.collection()}};n.beforeRender(i,n.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},recalculateRenderedStyle:function(e,t){var n=[],r=[];if(!this.destroyed){void 0===t&&(t=!0);for(var i=0;i<e.length;i++){var o=(l=(s=e[i])._private).rstyle;t&&o.clean||s.removed()||"none"!==s.pstyle("display").value&&("nodes"===l.group?r.push(s):n.push(s),o.clean=!0)}for(i=0;i<r.length;i++){o=(l=(s=r[i])._private).rstyle;var a=s.position();this.recalculateNodeLabelProjection(s),o.nodeX=a.x,o.nodeY=a.y,o.nodeW=s.pstyle("width").pfValue,o.nodeH=s.pstyle("height").pfValue}for(this.recalculateEdgeProjections(n),i=0;i<n.length;i++){o=(l=(s=n[i])._private).rstyle;var s,l,u=l.rscratch;this.recalculateEdgeLabelProjections(s),o.srcX=u.arrowStartX,o.srcY=u.arrowStartY,o.tgtX=u.arrowEndX,o.tgtY=u.arrowEndY,o.midX=u.midX,o.midY=u.midY,o.labelAngle=u.labelAngle,o.sourceLabelAngle=u.sourceLabelAngle,o.targetLabelAngle=u.targetLabelAngle}}}};t.exports=r},{}],67:[function(e,t,n){"use strict";var r=e("../../../../collection/zsort"),i={updateCachedGrabbedEles:function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],n=0;n<e.length;n++){var r=(i=e[n])._private.rscratch;i.grabbed()&&!i.isParent()?t.push(i):r.inDragLayer?e.drag.push(i):e.nondrag.push(i)}for(n=0;n<t.length;n++){var i=t[n];e.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){if(e||!this.cachedZSortedEles){var t=this.cy.mutableElements().toArray();t.sort(r),t.interactive=t.filter((function(e){return e.interactive()})),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()}else t=this.cachedZSortedEles;return t}};t.exports=i},{"../../../../collection/zsort":32}],68:[function(e,t,n){"use strict";var r={getCachedImage:function(e,t,n){var r=this,i=r.imageCache=r.imageCache||{},o=i[e];if(o)return o.image.complete||o.image.addEventListener("load",n),o.image;var a=(o=i[e]=i[e]||{}).image=new Image;a.addEventListener("load",n);var s="data:";return e.substring(0,s.length).toLowerCase()===s||(a.crossOrigin=t),a.src=e,a}};t.exports=r},{}],69:[function(e,t,n){"use strict";var r=e("../../../is"),i=e("../../../util"),o=e("../../../window"),a=function(e){this.init(e)},s=a,l=s.prototype;l.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],l.init=function(e){var t=this;t.options=e,t.cy=e.cy;var n=t.container=e.cy.container();if(o){var r=o.document,a=r.head,s="__________cytoscape_stylesheet",l="__________cytoscape_container",u=null!=r.getElementById(s);if(n.className=(n.className||"")+" "+l,!u){var c=r.createElement("style");c.id=s,c.innerHTML="."+l+" { position: relative; }",a.insertBefore(c,a.children[0])}"static"===o.getComputedStyle(n).getPropertyValue("position")&&i.error("A Cytoscape container has style position:static and so can not use UI extensions properly")}t.selection=[void 0,void 0,void 0,void 0,0],t.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],t.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},t.dragData={possibleDragElements:[]},t.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},t.redraws=0,t.showFps=e.showFps,t.debug=e.debug,t.hideEdgesOnViewport=e.hideEdgesOnViewport,t.hideLabelsOnViewport=e.hideLabelsOnViewport,t.textureOnViewport=e.textureOnViewport,t.wheelSensitivity=e.wheelSensitivity,t.motionBlurEnabled=e.motionBlur,t.forcedPixelRatio=e.pixelRatio,t.motionBlur=e.motionBlur,t.motionBlurOpacity=e.motionBlurOpacity,t.motionBlurTransparency=1-t.motionBlurOpacity,t.motionBlurPxRatio=1,t.mbPxRBlurry=1,t.minMbLowQualFrames=4,t.fullQualityMb=!1,t.clearedForMotionBlur=[],t.desktopTapThreshold=e.desktopTapThreshold,t.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,t.touchTapThreshold=e.touchTapThreshold,t.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,t.tapholdDuration=500,t.bindings=[],t.beforeRenderCallbacks=[],t.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:100},t.registerNodeShapes(),t.registerArrowShapes(),t.registerCalculationListeners(),t.load()},l.notify=function(e){var t,n=this;if(!this.destroyed){t=r.array(e.type)?e.type:[e.type];for(var i={},o=0;o<t.length;o++)i[t[o]]=!0;if(i.destroy)return void n.destroy();(i.add||i.remove||i.load||i.zorder)&&n.invalidateCachedZSortedEles(),i.viewport&&n.redrawHint("select",!0),(i.load||i.resize)&&(n.invalidateContainerClientCoordsCache(),n.matchCanvasSize(n.container)),n.redrawHint("eles",!0),n.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},l.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var n=e.bindings[t],r=n.target;(r.off||r.removeEventListener).apply(r,n.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch(e){}},[e("./arrow-shapes"),e("./coord-ele-math"),e("./images"),e("./load-listeners"),e("./node-shapes"),e("./redraw")].forEach((function(e){i.extend(l,e)})),t.exports=s},{"../../../is":91,"../../../util":108,"../../../window":116,"./arrow-shapes":57,"./coord-ele-math":63,"./images":68,"./load-listeners":70,"./node-shapes":71,"./redraw":72}],70:[function(e,t,n){"use strict";var r=e("../../../is"),i=e("../../../util"),o=e("../../../math"),a=e("../../../event"),s={registerBinding:function(e,t,n,r){var i=Array.prototype.slice.apply(arguments,[1]),o=this.binder(e);return o.on.apply(o,i)},binder:function(e){var t=this,n=e===window||e===document||e===document.body||r.domElement(e);if(null==t.supportsPassiveEvents){var i=!1;try{var o=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("test",null,o)}catch(e){}t.supportsPassiveEvents=i}var a=function(r,i,o){var a=Array.prototype.slice.call(arguments);return n&&t.supportsPassiveEvents&&(a[2]={capture:null!=o&&o,passive:!1,once:!1}),t.bindings.push({target:e,args:a}),(e.addEventListener||e.on).apply(e,a),this};return{on:a,addEventListener:a,addListener:a,bind:a}},nodeIsDraggable:function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},nodeIsGrabbable:function(e){return this.nodeIsDraggable(e)&&e.interactive()},load:function(){var e=this,t=function(t,n,r,o){null==t&&(t=e.cy);for(var s=0;s<n.length;s++){var l=n[s],u=new a(r,i.extend({type:l},o));t.trigger(u)}},n=function(e){return e.shiftKey||e.metaKey||e.ctrlKey},s=function(t,n){var r=!0;if(e.cy.hasCompoundNodes()&&t&&t.isEdge()){for(var i=0;n&&i<n.length;i++)if((t=n[i]).isNode()&&t.isParent()){r=!1;break}}else r=!0;return r},l=function(t){var n;if(t.addToList&&e.cy.hasCompoundNodes()){if(!t.addToList.hasId){t.addToList.hasId={};for(var r=0;r<t.addToList.length;r++){var i=t.addToList[r];t.addToList.hasId[i.id()]=!0}}n=t.addToList.hasId}return n||{}},u=function(e){e[0]._private.grabbed=!0},c=function(e){e[0]._private.grabbed=!1},d=function(e){e[0]._private.rscratch.inDragLayer=!0},p=function(e){e[0]._private.rscratch.inDragLayer=!1},f=function(e){e[0]._private.rscratch.isGrabTarget=!0},h=function(e){e[0]._private.rscratch.isGrabTarget=!1},g=function(e,t){var n=l(t);n[e.id()]||(t.addToList.push(e),n[e.id()]=!0,u(e))},v=function(e,t){if(e.cy().hasCompoundNodes()&&(null!=t.inDragLayer||null!=t.addToList)){var n=e.descendants();t.inDragLayer&&(n.forEach(d),n.connectedEdges().forEach(d)),t.addToList&&n.forEach((function(e){g(e,t)}))}},m=function(t,n){n=n||{};var r=t.cy().hasCompoundNodes();n.inDragLayer&&(t.forEach(d),t.neighborhood().stdFilter((function(e){return!r||e.isEdge()})).forEach(d)),n.addToList&&t.forEach((function(e){g(e,n)})),v(t,n),b(t,{inDragLayer:n.inDragLayer}),e.updateCachedGrabbedEles()},y=m,C=function(t){t&&(t.hasId={},e.getCachedZSortedEles().forEach((function(e){c(e),p(e),h(e)})),e.updateCachedGrabbedEles())},b=function(e,t){if((null!=t.inDragLayer||null!=t.addToList)&&e.cy().hasCompoundNodes()){var n=e.ancestors().orphans();if(!n.same(e)){var r=n.descendants().spawnSelf().merge(n).unmerge(e).unmerge(e.descendants()),i=r.connectedEdges();t.inDragLayer&&(i.forEach(d),r.forEach(d)),t.addToList&&r.forEach((function(e){g(e,t)}))}}},x="undefined"!=typeof MutationObserver;x?(e.removeObserver=new MutationObserver((function(t){for(var n=0;n<t.length;n++){var r=t[n].removedNodes;if(r)for(var i=0;i<r.length;i++)if(r[i]===e.container){e.destroy();break}}})),e.container.parentNode&&e.removeObserver.observe(e.container.parentNode,{childList:!0})):e.registerBinding(e.container,"DOMNodeRemoved",(function(t){e.destroy()}));var S=i.debounce((function(){e.cy.resize()}),100);x&&(e.styleObserver=new MutationObserver(S),e.styleObserver.observe(e.container,{attributes:!0})),e.registerBinding(window,"resize",S);for(var E=function(t){e.registerBinding(t,"scroll",(function(t){e.invalidateContainerClientCoordsCache()}))},w=e.cy.container();E(w),w.parentNode;)w=w.parentNode;e.registerBinding(e.container,"contextmenu",(function(e){e.preventDefault()}));var O=function(){return 0!==e.selection[4]},_=function(t){for(var n=e.findContainerClientCoords(),r=n[0],i=n[1],o=n[2],a=n[3],s=t.touches?t.touches:[t],l=!1,u=0;u<s.length;u++){var c=s[u];if(r<=c.clientX&&c.clientX<=r+o&&i<=c.clientY&&c.clientY<=i+a){l=!0;break}}if(!l)return!1;for(var d=e.container,p=t.target.parentNode,f=!1;p;){if(p===d){f=!0;break}p=p.parentNode}return!!f};e.registerBinding(e.container,"mousedown",(function(n){if(_(n)){n.preventDefault(),e.hoverData.capture=!0,e.hoverData.which=n.which;var r=e.cy,i=[n.clientX,n.clientY],o=e.projectIntoViewport(i[0],i[1]),s=e.selection,l=e.findNearestElements(o[0],o[1],!0,!1),u=l[0],c=e.dragData.possibleDragElements;e.hoverData.mdownPos=o,e.hoverData.mdownGPos=i;var d=function(){e.hoverData.tapholdCancelled=!1,clearTimeout(e.hoverData.tapholdTimeout),e.hoverData.tapholdTimeout=setTimeout((function(){if(!e.hoverData.tapholdCancelled){var t=e.hoverData.down;t?t.trigger(new a(n,{type:"taphold",position:{x:o[0],y:o[1]}})):r.trigger(new a(n,{type:"taphold",position:{x:o[0],y:o[1]}}))}}),e.tapholdDuration)};if(3==n.which){e.hoverData.cxtStarted=!0;var p=new a(n,{type:"cxttapstart",position:{x:o[0],y:o[1]}});u?(u.activate(),u.trigger(p),e.hoverData.down=u):r.trigger(p),e.hoverData.downTime=(new Date).getTime(),e.hoverData.cxtDragged=!1}else if(1==n.which){if(u&&u.activate(),null!=u&&e.nodeIsGrabbable(u)){var h=function(e){return new a(n,{type:e,position:{x:o[0],y:o[1]}})},g=function(e){e.trigger(h("grab"))};if(f(u),u.selected()){c=e.dragData.possibleDragElements=[];var v=r.$((function(t){return t.isNode()&&t.selected()&&e.nodeIsGrabbable(t)}));m(v,{addToList:c}),u.trigger(h("grabon")),v.forEach(g)}else c=e.dragData.possibleDragElements=[],y(u,{addToList:c}),u.trigger(h("grabon")).trigger(h("grab"));e.redrawHint("eles",!0),e.redrawHint("drag",!0)}e.hoverData.down=u,e.hoverData.downs=l,e.hoverData.downTime=(new Date).getTime(),t(u,["mousedown","tapstart","vmousedown"],n,{position:{x:o[0],y:o[1]}}),null==u?(s[4]=1,e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()):u.isEdge()&&(s[4]=1),d()}s[0]=s[2]=o[0],s[1]=s[3]=o[1]}}),!1),e.registerBinding(window,"mousemove",(function(i){if(e.hoverData.capture||_(i)){var l=!1,u=e.cy,c=u.zoom(),d=[i.clientX,i.clientY],p=e.projectIntoViewport(d[0],d[1]),f=e.hoverData.mdownPos,h=e.hoverData.mdownGPos,g=e.selection,v=null;e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.selecting||(v=e.findNearestElement(p[0],p[1],!0,!1));var y,b=e.hoverData.last,x=e.hoverData.down,S=[p[0]-g[2],p[1]-g[3]],E=e.dragData.possibleDragElements;if(h){var w=d[0]-h[0],O=w*w,L=d[1]-h[1],R=O+L*L;e.hoverData.isOverThresholdDrag=y=R>=e.desktopTapThreshold2}var D=n(i);y&&(e.hoverData.tapholdCancelled=!0);var N=function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(S[0]),t.push(S[1])):(t[0]+=S[0],t[1]+=S[1])};l=!0,t(v,["mousemove","vmousemove","tapdrag"],i,{position:{x:p[0],y:p[1]}});var M=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||u.trigger("boxstart"),g[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(y){var I=new a(i,{type:"cxtdrag",position:{x:p[0],y:p[1]}});x?x.trigger(I):u.trigger(I),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&v===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.trigger(new a(i,{type:"cxtdragout",position:{x:p[0],y:p[1]}})),e.hoverData.cxtOver=v,v&&v.trigger(new a(i,{type:"cxtdragover",position:{x:p[0],y:p[1]}})))}}else if(e.hoverData.dragging){if(l=!0,u.panningEnabled()&&u.userPanningEnabled()){var A;if(e.hoverData.justStartedPan){var P=e.hoverData.mdownPos;A={x:(p[0]-P[0])*c,y:(p[1]-P[1])*c},e.hoverData.justStartedPan=!1}else A={x:S[0]*c,y:S[1]*c};u.panBy(A),e.hoverData.dragged=!0}p=e.projectIntoViewport(i.clientX,i.clientY)}else if(1!=g[4]||null!=x&&!x.isEdge()){if(x&&x.isEdge()&&x.active()&&x.unactivate(),x&&x.grabbed()||v==b||(b&&t(b,["mouseout","tapdragout"],i,{position:{x:p[0],y:p[1]}}),v&&t(v,["mouseover","tapdragover"],i,{position:{x:p[0],y:p[1]}}),e.hoverData.last=v),x&&e.nodeIsDraggable(x))if(y)if(u.boxSelectionEnabled()&&D)x&&x.grabbed()&&(C(E),x.trigger("free")),M();else{var k=!e.dragData.didDrag;k&&e.redrawHint("eles",!0),e.dragData.didDrag=!0;var T=[];e.hoverData.draggingEles||m(u.collection(E),{inDragLayer:!0});for(var V=0;V<E.length;V++){var B=E[V];if(e.nodeIsDraggable(B)&&B.grabbed()){var z=B.position();if(T.push(B),r.number(S[0])&&r.number(S[1])){var j=!B.isParent();if(j&&(z.x+=S[0],z.y+=S[1]),k){var F=e.hoverData.dragDelta;j&&F&&r.number(F[0])&&r.number(F[1])&&(z.x+=F[0],z.y+=F[1])}}}}e.hoverData.draggingEles=!0;var G=u.collection(T);G.dirtyCompoundBoundsCache(),G.trigger("position drag"),e.redrawHint("drag",!0),e.redraw()}else N();l=!0}else y&&(e.hoverData.dragging||!u.boxSelectionEnabled()||!D&&u.panningEnabled()&&u.userPanningEnabled()?!e.hoverData.selecting&&u.panningEnabled()&&u.userPanningEnabled()&&s(x,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,g[4]=0,e.data.bgActivePosistion=o.array2point(f),e.redrawHint("select",!0),e.redraw()):M(),x&&x.isEdge()&&x.active()&&x.unactivate());return g[2]=p[0],g[3]=p[1],l?(i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),!1):void 0}}),!1),e.registerBinding(window,"mouseup",(function(r){if(e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,o=e.projectIntoViewport(r.clientX,r.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,d=n(r);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var p=new a(r,{type:"cxttapend",position:{x:o[0],y:o[1]}});if(c?c.trigger(p):i.trigger(p),!e.hoverData.cxtDragged){var f=new a(r,{type:"cxttap",position:{x:o[0],y:o[1]}});c?c.trigger(f):i.trigger(f)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||n(r)||(i.$((function(e){return e.selected()})).unselect(),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=[]),t(l,["mouseup","tapend","vmouseup"],r,{position:{x:o[0],y:o[1]}}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||t(c,["click","tap","vclick"],r,{position:{x:o[0],y:o[1]}}),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||d?l.selected()?l.unselect():l.select():d||(i.$(":selected").unmerge(l).unselect(),l.select())),e.redrawHint("eles",!0)),e.hoverData.selecting){var h=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),h.length>0&&e.redrawHint("eles",!0),i.trigger("boxend");var g=function(e){return e.selectable()&&!e.selected()};"additive"===i.selectionType()||d||i.$(":selected").unmerge(h).unselect(),h.trigger("box").stdFilter(g).select().trigger("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var v=c&&c.grabbed();C(u),v&&c.trigger("free")}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var L=function(t){if(!e.scrollingPage){var n,r=e.cy,i=e.projectIntoViewport(t.clientX,t.clientY),o=[i[0]*r.zoom()+r.pan().x,i[1]*r.zoom()+r.pan().y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||O())return void t.preventDefault();r.panningEnabled()&&r.userPanningEnabled()&&r.zoomingEnabled()&&r.userZoomingEnabled()&&(t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),n=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,n*=e.wheelSensitivity,1===t.deltaMode&&(n*=33),r.zoom({level:r.zoom()*Math.pow(10,n),renderedPosition:{x:o[0],y:o[1]}}))}};e.registerBinding(e.container,"wheel",L,!0),e.registerBinding(window,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.trigger(new a(t,{type:"mouseout",position:{x:n[0],y:n[1]}}))}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.trigger(new a(t,{type:"mouseover",position:{x:n[0],y:n[1]}}))}),!1);var R,D,N,M,I,A,P,k,T,V,B,z,j,F,G,U,q,H=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},W=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",F=function(n){if(_(n)){e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var r=e.cy,i=e.touchData.now,o=e.touchData.earlier;if(n.touches[0]){var s=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);i[0]=s[0],i[1]=s[1]}if(n.touches[1]&&(s=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),i[2]=s[0],i[3]=s[1]),n.touches[2]&&(s=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),i[4]=s[0],i[5]=s[1]),n.touches[1]){C(e.dragData.touchDragEles);var l=e.findContainerClientCoords();T=l[0],V=l[1],B=l[2],z=l[3],R=n.touches[0].clientX-T,D=n.touches[0].clientY-V,N=n.touches[1].clientX-T,M=n.touches[1].clientY-V,j=0<=R&&R<=B&&0<=N&&N<=B&&0<=D&&D<=z&&0<=M&&M<=z;var u=r.pan(),c=r.zoom();I=H(R,D,N,M),A=W(R,D,N,M),k=[((P=[(R+N)/2,(D+M)/2])[0]-u.x)/c,(P[1]-u.y)/c];var d=200;if(A<d*d&&!n.touches[2]){var p=e.findNearestElement(i[0],i[1],!0,!0),h=e.findNearestElement(i[2],i[3],!0,!0);return p&&p.isNode()?(p.activate().trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start=p):h&&h.isNode()?(h.activate().trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start=h):r.trigger(new a(n,{type:"cxttapstart",position:{x:i[0],y:i[1]}})),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(n.touches[2]);else if(n.touches[1]);else if(n.touches[0]){var g=e.findNearestElements(i[0],i[1],!0,!0),v=g[0];if(null!=v&&(v.activate(),e.touchData.start=v,e.touchData.starts=g,e.nodeIsGrabbable(v))){var b=e.dragData.touchDragEles=[],x=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),v.selected()?(x=r.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),m(x,{addToList:b})):y(v,{addToList:b}),f(v);var S=function(e){return new a(n,{type:e,position:{x:i[0],y:i[1]}})};v.trigger(S("grabon")),x?x.forEach((function(e){e.trigger(S("grab"))})):v.trigger(S("grab"))}t(v,["touchstart","tapstart","vmousedown"],n,{position:{x:i[0],y:i[1]}}),null==v&&(e.data.bgActivePosistion={x:s[0],y:s[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||(t(e.touchData.start,["taphold"],n,{position:{x:i[0],y:i[1]}}),e.touchData.start||r.$(":selected").unselect())}),e.tapholdDuration)}if(n.touches.length>=1){for(var E=e.touchData.startPosition=[],w=0;w<i.length;w++)E[w]=o[w]=i[w];var O=n.touches[0];e.touchData.startGPosition=[O.clientX,O.clientY]}}},!1),e.registerBinding(window,"touchmove",G=function(n){var i=e.touchData.capture;if(i||_(n)){var l=e.selection,u=e.cy,c=e.touchData.now,d=e.touchData.earlier,p=u.zoom();if(n.touches[0]){var f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);c[0]=f[0],c[1]=f[1]}n.touches[1]&&(f=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),c[2]=f[0],c[3]=f[1]),n.touches[2]&&(f=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),c[4]=f[0],c[5]=f[1]);var h,g=e.touchData.startGPosition;if(i&&n.touches[0]&&g){for(var v=[],y=0;y<c.length;y++)v[y]=c[y]-d[y];var b=n.touches[0].clientX-g[0],x=b*b,S=n.touches[0].clientY-g[1];h=x+S*S>=e.touchTapThreshold2}if(i&&e.touchData.cxt){n.preventDefault();var E=n.touches[0].clientX-T,w=n.touches[0].clientY-V,O=n.touches[1].clientX-T,L=n.touches[1].clientY-V,P=W(E,w,O,L),B=150,z=1.5;if(P/A>=z*z||P>=B*B){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var F=new a(n,{type:"cxttapend",position:{x:c[0],y:c[1]}});e.touchData.start?(e.touchData.start.unactivate().trigger(F),e.touchData.start=null):u.trigger(F)}}if(i&&e.touchData.cxt){F=new a(n,{type:"cxtdrag",position:{x:c[0],y:c[1]}}),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.trigger(F):u.trigger(F),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var G=e.findNearestElement(c[0],c[1],!0,!0);e.touchData.cxtOver&&G===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.trigger(new a(n,{type:"cxtdragout",position:{x:c[0],y:c[1]}})),e.touchData.cxtOver=G,G&&G.trigger(new a(n,{type:"cxtdragover",position:{x:c[0],y:c[1]}})))}else if(i&&n.touches[2]&&u.boxSelectionEnabled())n.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||u.trigger("boxstart"),e.touchData.selecting=!0,e.redrawHint("select",!0),l&&0!==l.length&&void 0!==l[0]?(l[2]=(c[0]+c[2]+c[4])/3,l[3]=(c[1]+c[3]+c[5])/3):(l[0]=(c[0]+c[2]+c[4])/3,l[1]=(c[1]+c[3]+c[5])/3,l[2]=(c[0]+c[2]+c[4])/3+1,l[3]=(c[1]+c[3]+c[5])/3+1),l[4]=1,e.touchData.selecting=!0,e.redraw();else if(i&&n.touches[1]&&u.zoomingEnabled()&&u.panningEnabled()&&u.userZoomingEnabled()&&u.userPanningEnabled()){if(n.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),re=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var U=0;U<re.length;U++){var q=re[U]._private;q.grabbed=!1,q.rscratch.inDragLayer=!1}}E=n.touches[0].clientX-T,w=n.touches[0].clientY-V,O=n.touches[1].clientX-T,L=n.touches[1].clientY-V;var $=H(E,w,O,L),X=$/I;if(j){var Y=(E-R+(O-N))/2,K=(w-D+(L-M))/2,Z=u.zoom(),Q=Z*X,J=u.pan(),ee=k[0]*Z+J.x,te=k[1]*Z+J.y,ne={x:-Q/Z*(ee-J.x-Y)+ee,y:-Q/Z*(te-J.y-K)+te};if(e.touchData.start&&e.touchData.start.active()){var re=e.dragData.touchDragEles;C(re),e.redrawHint("drag",!0),e.redrawHint("eles",!0),e.touchData.start.unactivate().trigger("free")}u.viewport({zoom:Q,pan:ne,cancelOnFailedZoom:!0}),I=$,R=E,D=w,N=O,M=L,e.pinching=!0}n.touches[0]&&(f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY),c[0]=f[0],c[1]=f[1]),n.touches[1]&&(f=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),c[2]=f[0],c[3]=f[1]),n.touches[2]&&(f=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),c[4]=f[0],c[5]=f[1])}else if(n.touches[0]){var ie=e.touchData.start,oe=e.touchData.last;if(e.hoverData.draggingEles||e.swipePanning||(G=e.findNearestElement(c[0],c[1],!0,!0)),i&&null!=ie&&n.preventDefault(),i&&null!=ie&&e.nodeIsDraggable(ie))if(h){re=e.dragData.touchDragEles;var ae=!e.dragData.didDrag;ae&&m(u.collection(re),{inDragLayer:!0});for(var se=0;se<re.length;se++){var le=re[se];if(e.nodeIsDraggable(le)&&le.grabbed()){e.dragData.didDrag=!0;var ue=le.position(),ce=!le.isParent();if(ce&&r.number(v[0])&&r.number(v[1])&&(ue.x+=v[0],ue.y+=v[1]),ae){e.redrawHint("eles",!0);var de=e.touchData.dragDelta;ce&&de&&r.number(de[0])&&r.number(de[1])&&(ue.x+=de[0],ue.y+=de[1])}}}var pe=u.collection(re);pe.dirtyCompoundBoundsCache(),pe.trigger("position drag"),e.hoverData.draggingEles=!0,e.redrawHint("drag",!0),e.touchData.startPosition[0]==d[0]&&e.touchData.startPosition[1]==d[1]&&e.redrawHint("eles",!0),e.redraw()}else 0===(de=e.touchData.dragDelta=e.touchData.dragDelta||[]).length?(de.push(v[0]),de.push(v[1])):(de[0]+=v[0],de[1]+=v[1]);if(t(ie||G,["touchmove","tapdrag","vmousemove"],n,{position:{x:c[0],y:c[1]}}),ie&&ie.grabbed()||G==oe||(oe&&oe.trigger(new a(n,{type:"tapdragout",position:{x:c[0],y:c[1]}})),G&&G.trigger(new a(n,{type:"tapdragover",position:{x:c[0],y:c[1]}}))),e.touchData.last=G,i)for(U=0;U<c.length;U++)c[U]&&e.touchData.startPosition[U]&&h&&(e.touchData.singleTouchMoved=!0);i&&(null==ie||ie.isEdge())&&u.panningEnabled()&&u.userPanningEnabled()&&(s(ie,e.touchData.starts)&&(n.preventDefault(),e.swipePanning?u.panBy({x:v[0]*p,y:v[1]*p}):h&&(e.swipePanning=!0,u.panBy({x:b*p,y:S*p}),ie&&(ie.unactivate(),e.data.bgActivePosistion||(e.data.bgActivePosistion=o.array2point(e.touchData.startPosition)),e.redrawHint("select",!0),e.touchData.start=null))),f=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY),c[0]=f[0],c[1]=f[1])}for(y=0;y<c.length;y++)d[y]=c[y]}},!1),e.registerBinding(window,"touchcancel",U=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(window,"touchend",q=function(n){var r=e.touchData.start;if(e.touchData.capture){e.touchData.capture=!1,n.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(n.touches[0]){var d=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);u[0]=d[0],u[1]=d[1]}if(n.touches[1]&&(d=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY),u[2]=d[0],u[3]=d[1]),n.touches[2]&&(d=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY),u[4]=d[0],u[5]=d[1]),r&&r.unactivate(),e.touchData.cxt){if(o=new a(n,{type:"cxttapend",position:{x:u[0],y:u[1]}}),r?r.trigger(o):s.trigger(o),!e.touchData.cxtDragged){var p=new a(n,{type:"cxttap",position:{x:u[0],y:u[1]}});r?r.trigger(p):s.trigger(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!n.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var f=s.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),s.trigger("boxend");var h=function(e){return e.selectable()&&!e.selected()};f.trigger("box").stdFilter(h).select().trigger("boxselect"),f.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=r&&r.unactivate(),n.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(n.touches[1]);else if(n.touches[0]);else if(!n.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var g=e.dragData.touchDragEles;if(null!=r){var v=r._private.grabbed;C(g),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&r.trigger("free"),t(r,["touchend","tapend","vmouseup","tapdragout"],n,{position:{x:u[0],y:u[1]}}),r.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(u[0],u[1],!0,!0);t(m,["touchend","tapend","vmouseup","tapdragout"],n,{position:{x:u[0],y:u[1]}})}var y=e.touchData.startPosition[0]-u[0],b=y*y,x=e.touchData.startPosition[1]-u[1],S=(b+x*x)*l*l;null!=r&&!e.dragData.didDrag&&r._private.selectable&&S<e.touchTapThreshold2&&!e.pinching&&("single"===s.selectionType()?(s.$(":selected").unmerge(r).unselect(),r.select()):r.selected()?r.unselect():r.select(),e.redrawHint("eles",!0)),e.touchData.singleTouchMoved||t(r,["tap","vclick"],n,{position:{x:u[0],y:u[1]}}),e.touchData.singleTouchMoved=!0}for(var E=0;E<u.length;E++)c[E]=u[E];e.dragData.didDrag=!1,0===n.touches.length&&(e.touchData.dragDelta=[],e.touchData.startPosition=null,e.touchData.startGPosition=null),n.touches.length<2&&(e.pinching=!1,e.redrawHint("eles",!0),e.redraw())}},!1),"undefined"==typeof TouchEvent){var $=[],X=function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},Y=function(e){return{event:e,touch:X(e)}},K=function(e){$.push(Y(e))},Z=function(e){for(var t=0;t<$.length;t++)if($[t].event.pointerId===e.pointerId)return void $.splice(t,1)},Q=function(e){var t=$.filter((function(t){return t.event.pointerId===e.pointerId}))[0];t.event=e,t.touch=X(e)},J=function(e){e.touches=$.map((function(e){return e.touch}))};e.registerBinding(e.container,"pointerdown",(function(e){"mouse"!==e.pointerType&&(e.preventDefault(),K(e),J(e),F(e))})),e.registerBinding(e.container,"pointerup",(function(e){"mouse"!==e.pointerType&&(Z(e),J(e),q(e))})),e.registerBinding(e.container,"pointercancel",(function(e){"mouse"!==e.pointerType&&(Z(e),J(e),U(e))})),e.registerBinding(e.container,"pointermove",(function(e){"mouse"!==e.pointerType&&(e.preventDefault(),Q(e),J(e),G(e))}))}}};t.exports=s},{"../../../event":45,"../../../is":91,"../../../math":93,"../../../util":108}],71:[function(e,t,n){"use strict";var r=e("../../../math"),i=(e("../../../util"),{});i.generatePolygon=function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl("polygon",e,t,n,r,i,this.points)},intersectLine:function(e,t,n,i,o,a,s){return r.polygonIntersectLine(o,a,this.points,e,t,n/2,i/2,s)},checkPoint:function(e,t,n,i,o,a,s){return r.pointInsidePolygon(e,t,this.points,a,s,i,o,[0,-1],n)}}},i.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,i,o,a,s){return r.intersectLineEllipse(o,a,e,t,n/2+s,i/2+s)},checkPoint:function(e,t,n,r,i,o,a){return e-=o,t-=a,(e/=r/2+n)*e+(t/=i/2+n)*t<=1}}},i.generateRoundRectangle=function(){return this.nodeShapes.roundrectangle={renderer:this,name:"roundrectangle",points:r.generateUnitNgonPointsFitToSquare(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,i,o,a,s){return r.roundRectangleIntersectLine(o,a,e,t,n,i,s)},checkPoint:function(e,t,n,i,o,a,s){var l=r.getRoundRectangleRadius(i,o);if(r.pointInsidePolygon(e,t,this.points,a,s,i,o-2*l,[0,-1],n))return!0;if(r.pointInsidePolygon(e,t,this.points,a,s,i-2*l,o,[0,-1],n))return!0;var u=function(e,t,n,r,i,o,a){return e-=n,t-=r,(e/=i/2+a)*e+(t/=o/2+a)*t<=1};return!!(u(e,t,a-i/2+l,s-o/2+l,2*l,2*l,n)||u(e,t,a+i/2-l,s-o/2+l,2*l,2*l,n)||u(e,t,a+i/2-l,s+o/2-l,2*l,2*l,n)||u(e,t,a-i/2+l,s+o/2-l,2*l,2*l,n))}}},i.generateCutRectangle=function(){return this.nodeShapes.cutrectangle={renderer:this,name:"cutrectangle",cornerLength:r.getCutRectangleCornerLength(),points:r.generateUnitNgonPointsFitToSquare(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},generateCutTrianglePts:function(e,t,n,r){var i=this.cornerLength,o=t/2,a=e/2,s=n-a,l=n+a,u=r-o,c=r+o;return{topLeft:[s,u+i,s+i,u,s+i,u+i],topRight:[l-i,u,l,u+i,l-i,u+i],bottomRight:[l,c-i,l-i,c,l-i,c-i],bottomLeft:[s+i,c,s,c-i,s+i,c-i]}},intersectLine:function(e,t,n,i,o,a,s){var l=this.generateCutTrianglePts(n+2*s,i+2*s,e,t),u=[].concat.apply([],[l.topLeft.splice(0,4),l.topRight.splice(0,4),l.bottomRight.splice(0,4),l.bottomLeft.splice(0,4)]);return r.polygonIntersectLine(o,a,u,e,t)},checkPoint:function(e,t,n,i,o,a,s){if(r.pointInsidePolygon(e,t,this.points,a,s,i,o-2*this.cornerLength,[0,-1],n))return!0;if(r.pointInsidePolygon(e,t,this.points,a,s,i-2*this.cornerLength,o,[0,-1],n))return!0;var l=this.generateCutTrianglePts(i,o,a,s);return r.pointInsidePolygonPoints(e,t,l.topLeft)||r.pointInsidePolygonPoints(e,t,l.topRight)||r.pointInsidePolygonPoints(e,t,l.bottomRight)||r.pointInsidePolygonPoints(e,t,l.bottomLeft)}}},i.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",r.generateUnitNgonPointsFitToSquare(3,0)),this.generatePolygon("rectangle",r.generateUnitNgonPointsFitToSquare(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generatePolygon("diamond",[0,1,1,0,0,-1,-1,0]),this.generatePolygon("pentagon",r.generateUnitNgonPointsFitToSquare(5,0)),this.generatePolygon("hexagon",r.generateUnitNgonPointsFitToSquare(6,0)),this.generatePolygon("heptagon",r.generateUnitNgonPointsFitToSquare(7,0)),this.generatePolygon("octagon",r.generateUnitNgonPointsFitToSquare(8,0));var n=new Array(20),i=r.generateUnitNgonPoints(5,0),o=r.generateUnitNgonPoints(5,Math.PI/5),a=.5*(3-Math.sqrt(5));a*=1.57;for(var s=0;s<o.length/2;s++)o[2*s]*=a,o[2*s+1]*=a;for(s=0;s<5;s++)n[4*s]=i[2*s],n[4*s+1]=i[2*s+1],n[4*s+2]=o[2*s],n[4*s+3]=o[2*s+1];n=r.fitPolygonToSquare(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),e.makePolygon=function(e){var n,r="polygon-"+e.join("$");return(n=this[r])?n:t.generatePolygon(r,e)}},t.exports=i},{"../../../math":93,"../../../util":108}],72:[function(e,t,n){"use strict";var r=e("../../../util"),i={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||r.staticEmptyObject();var t=this;void 0===t.averageRedrawTime&&(t.averageRedrawTime=0),void 0===t.lastRedrawTime&&(t.lastRedrawTime=0),void 0===t.lastDrawTime&&(t.lastDrawTime=0),t.requestedFrame=!0,t.renderOptions=e},beforeRender:function(e,t){if(!this.destroyed){t=t||0;var n=this.beforeRenderCallbacks;n.push({fn:e,priority:t}),n.sort((function(e,t){return t.priority-e.priority}))}}},o=function(e,t,n){for(var r=e.beforeRenderCallbacks,i=0;i<r.length;i++)r[i].fn(t,n)};i.startRenderLoop=function(){var e=this;if(!e.renderLoopStarted){e.renderLoopStarted=!0;var t=function(n){if(!e.destroyed){if(e.requestedFrame&&!e.skipFrame){o(e,!0,n);var i=r.performanceNow();e.render(e.renderOptions);var a=e.lastDrawTime=r.performanceNow();void 0===e.averageRedrawTime&&(e.averageRedrawTime=a-i),void 0===e.redrawCount&&(e.redrawCount=0),e.redrawCount++,void 0===e.redrawTotalTime&&(e.redrawTotalTime=0);var s=a-i;e.redrawTotalTime+=s,e.lastRedrawTime=s,e.averageRedrawTime=e.averageRedrawTime/2+s/2,e.requestedFrame=!1}else o(e,!1,n);e.skipFrame=!1,r.requestAnimationFrame(t)}};r.requestAnimationFrame(t)}},t.exports=i},{"../../../util":108}],73:[function(e,t,n){"use strict";var r,i={arrowShapeImpl:function(e){return(r||(r={polygon:function(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.lineTo(r.x,r.y)}},"triangle-backcurve":function(e,t,n){for(var r,i=0;i<t.length;i++){var o=t[i];0===i&&(r=o),e.lineTo(o.x,o.y)}e.quadraticCurveTo(n.x,n.y,r.x,r.y)},"triangle-tee":function(e,t,n){e.beginPath&&e.beginPath();for(var r=t,i=0;i<r.length;i++){var o=r[i];e.lineTo(o.x,o.y)}e.closePath&&e.closePath(),e.beginPath&&e.beginPath();var a=n,s=n[0];for(e.moveTo(s.x,s.y),i=0;i<a.length;i++)o=a[i],e.lineTo(o.x,o.y);e.closePath&&e.closePath()},"triangle-cross":function(e,t,n){e.beginPath&&e.beginPath();for(var r=t,i=0;i<r.length;i++){var o=r[i];e.lineTo(o.x,o.y)}e.closePath&&e.closePath(),e.beginPath&&e.beginPath();var a=n,s=n[0];for(e.moveTo(s.x,s.y),i=0;i<a.length;i++)o=a[i],e.lineTo(o.x,o.y);e.closePath&&e.closePath()},circle:function(e,t,n,r){e.arc(t,n,r,0,2*Math.PI,!1)}}))[e]}};t.exports=i},{}],74:[function(e,t,n){"use strict";var r={drawEdge:function(e,t,n,r,i){var o=t._private.rscratch,a=this.usePaths();if(!o.badLine&&!isNaN(o.allpts[0])&&t.visible()){var s;n&&(s=n,e.translate(-s.x1,-s.y1));var l=t.pstyle("overlay-padding").pfValue,u=t.pstyle("overlay-opacity").value,c=t.pstyle("overlay-color").value;if(i){if(0===u)return;this.strokeStyle(e,c[0],c[1],c[2],u),e.lineCap="round","self"!=o.edgeType||a||(e.lineCap="butt")}else{var d=t.pstyle("line-color").value;this.strokeStyle(e,d[0],d[1],d[2],t.pstyle("opacity").value),e.lineCap="butt"}e.lineJoin="round";var p=t.pstyle("width").pfValue+(i?2*l:0),f=i?"solid":t.pstyle("line-style").value;e.lineWidth=p,this.drawEdgePath(t,e,o.allpts,f,p),this.drawArrowheads(e,t,i),i||this.drawEdge(e,t,!1,r,!0),this.drawElementText(e,t,r),n&&e.translate(s.x1,s.y1)}},drawEdgePath:function(e,t,n,r,i){var o,a=e._private.rscratch,s=t,l=!1,u=this.usePaths();if(u){var c=n.join("$");a.pathCacheKey&&a.pathCacheKey===c?(o=t=a.pathCache,l=!0):(o=t=new Path2D,a.pathCacheKey=c,a.pathCache=o)}if(s.setLineDash)switch(r){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash([6,3]);break;case"solid":s.setLineDash([])}if(!l&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+3<n.length;d+=4)t.quadraticCurveTo(n[d],n[d+1],n[d+2],n[d+3]);break;case"straight":case"segments":case"haystack":for(d=2;d+1<n.length;d+=2)t.lineTo(n[d],n[d+1])}t=s,u?t.stroke(o):t.stroke(),t.setLineDash&&t.setLineDash([])},drawArrowheads:function(e,t,n){if(!n){var r=t._private.rscratch,i="haystack"===r.edgeType;i||this.drawArrowhead(e,t,"source",r.arrowStartX,r.arrowStartY,r.srcArrowAngle),this.drawArrowhead(e,t,"mid-target",r.midX,r.midY,r.midtgtArrowAngle),this.drawArrowhead(e,t,"mid-source",r.midX,r.midY,r.midsrcArrowAngle),i||this.drawArrowhead(e,t,"target",r.arrowEndX,r.arrowEndY,r.tgtArrowAngle)}},drawArrowhead:function(e,t,n,r,i,o){if(!(isNaN(r)||null==r||isNaN(i)||null==i||isNaN(o)||null==o)){var a=this,s=t.pstyle(n+"-arrow-shape").value;if("none"!==s){var l="hollow"===t.pstyle(n+"-arrow-fill").value?"both":"filled",u=t.pstyle(n+"-arrow-fill").value,c=t.pstyle("width").pfValue,d=t.pstyle("opacity").value,p=e.globalCompositeOperation;a.arrowShapes[s].forceStroke&&"filled"===u&&(u="both"),1===d&&"hollow"!==u||(e.globalCompositeOperation="destination-out",a.fillStyle(e,255,255,255,1),a.strokeStyle(e,255,255,255,1),a.drawArrowShape(t,n,e,l,c,s,r,i,o),e.globalCompositeOperation=p);var f=t.pstyle(n+"-arrow-color").value;a.fillStyle(e,f[0],f[1],f[2],d),a.strokeStyle(e,f[0],f[1],f[2],d),a.drawArrowShape(t,n,e,u,c,s,r,i,o)}}},drawArrowShape:function(e,t,n,r,i,o,a,s,l){var u,c=this,d=this.usePaths(),p=e._private.rscratch,f=!1,h=n,g={x:a,y:s},v=e.pstyle("arrow-scale").value,m=this.getArrowWidth(i,v),y=c.arrowShapes[o];if(d){var C=m+"$"+o+"$"+l+"$"+a+"$"+s;p.arrowPathCacheKey=p.arrowPathCacheKey||{},p.arrowPathCache=p.arrowPathCache||{},p.arrowPathCacheKey[t]===C?(u=n=p.arrowPathCache[t],f=!0):(u=n=new Path2D,p.arrowPathCacheKey[t]=C,p.arrowPathCache[t]=u)}n.beginPath&&n.beginPath(),f||y.draw(n,m,l,g,i),!y.leavePathOpen&&n.closePath&&n.closePath(),n=h,"filled"!==r&&"both"!==r||(d?n.fill(u):n.fill()),"hollow"!==r&&"both"!==r||(n.lineWidth=y.matchEdgeWidth?i:1,n.lineJoin="miter",d?n.stroke(u):n.stroke())}};t.exports=r},{}],75:[function(e,t,n){"use strict";var r=e("../../../math"),i={drawElement:function(e,t,n,r){var i=this;t.isNode()?i.drawNode(e,t,n,r):i.drawEdge(e,t,n,r)},drawCachedElement:function(e,t,n,i){var o=this,a=t.boundingBox();if(0!==a.w&&0!==a.h&&(!i||r.boundingBoxesIntersect(a,i))){var s=o.data.eleTxrCache.getElement(t,a,n);s?e.drawImage(s.texture.canvas,s.x,0,s.width,s.height,a.x1,a.y1,a.w,a.h):o.drawElement(e,t)}},drawElements:function(e,t){for(var n=this,r=0;r<t.length;r++){var i=t[r];n.drawElement(e,i)}},drawCachedElements:function(e,t,n,r){for(var i=this,o=0;o<t.length;o++){var a=t[o];i.drawCachedElement(e,a,n,r)}},drawCachedNodes:function(e,t,n,r){for(var i=this,o=0;o<t.length;o++){var a=t[o];a.isNode()&&i.drawCachedElement(e,a,n,r)}},drawLayeredElements:function(e,t,n,r){var i=this,o=i.data.lyrTxrCache.getLayers(t,n);if(o)for(var a=0;a<o.length;a++){var s=o[a],l=s.bb;0!==l.w&&0!==l.h&&e.drawImage(s.canvas,l.x1,l.y1,l.w,l.h)}else i.drawCachedElements(e,t,n,r)},drawDebugPoints:function(e,t){for(var n=function(t,n,r){e.fillStyle=r,e.fillRect(t-1,n-1,3,3)},r=0;r<t.length;r++){var i=t[r],o=i._private.rscratch;if(i.isNode()){var a=i.position();n(a.x,a.y,"magenta")}else{for(var s=o.allpts,l=0;l+1<s.length;l+=2)n(s[l],s[l+1],"cyan");n(o.midX,o.midY,"yellow")}}}};t.exports=i},{"../../../math":93}],76:[function(e,t,n){"use strict";var r={safeDrawImage:function(e,t,n,r,i,o,a,s,l,u){i<=0||o<=0||l<=0||u<=0||e.drawImage(t,n,r,i,o,a,s,l,u)},drawInscribedImage:function(e,t,n,r){var i=this,o=n.position(),a=o.x,s=o.y,l=n.cy().style(),u=l.getIndexedStyle.bind(l),c=u(n,"background-fit","value",r),d=u(n,"background-repeat","value",r),p=n.width(),f=n.height(),h=2*n.padding(),g=p+("inner"===u(n,"background-width-relative-to","value",r)?0:h),v=f+("inner"===u(n,"background-height-relative-to","value",r)?0:h),m=n._private.rscratch,y="node"===n.pstyle("background-clip").value,C=u(n,"background-image-opacity","value",r),b=t.width||t.cachedW,x=t.height||t.cachedH;null!=b&&null!=x||(document.body.appendChild(t),b=t.cachedW=t.width||t.offsetWidth,x=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t));var S=b,E=x;if("auto"!==u(n,"background-width","value",r)&&(S="%"===u(n,"background-width","units",r)?u(n,"background-width","pfValue",r)*g:u(n,"background-width","pfValue",r)),"auto"!==u(n,"background-height","value",r)&&(E="%"===u(n,"background-height","units",r)?u(n,"background-height","pfValue",r)*v:u(n,"background-height","pfValue",r)),0!==S&&0!==E){if("contain"===c)S*=w=Math.min(g/S,v/E),E*=w;else if("cover"===c){var w;S*=w=Math.max(g/S,v/E),E*=w}var O=a-g/2;O+="%"===u(n,"background-position-x","units",r)?(g-S)*u(n,"background-position-x","pfValue",r):u(n,"background-position-x","pfValue",r);var _=s-v/2;_+="%"===u(n,"background-position-y","units",r)?(v-E)*u(n,"background-position-y","pfValue",r):u(n,"background-position-y","pfValue",r),m.pathCache&&(O-=a,_-=s,a=0,s=0);var L=e.globalAlpha;if(e.globalAlpha=C,"no-repeat"===d)y&&(e.save(),m.pathCache?e.clip(m.pathCache):(i.nodeShapes[i.getNodeShape(n)].draw(e,a,s,g,v),e.clip())),i.safeDrawImage(e,t,0,0,b,x,O,_,S,E),y&&e.restore();else{var R=e.createPattern(t,d);e.fillStyle=R,i.nodeShapes[i.getNodeShape(n)].draw(e,a,s,g,v),e.translate(O,_),e.fill(),e.translate(-O,-_)}e.globalAlpha=L}}};t.exports=r},{}],77:[function(e,t,n){"use strict";function r(e,t,n,r,i,o){o=o||5,e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath(),e.fill()}var i=e("../../../util"),o=e("../../../math"),a={eleTextBiggerThanMin:function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(o.log2(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},drawElementText:function(e,t,n){var r=this;if(void 0===n){if(!r.eleTextBiggerThanMin(t))return}else if(!n)return;if(t.isNode()){if(!(o=t.pstyle("label"))||!o.value)return;var i=t.pstyle("text-halign").strValue;switch(t.pstyle("text-valign").strValue,i){case"left":e.textAlign="right";break;case"right":e.textAlign="left";break;default:e.textAlign="center"}e.textBaseline="bottom"}else{var o=t.pstyle("label"),a=t.pstyle("source-label"),s=t.pstyle("target-label");if(!(o&&o.value||a&&a.value||s&&s.value))return;e.textAlign="center",e.textBaseline="bottom"}r.drawText(e,t),t.isEdge()&&(r.drawText(e,t,"source"),r.drawText(e,t,"target"))}};a.drawNodeText=a.drawEdgeText=a.drawElementText,a.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n<this.fontCaches.length;n++)if((t=this.fontCaches[n]).context===e)return t;return t={context:e},this.fontCaches.push(t),t},a.setupTextStyle=function(e,t){var n=t.effectiveOpacity(),r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",o=t.pstyle("font-family").strValue,a=t.pstyle("font-weight").strValue,s=t.pstyle("text-opacity").value*t.pstyle("opacity").value*n,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value,d=t._private.fontKey,p=this.getFontCache(e);p.key!==d&&(e.font=r+" "+a+" "+i+" "+o,p.key=d),e.lineJoin="round",this.fillStyle(e,u[0],u[1],u[2],s),this.strokeStyle(e,c[0],c[1],c[2],l)},a.drawText=function(e,t,n){var o=t._private.rscratch,a=t.effectiveOpacity();if(0!==a&&0!==t.pstyle("text-opacity").value){var s=i.getPrefixedProperty(o,"labelX",n),l=i.getPrefixedProperty(o,"labelY",n),u=this.getLabelText(t,n);if(null!=u&&""!==u&&!isNaN(s)&&!isNaN(l)){this.setupTextStyle(e,t);var c=n?n+"-":"",d=i.getPrefixedProperty(o,"labelWidth",n),p=i.getPrefixedProperty(o,"labelHeight",n),f=i.getPrefixedProperty(o,"labelAngle",n),h=t.pstyle(c+"text-margin-x").pfValue,g=t.pstyle(c+"text-margin-y").pfValue,v=t.isEdge(),m=(t.isNode(),t.pstyle("text-halign").value),y=t.pstyle("text-valign").value;v&&(m="center",y="center"),s+=h,l+=g;var C,b=t.pstyle("text-rotation");if(0!==(C="autorotate"===b.strValue?v?f:0:"none"===b.strValue?0:b.pfValue)){var x=s,S=l;e.translate(x,S),e.rotate(C),s=0,l=0}switch(y){case"top":break;case"center":l+=p/2;break;case"bottom":l+=p}var E=t.pstyle("text-background-opacity").value,w=t.pstyle("text-border-opacity").value,O=t.pstyle("text-border-width").pfValue,_=t.pstyle("text-background-padding").pfValue;if(E>0||O>0&&w>0){var L=s-_;switch(m){case"left":L-=d;break;case"center":L-=d/2}var R=l-p-_,D=d+2*_,N=p+2*_;if(E>0){var M=e.fillStyle,I=t.pstyle("text-background-color").value;e.fillStyle="rgba("+I[0]+","+I[1]+","+I[2]+","+E*a+")","roundrectangle"==t.pstyle("text-background-shape").strValue?r(e,L,R,D,N,2):e.fillRect(L,R,D,N),e.fillStyle=M}if(O>0&&w>0){var A=e.strokeStyle,P=e.lineWidth,k=t.pstyle("text-border-color").value,T=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+k[0]+","+k[1]+","+k[2]+","+w*a+")",e.lineWidth=O,e.setLineDash)switch(T){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=O/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(L,R,D,N),"double"===T){var V=O/2;e.strokeRect(L+V,R+V,D-2*V,N-2*V)}e.setLineDash&&e.setLineDash([]),e.lineWidth=P,e.strokeStyle=A}}var B=2*t.pstyle("text-outline-width").pfValue;if(B>0&&(e.lineWidth=B),"wrap"===t.pstyle("text-wrap").value){var z=i.getPrefixedProperty(o,"labelWrapCachedLines",n),j=p/z.length;switch(y){case"top":case"center":case"bottom":l-=(z.length-1)*j}for(var F=0;F<z.length;F++)B>0&&e.strokeText(z[F],s,l),e.fillText(z[F],s,l),l+=j}else B>0&&e.strokeText(u,s,l),e.fillText(u,s,l);0!==C&&(e.rotate(-C),e.translate(-x,-S))}}},t.exports=a},{"../../../math":93,"../../../util":108}],78:[function(e,t,n){"use strict";var r=e("../../../is"),i={drawNode:function(e,t,n,i){var o,a,s=this,l=t._private.rscratch,u=t._private,c=c||t.position();if(r.number(c.x)&&r.number(c.y)&&t.visible()){var d,p,f=t.effectiveOpacity(),h=this.usePaths(),g=!1,v=t.padding();o=t.width()+2*v,a=t.height()+2*v,e.lineWidth=t.pstyle("border-width").pfValue,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m,y=t.pstyle("background-image").value,C=[],b=[],x=y.length,S=0;S<x;S++)if(m=y[S],C[S]=null!=m&&"none"!==m,C[S]){var E=t.cy().style().getIndexedStyle(t,"background-image-crossorigin","value",S);b[S]=this.getCachedImage(m,E,(function(){t.rtrigger("background")}))}var w=t.pstyle("background-color").value,O=t.pstyle("border-color").value,_=t.pstyle("border-style").value;if(this.fillStyle(e,w[0],w[1],w[2],t.pstyle("background-opacity").value*f),this.strokeStyle(e,O[0],O[1],O[2],t.pstyle("border-opacity").value*f),e.lineJoin="miter",e.setLineDash)switch(_){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var L=t.pstyle("shape").strValue,R=t.pstyle("shape-polygon-points").pfValue;if(h){var D=L+"$"+o+"$"+a+("polygon"===L?"$"+R.join("$"):"");e.translate(c.x,c.y),l.pathCacheKey===D?(d=l.pathCache,g=!0):(d=new Path2D,l.pathCacheKey=D,l.pathCache=d)}if(!g){var N=c;h&&(N={x:0,y:0}),s.nodeShapes[this.getNodeShape(t)].draw(d||e,N.x,N.y,o,a)}h?e.fill(d):e.fill();var M=u.backgrounding,I=0;for(S=0;S<x;S++)C[S]&&b[S].complete&&(I++,this.drawInscribedImage(e,b[S],t,S));u.backgrounding=!(I===x),M!==u.backgrounding&&t.updateStyle(!1);var A=t.pstyle("background-blacken").value,P=t.pstyle("border-width").pfValue;if(this.hasPie(t)&&(this.drawPie(e,t,f),0===A&&0===P||h||s.nodeShapes[this.getNodeShape(t)].draw(e,c.x,c.y,o,a)),A>0?(this.fillStyle(e,0,0,0,A),h?e.fill(d):e.fill()):A<0&&(this.fillStyle(e,255,255,255,-A),h?e.fill(d):e.fill()),P>0&&(h?e.stroke(d):e.stroke(),"double"===_)){e.lineWidth=t.pstyle("border-width").pfValue/3;var k=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",h?e.stroke(d):e.stroke(),e.globalCompositeOperation=k}h&&e.translate(-c.x,-c.y),e.setLineDash&&e.setLineDash([]),s.drawElementText(e,t,i);var T=t.pstyle("overlay-padding").pfValue,V=t.pstyle("overlay-opacity").value,B=t.pstyle("overlay-color").value;V>0&&(this.fillStyle(e,B[0],B[1],B[2],V),s.nodeShapes.roundrectangle.draw(e,c.x,c.y,o+2*T,a+2*T),e.fill()),n&&e.translate(p.x1,p.y1)}},hasPie:function(e){return(e=e[0])._private.hasPie},drawPie:function(e,t,n,r){var i=(t=t[0]).cy().style(),o=t.pstyle("pie-size"),a=t.width(),s=t.height(),l=(r=r||t.position()).x,u=r.y,c=Math.min(a,s)/2,d=0;this.usePaths()&&(l=0,u=0),"%"===o.units?c*=o.pfValue:void 0!==o.pfValue&&(c=o.pfValue/2);for(var p=1;p<=i.pieBackgroundN;p++){var f=t.pstyle("pie-"+p+"-background-size").value,h=t.pstyle("pie-"+p+"-background-color").value,g=t.pstyle("pie-"+p+"-background-opacity").value*n,v=f/100;v+d>1&&(v=1-d);var m=1.5*Math.PI+2*Math.PI*d,y=m+2*Math.PI*v;0===f||d>=1||d+v>1||(e.beginPath(),e.moveTo(l,u),e.arc(l,u,c,m,y),e.closePath(),this.fillStyle(e,h[0],h[1],h[2],g),e.fill(),d+=v)}}};t.exports=i},{"../../../is":91}],79:[function(e,t,n){"use strict";var r={},i=e("../../../util"),o=100;r.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},r.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;i<n.length;i++)if((t=n[i]).context===e){r=!1;break}return r&&(t={context:e},n.push(t)),t},r.fillStyle=function(e,t,n,r,i){e.fillStyle="rgba("+t+","+n+","+r+","+i+")"},r.strokeStyle=function(e,t,n,r,i){e.strokeStyle="rgba("+t+","+n+","+r+","+i+")"},r.matchCanvasSize=function(e){var t=this,n=t.data,r=t.findContainerClientCoords(),i=r[2],o=r[3],a=t.getPixelRatio(),s=t.motionBlurPxRatio;e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE]&&e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG]||(a=s);var l,u=i*a,c=o*a;if(u!==t.canvasWidth||c!==t.canvasHeight){t.fontCaches=null;var d=n.canvasContainer;d.style.width=i+"px",d.style.height=o+"px";for(var p=0;p<t.CANVAS_LAYERS;p++)(l=n.canvases[p]).width=u,l.height=c,l.style.width=i+"px",l.style.height=o+"px";for(p=0;p<t.BUFFER_COUNT;p++)(l=n.bufferCanvases[p]).width=u,l.height=c,l.style.width=i+"px",l.style.height=o+"px";t.textureMult=1,a<=1&&(l=n.bufferCanvases[t.TEXTURE_BUFFER],t.textureMult=2,l.width=u*t.textureMult,l.height=c*t.textureMult),t.canvasWidth=u,t.canvasHeight=c}},r.renderTo=function(e,t,n,r){this.render({forcedContext:e,forcedZoom:t,forcedPan:n,drawAllLayers:!0,forcedPxRatio:r})},r.render=function(e){function t(e,t,n,r,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",c.fillStyle(e,255,255,255,c.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=o}function n(e,n){var i,o,s,d;c.clearingMotionBlur||e!==f.bufferContexts[c.MOTIONBLUR_BUFFER_NODE]&&e!==f.bufferContexts[c.MOTIONBLUR_BUFFER_DRAG]?(i=_,o=w,s=c.canvasWidth,d=c.canvasHeight):(i={x:O.x*m,y:O.y*m},o=E*m,s=c.canvasWidth*m,d=c.canvasHeight*m),e.setTransform(1,0,0,1,0,0),"motionBlur"===n?t(e,0,0,s,d):r||void 0!==n&&!n||e.clearRect(0,0,s,d),a||(e.translate(i.x,i.y),e.scale(o,o)),u&&e.translate(u.x,u.y),l&&e.scale(l,l)}var r=(e=e||i.staticEmptyObject()).forcedContext,a=e.drawAllLayers,s=e.drawOnlyNodeLayer,l=e.forcedZoom,u=e.forcedPan,c=this,d=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,p=c.cy,f=c.data,h=f.canvasNeedsRedraw,g=c.textureOnViewport&&!r&&(c.pinching||c.hoverData.dragging||c.swipePanning||c.data.wheelZooming),v=void 0!==e.motionBlur?e.motionBlur:c.motionBlur,m=c.motionBlurPxRatio,y=p.hasCompoundNodes(),C=c.hoverData.draggingEles,b=!(!c.hoverData.selecting&&!c.touchData.selecting),x=v=v&&!r&&c.motionBlurEnabled&&!b;r||(c.prevPxRatio!==d&&(c.invalidateContainerClientCoordsCache(),c.matchCanvasSize(c.container),c.redrawHint("eles",!0),c.redrawHint("drag",!0)),c.prevPxRatio=d),!r&&c.motionBlurTimeout&&clearTimeout(c.motionBlurTimeout),v&&(null==c.mbFrames&&(c.mbFrames=0),c.mbFrames++,c.mbFrames<3&&(x=!1),c.mbFrames>c.minMbLowQualFrames&&(c.motionBlurPxRatio=c.mbPxRBlurry)),c.clearingMotionBlur&&(c.motionBlurPxRatio=1),c.textureDrawLastFrame&&!g&&(h[c.NODE]=!0,h[c.SELECT_BOX]=!0);var S=p.style()._private.coreStyle,E=p.zoom(),w=void 0!==l?l:E,O=p.pan(),_={x:O.x,y:O.y},L={zoom:E,pan:{x:O.x,y:O.y}},R=c.prevViewport;void 0===R||L.zoom!==R.zoom||L.pan.x!==R.pan.x||L.pan.y!==R.pan.y||C&&!y||(c.motionBlurPxRatio=1),u&&(_=u),w*=d,_.x*=d,_.y*=d;var D=c.getCachedZSortedEles();if(g||(c.textureDrawLastFrame=!1),g){if(c.textureDrawLastFrame=!0,!c.textureCache){c.textureCache={},c.textureCache.bb=p.mutableElements().boundingBox(),c.textureCache.texture=c.data.bufferCanvases[c.TEXTURE_BUFFER];var N=c.data.bufferContexts[c.TEXTURE_BUFFER];N.setTransform(1,0,0,1,0,0),N.clearRect(0,0,c.canvasWidth*c.textureMult,c.canvasHeight*c.textureMult),c.render({forcedContext:N,drawOnlyNodeLayer:!0,forcedPxRatio:d*c.textureMult}),(L=c.textureCache.viewport={zoom:p.zoom(),pan:p.pan(),width:c.canvasWidth,height:c.canvasHeight}).mpan={x:(0-L.pan.x)/L.zoom,y:(0-L.pan.y)/L.zoom}}h[c.DRAG]=!1,h[c.NODE]=!1;var M=f.contexts[c.NODE],I=c.textureCache.texture;L=c.textureCache.viewport,c.textureCache.bb,M.setTransform(1,0,0,1,0,0),v?t(M,0,0,L.width,L.height):M.clearRect(0,0,L.width,L.height);var A=S["outside-texture-bg-color"].value,P=S["outside-texture-bg-opacity"].value;c.fillStyle(M,A[0],A[1],A[2],P),M.fillRect(0,0,L.width,L.height),E=p.zoom(),n(M,!1),M.clearRect(L.mpan.x,L.mpan.y,L.width/L.zoom/d,L.height/L.zoom/d),M.drawImage(I,L.mpan.x,L.mpan.y,L.width/L.zoom/d,L.height/L.zoom/d)}else c.textureOnViewport&&!r&&(c.textureCache=null);var k=p.extent(),T=c.pinching||c.hoverData.dragging||c.swipePanning||c.data.wheelZooming||c.hoverData.draggingEles,V=c.hideEdgesOnViewport&&T,B=[];if(B[c.NODE]=!h[c.NODE]&&v&&!c.clearedForMotionBlur[c.NODE]||c.clearingMotionBlur,B[c.NODE]&&(c.clearedForMotionBlur[c.NODE]=!0),B[c.DRAG]=!h[c.DRAG]&&v&&!c.clearedForMotionBlur[c.DRAG]||c.clearingMotionBlur,B[c.DRAG]&&(c.clearedForMotionBlur[c.DRAG]=!0),h[c.NODE]||a||s||B[c.NODE]){var z=v&&!B[c.NODE]&&1!==m;n(M=r||(z?c.data.bufferContexts[c.MOTIONBLUR_BUFFER_NODE]:f.contexts[c.NODE]),v&&!z?"motionBlur":void 0),V?c.drawCachedNodes(M,D.nondrag,d,k):c.drawLayeredElements(M,D.nondrag,d,k),c.debug&&c.drawDebugPoints(M,D.nondrag),a||v||(h[c.NODE]=!1)}if(!s&&(h[c.DRAG]||a||B[c.DRAG])&&(z=v&&!B[c.DRAG]&&1!==m,n(M=r||(z?c.data.bufferContexts[c.MOTIONBLUR_BUFFER_DRAG]:f.contexts[c.DRAG]),v&&!z?"motionBlur":void 0),V?c.drawCachedNodes(M,D.drag,d,k):c.drawCachedElements(M,D.drag,d,k),c.debug&&c.drawDebugPoints(M,D.drag),a||v||(h[c.DRAG]=!1)),c.showFps||!s&&h[c.SELECT_BOX]&&!a){if(n(M=r||f.contexts[c.SELECT_BOX]),1==c.selection[4]&&(c.hoverData.selecting||c.touchData.selecting)){E=c.cy.zoom();var j=S["selection-box-border-width"].value/E;M.lineWidth=j,M.fillStyle="rgba("+S["selection-box-color"].value[0]+","+S["selection-box-color"].value[1]+","+S["selection-box-color"].value[2]+","+S["selection-box-opacity"].value+")",M.fillRect(c.selection[0],c.selection[1],c.selection[2]-c.selection[0],c.selection[3]-c.selection[1]),j>0&&(M.strokeStyle="rgba("+S["selection-box-border-color"].value[0]+","+S["selection-box-border-color"].value[1]+","+S["selection-box-border-color"].value[2]+","+S["selection-box-opacity"].value+")",M.strokeRect(c.selection[0],c.selection[1],c.selection[2]-c.selection[0],c.selection[3]-c.selection[1]))}if(f.bgActivePosistion&&!c.hoverData.selecting){E=c.cy.zoom();var F=f.bgActivePosistion;M.fillStyle="rgba("+S["active-bg-color"].value[0]+","+S["active-bg-color"].value[1]+","+S["active-bg-color"].value[2]+","+S["active-bg-opacity"].value+")",M.beginPath(),M.arc(F.x,F.y,S["active-bg-size"].pfValue/E,0,2*Math.PI),M.fill()}var G=c.lastRedrawTime;if(c.showFps&&G){G=Math.round(G);var U=Math.round(1e3/G);M.setTransform(1,0,0,1,0,0),M.fillStyle="rgba(255, 0, 0, 0.75)",M.strokeStyle="rgba(255, 0, 0, 0.75)",M.lineWidth=1,M.fillText("1 frame = "+G+" ms = "+U+" fps",0,20);var q=60;M.strokeRect(0,30,250,20),M.fillRect(0,30,250*Math.min(U/q,1),20)}a||(h[c.SELECT_BOX]=!1)}if(v&&1!==m){var H=f.contexts[c.NODE],W=c.data.bufferCanvases[c.MOTIONBLUR_BUFFER_NODE],$=f.contexts[c.DRAG],X=c.data.bufferCanvases[c.MOTIONBLUR_BUFFER_DRAG],Y=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!x?e.clearRect(0,0,c.canvasWidth,c.canvasHeight):t(e,0,0,c.canvasWidth,c.canvasHeight);var i=m;e.drawImage(n,0,0,c.canvasWidth*i,c.canvasHeight*i,0,0,c.canvasWidth,c.canvasHeight)};(h[c.NODE]||B[c.NODE])&&(Y(H,W,B[c.NODE]),h[c.NODE]=!1),(h[c.DRAG]||B[c.DRAG])&&(Y($,X,B[c.DRAG]),h[c.DRAG]=!1)}c.prevViewport=L,c.clearingMotionBlur&&(c.clearingMotionBlur=!1,c.motionBlurCleared=!0,c.motionBlur=!0),v&&(c.motionBlurTimeout=setTimeout((function(){c.motionBlurTimeout=null,c.clearedForMotionBlur[c.NODE]=!1,c.clearedForMotionBlur[c.DRAG]=!1,c.motionBlur=!1,c.clearingMotionBlur=!g,c.mbFrames=0,h[c.NODE]=!0,h[c.DRAG]=!0,c.redraw()}),o)),r||p.trigger("render")},t.exports=r},{"../../../util":108}],80:[function(e,t,n){"use strict";for(var r=e("../../../math"),i={drawPolygonPath:function(e,t,n,r,i,o){var a=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+a*o[0],n+s*o[1]);for(var l=1;l<o.length/2;l++)e.lineTo(t+a*o[2*l],n+s*o[2*l+1]);e.closePath()},drawRoundRectanglePath:function(e,t,n,i,o){var a=i/2,s=o/2,l=r.getRoundRectangleRadius(i,o);e.beginPath&&e.beginPath(),e.moveTo(t,n-s),e.arcTo(t+a,n-s,t+a,n,l),e.arcTo(t+a,n+s,t,n+s,l),e.arcTo(t-a,n+s,t-a,n,l),e.arcTo(t-a,n-s,t,n-s,l),e.lineTo(t,n-s),e.closePath()},drawCutRectanglePath:function(e,t,n,i,o){var a=i/2,s=o/2,l=r.getCutRectangleCornerLength();e.beginPath&&e.beginPath(),e.moveTo(t-a+l,n-s),e.lineTo(t+a-l,n-s),e.lineTo(t+a,n-s+l),e.lineTo(t+a,n+s-l),e.lineTo(t+a-l,n+s),e.lineTo(t-a+l,n+s),e.lineTo(t-a,n+s-l),e.lineTo(t-a,n-s+l),e.closePath()}},o=Math.sin(0),a=Math.cos(0),s={},l={},u=Math.PI/40,c=0*Math.PI;c<2*Math.PI;c+=u)s[c]=Math.sin(c),l[c]=Math.cos(c);i.drawEllipsePath=function(e,t,n,r,i){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,n,r/2,i/2,0,0,2*Math.PI);else for(var c,d,p=r/2,f=i/2,h=0*Math.PI;h<2*Math.PI;h+=u)c=t-p*s[h]*o+p*l[h]*a,d=n+f*l[h]*o+f*s[h]*a,0===h?e.moveTo(c,d):e.lineTo(c,d);e.closePath()},t.exports=i},{"../../../math":93}],81:[function(e,t,n){"use strict";var r=e("../../../math"),i=e("../../../util"),o=e("../../../heap"),a=e("./texture-cache-defs"),s=25,l=50,u=-4,c=2,d=3.99,p=8,f=1024,h=1024,g=1024,v=.5,m=.8,y=10,C=!1,b=!1,x=.15,S=.1,E=.9,w=.9,O=100,_=1,L={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},R=function(e){var t=this;t.renderer=e,t.onDequeues=[],t.setupDequeueing()},D=R.prototype;D.reasons=L,D.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},D.getRetiredTextureQueue=function(e){var t=this,n=t.eleImgCaches.retired=t.eleImgCaches.retired||{};return n[e]=n[e]||[]},D.getElementQueue=function(){var e=this;return e.eleCacheQueue=e.eleCacheQueue||new o((function(e,t){return t.reqs-e.reqs}))},D.getElementIdToQueue=function(){var e=this;return e.eleIdToCacheQueue=e.eleIdToCacheQueue||{}},D.getElement=function(e,t,n,i,o){var a=this,f=this.renderer,v=e._private.rscratch,m=f.cy.zoom();if(0===t.w||0===t.h)return null;if(null==i&&(i=Math.ceil(r.log2(m*n))),i<u)i=u;else if(m>=d||i>c)return null;var y,x=Math.pow(2,i),S=t.h*x,E=t.w*x,w=v.imgCaches=v.imgCaches||{},O=w[i];if(O)return O;if(y=S<=s?s:S<=l?l:Math.ceil(S/l)*l,S>g||E>h||!C&&e.isEdge()||!b&&e.isParent())return null;var _=a.getTextureQueue(y),R=_[_.length-2],D=function(){return a.recycleTexture(y,E)||a.addTexture(y,E)};R||(R=_[_.length-1]),R||(R=D()),R.width-R.usedWidth<E&&(R=D());for(var N,M=f.eleTextBiggerThanMin(e,x),I=function(e){return e&&e.scaledLabelShown===M},A=o&&o===L.dequeue,P=o&&o===L.highQuality,k=o&&o===L.downscale,T=i+1;T<=c;T++)if(j=w[T]){N=j;break}var V=N&&N.level===i+1?N:null,B=function(){R.context.drawImage(V.texture.canvas,V.x,0,V.width,V.height,R.usedWidth,0,E,S)};if(R.context.setTransform(1,0,0,1,0,0),R.context.clearRect(R.usedWidth,0,E,y),I(V))B();else if(I(N)){if(!P)return a.queueElement(e,t,N.level-1),N;for(T=N.level;T>i;T--)V=a.getElement(e,t,n,T,L.downscale);B()}else{var z;if(!A&&!P&&!k)for(T=i-1;T>=u;T--){var j;if(j=w[T]){z=j;break}}if(I(z))return a.queueElement(e,t,i),z;R.context.translate(R.usedWidth,0),R.context.scale(x,x),f.drawElement(R.context,e,t,M),R.context.scale(1/x,1/x),R.context.translate(-R.usedWidth,0)}return O=w[i]={ele:e,x:R.usedWidth,texture:R,level:i,scale:x,width:E,height:S,scaledLabelShown:M},R.usedWidth+=Math.ceil(E+p),R.eleCaches.push(O),a.checkTextureFullness(R),O},D.invalidateElement=function(e){var t=this,n=e._private.rscratch.imgCaches;if(n)for(var r=u;r<=c;r++){var o=n[r];if(o){var a=o.texture;a.invalidatedWidth+=o.width,n[r]=null,i.removeFromArray(a.eleCaches,o),t.checkTextureUtility(a)}}},D.checkTextureUtility=function(e){e.invalidatedWidth>=v*e.width&&this.retireTexture(e)},D.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>m&&e.fullnessChecks>=y?i.removeFromArray(t,e):e.fullnessChecks++},D.retireTexture=function(e){var t=this,n=e.height,r=t.getTextureQueue(n);i.removeFromArray(r,e),e.retired=!0;for(var o=e.eleCaches,a=0;a<o.length;a++){var s=o[a],l=s.ele,u=s.level,c=l._private.rscratch.imgCaches;c&&(c[u]=null)}i.clearArray(o),t.getRetiredTextureQueue(n).push(e)},D.addTexture=function(e,t){var n={};return this.getTextureQueue(e).push(n),n.eleCaches=[],n.height=e,n.width=Math.max(f,t),n.usedWidth=0,n.invalidatedWidth=0,n.fullnessChecks=0,n.canvas=document.createElement("canvas"),n.canvas.width=n.width,n.canvas.height=n.height,n.context=n.canvas.getContext("2d"),n},D.recycleTexture=function(e,t){for(var n=this,r=n.getTextureQueue(e),o=n.getRetiredTextureQueue(e),a=0;a<o.length;a++){var s=o[a];if(s.width>=t)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,i.clearArray(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),i.removeFromArray(o,s),r.push(s),s}},D.queueElement=function(e,t,n){var i=this,o=i.getElementQueue(),a=i.getElementIdToQueue(),s=e.id(),l=a[s];if(l)l.level=Math.max(l.level,n),l.reqs++,o.updateItem(l);else{var u={ele:e,bb:t,position:r.copyPosition(e.position()),level:n,reqs:1};e.isEdge()&&(u.positions={source:r.copyPosition(e.source().position()),target:r.copyPosition(e.target().position())}),o.push(u),a[s]=u}},D.dequeue=function(e){for(var t=this,n=t.getElementQueue(),i=t.getElementIdToQueue(),o=[],a=0;a<_&&n.size()>0;a++){var s=n.pop();i[s.ele.id()]=null,o.push(s);var l,u=s.ele;l=(!u.isEdge()||r.arePositionsSame(u.source().position(),s.positions.source)&&r.arePositionsSame(u.target().position(),s.positions.target))&&r.arePositionsSame(u.position(),s.position)?s.bb:u.boundingBox(),t.getElement(s.ele,l,e,s.level,L.dequeue)}return o},D.onDequeue=function(e){this.onDequeues.push(e)},D.offDequeue=function(e){i.removeFromArray(this.onDequeues,e)},D.setupDequeueing=a.setupDequeueing({deqRedrawThreshold:O,deqCost:x,deqAvgCost:S,deqNoDrawCost:E,deqFastCost:w,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n<e.onDequeues.length;n++)(0,e.onDequeues[n])(t)},shouldRedraw:function(e,t,n,i){for(var o=0;o<t.length;o++){var a=t[o].bb;if(r.boundingBoxesIntersect(a,i))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}}),t.exports=R},{"../../../heap":89,"../../../math":93,"../../../util":108,"./texture-cache-defs":86}],82:[function(e,t,n){"use strict";function r(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),i=new Uint8Array(r),o=0;o<n.length;o++)i[o]=n.charCodeAt(o);return new Blob([r],{type:t})}function i(e){var t=e.indexOf(",");return e.substr(t+1)}function o(e,t,n){var o=t.toDataURL(n,e.quality);switch(e.output){case"blob":return r(i(o),n);case"base64":return i(o);default:return o}}var a=e("../../../is"),s={createBuffer:function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,[n,n.getContext("2d")]},bufferCanvasImage:function(e){var t=this.cy,n=t.mutableElements().boundingBox(),r=this.findContainerClientCoords(),i=e.full?Math.ceil(n.w):r[2],o=e.full?Math.ceil(n.h):r[3],s=a.number(e.maxWidth)||a.number(e.maxHeight),l=this.getPixelRatio(),u=1;if(void 0!==e.scale)i*=e.scale,o*=e.scale,u=e.scale;else if(s){var c=1/0,d=1/0;a.number(e.maxWidth)&&(c=u*e.maxWidth/i),a.number(e.maxHeight)&&(d=u*e.maxHeight/o),i*=u=Math.min(c,d),o*=u}s||(i*=l,o*=l,u*=l);var p=document.createElement("canvas");p.width=i,p.height=o,p.style.width=i+"px",p.style.height=o+"px";var f=p.getContext("2d");if(i>0&&o>0){f.clearRect(0,0,i,o),e.bg&&(f.fillStyle=e.bg,f.rect(0,0,i,o),f.fill()),f.globalCompositeOperation="source-over";var h=this.getCachedZSortedEles();if(e.full)f.translate(-n.x1*u,-n.y1*u),f.scale(u,u),this.drawElements(f,h);else{var g=t.pan(),v={x:g.x*u,y:g.y*u};u*=t.zoom(),f.translate(v.x,v.y),f.scale(u,u),this.drawElements(f,h)}}return p},png:function(e){return o(e,this.bufferCanvasImage(e),"image/png")},jpg:function(e){return o(e,this.bufferCanvasImage(e),"image/jpeg")}};t.exports=s},{"../../../is":91}],83:[function(e,t,n){"use strict";function r(e){var t=this;t.data={canvases:new Array(u.CANVAS_LAYERS),contexts:new Array(u.CANVAS_LAYERS),canvasNeedsRedraw:new Array(u.CANVAS_LAYERS),bufferCanvases:new Array(u.BUFFER_COUNT),bufferContexts:new Array(u.CANVAS_LAYERS)},t.data.canvasContainer=document.createElement("div");var n=t.data.canvasContainer.style;t.data.canvasContainer.setAttribute("style","-webkit-tap-highlight-color: rgba(0,0,0,0);"),n.position="relative",n.zIndex="0",n.overflow="hidden";var r=e.cy.container();r.appendChild(t.data.canvasContainer),r.setAttribute("style",(r.getAttribute("style")||"")+"-webkit-tap-highlight-color: rgba(0,0,0,0);");for(var i=0;i<u.CANVAS_LAYERS;i++){var l=t.data.canvases[i]=document.createElement("canvas");t.data.contexts[i]=l.getContext("2d"),l.setAttribute("style","-webkit-user-select: none; -moz-user-select: -moz-none; user-select: none; -webkit-tap-highlight-color: rgba(0,0,0,0); outline-style: none;"+(o.ms()?" -ms-touch-action: none; touch-action: none; ":"")),l.style.position="absolute",l.setAttribute("data-id","layer"+i),l.style.zIndex=String(u.CANVAS_LAYERS-i),t.data.canvasContainer.appendChild(l),t.data.canvasNeedsRedraw[i]=!1}for(t.data.topCanvas=t.data.canvases[0],t.data.canvases[u.NODE].setAttribute("data-id","layer"+u.NODE+"-node"),t.data.canvases[u.SELECT_BOX].setAttribute("data-id","layer"+u.SELECT_BOX+"-selectbox"),t.data.canvases[u.DRAG].setAttribute("data-id","layer"+u.DRAG+"-drag"),i=0;i<u.BUFFER_COUNT;i++)t.data.bufferCanvases[i]=document.createElement("canvas"),t.data.bufferContexts[i]=t.data.bufferCanvases[i].getContext("2d"),t.data.bufferCanvases[i].style.position="absolute",t.data.bufferCanvases[i].setAttribute("data-id","buffer"+i),t.data.bufferCanvases[i].style.zIndex=String(-i-1),t.data.bufferCanvases[i].style.visibility="hidden";t.pathsEnabled=!0,t.data.eleTxrCache=new a(t),t.data.lyrTxrCache=new s(t,t.data.eleTxrCache),t.onUpdateEleCalcs((function(e,n){for(var r=0;r<n.length;r++){var i=n[r],o=i._private.rstyle.dirtyEvents;i.isNode()&&o&&1===o.length&&o.position||t.data.eleTxrCache.invalidateElement(i)}n.length>0&&t.data.lyrTxrCache.invalidateElements(n)}))}var i=e("../../../util"),o=e("../../../is"),a=e("./ele-texture-cache"),s=e("./layered-texture-cache"),l=r,u=r.prototype;u.CANVAS_LAYERS=3,u.SELECT_BOX=0,u.DRAG=1,u.NODE=2,u.BUFFER_COUNT=3,u.TEXTURE_BUFFER=0,u.MOTIONBLUR_BUFFER_NODE=1,u.MOTIONBLUR_BUFFER_DRAG=2,u.redrawHint=function(e,t){var n=this;switch(e){case"eles":n.data.canvasNeedsRedraw[u.NODE]=t;break;case"drag":n.data.canvasNeedsRedraw[u.DRAG]=t;break;case"select":n.data.canvasNeedsRedraw[u.SELECT_BOX]=t}};var c="undefined"!=typeof Path2D;u.path2dEnabled=function(e){return void 0===e?this.pathsEnabled:void(this.pathsEnabled=!!e)},u.usePaths=function(){return c&&this.pathsEnabled},[e("./arrow-shapes"),e("./drawing-elements"),e("./drawing-edges"),e("./drawing-images"),e("./drawing-label-text"),e("./drawing-nodes"),e("./drawing-redraw"),e("./drawing-shapes"),e("./export-image"),e("./node-shapes")].forEach((function(e){i.extend(u,e)})),t.exports=l},{"../../../is":91,"../../../util":108,"./arrow-shapes":73,"./drawing-edges":74,"./drawing-elements":75,"./drawing-images":76,"./drawing-label-text":77,"./drawing-nodes":78,"./drawing-redraw":79,"./drawing-shapes":80,"./ele-texture-cache":81,"./export-image":82,"./layered-texture-cache":84,"./node-shapes":85}],84:[function(e,t,n){"use strict";function r(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)}var i=e("../../../util"),o=e("../../../math"),a=e("../../../heap"),s=e("../../../is"),l=e("./texture-cache-defs"),u=1,c=-4,d=2,p=3.99,f=50,h=50,g=!0,v=.15,m=.1,y=.9,C=.9,b=1,x=250,S=16e6,E=!0,w=!0,O=!0,_=function(e,t){var n=this,r=n.renderer=e;n.layersByLevel={},n.firstGet=!0,n.lastInvalidationTime=i.performanceNow()-2*x,n.skipping=!1,r.beforeRender((function(e,t){t-n.lastInvalidationTime<=x?n.skipping=!0:n.skipping=!1}));var o=function(e,t){return t.reqs-e.reqs};n.layersQueue=new a(o),n.eleTxrCache=t,n.setupEleCacheInvalidation(),n.setupDequeueing()},L=_.prototype,R=0,D=Math.pow(2,53)-1;L.makeLayer=function(e,t){var n=Math.pow(2,t),r=Math.ceil(e.w*n),i=Math.ceil(e.h*n),o=document.createElement("canvas");o.width=r,o.height=i;var a={id:R=++R%D,bb:e,level:t,width:r,height:i,canvas:o,context:o.getContext("2d"),eles:[],elesQueue:[],reqs:0},s=a.context,l=-a.bb.x1,u=-a.bb.y1;return s.scale(n,n),s.translate(l,u),a},L.getLayers=function(e,t,n){var r=this,a=r.renderer.cy.zoom(),s=r.firstGet;if(r.firstGet=!1,null==n)if((n=Math.ceil(o.log2(a*t)))<c)n=c;else if(a>=p||n>d)return null;r.validateLayersElesOrdering(n,e);var l,f,h=r.layersByLevel,g=Math.pow(2,n),v=h[n]=h[n]||[],m=function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return f=h[t],!0},o=function(e){if(!f)for(var r=n+e;c<=r&&r<=d&&!t(r);r+=e);};o(1),o(-1);for(var a=v.length-1;a>=0;a--){var s=v[a];s.invalid&&i.removeFromArray(v,s)}};if(r.levelIsComplete(n,e))return v;m();var y=function(){if(!l){l=o.makeBoundingBox();for(var t=0;t<e.length;t++)o.updateBoundingBox(l,e[t].boundingBox())}return l},C=function(e){var t=(e=e||{}).after;if(y(),l.w*g*(l.h*g)>S)return null;var i=r.makeLayer(l,n);if(null!=t){var o=v.indexOf(t)+1;v.splice(o,0,i)}else(void 0===e.insert||e.insert)&&v.unshift(i);return i};if(r.skipping&&!s)return null;for(var b=null,x=e.length/u,w=E&&!s,O=0;O<e.length;O++){var _=e[O],L=_._private.rscratch,R=L.imgLayerCaches=L.imgLayerCaches||{},D=R[n];if(D)b=D;else{if((!b||b.eles.length>=x||!o.boundingBoxInBoundingBox(b.bb,_.boundingBox()))&&!(b=C({insert:!0,after:b})))return null;f||w?r.queueLayer(b,_):r.drawEleInLayer(b,_,n,t),b.eles.push(_),R[n]=b}}return f||(w?null:v)},L.getEleLevelForLayerLevel=function(e,t){return e},L.drawEleInLayer=function(e,t,n,i){var o=this,a=this.renderer,s=e.context,l=t.boundingBox();if(0!==l.w&&0!==l.h){var u=o.eleTxrCache,c=w?u.reasons.highQuality:void 0;n=o.getEleLevelForLayerLevel(n,i);var d=O?u.getElement(t,l,null,n,c):null;d?(g&&r(s,!1),s.drawImage(d.texture.canvas,d.x,0,d.width,d.height,l.x1,l.y1,l.w,l.h),g&&r(s,!0)):a.drawElement(s,t)}},L.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i<n.length;i++){var o=n[i];if(o.reqs>0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===t.length},L.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r<n.length;r++){for(var i=n[r],o=-1,a=0;a<t.length;a++)if(i.eles[0]===t[a]){o=a;break}if(o<0)this.invalidateLayer(i);else{var s=o;for(a=0;a<i.eles.length;a++)if(i.eles[a]!==t[s+a]){this.invalidateLayer(i);break}}}},L.updateElementsInLayers=function(e,t){for(var n=this,r=s.element(e[0]),i=0;i<e.length;i++)for(var o=r?null:e[i],a=r?e[i]:e[i].ele,l=a._private.rscratch,u=l.imgLayerCaches=l.imgLayerCaches||{},p=c;p<=d;p++){var f=u[p];f&&(o&&n.getEleLevelForLayerLevel(f.level)!==o.level||t(f,a,o))}},L.haveLayers=function(){for(var e=this,t=!1,n=c;n<=d;n++){var r=e.layersByLevel[n];if(r&&r.length>0){t=!0;break}}return t},L.invalidateElements=function(e){var t=this;t.lastInvalidationTime=i.performanceNow(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)}))},L.invalidateLayer=function(e){if(this.lastInvalidationTime=i.performanceNow(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];i.removeFromArray(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var o=0;o<n.length;o++){var a=n[o]._private.rscratch.imgLayerCaches;a&&(a[t]=null)}}},L.refineElementTextures=function(e){var t=this;t.updateElementsInLayers(e,(function(e,n,r){var i=e.replacement;if(i||((i=e.replacement=t.makeLayer(e.bb,e.level)).replaces=e,i.eles=e.eles),!i.reqs)for(var o=0;o<i.eles.length;o++)t.queueLayer(i,i.eles[o])}))},L.setupEleCacheInvalidation=function(){var e=this,t=[];if(O){var n=i.debounce((function(){e.refineElementTextures(t),t=[]}),h);e.eleTxrCache.onDequeue((function(e){for(var r=0;r<e.length;r++)t.push(e[r]);n()}))}},L.queueLayer=function(e,t){var n=this.layersQueue,r=e.elesQueue,i=r.hasId=r.hasId||{};if(!e.replacement){if(t){if(i[t.id()])return;r.push(t),i[t.id()]=!0}e.reqs?(e.reqs++,n.updateItem(e)):(e.reqs=1,n.push(e))}},L.dequeue=function(e){for(var t=this,n=t.layersQueue,r=[],i=0;i<b&&0!==n.size();){var o=n.peek();if(o.replacement)n.pop();else if(o.replaces&&o!==o.replaces.replacement)n.pop();else if(o.invalid)n.pop();else{var a=o.elesQueue.shift();a&&(t.drawEleInLayer(o,a,o.level,e),i++),0===r.length&&r.push(!0),0===o.elesQueue.length&&(n.pop(),o.reqs=0,o.replaces&&t.applyLayerReplacement(o),t.requestRedraw())}}return r},L.applyLayerReplacement=function(e){var t=this,n=t.layersByLevel[e.level],r=e.replaces,i=n.indexOf(r);if(!(i<0||r.invalid)){n[i]=e;for(var o=0;o<e.eles.length;o++){var a=e.eles[o]._private,s=a.imgLayerCaches=a.imgLayerCaches||{};s&&(s[e.level]=e)}t.requestRedraw()}},L.requestRedraw=i.debounce((function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()}),100),L.setupDequeueing=l.setupDequeueing({deqRedrawThreshold:f,deqCost:v,deqAvgCost:m,deqNoDrawCost:y,deqFastCost:C,deq:function(e,t){return e.dequeue(t)},onDeqd:i.noop,shouldRedraw:i.trueify,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}}),t.exports=_},{"../../../heap":89,"../../../is":91,"../../../math":93,"../../../util":108,"./texture-cache-defs":86}],85:[function(e,t,n){"use strict";var r={nodeShapeImpl:function(e,t,n,r,i,o,a){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,i,o);case"polygon":return this.drawPolygonPath(t,n,r,i,o,a);case"roundrectangle":return this.drawRoundRectanglePath(t,n,r,i,o);case"cutrectangle":return this.drawCutRectanglePath(t,n,r,i,o)}}};t.exports=r},{}],86:[function(e,t,n){"use strict";var r=e("../../../util"),i=1e3/60;t.exports={setupDequeueing:function(e){return function(){var t=this,n=this.renderer;if(!t.dequeueingSetup){t.dequeueingSetup=!0;var o=r.debounce((function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()}),e.deqRedrawThreshold),a=function(a,s){for(var l=r.performanceNow(),u=n.averageRedrawTime,c=n.lastRedrawTime,d=[],p=n.cy.extent(),f=n.getPixelRatio();;){var h=r.performanceNow(),g=h-l,v=h-s;if(c<i){var m=i-(a?u:0);if(v>=e.deqFastCost*m)break}else if(a){if(g>=e.deqCost*c||g>=e.deqAvgCost*u)break}else if(v>=e.deqNoDrawCost*i)break;var y=e.deq(t,f,p);if(!(y.length>0))break;for(var C=0;C<y.length;C++)d.push(y[C])}d.length>0&&(e.onDeqd(t,d),!a&&e.shouldRedraw(t,d,f,p)&&o())},s=e.priority||r.noop;n.beforeRender(a,s(t))}}}}},{"../../../util":108}],87:[function(e,t,n){"use strict";t.exports=[{name:"null",impl:e("./null")},{name:"base",impl:e("./base")},{name:"canvas",impl:e("./canvas")}]},{"./base":69,"./canvas":83,"./null":88}],88:[function(e,t,n){"use strict";function r(e){this.options=e,this.notifications=0}var i=function(){};r.prototype={recalculateRenderedStyle:i,notify:function(){this.notifications++},init:i},t.exports=r},{}],89:[function(e,t,n){"use strict";var r,i,o,a,s,l,u,c,d,p,f,h,g,v,m;o=Math.floor,p=Math.min,i=function(e,t){return e<t?-1:e>t?1:0},d=function(e,t,n,r,a){var s;if(null==n&&(n=0),null==a&&(a=i),n<0)throw new Error("lo must be non-negative");for(null==r&&(r=e.length);n<r;)a(t,e[s=o((n+r)/2)])<0?r=s:n=s+1;return[].splice.apply(e,[n,n-n].concat(t)),t},l=function(e,t,n){return null==n&&(n=i),e.push(t),v(e,0,e.length-1,n)},s=function(e,t){var n,r;return null==t&&(t=i),n=e.pop(),e.length?(r=e[0],e[0]=n,m(e,0,t)):r=n,r},c=function(e,t,n){var r;return null==n&&(n=i),r=e[0],e[0]=t,m(e,0,n),r},u=function(e,t,n){var r;return null==n&&(n=i),e.length&&n(e[0],t)<0&&(t=(r=[e[0],t])[0],e[0]=r[1],m(e,0,n)),t},a=function(e,t){var n,r,a,s,l,u;for(null==t&&(t=i),s=function(){u=[];for(var t=0,n=o(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse(),l=[],r=0,a=s.length;r<a;r++)n=s[r],l.push(m(e,n,t));return l},g=function(e,t,n){var r;if(null==n&&(n=i),-1!==(r=e.indexOf(t)))return v(e,0,r,n),m(e,r,n)},f=function(e,t,n){var r,o,s,l,c;if(null==n&&(n=i),!(o=e.slice(0,t)).length)return o;for(a(o,n),s=0,l=(c=e.slice(t)).length;s<l;s++)r=c[s],u(o,r,n);return o.sort(n).reverse()},h=function(e,t,n){var r,o,l,u,c,f,h,g,v;if(null==n&&(n=i),10*t<=e.length){if(!(l=e.slice(0,t).sort(n)).length)return l;for(o=l[l.length-1],u=0,f=(h=e.slice(t)).length;u<f;u++)n(r=h[u],o)<0&&(d(l,r,0,null,n),l.pop(),o=l[l.length-1]);return l}for(a(e,n),v=[],c=0,g=p(t,e.length);0<=g?c<g:c>g;0<=g?++c:--c)v.push(s(e,n));return v},v=function(e,t,n,r){var o,a,s;for(null==r&&(r=i),o=e[n];n>t&&r(o,a=e[s=n-1>>1])<0;)e[n]=a,n=s;return e[n]=o},m=function(e,t,n){var r,o,a,s,l;for(null==n&&(n=i),o=e.length,l=t,a=e[t],r=2*t+1;r<o;)(s=r+1)<o&&!(n(e[r],e[s])<0)&&(r=s),e[t]=e[r],r=2*(t=r)+1;return e[t]=a,v(e,l,t,n)},r=function(){function e(e){this.cmp=null!=e?e:i,this.nodes=[]}return e.push=l,e.pop=s,e.replace=c,e.pushpop=u,e.heapify=a,e.updateItem=g,e.nlargest=f,e.nsmallest=h,e.prototype.push=function(e){return l(this.nodes,e,this.cmp)},e.prototype.pop=function(){return s(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return c(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return u(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return a(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return g(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),t.exports=r},{}],90:[function(e,t,n){"use strict";e("./-preamble");var r=(e("./window"),e("./is")),i=e("./core"),o=e("./extension"),a=e("./stylesheet"),s=function(e){return void 0===e&&(e={}),r.plainObject(e)?new i(e):r.string(e)?o.apply(o,arguments):void 0};s.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(s),e.apply(null,t),this},s.version=e("./version"),s.stylesheet=s.Stylesheet=a,t.exports=s},{"./-preamble":1,"./core":37,"./extension":46,"./is":91,"./stylesheet":106,"./version":115,"./window":116}],91:[function(e,t,n){"use strict";var r=e("./window"),i=r?r.navigator:null,o=r?r.document:null,a="string",s=typeof{},l="function",u=typeof HTMLElement,c=function(e){return e&&e.instanceString&&d.fn(e.instanceString)?e.instanceString():null},d={defined:function(e){return null!=e},string:function(e){return null!=e&&typeof e==a},fn:function(e){return null!=e&&typeof e===l},array:function(e){return Array.isArray?Array.isArray(e):null!=e&&e instanceof Array},plainObject:function(e){return null!=e&&typeof e===s&&!d.array(e)&&e.constructor===Object},object:function(e){return null!=e&&typeof e===s},number:function(e){return null!=e&&"number"==typeof e&&!isNaN(e)},integer:function(e){return d.number(e)&&Math.floor(e)===e},bool:function(e){return null!=e&&"boolean"==typeof e},htmlElement:function(e){return"undefined"===u?void 0:null!=e&&e instanceof HTMLElement},elementOrCollection:function(e){return d.element(e)||d.collection(e)},element:function(e){return"collection"===c(e)&&e._private.single},collection:function(e){return"collection"===c(e)&&!e._private.single},core:function(e){return"core"===c(e)},style:function(e){return"style"===c(e)},stylesheet:function(e){return"stylesheet"===c(e)},event:function(e){return"event"===c(e)},thread:function(e){return"thread"===c(e)},fabric:function(e){return"fabric"===c(e)},emptyString:function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},nonemptyString:function(e){return!(!e||!d.string(e)||""===e||e.match(/^\s+$/))},domElement:function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement},boundingBox:function(e){return d.plainObject(e)&&d.number(e.x1)&&d.number(e.x2)&&d.number(e.y1)&&d.number(e.y2)},promise:function(e){return d.object(e)&&d.fn(e.then)},touch:function(){return r&&("ontouchstart"in r||r.DocumentTouch&&o instanceof DocumentTouch)},gecko:function(){return r&&("undefined"!=typeof InstallTrigger||"MozAppearance"in o.documentElement.style)},webkit:function(){return r&&("undefined"!=typeof webkitURL||"WebkitAppearance"in o.documentElement.style)},chromium:function(){return r&&"undefined"!=typeof chrome},khtml:function(){return i&&i.vendor.match(/kde/i)},khtmlEtc:function(){return d.khtml()||d.webkit()||d.chromium()},ms:function(){return i&&i.userAgent.match(/msie|trident|edge/i)},windows:function(){return i&&i.appVersion.match(/Win/i)},mac:function(){return i&&i.appVersion.match(/Mac/i)},linux:function(){return i&&i.appVersion.match(/Linux/i)},unix:function(){return i&&i.appVersion.match(/X11/i)}};t.exports=d},{"./window":116}],92:[function(e,t,n){function r(){this._obj={}}var i=r.prototype;i.set=function(e,t){this._obj[e]=t},i.delete=function(e){this._obj[e]=null},i.has=function(e){return null!=this._obj[e]},i.get=function(e){return this._obj[e]},t.exports="undefined"!=typeof Map?Map:r},{}],93:[function(e,t,n){"use strict";var r={arePositionsSame:function(e,t){return e.x===t.x&&e.y===t.y},copyPosition:function(e){return{x:e.x,y:e.y}},array2point:function(e){return{x:e[0],y:e[1]}},deg2rad:function(e){return Math.PI*e/180},getAngleFromDisp:function(e,t){return Math.atan2(t,e)-Math.PI/2}};r.log2=Math.log2||function(e){return Math.log(e)/Math.log(2)},r.signum=function(e){return e>0?1:e<0?-1:0},r.dist=function(e,t){return Math.sqrt(r.sqdist(e,t))},r.sqdist=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},r.qbezierAt=function(e,t,n,r){return(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n},r.qbezierPtAt=function(e,t,n,i){return{x:r.qbezierAt(e.x,t.x,n.x,i),y:r.qbezierAt(e.y,t.y,n.y,i)}},r.lineAt=function(e,t,n,i){var o={x:t.x-e.x,y:t.y-e.y},a=r.dist(e,t),s={x:o.x/a,y:o.y/a};return n=null==n?0:n,i=null!=i?i:n*a,{x:e.x+s.x*i,y:e.y+s.y*i}},r.lineAtDist=function(e,t,n){return r.lineAt(e,t,void 0,n)},r.triangleAngle=function(e,t,n){var i=r.dist(t,n),o=r.dist(e,n),a=r.dist(e,t);return Math.acos((i*i+o*o-a*a)/(2*i*o))},r.bound=function(e,t,n){return Math.max(e,Math.min(n,t))},r.makeBoundingBox=function(e){if(null==e)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(null!=e.x1&&null!=e.y1){if(null!=e.x2&&null!=e.y2&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},r.updateBoundingBox=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},r.expandBoundingBoxByPoint=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},r.expandBoundingBox=function(e,t){return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},r.boundingBoxesIntersect=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2<t.x1||t.x2<e.x1||e.y2<t.y1||t.y2<e.y1||e.y1>t.y2||t.y1>e.y2)},r.inBoundingBox=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},r.pointInBoundingBox=function(e,t){return this.inBoundingBox(e,t.x,t.y)},r.boundingBoxInBoundingBox=function(e,t){return r.inBoundingBox(e,t.x1,t.y1)&&r.inBoundingBox(e,t.x2,t.y2)},r.roundRectangleIntersectLine=function(e,t,n,r,i,o,a){var s,l=this.getRoundRectangleRadius(i,o),u=i/2,c=o/2,d=n-u+l-a,p=r-c-a,f=n+u-l+a,h=p;if((s=this.finiteLinesIntersect(e,t,n,r,d,p,f,h,!1)).length>0)return s;var g=n+u+a,v=r-c+l-a,m=g,y=r+c-l+a;if((s=this.finiteLinesIntersect(e,t,n,r,g,v,m,y,!1)).length>0)return s;var C=n-u+l-a,b=r+c+a,x=n+u-l+a,S=b;if((s=this.finiteLinesIntersect(e,t,n,r,C,b,x,S,!1)).length>0)return s;var E=n-u-a,w=r-c+l-a,O=E,_=r+c-l+a;if((s=this.finiteLinesIntersect(e,t,n,r,E,w,O,_,!1)).length>0)return s;var L,R=n-u+l,D=r-c+l;if((L=this.intersectLineCircle(e,t,n,r,R,D,l+a)).length>0&&L[0]<=R&&L[1]<=D)return[L[0],L[1]];var N=n+u-l,M=r-c+l;if((L=this.intersectLineCircle(e,t,n,r,N,M,l+a)).length>0&&L[0]>=N&&L[1]<=M)return[L[0],L[1]];var I=n+u-l,A=r+c-l;if((L=this.intersectLineCircle(e,t,n,r,I,A,l+a)).length>0&&L[0]>=I&&L[1]>=A)return[L[0],L[1]];var P=n-u+l,k=r+c-l;return(L=this.intersectLineCircle(e,t,n,r,P,k,l+a)).length>0&&L[0]<=P&&L[1]>=k?[L[0],L[1]]:[]},r.inLineVicinity=function(e,t,n,r,i,o,a){var s=a,l=Math.min(n,i),u=Math.max(n,i),c=Math.min(r,o),d=Math.max(r,o);return l-s<=e&&e<=u+s&&c-s<=t&&t<=d+s},r.inBezierVicinity=function(e,t,n,r,i,o,a,s,l){var u={x1:Math.min(n,a,i)-l,x2:Math.max(n,a,i)+l,y1:Math.min(r,s,o)-l,y2:Math.max(r,s,o)+l};return!(e<u.x1||e>u.x2||t<u.y1||t>u.y2)},r.solveCubic=function(e,t,n,r,i){var o,a,s,l,u,c,d,p;return s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),o=(a=(3*n-t*t)/9)*a*a+(s/=54)*s,i[1]=0,d=t/3,o>0?(u=(u=s+Math.sqrt(o))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(o))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-d+u+c,d+=(u+c)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-c+u)/2,i[3]=d,void(i[5]=-d)):(i[5]=i[3]=0,0===o?(p=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*p-d,void(i[4]=i[2]=-(p+d))):(l=(a=-a)*a*a,l=Math.acos(s/Math.sqrt(l)),p=2*Math.sqrt(a),i[0]=-d+p*Math.cos(l/3),i[2]=-d+p*Math.cos((l+2*Math.PI)/3),void(i[4]=-d+p*Math.cos((l+4*Math.PI)/3))))},r.sqdistToQuadraticBezier=function(e,t,n,r,i,o,a,s){var l=1*n*n-4*n*i+2*n*a+4*i*i-4*i*a+a*a+r*r-4*r*o+2*r*s+4*o*o-4*o*s+s*s,u=9*n*i-3*n*n-3*n*a-6*i*i+3*i*a+9*r*o-3*r*r-3*r*s-6*o*o+3*o*s,c=3*n*n-6*n*i+n*a-n*e+2*i*i+2*i*e-a*e+3*r*r-6*r*o+r*s-r*t+2*o*o+2*o*t-s*t,d=1*n*i-n*n+n*e-i*e+r*o-r*r+r*t-o*t,p=[];this.solveCubic(l,u,c,d,p);for(var f=1e-7,h=[],g=0;g<6;g+=2)Math.abs(p[g+1])<f&&p[g]>=0&&p[g]<=1&&h.push(p[g]);h.push(1),h.push(0);for(var v,m,y,C=-1,b=0;b<h.length;b++)v=Math.pow(1-h[b],2)*n+2*(1-h[b])*h[b]*i+h[b]*h[b]*a,m=Math.pow(1-h[b],2)*r+2*(1-h[b])*h[b]*o+h[b]*h[b]*s,y=Math.pow(v-e,2)+Math.pow(m-t,2),C>=0?y<C&&(C=y,h[b]):(C=y,h[b]);return C},r.sqdistToFiniteLine=function(e,t,n,r,i,o){var a=[e-n,t-r],s=[i-n,o-r],l=s[0]*s[0]+s[1]*s[1],u=a[0]*a[0]+a[1]*a[1],c=a[0]*s[0]+a[1]*s[1],d=c*c/l;return c<0?u:d>l?(e-i)*(e-i)+(t-o)*(t-o):u-d},r.pointInsidePolygonPoints=function(e,t,n){for(var r,i,o,a,s=0,l=0;l<n.length/2;l++)if(r=n[2*l],i=n[2*l+1],l+1<n.length/2?(o=n[2*(l+1)],a=n[2*(l+1)+1]):(o=n[2*(l+1-n.length/2)],a=n[2*(l+1-n.length/2)+1]),r==e&&o==e);else{if(!(r>=e&&e>=o||r<=e&&e<=o))continue;(e-r)/(o-r)*(a-i)+i>t&&s++}return s%2!=0},r.pointInsidePolygon=function(e,t,n,i,o,a,s,l,u){var c,d,p=new Array(n.length);null!=l[0]?(c=Math.atan(l[1]/l[0]),l[0]<0?c+=Math.PI/2:c=-c-Math.PI/2):c=l;for(var f=Math.cos(-c),h=Math.sin(-c),g=0;g<p.length/2;g++)p[2*g]=a/2*(n[2*g]*f-n[2*g+1]*h),p[2*g+1]=s/2*(n[2*g+1]*f+n[2*g]*h),p[2*g]+=i,p[2*g+1]+=o;if(u>0){var v=this.expandPolygon(p,-u);d=this.joinLines(v)}else d=p;return r.pointInsidePolygonPoints(e,t,d)},r.joinLines=function(e){for(var t,n,r,i,o,a,s,l,u=new Array(e.length/2),c=0;c<e.length/4;c++){t=e[4*c],n=e[4*c+1],r=e[4*c+2],i=e[4*c+3],c<e.length/4-1?(o=e[4*(c+1)],a=e[4*(c+1)+1],s=e[4*(c+1)+2],l=e[4*(c+1)+3]):(o=e[0],a=e[1],s=e[2],l=e[3]);var d=this.finiteLinesIntersect(t,n,r,i,o,a,s,l,!0);u[2*c]=d[0],u[2*c+1]=d[1]}return u},r.expandPolygon=function(e,t){for(var n,r,i,o,a=new Array(2*e.length),s=0;s<e.length/2;s++){n=e[2*s],r=e[2*s+1],s<e.length/2-1?(i=e[2*(s+1)],o=e[2*(s+1)+1]):(i=e[0],o=e[1]);var l=o-r,u=-(i-n),c=Math.sqrt(l*l+u*u),d=l/c,p=u/c;a[4*s]=n+d*t,a[4*s+1]=r+p*t,a[4*s+2]=i+d*t,a[4*s+3]=o+p*t}return a},r.intersectLineEllipse=function(e,t,n,r,i,o){var a=n-e,s=r-t;a/=i,s/=o;var l=Math.sqrt(a*a+s*s),u=l-1;if(u<0)return[];var c=u/l;return[(n-e)*c+e,(r-t)*c+t]},r.intersectLineCircle=function(e,t,n,r,i,o,a){var s=[n-e,r-t],l=[e-i,t-o],u=s[0]*s[0]+s[1]*s[1],c=2*(l[0]*s[0]+l[1]*s[1]),d=c*c-4*u*(l[0]*l[0]+l[1]*l[1]-a*a);if(d<0)return[];var p=(-c+Math.sqrt(d))/(2*u),f=(-c-Math.sqrt(d))/(2*u),h=Math.min(p,f),g=Math.max(p,f),v=[];if(h>=0&&h<=1&&v.push(h),g>=0&&g<=1&&v.push(g),0===v.length)return[];var m=v[0]*s[0]+e,y=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[m,y]:[m,y,v[1]*s[0]+e,v[1]*s[1]+t]:[m,y]},r.findCircleNearPoint=function(e,t,n,r,i){var o=r-e,a=i-t,s=Math.sqrt(o*o+a*a);return[e+o/s*n,t+a/s*n]},r.findMaxSqDistanceToOrigin=function(e){for(var t,n=1e-6,r=0;r<e.length/2;r++)(t=e[2*r]*e[2*r]+e[2*r+1]*e[2*r+1])>n&&(n=t);return n},r.midOfThree=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},r.finiteLinesIntersect=function(e,t,n,r,i,o,a,s,l){var u=e-i,c=n-e,d=a-i,p=t-o,f=r-t,h=s-o,g=d*p-h*u,v=c*p-f*u,m=h*c-d*f;if(0!==m){var y=g/m,C=v/m,b=.001,x=0-b,S=1+b;return x<=y&&y<=S&&x<=C&&C<=S||l?[e+y*c,t+y*f]:[]}return 0===g||0===v?this.midOfThree(e,n,a)===a?[a,s]:this.midOfThree(e,n,i)===i?[i,o]:this.midOfThree(i,a,n)===n?[n,r]:[]:[]},r.polygonIntersectLine=function(e,t,n,i,o,a,s,l){var u,c,d,p,f,h,g=[],v=new Array(n.length),m=!0;if(5===arguments.length&&(m=!1),m){for(var y=0;y<v.length/2;y++)v[2*y]=n[2*y]*a+i,v[2*y+1]=n[2*y+1]*s+o;if(l>0){var C=r.expandPolygon(v,-l);c=r.joinLines(C)}else c=v}else c=n;for(y=0;y<c.length/2;y++)d=c[2*y],p=c[2*y+1],y<c.length/2-1?(f=c[2*(y+1)],h=c[2*(y+1)+1]):(f=c[0],h=c[1]),0!==(u=this.finiteLinesIntersect(e,t,i,o,d,p,f,h)).length&&g.push(u[0],u[1]);return g},r.shortenIntersection=function(e,t,n){var r=[e[0]-t[0],e[1]-t[1]],i=Math.sqrt(r[0]*r[0]+r[1]*r[1]),o=(i-n)/i;return o<0&&(o=1e-5),[t[0]+o*r[0],t[1]+o*r[1]]},r.generateUnitNgonPointsFitToSquare=function(e,t){var n=r.generateUnitNgonPoints(e,t);return r.fitPolygonToSquare(n)},r.fitPolygonToSquare=function(e){for(var t,n,r=e.length/2,i=1/0,o=1/0,a=-1/0,s=-1/0,l=0;l<r;l++)t=e[2*l],n=e[2*l+1],i=Math.min(i,t),a=Math.max(a,t),o=Math.min(o,n),s=Math.max(s,n);var u=2/(a-i),c=2/(s-o);for(l=0;l<r;l++)t=e[2*l]=e[2*l]*u,n=e[2*l+1]=e[2*l+1]*c,i=Math.min(i,t),a=Math.max(a,t),o=Math.min(o,n),s=Math.max(s,n);if(o<-1)for(l=0;l<r;l++)n=e[2*l+1]=e[2*l+1]+(-1-o);return e},r.generateUnitNgonPoints=function(e,t){var n=1/e*2*Math.PI,r=e%2==0?Math.PI/2+n/2:Math.PI/2;r+=t;for(var i,o=new Array(2*e),a=0;a<e;a++)i=a*n+r,o[2*a]=Math.cos(i),o[2*a+1]=Math.sin(-i);return o},r.getRoundRectangleRadius=function(e,t){return Math.min(e/4,t/4,8)},r.getCutRectangleCornerLength=function(){return 8},t.exports=r},{}],94:[function(e,t,n){"use strict";var r=0,i=1,o=2,a=function(e){return this instanceof a?(this.id="Thenable/1.0.7",this.state=r,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},void("function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this)))):new a(e)};a.prototype={fulfill:function(e){return s(this,i,"fulfillValue",e)},reject:function(e){return s(this,o,"rejectReason",e)},then:function(e,t){var n=this,r=new a;return n.onFulfilled.push(c(e,r,"fulfill")),n.onRejected.push(c(t,r,"reject")),l(n),r.proxy}};var s=function(e,t,n,i){return e.state===r&&(e.state=t,e[n]=i,l(e)),e},l=function(e){e.state===i?u(e,"onFulfilled",e.fulfillValue):e.state===o&&u(e,"onRejected",e.rejectReason)},u=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e<r.length;e++)r[e](n)};"function"==typeof setImmediate?setImmediate(i):setTimeout(i,0)}},c=function(e,t,n){return function(r){if("function"!=typeof e)t[n].call(t,r);else{var i;try{i=e(r)}catch(e){return void t.reject(e)}d(t,i)}}},d=function(e,t){if(e!==t&&e.proxy!==t){var n;if("object"==typeof t&&null!==t||"function"==typeof t)try{n=t.then}catch(t){return void e.reject(t)}if("function"!=typeof n)e.fulfill(t);else{var r=!1;try{n.call(t,(function(n){r||(r=!0,n===t?e.reject(new TypeError("circular thenable chain")):d(e,n))}),(function(t){r||(r=!0,e.reject(t))}))}catch(t){r||e.reject(t)}}}else e.reject(new TypeError("cannot resolve promise with itself"))};a.all=function(e){return new a((function(t,n){for(var r=new Array(e.length),i=0,o=function(n,o){r[n]=o,++i===e.length&&t(r)},a=0;a<e.length;a++)!function(t){var r=e[t];null!=r&&null!=r.then?r.then((function(e){o(t,e)}),(function(e){n(e)})):o(t,r)}(a)}))},a.resolve=function(e){return new a((function(t,n){t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},t.exports="undefined"!=typeof Promise?Promise:a},{}],95:[function(e,t,n){"use strict";var r=e("./is"),i=e("./util"),o=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return i.sort.descending(e.selector,t.selector)})),a=function(e,t){var n=a.lookup=a.lookup||function(){for(var e,t={},n=0;n<o.length;n++)t[(e=o[n]).selector]=e.matches;return t}();return n[e](t)},s="("+o.map((function(e){return e.selector})).join("|")+")",l=function(e){var t=this;t._private={selectorText:null,invalid:!0};var n=function(){return{length:0,classes:[],colonSelectors:[],data:[],group:null,ids:[],meta:[],collection:null,filter:null,parent:null,ancestor:null,subject:null,child:null,descendant:null}};if(!e||r.string(e)&&e.match(/^\s*$/))t.length=0;else if("*"===e||"edge"===e||"node"===e)t[0]=n(),t[0].group="*"===e?e:e+"s",t[0].groupOnly=!0,t[0].length=1,t._private.invalid=!1,t._private.selectorText=e,t.length=1;else if(r.elementOrCollection(e)){var o=e.collection();t[0]=n(),t[0].collection=o,t[0].length=1,t.length=1}else if(r.fn(e))t[0]=n(),t[0].filter=e,t[0].length=1,t.length=1;else{if(!r.string(e))return void i.error("A selector must be created from a string; found "+e);var a=null,l={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:i.regex.number,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$"};l.variable="(?:[\\w-]|(?:\\\\"+l.metaChar+"))+",l.value=l.string+"|"+l.number,l.className=l.variable,l.id=l.variable;var u,c,d,p=function(e){return e.replace(new RegExp("\\\\("+l.metaChar+")","g"),(function(e,t){return t}))};for(u=l.comparatorOp.split("|"),d=0;d<u.length;d++)c=u[d],l.comparatorOp+="|@"+c;for(u=l.comparatorOp.split("|"),d=0;d<u.length;d++)(c=u[d]).indexOf("!")>=0||"="!==c&&(l.comparatorOp+="|\\!"+c);var f=[{name:"group",query:!0,regex:"(node|edge|\\*)",populate:function(e){this.group="*"===e?e:e+"s"}},{name:"state",query:!0,regex:s,populate:function(e){this.colonSelectors.push(e)}},{name:"id",query:!0,regex:"\\#("+l.id+")",populate:function(e){this.ids.push(p(e))}},{name:"className",query:!0,regex:"\\.("+l.className+")",populate:function(e){this.classes.push(p(e))}},{name:"dataExists",query:!0,regex:"\\[\\s*("+l.variable+")\\s*\\]",populate:function(e){this.data.push({field:p(e)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+l.variable+")\\s*("+l.comparatorOp+")\\s*("+l.value+")\\s*\\]",populate:function(e,t,n){n=null!=new RegExp("^"+l.string+"$").exec(n)?n.substring(1,n.length-1):parseFloat(n),this.data.push({field:p(e),operator:t,value:n})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+l.boolOp+")\\s*("+l.variable+")\\s*\\]",populate:function(e,t){this.data.push({field:p(t),operator:e})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+l.meta+")\\s*("+l.comparatorOp+")\\s*("+l.number+")\\s*\\]\\]",populate:function(e,t,n){this.meta.push({field:p(e),operator:t,value:parseFloat(n)})}},{name:"nextQuery",separator:!0,regex:l.separator,populate:function(){t[++d]=n(),a=null}},{name:"child",separator:!0,regex:l.child,populate:function(){var e=n();e.parent=this,e.subject=a,t[d]=e}},{name:"descendant",separator:!0,regex:l.descendant,populate:function(){var e=n();e.ancestor=this,e.subject=a,t[d]=e}},{name:"subject",modifier:!0,regex:l.subject,populate:function(){return null!=a&&this.subject!=this?(i.error("Redefinition of subject in selector `"+e+"`"),!1):(a=this,void(this.subject=this))}}];t._private.selectorText=e;var h=e;d=0;var g,v=function(e){for(var t,n,i,o=0;o<f.length;o++){var a=f[o],s=a.name;if(!r.fn(e)||e(s,a)){var l=h.match(new RegExp("^"+a.regex));if(null!=l){n=l,t=a,i=s;var u=l[0];h=h.substring(u.length);break}}}return{expr:t,match:n,name:i}},m=function(){var e=h.match(/^\s+/);if(e){var t=e[0];h=h.substring(t.length)}};for(t[0]=n(),m();;){var y=v();if(null==y.expr)return void i.error("The selector `"+e+"`is invalid");var C=[];for(g=1;g<y.match.length;g++)C.push(y.match[g]);if(t[d].length++,!1===y.expr.populate.apply(t[d],C))return;if(h.match(/^\s*$/))break}for(t.length=d+1,g=0;g<t.length;g++){var b=t[g];if(null!=b.subject){for(;b.subject!=b;)if(null!=b.parent){var x=b.parent,S=b;S.parent=null,x.child=S,b=x}else{if(null==b.ancestor){i.error("When adjusting references for the selector `"+b+"`, neither parent nor ancestor was found");break}var E=b.ancestor,w=b;w.ancestor=null,E.descendant=w,b=E}t[g]=b.subject}}}t._private.invalid=!1},u=l.prototype;u.size=function(){return this.length},u.eq=function(e){return this[e]};var c=function(e,t){if(e.groupOnly)return"*"===e.group||e.group===t.group();if(null!=e.group&&"*"!=e.group&&e.group!=t.group())return!1;var n,i=t.cy(),o=!0;for(n=0;n<e.colonSelectors.length;n++){var s=e.colonSelectors[n];if(!(o=a(s,t)))break}if(!o)return!1;var l=!0;for(n=0;n<e.ids.length;n++){var u=e.ids[n],d=t.id();if(!(l=l&&u==d))break}if(!l)return!1;var p=!0;for(n=0;n<e.classes.length;n++){var f=e.classes[n];if(!(p=p&&t.hasClass(f)))break}if(!p)return!1;var h=function(t){for(var n=!0,i=0;i<e[t.name].length;i++){var o,a=e[t.name][i],s=a.operator,l=a.value,u=a.field,c=t.fieldValue(u);if(null!=s&&null!=l){var d=r.string(c)||r.number(c)?""+c:"",p=""+l,f=!1;s.indexOf("@")>=0&&(d=d.toLowerCase(),p=p.toLowerCase(),s=s.replace("@",""),f=!0);var h=!1;s.indexOf("!")>=0&&(s=s.replace("!",""),h=!0),f&&(l=p.toLowerCase(),c=d.toLowerCase());var g=!1;switch(s){case"*=":o=d.indexOf(p)>=0;break;case"$=":o=d.indexOf(p,d.length-p.length)>=0;break;case"^=":o=0===d.indexOf(p);break;case"=":o=c===l;break;case">":g=!0,o=c>l;break;case">=":g=!0,o=c>=l;break;case"<":g=!0,o=c<l;break;case"<=":g=!0,o=c<=l;break;default:o=!1}!h||null==c&&g||(o=!o)}else if(null!=s)switch(s){case"?":o=!!c;break;case"!":o=!c;break;case"^":o=void 0===c}else o=void 0!==c;if(!o){n=!1;break}}return n},g=h({name:"data",fieldValue:function(e){return t.data(e)}});if(!g)return!1;var v=h({name:"meta",fieldValue:function(e){return t[e]()}});if(!v)return!1;if(null!=e.collection&&!e.collection.hasElementWithId(t.id()))return!1;if(null!=e.filter&&t.collection().some(e.filter))return!1;var m=function(e,t){if(null!=e){var n=!1;if(!i.hasCompoundNodes())return!1;t=t();for(var r=0;r<t.length;r++)if(c(e,t[r])){n=!0;break}return n}return!0};return!!(m(e.parent,(function(){return t.parent()}))&&m(e.ancestor,(function(){return t.parents()}))&&m(e.child,(function(){return t.children()}))&&m(e.descendant,(function(){return t.descendants()})))};u.filter=function(e){var t=this,n=e.cy();if(t._private.invalid)return n.collection();if(1===t.length&&1===t[0].length&&1===t[0].ids.length)return e.getElementById(t[0].ids[0]).collection();var r=function(e){for(var n=0;n<t.length;n++){var r=t[n];if(c(r,e))return!0}return!1};return null==t._private.selectorText&&(r=function(){return!0}),e.filter(r)},u.matches=function(e){var t=this;if(t._private.invalid)return!1;for(var n=0;n<t.length;n++){var r=t[n];if(c(r,e))return!0}return!1},u.toString=u.selector=function(){for(var e="",t=function(e){return null==e?"":e},n=function(e){return r.string(e)?'"'+e+'"':t(e)},i=function(e){return" "+e+" "},o=function(e){var r,s="";e.subject===e&&(s+="$");var l=t(e.group);for(s+=l.substring(0,l.length-1),r=0;r<e.data.length;r++){var u=e.data[r];s+=u.value?"["+u.field+i(t(u.operator))+n(u.value)+"]":"["+t(u.operator)+u.field+"]"}for(r=0;r<e.meta.length;r++){var c=e.meta[r];s+="[["+c.field+i(t(c.operator))+n(c.value)+"]]"}for(r=0;r<e.colonSelectors.length;r++)s+=e.colonSelectors[a];for(r=0;r<e.ids.length;r++)s+="#"+e.ids[a];for(r=0;r<e.classes.length;r++)s+="."+e.classes[r];return null!=e.parent&&(s=o(e.parent)+" > "+s),null!=e.ancestor&&(s=o(e.ancestor)+" "+s),null!=e.child&&(s+=" > "+o(e.child)),null!=e.descendant&&(s+=" "+o(e.descendant)),s},a=0;a<this.length;a++){var s=this[a];e+=o(s),this.length>1&&a<this.length-1&&(e+=", ")}return e},t.exports=l},{"./is":91,"./util":108}],96:[function(e,t,n){function r(){this._obj={}}var i=r.prototype;i.add=function(e){this._obj[e]=1},i.remove=function(e){this._obj[e]=0},i.has=function(e){return 1===this._obj[e]},t.exports="undefined"!=typeof Set?Set:r},{}],97:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../promise"),a={apply:function(e){var t=this,n=t._private,r=n.cy.collection();n.newStyle&&(n.contextStyles={},n.propDiffs={},t.cleanElements(e,!0));for(var i=0;i<e.length;i++){var o=e[i],a=t.getContextMeta(o);if(!a.empty){r.merge(o);var s=t.getContextStyle(a),l=t.applyContextStyle(a,s,o);n.newStyle||t.updateTransitions(o,l.diffProps),t.updateStyleHints(o)}}return n.newStyle=!1,r},getPropertiesDiff:function(e,t){var n=this,r=n._private.propDiffs=n._private.propDiffs||{},i=e+"-"+t,o=r[i];if(o)return o;for(var a=[],s={},l=0;l<n.length;l++){var u=n[l],c="t"===e[l]!=("t"===t[l]),d=u.mappedProperties.length>0;if(c||d){var p;c&&d||c?p=u.properties:d&&(p=u.mappedProperties);for(var f=0;f<p.length;f++){for(var h=p[f],g=h.name,v=!1,m=l+1;m<n.length;m++){var y=n[m];if("t"===t[m]&&(v=null!=y.properties[h.name]))break}s[g]||v||(s[g]=!0,a.push(g))}}}return r[i]=a,a},getContextMeta:function(e){var t,n=this,r="",i=e._private.styleCxtKey||"";n._private.newStyle&&(i="");for(var o=0;o<n.length;o++){var a=n[o];r+=a.selector&&a.selector.matches(e)?"t":"f"}return t=n.getPropertiesDiff(i,r),e._private.styleCxtKey=r,{key:r,diffPropNames:t,empty:0===t.length}},getContextStyle:function(e){var t=e.key,n=this,r=this._private.contextStyles=this._private.contextStyles||{};if(r[t])return r[t];for(var i={_private:{key:t}},o=0;o<n.length;o++){var a=n[o];if("t"===t[o])for(var s=0;s<a.properties.length;s++){var l=a.properties[s];i[l.name]=l}}return r[t]=i,i},applyContextStyle:function(e,t,n){for(var r=this,i=e.diffPropNames,o={},a=0;a<i.length;a++){var s=i[a],l=t[s],u=n.pstyle(s);if(!l){if(!u)continue;l=u.bypass?{name:s,deleteBypassed:!0}:{name:s,delete:!0}}if(u!==l){var c=o[s]={prev:u};r.applyParsedProperty(n,l),c.next=n.pstyle(s),c.next&&c.next.bypass&&(c.next=c.next.bypassed)}}return{diffProps:o}},updateStyleHints:function(e){var t=e._private,n=this;if(!e.removed()){var r=!1;if("nodes"===t.group)for(var i=1;i<=n.pieBackgroundN;i++)if((c=e.pstyle("pie-"+i+"-background-size").value)>0){r=!0;break}t.hasPie=r;var o=e.pstyle("text-transform").strValue,a=e.pstyle("label").strValue,s=e.pstyle("source-label").strValue,l=e.pstyle("target-label").strValue,u=e.pstyle("font-style").strValue,c=e.pstyle("font-size").pfValue+"px",d=e.pstyle("font-family").strValue,p=e.pstyle("font-weight").strValue,f=u+"$"+c+"$"+d+"$"+p+"$"+o+"$"+e.pstyle("text-valign").strValue+"$"+e.pstyle("text-valign").strValue+"$"+e.pstyle("text-outline-width").pfValue+"$"+e.pstyle("text-wrap").strValue+"$"+e.pstyle("text-max-width").pfValue;t.labelStyleKey=f,t.sourceLabelKey=f+"$"+s,t.targetLabelKey=f+"$"+l,t.labelKey=f+"$"+a,t.fontKey=u+"$"+p+"$"+c+"$"+d,t.styleKey=Date.now()}},applyParsedProperty:function(e,t){var n,o=this,a=t,s=e._private.style,l=o.types,u=o.properties[a.name].type,c=a.bypass,d=s[a.name],p=d&&d.bypass,f=e._private,h="mapping";if("curve-style"===t.name&&"haystack"===t.value&&e.isEdge()&&(e.isLoop()||e.source().isParent()||e.target().isParent())&&(a=t=this.parse(t.name,"bezier",c)),a.delete)return s[a.name]=void 0,!0;if(a.deleteBypassed)return!d||!!d.bypass&&(d.bypassed=void 0,!0);if(a.deleteBypass)return!d||!!d.bypass&&(s[a.name]=d.bypassed,!0);var g=function(){r.error("Do not assign mappings to elements without corresponding data (e.g. ele `"+e.id()+"` for property `"+a.name+"` with data field `"+a.field+"`); try a `["+a.field+"]` selector to limit scope to elements with `"+a.field+"` defined")};switch(a.mapped){case l.mapData:for(var v=a.field.split("."),m=f.data,y=0;y<v.length&&m;y++)m=m[v[y]];var C;if((C=i.number(m)?(m-a.fieldMin)/(a.fieldMax-a.fieldMin):0)<0?C=0:C>1&&(C=1),u.color){var b=a.valueMin[0],x=a.valueMax[0],S=a.valueMin[1],E=a.valueMax[1],w=a.valueMin[2],O=a.valueMax[2],_=null==a.valueMin[3]?1:a.valueMin[3],L=null==a.valueMax[3]?1:a.valueMax[3],R=[Math.round(b+(x-b)*C),Math.round(S+(E-S)*C),Math.round(w+(O-w)*C),Math.round(_+(L-_)*C)];n={bypass:a.bypass,name:a.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else{if(!u.number)return!1;var D=a.valueMin+(a.valueMax-a.valueMin)*C;n=this.parse(a.name,D,a.bypass,h)}n||(n=this.parse(a.name,d.strValue,a.bypass,h)),n||g(),n.mapping=a,a=n;break;case l.data:if(v=a.field.split("."),m=f.data)for(y=0;y<v.length;y++)m=m[v[y]];if(!(n=this.parse(a.name,m,a.bypass,h))){var N=d?d.strValue:"";n=this.parse(a.name,N,a.bypass,h)}n||g(),n.mapping=a,a=n;break;case l.fn:var M=(0,a.value)(e);(n=this.parse(a.name,M,a.bypass,h)).mapping=a,a=n;break;case void 0:break;default:return!1}return c?(a.bypassed=p?d.bypassed:d,s[a.name]=a):p?d.bypassed=a:s[a.name]=a,this.checkZOrderTrigger(e,a.name,d?d.value:null,a.value),!0},cleanElements:function(e,t){for(var n=this.properties,r=0;r<e.length;r++){var i=e[r];if(t)for(var o=i._private.style,a=0;a<n.length;a++){var s=n[a],l=o[s.name];l&&(l.bypass?l.bypassed=null:o[s.name]=null)}else i._private.style={}}},update:function(){this._private.cy.mutableElements().updateStyle()},updateMappers:function(e){for(var t=this,n=this._private.cy.collection(),r=0;r<e.length;r++){for(var i=e[r],o=i._private.style,a=!1,s=0;s<t.properties.length;s++){var l=o[t.properties[s].name];if(l&&l.mapping){var u=l.mapping;this.applyParsedProperty(i,u),a=!0}}a&&(this.updateStyleHints(i),n.merge(i))}return n},updateTransitions:function(e,t,n){var r=this,a=e._private,s=e.pstyle("transition-property").value,l=e.pstyle("transition-duration").pfValue,u=e.pstyle("transition-delay").pfValue;if(s.length>0&&l>0){for(var c={},d=!1,p=0;p<s.length;p++){var f=s[p],h=e.pstyle(f),g=t[f];if(g){var v,m=g.prev,y=null!=g.next?g.next:h,C=!1,b=1e-6;m&&(i.number(m.pfValue)&&i.number(y.pfValue)?(C=y.pfValue-m.pfValue,v=m.pfValue+b*C):i.number(m.value)&&i.number(y.value)?(C=y.value-m.value,v=m.value+b*C):i.array(m.value)&&i.array(y.value)&&(C=m.value[0]!==y.value[0]||m.value[1]!==y.value[1]||m.value[2]!==y.value[2],v=m.strValue),C&&(c[f]=y.strValue,this.applyBypass(e,f,v),d=!0))}}if(!d)return;a.transitioning=!0,new o((function(t){u>0?e.delayAnimation(u).play().promise().then(t):t()})).then((function(){return e.animation({style:c,duration:l,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){r.removeBypasses(e,s),e.rtrigger("style"),a.transitioning=!1}))}else a.transitioning&&(this.removeBypasses(e,s),e.rtrigger("style"),a.transitioning=!1)},checkZOrderTrigger:function(e,t,n,r){var i=this.properties[t];i.triggersZOrder&&(null==n||i.triggersZOrder(n,r))&&this._private.cy.notify({type:"zorder",eles:e})}};t.exports=a},{"../is":91,"../promise":94,"../util":108}],98:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o={applyBypass:function(e,t,n,o){var a=this,s=[],l=!0;if("*"===t||"**"===t){if(void 0!==n)for(var u=0;u<a.properties.length;u++)t=(f=a.properties[u]).name,(p=this.parse(t,n,!0))&&s.push(p)}else if(r.string(t))(p=this.parse(t,n,!0))&&s.push(p);else{if(!r.plainObject(t))return!1;var c=t;o=n;var d=Object.keys(c);for(u=0;u<d.length;u++){t=d[u];var p,f=a.properties[t];void 0===(n=c[t])&&(n=c[i.dash2camel(t)]),void 0!==n&&(p=this.parse(t,n,!0))&&s.push(p)}}if(0===s.length)return!1;var h=!1;for(u=0;u<e.length;u++){for(var g,v=e[u],m={},y=0;y<s.length;y++){if(f=s[y],o){var C=v.pstyle(f.name);g=m[f.name]={prev:C}}h=this.applyParsedProperty(v,f)||h,o&&(g.next=v.pstyle(f.name))}h&&this.updateStyleHints(v),o&&this.updateTransitions(v,m,l)}return h},overrideBypass:function(e,t,n){t=i.camel2dash(t);for(var r=0;r<e.length;r++){var o=e[r],a=o._private.style[t],s=this.properties[t].type,l=s.color,u=s.mutiple;if(a&&a.bypass){var c=null!=a.pfValue?a.pfValue:a.value;a.value=n,null!=a.pfValue&&(a.pfValue=n),a.strValue=l?"rgb("+n.join(",")+")":u?n.join(" "):""+n,this.checkZOrderTrigger(o,t,c,n)}else this.applyBypass(o,t,n)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,n){for(var r=!0,i=0;i<e.length;i++){for(var o=e[i],a={},s=0;s<t.length;s++){var l=t[s],u=this.properties[l],c=o.pstyle(u.name);if(c&&c.bypass){var d="",p=this.parse(l,d,!0),f=a[u.name]={prev:c};this.applyParsedProperty(o,p),f.next=o.pstyle(u.name)}}this.updateStyleHints(o),n&&this.updateTransitions(o,a,r)}}};t.exports=o},{"../is":91,"../util":108}],99:[function(e,t,n){"use strict";var r=e("../window"),i={getEmSizeInPixels:function(){var e=this.containerCss("font-size");return null!=e?parseFloat(e):1},containerCss:function(e){var t=this._private.cy.container();if(r&&t&&r.getComputedStyle)return r.getComputedStyle(t).getPropertyValue(e)}};t.exports=i},{"../window":116}],100:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={getRenderedStyle:function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},getRawStyle:function(e,t){var n=this;if(e=e[0]){for(var i={},o=0;o<n.properties.length;o++){var a=n.properties[o],s=n.getStylePropertyValue(e,a.name,t);null!=s&&(i[a.name]=s,i[r.dash2camel(a.name)]=s)}return i}},getIndexedStyle:function(e,t,n,r){var i=e.pstyle(t)[n][r];return null!=i?i:e.cy().style().getDefaultProperty(t)[n][0]},getStylePropertyValue:function(e,t,n){var r=this;if(e=e[0]){var i=r.properties[t];i.alias&&(i=i.pointsTo);var o=i.type,a=e.pstyle(i.name),s=e.cy().zoom();if(a){var l=a.units?o.implicitUnits||"px":null,u=l?[].concat(a.pfValue).map((function(e){return e*(n?s:1)+l})).join(" "):a.strValue;return u}}},getAnimationStartStyle:function(e,t){for(var n={},r=0;r<t.length;r++){var o=t[r].name,a=e.pstyle(o);void 0!==a&&(a=i.plainObject(a)?this.parse(o,a.strValue):this.parse(o,a)),a&&(n[o]=a)}return n},getPropsList:function(e){var t=[],n=e,i=this.properties;if(n)for(var o=Object.keys(n),a=0;a<o.length;a++){var s=o[a],l=n[s],u=i[s]||i[r.camel2dash(s)],c=this.parse(u.name,l);c&&t.push(c)}return t}};t.exports=o},{"../is":91,"../util":108}],101:[function(e,t,n){"use strict";var r=e("../is"),i=e("../util"),o=e("../selector"),a=function(e){return this instanceof a?r.core(e)?(this._private={cy:e,coreStyle:{}},this.length=0,void this.resetToDefault()):void i.error("A style must have a core reference"):new a(e)},s=a.prototype;s.instanceString=function(){return"style"},s.clear=function(){for(var e=0;e<this.length;e++)this[e]=void 0;return this.length=0,this._private.newStyle=!0,this},s.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},s.core=function(){return this._private.coreStyle},s.selector=function(e){var t="core"===e?null:new o(e),n=this.length++;return this[n]={selector:t,properties:[],mappedProperties:[],index:n},this},s.css=function(){var e=this,t=arguments;switch(t.length){case 1:for(var n=t[0],r=0;r<e.properties.length;r++){var o=e.properties[r],a=n[o.name];void 0===a&&(a=n[i.dash2camel(o.name)]),void 0!==a&&this.cssRule(o.name,a)}break;case 2:this.cssRule(t[0],t[1])}return this},s.style=s.css,s.cssRule=function(e,t){var n=this.parse(e,t);if(n){var r=this.length-1;this[r].properties.push(n),this[r].properties[n.name]=n,n.name.match(/pie-(\d+)-background-size/)&&n.value&&(this._private.hasPie=!0),n.mapped&&this[r].mappedProperties.push(n),!this[r].selector&&(this._private.coreStyle[n.name]=n)}return this},a.fromJson=function(e,t){var n=new a(e);return n.fromJson(t),n},a.fromString=function(e,t){return new a(e).fromString(t)},[e("./apply"),e("./bypass"),e("./container"),e("./get-for-ele"),e("./json"),e("./string-sheet"),e("./properties"),e("./parse")].forEach((function(e){i.extend(s,e)})),a.types=s.types,a.properties=s.properties,t.exports=a},{"../is":91,"../selector":95,"../util":108,"./apply":97,"./bypass":98,"./container":99,"./get-for-ele":100,"./json":102,"./parse":103,"./properties":104,"./string-sheet":105}],102:[function(e,t,n){"use strict";var r={applyFromJson:function(e){for(var t=this,n=0;n<e.length;n++){var r=e[n],i=r.selector,o=r.style||r.css,a=Object.keys(o);t.selector(i);for(var s=0;s<a.length;s++){var l=a[s],u=o[l];t.css(l,u)}}return t},fromJson:function(e){var t=this;return t.resetToDefault(),t.applyFromJson(e),t},json:function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var n=this[t],r=n.selector,i=n.properties,o={},a=0;a<i.length;a++){var s=i[a];o[s.name]=s.strValue}e.push({selector:r?r.toString():"core",style:o})}return e}};t.exports=r},{}],103:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o=e("../math"),a={parse:function(e,t,n,o){var a=this;if(i.fn(t))return a.parseImplWarn(e,t,n,o);var s,l=[e,t,n,"mapping"===o||!0===o||!1===o||null==o?"dontcare":o].join("$"),u=a.propCache=a.propCache||{};return(s=u[l])||(s=u[l]=a.parseImplWarn(e,t,n,o)),(n||"mapping"===o)&&(s=r.copy(s))&&(s.value=r.copy(s.value)),s},parseImplWarn:function(e,t,n,i){var o=this.parseImpl(e,t,n,i);return o||null==t||r.error("The style property `%s: %s` is invalid",e,t),o},parseImpl:function(e,t,n,a){var s=this;e=r.camel2dash(e);var l=s.properties[e],u=t,c=s.types;if(!l)return null;if(null==t)return null;l.alias&&(l=l.pointsTo,e=l.name);var d=i.string(t);d&&(t=t.trim());var p,f,h=l.type;if(!h)return null;if(n&&(""===t||null===t))return{name:e,value:t,bypass:!0,deleteBypass:!0};if(i.fn(t))return{name:e,value:t,strValue:"fn",mapped:c.fn,bypass:n};if(!d||a);else{if(p=new RegExp(c.data.regex).exec(t)){if(n)return!1;var g=c.data;return{name:e,value:p,strValue:""+t,mapped:g,field:p[1],bypass:n}}if(f=new RegExp(c.mapData.regex).exec(t)){if(n)return!1;if(h.multiple)return!1;if(g=c.mapData,!h.color&&!h.number)return!1;var v=this.parse(e,f[4]);if(!v||v.mapped)return!1;var m=this.parse(e,f[5]);if(!m||m.mapped)return!1;if(v.value===m.value)return!1;if(h.color){var y=v.value,C=m.value;if(!(y[0]!==C[0]||y[1]!==C[1]||y[2]!==C[2]||y[3]!==C[3]&&(null!=y[3]&&1!==y[3]||null!=C[3]&&1!==C[3])))return!1}return{name:e,value:f,strValue:""+t,mapped:g,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:v.value,valueMax:m.value,bypass:n}}}if(h.multiple&&"multiple"!==a){var b;if(b=d?t.split(/\s+/):i.array(t)?t:[t],h.evenMultiple&&b.length%2!=0)return null;for(var x=[],S=[],E=[],w=!1,O=0;O<b.length;O++){var _=s.parse(e,b[O],n,"multiple");w=w||i.string(_.value),x.push(_.value),E.push(null!=_.pfValue?_.pfValue:_.value),S.push(_.units)}return h.validate&&!h.validate(x,S)?null:h.singleEnum&&w?1===x.length&&i.string(x[0])?{name:e,value:x[0],strValue:x[0],bypass:n}:null:{name:e,value:x,pfValue:E,strValue:x.join(" "),bypass:n,units:S}}var L=function(){for(var r=0;r<h.enums.length;r++)if(h.enums[r]===t)return{name:e,value:t,strValue:""+t,bypass:n};return null};if(h.number){var R,D="px";if(h.units&&(R=h.units),h.implicitUnits&&(D=h.implicitUnits),!h.unitless)if(d){var N="px|em"+(h.allowPercent?"|\\%":"");R&&(N=R);var M=t.match("^("+r.regex.number+")("+N+")?$");M&&(t=M[1],R=M[2]||D)}else R&&!h.implicitUnits||(R=D);if(t=parseFloat(t),isNaN(t)&&void 0===h.enums)return null;if(isNaN(t)&&void 0!==h.enums)return t=u,L();if(h.integer&&!i.integer(t))return null;if(void 0!==h.min&&(t<h.min||h.strictMin&&t===h.min)||void 0!==h.max&&(t>h.max||h.strictMax&&t===h.max))return null;var I={name:e,value:t,strValue:""+t+(R||""),units:R,bypass:n};return h.unitless||"px"!==R&&"em"!==R?I.pfValue=t:I.pfValue="px"!==R&&R?this.getEmSizeInPixels()*t:t,"ms"!==R&&"s"!==R||(I.pfValue="ms"===R?t:1e3*t),"deg"!==R&&"rad"!==R||(I.pfValue="rad"===R?t:o.deg2rad(t)),"%"===R&&(I.pfValue=t/100),I}if(h.propList){var A=[],P=""+t;if("none"===P);else{var k=P.split(",");for(O=0;O<k.length;O++){var T=k[O].trim();s.properties[T]&&A.push(T)}if(0===A.length)return null}return{name:e,value:A,strValue:0===A.length?"none":A.join(", "),bypass:n}}if(h.color){var V=r.color2tuple(t);return V?{name:e,value:V,pfValue:V,strValue:""+t,bypass:n}:null}if(h.regex||h.regexes){if(h.enums){var B=L();if(B)return B}var z=h.regexes?h.regexes:[h.regex];for(O=0;O<z.length;O++){var j=new RegExp(z[O]).exec(t);if(j)return{name:e,value:h.singleRegexMatchValue?j[1]:j,strValue:""+t,bypass:n}}return null}return h.string?{name:e,value:""+t,strValue:""+t,bypass:n}:h.enums?L():null}};t.exports=a},{"../is":91,"../math":93,"../util":108}],104:[function(e,t,n){"use strict";var r=e("../util"),i=e("../is"),o={};!function(){var e=r.regex.number,t=r.regex.rgbaNoBackRefs,n=r.regex.hslaNoBackRefs,a=r.regex.hex3,s=r.regex.hex6,l=function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},u=function(r){var i=e+"|\\w+|"+t+"|"+n+"|"+a+"|"+s;return"^"+r+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+e+")\\s*\\,\\s*("+e+")\\s*,\\s*("+i+")\\s*\\,\\s*("+i+")\\)$"},c=["^url\\s*\\(\\s*['\"]?(.+?)['\"]?\\s*\\)$","^(none)$","^(.+)$"];o.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials"],multiple:!0},bgClip:{enums:["none","node"]},color:{color:!0},bool:{enums:["yes","no"]},lineStyle:{enums:["solid","dotted","dashed"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments"]},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontVariant:{enums:["small-caps","normal"]},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textBackgroundShape:{enums:["rectangle","roundrectangle"]},nodeShape:{enums:["rectangle","roundrectangle","cutrectangle","ellipse","triangle","square","pentagon","hexagon","heptagon","octagon","star","diamond","vee","rhomboid","polygon"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","triangle-cross","triangle-backcurve","half-triangle-overshot","vee","square","circle","diamond","none"]},arrowFill:{enums:["filled","hollow"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},text:{string:!0},data:{mapping:!0,regex:l("data")},layoutData:{mapping:!0,regex:l("layoutData")},scratch:{mapping:!0,regex:l("scratch")},mapData:{mapping:!0,regex:u("mapData")},mapLayoutData:{mapping:!0,regex:u("mapLayoutData")},mapScratch:{mapping:!0,regex:u("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:c,singleRegexMatchValue:!0},urls:{regexes:c,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-line"],singleEnum:!0,validate:function(e,t){switch(e.length){case 2:return"deg"!==t[0]&&"rad"!==t[0]&&"deg"!==t[1]&&"rad"!==t[1];case 1:return i.string(e[0])||"deg"===t[0]||"rad"===t[0];default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]}};var d={zeroNonZero:function(e,t){return 0===e&&0!==t||0!==e&&0===t},anyDiff:function(e,t){return e!==t}},p=d,f=o.types,h=o.properties=[{name:"label",type:f.text},{name:"text-rotation",type:f.textRotation},{name:"text-margin-x",type:f.bidirectionalSize},{name:"text-margin-y",type:f.bidirectionalSize},{name:"source-label",type:f.text},{name:"source-text-rotation",type:f.textRotation},{name:"source-text-margin-x",type:f.bidirectionalSize},{name:"source-text-margin-y",type:f.bidirectionalSize},{name:"source-text-offset",type:f.size},{name:"target-label",type:f.text},{name:"target-text-rotation",type:f.textRotation},{name:"target-text-margin-x",type:f.bidirectionalSize},{name:"target-text-margin-y",type:f.bidirectionalSize},{name:"target-text-offset",type:f.size},{name:"text-valign",type:f.valign},{name:"text-halign",type:f.halign},{name:"color",type:f.color},{name:"text-outline-color",type:f.color},{name:"text-outline-width",type:f.size},{name:"text-outline-opacity",type:f.zeroOneNumber},{name:"text-opacity",type:f.zeroOneNumber},{name:"text-background-color",type:f.color},{name:"text-background-opacity",type:f.zeroOneNumber},{name:"text-background-padding",type:f.size},{name:"text-border-opacity",type:f.zeroOneNumber},{name:"text-border-color",type:f.color},{name:"text-border-width",type:f.size},{name:"text-border-style",type:f.borderStyle},{name:"text-background-shape",type:f.textBackgroundShape},{name:"text-transform",type:f.textTransform},{name:"text-wrap",type:f.textWrap},{name:"text-max-width",type:f.size},{name:"text-events",type:f.bool},{name:"font-family",type:f.fontFamily},{name:"font-style",type:f.fontStyle},{name:"font-weight",type:f.fontWeight},{name:"font-size",type:f.size},{name:"min-zoomed-font-size",type:f.size},{name:"events",type:f.bool},{name:"display",type:f.display,triggersZOrder:p.anyDiff},{name:"visibility",type:f.visibility,triggersZOrder:p.anyDiff},{name:"opacity",type:f.zeroOneNumber,triggersZOrder:p.zeroNonZero},{name:"z-compound-depth",type:f.zCompoundDepth,triggersZOrder:p.anyDiff},{name:"z-index-compare",type:f.zIndexCompare,triggersZOrder:p.anyDiff},{name:"z-index",type:f.nonNegativeInt,triggersZOrder:p.anyDiff},{name:"overlay-padding",type:f.size},{name:"overlay-color",type:f.color},{name:"overlay-opacity",type:f.zeroOneNumber},{name:"transition-property",type:f.propList},{name:"transition-duration",type:f.time},{name:"transition-delay",type:f.time},{name:"transition-timing-function",type:f.easing},{name:"height",type:f.nodeSize},{name:"width",type:f.nodeSize},{name:"shape",type:f.nodeShape},{name:"shape-polygon-points",type:f.polygonPointList},{name:"background-color",type:f.color},{name:"background-opacity",type:f.zeroOneNumber},{name:"background-blacken",type:f.nOneOneNumber},{name:"padding",type:f.sizeMaybePercent},{name:"padding-relative-to",type:f.paddingRelativeTo},{name:"border-color",type:f.color},{name:"border-opacity",type:f.zeroOneNumber},{name:"border-width",type:f.size},{name:"border-style",type:f.borderStyle},{name:"background-image",type:f.urls},{name:"background-image-crossorigin",type:f.bgCrossOrigin},{name:"background-image-opacity",type:f.zeroOneNumbers},{name:"background-position-x",type:f.bgPos},{name:"background-position-y",type:f.bgPos},{name:"background-width-relative-to",type:f.bgRelativeTo},{name:"background-height-relative-to",type:f.bgRelativeTo},{name:"background-repeat",type:f.bgRepeat},{name:"background-fit",type:f.bgFit},{name:"background-clip",type:f.bgClip},{name:"background-width",type:f.bgWH},{name:"background-height",type:f.bgWH},{name:"position",type:f.position},{name:"compound-sizing-wrt-labels",type:f.compoundIncludeLabels},{name:"min-width",type:f.size},{name:"min-width-bias-left",type:f.sizeMaybePercent},{name:"min-width-bias-right",type:f.sizeMaybePercent},{name:"min-height",type:f.size},{name:"min-height-bias-top",type:f.sizeMaybePercent},{name:"min-height-bias-bottom",type:f.sizeMaybePercent},{name:"line-style",type:f.lineStyle},{name:"line-color",type:f.color},{name:"curve-style",type:f.curveStyle},{name:"haystack-radius",type:f.zeroOneNumber},{name:"source-endpoint",type:f.edgeEndpoint},{name:"target-endpoint",type:f.edgeEndpoint},{name:"control-point-step-size",type:f.size},{name:"control-point-distances",type:f.bidirectionalSizes},{name:"control-point-weights",type:f.numbers},{name:"segment-distances",type:f.bidirectionalSizes},{name:"segment-weights",type:f.numbers},{name:"edge-distances",type:f.edgeDistances},{name:"arrow-scale",type:f.positiveNumber},{name:"loop-direction",type:f.angle},{name:"loop-sweep",type:f.angle},{name:"source-distance-from-node",type:f.size},{name:"target-distance-from-node",type:f.size},{name:"selection-box-color",type:f.color},{name:"selection-box-opacity",type:f.zeroOneNumber},{name:"selection-box-border-color",type:f.color},{name:"selection-box-border-width",type:f.size},{name:"active-bg-color",type:f.color},{name:"active-bg-opacity",type:f.zeroOneNumber},{name:"active-bg-size",type:f.size},{name:"outside-texture-bg-color",type:f.color},{name:"outside-texture-bg-opacity",type:f.zeroOneNumber}],g=o.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];o.pieBackgroundN=16,h.push({name:"pie-size",type:f.sizeMaybePercent});for(var v=1;v<=o.pieBackgroundN;v++)h.push({name:"pie-"+v+"-background-color",type:f.color}),h.push({name:"pie-"+v+"-background-size",type:f.percent}),h.push({name:"pie-"+v+"-background-opacity",type:f.zeroOneNumber});var m=o.arrowPrefixes=["source","mid-source","target","mid-target"];for([{name:"arrow-shape",type:f.arrowShape},{name:"arrow-color",type:f.color},{name:"arrow-fill",type:f.arrowFill}].forEach((function(e){m.forEach((function(t){var n=t+"-"+e.name,r=e.type;h.push({name:n,type:r})}))}),{}),o.propertyNames=h.map((function(e){return e.name})),v=0;v<h.length;v++){var y=h[v];h[y.name]=y}for(v=0;v<g.length;v++){var C=g[v],b=h[C.pointsTo],x={name:C.name,alias:!0,pointsTo:b};h.push(x),h[C.name]=x}}(),o.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},o.getDefaultProperties=r.memoize((function(){for(var e=r.extend({events:"yes","text-events":"no","text-valign":"top","text-halign":"center",color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-position-x":"50%","background-position-y":"50%","background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1",padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce((function(e,t){for(var n=1;n<=o.pieBackgroundN;n++){var r=t.name.replace("{{i}}",n),i=t.value;e[r]=i}return e}),{}),{"line-style":"solid","line-color":"#999","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"edge-distances":"intersection","curve-style":"bezier","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node"},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"}].reduce((function(e,t){return o.arrowPrefixes.forEach((function(n){var r=n+"-"+t.name,i=t.value;e[r]=i})),e}),{})),t={},n=0;n<this.properties.length;n++){var i=this.properties[n];if(!i.pointsTo){var a=i.name,s=e[a],l=this.parse(a,s);t[a]=l}}return t})),o.addDefaultStylesheet=function(){this.selector("$node > node").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3,"curve-style":"haystack"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector("node:parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}).selector("core").css({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125}),this.defaultLength=this.length},t.exports=o},{"../is":91,"../util":108}],105:[function(e,t,n){"use strict";var r=e("../util"),i=e("../selector"),o={applyFromString:function(e){function t(){c=c.length>o.length?c.substr(o.length):""}function n(){a=a.length>s.length?a.substr(s.length):""}var o,a,s,l=this,u=this,c=""+e;for(c=c.replace(/[\/][*](\s|.)+?[*][\/]/g,"");!c.match(/^\s*$/);){var d=c.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!d){r.error("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+c);break}o=d[0];var p=d[1];if("core"!==p&&new i(p)._private.invalid)r.error("Skipping parsing of block: Invalid selector found in string stylesheet: "+p),t();else{var f=d[2],h=!1;a=f;for(var g=[];!a.match(/^\s*$/);){var v=a.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!v){r.error("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+f),h=!0;break}s=v[0];var m=v[1],y=v[2];(b=l.properties[m])?u.parse(m,y)?(g.push({name:m,val:y}),n()):(r.error("Skipping property: Invalid property definition in: "+s),n()):(r.error("Skipping property: Invalid property name in: "+s),n())}if(h){t();break}u.selector(p);for(var C=0;C<g.length;C++){var b=g[C];u.css(b.name,b.val)}t()}}return u},fromString:function(e){var t=this;return t.resetToDefault(),t.applyFromString(e),t}};t.exports=o},{"../selector":95,"../util":108}],106:[function(e,t,n){"use strict";var r=e("./is"),i=e("./util"),o=e("./style"),a=function(){return this instanceof a?void(this.length=0):new a},s=a.prototype;s.instanceString=function(){return"stylesheet"},s.selector=function(e){return this[this.length++]={selector:e,properties:[]},this},s.css=function(e,t){var n=this.length-1;if(r.string(e))this[n].properties.push({name:e,value:t});else if(r.plainObject(e))for(var a=e,s=0;s<o.properties.length;s++){var l=o.properties[s],u=a[l.name];void 0===u&&(u=a[i.dash2camel(l.name)]),void 0!==u&&(e=l.name,t=u,this[n].properties.push({name:e,value:t}))}return this},s.style=s.css,s.generateStyle=function(e){for(var t=new o(e),n=0;n<this.length;n++){var r=this[n],i=r.selector,a=r.properties;t.selector(i);for(var s=0;s<a.length;s++){var l=a[s];t.css(l.name,l.value)}}return t},t.exports=a},{"./is":91,"./style":101,"./util":108}],107:[function(e,t,n){"use strict";var r=e("../is");t.exports={hex2tuple:function(e){if((4===e.length||7===e.length)&&"#"===e[0]){var t,n,r,i=16;return 4===e.length?(t=parseInt(e[1]+e[1],i),n=parseInt(e[2]+e[2],i),r=parseInt(e[3]+e[3],i)):(t=parseInt(e[1]+e[2],i),n=parseInt(e[3]+e[4],i),r=parseInt(e[5]+e[6],i)),[t,n,r]}},hsl2tuple:function(e){function t(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var n,r,i,o,a,s,l,u,c=new RegExp("^"+this.regex.hsla+"$").exec(e);if(c){if((r=parseInt(c[1]))<0?r=(360- -1*r%360)%360:r>360&&(r%=360),r/=360,(i=parseFloat(c[2]))<0||i>100)return;if(i/=100,(o=parseFloat(c[3]))<0||o>100)return;if(o/=100,void 0!==(a=c[4])&&((a=parseFloat(a))<0||a>1))return;if(0===i)s=l=u=Math.round(255*o);else{var d=o<.5?o*(1+i):o+i-o*i,p=2*o-d;s=Math.round(255*t(p,d,r+1/3)),l=Math.round(255*t(p,d,r)),u=Math.round(255*t(p,d,r-1/3))}n=[s,l,u,a]}return n},rgb2tuple:function(e){var t,n=new RegExp("^"+this.regex.rgba+"$").exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var o=n[i];if("%"===o[o.length-1]&&(r[i]=!0),o=parseFloat(o),r[i]&&(o=o/100*255),o<0||o>255)return;t.push(Math.floor(o))}var a=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(a&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t},colorname2tuple:function(e){return this.colors[e.toLowerCase()]},color2tuple:function(e){return(r.array(e)?e:null)||this.colorname2tuple(e)||this.hex2tuple(e)||this.rgb2tuple(e)||this.hsl2tuple(e)},colors:{transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}},{"../is":91}],108:[function(e,t,n){"use strict";var r=e("../is"),i=e("../math"),o={trueify:function(){return!0},falsify:function(){return!1},zeroify:function(){return 0},noop:function(){},error:function(e){console.error?(console.error.apply(console,arguments),console.trace&&console.trace()):(console.log.apply(console,arguments),console.trace&&console.trace())},clone:function(e){return this.extend({},e)},copy:function(e){return null==e?e:r.array(e)?e.slice():r.plainObject(e)?this.clone(e):e},clonePosition:function(e){return{x:e.x,y:e.y}},uuid:function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t}};o.makeBoundingBox=i.makeBoundingBox.bind(i),o._staticEmptyObject={},o.staticEmptyObject=function(){return o._staticEmptyObject},o.extend=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n<t.length;n++){var r=t[n];if(r)for(var i=Object.keys(r),o=0;o<i.length;o++){var a=i[o];e[a]=r[a]}}return e},o.default=function(e,t){return void 0===e?t:e},o.removeFromArray=function(e,t,n){for(var r=e.length;r>=0&&(e[r]!==t||(e.splice(r,1),n));r--);},o.clearArray=function(e){e.splice(0,e.length)},o.push=function(e){var t=Array.prototype.slice.call(arguments,1);Array.prototype.push.apply(e,t)},o.getPrefixedProperty=function(e,t,n){return n&&(t=this.prependCamel(n,t)),e[t]},o.setPrefixedProperty=function(e,t,n,r){n&&(t=this.prependCamel(n,t)),e[t]=r},[e("./colors"),e("./maps"),{memoize:e("./memoize")},e("./regex"),e("./strings"),e("./timing"),e("./sort")].forEach((function(e){o.extend(o,e)})),t.exports=o},{"../is":91,"../math":93,"./colors":107,"./maps":109,"./memoize":110,"./regex":111,"./sort":112,"./strings":113,"./timing":114}],109:[function(e,t,n){"use strict";var r=e("../is");t.exports={mapEmpty:function(e){var t=!0;return null!=e?0===Object.keys(e).length:t},pushMap:function(e){var t=this.getMap(e);null==t?this.setMap(this.extend({},e,{value:[e.value]})):t.push(e.value)},setMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=0;o<i;o++){var a=n[o];r.plainObject(a)&&this.error("Tried to set map with object key"),o<n.length-1?(null==t[a]&&(t[a]={}),t=t[a]):t[a]=e.value}},getMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=0;o<i;o++){var a=n[o];if(r.plainObject(a)&&this.error("Tried to get map with object key"),null==(t=t[a]))return t}return t},deleteMap:function(e){for(var t=e.map,n=e.keys,i=n.length,o=e.keepChildren,a=0;a<i;a++){var s=n[a];if(r.plainObject(s)&&this.error("Tried to delete map with object key"),a===e.keys.length-1)if(o)for(var l=Object.keys(t),u=0;u<l.length;u++){var c=l[u];o[c]||(t[c]=void 0)}else t[s]=void 0;else t=t[s]}}}},{"../is":91}],110:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")});var n=function(){var r,i=this,o=arguments,a=t.apply(i,o),s=n.cache;return(r=s[a])||(r=s[a]=e.apply(i,o)),r};return n.cache={},n}},{}],111:[function(e,t,n){"use strict";var r="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",i="rgb[a]?\\(("+r+"[%]?)\\s*,\\s*("+r+"[%]?)\\s*,\\s*("+r+"[%]?)(?:\\s*,\\s*("+r+"))?\\)",o="rgb[a]?\\((?:"+r+"[%]?)\\s*,\\s*(?:"+r+"[%]?)\\s*,\\s*(?:"+r+"[%]?)(?:\\s*,\\s*(?:"+r+"))?\\)",a="hsl[a]?\\(("+r+")\\s*,\\s*("+r+"[%])\\s*,\\s*("+r+"[%])(?:\\s*,\\s*("+r+"))?\\)",s="hsl[a]?\\((?:"+r+")\\s*,\\s*(?:"+r+"[%])\\s*,\\s*(?:"+r+"[%])(?:\\s*,\\s*(?:"+r+"))?\\)",l="\\#[0-9a-fA-F]{3}",u="\\#[0-9a-fA-F]{6}";t.exports={regex:{number:r,rgba:i,rgbaNoBackRefs:o,hsla:a,hslaNoBackRefs:s,hex3:l,hex6:u}}},{}],112:[function(e,t,n){function r(e,t){return e<t?-1:e>t?1:0}function i(e,t){return-1*r(e,t)}t.exports={sort:{ascending:r,descending:i}}},{}],113:[function(e,t,n){"use strict";var r=e("./memoize"),i=e("../is");t.exports={camel2dash:r((function(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))})),dash2camel:r((function(e){return e.replace(/(-\w)/g,(function(e){return e[1].toUpperCase()}))})),prependCamel:r((function(e,t){return e+t[0].toUpperCase()+t.substring(1)}),(function(e,t){return e+"$"+t})),capitalize:function(e){return i.emptyString(e)?e:e.charAt(0).toUpperCase()+e.substring(1)}}},{"../is":91,"./memoize":110}],114:[function(e,t,n){"use strict";var r=e("../window"),i=e("../is"),o=r?r.performance:null,a={},s=o&&o.now?function(){return o.now()}:function(){return Date.now()},l=function(){if(r){if(r.requestAnimationFrame)return function(e){r.requestAnimationFrame(e)};if(r.mozRequestAnimationFrame)return function(e){r.mozRequestAnimationFrame(e)};if(r.webkitRequestAnimationFrame)return function(e){r.webkitRequestAnimationFrame(e)};if(r.msRequestAnimationFrame)return function(e){r.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(s())}),1e3/60)}}();a.requestAnimationFrame=function(e){l(e)},a.performanceNow=s,a.throttle=function(e,t,n){var r=!0,o=!0;return!1===n?r=!1:i.plainObject(n)&&(r="leading"in n?n.leading:r,o="trailing"in n?n.trailing:o),(n=n||{}).leading=r,n.maxWait=t,n.trailing=o,a.debounce(e,t,n)},a.now=function(){return Date.now()},a.debounce=function(e,t,n){var r,o,a,s,l,u,c,d=this,p=0,f=!1,h=!0;if(i.fn(e)){if(t=Math.max(0,t)||0,!0===n){var g=!0;h=!1}else i.plainObject(n)&&(g=n.leading,f="maxWait"in n&&(Math.max(t,n.maxWait)||0),h="trailing"in n?n.trailing:h);var v=function(){var n=t-(d.now()-s);if(n<=0){o&&clearTimeout(o);var i=c;o=u=c=void 0,i&&(p=d.now(),a=e.apply(l,r),u||o||(r=l=null))}else u=setTimeout(v,n)},m=function(){u&&clearTimeout(u),o=u=c=void 0,(h||f!==t)&&(p=d.now(),a=e.apply(l,r),u||o||(r=l=null))};return function(){if(r=arguments,s=d.now(),l=this,c=h&&(u||!g),!1===f)var n=g&&!u;else{o||g||(p=s);var i=f-(s-p),y=i<=0;y?(o&&(o=clearTimeout(o)),p=s,a=e.apply(l,r)):o||(o=setTimeout(m,i))}return y&&u?u=clearTimeout(u):u||t===f||(u=setTimeout(v,t)),n&&(y=!0,a=e.apply(l,r)),!y||u||o||(r=l=null),a}}},t.exports=a},{"../is":91,"../window":116}],115:[function(e,t,n){t.exports="3.1.0"},{}],116:[function(e,t,n){t.exports="undefined"==typeof window?null:window},{}]},{},[90])(90)},321:function(e,t,n){var r=r||{};r.scope={},r.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},r.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:void 0!==n.g&&null!=n.g?n.g:e},r.global=r.getGlobal(this),r.polyfill=function(e,t,n,i){if(t){for(n=r.global,e=e.split("."),i=0;i<e.length-1;i++){var o=e[i];o in n||(n[o]={}),n=n[o]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&r.defineProperty(n,e,{configurable:!0,writable:!0,value:t})}},r.polyfill("Object.setPrototypeOf",(function(e){return e||("object"!=typeof"".__proto__?null:function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e})}),"es6","es5");var i,o=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function a(e){if(!e)return a.__;Array.prototype.reduce||(Array.prototype.reduce=function(e,t){for(var n=t,r=0;r<this.length;r++)n=e(n,this[r],r,this);return n});var t="";return("."+e).split(".").reduce((function(e,n,r,i){return void 0===(n=e["__"+(t=t?t+"."+n:n)])&&(a.Logger.prototype=e,n=new a.Logger(t),e["__"+t]=n),n}),a.__)}!function(e){function t(e,t,n){void 0!==t[e]&&(null===t[e]?delete n[e]:n[e]=t[e])}function n(t){if(null!=e.enabled&&!e.enabled||null!=e.maxMessages&&1>e.maxMessages)return!1;try{if(t.userAgentRegex&&!new RegExp(t.userAgentRegex).test(navigator.userAgent))return!1}catch(e){}try{if(t.ipRegex&&e.clientIP&&!new RegExp(t.ipRegex).test(e.clientIP))return!1}catch(e){}return!0}function r(e,t){try{if(e.disallow&&new RegExp(e.disallow).test(t))return!1}catch(e){}return!0}function i(e){return"function"==typeof e?e instanceof RegExp?e.toString():e():e}function a(t){switch(typeof(t=i(t))){case"string":return new s(t,null,t);case"number":var n=t.toString();return new s(n,null,n);case"boolean":return n=t.toString(),new s(n,null,n);case"undefined":return new s("undefined",null,"undefined");case"object":return t instanceof RegExp||t instanceof String||t instanceof Number||t instanceof Boolean?(n=t.toString(),new s(n,null,n)):(n="function"==typeof e.serialize?e.serialize.call(this,t):JSON.stringify(t),new s(null,t,n));default:return new s("unknown",null,"unknown")}}e.requestId="";var s=function(e,t,n){this.msg=e,this.meta=t,this.finalString=n};e.setOptions=function(e){return t("enabled",e,this),t("maxMessages",e,this),t("defaultAjaxUrl",e,this),t("clientIP",e,this),t("requestId",e,this),t("defaultBeforeSend",e,this),t("serialize",e,this),this},e.getAllLevel=function(){return-2147483648},e.getTraceLevel=function(){return 1e3},e.getDebugLevel=function(){return 2e3},e.getInfoLevel=function(){return 3e3},e.getWarnLevel=function(){return 4e3},e.getErrorLevel=function(){return 5e3},e.getFatalLevel=function(){return 6e3},e.getOffLevel=function(){return 2147483647};var l=function(e,t){this.inner=t,this.name="JL.Exception",this.message=a(e).finalString};e.Exception=l,l.prototype=Error();var u=function(e,t,n,r){this.l=e,this.m=t,this.n=n,this.t=r};e.LogItem=u,l=function(){function i(t,n){this.appenderName=t,this.sendLogItems=n,this.level=e.getTraceLevel(),this.sendWithBufferLevel=2147483647,this.storeInBufferLevel=-2147483648,this.bufferSize=0,this.batchSize=1,this.batchTimeout=2147483647,this.buffer=[],this.batchBuffer=[],this.batchTimeoutTimer=null}return i.prototype.clearTimeoutTimer=function(){this.batchTimeoutTimer&&(clearTimeout(this.batchTimeoutTimer),this.batchTimeoutTimer=null)},i.prototype.addLogItemToBuffer=function(e){this.batchBuffer.push(e);var t=this;this.batchTimeoutTimer||(this.batchTimeoutTimer=setTimeout((function(){t.sendBatch.call(t)}),this.batchTimeout))},i.prototype.setOptions=function(e){return t("level",e,this),t("ipRegex",e,this),t("userAgentRegex",e,this),t("disallow",e,this),t("sendWithBufferLevel",e,this),t("storeInBufferLevel",e,this),t("bufferSize",e,this),t("batchSize",e,this),t("batchTimeout",e,this),this.bufferSize<this.buffer.length&&(this.buffer.length=this.bufferSize),this},i.prototype.log=function(e,t,i,o,a,s,l){!n(this)||!r(this,s)||a<this.storeInBufferLevel||(e=new u(a,s,l,(new Date).getTime()),a<this.level?0<this.bufferSize&&(this.buffer.push(e),this.buffer.length>this.bufferSize&&this.buffer.shift()):(a<this.sendWithBufferLevel||!this.buffer.length||(this.batchBuffer=this.batchBuffer.concat(this.buffer),this.buffer.length=0),this.addLogItemToBuffer(e),this.batchBuffer.length>=this.batchSize&&this.sendBatch()))},i.prototype.sendBatch=function(){this.clearTimeoutTimer(),0==this.batchBuffer.length||null!=e.maxMessages&&1>e.maxMessages||(null!=e.maxMessages&&(e.maxMessages-=this.batchBuffer.length),this.sendLogItems(this.batchBuffer),this.batchBuffer.length=0)},i}(),e.Appender=l;var c=function(n){function r(e){return n.call(this,e,r.prototype.sendLogItemsAjax)||this}return o(r,n),r.prototype.setOptions=function(e){return t("url",e,this),t("beforeSend",e,this),n.prototype.setOptions.call(this,e),this},r.prototype.sendLogItemsAjax=function(t){try{var n="/jsnlog.logger";null!=e.defaultAjaxUrl&&(n=e.defaultAjaxUrl),this.url&&(n=this.url);var r=this.getXhr(n),i={r:e.requestId,lg:t};"function"==typeof this.beforeSend?this.beforeSend.call(this,r,i):"function"==typeof e.defaultBeforeSend&&e.defaultBeforeSend.call(this,r,i);var o=JSON.stringify(i);r.send(o)}catch(e){}},r.prototype.getXhr=function(t){var n=new XMLHttpRequest;return"withCredentials"in n||"undefined"==typeof XDomainRequest?(n.open("POST",t),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("JSNLog-RequestId",e.requestId),n):((n=new XDomainRequest).open("POST",t),n)},r}(l);e.AjaxAppender=c;var d=function(t){function n(e){return t.call(this,e,n.prototype.sendLogItemsConsole)||this}return o(n,t),n.prototype.clog=function(e){console.log(e)},n.prototype.cerror=function(e){console.error?console.error(e):this.clog(e)},n.prototype.cwarn=function(e){console.warn?console.warn(e):this.clog(e)},n.prototype.cinfo=function(e){console.info?console.info(e):this.clog(e)},n.prototype.cdebug=function(e){console.debug?console.debug(e):this.cinfo(e)},n.prototype.sendLogItemsConsole=function(t){try{var n;if(console)for(n=0;n<t.length;++n){var r=t[n],i=r.n+": "+r.m;"undefined"==typeof window&&(i=new Date(r.t)+" | "+i),r.l<=e.getDebugLevel()?this.cdebug(i):r.l<=e.getInfoLevel()?this.cinfo(i):r.l<=e.getWarnLevel()?this.cwarn(i):this.cerror(i)}}catch(e){}},n}(l);e.ConsoleAppender=d,l=function(){function e(e){this.loggerName=e,this.seenRegexes=[]}return e.prototype.setOptions=function(e){return t("level",e,this),t("userAgentRegex",e,this),t("disallow",e,this),t("ipRegex",e,this),t("appenders",e,this),t("onceOnly",e,this),this.seenRegexes=[],this},e.prototype.buildExceptionObject=function(e){var t={};return e.stack?t.stack=e.stack:t.e=e,e.message&&(t.message=e.message),e.name&&(t.name=e.name),e.data&&(t.data=e.data),e.inner&&(t.inner=this.buildExceptionObject(e.inner)),t},e.prototype.log=function(e,t,o){var s=0;if(!this.appenders)return this;if(e>=this.level&&n(this)&&(o?(s=this.buildExceptionObject(o)).logData=i(t):s=t,r(this,(t=a(s)).finalString))){if(this.onceOnly)for(s=this.onceOnly.length-1;0<=s;){if(new RegExp(this.onceOnly[s]).test(t.finalString)){if(this.seenRegexes[s])return this;this.seenRegexes[s]=!0}s--}for(t.meta=t.meta||{},t.meta.loggerName=this.loggerName,s=this.appenders.length-1;0<=s;)this.appenders[s].log(1e3>=e?"trace":2e3>=e?"debug":3e3>=e?"info":4e3>=e?"warn":5e3>=e?"error":"fatal",t.msg,t.meta,(function(){}),e,t.finalString,this.loggerName),s--}return this},e.prototype.trace=function(e){return this.log(1e3,e)},e.prototype.debug=function(e){return this.log(2e3,e)},e.prototype.info=function(e){return this.log(3e3,e)},e.prototype.warn=function(e){return this.log(4e3,e)},e.prototype.error=function(e){return this.log(5e3,e)},e.prototype.fatal=function(e){return this.log(6e3,e)},e.prototype.fatalException=function(e,t){return this.log(6e3,e,t)},e}(),e.Logger=l,e.createAjaxAppender=function(e){return new c(e)},e.createConsoleAppender=function(e){return new d(e)},l=new c(""),"undefined"==typeof window&&(l=new d("")),e.__=new e.Logger(""),e.__.setOptions({level:e.getDebugLevel(),appenders:[l]})}(a||(a={})),t.JL=a,"function"==typeof __jsnlog_configure&&__jsnlog_configure(a),"undefined"==typeof window||window.onerror||(window.onerror=function(e,t,n,r,i){return a("onerrorLogger").fatalException({msg:"Uncaught Exception",errorMsg:e,url:t,"line number":n,column:r},i),!1}),"undefined"==typeof window||window.onunhandledrejection||(window.onunhandledrejection=function(e){a("onerrorLogger").fatalException({msg:"unhandledrejection",errorMsg:e.reason?e.reason.message:null},e.reason)})},677:(e,t,n)=>{var r;e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){var n=t[a][1][e];return i(n||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({"./aesprim":[function(e,t,n){!function(e,t){"use strict";"function"==typeof r&&r.amd?r(["exports"],t):t(void 0!==n?n:e.esprima={})}(this,(function(e){"use strict";function t(e,t){if(!e)throw new Error("ASSERT: "+t)}function n(e){return e>=48&&e<=57}function r(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function i(e){return"01234567".indexOf(e)>=0}function o(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function a(e){return 10===e||13===e||8232===e||8233===e}function s(e){return 64==e||36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&it.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function l(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&it.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function u(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function c(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function d(e){return"eval"===e||"arguments"===e}function p(e){if(st&&c(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function f(e,n,r,i,o){var a;t("number"==typeof r,"Comment must have valid position"),ht.lastCommentStart>=r||(ht.lastCommentStart=r,a={type:e,value:n},gt.range&&(a.range=[r,i]),gt.loc&&(a.loc=o),gt.comments.push(a),gt.attachComment&&(gt.leadingComments.push(a),gt.trailingComments.push(a)))}function h(e){var t,n,r,i;for(t=lt-e,n={start:{line:ut,column:lt-ct-e}};lt<dt;)if(r=at.charCodeAt(lt),++lt,a(r))return gt.comments&&(i=at.slice(t+e,lt-1),n.end={line:ut,column:lt-ct-1},f("Line",i,t,lt-1,n)),13===r&&10===at.charCodeAt(lt)&&++lt,++ut,void(ct=lt);gt.comments&&(i=at.slice(t+e,lt),n.end={line:ut,column:lt-ct},f("Line",i,t,lt,n))}function g(){var e,t,n,r;for(gt.comments&&(e=lt-2,t={start:{line:ut,column:lt-ct-2}});lt<dt;)if(a(n=at.charCodeAt(lt)))13===n&&10===at.charCodeAt(lt+1)&&++lt,++ut,++lt,ct=lt,lt>=dt&&j({},rt.UnexpectedToken,"ILLEGAL");else if(42===n){if(47===at.charCodeAt(lt+1))return++lt,++lt,void(gt.comments&&(r=at.slice(e+2,lt-2),t.end={line:ut,column:lt-ct},f("Block",r,e,lt,t)));++lt}else++lt;j({},rt.UnexpectedToken,"ILLEGAL")}function v(){var e,t;for(t=0===lt;lt<dt;)if(o(e=at.charCodeAt(lt)))++lt;else if(a(e))++lt,13===e&&10===at.charCodeAt(lt)&&++lt,++ut,ct=lt,t=!0;else if(47===e)if(47===(e=at.charCodeAt(lt+1)))++lt,++lt,h(2),t=!0;else{if(42!==e)break;++lt,++lt,g()}else if(t&&45===e){if(45!==at.charCodeAt(lt+1)||62!==at.charCodeAt(lt+2))break;lt+=3,h(3)}else{if(60!==e)break;if("!--"!==at.slice(lt+1,lt+4))break;++lt,++lt,++lt,++lt,h(4)}}function m(e){var t,n,i,o=0;for(n="u"===e?4:2,t=0;t<n;++t){if(!(lt<dt&&r(at[lt])))return"";i=at[lt++],o=16*o+"0123456789abcdef".indexOf(i.toLowerCase())}return String.fromCharCode(o)}function y(){var e,t;for(e=at.charCodeAt(lt++),t=String.fromCharCode(e),92===e&&(117!==at.charCodeAt(lt)&&j({},rt.UnexpectedToken,"ILLEGAL"),++lt,(e=m("u"))&&"\\"!==e&&s(e.charCodeAt(0))||j({},rt.UnexpectedToken,"ILLEGAL"),t=e);lt<dt&&l(e=at.charCodeAt(lt));)++lt,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==at.charCodeAt(lt)&&j({},rt.UnexpectedToken,"ILLEGAL"),++lt,(e=m("u"))&&"\\"!==e&&l(e.charCodeAt(0))||j({},rt.UnexpectedToken,"ILLEGAL"),t+=e);return t}function C(){var e,t;for(e=lt++;lt<dt;){if(92===(t=at.charCodeAt(lt)))return lt=e,y();if(!l(t))break;++lt}return at.slice(e,lt)}function b(){var e,t;return e=lt,{type:1===(t=92===at.charCodeAt(lt)?y():C()).length?Qe.Identifier:p(t)?Qe.Keyword:"null"===t?Qe.NullLiteral:"true"===t||"false"===t?Qe.BooleanLiteral:Qe.Identifier,value:t,lineNumber:ut,lineStart:ct,start:e,end:lt}}function x(){var e,t,n,r,i=lt,o=at.charCodeAt(lt),a=at[lt];switch(o){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++lt,gt.tokenize&&(40===o?gt.openParenToken=gt.tokens.length:123===o&&(gt.openCurlyToken=gt.tokens.length)),{type:Qe.Punctuator,value:String.fromCharCode(o),lineNumber:ut,lineStart:ct,start:i,end:lt};default:if(61===(e=at.charCodeAt(lt+1)))switch(o){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return lt+=2,{type:Qe.Punctuator,value:String.fromCharCode(o)+String.fromCharCode(e),lineNumber:ut,lineStart:ct,start:i,end:lt};case 33:case 61:return lt+=2,61===at.charCodeAt(lt)&&++lt,{type:Qe.Punctuator,value:at.slice(i,lt),lineNumber:ut,lineStart:ct,start:i,end:lt}}}return">>>="===(r=at.substr(lt,4))?(lt+=4,{type:Qe.Punctuator,value:r,lineNumber:ut,lineStart:ct,start:i,end:lt}):">>>"===(n=r.substr(0,3))||"<<="===n||">>="===n?(lt+=3,{type:Qe.Punctuator,value:n,lineNumber:ut,lineStart:ct,start:i,end:lt}):a===(t=n.substr(0,2))[1]&&"+-<>&|".indexOf(a)>=0||"=>"===t?(lt+=2,{type:Qe.Punctuator,value:t,lineNumber:ut,lineStart:ct,start:i,end:lt}):"<>=!+-*%&|^/".indexOf(a)>=0?(++lt,{type:Qe.Punctuator,value:a,lineNumber:ut,lineStart:ct,start:i,end:lt}):void j({},rt.UnexpectedToken,"ILLEGAL")}function S(e){for(var t="";lt<dt&&r(at[lt]);)t+=at[lt++];return 0===t.length&&j({},rt.UnexpectedToken,"ILLEGAL"),s(at.charCodeAt(lt))&&j({},rt.UnexpectedToken,"ILLEGAL"),{type:Qe.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:ut,lineStart:ct,start:e,end:lt}}function E(e){for(var t="0"+at[lt++];lt<dt&&i(at[lt]);)t+=at[lt++];return(s(at.charCodeAt(lt))||n(at.charCodeAt(lt)))&&j({},rt.UnexpectedToken,"ILLEGAL"),{type:Qe.NumericLiteral,value:parseInt(t,8),octal:!0,lineNumber:ut,lineStart:ct,start:e,end:lt}}function w(){var e,r,o;if(t(n((o=at[lt]).charCodeAt(0))||"."===o,"Numeric literal must start with a decimal digit or a decimal point"),r=lt,e="","."!==o){if(e=at[lt++],o=at[lt],"0"===e){if("x"===o||"X"===o)return++lt,S(r);if(i(o))return E(r);o&&n(o.charCodeAt(0))&&j({},rt.UnexpectedToken,"ILLEGAL")}for(;n(at.charCodeAt(lt));)e+=at[lt++];o=at[lt]}if("."===o){for(e+=at[lt++];n(at.charCodeAt(lt));)e+=at[lt++];o=at[lt]}if("e"===o||"E"===o)if(e+=at[lt++],"+"!==(o=at[lt])&&"-"!==o||(e+=at[lt++]),n(at.charCodeAt(lt)))for(;n(at.charCodeAt(lt));)e+=at[lt++];else j({},rt.UnexpectedToken,"ILLEGAL");return s(at.charCodeAt(lt))&&j({},rt.UnexpectedToken,"ILLEGAL"),{type:Qe.NumericLiteral,value:parseFloat(e),lineNumber:ut,lineStart:ct,start:r,end:lt}}function O(){var e,n,r,o,s,l,u,c,d="",p=!1;for(u=ut,c=ct,t("'"===(e=at[lt])||'"'===e,"String literal must starts with a quote"),n=lt,++lt;lt<dt;){if((r=at[lt++])===e){e="";break}if("\\"===r)if((r=at[lt++])&&a(r.charCodeAt(0)))++ut,"\r"===r&&"\n"===at[lt]&&++lt,ct=lt;else switch(r){case"u":case"x":l=lt,(s=m(r))?d+=s:(lt=l,d+=r);break;case"n":d+="\n";break;case"r":d+="\r";break;case"t":d+="\t";break;case"b":d+="\b";break;case"f":d+="\f";break;case"v":d+="\v";break;default:i(r)?(0!==(o="01234567".indexOf(r))&&(p=!0),lt<dt&&i(at[lt])&&(p=!0,o=8*o+"01234567".indexOf(at[lt++]),"0123".indexOf(r)>=0&&lt<dt&&i(at[lt])&&(o=8*o+"01234567".indexOf(at[lt++]))),d+=String.fromCharCode(o)):d+=r}else{if(a(r.charCodeAt(0)))break;d+=r}}return""!==e&&j({},rt.UnexpectedToken,"ILLEGAL"),{type:Qe.StringLiteral,value:d,octal:p,startLineNumber:u,startLineStart:c,lineNumber:ut,lineStart:ct,start:n,end:lt}}function _(e,t){var n;try{n=new RegExp(e,t)}catch(e){j({},rt.InvalidRegExp)}return n}function L(){var e,n,r,i;for(t("/"===(e=at[lt]),"Regular expression literal must start with a slash"),n=at[lt++],r=!1,i=!1;lt<dt;)if(n+=e=at[lt++],"\\"===e)a((e=at[lt++]).charCodeAt(0))&&j({},rt.UnterminatedRegExp),n+=e;else if(a(e.charCodeAt(0)))j({},rt.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){i=!0;break}"["===e&&(r=!0)}return i||j({},rt.UnterminatedRegExp),{value:n.substr(1,n.length-2),literal:n}}function R(){var e,t,n,r;for(t="",n="";lt<dt&&l((e=at[lt]).charCodeAt(0));)if(++lt,"\\"===e&&lt<dt)if("u"===(e=at[lt])){if(r=++lt,e=m("u"))for(n+=e,t+="\\u";r<lt;++r)t+=at[r];else lt=r,n+="u",t+="\\u";F({},rt.UnexpectedToken,"ILLEGAL")}else t+="\\",F({},rt.UnexpectedToken,"ILLEGAL");else n+=e,t+=e;return{value:n,literal:t}}function D(){var e,t,n,r;return ft=null,v(),e=lt,t=L(),n=R(),r=_(t.value,n.value),gt.tokenize?{type:Qe.RegularExpression,value:r,lineNumber:ut,lineStart:ct,start:e,end:lt}:{literal:t.literal+n.literal,value:r,start:e,end:lt}}function N(){var e,t,n,r;return v(),e=lt,t={start:{line:ut,column:lt-ct}},n=D(),t.end={line:ut,column:lt-ct},gt.tokenize||(gt.tokens.length>0&&(r=gt.tokens[gt.tokens.length-1]).range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||gt.tokens.pop()),gt.tokens.push({type:"RegularExpression",value:n.literal,range:[e,lt],loc:t})),n}function M(e){return e.type===Qe.Identifier||e.type===Qe.Keyword||e.type===Qe.BooleanLiteral||e.type===Qe.NullLiteral}function I(){var e,t;if(!(e=gt.tokens[gt.tokens.length-1]))return N();if("Punctuator"===e.type){if("]"===e.value)return x();if(")"===e.value)return!(t=gt.tokens[gt.openParenToken-1])||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?x():N();if("}"===e.value){if(gt.tokens[gt.openCurlyToken-3]&&"Keyword"===gt.tokens[gt.openCurlyToken-3].type){if(!(t=gt.tokens[gt.openCurlyToken-4]))return x()}else{if(!gt.tokens[gt.openCurlyToken-4]||"Keyword"!==gt.tokens[gt.openCurlyToken-4].type)return x();if(!(t=gt.tokens[gt.openCurlyToken-5]))return N()}return et.indexOf(t.value)>=0?x():N()}return N()}return"Keyword"===e.type?N():x()}function A(){var e;return v(),lt>=dt?{type:Qe.EOF,lineNumber:ut,lineStart:ct,start:lt,end:lt}:s(e=at.charCodeAt(lt))?b():40===e||41===e||59===e?x():39===e||34===e?O():46===e?n(at.charCodeAt(lt+1))?w():x():n(e)?w():gt.tokenize&&47===e?I():x()}function P(){var e,t,n;return v(),e={start:{line:ut,column:lt-ct}},t=A(),e.end={line:ut,column:lt-ct},t.type!==Qe.EOF&&(n=at.slice(t.start,t.end),gt.tokens.push({type:Je[t.type],value:n,range:[t.start,t.end],loc:e})),t}function k(){var e;return lt=(e=ft).end,ut=e.lineNumber,ct=e.lineStart,ft=void 0!==gt.tokens?P():A(),lt=e.end,ut=e.lineNumber,ct=e.lineStart,e}function T(){var e,t,n;e=lt,t=ut,n=ct,ft=void 0!==gt.tokens?P():A(),lt=e,ut=t,ct=n}function V(e,t){this.line=e,this.column=t}function B(e,t,n,r){this.start=new V(e,t),this.end=new V(n,r)}function z(){var e,t,n,r;return e=lt,t=ut,n=ct,v(),r=ut!==t,lt=e,ut=t,ct=n,r}function j(e,n){var r,i=Array.prototype.slice.call(arguments,2),o=n.replace(/%(\d)/g,(function(e,n){return t(n<i.length,"Message reference must be in range"),i[n]}));throw"number"==typeof e.lineNumber?((r=new Error("Line "+e.lineNumber+": "+o)).index=e.start,r.lineNumber=e.lineNumber,r.column=e.start-ct+1):((r=new Error("Line "+ut+": "+o)).index=lt,r.lineNumber=ut,r.column=lt-ct+1),r.description=o,r}function F(){try{j.apply(null,arguments)}catch(e){if(!gt.errors)throw e;gt.errors.push(e)}}function G(e){if(e.type===Qe.EOF&&j(e,rt.UnexpectedEOS),e.type===Qe.NumericLiteral&&j(e,rt.UnexpectedNumber),e.type===Qe.StringLiteral&&j(e,rt.UnexpectedString),e.type===Qe.Identifier&&j(e,rt.UnexpectedIdentifier),e.type===Qe.Keyword){if(u(e.value))j(e,rt.UnexpectedReserved);else if(st&&c(e.value))return void F(e,rt.StrictReservedWord);j(e,rt.UnexpectedToken,e.value)}j(e,rt.UnexpectedToken,e.value)}function U(e){var t=k();t.type===Qe.Punctuator&&t.value===e||G(t)}function q(e){var t=k();t.type===Qe.Keyword&&t.value===e||G(t)}function H(e){return ft.type===Qe.Punctuator&&ft.value===e}function W(e){return ft.type===Qe.Keyword&&ft.value===e}function $(){var e;return ft.type===Qe.Punctuator&&("="===(e=ft.value)||"*="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}function X(){var e;return 59===at.charCodeAt(lt)||H(";")?void k():(e=ut,v(),void(ut===e&&(ft.type===Qe.EOF||H("}")||G(ft))))}function Y(e){return e.type===tt.Identifier||e.type===tt.MemberExpression}function K(){var e,t=[];for(e=ft,U("[");!H("]");)H(",")?(k(),t.push(null)):(t.push(ge()),H("]")||U(","));return k(),pt.markEnd(pt.createArrayExpression(t),e)}function Z(e,t){var n,r,i;return n=st,i=ft,r=Ge(),t&&st&&d(e[0].name)&&F(t,rt.StrictParamName),st=n,pt.markEnd(pt.createFunctionExpression(null,e,[],r),i)}function Q(){var e,t;return t=ft,(e=k()).type===Qe.StringLiteral||e.type===Qe.NumericLiteral?(st&&e.octal&&F(e,rt.StrictOctalLiteral),pt.markEnd(pt.createLiteral(e),t)):pt.markEnd(pt.createIdentifier(e.value),t)}function J(){var e,t,n,r,i,o;return o=ft,(e=ft).type===Qe.Identifier?(n=Q(),"get"!==e.value||H(":")?"set"!==e.value||H(":")?(U(":"),r=ge(),pt.markEnd(pt.createProperty("init",n,r),o)):(t=Q(),U("("),(e=ft).type!==Qe.Identifier?(U(")"),F(e,rt.UnexpectedToken,e.value),r=Z([])):(i=[Ce()],U(")"),r=Z(i,e)),pt.markEnd(pt.createProperty("set",t,r),o)):(t=Q(),U("("),U(")"),r=Z([]),pt.markEnd(pt.createProperty("get",t,r),o))):e.type!==Qe.EOF&&e.type!==Qe.Punctuator?(t=Q(),U(":"),r=ge(),pt.markEnd(pt.createProperty("init",t,r),o)):void G(e)}function ee(){var e,t,n,r,i,o=[],a={},s=String;for(i=ft,U("{");!H("}");)t=(e=J()).key.type===tt.Identifier?e.key.name:s(e.key.value),r="init"===e.kind?nt.Data:"get"===e.kind?nt.Get:nt.Set,n="$"+t,Object.prototype.hasOwnProperty.call(a,n)?(a[n]===nt.Data?st&&r===nt.Data?F({},rt.StrictDuplicateProperty):r!==nt.Data&&F({},rt.AccessorDataProperty):r===nt.Data?F({},rt.AccessorDataProperty):a[n]&r&&F({},rt.AccessorGetSet),a[n]|=r):a[n]=r,o.push(e),H("}")||U(",");return U("}"),pt.markEnd(pt.createObjectExpression(o),i)}function te(){var e;return U("("),e=ve(),U(")"),e}function ne(){var e,t,n,r;if(H("("))return te();if(H("["))return K();if(H("{"))return ee();if(e=ft.type,r=ft,e===Qe.Identifier)n=pt.createIdentifier(k().value);else if(e===Qe.StringLiteral||e===Qe.NumericLiteral)st&&ft.octal&&F(ft,rt.StrictOctalLiteral),n=pt.createLiteral(k());else if(e===Qe.Keyword){if(W("function"))return He();W("this")?(k(),n=pt.createThisExpression()):G(k())}else e===Qe.BooleanLiteral?((t=k()).value="true"===t.value,n=pt.createLiteral(t)):e===Qe.NullLiteral?((t=k()).value=null,n=pt.createLiteral(t)):H("/")||H("/=")?(n=void 0!==gt.tokens?pt.createLiteral(N()):pt.createLiteral(D()),T()):G(k());return pt.markEnd(n,r)}function re(){var e=[];if(U("("),!H(")"))for(;lt<dt&&(e.push(ge()),!H(")"));)U(",");return U(")"),e}function ie(){var e,t;return t=ft,M(e=k())||G(e),pt.markEnd(pt.createIdentifier(e.value),t)}function oe(){return U("."),ie()}function ae(){var e;return U("["),e=ve(),U("]"),e}function se(){var e,t,n;return n=ft,q("new"),e=ue(),t=H("(")?re():[],pt.markEnd(pt.createNewExpression(e,t),n)}function le(){var e,t,n,r,i;for(i=ft,e=ht.allowIn,ht.allowIn=!0,t=W("new")?se():ne(),ht.allowIn=e;;){if(H("."))r=oe(),t=pt.createMemberExpression(".",t,r);else if(H("("))n=re(),t=pt.createCallExpression(t,n);else{if(!H("["))break;r=ae(),t=pt.createMemberExpression("[",t,r)}pt.markEnd(t,i)}return t}function ue(){var e,t,n,r;for(r=ft,e=ht.allowIn,t=W("new")?se():ne(),ht.allowIn=e;H(".")||H("[");)H("[")?(n=ae(),t=pt.createMemberExpression("[",t,n)):(n=oe(),t=pt.createMemberExpression(".",t,n)),pt.markEnd(t,r);return t}function ce(){var e,t,n=ft;return e=le(),ft.type===Qe.Punctuator&&(!H("++")&&!H("--")||z()||(st&&e.type===tt.Identifier&&d(e.name)&&F({},rt.StrictLHSPostfix),Y(e)||F({},rt.InvalidLHSInAssignment),t=k(),e=pt.markEnd(pt.createPostfixExpression(t.value,e),n))),e}function de(){var e,t,n;return ft.type!==Qe.Punctuator&&ft.type!==Qe.Keyword?t=ce():H("++")||H("--")?(n=ft,e=k(),t=de(),st&&t.type===tt.Identifier&&d(t.name)&&F({},rt.StrictLHSPrefix),Y(t)||F({},rt.InvalidLHSInAssignment),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n)):H("+")||H("-")||H("~")||H("!")?(n=ft,e=k(),t=de(),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n)):W("delete")||W("void")||W("typeof")?(n=ft,e=k(),t=de(),t=pt.createUnaryExpression(e.value,t),t=pt.markEnd(t,n),st&&"delete"===t.operator&&t.argument.type===tt.Identifier&&F({},rt.StrictDelete)):t=ce(),t}function pe(e,t){var n=0;if(e.type!==Qe.Punctuator&&e.type!==Qe.Keyword)return 0;switch(e.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=t?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function fe(){var e,t,n,r,i,o,a,s,l,u;if(e=ft,l=de(),0===(i=pe(r=ft,ht.allowIn)))return l;for(r.prec=i,k(),t=[e,ft],o=[l,r,a=de()];(i=pe(ft,ht.allowIn))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,l=o.pop(),n=pt.createBinaryExpression(s,l,a),t.pop(),e=t[t.length-1],pt.markEnd(n,e),o.push(n);(r=k()).prec=i,o.push(r),t.push(ft),n=de(),o.push(n)}for(n=o[u=o.length-1],t.pop();u>1;)n=pt.createBinaryExpression(o[u-1].value,o[u-2],n),u-=2,e=t.pop(),pt.markEnd(n,e);return n}function he(){var e,t,n,r,i;return i=ft,e=fe(),H("?")&&(k(),t=ht.allowIn,ht.allowIn=!0,n=ge(),ht.allowIn=t,U(":"),r=ge(),e=pt.createConditionalExpression(e,n,r),pt.markEnd(e,i)),e}function ge(){var e,t,n,r,i;return e=ft,i=ft,r=t=he(),$()&&(Y(t)||F({},rt.InvalidLHSInAssignment),st&&t.type===tt.Identifier&&d(t.name)&&F(e,rt.StrictLHSAssignment),e=k(),n=ge(),r=pt.markEnd(pt.createAssignmentExpression(e.value,t,n),i)),r}function ve(){var e,t=ft;if(e=ge(),H(",")){for(e=pt.createSequenceExpression([e]);lt<dt&&H(",");)k(),e.expressions.push(ge());pt.markEnd(e,t)}return e}function me(){for(var e,t=[];lt<dt&&!H("}")&&void 0!==(e=We());)t.push(e);return t}function ye(){var e,t;return t=ft,U("{"),e=me(),U("}"),pt.markEnd(pt.createBlockStatement(e),t)}function Ce(){var e,t;return t=ft,(e=k()).type!==Qe.Identifier&&G(e),pt.markEnd(pt.createIdentifier(e.value),t)}function be(e){var t,n,r=null;return n=ft,t=Ce(),st&&d(t.name)&&F({},rt.StrictVarName),"const"===e?(U("="),r=ge()):H("=")&&(k(),r=ge()),pt.markEnd(pt.createVariableDeclarator(t,r),n)}function xe(e){var t=[];do{if(t.push(be(e)),!H(","))break;k()}while(lt<dt);return t}function Se(){var e;return q("var"),e=xe(),X(),pt.createVariableDeclaration(e,"var")}function Ee(e){var t,n;return n=ft,q(e),t=xe(e),X(),pt.markEnd(pt.createVariableDeclaration(t,e),n)}function we(){return U(";"),pt.createEmptyStatement()}function Oe(){var e=ve();return X(),pt.createExpressionStatement(e)}function _e(){var e,t,n;return q("if"),U("("),e=ve(),U(")"),t=Fe(),W("else")?(k(),n=Fe()):n=null,pt.createIfStatement(e,t,n)}function Le(){var e,t,n;return q("do"),n=ht.inIteration,ht.inIteration=!0,e=Fe(),ht.inIteration=n,q("while"),U("("),t=ve(),U(")"),H(";")&&k(),pt.createDoWhileStatement(e,t)}function Re(){var e,t,n;return q("while"),U("("),e=ve(),U(")"),n=ht.inIteration,ht.inIteration=!0,t=Fe(),ht.inIteration=n,pt.createWhileStatement(e,t)}function De(){var e,t,n;return n=ft,e=k(),t=xe(),pt.markEnd(pt.createVariableDeclaration(t,e.value),n)}function Ne(){var e,t,n,r,i,o,a;return e=t=n=null,q("for"),U("("),H(";")?k():(W("var")||W("let")?(ht.allowIn=!1,e=De(),ht.allowIn=!0,1===e.declarations.length&&W("in")&&(k(),r=e,i=ve(),e=null)):(ht.allowIn=!1,e=ve(),ht.allowIn=!0,W("in")&&(Y(e)||F({},rt.InvalidLHSInForIn),k(),r=e,i=ve(),e=null)),void 0===r&&U(";")),void 0===r&&(H(";")||(t=ve()),U(";"),H(")")||(n=ve())),U(")"),a=ht.inIteration,ht.inIteration=!0,o=Fe(),ht.inIteration=a,void 0===r?pt.createForStatement(e,t,n,o):pt.createForInStatement(r,i,o)}function Me(){var e,t=null;return q("continue"),59===at.charCodeAt(lt)?(k(),ht.inIteration||j({},rt.IllegalContinue),pt.createContinueStatement(null)):z()?(ht.inIteration||j({},rt.IllegalContinue),pt.createContinueStatement(null)):(ft.type===Qe.Identifier&&(e="$"+(t=Ce()).name,Object.prototype.hasOwnProperty.call(ht.labelSet,e)||j({},rt.UnknownLabel,t.name)),X(),null!==t||ht.inIteration||j({},rt.IllegalContinue),pt.createContinueStatement(t))}function Ie(){var e,t=null;return q("break"),59===at.charCodeAt(lt)?(k(),ht.inIteration||ht.inSwitch||j({},rt.IllegalBreak),pt.createBreakStatement(null)):z()?(ht.inIteration||ht.inSwitch||j({},rt.IllegalBreak),pt.createBreakStatement(null)):(ft.type===Qe.Identifier&&(e="$"+(t=Ce()).name,Object.prototype.hasOwnProperty.call(ht.labelSet,e)||j({},rt.UnknownLabel,t.name)),X(),null!==t||ht.inIteration||ht.inSwitch||j({},rt.IllegalBreak),pt.createBreakStatement(t))}function Ae(){var e=null;return q("return"),ht.inFunctionBody||F({},rt.IllegalReturn),32===at.charCodeAt(lt)&&s(at.charCodeAt(lt+1))?(e=ve(),X(),pt.createReturnStatement(e)):z()?pt.createReturnStatement(null):(H(";")||H("}")||ft.type===Qe.EOF||(e=ve()),X(),pt.createReturnStatement(e))}function Pe(){var e,t;return st&&(v(),F({},rt.StrictModeWith)),q("with"),U("("),e=ve(),U(")"),t=Fe(),pt.createWithStatement(e,t)}function ke(){var e,t,n,r=[];for(n=ft,W("default")?(k(),e=null):(q("case"),e=ve()),U(":");lt<dt&&!(H("}")||W("default")||W("case"));)t=Fe(),r.push(t);return pt.markEnd(pt.createSwitchCase(e,r),n)}function Te(){var e,t,n,r,i;if(q("switch"),U("("),e=ve(),U(")"),U("{"),t=[],H("}"))return k(),pt.createSwitchStatement(e,t);for(r=ht.inSwitch,ht.inSwitch=!0,i=!1;lt<dt&&!H("}");)null===(n=ke()).test&&(i&&j({},rt.MultipleDefaultsInSwitch),i=!0),t.push(n);return ht.inSwitch=r,U("}"),pt.createSwitchStatement(e,t)}function Ve(){var e;return q("throw"),z()&&j({},rt.NewlineAfterThrow),e=ve(),X(),pt.createThrowStatement(e)}function Be(){var e,t,n;return n=ft,q("catch"),U("("),H(")")&&G(ft),e=Ce(),st&&d(e.name)&&F({},rt.StrictCatchVariable),U(")"),t=ye(),pt.markEnd(pt.createCatchClause(e,t),n)}function ze(){var e,t=[],n=null;return q("try"),e=ye(),W("catch")&&t.push(Be()),W("finally")&&(k(),n=ye()),0!==t.length||n||j({},rt.NoCatchOrFinally),pt.createTryStatement(e,[],t,n)}function je(){return q("debugger"),X(),pt.createDebuggerStatement()}function Fe(){var e,t,n,r,i=ft.type;if(i===Qe.EOF&&G(ft),i===Qe.Punctuator&&"{"===ft.value)return ye();if(r=ft,i===Qe.Punctuator)switch(ft.value){case";":return pt.markEnd(we(),r);case"(":return pt.markEnd(Oe(),r)}if(i===Qe.Keyword)switch(ft.value){case"break":return pt.markEnd(Ie(),r);case"continue":return pt.markEnd(Me(),r);case"debugger":return pt.markEnd(je(),r);case"do":return pt.markEnd(Le(),r);case"for":return pt.markEnd(Ne(),r);case"function":return pt.markEnd(qe(),r);case"if":return pt.markEnd(_e(),r);case"return":return pt.markEnd(Ae(),r);case"switch":return pt.markEnd(Te(),r);case"throw":return pt.markEnd(Ve(),r);case"try":return pt.markEnd(ze(),r);case"var":return pt.markEnd(Se(),r);case"while":return pt.markEnd(Re(),r);case"with":return pt.markEnd(Pe(),r)}return(e=ve()).type===tt.Identifier&&H(":")?(k(),n="$"+e.name,Object.prototype.hasOwnProperty.call(ht.labelSet,n)&&j({},rt.Redeclaration,"Label",e.name),ht.labelSet[n]=!0,t=Fe(),delete ht.labelSet[n],pt.markEnd(pt.createLabeledStatement(e,t),r)):(X(),pt.markEnd(pt.createExpressionStatement(e),r))}function Ge(){var e,t,n,r,i,o,a,s,l=[];for(s=ft,U("{");lt<dt&&ft.type===Qe.StringLiteral&&(t=ft,e=We(),l.push(e),e.expression.type===tt.Literal);)"use strict"===at.slice(t.start+1,t.end-1)?(st=!0,n&&F(n,rt.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(r=ht.labelSet,i=ht.inIteration,o=ht.inSwitch,a=ht.inFunctionBody,ht.labelSet={},ht.inIteration=!1,ht.inSwitch=!1,ht.inFunctionBody=!0;lt<dt&&!H("}")&&void 0!==(e=We());)l.push(e);return U("}"),ht.labelSet=r,ht.inIteration=i,ht.inSwitch=o,ht.inFunctionBody=a,pt.markEnd(pt.createBlockStatement(l),s)}function Ue(e){var t,n,r,i,o,a,s=[];if(U("("),!H(")"))for(i={};lt<dt&&(n=ft,t=Ce(),o="$"+n.value,st?(d(n.value)&&(r=n,a=rt.StrictParamName),Object.prototype.hasOwnProperty.call(i,o)&&(r=n,a=rt.StrictParamDupe)):e||(d(n.value)?(e=n,a=rt.StrictParamName):c(n.value)?(e=n,a=rt.StrictReservedWord):Object.prototype.hasOwnProperty.call(i,o)&&(e=n,a=rt.StrictParamDupe)),s.push(t),i[o]=!0,!H(")"));)U(",");return U(")"),{params:s,stricted:r,firstRestricted:e,message:a}}function qe(){var e,t,n,r,i,o,a,s,l,u=[];return l=ft,q("function"),n=ft,e=Ce(),st?d(n.value)&&F(n,rt.StrictFunctionName):d(n.value)?(o=n,a=rt.StrictFunctionName):c(n.value)&&(o=n,a=rt.StrictReservedWord),u=(i=Ue(o)).params,r=i.stricted,o=i.firstRestricted,i.message&&(a=i.message),s=st,t=Ge(),st&&o&&j(o,a),st&&r&&F(r,a),st=s,pt.markEnd(pt.createFunctionDeclaration(e,u,[],t),l)}function He(){var e,t,n,r,i,o,a,s,l=null,u=[];return s=ft,q("function"),H("(")||(e=ft,l=Ce(),st?d(e.value)&&F(e,rt.StrictFunctionName):d(e.value)?(n=e,r=rt.StrictFunctionName):c(e.value)&&(n=e,r=rt.StrictReservedWord)),u=(i=Ue(n)).params,t=i.stricted,n=i.firstRestricted,i.message&&(r=i.message),a=st,o=Ge(),st&&n&&j(n,r),st&&t&&F(t,r),st=a,pt.markEnd(pt.createFunctionExpression(l,u,[],o),s)}function We(){if(ft.type===Qe.Keyword)switch(ft.value){case"const":case"let":return Ee(ft.value);case"function":return qe();default:return Fe()}if(ft.type!==Qe.EOF)return Fe()}function $e(){for(var e,t,n,r=[];lt<dt&&(t=ft).type===Qe.StringLiteral&&(e=We(),r.push(e),e.expression.type===tt.Literal);)"use strict"===at.slice(t.start+1,t.end-1)?(st=!0,n&&F(n,rt.StrictOctalLiteral)):!n&&t.octal&&(n=t);for(;lt<dt&&void 0!==(e=We());)r.push(e);return r}function Xe(){var e,t;return v(),T(),t=ft,st=!1,e=$e(),pt.markEnd(pt.createProgram(e),t)}function Ye(){var e,t,n,r=[];for(e=0;e<gt.tokens.length;++e)n={type:(t=gt.tokens[e]).type,value:t.value},gt.range&&(n.range=t.range),gt.loc&&(n.loc=t.loc),r.push(n);gt.tokens=r}function Ke(e,t){var n;"string"==typeof e||e instanceof String||(e=String(e)),pt=ot,lt=0,ut=(at=e).length>0?1:0,ct=0,dt=at.length,ft=null,ht={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},gt={},(t=t||{}).tokens=!0,gt.tokens=[],gt.tokenize=!0,gt.openParenToken=-1,gt.openCurlyToken=-1,gt.range="boolean"==typeof t.range&&t.range,gt.loc="boolean"==typeof t.loc&&t.loc,"boolean"==typeof t.comment&&t.comment&&(gt.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(gt.errors=[]);try{if(T(),ft.type===Qe.EOF)return gt.tokens;for(k();ft.type!==Qe.EOF;)try{k()}catch(e){if(gt.errors){gt.errors.push(e);break}throw e}Ye(),n=gt.tokens,void 0!==gt.comments&&(n.comments=gt.comments),void 0!==gt.errors&&(n.errors=gt.errors)}catch(e){throw e}finally{gt={}}return n}function Ze(e,t){var n,r;r=String,"string"==typeof e||e instanceof String||(e=r(e)),pt=ot,lt=0,ut=(at=e).length>0?1:0,ct=0,dt=at.length,ft=null,ht={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},gt={},void 0!==t&&(gt.range="boolean"==typeof t.range&&t.range,gt.loc="boolean"==typeof t.loc&&t.loc,gt.attachComment="boolean"==typeof t.attachComment&&t.attachComment,gt.loc&&null!==t.source&&void 0!==t.source&&(gt.source=r(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(gt.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(gt.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(gt.errors=[]),gt.attachComment&&(gt.range=!0,gt.comments=[],gt.bottomRightStack=[],gt.trailingComments=[],gt.leadingComments=[]));try{n=Xe(),void 0!==gt.comments&&(n.comments=gt.comments),void 0!==gt.tokens&&(Ye(),n.tokens=gt.tokens),void 0!==gt.errors&&(n.errors=gt.errors)}catch(e){throw e}finally{gt={}}return n}var Qe,Je,et,tt,nt,rt,it,ot,at,st,lt,ut,ct,dt,pt,ft,ht,gt;(Je={})[(Qe={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",Je[Qe.EOF]="<end>",Je[Qe.Identifier]="Identifier",Je[Qe.Keyword]="Keyword",Je[Qe.NullLiteral]="Null",Je[Qe.NumericLiteral]="Numeric",Je[Qe.Punctuator]="Punctuator",Je[Qe.StringLiteral]="String",Je[Qe.RegularExpression]="RegularExpression",et=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],tt={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},nt={Data:1,Get:2,Set:4},rt={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},it={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},ot={name:"SyntaxTree",processComment:function(e){var t,n;if(!(e.type===tt.Program&&e.body.length>0)){for(gt.trailingComments.length>0?gt.trailingComments[0].range[0]>=e.range[1]?(n=gt.trailingComments,gt.trailingComments=[]):gt.trailingComments.length=0:gt.bottomRightStack.length>0&&gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments&&gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(n=gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments,delete gt.bottomRightStack[gt.bottomRightStack.length-1].trailingComments);gt.bottomRightStack.length>0&&gt.bottomRightStack[gt.bottomRightStack.length-1].range[0]>=e.range[0];)t=gt.bottomRightStack.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):gt.leadingComments.length>0&&gt.leadingComments[gt.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=gt.leadingComments,gt.leadingComments=[]),n&&(e.trailingComments=n),gt.bottomRightStack.push(e)}},markEnd:function(e,t){return gt.range&&(e.range=[t.start,lt]),gt.loc&&(e.loc=new B(void 0===t.startLineNumber?t.lineNumber:t.startLineNumber,t.start-(void 0===t.startLineStart?t.lineStart:t.startLineStart),ut,lt-ct),this.postProcess(e)),gt.attachComment&&this.processComment(e),e},postProcess:function(e){return gt.source&&(e.loc.source=gt.source),e},createArrayExpression:function(e){return{type:tt.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,n){return{type:tt.AssignmentExpression,operator:e,left:t,right:n}},createBinaryExpression:function(e,t,n){return{type:"||"===e||"&&"===e?tt.LogicalExpression:tt.BinaryExpression,operator:e,left:t,right:n}},createBlockStatement:function(e){return{type:tt.BlockStatement,body:e}},createBreakStatement:function(e){return{type:tt.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:tt.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:tt.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,n){return{type:tt.ConditionalExpression,test:e,consequent:t,alternate:n}},createContinueStatement:function(e){return{type:tt.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:tt.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:tt.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:tt.EmptyStatement}},createExpressionStatement:function(e){return{type:tt.ExpressionStatement,expression:e}},createForStatement:function(e,t,n,r){return{type:tt.ForStatement,init:e,test:t,update:n,body:r}},createForInStatement:function(e,t,n){return{type:tt.ForInStatement,left:e,right:t,body:n,each:!1}},createFunctionDeclaration:function(e,t,n,r){return{type:tt.FunctionDeclaration,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(e,t,n,r){return{type:tt.FunctionExpression,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createIdentifier:function(e){return{type:tt.Identifier,name:e}},createIfStatement:function(e,t,n){return{type:tt.IfStatement,test:e,consequent:t,alternate:n}},createLabeledStatement:function(e,t){return{type:tt.LabeledStatement,label:e,body:t}},createLiteral:function(e){return{type:tt.Literal,value:e.value,raw:at.slice(e.start,e.end)}},createMemberExpression:function(e,t,n){return{type:tt.MemberExpression,computed:"["===e,object:t,property:n}},createNewExpression:function(e,t){return{type:tt.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:tt.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:tt.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:tt.Program,body:e}},createProperty:function(e,t,n){return{type:tt.Property,key:t,value:n,kind:e}},createReturnStatement:function(e){return{type:tt.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:tt.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:tt.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:tt.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:tt.ThisExpression}},createThrowStatement:function(e){return{type:tt.ThrowStatement,argument:e}},createTryStatement:function(e,t,n,r){return{type:tt.TryStatement,block:e,guardedHandlers:t,handlers:n,finalizer:r}},createUnaryExpression:function(e,t){return"++"===e||"--"===e?{type:tt.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:tt.UnaryExpression,operator:e,argument:t,prefix:!0}},createVariableDeclaration:function(e,t){return{type:tt.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:tt.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:tt.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:tt.WithStatement,object:e,body:t}}},e.version="1.2.2",e.tokenize=Ke,e.parse=Ze,e.Syntax=function(){var e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),tt)tt.hasOwnProperty(e)&&(t[e]=tt[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}))},{}],1:[function(e,t,n){(function(r){var i=function(){function e(){this.yy={}}var t={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(e,t,r,i,o,a,s){i.ast||(i.ast=n,n.initialize());var l=a.length-1;switch(o){case 1:return i.ast.set({expression:{type:"root",value:a[l]}}),i.ast.unshift(),i.ast.yield();case 2:return i.ast.set({expression:{type:"root",value:a[l-1]}}),i.ast.unshift(),i.ast.yield();case 3:return i.ast.unshift(),i.ast.yield();case 4:return i.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:a[l-1]}}),i.ast.unshift(),i.ast.yield();case 5:case 6:case 11:case 13:case 18:case 21:case 22:case 23:break;case 7:i.ast.set({operation:"member"}),i.ast.push();break;case 8:i.ast.set({operation:"subscript"}),i.ast.push();break;case 9:case 19:i.ast.set({scope:"child"});break;case 10:case 20:i.ast.set({scope:"descendant"});break;case 12:i.ast.set({scope:"child",operation:"member"});break;case 14:i.ast.set({expression:{type:"wildcard",value:a[l]}});break;case 15:i.ast.set({expression:{type:"identifier",value:a[l]}});break;case 16:i.ast.set({expression:{type:"script_expression",value:a[l]}});break;case 17:i.ast.set({expression:{type:"numeric_literal",value:parseInt(a[l])}});break;case 24:a[l].length>1?i.ast.set({expression:{type:"union",value:a[l]}}):this.$=a[l];break;case 25:this.$=[a[l]];break;case 26:this.$=a[l-2].concat(a[l]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(a[l])}},i.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:a[l]}},i.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:a[l]}},i.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:a[l]}},i.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:a[l]}},i.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:a[l]}},i.ast.set(this.$);break;case 33:case 34:this.$=a[l]}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){function t(){var e;return"number"!=typeof(e=n.lexer.lex()||p)&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],o=[],a=this.table,s="",l=0,u=0,c=0,d=2,p=1,f=o.slice.call(arguments,1);this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;o.push(h);var g=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,m,y,C,b,x,S,E,w,O={};;){if(y=r[r.length-1],this.defaultActions[y]?C=this.defaultActions[y]:(null!=v||(v=t()),C=a[y]&&a[y][v]),void 0===C||!C.length||!C[0]){var _="";for(x in w=[],a[y])this.terminals_[x]&&x>d&&w.push("'"+this.terminals_[x]+"'");_=this.lexer.showPosition?"Parse error on line "+(l+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(v==p?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[v]||v,line:this.lexer.yylineno,loc:h,expected:w})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+v);switch(C[0]){case 1:r.push(v),i.push(this.lexer.yytext),o.push(this.lexer.yylloc),r.push(C[1]),v=null,m?(v=m,m=null):(u=this.lexer.yyleng,s=this.lexer.yytext,l=this.lexer.yylineno,h=this.lexer.yylloc,c>0&&c--);break;case 2:if(S=this.productions_[C[1]][1],O.$=i[i.length-S],O._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},g&&(O._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(b=this.performAction.apply(O,[s,u,l,this.yy,C[1],i,o].concat(f))))return b;S&&(r=r.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),r.push(this.productions_[C[1]][0]),i.push(O.$),o.push(O._$),E=a[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}},n={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(e){for(var t in e)this._node[t]=e[t];return this._node},node:function(e){return arguments.length&&(this._node=e),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var e=this._nodes;return this.initialize(),e}},r=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;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-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){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=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!t||n[0].length>t[0].length)){if(t=n,r=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[o])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===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 e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},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(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return t.yytext=t.yytext.substr(1,t.yyleng-2),32;case 11:return t.yytext=t.yytext.substr(1,t.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return e}();return t.lexer=r,e.prototype=t,t.Parser=e,new e}();void 0!==e&&void 0!==n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),r.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return n.parser.parse(i)},void 0!==t&&e.main===t&&n.main(r.argv.slice(1)))}).call(this,e("_process"))},{_process:11,fs:9,path:10}],2:[function(e,t,n){t.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(e,t,n){var r=e("./dict"),i=e("fs"),o={lex:{macros:{esc:"\\\\",int:r.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],["\\*","return 'STAR'"],[r.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[r.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[r.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?=\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?=\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};i.readFileSync&&(o.moduleInclude=i.readFileSync(e.resolve("../include/module.js")),o.actionInclude=i.readFileSync(e.resolve("../include/action.js"))),t.exports=o},{"./dict":2,fs:9}],4:[function(e,t,n){function r(t,n,r){var i=e("./index"),o=u(p.parse(n).body[0].expression,{"@":t.value}),a=r.replace(/\{\{\s*value\s*\}\}/g,o),s=i.nodes(t.value,a);return s.forEach((function(e){e.path=t.path.concat(e.path.slice(1))})),s}function i(e){return Array.isArray(e)}function o(e){return e&&!(e instanceof Array)&&e instanceof Object}function a(e){return function(t,n,r,a){var s=t.value,l=t.path,u=[],c=function(t,s){i(t)?(t.forEach((function(e,t){u.length>=a||r(t,e,n)&&u.push({path:s.concat(t),value:e})})),t.forEach((function(t,n){u.length>=a||e&&c(t,s.concat(n))}))):o(t)&&(this.keys(t).forEach((function(e){u.length>=a||r(e,t[e],n)&&u.push({path:s.concat(e),value:t[e]})})),this.keys(t).forEach((function(n){u.length>=a||e&&c(t[n],s.concat(n))})))}.bind(this);return c(s,l),u}}function s(e){return function(t,n,r){return this.descend(n,t.expression.value,e,r)}}function l(e){return function(t,n,r){return this.traverse(n,t.expression.value,e,r)}}function u(){try{return h.apply(this,arguments)}catch(e){}}function c(e){return g(e,(function(e){return e.path.map((function(e){return String(e).replace("-","--")})).join("-")}))}function d(e){var t=String(e);return t.match(/^-?[0-9]+$/)?parseInt(t):null}var p=e("./aesprim"),f=e("./slice"),h=e("static-eval"),g=e("underscore").uniq,v=function(){return this.initialize.apply(this,arguments)};v.prototype.initialize=function(){this.traverse=a(!0),this.descend=a()},v.prototype.keys=Object.keys,v.prototype.resolve=function(e){var t=[e.operation,e.scope,e.expression.type].join("-"),n=this._fns[t];if(!n)throw new Error("couldn't resolve key: "+t);return n.bind(this)},v.prototype.register=function(e,t){if(!t instanceof Function)throw new Error("handler must be a function");this._fns[e]=t},v.prototype._fns={"member-child-identifier":function(e,t){var n=e.expression.value,r=t.value;if(r instanceof Object&&n in r)return[{value:r[n],path:t.path.concat(n)}]},"member-descendant-identifier":l((function(e,t,n){return e==n})),"subscript-child-numeric_literal":s((function(e,t,n){return e===n})),"member-child-numeric_literal":s((function(e,t,n){return String(e)===String(n)})),"subscript-descendant-numeric_literal":l((function(e,t,n){return e===n})),"member-child-wildcard":s((function(){return!0})),"member-descendant-wildcard":l((function(){return!0})),"subscript-descendant-wildcard":l((function(){return!0})),"subscript-child-wildcard":s((function(){return!0})),"subscript-child-slice":function(e,t){if(i(t.value)){var n=e.expression.value.split(":").map(d),r=t.value.map((function(e,n){return{value:e,path:t.path.concat(n)}}));return f.apply(null,[r].concat(n))}},"subscript-child-union":function(e,t){var n=[];return e.expression.value.forEach((function(e){var r={operation:"subscript",scope:"child",expression:e.expression},i=this.resolve(r)(r,t);i&&(n=n.concat(i))}),this),c(n)},"subscript-descendant-union":function(t,n,r){var i=e(".."),o=this,a=[];return i.nodes(n,"$..*").slice(1).forEach((function(e){a.length>=r||t.expression.value.forEach((function(t){var n={operation:"subscript",scope:"child",expression:t.expression},r=o.resolve(n)(n,e);a=a.concat(r)}))})),c(a)},"subscript-child-filter_expression":function(e,t,n){var r=e.expression.value.slice(2,-1),i=p.parse(r).body[0].expression,o=function(e,t){return u(i,{"@":t})};return this.descend(t,null,o,n)},"subscript-descendant-filter_expression":function(e,t,n){var r=e.expression.value.slice(2,-1),i=p.parse(r).body[0].expression,o=function(e,t){return u(i,{"@":t})};return this.traverse(t,null,o,n)},"subscript-child-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$[{{value}}]")},"member-child-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$.{{value}}")},"member-descendant-script_expression":function(e,t){return r(t,e.expression.value.slice(1,-1),"$..value")}},v.prototype._fns["subscript-child-string_literal"]=v.prototype._fns["member-child-identifier"],v.prototype._fns["member-descendant-numeric_literal"]=v.prototype._fns["subscript-descendant-string_literal"]=v.prototype._fns["member-descendant-identifier"],t.exports=v},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":12,underscore:9}],5:[function(e,t,n){function r(e){return"[object String]"==Object.prototype.toString.call(e)}var i=e("assert"),o=e("./dict"),a=e("./parser"),s=e("./handlers"),l=function(){this.initialize.apply(this,arguments)};l.prototype.initialize=function(){this.parser=new a,this.handlers=new s},l.prototype.parse=function(e){return i.ok(r(e),"we need a path"),this.parser.parse(e)},l.prototype.parent=function(e,t){i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path");var n=this.nodes(e,t)[0];return n.path.pop(),this.value(e,n.path)},l.prototype.apply=function(e,t,n){i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),i.equal(typeof n,"function","fn needs to be function");var r=this.nodes(e,t).sort((function(e,t){return t.path.length-e.path.length}));return r.forEach((function(t){var r=t.path.pop(),i=this.value(e,this.stringify(t.path)),o=t.value=n.call(e,i[r]);i[r]=o}),this),r},l.prototype.value=function(e,t,n){if(i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),arguments.length>=3){var r=this.nodes(e,t).shift();if(!r)return this._vivify(e,t,n);var o=r.path.slice(-1).shift();this.parent(e,this.stringify(r.path))[o]=n}return this.query(e,this.stringify(t),1).shift()},l.prototype._vivify=function(e,t,n){var r=this;i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path");var o=this.parser.parse(t).map((function(e){return e.expression.value})),a=function(t,n){var i=t.pop(),o=r.value(e,t);o||(a(t.concat(),"string"==typeof i?{}:[]),o=r.value(e,t)),o[i]=n};return a(o,n),this.query(e,t)[0]},l.prototype.query=function(e,t,n){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(r(t),"we need a path"),this.nodes(e,t,n).map((function(e){return e.value}))},l.prototype.paths=function(e,t,n){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),this.nodes(e,t,n).map((function(e){return e.path}))},l.prototype.nodes=function(e,t,n){if(i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),0===n)return[];var r=this.parser.parse(t),o=this.handlers,a=[{path:["$"],value:e}],s=[];return r.length&&"root"==r[0].expression.type&&r.shift(),r.length?(r.forEach((function(e,t){if(!(s.length>=n)){var i=o.resolve(e),l=[];a.forEach((function(o){if(!(s.length>=n)){var a=i(e,o,n);t==r.length-1?s=s.concat(a||[]):l=l.concat(a||[])}})),a=l}})),n?s.slice(0,n):s):a},l.prototype.stringify=function(e){i.ok(e,"we need a path");var t="$",n={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return(e=this._normalize(e)).forEach((function(e){if("root"!=e.expression.type){var r,i=[e.scope,e.operation].join("-"),o=n[i];if(r="string_literal"==e.expression.type?JSON.stringify(e.expression.value):e.expression.value,!o)throw new Error("couldn't find template "+i);t+=o.replace(/{{value}}/,r)}})),t},l.prototype._normalize=function(e){if(i.ok(e,"we need a path"),"string"==typeof e)return this.parser.parse(e);if(Array.isArray(e)&&"string"==typeof e[0]){var t=[{expression:{type:"root",value:"$"}}];return e.forEach((function(e,n){if("$"!=e||0!==n)if("string"==typeof e&&e.match("^"+o.identifier+"$"))t.push({operation:"member",scope:"child",expression:{value:e,type:"identifier"}});else{var r="number"==typeof e?"numeric_literal":"string_literal";t.push({operation:"subscript",scope:"child",expression:{value:e,type:r}})}})),t}if(Array.isArray(e)&&"object"==typeof e[0])return e;throw new Error("couldn't understand path "+e)},l.Handlers=s,l.Parser=a;var u=new l;u.JSONPath=l,t.exports=u},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(e,t,n){var r=e("./grammar"),i=e("../generated/parser"),o=function(){var e=new i.Parser,t=e.parseError;return e.yy.parseError=function(){e.yy.ast&&e.yy.ast.initialize(),t.apply(e,arguments)},e};o.grammar=r,t.exports=o},{"../generated/parser":1,"./grammar":3}],7:[function(e,t,n){function r(e){return String(e).match(/^[0-9]+$/)?parseInt(e):Number.isFinite(e)?parseInt(e,10):0}t.exports=function(e,t,n,i){if("string"==typeof t)throw new Error("start cannot be a string");if("string"==typeof n)throw new Error("end cannot be a string");if("string"==typeof i)throw new Error("step cannot be a string");var o=e.length;if(0===i)throw new Error("step cannot be zero");if(i=i?r(i):1,n=n<0?o+n:n,t=r(0===(t=t<0?o+t:t)?0:t||(i>0?0:o-1)),n=r(0===n?0:n||(i>0?o:-1)),t=i>0?Math.max(0,t):Math.min(o,t),n=i>0?Math.min(n,o):Math.max(-1,n),i>0&&n<=t)return[];if(i<0&&t<=n)return[];for(var a=[],s=t;s!=n&&!(i<0&&s<=n||i>0&&s>=n);s+=i)a.push(e[s]);return a}},{}],8:[function(e,t,n){function r(e,t){return f.isUndefined(t)?""+t:f.isNumber(t)&&!isFinite(t)||f.isFunction(t)||f.isRegExp(t)?t.toString():t}function i(e,t){return f.isString(e)?e.length<t?e:e.slice(0,t):e}function o(e){return i(JSON.stringify(e.actual,r),128)+" "+e.operator+" "+i(JSON.stringify(e.expected,r),128)}function a(e,t,n,r,i){throw new v.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function s(e,t){e||a(e,!0,t,"==",v.ok)}function l(e,t){if(e===t)return!0;if(f.isBuffer(e)&&f.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return f.isDate(e)&&f.isDate(t)?e.getTime()===t.getTime():f.isRegExp(e)&&f.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:f.isObject(e)||f.isObject(t)?c(e,t):e==t}function u(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function c(e,t){if(f.isNullOrUndefined(e)||f.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(f.isPrimitive(e)||f.isPrimitive(t))return e===t;var n=u(e),r=u(t);if(n&&!r||!n&&r)return!1;if(n)return l(e=h.call(e),t=h.call(t));var i,o,a=m(e),s=m(t);if(a.length!=s.length)return!1;for(a.sort(),s.sort(),o=a.length-1;o>=0;o--)if(a[o]!=s[o])return!1;for(o=a.length-1;o>=0;o--)if(!l(e[i=a[o]],t[i]))return!1;return!0}function d(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||!0===t.call({},e))}function p(e,t,n,r){var i;f.isString(n)&&(r=n,n=null);try{t()}catch(e){i=e}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&a(i,n,"Missing expected exception"+r),!e&&d(i,n)&&a(i,n,"Got unwanted exception"+r),e&&i&&n&&!d(i,n)||!e&&i)throw i}var f=e("util/"),h=Array.prototype.slice,g=Object.prototype.hasOwnProperty,v=t.exports=s;v.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var t=e.stackStartFunction||a;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,s=r.indexOf("\n"+i);if(s>=0){var l=r.indexOf("\n",s+1);r=r.substring(l+1)}this.stack=r}}},f.inherits(v.AssertionError,Error),v.fail=a,v.ok=s,v.equal=function(e,t,n){e!=t&&a(e,t,n,"==",v.equal)},v.notEqual=function(e,t,n){e==t&&a(e,t,n,"!=",v.notEqual)},v.deepEqual=function(e,t,n){l(e,t)||a(e,t,n,"deepEqual",v.deepEqual)},v.notDeepEqual=function(e,t,n){l(e,t)&&a(e,t,n,"notDeepEqual",v.notDeepEqual)},v.strictEqual=function(e,t,n){e!==t&&a(e,t,n,"===",v.strictEqual)},v.notStrictEqual=function(e,t,n){e===t&&a(e,t,n,"!==",v.notStrictEqual)},v.throws=function(e,t,n){p.apply(this,[!0].concat(h.call(arguments)))},v.doesNotThrow=function(e,t){p.apply(this,[!1].concat(h.call(arguments)))},v.ifError=function(e){if(e)throw e};var m=Object.keys||function(e){var t=[];for(var n in e)g.call(e,n)&&t.push(n);return t}},{"util/":15}],9:[function(e,t,n){},{}],10:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(e){return i.exec(e).slice(1)};n.resolve=function(){for(var n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return n=t(r(n.split("/"),(function(e){return!!e})),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),o="/"===a(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&o&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),o=r(t.split("/")),a=Math.min(i.length,o.length),s=a,l=0;l<a;l++)if(i[l]!==o[l]){s=l;break}var u=[];for(l=s;l<i.length;l++)u.push("..");return(u=u.concat(o.slice(s))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=o(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=o(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return o(e)[3]};var a=function(e,t,n){return e.substr(t,n)}}).call(this,e("_process"))},{_process:11}],11:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(d===setTimeout)return setTimeout(e,0);if((d===r||!d)&&setTimeout)return d=setTimeout,setTimeout(e,0);try{return d(e,0)}catch(t){try{return d.call(null,e,0)}catch(t){return d.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function s(){v&&h&&(v=!1,h.length?g=h.concat(g):m=-1,g.length&&l())}function l(){if(!v){var e=o(s);v=!0;for(var t=g.length;t;){for(h=g,g=[];++m<t;)h&&h[m].run();m=-1,t=g.length}h=null,v=!1,a(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var d,p,f=t.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:r}catch(e){d=r}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(e){p=i}}();var h,g=[],v=!1,m=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];g.push(new u(e,t)),1!==g.length||v||o(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],12:[function(e,t,n){var r=e("escodegen").generate;t.exports=function(e,t){t||(t={});var n={},i=function e(i){if("Literal"===i.type)return i.value;if("UnaryExpression"===i.type){var o=e(i.argument);return"+"===i.operator?+o:"-"===i.operator?-o:"~"===i.operator?~o:"!"===i.operator?!o:n}if("ArrayExpression"===i.type){for(var a=[],s=0,l=i.elements.length;s<l;s++){if((v=e(i.elements[s]))===n)return n;a.push(v)}return a}if("ObjectExpression"===i.type){var u={};for(s=0;s<i.properties.length;s++){var c=null===(m=i.properties[s]).value?m.value:e(m.value);if(c===n)return n;u[m.key.value||m.key.name]=c}return u}if("BinaryExpression"===i.type||"LogicalExpression"===i.type){if((l=e(i.left))===n)return n;var d=e(i.right);if(d===n)return n;var p=i.operator;return"=="===p?l==d:"==="===p?l===d:"!="===p?l!=d:"!=="===p?l!==d:"+"===p?l+d:"-"===p?l-d:"*"===p?l*d:"/"===p?l/d:"%"===p?l%d:"<"===p?l<d:"<="===p?l<=d:">"===p?l>d:">="===p?l>=d:"|"===p?l|d:"&"===p?l&d:"^"===p?l^d:"&&"===p?l&&d:"||"===p?l||d:n}if("Identifier"===i.type)return{}.hasOwnProperty.call(t,i.name)?t[i.name]:n;if("CallExpression"===i.type){var f=e(i.callee);if(f===n)return n;var h=i.callee.object?e(i.callee.object):n;h===n&&(h=null);var g=[];for(s=0,l=i.arguments.length;s<l;s++){var v;if((v=e(i.arguments[s]))===n)return n;g.push(v)}return f.apply(h,g)}var m;return"MemberExpression"===i.type?(u=e(i.object))===n?n:"Identifier"===i.property.type?u[i.property.name]:(m=e(i.property))===n?n:u[m]:"ConditionalExpression"===i.type?(o=e(i.test))===n?n:e(o?i.consequent:i.alternate):"FunctionExpression"===i.type?Function("return "+r(i))():n}(e);return i===n?void 0:i}},{escodegen:9}],13:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],14:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],15:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(t)?n.showHidden=t:t&&r._extend(n,t),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),l(n,e,n.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}function l(e,t,n){if(e.customInspect&&t&&_(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return C(i)||(i=l(e,i,n)),i}var o=u(e,t);if(o)return o;var a=Object.keys(t),g=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),O(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(t);if(0===a.length){if(_(t)){var v=t.name?": "+t.name:"";return e.stylize("[Function"+v+"]","special")}if(S(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(w(t))return e.stylize(Date.prototype.toString.call(t),"date");if(O(t))return c(t)}var m,y="",b=!1,x=["{","}"];return h(t)&&(b=!0,x=["[","]"]),_(t)&&(y=" [Function"+(t.name?": "+t.name:"")+"]"),S(t)&&(y=" "+RegExp.prototype.toString.call(t)),w(t)&&(y=" "+Date.prototype.toUTCString.call(t)),O(t)&&(y=" "+c(t)),0!==a.length||b&&0!=t.length?n<0?S(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),m=b?d(e,t,n,g,a):a.map((function(r){return p(e,t,n,g,r,b)})),e.seen.pop(),f(m,y,x)):x[0]+y+x[1]}function u(e,t){if(x(t))return e.stylize("undefined","undefined");if(C(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)M(t,String(a))?o.push(p(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(e,t,n,r,i,!0))})),o}function p(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),M(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=v(n)?l(e,u.value,null):l(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function f(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function m(e){return null==e}function y(e){return"number"==typeof e}function C(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function x(e){return void 0===e}function S(e){return E(e)&&"[object RegExp]"===R(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===R(e)}function O(e){return E(e)&&("[object Error]"===R(e)||e instanceof Error)}function _(e){return"function"==typeof e}function L(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function R(e){return Object.prototype.toString.call(e)}function D(e){return e<10?"0"+e.toString(10):e.toString(10)}function N(){var e=new Date,t=[D(e.getHours()),D(e.getMinutes()),D(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var I=/%[sdj%]/g;r.format=function(e){if(!C(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(I,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<o;s=r[++n])a+=v(s)||!E(s)?" "+s:" "+i(s);return a},r.deprecate=function(e,i){function o(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}if(x(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return o};var A,P={};r.debuglog=function(e){if(x(A)&&(A=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!P[e])if(new RegExp("\\b"+e+"\\b","i").test(A)){var n=t.pid;P[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else P[e]=function(){};return P[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=g,r.isNull=v,r.isNullOrUndefined=m,r.isNumber=y,r.isString=C,r.isSymbol=b,r.isUndefined=x,r.isRegExp=S,r.isObject=E,r.isDate=w,r.isError=O,r.isFunction=_,r.isPrimitive=L,r.isBuffer=e("./support/isBuffer");var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",N(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":14,_process:11,inherits:13}],jsonpath:[function(e,t,n){t.exports=e("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")},948:function(e,t,n){var r;e=n.nmd(e),function(){function i(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function a(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function s(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function l(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function u(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function c(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function d(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function p(e,t){return!(null==e||!e.length)&&-1<x(e,t,0)}function f(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function h(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function g(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function v(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function m(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function y(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function C(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function b(e,t,n,r){var i=e.length;for(n+=r?1:-1;r?n--:++n<i;)if(t(e[n],n,e))return n;return-1}function x(e,t,n){if(t==t)e:{--n;for(var r=e.length;++n<r;)if(e[n]===t){e=n;break e}e=-1}else e=b(e,E,n);return e}function S(e,t,n,r){--n;for(var i=e.length;++n<i;)if(r(e[n],t))return n;return-1}function E(e){return e!=e}function w(e,t){var n=null==e?0:e.length;return n?R(e,t)/n:q}function O(e){return function(t){return null==t?G:t[e]}}function _(e){return function(t){return null==e?G:e[t]}}function L(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function R(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);o!==G&&(n=n===G?o:n+o)}return n}function D(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function N(e){return function(t){return e(t)}}function M(e,t){return h(t,(function(t){return e[t]}))}function I(e,t){return e.has(t)}function A(e,t){for(var n=-1,r=e.length;++n<r&&-1<x(t,e[n],0););return n}function P(e,t){for(var n=e.length;n--&&-1<x(t,e[n],0););return n}function k(e){return"\\"+Be[e]}function T(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function V(e,t){return function(n){return e(t(n))}}function B(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&"__lodash_placeholder__"!==a||(e[n]="__lodash_placeholder__",o[i++]=n)}return o}function z(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function j(e){if(Ie.test(e)){for(var t=Ne.lastIndex=0;Ne.test(e);)++t;e=t}else e=et(e);return e}function F(e){return Ie.test(e)?e.match(Ne)||[]:e.split("")}var G,U=1/0,q=NaN,H=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],W=/\b__p\+='';/g,$=/\b(__p\+=)''\+/g,X=/(__e\(.*?\)|\b__t\))\+'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Z=RegExp(Y.source),Q=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,te=/<%=([\s\S]+?)%>/g,ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ie=/^\./,oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ae=/[\\^$.*+?()[\]{}|]/g,se=RegExp(ae.source),le=/^\s+|\s+$/g,ue=/^\s+/,ce=/\s+$/,de=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pe=/\{\n\/\* \[wrapped with (.+)\] \*/,fe=/,? & /,he=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ge=/\\(\\)?/g,ve=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ye=/^[-+]0x[0-9a-f]+$/i,Ce=/^0b[01]+$/i,be=/^\[object .+?Constructor\]$/,xe=/^0o[0-7]+$/i,Se=/^(?:0|[1-9]\d*)$/,Ee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,Oe=/['\n\r\u2028\u2029\\]/g,_e="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",Le="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+_e,Re=RegExp("['’]","g"),De=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Ne=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])"+_e,"g"),Me=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",Le].join("|"),"g"),Ie=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ae=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pe="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),ke={};ke["[object Float32Array]"]=ke["[object Float64Array]"]=ke["[object Int8Array]"]=ke["[object Int16Array]"]=ke["[object Int32Array]"]=ke["[object Uint8Array]"]=ke["[object Uint8ClampedArray]"]=ke["[object Uint16Array]"]=ke["[object Uint32Array]"]=!0,ke["[object Arguments]"]=ke["[object Array]"]=ke["[object ArrayBuffer]"]=ke["[object Boolean]"]=ke["[object DataView]"]=ke["[object Date]"]=ke["[object Error]"]=ke["[object Function]"]=ke["[object Map]"]=ke["[object Number]"]=ke["[object Object]"]=ke["[object RegExp]"]=ke["[object Set]"]=ke["[object String]"]=ke["[object WeakMap]"]=!1;var Te={};Te["[object Arguments]"]=Te["[object Array]"]=Te["[object ArrayBuffer]"]=Te["[object DataView]"]=Te["[object Boolean]"]=Te["[object Date]"]=Te["[object Float32Array]"]=Te["[object Float64Array]"]=Te["[object Int8Array]"]=Te["[object Int16Array]"]=Te["[object Int32Array]"]=Te["[object Map]"]=Te["[object Number]"]=Te["[object Object]"]=Te["[object RegExp]"]=Te["[object Set]"]=Te["[object String]"]=Te["[object Symbol]"]=Te["[object Uint8Array]"]=Te["[object Uint8ClampedArray]"]=Te["[object Uint16Array]"]=Te["[object Uint32Array]"]=!0,Te["[object Error]"]=Te["[object Function]"]=Te["[object WeakMap]"]=!1;var Ve,Be={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ze=parseFloat,je=parseInt,Fe="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Ge="object"==typeof self&&self&&self.Object===Object&&self,Ue=Fe||Ge||Function("return this")(),qe=t&&!t.nodeType&&t,He=qe&&e&&!e.nodeType&&e,We=He&&He.exports===qe,$e=We&&Fe.process;e:{try{Ve=$e&&$e.binding&&$e.binding("util");break e}catch(i){}Ve=void 0}var Xe=Ve&&Ve.isArrayBuffer,Ye=Ve&&Ve.isDate,Ke=Ve&&Ve.isMap,Ze=Ve&&Ve.isRegExp,Qe=Ve&&Ve.isSet,Je=Ve&&Ve.isTypedArray,et=O("length"),tt=_({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),nt=_({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),rt=_({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),it=function e(t){function n(e){if(Qr(e)&&!ja(e)&&!(e instanceof _e)){if(e instanceof _)return e;if(ji.call(e,"__wrapped__"))return wr(e)}return new _(e)}function r(){}function _(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=G}function _e(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Le(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Be(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ve;++t<n;)this.add(e[t])}function Fe(e){this.size=(this.__data__=new Ne(e)).size}function Ge(e,t){var n,r=ja(e),i=!r&&za(e),o=!r&&!i&&Ga(e),a=!r&&!i&&!o&&$a(e),s=(i=(r=r||i||o||a)?D(e.length,Pi):[]).length;for(n in e)!t&&!ji.call(e,n)||r&&("length"==n||o&&("offset"==n||"parent"==n)||a&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||dr(n,s))||i.push(n);return i}function qe(e){var t=e.length;return t?e[$t(0,t-1)]:G}function He(e,t){return br(wn(e),dt(t,0,e.length))}function $e(e){return br(wn(e))}function et(e,t,n){(n===G||qr(e[t],n))&&(n!==G||t in e)||ut(e,t,n)}function ot(e,t,n){var r=e[t];ji.call(e,t)&&qr(r,n)&&(n!==G||t in e)||ut(e,t,n)}function at(e,t){for(var n=e.length;n--;)if(qr(e[n][0],t))return n;return-1}function st(e,t,n,r){return zo(e,(function(e,i,o){t(r,e,n(e),o)})),r}function lt(e,t){return e&&On(t,pi(t),e)}function ut(e,t,n){"__proto__"==t&&io?io(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ct(e,t){for(var n=-1,r=t.length,i=Li(r),o=null==e;++n<r;)i[n]=o?G:ci(e,t[n]);return i}function dt(e,t,n){return e==e&&(n!==G&&(e=e<=n?e:n),t!==G&&(e=e>=t?e:t)),e}function pt(e,t,n,r,i,o){var a,s=1&t,u=2&t,c=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),a!==G)return a;if(!Zr(e))return e;if(r=ja(e)){if(a=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&ji.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return wn(e,a)}else{var d=Ko(e),p="[object Function]"==d||"[object GeneratorFunction]"==d;if(Ga(e))return yn(e,s);if("[object Object]"==d||"[object Arguments]"==d||p&&!i){if(a=u||p?{}:lr(e),!s)return u?function(e,t){return On(e,Yo(e),t)}(e,function(e,t){return e&&On(t,fi(t),e)}(a,e)):function(e,t){return On(e,Xo(e),t)}(e,lt(a,e))}else{if(!Te[d])return i?e:{};a=ur(e,d,pt,s)}}if(o||(o=new Fe),i=o.get(e))return i;o.set(e,a);u=c?u?er:Jn:u?fi:pi;var f=r?G:u(e);return l(f||e,(function(r,i){f&&(r=e[i=r]),ot(a,i,pt(r,t,n,i,e,o))})),a}function ft(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ii(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===G&&!(i in e)||!o(a))return!1}return!0}function ht(e,t,n){if("function"!=typeof e)throw new ki("Expected a function");return Jo((function(){e.apply(G,n)}),t)}function gt(e,t,n,r){var i=-1,o=p,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=h(t,N(n))),r?(o=f,a=!1):200<=t.length&&(o=I,a=!1,t=new Be(t));e:for(;++i<s;){var c=e[i],d=null==n?c:n(c);c=r||0!==c?c:0;if(a&&d==d){for(var g=u;g--;)if(t[g]===d)continue e;l.push(c)}else o(t,d,r)||l.push(c)}return l}function vt(e,t){var n=!0;return zo(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function mt(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(s===G?a==a&&!ni(a):n(a,s)))var s=a,l=o}return l}function yt(e,t){var n=[];return zo(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Ct(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=cr),i||(i=[]);++o<a;){var s=e[o];0<t&&n(s)?1<t?Ct(s,t-1,n,r,i):g(i,s):r||(i[i.length]=s)}return i}function bt(e,t){return e&&Fo(e,t,pi)}function xt(e,t){return e&&Go(e,t,pi)}function St(e,t){return d(t,(function(t){return Xr(e[t])}))}function Et(e,t){for(var n=0,r=(t=vn(t,e)).length;null!=e&&n<r;)e=e[xr(t[n++])];return n&&n==r?e:G}function wt(e,t,n){return t=t(e),ja(e)?t:g(t,n(e))}function Ot(e){if(null==e)e=e===G?"[object Undefined]":"[object Null]";else if(ro&&ro in Ii(e)){var t=ji.call(e,ro),n=e[ro];try{e[ro]=G;var r=!0}catch(e){}var i=Ui.call(e);r&&(t?e[ro]=n:delete e[ro]),e=i}else e=Ui.call(e);return e}function _t(e,t){return e>t}function Lt(e,t){return null!=e&&ji.call(e,t)}function Rt(e,t){return null!=e&&t in Ii(e)}function Dt(e,t,n){for(var r=n?f:p,i=e[0].length,o=e.length,a=o,s=Li(o),l=1/0,u=[];a--;){var c=e[a];a&&t&&(c=h(c,N(t))),l=mo(c.length,l),s[a]=!n&&(t||120<=i&&120<=c.length)?new Be(a&&c):G}c=e[0];var d=-1,g=s[0];e:for(;++d<i&&u.length<l;){var v=c[d],m=t?t(v):v;v=n||0!==v?v:0;if(g?!I(g,m):!r(u,m,n)){for(a=o;--a;){var y=s[a];if(y?!I(y,m):!r(e[a],m,n))continue e}g&&g.push(m),u.push(v)}}return u}function Nt(e,t,n){return null==(t=null==(e=2>(t=vn(t,e)).length?e:Et(e,en(t,0,-1)))?e:e[xr(Dr(t))])?G:a(t,e,n)}function Mt(e){return Qr(e)&&"[object Arguments]"==Ot(e)}function It(e,t,n,r,i){if(e===t)t=!0;else if(null==e||null==t||!Qr(e)&&!Qr(t))t=e!=e&&t!=t;else e:{var o,a,s=ja(e),l=ja(t),u="[object Object]"==(o="[object Arguments]"==(o=s?"[object Array]":Ko(e))?"[object Object]":o);l="[object Object]"==(a="[object Arguments]"==(a=l?"[object Array]":Ko(t))?"[object Object]":a);if((a=o==a)&&Ga(e)){if(!Ga(t)){t=!1;break e}s=!0,u=!1}if(a&&!u)i||(i=new Fe),t=s||$a(e)?Zn(e,t,n,r,It,i):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new Yi(e),new Yi(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return qr(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=T;case"[object Set]":if(s||(s=z),e.size!=t.size&&!(1&r))break;return(n=a.get(e))?n==t:(r|=2,a.set(e,t),t=Zn(s(e),s(t),r,i,o,a),a.delete(e),t);case"[object Symbol]":if(To)return To.call(e)==To.call(t)}return!1}(e,t,o,n,r,It,i);else{if(!(1&n)&&(s=u&&ji.call(e,"__wrapped__"),o=l&&ji.call(t,"__wrapped__"),s||o)){e=s?e.value():e,t=o?t.value():t,i||(i=new Fe),t=It(e,t,n,r,i);break e}if(a)t:if(i||(i=new Fe),s=1&n,o=Jn(e),l=o.length,a=Jn(t).length,l==a||s){for(u=l;u--;){var c=o[u];if(!(s?c in t:ji.call(t,c))){t=!1;break t}}if((a=i.get(e))&&i.get(t))t=a==t;else{a=!0,i.set(e,t),i.set(t,e);for(var d=s;++u<l;){var p=e[c=o[u]],f=t[c];if(r)var h=s?r(f,p,c,t,e,i):r(p,f,c,e,t,i);if(h===G?p!==f&&!It(p,f,n,r,i):!h){a=!1;break}d||(d="constructor"==c)}a&&!d&&((n=e.constructor)!=(r=t.constructor)&&"constructor"in e&&"constructor"in t&&!("function"==typeof n&&n instanceof n&&"function"==typeof r&&r instanceof r)&&(a=!1)),i.delete(e),i.delete(t),t=a}}else t=!1;else t=!1}}return t}function At(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Ii(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],u=e[l],c=s[1];if(a&&s[2]){if(u===G&&!(l in e))return!1}else{if(s=new Fe,r)var d=r(u,c,l,e,t,s);if(d===G?!It(c,u,3,r,s):!d)return!1}}return!0}function Pt(e){return!(!Zr(e)||Gi&&Gi in e)&&(Xr(e)?Wi:be).test(Sr(e))}function kt(e){return"function"==typeof e?e:null==e?bi:"object"==typeof e?ja(e)?jt(e[0],e[1]):zt(e):wi(e)}function Tt(e){if(!gr(e))return go(e);var t,n=[];for(t in Ii(e))ji.call(e,t)&&"constructor"!=t&&n.push(t);return n}function Vt(e,t){return e<t}function Bt(e,t){var n=-1,r=Hr(e)?Li(e.length):[];return zo(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function zt(e){var t=or(e);return 1==t.length&&t[0][2]?vr(t[0][0],t[0][1]):function(n){return n===e||At(n,e,t)}}function jt(e,t){return fr(e)&&t==t&&!Zr(t)?vr(xr(e),t):function(n){var r=ci(n,e);return r===G&&r===t?di(n,e):It(t,r,3)}}function Ft(e,t,n,r,i){e!==t&&Fo(t,(function(o,a){if(Zr(o)){i||(i=new Fe);var s=i,l=e[a],u=t[a];if(h=s.get(u))et(e,a,h);else{var c=(h=r?r(l,u,a+"",e,t,s):G)===G;if(c){var d=ja(u),p=!d&&Ga(u),f=!d&&!p&&$a(u),h=u;d||p||f?ja(l)?h=l:Wr(l)?h=wn(l):p?(c=!1,h=yn(u,!0)):f?(c=!1,h=bn(u,!0)):h=[]:ei(u)||za(u)?(h=l,za(l)?h=li(l):(!Zr(l)||n&&Xr(l))&&(h=lr(u))):c=!1}c&&(s.set(u,h),Ft(h,u,n,r,s),s.delete(u)),et(e,a,h)}}else(s=r?r(e[a],o,a+"",e,t,i):G)===G&&(s=o),et(e,a,s)}),fi)}function Gt(e,t){var n=e.length;if(n)return dr(t+=0>t?n:0,n)?e[t]:G}function Ut(e,t,n){var r=-1;return t=h(t.length?t:[bi],N(rr())),e=Bt(e,(function(e){return{a:h(t,(function(t){return t(e)})),b:++r,c:e}})),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].c;return e}(e,(function(e,t){var r;e:{r=-1;for(var i=e.a,o=t.a,a=i.length,s=n.length;++r<a;){var l=xn(i[r],o[r]);if(l){r=r>=s?l:l*("desc"==n[r]?-1:1);break e}}r=e.b-t.b}return r}))}function qt(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Et(e,a);n(s,a)&&Qt(o,vn(a,e),s)}return o}function Ht(e,t,n,r){var i=r?S:x,o=-1,a=t.length,s=e;for(e===t&&(t=wn(t)),n&&(s=h(e,N(n)));++o<a;){var l=0,u=t[o];for(u=n?n(u):u;-1<(l=i(s,u,l,r));)s!==e&&eo.call(s,l,1),eo.call(e,l,1)}return e}function Wt(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;dr(i)?eo.call(e,i,1):un(e,i)}}}function $t(e,t){return e+uo(bo()*(t-e+1))}function Xt(e,t){var n="";if(!e||1>t||9007199254740991<t)return n;do{t%2&&(n+=e),(t=uo(t/2))&&(e+=e)}while(t);return n}function Yt(e,t){return ea(mr(e,t,bi),e+"")}function Kt(e){return qe(gi(e))}function Zt(e,t){var n=gi(e);return br(n,dt(t,0,n.length))}function Qt(e,t,n,r){if(!Zr(e))return e;for(var i=-1,o=(t=vn(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var l=xr(t[i]),u=n;if(i!=a){var c=s[l];(u=r?r(c,l,s):G)===G&&(u=Zr(c)?c:dr(t[i+1])?[]:{})}ot(s,l,u),s=s[l]}return e}function Jt(e){return br(gi(e))}function en(e,t,n){var r=-1,i=e.length;for(0>t&&(t=-t>i?0:i+t),0>(n=n>i?i:n)&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0,n=Li(i);++r<i;)n[r]=e[r+t];return n}function tn(e,t){var n;return zo(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function nn(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&2147483647>=i){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ni(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return rn(e,t,bi,n)}function rn(e,t,n,r){t=n(t);for(var i=0,o=null==e?0:e.length,a=t!=t,s=null===t,l=ni(t),u=t===G;i<o;){var c=uo((i+o)/2),d=n(e[c]),p=d!==G,f=null===d,h=d==d,g=ni(d);(a?r||h:u?h&&(r||p):s?h&&p&&(r||!f):l?h&&p&&!f&&(r||!g):!f&&!g&&(r?d<=t:d<t))?i=c+1:o=c}return mo(o,4294967294)}function on(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!qr(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function an(e){return"number"==typeof e?e:ni(e)?q:+e}function sn(e){if("string"==typeof e)return e;if(ja(e))return h(e,sn)+"";if(ni(e))return Vo?Vo.call(e):"";var t=e+"";return"0"==t&&1/e==-U?"-0":t}function ln(e,t,n){var r=-1,i=p,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=f;else if(200<=o){if(i=t?null:Wo(e))return z(i);a=!1,i=I,l=new Be}else l=t?[]:s;e:for(;++r<o;){var u=e[r],c=t?t(u):u;u=n||0!==u?u:0;if(a&&c==c){for(var d=l.length;d--;)if(l[d]===c)continue e;t&&l.push(c),s.push(u)}else i(l,c,n)||(l!==s&&l.push(c),s.push(u))}return s}function un(e,t){return null==(e=2>(t=vn(t,e)).length?e:Et(e,en(t,0,-1)))||delete e[xr(Dr(t))]}function cn(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?en(e,r?0:o,r?o+1:i):en(e,r?o+1:0,r?i:o)}function dn(e,t){var n=e;return n instanceof _e&&(n=n.value()),v(t,(function(e,t){return t.func.apply(t.thisArg,g([e],t.args))}),n)}function pn(e,t,n){var r=e.length;if(2>r)return r?ln(e[0]):[];for(var i=-1,o=Li(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=gt(o[i]||a,e[s],t,n));return ln(Ct(o,1),t,n)}function fn(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;)n(a,e[r],r<o?t[r]:G);return a}function hn(e){return Wr(e)?e:[]}function gn(e){return"function"==typeof e?e:bi}function vn(e,t){return ja(e)?e:fr(e,t)?[e]:ta(ui(e))}function mn(e,t,n){var r=e.length;return n=n===G?r:n,!t&&n>=r?e:en(e,t,n)}function yn(e,t){if(t)return e.slice();var n=e.length;n=Ki?Ki(n):new e.constructor(n);return e.copy(n),n}function Cn(e){var t=new e.constructor(e.byteLength);return new Yi(t).set(new Yi(e)),t}function bn(e,t){return new e.constructor(t?Cn(e.buffer):e.buffer,e.byteOffset,e.length)}function xn(e,t){if(e!==t){var n=e!==G,r=null===e,i=e==e,o=ni(e),a=t!==G,s=null===t,l=t==t,u=ni(t);if(!s&&!u&&!o&&e>t||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e<t||u&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}function Sn(e,t,n,r){var i=-1,o=e.length,a=n.length,s=-1,l=t.length,u=vo(o-a,0),c=Li(l+u);for(r=!r;++s<l;)c[s]=t[s];for(;++i<a;)(r||i<o)&&(c[n[i]]=e[i]);for(;u--;)c[s++]=e[i++];return c}function En(e,t,n,r){var i=-1,o=e.length,a=-1,s=n.length,l=-1,u=t.length,c=vo(o-s,0),d=Li(c+u);for(r=!r;++i<c;)d[i]=e[i];for(c=i;++l<u;)d[c+l]=t[l];for(;++a<s;)(r||i<o)&&(d[c+n[a]]=e[i++]);return d}function wn(e,t){var n=-1,r=e.length;for(t||(t=Li(r));++n<r;)t[n]=e[n];return t}function On(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):G;l===G&&(l=e[s]),i?ut(n,s,l):ot(n,s,l)}return n}function _n(e,t){return function(n,r){var i=ja(n)?s:st,o=t?t():{};return i(n,e,rr(r,2),o)}}function Ln(e){return Yt((function(t,n){var r=-1,i=n.length,o=1<i?n[i-1]:G,a=2<i?n[2]:G;o=3<e.length&&"function"==typeof o?(i--,o):G;for(a&&pr(n[0],n[1],a)&&(o=3>i?G:o,i=1),t=Ii(t);++r<i;)(a=n[r])&&e(t,a,r,o);return t}))}function Rn(e,t){return function(n,r){if(null==n)return n;if(!Hr(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ii(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Dn(e){return function(t,n,r){for(var i=-1,o=Ii(t),a=(r=r(t)).length;a--;){var s=r[e?a:++i];if(!1===n(o[s],s,o))break}return t}}function Nn(e){return function(t){t=ui(t);var n=Ie.test(t)?F(t):G,r=n?n[0]:t.charAt(0);return t=n?mn(n,1).join(""):t.slice(1),r[e]()+t}}function Mn(e){return function(t){return v(yi(mi(t).replace(Re,"")),e,"")}}function In(e){return function(){switch((t=arguments).length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var t,n=Bo(e.prototype);return Zr(t=e.apply(n,t))?t:n}}function An(e,t,n){var r=In(e);return function i(){for(var o=arguments.length,s=Li(o),l=o,u=nr(i);l--;)s[l]=arguments[l];return(o-=(l=3>o&&s[0]!==u&&s[o-1]!==u?[]:B(s,u)).length)<n?qn(e,t,Tn,i.placeholder,G,s,l,G,G,n-o):a(this&&this!==Ue&&this instanceof i?r:e,this,s)}}function Pn(e){return function(t,n,r){var i=Ii(t);if(!Hr(t)){var o=rr(n,3);t=pi(t),n=function(e){return o(i[e],e,i)}}return-1<(n=e(t,n,r))?i[o?t[n]:n]:G}}function kn(e){return Qn((function(t){var n=t.length,r=n,i=_.prototype.thru;for(e&&t.reverse();r--;){if("function"!=typeof(a=t[r]))throw new ki("Expected a function");if(i&&!o&&"wrapper"==tr(a))var o=new _([],!0)}for(r=o?r:n;++r<n;){var a,s="wrapper"==(i=tr(a=t[r]))?$o(a):G;o=s&&hr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?o[tr(s[0])].apply(o,s[3]):1==a.length&&hr(a)?o[i]():o.thru(a)}return function(){var e=(i=arguments)[0];if(o&&1==i.length&&ja(e))return o.plant(e).value();for(var r=0,i=n?t[r].apply(this,i):e;++r<n;)i=t[r].call(this,i);return i}}))}function Tn(e,t,n,r,i,o,a,s,l,u){var c=128&t,d=1&t,p=2&t,f=24&t,h=512&t,g=p?G:In(e);return function v(){for(var m=arguments.length,y=Li(m),C=m;C--;)y[C]=arguments[C];if(f){var b,x=nr(v);C=y.length;for(b=0;C--;)y[C]===x&&++b}if(r&&(y=Sn(y,r,i,f)),o&&(y=En(y,o,a,f)),m-=b,f&&m<u)return x=B(y,x),qn(e,t,Tn,v.placeholder,n,y,x,s,l,u-m);if(x=d?n:this,C=p?x[e]:e,m=y.length,s){b=y.length;for(var S=mo(s.length,b),E=wn(y);S--;){var w=s[S];y[S]=dr(w,b)?E[w]:G}}else h&&1<m&&y.reverse();return c&&l<m&&(y.length=l),this&&this!==Ue&&this instanceof v&&(C=g||In(C)),C.apply(x,y)}}function Vn(e,t){return function(n,r){return function(e,t,n){var r={};return bt(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r))}}function Bn(e,t){return function(n,r){var i;if(n===G&&r===G)return t;if(n!==G&&(i=n),r!==G){if(i===G)return r;"string"==typeof n||"string"==typeof r?(n=sn(n),r=sn(r)):(n=an(n),r=an(r)),i=e(n,r)}return i}}function zn(e){return Qn((function(t){return t=h(t,N(rr())),Yt((function(n){var r=this;return e(t,(function(e){return a(e,r,n)}))}))}))}function jn(e,t){var n=(t=t===G?" ":sn(t)).length;return 2>n?n?Xt(t,e):t:(n=Xt(t,lo(e/j(t))),Ie.test(t)?mn(F(n),0,e).join(""):n.slice(0,e))}function Fn(e,t,n,r){var i=1&t,o=In(e);return function t(){for(var s=-1,l=arguments.length,u=-1,c=r.length,d=Li(c+l),p=this&&this!==Ue&&this instanceof t?o:e;++u<c;)d[u]=r[u];for(;l--;)d[u++]=arguments[++s];return a(p,i?n:this,d)}}function Gn(e){return function(t,n,r){r&&"number"!=typeof r&&pr(t,n,r)&&(n=r=G),t=ii(t),n===G?(n=t,t=0):n=ii(n),r=r===G?t<n?1:-1:ii(r);var i=-1;n=vo(lo((n-t)/(r||1)),0);for(var o=Li(n);n--;)o[e?n:++i]=t,t+=r;return o}}function Un(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=si(t),n=si(n)),e(t,n)}}function qn(e,t,n,r,i,o,a,s,l,u){var c=8&t;return 4&(t=(t|(c?32:64))&~(c?64:32))||(t&=-4),i=[e,t,i,c?o:G,c?a:G,o=c?G:o,a=c?G:a,s,l,u],n=n.apply(G,i),hr(e)&&Qo(n,i),n.placeholder=r,yr(n,e,t)}function Hn(e){var t=Mi[e];return function(e,n){if(e=si(e),n=null==n?0:mo(oi(n),292)){var r=(ui(e)+"e").split("e");return+((r=(ui(r=t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}function Wn(e){return function(t){var n=Ko(t);return"[object Map]"==n?T(t):"[object Set]"==n?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return h(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function $n(e,t,n,r,i,o,a,s){var l=2&t;if(!l&&"function"!=typeof e)throw new ki("Expected a function");var u=r?r.length:0;if(u||(t&=-97,r=i=G),a=a===G?a:vo(oi(a),0),s=s===G?s:oi(s),u-=i?i.length:0,64&t){var c=r,d=i;r=i=G}var p=l?G:$o(e);return o=[e,t,n,r,i,c,d,o,a,s],p&&(t=(n=o[1])|(e=p[1]),r=128==e&&8==n||128==e&&256==n&&o[7].length<=p[8]||384==e&&p[7].length<=p[8]&&8==n,131>t||r)&&(1&e&&(o[2]=p[2],t|=1&n?0:4),(n=p[3])&&(r=o[3],o[3]=r?Sn(r,n,p[4]):n,o[4]=r?B(o[3],"__lodash_placeholder__"):p[4]),(n=p[5])&&(r=o[5],o[5]=r?En(r,n,p[6]):n,o[6]=r?B(o[5],"__lodash_placeholder__"):p[6]),(n=p[7])&&(o[7]=n),128&e&&(o[8]=null==o[8]?p[8]:mo(o[8],p[8])),null==o[9]&&(o[9]=p[9]),o[0]=p[0],o[1]=t),e=o[0],t=o[1],n=o[2],r=o[3],i=o[4],!(s=o[9]=o[9]===G?l?0:e.length:vo(o[9]-u,0))&&24&t&&(t&=-25),yr((p?Uo:Qo)(t&&1!=t?8==t||16==t?An(e,t,s):32!=t&&33!=t||i.length?Tn.apply(G,o):Fn(e,t,n,r):function(e,t,n){var r=1&t,i=In(e);return function t(){return(this&&this!==Ue&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n),o),e,t)}function Xn(e,t,n,r){return e===G||qr(e,Vi[n])&&!ji.call(r,n)?t:e}function Yn(e,t,n,r,i,o){return Zr(e)&&Zr(t)&&(o.set(t,e),Ft(e,t,G,Yn,o),o.delete(t)),e}function Kn(e){return ei(e)?G:e}function Zn(e,t,n,r,i,o){var a=1&n,s=e.length;if(s!=(l=t.length)&&!(a&&l>s))return!1;if((l=o.get(e))&&o.get(t))return l==t;var l=-1,u=!0,c=2&n?new Be:G;for(o.set(e,t),o.set(t,e);++l<s;){var d=e[l],p=t[l];if(r)var f=a?r(p,d,l,t,e,o):r(d,p,l,e,t,o);if(f!==G){if(f)continue;u=!1;break}if(c){if(!y(t,(function(e,t){if(!I(c,t)&&(d===e||i(d,e,n,r,o)))return c.push(t)}))){u=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){u=!1;break}}return o.delete(e),o.delete(t),u}function Qn(e){return ea(mr(e,G,Lr),e+"")}function Jn(e){return wt(e,pi,Xo)}function er(e){return wt(e,fi,Yo)}function tr(e){for(var t=e.name+"",n=Do[t],r=ji.call(Do,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function nr(e){return(ji.call(n,"placeholder")?n:e).placeholder}function rr(){var e=(e=n.iteratee||xi)===xi?kt:e;return arguments.length?e(arguments[0],arguments[1]):e}function ir(e,t){var n=e.__data__,r=typeof t;return("string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t)?n["string"==typeof t?"string":"hash"]:n.map}function or(e){for(var t=pi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,i==i&&!Zr(i)]}return t}function ar(e,t){var n=null==e?G:e[t];return Pt(n)?n:G}function sr(e,t,n){for(var r=-1,i=(t=vn(t,e)).length,o=!1;++r<i;){var a=xr(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Kr(i)&&dr(a,i)&&(ja(e)||za(e))}function lr(e){return"function"!=typeof e.constructor||gr(e)?{}:Bo(Zi(e))}function ur(e,t,n,r){var a=e.constructor;switch(t){case"[object ArrayBuffer]":return Cn(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return t=r?Cn(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength);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 bn(e,r);case"[object Map]":return v(t=r?n(T(e),1):T(e),i,new e.constructor);case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(t=new e.constructor(e.source,me.exec(e))).lastIndex=e.lastIndex,t;case"[object Set]":return v(t=r?n(z(e),1):z(e),o,new e.constructor);case"[object Symbol]":return To?Ii(To.call(e)):{}}}function cr(e){return ja(e)||za(e)||!!(to&&e&&e[to])}function dr(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||Se.test(e))&&-1<e&&0==e%1&&e<t}function pr(e,t,n){if(!Zr(n))return!1;var r=typeof t;return!!("number"==r?Hr(n)&&dr(t,n.length):"string"==r&&t in n)&&qr(n[t],e)}function fr(e,t){if(ja(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ni(e))||re.test(e)||!ne.test(e)||null!=t&&e in Ii(t)}function hr(e){var t=tr(e),r=n[t];return"function"==typeof r&&t in _e.prototype&&(e===r||!!(t=$o(r))&&e===t[0])}function gr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Vi)}function vr(e,t){return function(n){return null!=n&&n[e]===t&&(t!==G||e in Ii(n))}}function mr(e,t,n){return t=vo(t===G?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=vo(r.length-t,0),s=Li(o);++i<o;)s[i]=r[t+i];for(i=-1,o=Li(t+1);++i<t;)o[i]=r[i];return o[t]=n(s),a(e,this,o)}}function yr(e,t,n){var r=t+"";t=ea;var i,o=Er;return n=o(i=(i=r.match(pe))?i[1].split(fe):[],n),(o=n.length)&&(n[i=o-1]=(1<o?"& ":"")+n[i],n=n.join(2<o?", ":" "),r=r.replace(de,"{\n/* [wrapped with "+n+"] */\n")),t(e,r)}function Cr(e){var t=0,n=0;return function(){var r=yo(),i=16-(r-n);if(n=r,0<i){if(800<=++t)return arguments[0]}else t=0;return e.apply(G,arguments)}}function br(e,t){var n=-1,r=(i=e.length)-1;for(t=t===G?i:t;++n<t;){var i,o=e[i=$t(n,r)];e[i]=e[n],e[n]=o}return e.length=t,e}function xr(e){if("string"==typeof e||ni(e))return e;var t=e+"";return"0"==t&&1/e==-U?"-0":t}function Sr(e){if(null!=e){try{return zi.call(e)}catch(e){}return e+""}return""}function Er(e,t){return l(H,(function(n){var r="_."+n[0];t&n[1]&&!p(e,r)&&e.push(r)})),e.sort()}function wr(e){if(e instanceof _e)return e.clone();var t=new _(e.__wrapped__,e.__chain__);return t.__actions__=wn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Or(e,t,n){var r=null==e?0:e.length;return r?(0>(n=null==n?0:oi(n))&&(n=vo(r+n,0)),b(e,rr(t,3),n)):-1}function _r(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==G&&(i=oi(n),i=0>n?vo(r+i,0):mo(i,r-1)),b(e,rr(t,3),i,!0)}function Lr(e){return null!=e&&e.length?Ct(e,1):[]}function Rr(e){return e&&e.length?e[0]:G}function Dr(e){var t=null==e?0:e.length;return t?e[t-1]:G}function Nr(e,t){return e&&e.length&&t&&t.length?Ht(e,t):e}function Mr(e){return null==e?e:xo.call(e)}function Ir(e){if(!e||!e.length)return[];var t=0;return e=d(e,(function(e){if(Wr(e))return t=vo(e.length,t),!0})),D(t,(function(t){return h(e,O(t))}))}function Ar(e,t){if(!e||!e.length)return[];var n=Ir(e);return null==t?n:h(n,(function(e){return a(t,G,e)}))}function Pr(e){return(e=n(e)).__chain__=!0,e}function kr(e,t){return t(e)}function Tr(e,t){return(ja(e)?l:zo)(e,rr(t,3))}function Vr(e,t){return(ja(e)?u:jo)(e,rr(t,3))}function Br(e,t){return(ja(e)?h:Bt)(e,rr(t,3))}function zr(e,t,n){return t=n?G:t,t=e&&null==t?e.length:t,$n(e,128,G,G,G,G,t)}function jr(e,t){var n;if("function"!=typeof t)throw new ki("Expected a function");return e=oi(e),function(){return 0<--e&&(n=t.apply(this,arguments)),1>=e&&(t=G),n}}function Fr(e,t,n){function r(t){var n=l,r=u;return l=u=G,h=t,d=e.apply(r,n)}function i(e){var n=e-f;return e-=h,f===G||n>=t||0>n||v&&e>=c}function o(){var e=Ra();if(i(e))return a(e);var n,r=Jo;n=e-h,e=t-(e-f),n=v?mo(e,c-n):e,p=r(o,n)}function a(e){return p=G,m&&l?r(e):(l=u=G,d)}function s(){var e=Ra(),n=i(e);if(l=arguments,u=this,f=e,n){if(p===G)return h=e=f,p=Jo(o,t),g?r(e):d;if(v)return p=Jo(o,t),r(f)}return p===G&&(p=Jo(o,t)),d}var l,u,c,d,p,f,h=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new ki("Expected a function");return t=si(t)||0,Zr(n)&&(g=!!n.leading,c=(v="maxWait"in n)?vo(si(n.maxWait)||0,t):c,m="trailing"in n?!!n.trailing:m),s.cancel=function(){p!==G&&Ho(p),h=0,l=f=u=p=G},s.flush=function(){return p===G?d:a(Ra())},s}function Gr(e,t){function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;return o.has(i)?o.get(i):(r=e.apply(this,r),n.cache=o.set(i,r)||o,r)}if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ki("Expected a function");return n.cache=new(Gr.Cache||Ve),n}function Ur(e){if("function"!=typeof e)throw new ki("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function qr(e,t){return e===t||e!=e&&t!=t}function Hr(e){return null!=e&&Kr(e.length)&&!Xr(e)}function Wr(e){return Qr(e)&&Hr(e)}function $r(e){if(!Qr(e))return!1;var t=Ot(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ei(e)}function Xr(e){return!!Zr(e)&&("[object Function]"==(e=Ot(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function Yr(e){return"number"==typeof e&&e==oi(e)}function Kr(e){return"number"==typeof e&&-1<e&&0==e%1&&9007199254740991>=e}function Zr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Qr(e){return null!=e&&"object"==typeof e}function Jr(e){return"number"==typeof e||Qr(e)&&"[object Number]"==Ot(e)}function ei(e){return!(!Qr(e)||"[object Object]"!=Ot(e))&&(null===(e=Zi(e))||"function"==typeof(e=ji.call(e,"constructor")&&e.constructor)&&e instanceof e&&zi.call(e)==qi)}function ti(e){return"string"==typeof e||!ja(e)&&Qr(e)&&"[object String]"==Ot(e)}function ni(e){return"symbol"==typeof e||Qr(e)&&"[object Symbol]"==Ot(e)}function ri(e){if(!e)return[];if(Hr(e))return ti(e)?F(e):wn(e);if(no&&e[no]){e=e[no]();for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}return("[object Map]"==(t=Ko(e))?T:"[object Set]"==t?z:gi)(e)}function ii(e){return e?(e=si(e))===U||e===-U?17976931348623157e292*(0>e?-1:1):e==e?e:0:0===e?e:0}function oi(e){var t=(e=ii(e))%1;return e==e?t?e-t:e:0}function ai(e){return e?dt(oi(e),0,4294967295):0}function si(e){if("number"==typeof e)return e;if(ni(e))return q;if(Zr(e)&&(e=Zr(e="function"==typeof e.valueOf?e.valueOf():e)?e+"":e),"string"!=typeof e)return 0===e?e:+e;e=e.replace(le,"");var t=Ce.test(e);return t||xe.test(e)?je(e.slice(2),t?2:8):ye.test(e)?q:+e}function li(e){return On(e,fi(e))}function ui(e){return null==e?"":sn(e)}function ci(e,t,n){return(e=null==e?G:Et(e,t))===G?n:e}function di(e,t){return null!=e&&sr(e,t,Rt)}function pi(e){return Hr(e)?Ge(e):Tt(e)}function fi(e){if(Hr(e))e=Ge(e,!0);else if(Zr(e)){var t,n=gr(e),r=[];for(t in e)("constructor"!=t||!n&&ji.call(e,t))&&r.push(t);e=r}else{if(t=[],null!=e)for(n in Ii(e))t.push(n);e=t}return e}function hi(e,t){if(null==e)return{};var n=h(er(e),(function(e){return[e]}));return t=rr(t),qt(e,n,(function(e,n){return t(e,n[0])}))}function gi(e){return null==e?[]:M(e,pi(e))}function vi(e){return Cs(ui(e).toLowerCase())}function mi(e){return(e=ui(e))&&e.replace(Ee,tt).replace(De,"")}function yi(e,t,n){return e=ui(e),(t=n?G:t)===G?Ae.test(e)?e.match(Me)||[]:e.match(he)||[]:e.match(t)||[]}function Ci(e){return function(){return e}}function bi(e){return e}function xi(e){return kt("function"==typeof e?e:pt(e,1))}function Si(e,t,n){var r=pi(t),i=St(t,r);null!=n||Zr(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=St(t,pi(t)));var o=!(Zr(n)&&"chain"in n&&!n.chain),a=Xr(e);return l(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=wn(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,g([this.value()],arguments))})})),e}function Ei(){}function wi(e){return fr(e)?O(xr(e)):function(e){return function(t){return Et(t,e)}}(e)}function Oi(){return[]}function _i(){return!1}var Li=(t=null==t?Ue:it.defaults(Ue.Object(),t,it.pick(Ue,Pe))).Array,Ri=t.Date,Di=t.Error,Ni=t.Function,Mi=t.Math,Ii=t.Object,Ai=t.RegExp,Pi=t.String,ki=t.TypeError,Ti=Li.prototype,Vi=Ii.prototype,Bi=t["__core-js_shared__"],zi=Ni.prototype.toString,ji=Vi.hasOwnProperty,Fi=0,Gi=function(){var e=/[^.]+$/.exec(Bi&&Bi.keys&&Bi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ui=Vi.toString,qi=zi.call(Ii),Hi=Ue._,Wi=Ai("^"+zi.call(ji).replace(ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$i=We?t.Buffer:G,Xi=t.Symbol,Yi=t.Uint8Array,Ki=$i?$i.f:G,Zi=V(Ii.getPrototypeOf,Ii),Qi=Ii.create,Ji=Vi.propertyIsEnumerable,eo=Ti.splice,to=Xi?Xi.isConcatSpreadable:G,no=Xi?Xi.iterator:G,ro=Xi?Xi.toStringTag:G,io=function(){try{var e=ar(Ii,"defineProperty");return e({},"",{}),e}catch(e){}}(),oo=t.clearTimeout!==Ue.clearTimeout&&t.clearTimeout,ao=Ri&&Ri.now!==Ue.Date.now&&Ri.now,so=t.setTimeout!==Ue.setTimeout&&t.setTimeout,lo=Mi.ceil,uo=Mi.floor,co=Ii.getOwnPropertySymbols,po=$i?$i.isBuffer:G,fo=t.isFinite,ho=Ti.join,go=V(Ii.keys,Ii),vo=Mi.max,mo=Mi.min,yo=Ri.now,Co=t.parseInt,bo=Mi.random,xo=Ti.reverse,So=ar(t,"DataView"),Eo=ar(t,"Map"),wo=ar(t,"Promise"),Oo=ar(t,"Set"),_o=ar(t,"WeakMap"),Lo=ar(Ii,"create"),Ro=_o&&new _o,Do={},No=Sr(So),Mo=Sr(Eo),Io=Sr(wo),Ao=Sr(Oo),Po=Sr(_o),ko=Xi?Xi.prototype:G,To=ko?ko.valueOf:G,Vo=ko?ko.toString:G,Bo=function(){function e(){}return function(t){return Zr(t)?Qi?Qi(t):(e.prototype=t,t=new e,e.prototype=G,t):{}}}();n.templateSettings={escape:J,evaluate:ee,interpolate:te,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,_.prototype=Bo(r.prototype),_.prototype.constructor=_,_e.prototype=Bo(r.prototype),_e.prototype.constructor=_e,Le.prototype.clear=function(){this.__data__=Lo?Lo(null):{},this.size=0},Le.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},Le.prototype.get=function(e){var t=this.__data__;return Lo?"__lodash_hash_undefined__"===(e=t[e])?G:e:ji.call(t,e)?t[e]:G},Le.prototype.has=function(e){var t=this.__data__;return Lo?t[e]!==G:ji.call(t,e)},Le.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Lo&&t===G?"__lodash_hash_undefined__":t,this},Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(e){var t=this.__data__;return!(0>(e=at(t,e))||(e==t.length-1?t.pop():eo.call(t,e,1),--this.size,0))},Ne.prototype.get=function(e){var t=this.__data__;return 0>(e=at(t,e))?G:t[e][1]},Ne.prototype.has=function(e){return-1<at(this.__data__,e)},Ne.prototype.set=function(e,t){var n=this.__data__,r=at(n,e);return 0>r?(++this.size,n.push([e,t])):n[r][1]=t,this},Ve.prototype.clear=function(){this.size=0,this.__data__={hash:new Le,map:new(Eo||Ne),string:new Le}},Ve.prototype.delete=function(e){return e=ir(this,e).delete(e),this.size-=e?1:0,e},Ve.prototype.get=function(e){return ir(this,e).get(e)},Ve.prototype.has=function(e){return ir(this,e).has(e)},Ve.prototype.set=function(e,t){var n=ir(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Be.prototype.add=Be.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Be.prototype.has=function(e){return this.__data__.has(e)},Fe.prototype.clear=function(){this.__data__=new Ne,this.size=0},Fe.prototype.delete=function(e){var t=this.__data__;return e=t.delete(e),this.size=t.size,e},Fe.prototype.get=function(e){return this.__data__.get(e)},Fe.prototype.has=function(e){return this.__data__.has(e)},Fe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!Eo||199>r.length)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ve(r)}return n.set(e,t),this.size=n.size,this};var zo=Rn(bt),jo=Rn(xt,!0),Fo=Dn(),Go=Dn(!0),Uo=Ro?function(e,t){return Ro.set(e,t),e}:bi,qo=io?function(e,t){return io(e,"toString",{configurable:!0,enumerable:!1,value:Ci(t),writable:!0})}:bi,Ho=oo||function(e){return Ue.clearTimeout(e)},Wo=Oo&&1/z(new Oo([,-0]))[1]==U?function(e){return new Oo(e)}:Ei,$o=Ro?function(e){return Ro.get(e)}:Ei,Xo=co?function(e){return null==e?[]:(e=Ii(e),d(co(e),(function(t){return Ji.call(e,t)})))}:Oi,Yo=co?function(e){for(var t=[];e;)g(t,Xo(e)),e=Zi(e);return t}:Oi,Ko=Ot;(So&&"[object DataView]"!=Ko(new So(new ArrayBuffer(1)))||Eo&&"[object Map]"!=Ko(new Eo)||wo&&"[object Promise]"!=Ko(wo.resolve())||Oo&&"[object Set]"!=Ko(new Oo)||_o&&"[object WeakMap]"!=Ko(new _o))&&(Ko=function(e){var t=Ot(e);if(e=(e="[object Object]"==t?e.constructor:G)?Sr(e):"")switch(e){case No:return"[object DataView]";case Mo:return"[object Map]";case Io:return"[object Promise]";case Ao:return"[object Set]";case Po:return"[object WeakMap]"}return t});var Zo=Bi?Xr:_i,Qo=Cr(Uo),Jo=so||function(e,t){return Ue.setTimeout(e,t)},ea=Cr(qo),ta=function(e){var t=(e=Gr(e,(function(e){return 500===t.size&&t.clear(),e}))).cache;return e}((function(e){var t=[];return ie.test(e)&&t.push(""),e.replace(oe,(function(e,n,r,i){t.push(r?i.replace(ge,"$1"):n||e)})),t})),na=Yt((function(e,t){return Wr(e)?gt(e,Ct(t,1,Wr,!0)):[]})),ra=Yt((function(e,t){var n=Dr(t);return Wr(n)&&(n=G),Wr(e)?gt(e,Ct(t,1,Wr,!0),rr(n,2)):[]})),ia=Yt((function(e,t){var n=Dr(t);return Wr(n)&&(n=G),Wr(e)?gt(e,Ct(t,1,Wr,!0),G,n):[]})),oa=Yt((function(e){var t=h(e,hn);return t.length&&t[0]===e[0]?Dt(t):[]})),aa=Yt((function(e){var t=Dr(e),n=h(e,hn);return t===Dr(n)?t=G:n.pop(),n.length&&n[0]===e[0]?Dt(n,rr(t,2)):[]})),sa=Yt((function(e){var t=Dr(e),n=h(e,hn);return(t="function"==typeof t?t:G)&&n.pop(),n.length&&n[0]===e[0]?Dt(n,G,t):[]})),la=Yt(Nr),ua=Qn((function(e,t){var n=null==e?0:e.length,r=ct(e,t);return Wt(e,h(t,(function(e){return dr(e,n)?+e:e})).sort(xn)),r})),ca=Yt((function(e){return ln(Ct(e,1,Wr,!0))})),da=Yt((function(e){var t=Dr(e);return Wr(t)&&(t=G),ln(Ct(e,1,Wr,!0),rr(t,2))})),pa=Yt((function(e){var t="function"==typeof(t=Dr(e))?t:G;return ln(Ct(e,1,Wr,!0),G,t)})),fa=Yt((function(e,t){return Wr(e)?gt(e,t):[]})),ha=Yt((function(e){return pn(d(e,Wr))})),ga=Yt((function(e){var t=Dr(e);return Wr(t)&&(t=G),pn(d(e,Wr),rr(t,2))})),va=Yt((function(e){var t="function"==typeof(t=Dr(e))?t:G;return pn(d(e,Wr),G,t)})),ma=Yt(Ir),ya=Yt((function(e){var t="function"==typeof(t=1<(t=e.length)?e[t-1]:G)?(e.pop(),t):G;return Ar(e,t)})),Ca=Qn((function(e){function t(t){return ct(t,e)}var n=e.length,r=n?e[0]:0,i=this.__wrapped__;return!(1<n||this.__actions__.length)&&i instanceof _e&&dr(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:kr,args:[t],thisArg:G}),new _(i,this.__chain__).thru((function(e){return n&&!e.length&&e.push(G),e}))):this.thru(t)})),ba=_n((function(e,t,n){ji.call(e,n)?++e[n]:ut(e,n,1)})),xa=Pn(Or),Sa=Pn(_r),Ea=_n((function(e,t,n){ji.call(e,n)?e[n].push(t):ut(e,n,[t])})),wa=Yt((function(e,t,n){var r=-1,i="function"==typeof t,o=Hr(e)?Li(e.length):[];return zo(e,(function(e){o[++r]=i?a(t,e,n):Nt(e,t,n)})),o})),Oa=_n((function(e,t,n){ut(e,n,t)})),_a=_n((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),La=Yt((function(e,t){if(null==e)return[];var n=t.length;return 1<n&&pr(e,t[0],t[1])?t=[]:2<n&&pr(t[0],t[1],t[2])&&(t=[t[0]]),Ut(e,Ct(t,1),[])})),Ra=ao||function(){return Ue.Date.now()},Da=Yt((function(e,t,n){var r=1;if(n.length){var i=B(n,nr(Da));r=32|r}return $n(e,r,t,n,i)})),Na=Yt((function(e,t,n){var r=3;if(n.length){var i=B(n,nr(Na));r=32|r}return $n(t,r,e,n,i)})),Ma=Yt((function(e,t){return ht(e,1,t)})),Ia=Yt((function(e,t,n){return ht(e,si(t)||0,n)}));Gr.Cache=Ve;var Aa=Yt((function(e,t){var n=(t=1==t.length&&ja(t[0])?h(t[0],N(rr())):h(Ct(t,1),N(rr()))).length;return Yt((function(r){for(var i=-1,o=mo(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return a(e,this,r)}))})),Pa=Yt((function(e,t){return $n(e,32,G,t,B(t,nr(Pa)))})),ka=Yt((function(e,t){return $n(e,64,G,t,B(t,nr(ka)))})),Ta=Qn((function(e,t){return $n(e,256,G,G,G,t)})),Va=Un(_t),Ba=Un((function(e,t){return e>=t})),za=Mt(function(){return arguments}())?Mt:function(e){return Qr(e)&&ji.call(e,"callee")&&!Ji.call(e,"callee")},ja=Li.isArray,Fa=Xe?N(Xe):function(e){return Qr(e)&&"[object ArrayBuffer]"==Ot(e)},Ga=po||_i,Ua=Ye?N(Ye):function(e){return Qr(e)&&"[object Date]"==Ot(e)},qa=Ke?N(Ke):function(e){return Qr(e)&&"[object Map]"==Ko(e)},Ha=Ze?N(Ze):function(e){return Qr(e)&&"[object RegExp]"==Ot(e)},Wa=Qe?N(Qe):function(e){return Qr(e)&&"[object Set]"==Ko(e)},$a=Je?N(Je):function(e){return Qr(e)&&Kr(e.length)&&!!ke[Ot(e)]},Xa=Un(Vt),Ya=Un((function(e,t){return e<=t})),Ka=Ln((function(e,t){if(gr(t)||Hr(t))On(t,pi(t),e);else for(var n in t)ji.call(t,n)&&ot(e,n,t[n])})),Za=Ln((function(e,t){On(t,fi(t),e)})),Qa=Ln((function(e,t,n,r){On(t,fi(t),e,r)})),Ja=Ln((function(e,t,n,r){On(t,pi(t),e,r)})),es=Qn(ct),ts=Yt((function(e){return e.push(G,Xn),a(Qa,G,e)})),ns=Yt((function(e){return e.push(G,Yn),a(ss,G,e)})),rs=Vn((function(e,t,n){e[t]=n}),Ci(bi)),is=Vn((function(e,t,n){ji.call(e,t)?e[t].push(n):e[t]=[n]}),rr),os=Yt(Nt),as=Ln((function(e,t,n){Ft(e,t,n)})),ss=Ln((function(e,t,n,r){Ft(e,t,n,r)})),ls=Qn((function(e,t){var n={};if(null==e)return n;var r=!1;t=h(t,(function(t){return t=vn(t,e),r||(r=1<t.length),t})),On(e,er(e),n),r&&(n=pt(n,7,Kn));for(var i=t.length;i--;)un(n,t[i]);return n})),us=Qn((function(e,t){return null==e?{}:function(e,t){return qt(e,t,(function(t,n){return di(e,n)}))}(e,t)})),cs=Wn(pi),ds=Wn(fi),ps=Mn((function(e,t,n){return t=t.toLowerCase(),e+(n?vi(t):t)})),fs=Mn((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),hs=Mn((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),gs=Nn("toLowerCase"),vs=Mn((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),ms=Mn((function(e,t,n){return e+(n?" ":"")+Cs(t)})),ys=Mn((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Cs=Nn("toUpperCase"),bs=Yt((function(e,t){try{return a(e,G,t)}catch(e){return $r(e)?e:new Di(e)}})),xs=Qn((function(e,t){return l(t,(function(t){t=xr(t),ut(e,t,Da(e[t],e))})),e})),Ss=kn(),Es=kn(!0),ws=Yt((function(e,t){return function(n){return Nt(n,e,t)}})),Os=Yt((function(e,t){return function(n){return Nt(e,n,t)}})),_s=zn(h),Ls=zn(c),Rs=zn(y),Ds=Gn(),Ns=Gn(!0),Ms=Bn((function(e,t){return e+t}),0),Is=Hn("ceil"),As=Bn((function(e,t){return e/t}),1),Ps=Hn("floor"),ks=Bn((function(e,t){return e*t}),1),Ts=Hn("round"),Vs=Bn((function(e,t){return e-t}),0);return n.after=function(e,t){if("function"!=typeof t)throw new ki("Expected a function");return e=oi(e),function(){if(1>--e)return t.apply(this,arguments)}},n.ary=zr,n.assign=Ka,n.assignIn=Za,n.assignInWith=Qa,n.assignWith=Ja,n.at=es,n.before=jr,n.bind=Da,n.bindAll=xs,n.bindKey=Na,n.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return ja(e)?e:[e]},n.chain=Pr,n.chunk=function(e,t,n){if(t=(n?pr(e,t,n):t===G)?1:vo(oi(t),0),!(n=null==e?0:e.length)||1>t)return[];for(var r=0,i=0,o=Li(lo(n/t));r<n;)o[i++]=en(e,r,r+=t);return o},n.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},n.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Li(e-1),n=arguments[0];e--;)t[e-1]=arguments[e];return g(ja(n)?wn(n):[n],Ct(t,1))},n.cond=function(e){var t=null==e?0:e.length,n=rr();return e=t?h(e,(function(e){if("function"!=typeof e[1])throw new ki("Expected a function");return[n(e[0]),e[1]]})):[],Yt((function(n){for(var r=-1;++r<t;){var i=e[r];if(a(i[0],this,n))return a(i[1],this,n)}}))},n.conforms=function(e){return function(e){var t=pi(e);return function(n){return ft(n,e,t)}}(pt(e,1))},n.constant=Ci,n.countBy=ba,n.create=function(e,t){var n=Bo(e);return null==t?n:lt(n,t)},n.curry=function e(t,n,r){return(t=$n(t,8,G,G,G,G,G,n=r?G:n)).placeholder=e.placeholder,t},n.curryRight=function e(t,n,r){return(t=$n(t,16,G,G,G,G,G,n=r?G:n)).placeholder=e.placeholder,t},n.debounce=Fr,n.defaults=ts,n.defaultsDeep=ns,n.defer=Ma,n.delay=Ia,n.difference=na,n.differenceBy=ra,n.differenceWith=ia,n.drop=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0>(t=n||t===G?1:oi(t))?0:t,r):[]},n.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0,0>(t=r-(t=n||t===G?1:oi(t)))?0:t):[]},n.dropRightWhile=function(e,t){return e&&e.length?cn(e,rr(t,3),!0,!0):[]},n.dropWhile=function(e,t){return e&&e.length?cn(e,rr(t,3),!0):[]},n.fill=function(e,t,n,r){var i=null==e?0:e.length;if(!i)return[];for(n&&"number"!=typeof n&&pr(e,t,n)&&(n=0,r=i),i=e.length,0>(n=oi(n))&&(n=-n>i?0:i+n),0>(r=r===G||r>i?i:oi(r))&&(r+=i),r=n>r?0:ai(r);n<r;)e[n++]=t;return e},n.filter=function(e,t){return(ja(e)?d:yt)(e,rr(t,3))},n.flatMap=function(e,t){return Ct(Br(e,t),1)},n.flatMapDeep=function(e,t){return Ct(Br(e,t),U)},n.flatMapDepth=function(e,t,n){return n=n===G?1:oi(n),Ct(Br(e,t),n)},n.flatten=Lr,n.flattenDeep=function(e){return null!=e&&e.length?Ct(e,U):[]},n.flattenDepth=function(e,t){return null!=e&&e.length?Ct(e,t=t===G?1:oi(t)):[]},n.flip=function(e){return $n(e,512)},n.flow=Ss,n.flowRight=Es,n.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},n.functions=function(e){return null==e?[]:St(e,pi(e))},n.functionsIn=function(e){return null==e?[]:St(e,fi(e))},n.groupBy=Ea,n.initial=function(e){return null!=e&&e.length?en(e,0,-1):[]},n.intersection=oa,n.intersectionBy=aa,n.intersectionWith=sa,n.invert=rs,n.invertBy=is,n.invokeMap=wa,n.iteratee=xi,n.keyBy=Oa,n.keys=pi,n.keysIn=fi,n.map=Br,n.mapKeys=function(e,t){var n={};return t=rr(t,3),bt(e,(function(e,r,i){ut(n,t(e,r,i),e)})),n},n.mapValues=function(e,t){var n={};return t=rr(t,3),bt(e,(function(e,r,i){ut(n,r,t(e,r,i))})),n},n.matches=function(e){return zt(pt(e,1))},n.matchesProperty=function(e,t){return jt(e,pt(t,1))},n.memoize=Gr,n.merge=as,n.mergeWith=ss,n.method=ws,n.methodOf=Os,n.mixin=Si,n.negate=Ur,n.nthArg=function(e){return e=oi(e),Yt((function(t){return Gt(t,e)}))},n.omit=ls,n.omitBy=function(e,t){return hi(e,Ur(rr(t)))},n.once=function(e){return jr(2,e)},n.orderBy=function(e,t,n,r){return null==e?[]:(ja(t)||(t=null==t?[]:[t]),ja(n=r?G:n)||(n=null==n?[]:[n]),Ut(e,t,n))},n.over=_s,n.overArgs=Aa,n.overEvery=Ls,n.overSome=Rs,n.partial=Pa,n.partialRight=ka,n.partition=_a,n.pick=us,n.pickBy=hi,n.property=wi,n.propertyOf=function(e){return function(t){return null==e?G:Et(e,t)}},n.pull=la,n.pullAll=Nr,n.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ht(e,t,rr(n,2)):e},n.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Ht(e,t,G,n):e},n.pullAt=ua,n.range=Ds,n.rangeRight=Ns,n.rearg=Ta,n.reject=function(e,t){return(ja(e)?d:yt)(e,Ur(rr(t,3)))},n.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=rr(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Wt(e,i),n},n.rest=function(e,t){if("function"!=typeof e)throw new ki("Expected a function");return Yt(e,t=t===G?t:oi(t))},n.reverse=Mr,n.sampleSize=function(e,t,n){return t=(n?pr(e,t,n):t===G)?1:oi(t),(ja(e)?He:Zt)(e,t)},n.set=function(e,t,n){return null==e?e:Qt(e,t,n)},n.setWith=function(e,t,n,r){return r="function"==typeof r?r:G,null==e?e:Qt(e,t,n,r)},n.shuffle=function(e){return(ja(e)?$e:Jt)(e)},n.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&pr(e,t,n)?(t=0,n=r):(t=null==t?0:oi(t),n=n===G?r:oi(n)),en(e,t,n)):[]},n.sortBy=La,n.sortedUniq=function(e){return e&&e.length?on(e):[]},n.sortedUniqBy=function(e,t){return e&&e.length?on(e,rr(t,2)):[]},n.split=function(e,t,n){return n&&"number"!=typeof n&&pr(e,t,n)&&(t=n=G),(n=n===G?4294967295:n>>>0)?(e=ui(e))&&("string"==typeof t||null!=t&&!Ha(t))&&(!(t=sn(t))&&Ie.test(e))?mn(F(e),0,n):e.split(t,n):[]},n.spread=function(e,t){if("function"!=typeof e)throw new ki("Expected a function");return t=null==t?0:vo(oi(t),0),Yt((function(n){var r=n[t];return n=mn(n,0,t),r&&g(n,r),a(e,this,n)}))},n.tail=function(e){var t=null==e?0:e.length;return t?en(e,1,t):[]},n.take=function(e,t,n){return e&&e.length?en(e,0,0>(t=n||t===G?1:oi(t))?0:t):[]},n.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?en(e,0>(t=r-(t=n||t===G?1:oi(t)))?0:t,r):[]},n.takeRightWhile=function(e,t){return e&&e.length?cn(e,rr(t,3),!1,!0):[]},n.takeWhile=function(e,t){return e&&e.length?cn(e,rr(t,3)):[]},n.tap=function(e,t){return t(e),e},n.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ki("Expected a function");return Zr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Fr(e,t,{leading:r,maxWait:t,trailing:i})},n.thru=kr,n.toArray=ri,n.toPairs=cs,n.toPairsIn=ds,n.toPath=function(e){return ja(e)?h(e,xr):ni(e)?[e]:wn(ta(ui(e)))},n.toPlainObject=li,n.transform=function(e,t,n){var r=ja(e),i=r||Ga(e)||$a(e);if(t=rr(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Zr(e)&&Xr(o)?Bo(Zi(e)):{}}return(i?l:bt)(e,(function(e,r,i){return t(n,e,r,i)})),n},n.unary=function(e){return zr(e,1)},n.union=ca,n.unionBy=da,n.unionWith=pa,n.uniq=function(e){return e&&e.length?ln(e):[]},n.uniqBy=function(e,t){return e&&e.length?ln(e,rr(t,2)):[]},n.uniqWith=function(e,t){return t="function"==typeof t?t:G,e&&e.length?ln(e,G,t):[]},n.unset=function(e,t){return null==e||un(e,t)},n.unzip=Ir,n.unzipWith=Ar,n.update=function(e,t,n){return null==e?e:Qt(e,t,gn(n)(Et(e,t)),void 0)},n.updateWith=function(e,t,n,r){return r="function"==typeof r?r:G,null!=e&&(e=Qt(e,t,gn(n)(Et(e,t)),r)),e},n.values=gi,n.valuesIn=function(e){return null==e?[]:M(e,fi(e))},n.without=fa,n.words=yi,n.wrap=function(e,t){return Pa(gn(t),e)},n.xor=ha,n.xorBy=ga,n.xorWith=va,n.zip=ma,n.zipObject=function(e,t){return fn(e||[],t||[],ot)},n.zipObjectDeep=function(e,t){return fn(e||[],t||[],Qt)},n.zipWith=ya,n.entries=cs,n.entriesIn=ds,n.extend=Za,n.extendWith=Qa,Si(n,n),n.add=Ms,n.attempt=bs,n.camelCase=ps,n.capitalize=vi,n.ceil=Is,n.clamp=function(e,t,n){return n===G&&(n=t,t=G),n!==G&&(n=(n=si(n))==n?n:0),t!==G&&(t=(t=si(t))==t?t:0),dt(si(e),t,n)},n.clone=function(e){return pt(e,4)},n.cloneDeep=function(e){return pt(e,5)},n.cloneDeepWith=function(e,t){return pt(e,5,t="function"==typeof t?t:G)},n.cloneWith=function(e,t){return pt(e,4,t="function"==typeof t?t:G)},n.conformsTo=function(e,t){return null==t||ft(e,t,pi(t))},n.deburr=mi,n.defaultTo=function(e,t){return null==e||e!=e?t:e},n.divide=As,n.endsWith=function(e,t,n){e=ui(e),t=sn(t);var r=e.length;r=n=n===G?r:dt(oi(n),0,r);return 0<=(n-=t.length)&&e.slice(n,r)==t},n.eq=qr,n.escape=function(e){return(e=ui(e))&&Q.test(e)?e.replace(K,nt):e},n.escapeRegExp=function(e){return(e=ui(e))&&se.test(e)?e.replace(ae,"\\$&"):e},n.every=function(e,t,n){var r=ja(e)?c:vt;return n&&pr(e,t,n)&&(t=G),r(e,rr(t,3))},n.find=xa,n.findIndex=Or,n.findKey=function(e,t){return C(e,rr(t,3),bt)},n.findLast=Sa,n.findLastIndex=_r,n.findLastKey=function(e,t){return C(e,rr(t,3),xt)},n.floor=Ps,n.forEach=Tr,n.forEachRight=Vr,n.forIn=function(e,t){return null==e?e:Fo(e,rr(t,3),fi)},n.forInRight=function(e,t){return null==e?e:Go(e,rr(t,3),fi)},n.forOwn=function(e,t){return e&&bt(e,rr(t,3))},n.forOwnRight=function(e,t){return e&&xt(e,rr(t,3))},n.get=ci,n.gt=Va,n.gte=Ba,n.has=function(e,t){return null!=e&&sr(e,t,Lt)},n.hasIn=di,n.head=Rr,n.identity=bi,n.includes=function(e,t,n,r){return e=Hr(e)?e:gi(e),n=n&&!r?oi(n):0,r=e.length,0>n&&(n=vo(r+n,0)),ti(e)?n<=r&&-1<e.indexOf(t,n):!!r&&-1<x(e,t,n)},n.indexOf=function(e,t,n){var r=null==e?0:e.length;return r?(0>(n=null==n?0:oi(n))&&(n=vo(r+n,0)),x(e,t,n)):-1},n.inRange=function(e,t,n){return t=ii(t),n===G?(n=t,t=0):n=ii(n),(e=si(e))>=mo(t,n)&&e<vo(t,n)},n.invoke=os,n.isArguments=za,n.isArray=ja,n.isArrayBuffer=Fa,n.isArrayLike=Hr,n.isArrayLikeObject=Wr,n.isBoolean=function(e){return!0===e||!1===e||Qr(e)&&"[object Boolean]"==Ot(e)},n.isBuffer=Ga,n.isDate=Ua,n.isElement=function(e){return Qr(e)&&1===e.nodeType&&!ei(e)},n.isEmpty=function(e){if(null==e)return!0;if(Hr(e)&&(ja(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||$a(e)||za(e)))return!e.length;var t=Ko(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(gr(e))return!Tt(e).length;for(var n in e)if(ji.call(e,n))return!1;return!0},n.isEqual=function(e,t){return It(e,t)},n.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:G)?n(e,t):G;return r===G?It(e,t,G,n):!!r},n.isError=$r,n.isFinite=function(e){return"number"==typeof e&&fo(e)},n.isFunction=Xr,n.isInteger=Yr,n.isLength=Kr,n.isMap=qa,n.isMatch=function(e,t){return e===t||At(e,t,or(t))},n.isMatchWith=function(e,t,n){return n="function"==typeof n?n:G,At(e,t,or(t),n)},n.isNaN=function(e){return Jr(e)&&e!=+e},n.isNative=function(e){if(Zo(e))throw new Di("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pt(e)},n.isNil=function(e){return null==e},n.isNull=function(e){return null===e},n.isNumber=Jr,n.isObject=Zr,n.isObjectLike=Qr,n.isPlainObject=ei,n.isRegExp=Ha,n.isSafeInteger=function(e){return Yr(e)&&-9007199254740991<=e&&9007199254740991>=e},n.isSet=Wa,n.isString=ti,n.isSymbol=ni,n.isTypedArray=$a,n.isUndefined=function(e){return e===G},n.isWeakMap=function(e){return Qr(e)&&"[object WeakMap]"==Ko(e)},n.isWeakSet=function(e){return Qr(e)&&"[object WeakSet]"==Ot(e)},n.join=function(e,t){return null==e?"":ho.call(e,t)},n.kebabCase=fs,n.last=Dr,n.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;if(n!==G&&(i=0>(i=oi(n))?vo(r+i,0):mo(i,r-1)),t==t){for(n=i+1;n--&&e[n]!==t;);e=n}else e=b(e,E,i,!0);return e},n.lowerCase=hs,n.lowerFirst=gs,n.lt=Xa,n.lte=Ya,n.max=function(e){return e&&e.length?mt(e,bi,_t):G},n.maxBy=function(e,t){return e&&e.length?mt(e,rr(t,2),_t):G},n.mean=function(e){return w(e,bi)},n.meanBy=function(e,t){return w(e,rr(t,2))},n.min=function(e){return e&&e.length?mt(e,bi,Vt):G},n.minBy=function(e,t){return e&&e.length?mt(e,rr(t,2),Vt):G},n.stubArray=Oi,n.stubFalse=_i,n.stubObject=function(){return{}},n.stubString=function(){return""},n.stubTrue=function(){return!0},n.multiply=ks,n.nth=function(e,t){return e&&e.length?Gt(e,oi(t)):G},n.noConflict=function(){return Ue._===this&&(Ue._=Hi),this},n.noop=Ei,n.now=Ra,n.pad=function(e,t,n){e=ui(e);var r=(t=oi(t))?j(e):0;return!t||r>=t?e:jn(uo(t=(t-r)/2),n)+e+jn(lo(t),n)},n.padEnd=function(e,t,n){e=ui(e);var r=(t=oi(t))?j(e):0;return t&&r<t?e+jn(t-r,n):e},n.padStart=function(e,t,n){e=ui(e);var r=(t=oi(t))?j(e):0;return t&&r<t?jn(t-r,n)+e:e},n.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Co(ui(e).replace(ue,""),t||0)},n.random=function(e,t,n){if(n&&"boolean"!=typeof n&&pr(e,t,n)&&(t=n=G),n===G&&("boolean"==typeof t?(n=t,t=G):"boolean"==typeof e&&(n=e,e=G)),e===G&&t===G?(e=0,t=1):(e=ii(e),t===G?(t=e,e=0):t=ii(t)),e>t){var r=e;e=t,t=r}return n||e%1||t%1?(n=bo(),mo(e+n*(t-e+ze("1e-"+((n+"").length-1))),t)):$t(e,t)},n.reduce=function(e,t,n){var r=ja(e)?v:L,i=3>arguments.length;return r(e,rr(t,4),n,i,zo)},n.reduceRight=function(e,t,n){var r=ja(e)?m:L,i=3>arguments.length;return r(e,rr(t,4),n,i,jo)},n.repeat=function(e,t,n){return t=(n?pr(e,t,n):t===G)?1:oi(t),Xt(ui(e),t)},n.replace=function(){var e=arguments,t=ui(e[0]);return 3>e.length?t:t.replace(e[1],e[2])},n.result=function(e,t,n){var r=-1,i=(t=vn(t,e)).length;for(i||(i=1,e=G);++r<i;){var o=null==e?G:e[xr(t[r])];o===G&&(r=i,o=n),e=Xr(o)?o.call(e):o}return e},n.round=Ts,n.runInContext=e,n.sample=function(e){return(ja(e)?qe:Kt)(e)},n.size=function(e){if(null==e)return 0;if(Hr(e))return ti(e)?j(e):e.length;var t=Ko(e);return"[object Map]"==t||"[object Set]"==t?e.size:Tt(e).length},n.snakeCase=vs,n.some=function(e,t,n){var r=ja(e)?y:tn;return n&&pr(e,t,n)&&(t=G),r(e,rr(t,3))},n.sortedIndex=function(e,t){return nn(e,t)},n.sortedIndexBy=function(e,t,n){return rn(e,t,rr(n,2))},n.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=nn(e,t);if(r<n&&qr(e[r],t))return r}return-1},n.sortedLastIndex=function(e,t){return nn(e,t,!0)},n.sortedLastIndexBy=function(e,t,n){return rn(e,t,rr(n,2),!0)},n.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=nn(e,t,!0)-1;if(qr(e[n],t))return n}return-1},n.startCase=ms,n.startsWith=function(e,t,n){return e=ui(e),n=null==n?0:dt(oi(n),0,e.length),t=sn(t),e.slice(n,n+t.length)==t},n.subtract=Vs,n.sum=function(e){return e&&e.length?R(e,bi):0},n.sumBy=function(e,t){return e&&e.length?R(e,rr(t,2)):0},n.template=function(e,t,r){var i=n.templateSettings;r&&pr(e,t,r)&&(t=G),e=ui(e),t=Qa({},t,i,Xn);var o,a,s=pi(r=Qa({},t.imports,i.imports,Xn)),l=M(r,s),u=0;r=t.interpolate||we;var c="__p+='";r=Ai((t.escape||we).source+"|"+r.source+"|"+(r===te?ve:we).source+"|"+(t.evaluate||we).source+"|$","g");var d="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(e.replace(r,(function(t,n,r,i,s,l){return r||(r=i),c+=e.slice(u,l).replace(Oe,k),n&&(o=!0,c+="'+__e("+n+")+'"),s&&(a=!0,c+="';"+s+";\n__p+='"),r&&(c+="'+((__t=("+r+"))==null?'':__t)+'"),u=l+t.length,t})),c+="';",(t=t.variable)||(c="with(obj){"+c+"}"),c=(a?c.replace(W,""):c).replace($,"$1").replace(X,"$1;"),c="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(a?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}",(t=bs((function(){return Ni(s,d+"return "+c).apply(G,l)}))).source=c,$r(t))throw t;return t},n.times=function(e,t){if(1>(e=oi(e))||9007199254740991<e)return[];var n=4294967295,r=mo(e,4294967295);for(e-=4294967295,r=D(r,t=rr(t));++n<e;)t(n);return r},n.toFinite=ii,n.toInteger=oi,n.toLength=ai,n.toLower=function(e){return ui(e).toLowerCase()},n.toNumber=si,n.toSafeInteger=function(e){return e?dt(oi(e),-9007199254740991,9007199254740991):0===e?e:0},n.toString=ui,n.toUpper=function(e){return ui(e).toUpperCase()},n.trim=function(e,t,n){return(e=ui(e))&&(n||t===G)?e.replace(le,""):e&&(t=sn(t))?mn(e=F(e),t=A(e,n=F(t)),n=P(e,n)+1).join(""):e},n.trimEnd=function(e,t,n){return(e=ui(e))&&(n||t===G)?e.replace(ce,""):e&&(t=sn(t))?mn(e=F(e),0,t=P(e,F(t))+1).join(""):e},n.trimStart=function(e,t,n){return(e=ui(e))&&(n||t===G)?e.replace(ue,""):e&&(t=sn(t))?mn(e=F(e),t=A(e,F(t))).join(""):e},n.truncate=function(e,t){var n=30,r="...";if(Zr(t)){var i="separator"in t?t.separator:i;n="length"in t?oi(t.length):n,r="omission"in t?sn(t.omission):r}var o=(e=ui(e)).length;if(Ie.test(e)){var a=F(e);o=a.length}if(n>=o)return e;if(1>(o=n-j(r)))return r;if(n=a?mn(a,0,o).join(""):e.slice(0,o),i===G)return n+r;if(a&&(o+=n.length-o),Ha(i)){if(e.slice(o).search(i)){var s=n;for(i.global||(i=Ai(i.source,ui(me.exec(i))+"g")),i.lastIndex=0;a=i.exec(s);)var l=a.index;n=n.slice(0,l===G?o:l)}}else e.indexOf(sn(i),o)!=o&&(-1<(i=n.lastIndexOf(i))&&(n=n.slice(0,i)));return n+r},n.unescape=function(e){return(e=ui(e))&&Z.test(e)?e.replace(Y,rt):e},n.uniqueId=function(e){var t=++Fi;return ui(e)+t},n.upperCase=ys,n.upperFirst=Cs,n.each=Tr,n.eachRight=Vr,n.first=Rr,Si(n,function(){var e={};return bt(n,(function(t,r){ji.call(n.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),n.VERSION="4.17.4",l("bind bindKey curry curryRight partial partialRight".split(" "),(function(e){n[e].placeholder=n})),l(["drop","take"],(function(e,t){_e.prototype[e]=function(n){n=n===G?1:vo(oi(n),0);var r=this.__filtered__&&!t?new _e(this):this.clone();return r.__filtered__?r.__takeCount__=mo(n,r.__takeCount__):r.__views__.push({size:mo(n,4294967295),type:e+(0>r.__dir__?"Right":"")}),r},_e.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),l(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;_e.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:rr(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),l(["head","last"],(function(e,t){var n="take"+(t?"Right":"");_e.prototype[e]=function(){return this[n](1).value()[0]}})),l(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");_e.prototype[e]=function(){return this.__filtered__?new _e(this):this[n](1)}})),_e.prototype.compact=function(){return this.filter(bi)},_e.prototype.find=function(e){return this.filter(e).head()},_e.prototype.findLast=function(e){return this.reverse().find(e)},_e.prototype.invokeMap=Yt((function(e,t){return"function"==typeof e?new _e(this):this.map((function(n){return Nt(n,e,t)}))})),_e.prototype.reject=function(e){return this.filter(Ur(rr(e)))},_e.prototype.slice=function(e,t){e=oi(e);var n=this;return n.__filtered__&&(0<e||0>t)?new _e(n):(0>e?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==G&&(n=0>(t=oi(t))?n.dropRight(-t):n.take(t-e)),n)},_e.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},_e.prototype.toArray=function(){return this.take(4294967295)},bt(_e.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=n[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(n.prototype[t]=function(){function t(e){return e=o.apply(n,g([e],l)),i&&p?e[0]:e}var s=this.__wrapped__,l=i?[1]:arguments,u=s instanceof _e,c=l[0],d=u||ja(s);d&&r&&"function"==typeof c&&1!=c.length&&(u=d=!1);var p=this.__chain__,f=!!this.__actions__.length;c=a&&!p,u=u&&!f;return!a&&d?(s=u?s:new _e(this),(s=e.apply(s,l)).__actions__.push({func:kr,args:[t],thisArg:G}),new _(s,p)):c&&u?e.apply(this,l):(s=this.thru(t),c?i?s.value()[0]:s.value():s)})})),l("pop push shift sort splice unshift".split(" "),(function(e){var t=Ti[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(ja(n)?n:[],e)}return this[r]((function(n){return t.apply(ja(n)?n:[],e)}))}})),bt(_e.prototype,(function(e,t){var r=n[t];if(r){var i=r.name+"";(Do[i]||(Do[i]=[])).push({name:t,func:r})}})),Do[Tn(G,2).name]=[{name:"wrapper",func:G}],_e.prototype.clone=function(){var e=new _e(this.__wrapped__);return e.__actions__=wn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=wn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=wn(this.__views__),e},_e.prototype.reverse=function(){if(this.__filtered__){var e=new _e(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},_e.prototype.value=function(){var e,t=this.__wrapped__.value(),n=this.__dir__,r=ja(t),i=0>n,o=r?t.length:0;e=o;for(var a=this.__views__,s=0,l=-1,u=a.length;++l<u;){var c=a[l],d=c.size;switch(c.type){case"drop":s+=d;break;case"dropRight":e-=d;break;case"take":e=mo(e,s+d);break;case"takeRight":s=vo(s,e-d)}}if(a=(e={start:s,end:e}).start,e=(s=e.end)-a,a=i?s:a-1,l=(s=this.__iteratees__).length,u=0,c=mo(e,this.__takeCount__),!r||!i&&o==e&&c==e)return dn(t,this.__actions__);r=[];e:for(;e--&&u<c;){for(i=-1,o=t[a+=n];++i<l;){d=(p=s[i]).type;var p=(0,p.iteratee)(o);if(2==d)o=p;else if(!p){if(1==d)continue e;break e}}r[u++]=o}return r},n.prototype.at=Ca,n.prototype.chain=function(){return Pr(this)},n.prototype.commit=function(){return new _(this.value(),this.__chain__)},n.prototype.next=function(){this.__values__===G&&(this.__values__=ri(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?G:this.__values__[this.__index__++]}},n.prototype.plant=function(e){for(var t,n=this;n instanceof r;){var i=wr(n);i.__index__=0,i.__values__=G,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},n.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof _e?(this.__actions__.length&&(e=new _e(this)),(e=e.reverse()).__actions__.push({func:kr,args:[Mr],thisArg:G}),new _(e,this.__chain__)):this.thru(Mr)},n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=function(){return dn(this.__wrapped__,this.__actions__)},n.prototype.first=n.prototype.head,no&&(n.prototype[no]=function(){return this}),n}();Ue._=it,void 0===(r=function(){return it}.call(t,n,t,e))||(e.exports=r)}.call(this)},300:t=>{"use strict";t.exports=e},799:e=>{"use strict";e.exports=t}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i(317)})()));