/*!
 * Noodel.js - v2.3.1
 * (c) 2019-2020 Zuohao (Jonny) Lu
 * MIT License
 * https://github.com/zlu883/noodel-js
 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):"object"==typeof exports?exports.Noodel=e(require("vue")):t.Noodel=e(t.Vue)}(window,(function(t){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(e,n){e.exports=t},function(t,e,n){var i;
/*! Hammer.JS - v2.0.7 - 2016-04-22
 * http://hammerjs.github.io/
 *
 * Copyright (c) 2016 Jorik Tangelder;
 * Licensed under the MIT license */!function(o,r,s,a){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],h=r.createElement("div"),u=Math.round,d=Math.abs,f=Date.now;function p(t,e,n){return setTimeout(E(t,n),e)}function v(t,e,n){return!!Array.isArray(t)&&(m(t,n[e],n),!0)}function m(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(undefined!==t.length)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function g(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=o.console&&(o.console.warn||o.console.log);return r&&r.call(o.console,i,n),t.apply(this,arguments)}}l="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o in i)i.hasOwnProperty(o)&&(e[o]=i[o])}return e}:Object.assign;var y=g((function(t,e,n){for(var i=Object.keys(e),o=0;o<i.length;)(!n||n&&undefined===t[i[o]])&&(t[i[o]]=e[i[o]]),o++;return t}),"extend","Use `assign`."),b=g((function(t,e){return y(t,e,!0)}),"merge","Use `assign`.");function w(t,e,n){var i,o=e.prototype;(i=t.prototype=Object.create(o)).constructor=t,i._super=o,n&&l(i,n)}function E(t,e){return function(){return t.apply(e,arguments)}}function T(t,e){return"function"==typeof t?t.apply(e&&e[0]||undefined,e):t}function x(t,e){return undefined===t?e:t}function I(t,e,n){m(S(e),(function(e){t.addEventListener(e,n,!1)}))}function _(t,e,n){m(S(e),(function(e){t.removeEventListener(e,n,!1)}))}function C(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function k(t,e){return t.indexOf(e)>-1}function S(t){return t.trim().split(/\s+/g)}function R(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function M(t){return Array.prototype.slice.call(t,0)}function P(t,e,n){for(var i=[],o=[],r=0;r<t.length;){var s=e?t[r][e]:t[r];R(o,s)<0&&i.push(t[r]),o[r]=s,r++}return n&&(i=e?i.sort((function(t,n){return t[e]>n[e]})):i.sort()),i}function O(t,e){for(var n,i,o=e[0].toUpperCase()+e.slice(1),r=0;r<c.length;){if((i=(n=c[r])?n+o:e)in t)return i;r++}}var A=1;function B(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||o}var D="ontouchstart"in o,N=undefined!==O(o,"PointerEvent"),z=D&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),F=["x","y"],L=["clientX","clientY"];function V(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){T(t.options.enable,[t])&&n.handler(e)},this.init()}function j(t,e,n){var i=n.pointers.length,o=n.changedPointers.length,r=1&e&&i-o==0,s=12&e&&i-o==0;n.isFirst=!!r,n.isFinal=!!s,r&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,o=i.length;n.firstInput||(n.firstInput=X(e));o>1&&!n.firstMultiple?n.firstMultiple=X(e):1===o&&(n.firstMultiple=!1);var r=n.firstInput,s=n.firstMultiple,a=s?s.center:r.center,l=e.center=Y(i);e.timeStamp=f(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=q(a,l),e.distance=$(a,l),function(t,e){var n=e.center,i=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};1!==e.eventType&&4!==r.eventType||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y});e.deltaX=o.x+(n.x-i.x),e.deltaY=o.y+(n.y-i.y)}(n,e),e.offsetDirection=W(e.deltaX,e.deltaY);var c=H(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=d(c.x)>d(c.y)?c.x:c.y,e.scale=s?(h=s.pointers,u=i,$(u[0],u[1],L)/$(h[0],h[1],L)):1,e.rotation=s?function(t,e){return q(e[1],e[0],L)+q(t[1],t[0],L)}(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,o,r,s=t.lastInterval||e,a=e.timeStamp-s.timeStamp;if(8!=e.eventType&&(a>25||undefined===s.velocity)){var l=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,h=H(a,l,c);i=h.x,o=h.y,n=d(h.x)>d(h.y)?h.x:h.y,r=W(l,c),t.lastInterval=e}else n=s.velocity,i=s.velocityX,o=s.velocityY,r=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=o,e.direction=r}(n,e);var h,u;var p=t.element;C(e.srcEvent.target,p)&&(p=e.srcEvent.target);e.target=p}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function X(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:u(t.pointers[n].clientX),clientY:u(t.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:e,center:Y(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Y(t){var e=t.length;if(1===e)return{x:u(t[0].clientX),y:u(t[0].clientY)};for(var n=0,i=0,o=0;o<e;)n+=t[o].clientX,i+=t[o].clientY,o++;return{x:u(n/e),y:u(i/e)}}function H(t,e,n){return{x:e/t||0,y:n/t||0}}function W(t,e){return t===e?1:d(t)>=d(e)?t<0?2:4:e<0?8:16}function $(t,e,n){n||(n=F);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return Math.sqrt(i*i+o*o)}function q(t,e,n){n||(n=F);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return 180*Math.atan2(o,i)/Math.PI}V.prototype={handler:function(){},init:function(){this.evEl&&I(this.element,this.evEl,this.domHandler),this.evTarget&&I(this.target,this.evTarget,this.domHandler),this.evWin&&I(B(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(B(this.element),this.evWin,this.domHandler)}};var U={mousedown:1,mousemove:2,mouseup:4};function G(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,V.apply(this,arguments)}w(G,V,{handler:function(t){var e=U[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var K={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:"touch",3:"pen",4:"mouse",5:"kinect"},J="pointerdown",Z="pointermove pointerup pointercancel";function tt(){this.evEl=J,this.evWin=Z,V.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}o.MSPointerEvent&&!o.PointerEvent&&(J="MSPointerDown",Z="MSPointerMove MSPointerUp MSPointerCancel"),w(tt,V,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),o=K[i],r=Q[t.pointerType]||t.pointerType,s="touch"==r,a=R(e,t.pointerId,"pointerId");1&o&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):12&o&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(a,1))}});var et={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function nt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,V.apply(this,arguments)}function it(t,e){var n=M(t.touches),i=M(t.changedTouches);return 12&e&&(n=P(n.concat(i),"identifier",!0)),[n,i]}w(nt,V,{handler:function(t){var e=et[t.type];if(1===e&&(this.started=!0),this.started){var n=it.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var ot={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function rt(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},V.apply(this,arguments)}function st(t,e){var n=M(t.touches),i=this.targetIds;if(3&e&&1===n.length)return i[n[0].identifier]=!0,[n,n];var o,r,s=M(t.changedTouches),a=[],l=this.target;if(r=n.filter((function(t){return C(t.target,l)})),1===e)for(o=0;o<r.length;)i[r[o].identifier]=!0,o++;for(o=0;o<s.length;)i[s[o].identifier]&&a.push(s[o]),12&e&&delete i[s[o].identifier],o++;return a.length?[P(r.concat(a),"identifier",!0),a]:void 0}w(rt,V,{handler:function(t){var e=ot[t.type],n=st.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}});function at(){V.apply(this,arguments);var t=E(this.handler,this);this.touch=new rt(this.manager,t),this.mouse=new G(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function lt(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,ct.call(this,e)):12&t&&ct.call(this,e)}function ct(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout((function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)}),2500)}}function ht(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var o=this.lastTouches[i],r=Math.abs(e-o.x),s=Math.abs(n-o.y);if(r<=25&&s<=25)return!0}return!1}w(at,V,{handler:function(t,e,n){var i="touch"==n.pointerType,o="mouse"==n.pointerType;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)lt.call(this,e,n);else if(o&&ht.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ut=O(h.style,"touchAction"),dt=undefined!==ut,ft=function(){if(!dt)return!1;var t={},e=o.CSS&&o.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){t[n]=!e||o.CSS.supports("touch-action",n)})),t}();function pt(t,e){this.manager=t,this.set(e)}pt.prototype={set:function(t){"compute"==t&&(t=this.compute()),dt&&this.manager.element.style&&ft[t]&&(this.manager.element.style[ut]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return m(this.manager.recognizers,(function(e){T(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(k(t,"none"))return"none";var e=k(t,"pan-x"),n=k(t,"pan-y");if(e&&n)return"none";if(e||n)return e?"pan-x":"pan-y";if(k(t,"manipulation"))return"manipulation";return"auto"}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,o=k(i,"none")&&!ft.none,r=k(i,"pan-y")&&!ft["pan-y"],s=k(i,"pan-x")&&!ft["pan-x"];if(o){var a=1===t.pointers.length,l=t.distance<2,c=t.deltaTime<250;if(a&&l&&c)return}if(!s||!r)return o||r&&6&n||s&&24&n?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};function vt(t){this.options=l({},this.defaults,t||{}),this.id=A++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function mt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function gt(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function yt(t,e){var n=e.manager;return n?n.get(t):t}function bt(){vt.apply(this,arguments)}function wt(){bt.apply(this,arguments),this.pX=null,this.pY=null}function Et(){bt.apply(this,arguments)}function Tt(){vt.apply(this,arguments),this._timer=null,this._input=null}function xt(){bt.apply(this,arguments)}function It(){bt.apply(this,arguments)}function _t(){vt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Ct(t,e){return(e=e||{}).recognizers=x(e.recognizers,Ct.defaults.preset),new kt(t,e)}vt.prototype={defaults:{},set:function(t){return l(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(v(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=yt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return v(t,"dropRecognizeWith",this)||(t=yt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(v(t,"requireFailure",this))return this;var e=this.requireFail;return-1===R(e,t=yt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(v(t,"dropRequireFailure",this))return this;t=yt(t,this);var e=R(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n<8&&i(e.options.event+mt(n)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),n>=8&&i(e.options.event+mt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=l({},t);if(!T(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},w(bt,vt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=6&e,o=this.attrTest(t);return i&&(8&n||!o)?16|e:i||o?4&n?8|e:2&e?4|e:2:32}}),w(wt,bt,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push("pan-y"),24&t&&e.push("pan-x"),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,o=t.direction,r=t.deltaX,s=t.deltaY;return o&e.direction||(6&e.direction?(o=0===r?1:r<0?2:4,n=r!=this.pX,i=Math.abs(t.deltaX)):(o=0===s?1:s<0?8:16,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=o,n&&i>e.threshold&&o&e.direction},attrTest:function(t){return bt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=gt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),w(Et,bt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),w(Tt,vt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,o=t.deltaTime>e.time;if(this._input=t,!i||!n||12&t.eventType&&!o)this.reset();else if(1&t.eventType)this.reset(),this._timer=p((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),w(xt,bt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),w(It,bt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return wt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&d(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=gt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),w(_t,vt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,o=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(i&&o&&n){if(4!=t.eventType)return this.failTimeout();var r=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||$(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&r?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=p((function(){this.state=8,this.tryEmit()}),e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=p((function(){this.state=32}),this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Ct.VERSION="2.0.7",Ct.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[xt,{enable:!1}],[Et,{enable:!1},["rotate"]],[It,{direction:6}],[wt,{direction:6},["swipe"]],[_t],[_t,{event:"doubletap",taps:2},["tap"]],[Tt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function kt(t,e){var n;this.options=l({},Ct.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(N?tt:z?rt:D?at:G))(n,j),this.touchAction=new pt(this,this.options.touchAction),St(this,!0),m(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function St(t,e){var n,i=t.element;i.style&&(m(t.options.cssProps,(function(o,r){n=O(i.style,r),e?(t.oldCssProps[n]=i.style[n],i.style[n]=o):i.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}kt.prototype={set:function(t){return l(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,o=e.curRecognizer;(!o||o&&8&o.state)&&(o=e.curRecognizer=null);for(var r=0;r<i.length;)n=i[r],2===e.stopped||o&&n!=o&&!n.canRecognizeWith(o)?n.reset():n.recognize(t),!o&&14&n.state&&(o=e.curRecognizer=n),r++}},get:function(t){if(t instanceof vt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(v(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(v(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=R(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(undefined!==t&&undefined!==e){var n=this.handlers;return m(S(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(undefined!==t){var n=this.handlers;return m(S(t),(function(t){e?n[t]&&n[t].splice(R(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=r.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&St(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(Ct,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:kt,Input:V,TouchAction:pt,TouchInput:rt,MouseInput:G,PointerEventInput:tt,TouchMouseInput:at,SingleTouchInput:nt,Recognizer:vt,AttrRecognizer:bt,Tap:_t,Pan:wt,Swipe:It,Pinch:Et,Rotate:xt,Press:Tt,on:I,off:_,each:m,merge:b,extend:y,assign:l,inherit:w,bindFn:E,prefixed:O}),(void 0!==o?o:"undefined"!=typeof self?self:{}).Hammer=Ct,undefined===(i=function(){return Ct}.call(e,n,e,t))||(t.exports=i)}(window,document)},function(t,e,n){var i,o;
