From b6af6994cb2b5d5ca0e77c7f3b78420a005c1462 Mon Sep 17 00:00:00 2001 From: Drew Banin Date: Tue, 30 Oct 2018 11:00:25 -0400 Subject: [PATCH] add tags to docs site --- dbt/include/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt/include/index.html b/dbt/include/index.html index cfcb131e18f..e8dfb8f35a7 100644 --- a/dbt/include/index.html +++ b/dbt/include/index.html @@ -74,7 +74,7 @@ * @author Feross Aboukhadijeh * @license MIT */ -e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r>>6-2*i);return n}};e.exports=n}()},function(e,t,n){!function(){var t=n(83),r=n(39).utf8,i=n(82),o=n(39).bin,a=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?o.stringToBytes(e):r.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var s=t.bytesToWords(e),l=8*e.length,u=1732584193,c=-271733879,d=-1732584194,p=271733878,f=0;f>>24)|4278255360&(s[f]<<24|s[f]>>>8);s[l>>>5]|=128<>>9<<4)]=l;var h=a._ff,g=a._gg,m=a._hh,v=a._ii;for(f=0;f>>0,c=c+y>>>0,d=d+x>>>0,p=p+w>>>0}return t.endian([u,c,d,p])};a._ff=function(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+(i>>>0)+a;return(s<>>32-o)+t},a._gg=function(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+(i>>>0)+a;return(s<>>32-o)+t},a._hh=function(e,t,n,r,i,o,a){var s=e+(t^n^r)+(i>>>0)+a;return(s<>>32-o)+t},a._ii=function(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+(i>>>0)+a;return(s<>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var r=t.wordsToBytes(a(e,n));return n&&n.asBytes?r:n&&n.asString?o.bytesToString(r):t.bytesToHex(r)}}()},function(e,t,n){const r=n(9),i=n(84);r.module("dbt").factory("trackingService",["$location","selectorService","$rootScope",function(e,t,n){var r={initialized:!1,snowplow:null,previous_url:null};function o(){var t=e.absUrl(),n=r.__fuzz_url(t,!0);if(_.each(e.search(),function(e,t){n+="&"+t+"=1"}),r.previous_url)var i=r.previous_url;else i="";return r.snowplow("setCustomUrl",n),r.snowplow("setReferrerUrl",i),n}return r.init=function(e){r.initialized||(r.initialized=!0,!0===e.track&&r.turn_on_tracking(e.project_id,e.user_id))},r.turn_on_tracking=function(e,t){!function(e,t,n,r,i,o,a){e[i]||(e.GlobalSnowplowNamespace=e.GlobalSnowplowNamespace||[],e.GlobalSnowplowNamespace.push(i),e[i]=function(){(e[i].q=e[i].q||[]).push(arguments)},e[i].q=e[i].q||[],o=t.createElement(n),a=t.getElementsByTagName(n)[0],o.async=1,o.src="//d1fc8wv8zag5ca.cloudfront.net/2.9.0/sp.js",a.parentNode.insertBefore(o,a))}(window,document,"script",0,"snowplow"),r.snowplow=window.snowplow,r.snowplow("newTracker","sp","fishtownanalytics.sinter-collect.com",{appId:"dbt-docs",discoverRootDomain:!0,forceSecureTracker:!0,respectDoNotTrack:!0,userFingerprint:!1,contexts:{webPage:!0}}),t&&r.snowplow("setUserId",t),r.snowplow("enableActivityTracking",30,30),r.track_pageview(),r.track_project_identify(e)},r.__fuzz_url=function(e,t){var n=e,r=e.match(/[a-zA-Z0-9_]+\.[a-zA-Z0-9_]+\.[a-zA-Z0-9_]+/g);return r&&_.each(r,function(e){var t=i(e);n=n.replace(e,t)}),t&&(n=n.replace(/\?.*$/,"")+"?fuzzed=1"),n},r.track_pageview=function(t){if(r.snowplow){r.previous_url=o();var n=e.path().split("/"),i=n.length>1?n[1]:"";r.snowplow("trackPageView",i)}},r.track_event=function(e,t,n,i){r.snowplow&&(o(),r.snowplow("trackStructEvent","dbt-docs",e,t,n,i))},r.track_project_identify=function(e){r.track_event("identify","project_id",e)},r.track_graph_interaction=function(e,t){r.track_event("graph","interact",e,t)},r}])},function(e,t,n){n(14);const r=n(11);var i="+",o="+",a="*";angular.module("dbt").factory("selectorService",["$state",function(e){var t=["model"],n={include:"",exclude:"",packages:[],node_types:t,depth:1},s={view_node:null,selection:{clean:r.clone(n),dirty:r.clone(n)},options:{packages:[],node_types:t}};function l(e,t,n,r){r||(r=1);var i=e.predecessors(t);return i.concat(i.reduce(function(t,i){return r>=n&&void 0!==n?t:t.concat(l(e,i,n,r+1))},[]))}function u(e,t,n,r){r||(r=1);var i=e.successors(t);return i.concat(i.reduce(function(t,i){return r>=n&&void 0!==n?t:t.concat(u(e,i,n,r+1))},[]))}function c(e){return r.filter(r.uniq(e.split(" ")),function(e){return e.length>0})}function d(e){var t=!1,n=!1,r=0,a=e.length;return e.startsWith(i)&&(n=!0,r=1),e.endsWith(o)&&(t=!0,a-=1),{select_parents:n,select_children:t,qualified_node_name:e.substring(r,a).split("."),raw:e}}function p(e,t,n){var i=c(e),o=r.map(i,d),a=c(t);return{include:o,exclude:r.map(a,d),hops:n}}function f(e,t){for(var n=0;n0?" ":"")+i+n+o;return s.selection.dirty.exclude=a,s.updateSelection()},s.clearViewNode=function(){s.view_node=null},s.isDirty=function(){return!r.isEqual(s.selection.clean,s.selection.dirty)},s.updateSelection=function(){return s.selection.clean=r.clone(s.selection.dirty),s.selection.clean},s.parse_specs=p,s.get_nodes_by_qualified_name=h,s.select_nodes=function(e,t,n){n.include,n.exclude;var i,o=p(n.include,n.exclude,n.hops),a=r.values(t);i=0==o.include.length?[{nodes:e.nodes(),matched:[]}]:r.map(o.include,r.partial(g,e,a,n.hops));var s=r.map(o.exclude,r.partial(g,e,a,n.hops)),l=[],u=[];r.each(i,function(e){l=r.union(l,e.nodes),u=r.union(u,e.matches)}),r.each(s,function(e){l=r.difference(l,e.nodes),u=r.difference(u,e.matches)});var c=[];return r.each(l,function(e){var i=t[e],o=r.includes(n.packages,i.data.package_name),a=r.includes(n.node_types,i.data.resource_type);o&&a||c.push(i.data.unique_id)}),{nodes:r.difference(l,c),matched:u}},s.ancestors=l,s.descendents=u,s}])},function(e,t,n){n(14);const r=n(11),i=n(46);angular.module("dbt").factory("graph",["$state","$window","$q","selectorService","project","locationService",function(e,t,n,o,a,s){var l={vertical:{userPanningEnabled:!1,boxSelectionEnabled:!1,maxZoom:1.5},horizontal:{userPanningEnabled:!0,boxSelectionEnabled:!1,maxZoom:1,minZoom:.05}},u={none:{name:"null"},left_right:{name:"dagre",rankDir:"LR",rankSep:200,edgeSep:30,nodeSep:50},top_down:{name:"preset",positions:function(t){var n=e.params.unique_id;if(!n)return{x:0,y:0};var a=c.graph.pristine.dag,s=r.sortBy(o.ancestors(a,n,1)),l=r.sortBy(o.descendents(a,n,1)),u=r.partial(r.includes,s),d=r.partial(r.includes,l),p=a.filterNodes(u),f=a.filterNodes(d);return function(e,t,n,i){console.log("Getting position for ",i,". Primary: ",e);var o,a=100/(1+Math.max(t.length,n.length));if(e==i)return{x:0,y:0};if(r.includes(t,i))o={set:t,index:r.indexOf(t,i),factor:-1,type:"parent"};else{if(!r.includes(n,i))return{x:0,y:0};o={set:n,index:r.indexOf(n,i),factor:1,type:"child"}}var s=o.set.length;if("parent"==o.type)var l={x:(0+o.index)*a,y:-200-100*(s-o.index-1)};else var l={x:(0+o.index)*a,y:200+100*(s-o.index-1)};return l}(n,i.alg.topsort(p),i.alg.topsort(f).reverse(),t.data("id"))}}},c={loading:!0,loaded:n.defer(),graph_element:null,orientation:"sidebar",expanded:!1,graph:{options:l.vertical,pristine:{nodes:{},edges:{},dag:null},elements:[],layout:u.none,style:[{selector:"edge.vertical",style:{"curve-style":"unbundled-bezier","target-arrow-shape":"triangle-backcurve","target-arrow-color":"#027599","arrow-scale":1.5,"line-color":"#027599",width:3,"target-distance-from-node":"5px","source-endpoint":"0% 50%","target-endpoint":"0deg"}},{selector:"edge.horizontal",style:{"curve-style":"unbundled-bezier","target-arrow-shape":"triangle-backcurve","target-arrow-color":"#006f8a","arrow-scale":1.5,"target-distance-from-node":"10px","source-distance-from-node":"5px","line-color":"#006f8a",width:3,"source-endpoint":"50% 0%","target-endpoint":"270deg"}},{selector:"edge[selected=1]",style:{"line-color":"#bd6bb6","target-arrow-color":"#bd6bb6","z-index":1}},{selector:'node[display="none"]',style:{display:"none"}},{selector:"node.vertical",style:{"text-margin-x":"5px","background-color":"#0094b3","font-size":"16px",shape:"ellipse",color:"#fff",width:"5px",height:"5px",padding:"5px",content:"data(name)","font-weight":300,"text-valign":"center","text-halign":"right"}},{selector:"node.horizontal",style:{"background-color":"#0094b3","font-size":"24px",shape:"roundrectangle",color:"#fff",width:"label",height:"label",padding:"12px",content:"data(name)","font-weight":300,"font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif',"text-valign":"center","text-halign":"center",ghost:"yes","ghost-offset-x":"2px","ghost-offset-y":"4px","ghost-opacity":.5,"text-outline-color":"#000","text-outline-width":"1px","text-outline-opacity":.2}},{selector:"node[selected=1]",style:{"background-color":"#bd6bb6"}},{selector:"node.horizontal[selected=1]",style:{"background-color":"#88447d"}},{selector:"node.horizontal.dirty",style:{"background-color":"#919599"}}],ready:function(e){console.log("graph ready")}}};function d(e,t,n){var i=r.map(e,function(e){return c.graph.pristine.nodes[e]}),o=[];r.flatten(r.each(e,function(t){var n=c.graph.pristine.edges[t];r.each(n,function(t){r.includes(e,t.data.target)&&r.includes(e,t.data.source)&&o.push(t)})}));var a=r.compact(i).concat(r.compact(o));return r.each(c.graph.elements,function(e){e.data.display="none",e.data.selected=0,e.classes=n}),r.each(a,function(e){e.data.display="element",e.classes=n,t&&r.includes(t,e.data.unique_id)&&(e.data.selected=1)}),c.graph.elements=r.filter(a,function(e){return"element"==e.data.display}),e}function p(e,t,n){var r=c.graph.pristine.dag;if(r){var i=c.graph.pristine.nodes,a=o.select_nodes(r,i,e),s=n?a.matched:[];return d(a.nodes,s,t)}}return c.setGraphReady=function(e){c.loading=!1,c.loaded.resolve(),c.graph_element=e},c.ready=function(e){c.loaded.promise.then(function(){e(c)})},c.manifest={},c.packages=[],c.selected_node=null,c.getCanvasHeight=function(){return.8*t.innerHeight+"px"},a.ready(function(e){c.manifest=e,c.packages=r.uniq(r.map(c.manifest.nodes,"package_name")),r.each(r.filter(c.manifest.nodes,function(e){return r.includes(["model","seed"],e.resource_type)}),function(e){var t={group:"nodes",data:r.assign(e,{parent:r.initial(e.fqn).join("."),id:e.unique_id,is_group:"false"})};c.graph.pristine.nodes[e.unique_id]=t}),r.each(c.manifest.parent_map,function(e,t){r.each(e,function(e){var n=c.manifest.nodes[e],r=c.manifest.nodes[t];if("model"==n.resource_type&&"model"==r.resource_type){var i=n.unique_id+"|"+r.unique_id,o={group:"edges",data:{source:n.unique_id,target:r.unique_id,unique_id:i}},a=r.unique_id;c.graph.pristine.edges[a]||(c.graph.pristine.edges[a]=[]),c.graph.pristine.edges[a].push(o)}})});var t=new i.Graph({directed:!0});r.each(c.graph.pristine.nodes,function(e){t.setNode(e.data.unique_id,e.data.name)}),r.each(c.graph.pristine.edges,function(e){r.each(e,function(e){t.setEdge(e.data.source,e.data.target)})}),c.graph.pristine.dag=t,c.graph.elements=r.flatten(r.values(c.graph.pristine.nodes).concat(r.values(c.graph.pristine.edges))),d(t.nodes())}),c.hideGraph=function(){c.orientation="sidebar",c.expanded=!1},c.showVerticalGraph=function(e,t){c.orientation="sidebar",t&&(c.expanded=!0);var n=p(r.assign({},o.options,{include:"+"+e+"+",exclude:"",hops:1}),"vertical",!0);return c.graph.layout=u.top_down,c.graph.options=l.vertical,n},c.showFullGraph=function(e){c.orientation="fullscreen",c.expanded=!0;var t=r.assign({},o.options);e?(t.include="+"+e+"+",t.exclude=""):(t.include="",t.exclude="");var n=p(t,"horizontal",!0);return c.graph.layout=u.left_right,c.graph.options=l.horizontal,s.setState(t),n},c.updateGraph=function(e){c.orientation="fullscreen",c.expanded=!0;var t=p(e,"horizontal",!1);return c.graph.layout=u.left_right,c.graph.options=l.horizontal,s.setState(e),t},c.deselectNodes=function(){"fullscreen"==c.orientation&&c.graph_element.elements().data("selected",0)},c.selectNode=function(e){if("fullscreen"==c.orientation){c.graph.pristine.nodes[e];var t=c.graph.pristine.dag,n=r.indexBy(o.ancestors(t,e)),i=r.indexBy(o.descendents(t,e));n[e]=e,i[e]=e;var a=c.graph_element;r.each(c.graph.elements,function(t){var r=a.$id(t.data.id);n[t.data.source]&&n[t.data.target]?r.data("selected",1):i[t.data.source]&&i[t.data.target]?r.data("selected",1):t.data.unique_id==e?r.data("selected",1):r.data("selected",0)})}},c.markDirty=function(e){c.markAllClean(),r.each(e,function(e){c.graph_element.$id(e).addClass("dirty")})},c.markAllClean=function(){c.graph_element&&c.graph_element.elements().removeClass("dirty")},c}])},function(e,t){e.exports="data:image/svg+xml,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 96 32'%3E%3Cdefs%3E%3ClinearGradient id='linear-gradient' x1='62.352' y1='14.866' x2='120.295' y2='37.349' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23d72b58'/%3E%3Cstop offset='1' stop-color='%23ffa74d'/%3E%3C/linearGradient%3E%3ClinearGradient id='linear-gradient-2' x1='-7.833' y1='-7.751' x2='39.885' y2='39.967' xlink:href='%23linear-gradient'/%3E%3C/defs%3E%3Ctitle%3Edbt%3C/title%3E%3Crect width='96' height='32' fill='none'/%3E%3Cpath d='M53.344,4.361h3.747V22.937H53.876l-.532-1.9h-.185q-.186.231-.417.486l-.451.5c-.147.162-.285.309-.416.44a3.421,3.421,0,0,1-.289.266,3.839,3.839,0,0,1-1.041.335,7.829,7.829,0,0,1-1.6.15,4.685,4.685,0,0,1-3.332-1.087,4.5,4.5,0,0,1-1.087-1.92,11.336,11.336,0,0,1-.393-3.308,10.556,10.556,0,0,1,.543-3.6,5.3,5.3,0,0,1,1.469-2.279,5.974,5.974,0,0,1,4.095-1.272,11.561,11.561,0,0,1,1.793.127q.8.127,1.307.243Zm-5.39,12.191q0,2.453.763,3.216a1.825,1.825,0,0,0,.891.5,4.921,4.921,0,0,0,1.261.151,6.681,6.681,0,0,0,1.364-.14,6.1,6.1,0,0,0,1.111-.323V12.689q-.395-.047-1.006-.093t-1.215-.046a5.905,5.905,0,0,0-1.3.127,2.087,2.087,0,0,0-.925.452,2.624,2.624,0,0,0-.7,1.237A7.952,7.952,0,0,0,47.954,16.552Z' fill='%23222'/%3E%3Cpath d='M73.006,15.766a10.655,10.655,0,0,1-.59,3.828,5.406,5.406,0,0,1-1.562,2.3,5.1,5.1,0,0,1-1.8.914,9.72,9.72,0,0,1-2.684.312,14.656,14.656,0,0,1-2.6-.22,15.649,15.649,0,0,1-2-.474l-1.018.509h-.671V4.338h3.748V11.9h.185q.184-.207.428-.474t.474-.509c.154-.162.3-.312.439-.451a1.927,1.927,0,0,1,.324-.277,2.829,2.829,0,0,1,1.018-.359,8.278,8.278,0,0,1,1.781-.174,4.393,4.393,0,0,1,3.1.972,4.127,4.127,0,0,1,1.076,1.932A11.955,11.955,0,0,1,73.006,15.766Zm-3.794.555q0-2.475-.764-3.216a2.711,2.711,0,0,0-1.9-.532,9.887,9.887,0,0,0-1.631.127,8.091,8.091,0,0,0-1.1.243v7.2a7.461,7.461,0,0,0,.925.116q.6.046,1.272.046a5.99,5.99,0,0,0,1.307-.128,2.07,2.07,0,0,0,.937-.451,2.458,2.458,0,0,0,.706-1.2A7.934,7.934,0,0,0,69.212,16.321Z' fill='%23222'/%3E%3Cpath d='M83.7,12.689H80.093v5.76a3.736,3.736,0,0,0,.092.914,1.2,1.2,0,0,0,.3.566,1.047,1.047,0,0,0,.555.278,4.409,4.409,0,0,0,.856.069q.577,0,1.215-.046t.983-.092l-.278,2.544q-.6.162-1.515.313a12.544,12.544,0,0,1-2.024.15,6.216,6.216,0,0,1-1.828-.231,2.808,2.808,0,0,1-1.2-.706,2.78,2.78,0,0,1-.671-1.214,6.679,6.679,0,0,1-.208-1.781V12.689H74.541l.185-2.73h1.642V7.831l3.725-.694V9.959h4.141Z' fill='%23222'/%3E%3Cpath d='M85.546,25.2h9.41v.993h-9.41Z' fill='url(%23linear-gradient)'/%3E%3Cpath d='M25.682,18.722l0-.006-3.608-6.3a7.25,7.25,0,0,0-1.124-1.491h0A6.892,6.892,0,0,0,14.182,9.07a8.489,8.489,0,0,1,8.912,2.01,8.575,8.575,0,0,1,1.349,1.786l.807,1.409a5.415,5.415,0,0,1,.432-1l4.73-8.257a2.594,2.594,0,0,0-.419-3.216A2.54,2.54,0,0,0,26.8,1.383h0L18.617,6.152a5.358,5.358,0,0,1-5.4,0L5.032,1.383A2.644,2.644,0,0,0,3.693,1a2.639,2.639,0,0,0-1.851.805,2.593,2.593,0,0,0-.419,3.215l4.729,8.257a5.5,5.5,0,0,1,0,5.444L1.423,26.977a2.6,2.6,0,0,0,.419,3.217,2.536,2.536,0,0,0,3.189.422l8.188-4.769a5.258,5.258,0,0,1,.988-.436l-1.4-.813a8.231,8.231,0,0,1-3.105-3.145,8.9,8.9,0,0,1-.612-7.221,7.459,7.459,0,0,0,.7,5.376,6.7,6.7,0,0,0,2.573,2.6l6.248,3.64h0L26.8,30.616a2.537,2.537,0,0,0,3.19-.422,2.6,2.6,0,0,0,.419-3.217ZM27.414,2.957a1.01,1.01,0,0,1,1.437,0,1.032,1.032,0,0,1,0,1.449,1.01,1.01,0,0,1-1.437,0A1.03,1.03,0,0,1,27.414,2.957ZM4.421,4.406a1.01,1.01,0,0,1-1.437,0,1.032,1.032,0,0,1,0-1.449,1.01,1.01,0,0,1,1.437,0A1.03,1.03,0,0,1,4.421,4.406Zm0,24.636a1.01,1.01,0,0,1-1.437,0,1.032,1.032,0,0,1,0-1.449,1.009,1.009,0,0,1,1.437,0A1.03,1.03,0,0,1,4.421,29.042ZM18.928,16.4a2.158,2.158,0,0,0-3.639-1.032,2.2,2.2,0,0,0,0,3.1,2.14,2.14,0,0,0,1.023.572,3.016,3.016,0,0,1-2.55-.862,3.091,3.091,0,0,1,0-4.347,3.029,3.029,0,0,1,4.311,0A3.074,3.074,0,0,1,18.928,16.4Zm9.923,12.644a1.01,1.01,0,0,1-1.437,0,1.03,1.03,0,0,1,0-1.449,1.009,1.009,0,0,1,1.437,0A1.032,1.032,0,0,1,28.851,29.042Z' fill='url(%23linear-gradient-2)'/%3E%3C/svg%3E"},function(e,t,n){"use strict";const r=n(9),i=n(11),o=n(14),a=n(88);n(74),n(87),n(86),n(85),n(81),r.module("dbt").controller("MainController",["$scope","$route","$state","project","graph","selectorService","trackingService","locationService","$transitions",function(e,t,n,r,s,l,u,c,d){function p(t){e.model_uid=t;var n=r.node(t);n&&l.resetSelection(n)}function f(e){e&&setTimeout(function(){var t=o("*[data-nav-unique-id='"+e+"']");t.length&&t[0].scrollIntoView&&t[0].scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},1)}e.tree={database:{},project:{}},e.search={query:"",results:[],is_focused:!1},e.logo=a,e.model_uid=null,e.project={},o("body").bind("keydown",function(e){"t"==event.key&&"INPUT"!=event.target.tagName&&(console.log("Opening search"),o("#search").focus(),event.preventDefault())}),e.onSearchFocus=function(t,n){e.search.is_focused=n},e.clearSearch=function(){e.search.is_focused=!1,e.search.query="",e.search.results=[],o("#search").blur()},e.onSearchKeypress=function(t){console.log(t),"Escape"==t.key&&(e.clearSearch(),t.preventDefault())},r.getModelTree(n.params.unique_id,function(t){e.tree.database=t.database,e.tree.project=t.project,setTimeout(function(){f(e.model_uid)})}),d.onSuccess({},function(t,n){var i=t.router.globals.params,o=l.getViewNode(),a=o?o.unique_id:null,s=i.unique_id,c=!0;if(t.from().name==t.to().name&&a==s&&(c=!1),c&&i.unique_id){var d=r.updateSelected(i.unique_id);e.tree.database=d.database,e.tree.project=d.project,e.search.query="",console.log("updating selected model to: ",i),p(i.unique_id),setTimeout(function(){f(i.unique_id)})}c&&u.track_pageview()}),e.$watch("search.query",function(t){e.search.results=r.search(t)}),r.init(),r.ready(function(t){e.project=t,e.search.results=r.search("");var o=i.unique(i.pluck(i.values(t.nodes),"package_name"));l.init({packages:o}),p(n.params.unique_id);var a=c.parseState(n.params);a.show_graph&&s.ready(function(){i.assign(l.selection.dirty,a.selected);var e=l.updateSelection();s.updateGraph(e)});var d=t.metadata||{};u.init({track:d.send_anonymous_usage_stats,project_id:d.project_id,user_id:d.user_id})})}])},function(e,t,n){"use strict";n(9).module("dbt").controller("GraphCtrl",["$scope","$state","$window","graph","project","selectorService",function(e,t,n,r,i,o){e.graph=r.graph,e.graphService=r,e.graphRendered=function(e){r.setGraphReady(e)},e.$watch(function(){return t.params.unique_id},function(e,t){e&&e!=t&&i.find_by_id(e,function(e){"sidebar"==r.orientation?r.showVerticalGraph(e.name,!1):r.showFullGraph(e.name)}),e||o.clearViewNode()})}])},function(e,t,n){(e.exports=n(20)(!1)).push([e.i,"\ntd.hljs-ln-numbers {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n text-align: right;\n color: #ccc;\n padding-right: 20px;\n padding-left: 10px;\n\n vertical-align: top;\n}\n\n.nav-tabs li.nav-pull-right {\n flex: 1 0 auto;\n text-align: right;\n}\n\ntr.column-row-selected {\n\n}\n\ntd.column-expanded{\n padding: 0px !important;\n}\n\ntd.column-expanded > div {\n padding: 5px 10px;\n margin-left: 20px;\n height: 100%;\n\n border-left: 1px solid #ccc !important;\n}\n",""])},function(e,t,n){var r=n(91);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(19)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";const r=n(9),i=n(47),o=n(14);i.initHighlightingOnLoad(),i.initLineNumbersOnLoad(),n(92);const a=n(11);r.module("dbt").controller("ModelCtrl",["$scope","$state","$sce","project","$transitions","$anchorScroll","$location",function(e,t,n,r,s,l,u){function c(e){var t=i.highlight("sql",e,!0).value.replace(/^$/gm,"");return n.trustAsHtml(t)}e.model_uid=t.params.unique_id,e.tab=t.params.tab,e.project=r,e.copied=!1,e.highlighted={source:"",compiled:""},e.has_test=function(e,t){return-1!=a.pluck(e.tests,"short").indexOf(t)},e.has_more_info=function(e){var t=e.tests||[],n=e.description||"";return t.length||n.length},e.toggle_column_expanded=function(t){e.has_more_info(t)&&(t.expanded=!t.expanded)},e.get_columns=function(e){var t=a.chain(e.columns).values().sortBy("index").value();return a.each(t,function(e,t){e.index=t}),t},e.model={},r.ready(function(t){e.model=t.nodes[e.model_uid];e.highlighted.source=c(e.model.raw_sql),e.highlighted.compiled=c(e.model.injected_sql||"\n-- compiled SQL not found for this model\n"),o(".source-code").each(function(e,t){i.lineNumbersBlock(t)}),setTimeout(function(){l()},0)}),e.copy_to_clipboard=function(t){var n=document.createElement("textarea");n.value=t,n.setAttribute("readonly",""),n.style.position="absolute",n.style.left="-9999px",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),e.copied=!0,setTimeout(function(){e.$apply(function(){e.copied=!1})},500)}}])},function(e,t,n){(e.exports=n(20)(!1)).push([e.i,"\n\n.details-content {\n table-layout: fixed;\n}\n\n.detail-body {\n white-space: nowrap;\n overflow-x: scroll;\n}\n",""])},function(e,t,n){var r=n(94);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(19)(r,i);r.locals&&(e.exports=r.locals)},function(e,t){var n="/components/table_details/table_details.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'
\n
Details
\n
\n
\n
\n
\n
\n \x3c!--\n
\n
Details
\n
\n --\x3e\n
\n
\n
Details
\n
\n
\n
\n
{{ item.name }}
\n
{{ item.value }}
\n
\n
\n
Advanced
\n
\n Show\n Hide\n
\n
\n
\n
\n
\n \x3c!--\n
\n
Table
\n
\n --\x3e\n
\n
\n
Table
\n
\n
\n
\n
{{ item.label }}
\n
{{ item.value }}
\n
\n
\n
\n
\n
\n
\n
\n
\n')}]),e.exports=n},function(e,t,n){"use strict";const r=n(96);n(95);const i=n(11);angular.module("dbt").directive("tableDetails",["$sce","$filter",function(e,t){return{scope:{model:"="},templateUrl:r,link:function(e){function n(e,t){if(e<1&&(e*=1e6),isNaN(parseFloat(e))||!isFinite(e))return"-";void 0===t&&(t=0);var n=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,Math.floor(n))).toFixed(t)+" "+["bytes","kB","MB","GB","TB","PB"][n]}function r(e,n){return void 0===n&&(n=2),t("number")(100*e,n)+"%"}function o(e,n){return void 0===n&&(n=0),t("number")(e,n)}e.details=[],e.extended=[],e._show_expanded=!1,e.show_expanded=function(t){return void 0!==t&&(e._show_expanded=t),e._show_expanded},e.$watch("model",function(t){i.property(["metadata","type"])(t);e.details=function(e){var t=!e.metadata,n=e.metadata||{},r=[{name:"Owner",value:n.owner},{name:"Type",value:t?void 0:function(e){return"BASE TABLE"==e?{type:"table",name:"table"}:"LATE BINDING VIEW"==e?{type:"view",name:"late binding view"}:{type:e.toLowerCase(),name:e.toLowerCase()}}(n.type).name},{name:"Package",value:e.package_name},{name:"Relation",value:t?void 0:e.schema+"."+e.alias}];return i.filter(r,function(e){return void 0!==e.value})}(t),e.extended=function(e){var t={rows:o,max_varchar:o,pct_used:r,size:n},a=i.sortBy(i.values(e),"label");return i.each(a,function(e){var n=t[e.id];n&&(e.value=n(e.value),e.label=e.label.replace("Approximate","~"),e.label=e.label.replace("Utilization","Used"))}),a}(t.stats),e.show_extended=i.where(e.extended,{include:!0}).length>0})}}}])},function(e,t){var n="/components/search/search.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'
\n \n\n
\n
\n

\n {{ query }}\n {{ results.length }} search results\n

\n
\n
\n
\n
\n
\n \n\n
\n
\n \n
\n
\n

\n \n

\n

\n
\n
\n
\n Show {{ results.length - max_results }} more\n
\n
\n
\n
\n')}]),e.exports=n},function(e,t,n){"use strict";const r=n(98);angular.module("dbt").directive("docsSearch",["$sce",function(e){return{scope:{query:"=",results:"=",onSelect:"&"},replace:!0,templateUrl:r,link:function(t){t.max_results=20,t.show_all=!1,t.limit_search=function(e,n,r){return n$&')):e.trustAsHtml(n)},t.$watch("query",function(e,n){0==e.length&&(t.show_all=!1)})}}}])},function(e,t,n){(e.exports=n(20)(!1)).push([e.i,"\n.unselectable{\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n",""])},function(e,t,n){var r=n(100);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(19)(r,i);r.locals&&(e.exports=r.locals)},function(e,t){var n="/components/model_tree/model_tree_line.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'
  • \n\n \n \n \n \n \n \n {{name.start}}\n {{name.end}}\n \n \n\n \n \n \n \n \n \n {{name.start}}\n {{name.end}}\n \n \n\n\n
      \n \n
    \n
  • \n')}]),e.exports=n},function(e,t,n){"use strict";const r=n(102),i=n(11);n(101),angular.module("dbt").directive("modelTreeLine",[function(){return{scope:{item:"=",depth:"<"},link:function(e,t,n,r){e.depth||(e.depth=0);var o=e.item.name,a=i.last(o,15).join(""),s=i.initial(o,a.length).join("");e.name={name:o,start:s,end:a},e.name_start=s,e.name_end=a,e.toggle=function(e){e.active=!e.active},e.activate=function(e){e.active=!0},e.getIcon=function(e,t){return"#"+{header:{on:"icn-down",off:"icn-right"},schema:{on:"icn-tree-on",off:"icn-tree"},table:{on:"icn-doc-on",off:"icn-doc"},folder:{on:"icn-dir-on",off:"icn-dir"},file:{on:"icn-doc-on",off:"icn-doc"}}[e][t]},e.getClass=function(e){return{active:e.active,"menu-tree":"header"==e.type||"schema"==e.type||"folder"==e.type,"menu-main":"header"==e.type,"menu-node":"file"==e.type||"table"==e.type}}},replace:!0,templateUrl:r}}])},function(e,t){var n="/components/model_tree/model_tree.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n\n')}]),e.exports=n},function(e,t,n){"use strict";const r=n(104);angular.module("dbt").directive("modelTree",[function(){return{scope:{tree:"="},templateUrl:r,link:function(e){e.nav_selected="project"}}}])},function(e,t){e.exports="0.7.4"},function(e,t,n){var r=n(2),i=n(5),o=n(8).Graph;e.exports={debugOrdering:function(e){var t=i.buildLayerMatrix(e),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.each(e.nodes(),function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)}),r.each(e.edges(),function(e){n.setEdge(e.v,e.w,{},e.name)}),r.each(t,function(e,t){var i="layer"+t;n.setNode(i,{rank:"same"}),r.reduce(e,function(e,t){return n.setEdge(e,t,{style:"invis"}),t})}),n}}},function(e,t,n){"use strict";var r=n(2),i=n(8).Graph,o=n(5);function a(e,t){var n={};return r.reduce(t,function(t,i){var o=0,a=0,s=t.length,u=r.last(i);return r.each(i,function(t,c){var d=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),function(t){return e.node(t).dummy})}(e,t),p=d?e.node(d).order:s;(d||t===u)&&(r.each(i.slice(a,c+1),function(t){r.each(e.predecessors(t),function(r){var i=e.node(r),a=i.order;!(as)&&l(n,t,u)})})}return r.reduce(t,function(t,n){var o,a=-1,s=0;return r.each(n,function(r,l){if("border"===e.node(r).dummy){var u=e.predecessors(r);u.length&&(o=e.node(u[0]).order,i(n,s,l,a,o),s=l,a=o)}i(n,s,n.length,o,t.length)}),n}),n}function l(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function u(e,t,n){if(t>n){var i=t;t=n,n=i}return r.has(e[t],n)}function c(e,t,n,i){var o={},a={},s={};return r.each(t,function(e){r.each(e,function(e,t){o[e]=e,a[e]=e,s[e]=t})}),r.each(t,function(e){var t=-1;r.each(e,function(e){var l=i(e);if(l.length)for(var c=((l=r.sortBy(l,function(e){return s[e]})).length-1)/2,d=Math.floor(c),p=Math.ceil(c);d<=p;++d){var f=l[d];a[e]===e&&tn.barycenter?1:e?n.i-t.i:t.i-n.i}}(!!t)),d=o(l,s,d),r.each(a,function(e){d+=e.vs.length,l.push(e.vs),u+=e.barycenter*e.weight,c+=e.weight,d=o(l,s,d)});var p={vs:r.flatten(l,!0)};c&&(p.barycenter=u/c,p.weight=c);return p}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){var n={};return r.each(e,function(e,t){var i=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),r.each(t.edges(),function(e){var t=n[e.v],i=n[e.w];r.isUndefined(t)||r.isUndefined(i)||(i.indegree++,t.out.push(n[e.w]))}),function(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function i(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),r.each(o.in.reverse(),n(o)),r.each(o.out,i(o))}return r.chain(t).filter(function(e){return!e.merged}).map(function(e){return r.pick(e,["vs","i","barycenter","weight"])}).value()}(r.filter(n,function(e){return!e.indegree}))}},function(e,t,n){var r=n(2);e.exports=function(e,t){return r.map(t,function(t){var n=e.inEdges(t);if(n.length){var i=r.reduce(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}})}},function(e,t,n){var r=n(2),i=n(114),o=n(113),a=n(112);e.exports=function e(t,n,s,l){var u=t.children(n),c=t.node(n),d=c?c.borderLeft:void 0,p=c?c.borderRight:void 0,f={};d&&(u=r.filter(u,function(e){return e!==d&&e!==p}));var h=i(t,u);r.each(h,function(n){if(t.children(n.v).length){var i=e(t,n.v,s,l);f[n.v]=i,r.has(i,"barycenter")&&function(e,t){r.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}(n,i)}});var g=o(h,s);!function(e,t){r.each(e,function(e){e.vs=r.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}(g,f);var m=a(g,l);if(d&&(m.vs=r.flatten([d,m.vs,p],!0),t.predecessors(d).length)){var v=t.node(t.predecessors(d)[0]),b=t.node(t.predecessors(p)[0]);r.has(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+v.order+b.order)/(m.weight+2),m.weight+=2}return m}},function(e,t,n){"use strict";var r=n(2);function i(e,t,n){for(var i=r.zipObject(n,r.map(n,function(e,t){return t})),o=r.flatten(r.map(t,function(t){return r.chain(e.outEdges(t)).map(function(t){return{pos:i[t.w],weight:e.edge(t).weight}}).sortBy("pos").value()}),!0),a=1;a0;)t%2&&(n+=l[t+1]),l[t=t-1>>1]+=e.weight;u+=e.weight*n})),u}e.exports=function(e,t){for(var n=0,r=1;r=2),s=c.buildLayerMatrix(e);var m=o(e,s);ml||u>t[i].lim));o=i,i=r;for(;(i=e.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(e,t,i.v,i.w),a=o.path,s=o.lca,l=0,u=a[l],c=!0;n!==i.w;){if(r=e.node(n),c){for(;(u=a[l])!==s&&e.node(u).maxRankl.lim&&(u=l,c=!0);var d=r.filter(t.edges(),function(t){return c===v(e,e.node(t.v),u)&&c!==v(e,e.node(t.w),u)});return r.min(d,function(e){return o(t,e)})}function m(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),f(e),d(e,t),function(e,t){var n=r.find(e.nodes(),function(e){return!t.node(e).parent}),i=s(e,n);i=i.slice(1),r.each(i,function(n){var r=e.node(n).parent,i=t.edge(n,r),o=!1;i||(i=t.edge(r,n),o=!0),t.node(n).rank=t.node(r).rank+(o?i.minlen:-i.minlen)})}(e,t)}function v(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=c,c.initLowLimValues=f,c.initCutValues=d,c.calcCutValue=p,c.leaveEdge=h,c.enterEdge=g,c.exchangeEdges=m},function(e,t,n){"use strict";var r=n(23).longestPath,i=n(40),o=n(123);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":s(e);break;case"tight-tree":!function(e){r(e),i(e)}(e);break;case"longest-path":a(e);break;default:s(e)}};var a=r;function s(e){o(e)}},function(e,t,n){"use strict";var r=n(2),i=n(5);e.exports={run:function(e){e.graph().dummyChains=[],r.each(e.edges(),function(t){!function(e,t){var n,r,o,a=t.v,s=e.node(a).rank,l=t.w,u=e.node(l).rank,c=t.name,d=e.edge(t),p=d.labelRank;if(u===s+1)return;for(e.removeEdge(t),o=0,++s;s0;--l)if(r=t[l].dequeue()){i=i.concat(s(e,t,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,function(t){return e.outEdges(t.v,t.w)}),!0)};var a=r.constant(1);function s(e,t,n,i,o){var a=o?[]:void 0;return r.each(e.inEdges(i.v),function(r){var i=e.edge(r),s=e.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,l(t,n,s)}),r.each(e.outEdges(i.v),function(r){var i=e.edge(r),o=r.w,a=e.node(o);a.in-=i,l(t,n,a)}),e.removeNode(i.v),a}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},function(e,t,n){"use strict";var r=n(2),i=n(127);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?i(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},i={};return r.each(e.nodes(),function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.each(e.outEdges(a),function(e){r.has(n,e.w)?t.push(e):o(e.w)}),delete n[a])}),t}(e);r.each(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))})},undo:function(e){r.each(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}}},function(e,t,n){(function(e,r){var i; +e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r>>6-2*i);return n}};e.exports=n}()},function(e,t,n){!function(){var t=n(83),r=n(39).utf8,i=n(82),o=n(39).bin,a=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?o.stringToBytes(e):r.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var s=t.bytesToWords(e),l=8*e.length,u=1732584193,c=-271733879,d=-1732584194,p=271733878,f=0;f>>24)|4278255360&(s[f]<<24|s[f]>>>8);s[l>>>5]|=128<>>9<<4)]=l;var h=a._ff,g=a._gg,m=a._hh,v=a._ii;for(f=0;f>>0,c=c+y>>>0,d=d+x>>>0,p=p+w>>>0}return t.endian([u,c,d,p])};a._ff=function(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+(i>>>0)+a;return(s<>>32-o)+t},a._gg=function(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+(i>>>0)+a;return(s<>>32-o)+t},a._hh=function(e,t,n,r,i,o,a){var s=e+(t^n^r)+(i>>>0)+a;return(s<>>32-o)+t},a._ii=function(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+(i>>>0)+a;return(s<>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var r=t.wordsToBytes(a(e,n));return n&&n.asBytes?r:n&&n.asString?o.bytesToString(r):t.bytesToHex(r)}}()},function(e,t,n){const r=n(9),i=n(84);r.module("dbt").factory("trackingService",["$location","selectorService","$rootScope",function(e,t,n){var r={initialized:!1,snowplow:null,previous_url:null};function o(){var t=e.absUrl(),n=r.__fuzz_url(t,!0);if(_.each(e.search(),function(e,t){n+="&"+t+"=1"}),r.previous_url)var i=r.previous_url;else i="";return r.snowplow("setCustomUrl",n),r.snowplow("setReferrerUrl",i),n}return r.init=function(e){r.initialized||(r.initialized=!0,!0===e.track&&r.turn_on_tracking(e.project_id,e.user_id))},r.turn_on_tracking=function(e,t){!function(e,t,n,r,i,o,a){e[i]||(e.GlobalSnowplowNamespace=e.GlobalSnowplowNamespace||[],e.GlobalSnowplowNamespace.push(i),e[i]=function(){(e[i].q=e[i].q||[]).push(arguments)},e[i].q=e[i].q||[],o=t.createElement(n),a=t.getElementsByTagName(n)[0],o.async=1,o.src="//d1fc8wv8zag5ca.cloudfront.net/2.9.0/sp.js",a.parentNode.insertBefore(o,a))}(window,document,"script",0,"snowplow"),r.snowplow=window.snowplow,r.snowplow("newTracker","sp","fishtownanalytics.sinter-collect.com",{appId:"dbt-docs",discoverRootDomain:!0,forceSecureTracker:!0,respectDoNotTrack:!0,userFingerprint:!1,contexts:{webPage:!0}}),t&&r.snowplow("setUserId",t),r.snowplow("enableActivityTracking",30,30),r.track_pageview(),r.track_project_identify(e)},r.__fuzz_url=function(e,t){var n=e,r=e.match(/[a-zA-Z0-9_]+\.[a-zA-Z0-9_]+\.[a-zA-Z0-9_]+/g);return r&&_.each(r,function(e){var t=i(e);n=n.replace(e,t)}),t&&(n=n.replace(/\?.*$/,"")+"?fuzzed=1"),n},r.track_pageview=function(t){if(r.snowplow){r.previous_url=o();var n=e.path().split("/"),i=n.length>1?n[1]:"";r.snowplow("trackPageView",i)}},r.track_event=function(e,t,n,i){r.snowplow&&(o(),r.snowplow("trackStructEvent","dbt-docs",e,t,n,i))},r.track_project_identify=function(e){r.track_event("identify","project_id",e)},r.track_graph_interaction=function(e,t){r.track_event("graph","interact",e,t)},r}])},function(e,t,n){n(14);const r=n(11);var i="+",o="+",a="*",s={FQN:"fqn:",TAG:"tag:"};angular.module("dbt").factory("selectorService",["$state",function(e){var t={include:"",exclude:"",packages:[],tags:[null],depth:1},n={view_node:null,selection:{clean:r.clone(t),dirty:r.clone(t)},options:{packages:[],tags:[null]}};function l(e,t,n,r){r||(r=1);var i=e.predecessors(t);return i.concat(i.reduce(function(t,i){return r>=n&&void 0!==n?t:t.concat(l(e,i,n,r+1))},[]))}function u(e,t,n,r){r||(r=1);var i=e.successors(t);return i.concat(i.reduce(function(t,i){return r>=n&&void 0!==n?t:t.concat(u(e,i,n,r+1))},[]))}function c(e){return r.filter(r.uniq(e.split(" ")),function(e){return e.length>0})}function d(e){var t=!1,n=!1,r=0,a=e.length;e.startsWith(i)&&(n=!0,r=1),e.endsWith(o)&&(t=!0,a-=1);var l,u,c=e.substring(r,a);return c.startsWith(s.TAG)?(l=s.TAG,u=c.replace(l,"")):(l=s.FQN,u=c.replace(l,"").split(".")),{select_parents:n,select_children:t,selector_type:l,selector_value:u,raw:e}}function p(e,t,n){var i=c(e),o=r.map(i,d),a=c(t);return{include:o,exclude:r.map(a,d),hops:n}}function f(e,t){for(var n=0;n0?" ":"")+o+r+a;return n.selection.dirty.exclude=s,n.updateSelection()},n.clearViewNode=function(){n.view_node=null},n.isDirty=function(){return!r.isEqual(n.selection.clean,n.selection.dirty)},n.updateSelection=function(){return n.selection.clean=r.clone(n.selection.dirty),n.selection.clean},n.parse_specs=p,n.get_nodes_by_qualified_name=h,n.select_nodes=function(e,t,n){n.include,n.exclude;var i,o=p(n.include,n.exclude,n.hops),a=r.values(t);i=0==o.include.length?[{nodes:e.nodes(),matched:[]}]:r.map(o.include,r.partial(g,e,a,n.hops));var s=r.map(o.exclude,r.partial(g,e,a,n.hops)),l=[],u=[];r.each(i,function(e){l=r.union(l,e.nodes),u=r.union(u,e.matches)}),r.each(s,function(e){l=r.difference(l,e.nodes),u=r.difference(u,e.matches)});var c=[];return r.each(l,function(e){var i=t[e],o=r.includes(n.packages,i.data.package_name),a=r.intersection(n.tags,i.data.tags).length>0,s=r.includes(n.tags,null)&&0==i.data.tags.length;o&&(a||s)||c.push(i.data.unique_id)}),{nodes:r.difference(l,c),matched:u}},n.ancestors=l,n.descendents=u,n}])},function(e,t,n){n(14);const r=n(11),i=n(46);angular.module("dbt").factory("graph",["$state","$window","$q","selectorService","project","locationService",function(e,t,n,o,a,s){var l={vertical:{userPanningEnabled:!1,boxSelectionEnabled:!1,maxZoom:1.5},horizontal:{userPanningEnabled:!0,boxSelectionEnabled:!1,maxZoom:1,minZoom:.05}},u={none:{name:"null"},left_right:{name:"dagre",rankDir:"LR",rankSep:200,edgeSep:30,nodeSep:50},top_down:{name:"preset",positions:function(t){var n=e.params.unique_id;if(!n)return{x:0,y:0};var a=c.graph.pristine.dag,s=r.sortBy(o.ancestors(a,n,1)),l=r.sortBy(o.descendents(a,n,1)),u=r.partial(r.includes,s),d=r.partial(r.includes,l),p=a.filterNodes(u),f=a.filterNodes(d);return function(e,t,n,i){console.log("Getting position for ",i,". Primary: ",e);var o,a=100/(1+Math.max(t.length,n.length));if(e==i)return{x:0,y:0};if(r.includes(t,i))o={set:t,index:r.indexOf(t,i),factor:-1,type:"parent"};else{if(!r.includes(n,i))return{x:0,y:0};o={set:n,index:r.indexOf(n,i),factor:1,type:"child"}}var s=o.set.length;if("parent"==o.type)var l={x:(0+o.index)*a,y:-200-100*(s-o.index-1)};else var l={x:(0+o.index)*a,y:200+100*(s-o.index-1)};return l}(n,i.alg.topsort(p),i.alg.topsort(f).reverse(),t.data("id"))}}},c={loading:!0,loaded:n.defer(),graph_element:null,orientation:"sidebar",expanded:!1,graph:{options:l.vertical,pristine:{nodes:{},edges:{},dag:null},elements:[],layout:u.none,style:[{selector:"edge.vertical",style:{"curve-style":"unbundled-bezier","target-arrow-shape":"triangle-backcurve","target-arrow-color":"#027599","arrow-scale":1.5,"line-color":"#027599",width:3,"target-distance-from-node":"5px","source-endpoint":"0% 50%","target-endpoint":"0deg"}},{selector:"edge.horizontal",style:{"curve-style":"unbundled-bezier","target-arrow-shape":"triangle-backcurve","target-arrow-color":"#006f8a","arrow-scale":1.5,"target-distance-from-node":"10px","source-distance-from-node":"5px","line-color":"#006f8a",width:3,"source-endpoint":"50% 0%","target-endpoint":"270deg"}},{selector:"edge[selected=1]",style:{"line-color":"#bd6bb6","target-arrow-color":"#bd6bb6","z-index":1}},{selector:'node[display="none"]',style:{display:"none"}},{selector:"node.vertical",style:{"text-margin-x":"5px","background-color":"#0094b3","font-size":"16px",shape:"ellipse",color:"#fff",width:"5px",height:"5px",padding:"5px",content:"data(name)","font-weight":300,"text-valign":"center","text-halign":"right"}},{selector:"node.horizontal",style:{"background-color":"#0094b3","font-size":"24px",shape:"roundrectangle",color:"#fff",width:"label",height:"label",padding:"12px",content:"data(name)","font-weight":300,"font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif',"text-valign":"center","text-halign":"center",ghost:"yes","ghost-offset-x":"2px","ghost-offset-y":"4px","ghost-opacity":.5,"text-outline-color":"#000","text-outline-width":"1px","text-outline-opacity":.2}},{selector:"node[selected=1]",style:{"background-color":"#bd6bb6"}},{selector:"node.horizontal[selected=1]",style:{"background-color":"#88447d"}},{selector:"node.horizontal.dirty",style:{"background-color":"#919599"}}],ready:function(e){console.log("graph ready")}}};function d(e,t,n){var i=r.map(e,function(e){return c.graph.pristine.nodes[e]}),o=[];r.flatten(r.each(e,function(t){var n=c.graph.pristine.edges[t];r.each(n,function(t){r.includes(e,t.data.target)&&r.includes(e,t.data.source)&&o.push(t)})}));var a=r.compact(i).concat(r.compact(o));return r.each(c.graph.elements,function(e){e.data.display="none",e.data.selected=0,e.classes=n}),r.each(a,function(e){e.data.display="element",e.classes=n,t&&r.includes(t,e.data.unique_id)&&(e.data.selected=1)}),c.graph.elements=r.filter(a,function(e){return"element"==e.data.display}),e}function p(e,t,n){var r=c.graph.pristine.dag;if(r){var i=c.graph.pristine.nodes,a=o.select_nodes(r,i,e),s=n?a.matched:[];return d(a.nodes,s,t)}}return c.setGraphReady=function(e){c.loading=!1,c.loaded.resolve(),c.graph_element=e},c.ready=function(e){c.loaded.promise.then(function(){e(c)})},c.manifest={},c.packages=[],c.selected_node=null,c.getCanvasHeight=function(){return.8*t.innerHeight+"px"},a.ready(function(e){c.manifest=e,c.packages=r.uniq(r.map(c.manifest.nodes,"package_name")),r.each(r.filter(c.manifest.nodes,function(e){return r.includes(["model","seed"],e.resource_type)}),function(e){var t={group:"nodes",data:r.assign(e,{parent:r.initial(e.fqn).join("."),id:e.unique_id,is_group:"false"})};c.graph.pristine.nodes[e.unique_id]=t}),r.each(c.manifest.parent_map,function(e,t){r.each(e,function(e){var n=c.manifest.nodes[e],r=c.manifest.nodes[t];if("model"==n.resource_type&&"model"==r.resource_type){var i=n.unique_id+"|"+r.unique_id,o={group:"edges",data:{source:n.unique_id,target:r.unique_id,unique_id:i}},a=r.unique_id;c.graph.pristine.edges[a]||(c.graph.pristine.edges[a]=[]),c.graph.pristine.edges[a].push(o)}})});var t=new i.Graph({directed:!0});r.each(c.graph.pristine.nodes,function(e){t.setNode(e.data.unique_id,e.data.name)}),r.each(c.graph.pristine.edges,function(e){r.each(e,function(e){t.setEdge(e.data.source,e.data.target)})}),c.graph.pristine.dag=t,c.graph.elements=r.flatten(r.values(c.graph.pristine.nodes).concat(r.values(c.graph.pristine.edges))),d(t.nodes())}),c.hideGraph=function(){c.orientation="sidebar",c.expanded=!1},c.showVerticalGraph=function(e,t){c.orientation="sidebar",t&&(c.expanded=!0);var n=p(r.assign({},o.options,{include:"+"+e+"+",exclude:"",hops:1}),"vertical",!0);return c.graph.layout=u.top_down,c.graph.options=l.vertical,n},c.showFullGraph=function(e){c.orientation="fullscreen",c.expanded=!0;var t=r.assign({},o.options);e?(t.include="+"+e+"+",t.exclude=""):(t.include="",t.exclude="");var n=p(t,"horizontal",!0);return c.graph.layout=u.left_right,c.graph.options=l.horizontal,s.setState(t),n},c.updateGraph=function(e){c.orientation="fullscreen",c.expanded=!0;var t=p(e,"horizontal",!1);return c.graph.layout=u.left_right,c.graph.options=l.horizontal,s.setState(e),t},c.deselectNodes=function(){"fullscreen"==c.orientation&&c.graph_element.elements().data("selected",0)},c.selectNode=function(e){if("fullscreen"==c.orientation){c.graph.pristine.nodes[e];var t=c.graph.pristine.dag,n=r.indexBy(o.ancestors(t,e)),i=r.indexBy(o.descendents(t,e));n[e]=e,i[e]=e;var a=c.graph_element;r.each(c.graph.elements,function(t){var r=a.$id(t.data.id);n[t.data.source]&&n[t.data.target]?r.data("selected",1):i[t.data.source]&&i[t.data.target]?r.data("selected",1):t.data.unique_id==e?r.data("selected",1):r.data("selected",0)})}},c.markDirty=function(e){c.markAllClean(),r.each(e,function(e){c.graph_element.$id(e).addClass("dirty")})},c.markAllClean=function(){c.graph_element&&c.graph_element.elements().removeClass("dirty")},c}])},function(e,t){e.exports="data:image/svg+xml,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 96 32'%3E%3Cdefs%3E%3ClinearGradient id='linear-gradient' x1='62.352' y1='14.866' x2='120.295' y2='37.349' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23d72b58'/%3E%3Cstop offset='1' stop-color='%23ffa74d'/%3E%3C/linearGradient%3E%3ClinearGradient id='linear-gradient-2' x1='-7.833' y1='-7.751' x2='39.885' y2='39.967' xlink:href='%23linear-gradient'/%3E%3C/defs%3E%3Ctitle%3Edbt%3C/title%3E%3Crect width='96' height='32' fill='none'/%3E%3Cpath d='M53.344,4.361h3.747V22.937H53.876l-.532-1.9h-.185q-.186.231-.417.486l-.451.5c-.147.162-.285.309-.416.44a3.421,3.421,0,0,1-.289.266,3.839,3.839,0,0,1-1.041.335,7.829,7.829,0,0,1-1.6.15,4.685,4.685,0,0,1-3.332-1.087,4.5,4.5,0,0,1-1.087-1.92,11.336,11.336,0,0,1-.393-3.308,10.556,10.556,0,0,1,.543-3.6,5.3,5.3,0,0,1,1.469-2.279,5.974,5.974,0,0,1,4.095-1.272,11.561,11.561,0,0,1,1.793.127q.8.127,1.307.243Zm-5.39,12.191q0,2.453.763,3.216a1.825,1.825,0,0,0,.891.5,4.921,4.921,0,0,0,1.261.151,6.681,6.681,0,0,0,1.364-.14,6.1,6.1,0,0,0,1.111-.323V12.689q-.395-.047-1.006-.093t-1.215-.046a5.905,5.905,0,0,0-1.3.127,2.087,2.087,0,0,0-.925.452,2.624,2.624,0,0,0-.7,1.237A7.952,7.952,0,0,0,47.954,16.552Z' fill='%23222'/%3E%3Cpath d='M73.006,15.766a10.655,10.655,0,0,1-.59,3.828,5.406,5.406,0,0,1-1.562,2.3,5.1,5.1,0,0,1-1.8.914,9.72,9.72,0,0,1-2.684.312,14.656,14.656,0,0,1-2.6-.22,15.649,15.649,0,0,1-2-.474l-1.018.509h-.671V4.338h3.748V11.9h.185q.184-.207.428-.474t.474-.509c.154-.162.3-.312.439-.451a1.927,1.927,0,0,1,.324-.277,2.829,2.829,0,0,1,1.018-.359,8.278,8.278,0,0,1,1.781-.174,4.393,4.393,0,0,1,3.1.972,4.127,4.127,0,0,1,1.076,1.932A11.955,11.955,0,0,1,73.006,15.766Zm-3.794.555q0-2.475-.764-3.216a2.711,2.711,0,0,0-1.9-.532,9.887,9.887,0,0,0-1.631.127,8.091,8.091,0,0,0-1.1.243v7.2a7.461,7.461,0,0,0,.925.116q.6.046,1.272.046a5.99,5.99,0,0,0,1.307-.128,2.07,2.07,0,0,0,.937-.451,2.458,2.458,0,0,0,.706-1.2A7.934,7.934,0,0,0,69.212,16.321Z' fill='%23222'/%3E%3Cpath d='M83.7,12.689H80.093v5.76a3.736,3.736,0,0,0,.092.914,1.2,1.2,0,0,0,.3.566,1.047,1.047,0,0,0,.555.278,4.409,4.409,0,0,0,.856.069q.577,0,1.215-.046t.983-.092l-.278,2.544q-.6.162-1.515.313a12.544,12.544,0,0,1-2.024.15,6.216,6.216,0,0,1-1.828-.231,2.808,2.808,0,0,1-1.2-.706,2.78,2.78,0,0,1-.671-1.214,6.679,6.679,0,0,1-.208-1.781V12.689H74.541l.185-2.73h1.642V7.831l3.725-.694V9.959h4.141Z' fill='%23222'/%3E%3Cpath d='M85.546,25.2h9.41v.993h-9.41Z' fill='url(%23linear-gradient)'/%3E%3Cpath d='M25.682,18.722l0-.006-3.608-6.3a7.25,7.25,0,0,0-1.124-1.491h0A6.892,6.892,0,0,0,14.182,9.07a8.489,8.489,0,0,1,8.912,2.01,8.575,8.575,0,0,1,1.349,1.786l.807,1.409a5.415,5.415,0,0,1,.432-1l4.73-8.257a2.594,2.594,0,0,0-.419-3.216A2.54,2.54,0,0,0,26.8,1.383h0L18.617,6.152a5.358,5.358,0,0,1-5.4,0L5.032,1.383A2.644,2.644,0,0,0,3.693,1a2.639,2.639,0,0,0-1.851.805,2.593,2.593,0,0,0-.419,3.215l4.729,8.257a5.5,5.5,0,0,1,0,5.444L1.423,26.977a2.6,2.6,0,0,0,.419,3.217,2.536,2.536,0,0,0,3.189.422l8.188-4.769a5.258,5.258,0,0,1,.988-.436l-1.4-.813a8.231,8.231,0,0,1-3.105-3.145,8.9,8.9,0,0,1-.612-7.221,7.459,7.459,0,0,0,.7,5.376,6.7,6.7,0,0,0,2.573,2.6l6.248,3.64h0L26.8,30.616a2.537,2.537,0,0,0,3.19-.422,2.6,2.6,0,0,0,.419-3.217ZM27.414,2.957a1.01,1.01,0,0,1,1.437,0,1.032,1.032,0,0,1,0,1.449,1.01,1.01,0,0,1-1.437,0A1.03,1.03,0,0,1,27.414,2.957ZM4.421,4.406a1.01,1.01,0,0,1-1.437,0,1.032,1.032,0,0,1,0-1.449,1.01,1.01,0,0,1,1.437,0A1.03,1.03,0,0,1,4.421,4.406Zm0,24.636a1.01,1.01,0,0,1-1.437,0,1.032,1.032,0,0,1,0-1.449,1.009,1.009,0,0,1,1.437,0A1.03,1.03,0,0,1,4.421,29.042ZM18.928,16.4a2.158,2.158,0,0,0-3.639-1.032,2.2,2.2,0,0,0,0,3.1,2.14,2.14,0,0,0,1.023.572,3.016,3.016,0,0,1-2.55-.862,3.091,3.091,0,0,1,0-4.347,3.029,3.029,0,0,1,4.311,0A3.074,3.074,0,0,1,18.928,16.4Zm9.923,12.644a1.01,1.01,0,0,1-1.437,0,1.03,1.03,0,0,1,0-1.449,1.009,1.009,0,0,1,1.437,0A1.032,1.032,0,0,1,28.851,29.042Z' fill='url(%23linear-gradient-2)'/%3E%3C/svg%3E"},function(e,t,n){"use strict";const r=n(9),i=n(11),o=n(14),a=n(88);n(74),n(87),n(86),n(85),n(81),r.module("dbt").controller("MainController",["$scope","$route","$state","project","graph","selectorService","trackingService","locationService","$transitions",function(e,t,n,r,s,l,u,c,d){function p(t){e.model_uid=t;var n=r.node(t);n&&l.resetSelection(n)}function f(e){e&&setTimeout(function(){var t=o("*[data-nav-unique-id='"+e+"']");t.length&&t[0].scrollIntoView&&t[0].scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},1)}e.tree={database:{},project:{}},e.search={query:"",results:[],is_focused:!1},e.logo=a,e.model_uid=null,e.project={},o("body").bind("keydown",function(e){"t"==event.key&&"INPUT"!=event.target.tagName&&(console.log("Opening search"),o("#search").focus(),event.preventDefault())}),e.onSearchFocus=function(t,n){e.search.is_focused=n},e.clearSearch=function(){e.search.is_focused=!1,e.search.query="",e.search.results=[],o("#search").blur()},e.onSearchKeypress=function(t){console.log(t),"Escape"==t.key&&(e.clearSearch(),t.preventDefault())},r.getModelTree(n.params.unique_id,function(t){e.tree.database=t.database,e.tree.project=t.project,setTimeout(function(){f(e.model_uid)})}),d.onSuccess({},function(t,n){var i=t.router.globals.params,o=l.getViewNode(),a=o?o.unique_id:null,s=i.unique_id,c=!0;if(t.from().name==t.to().name&&a==s&&(c=!1),c&&i.unique_id){var d=r.updateSelected(i.unique_id);e.tree.database=d.database,e.tree.project=d.project,e.search.query="",console.log("updating selected model to: ",i),p(i.unique_id),setTimeout(function(){f(i.unique_id)})}c&&u.track_pageview()}),e.$watch("search.query",function(t){e.search.results=r.search(t)}),r.init(),r.ready(function(t){e.project=t,e.search.results=r.search("");var o=i.unique(i.pluck(i.values(t.nodes),"package_name")),a=[null];i.each(t.nodes,function(e){if("model"==e.resource_type){var t=e.tags;a=i.union(a,t)}}),l.init({packages:o,tags:a}),p(n.params.unique_id);var d=c.parseState(n.params);d.show_graph&&s.ready(function(){i.assign(l.selection.dirty,d.selected);var e=l.updateSelection();s.updateGraph(e)});var f=t.metadata||{};u.init({track:f.send_anonymous_usage_stats,project_id:f.project_id,user_id:f.user_id})})}])},function(e,t,n){"use strict";n(9).module("dbt").controller("GraphCtrl",["$scope","$state","$window","graph","project","selectorService",function(e,t,n,r,i,o){e.graph=r.graph,e.graphService=r,e.graphRendered=function(e){r.setGraphReady(e)},e.$watch(function(){return t.params.unique_id},function(e,t){e&&e!=t&&i.find_by_id(e,function(e){"sidebar"==r.orientation?r.showVerticalGraph(e.name,!1):r.showFullGraph(e.name)}),e||o.clearViewNode()})}])},function(e,t,n){(e.exports=n(20)(!1)).push([e.i,"\ntd.hljs-ln-numbers {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n text-align: right;\n color: #ccc;\n padding-right: 20px;\n padding-left: 10px;\n\n vertical-align: top;\n}\n\n.nav-tabs li.nav-pull-right {\n flex: 1 0 auto;\n text-align: right;\n}\n\ntr.column-row-selected {\n\n}\n\ntd.column-expanded{\n padding: 0px !important;\n}\n\ntd.column-expanded > div {\n padding: 5px 10px;\n margin-left: 20px;\n height: 100%;\n\n border-left: 1px solid #ccc !important;\n}\n",""])},function(e,t,n){var r=n(91);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(19)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";const r=n(9),i=n(47),o=n(14);i.initHighlightingOnLoad(),i.initLineNumbersOnLoad(),n(92);const a=n(11);r.module("dbt").controller("ModelCtrl",["$scope","$state","$sce","project","$transitions","$anchorScroll","$location",function(e,t,n,r,s,l,u){function c(e){var t=i.highlight("sql",e,!0).value.replace(/^$/gm,"");return n.trustAsHtml(t)}e.model_uid=t.params.unique_id,e.tab=t.params.tab,e.project=r,e.copied=!1,e.highlighted={source:"",compiled:""},e.has_test=function(e,t){return-1!=a.pluck(e.tests,"short").indexOf(t)},e.has_more_info=function(e){var t=e.tests||[],n=e.description||"";return t.length||n.length},e.toggle_column_expanded=function(t){e.has_more_info(t)&&(t.expanded=!t.expanded)},e.get_columns=function(e){var t=a.chain(e.columns).values().sortBy("index").value();return a.each(t,function(e,t){e.index=t}),t},e.model={},r.ready(function(t){e.model=t.nodes[e.model_uid];e.highlighted.source=c(e.model.raw_sql),e.highlighted.compiled=c(e.model.injected_sql||"\n-- compiled SQL not found for this model\n"),o(".source-code").each(function(e,t){i.lineNumbersBlock(t)}),setTimeout(function(){l()},0)}),e.copy_to_clipboard=function(t){var n=document.createElement("textarea");n.value=t,n.setAttribute("readonly",""),n.style.position="absolute",n.style.left="-9999px",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),e.copied=!0,setTimeout(function(){e.$apply(function(){e.copied=!1})},500)}}])},function(e,t,n){(e.exports=n(20)(!1)).push([e.i,"\n\n.details-content {\n table-layout: fixed;\n}\n\n.detail-body {\n white-space: nowrap;\n overflow-x: scroll;\n}\n",""])},function(e,t,n){var r=n(94);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(19)(r,i);r.locals&&(e.exports=r.locals)},function(e,t){var n="/components/table_details/table_details.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'
    \n
    Details
    \n
    \n
    \n
    \n
    \n
    \n \x3c!--\n
    \n
    Details
    \n
    \n --\x3e\n
    \n
    \n
    Tags
    \n
    \n {{ tag }} \n
    \n
    untagged
    \n
    \n
    \n
    {{ item.name }}
    \n
    {{ item.value }}
    \n
    \n
    \n
    Advanced
    \n
    \n Show\n Hide\n
    \n
    \n
    \n
    \n
    \n \x3c!--\n
    \n
    Table
    \n
    \n --\x3e\n
    \n
    \n
    {{ item.label }}
    \n
    {{ item.value }}
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n')}]),e.exports=n},function(e,t,n){"use strict";const r=n(96);n(95);const i=n(11);angular.module("dbt").directive("tableDetails",["$sce","$filter",function(e,t){return{scope:{model:"="},templateUrl:r,link:function(e){function n(e,t){if(e<1&&(e*=1e6),isNaN(parseFloat(e))||!isFinite(e))return"-";void 0===t&&(t=0);var n=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,Math.floor(n))).toFixed(t)+" "+["bytes","kB","MB","GB","TB","PB"][n]}function r(e,n){return void 0===n&&(n=2),t("number")(100*e,n)+"%"}function o(e,n){return void 0===n&&(n=0),t("number")(e,n)}e.details=[],e.extended=[],e._show_expanded=!1,e.show_expanded=function(t){return void 0!==t&&(e._show_expanded=t),e._show_expanded},e.$watch("model",function(t){i.property(["metadata","type"])(t);e.details=function(e){var t=!e.metadata,n=e.metadata||{},r=[{name:"Owner",value:n.owner},{name:"Type",value:t?void 0:function(e){return"BASE TABLE"==e?{type:"table",name:"table"}:"LATE BINDING VIEW"==e?{type:"view",name:"late binding view"}:{type:e.toLowerCase(),name:e.toLowerCase()}}(n.type).name},{name:"Package",value:e.package_name},{name:"Relation",value:t?void 0:e.schema+"."+e.alias}];return i.filter(r,function(e){return void 0!==e.value})}(t),e.extended=function(e){var t={rows:o,max_varchar:o,pct_used:r,size:n},a=i.sortBy(i.values(e),"label");return i.each(a,function(e){var n=t[e.id];n&&(e.value=n(e.value),e.label=e.label.replace("Approximate","~"),e.label=e.label.replace("Utilization","Used"))}),a}(t.stats),e.show_extended=i.where(e.extended,{include:!0}).length>0})}}}])},function(e,t){var n="/components/search/search.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'
    \n \n\n
    \n
    \n

    \n {{ query }}\n {{ results.length }} search results\n

    \n
    \n
    \n
    \n
    \n
    \n \n\n
    \n
    \n \n
    \n
    \n

    \n \n

    \n

    \n
    \n
    \n
    \n Show {{ results.length - max_results }} more\n
    \n
    \n
    \n
    \n')}]),e.exports=n},function(e,t,n){"use strict";const r=n(98);angular.module("dbt").directive("docsSearch",["$sce",function(e){return{scope:{query:"=",results:"=",onSelect:"&"},replace:!0,templateUrl:r,link:function(t){t.max_results=20,t.show_all=!1,t.limit_search=function(e,n,r){return n$&')):e.trustAsHtml(n)},t.$watch("query",function(e,n){0==e.length&&(t.show_all=!1)})}}}])},function(e,t,n){(e.exports=n(20)(!1)).push([e.i,"\n.unselectable{\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n",""])},function(e,t,n){var r=n(100);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(19)(r,i);r.locals&&(e.exports=r.locals)},function(e,t){var n="/components/model_tree/model_tree_line.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'
  • \n\n \n \n \n \n \n \n {{name.start}}\n {{name.end}}\n \n \n\n \n \n \n \n \n \n {{name.start}}\n {{name.end}}\n \n \n\n\n
      \n \n
    \n
  • \n')}]),e.exports=n},function(e,t,n){"use strict";const r=n(102),i=n(11);n(101),angular.module("dbt").directive("modelTreeLine",[function(){return{scope:{item:"=",depth:"<"},link:function(e,t,n,r){e.depth||(e.depth=0);var o=e.item.name,a=i.last(o,15).join(""),s=i.initial(o,a.length).join("");e.name={name:o,start:s,end:a},e.name_start=s,e.name_end=a,e.toggle=function(e){e.active=!e.active},e.activate=function(e){e.active=!0},e.getIcon=function(e,t){return"#"+{header:{on:"icn-down",off:"icn-right"},schema:{on:"icn-tree-on",off:"icn-tree"},table:{on:"icn-doc-on",off:"icn-doc"},folder:{on:"icn-dir-on",off:"icn-dir"},file:{on:"icn-doc-on",off:"icn-doc"}}[e][t]},e.getClass=function(e){return{active:e.active,"menu-tree":"header"==e.type||"schema"==e.type||"folder"==e.type,"menu-main":"header"==e.type,"menu-node":"file"==e.type||"table"==e.type}}},replace:!0,templateUrl:r}}])},function(e,t){var n="/components/model_tree/model_tree.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n\n')}]),e.exports=n},function(e,t,n){"use strict";const r=n(104);angular.module("dbt").directive("modelTree",[function(){return{scope:{tree:"="},templateUrl:r,link:function(e){e.nav_selected="project"}}}])},function(e,t){e.exports="0.7.4"},function(e,t,n){var r=n(2),i=n(5),o=n(8).Graph;e.exports={debugOrdering:function(e){var t=i.buildLayerMatrix(e),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.each(e.nodes(),function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)}),r.each(e.edges(),function(e){n.setEdge(e.v,e.w,{},e.name)}),r.each(t,function(e,t){var i="layer"+t;n.setNode(i,{rank:"same"}),r.reduce(e,function(e,t){return n.setEdge(e,t,{style:"invis"}),t})}),n}}},function(e,t,n){"use strict";var r=n(2),i=n(8).Graph,o=n(5);function a(e,t){var n={};return r.reduce(t,function(t,i){var o=0,a=0,s=t.length,u=r.last(i);return r.each(i,function(t,c){var d=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),function(t){return e.node(t).dummy})}(e,t),p=d?e.node(d).order:s;(d||t===u)&&(r.each(i.slice(a,c+1),function(t){r.each(e.predecessors(t),function(r){var i=e.node(r),a=i.order;!(as)&&l(n,t,u)})})}return r.reduce(t,function(t,n){var o,a=-1,s=0;return r.each(n,function(r,l){if("border"===e.node(r).dummy){var u=e.predecessors(r);u.length&&(o=e.node(u[0]).order,i(n,s,l,a,o),s=l,a=o)}i(n,s,n.length,o,t.length)}),n}),n}function l(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function u(e,t,n){if(t>n){var i=t;t=n,n=i}return r.has(e[t],n)}function c(e,t,n,i){var o={},a={},s={};return r.each(t,function(e){r.each(e,function(e,t){o[e]=e,a[e]=e,s[e]=t})}),r.each(t,function(e){var t=-1;r.each(e,function(e){var l=i(e);if(l.length)for(var c=((l=r.sortBy(l,function(e){return s[e]})).length-1)/2,d=Math.floor(c),p=Math.ceil(c);d<=p;++d){var f=l[d];a[e]===e&&tn.barycenter?1:e?n.i-t.i:t.i-n.i}}(!!t)),d=o(l,s,d),r.each(a,function(e){d+=e.vs.length,l.push(e.vs),u+=e.barycenter*e.weight,c+=e.weight,d=o(l,s,d)});var p={vs:r.flatten(l,!0)};c&&(p.barycenter=u/c,p.weight=c);return p}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){var n={};return r.each(e,function(e,t){var i=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),r.each(t.edges(),function(e){var t=n[e.v],i=n[e.w];r.isUndefined(t)||r.isUndefined(i)||(i.indegree++,t.out.push(n[e.w]))}),function(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function i(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),r.each(o.in.reverse(),n(o)),r.each(o.out,i(o))}return r.chain(t).filter(function(e){return!e.merged}).map(function(e){return r.pick(e,["vs","i","barycenter","weight"])}).value()}(r.filter(n,function(e){return!e.indegree}))}},function(e,t,n){var r=n(2);e.exports=function(e,t){return r.map(t,function(t){var n=e.inEdges(t);if(n.length){var i=r.reduce(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}})}},function(e,t,n){var r=n(2),i=n(114),o=n(113),a=n(112);e.exports=function e(t,n,s,l){var u=t.children(n),c=t.node(n),d=c?c.borderLeft:void 0,p=c?c.borderRight:void 0,f={};d&&(u=r.filter(u,function(e){return e!==d&&e!==p}));var h=i(t,u);r.each(h,function(n){if(t.children(n.v).length){var i=e(t,n.v,s,l);f[n.v]=i,r.has(i,"barycenter")&&function(e,t){r.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}(n,i)}});var g=o(h,s);!function(e,t){r.each(e,function(e){e.vs=r.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}(g,f);var m=a(g,l);if(d&&(m.vs=r.flatten([d,m.vs,p],!0),t.predecessors(d).length)){var v=t.node(t.predecessors(d)[0]),b=t.node(t.predecessors(p)[0]);r.has(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+v.order+b.order)/(m.weight+2),m.weight+=2}return m}},function(e,t,n){"use strict";var r=n(2);function i(e,t,n){for(var i=r.zipObject(n,r.map(n,function(e,t){return t})),o=r.flatten(r.map(t,function(t){return r.chain(e.outEdges(t)).map(function(t){return{pos:i[t.w],weight:e.edge(t).weight}}).sortBy("pos").value()}),!0),a=1;a0;)t%2&&(n+=l[t+1]),l[t=t-1>>1]+=e.weight;u+=e.weight*n})),u}e.exports=function(e,t){for(var n=0,r=1;r=2),s=c.buildLayerMatrix(e);var m=o(e,s);ml||u>t[i].lim));o=i,i=r;for(;(i=e.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(e,t,i.v,i.w),a=o.path,s=o.lca,l=0,u=a[l],c=!0;n!==i.w;){if(r=e.node(n),c){for(;(u=a[l])!==s&&e.node(u).maxRankl.lim&&(u=l,c=!0);var d=r.filter(t.edges(),function(t){return c===v(e,e.node(t.v),u)&&c!==v(e,e.node(t.w),u)});return r.min(d,function(e){return o(t,e)})}function m(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),f(e),d(e,t),function(e,t){var n=r.find(e.nodes(),function(e){return!t.node(e).parent}),i=s(e,n);i=i.slice(1),r.each(i,function(n){var r=e.node(n).parent,i=t.edge(n,r),o=!1;i||(i=t.edge(r,n),o=!0),t.node(n).rank=t.node(r).rank+(o?i.minlen:-i.minlen)})}(e,t)}function v(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=c,c.initLowLimValues=f,c.initCutValues=d,c.calcCutValue=p,c.leaveEdge=h,c.enterEdge=g,c.exchangeEdges=m},function(e,t,n){"use strict";var r=n(23).longestPath,i=n(40),o=n(123);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":s(e);break;case"tight-tree":!function(e){r(e),i(e)}(e);break;case"longest-path":a(e);break;default:s(e)}};var a=r;function s(e){o(e)}},function(e,t,n){"use strict";var r=n(2),i=n(5);e.exports={run:function(e){e.graph().dummyChains=[],r.each(e.edges(),function(t){!function(e,t){var n,r,o,a=t.v,s=e.node(a).rank,l=t.w,u=e.node(l).rank,c=t.name,d=e.edge(t),p=d.labelRank;if(u===s+1)return;for(e.removeEdge(t),o=0,++s;s0;--l)if(r=t[l].dequeue()){i=i.concat(s(e,t,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,function(t){return e.outEdges(t.v,t.w)}),!0)};var a=r.constant(1);function s(e,t,n,i,o){var a=o?[]:void 0;return r.each(e.inEdges(i.v),function(r){var i=e.edge(r),s=e.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,l(t,n,s)}),r.each(e.outEdges(i.v),function(r){var i=e.edge(r),o=r.w,a=e.node(o);a.in-=i,l(t,n,a)}),e.removeNode(i.v),a}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},function(e,t,n){"use strict";var r=n(2),i=n(127);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?i(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},i={};return r.each(e.nodes(),function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.each(e.outEdges(a),function(e){r.has(n,e.w)?t.push(e):o(e.w)}),delete n[a])}),t}(e);r.each(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))})},undo:function(e){r.each(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}}},function(e,t,n){(function(e,r){var i; /** * @license * lodash 3.10.1 (Custom Build) @@ -106,7 +106,7 @@ https://github.com/jquery/jquery/blob/master/src/event.js */var r=function(e,t){this.recycle(e,t)};function i(){return!1}function o(){return!0}r.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=i,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?o:i):null!=e&&e.type?t=e:this.type=e,null!=t&&(this.originalEvent=t.originalEvent,this.type=null!=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),null!=this.cy&&null!=this.position&&null==this.renderedPosition){var n=this.position,r=this.cy.zoom(),a=this.cy.pan();this.renderedPosition={x:n.x*r+a.x,y:n.y*r+a.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=o;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=o;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=o,this.stopPropagation()},isDefaultPrevented:i,isPropagationStopped:i,isImmediatePropagationStopped:i},e.exports=r},function(e,t,n){"use strict";var r=n(1);e.exports=function(e,t){var n=e.cy().hasCompoundNodes();function i(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?n?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?r.MAX_INT:0}var o=i(e)-i(t);if(0!==o)return o;function a(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}var s=a(e)-a(t);if(0!==s)return s;var l=e.pstyle("z-index").value-t.pstyle("z-index").value;return 0!==l?l:e.poolIndex()-t.poolIndex()}},function(e,t,n){"use strict";var r=n(0),i=n(1),o=n(6),a=function e(t){if(!(this instanceof e))return new e(t);r.core(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):i.error("A style must have a core reference")},s=a.prototype;s.instanceString=function(){return"style"},s.clear=function(){for(var e=0;e=e.deqFastCost*m)break}else if(o){if(h>=e.deqCost*u||h>=e.deqAvgCost*l)break}else if(g>=e.deqNoDrawCost*(1e3/60))break;var v=e.deq(t,p,d);if(!(v.length>0))break;for(var b=0;b0&&(e.onDeqd(t,c),!o&&e.shouldRedraw(t,c,p,d)&&i())},o(t))}}}}},function(e,t,n){"use strict";var r=n(0),i=n(12),o=n(94),a=n(136),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=n(137),s.stylesheet=s.Stylesheet=a,e.exports=s},function(e,t,n){"use strict";var r=n(0);e.exports={hex2tuple:function(e){if((4===e.length||7===e.length)&&"#"===e[0]){var t=void 0,n=void 0,r=void 0;return 4===e.length?(t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16)):(t=parseInt(e[1]+e[2],16),n=parseInt(e[3]+e[4],16),r=parseInt(e[5]+e[6],16)),[t,n,r]}},hsl2tuple:function(e){var t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,l=void 0;function u(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 c=new RegExp("^"+this.regex.hsla+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(i=parseFloat(c[3]))<0||i>100)return;if(i/=100,void 0!==(o=c[4])&&((o=parseFloat(o))<0||o>1))return;if(0===r)a=s=l=Math.round(255*i);else{var d=i<.5?i*(1+r):i+r-i*r,p=2*i-d;a=Math.round(255*u(p,d,n+1/3)),s=Math.round(255*u(p,d,n)),l=Math.round(255*u(p,d,n-1/3))}t=[a,s,l,o]}return t},rgb2tuple:function(e){var t=void 0,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]}}},function(e,t,n){"use strict";var r=n(0);e.exports={mapEmpty:function(e){return null==e||0===Object.keys(e).length},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;ot?1:0}e.exports={sort:{ascending:r,descending:function(e,t){return-1*r(e,t)}}}},function(e,t,n){"use strict";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]},e.exports=r},function(e,t,n){"use strict";var r=n(1),i={};[n(30),n(31),n(33),n(34),n(35),n(36),n(37),n(38),n(39),n(40),n(41)].forEach(function(e){r.extend(i,e)}),e.exports=i},function(e,t,n){"use strict";var r=n(0),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(),m=this.edges(),v=0;v0;){var y=g.pop(),x=f(y),w=y.id();if(c[w]=x,x!==1/0){var k=y.neighborhood().intersect(p);for(m=0;m0)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)}}}};e.exports=o},function(e,t){e.exports=n},function(e,t,n){"use strict";var r=n(0),i={kruskal:function(e){var t=this.cy();function n(e){for(var t=0;t0;){var y=n(f,v),x=i.getElementById(f[y]),w=x.id();if(b++,w==d){var k=t(c,d,h,[]);return{found:!0,distance:m[w],path:this.spawn(k),steps:b}}p.push(w),f.splice(y,1);for(var $=x._private.edges,_=0;_<$.length;_++){var E=$[_];if(this.hasElementWithId(E.id())&&(!u||E.data("source")===w)){var S=E.source(),C=E.target(),T=S.id()!==w?S:C,A=T.id();if(this.hasElementWithId(A)&&-1==p.indexOf(A)){var P=m[w]+l(E);-1!=f.indexOf(A)?Pb&&(c[m][v]=b,f[m][v]=v,h[m][v]=o[u])}if(!i)for(u=0;ub&&(c[m][v]=b,f[m][v]=v,h[m][v]=o[u])}for(var y=0;yc&&(c=t)},p=function(e){return u[e]},f=0;f0?E.edgesTo(_)[0]:_.edgesTo(E)[0]);_=_.id(),y[_]>y[k]+S&&(y[_]=y[k]+S,x.nodes.indexOf(_)<0?x.push(_):x.updateItem(_),b[_]=0,v[_]=[]),y[_]==y[k]+S&&(b[_]=b[_]+b[k],v[_].push(k))}else for($=0;$0;)for(_=m.pop(),$=0;$0:void 0}},clearQueue:function(){return function(){var e=void 0!==this.length?this:[this];if(!(this._private.cy||this).styleEnabled())return this;for(var t=0;t0&&this.spawn(n).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){for(var n=e.match(/\S+/g)||[],r=[],i=0,o=this.length;i0&&this.spawn(r).updateStyle().emit("class"),this},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}};e.exports=i},function(e,t,n){"use strict";n(0);var r=n(6),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\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:'"(?:\\\\"|[^"])*"|'+"'(?:\\\\'|[^'])*'",number:n(1).regex.number,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};r.variable="(?:[\\w-]|(?:\\\\"+r.metaChar+"))+",r.value=r.string+"|"+r.number,r.className=r.variable,r.id=r.variable,function(){var e=void 0,t=void 0,n=void 0;for(e=r.comparatorOp.split("|"),n=0;n=0||"="!==t&&(r.comparatorOp+="|\\!"+t)}(),e.exports=r},function(e,t,n){"use strict";var r=n(15).stateSelectorMatches,i=n(0),o=function(e,t){for(var n=!0,r=0;r=0&&(d=d.toLowerCase(),p=p.toLowerCase(),a=a.replace("@",""),f=!0);var h=!1;a.indexOf("!")>=0&&(a=a.replace("!",""),h=!0),f&&(s=p.toLowerCase(),c=d.toLowerCase());var g=!1;switch(a){case"*=":u=d.indexOf(p)>=0;break;case"$=":u=d.indexOf(p,d.length-p.length)>=0;break;case"^=":u=0===d.indexOf(p);break;case"=":u=c===s;break;case">":g=!0,u=c>s;break;case">=":g=!0,u=c>=s;break;case"<":g=!0,u=c0;){var c=o.shift();t(c),a.add(c.id()),s&&i(o,a,c)}return e}function a(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1],a)},i.forEachUp=function(e){return o(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s)},i.forEachUpAndDown=function(e){return o(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],l)},i.ancestors=i.parents,e.exports=i},function(e,t,n){"use strict";var r,i=n(4),o=void 0;(o=r={data:i.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:i.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:i.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:i.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:i.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:i.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=o.data,o.removeAttr=o.removeData,e.exports=r},function(e,t,n){"use strict";var r=n(1),i={};function o(e){return function(t){if(void 0===t&&(t=!0),0!==this.length&&this.isNode()&&!this.removed()){for(var n=0,r=this[0],i=r._private.edges,o=0;ot}),minIndegree:a("indegree",function(e,t){return et}),minOutdegree:a("outdegree",function(e,t){return et})}),r.extend(i,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,d=c;c&&(u=u[0]);var p=d?u.position():{x:0,y:0};return i={x:l.x-p.x,y:l.y-p.y},void 0===e?i:i[e]}for(var f=0;f0,v=m;m&&(g=g[0]);var b=v?g.position():{x:0,y:0};void 0!==t?h.position(e,t+b[e]):void 0!==i&&h.position({x:i.x+b.x,y:i.y+b.y})}}else if(!a)return;return this}}).modelPosition=s.point=s.position,s.modelPositions=s.points=s.positions,s.renderedPoint=s.renderedPosition,s.relativePoint=s.relativePosition,e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(1),o=n(2),a=void 0,s=void 0;a=s={},s.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}},s.dirtyCompoundBoundsCache=function(){var e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()?(this.forEachUp(function(e){e._private.compoundBoundsClean=!1,e.isParent()&&e.emit("bounds")}),this):this},s.updateCompoundBounds=function(){var e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(e.batching())return this;var t=[];function n(e){if(e.isParent()){var n=e._private,r=e.children(),i="include"===e.pstyle("compound-sizing-wrt-labels").value,o={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")}},a=r.boundingBox({includeLabels:i,includeOverlays:!1,useCache:!1}),s=n.position;0!==a.w&&0!==a.h||((a={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=s.x-a.w/2,a.x2=s.x+a.w/2,a.y1=s.y-a.h/2,a.y2=s.y+a.h/2);var l=o.width.left.value;"px"===o.width.left.units&&o.width.val>0&&(l=100*l/o.width.val);var u=o.width.right.value;"px"===o.width.right.units&&o.width.val>0&&(u=100*u/o.width.val);var c=o.height.top.value;"px"===o.height.top.units&&o.height.val>0&&(c=100*c/o.height.val);var d=o.height.bottom.value;"px"===o.height.bottom.units&&o.height.val>0&&(d=100*d/o.height.val);var p=b(o.width.val-a.w,l,u),f=p.biasDiff,h=p.biasComplementDiff,g=b(o.height.val-a.h,c,d),m=g.biasDiff,v=g.biasComplementDiff;n.autoPadding=function(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}}(a.w,a.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),n.autoWidth=Math.max(a.w,o.width.val),s.x=(-f+a.x1+a.x2+h)/2,n.autoHeight=Math.max(a.h,o.height.val),s.y=(-m+a.y1+a.y2+v)/2,t.push(e)}function b(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}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?i:e.y2)},c=function(e,t){return u(e,t.x1,t.y1,t.x2,t.y2)},d=function(e,t,n){return i.getPrefixedProperty(e,t,n)},p=function(e,t,n){if(!t.cy().headless()){var r=t._private.rstyle,i=r.arrowWidth/2,o=void 0,a=void 0;"none"!==t.pstyle(n+"-arrow-shape").value&&("source"===n?(o=r.srcX,a=r.srcY):"target"===n?(o=r.tgtX,a=r.tgtY):(o=r.midX,a=r.midY),u(e,o-i,a-i,o+i,a+i))}},f=function(e,t,n){if(!t.cy().headless()){var r=void 0;r=n?n+"-":"";var i=t._private,o=i.rstyle;if(t.pstyle(r+"label").strValue){var a=t.pstyle("text-halign"),s=t.pstyle("text-valign"),l=d(o,"labelWidth",n),c=d(o,"labelHeight",n),p=d(o,"labelX",n),f=d(o,"labelY",n),h=t.pstyle(r+"text-margin-x").pfValue,g=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),v=t.pstyle(r+"text-rotation"),b=t.pstyle("text-outline-width").pfValue,y=t.pstyle("text-border-width").pfValue/2,x=t.pstyle("text-background-padding").pfValue,w=c+2*x,k=l+2*x,$=k/2,_=w/2,E=void 0,S=void 0,C=void 0,T=void 0;if(m)E=p-$,S=p+$,C=f-_,T=f+_;else{switch(a.value){case"left":E=p-k,S=p;break;case"center":E=p-$,S=p+$;break;case"right":E=p,S=p+k}switch(s.value){case"top":C=f-w,T=f;break;case"center":C=f-_,T=f+_;break;case"bottom":C=f,T=f+w}}var A=m&&"autorotate"===v.strValue,P=null!=v.pfValue&&0!==v.pfValue;if(A||P){var O=A?d(i.rstyle,"labelAngle",n):v.pfValue,R=Math.cos(O),I=Math.sin(O),j=function(e,t){return{x:(e-=p)*R-(t-=f)*I+p,y:e*I+t*R+f}},D=j(E,C),N=j(E,T),M=j(S,C),z=j(S,T);E=Math.min(D.x,N.x,M.x,z.x),S=Math.max(D.x,N.x,M.x,z.x),C=Math.min(D.y,N.y,M.y,z.y),T=Math.max(D.y,N.y,M.y,z.y)}E+=h-Math.max(b,y),S+=h+Math.max(b,y),C+=g-Math.max(b,y),T+=g+Math.max(b,y),u(e,E,C,S,T)}return e}},h=function(e){return e?"t":"f"},g=function(e){var t="";return t+=h(e.incudeNodes),t+=h(e.includeEdges),t+=h(e.includeLabels),t+=h(e.includeOverlays)},m=function(e,t){var n=e._private,r=void 0,i=e.cy().headless(),a=t===v?b:g(t);return t.useCache&&!i&&n.bbCache&&n.bbCache[a]?r=n.bbCache[a]:(r=function(e,t){var n=e._private.cy,r=n.styleEnabled(),i=n.headless(),a={x1:1/0,y1:1/0,x2:-1/0,y2:-1/0},s=e._private,c=r?e.pstyle("display").value:"element",d=e.isNode(),h=e.isEdge(),g=void 0,m=void 0,v=void 0,b=void 0,y=void 0,x=void 0,w="none"!==c;if(w){var k=0;r&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(k=e.pstyle("overlay-padding").value);var $=0;if(r&&($=e.pstyle("width").pfValue/2),d&&t.includeNodes){var _=e.position();y=_.x,x=_.y;var E=e.outerWidth()/2,S=e.outerHeight()/2;u(a,g=y-E-k,v=x-S-k,m=y+E+k,b=x+S+k)}else if(h&&t.includeEdges){var C=s.rstyle||{};if(r&&!i&&(g=Math.min(C.srcX,C.midX,C.tgtX),m=Math.max(C.srcX,C.midX,C.tgtX),v=Math.min(C.srcY,C.midY,C.tgtY),b=Math.max(C.srcY,C.midY,C.tgtY),u(a,g-=$,v-=$,m+=$,b+=$)),r&&!i&&"haystack"===e.pstyle("curve-style").strValue){var T=C.haystackPts||[];if(g=T[0].x,v=T[0].y,m=T[1].x,b=T[1].y,g>m){var A=g;g=m,m=A}if(v>b){var P=v;v=b,b=P}u(a,g-$,v-$,m+$,b+$)}else{for(var O=C.bezierPts||C.linePts||[],R=0;Rm){var N=g;g=m,m=N}if(v>b){var M=v;v=b,b=M}u(a,g-=$,v-=$,m+=$,b+=$)}}}if(r&&t.includeEdges&&h&&(p(a,e,"mid-source"),p(a,e,"mid-target"),p(a,e,"source"),p(a,e,"target")),r&&"yes"===e.pstyle("ghost").value){var z=e.pstyle("ghost-offset-x").pfValue,L=e.pstyle("ghost-offset-y").pfValue;u(a,a.x1+z,a.y1+L,a.x2+z,a.y2+L)}r&&(g=a.x1,m=a.x2,v=a.y1,b=a.y2,u(a,g-k,v-k,m+k,b+k)),r&&t.includeLabels&&(f(a,e,null),h&&(f(a,e,"source"),f(a,e,"target")))}return a.x1=l(a.x1),a.y1=l(a.y1),a.x2=l(a.x2),a.y2=l(a.y2),a.w=l(a.x2-a.x1),a.h=l(a.y2-a.y1),a.w>0&&a.h>0&&w&&o.expandBoundingBox(a,1),a}(e,t),i||(n.bbCache=n.bbCache||{},n.bbCache[a]=r)),r},v={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeOverlays:!0,useCache:!0},b=g(v);function y(e){return{includeNodes:i.default(e.includeNodes,v.includeNodes),includeEdges:i.default(e.includeEdges,v.includeEdges),includeLabels:i.default(e.includeLabels,v.includeLabels),includeOverlays:i.default(e.includeOverlays,v.includeOverlays),useCache:i.default(e.useCache,v.useCache)}}s.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?v:y(e),m(this[0],e);var t={x1:1/0,y1:1/0,x2:-1/0,y2:-1/0},n=y(e=e||i.staticEmptyObject()),r=this.cy().styleEnabled();r&&this.recalculateRenderedStyle(n.useCache),this.updateCompoundBounds();for(var o={},a=0;a1&&!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;in&&(n=a,r=o)}return{value:n,ele:r}},min:function(e,t){for(var n=1/0,r=void 0,i=0;i=0&&i0&&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)}}),o.neighbourhood=o.neighborhood,o.closedNeighbourhood=o.closedNeighborhood,o.openNeighbourhood=o.openNeighborhood,r.extend(o,{source:a(function(e){var t=this[0],n=void 0;return t&&(n=t._private.source||t.cy().collection()),n&&e?n.filter(e):n},"source"),target:a(function(e){var t=this[0],n=void 0;return t&&(n=t._private.target||t.cy().collection()),n&&e?n.filter(e):n},"target"),sources:c({attr:"source"}),targets:c({attr:"target"})}),r.extend(o,{edgesWith:a(d(),"edgesWith"),edgesTo:a(d({thisIsSrc:!0}),"edgesTo")}),r.extend(o,{connectedEdges:a(function(e){for(var t=[],n=0;n0);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)})}}),e.exports=o},function(e,t,n){"use strict";var r=n(0),i=n(1),o=n(7),a=n(14),s={add:function(e){var t=void 0,n=this;if(r.elementOrCollection(e)){var s=e;if(s._private.cy===n)t=s.restore();else{for(var l=[],u=0;u=0;t--)(0,e[t])();e.splice(0,e.length)},f=s.length-1;f>=0;f--){var h=s[f],g=h._private;g.stopped?(s.splice(f,1),g.hooked=!1,g.playing=!1,g.started=!1,p(g.frames)):(g.playing||g.applying)&&(g.playing&&g.applying&&(g.applying=!1),g.started||i(t,h,e,n),r(t,h,e,n),g.applying&&(g.applying=!1),p(g.frames),h.completed()&&(s.splice(f,1),g.hooked=!1,g.playing=!1,g.started=!1,p(g.completes)),u=!0)}return n||0!==s.length||0!==l.length||o.push(t),u}for(var s=!1,l=0;l0?(n.dirtyCompoundBoundsCache(),t.notify({type:"draw",eles:n})):t.notify({type:"draw"})),n.unmerge(o),t.emit("step")}},function(e,t,n){"use strict";var r=n(73),i=n(76),o=n(0);function a(e,t){return null!=e&&null!=t&&(!(!o.number(e)||!o.number(t))||!(!e||!t))}e.exports=function(e,t,n,s){var l=!s,u=e._private,c=t._private,d=c.easing,p=c.startTime,f=(s?e:e.cy()).style();if(!c.easingImpl)if(null==d)c.easingImpl=r.linear;else{var h=void 0;h=o.string(d)?f.parse("transition-timing-function",d).value:d;var g=void 0,m=void 0;o.string(h)?(g=h,m=[]):(g=h[1],m=h.slice(2).map(function(e){return+e})),m.length>0?("spring"===g&&m.push(c.duration),c.easingImpl=r[g].apply(null,m)):c.easingImpl=r[g]}var v=c.easingImpl,b=void 0;if(b=0===c.duration?1:(n-p)/c.duration,c.applying&&(b=c.progress),b<0?b=0:b>1&&(b=1),null==c.delay){var y=c.startPosition,x=c.position;if(x&&l&&!e.locked()){var w=e.position();a(y.x,x.x)&&(w.x=i(y.x,x.x,b,v)),a(y.y,x.y)&&(w.y=i(y.y,x.y,b,v)),e.emit("position")}var k=c.startPan,$=c.pan,_=u.pan,E=null!=$&&s;E&&(a(k.x,$.x)&&(_.x=i(k.x,$.x,b,v)),a(k.y,$.y)&&(_.y=i(k.y,$.y,b,v)),e.emit("pan"));var S=c.startZoom,C=c.zoom,T=null!=C&&s;T&&(a(S,C)&&(u.zoom=i(S,C,b,v)),e.emit("zoom")),(E||T)&&e.emit("viewport");var A=c.style;if(A&&A.length>0&&l){for(var P=0;P=o?function(t,r){for(var o=0;o0?i=l:r=l}while(Math.abs(o)>a&&++u1e-4&&Math.abs(c.v)>1e-4;);return o?function(e){return s[e*(s.length-1)|0]}:l}}();e.exports=r},function(e,t,n){"use strict";var r=n(0);function i(e,t,n,r,i){if(1===r)return n;var o=i(t,n,r);return null==e?o:((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 o(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}e.exports=function(e,t,n,a,s){var l=null!=s?s.type:null;n<0?n=0:n>1&&(n=1);var u=o(e,s),c=o(t,s);if(r.number(u)&&r.number(c))return i(l,u,c,n,a);if(r.array(u)&&r.array(c)){for(var d=[],p=0;p0},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;r0;)e.removeChild(e.childNodes[0]);this._private.renderer=null},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};i.invalidateDimensions=i.resize,e.exports=i},function(e,t,n){"use strict";var r=n(0),i=n(7),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.$,e.exports=o},function(e,t,n){"use strict";var r=n(0),i=n(18),o={style:function(e){e&&this.setStyle(e).update();return 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}};e.exports=o},function(e,t,n){"use strict";var r=n(1),i=n(0),o=n(5),a={apply:function(e){var t=this._private,n=t.cy.collection();t.newStyle&&(t.contextStyles={},t.propDiffs={},this.cleanElements(e,!0));for(var r=0;r0;if(u||c){var d=void 0;u&&c?d=l.properties:u?d=l.properties:c&&(d=l.mappedProperties);for(var p=0;p0){n=!0;break}}t.hasPie=n;var i=e.pstyle("text-transform").strValue,o=e.pstyle("label").strValue,a=e.pstyle("source-label").strValue,s=e.pstyle("target-label").strValue,l=e.pstyle("font-style").strValue,u=e.pstyle("font-size").pfValue+"px",c=e.pstyle("font-family").strValue,d=e.pstyle("font-weight").strValue,p=l+"$"+u+"$"+c+"$"+d+"$"+i+"$"+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=p,t.sourceLabelKey=p+"$"+a,t.targetLabelKey=p+"$"+s,t.labelKey=p+"$"+o,t.fontKey=l+"$"+d+"$"+u+"$"+c,t.styleKey=Date.now()}},applyParsedProperty:function(e,t){var n=this,o=t,a=e._private.style,s=void 0,l=n.types,u=n.properties[o.name].type,c=o.bypass,d=a[o.name],p=d&&d.bypass,f=e._private,h=function(){n.checkZOrderTrigger(e,o.name,d?d.value:null,o.value)};if("curve-style"===t.name&&"haystack"===t.value&&e.isEdge()&&(e.isLoop()||e.source().isParent()||e.target().isParent())&&(o=t=this.parse(t.name,"bezier",c)),o.delete)return a[o.name]=void 0,h(),!0;if(o.deleteBypassed)return d?!!d.bypass&&(d.bypassed=void 0,h(),!0):(h(),!0);if(o.deleteBypass)return d?!!d.bypass&&(a[o.name]=d.bypassed,h(),!0):(h(),!0);var g=function(){r.error("Do not assign mappings to elements without corresponding data (e.g. ele `"+e.id()+"` for property `"+o.name+"` with data field `"+o.field+"`); try a `["+o.field+"]` selector to limit scope to elements with `"+o.field+"` defined")};switch(o.mapped){case l.mapData:for(var m=o.field.split("."),v=f.data,b=0;b1&&(y=1),u.color){var x=o.valueMin[0],w=o.valueMax[0],k=o.valueMin[1],$=o.valueMax[1],_=o.valueMin[2],E=o.valueMax[2],S=null==o.valueMin[3]?1:o.valueMin[3],C=null==o.valueMax[3]?1:o.valueMax[3],T=[Math.round(x+(w-x)*y),Math.round(k+($-k)*y),Math.round(_+(E-_)*y),Math.round(S+(C-S)*y)];s={bypass:o.bypass,name:o.name,value:T,strValue:"rgb("+T[0]+", "+T[1]+", "+T[2]+")"}}else{if(!u.number)return!1;var A=o.valueMin+(o.valueMax-o.valueMin)*y;s=this.parse(o.name,A,o.bypass,"mapping")}s||(s=this.parse(o.name,d.strValue,o.bypass,"mapping")),s||g(),s.mapping=o,o=s;break;case l.data:var P=o.field.split("."),O=f.data;if(O)for(var R=0;R0&&l>0){for(var c={},d=!1,p=0;p0?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.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(e,s),e.emitAndNotify("style"),a.transitioning=!1)},checkZOrderTrigger:function(e,t,n,r){var i=this.properties[t];null==i.triggersZOrder||null!=n&&!i.triggersZOrder(n,r)||this._private.cy.notify({type:"zorder",eles:e})}};e.exports=a},function(e,t,n){"use strict";var r=n(0),i=n(1),o={applyBypass:function(e,t,n,o){var a=[];if("*"===t||"**"===t){if(void 0!==n)for(var s=0;sn.length?t.substr(n.length):""}function l(){o=o.length>a.length?o.substr(a.length):""}for(t=t.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(t.match(/^\s*$/))break;var u=t.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!u){r.error("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+t);break}n=u[0];var c=u[1];if("core"!==c)if(new i(c)._private.invalid){r.error("Skipping parsing of block: Invalid selector found in string stylesheet: "+c),s();continue}var d=u[2],p=!1;o=d;for(var f=[];;){if(o.match(/^\s*$/))break;var h=o.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!h){r.error("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+d),p=!0;break}a=h[0];var g=h[1],m=h[2];if(this.properties[g])this.parse(g,m)?(f.push({name:g,val:m}),l()):(r.error("Skipping property: Invalid property definition in: "+a),l());else r.error("Skipping property: Invalid property name in: "+a),l()}if(p){s();break}this.selector(c);for(var v=0;v node").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3,"curve-style":"haystack"}).selector(":parent <-> node").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).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},e.exports=o},function(e,t,n){"use strict";var r=n(1),i=n(0),o=n(2),a={parse:function(e,t,n,o){if(i.fn(t))return this.parseImplWarn(e,t,n,o);var a=[e,t,n,"mapping"===o||!0===o||!1===o||null==o?"dontcare":o].join("$"),s=this.propCache=this.propCache||{},l=void 0;return(l=s[a])||(l=s[a]=this.parseImplWarn(e,t,n,o)),(n||"mapping"===o)&&(l=r.copy(l))&&(l.value=r.copy(l.value)),l},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){e=r.camel2dash(e);var s=this.properties[e],l=t,u=this.types;if(!s)return null;if(void 0===t)return null;s.alias&&(s=s.pointsTo,e=s.name);var c=i.string(t);c&&(t=t.trim());var d=s.type;if(!d)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:u.fn,bypass:n};var p=void 0,f=void 0;if(!c||a);else{if(p=new RegExp(u.data.regex).exec(t)){if(n)return!1;var h=u.data;return{name:e,value:p,strValue:""+t,mapped:h,field:p[1],bypass:n}}if(f=new RegExp(u.mapData.regex).exec(t)){if(n)return!1;if(d.multiple)return!1;var g=u.mapData;if(!d.color&&!d.number)return!1;var m=this.parse(e,f[4]);if(!m||m.mapped)return!1;var v=this.parse(e,f[5]);if(!v||v.mapped)return!1;if(m.value===v.value)return!1;if(d.color){var b=m.value,y=v.value;if(!(b[0]!==y[0]||b[1]!==y[1]||b[2]!==y[2]||b[3]!==y[3]&&(null!=b[3]&&1!==b[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:f,strValue:""+t,mapped:g,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:m.value,valueMax:v.value,bypass:n}}}if(d.multiple&&"multiple"!==a){var x=void 0;if(x=c?t.split(/\s+/):i.array(t)?t:[t],d.evenMultiple&&x.length%2!=0)return null;for(var w=[],k=[],$=[],_=!1,E=0;Ed.max||d.strictMax&&t===d.max))return null;var R={name:e,value:t,strValue:""+t+(T||""),units:T,bypass:n};return d.unitless||"px"!==T&&"em"!==T?R.pfValue=t:R.pfValue="px"!==T&&T?this.getEmSizeInPixels()*t:t,"ms"!==T&&"s"!==T||(R.pfValue="ms"===T?t:1e3*t),"deg"!==T&&"rad"!==T||(R.pfValue="rad"===T?t:o.deg2rad(t)),"%"===T&&(R.pfValue=t/100),R}if(d.propList){var I=[],j=""+t;if("none"===j);else{for(var D=j.split(","),N=0;N0&&s>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:l=(l=(l=Math.min((a-2*t)/n.w,(s-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:l)t.maxZoom?t.maxZoom:s)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.emit(o.join(" ")),this.notify({type:"viewport"})),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("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());if(0!==e.length){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=i.getComputedStyle(t),n=function(t){return parseFloat(e.getPropertyValue(t))};return{width:t.clientWidth-n("padding-left")-n("padding-right"),height:t.clientHeight-n("padding-top")-n("padding-bottom")}}():{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}}};a.centre=a.center,a.autolockNodes=a.autolock,a.autoungrabifyNodes=a.autoungrabify,e.exports=a},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(7),a=n(12),s=n(95),l=n(0),u=n(11),c={},d={};function p(e,t,n){var s=n,d=function(n){r.error("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===e){if(a.prototype[t])return d(t);a.prototype[t]=n}else if("collection"===e){if(o.prototype[t])return d(t);o.prototype[t]=n}else if("layout"===e){for(var p=function(e){this.options=e,n.call(this,e),l.plainObject(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},h=p.prototype=Object.create(n.prototype),g=[],m=0;m0;)m();u=n.collection();for(var v=function(e){var t=h[e],n=t.maxDegree(!1),r=t.filter(function(e){return e.degree(!1)===n});u=u.add(r)},b=0;by.length-1;)y.push([]);y[J].push(X),Z.depth=J,Z.index=y[J].length-1}N()}var Q=0;if(t.avoidOverlap)for(var ee=0;eeu||0===t)&&(r+=l/c,i++)}return r/=i=Math.max(1,i),0===i&&(r=void 0),ie[e.id()]=r,r},ae=function(e,t){return oe(e)-oe(t)},se=0;se<3;se++){for(var le=0;le0&&y[0].length<=3?c/2:0),p=2*Math.PI/y[i].length*o;return 0===i&&1===y[0].length&&(d=1),{x:de+d*Math.cos(p),y:pe+d*Math.sin(p)}}return{x:de+(o+1-(a+1)/2)*s,y:(i+1)*u}}var f={x:de+(o+1-(a+1)/2)*s,y:(i+1)*u};return f},he={},ge=y.length-1;ge>=0;ge--)for(var me=y[ge],ve=0;ve1&&t.avoidOverlap){f*=1.75;var b=Math.cos(d)-Math.cos(0),y=Math.sin(d)-Math.sin(0),x=Math.sqrt(f*f/(b*b+y*y));p=Math.max(x,p)}return s.layoutPositions(this,t,function(e,n){var r=t.startAngle+n*d*(a?1:-1),i=p*Math.cos(r),o=p*Math.sin(r);return{x:u+i,y:c+o}}),this},e.exports=s},function(e,t,n){"use strict";var r=n(1),i=n(2),o={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,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function a(e){this.options=r.extend({},o,e)}a.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,o=t.eles.nodes().not(":parent"),a=i.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=a.x1+a.w/2,l=a.y1+a.h/2,u=[],c=(t.startAngle,0),d=0;d0)Math.abs(b[0].value-x.value)>=m&&(b=[],v.push(b));b.push(x)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var k=v.length>0&&v[0].length>1,$=(Math.min(a.w,a.h)/2-w)/(v.length+k?1:0);w=Math.min(w,$)}for(var _=0,E=0;E1&&t.avoidOverlap){var A=Math.cos(T)-Math.cos(0),P=Math.sin(T)-Math.sin(0),O=Math.sqrt(w*w/(A*A+P*P));_=Math.max(O,_)}S.r=_,_+=w}if(t.equidistant){for(var R=0,I=0,j=0;j0)var c=(p=r.nodeOverlap*u)*o/(b=Math.sqrt(o*o+l*l)),d=p*l/b;else{var p,f=s(e,o,l),h=s(t,-1*o,-1*l),g=h.x-f.x,m=h.y-f.y,v=g*g+m*m,b=Math.sqrt(v);c=(p=(e.nodeRepulsion+t.nodeRepulsion)/v)*g/b,d=p*m/b}e.isLocked||(e.offsetX-=c,e.offsetY-=d),t.isLocked||(t.offsetX+=c,t.offsetY+=d)}},a=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},s=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&&0n?(u.x=r,u.y=i+o/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-a/2,u.y=i-a*n/2/t,u):0=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},l=function(e,t){for(var n=0;n1){var h=t.gravity*d/f,g=t.gravity*p/f;c.offsetX+=h,c.offsetY+=g}}}}},c=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(0n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},h=function e(t,n){var r=t.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],o=!1;return(null==i.maxX||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,o=!0),(null==i.minX||t.minX-i.padLefti.maxY)&&(i.maxY=t.maxY+i.padBottom,o=!0),(null==i.minY||t.minY-i.padTopg&&(p+=h+n.componentSpacing,d=0,f=0,h=0)}}}(0,n),t}).then(function(e){p.layoutNodes=e.layoutNodes,o.stop(),y()});var y=function(){!0===e.animate||!1===e.animate?b({force:!0,next:function(){n.one("layoutstop",e.stop),n.emit({type:"layoutstop",layout:n})}}):e.eles.nodes().layoutPositions(n,e,function(e){var t=p.layoutNodes[p.idToIndex[e.data("id")]];return{x:t.positionX,y:t.positionY}})};return this},u.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},u.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(),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:o.makeBoundingBox(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},l=n.eles.components(),u={},c=0;c0){s.graphSet.push($);for(c=0;c<$.length;c++)g[++v]=$[c]}}for(c=0;cr.count?0:r.graph},p=function e(t,n,r,i){var o=i.graphSet[r];if(-1a){var h=c(),g=d();(h-1)*g>=a?c(h-1):(g-1)*h>=a&&d(g-1)}else for(;u*l=a?d(v+1):c(m+1)}var b=o.w/u,y=o.h/l;if(t.condense&&(b=0,y=0),t.avoidOverlap)for(var x=0;x=u&&(O=0,P++)},I={},j=0;j(r=i.sqdistToFiniteLine(e,t,w[k],w[k+1],w[k+2],w[k+3])))return b(n,r),!0}else if("bezier"===a.edgeType||"multibezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType)for(w=a.allpts,k=0;k+5(r=i.sqdistToQuadraticBezier(e,t,w[k],w[k+1],w[k+2],w[k+3],w[k+4],w[k+5])))return b(n,r),!0;v=v||o.source,x=x||o.target;var $=l.getArrowWidth(s,c),_=[{name:"source",x:a.arrowStartX,y:a.arrowStartY,angle:a.srcArrowAngle},{name:"target",x:a.arrowEndX,y:a.arrowEndY,angle:a.tgtArrowAngle},{name:"mid-source",x:a.midX,y:a.midY,angle:a.midsrcArrowAngle},{name:"mid-target",x:a.midX,y:a.midY,angle:a.midtgtArrowAngle}];for(k=0;k<_.length;k++){var E=_[k],S=u.arrowShapes[n.pstyle(E.name+"-arrow-shape").value],C=n.pstyle("width").pfValue;if(S.roughCollide(e,t,$,E.angle,{x:E.x,y:E.y},C,h)&&S.collide(e,t,$,E.angle,{x:E.x,y:E.y},C,h))return b(n),!0}f&&d.length>0&&(y(v),y(x))}function w(e,t,n){return o.getPrefixedProperty(e,t,n)}function k(n,r){var o,a=n._private,s=m;o=r?r+"-":"";var l=n.pstyle(o+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=a.rstyle,c=n.pstyle("text-border-width").pfValue,d=n.pstyle("text-background-padding").pfValue,p=w(u,"labelWidth",r)+c+2*s+2*d,f=w(u,"labelHeight",r)+c+2*s+2*d,h=w(u,"labelX",r),g=w(u,"labelY",r),v=w(a.rscratch,"labelAngle",r),y=h-p/2,x=h+p/2,k=g-f/2,$=g+f/2;if(v){var _=Math.cos(v),E=Math.sin(v),S=function(e,t){return{x:(e-=h)*_-(t-=g)*E+h,y:e*E+t*_+g}},C=S(y,k),T=S(y,$),A=S(x,k),P=S(x,$),O=[C.x,C.y,A.x,A.y,P.x,P.y,T.x,T.y];if(i.pointInsidePolygonPoints(e,t,O))return b(n),!0}else{var R={w:p,h:f,x1:y,x2:x,y1:k,y2:$};if(i.inBoundingBox(R,e,t))return b(n),!0}}}n&&(c=c.interactive);for(var $=c.length-1;$>=0;$--){var _=c[$];_.isNode()?y(_)||k(_):x(_)||k(_)||k(_,"source")||k(_,"target")}return d},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;pb?b+"$-$"+v:v+"$-$"+b,g&&(t="unbundled$-$"+h.id);var y=c[t];null==y&&(y=c[t]=[],d.push(t)),y.push(Bt),g&&(y.hasUnbundled=!0),m&&(y.hasBezier=!0)}else p.push(Bt)}for(var x=0;xGt.id()){var k=Wt;Wt=Gt,Gt=k}Yt=Wt.position(),Xt=Gt.position(),Zt=Wt.outerWidth(),Jt=Wt.outerHeight(),Kt=Gt.outerWidth(),Qt=Gt.outerHeight(),n=l.nodeShapes[this.getNodeShape(Wt)],o=l.nodeShapes[this.getNodeShape(Gt)],s=!1;var $={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0},_=Yt.x,E=Yt.y,S=Zt,C=Jt,T=Xt.x,A=Xt.y,P=Kt,O=Qt,R=w.length;for(f=0;f=d||w){f={cp:b,segment:x};break}}if(f)break}b=f.cp;var k=(d-g)/(x=f.segment).length,$=x.t1-x.t0,_=c?x.t0+$*k:x.t1-$*k;_=r.bound(0,_,1),t=r.qbezierPtAt(b.p0,b.p1,b.p2,_),u=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 p(s,l)}(b.p0,b.p1,b.p2,_);break;case"straight":case"segments":case"haystack":var E,S,C,T,A=0,P=i.allpts.length;for(v=0;v+3=d));v+=2);_=(d-S)/E;_=r.bound(0,_,1),t=r.lineAt(C,T,_),u=p(C,T)}l("labelX",o,t.x),l("labelY",o,t.y),l("labelAutoAngle",o,u)}};u("source"),u("target"),this.applyLabelDimensions(e)}},a.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},a.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)},a.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;fd){for(var g=h.split(/\s+/),m="",v=0;vd)break;x+=i[k],k===i.length-1&&(w=!0)}return w||(x+="…"),x}return i},a.calculateLabelDimensions=function(e,t,n){var r=e._private.labelStyleKey+"$@$"+t;n&&(r+="$@$"+n);var i=this.labelDimCache||(this.labelDimCache={});if(i[r])return i[r];var o=e.pstyle("font-style").strValue,a=1*e.pstyle("font-size").pfValue+"px",s=e.pstyle("font-family").strValue,l=e.pstyle("font-weight").strValue,u=this.labelCalcDiv;u||(u=this.labelCalcDiv=document.createElement("div"),document.body.appendChild(u));var c=u.style;return c.fontFamily=s,c.fontStyle=o,c.fontSize=a,c.fontWeight=l,c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none",c.padding="0",c.lineHeight="1","wrap"===e.pstyle("text-wrap").value?c.whiteSpace="pre":c.whiteSpace="normal",u.textContent=t,i[r]={width:Math.ceil(u.clientWidth/1),height:Math.ceil(u.clientHeight/1)},i[r]},a.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},e.exports=a},function(e,t,n){"use strict";var r={getNodeShape:function(e){var t=e.pstyle("shape").value;if(e.isParent())return"rectangle"===t||"roundrectangle"===t||"cutrectangle"===t||"barrel"===t?t:"rectangle";if("polygon"===t){var n=e.pstyle("shape-polygon-points").value;return this.nodeShapes.makePolygon(n).name}return t}};e.exports=r},function(e,t,n){"use strict";var r={registerCalculationListeners:function(){var e=this.cy,t=e.collection(),n=this,r=function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.merge(e);for(var i=0;i=e.desktopTapThreshold2}var T=n(i);y&&(e.hoverData.tapholdCancelled=!0);s=!0,t(b,["mousemove","vmousemove","tapdrag"],i,{position:{x:f[0],y:f[1]}});var A=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||l.emit("boxstart"),m[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(y){var P={originalEvent:i,type:"cxtdrag",position:{x:f[0],y:f[1]}};w?w.emit(P):l.emit(P),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&b===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:i,type:"cxtdragout",position:{x:f[0],y:f[1]}}),e.hoverData.cxtOver=b,b&&b.emit({originalEvent:i,type:"cxtdragover",position:{x:f[0],y:f[1]}}))}}else if(e.hoverData.dragging){if(s=!0,l.panningEnabled()&&l.userPanningEnabled()){var O;if(e.hoverData.justStartedPan){var R=e.hoverData.mdownPos;O={x:(f[0]-R[0])*u,y:(f[1]-R[1])*u},e.hoverData.justStartedPan=!1}else O={x:k[0]*u,y:k[1]*u};l.panBy(O),e.hoverData.dragged=!0}f=e.projectIntoViewport(i.clientX,i.clientY)}else if(1!=m[4]||null!=w&&!w.isEdge()){if(w&&w.isEdge()&&w.active()&&w.unactivate(),w&&w.grabbed()||b==x||(x&&t(x,["mouseout","tapdragout"],i,{position:{x:f[0],y:f[1]}}),b&&t(b,["mouseover","tapdragover"],i,{position:{x:f[0],y:f[1]}}),e.hoverData.last=b),w)if(y){if(l.boxSelectionEnabled()&&T)w&&w.grabbed()&&(p($),w.emit("free")),A();else if(w&&w.grabbed()&&e.nodeIsDraggable(w)){var I=!e.dragData.didDrag;I&&e.redrawHint("eles",!0),e.dragData.didDrag=!0;var j=[];e.hoverData.draggingEles||c(l.collection($),{inDragLayer:!0});for(var D=0;D<$.length;D++){var N=$[D];if(e.nodeIsDraggable(N)&&N.grabbed()){var M=N.position();if(j.push(N),r.number(k[0])&&r.number(k[1])&&(M.x+=k[0],M.y+=k[1],I)){var z=e.hoverData.dragDelta;z&&r.number(z[0])&&r.number(z[1])&&(M.x+=z[0],M.y+=z[1])}}}e.hoverData.draggingEles=!0;var L=l.collection(j);L.dirtyCompoundBoundsCache(),L.emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(k[0]),t.push(k[1])):(t[0]+=k[0],t[1]+=k[1])}();s=!0}else if(y){if(e.hoverData.dragging||!l.boxSelectionEnabled()||!T&&l.panningEnabled()&&l.userPanningEnabled()){if(!e.hoverData.selecting&&l.panningEnabled()&&l.userPanningEnabled()){a(w,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,m[4]=0,e.data.bgActivePosistion=o.array2point(h),e.redrawHint("select",!0),e.redraw())}}else A();w&&w.isEdge()&&w.active()&&w.unactivate()}return m[2]=f[0],m[3]=f[1],s?(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),a=e.selection,s=e.findNearestElement(o[0],o[1],!0,!1),l=e.dragData.possibleDragElements,u=e.hoverData.down,c=n(r);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,u&&u.unactivate(),3===e.hoverData.which){var d={originalEvent:r,type:"cxttapend",position:{x:o[0],y:o[1]}};if(u?u.emit(d):i.emit(d),!e.hoverData.cxtDragged){var f={originalEvent:r,type:"cxttap",position:{x:o[0],y:o[1]}};u?u.emit(f):i.emit(f)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(null!=u||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||n(r)||(i.$(function(e){return e.selected()}).unselect(),l.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=l=[]),t(s,["mouseup","tapend","vmouseup"],r,{position:{x:o[0],y:o[1]}}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||t(u,["click","tap","vclick"],r,{position:{x:o[0],y:o[1]}}),s!=u||e.dragData.didDrag||e.hoverData.selecting||null!=s&&s._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||c?s.selected()?s.unselect():s.select():c||(i.$(":selected").unmerge(s).unselect(),s.select())),e.redrawHint("eles",!0)),e.hoverData.selecting){var h=i.collection(e.getAllInBox(a[0],a[1],a[2],a[3]));e.redrawHint("select",!0),h.length>0&&e.redrawHint("eles",!0),i.emit("boxend");var g=function(e){return e.selectable()&&!e.selected()};"additive"===i.selectionType()?h.emit("box").stdFilter(g).select().emit("boxselect"):(c||i.$(":selected").unmerge(h).unselect(),h.emit("box").stdFilter(g).select().emit("boxselect")),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!a[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var m=u&&u.grabbed();p(l),m&&u.emit("free")}}a[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 b,y,x,w,k,$,_,E,S,C,T,A,P;e.registerBinding(e.container,"wheel",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];e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4]?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]}}))}},!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.emit({originalEvent: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.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})},!1);var O,R,I,j,D=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},N=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",O=function(n){if(v(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 a=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);i[0]=a[0],i[1]=a[1]}if(n.touches[1]){a=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY);i[2]=a[0],i[3]=a[1]}if(n.touches[2]){a=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY);i[4]=a[0],i[5]=a[1]}if(n.touches[1]){p(e.dragData.touchDragEles);var s=e.findContainerClientCoords();S=s[0],C=s[1],T=s[2],A=s[3],b=n.touches[0].clientX-S,y=n.touches[0].clientY-C,x=n.touches[1].clientX-S,w=n.touches[1].clientY-C,P=0<=b&&b<=T&&0<=x&&x<=T&&0<=y&&y<=A&&0<=w&&w<=A;var u=r.pan(),f=r.zoom();k=D(b,y,x,w),$=N(b,y,x,w),E=[((_=[(b+x)/2,(y+w)/2])[0]-u.x)/f,(_[1]-u.y)/f];if($<4e4&&!n.touches[2]){var h=e.findNearestElement(i[0],i[1],!0,!0),g=e.findNearestElement(i[2],i[3],!0,!0);return h&&h.isNode()?(h.activate().emit({originalEvent:n,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=h):g&&g.isNode()?(g.activate().emit({originalEvent:n,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=g):r.emit({originalEvent: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 m=e.findNearestElements(i[0],i[1],!0,!0),O=m[0];if(null!=O&&(O.activate(),e.touchData.start=O,e.touchData.starts=m,e.nodeIsGrabbable(O))){var R=e.dragData.touchDragEles=[],I=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),O.selected()?(I=r.$(function(t){return t.selected()&&e.nodeIsGrabbable(t)}),c(I,{addToList:R})):d(O,{addToList:R}),l(O);var j=function(e){return{originalEvent:n,type:e,position:{x:i[0],y:i[1]}}};O.emit(j("grabon")),I?I.forEach(function(e){e.emit(j("grab"))}):O.emit(j("grab"))}t(O,["touchstart","tapstart","vmousedown"],n,{position:{x:i[0],y:i[1]}}),null==O&&(e.data.bgActivePosistion={x:a[0],y:a[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 M=e.touchData.startPosition=[],z=0;z=e.touchTapThreshold2}if(i&&e.touchData.cxt){n.preventDefault();var I=n.touches[0].clientX-S,j=n.touches[0].clientY-C,M=n.touches[1].clientX-S,z=n.touches[1].clientY-C,L=N(I,j,M,z);if(L/$>=2.25||L>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var q={originalEvent:n,type:"cxttapend",position:{x:u[0],y:u[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(q),e.touchData.start=null):l.emit(q)}}if(i&&e.touchData.cxt){q={originalEvent:n,type:"cxtdrag",position:{x:u[0],y:u[1]}};e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(q):l.emit(q),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var B=e.findNearestElement(u[0],u[1],!0,!0);e.touchData.cxtOver&&B===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:n,type:"cxtdragout",position:{x:u[0],y:u[1]}}),e.touchData.cxtOver=B,B&&B.emit({originalEvent:n,type:"cxtdragover",position:{x:u[0],y:u[1]}}))}else if(i&&n.touches[2]&&l.boxSelectionEnabled())n.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||l.emit("boxstart"),e.touchData.selecting=!0,e.redrawHint("select",!0),s&&0!==s.length&&void 0!==s[0]?(s[2]=(u[0]+u[2]+u[4])/3,s[3]=(u[1]+u[3]+u[5])/3):(s[0]=(u[0]+u[2]+u[4])/3,s[1]=(u[1]+u[3]+u[5])/3,s[2]=(u[0]+u[2]+u[4])/3+1,s[3]=(u[1]+u[3]+u[5])/3+1),s[4]=1,e.touchData.selecting=!0,e.redraw();else if(i&&n.touches[1]&&l.zoomingEnabled()&&l.panningEnabled()&&l.userZoomingEnabled()&&l.userPanningEnabled()){if(n.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var V=0;V0)return h[0]}return null},f=Object.keys(d),h=0;h0?p:r.roundRectangleIntersectLine(o,a,e,t,n,i,s)},checkPoint:function(e,t,n,i,o,a,s){var l=r.getRoundRectangleRadius(i,o),u=2*l;if(r.pointInsidePolygon(e,t,this.points,a,s,i,o-u,[0,-1],n))return!0;if(r.pointInsidePolygon(e,t,this.points,a,s,i-u,o,[0,-1],n))return!0;var c=i/2+2*n,d=o/2+2*n,p=[a-c,s-d,a-c,s,a+c,s,a+c,s-d];return!!r.pointInsidePolygonPoints(e,t,p)||(!!r.checkInEllipse(e,t,u,u,a+i/2-l,s+o/2-l,n)||!!r.checkInEllipse(e,t,u,u,a-i/2+l,s+o/2-l,n))}}},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.generateBarrel(),this.generateBottomRoundrectangle(),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;s0&&t.data.lyrTxrCache.invalidateElements(n)})}l.CANVAS_LAYERS=3,l.SELECT_BOX=0,l.DRAG=1,l.NODE=2,l.BUFFER_COUNT=3,l.TEXTURE_BUFFER=0,l.MOTIONBLUR_BUFFER_NODE=1,l.MOTIONBLUR_BUFFER_DRAG=2,l.redrawHint=function(e,t){var n=this;switch(e){case"eles":n.data.canvasNeedsRedraw[l.NODE]=t;break;case"drag":n.data.canvasNeedsRedraw[l.DRAG]=t;break;case"select":n.data.canvasNeedsRedraw[l.SELECT_BOX]=t}};var c="undefined"!=typeof Path2D;l.path2dEnabled=function(e){if(void 0===e)return this.pathsEnabled;this.pathsEnabled=!!e},l.usePaths=function(){return c&&this.pathsEnabled},[n(126),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(134),n(135)].forEach(function(e){r.extend(l,e)}),e.exports=s},function(e,t,n){"use strict";var r=n(2),i=n(1),o=n(9),a=n(19),s={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},l=function(e){this.renderer=e,this.onDequeues=[],this.setupDequeueing()},u=l.prototype;u.reasons=s,u.getTextureQueue=function(e){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[e]=this.eleImgCaches[e]||[]},u.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},u.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new o(function(e,t){return t.reqs-e.reqs})},u.getElementIdToQueue=function(){return this.eleIdToCacheQueue=this.eleIdToCacheQueue||{}},u.getElement=function(e,t,n,i,o){var a=this,l=this.renderer,u=e._private.rscratch,c=l.cy.zoom();if(0===t.w||0===t.h||!e.visible())return null;if(null==i&&(i=Math.ceil(r.log2(c*n))),i<-4)i=-4;else if(c>=3.99||i>2)return null;var d,p=Math.pow(2,i),f=t.h*p,h=t.w*p,g=u.imgCaches=u.imgCaches||{},m=g[i];if(m)return m;if(d=f<=25?25:f<=50?50:50*Math.ceil(f/50),f>1024||h>1024||e.isEdge()||e.isParent())return null;var v=a.getTextureQueue(d),b=v[v.length-2],y=function(){return a.recycleTexture(d,h)||a.addTexture(d,h)};b||(b=v[v.length-1]),b||(b=y()),b.width-b.usedWidthi;S--)C=a.getElement(e,t,n,S,s.downscale);T()}else{var A;if(!$&&!_&&!E)for(S=i-1;S>=-4;S--){var P;if(P=g[S]){A=P;break}}if(k(A))return a.queueElement(e,i),A;b.context.translate(b.usedWidth,0),b.context.scale(p,p),l.drawElement(b.context,e,t,w),b.context.scale(1/p,1/p),b.context.translate(-b.usedWidth,0)}return m=g[i]={ele:e,x:b.usedWidth,texture:b,level:i,scale:p,width:h,height:f,scaledLabelShown:w},b.usedWidth+=Math.ceil(h+8),b.eleCaches.push(m),a.checkTextureFullness(b),m},u.invalidateElement=function(e){var t=e._private.rscratch.imgCaches;if(t)for(var n=-4;n<=2;n++){var r=t[n];if(r){var o=r.texture;o.invalidatedWidth+=r.width,t[n]=null,i.removeFromArray(o.eleCaches,r),this.removeFromQueue(e),this.checkTextureUtility(o)}}},u.checkTextureUtility=function(e){e.invalidatedWidth>=.5*e.width&&this.retireTexture(e)},u.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?i.removeFromArray(t,e):e.fullnessChecks++},u.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t);i.removeFromArray(n,e),e.retired=!0;for(var r=e.eleCaches,o=0;o=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,i.clearArray(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),i.removeFromArray(r,a),n.push(a),a}},u.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementIdToQueue(),i=e.id(),o=r[i];if(o)o.level=Math.max(o.level,t),o.reqs++,n.updateItem(o);else{var a={ele:e,level:t,reqs:1};n.push(a),r[i]=a}},u.dequeue=function(e){for(var t=this.getElementQueue(),n=this.getElementIdToQueue(),r=[],i=0;i<1&&t.size()>0;i++){var o=t.pop(),a=o.ele;if(null==a._private.rscratch.imgCaches[o.level]){n[a.id()]=null,r.push(o);var l=a.boundingBox();this.getElement(a,l,e,o.level,s.dequeue)}}return r},u.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementIdToQueue(),r=n[e.id()];null!=r&&(r.reqs=i.MAX_INT,t.updateItem(r),t.pop(),n[e.id()]=null)},u.onDequeue=function(e){this.onDequeues.push(e)},u.offDequeue=function(e){i.removeFromArray(this.onDequeues,e)},u.setupDequeueing=a.setupDequeueing({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;o.validateLayersElesOrdering(n,e);var l,u,c=o.layersByLevel,d=Math.pow(2,n),p=c[n]=c[n]||[];if(o.levelIsComplete(n,e))return p;!function(){var t=function(t){if(o.validateLayersElesOrdering(t,e),o.levelIsComplete(t,e))return u=c[t],!0},i=function(e){if(!u)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};i(1),i(-1);for(var a=p.length-1;a>=0;a--){var s=p[a];s.invalid&&r.removeFromArray(p,s)}}();var f=function(t){var r=(t=t||{}).after;if(function(){if(!l){l=i.makeBoundingBox();for(var t=0;t16e6)return null;var a=o.makeLayer(l,n);if(null!=r){var s=p.indexOf(r)+1;p.splice(s,0,a)}else(void 0===t.insert||t.insert)&&p.unshift(a);return a};if(o.skipping&&!s)return null;for(var h=null,g=e.length/1,m=!s,v=0;v=g||!i.boundingBoxInBoundingBox(h.bb,b.boundingBox()))&&!(h=f({insert:!0,after:h})))return null;u||m?o.queueLayer(h,b):o.drawEleInLayer(h,b,n,t),h.eles.push(b),x[n]=h}}return u||(m?null:p)},u.getEleLevelForLayerLevel=function(e,t){return e},u.drawEleInLayer=function(e,t,n,r){var i=this.renderer,o=e.context,a=t.boundingBox();if(0!==a.w&&0!==a.h&&t.visible()){var s=this.eleTxrCache,l=s.reasons.highQuality;n=this.getEleLevelForLayerLevel(n,r);var u=s.getElement(t,a,null,n,l);u?(p(o,!1),o.drawImage(u.texture.canvas,u.x,0,u.width,u.height,a.x1,a.y1,a.w,a.h),p(o,!0)):i.drawElement(o,t)}},u.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===t.length},u.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},u.invalidateElements=function(e){var t=this;t.lastInvalidationTime=r.performanceNow(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,function(e,n,r){t.invalidateLayer(e)})},u.invalidateLayer=function(e){if(this.lastInvalidationTime=r.performanceNow(),!e.invalid){var t=e.level,n=e.eles,i=this.layersByLevel[t];r.removeFromArray(i,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:p;e.lineWidth=h,e.lineCap="butt",i.strokeStyle(e,d[0],d[1],d[2],n),i.drawEdgePath(t,e,o.allpts,f)},m=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;i.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var v=t.pstyle("ghost-offset-x").pfValue,b=t.pstyle("ghost-offset-y").pfValue,y=t.pstyle("ghost-opacity").value,x=p*y;e.translate(v,b),g(x),m(x),e.translate(-v,-b)}g(),m(),function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u;e.lineWidth=l,"self"!==o.edgeType||a?e.lineCap="round":e.lineCap="butt",i.strokeStyle(e,c[0],c[1],c[2],n),i.drawEdgePath(t,e,o.allpts,"solid")}(),i.drawElementText(e,t,r),n&&e.translate(s.x1,s.y1)}},drawEdgePath:function(e,t,n,r){var i=e._private.rscratch,o=t,a=void 0,s=!1,l=this.usePaths();if(l){var u=n.join("$");i.pathCacheKey&&i.pathCacheKey===u?(a=t=i.pathCache,s=!0):(a=t=new Path2D,i.pathCacheKey=u,i.pathCache=a)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash([6,3]);break;case"solid":o.setLineDash([])}if(!s&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":if(e.hasClass("horizontal")){var c=n[4],d=n[5],p=(n[0]+n[4])/2;t.lineTo(n[0]+10,n[1]),t.bezierCurveTo(p,n[1],p,n[5],n[4]-10,n[5]),t.lineTo(c,d)}else if(e.hasClass("vertical")){var f=n[4],h=n[5],g=(n[1]+n[5])/2;t.bezierCurveTo(n[0],g,n[4],g,n[4],n[5]-10),t.lineTo(f,h)}else for(var m=2;m+30||_>0&&$>0){var S=a-E;switch(m){case"left":S-=c;break;case"center":S-=c/2}var C=s-d-E,T=c+2*E,A=d+2*E;if(k>0){var P=e.fillStyle,O=t.pstyle("text-background-color").value;e.fillStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+k*o+")","roundrectangle"==t.pstyle("text-background-shape").strValue?function(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()}(e,S,C,T,A,2):e.fillRect(S,C,T,A),e.fillStyle=P}if(_>0&&$>0){var R=e.strokeStyle,I=e.lineWidth,j=t.pstyle("text-border-color").value,D=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+j[0]+","+j[1]+","+j[2]+","+$*o+")",e.lineWidth=_,e.setLineDash)switch(D){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=_/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(S,C,T,A),"double"===D){var N=_/2;e.strokeRect(S+N,C+N,T-2*N,A-2*N)}e.setLineDash&&e.setLineDash([]),e.lineWidth=I,e.strokeStyle=R}}var M=2*t.pstyle("text-outline-width").pfValue;if(M>0&&(e.lineWidth=M),"wrap"===t.pstyle("text-wrap").value){var z=r.getPrefixedProperty(i,"labelWrapCachedLines",n),L=d/z.length;switch(v){case"top":s-=(z.length-1)*L;break;case"center":case"bottom":s-=(z.length-1)*L}for(var q=0;q0&&e.strokeText(z[q],a,s),e.fillText(z[q],a,s),s+=L}else M>0&&e.strokeText(l,a,s),e.fillText(l,a,s);0!==b&&(e.rotate(-b),e.translate(-x,-w))}}},e.exports=o},function(e,t,n){"use strict";var r=n(0),i={drawNode:function(e,t,n,i){var o,a,s=this,l=t._private,u=l.rscratch,c=t.position();if(r.number(c.x)&&r.number(c.y)&&t.visible()){var d=t.effectiveOpacity(),p=s.usePaths(),f=void 0,h=!1,g=t.padding();o=t.width()+2*g,a=t.height()+2*g;var m=void 0;n&&(m=n,e.translate(-m.x1,-m.y1));for(var v=t.pstyle("background-image").value,b=new Array(v.length),y=new Array(v.length),x=0,w=0;w0&&void 0!==arguments[0]?arguments[0]:C;s.fillStyle(e,S[0],S[1],S[2],t)},R=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P;s.strokeStyle(e,T[0],T[1],T[2],t)},I=t.pstyle("shape").strValue,j=t.pstyle("shape-polygon-points").pfValue;if(p){var D=I+"$"+o+"$"+a+("polygon"===I?"$"+j.join("$"):"");e.translate(c.x,c.y),u.pathCacheKey===D?(f=u.pathCache,h=!0):(f=new Path2D,u.pathCacheKey=D,u.pathCache=f)}var N=function(){if(!h){var n=c;p&&(n={x:0,y:0}),s.nodeShapes[s.getNodeShape(t)].draw(f||e,n.x,n.y,o,a)}p?e.fill(f):e.fill()},M=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,r=l.backgrounding,i=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;s.hasPie(t)&&(s.drawPie(e,t,r),n&&(p||s.nodeShapes[s.getNodeShape(t)].draw(e,c.x,c.y,o,a)))},L=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,n=(_>0?_:-_)*t,r=_>0?0:255;0!==_&&(s.fillStyle(e,r,r,r,n),p?e.fill(f):e.fill())},q=function(){if(E>0){if(e.lineWidth=E,e.lineCap="butt",e.setLineDash)switch(A){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}if(p?e.stroke(f):e.stroke(),"double"===A){e.lineWidth=E/3;var t=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",p?e.stroke(f):e.stroke(),e.globalCompositeOperation=t}e.setLineDash&&e.setLineDash([])}};if("yes"===t.pstyle("ghost").value){var B=t.pstyle("ghost-offset-x").pfValue,V=t.pstyle("ghost-offset-y").pfValue,F=t.pstyle("ghost-opacity").value,U=F*d;e.translate(B,V),O(F*C),N(),M(U),z(0!==_||0!==E),L(U),R(F*P),q(),e.translate(-B,-V)}O(),N(),M(),z(0!==_||0!==E),L(),R(),q(),p&&e.translate(-c.x,-c.y),s.drawElementText(e,t,i),function(){var n=t.pstyle("overlay-padding").pfValue,r=t.pstyle("overlay-opacity").value,i=t.pstyle("overlay-color").value;r>0&&(s.fillStyle(e,i[0],i[1],i[2],r),s.nodeShapes.roundrectangle.draw(e,c.x,c.y,o+2*n,a+2*n),e.fill())}(),n&&e.translate(m.x1,m.y1)}},hasPie:function(e){return(e=e[0])._private.hasPie},drawPie:function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),o=t.pstyle("pie-size"),a=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,d=0;this.usePaths()&&(a=0,s=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,m=f/100;m+d>1&&(m=1-d);var v=1.5*Math.PI+2*Math.PI*d,b=v+2*Math.PI*m;0===f||d>=1||d+m>1||(e.beginPath(),e.moveTo(a,s),e.arc(a,s,c,v,b),e.closePath(),this.fillStyle(e,h[0],h[1],h[2],g),e.fill(),d+=m)}}};e.exports=i},function(e,t,n){"use strict";var r={},i=n(1);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;is.minMbLowQualFrames&&(s.motionBlurPxRatio=s.mbPxRBlurry)),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!p&&(d[s.NODE]=!0,d[s.SELECT_BOX]=!0);var y=u.style()._private.coreStyle,x=u.zoom(),w=void 0!==o?o:x,k=u.pan(),$={x:k.x,y:k.y},_={zoom:x,pan:{x:k.x,y:k.y}},E=s.prevViewport;void 0===E||_.zoom!==E.zoom||_.pan.x!==E.pan.x||_.pan.y!==E.pan.y||m&&!g||(s.motionBlurPxRatio=1),a&&($=a),w*=l,$.x*=l,$.y*=l;var S=s.getCachedZSortedEles();function C(e,t,n,r,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",s.fillStyle(e,255,255,255,s.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=o}function T(e,r){var i,l,u,d;s.clearingMotionBlur||e!==c.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&e!==c.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(i=$,l=w,u=s.canvasWidth,d=s.canvasHeight):(i={x:k.x*h,y:k.y*h},l=x*h,u=s.canvasWidth*h,d=s.canvasHeight*h),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?C(e,0,0,u,d):t||void 0!==r&&!r||e.clearRect(0,0,u,d),n||(e.translate(i.x,i.y),e.scale(l,l)),a&&e.translate(a.x,a.y),o&&e.scale(o,o)}if(p||(s.textureDrawLastFrame=!1),p){if(s.textureDrawLastFrame=!0,!s.textureCache){s.textureCache={},s.textureCache.bb=u.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER];var A=s.data.bufferContexts[s.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:l*s.textureMult}),(_=s.textureCache.viewport={zoom:u.zoom(),pan:u.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom}}d[s.DRAG]=!1,d[s.NODE]=!1;var P=c.contexts[s.NODE],O=s.textureCache.texture;_=s.textureCache.viewport;s.textureCache.bb,P.setTransform(1,0,0,1,0,0),f?C(P,0,0,_.width,_.height):P.clearRect(0,0,_.width,_.height);var R=y["outside-texture-bg-color"].value,I=y["outside-texture-bg-opacity"].value;s.fillStyle(P,R[0],R[1],R[2],I),P.fillRect(0,0,_.width,_.height);x=u.zoom();T(P,!1),P.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/l,_.height/_.zoom/l),P.drawImage(O,_.mpan.x,_.mpan.y,_.width/_.zoom/l,_.height/_.zoom/l)}else s.textureOnViewport&&!t&&(s.textureCache=null);var j=u.extent(),D=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles,N=s.hideEdgesOnViewport&&D,M=[];if(M[s.NODE]=!d[s.NODE]&&f&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,M[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),M[s.DRAG]=!d[s.DRAG]&&f&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,M[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),d[s.NODE]||n||r||M[s.NODE]){var z=f&&!M[s.NODE]&&1!==h;T(P=t||(z?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:c.contexts[s.NODE]),f&&!z?"motionBlur":void 0),N?s.drawCachedNodes(P,S.nondrag,l,j):s.drawLayeredElements(P,S.nondrag,l,j),s.debug&&s.drawDebugPoints(P,S.nondrag),n||f||(d[s.NODE]=!1)}if(!r&&(d[s.DRAG]||n||M[s.DRAG])){z=f&&!M[s.DRAG]&&1!==h;T(P=t||(z?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:c.contexts[s.DRAG]),f&&!z?"motionBlur":void 0),N?s.drawCachedNodes(P,S.drag,l,j):s.drawCachedElements(P,S.drag,l,j),s.debug&&s.drawDebugPoints(P,S.drag),n||f||(d[s.DRAG]=!1)}if(s.showFps||!r&&d[s.SELECT_BOX]&&!n){if(T(P=t||c.contexts[s.SELECT_BOX]),1==s.selection[4]&&(s.hoverData.selecting||s.touchData.selecting)){x=s.cy.zoom();var L=y["selection-box-border-width"].value/x;P.lineWidth=L,P.fillStyle="rgba("+y["selection-box-color"].value[0]+","+y["selection-box-color"].value[1]+","+y["selection-box-color"].value[2]+","+y["selection-box-opacity"].value+")",P.fillRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]),L>0&&(P.strokeStyle="rgba("+y["selection-box-border-color"].value[0]+","+y["selection-box-border-color"].value[1]+","+y["selection-box-border-color"].value[2]+","+y["selection-box-opacity"].value+")",P.strokeRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]))}if(c.bgActivePosistion&&!s.hoverData.selecting){x=s.cy.zoom();var q=c.bgActivePosistion;P.fillStyle="rgba("+y["active-bg-color"].value[0]+","+y["active-bg-color"].value[1]+","+y["active-bg-color"].value[2]+","+y["active-bg-opacity"].value+")",P.beginPath(),P.arc(q.x,q.y,y["active-bg-size"].pfValue/x,0,2*Math.PI),P.fill()}var B=s.lastRedrawTime;if(s.showFps&&B){B=Math.round(B);var V=Math.round(1e3/B);P.setTransform(1,0,0,1,0,0),P.fillStyle="rgba(255, 0, 0, 0.75)",P.strokeStyle="rgba(255, 0, 0, 0.75)",P.lineWidth=1,P.fillText("1 frame = "+B+" ms = "+V+" fps",0,20);P.strokeRect(0,30,250,20),P.fillRect(0,30,250*Math.min(V/60,1),20)}n||(d[s.SELECT_BOX]=!1)}if(f&&1!==h){var F=c.contexts[s.NODE],U=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],H=c.contexts[s.DRAG],W=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],G=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!b?e.clearRect(0,0,s.canvasWidth,s.canvasHeight):C(e,0,0,s.canvasWidth,s.canvasHeight);var r=h;e.drawImage(t,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)};(d[s.NODE]||M[s.NODE])&&(G(F,U,M[s.NODE]),d[s.NODE]=!1),(d[s.DRAG]||M[s.DRAG])&&(G(H,W,M[s.DRAG]),d[s.DRAG]=!1)}s.prevViewport=_,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),f&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!p,s.mbFrames=0,d[s.NODE]=!0,d[s.DRAG]=!0,s.redraw()},100)),t||u.emit("render")},e.exports=r},function(e,t,n){"use strict";for(var r=n(2),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;l0&&a>0){f.clearRect(0,0,o,a),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),f.scale(1/u,1/u),f.translate(n.x1*u,n.y1*u);else{var g=t.pan(),m={x:g.x*u,y:g.y*u};u*=t.zoom(),f.translate(m.x,m.y),f.scale(u,u),this.drawElements(f,h),f.scale(1/u,1/u),f.translate(-m.x,-m.y)}e.bg&&(f.globalCompositeOperation="destination-over",f.fillStyle=e.bg,f.rect(0,0,o,a),f.fill())}return p},i.png=function(e){return a(e,this.bufferCanvasImage(e),"image/png")},i.jpg=function(e){return a(e,this.bufferCanvasImage(e),"image/jpeg")},e.exports=i},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);case"bottomroundrectangle":return this.drawBottomRoundRectanglePath(t,n,r,i,o);case"barrel":return this.drawBarrelPath(t,n,r,i,o)}}};e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(1),o=n(18),a=function e(){if(!(this instanceof e))return new e;this.length=0},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\n")}]),e.exports=n},function(e,t,n){(e.exports=n(20)(!1)).push([e.i,"\n.cy-context-menus-cxt-menu {\n display:none;\n z-index:1000;\n position:absolute;\n border:1px solid #A0A0A0;\n padding: 0;\n margin: 0;\n width:auto;\n}\n\n.cy-context-menus-cxt-menuitem {\n display:block;\n z-index:1000;\n width: 100%;\n padding: 3px 20px;\n position:relative;\n margin:0;\n background-color:#f8f8f8;\n font-weight:normal;\n font-size: 12px;\n white-space:nowrap;\n border: 0;\n text-align: left;\n}\n\n.cy-context-menus-cxt-menuitem:enabled {\n color: #000000;\n}\n\n.cy-context-menus-ctx-operation:focus {\n outline: none;\n}\n\n.cy-context-menus-cxt-menuitem:hover {\n color: #ffffff;\n text-decoration: none;\n background-color: #0B9BCD;\n background-image: none;\n cursor: pointer;\n}\n\n.cy-context-menus-cxt-menuitem[content]:before {\n content:attr(content);\n}\n\n.cy-context-menus-divider {\n border-bottom:1px solid #A0A0A0;\n}\n",""])},function(e,t,n){var r=n(155);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(19)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";n(156);const r=n(154),i=n(11),o=n(14),a=n(153);n(146)(a,o);const s=n(145);a.use(s),angular.module("dbt").directive("graphViz",["$q","$state","graph","selectorService","project","$timeout",function(e,t,n,s,l,u){return{restrict:"EA",replace:!0,scope:{vizElements:"=",vizLayout:"=",vizOptions:"=",vizStyle:"=",vizReady:"=",vizExtensions:"=",vizHideOptions:"=",vizSize:"=",vizRendered:"="},link:function(e,r,d,p){var f=c;e.$watch("vizSize",function(e,t){u(function(){h.resize(),"fullscreen"==e?h.fit(100):h.fit(25)})}),o(".viz-option").on("changed.bs.select",function(e){o(e.target).data("option"),o(e.target).val()});var h=a(i.assign({},e.vizOptions,{container:document.getElementById("cy"),style:e.vizStyle||[],elements:e.vizElements||[],layout:e.vizLayout||{name:"circle"}}));window.graph||(window.graph=h);e.graphReady&&o(window).on("load",function(){h.ready(e.graphReady)});h.on("select",function(t){var r=t.target;e.$apply(function(){n.selectNode(r.id()),h.forceRender()})}),h.on("unselect",function(t){t.target;e.$apply(function(){n.deselectNodes(),h.forceRender()})}),e.$watch("vizElements",function(t,n){h.remove(h.elements()),h.add(t),f(e,h),console.log("elements changed, UPDATE")}),e.$watch("vizLayout",function(t,n){t!==n&&f(e,h)},!0),e.$watch("vizOptions",function(e,t){e!==t&&i.each(e,function(e,t){h[t],h[t](e)})},!0),e.$watch("vizStyle",function(e,t){e!==t&&(console.log("Setting styles"),h.setStyle(e))},!0),e.$on("$destroy",function(){h.destroy()});h.contextMenus({menuItems:[{id:"jump",content:"Refocus on Node",selector:"node",tooltipText:"Focus on the lineage for this node",onClickFunction:function(e){var n=e.target||e.cyTarget,r=n.id();t.go("dbt.model",{unique_id:r})},show:!0},{id:"docs",content:"View documentation",selector:"node",tooltipText:"Jump to the documentation for this node",onClickFunction:function(e){var r=e.target||e.cyTarget,i=r.id();t.go("dbt.model",{unique_id:i}),n.hideGraph()},show:!0},{id:"hide-before-here",content:"Hide this and parents",selector:"node",onClickFunction:function(e){var t=e.target||e.cyTarget,r=t.id(),i=l.node(r);if(i){var o=s.excludeNode(i,{parents:!0});n.updateGraph(o)}},show:!0},{id:"hide-after-here",content:"Hide this and children",selector:"node",onClickFunction:function(e){var t=e.target||e.cyTarget,r=t.id(),i=l.node(r);if(i){var o=s.excludeNode(i,{children:!0});n.updateGraph(o)}},show:!0}],menuItemClasses:["graph-node-context-menu-item"],contextMenuClasses:["graph-node-context-menu"]})},templateUrl:r};function c(e,t){if(e.vizLayout&&e.vizLayout.name){t.layout(e.vizLayout).run();e.vizRendered(t)}}}])},function(e,t){var n="/components/graph/graph-launcher.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n
    \n \n\n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    Lineage Graph
    \n
    \n
    \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n')}]),e.exports=n},function(e,t,n){"use strict";const r=n(158),i=n(11),o=n(14);angular.module("dbt").directive("graphLauncher",["$q","graph","selectorService","project","trackingService","locationService",function(e,t,n,a,s,l){return{restrict:"EA",replace:!0,scope:{},templateUrl:r,link:function(e,r){e.filters_visible=!1,e.graphService=t,e.selectorService=n;var a={node_types:{visible:!1},packages:{visible:!1}};e.onWindowClick=function(e){o(e.target);var t=o(e.target).closest(".dropup");t.length||(a.node_types.visible=!1,a.packages.visible=!1);var n=t.data("form-type");i.each(a,function(e,t){t!=n&&(e.visible=!1)}),o(e.target).closest("#graph-viz-wrapper").length&&setTimeout(function(){o(":focus").blur()})},e.onSelectClick=function(e){i.each(a,function(t,n){n==e&&(t.visible=!t.visible,t.visible||o(":focus").blur())})},e.isVisible=function(e){return a[e].visible},e.isSelected=function(e,t){return-1!=n.selection.dirty[e].indexOf(t)},e.onItemSelect=function(t,r,o){var a=n.selection.dirty;e.isSelected(t,r)?a[t]=i.without(a[t],r):a[t]=i.union(a[t],[r]),o.preventDefault()},e.onSelectBlur=function(t,n){n&&(n.relatedTarget&&"SELECT"!=n.relatedTarget.tagName||e.isVisible(t)&&o(n.target).focus())},e.selectionLabel=function(e){var t=n.selection.dirty[e],r=n.options[e];return 0==t.length?"None selected":1==t.length?t[0]:t.length==r.length?"All selected":t.length+" selected"},e.onUpdateSelector=function(){var e=n.updateSelection(),r=t.updateGraph(e);s.track_graph_interaction("update-graph",r.length)},e.showExpanded=function(){var e=n.getViewNode(),r=e?e.name:null,i=t.showFullGraph(r);s.track_graph_interaction("show-expanded",i.length)},e.showContracted=function(){var e=n.getViewNode(),r=t.showVerticalGraph(e.name,!0);l.clearState(),s.track_graph_interaction("show-contracted",r.length)},e.closeGraph=function(){t.hideGraph(),l.clearState()},e.onLauncherClick=function(){var t=n.getViewNode();t?(n.resetSelection(t),e.showContracted()):(n.resetSelection(),e.showExpanded())},e.$watch(function(){return n.selection.dirty},function(e,r){if(n.isDirty()){var o=t.graph.pristine.dag,a=t.graph.pristine.nodes,s=n.selection.clean,l=n.selection.dirty,u=n.select_nodes(o,a,s),c=n.select_nodes(o,a,l),d=i.difference(u.nodes,c.nodes);t.markDirty(d)}else t.markAllClean()},!0)}}}])},function(e,t,n){n(159),n(157),n(105),n(103),n(99),n(97)},function(e,t,n){(e.exports=n(20)(!1)).push([e.i,"/*\n\ngithub.com style (c) Vasily Polovnyov \n\n*/\n\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n color: #333;\n background: #f8f8f8;\n}\n\n.hljs-comment,\n.hljs-quote {\n color: #998;\n font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-subst {\n color: #333;\n font-weight: bold;\n}\n\n.hljs-number,\n.hljs-literal,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag .hljs-attr {\n color: #008080;\n}\n\n.hljs-string,\n.hljs-doctag {\n color: #d14;\n}\n\n.hljs-title,\n.hljs-section,\n.hljs-selector-id {\n color: #900;\n font-weight: bold;\n}\n\n.hljs-subst {\n font-weight: normal;\n}\n\n.hljs-type,\n.hljs-class .hljs-title {\n color: #458;\n font-weight: bold;\n}\n\n.hljs-tag,\n.hljs-name,\n.hljs-attribute {\n color: #000080;\n font-weight: normal;\n}\n\n.hljs-regexp,\n.hljs-link {\n color: #009926;\n}\n\n.hljs-symbol,\n.hljs-bullet {\n color: #990073;\n}\n\n.hljs-built_in,\n.hljs-builtin-name {\n color: #0086b3;\n}\n\n.hljs-meta {\n color: #999;\n font-weight: bold;\n}\n\n.hljs-deletion {\n background: #fdd;\n}\n\n.hljs-addition {\n background: #dfd;\n}\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n",""])},function(e,t,n){var r=n(161);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(19)(r,i);r.locals&&(e.exports=r.locals)},function(e,t){!function(e,t){"use strict";function n(n){try{var i=t.querySelectorAll("code.hljs");for(var o in i)i.hasOwnProperty(o)&&r(i[o],n)}catch(t){e.console.error("LineNumbers error: ",t)}}function r(e,t){if("object"==typeof e){var n=(t=t||{singleLine:!1}).singleLine?0:1;s(function(){(function e(t){var n=t.childNodes;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];a(o.textContent)>0&&(o.childNodes.length>0?e(o):i(o.parentNode))}})(e),e.innerHTML=function(e,t){var n=o(e);if(""===n[n.length-1].trim()&&n.pop(),n.length>t){for(var r="",i=0,a=n.length;i
    {6}
    ',[p,c,f,h,d,i+1,n[i].length>0?n[i]:" "]);return l('{1}
    ',[u,r])}return e}(e.innerHTML,n)})}}function i(e){var t=e.className;if(/hljs-/.test(t)){for(var n=o(e.innerHTML),r=0,i="";r{1}\n',[t,n[r]]);e.innerHTML=i.trim()}}function o(e){return 0===e.length?[]:e.split(g)}function a(e){return(e.trim().match(g)||[]).length}function s(t){e.setTimeout(t,0)}function l(e,t){return e.replace(/\{(\d+)\}/g,function(e,n){return t[n]?t[n]:e})}var u="hljs-ln",c="hljs-ln-line",d="hljs-ln-code",p="hljs-ln-numbers",f="hljs-ln-n",h="data-line-number",g=/\r\n|\r|\n/g;e.hljs?(e.hljs.initLineNumbersOnLoad=function(r){"complete"===t.readyState?n(r):e.addEventListener("DOMContentLoaded",function(){n(r)})},e.hljs.lineNumbersBlock=r,function(){var e=t.createElement("style");e.type="text/css",e.innerHTML=l(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[u,f,h]),t.getElementsByTagName("head")[0].appendChild(e)}()):e.console.error("highlight.js not detected!")}(window,document)},function(e,t){e.exports=function(e){var t=e.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*#]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",end:/;/,endsWithParent:!0,lexemes:/[\w\.]+/,keywords:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE,{begin:'""'}]},{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t]},e.C_BLOCK_COMMENT_MODE,t]}}},function(e,t,n){(function(t){!function(t){"use strict";var n={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:g,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:g,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:g,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n?(?!hr|heading|lheading| {0,3}>|tag)[^\n]+)+)/,text:/^[^\n]+/};function r(e){this.tokens=[],this.tokens.links={},this.options=e||v.defaults,this.rules=n.normal,this.options.gfm&&(this.options.tables?this.rules=n.tables:this.rules=n.gfm)}n._label=/(?:\\[\[\]]|[^\[\]])+/,n._title=/(?:"(?:\\"|[^"]|"[^"\n]*")*"|'\n?(?:[^'\n]+\n?)*'|\([^()]*\))/,n.def=d(n.def).replace("label",n._label).replace("title",n._title).getRegex(),n.bullet=/(?:[*+-]|\d+\.)/,n.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,n.item=d(n.item,"gm").replace(/bull/g,n.bullet).getRegex(),n.list=d(n.list).replace(/bull/g,n.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+n.def.source+")").getRegex(),n._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b",n.html=d(n.html).replace("comment",//).replace("closed",/<(tag)[\s\S]+?<\/\1>/).replace("closing",/\s]*)*?\/?>/).replace(/tag/g,n._tag).getRegex(),n.paragraph=d(n.paragraph).replace("hr",n.hr).replace("heading",n.heading).replace("lheading",n.lheading).replace("tag","<"+n._tag).getRegex(),n.blockquote=d(n.blockquote).replace("paragraph",n.paragraph).getRegex(),n.normal=m({},n),n.gfm=m({},n.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),n.gfm.paragraph=d(n.paragraph).replace("(?!","(?!"+n.gfm.fences.source.replace("\\1","\\2")+"|"+n.list.source.replace("\\1","\\3")+"|").getRegex(),n.tables=m({},n.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),r.rules=n,r.lex=function(e,t){return new r(t).lex(e)},r.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},r.prototype.token=function(e,t){var r,i,o,a,s,l,u,c,d,p,f;for(e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},c=0;c ?/gm,""),this.token(o,t),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),f=(a=o[2]).length>1,this.tokens.push({type:"list_start",ordered:f,start:f?+a:""}),r=!1,p=(o=o[0].match(this.rules.item)).length,c=0;c1&&s.length>1||(e=o.slice(c+1).join("\n")+e,c=p-1)),i=r||/\n\n(?!\s*$)/.test(l),c!==p-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(l,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),o[3]&&(o[3]=o[3].substring(1,o[3].length-1)),d=o[1].toLowerCase(),this.tokens.links[d]||(this.tokens.links[d]={href:o[2],title:o[3]});else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:g,tag:/^|^<\/?[a-zA-Z0-9\-]+(?:"[^"]*"|'[^']*'|\s[^<'">\/\s]*)*?\/?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^_([^\s_](?:[^_]|__)+?[^\s_])_\b|^\*((?:\*\*|[^*])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:g,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function c(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function d(e,t){return e=e.source,t=t||"",{replace:function(t,n){return n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function p(e,t){return f[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?f[" "+e]=e+"/":f[" "+e]=e.replace(/[^/]*$/,"")),e=f[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=d(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._inside=/(?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]]|\](?=[^\[]*\]))*/,i._href=/\s*?(?:\s+['"]([\s\S]*?)['"])?\s*/,i.link=d(i.link).replace("inside",i._inside).replace("href",i._href).getRegex(),i.reflink=d(i.reflink).replace("inside",i._inside).getRegex(),i.normal=m({},i),i.pedantic=m({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),i.gfm=m({},i.normal,{escape:d(i.escape).replace("])","~|])").getRegex(),url:d(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",i._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:d(i.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),i.breaks=m({},i.gfm,{br:d(i.br).replace("{2,}","*").getRegex(),text:d(i.gfm.text).replace("{2,}","*").getRegex()}),o.rules=i,o.output=function(e,t,n){return new o(t,n).output(e)},o.prototype.output=function(e){for(var t,n,r,i,o="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),o+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),r="@"===i[2]?"mailto:"+(n=u(this.mangle(i[1]))):n=u(i[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):u(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,o+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),o+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),o+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),o+=this.renderer.codespan(u(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),o+=this.renderer.text(u(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else i[0]=this.rules._backpedal.exec(i[0])[0],e=e.substring(i[0].length),"@"===i[2]?r="mailto:"+(n=u(i[0])):(n=u(i[0]),r="www."===i[1]?"http://"+n:n),o+=this.renderer.link(r,null,n);return o},o.prototype.outputLink=function(e,t){var n=u(t.href),r=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,u(e[1]))},o.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},o.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},a.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
    '+(n?e:u(e,!0))+"\n
    \n":"
    "+(n?e:u(e,!0))+"\n
    "},a.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},a.prototype.html=function(e){return e},a.prototype.heading=function(e,t,n){return"'+e+"\n"},a.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},a.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},a.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},a.prototype.paragraph=function(e){return"

    "+e+"

    \n"},a.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},a.prototype.tablerow=function(e){return"\n"+e+"\n"},a.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"\n"},a.prototype.strong=function(e){return""+e+""},a.prototype.em=function(e){return""+e+""},a.prototype.codespan=function(e){return""+e+""},a.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},a.prototype.del=function(e){return""+e+""},a.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(c(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}this.options.baseUrl&&!h.test(e)&&(e=p(this.options.baseUrl,e));var i='
    "},a.prototype.image=function(e,t,n){this.options.baseUrl&&!h.test(e)&&(e=p(this.options.baseUrl,e));var r=''+n+'":">"},a.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},l.parse=function(e,t){return new l(t).parse(e)},l.prototype.parse=function(e){this.inline=new o(e.links,this.options),this.inlineText=new o(e.links,m({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},l.prototype.next=function(){return this.token=this.tokens.pop()},l.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},l.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},l.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",o="";for(n="",e=0;eAn error occurred:

    "+u(e.message+"",!0)+"
    ";throw e}}g.exec=g,v.options=v.setOptions=function(e){return m(v.defaults,e),v},v.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new a,xhtml:!1,baseUrl:null},v.Parser=l,v.parser=l.parse,v.Renderer=a,v.TextRenderer=s,v.Lexer=r,v.lexer=r.lex,v.InlineLexer=o,v.inlineLexer=o.output,v.parse=v,e.exports=v}(this||"undefined"!=typeof window&&window)}).call(this,n(13))},function(e,t){e.exports=function(e){if(!e)return e;var t,n=e.replace(/\t/g," ").split(/\r?\n/),r=null,i=n.length;for(t=0;t0)for(t=0;t"+e+""}t.error("angular-marked Error: marked not loaded. See installation instructions.")}]}).name},function(e,t){ +/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var r=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={x:-1,v:0,tension:null,friction:null},s=[0],l=0,u=void 0,c=void 0;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,a.tension=t,a.friction=r,u=(o=null!==i)?(l=e(t,r))/i*.016:.016;c=n(c||a,u),s.push(1+c.x),l+=16,Math.abs(c.x)>1e-4&&Math.abs(c.v)>1e-4;);return o?function(e){return s[e*(s.length-1)|0]}:l}}();e.exports=r},function(e,t,n){"use strict";var r=n(0);function i(e,t,n,r,i){if(1===r)return n;var o=i(t,n,r);return null==e?o:((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 o(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}e.exports=function(e,t,n,a,s){var l=null!=s?s.type:null;n<0?n=0:n>1&&(n=1);var u=o(e,s),c=o(t,s);if(r.number(u)&&r.number(c))return i(l,u,c,n,a);if(r.array(u)&&r.array(c)){for(var d=[],p=0;p0},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;r0;)e.removeChild(e.childNodes[0]);this._private.renderer=null},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};i.invalidateDimensions=i.resize,e.exports=i},function(e,t,n){"use strict";var r=n(0),i=n(7),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.$,e.exports=o},function(e,t,n){"use strict";var r=n(0),i=n(18),o={style:function(e){e&&this.setStyle(e).update();return 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}};e.exports=o},function(e,t,n){"use strict";var r=n(1),i=n(0),o=n(5),a={apply:function(e){var t=this._private,n=t.cy.collection();t.newStyle&&(t.contextStyles={},t.propDiffs={},this.cleanElements(e,!0));for(var r=0;r0;if(u||c){var d=void 0;u&&c?d=l.properties:u?d=l.properties:c&&(d=l.mappedProperties);for(var p=0;p0){n=!0;break}}t.hasPie=n;var i=e.pstyle("text-transform").strValue,o=e.pstyle("label").strValue,a=e.pstyle("source-label").strValue,s=e.pstyle("target-label").strValue,l=e.pstyle("font-style").strValue,u=e.pstyle("font-size").pfValue+"px",c=e.pstyle("font-family").strValue,d=e.pstyle("font-weight").strValue,p=l+"$"+u+"$"+c+"$"+d+"$"+i+"$"+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=p,t.sourceLabelKey=p+"$"+a,t.targetLabelKey=p+"$"+s,t.labelKey=p+"$"+o,t.fontKey=l+"$"+d+"$"+u+"$"+c,t.styleKey=Date.now()}},applyParsedProperty:function(e,t){var n=this,o=t,a=e._private.style,s=void 0,l=n.types,u=n.properties[o.name].type,c=o.bypass,d=a[o.name],p=d&&d.bypass,f=e._private,h=function(){n.checkZOrderTrigger(e,o.name,d?d.value:null,o.value)};if("curve-style"===t.name&&"haystack"===t.value&&e.isEdge()&&(e.isLoop()||e.source().isParent()||e.target().isParent())&&(o=t=this.parse(t.name,"bezier",c)),o.delete)return a[o.name]=void 0,h(),!0;if(o.deleteBypassed)return d?!!d.bypass&&(d.bypassed=void 0,h(),!0):(h(),!0);if(o.deleteBypass)return d?!!d.bypass&&(a[o.name]=d.bypassed,h(),!0):(h(),!0);var g=function(){r.error("Do not assign mappings to elements without corresponding data (e.g. ele `"+e.id()+"` for property `"+o.name+"` with data field `"+o.field+"`); try a `["+o.field+"]` selector to limit scope to elements with `"+o.field+"` defined")};switch(o.mapped){case l.mapData:for(var m=o.field.split("."),v=f.data,b=0;b1&&(y=1),u.color){var x=o.valueMin[0],w=o.valueMax[0],k=o.valueMin[1],$=o.valueMax[1],_=o.valueMin[2],E=o.valueMax[2],S=null==o.valueMin[3]?1:o.valueMin[3],C=null==o.valueMax[3]?1:o.valueMax[3],T=[Math.round(x+(w-x)*y),Math.round(k+($-k)*y),Math.round(_+(E-_)*y),Math.round(S+(C-S)*y)];s={bypass:o.bypass,name:o.name,value:T,strValue:"rgb("+T[0]+", "+T[1]+", "+T[2]+")"}}else{if(!u.number)return!1;var A=o.valueMin+(o.valueMax-o.valueMin)*y;s=this.parse(o.name,A,o.bypass,"mapping")}s||(s=this.parse(o.name,d.strValue,o.bypass,"mapping")),s||g(),s.mapping=o,o=s;break;case l.data:var P=o.field.split("."),O=f.data;if(O)for(var R=0;R0&&l>0){for(var c={},d=!1,p=0;p0?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.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(e,s),e.emitAndNotify("style"),a.transitioning=!1)},checkZOrderTrigger:function(e,t,n,r){var i=this.properties[t];null==i.triggersZOrder||null!=n&&!i.triggersZOrder(n,r)||this._private.cy.notify({type:"zorder",eles:e})}};e.exports=a},function(e,t,n){"use strict";var r=n(0),i=n(1),o={applyBypass:function(e,t,n,o){var a=[];if("*"===t||"**"===t){if(void 0!==n)for(var s=0;sn.length?t.substr(n.length):""}function l(){o=o.length>a.length?o.substr(a.length):""}for(t=t.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(t.match(/^\s*$/))break;var u=t.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!u){r.error("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+t);break}n=u[0];var c=u[1];if("core"!==c)if(new i(c)._private.invalid){r.error("Skipping parsing of block: Invalid selector found in string stylesheet: "+c),s();continue}var d=u[2],p=!1;o=d;for(var f=[];;){if(o.match(/^\s*$/))break;var h=o.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!h){r.error("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+d),p=!0;break}a=h[0];var g=h[1],m=h[2];if(this.properties[g])this.parse(g,m)?(f.push({name:g,val:m}),l()):(r.error("Skipping property: Invalid property definition in: "+a),l());else r.error("Skipping property: Invalid property name in: "+a),l()}if(p){s();break}this.selector(c);for(var v=0;v node").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3,"curve-style":"haystack"}).selector(":parent <-> node").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).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},e.exports=o},function(e,t,n){"use strict";var r=n(1),i=n(0),o=n(2),a={parse:function(e,t,n,o){if(i.fn(t))return this.parseImplWarn(e,t,n,o);var a=[e,t,n,"mapping"===o||!0===o||!1===o||null==o?"dontcare":o].join("$"),s=this.propCache=this.propCache||{},l=void 0;return(l=s[a])||(l=s[a]=this.parseImplWarn(e,t,n,o)),(n||"mapping"===o)&&(l=r.copy(l))&&(l.value=r.copy(l.value)),l},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){e=r.camel2dash(e);var s=this.properties[e],l=t,u=this.types;if(!s)return null;if(void 0===t)return null;s.alias&&(s=s.pointsTo,e=s.name);var c=i.string(t);c&&(t=t.trim());var d=s.type;if(!d)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:u.fn,bypass:n};var p=void 0,f=void 0;if(!c||a);else{if(p=new RegExp(u.data.regex).exec(t)){if(n)return!1;var h=u.data;return{name:e,value:p,strValue:""+t,mapped:h,field:p[1],bypass:n}}if(f=new RegExp(u.mapData.regex).exec(t)){if(n)return!1;if(d.multiple)return!1;var g=u.mapData;if(!d.color&&!d.number)return!1;var m=this.parse(e,f[4]);if(!m||m.mapped)return!1;var v=this.parse(e,f[5]);if(!v||v.mapped)return!1;if(m.value===v.value)return!1;if(d.color){var b=m.value,y=v.value;if(!(b[0]!==y[0]||b[1]!==y[1]||b[2]!==y[2]||b[3]!==y[3]&&(null!=b[3]&&1!==b[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:f,strValue:""+t,mapped:g,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:m.value,valueMax:v.value,bypass:n}}}if(d.multiple&&"multiple"!==a){var x=void 0;if(x=c?t.split(/\s+/):i.array(t)?t:[t],d.evenMultiple&&x.length%2!=0)return null;for(var w=[],k=[],$=[],_=!1,E=0;Ed.max||d.strictMax&&t===d.max))return null;var R={name:e,value:t,strValue:""+t+(T||""),units:T,bypass:n};return d.unitless||"px"!==T&&"em"!==T?R.pfValue=t:R.pfValue="px"!==T&&T?this.getEmSizeInPixels()*t:t,"ms"!==T&&"s"!==T||(R.pfValue="ms"===T?t:1e3*t),"deg"!==T&&"rad"!==T||(R.pfValue="rad"===T?t:o.deg2rad(t)),"%"===T&&(R.pfValue=t/100),R}if(d.propList){var I=[],j=""+t;if("none"===j);else{for(var D=j.split(","),N=0;N0&&s>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:l=(l=(l=Math.min((a-2*t)/n.w,(s-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:l)t.maxZoom?t.maxZoom:s)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.emit(o.join(" ")),this.notify({type:"viewport"})),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("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());if(0!==e.length){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=i.getComputedStyle(t),n=function(t){return parseFloat(e.getPropertyValue(t))};return{width:t.clientWidth-n("padding-left")-n("padding-right"),height:t.clientHeight-n("padding-top")-n("padding-bottom")}}():{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}}};a.centre=a.center,a.autolockNodes=a.autolock,a.autoungrabifyNodes=a.autoungrabify,e.exports=a},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(7),a=n(12),s=n(95),l=n(0),u=n(11),c={},d={};function p(e,t,n){var s=n,d=function(n){r.error("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===e){if(a.prototype[t])return d(t);a.prototype[t]=n}else if("collection"===e){if(o.prototype[t])return d(t);o.prototype[t]=n}else if("layout"===e){for(var p=function(e){this.options=e,n.call(this,e),l.plainObject(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},h=p.prototype=Object.create(n.prototype),g=[],m=0;m0;)m();u=n.collection();for(var v=function(e){var t=h[e],n=t.maxDegree(!1),r=t.filter(function(e){return e.degree(!1)===n});u=u.add(r)},b=0;by.length-1;)y.push([]);y[J].push(X),Z.depth=J,Z.index=y[J].length-1}N()}var Q=0;if(t.avoidOverlap)for(var ee=0;eeu||0===t)&&(r+=l/c,i++)}return r/=i=Math.max(1,i),0===i&&(r=void 0),ie[e.id()]=r,r},ae=function(e,t){return oe(e)-oe(t)},se=0;se<3;se++){for(var le=0;le0&&y[0].length<=3?c/2:0),p=2*Math.PI/y[i].length*o;return 0===i&&1===y[0].length&&(d=1),{x:de+d*Math.cos(p),y:pe+d*Math.sin(p)}}return{x:de+(o+1-(a+1)/2)*s,y:(i+1)*u}}var f={x:de+(o+1-(a+1)/2)*s,y:(i+1)*u};return f},he={},ge=y.length-1;ge>=0;ge--)for(var me=y[ge],ve=0;ve1&&t.avoidOverlap){f*=1.75;var b=Math.cos(d)-Math.cos(0),y=Math.sin(d)-Math.sin(0),x=Math.sqrt(f*f/(b*b+y*y));p=Math.max(x,p)}return s.layoutPositions(this,t,function(e,n){var r=t.startAngle+n*d*(a?1:-1),i=p*Math.cos(r),o=p*Math.sin(r);return{x:u+i,y:c+o}}),this},e.exports=s},function(e,t,n){"use strict";var r=n(1),i=n(2),o={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,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function a(e){this.options=r.extend({},o,e)}a.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,o=t.eles.nodes().not(":parent"),a=i.makeBoundingBox(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=a.x1+a.w/2,l=a.y1+a.h/2,u=[],c=(t.startAngle,0),d=0;d0)Math.abs(b[0].value-x.value)>=m&&(b=[],v.push(b));b.push(x)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var k=v.length>0&&v[0].length>1,$=(Math.min(a.w,a.h)/2-w)/(v.length+k?1:0);w=Math.min(w,$)}for(var _=0,E=0;E1&&t.avoidOverlap){var A=Math.cos(T)-Math.cos(0),P=Math.sin(T)-Math.sin(0),O=Math.sqrt(w*w/(A*A+P*P));_=Math.max(O,_)}S.r=_,_+=w}if(t.equidistant){for(var R=0,I=0,j=0;j0)var c=(p=r.nodeOverlap*u)*o/(b=Math.sqrt(o*o+l*l)),d=p*l/b;else{var p,f=s(e,o,l),h=s(t,-1*o,-1*l),g=h.x-f.x,m=h.y-f.y,v=g*g+m*m,b=Math.sqrt(v);c=(p=(e.nodeRepulsion+t.nodeRepulsion)/v)*g/b,d=p*m/b}e.isLocked||(e.offsetX-=c,e.offsetY-=d),t.isLocked||(t.offsetX+=c,t.offsetY+=d)}},a=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},s=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&&0n?(u.x=r,u.y=i+o/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-a/2,u.y=i-a*n/2/t,u):0=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},l=function(e,t){for(var n=0;n1){var h=t.gravity*d/f,g=t.gravity*p/f;c.offsetX+=h,c.offsetY+=g}}}}},c=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(0n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},h=function e(t,n){var r=t.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],o=!1;return(null==i.maxX||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,o=!0),(null==i.minX||t.minX-i.padLefti.maxY)&&(i.maxY=t.maxY+i.padBottom,o=!0),(null==i.minY||t.minY-i.padTopg&&(p+=h+n.componentSpacing,d=0,f=0,h=0)}}}(0,n),t}).then(function(e){p.layoutNodes=e.layoutNodes,o.stop(),y()});var y=function(){!0===e.animate||!1===e.animate?b({force:!0,next:function(){n.one("layoutstop",e.stop),n.emit({type:"layoutstop",layout:n})}}):e.eles.nodes().layoutPositions(n,e,function(e){var t=p.layoutNodes[p.idToIndex[e.data("id")]];return{x:t.positionX,y:t.positionY}})};return this},u.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},u.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(),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:o.makeBoundingBox(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},l=n.eles.components(),u={},c=0;c0){s.graphSet.push($);for(c=0;c<$.length;c++)g[++v]=$[c]}}for(c=0;cr.count?0:r.graph},p=function e(t,n,r,i){var o=i.graphSet[r];if(-1a){var h=c(),g=d();(h-1)*g>=a?c(h-1):(g-1)*h>=a&&d(g-1)}else for(;u*l=a?d(v+1):c(m+1)}var b=o.w/u,y=o.h/l;if(t.condense&&(b=0,y=0),t.avoidOverlap)for(var x=0;x=u&&(O=0,P++)},I={},j=0;j(r=i.sqdistToFiniteLine(e,t,w[k],w[k+1],w[k+2],w[k+3])))return b(n,r),!0}else if("bezier"===a.edgeType||"multibezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType)for(w=a.allpts,k=0;k+5(r=i.sqdistToQuadraticBezier(e,t,w[k],w[k+1],w[k+2],w[k+3],w[k+4],w[k+5])))return b(n,r),!0;v=v||o.source,x=x||o.target;var $=l.getArrowWidth(s,c),_=[{name:"source",x:a.arrowStartX,y:a.arrowStartY,angle:a.srcArrowAngle},{name:"target",x:a.arrowEndX,y:a.arrowEndY,angle:a.tgtArrowAngle},{name:"mid-source",x:a.midX,y:a.midY,angle:a.midsrcArrowAngle},{name:"mid-target",x:a.midX,y:a.midY,angle:a.midtgtArrowAngle}];for(k=0;k<_.length;k++){var E=_[k],S=u.arrowShapes[n.pstyle(E.name+"-arrow-shape").value],C=n.pstyle("width").pfValue;if(S.roughCollide(e,t,$,E.angle,{x:E.x,y:E.y},C,h)&&S.collide(e,t,$,E.angle,{x:E.x,y:E.y},C,h))return b(n),!0}f&&d.length>0&&(y(v),y(x))}function w(e,t,n){return o.getPrefixedProperty(e,t,n)}function k(n,r){var o,a=n._private,s=m;o=r?r+"-":"";var l=n.pstyle(o+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=a.rstyle,c=n.pstyle("text-border-width").pfValue,d=n.pstyle("text-background-padding").pfValue,p=w(u,"labelWidth",r)+c+2*s+2*d,f=w(u,"labelHeight",r)+c+2*s+2*d,h=w(u,"labelX",r),g=w(u,"labelY",r),v=w(a.rscratch,"labelAngle",r),y=h-p/2,x=h+p/2,k=g-f/2,$=g+f/2;if(v){var _=Math.cos(v),E=Math.sin(v),S=function(e,t){return{x:(e-=h)*_-(t-=g)*E+h,y:e*E+t*_+g}},C=S(y,k),T=S(y,$),A=S(x,k),P=S(x,$),O=[C.x,C.y,A.x,A.y,P.x,P.y,T.x,T.y];if(i.pointInsidePolygonPoints(e,t,O))return b(n),!0}else{var R={w:p,h:f,x1:y,x2:x,y1:k,y2:$};if(i.inBoundingBox(R,e,t))return b(n),!0}}}n&&(c=c.interactive);for(var $=c.length-1;$>=0;$--){var _=c[$];_.isNode()?y(_)||k(_):x(_)||k(_)||k(_,"source")||k(_,"target")}return d},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;pb?b+"$-$"+v:v+"$-$"+b,g&&(t="unbundled$-$"+h.id);var y=c[t];null==y&&(y=c[t]=[],d.push(t)),y.push(Bt),g&&(y.hasUnbundled=!0),m&&(y.hasBezier=!0)}else p.push(Bt)}for(var x=0;xGt.id()){var k=Wt;Wt=Gt,Gt=k}Yt=Wt.position(),Xt=Gt.position(),Zt=Wt.outerWidth(),Jt=Wt.outerHeight(),Kt=Gt.outerWidth(),Qt=Gt.outerHeight(),n=l.nodeShapes[this.getNodeShape(Wt)],o=l.nodeShapes[this.getNodeShape(Gt)],s=!1;var $={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0},_=Yt.x,E=Yt.y,S=Zt,C=Jt,T=Xt.x,A=Xt.y,P=Kt,O=Qt,R=w.length;for(f=0;f=d||w){f={cp:b,segment:x};break}}if(f)break}b=f.cp;var k=(d-g)/(x=f.segment).length,$=x.t1-x.t0,_=c?x.t0+$*k:x.t1-$*k;_=r.bound(0,_,1),t=r.qbezierPtAt(b.p0,b.p1,b.p2,_),u=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 p(s,l)}(b.p0,b.p1,b.p2,_);break;case"straight":case"segments":case"haystack":var E,S,C,T,A=0,P=i.allpts.length;for(v=0;v+3=d));v+=2);_=(d-S)/E;_=r.bound(0,_,1),t=r.lineAt(C,T,_),u=p(C,T)}l("labelX",o,t.x),l("labelY",o,t.y),l("labelAutoAngle",o,u)}};u("source"),u("target"),this.applyLabelDimensions(e)}},a.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},a.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)},a.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;fd){for(var g=h.split(/\s+/),m="",v=0;vd)break;x+=i[k],k===i.length-1&&(w=!0)}return w||(x+="…"),x}return i},a.calculateLabelDimensions=function(e,t,n){var r=e._private.labelStyleKey+"$@$"+t;n&&(r+="$@$"+n);var i=this.labelDimCache||(this.labelDimCache={});if(i[r])return i[r];var o=e.pstyle("font-style").strValue,a=1*e.pstyle("font-size").pfValue+"px",s=e.pstyle("font-family").strValue,l=e.pstyle("font-weight").strValue,u=this.labelCalcDiv;u||(u=this.labelCalcDiv=document.createElement("div"),document.body.appendChild(u));var c=u.style;return c.fontFamily=s,c.fontStyle=o,c.fontSize=a,c.fontWeight=l,c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none",c.padding="0",c.lineHeight="1","wrap"===e.pstyle("text-wrap").value?c.whiteSpace="pre":c.whiteSpace="normal",u.textContent=t,i[r]={width:Math.ceil(u.clientWidth/1),height:Math.ceil(u.clientHeight/1)},i[r]},a.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},e.exports=a},function(e,t,n){"use strict";var r={getNodeShape:function(e){var t=e.pstyle("shape").value;if(e.isParent())return"rectangle"===t||"roundrectangle"===t||"cutrectangle"===t||"barrel"===t?t:"rectangle";if("polygon"===t){var n=e.pstyle("shape-polygon-points").value;return this.nodeShapes.makePolygon(n).name}return t}};e.exports=r},function(e,t,n){"use strict";var r={registerCalculationListeners:function(){var e=this.cy,t=e.collection(),n=this,r=function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.merge(e);for(var i=0;i=e.desktopTapThreshold2}var T=n(i);y&&(e.hoverData.tapholdCancelled=!0);s=!0,t(b,["mousemove","vmousemove","tapdrag"],i,{position:{x:f[0],y:f[1]}});var A=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||l.emit("boxstart"),m[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(y){var P={originalEvent:i,type:"cxtdrag",position:{x:f[0],y:f[1]}};w?w.emit(P):l.emit(P),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&b===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:i,type:"cxtdragout",position:{x:f[0],y:f[1]}}),e.hoverData.cxtOver=b,b&&b.emit({originalEvent:i,type:"cxtdragover",position:{x:f[0],y:f[1]}}))}}else if(e.hoverData.dragging){if(s=!0,l.panningEnabled()&&l.userPanningEnabled()){var O;if(e.hoverData.justStartedPan){var R=e.hoverData.mdownPos;O={x:(f[0]-R[0])*u,y:(f[1]-R[1])*u},e.hoverData.justStartedPan=!1}else O={x:k[0]*u,y:k[1]*u};l.panBy(O),e.hoverData.dragged=!0}f=e.projectIntoViewport(i.clientX,i.clientY)}else if(1!=m[4]||null!=w&&!w.isEdge()){if(w&&w.isEdge()&&w.active()&&w.unactivate(),w&&w.grabbed()||b==x||(x&&t(x,["mouseout","tapdragout"],i,{position:{x:f[0],y:f[1]}}),b&&t(b,["mouseover","tapdragover"],i,{position:{x:f[0],y:f[1]}}),e.hoverData.last=b),w)if(y){if(l.boxSelectionEnabled()&&T)w&&w.grabbed()&&(p($),w.emit("free")),A();else if(w&&w.grabbed()&&e.nodeIsDraggable(w)){var I=!e.dragData.didDrag;I&&e.redrawHint("eles",!0),e.dragData.didDrag=!0;var j=[];e.hoverData.draggingEles||c(l.collection($),{inDragLayer:!0});for(var D=0;D<$.length;D++){var N=$[D];if(e.nodeIsDraggable(N)&&N.grabbed()){var M=N.position();if(j.push(N),r.number(k[0])&&r.number(k[1])&&(M.x+=k[0],M.y+=k[1],I)){var z=e.hoverData.dragDelta;z&&r.number(z[0])&&r.number(z[1])&&(M.x+=z[0],M.y+=z[1])}}}e.hoverData.draggingEles=!0;var L=l.collection(j);L.dirtyCompoundBoundsCache(),L.emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(k[0]),t.push(k[1])):(t[0]+=k[0],t[1]+=k[1])}();s=!0}else if(y){if(e.hoverData.dragging||!l.boxSelectionEnabled()||!T&&l.panningEnabled()&&l.userPanningEnabled()){if(!e.hoverData.selecting&&l.panningEnabled()&&l.userPanningEnabled()){a(w,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,m[4]=0,e.data.bgActivePosistion=o.array2point(h),e.redrawHint("select",!0),e.redraw())}}else A();w&&w.isEdge()&&w.active()&&w.unactivate()}return m[2]=f[0],m[3]=f[1],s?(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),a=e.selection,s=e.findNearestElement(o[0],o[1],!0,!1),l=e.dragData.possibleDragElements,u=e.hoverData.down,c=n(r);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,u&&u.unactivate(),3===e.hoverData.which){var d={originalEvent:r,type:"cxttapend",position:{x:o[0],y:o[1]}};if(u?u.emit(d):i.emit(d),!e.hoverData.cxtDragged){var f={originalEvent:r,type:"cxttap",position:{x:o[0],y:o[1]}};u?u.emit(f):i.emit(f)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(null!=u||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||n(r)||(i.$(function(e){return e.selected()}).unselect(),l.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=l=[]),t(s,["mouseup","tapend","vmouseup"],r,{position:{x:o[0],y:o[1]}}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||t(u,["click","tap","vclick"],r,{position:{x:o[0],y:o[1]}}),s!=u||e.dragData.didDrag||e.hoverData.selecting||null!=s&&s._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||c?s.selected()?s.unselect():s.select():c||(i.$(":selected").unmerge(s).unselect(),s.select())),e.redrawHint("eles",!0)),e.hoverData.selecting){var h=i.collection(e.getAllInBox(a[0],a[1],a[2],a[3]));e.redrawHint("select",!0),h.length>0&&e.redrawHint("eles",!0),i.emit("boxend");var g=function(e){return e.selectable()&&!e.selected()};"additive"===i.selectionType()?h.emit("box").stdFilter(g).select().emit("boxselect"):(c||i.$(":selected").unmerge(h).unselect(),h.emit("box").stdFilter(g).select().emit("boxselect")),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!a[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var m=u&&u.grabbed();p(l),m&&u.emit("free")}}a[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 b,y,x,w,k,$,_,E,S,C,T,A,P;e.registerBinding(e.container,"wheel",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];e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4]?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]}}))}},!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.emit({originalEvent: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.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})},!1);var O,R,I,j,D=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},N=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",O=function(n){if(v(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 a=e.projectIntoViewport(n.touches[0].clientX,n.touches[0].clientY);i[0]=a[0],i[1]=a[1]}if(n.touches[1]){a=e.projectIntoViewport(n.touches[1].clientX,n.touches[1].clientY);i[2]=a[0],i[3]=a[1]}if(n.touches[2]){a=e.projectIntoViewport(n.touches[2].clientX,n.touches[2].clientY);i[4]=a[0],i[5]=a[1]}if(n.touches[1]){p(e.dragData.touchDragEles);var s=e.findContainerClientCoords();S=s[0],C=s[1],T=s[2],A=s[3],b=n.touches[0].clientX-S,y=n.touches[0].clientY-C,x=n.touches[1].clientX-S,w=n.touches[1].clientY-C,P=0<=b&&b<=T&&0<=x&&x<=T&&0<=y&&y<=A&&0<=w&&w<=A;var u=r.pan(),f=r.zoom();k=D(b,y,x,w),$=N(b,y,x,w),E=[((_=[(b+x)/2,(y+w)/2])[0]-u.x)/f,(_[1]-u.y)/f];if($<4e4&&!n.touches[2]){var h=e.findNearestElement(i[0],i[1],!0,!0),g=e.findNearestElement(i[2],i[3],!0,!0);return h&&h.isNode()?(h.activate().emit({originalEvent:n,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=h):g&&g.isNode()?(g.activate().emit({originalEvent:n,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=g):r.emit({originalEvent: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 m=e.findNearestElements(i[0],i[1],!0,!0),O=m[0];if(null!=O&&(O.activate(),e.touchData.start=O,e.touchData.starts=m,e.nodeIsGrabbable(O))){var R=e.dragData.touchDragEles=[],I=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),O.selected()?(I=r.$(function(t){return t.selected()&&e.nodeIsGrabbable(t)}),c(I,{addToList:R})):d(O,{addToList:R}),l(O);var j=function(e){return{originalEvent:n,type:e,position:{x:i[0],y:i[1]}}};O.emit(j("grabon")),I?I.forEach(function(e){e.emit(j("grab"))}):O.emit(j("grab"))}t(O,["touchstart","tapstart","vmousedown"],n,{position:{x:i[0],y:i[1]}}),null==O&&(e.data.bgActivePosistion={x:a[0],y:a[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 M=e.touchData.startPosition=[],z=0;z=e.touchTapThreshold2}if(i&&e.touchData.cxt){n.preventDefault();var I=n.touches[0].clientX-S,j=n.touches[0].clientY-C,M=n.touches[1].clientX-S,z=n.touches[1].clientY-C,L=N(I,j,M,z);if(L/$>=2.25||L>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var q={originalEvent:n,type:"cxttapend",position:{x:u[0],y:u[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(q),e.touchData.start=null):l.emit(q)}}if(i&&e.touchData.cxt){q={originalEvent:n,type:"cxtdrag",position:{x:u[0],y:u[1]}};e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(q):l.emit(q),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var B=e.findNearestElement(u[0],u[1],!0,!0);e.touchData.cxtOver&&B===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:n,type:"cxtdragout",position:{x:u[0],y:u[1]}}),e.touchData.cxtOver=B,B&&B.emit({originalEvent:n,type:"cxtdragover",position:{x:u[0],y:u[1]}}))}else if(i&&n.touches[2]&&l.boxSelectionEnabled())n.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||l.emit("boxstart"),e.touchData.selecting=!0,e.redrawHint("select",!0),s&&0!==s.length&&void 0!==s[0]?(s[2]=(u[0]+u[2]+u[4])/3,s[3]=(u[1]+u[3]+u[5])/3):(s[0]=(u[0]+u[2]+u[4])/3,s[1]=(u[1]+u[3]+u[5])/3,s[2]=(u[0]+u[2]+u[4])/3+1,s[3]=(u[1]+u[3]+u[5])/3+1),s[4]=1,e.touchData.selecting=!0,e.redraw();else if(i&&n.touches[1]&&l.zoomingEnabled()&&l.panningEnabled()&&l.userZoomingEnabled()&&l.userPanningEnabled()){if(n.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var V=0;V0)return h[0]}return null},f=Object.keys(d),h=0;h0?p:r.roundRectangleIntersectLine(o,a,e,t,n,i,s)},checkPoint:function(e,t,n,i,o,a,s){var l=r.getRoundRectangleRadius(i,o),u=2*l;if(r.pointInsidePolygon(e,t,this.points,a,s,i,o-u,[0,-1],n))return!0;if(r.pointInsidePolygon(e,t,this.points,a,s,i-u,o,[0,-1],n))return!0;var c=i/2+2*n,d=o/2+2*n,p=[a-c,s-d,a-c,s,a+c,s,a+c,s-d];return!!r.pointInsidePolygonPoints(e,t,p)||(!!r.checkInEllipse(e,t,u,u,a+i/2-l,s+o/2-l,n)||!!r.checkInEllipse(e,t,u,u,a-i/2+l,s+o/2-l,n))}}},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.generateBarrel(),this.generateBottomRoundrectangle(),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;s0&&t.data.lyrTxrCache.invalidateElements(n)})}l.CANVAS_LAYERS=3,l.SELECT_BOX=0,l.DRAG=1,l.NODE=2,l.BUFFER_COUNT=3,l.TEXTURE_BUFFER=0,l.MOTIONBLUR_BUFFER_NODE=1,l.MOTIONBLUR_BUFFER_DRAG=2,l.redrawHint=function(e,t){var n=this;switch(e){case"eles":n.data.canvasNeedsRedraw[l.NODE]=t;break;case"drag":n.data.canvasNeedsRedraw[l.DRAG]=t;break;case"select":n.data.canvasNeedsRedraw[l.SELECT_BOX]=t}};var c="undefined"!=typeof Path2D;l.path2dEnabled=function(e){if(void 0===e)return this.pathsEnabled;this.pathsEnabled=!!e},l.usePaths=function(){return c&&this.pathsEnabled},[n(126),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(134),n(135)].forEach(function(e){r.extend(l,e)}),e.exports=s},function(e,t,n){"use strict";var r=n(2),i=n(1),o=n(9),a=n(19),s={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},l=function(e){this.renderer=e,this.onDequeues=[],this.setupDequeueing()},u=l.prototype;u.reasons=s,u.getTextureQueue=function(e){return this.eleImgCaches=this.eleImgCaches||{},this.eleImgCaches[e]=this.eleImgCaches[e]||[]},u.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},u.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new o(function(e,t){return t.reqs-e.reqs})},u.getElementIdToQueue=function(){return this.eleIdToCacheQueue=this.eleIdToCacheQueue||{}},u.getElement=function(e,t,n,i,o){var a=this,l=this.renderer,u=e._private.rscratch,c=l.cy.zoom();if(0===t.w||0===t.h||!e.visible())return null;if(null==i&&(i=Math.ceil(r.log2(c*n))),i<-4)i=-4;else if(c>=3.99||i>2)return null;var d,p=Math.pow(2,i),f=t.h*p,h=t.w*p,g=u.imgCaches=u.imgCaches||{},m=g[i];if(m)return m;if(d=f<=25?25:f<=50?50:50*Math.ceil(f/50),f>1024||h>1024||e.isEdge()||e.isParent())return null;var v=a.getTextureQueue(d),b=v[v.length-2],y=function(){return a.recycleTexture(d,h)||a.addTexture(d,h)};b||(b=v[v.length-1]),b||(b=y()),b.width-b.usedWidthi;S--)C=a.getElement(e,t,n,S,s.downscale);T()}else{var A;if(!$&&!_&&!E)for(S=i-1;S>=-4;S--){var P;if(P=g[S]){A=P;break}}if(k(A))return a.queueElement(e,i),A;b.context.translate(b.usedWidth,0),b.context.scale(p,p),l.drawElement(b.context,e,t,w),b.context.scale(1/p,1/p),b.context.translate(-b.usedWidth,0)}return m=g[i]={ele:e,x:b.usedWidth,texture:b,level:i,scale:p,width:h,height:f,scaledLabelShown:w},b.usedWidth+=Math.ceil(h+8),b.eleCaches.push(m),a.checkTextureFullness(b),m},u.invalidateElement=function(e){var t=e._private.rscratch.imgCaches;if(t)for(var n=-4;n<=2;n++){var r=t[n];if(r){var o=r.texture;o.invalidatedWidth+=r.width,t[n]=null,i.removeFromArray(o.eleCaches,r),this.removeFromQueue(e),this.checkTextureUtility(o)}}},u.checkTextureUtility=function(e){e.invalidatedWidth>=.5*e.width&&this.retireTexture(e)},u.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?i.removeFromArray(t,e):e.fullnessChecks++},u.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t);i.removeFromArray(n,e),e.retired=!0;for(var r=e.eleCaches,o=0;o=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,i.clearArray(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),i.removeFromArray(r,a),n.push(a),a}},u.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementIdToQueue(),i=e.id(),o=r[i];if(o)o.level=Math.max(o.level,t),o.reqs++,n.updateItem(o);else{var a={ele:e,level:t,reqs:1};n.push(a),r[i]=a}},u.dequeue=function(e){for(var t=this.getElementQueue(),n=this.getElementIdToQueue(),r=[],i=0;i<1&&t.size()>0;i++){var o=t.pop(),a=o.ele;if(null==a._private.rscratch.imgCaches[o.level]){n[a.id()]=null,r.push(o);var l=a.boundingBox();this.getElement(a,l,e,o.level,s.dequeue)}}return r},u.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementIdToQueue(),r=n[e.id()];null!=r&&(r.reqs=i.MAX_INT,t.updateItem(r),t.pop(),n[e.id()]=null)},u.onDequeue=function(e){this.onDequeues.push(e)},u.offDequeue=function(e){i.removeFromArray(this.onDequeues,e)},u.setupDequeueing=a.setupDequeueing({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;o.validateLayersElesOrdering(n,e);var l,u,c=o.layersByLevel,d=Math.pow(2,n),p=c[n]=c[n]||[];if(o.levelIsComplete(n,e))return p;!function(){var t=function(t){if(o.validateLayersElesOrdering(t,e),o.levelIsComplete(t,e))return u=c[t],!0},i=function(e){if(!u)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};i(1),i(-1);for(var a=p.length-1;a>=0;a--){var s=p[a];s.invalid&&r.removeFromArray(p,s)}}();var f=function(t){var r=(t=t||{}).after;if(function(){if(!l){l=i.makeBoundingBox();for(var t=0;t16e6)return null;var a=o.makeLayer(l,n);if(null!=r){var s=p.indexOf(r)+1;p.splice(s,0,a)}else(void 0===t.insert||t.insert)&&p.unshift(a);return a};if(o.skipping&&!s)return null;for(var h=null,g=e.length/1,m=!s,v=0;v=g||!i.boundingBoxInBoundingBox(h.bb,b.boundingBox()))&&!(h=f({insert:!0,after:h})))return null;u||m?o.queueLayer(h,b):o.drawEleInLayer(h,b,n,t),h.eles.push(b),x[n]=h}}return u||(m?null:p)},u.getEleLevelForLayerLevel=function(e,t){return e},u.drawEleInLayer=function(e,t,n,r){var i=this.renderer,o=e.context,a=t.boundingBox();if(0!==a.w&&0!==a.h&&t.visible()){var s=this.eleTxrCache,l=s.reasons.highQuality;n=this.getEleLevelForLayerLevel(n,r);var u=s.getElement(t,a,null,n,l);u?(p(o,!1),o.drawImage(u.texture.canvas,u.x,0,u.width,u.height,a.x1,a.y1,a.w,a.h),p(o,!0)):i.drawElement(o,t)}},u.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===t.length},u.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},u.invalidateElements=function(e){var t=this;t.lastInvalidationTime=r.performanceNow(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,function(e,n,r){t.invalidateLayer(e)})},u.invalidateLayer=function(e){if(this.lastInvalidationTime=r.performanceNow(),!e.invalid){var t=e.level,n=e.eles,i=this.layersByLevel[t];r.removeFromArray(i,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:p;e.lineWidth=h,e.lineCap="butt",i.strokeStyle(e,d[0],d[1],d[2],n),i.drawEdgePath(t,e,o.allpts,f)},m=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;i.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var v=t.pstyle("ghost-offset-x").pfValue,b=t.pstyle("ghost-offset-y").pfValue,y=t.pstyle("ghost-opacity").value,x=p*y;e.translate(v,b),g(x),m(x),e.translate(-v,-b)}g(),m(),function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u;e.lineWidth=l,"self"!==o.edgeType||a?e.lineCap="round":e.lineCap="butt",i.strokeStyle(e,c[0],c[1],c[2],n),i.drawEdgePath(t,e,o.allpts,"solid")}(),i.drawElementText(e,t,r),n&&e.translate(s.x1,s.y1)}},drawEdgePath:function(e,t,n,r){var i=e._private.rscratch,o=t,a=void 0,s=!1,l=this.usePaths();if(l){var u=n.join("$");i.pathCacheKey&&i.pathCacheKey===u?(a=t=i.pathCache,s=!0):(a=t=new Path2D,i.pathCacheKey=u,i.pathCache=a)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash([6,3]);break;case"solid":o.setLineDash([])}if(!s&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":if(e.hasClass("horizontal")){var c=n[4],d=n[5],p=(n[0]+n[4])/2;t.lineTo(n[0]+10,n[1]),t.bezierCurveTo(p,n[1],p,n[5],n[4]-10,n[5]),t.lineTo(c,d)}else if(e.hasClass("vertical")){var f=n[4],h=n[5],g=(n[1]+n[5])/2;t.bezierCurveTo(n[0],g,n[4],g,n[4],n[5]-10),t.lineTo(f,h)}else for(var m=2;m+30||_>0&&$>0){var S=a-E;switch(m){case"left":S-=c;break;case"center":S-=c/2}var C=s-d-E,T=c+2*E,A=d+2*E;if(k>0){var P=e.fillStyle,O=t.pstyle("text-background-color").value;e.fillStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+k*o+")","roundrectangle"==t.pstyle("text-background-shape").strValue?function(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()}(e,S,C,T,A,2):e.fillRect(S,C,T,A),e.fillStyle=P}if(_>0&&$>0){var R=e.strokeStyle,I=e.lineWidth,j=t.pstyle("text-border-color").value,D=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+j[0]+","+j[1]+","+j[2]+","+$*o+")",e.lineWidth=_,e.setLineDash)switch(D){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=_/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(S,C,T,A),"double"===D){var N=_/2;e.strokeRect(S+N,C+N,T-2*N,A-2*N)}e.setLineDash&&e.setLineDash([]),e.lineWidth=I,e.strokeStyle=R}}var M=2*t.pstyle("text-outline-width").pfValue;if(M>0&&(e.lineWidth=M),"wrap"===t.pstyle("text-wrap").value){var z=r.getPrefixedProperty(i,"labelWrapCachedLines",n),L=d/z.length;switch(v){case"top":s-=(z.length-1)*L;break;case"center":case"bottom":s-=(z.length-1)*L}for(var q=0;q0&&e.strokeText(z[q],a,s),e.fillText(z[q],a,s),s+=L}else M>0&&e.strokeText(l,a,s),e.fillText(l,a,s);0!==b&&(e.rotate(-b),e.translate(-x,-w))}}},e.exports=o},function(e,t,n){"use strict";var r=n(0),i={drawNode:function(e,t,n,i){var o,a,s=this,l=t._private,u=l.rscratch,c=t.position();if(r.number(c.x)&&r.number(c.y)&&t.visible()){var d=t.effectiveOpacity(),p=s.usePaths(),f=void 0,h=!1,g=t.padding();o=t.width()+2*g,a=t.height()+2*g;var m=void 0;n&&(m=n,e.translate(-m.x1,-m.y1));for(var v=t.pstyle("background-image").value,b=new Array(v.length),y=new Array(v.length),x=0,w=0;w0&&void 0!==arguments[0]?arguments[0]:C;s.fillStyle(e,S[0],S[1],S[2],t)},R=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P;s.strokeStyle(e,T[0],T[1],T[2],t)},I=t.pstyle("shape").strValue,j=t.pstyle("shape-polygon-points").pfValue;if(p){var D=I+"$"+o+"$"+a+("polygon"===I?"$"+j.join("$"):"");e.translate(c.x,c.y),u.pathCacheKey===D?(f=u.pathCache,h=!0):(f=new Path2D,u.pathCacheKey=D,u.pathCache=f)}var N=function(){if(!h){var n=c;p&&(n={x:0,y:0}),s.nodeShapes[s.getNodeShape(t)].draw(f||e,n.x,n.y,o,a)}p?e.fill(f):e.fill()},M=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,r=l.backgrounding,i=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;s.hasPie(t)&&(s.drawPie(e,t,r),n&&(p||s.nodeShapes[s.getNodeShape(t)].draw(e,c.x,c.y,o,a)))},L=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,n=(_>0?_:-_)*t,r=_>0?0:255;0!==_&&(s.fillStyle(e,r,r,r,n),p?e.fill(f):e.fill())},q=function(){if(E>0){if(e.lineWidth=E,e.lineCap="butt",e.setLineDash)switch(A){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}if(p?e.stroke(f):e.stroke(),"double"===A){e.lineWidth=E/3;var t=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",p?e.stroke(f):e.stroke(),e.globalCompositeOperation=t}e.setLineDash&&e.setLineDash([])}};if("yes"===t.pstyle("ghost").value){var B=t.pstyle("ghost-offset-x").pfValue,V=t.pstyle("ghost-offset-y").pfValue,F=t.pstyle("ghost-opacity").value,U=F*d;e.translate(B,V),O(F*C),N(),M(U),z(0!==_||0!==E),L(U),R(F*P),q(),e.translate(-B,-V)}O(),N(),M(),z(0!==_||0!==E),L(),R(),q(),p&&e.translate(-c.x,-c.y),s.drawElementText(e,t,i),function(){var n=t.pstyle("overlay-padding").pfValue,r=t.pstyle("overlay-opacity").value,i=t.pstyle("overlay-color").value;r>0&&(s.fillStyle(e,i[0],i[1],i[2],r),s.nodeShapes.roundrectangle.draw(e,c.x,c.y,o+2*n,a+2*n),e.fill())}(),n&&e.translate(m.x1,m.y1)}},hasPie:function(e){return(e=e[0])._private.hasPie},drawPie:function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),o=t.pstyle("pie-size"),a=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,d=0;this.usePaths()&&(a=0,s=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,m=f/100;m+d>1&&(m=1-d);var v=1.5*Math.PI+2*Math.PI*d,b=v+2*Math.PI*m;0===f||d>=1||d+m>1||(e.beginPath(),e.moveTo(a,s),e.arc(a,s,c,v,b),e.closePath(),this.fillStyle(e,h[0],h[1],h[2],g),e.fill(),d+=m)}}};e.exports=i},function(e,t,n){"use strict";var r={},i=n(1);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;is.minMbLowQualFrames&&(s.motionBlurPxRatio=s.mbPxRBlurry)),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!p&&(d[s.NODE]=!0,d[s.SELECT_BOX]=!0);var y=u.style()._private.coreStyle,x=u.zoom(),w=void 0!==o?o:x,k=u.pan(),$={x:k.x,y:k.y},_={zoom:x,pan:{x:k.x,y:k.y}},E=s.prevViewport;void 0===E||_.zoom!==E.zoom||_.pan.x!==E.pan.x||_.pan.y!==E.pan.y||m&&!g||(s.motionBlurPxRatio=1),a&&($=a),w*=l,$.x*=l,$.y*=l;var S=s.getCachedZSortedEles();function C(e,t,n,r,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",s.fillStyle(e,255,255,255,s.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=o}function T(e,r){var i,l,u,d;s.clearingMotionBlur||e!==c.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&e!==c.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(i=$,l=w,u=s.canvasWidth,d=s.canvasHeight):(i={x:k.x*h,y:k.y*h},l=x*h,u=s.canvasWidth*h,d=s.canvasHeight*h),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?C(e,0,0,u,d):t||void 0!==r&&!r||e.clearRect(0,0,u,d),n||(e.translate(i.x,i.y),e.scale(l,l)),a&&e.translate(a.x,a.y),o&&e.scale(o,o)}if(p||(s.textureDrawLastFrame=!1),p){if(s.textureDrawLastFrame=!0,!s.textureCache){s.textureCache={},s.textureCache.bb=u.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER];var A=s.data.bufferContexts[s.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:l*s.textureMult}),(_=s.textureCache.viewport={zoom:u.zoom(),pan:u.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom}}d[s.DRAG]=!1,d[s.NODE]=!1;var P=c.contexts[s.NODE],O=s.textureCache.texture;_=s.textureCache.viewport;s.textureCache.bb,P.setTransform(1,0,0,1,0,0),f?C(P,0,0,_.width,_.height):P.clearRect(0,0,_.width,_.height);var R=y["outside-texture-bg-color"].value,I=y["outside-texture-bg-opacity"].value;s.fillStyle(P,R[0],R[1],R[2],I),P.fillRect(0,0,_.width,_.height);x=u.zoom();T(P,!1),P.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/l,_.height/_.zoom/l),P.drawImage(O,_.mpan.x,_.mpan.y,_.width/_.zoom/l,_.height/_.zoom/l)}else s.textureOnViewport&&!t&&(s.textureCache=null);var j=u.extent(),D=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles,N=s.hideEdgesOnViewport&&D,M=[];if(M[s.NODE]=!d[s.NODE]&&f&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,M[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),M[s.DRAG]=!d[s.DRAG]&&f&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,M[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),d[s.NODE]||n||r||M[s.NODE]){var z=f&&!M[s.NODE]&&1!==h;T(P=t||(z?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:c.contexts[s.NODE]),f&&!z?"motionBlur":void 0),N?s.drawCachedNodes(P,S.nondrag,l,j):s.drawLayeredElements(P,S.nondrag,l,j),s.debug&&s.drawDebugPoints(P,S.nondrag),n||f||(d[s.NODE]=!1)}if(!r&&(d[s.DRAG]||n||M[s.DRAG])){z=f&&!M[s.DRAG]&&1!==h;T(P=t||(z?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:c.contexts[s.DRAG]),f&&!z?"motionBlur":void 0),N?s.drawCachedNodes(P,S.drag,l,j):s.drawCachedElements(P,S.drag,l,j),s.debug&&s.drawDebugPoints(P,S.drag),n||f||(d[s.DRAG]=!1)}if(s.showFps||!r&&d[s.SELECT_BOX]&&!n){if(T(P=t||c.contexts[s.SELECT_BOX]),1==s.selection[4]&&(s.hoverData.selecting||s.touchData.selecting)){x=s.cy.zoom();var L=y["selection-box-border-width"].value/x;P.lineWidth=L,P.fillStyle="rgba("+y["selection-box-color"].value[0]+","+y["selection-box-color"].value[1]+","+y["selection-box-color"].value[2]+","+y["selection-box-opacity"].value+")",P.fillRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]),L>0&&(P.strokeStyle="rgba("+y["selection-box-border-color"].value[0]+","+y["selection-box-border-color"].value[1]+","+y["selection-box-border-color"].value[2]+","+y["selection-box-opacity"].value+")",P.strokeRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]))}if(c.bgActivePosistion&&!s.hoverData.selecting){x=s.cy.zoom();var q=c.bgActivePosistion;P.fillStyle="rgba("+y["active-bg-color"].value[0]+","+y["active-bg-color"].value[1]+","+y["active-bg-color"].value[2]+","+y["active-bg-opacity"].value+")",P.beginPath(),P.arc(q.x,q.y,y["active-bg-size"].pfValue/x,0,2*Math.PI),P.fill()}var B=s.lastRedrawTime;if(s.showFps&&B){B=Math.round(B);var V=Math.round(1e3/B);P.setTransform(1,0,0,1,0,0),P.fillStyle="rgba(255, 0, 0, 0.75)",P.strokeStyle="rgba(255, 0, 0, 0.75)",P.lineWidth=1,P.fillText("1 frame = "+B+" ms = "+V+" fps",0,20);P.strokeRect(0,30,250,20),P.fillRect(0,30,250*Math.min(V/60,1),20)}n||(d[s.SELECT_BOX]=!1)}if(f&&1!==h){var F=c.contexts[s.NODE],U=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],H=c.contexts[s.DRAG],W=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],G=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!b?e.clearRect(0,0,s.canvasWidth,s.canvasHeight):C(e,0,0,s.canvasWidth,s.canvasHeight);var r=h;e.drawImage(t,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)};(d[s.NODE]||M[s.NODE])&&(G(F,U,M[s.NODE]),d[s.NODE]=!1),(d[s.DRAG]||M[s.DRAG])&&(G(H,W,M[s.DRAG]),d[s.DRAG]=!1)}s.prevViewport=_,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),f&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!p,s.mbFrames=0,d[s.NODE]=!0,d[s.DRAG]=!0,s.redraw()},100)),t||u.emit("render")},e.exports=r},function(e,t,n){"use strict";for(var r=n(2),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;l0&&a>0){f.clearRect(0,0,o,a),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),f.scale(1/u,1/u),f.translate(n.x1*u,n.y1*u);else{var g=t.pan(),m={x:g.x*u,y:g.y*u};u*=t.zoom(),f.translate(m.x,m.y),f.scale(u,u),this.drawElements(f,h),f.scale(1/u,1/u),f.translate(-m.x,-m.y)}e.bg&&(f.globalCompositeOperation="destination-over",f.fillStyle=e.bg,f.rect(0,0,o,a),f.fill())}return p},i.png=function(e){return a(e,this.bufferCanvasImage(e),"image/png")},i.jpg=function(e){return a(e,this.bufferCanvasImage(e),"image/jpeg")},e.exports=i},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);case"bottomroundrectangle":return this.drawBottomRoundRectanglePath(t,n,r,i,o);case"barrel":return this.drawBarrelPath(t,n,r,i,o)}}};e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(1),o=n(18),a=function e(){if(!(this instanceof e))return new e;this.length=0},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\n")}]),e.exports=n},function(e,t,n){(e.exports=n(20)(!1)).push([e.i,"\n.cy-context-menus-cxt-menu {\n display:none;\n z-index:1000;\n position:absolute;\n border:1px solid #A0A0A0;\n padding: 0;\n margin: 0;\n width:auto;\n}\n\n.cy-context-menus-cxt-menuitem {\n display:block;\n z-index:1000;\n width: 100%;\n padding: 3px 20px;\n position:relative;\n margin:0;\n background-color:#f8f8f8;\n font-weight:normal;\n font-size: 12px;\n white-space:nowrap;\n border: 0;\n text-align: left;\n}\n\n.cy-context-menus-cxt-menuitem:enabled {\n color: #000000;\n}\n\n.cy-context-menus-ctx-operation:focus {\n outline: none;\n}\n\n.cy-context-menus-cxt-menuitem:hover {\n color: #ffffff;\n text-decoration: none;\n background-color: #0B9BCD;\n background-image: none;\n cursor: pointer;\n}\n\n.cy-context-menus-cxt-menuitem[content]:before {\n content:attr(content);\n}\n\n.cy-context-menus-divider {\n border-bottom:1px solid #A0A0A0;\n}\n",""])},function(e,t,n){var r=n(155);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(19)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";n(156);const r=n(154),i=n(11),o=n(14),a=n(153);n(146)(a,o);const s=n(145);a.use(s),angular.module("dbt").directive("graphViz",["$q","$state","graph","selectorService","project","$timeout",function(e,t,n,s,l,u){return{restrict:"EA",replace:!0,scope:{vizElements:"=",vizLayout:"=",vizOptions:"=",vizStyle:"=",vizReady:"=",vizExtensions:"=",vizHideOptions:"=",vizSize:"=",vizRendered:"="},link:function(e,r,d,p){var f=c;e.$watch("vizSize",function(e,t){u(function(){h.resize(),"fullscreen"==e?h.fit(100):h.fit(25)})}),o(".viz-option").on("changed.bs.select",function(e){o(e.target).data("option"),o(e.target).val()});var h=a(i.assign({},e.vizOptions,{container:document.getElementById("cy"),style:e.vizStyle||[],elements:e.vizElements||[],layout:e.vizLayout||{name:"circle"}}));window.graph||(window.graph=h);e.graphReady&&o(window).on("load",function(){h.ready(e.graphReady)});h.on("select",function(t){var r=t.target;e.$apply(function(){n.selectNode(r.id()),h.forceRender()})}),h.on("unselect",function(t){t.target;e.$apply(function(){n.deselectNodes(),h.forceRender()})}),e.$watch("vizElements",function(t,n){h.remove(h.elements()),h.add(t),f(e,h),console.log("elements changed, UPDATE")}),e.$watch("vizLayout",function(t,n){t!==n&&f(e,h)},!0),e.$watch("vizOptions",function(e,t){e!==t&&i.each(e,function(e,t){h[t],h[t](e)})},!0),e.$watch("vizStyle",function(e,t){e!==t&&(console.log("Setting styles"),h.setStyle(e))},!0),e.$on("$destroy",function(){h.destroy()});h.contextMenus({menuItems:[{id:"jump",content:"Refocus on Node",selector:"node",tooltipText:"Focus on the lineage for this node",onClickFunction:function(e){var n=e.target||e.cyTarget,r=n.id();t.go("dbt.model",{unique_id:r})},show:!0},{id:"docs",content:"View documentation",selector:"node",tooltipText:"Jump to the documentation for this node",onClickFunction:function(e){var r=e.target||e.cyTarget,i=r.id();t.go("dbt.model",{unique_id:i}),n.hideGraph()},show:!0},{id:"hide-before-here",content:"Hide this and parents",selector:"node",onClickFunction:function(e){var t=e.target||e.cyTarget,r=t.id(),i=l.node(r);if(i){var o=s.excludeNode(i,{parents:!0});n.updateGraph(o)}},show:!0},{id:"hide-after-here",content:"Hide this and children",selector:"node",onClickFunction:function(e){var t=e.target||e.cyTarget,r=t.id(),i=l.node(r);if(i){var o=s.excludeNode(i,{children:!0});n.updateGraph(o)}},show:!0}],menuItemClasses:["graph-node-context-menu-item"],contextMenuClasses:["graph-node-context-menu"]})},templateUrl:r};function c(e,t){if(e.vizLayout&&e.vizLayout.name){t.layout(e.vizLayout).run();e.vizRendered(t)}}}])},function(e,t){var n="/components/graph/graph-launcher.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n
    \n \n\n
    \n \n
    \n
    \n
    \n
    \n
    Lineage Graph
    \n
    \n
    \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n')}]),e.exports=n},function(e,t,n){"use strict";const r=n(158),i=n(11),o=n(14);angular.module("dbt").directive("graphLauncher",["$q","graph","selectorService","project","trackingService","locationService",function(e,t,n,a,s,l){return{restrict:"EA",replace:!0,scope:{},templateUrl:r,link:function(e,r){e.filters_visible=!1,e.graphService=t,e.selectorService=n;var a={tags:{visible:!1},packages:{visible:!1}};e.onWindowClick=function(e){o(e.target);var t=o(e.target).closest(".dropup");t.length||(a.tags.visible=!1,a.packages.visible=!1);var n=t.data("form-type");i.each(a,function(e,t){t!=n&&(e.visible=!1)}),o(e.target).closest("#graph-viz-wrapper").length&&setTimeout(function(){o(":focus").blur()})},e.onSelectClick=function(e){i.each(a,function(t,n){n==e&&(t.visible=!t.visible,t.visible||o(":focus").blur())})},e.isVisible=function(e){return a[e].visible},e.isSelected=function(e,t){return-1!=n.selection.dirty[e].indexOf(t)},e.onItemSelect=function(t,r,o){var a=n.selection.dirty;e.isSelected(t,r)?a[t]=i.without(a[t],r):a[t]=i.union(a[t],[r]),o.preventDefault()},e.onSelectBlur=function(t,n){n&&(n.relatedTarget&&"SELECT"!=n.relatedTarget.tagName||e.isVisible(t)&&o(n.target).focus())},e.selectionLabel=function(e,t){var r=n.selection.dirty[e],i=n.options[e];return 0==r.length?"None selected":1==r.length?r[0]||t:r.length==i.length?"All selected":r.length+" selected"},e.onUpdateSelector=function(){var e=n.updateSelection(),r=t.updateGraph(e);s.track_graph_interaction("update-graph",r.length)},e.showExpanded=function(){var e=n.getViewNode(),r=e?e.name:null,i=t.showFullGraph(r);s.track_graph_interaction("show-expanded",i.length)},e.showContracted=function(){var e=n.getViewNode(),r=t.showVerticalGraph(e.name,!0);l.clearState(),s.track_graph_interaction("show-contracted",r.length)},e.closeGraph=function(){t.hideGraph(),l.clearState()},e.onLauncherClick=function(){var t=n.getViewNode();t?(n.resetSelection(t),e.showContracted()):(n.resetSelection(),e.showExpanded())},e.$watch(function(){return n.selection.dirty},function(e,r){if(n.isDirty()){var o=t.graph.pristine.dag,a=t.graph.pristine.nodes,s=n.selection.clean,l=n.selection.dirty,u=n.select_nodes(o,a,s),c=n.select_nodes(o,a,l),d=i.difference(u.nodes,c.nodes);t.markDirty(d)}else t.markAllClean()},!0)}}}])},function(e,t,n){n(159),n(157),n(105),n(103),n(99),n(97)},function(e,t,n){(e.exports=n(20)(!1)).push([e.i,"/*\n\ngithub.com style (c) Vasily Polovnyov \n\n*/\n\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n color: #333;\n background: #f8f8f8;\n}\n\n.hljs-comment,\n.hljs-quote {\n color: #998;\n font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-subst {\n color: #333;\n font-weight: bold;\n}\n\n.hljs-number,\n.hljs-literal,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag .hljs-attr {\n color: #008080;\n}\n\n.hljs-string,\n.hljs-doctag {\n color: #d14;\n}\n\n.hljs-title,\n.hljs-section,\n.hljs-selector-id {\n color: #900;\n font-weight: bold;\n}\n\n.hljs-subst {\n font-weight: normal;\n}\n\n.hljs-type,\n.hljs-class .hljs-title {\n color: #458;\n font-weight: bold;\n}\n\n.hljs-tag,\n.hljs-name,\n.hljs-attribute {\n color: #000080;\n font-weight: normal;\n}\n\n.hljs-regexp,\n.hljs-link {\n color: #009926;\n}\n\n.hljs-symbol,\n.hljs-bullet {\n color: #990073;\n}\n\n.hljs-built_in,\n.hljs-builtin-name {\n color: #0086b3;\n}\n\n.hljs-meta {\n color: #999;\n font-weight: bold;\n}\n\n.hljs-deletion {\n background: #fdd;\n}\n\n.hljs-addition {\n background: #dfd;\n}\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n",""])},function(e,t,n){var r=n(161);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(19)(r,i);r.locals&&(e.exports=r.locals)},function(e,t){!function(e,t){"use strict";function n(n){try{var i=t.querySelectorAll("code.hljs");for(var o in i)i.hasOwnProperty(o)&&r(i[o],n)}catch(t){e.console.error("LineNumbers error: ",t)}}function r(e,t){if("object"==typeof e){var n=(t=t||{singleLine:!1}).singleLine?0:1;s(function(){(function e(t){var n=t.childNodes;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];a(o.textContent)>0&&(o.childNodes.length>0?e(o):i(o.parentNode))}})(e),e.innerHTML=function(e,t){var n=o(e);if(""===n[n.length-1].trim()&&n.pop(),n.length>t){for(var r="",i=0,a=n.length;i
    {6}
    ',[p,c,f,h,d,i+1,n[i].length>0?n[i]:" "]);return l('{1}
    ',[u,r])}return e}(e.innerHTML,n)})}}function i(e){var t=e.className;if(/hljs-/.test(t)){for(var n=o(e.innerHTML),r=0,i="";r{1}\n',[t,n[r]]);e.innerHTML=i.trim()}}function o(e){return 0===e.length?[]:e.split(g)}function a(e){return(e.trim().match(g)||[]).length}function s(t){e.setTimeout(t,0)}function l(e,t){return e.replace(/\{(\d+)\}/g,function(e,n){return t[n]?t[n]:e})}var u="hljs-ln",c="hljs-ln-line",d="hljs-ln-code",p="hljs-ln-numbers",f="hljs-ln-n",h="data-line-number",g=/\r\n|\r|\n/g;e.hljs?(e.hljs.initLineNumbersOnLoad=function(r){"complete"===t.readyState?n(r):e.addEventListener("DOMContentLoaded",function(){n(r)})},e.hljs.lineNumbersBlock=r,function(){var e=t.createElement("style");e.type="text/css",e.innerHTML=l(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[u,f,h]),t.getElementsByTagName("head")[0].appendChild(e)}()):e.console.error("highlight.js not detected!")}(window,document)},function(e,t){e.exports=function(e){var t=e.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*#]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",end:/;/,endsWithParent:!0,lexemes:/[\w\.]+/,keywords:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE,{begin:'""'}]},{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t]},e.C_BLOCK_COMMENT_MODE,t]}}},function(e,t,n){(function(t){!function(t){"use strict";var n={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:g,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:g,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:g,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n?(?!hr|heading|lheading| {0,3}>|tag)[^\n]+)+)/,text:/^[^\n]+/};function r(e){this.tokens=[],this.tokens.links={},this.options=e||v.defaults,this.rules=n.normal,this.options.gfm&&(this.options.tables?this.rules=n.tables:this.rules=n.gfm)}n._label=/(?:\\[\[\]]|[^\[\]])+/,n._title=/(?:"(?:\\"|[^"]|"[^"\n]*")*"|'\n?(?:[^'\n]+\n?)*'|\([^()]*\))/,n.def=d(n.def).replace("label",n._label).replace("title",n._title).getRegex(),n.bullet=/(?:[*+-]|\d+\.)/,n.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,n.item=d(n.item,"gm").replace(/bull/g,n.bullet).getRegex(),n.list=d(n.list).replace(/bull/g,n.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+n.def.source+")").getRegex(),n._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b",n.html=d(n.html).replace("comment",//).replace("closed",/<(tag)[\s\S]+?<\/\1>/).replace("closing",/\s]*)*?\/?>/).replace(/tag/g,n._tag).getRegex(),n.paragraph=d(n.paragraph).replace("hr",n.hr).replace("heading",n.heading).replace("lheading",n.lheading).replace("tag","<"+n._tag).getRegex(),n.blockquote=d(n.blockquote).replace("paragraph",n.paragraph).getRegex(),n.normal=m({},n),n.gfm=m({},n.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),n.gfm.paragraph=d(n.paragraph).replace("(?!","(?!"+n.gfm.fences.source.replace("\\1","\\2")+"|"+n.list.source.replace("\\1","\\3")+"|").getRegex(),n.tables=m({},n.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),r.rules=n,r.lex=function(e,t){return new r(t).lex(e)},r.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},r.prototype.token=function(e,t){var r,i,o,a,s,l,u,c,d,p,f;for(e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},c=0;c ?/gm,""),this.token(o,t),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),f=(a=o[2]).length>1,this.tokens.push({type:"list_start",ordered:f,start:f?+a:""}),r=!1,p=(o=o[0].match(this.rules.item)).length,c=0;c1&&s.length>1||(e=o.slice(c+1).join("\n")+e,c=p-1)),i=r||/\n\n(?!\s*$)/.test(l),c!==p-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(l,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),o[3]&&(o[3]=o[3].substring(1,o[3].length-1)),d=o[1].toLowerCase(),this.tokens.links[d]||(this.tokens.links[d]={href:o[2],title:o[3]});else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:g,tag:/^|^<\/?[a-zA-Z0-9\-]+(?:"[^"]*"|'[^']*'|\s[^<'">\/\s]*)*?\/?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^_([^\s_](?:[^_]|__)+?[^\s_])_\b|^\*((?:\*\*|[^*])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:g,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function c(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function d(e,t){return e=e.source,t=t||"",{replace:function(t,n){return n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function p(e,t){return f[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?f[" "+e]=e+"/":f[" "+e]=e.replace(/[^/]*$/,"")),e=f[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=d(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._inside=/(?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]]|\](?=[^\[]*\]))*/,i._href=/\s*?(?:\s+['"]([\s\S]*?)['"])?\s*/,i.link=d(i.link).replace("inside",i._inside).replace("href",i._href).getRegex(),i.reflink=d(i.reflink).replace("inside",i._inside).getRegex(),i.normal=m({},i),i.pedantic=m({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),i.gfm=m({},i.normal,{escape:d(i.escape).replace("])","~|])").getRegex(),url:d(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",i._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:d(i.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),i.breaks=m({},i.gfm,{br:d(i.br).replace("{2,}","*").getRegex(),text:d(i.gfm.text).replace("{2,}","*").getRegex()}),o.rules=i,o.output=function(e,t,n){return new o(t,n).output(e)},o.prototype.output=function(e){for(var t,n,r,i,o="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),o+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),r="@"===i[2]?"mailto:"+(n=u(this.mangle(i[1]))):n=u(i[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):u(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,o+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),o+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),o+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),o+=this.renderer.codespan(u(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),o+=this.renderer.text(u(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else i[0]=this.rules._backpedal.exec(i[0])[0],e=e.substring(i[0].length),"@"===i[2]?r="mailto:"+(n=u(i[0])):(n=u(i[0]),r="www."===i[1]?"http://"+n:n),o+=this.renderer.link(r,null,n);return o},o.prototype.outputLink=function(e,t){var n=u(t.href),r=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,u(e[1]))},o.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},o.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},a.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
    '+(n?e:u(e,!0))+"\n
    \n":"
    "+(n?e:u(e,!0))+"\n
    "},a.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},a.prototype.html=function(e){return e},a.prototype.heading=function(e,t,n){return"'+e+"\n"},a.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},a.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},a.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},a.prototype.paragraph=function(e){return"

    "+e+"

    \n"},a.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},a.prototype.tablerow=function(e){return"\n"+e+"\n"},a.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"\n"},a.prototype.strong=function(e){return""+e+""},a.prototype.em=function(e){return""+e+""},a.prototype.codespan=function(e){return""+e+""},a.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},a.prototype.del=function(e){return""+e+""},a.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(c(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}this.options.baseUrl&&!h.test(e)&&(e=p(this.options.baseUrl,e));var i='
    "},a.prototype.image=function(e,t,n){this.options.baseUrl&&!h.test(e)&&(e=p(this.options.baseUrl,e));var r=''+n+'":">"},a.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},l.parse=function(e,t){return new l(t).parse(e)},l.prototype.parse=function(e){this.inline=new o(e.links,this.options),this.inlineText=new o(e.links,m({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},l.prototype.next=function(){return this.token=this.tokens.pop()},l.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},l.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},l.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",o="";for(n="",e=0;eAn error occurred:

    "+u(e.message+"",!0)+"
    ";throw e}}g.exec=g,v.options=v.setOptions=function(e){return m(v.defaults,e),v},v.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new a,xhtml:!1,baseUrl:null},v.Parser=l,v.parser=l.parse,v.Renderer=a,v.TextRenderer=s,v.Lexer=r,v.lexer=r.lex,v.InlineLexer=o,v.inlineLexer=o.output,v.parse=v,e.exports=v}(this||"undefined"!=typeof window&&window)}).call(this,n(13))},function(e,t){e.exports=function(e){if(!e)return e;var t,n=e.replace(/\t/g," ").split(/\r?\n/),r=null,i=n.length;for(t=0;t0)for(t=0;t"+e+""}t.error("angular-marked Error: marked not loaded. See installation instructions.")}]}).name},function(e,t){ /** * @license AngularJS v1.7.2 * (c) 2010-2018 Google, Inc. http://angularjs.org