/*!
 * ResizeSensor.js - taken and modified from css-element-queries v1.2.3
 * Copyright Marc J. Schmidt
 */"undefined"!=typeof window&&window,void 0===(o="function"==typeof(i=function(){if("undefined"==typeof window)return null;var t="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||function(e){return t.setTimeout(e,20)},n=t.cancelAnimationFrame||t.mozCancelAnimationFrame||t.webkitCancelAnimationFrame||function(e){t.clearTimeout(e)};function i(t,e){var n=Object.prototype.toString.call(t),i="[object Array]"===n||"[object NodeList]"===n||"[object HTMLCollection]"===n||"[object Object]"===n||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements,o=0,r=t.length;if(i)for(;o<r;o++)e(t[o]);else e(t)}function o(t){if(!t.getBoundingClientRect)return{width:t.offsetWidth,height:t.offsetHeight};var e=t.getBoundingClientRect();return{width:e.width,height:e.height}}function r(t,e){Object.keys(e).forEach((function(n){t.style[n]=e[n]}))}var s=function(t,a){var l=0;function c(){var t,e,n=[];this.add=function(t){n.push(t)},this.call=function(i){for(t=0,e=n.length;t<e;t++)n[t].call(this,i)},this.remove=function(i){var o=[];for(t=0,e=n.length;t<e;t++)n[t]!==i&&o.push(n[t]);n=o},this.length=function(){return n.length}}function h(t,n){if(t)if(t.resizedAttached)t.resizedAttached.add(n);else{t.resizedAttached=new c,t.resizedAttached.add(n),t.resizeSensor=document.createElement("div"),t.resizeSensor.dir="ltr",t.resizeSensor.className="resize-sensor";var i={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},s={position:"absolute",left:"0px",top:"0px",transition:"0s"};r(t.resizeSensor,i);var a=document.createElement("div");a.className="resize-sensor-expand",r(a,i);var h=document.createElement("div");r(h,s),a.appendChild(h);var u=document.createElement("div");u.className="resize-sensor-shrink",r(u,i);var d=document.createElement("div");r(d,s),r(d,{width:"200%",height:"200%"}),u.appendChild(d),t.resizeSensor.appendChild(a),t.resizeSensor.appendChild(u),t.appendChild(t.resizeSensor);var f=window.getComputedStyle(t),p=f?f.getPropertyValue("position"):null;"absolute"!==p&&"relative"!==p&&"fixed"!==p&&"sticky"!==p&&(t.style.position="relative");var v=!1,m=0,g=o(t),y=0,b=0,w=!0;l=0;var E=function(){var e=t.offsetWidth,n=t.offsetHeight;h.style.width=e+10+"px",h.style.height=n+10+"px",a.scrollLeft=e+10,a.scrollTop=n+10,u.scrollLeft=e+10,u.scrollTop=n+10},T=function(){if(w){if(0===t.offsetWidth&&0===t.offsetHeight)return void(l||(l=e((function(){l=0,T()}))));w=!1}E()};t.resizeSensor.resetSensor=T;var x=function(){m=0,v&&(y=g.width,b=g.height,t.resizedAttached&&t.resizedAttached.call(g))},I=function(){g=o(t),(v=g.width!==y||g.height!==b)&&!m&&(m=e(x)),T()},_=function(t,e,n){t.attachEvent?t.attachEvent("on"+e,n):t.addEventListener(e,n)};_(a,"scroll",I),_(u,"scroll",I),l=e((function(){l=0,T()}))}}i(t,(function(t){h(t,a)})),this.detach=function(e){l||(n(l),l=0),s.detach(t,e)},this.reset=function(){t.resizeSensor.resetSensor()}};if(s.reset=function(t){i(t,(function(t){t.resizeSensor.resetSensor()}))},s.detach=function(t,e){i(t,(function(t){t&&(t.resizedAttached&&"function"==typeof e&&(t.resizedAttached.remove(e),t.resizedAttached.length())||t.resizeSensor&&(t.contains(t.resizeSensor)&&t.removeChild(t.resizeSensor),delete t.resizeSensor,delete t.resizedAttached))}))},"undefined"!=typeof MutationObserver){var a=new MutationObserver((function(t){for(var e in t)if(t.hasOwnProperty(e))for(var n=t[e].addedNodes,i=0;i<n.length;i++)n[i].resizeSensor&&s.reset(n[i])}));document.addEventListener("DOMContentLoaded",(function(t){a.observe(document.body,{childList:!0,subtree:!0})}))}return s})?i.call(e,n,e,t):i)||(t.exports=o)},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";var i=n(3);n.n(i).a},function(t,e,n){"use strict";var i=n(4);n.n(i).a},function(t,e,n){"use strict";var i=n(5);n.n(i).a},function(t,e,n){"use strict";var i=n(6);n.n(i).a},function(t,e,n){"use strict";n.r(e);var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function o(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),o=0;for(e=0;e<n;e++)for(var r=arguments[e],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i}var r=n(2),s=n.n(r);function a(t){return t.containerHeight/2}function l(t){return t.containerWidth/2}function c(t){return!t.parent}function h(t){return null===t.activeChildIndex?null:t.children[t.activeChildIndex]}function u(t){var e=[];return function(t,e,n,i){n&&e(t);for(;t=t.parent;){if(c(t)){i&&e(t);break}e(t)}}(t,(function(t){e.push(t.index)}),!0,!1),e.reverse()}function d(t,e,n){n&&e(t),t.children.forEach((function(t){d(t,e,!0)}))}function f(t,e,n,i,o){for(void 0===o&&(o=Number.MAX_SAFE_INTEGER),n&&e(t);!(o<=0)&&(t=h(t));){if(!h(t)){i&&e(t);break}e(t),o--}}var p=n(0),v=n.n(p);function m(){document.body.getBoundingClientRect()}function g(t){if(!t.applyTrunkMove)return t.trunkOffset;var e=t.options.orientation,n=t.canvasEl.getBoundingClientRect(),i=t.trunkEl.getBoundingClientRect();return"ltr"===e?l(t)-(i.left-n.left):"rtl"===e?l(t)-(n.right-i.right):"ttb"===e?a(t)-(i.top-n.top):"btt"===e?a(t)-(n.bottom-i.bottom):void 0}function y(t,e){if(!e.applyBranchMove)return e.branchOffset;var n=t.options.orientation,i=t.options.branchDirection,o=t.canvasEl.getBoundingClientRect(),r=e.branchEl.getBoundingClientRect();if("ltr"===n||"rtl"===n){if("normal"===i)return a(t)-(r.top-o.top);if("reverse"===i)return a(t)-(o.bottom-r.bottom)}else if("ttb"===n||"btt"===n){if("normal"===i)return l(t)-(r.left-o.left);if("reverse"===i)return l(t)-(o.right-r.right)}}var b=function(){function t(t,e,n){this._v=t,this._nv=e,this.data=n}return t.prototype.setDeleted=function(){this._nv=null},t.prototype.throwErrorIfDeleted=function(){if(!this._nv)throw new Error("Invalid operation because this noode has been deleted from its noodel.")},t.prototype.isDeleted=function(){return!this._nv},t.prototype.getParent=function(){return this.throwErrorIfDeleted(),this.isRoot()?null:T(this._nv,this._v.parent.id)},t.prototype.getPrev=function(){return this.isRoot()?null:this.getParent().getChild(this.getIndex()-1)},t.prototype.getNext=function(){return this.isRoot()?null:this.getParent().getChild(this.getIndex()+1)},t.prototype.getPath=function(){return this.throwErrorIfDeleted(),u(this._v)},t.prototype.getDefinition=function(){return this.throwErrorIfDeleted(),J(this._nv,this._v)},t.prototype.getEl=function(){return this._v.el||null},t.prototype.getChildBranchEl=function(){return this._v.branchBoxEl||null},t.prototype.getChild=function(t){return this.throwErrorIfDeleted(),"number"!=typeof t||t<0||t>=this._v.children.length?null:T(this._nv,this._v.children[t].id)},t.prototype.getChildren=function(){var t=this;return this.throwErrorIfDeleted(),this._v.children.map((function(e){return T(t._nv,e.id)}))},t.prototype.getChildCount=function(){return this._v.children.length},t.prototype.getId=function(){return this._v.id},t.prototype.getContent=function(){return this._v.content},t.prototype.getClass=function(){return this._v.className},t.prototype.getStyle=function(){return this._v.style},t.prototype.getIndex=function(){return this.throwErrorIfDeleted(),this._v.index},t.prototype.getLevel=function(){return this.throwErrorIfDeleted(),this._v.level},t.prototype.getActiveChildIndex=function(){return this._v.activeChildIndex},t.prototype.getActiveChild=function(){return this.throwErrorIfDeleted(),null===this._v.activeChildIndex?null:T(this._nv,this._v.children[this._v.activeChildIndex].id)},t.prototype.isRoot=function(){return this.throwErrorIfDeleted(),null===this._v.parent},t.prototype.isActive=function(){return this._v.isActive},t.prototype.isVisible=function(){return this.throwErrorIfDeleted(),!this.isRoot()&&this._v.parent.isBranchVisible},t.prototype.isChildrenVisible=function(){return this.throwErrorIfDeleted(),this._v.isBranchVisible},t.prototype.isInFocalBranch=function(){return this.throwErrorIfDeleted(),!this.isRoot()&&this._v.parent.isFocalParent},t.prototype.isFocalParent=function(){return this.throwErrorIfDeleted(),this._v.isFocalParent},t.prototype.isFocalNoode=function(){return this.throwErrorIfDeleted(),this.isActive()&&this.isInFocalBranch()},t.prototype.setId=function(t){var e,n,i,o;(this.throwErrorIfDeleted(),t!==this._v.id)&&(e=this._nv,n=this._v.id,i=t,(o=e.idMap.get(n)).viewState.id=i,e.idMap.delete(n),e.idMap.set(i,o))},t.prototype.setContent=function(t){var e=this;this.throwErrorIfDeleted(),this.isRoot()||(this._v.content=t,v.a.nextTick((function(){if(e._v.parent.isBranchVisible){var t=e._v.el.getBoundingClientRect(),n=e._v.parent.branchBoxEl.getBoundingClientRect();F(e._nv,e._v,t.height,t.width),L(e._nv,e._v.parent,n.height,n.width)}})))},t.prototype.setClass=function(t){this.throwErrorIfDeleted(),this.isRoot()||(this._v.className=Z(t))},t.prototype.setStyle=function(t){this.throwErrorIfDeleted(),this.isRoot()||(this._v.style=tt(t))},t.prototype.setOptions=function(t){this.throwErrorIfDeleted(),this.isRoot()||K(t,this._v)},t.prototype.setActiveChild=function(t){if(this.throwErrorIfDeleted(),"number"!=typeof t||t<0||t>=this._v.children.length)throw new Error("Cannot set active child: noode has no children or invalid index");this._v.isFocalParent?R(this._nv,t-this._v.activeChildIndex):this._v.isBranchVisible&&this._v.level+1<this._nv.focalLevel?P(this._nv,this._v.children[t]):(W(this._nv,this._v,t),X(this._v,t))},t.prototype.jumpToFocus=function(){if(this.throwErrorIfDeleted(),this.isRoot())throw new Error("Cannot jump to root noode");P(this._nv,this._v)},t.prototype.addChild=function(t,e){return this.throwErrorIfDeleted(),this.addChildren([t],e)[0]||null},t.prototype.addChildren=function(t,e){var n=this;if(this.throwErrorIfDeleted(),"number"==typeof e&&(e<0||e>this._v.children.length))throw new Error("Cannot add child noode(s): invalid index");return"number"!=typeof e&&(e=this._v.children.length),0===t.length?[]:function(t,e,n,i){var r,s=e.children[n-1],a=s?s.branchRelativeOffset+s.size:0,l=i.map((function(i,o){return Q(t,i,n+o,e,!1,a)}));l.forEach((function(e){return w(t,e)}));var u=h(t.focalParent);e.isFocalParent&&"branch"===t.panAxis&&A(t);null!==e.activeChildIndex&&n<=e.activeChildIndex&&(e.activeChildIndex+=i.length);(r=e.children).splice.apply(r,o([n,0],l));for(var d=n+l.length;d<e.children.length;d++)e.children[d].index+=l.length;if(e.children.length===l.length){var f=0;for(d=0;d<i.length;d++)if(i[d].isActive){f=d;break}W(t,e,f)}e.isActive&&(c(e)||e.parent.isBranchVisible)&&$(t,t.focalParent,t.options.visibleSubtreeDepth);return e.isBranchTransparent=!0,_(t,u,h(t.focalParent)),l}(this._nv,this._v,e,t).map((function(t){return T(n._nv,t.id)}))},t.prototype.addBefore=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.throwErrorIfDeleted(),this.isRoot())throw new Error("Cannot add sibling noodes before root");return this.getParent().addChildren(t,this.getIndex())},t.prototype.addAfter=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.throwErrorIfDeleted(),this.isRoot())throw new Error("Cannot add sibling noodes after root");return this.getParent().addChildren(t,this.getIndex()+1)},t.prototype.removeChild=function(t){return this.throwErrorIfDeleted(),this.removeChildren(t,1)[0]||null},t.prototype.removeChildren=function(t,e){var n=this;if(this.throwErrorIfDeleted(),"number"!=typeof t||"number"!=typeof e||t<0||e<0||t>=this._v.children.length)throw new Error("Cannot remove child noode(s): invalid index or count");if(t+e>this._v.children.length&&(e=this._v.children.length-t),e<=0)return[];for(var i=t;i<t+e;i++)d(this._v.children[i],(function(t){T(n._nv,t.id).setDeleted()}),!0);var o=function(t,e,n,i){var o=h(t.focalParent);e.isFocalParent&&"branch"===t.panAxis&&A(t);for(var r=n;r<n+i;r++)V(e.children[r]);e.activeChildIndex>=n&&e.activeChildIndex<n+i&&(e.level+1<=t.focalLevel&&e.isBranchVisible&&("trunk"===t.panAxis&&A(t),e.children.length===i?c(e)?(H(t,e),j(t,e),m()):(H(t,e.parent),j(t,e.parent),m()):e.level+1<t.focalLevel&&(H(t,e),j(t,e),m())),e.children.length===i?(W(t,e,null),e.isBranchVisible=!1):n+i<e.children.length?(W(t,e,n+i),$(t,e,t.options.visibleSubtreeDepth),e.branchOffset+=h(e).size/2):(W(t,e,n-1),$(t,e,t.options.visibleSubtreeDepth),e.branchOffset-=h(e).size/2));for(r=n;r<e.children.length;r++)e.children[r].index-=i;e.activeChildIndex>n&&(e.activeChildIndex-=i);var s=e.children.splice(n,i);e.children.length>0&&s.forEach((function(t){return t.fade=!0}));return _(t,o,h(t.focalParent)),s}(this._nv,this._v,t,e),r=o.map((function(t){return J(n._nv,t)}));return o.forEach((function(t){t.parent=null,function(t,e){d(e,(function(e){t.idMap.delete(e.id)}),!0)}(n._nv,t)})),r},t.prototype.removeBefore=function(t){if(this.throwErrorIfDeleted(),"number"!=typeof t||t<0)throw new Error("Cannot remove before: invalid count");if(this.isRoot())return[];var e=this.getIndex()-t;e<0&&(e=0);var n=this.getIndex()-e;return n<=0?[]:this.getParent().removeChildren(e,n)},t.prototype.removeAfter=function(t){if(this.throwErrorIfDeleted(),"number"!=typeof t||t<0)throw new Error("Cannot remove after: invalid count");return this.isRoot()||this.getIndex()===this.getParent().getChildCount()-1?[]:this.getParent().removeChildren(this.getIndex()+1,t)},t.prototype.removeSelf=function(){if(this.throwErrorIfDeleted(),this.isRoot())throw new Error("Cannot remove the root");return this.getParent().removeChild(this.getIndex())},t.prototype.traverseSubtree=function(t,e){var n=this;d(this._v,(function(e){t(T(n._nv,e.id))}),e)},t}();function w(t,e){d(e,(function(e){t.idMap.set(e.id,{viewState:e,viewModel:new b(e,t,e.data)}),delete e.data}),!0)}function E(t,e){var n=t.idMap.get(e);return n?n.viewState:null}function T(t,e){var n=t.idMap.get(e);return n?n.viewModel:null}function x(t){window.history.replaceState(null,"",window.location.href.split("#")[0]+t)}function I(t,e){0===t.eventQueue.length&&v.a.nextTick((function(){return function(t){for(var e=0;e<t.eventQueue.length;e++)t.eventQueue[e]();t.eventQueue=[]}(t)})),t.eventQueue.push(e)}function _(t,e,n){if((e||n)&&(!e||!n||e.id!==n.id)){!function(t){if(t.options.useRouting){var e=h(t.focalParent);x(e?"#"+e.id:"")}}(t);var i=e?T(t,e.id):null,o=n?T(t,n.id):null;e&&"function"==typeof e.options.onExitFocus&&I(t,(function(){return e.options.onExitFocus(i,o)})),n&&"function"==typeof n.options.onEnterFocus&&I(t,(function(){return n.options.onEnterFocus(o,i)})),"function"==typeof t.options.onFocalNoodeChange&&I(t,(function(){return t.options.onFocalNoodeChange(o,i)}));var r=e?e.parent:null,s=n?n.parent:null;if((r||s)&&(!r||!s||r.id!==s.id)){var a=r?T(t,r.id):null,l=s?T(t,s.id):null;r&&"function"==typeof r.options.onChildrenExitFocus&&I(t,(function(){return r.options.onChildrenExitFocus(a,l)})),s&&"function"==typeof s.options.onChildrenEnterFocus&&I(t,(function(){return s.options.onChildrenEnterFocus(l,a)})),"function"==typeof t.options.onFocalParentChange&&I(t,(function(){return t.options.onFocalParentChange(l,a)}))}}}function C(t){if(!t.isInInspectMode){A(t),t.hammerJsInstance.get("pan").set({enable:!1});var e=h(t.focalParent);e.isInInspectMode=!0,t.isInInspectMode=!0,function(t,e){if("function"==typeof t.options.onEnterInspectMode){var n=T(t,e.id);I(t,(function(){return t.options.onEnterInspectMode(n)}))}}(t,e)}}function k(t){if(t.isInInspectMode){t.hammerJsInstance.get("pan").set({enable:!0});var e=window.getSelection?window.getSelection():document.getSelection();e&&(e.removeAllRanges?e.removeAllRanges():e.empty&&e.empty());var n=h(t.focalParent);n.isInInspectMode=!1,t.isInInspectMode=!1,function(t,e){if("function"==typeof t.options.onExitInspectMode){var n=T(t,e.id);I(t,(function(){return t.options.onExitInspectMode(n)}))}}(t,n)}}function S(t,e){var n=t.panStartFocalNoode||h(t.focalParent);if(t.panStartFocalNoode=null,n){t.isInInspectMode&&k(t),"trunk"===t.panAxis&&A(t);var i=function(t,e){var n=t.focalParent;if(e<0)for(var i=0;i>e&&n.parent;i--)n=n.parent;else if(e>0)for(i=0;i<e&&null!==h(n).activeChildIndex;i++)n=h(n);return n}(t,e);i.id===t.focalParent.id&&(e<0?t.trunkStartReached=!0:e>0&&(t.trunkEndReached=!0)),O(t,300),i.id!==t.focalParent.id&&H(t,i),j(t,i),m(),_(t,n,h(t.focalParent))}}function R(t,e){var n=t.panStartFocalNoode||h(t.focalParent);if(t.panStartFocalNoode=null,n){t.isInInspectMode&&k(t),"branch"===t.panAxis&&A(t);var i=t.focalParent.activeChildIndex+e;i<0?i=0:i>=t.focalParent.children.length&&(i=t.focalParent.children.length-1),i===t.focalParent.activeChildIndex&&(e<0?t.branchStartReached=!0:e>0&&(t.branchEndReached=!0)),O(t,300),i!==t.focalParent.activeChildIndex&&(q(h(t.focalParent)),W(t,t.focalParent,i),$(t,t.focalParent,t.options.visibleSubtreeDepth,t.options.subtreeDebounceInterval)),X(t.focalParent,i),m(),_(t,n,h(t.focalParent))}}function M(t,e){if(null!==t.panAxis&&A(t),e.id!==t.focalParent.children[t.focalParent.activeChildIndex].id){for(var n=e.parent;!n.isBranchVisible;)n=n.parent;q(h(n));for(var i=e.parent,o=e.index;i.activeChildIndex!==o&&(W(t,i,o),X(i,o)),i.id!==n.id;)i.isBranchVisible=!0,o=i.index,i=i.parent;$(t,e.parent,t.options.visibleSubtreeDepth),e.parent.id!==t.focalParent.id&&(H(t,e.parent),j(t,e.parent)),m()}}function P(t,e){clearTimeout(t.limitIndicatorTimeout);var n=h(t.focalParent);n&&(t.isInInspectMode&&k(t),M(t,e),_(t,n,h(t.focalParent)))}function O(t,e){function n(){m(),t.branchStartReached=!1,t.branchEndReached=!1,t.trunkStartReached=!1,t.trunkEndReached=!1}e<=0?(clearTimeout(t.limitIndicatorTimeout),t.limitIndicatorTimeout=null,n()):(clearTimeout(t.limitIndicatorTimeout),t.limitIndicatorTimeout=setTimeout(n,300))}function A(t){null!==t.panAxis&&("trunk"===t.panAxis?(t.panOriginTrunk=null,t.panAxis=null,S(t,0)):"branch"===t.panAxis&&(t.panOriginBranch=null,t.panAxis=null,R(t,0)),O(t,0),N(t))}function B(t,e,n){null===t.lastPanTimestamp||n-t.lastPanTimestamp<60?(t.swipeVelocityBuffer.push(e),t.swipeVelocityBuffer.length>10&&t.swipeVelocityBuffer.shift()):(t.swipeVelocityBuffer=[],t.swipeVelocityBuffer.push(e)),t.lastPanTimestamp=n}function D(t){var e=0;return t.swipeVelocityBuffer.forEach((function(t){return e+=t})),e/t.swipeVelocityBuffer.length}function N(t){t.lastPanTimestamp=null,t.swipeVelocityBuffer=[]}function z(t,e){var n=Math.abs(t)*e;if(n<.1)return 0;if(n<1)return t>0?1:-1;var i=Math.round(1.4*Math.log(n)+1);return t>0?i:-i}function F(t,e,n,i,o){void 0===o&&(o=!1);var r=t.options.orientation,s=null;"ltr"===r||"rtl"===r?s=n:"ttb"!==r&&"btt"!==r||(s=i);var a=e.parent,l=s-e.size;if(e.size=s,Math.abs(l)>.01){for(var c=e.index+1;c<a.children.length;c++)a.children[c].branchRelativeOffset+=l;var h=0;if(e.index===a.activeChildIndex?h=l/2:e.index<a.activeChildIndex&&(h=l),0!==h)if("branch"===t.panAxis&&a.isFocalParent&&(t.panOriginBranch+=h),a.applyBranchMove&&!o){var u=y(t,a),d=a.branchOffset-u;a.branchOffset=u+h,a.applyBranchMove=!1,v.a.nextTick((function(){m(),a.branchOffset+=d,a.applyBranchMove=!0}))}else o&&t.isMounted?(a.applyBranchMove=!0,a.branchOffset+=h):a.branchOffset+=h}}function L(t,e,n,i,o){void 0===o&&(o=!1);var r=t.options.orientation,s=null;"ltr"===r||"rtl"===r?s=i:"ttb"!==r&&"btt"!==r||(s=n);var a=s-e.branchSize;if(e.branchSize=s,Math.abs(a)>.01){d(e,(function(t){return t.trunkRelativeOffset+=a}),!1);var l=0;if(e.isFocalParent?l=a/2:e.isBranchVisible&&e.level+1<t.focalLevel&&(l=a),0!==l)if("trunk"===t.panAxis&&(t.panOriginTrunk+=l),t.applyTrunkMove&&!o){var c=g(t),h=t.trunkOffset-c;t.trunkOffset=c+l,t.applyTrunkMove=!1,v.a.nextTick((function(){m(),t.trunkOffset+=h,t.applyTrunkMove=!0}))}else t.trunkOffset+=l}}function V(t){for(var e=t.parent,n=t.index+1;n<e.children.length;n++)e.children[n].branchRelativeOffset-=t.size;t.index===e.activeChildIndex?(e.applyBranchMove=!0,e.branchOffset-=t.size/2):t.index<e.activeChildIndex&&(e.applyBranchMove=!0,e.branchOffset-=t.size)}function j(t,e){var n=e.trunkRelativeOffset+e.branchSize/2;Math.abs(t.trunkOffset-n)>=1&&(t.applyTrunkMove=!0,t.ignoreTransitionEnd=!0,requestAnimationFrame((function(){return t.ignoreTransitionEnd=!1}))),t.trunkOffset=n}function X(t,e){var n=t.children[e],i=n.branchRelativeOffset+n.size/2;t.isBranchVisible&&Math.abs(t.branchOffset-i)>=1&&(t.applyBranchMove=!0,t.ignoreTransitionEnd=!0,requestAnimationFrame((function(){return t.ignoreTransitionEnd=!1}))),t.branchOffset=i}function Y(t,e,n,i){t.throttleMap.get(e)||(n(),t.throttleMap.set(e,!0),setTimeout((function(){t.throttleMap.set(e,!1)}),i))}function H(t,e){t.focalParent.isFocalParent=!1;var n=h(e);if(n){for(var i=0;i<t.options.visibleSubtreeDepth;i++){var o=h(n);if(!o)break;n=o}q(n)}e.isFocalParent=!0,t.focalParent=e,t.focalLevel=e.level+1,$(t,t.root,e.level+t.options.visibleSubtreeDepth,0)}function W(t,e,n){h(e)&&(h(e).isActive=!1),e.activeChildIndex=n,h(e)&&(h(e).isActive=!0)}function $(t,e,n,i){void 0===i&&(i=0),function(t,e,n,i){var o=t.debounceMap.get(e);o&&clearTimeout(o),i<=0?n():t.debounceMap.set(e,setTimeout((function(){n()}),i))}(t,"showActiveSubtree",(function(){f(e,(function(t){t.isBranchVisible||(t.isBranchVisible=!0)}),!0,!1,n)}),i)}function q(t,e){f(t,(function(t){t.isBranchVisible&&(t.isBranchVisible=!1)}),!0,!1,e)}function U(t){for(var e=t.getAttribute("data-id"),n=t.getAttribute("data-class"),i=t.getAttribute("data-style"),o=0,r="",s=0,a=[],l=0;l<t.childNodes.length;l++){var c=t.childNodes[l];c.nodeType===Node.TEXT_NODE?r+=c.textContent:c.nodeType===Node.ELEMENT_NODE&&("DIV"===c.nodeName&&c.className.split(" ").some((function(t){return"noode"===t}))?(s++,c.hasAttribute("data-active")&&(o=s-1),a.push(U(c))):r+=c.outerHTML)}return{id:e,content:r,activeChildIndex:a.length>0?o:null,children:a,className:n,style:i}}function G(t,e){var n=e.options.orientation,o=e.options.branchDirection;if(e.options=i(i({},e.options),t),t.useSwipeNavigation||A(e),e.options.useRouting?function(t){t.onHashChanged||(t.onHashChanged=function(){var e=window.location.hash;if(e){var n=E(t,e.substr(1));n&&n.parent&&P(t,n)}},window.addEventListener("hashchange",t.onHashChanged))}(e):function(t){t.onHashChanged&&(window.removeEventListener("hashchange",t.onHashChanged),t.onHashChanged=null)}(e),e.isMounted){var r=e.options.orientation,s=e.options.branchDirection;("ltr"!==n&&"rtl"!==n||"ttb"!==r&&"btt"!==r)&&("ttb"!==n&&"btt"!==n||"ltr"!==r&&"rtl"!==r)?s!==o&&d(e.root,(function(t){return t.applyBranchMove=!1}),!0):function(t){A(t),t.applyTrunkMove=!1,t.trunkOffset=0,d(t.root,(function(t){t.trunkRelativeOffset=0,t.branchRelativeOffset=0,t.size=0,t.branchSize=0,t.applyBranchMove=!1,t.branchOffset=0,t.isBranchTransparent=!0}),!0),v.a.nextTick((function(){d(t.root,(function(e){if(e.el){var n=e.el.getBoundingClientRect();F(t,e,n.height,n.width)}e.branchBoxEl&&(n=e.branchBoxEl.getBoundingClientRect(),L(t,e,n.height,n.width)),e.isBranchTransparent=!1}),!0)}))}(e)}}function K(t,e){e.options=i(i({},e.options),t)}function Q(t,e,n,i,o,r){var s=null===i;e.children||(e.children=[]);var a=null;if("string"==typeof e.id){if(function(t,e){return t.idMap.has(e)}(t,e.id))throw new Error("Duplicate ID for new noode: "+e.id);a=e.id}else a=function(t){return t.idCount++,"_"+t.idCount.toString()}(t);var l=e.children.length>0?0:null;if("number"==typeof e.activeChildIndex){if(l<0||l>=e.children.length)throw new Error("Invalid active child index for new noode: "+a);l=e.activeChildIndex}else for(var c=0;c<e.children.length;c++)if(e.children[c].isActive){l=c;break}var h={index:n,level:s?0:i.level+1,isBranchVisible:!1,isBranchTransparent:!0,isFocalParent:s,isActive:o,size:0,trunkRelativeOffset:s?0:i.trunkRelativeOffset+i.branchSize,branchOffset:0,applyBranchMove:!1,isInInspectMode:!1,branchRelativeOffset:r,branchSize:0,parent:i,id:a,children:[],content:e.content||null,className:Z(e.className),style:tt(e.style),activeChildIndex:l,options:{skipResizeDetection:null,skipBranchResizeDetection:null,showBranchBackdrop:null,showChildIndicator:null,onChildrenEnterFocus:null,onChildrenExitFocus:null,onEnterFocus:null,onExitFocus:null}};void 0!==e.data&&(h.data=e.data),e.options&&"object"==typeof e.options&&K(e.options,h);for(c=0;c<e.children.length;c++)h.children.push(Q(t,e.children[c],c,h,c===l,0));return h}function J(t,e){var n=T(t,e.id).data,o={id:e.id,content:e.content,isActive:e.isActive,children:e.children.map((function(e){return J(t,e)})),className:e.className,style:e.style,options:i({},e.options)};return void 0!==n&&(o.data=n),o}function Z(t){return Array.isArray(t)?t:t&&"string"==typeof t?t.split(" "):[]}function tt(t){if(t&&"object"==typeof t)return t;if(t&&"string"==typeof t){var e=t.split(";").map((function(t){return t.split(":").map((function(t){return t.trim()}))})).filter((function(t){return 2===t.length})),n={};return e.forEach((function(t){n[t[0]]=t[1]})),n}return{}}var et=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"canvas",staticClass:"nd-canvas",class:t.canvasClass,attrs:{tabindex:"0"},on:{dragstart:t.onDragStart}},[n("transition",{attrs:{name:"nd-limit"}},[t.noodel.options.showLimitIndicators?n("div",{directives:[{name:"show",rawName:"v-show",value:t.showLeftLimit,expression:"showLeftLimit"}],staticClass:"nd-limit nd-limit-left"}):t._e()]),t._v(" "),n("transition",{attrs:{name:"nd-limit"}},[t.noodel.options.showLimitIndicators?n("div",{directives:[{name:"show",rawName:"v-show",value:t.showRightLimit,expression:"showRightLimit"}],staticClass:"nd-limit nd-limit-right"}):t._e()]),t._v(" "),n("transition",{attrs:{name:"nd-limit"}},[t.noodel.options.showLimitIndicators?n("div",{directives:[{name:"show",rawName:"v-show",value:t.showTopLimit,expression:"showTopLimit"}],staticClass:"nd-limit nd-limit-top"}):t._e()]),t._v(" "),n("transition",{attrs:{name:"nd-limit"}},[t.noodel.options.showLimitIndicators?n("div",{directives:[{name:"show",rawName:"v-show",value:t.showBottomLimit,expression:"showBottomLimit"}],staticClass:"nd-limit nd-limit-bottom"}):t._e()]),t._v(" "),n("transition-group",{ref:"trunk",staticClass:"nd-trunk",class:t.trunkClass,style:t.trunkStyle,attrs:{name:"nd-branch-box",tag:"div"},nativeOn:{transitionend:function(e){return t.onTransitionEnd(e)}}},t._l(t.allBranchParents,(function(e){return n("NoodelCanvasTrunkBranch",{directives:[{name:"show",rawName:"v-show",value:e.isBranchVisible||e.isBranchTransparent,expression:"parent.isBranchVisible || parent.isBranchTransparent"}],key:e.id,attrs:{parent:e,noodel:t.noodel}})})),1)],1)};et._withStripped=!0;var nt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nd-branch-box",class:t.branchBoxClass,style:t.branchBoxStyle,attrs:{id:t.parent.id}},[t.showBranchBackdrop?n("div",{staticClass:"nd-branch-backdrop",class:t.branchBackdropClass}):t._e(),t._v(" "),n("div",{ref:"branch",staticClass:"nd-branch",class:t.branchClass,style:t.branchStyle,on:{transitionend:t.onTransitionEnd}},[n("NoodeTransitionGroup",{attrs:{noodel:t.noodel,parent:t.parent}})],1)])};nt._withStripped=!0;var it=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition-group",{staticClass:"nd-branch-inner",class:t.branchInnerClass,style:t.branchInnerStyle,attrs:{name:"nd-noode",tag:"div"}},t._l(t.parent.children,(function(e){return n("NoodelCanvasTrunkBranchNoode",{key:e.id,attrs:{noode:e,noodel:t.noodel}})})),1)};it._withStripped=!0;var ot=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nd-noode-box",class:t.noodeBoxClass},[n("transition",{attrs:{name:"nd-inspect-backdrop"}},[t.noode.isInInspectMode?n("div",{staticClass:"nd-inspect-backdrop",style:t.backdropStyle}):t._e()]),t._v(" "),n("div",t._b({ref:"noode",staticClass:"nd-noode",class:t.noodeClass,style:t.noodeStyle,on:{pointerup:t.onPointerUp,mouseup:t.onPointerUp,touchend:t.onPointerUp}},"div","string"==typeof t.noode.content?{innerHTML:t.noode.content}:null,!0),[this.noode.content&&"object"==typeof this.noode.content?n(t.noode.content.component,t._g(t._b({tag:"component"},"component",t.noode.content.props,!1),t.noode.content.eventListeners)):t._e()],1),t._v(" "),n("transition",{attrs:{name:"nd-child-indicator"}},[t.showChildIndicator?n("div",{staticClass:"nd-child-indicator",class:t.childIndicatorClass}):t._e()])],1)};ot._withStripped=!0;var rt=v.a.extend({props:{noode:Object,noodel:Object},mounted:function(){var t=this;this.noode.el=this.$el,v.a.nextTick((function(){var e=t.noode.el.getBoundingClientRect();F(t.noodel,t.noode,e.height,e.width,!0),("boolean"==typeof t.noode.options.skipResizeDetection?t.noode.options.skipResizeDetection:t.noodel.options.skipResizeDetection)||(t.noode.resizeSensor=new s.a(t.$el,(function(e){F(t.noodel,t.noode,e.height,e.width)}))),v.a.nextTick((function(){t.noode.parent.isBranchTransparent=!1}))}))},beforeDestroy:function(){if(this.noode.resizeSensor&&this.noode.resizeSensor.detach(),this.noode.resizeSensor=null,this.noode.fade){delete this.noode.fade;var t=this.noodel.options.orientation,e=this.noodel.options.branchDirection,n=this.noode.branchRelativeOffset+"px";this.noode.el.classList.remove("nd-noode-active"),"ltr"===t||"rtl"===t?(this.noode.el.style.width="100%","normal"===e?this.noode.el.style.top=n:this.noode.el.style.bottom=n):(this.noode.el.style.height="100%","normal"===e?this.noode.el.style.left=n:this.noode.el.style.right=n)}this.noode.el=null},methods:{onPointerUp:function(){var t=this;this.noodel.pointerUpSrcNoode||(this.noodel.pointerUpSrcNoode=this.noode,requestAnimationFrame((function(){return t.noodel.pointerUpSrcNoode=null})))}},computed:{noodeBoxClass:function(){return{"nd-noode-box-active":this.noode.isActive}},backdropStyle:function(){return{width:10*this.noodel.containerWidth+"px",height:10*this.noodel.containerHeight+"px"}},noodeClass:function(){return o([{"nd-noode-active":this.noode.isActive,"nd-noode-inspect":this.noode.isInInspectMode}],this.noode.className)},noodeStyle:function(){return this.noode.style},showChildIndicator:function(){return("boolean"==typeof this.noode.options.showChildIndicator?this.noode.options.showChildIndicator:this.noodel.options.showChildIndicators)&&this.noode.children.length>0},childIndicatorClass:function(){return{"nd-child-indicator-active":this.noode.isActive,"nd-child-indicator-expanded":this.noode.isBranchVisible}}}});n(7);function st(t,e,n,i,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var h=c.render;c.render=function(t,e){return l.call(e),h(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}var at=st(rt,ot,[],!1,null,null,null);at.options.__file="src/view/NoodelCanvasTrunkBranchNoode.vue";var lt=at.exports,ct=v.a.extend({components:{NoodelCanvasTrunkBranchNoode:lt},props:{parent:Object,noodel:Object},computed:{branchInnerClass:function(){return{"nd-branch-inner-focal":this.parent.isFocalParent}},branchInnerStyle:function(){var t=this.noodel.options.orientation,e=this.noodel.options.branchDirection,n={};return"ltr"===t||"rtl"===t?"normal"===e?n["flex-direction"]="column":"reverse"===e&&(n["flex-direction"]="column-reverse"):"ttb"!==t&&"btt"!==t||("normal"===e?n["flex-direction"]="row":"reverse"===e&&(n["flex-direction"]="row-reverse")),n}}}),ht=(n(8),st(ct,it,[],!1,null,null,null));ht.options.__file="src/view/NoodeTransitionGroup.vue";var ut=ht.exports,dt=v.a.extend({components:{NoodeTransitionGroup:ut},props:{parent:Object,noodel:Object},mounted:function(){var t=this;this.parent.branchBoxEl=this.$el,this.parent.branchEl=this.$refs.branch;var e=this.parent.branchBoxEl.getBoundingClientRect();L(this.noodel,this.parent,e.height,e.width,!0),("boolean"==typeof this.parent.options.skipBranchResizeDetection?this.parent.options.skipBranchResizeDetection:this.noodel.options.skipResizeDetection)||(this.parent.branchResizeSensor=new s.a(this.parent.branchBoxEl,(function(e){L(t.noodel,t.parent,e.height,e.width)})))},beforeDestroy:function(){this.parent.branchResizeSensor&&this.parent.branchResizeSensor.detach(),this.parent.branchResizeSensor=null,this.parent.branchEl=null,this.parent.branchBoxEl=null},computed:{branchBoxStyle:function(){var t=this.noodel.options.orientation,e=this.noodel.options.branchDirection,n={};return"ltr"===t?(n.left=0,n.height="100%",n.transform="translateX("+this.parent.trunkRelativeOffset+"px)",n["flex-direction"]="normal"===e?"column":"column-reverse"):"rtl"===t?(n.right=0,n.height="100%",n.transform="translateX("+-this.parent.trunkRelativeOffset+"px)",n["flex-direction"]="normal"===e?"column":"column-reverse"):"ttb"===t?(n.top=0,n.width="100%",n.transform="translateY("+this.parent.trunkRelativeOffset+"px)",n["flex-direction"]="normal"===e?"row":"row-reverse"):"btt"===t&&(n.bottom=0,n.width="100%",n.transform="translateY("+-this.parent.trunkRelativeOffset+"px)",n["flex-direction"]="normal"===e?"row":"row-reverse"),n["pointer-events"]=this.parent.isBranchVisible?null:"none",n.opacity=!this.parent.isBranchVisible&&this.parent.isBranchTransparent?0:null,n},branchStyle:function(){var t=this.noodel.options.orientation,e=this.noodel.options.branchDirection,n={};return"ltr"===t||"rtl"===t?"normal"===e?n.transform="translateY("+(-this.parent.branchOffset+a(this.noodel))+"px)":"reverse"===e&&(n.transform="translateY("+(this.parent.branchOffset-a(this.noodel))+"px)"):"ttb"!==t&&"btt"!==t||("normal"===e?n.transform="translateX("+(-this.parent.branchOffset+l(this.noodel))+"px)":"reverse"===e&&(n.transform="translateX("+(this.parent.branchOffset-l(this.noodel))+"px)")),n},branchBoxClass:function(){return{"nd-branch-box-focal":this.parent.isFocalParent}},branchBackdropClass:function(){return{"nd-branch-backdrop-focal":this.parent.isFocalParent}},branchClass:function(){return{"nd-branch-move":this.parent.applyBranchMove,"nd-branch-focal":this.parent.isFocalParent}},showBranchBackdrop:function(){return"boolean"==typeof this.parent.options.showBranchBackdrop?this.parent.options.showBranchBackdrop:this.noodel.options.showBranchBackdrops}},methods:{onTransitionEnd:function(t){if("transform"===t.propertyName&&t.target===this.$refs.branch){if(this.parent.ignoreTransitionEnd)return;this.parent.applyBranchMove=!1}}}}),ft=(n(9),st(dt,nt,[],!1,null,null,null));ft.options.__file="src/view/NoodelCanvasTrunkBranch.vue";var pt=ft.exports,vt=n(1),mt=n.n(vt);function gt(t,e){t.addEventListener("keydown",(function(t){return Y(e,"keydown",(function(){return function(t,e){if(bt(t,e,"nd-prevent-key"))return;if("Shift"===e.key)t.isShiftKeyPressed=!0;else if("Enter"===e.key){if(!t.options.useInspectModeKey)return;t.isInInspectMode?k(t):C(t)}if(!t.options.useKeyNavigation)return;if(t.isInInspectMode)return;"ArrowDown"===e.key?yt(t,"y",1):"ArrowUp"===e.key?yt(t,"y",-1):"ArrowLeft"===e.key?yt(t,"x",-1):"ArrowRight"===e.key?yt(t,"x",1):" "===e.key||"Spacebar"===e.key||"PageDown"===e.key?t.isShiftKeyPressed?yt(t,"x",3):yt(t,"y",3):"PageUp"===e.key?t.isShiftKeyPressed?yt(t,"x",-3):yt(t,"y",-3):"Home"===e.key?t.isShiftKeyPressed?yt(t,"x",Number.MIN_SAFE_INTEGER):yt(t,"y",Number.MIN_SAFE_INTEGER):"End"===e.key&&(t.isShiftKeyPressed?yt(t,"x",Number.MAX_SAFE_INTEGER):yt(t,"y",Number.MAX_SAFE_INTEGER))}(e,t)}),60)})),t.addEventListener("keyup",(function(t){return function(t,e){"Shift"===e.key&&(t.isShiftKeyPressed=!1)}(e,t)})),t.addEventListener("wheel",(function(t){return Y(e,"wheel",(function(){return function(t,e){if(!t.options.useWheelNavigation)return;if(t.isInInspectMode)return;if(bt(t,e,"nd-prevent-wheel"))return;Math.abs(e.deltaY)>Math.abs(e.deltaX)?t.isShiftKeyPressed?e.deltaY>0?yt(t,"x",1):e.deltaY<0&&yt(t,"x",-1):e.deltaY>0?yt(t,"y",1):e.deltaY<0&&yt(t,"y",-1):Math.abs(e.deltaX)>Math.abs(e.deltaY)&&(t.isShiftKeyPressed?e.deltaY>0?yt(t,"y",1):e.deltaY<0&&yt(t,"y",-1):e.deltaX>0?yt(t,"x",1):e.deltaX<0&&yt(t,"x",-1))}(e,t)}),80)}));var n=new mt.a.Manager(t),i=new mt.a.Pan({threshold:10,direction:mt.a.DIRECTION_ALL}),o=new mt.a.Tap({taps:1,posThreshold:100}),r=new mt.a.Tap({taps:2,posThreshold:100});n.add([i,r,o]),o.recognizeWith(r),n.on("panstart",(function(t){return function(t,e){if(!t.options.useSwipeNavigation)return;if(t.isInInspectMode)return;if(bt(t,e.srcEvent,"nd-prevent-swipe"))return;var n=null;e.direction===mt.a.DIRECTION_LEFT||e.direction===mt.a.DIRECTION_RIGHT?n="x":e.direction!==mt.a.DIRECTION_UP&&e.direction!==mt.a.DIRECTION_DOWN||(n="y");!function(t,e){clearTimeout(t.limitIndicatorTimeout);var n=h(t.focalParent);if(n){t.panStartFocalNoode=n;var i=null,o=t.options.orientation;if(i="ltr"===o||"rtl"===o?"x"===e?"trunk":"branch":"y"===e?"trunk":"branch",t.panAxis=i,"trunk"===i){var r=g(t);t.applyTrunkMove=!1,t.trunkOffset=r,t.panOriginTrunk=r}else if("branch"===i){var s=y(t,t.focalParent);t.focalParent.applyBranchMove=!1,t.focalParent.branchOffset=s,t.panOriginBranch=s}}}(t,n)}(e,t)})),n.on("pan",(function(t){return function(t,e){!function(t,e,n,i,o,r){if(null!==t.panAxis){var s=null,a=null,l=t.options.orientation;if("trunk"===t.panAxis){"ltr"===l?(s=-e,a=-i):"rtl"===l?(s=e,a=i):"ttb"===l?(s=-n,a=-o):"btt"===l&&(s=n,a=o),B(t,s,r);var c=t.panOriginTrunk+a*t.options.swipeMultiplierTrunk,u=t.focalParent,d=!1,f=!1;if(c===t.trunkOffset)return;if(c>t.trunkOffset){for(;c>u.trunkRelativeOffset+u.branchSize;){var p=h(u);if(!h(p))break;u=p}h(h(u))||c>(I=u.trunkRelativeOffset+u.branchSize/2)&&(f=!0,c=I)}else{for(;c<u.trunkRelativeOffset;){var v=u.parent;if(!v)break;u=v}u.parent||c<(I=u.branchSize/2)&&(d=!0,c=I)}u!==t.focalParent&&H(t,u),t.trunkEndReached=f,t.trunkStartReached=d,t.trunkOffset=c}else if("branch"===t.panAxis){var m=t.options.branchDirection;"ltr"===l||"rtl"===l?"normal"===m?(s=-n,a=-o):"reverse"===m&&(s=n,a=o):"ttb"!==l&&"btt"!==l||("normal"===m?(s=-e,a=-i):"reverse"===m&&(s=e,a=i)),B(t,s,r),c=t.panOriginBranch+a*t.options.swipeMultiplierBranch;var g=t.focalParent,y=g.activeChildIndex,b=g.children[y],w=!1,E=!1;if(c===t.focalParent.branchOffset)return;if(c>t.focalParent.branchOffset){for(;c>b.branchRelativeOffset+b.size;){var T=y+1;if(T>=g.children.length)break;y=T,b=g.children[y]}y===g.children.length-1&&c>(I=b.branchRelativeOffset+b.size/2)&&(E=!0,c=I)}else{for(;c<b.branchRelativeOffset;){var x=y-1;if(x<0)break;y=x,b=g.children[y]}var I;0===y&&c<(I=b.size/2)&&(w=!0,c=I)}y!==g.activeChildIndex&&(q(h(g)),W(0,g,y),$(t,g,t.options.visibleSubtreeDepth,t.options.subtreeDebounceInterval)),t.branchStartReached=w,t.branchEndReached=E,t.focalParent.branchOffset=c}}}(t,e.velocityX,e.velocityY,e.deltaX,e.deltaY,e.timeStamp)}(e,t)})),n.on("panend",(function(t){return function(t,e){!function(t){null!==t.panAxis&&("trunk"===t.panAxis?(t.panOriginTrunk=null,t.panAxis=null,S(t,z(D(t),t.options.snapMultiplierTrunk))):"branch"===t.panAxis&&(t.panOriginBranch=null,t.panAxis=null,R(t,z(D(t),t.options.snapMultiplierBranch))),O(t,0),N(t))}(t)}(e)})),n.on("tap",(function(t){return function(t,e){if(null!==t.panAxis)return;if(bt(t,e.srcEvent,"nd-prevent-tap"))return;if(1===e.tapCount){if(!t.options.useTapNavigation)return;if(t.isInInspectMode)return;if(t.pointerUpSrcNoode){var n=t.pointerUpSrcNoode;if(t.options.retainDepthOnTapNavigation&&!n.isBranchVisible)for(var i=h(t.focalParent).level-n.level,o=0;o<i;o++){var r=h(n);if(!r)break;n=r}P(t,n)}}else if(2===e.tapCount){if(!t.options.useInspectModeDoubleTap)return;t.isInInspectMode?k(t):C(t)}}(e,t)})),e.hammerJsInstance=n}function yt(t,e,n){var i=t.options.orientation,o=t.options.branchDirection;"ltr"===i&&"x"===e||"ttb"===i&&"y"===e?S(t,n):"rtl"===i&&"x"===e||"btt"===i&&"y"===e?S(t,-n):R(t,"normal"===o?n:-n)}function bt(t,e,n){for(var i=e.target;;){var o=i.classList;if(o&&o.contains(n))return!0;if(i===t.canvasEl)return!1;if(!(i=i.parentElement))return!1}}var wt=v.a.extend({components:{NoodelCanvasTrunkBranch:pt},props:{noodel:Object},mounted:function(){var t,e,n,i=this;t=this.$el,e=this.noodel,n=t.getBoundingClientRect(),e.containerWidth=n.width,e.containerHeight=n.height,new s.a(t,(function(t){e.containerWidth=t.width,e.containerHeight=t.height})),gt(this.$el,this.noodel),this.noodel.trunkEl=this.$refs.trunk.$el,this.noodel.canvasEl=this.$refs.canvas,this.$nextTick((function(){i.allBranchParents.forEach((function(t){X(t,t.activeChildIndex)})),j(i.noodel,i.noodel.focalParent),requestAnimationFrame((function(){i.$nextTick((function(){i.noodel.isMounted=!0,"function"==typeof i.noodel.options.onMount&&i.noodel.options.onMount()}))}))}))},destroyed:function(){this.noodel.trunkOffset=0,this.noodel.containerHeight=0,this.noodel.containerWidth=0,this.noodel.isMounted=!1,delete this.noodel.canvasEl,delete this.noodel.trunkEl,d(this.noodel.root,(function(t){t.trunkRelativeOffset=0,t.branchRelativeOffset=0,t.isBranchTransparent=!0,t.size=0,t.branchSize=0,t.branchOffset=0,delete t.branchEl,delete t.branchBoxEl,delete t.el,delete t.resizeSensor,delete t.branchResizeSensor}),!0)},computed:{canvasClass:function(){var t=this.noodel.options.orientation,e=this.noodel.options.branchDirection,n={};return n["nd-canvas-"+t]=!0,n["nd-canvas-"+e]=!0,n},showLeftLimit:function(){var t=this.noodel.options.orientation,e=this.noodel.options.branchDirection;return"ltr"===t?this.noodel.trunkStartReached:"rtl"===t?this.noodel.trunkEndReached:"normal"===e?this.noodel.branchStartReached:this.noodel.branchEndReached},showRightLimit:function(){var t=this.noodel.options.orientation,e=this.noodel.options.branchDirection;return"ltr"===t?this.noodel.trunkEndReached:"rtl"===t?this.noodel.trunkStartReached:"normal"===e?this.noodel.branchEndReached:this.noodel.branchStartReached},showTopLimit:function(){var t=this.noodel.options.orientation,e=this.noodel.options.branchDirection;return"ttb"===t?this.noodel.trunkStartReached:"btt"===t?this.noodel.trunkEndReached:"normal"===e?this.noodel.branchStartReached:this.noodel.branchEndReached},showBottomLimit:function(){var t=this.noodel.options.orientation,e=this.noodel.options.branchDirection;return"ttb"===t?this.noodel.trunkEndReached:"btt"===t?this.noodel.trunkStartReached:"normal"===e?this.noodel.branchEndReached:this.noodel.branchStartReached},trunkStyle:function(){var t=this.noodel.options.orientation,e=null;return"ltr"===t?e="translateX("+(l(this.noodel)-this.noodel.trunkOffset)+"px)":"rtl"===t?e="translateX("+(-l(this.noodel)+this.noodel.trunkOffset)+"px)":"ttb"===t?e="translateY("+(a(this.noodel)-this.noodel.trunkOffset)+"px)":"btt"===t&&(e="translateY("+(-a(this.noodel)+this.noodel.trunkOffset)+"px)"),{transform:e}},trunkClass:function(){return{"nd-trunk-move":this.noodel.applyTrunkMove}},allBranchParents:function(){var t=[];return d(this.noodel.root,(function(e){e.children.length>0&&t.push(e)}),!0),t}},methods:{onTransitionEnd:function(t){if("transform"===t.propertyName&&t.target===this.$refs.trunk.$el){if(this.noodel.ignoreTransitionEnd)return;this.noodel.applyTrunkMove=!1}},onDragStart:function(t){this.noodel.isInInspectMode||t.preventDefault()}}}),Et=(n(10),st(wt,et,[],!1,null,null,null));Et.options.__file="src/view/NoodelCanvas.vue";var Tt=Et.exports,xt=function(){function t(t,e){var n=null;if(Array.isArray(t))n={children:t};else if("string"==typeof t){var i=document.querySelector(t);if(!i)throw new Error("Cannot create noodel: invalid root param");n=U(i)}else n=t instanceof Element?U(t):t&&"object"==typeof t?t:{};e||(e={}),this._v=function(t,e){var n={idCount:-1,idMap:new Map([]),throttleMap:new Map([]),debounceMap:new Map([]),eventQueue:[],root:null,focalParent:null,focalLevel:1,trunkOffset:0,applyTrunkMove:!1,branchStartReached:!1,branchEndReached:!1,trunkStartReached:!1,trunkEndReached:!1,panOriginTrunk:null,panOriginBranch:null,panAxis:null,isInInspectMode:!1,containerHeight:0,containerWidth:0,options:{visibleSubtreeDepth:1,retainDepthOnTapNavigation:!1,swipeMultiplierBranch:1,swipeMultiplierTrunk:1,snapMultiplierBranch:1,snapMultiplierTrunk:1,subtreeDebounceInterval:360,useRouting:!0,useKeyNavigation:!0,useWheelNavigation:!0,useSwipeNavigation:!0,useTapNavigation:!0,useInspectModeKey:!0,useInspectModeDoubleTap:!0,skipResizeDetection:!1,showLimitIndicators:!0,showBranchBackdrops:!1,showChildIndicators:!0,onMount:null,onEnterInspectMode:null,onExitInspectMode:null,onFocalNoodeChange:null,onFocalParentChange:null,orientation:"ltr",branchDirection:"normal"},onHashChanged:null,lastPanTimestamp:null,swipeVelocityBuffer:[]},i=Q(n,t,0,null,!0,0);if(n.root=i,n.focalParent=i,w(n,i),G(e,n),$(n,i,n.options.visibleSubtreeDepth),n.options.useRouting){var o=window.location.hash;if(o){var r=E(n,o.substr(1));r&&r.parent&&M(n,r)}}return n}(n,e),_(this._v,null,h(this._v.focalParent))}return t.prototype.mount=function(t){var e=this;if("string"==typeof t&&(t=document.querySelector(t)),!(t instanceof Element))throw new Error("Cannot mount noodel: invalid target element");v.a.config.productionTip=!1,this.vueInstance=new v.a({render:function(t){return t(Tt,{props:{noodel:e._v}})},data:this._v}).$mount(t),this.vueRoot=this.vueInstance.$el},t.prototype.unmount=function(){this.vueInstance&&this.vueInstance.$destroy(),this.vueRoot&&this.vueRoot.remove(),delete this.vueInstance,delete this.vueRoot},t.prototype.nextTick=function(t){v.a.nextTick((function(){v.a.nextTick(t)}))},t.prototype.getEl=function(){return this._v.canvasEl},t.prototype.getFocalLevel=function(){return this._v.focalLevel},t.prototype.getActiveTreeHeight=function(){for(var t=0,e=this._v.root;null!==e.activeChildIndex;)t++,e=h(e);return t},t.prototype.getNoodeCount=function(){return this._v.idMap.size-1},t.prototype.getRoot=function(){return T(this._v,this._v.root.id)},t.prototype.getFocalParent=function(){return T(this._v,this._v.focalParent.id)},t.prototype.getFocalNoode=function(){var t=h(this._v.focalParent);return t?T(this._v,t.id):null},t.prototype.findNoodeByPath=function(t){if(!Array.isArray(t))return console.warn("Cannot find noode: invalid path"),null;var e=function(t,e){for(var n=t.root,i=0;i<e.length;i++)if(!(n=n.children[e[i]]))return null;return n}(this._v,t);return e?T(this._v,e.id):null},t.prototype.findNoodeById=function(t){return"string"!=typeof t?(console.warn("Cannot find noode: invalid id"),null):T(this._v,t)},t.prototype.setOptions=function(t){G(t,this._v)},t.prototype.setFocalLevel=function(t){S(this._v,t-this._v.focalLevel)},t.prototype.moveIn=function(t){void 0===t&&(t=1),S(this._v,t)},t.prototype.moveOut=function(t){void 0===t&&(t=1),S(this._v,-t)},t.prototype.moveForward=function(t){void 0===t&&(t=1),R(this._v,t)},t.prototype.moveBack=function(t){void 0===t&&(t=1),R(this._v,-t)},t.prototype.jumpTo=function(t){t.jumpToFocus()},t.prototype.toggleInspectMode=function(t){t?C(this._v):k(this._v)},t.VueComponent=v.a.extend({props:["noodel"],render:function(t){return t(Tt,{props:{noodel:this.noodel._v}})}}),t}();e.default=xt}]).default}));