HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /var/www/devs.lapieza.net/public/assets/js/
Upload File :
Current File : /var/www/devs.lapieza.net/public/assets/js/vendors.js
function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(n,!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hexToRgb(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,n,i){return t+t+n+n+i+i});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null}function clamp(e,t,n){return Math.min(Math.max(e,t),n)}function isInArray(e,t){return t.indexOf(e)>-1}!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t,n){var i,o,r=(n=n||de).createElement("script");if(r.text=e,t)for(i in he)(o=t[i]||t.getAttribute&&t.getAttribute(i))&&r.setAttribute(i,o);n.head.appendChild(r).parentNode.removeChild(r)}function i(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ie[oe.call(e)]||"object":typeof e}function o(e){var t=!!e&&"length"in e&&e.length,n=i(e);return!ce(e)&&!ue(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function s(e,t,n){return ce(t)?fe.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?fe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?fe.grep(e,function(e){return-1<ne.call(t,e)!==n}):fe.filter(t,e,n)}function a(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function l(e){return e}function c(e){throw e}function u(e,t,n,i){var o;try{e&&ce(o=e.promise)?o.call(e).done(t).fail(n):e&&ce(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function d(){de.removeEventListener("DOMContentLoaded",d),e.removeEventListener("load",d),fe.ready()}function h(e,t){return t.toUpperCase()}function p(e){return e.replace(Pe,"ms-").replace(Ae,h)}function f(){this.expando=fe.expando+f.uid++}function g(e,t,n){var i,o;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Me,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n="true"===(o=n)||"false"!==o&&("null"===o?null:o===+o+""?+o:Oe.test(o)?JSON.parse(o):o)}catch(e){}$e.set(e,t,n)}else n=void 0;return n}function m(e,t,n,i){var o,r,s=20,a=i?function(){return i.cur()}:function(){return fe.css(e,t,"")},l=a(),c=n&&n[3]||(fe.cssNumber[t]?"":"px"),u=e.nodeType&&(fe.cssNumber[t]||"px"!==c&&+l)&&Re.exec(fe.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)fe.style(e,t,u+c),(1-r)*(1-(r=a()/l||.5))<=0&&(s=0),u/=r;u*=2,fe.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}function v(e,t){for(var n,i,o,r,s,a,l,c=[],u=0,d=e.length;u<d;u++)(i=e[u]).style&&(n=i.style.display,t?("none"===n&&(c[u]=Ie.get(i,"display")||null,c[u]||(i.style.display="")),""===i.style.display&&je(i)&&(c[u]=(l=s=r=void 0,s=(o=i).ownerDocument,a=o.nodeName,(l=ze[a])||(r=s.body.appendChild(s.createElement(a)),l=fe.css(r,"display"),r.parentNode.removeChild(r),"none"===l&&(l="block"),ze[a]=l)))):"none"!==n&&(c[u]="none",Ie.set(i,"display",n)));for(u=0;u<d;u++)null!=c[u]&&(e[u].style.display=c[u]);return e}function _(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&r(e,t)?fe.merge([e],n):n}function y(e,t){for(var n=0,i=e.length;n<i;n++)Ie.set(e[n],"globalEval",!t||Ie.get(t[n],"globalEval"))}function b(e,t,n,o,r){for(var s,a,l,c,u,d,h=t.createDocumentFragment(),p=[],f=0,g=e.length;f<g;f++)if((s=e[f])||0===s)if("object"===i(s))fe.merge(p,s.nodeType?[s]:s);else if(Xe.test(s)){for(a=a||h.appendChild(t.createElement("div")),l=(Ve.exec(s)||["",""])[1].toLowerCase(),c=Ge[l]||Ge._default,a.innerHTML=c[1]+fe.htmlPrefilter(s)+c[2],d=c[0];d--;)a=a.lastChild;fe.merge(p,a.childNodes),(a=h.firstChild).textContent=""}else p.push(t.createTextNode(s));for(h.textContent="",f=0;s=p[f++];)if(o&&-1<fe.inArray(s,o))r&&r.push(s);else if(u=Be(s),a=_(h.appendChild(s),"script"),u&&y(a),n)for(d=0;s=a[d++];)Ye.test(s.type||"")&&n.push(s);return h}function w(){return!0}function x(){return!1}function k(e,t){return e===function(){try{return de.activeElement}catch(e){}}()==("focus"===t)}function C(e,t,n,i,o,r){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)C(e,a,n,i,t[a],r);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=x;else if(!o)return e;return 1===r&&(s=o,(o=function(e){return fe().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=fe.guid++)),e.each(function(){fe.event.add(this,t,o,i,n)})}function S(e,t,n){n?(Ie.set(e,t,!1),fe.event.add(e,t,{namespace:!1,handler:function(e){var i,o,r=Ie.get(this,t);if(1&e.isTrigger&&this[t]){if(r.length)(fe.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=Z.call(arguments),Ie.set(this,t,r),i=n(this,t),this[t](),r!==(o=Ie.get(this,t))||i?Ie.set(this,t,!1):o={},r!==o)return e.stopImmediatePropagation(),e.preventDefault(),o&&o.value}else r.length&&(Ie.set(this,t,{value:fe.event.trigger(fe.extend(r[0],fe.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Ie.get(e,t)&&fe.event.add(e,t,w)}function T(e,t){return r(e,"table")&&r(11!==t.nodeType?t:t.firstChild,"tr")&&fe(e).children("tbody")[0]||e}function E(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function P(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function A(e,t){var n,i,o,r,s,a;if(1===t.nodeType){if(Ie.hasData(e)&&(a=Ie.get(e).events))for(o in Ie.remove(t,"handle events"),a)for(n=0,i=a[o].length;n<i;n++)fe.event.add(t,o,a[o][n]);$e.hasData(e)&&(r=$e.access(e),s=fe.extend({},r),$e.set(t,s))}}function D(e,t,i,o){t=ee(t);var r,s,a,l,c,u,d=0,h=e.length,p=h-1,f=t[0],g=ce(f);if(g||1<h&&"string"==typeof f&&!le.checkClone&&Je.test(f))return e.each(function(n){var r=e.eq(n);g&&(t[0]=f.call(this,n,r.html())),D(r,t,i,o)});if(h&&(s=(r=b(t,e[0].ownerDocument,!1,e,o)).firstChild,1===r.childNodes.length&&(r=s),s||o)){for(l=(a=fe.map(_(r,"script"),E)).length;d<h;d++)c=r,d!==p&&(c=fe.clone(c,!0,!0),l&&fe.merge(a,_(c,"script"))),i.call(e[d],c,d);if(l)for(u=a[a.length-1].ownerDocument,fe.map(a,P),d=0;d<l;d++)c=a[d],Ye.test(c.type||"")&&!Ie.access(c,"globalEval")&&fe.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?fe._evalUrl&&!c.noModule&&fe._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):n(c.textContent.replace(Ze,""),c,u))}return e}function I(e,t,n){for(var i,o=t?fe.filter(t,e):e,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||fe.cleanData(_(i)),i.parentNode&&(n&&Be(i)&&y(_(i,"script")),i.parentNode.removeChild(i));return e}function $(e,t,n){var i,o,r,s,a=e.style;return(n=n||tt(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||Be(e)||(s=fe.style(e,t)),!le.pixelBoxStyles()&&et.test(s)&&it.test(t)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r)),void 0!==s?s+"":s}function O(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function M(e){var t=fe.cssProps[e]||st[e];return t||(e in rt?e:st[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=ot.length;n--;)if((e=ot[n]+t)in rt)return e}(e)||e)}function F(e,t,n){var i=Re.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function R(e,t,n,i,o,r){var s="width"===t?1:0,a=0,l=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=fe.css(e,n+Le[s],!0,o)),i?("content"===n&&(l-=fe.css(e,"padding"+Le[s],!0,o)),"margin"!==n&&(l-=fe.css(e,"border"+Le[s]+"Width",!0,o))):(l+=fe.css(e,"padding"+Le[s],!0,o),"padding"!==n?l+=fe.css(e,"border"+Le[s]+"Width",!0,o):a+=fe.css(e,"border"+Le[s]+"Width",!0,o));return!i&&0<=r&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-l-a-.5))||0),l}function L(e,t,n){var i=tt(e),o=(!le.boxSizingReliable()||n)&&"border-box"===fe.css(e,"boxSizing",!1,i),s=o,a=$(e,t,i),l="offset"+t[0].toUpperCase()+t.slice(1);if(et.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&o||!le.reliableTrDimensions()&&r(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===fe.css(e,"display",!1,i))&&e.getClientRects().length&&(o="border-box"===fe.css(e,"boxSizing",!1,i),(s=l in e)&&(a=e[l])),(a=parseFloat(a)||0)+R(e,t,n||(o?"border":"content"),s,i,a)+"px"}function N(e,t,n,i,o){return new N.prototype.init(e,t,n,i,o)}function B(){ht&&(!1===de.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(B):e.setTimeout(B,fe.fx.interval),fe.fx.tick())}function U(){return e.setTimeout(function(){dt=void 0}),dt=Date.now()}function j(e,t){var n,i=0,o={height:e};for(t=t?1:0;i<4;i+=2-t)o["margin"+(n=Le[i])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function z(e,t,n){for(var i,o=(H.tweeners[t]||[]).concat(H.tweeners["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,t,e))return i}function H(e,t,n){var i,o,r=0,s=H.prefilters.length,a=fe.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=dt||U(),n=Math.max(0,c.startTime+c.duration-t),i=1-(n/c.duration||0),r=0,s=c.tweens.length;r<s;r++)c.tweens[r].run(i);return a.notifyWith(e,[c,i,n]),i<1&&s?n:(s||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:fe.extend({},t),opts:fe.extend(!0,{specialEasing:{},easing:fe.easing._default},n),originalProperties:t,originalOptions:n,startTime:dt||U(),duration:n.duration,tweens:[],createTween:function(t,n){var i=fe.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(function(e,t){var n,i,o,r,s;for(n in e)if(o=t[i=p(n)],r=e[n],Array.isArray(r)&&(o=r[1],r=e[n]=r[0]),n!==i&&(e[i]=r,delete e[n]),(s=fe.cssHooks[i])&&"expand"in s)for(n in r=s.expand(r),delete e[i],r)n in e||(e[n]=r[n],t[n]=o);else t[i]=o}(u,c.opts.specialEasing);r<s;r++)if(i=H.prefilters[r].call(c,e,u,c.opts))return ce(i.stop)&&(fe._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return fe.map(u,z,c),ce(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),fe.fx.timer(fe.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}function W(e){return(e.match(Ce)||[]).join(" ")}function q(e){return e.getAttribute&&e.getAttribute("class")||""}function V(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(Ce)||[]}function Y(e,t,n,o){var r;if(Array.isArray(t))fe.each(t,function(t,i){n||Et.test(e)?o(e,i):Y(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,o)});else if(n||"object"!==i(t))o(e,t);else for(r in t)Y(e+"["+r+"]",t[r],n,o)}function G(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,r=t.toLowerCase().match(Ce)||[];if(ce(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function X(e,t,n,i){function o(a){var l;return r[a]=!0,fe.each(e[a]||[],function(e,a){var c=a(t,n,i);return"string"!=typeof c||s||r[c]?s?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)}),l}var r={},s=e===Nt;return o(t.dataTypes[0])||!r["*"]&&o("*")}function K(e,t){var n,i,o=fe.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:i||(i={}))[n]=t[n]);return i&&fe.extend(!0,e,i),e}var Q=[],J=Object.getPrototypeOf,Z=Q.slice,ee=Q.flat?function(e){return Q.flat.call(e)}:function(e){return Q.concat.apply([],e)},te=Q.push,ne=Q.indexOf,ie={},oe=ie.toString,re=ie.hasOwnProperty,se=re.toString,ae=se.call(Object),le={},ce=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},ue=function(e){return null!=e&&e===e.window},de=e.document,he={type:!0,src:!0,nonce:!0,noModule:!0},pe="3.6.0",fe=function(e,t){return new fe.fn.init(e,t)};fe.fn=fe.prototype={jquery:pe,constructor:fe,length:0,toArray:function(){return Z.call(this)},get:function(e){return null==e?Z.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=fe.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return fe.each(this,e)},map:function(e){return this.pushStack(fe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(Z.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(fe.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(fe.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:te,sort:Q.sort,splice:Q.splice},fe.extend=fe.fn.extend=function(){var e,t,n,i,o,r,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||ce(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)i=e[t],"__proto__"!==t&&s!==i&&(c&&i&&(fe.isPlainObject(i)||(o=Array.isArray(i)))?(n=s[t],r=o&&!Array.isArray(n)?[]:o||fe.isPlainObject(n)?n:{},o=!1,s[t]=fe.extend(c,r,i)):void 0!==i&&(s[t]=i));return s},fe.extend({expando:"jQuery"+(pe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==oe.call(e)||(t=J(e))&&("function"!=typeof(n=re.call(t,"constructor")&&t.constructor)||se.call(n)!==ae))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,i){n(e,{nonce:t&&t.nonce},i)},each:function(e,t){var n,i=0;if(o(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(o(Object(e))?fe.merge(n,"string"==typeof e?[e]:e):te.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:ne.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;i<n;i++)e[o++]=t[i];return e.length=o,e},grep:function(e,t,n){for(var i=[],o=0,r=e.length,s=!n;o<r;o++)!t(e[o],o)!==s&&i.push(e[o]);return i},map:function(e,t,n){var i,r,s=0,a=[];if(o(e))for(i=e.length;s<i;s++)null!=(r=t(e[s],s,n))&&a.push(r);else for(s in e)null!=(r=t(e[s],s,n))&&a.push(r);return ee(a)},guid:1,support:le}),"function"==typeof Symbol&&(fe.fn[Symbol.iterator]=Q[Symbol.iterator]),fe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ie["[object "+t+"]"]=t.toLowerCase()});var ge=function(e){function t(e,t,n,i){var o,r,s,a,l,c,u,h=t&&t.ownerDocument,f=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==f&&9!==f&&11!==f)return n;if(!i&&(D(t),t=t||I,O)){if(11!==f&&(l=ve.exec(e)))if(o=l[1]){if(9===f){if(!(s=t.getElementById(o)))return n;if(s.id===o)return n.push(s),n}else if(h&&(s=h.getElementById(o))&&L(t,s)&&s.id===o)return n.push(s),n}else{if(l[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(o)),n}if(b.qsa&&!q[e+" "]&&(!M||!M.test(e))&&(1!==f||"object"!==t.nodeName.toLowerCase())){if(u=e,h=t,1===f&&(ce.test(e)||le.test(e))){for((h=_e.test(e)&&d(t.parentNode)||t)===t&&b.scope||((a=t.getAttribute("id"))?a=a.replace(we,xe):t.setAttribute("id",a=N)),r=(c=C(e)).length;r--;)c[r]=(a?"#"+a:":scope")+" "+p(c[r]);u=c.join(",")}try{return Q.apply(n,h.querySelectorAll(u)),n}catch(t){q(e,!0)}finally{a===N&&t.removeAttribute("id")}}}return T(e.replace(se,"$1"),t,n,i)}function n(){var e=[];return function t(n,i){return e.push(n+" ")>w.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function i(e){return e[N]=!0,e}function o(e){var t=I.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var n=e.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=t}function s(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ce(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return i(function(t){return t=+t,i(function(n,i){for(var o,r=e([],n.length,t),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))})})}function d(e){return e&&void 0!==e.getElementsByTagName&&e}function h(){}function p(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function f(e,t,n){var i=t.dir,o=t.next,r=o||i,s=n&&"parentNode"===r,a=j++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||s)return e(t,n,o);return!1}:function(t,n,l){var c,u,d,h=[U,a];if(l){for(;t=t[i];)if((1===t.nodeType||s)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||s)if(u=(d=t[N]||(t[N]={}))[t.uniqueID]||(d[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[i]||t;else{if((c=u[r])&&c[0]===U&&c[1]===a)return h[2]=c[2];if((u[r]=h)[2]=e(t,n,l))return!0}return!1}}function g(e){return 1<e.length?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function m(e,t,n,i,o){for(var r,s=[],a=0,l=e.length,c=null!=t;a<l;a++)(r=e[a])&&(n&&!n(r,i,o)||(s.push(r),c&&t.push(a)));return s}function v(e,n,o,r,s,a){return r&&!r[N]&&(r=v(r)),s&&!s[N]&&(s=v(s,a)),i(function(i,a,l,c){var u,d,h,p=[],f=[],g=a.length,v=i||function(e,n,i){for(var o=0,r=n.length;o<r;o++)t(e,n[o],i);return i}(n||"*",l.nodeType?[l]:l,[]),_=!e||!i&&n?v:m(v,p,e,l,c),y=o?s||(i?e:g||r)?[]:a:_;if(o&&o(_,y,l,c),r)for(u=m(y,f),r(u,[],l,c),d=u.length;d--;)(h=u[d])&&(y[f[d]]=!(_[f[d]]=h));if(i){if(s||e){if(s){for(u=[],d=y.length;d--;)(h=y[d])&&u.push(_[d]=h);s(null,y=[],u,c)}for(d=y.length;d--;)(h=y[d])&&-1<(u=s?Z(i,h):p[d])&&(i[u]=!(a[u]=h))}}else y=m(y===a?y.splice(g,y.length):y),s?s(null,a,y,c):Q.apply(a,y)})}function _(e){for(var t,n,i,o=e.length,r=w.relative[e[0].type],s=r||w.relative[" "],a=r?1:0,l=f(function(e){return e===t},s,!0),c=f(function(e){return-1<Z(t,e)},s,!0),u=[function(e,n,i){var o=!r&&(i||n!==E)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,o}];a<o;a++)if(n=w.relative[e[a].type])u=[f(g(u),n)];else{if((n=w.filter[e[a].type].apply(null,e[a].matches))[N]){for(i=++a;i<o&&!w.relative[e[i].type];i++);return v(1<a&&g(u),1<a&&p(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(se,"$1"),n,a<i&&_(e.slice(a,i)),i<o&&_(e=e.slice(i)),i<o&&p(e))}u.push(n)}return g(u)}var y,b,w,x,k,C,S,T,E,P,A,D,I,$,O,M,F,R,L,N="sizzle"+1*new Date,B=e.document,U=0,j=0,z=n(),H=n(),W=n(),q=n(),V=function(e,t){return e===t&&(A=!0),0},Y={}.hasOwnProperty,G=[],X=G.pop,K=G.push,Q=G.push,J=G.slice,Z=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},ee="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",te="[\\x20\\t\\r\\n\\f]",ne="(?:\\\\[\\da-fA-F]{1,6}"+te+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",ie="\\["+te+"*("+ne+")(?:"+te+"*([*^$|!~]?=)"+te+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ne+"))|)"+te+"*\\]",oe=":("+ne+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",re=new RegExp(te+"+","g"),se=new RegExp("^"+te+"+|((?:^|[^\\\\])(?:\\\\.)*)"+te+"+$","g"),ae=new RegExp("^"+te+"*,"+te+"*"),le=new RegExp("^"+te+"*([>+~]|"+te+")"+te+"*"),ce=new RegExp(te+"|>"),ue=new RegExp(oe),de=new RegExp("^"+ne+"$"),he={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+te+"*(even|odd|(([+-]|)(\\d*)n|)"+te+"*(?:([+-]|)"+te+"*(\\d+)|))"+te+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+te+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+te+"*((?:-\\d)?\\d*)"+te+"*\\)|)(?=[^-]|$)","i")},pe=/HTML$/i,fe=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_e=/[+~]/,ye=new RegExp("\\\\[\\da-fA-F]{1,6}"+te+"?|\\\\([^\\r\\n\\f])","g"),be=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,xe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ke=function(){D()},Ce=f(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{Q.apply(G=J.call(B.childNodes),B.childNodes),G[B.childNodes.length].nodeType}catch(y){Q={apply:G.length?function(e,t){K.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}for(y in b=t.support={},k=t.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!pe.test(t||n&&n.nodeName||"HTML")},D=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:B;return i!=I&&9===i.nodeType&&i.documentElement&&($=(I=i).documentElement,O=!k(I),B!=I&&(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ke,!1):n.attachEvent&&n.attachEvent("onunload",ke)),b.scope=o(function(e){return $.appendChild(e).appendChild(I.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),b.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=o(function(e){return e.appendChild(I.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=me.test(I.getElementsByClassName),b.getById=o(function(e){return $.appendChild(e).id=N,!I.getElementsByName||!I.getElementsByName(N).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(ye,be);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&O){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(ye,be);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&O){var n,i,o,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(o=t.getElementsByName(e),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&O)return t.getElementsByClassName(e)},F=[],M=[],(b.qsa=me.test(I.querySelectorAll))&&(o(function(e){var t;$.appendChild(e).innerHTML="<a id='"+N+"'></a><select id='"+N+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&M.push("[*^$]="+te+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||M.push("\\["+te+"*(?:value|"+ee+")"),e.querySelectorAll("[id~="+N+"-]").length||M.push("~="),(t=I.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||M.push("\\["+te+"*name"+te+"*="+te+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||M.push(":checked"),e.querySelectorAll("a#"+N+"+*").length||M.push(".#.+[+~]"),e.querySelectorAll("\\\f"),M.push("[\\r\\n\\f]")}),o(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=I.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&M.push("name"+te+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&M.push(":enabled",":disabled"),$.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(b.matchesSelector=me.test(R=$.matches||$.webkitMatchesSelector||$.mozMatchesSelector||$.oMatchesSelector||$.msMatchesSelector))&&o(function(e){b.disconnectedMatch=R.call(e,"*"),R.call(e,"[s!='']:x"),F.push("!=",oe)}),M=M.length&&new RegExp(M.join("|")),F=F.length&&new RegExp(F.join("|")),t=me.test($.compareDocumentPosition),L=t||me.test($.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!b.sortDetached&&t.compareDocumentPosition(e)===n?e==I||e.ownerDocument==B&&L(B,e)?-1:t==I||t.ownerDocument==B&&L(B,t)?1:P?Z(P,e)-Z(P,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,i=0,o=e.parentNode,r=t.parentNode,a=[e],l=[t];if(!o||!r)return e==I?-1:t==I?1:o?-1:r?1:P?Z(P,e)-Z(P,t):0;if(o===r)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?s(a[i],l[i]):a[i]==B?-1:l[i]==B?1:0}),I},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if(D(e),b.matchesSelector&&O&&!q[n+" "]&&(!F||!F.test(n))&&(!M||!M.test(n)))try{var i=R.call(e,n);if(i||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){q(n,!0)}return 0<t(n,I,null,[e]).length},t.contains=function(e,t){return(e.ownerDocument||e)!=I&&D(e),L(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!=I&&D(e);var n=w.attrHandle[t.toLowerCase()],i=n&&Y.call(w.attrHandle,t.toLowerCase())?n(e,t,!O):void 0;return void 0!==i?i:b.attributes||!O?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(we,xe)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,o=0;if(A=!b.detectDuplicates,P=!b.sortStable&&e.slice(0),e.sort(V),A){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return P=null,e},x=t.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=x(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=x(t);return n},(w=t.selectors={cacheLength:50,createPseudo:i,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,be),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+te+")"+e+"("+te+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(o){var r=t.attr(o,e);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&-1<r.indexOf(i):"$="===n?i&&r.slice(-i.length)===i:"~="===n?-1<(" "+r.replace(re," ")+" ").indexOf(i):"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,p,f,g=r!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),_=!l&&!a,y=!1;if(m){if(r){for(;g;){for(h=t;h=h[g];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&_){for(y=(p=(c=(u=(d=(h=m)[N]||(h[N]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===U&&c[1])&&c[2],h=p&&m.childNodes[p];h=++p&&h&&h[g]||(y=p=0)||f.pop();)if(1===h.nodeType&&++y&&h===t){u[e]=[U,p,y];break}}else if(_&&(y=p=(c=(u=(d=(h=t)[N]||(h[N]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===U&&c[1]),!1===y)for(;(h=++p&&h&&h[g]||(y=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++y||(_&&((u=(d=h[N]||(h[N]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[U,y]),h!==t)););return(y-=o)===i||y%i==0&&0<=y/i}}},PSEUDO:function(e,n){var o,r=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[N]?r(n):1<r.length?(o=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,o=r(e,n),s=o.length;s--;)e[i=Z(e,o[s])]=!(t[i]=o[s])}):function(e){return r(e,0,o)}):r}},pseudos:{not:i(function(e){var t=[],n=[],o=S(e.replace(se,"$1"));return o[N]?i(function(e,t,n,i){for(var r,s=o(e,null,i,[]),a=e.length;a--;)(r=s[a])&&(e[a]=!(t[a]=r))}):function(e,i,r){return t[0]=e,o(t,null,r,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return 0<t(e,n).length}}),contains:i(function(e){return e=e.replace(ye,be),function(t){return-1<(t.textContent||x(t)).indexOf(e)}}),lang:i(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,be).toLowerCase(),function(t){var n;do{if(n=O?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===$},focus:function(e){return e===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},
parent:function(e){return!w.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return fe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=n<0?n+t:t<n?t:n;0<=--i;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}}).pseudos.nth=w.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[y]=a(y);for(y in{submit:!0,reset:!0})w.pseudos[y]=l(y);return h.prototype=w.filters=w.pseudos,w.setFilters=new h,C=t.tokenize=function(e,n){var i,o,r,s,a,l,c,u=H[e+" "];if(u)return n?0:u.slice(0);for(a=e,l=[],c=w.preFilter;a;){for(s in i&&!(o=ae.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),i=!1,(o=le.exec(a))&&(i=o.shift(),r.push({value:i,type:o[0].replace(se," ")}),a=a.slice(i.length)),w.filter)!(o=he[s].exec(a))||c[s]&&!(o=c[s](o))||(i=o.shift(),r.push({value:i,type:s,matches:o}),a=a.slice(i.length));if(!i)break}return n?a.length:a?t.error(e):H(e,l).slice(0)},S=t.compile=function(e,n){var o,r,s,a,l,c,u=[],d=[],h=W[e+" "];if(!h){for(n||(n=C(e)),o=n.length;o--;)(h=_(n[o]))[N]?u.push(h):d.push(h);(h=W(e,(r=d,a=0<(s=u).length,l=0<r.length,c=function(e,n,i,o,c){var u,d,h,p=0,f="0",g=e&&[],v=[],_=E,y=e||l&&w.find.TAG("*",c),b=U+=null==_?1:Math.random()||.1,x=y.length;for(c&&(E=n==I||n||c);f!==x&&null!=(u=y[f]);f++){if(l&&u){for(d=0,n||u.ownerDocument==I||(D(u),i=!O);h=r[d++];)if(h(u,n||I,i)){o.push(u);break}c&&(U=b)}a&&((u=!h&&u)&&p--,e&&g.push(u))}if(p+=f,a&&f!==p){for(d=0;h=s[d++];)h(g,v,n,i);if(e){if(0<p)for(;f--;)g[f]||v[f]||(v[f]=X.call(o));v=m(v)}Q.apply(o,v),c&&!e&&0<v.length&&1<p+s.length&&t.uniqueSort(o)}return c&&(U=b,E=_),g},a?i(c):c))).selector=e}return h},T=t.select=function(e,t,n,i){var o,r,s,a,l,c="function"==typeof e&&e,u=!i&&C(e=c.selector||e);if(n=n||[],1===u.length){if(2<(r=u[0]=u[0].slice(0)).length&&"ID"===(s=r[0]).type&&9===t.nodeType&&O&&w.relative[r[1].type]){if(!(t=(w.find.ID(s.matches[0].replace(ye,be),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=he.needsContext.test(e)?0:r.length;o--&&(s=r[o],!w.relative[a=s.type]);)if((l=w.find[a])&&(i=l(s.matches[0].replace(ye,be),_e.test(r[0].type)&&d(t.parentNode)||t))){if(r.splice(o,1),!(e=i.length&&p(r)))return Q.apply(n,i),n;break}}return(c||S(e,u))(i,t,!O,n,!t||_e.test(e)&&d(t.parentNode)||t),n},b.sortStable=N.split("").sort(V).join("")===N,b.detectDuplicates=!!A,D(),b.sortDetached=o(function(e){return 1&e.compareDocumentPosition(I.createElement("fieldset"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||r(ee,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);fe.find=ge,fe.expr=ge.selectors,fe.expr[":"]=fe.expr.pseudos,fe.uniqueSort=fe.unique=ge.uniqueSort,fe.text=ge.getText,fe.isXMLDoc=ge.isXML,fe.contains=ge.contains,fe.escapeSelector=ge.escape;var me=function(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&fe(e).is(n))break;i.push(e)}return i},ve=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},_e=fe.expr.match.needsContext,ye=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;fe.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?fe.find.matchesSelector(i,e)?[i]:[]:fe.find.matches(e,fe.grep(t,function(e){return 1===e.nodeType}))},fe.fn.extend({find:function(e){var t,n,i=this.length,o=this;if("string"!=typeof e)return this.pushStack(fe(e).filter(function(){for(t=0;t<i;t++)if(fe.contains(o[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)fe.find(e,o[t],n);return 1<i?fe.uniqueSort(n):n},filter:function(e){return this.pushStack(s(this,e||[],!1))},not:function(e){return this.pushStack(s(this,e||[],!0))},is:function(e){return!!s(this,"string"==typeof e&&_e.test(e)?fe(e):e||[],!1).length}});var be,we=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(fe.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||be,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:we.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof fe?t[0]:t,fe.merge(this,fe.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:de,!0)),ye.test(i[1])&&fe.isPlainObject(t))for(i in t)ce(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=de.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ce(e)?void 0!==n.ready?n.ready(e):e(fe):fe.makeArray(e,this)}).prototype=fe.fn,be=fe(de);var xe=/^(?:parents|prev(?:Until|All))/,ke={children:!0,contents:!0,next:!0,prev:!0};fe.fn.extend({has:function(e){var t=fe(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(fe.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,o=this.length,r=[],s="string"!=typeof e&&fe(e);if(!_e.test(e))for(;i<o;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?-1<s.index(n):1===n.nodeType&&fe.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(1<r.length?fe.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?ne.call(fe(e),this[0]):ne.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(fe.uniqueSort(fe.merge(this.get(),fe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),fe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return me(e,"parentNode")},parentsUntil:function(e,t,n){return me(e,"parentNode",n)},next:function(e){return a(e,"nextSibling")},prev:function(e){return a(e,"previousSibling")},nextAll:function(e){return me(e,"nextSibling")},prevAll:function(e){return me(e,"previousSibling")},nextUntil:function(e,t,n){return me(e,"nextSibling",n)},prevUntil:function(e,t,n){return me(e,"previousSibling",n)},siblings:function(e){return ve((e.parentNode||{}).firstChild,e)},children:function(e){return ve(e.firstChild)},contents:function(e){return null!=e.contentDocument&&J(e.contentDocument)?e.contentDocument:(r(e,"template")&&(e=e.content||e),fe.merge([],e.childNodes))}},function(e,t){fe.fn[e]=function(n,i){var o=fe.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=fe.filter(i,o)),1<this.length&&(ke[e]||fe.uniqueSort(o),xe.test(e)&&o.reverse()),this.pushStack(o)}});var Ce=/[^\x20\t\r\n\f]+/g;fe.Callbacks=function(e){var t,n;e="string"==typeof e?(t=e,n={},fe.each(t.match(Ce)||[],function(e,t){n[t]=!0}),n):fe.extend({},e);var o,r,s,a,l=[],c=[],u=-1,d=function(){for(a=a||e.once,s=o=!0;c.length;u=-1)for(r=c.shift();++u<l.length;)!1===l[u].apply(r[0],r[1])&&e.stopOnFalse&&(u=l.length,r=!1);e.memory||(r=!1),o=!1,a&&(l=r?[]:"")},h={add:function(){return l&&(r&&!o&&(u=l.length-1,c.push(r)),function t(n){fe.each(n,function(n,o){ce(o)?e.unique&&h.has(o)||l.push(o):o&&o.length&&"string"!==i(o)&&t(o)})}(arguments),r&&!o&&d()),this},remove:function(){return fe.each(arguments,function(e,t){for(var n;-1<(n=fe.inArray(t,l,n));)l.splice(n,1),n<=u&&u--}),this},has:function(e){return e?-1<fe.inArray(e,l):0<l.length},empty:function(){return l&&(l=[]),this},disable:function(){return a=c=[],l=r="",this},disabled:function(){return!l},lock:function(){return a=c=[],r||o||(l=r=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],c.push(t),o||d()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!s}};return h},fe.extend({Deferred:function(t){var n=[["notify","progress",fe.Callbacks("memory"),fe.Callbacks("memory"),2],["resolve","done",fe.Callbacks("once memory"),fe.Callbacks("once memory"),0,"resolved"],["reject","fail",fe.Callbacks("once memory"),fe.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return fe.Deferred(function(t){fe.each(n,function(n,i){var o=ce(e[i[4]])&&e[i[4]];r[i[1]](function(){var e=o&&o.apply(this,arguments);e&&ce(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(t,i,o){function r(t,n,i,o){return function(){var a=this,u=arguments,d=function(){var e,d;if(!(t<s)){if((e=i.apply(a,u))===n.promise())throw new TypeError("Thenable self-resolution");d=e&&("object"==typeof e||"function"==typeof e)&&e.then,ce(d)?o?d.call(e,r(s,n,l,o),r(s,n,c,o)):(s++,d.call(e,r(s,n,l,o),r(s,n,c,o),r(s,n,l,n.notifyWith))):(i!==l&&(a=void 0,u=[e]),(o||n.resolveWith)(a,u))}},h=o?d:function(){try{d()}catch(e){fe.Deferred.exceptionHook&&fe.Deferred.exceptionHook(e,h.stackTrace),s<=t+1&&(i!==c&&(a=void 0,u=[e]),n.rejectWith(a,u))}};t?h():(fe.Deferred.getStackHook&&(h.stackTrace=fe.Deferred.getStackHook()),e.setTimeout(h))}}var s=0;return fe.Deferred(function(e){n[0][3].add(r(0,e,ce(o)?o:l,e.notifyWith)),n[1][3].add(r(0,e,ce(t)?t:l)),n[2][3].add(r(0,e,ce(i)?i:c))}).promise()},promise:function(e){return null!=e?fe.extend(e,o):o}},r={};return fe.each(n,function(e,t){var s=t[2],a=t[5];o[t[1]]=s.add,a&&s.add(function(){i=a},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),s.add(t[3].fire),r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this},r[t[0]+"With"]=s.fireWith}),o.promise(r),t&&t.call(r,r),r},when:function(e){var t=arguments.length,n=t,i=Array(n),o=Z.call(arguments),r=fe.Deferred(),s=function(e){return function(n){i[e]=this,o[e]=1<arguments.length?Z.call(arguments):n,--t||r.resolveWith(i,o)}};if(t<=1&&(u(e,r.done(s(n)).resolve,r.reject,!t),"pending"===r.state()||ce(o[n]&&o[n].then)))return r.then();for(;n--;)u(o[n],s(n),r.reject);return r.promise()}});var Se=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;fe.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Se.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},fe.readyException=function(t){e.setTimeout(function(){throw t})};var Te=fe.Deferred();fe.fn.ready=function(e){return Te.then(e).catch(function(e){fe.readyException(e)}),this},fe.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--fe.readyWait:fe.isReady)||(fe.isReady=!0)!==e&&0<--fe.readyWait||Te.resolveWith(de,[fe])}}),fe.ready.then=Te.then,"complete"===de.readyState||"loading"!==de.readyState&&!de.documentElement.doScroll?e.setTimeout(fe.ready):(de.addEventListener("DOMContentLoaded",d),e.addEventListener("load",d));var Ee=function(e,t,n,o,r,s,a){var l=0,c=e.length,u=null==n;if("object"===i(n))for(l in r=!0,n)Ee(e,t,l,n[l],!0,s,a);else if(void 0!==o&&(r=!0,ce(o)||(a=!0),u&&(a?(t.call(e,o),t=null):(u=t,t=function(e,t,n){return u.call(fe(e),n)})),t))for(;l<c;l++)t(e[l],n,a?o:o.call(e[l],l,t(e[l],n)));return r?e:u?t.call(e):c?t(e[0],n):s},Pe=/^-ms-/,Ae=/-([a-z])/g,De=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};f.uid=1,f.prototype={cache:function(e){var t=e[this.expando];return t||(t={},De(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,o=this.cache(e);if("string"==typeof t)o[p(t)]=n;else for(i in t)o[p(i)]=t[i];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][p(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(p):(t=p(t))in i?[t]:t.match(Ce)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||fe.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!fe.isEmptyObject(t)}};var Ie=new f,$e=new f,Oe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Me=/[A-Z]/g;fe.extend({hasData:function(e){return $e.hasData(e)||Ie.hasData(e)},data:function(e,t,n){return $e.access(e,t,n)},removeData:function(e,t){$e.remove(e,t)},_data:function(e,t,n){return Ie.access(e,t,n)},_removeData:function(e,t){Ie.remove(e,t)}}),fe.fn.extend({data:function(e,t){var n,i,o,r=this[0],s=r&&r.attributes;if(void 0===e){if(this.length&&(o=$e.get(r),1===r.nodeType&&!Ie.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=p(i.slice(5)),g(r,i,o[i]));Ie.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){$e.set(this,e)}):Ee(this,function(t){var n;if(r&&void 0===t)return void 0!==(n=$e.get(r,e))?n:void 0!==(n=g(r,e))?n:void 0;this.each(function(){$e.set(this,e,t)})},null,t,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){$e.remove(this,e)})}}),fe.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=Ie.get(e,t),n&&(!i||Array.isArray(n)?i=Ie.access(e,t,fe.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=fe.queue(e,t),i=n.length,o=n.shift(),r=fe._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete r.stop,o.call(e,function(){fe.dequeue(e,t)},r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ie.get(e,n)||Ie.access(e,n,{empty:fe.Callbacks("once memory").add(function(){Ie.remove(e,[t+"queue",n])})})}}),fe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?fe.queue(this[0],e):void 0===t?this:this.each(function(){var n=fe.queue(this,e,t);fe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&fe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){fe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,o=fe.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=Ie.get(r[s],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(t)}});var Fe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Re=new RegExp("^(?:([+-])=|)("+Fe+")([a-z%]*)$","i"),Le=["Top","Right","Bottom","Left"],Ne=de.documentElement,Be=function(e){return fe.contains(e.ownerDocument,e)},Ue={composed:!0};Ne.getRootNode&&(Be=function(e){return fe.contains(e.ownerDocument,e)||e.getRootNode(Ue)===e.ownerDocument});var je=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&Be(e)&&"none"===fe.css(e,"display")},ze={};fe.fn.extend({show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){je(this)?fe(this).show():fe(this).hide()})}});var He,We,qe=/^(?:checkbox|radio)$/i,Ve=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ye=/^$|^module$|\/(?:java|ecma)script/i;He=de.createDocumentFragment().appendChild(de.createElement("div")),(We=de.createElement("input")).setAttribute("type","radio"),We.setAttribute("checked","checked"),We.setAttribute("name","t"),He.appendChild(We),le.checkClone=He.cloneNode(!0).cloneNode(!0).lastChild.checked,He.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!He.cloneNode(!0).lastChild.defaultValue,He.innerHTML="<option></option>",le.option=!!He.lastChild;var Ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,Ge.th=Ge.td,le.option||(Ge.optgroup=Ge.option=[1,"<select multiple='multiple'>","</select>"]);var Xe=/<|&#?\w+;/,Ke=/^([^.]*)(?:\.(.+)|)/;fe.event={global:{},add:function(e,t,n,i,o){var r,s,a,l,c,u,d,h,p,f,g,m=Ie.get(e);if(De(e))for(n.handler&&(n=(r=n).handler,o=r.selector),o&&fe.find.matchesSelector(Ne,o),n.guid||(n.guid=fe.guid++),(l=m.events)||(l=m.events=Object.create(null)),(s=m.handle)||(s=m.handle=function(t){return void 0!==fe&&fe.event.triggered!==t.type?fe.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(Ce)||[""]).length;c--;)p=g=(a=Ke.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=fe.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=fe.event.special[p]||{},u=fe.extend({type:p,origType:g,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&fe.expr.match.needsContext.test(o),namespace:f.join(".")},r),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,i,f,s)||e.addEventListener&&e.addEventListener(p,s)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,u):h.push(u),fe.event.global[p]=!0)},remove:function(e,t,n,i,o){var r,s,a,l,c,u,d,h,p,f,g,m=Ie.hasData(e)&&Ie.get(e);if(m&&(l=m.events)){for(c=(t=(t||"").match(Ce)||[""]).length;c--;)if(p=g=(a=Ke.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(d=fe.event.special[p]||{},h=l[p=(i?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=h.length;r--;)u=h[r],!o&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(r,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,m.handle)||fe.removeEvent(e,p,m.handle),delete l[p])}else for(p in l)fe.event.remove(e,p+t[c],n,i,!0);fe.isEmptyObject(l)&&Ie.remove(e,"handle events")}},dispatch:function(e){var t,n,i,o,r,s,a=new Array(arguments.length),l=fe.event.fix(e),c=(Ie.get(this,"events")||Object.create(null))[l.type]||[],u=fe.event.special[l.type]||{};for(a[0]=l,t=1;t<arguments.length;t++)a[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(s=fe.event.handlers.call(this,l,c),t=0;(o=s[t++])&&!l.isPropagationStopped();)for(l.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==r.namespace&&!l.rnamespace.test(r.namespace)||(l.handleObj=r,l.data=r.data,void 0!==(i=((fe.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,i,o,r,s,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&1<=e.button))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(r=[],s={},n=0;n<l;n++)void 0===s[o=(i=t[n]).selector+" "]&&(s[o]=i.needsContext?-1<fe(o,this).index(c):fe.find(o,this,null,[c]).length),s[o]&&r.push(i);r.length&&a.push({elem:c,handlers:r})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(fe.Event.prototype,e,{enumerable:!0,configurable:!0,get:ce(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[fe.expando]?e:new fe.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return qe.test(t.type)&&t.click&&r(t,"input")&&S(t,"click",w),!1},trigger:function(e){var t=this||e;return qe.test(t.type)&&t.click&&r(t,"input")&&S(t,"click"),!0},_default:function(e){var t=e.target;return qe.test(t.type)&&t.click&&r(t,"input")&&Ie.get(t,"click")||r(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},fe.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},fe.Event=function(e,t){if(!(this instanceof fe.Event))return new fe.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?w:x,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&fe.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[fe.expando]=!0},fe.Event.prototype={constructor:fe.Event,isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=w,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=w,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=w,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},fe.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},fe.event.addProp),fe.each({focus:"focusin",blur:"focusout"},function(e,t){fe.event.special[e]={setup:function(){return S(this,e,k),!1},trigger:function(){return S(this,e),!0},_default:function(){return!0},delegateType:t}}),fe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){fe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=e.relatedTarget,o=e.handleObj;return i&&(i===this||fe.contains(this,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),fe.fn.extend({on:function(e,t,n,i){return C(this,e,t,n,i)},one:function(e,t,n,i){return C(this,e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,fe(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=x),this.each(function(){fe.event.remove(this,e,n,t)})}});var Qe=/<script|<style|<link/i,Je=/checked\s*(?:[^=]|=\s*.checked.)/i,Ze=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;fe.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var i,o,r,s,a,l,c,u=e.cloneNode(!0),d=Be(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||fe.isXMLDoc(e)))for(s=_(u),i=0,o=(r=_(e)).length;i<o;i++)a=r[i],l=s[i],"input"===(c=l.nodeName.toLowerCase())&&qe.test(a.type)?l.checked=a.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=a.defaultValue);if(t)if(n)for(r=r||_(e),s=s||_(u),i=0,o=r.length;i<o;i++)A(r[i],s[i]);else A(e,u);return 0<(s=_(u,"script")).length&&y(s,!d&&_(e,"script")),u},cleanData:function(e){for(var t,n,i,o=fe.event.special,r=0;void 0!==(n=e[r]);r++)if(De(n)){if(t=n[Ie.expando]){if(t.events)for(i in t.events)o[i]?fe.event.remove(n,i):fe.removeEvent(n,i,t.handle);n[Ie.expando]=void 0}n[$e.expando]&&(n[$e.expando]=void 0)}}}),fe.fn.extend({detach:function(e){return I(this,e,!0)},remove:function(e){return I(this,e)},text:function(e){return Ee(this,function(e){return void 0===e?fe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return D(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||T(this,e).appendChild(e)})},prepend:function(){return D(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(fe.cleanData(_(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return fe.clone(this,e,t)})},html:function(e){return Ee(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Qe.test(e)&&!Ge[(Ve.exec(e)||["",""])[1].toLowerCase()]){e=fe.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(fe.cleanData(_(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return D(this,arguments,function(t){var n=this.parentNode;fe.inArray(this,e)<0&&(fe.cleanData(_(this)),n&&n.replaceChild(t,this))},e)}}),fe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){fe.fn[e]=function(e){for(var n,i=[],o=fe(e),r=o.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),fe(o[s])[t](n),te.apply(i,n.get());return this.pushStack(i)}});var et=new RegExp("^("+Fe+")(?!px)[a-z%]+$","i"),tt=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},nt=function(e,t,n){var i,o,r={};for(o in t)r[o]=e.style[o],e.style[o]=t[o];for(o in i=n.call(e),t)e.style[o]=r[o];return i},it=new RegExp(Le.join("|"),"i");!function(){function t(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Ne.appendChild(c).appendChild(u);var t=e.getComputedStyle(u);i="1%"!==t.top,l=12===n(t.marginLeft),u.style.right="60%",s=36===n(t.right),o=36===n(t.width),u.style.position="absolute",r=12===n(u.offsetWidth/3),Ne.removeChild(c),u=null}}function n(e){return Math.round(parseFloat(e))}var i,o,r,s,a,l,c=de.createElement("div"),u=de.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===u.style.backgroundClip,fe.extend(le,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),r},reliableTrDimensions:function(){var t,n,i,o;return null==a&&(t=de.createElement("table"),n=de.createElement("tr"),i=de.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="border:1px solid",n.style.height="1px",i.style.height="9px",i.style.display="block",Ne.appendChild(t).appendChild(n).appendChild(i),o=e.getComputedStyle(n),a=parseInt(o.height,10)+parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)===n.offsetHeight,Ne.removeChild(t)),a}}))}();var ot=["Webkit","Moz","ms"],rt=de.createElement("div").style,st={},at=/^(none|table(?!-c[ea]).+)/,lt=/^--/,ct={position:"absolute",visibility:"hidden",display:"block"},ut={letterSpacing:"0",fontWeight:"400"};fe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=$(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,s,a=p(t),l=lt.test(t),c=e.style;if(l||(t=M(a)),s=fe.cssHooks[t]||fe.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,i))?o:c[t];"string"==(r=typeof n)&&(o=Re.exec(n))&&o[1]&&(n=m(e,t,o),r="number"),null!=n&&n==n&&("number"!==r||l||(n+=o&&o[3]||(fe.cssNumber[a]?"":"px")),le.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var o,r,s,a=p(t);return lt.test(t)||(t=M(a)),(s=fe.cssHooks[t]||fe.cssHooks[a])&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=$(e,t,i)),"normal"===o&&t in ut&&(o=ut[t]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),fe.each(["height","width"],function(e,t){fe.cssHooks[t]={get:function(e,n,i){if(n)return!at.test(fe.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?L(e,t,i):nt(e,ct,function(){return L(e,t,i)})},set:function(e,n,i){var o,r=tt(e),s=!le.scrollboxSize()&&"absolute"===r.position,a=(s||i)&&"border-box"===fe.css(e,"boxSizing",!1,r),l=i?R(e,t,i,a,r):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-R(e,t,"border",!1,r)-.5)),l&&(o=Re.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=fe.css(e,t)),F(0,n,l)}}}),fe.cssHooks.marginLeft=O(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat($(e,"marginLeft"))||e.getBoundingClientRect().left-nt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),fe.each({margin:"",padding:"",border:"Width"},function(e,t){fe.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+Le[i]+t]=r[i]||r[i-2]||r[0];return o}},"margin"!==e&&(fe.cssHooks[e+t].set=F)}),fe.fn.extend({css:function(e,t){return Ee(this,function(e,t,n){var i,o,r={},s=0;if(Array.isArray(t)){for(i=tt(e),o=t.length;s<o;s++)r[t[s]]=fe.css(e,t[s],!1,i);return r}return void 0!==n?fe.style(e,t,n):fe.css(e,t)},e,t,1<arguments.length)}}),((fe.Tween=N).prototype={constructor:N,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||fe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(fe.cssNumber[n]?"":"px")},cur:function(){var e=N.propHooks[this.prop];return e&&e.get?e.get(this):N.propHooks._default.get(this)},run:function(e){var t,n=N.propHooks[this.prop];return this.options.duration?this.pos=t=fe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):N.propHooks._default.set(this),this}}).init.prototype=N.prototype,(N.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=fe.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){fe.fx.step[e.prop]?fe.fx.step[e.prop](e):1!==e.elem.nodeType||!fe.cssHooks[e.prop]&&null==e.elem.style[M(e.prop)]?e.elem[e.prop]=e.now:fe.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=N.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},fe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},fe.fx=N.prototype.init,fe.fx.step={};var dt,ht,pt,ft,gt=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;fe.Animation=fe.extend(H,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return m(n.elem,e,Re.exec(t),n),n}]},tweener:function(e,t){ce(e)?(t=e,e=["*"]):e=e.match(Ce);for(var n,i=0,o=e.length;i<o;i++)n=e[i],H.tweeners[n]=H.tweeners[n]||[],H.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,o,r,s,a,l,c,u,d="width"in t||"height"in t,h=this,p={},f=e.style,g=e.nodeType&&je(e),m=Ie.get(e,"fxshow");for(i in n.queue||(null==(s=fe._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,
s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,h.always(function(){h.always(function(){s.unqueued--,fe.queue(e,"fx").length||s.empty.fire()})})),t)if(o=t[i],gt.test(o)){if(delete t[i],r=r||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!m||void 0===m[i])continue;g=!0}p[i]=m&&m[i]||fe.style(e,i)}if((l=!fe.isEmptyObject(t))||!fe.isEmptyObject(p))for(i in d&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=m&&m.display)&&(c=Ie.get(e,"display")),"none"===(u=fe.css(e,"display"))&&(c?u=c:(v([e],!0),c=e.style.display||c,u=fe.css(e,"display"),v([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===fe.css(e,"float")&&(l||(h.done(function(){f.display=c}),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",h.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),l=!1,p)l||(m?"hidden"in m&&(g=m.hidden):m=Ie.access(e,"fxshow",{display:c}),r&&(m.hidden=!g),g&&v([e],!0),h.done(function(){for(i in g||v([e]),Ie.remove(e,"fxshow"),p)fe.style(e,i,p[i])})),l=z(g?m[i]:0,i,h),i in m||(m[i]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?H.prefilters.unshift(e):H.prefilters.push(e)}}),fe.speed=function(e,t,n){var i=e&&"object"==typeof e?fe.extend({},e):{complete:n||!n&&t||ce(e)&&e,duration:e,easing:n&&t||t&&!ce(t)&&t};return fe.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in fe.fx.speeds?i.duration=fe.fx.speeds[i.duration]:i.duration=fe.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){ce(i.old)&&i.old.call(this),i.queue&&fe.dequeue(this,i.queue)},i},fe.fn.extend({fadeTo:function(e,t,n,i){return this.filter(je).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=fe.isEmptyObject(e),r=fe.speed(t,n,i),s=function(){var t=H(this,fe.extend({},e),r);(o||Ie.get(this,"finish"))&&t.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",r=fe.timers,s=Ie.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&mt.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=e&&r[o].queue!==e||(r[o].anim.stop(n),t=!1,r.splice(o,1));!t&&n||fe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Ie.get(this),i=n[e+"queue"],o=n[e+"queueHooks"],r=fe.timers,s=i?i.length:0;for(n.finish=!0,fe.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<s;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),fe.each(["toggle","show","hide"],function(e,t){var n=fe.fn[t];fe.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(j(t,!0),e,i,o)}}),fe.each({slideDown:j("show"),slideUp:j("hide"),slideToggle:j("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){fe.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),fe.timers=[],fe.fx.tick=function(){var e,t=0,n=fe.timers;for(dt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||fe.fx.stop(),dt=void 0},fe.fx.timer=function(e){fe.timers.push(e),fe.fx.start()},fe.fx.interval=13,fe.fx.start=function(){ht||(ht=!0,B())},fe.fx.stop=function(){ht=null},fe.fx.speeds={slow:600,fast:200,_default:400},fe.fn.delay=function(t,n){return t=fe.fx&&fe.fx.speeds[t]||t,n=n||"fx",this.queue(n,function(n,i){var o=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(o)}})},pt=de.createElement("input"),ft=de.createElement("select").appendChild(de.createElement("option")),pt.type="checkbox",le.checkOn=""!==pt.value,le.optSelected=ft.selected,(pt=de.createElement("input")).value="t",pt.type="radio",le.radioValue="t"===pt.value;var vt,_t=fe.expr.attrHandle;fe.fn.extend({attr:function(e,t){return Ee(this,fe.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){fe.removeAttr(this,e)})}}),fe.extend({attr:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?fe.prop(e,t,n):(1===r&&fe.isXMLDoc(e)||(o=fe.attrHooks[t.toLowerCase()]||(fe.expr.match.bool.test(t)?vt:void 0)),void 0!==n?null===n?void fe.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:null==(i=fe.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&r(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,o=t&&t.match(Ce);if(o&&1===e.nodeType)for(;n=o[i++];)e.removeAttribute(n)}}),vt={set:function(e,t,n){return!1===t?fe.removeAttr(e,n):e.setAttribute(n,n),n}},fe.each(fe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=_t[t]||fe.find.attr;_t[t]=function(e,t,i){var o,r,s=t.toLowerCase();return i||(r=_t[s],_t[s]=o,o=null!=n(e,t,i)?s:null,_t[s]=r),o}});var yt=/^(?:input|select|textarea|button)$/i,bt=/^(?:a|area)$/i;fe.fn.extend({prop:function(e,t){return Ee(this,fe.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[fe.propFix[e]||e]})}}),fe.extend({prop:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&fe.isXMLDoc(e)||(t=fe.propFix[t]||t,o=fe.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=fe.find.attr(e,"tabindex");return t?parseInt(t,10):yt.test(e.nodeName)||bt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),le.optSelected||(fe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),fe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){fe.propFix[this.toLowerCase()]=this}),fe.fn.extend({addClass:function(e){var t,n,i,o,r,s,a,l=0;if(ce(e))return this.each(function(t){fe(this).addClass(e.call(this,t,q(this)))});if((t=V(e)).length)for(;n=this[l++];)if(o=q(n),i=1===n.nodeType&&" "+W(o)+" "){for(s=0;r=t[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(a=W(i))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,o,r,s,a,l=0;if(ce(e))return this.each(function(t){fe(this).removeClass(e.call(this,t,q(this)))});if(!arguments.length)return this.attr("class","");if((t=V(e)).length)for(;n=this[l++];)if(o=q(n),i=1===n.nodeType&&" "+W(o)+" "){for(s=0;r=t[s++];)for(;-1<i.indexOf(" "+r+" ");)i=i.replace(" "+r+" "," ");o!==(a=W(i))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,i="string"===n||Array.isArray(e);return"boolean"==typeof t&&i?t?this.addClass(e):this.removeClass(e):ce(e)?this.each(function(n){fe(this).toggleClass(e.call(this,n,q(this),t),t)}):this.each(function(){var t,o,r,s;if(i)for(o=0,r=fe(this),s=V(e);t=s[o++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||((t=q(this))&&Ie.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Ie.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&-1<(" "+W(q(n))+" ").indexOf(t))return!0;return!1}});var wt=/\r/g;fe.fn.extend({val:function(e){var t,n,i,o=this[0];return arguments.length?(i=ce(e),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?e.call(this,n,fe(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=fe.map(o,function(e){return null==e?"":e+""})),(t=fe.valHooks[this.type]||fe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))})):o?(t=fe.valHooks[o.type]||fe.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(wt,""):null==n?"":n:void 0}}),fe.extend({valHooks:{option:{get:function(e){var t=fe.find.attr(e,"value");return null!=t?t:W(fe.text(e))}},select:{get:function(e){var t,n,i,o=e.options,s=e.selectedIndex,a="select-one"===e.type,l=a?null:[],c=a?s+1:o.length;for(i=s<0?c:a?s:0;i<c;i++)if(((n=o[i]).selected||i===s)&&!n.disabled&&(!n.parentNode.disabled||!r(n.parentNode,"optgroup"))){if(t=fe(n).val(),a)return t;l.push(t)}return l},set:function(e,t){for(var n,i,o=e.options,r=fe.makeArray(t),s=o.length;s--;)((i=o[s]).selected=-1<fe.inArray(fe.valHooks.option.get(i),r))&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),fe.each(["radio","checkbox"],function(){fe.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<fe.inArray(fe(e).val(),t)}},le.checkOn||(fe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),le.focusin="onfocusin"in e;var xt=/^(?:focusinfocus|focusoutblur)$/,kt=function(e){e.stopPropagation()};fe.extend(fe.event,{trigger:function(t,n,i,o){var r,s,a,l,c,u,d,h,p=[i||de],f=re.call(t,"type")?t.type:t,g=re.call(t,"namespace")?t.namespace.split("."):[];if(s=h=a=i=i||de,3!==i.nodeType&&8!==i.nodeType&&!xt.test(f+fe.event.triggered)&&(-1<f.indexOf(".")&&(f=(g=f.split(".")).shift(),g.sort()),c=f.indexOf(":")<0&&"on"+f,(t=t[fe.expando]?t:new fe.Event(f,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:fe.makeArray(n,[t]),d=fe.event.special[f]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!ue(i)){for(l=d.delegateType||f,xt.test(l+f)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(i.ownerDocument||de)&&p.push(a.defaultView||a.parentWindow||e)}for(r=0;(s=p[r++])&&!t.isPropagationStopped();)h=s,t.type=1<r?l:d.bindType||f,(u=(Ie.get(s,"events")||Object.create(null))[t.type]&&Ie.get(s,"handle"))&&u.apply(s,n),(u=c&&s[c])&&u.apply&&De(s)&&(t.result=u.apply(s,n),!1===t.result&&t.preventDefault());return t.type=f,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),n)||!De(i)||c&&ce(i[f])&&!ue(i)&&((a=i[c])&&(i[c]=null),fe.event.triggered=f,t.isPropagationStopped()&&h.addEventListener(f,kt),i[f](),t.isPropagationStopped()&&h.removeEventListener(f,kt),fe.event.triggered=void 0,a&&(i[c]=a)),t.result}},simulate:function(e,t,n){var i=fe.extend(new fe.Event,n,{type:e,isSimulated:!0});fe.event.trigger(i,null,t)}}),fe.fn.extend({trigger:function(e,t){return this.each(function(){fe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return fe.event.trigger(e,t,n,!0)}}),le.focusin||fe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){fe.event.simulate(t,e.target,fe.event.fix(e))};fe.event.special[t]={setup:function(){var i=this.ownerDocument||this.document||this,o=Ie.access(i,t);o||i.addEventListener(e,n,!0),Ie.access(i,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,o=Ie.access(i,t)-1;o?Ie.access(i,t,o):(i.removeEventListener(e,n,!0),Ie.remove(i,t))}}});var Ct=e.location,St={guid:Date.now()},Tt=/\?/;fe.parseXML=function(t){var n,i;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){}return i=n&&n.getElementsByTagName("parsererror")[0],n&&!i||fe.error("Invalid XML: "+(i?fe.map(i.childNodes,function(e){return e.textContent}).join("\n"):t)),n};var Et=/\[\]$/,Pt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;fe.param=function(e,t){var n,i=[],o=function(e,t){var n=ce(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!fe.isPlainObject(e))fe.each(e,function(){o(this.name,this.value)});else for(n in e)Y(n,e[n],t,o);return i.join("&")},fe.fn.extend({serialize:function(){return fe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=fe.prop(this,"elements");return e?fe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!fe(this).is(":disabled")&&Dt.test(this.nodeName)&&!At.test(e)&&(this.checked||!qe.test(e))}).map(function(e,t){var n=fe(this).val();return null==n?null:Array.isArray(n)?fe.map(n,function(e){return{name:t.name,value:e.replace(Pt,"\r\n")}}):{name:t.name,value:n.replace(Pt,"\r\n")}}).get()}});var It=/%20/g,$t=/#.*$/,Ot=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,Rt=/^\/\//,Lt={},Nt={},Bt="*/".concat("*"),Ut=de.createElement("a");Ut.href=Ct.href,fe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":fe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?K(K(e,fe.ajaxSettings),t):K(fe.ajaxSettings,e)},ajaxPrefilter:G(Lt),ajaxTransport:G(Nt),ajax:function(t,n){function i(t,n,i,a){var c,h,p,b,w,x=n;u||(u=!0,l&&e.clearTimeout(l),o=void 0,s=a||"",k.readyState=0<t?4:0,c=200<=t&&t<300||304===t,i&&(b=function(e,t,n){for(var i,o,r,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==l[0]&&l.unshift(r),n[r]}(f,k,i)),!c&&-1<fe.inArray("script",f.dataTypes)&&fe.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),b=function(e,t,n,i){var o,r,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(r=u.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(s=c[l+" "+r]||c["* "+r]))for(o in c)if((a=o.split(" "))[1]===r&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[o]:!0!==c[o]&&(r=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}(f,b,k,c),c?(f.ifModified&&((w=k.getResponseHeader("Last-Modified"))&&(fe.lastModified[r]=w),(w=k.getResponseHeader("etag"))&&(fe.etag[r]=w)),204===t||"HEAD"===f.type?x="nocontent":304===t?x="notmodified":(x=b.state,h=b.data,c=!(p=b.error))):(p=x,!t&&x||(x="error",t<0&&(t=0))),k.status=t,k.statusText=(n||x)+"",c?v.resolveWith(g,[h,x,k]):v.rejectWith(g,[k,x,p]),k.statusCode(y),y=void 0,d&&m.trigger(c?"ajaxSuccess":"ajaxError",[k,f,c?h:p]),_.fireWith(g,[k,x]),d&&(m.trigger("ajaxComplete",[k,f]),--fe.active||fe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,r,s,a,l,c,u,d,h,p,f=fe.ajaxSetup({},n),g=f.context||f,m=f.context&&(g.nodeType||g.jquery)?fe(g):fe.event,v=fe.Deferred(),_=fe.Callbacks("once memory"),y=f.statusCode||{},b={},w={},x="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Mt.exec(s);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(e,t){return null==u&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==u&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)k.always(e[k.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||x;return o&&o.abort(t),i(0,t),this}};if(v.promise(k),f.url=((t||f.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(Ce)||[""],null==f.crossDomain){c=de.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=Ut.protocol+"//"+Ut.host!=c.protocol+"//"+c.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=fe.param(f.data,f.traditional)),X(Lt,f,n,k),u)return k;for(h in(d=fe.event&&f.global)&&0==fe.active++&&fe.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ft.test(f.type),r=f.url.replace($t,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(It,"+")):(p=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(Tt.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Ot,"$1"),p=(Tt.test(r)?"&":"?")+"_="+St.guid+++p),f.url=r+p),f.ifModified&&(fe.lastModified[r]&&k.setRequestHeader("If-Modified-Since",fe.lastModified[r]),fe.etag[r]&&k.setRequestHeader("If-None-Match",fe.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Bt+"; q=0.01":""):f.accepts["*"]),f.headers)k.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(g,k,f)||u))return k.abort();if(x="abort",_.add(f.complete),k.done(f.success),k.fail(f.error),o=X(Nt,f,n,k)){if(k.readyState=1,d&&m.trigger("ajaxSend",[k,f]),u)return k;f.async&&0<f.timeout&&(l=e.setTimeout(function(){k.abort("timeout")},f.timeout));try{u=!1,o.send(b,i)}catch(t){if(u)throw t;i(-1,t)}}else i(-1,"No Transport");return k},getJSON:function(e,t,n){return fe.get(e,t,n,"json")},getScript:function(e,t){return fe.get(e,void 0,t,"script")}}),fe.each(["get","post"],function(e,t){fe[t]=function(e,n,i,o){return ce(n)&&(o=o||i,i=n,n=void 0),fe.ajax(fe.extend({url:e,type:t,dataType:o,data:n,success:i},fe.isPlainObject(e)&&e))}}),fe.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),fe._evalUrl=function(e,t,n){return fe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){fe.globalEval(e,t,n)}})},fe.fn.extend({wrapAll:function(e){var t;return this[0]&&(ce(e)&&(e=e.call(this[0])),t=fe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return ce(e)?this.each(function(t){fe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=fe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ce(e);return this.each(function(n){fe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){fe(this).replaceWith(this.childNodes)}),this}}),fe.expr.pseudos.hidden=function(e){return!fe.expr.pseudos.visible(e)},fe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},fe.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var jt={0:200,1223:204},zt=fe.ajaxSettings.xhr();le.cors=!!zt&&"withCredentials"in zt,le.ajax=zt=!!zt,fe.ajaxTransport(function(t){var n,i;if(le.cors||zt&&!t.crossDomain)return{send:function(o,r){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);n=function(e){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(jt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(o){if(n)throw o}},abort:function(){n&&n()}}}),fe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),fe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return fe.globalEval(e),e}}}),fe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),fe.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,o){t=fe("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),de.head.appendChild(t[0])},abort:function(){n&&n()}}});var Ht,Wt=[],qt=/(=)\?(?=&|$)|\?\?/;fe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Wt.pop()||fe.expando+"_"+St.guid++;return this[e]=!0,e}}),fe.ajaxPrefilter("json jsonp",function(t,n,i){var o,r,s,a=!1!==t.jsonp&&(qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&qt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=ce(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(qt,"$1"+o):!1!==t.jsonp&&(t.url+=(Tt.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||fe.error(o+" was not called"),s[0]},t.dataTypes[0]="json",r=e[o],e[o]=function(){s=arguments},i.always(function(){void 0===r?fe(e).removeProp(o):e[o]=r,t[o]&&(t.jsonpCallback=n.jsonpCallback,Wt.push(o)),s&&ce(r)&&r(s[0]),s=r=void 0}),"script"}),le.createHTMLDocument=((Ht=de.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ht.childNodes.length),fe.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((i=(t=de.implementation.createHTMLDocument("")).createElement("base")).href=de.location.href,t.head.appendChild(i)):t=de),r=!n&&[],(o=ye.exec(e))?[t.createElement(o[1])]:(o=b([e],t,r),r&&r.length&&fe(r).remove(),fe.merge([],o.childNodes)));var i,o,r},fe.fn.load=function(e,t,n){var i,o,r,s=this,a=e.indexOf(" ");return-1<a&&(i=W(e.slice(a)),e=e.slice(0,a)),ce(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),0<s.length&&fe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){r=arguments,s.html(i?fe("<div>").append(fe.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},fe.expr.pseudos.animated=function(e){return fe.grep(fe.timers,function(t){return e===t.elem}).length},fe.offset={setOffset:function(e,t,n){var i,o,r,s,a,l,c=fe.css(e,"position"),u=fe(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),r=fe.css(e,"top"),l=fe.css(e,"left"),("absolute"===c||"fixed"===c)&&-1<(r+l).indexOf("auto")?(s=(i=u.position()).top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),ce(t)&&(t=t.call(e,n,fe.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+o),"using"in t?t.using.call(e,d):u.css(d)}},fe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){fe.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],o={top:0,left:0};if("fixed"===fe.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===fe.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((o=fe(e).offset()).top+=fe.css(e,"borderTopWidth",!0),o.left+=fe.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-fe.css(i,"marginTop",!0),left:t.left-o.left-fe.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===fe.css(e,"position");)e=e.offsetParent;return e||Ne})}}),fe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;fe.fn[e]=function(i){return Ee(this,function(e,i,o){var r;if(ue(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===o)return r?r[t]:e[i];r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):e[i]=o},e,i,arguments.length)}}),fe.each(["top","left"],function(e,t){fe.cssHooks[t]=O(le.pixelPosition,function(e,n){if(n)return n=$(e,t),et.test(n)?fe(e).position()[t]+"px":n})}),fe.each({Height:"height",Width:"width"},function(e,t){fe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){fe.fn[i]=function(o,r){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===r?"margin":"border");return Ee(this,function(t,n,o){var r;return ue(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===o?fe.css(t,n,a):fe.style(t,n,o,a)},t,s?o:void 0,s)}})}),fe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){fe.fn[t]=function(e){return this.on(t,e)}}),fe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),fe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){fe.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}});var Vt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;fe.proxy=function(e,t){var n,i,o;if("string"==typeof t&&(n=e[t],t=e,e=n),ce(e))return i=Z.call(arguments,2),(o=function(){return e.apply(t||this,i.concat(Z.call(arguments)))}).guid=e.guid=e.guid||fe.guid++,o},fe.holdReady=function(e){e?fe.readyWait++:fe.ready(!0)},fe.isArray=Array.isArray,fe.parseJSON=JSON.parse,fe.nodeName=r,fe.isFunction=ce,fe.isWindow=ue,fe.camelCase=p,fe.type=i,fe.now=Date.now,fe.isNumeric=function(e){var t=fe.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},fe.trim=function(e){return null==e?"":(e+"").replace(Vt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return fe});var Yt=e.jQuery,Gt=e.$;return fe.noConflict=function(t){return e.$===fe&&(e.$=Gt),t&&e.jQuery===fe&&(e.jQuery=Yt),fe},void 0===t&&(e.jQuery=e.$=fe),fe}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Popper=t()}(this,function(){"use strict";function e(e){return e&&"[object Function]"==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView,i=n.getComputedStyle(e,null);return t?i[t]:i}function n(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function i(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var o=t(e),r=o.overflow,s=o.overflowX,a=o.overflowY;return/(auto|scroll|overlay)/.test(r+a+s)?e:i(n(e))}function o(e){return e&&e.referenceNode?e.referenceNode:e}function r(e){return 11===e?re:10===e?se:re||se}function s(e){if(!e)return document.documentElement;for(var n=r(10)?document.body:null,i=e.offsetParent||null;i===n&&e.nextElementSibling;)i=(e=e.nextElementSibling).offsetParent;var o=i&&i.nodeName;return o&&"BODY"!==o&&"HTML"!==o?-1!==["TH","TD","TABLE"].indexOf(i.nodeName)&&"static"===t(i,"position")?s(i):i:e?e.ownerDocument.documentElement:document.documentElement}function a(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||s(e.firstElementChild)===e)}function l(e){return null===e.parentNode?e:l(e.parentNode)}function c(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?e:t,o=n?t:e,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var u=r.commonAncestorContainer;if(e!==u&&t!==u||i.contains(o))return a(u)?u:s(u);var d=l(e);return d.host?c(d.host,t):c(e,l(t).host)}function u(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",i=e.nodeName;if("BODY"===i||"HTML"===i){var o=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||o;return r[n]}return e[n]}function d(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=u(t,"top"),o=u(t,"left"),r=n?-1:1;return e.top+=i*r,e.bottom+=i*r,e.left+=o*r,e.right+=o*r,e}function h(e,t){var n="x"===t?"Left":"Top",i="Left"==n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+i+"Width"],10)}function p(e,t,n,i){return ee(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],r(10)?parseInt(n["offset"+e])+parseInt(i["margin"+("Height"===e?"Top":"Left")])+parseInt(i["margin"+("Height"===e?"Bottom":"Right")]):0)}function f(e){var t=e.body,n=e.documentElement,i=r(10)&&getComputedStyle(n);return{height:p("Height",t,n,i),width:p("Width",t,n,i)}}function g(e){return ue({},e,{right:e.left+e.width,bottom:e.top+e.height})}function m(e){var n={};try{if(r(10)){n=e.getBoundingClientRect();var i=u(e,"top"),o=u(e,"left");n.top+=i,n.left+=o,n.bottom+=i,n.right+=o}else n=e.getBoundingClientRect()}catch(e){}var s={left:n.left,top:n.top,width:n.right-n.left,height:n.bottom-n.top},a="HTML"===e.nodeName?f(e.ownerDocument):{},l=a.width||e.clientWidth||s.width,c=a.height||e.clientHeight||s.height,d=e.offsetWidth-l,p=e.offsetHeight-c;if(d||p){var m=t(e);d-=h(m,"x"),p-=h(m,"y"),s.width-=d,s.height-=p}return g(s)}function v(e,n){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],s=r(10),a="HTML"===n.nodeName,l=m(e),c=m(n),u=i(e),h=t(n),p=parseFloat(h.borderTopWidth,10),f=parseFloat(h.borderLeftWidth,10);o&&a&&(c.top=ee(c.top,0),c.left=ee(c.left,0));var v=g({top:l.top-c.top-p,left:l.left-c.left-f,width:l.width,height:l.height});if(v.marginTop=0,v.marginLeft=0,!s&&a){var _=parseFloat(h.marginTop,10),y=parseFloat(h.marginLeft,10);v.top-=p-_,v.bottom-=p-_,v.left-=f-y,v.right-=f-y,v.marginTop=_,v.marginLeft=y}return(s&&!o?n.contains(u):n===u&&"BODY"!==u.nodeName)&&(v=d(v,n)),v}function _(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,i=v(e,n),o=ee(n.clientWidth,window.innerWidth||0),r=ee(n.clientHeight,window.innerHeight||0),s=t?0:u(n),a=t?0:u(n,"left"),l={top:s-i.top+i.marginTop,left:a-i.left+i.marginLeft,width:o,height:r};return g(l)}function y(e){var i=e.nodeName;if("BODY"===i||"HTML"===i)return!1;if("fixed"===t(e,"position"))return!0;var o=n(e);return!!o&&y(o)}function b(e){if(!e||!e.parentElement||r())return document.documentElement;for(var n=e.parentElement;n&&"none"===t(n,"transform");)n=n.parentElement;return n||document.documentElement}function w(e,t,r,s){var a=4<arguments.length&&void 0!==arguments[4]&&arguments[4],l={top:0,left:0},u=a?b(e):c(e,o(t));if("viewport"===s)l=_(u,a);else{var d;"scrollParent"===s?(d=i(n(t)),
"BODY"===d.nodeName&&(d=e.ownerDocument.documentElement)):d="window"===s?e.ownerDocument.documentElement:s;var h=v(d,u,a);if("HTML"!==d.nodeName||y(u))l=h;else{var p=f(e.ownerDocument),g=p.height,m=p.width;l.top+=h.top-h.marginTop,l.bottom=g+h.top,l.left+=h.left-h.marginLeft,l.right=m+h.left}}r=r||0;var w="number"==typeof r;return l.left+=w?r:r.left||0,l.top+=w?r:r.top||0,l.right-=w?r:r.right||0,l.bottom-=w?r:r.bottom||0,l}function x(e){var t=e.width,n=e.height;return t*n}function k(e,t,n,i,o){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var s=w(n,i,r,o),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},l=Object.keys(a).map(function(e){return ue({key:e},a[e],{area:x(a[e])})}).sort(function(e,t){return t.area-e.area}),c=l.filter(function(e){var t=e.width,i=e.height;return t>=n.clientWidth&&i>=n.clientHeight}),u=0<c.length?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function C(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,r=i?b(t):c(t,o(n));return v(n,r,i)}function S(e){var t=e.ownerDocument.defaultView,n=t.getComputedStyle(e),i=parseFloat(n.marginTop||0)+parseFloat(n.marginBottom||0),o=parseFloat(n.marginLeft||0)+parseFloat(n.marginRight||0),r={width:e.offsetWidth+o,height:e.offsetHeight+i};return r}function T(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function E(e,t,n){n=n.split("-")[0];var i=S(e),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),s=r?"top":"left",a=r?"left":"top",l=r?"height":"width",c=r?"width":"height";return o[s]=t[s]+t[l]/2-i[l]/2,o[a]=n===a?t[a]-i[c]:t[T(a)],o}function P(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function A(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var i=P(e,function(e){return e[t]===n});return e.indexOf(i)}function D(t,n,i){var o=void 0===i?t:t.slice(0,A(t,"name",i));return o.forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=t.function||t.fn;t.enabled&&e(i)&&(n.offsets.popper=g(n.offsets.popper),n.offsets.reference=g(n.offsets.reference),n=i(n,t))}),n}function I(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=C(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=k(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=E(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=D(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function $(e,t){return e.some(function(e){var n=e.name,i=e.enabled;return i&&n===t})}function O(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length;i++){var o=t[i],r=o?""+o+n:e;if(void 0!==document.body.style[r])return r}return null}function M(){return this.state.isDestroyed=!0,$(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[O("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function F(e){var t=e.ownerDocument;return t?t.defaultView:window}function R(e,t,n,o){var r="BODY"===e.nodeName,s=r?e.ownerDocument.defaultView:e;s.addEventListener(t,n,{passive:!0}),r||R(i(s.parentNode),t,n,o),o.push(s)}function L(e,t,n,o){n.updateBound=o,F(e).addEventListener("resize",n.updateBound,{passive:!0});var r=i(e);return R(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function N(){this.state.eventsEnabled||(this.state=L(this.reference,this.options,this.state,this.scheduleUpdate))}function B(e,t){return F(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function U(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=B(this.reference,this.state))}function j(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function z(e,t){Object.keys(t).forEach(function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&j(t[n])&&(i="px"),e.style[n]=t[n]+i})}function H(e,t){Object.keys(t).forEach(function(n){var i=t[n];!1===i?e.removeAttribute(n):e.setAttribute(n,t[n])})}function W(e,t){var n=e.offsets,i=n.popper,o=n.reference,r=Z,s=function(e){return e},a=r(o.width),l=r(i.width),c=-1!==["left","right"].indexOf(e.placement),u=-1!==e.placement.indexOf("-"),d=t?c||u||a%2==l%2?r:J:s,h=t?r:s;return{left:d(1==a%2&&1==l%2&&!u&&t?i.left-1:i.left),top:h(i.top),bottom:h(i.bottom),right:d(i.right)}}function q(e,t,n){var i=P(e,function(e){var n=e.name;return n===t}),o=!!i&&e.some(function(e){return e.name===n&&e.enabled&&e.order<i.order});if(!o){var r="`"+t+"`";console.warn("`"+n+"` modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}function V(e){return"end"===e?"start":"start"===e?"end":e}function Y(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=pe.indexOf(e),i=pe.slice(n+1).concat(pe.slice(0,n));return t?i.reverse():i}function G(e,t,n,i){var o,r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),s=+r[1],a=r[2];if(!s)return e;if(0===a.indexOf("%")){var l;switch(a){case"%p":l=n;break;case"%":case"%r":default:l=i}var c=g(l);return c[t]/100*s}return"vh"===a||"vw"===a?(o="vh"===a?ee(document.documentElement.clientHeight,window.innerHeight||0):ee(document.documentElement.clientWidth,window.innerWidth||0),o/100*s):s}function X(e,t,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),s=e.split(/(\+|\-)/).map(function(e){return e.trim()}),a=s.indexOf(P(s,function(e){return-1!==e.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1===a?[s]:[s.slice(0,a).concat([s[a].split(l)[0]]),[s[a].split(l)[1]].concat(s.slice(a+1))];return c=c.map(function(e,i){var o=(1===i?!r:r)?"height":"width",s=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,s=!0,e):s?(e[e.length-1]+=t,s=!1,e):e.concat(t)},[]).map(function(e){return G(e,o,t,n)})}),c.forEach(function(e,t){e.forEach(function(n,i){j(n)&&(o[t]+=n*("-"===e[i-1]?-1:1))})}),o}function K(e,t){var n,i=t.offset,o=e.placement,r=e.offsets,s=r.popper,a=r.reference,l=o.split("-")[0];return n=j(+i)?[+i,0]:X(i,s,a,l),"left"===l?(s.top+=n[0],s.left-=n[1]):"right"===l?(s.top+=n[0],s.left+=n[1]):"top"===l?(s.left+=n[0],s.top-=n[1]):"bottom"===l&&(s.left+=n[0],s.top+=n[1]),e.popper=s,e}var Q=Math.min,J=Math.floor,Z=Math.round,ee=Math.max,te="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,ne=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(te&&0<=navigator.userAgent.indexOf(e[t]))return 1;return 0}(),ie=te&&window.Promise,oe=ie?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},ne))}},re=te&&!(!window.MSInputMethodContext||!document.documentMode),se=te&&/MSIE 10/.test(navigator.userAgent),ae=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},le=function(){function e(e,t){for(var n,i=0;i<t.length;i++)n=t[i],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),ce=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ue=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},de=te&&/Firefox/i.test(navigator.userAgent),he=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],pe=he.slice(3),fe={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},ge=function(){function t(n,i){var o=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};ae(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=oe(this.update.bind(this)),this.options=ue({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=n&&n.jquery?n[0]:n,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(ue({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){o.options.modifiers[e]=ue({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return ue({name:e},o.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(o.reference,o.popper,o.options,t,o.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return le(t,[{key:"update",value:function(){return I.call(this)}},{key:"destroy",value:function(){return M.call(this)}},{key:"enableEventListeners",value:function(){return N.call(this)}},{key:"disableEventListeners",value:function(){return U.call(this)}}]),t}();return ge.Utils=("undefined"==typeof window?global:window).PopperUtils,ge.placements=he,ge.Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var o=e.offsets,r=o.reference,s=o.popper,a=-1!==["bottom","top"].indexOf(n),l=a?"left":"top",c=a?"width":"height",u={start:ce({},l,r[l]),end:ce({},l,r[l]+r[c]-s[c])};e.offsets.popper=ue({},s,u[i])}return e}},offset:{order:200,enabled:!0,fn:K,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||s(e.instance.popper);e.instance.reference===n&&(n=s(n));var i=O("transform"),o=e.instance.popper.style,r=o.top,a=o.left,l=o[i];o.top="",o.left="",o[i]="";var c=w(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=r,o.left=a,o[i]=l,t.boundaries=c;var u=t.priority,d=e.offsets.popper,h={primary:function(e){var n=d[e];return d[e]<c[e]&&!t.escapeWithReference&&(n=ee(d[e],c[e])),ce({},e,n)},secondary:function(e){var n="right"===e?"left":"top",i=d[n];return d[e]>c[e]&&!t.escapeWithReference&&(i=Q(d[n],c[e]-("right"===e?d.width:d.height))),ce({},n,i)}};return u.forEach(function(e){var t=-1===["left","top"].indexOf(e)?"secondary":"primary";d=ue({},d,h[t](e))}),e.offsets.popper=d,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,i=t.reference,o=e.placement.split("-")[0],r=J,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]<r(i[l])&&(e.offsets.popper[l]=r(i[l])-n[c]),n[l]>r(i[a])&&(e.offsets.popper[l]=r(i[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,n){var i;if(!q(e.instance.modifiers,"arrow","keepTogether"))return e;var o=n.element;if("string"==typeof o){if(o=e.instance.popper.querySelector(o),!o)return e}else if(!e.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],s=e.offsets,a=s.popper,l=s.reference,c=-1!==["left","right"].indexOf(r),u=c?"height":"width",d=c?"Top":"Left",h=d.toLowerCase(),p=c?"left":"top",f=c?"bottom":"right",m=S(o)[u];l[f]-m<a[h]&&(e.offsets.popper[h]-=a[h]-(l[f]-m)),l[h]+m>a[f]&&(e.offsets.popper[h]+=l[h]+m-a[f]),e.offsets.popper=g(e.offsets.popper);var v=l[h]+l[u]/2-m/2,_=t(e.instance.popper),y=parseFloat(_["margin"+d],10),b=parseFloat(_["border"+d+"Width"],10),w=v-e.offsets.popper[h]-y-b;return w=ee(Q(a[u]-m,w),0),e.arrowElement=o,e.offsets.arrow=(i={},ce(i,h,Z(w)),ce(i,p,""),i),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if($(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=w(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),i=e.placement.split("-")[0],o=T(i),r=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case fe.FLIP:s=[i,o];break;case fe.CLOCKWISE:s=Y(i);break;case fe.COUNTERCLOCKWISE:s=Y(i,!0);break;default:s=t.behavior}return s.forEach(function(a,l){if(i!==a||s.length===l+1)return e;i=e.placement.split("-")[0],o=T(i);var c=e.offsets.popper,u=e.offsets.reference,d=J,h="left"===i&&d(c.right)>d(u.left)||"right"===i&&d(c.left)<d(u.right)||"top"===i&&d(c.bottom)>d(u.top)||"bottom"===i&&d(c.top)<d(u.bottom),p=d(c.left)<d(n.left),f=d(c.right)>d(n.right),g=d(c.top)<d(n.top),m=d(c.bottom)>d(n.bottom),v="left"===i&&p||"right"===i&&f||"top"===i&&g||"bottom"===i&&m,_=-1!==["top","bottom"].indexOf(i),y=!!t.flipVariations&&(_&&"start"===r&&p||_&&"end"===r&&f||!_&&"start"===r&&g||!_&&"end"===r&&m),b=!!t.flipVariationsByContent&&(_&&"start"===r&&f||_&&"end"===r&&p||!_&&"start"===r&&m||!_&&"end"===r&&g),w=y||b;(h||v||w)&&(e.flipped=!0,(h||v)&&(i=s[l+1]),w&&(r=V(r)),e.placement=i+(r?"-"+r:""),e.offsets.popper=ue({},e.offsets.popper,E(e.instance.popper,e.offsets.reference,e.placement)),e=D(e.instance.modifiers,e,"flip"))}),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],i=e.offsets,o=i.popper,r=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=r[n]-(a?o[s?"width":"height"]:0),e.placement=T(t),e.offsets.popper=g(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!q(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=P(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,i=t.y,o=e.offsets.popper,r=P(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a,l,c=void 0===r?t.gpuAcceleration:r,u=s(e.instance.popper),d=m(u),h={position:o.position},p=W(e,2>window.devicePixelRatio||!de),f="bottom"===n?"top":"bottom",g="right"===i?"left":"right",v=O("transform");if(l="bottom"==f?"HTML"===u.nodeName?-u.clientHeight+p.bottom:-d.height+p.bottom:p.top,a="right"==g?"HTML"===u.nodeName?-u.clientWidth+p.right:-d.width+p.right:p.left,c&&v)h[v]="translate3d("+a+"px, "+l+"px, 0)",h[f]=0,h[g]=0,h.willChange="transform";else{var _="bottom"==f?-1:1,y="right"==g?-1:1;h[f]=l*_,h[g]=a*y,h.willChange=f+", "+g}var b={"x-placement":e.placement};return e.attributes=ue({},b,e.attributes),e.styles=ue({},h,e.styles),e.arrowStyles=ue({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return z(e.instance.popper,e.styles),H(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&z(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,i,o){var r=C(o,t,e,n.positionFixed),s=k(n.placement,r,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",s),z(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},ge}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],t):t((e=e||self).bootstrap={},e.jQuery,e.Popper)}(this,function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function l(e){var n=this,i=!1;return t(this).one(u.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||u.triggerTransitionEnd(n)},e),this}function c(e,t,n){if(0===e.length)return e;if(n&&"function"==typeof n)return n(e);for(var i=(new window.DOMParser).parseFromString(e,"text/html"),o=Object.keys(t),r=[].slice.call(i.body.querySelectorAll("*")),s=function(e,n){var i=r[e],s=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var a=[].slice.call(i.attributes),l=[].concat(t["*"]||[],t[s]||[]);a.forEach(function(e){(function(e,t){var n=e.nodeName.toLowerCase();if(-1!==t.indexOf(n))return-1===N.indexOf(n)||Boolean(e.nodeValue.match(U)||e.nodeValue.match(j));for(var i=t.filter(function(e){return e instanceof RegExp}),o=0,r=i.length;o<r;o++)if(n.match(i[o]))return!0;return!1})(e,l)||i.removeAttribute(e.nodeName)})},a=0,l=r.length;a<l;a++)s(a);return i.body.innerHTML}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var u={TRANSITION_END:"bsTransitionEnd",getUID:function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},getSelectorFromElement:function(e){var t=e.getAttribute("data-target");if(!t||"#"===t){var n=e.getAttribute("href");t=n&&"#"!==n?n.trim():""}try{return document.querySelector(t)?t:null}catch(e){return null}},getTransitionDurationFromElement:function(e){if(!e)return 0;var n=t(e).css("transition-duration"),i=t(e).css("transition-delay"),o=parseFloat(n),r=parseFloat(i);return o||r?(n=n.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(n)+parseFloat(i))):0},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(e){return(e[0]||e).nodeType},typeCheckConfig:function(e,t,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=t[i],s=r&&u.isElement(r)?"element":null===(a=r)||void 0===a?""+a:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(s))throw new Error(e.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}var a},findShadowRoot:function(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?u.findShadowRoot(e.parentNode):null},jQueryDetection:function(){if(void 0===t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};u.jQueryDetection(),t.fn.emulateTransitionEnd=l,t.event.special[u.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}};var d="alert",h=t.fn[d],p=function(){function e(e){this._element=e}var n=e.prototype;return n.close=function(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},n.dispose=function(){t.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(e){var n=u.getSelectorFromElement(e),i=!1;return n&&(i=document.querySelector(n)),i||(i=t(e).closest(".alert")[0]),i},n._triggerCloseEvent=function(e){var n=t.Event("close.bs.alert");return t(e).trigger(n),n},n._removeElement=function(e){var n=this;if(t(e).removeClass("show"),t(e).hasClass("fade")){var i=u.getTransitionDurationFromElement(e);t(e).one(u.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(i)}else this._destroyElement(e)},n._destroyElement=function(e){t(e).detach().trigger("closed.bs.alert").remove()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data("bs.alert");o||(o=new e(this),i.data("bs.alert",o)),"close"===n&&o[n](this)})},e._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},o(e,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),e}();t(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',p._handleDismiss(new p)),t.fn[d]=p._jQueryInterface,t.fn[d].Constructor=p,t.fn[d].noConflict=function(){return t.fn[d]=h,p._jQueryInterface};var f=t.fn.button,g=function(){function e(e){this._element=e}var n=e.prototype;return n.toggle=function(){var e=!0,n=!0,i=t(this._element).closest('[data-toggle="buttons"]')[0];if(i){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))e=!1;else{var r=i.querySelector(".active");r&&t(r).removeClass("active")}e&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),t(o).trigger("change")),o.focus(),n=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),e&&t(this._element).toggleClass("active"))},n.dispose=function(){t.removeData(this._element,"bs.button"),this._element=null},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data("bs.button");i||(i=new e(this),t(this).data("bs.button",i)),"toggle"===n&&i[n]()})},o(e,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),e}();t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(e){var n=e.target,i=n;if(t(n).hasClass("btn")||(n=t(n).closest(".btn")[0]),!n||n.hasAttribute("disabled")||n.classList.contains("disabled"))e.preventDefault();else{var o=n.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void e.preventDefault();"LABEL"===i.tagName&&o&&"checkbox"===o.type&&e.preventDefault(),g._jQueryInterface.call(t(n),"toggle")}}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){var n=t(e.target).closest(".btn")[0];t(n).toggleClass("focus",/^focus(in)?$/.test(e.type))}),t(window).on("load.bs.button.data-api",function(){for(var e=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),t=0,n=e.length;t<n;t++){var i=e[t],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}for(var r=0,s=(e=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;r<s;r++){var a=e[r];"true"===a.getAttribute("aria-pressed")?a.classList.add("active"):a.classList.remove("active")}}),t.fn.button=g._jQueryInterface,t.fn.button.Constructor=g,t.fn.button.noConflict=function(){return t.fn.button=f,g._jQueryInterface};var m="carousel",v=".bs.carousel",_=t.fn[m],y={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},b={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},w={TOUCH:"touch",PEN:"pen"},x=function(){function e(e,t){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(t),this._element=e,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var n=e.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(e){e||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(u.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(e){var n=this;this._activeElement=this._element.querySelector(".active.carousel-item");var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one("slid.bs.carousel",function(){return n.to(e)});else{if(i===e)return this.pause(),void this.cycle();var o=e>i?"next":"prev";this._slide(o,this._items[e])}},n.dispose=function(){t(this._element).off(v),t.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(e){return e=a(a({},y),e),u.typeCheckConfig(m,e,b),e},n._handleSwipe=function(){var e=Math.abs(this.touchDeltaX);if(!(e<=40)){var t=e/this.touchDeltaX;this.touchDeltaX=0,t>0&&this.prev(),t<0&&this.next()}},n._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on("keydown.bs.carousel",function(t){return e._keydown(t)}),"hover"===this._config.pause&&t(this._element).on("mouseenter.bs.carousel",function(t){return e.pause(t)}).on("mouseleave.bs.carousel",function(t){return e.cycle(t)}),this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var e=this;if(this._touchSupported){var n=function(t){e._pointerEvent&&w[t.originalEvent.pointerType.toUpperCase()]?e.touchStartX=t.originalEvent.clientX:e._pointerEvent||(e.touchStartX=t.originalEvent.touches[0].clientX)},i=function(t){e._pointerEvent&&w[t.originalEvent.pointerType.toUpperCase()]&&(e.touchDeltaX=t.originalEvent.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval))};t(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",function(e){return e.preventDefault()}),this._pointerEvent?(t(this._element).on("pointerdown.bs.carousel",function(e){return n(e)}),t(this._element).on("pointerup.bs.carousel",function(e){return i(e)}),this._element.classList.add("pointer-event")):(t(this._element).on("touchstart.bs.carousel",function(e){return n(e)}),t(this._element).on("touchmove.bs.carousel",function(t){return function(t){t.originalEvent.touches&&t.originalEvent.touches.length>1?e.touchDeltaX=0:e.touchDeltaX=t.originalEvent.touches[0].clientX-e.touchStartX}(t)}),t(this._element).on("touchend.bs.carousel",function(e){return i(e)}))}},n._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case 37:e.preventDefault(),this.prev();break;case 39:e.preventDefault(),this.next()}},n._getItemIndex=function(e){return this._items=e&&e.parentNode?[].slice.call(e.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(e)},n._getItemByDirection=function(e,t){var n="next"===e,i="prev"===e,o=this._getItemIndex(t),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return t;var s=(o+("prev"===e?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},n._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),r=t.Event("slide.bs.carousel",{relatedTarget:e,direction:n,from:o,to:i});return t(this._element).trigger(r),r},n._setActiveIndicatorElement=function(e){if(this._indicatorsElement){var n=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));t(n).removeClass("active");var i=this._indicatorsElement.children[this._getItemIndex(e)];i&&t(i).addClass("active")}},n._slide=function(e,n){var i,o,r,s=this,a=this._element.querySelector(".active.carousel-item"),l=this._getItemIndex(a),c=n||a&&this._getItemByDirection(e,a),d=this._getItemIndex(c),h=Boolean(this._interval);if("next"===e?(i="carousel-item-left",o="carousel-item-next",r="left"):(i="carousel-item-right",o="carousel-item-prev",r="right"),c&&t(c).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(c,r).isDefaultPrevented()&&a&&c){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(c);var p=t.Event("slid.bs.carousel",{relatedTarget:c,direction:r,from:l,to:d});if(t(this._element).hasClass("slide")){t(c).addClass(o),u.reflow(c),t(a).addClass(i),t(c).addClass(i);var f=parseInt(c.getAttribute("data-interval"),10);f?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=f):this._config.interval=this._config.defaultInterval||this._config.interval;var g=u.getTransitionDurationFromElement(a);t(a).one(u.TRANSITION_END,function(){t(c).removeClass(i+" "+o).addClass("active"),t(a).removeClass("active "+o+" "+i),s._isSliding=!1,setTimeout(function(){return t(s._element).trigger(p)},0)}).emulateTransitionEnd(g)}else t(a).removeClass("active"),t(c).addClass("active"),this._isSliding=!1,t(this._element).trigger(p);h&&this.cycle()}},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data("bs.carousel"),o=a(a({},y),t(this).data());"object"==typeof n&&(o=a(a({},o),n));var r="string"==typeof n?n:o.slide;if(i||(i=new e(this,o),t(this).data("bs.carousel",i)),"number"==typeof n)i.to(n);else if("string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r]()}else o.interval&&o.ride&&(i.pause(),i.cycle())})},e._dataApiClickHandler=function(n){var i=u.getSelectorFromElement(this);if(i){var o=t(i)[0];if(o&&t(o).hasClass("carousel")){var r=a(a({},t(o).data()),t(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),e._jQueryInterface.call(t(o),r),s&&t(o).data("bs.carousel").to(s),n.preventDefault()}}},o(e,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return y}}]),e}();t(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",x._dataApiClickHandler),
t(window).on("load.bs.carousel.data-api",function(){for(var e=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),n=0,i=e.length;n<i;n++){var o=t(e[n]);x._jQueryInterface.call(o,o.data())}}),t.fn[m]=x._jQueryInterface,t.fn[m].Constructor=x,t.fn[m].noConflict=function(){return t.fn[m]=_,x._jQueryInterface};var k="collapse",C=t.fn[k],S={toggle:!0,parent:""},T={toggle:"boolean",parent:"(string|element)"},E=function(){function e(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var n=[].slice.call(document.querySelectorAll('[data-toggle="collapse"]')),i=0,o=n.length;i<o;i++){var r=n[i],s=u.getSelectorFromElement(r),a=[].slice.call(document.querySelectorAll(s)).filter(function(t){return t===e});null!==s&&a.length>0&&(this._selector=s,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var n=e.prototype;return n.toggle=function(){t(this._element).hasClass("show")?this.hide():this.show()},n.show=function(){var n,i,o=this;if(!(this._isTransitioning||t(this._element).hasClass("show")||(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter(function(e){return"string"==typeof o._config.parent?e.getAttribute("data-parent")===o._config.parent:e.classList.contains("collapse")})).length&&(n=null),n&&(i=t(n).not(this._selector).data("bs.collapse"))&&i._isTransitioning))){var r=t.Event("show.bs.collapse");if(t(this._element).trigger(r),!r.isDefaultPrevented()){n&&(e._jQueryInterface.call(t(n).not(this._selector),"hide"),i||t(n).data("bs.collapse",null));var s=this._getDimension();t(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[s]=0,this._triggerArray.length&&t(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var a="scroll"+(s[0].toUpperCase()+s.slice(1)),l=u.getTransitionDurationFromElement(this._element);t(this._element).one(u.TRANSITION_END,function(){t(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[s]="",o.setTransitioning(!1),t(o._element).trigger("shown.bs.collapse")}).emulateTransitionEnd(l),this._element.style[s]=this._element[a]+"px"}}},n.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass("show")){var n=t.Event("hide.bs.collapse");if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",u.reflow(this._element),t(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var r=0;r<o;r++){var s=this._triggerArray[r],a=u.getSelectorFromElement(s);null!==a&&(t([].slice.call(document.querySelectorAll(a))).hasClass("show")||t(s).addClass("collapsed").attr("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[i]="";var l=u.getTransitionDurationFromElement(this._element);t(this._element).one(u.TRANSITION_END,function(){e.setTransitioning(!1),t(e._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")}).emulateTransitionEnd(l)}}},n.setTransitioning=function(e){this._isTransitioning=e},n.dispose=function(){t.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},n._getConfig=function(e){return(e=a(a({},S),e)).toggle=Boolean(e.toggle),u.typeCheckConfig(k,e,T),e},n._getDimension=function(){return t(this._element).hasClass("width")?"width":"height"},n._getParent=function(){var n,i=this;u.isElement(this._config.parent)?(n=this._config.parent,void 0!==this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',r=[].slice.call(n.querySelectorAll(o));return t(r).each(function(t,n){i._addAriaAndCollapsedClass(e._getTargetFromElement(n),[n])}),n},n._addAriaAndCollapsedClass=function(e,n){var i=t(e).hasClass("show");n.length&&t(n).toggleClass("collapsed",!i).attr("aria-expanded",i)},e._getTargetFromElement=function(e){var t=u.getSelectorFromElement(e);return t?document.querySelector(t):null},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data("bs.collapse"),r=a(a(a({},S),i.data()),"object"==typeof n&&n?n:{});if(!o&&r.toggle&&"string"==typeof n&&/show|hide/.test(n)&&(r.toggle=!1),o||(o=new e(this,r),i.data("bs.collapse",o)),"string"==typeof n){if(void 0===o[n])throw new TypeError('No method named "'+n+'"');o[n]()}})},o(e,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return S}}]),e}();t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var n=t(this),i=u.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(i));t(o).each(function(){var e=t(this),i=e.data("bs.collapse")?"toggle":n.data();E._jQueryInterface.call(e,i)})}),t.fn[k]=E._jQueryInterface,t.fn[k].Constructor=E,t.fn[k].noConflict=function(){return t.fn[k]=C,E._jQueryInterface};var P="dropdown",A=t.fn[P],D=new RegExp("38|40|27"),I={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},$={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},O=function(){function e(e,t){this._element=e,this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var i=e.prototype;return i.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass("disabled")){var n=t(this._menu).hasClass("show");e._clearMenus(),n||this.show(!0)}},i.show=function(i){if(void 0===i&&(i=!1),!(this._element.disabled||t(this._element).hasClass("disabled")||t(this._menu).hasClass("show"))){var o={relatedTarget:this._element},r=t.Event("show.bs.dropdown",o),s=e._getParentFromElement(this._element);if(t(s).trigger(r),!r.isDefaultPrevented()){if(!this._inNavbar&&i){if(void 0===n)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var a=this._element;"parent"===this._config.reference?a=s:u.isElement(this._config.reference)&&(a=this._config.reference,void 0!==this._config.reference.jquery&&(a=this._config.reference[0])),"scrollParent"!==this._config.boundary&&t(s).addClass("position-static"),this._popper=new n(a,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(s).closest(".navbar-nav").length&&t(document.body).children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass("show"),t(s).toggleClass("show").trigger(t.Event("shown.bs.dropdown",o))}}},i.hide=function(){if(!this._element.disabled&&!t(this._element).hasClass("disabled")&&t(this._menu).hasClass("show")){var n={relatedTarget:this._element},i=t.Event("hide.bs.dropdown",n),o=e._getParentFromElement(this._element);t(o).trigger(i),i.isDefaultPrevented()||(this._popper&&this._popper.destroy(),t(this._menu).toggleClass("show"),t(o).toggleClass("show").trigger(t.Event("hidden.bs.dropdown",n)))}},i.dispose=function(){t.removeData(this._element,"bs.dropdown"),t(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},i.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},i._addEventListeners=function(){var e=this;t(this._element).on("click.bs.dropdown",function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},i._getConfig=function(e){return e=a(a(a({},this.constructor.Default),t(this._element).data()),e),u.typeCheckConfig(P,e,this.constructor.DefaultType),e},i._getMenuElement=function(){if(!this._menu){var t=e._getParentFromElement(this._element);t&&(this._menu=t.querySelector(".dropdown-menu"))}return this._menu},i._getPlacement=function(){var e=t(this._element.parentNode),n="bottom-start";return e.hasClass("dropup")?n=t(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":e.hasClass("dropright")?n="right-start":e.hasClass("dropleft")?n="left-start":t(this._menu).hasClass("dropdown-menu-right")&&(n="bottom-end"),n},i._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},i._getOffset=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=a(a({},t.offsets),e._config.offset(t.offsets,e._element)||{}),t}:t.offset=this._config.offset,t},i._getPopperConfig=function(){var e={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(e.modifiers.applyStyle={enabled:!1}),a(a({},e),this._config.popperConfig)},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data("bs.dropdown");if(i||(i=new e(this,"object"==typeof n?n:null),t(this).data("bs.dropdown",i)),"string"==typeof n){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},e._clearMenus=function(n){if(!n||3!==n.which&&("keyup"!==n.type||9===n.which))for(var i=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,r=i.length;o<r;o++){var s=e._getParentFromElement(i[o]),a=t(i[o]).data("bs.dropdown"),l={relatedTarget:i[o]};if(n&&"click"===n.type&&(l.clickEvent=n),a){var c=a._menu;if(t(s).hasClass("show")&&!(n&&("click"===n.type&&/input|textarea/i.test(n.target.tagName)||"keyup"===n.type&&9===n.which)&&t.contains(s,n.target))){var u=t.Event("hide.bs.dropdown",l);t(s).trigger(u),u.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),i[o].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),t(c).removeClass("show"),t(s).removeClass("show").trigger(t.Event("hidden.bs.dropdown",l)))}}}},e._getParentFromElement=function(e){var t,n=u.getSelectorFromElement(e);return n&&(t=document.querySelector(n)),t||e.parentNode},e._dataApiKeydownHandler=function(n){if(!(/input|textarea/i.test(n.target.tagName)?32===n.which||27!==n.which&&(40!==n.which&&38!==n.which||t(n.target).closest(".dropdown-menu").length):!D.test(n.which))&&!this.disabled&&!t(this).hasClass("disabled")){var i=e._getParentFromElement(this),o=t(i).hasClass("show");if(o||27!==n.which){if(n.preventDefault(),n.stopPropagation(),!o||o&&(27===n.which||32===n.which))return 27===n.which&&t(i.querySelector('[data-toggle="dropdown"]')).trigger("focus"),void t(this).trigger("click");var r=[].slice.call(i.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter(function(e){return t(e).is(":visible")});if(0!==r.length){var s=r.indexOf(n.target);38===n.which&&s>0&&s--,40===n.which&&s<r.length-1&&s++,s<0&&(s=0),r[s].focus()}}}},o(e,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return I}},{key:"DefaultType",get:function(){return $}}]),e}();t(document).on("keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',O._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api",".dropdown-menu",O._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api",O._clearMenus).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',function(e){e.preventDefault(),e.stopPropagation(),O._jQueryInterface.call(t(this),"toggle")}).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}),t.fn[P]=O._jQueryInterface,t.fn[P].Constructor=O,t.fn[P].noConflict=function(){return t.fn[P]=A,O._jQueryInterface};var M=t.fn.modal,F={backdrop:!0,keyboard:!0,focus:!0,show:!0},R={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},L=function(){function e(e,t){this._config=this._getConfig(t),this._element=e,this._dialog=e.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var n=e.prototype;return n.toggle=function(e){return this._isShown?this.hide():this.show(e)},n.show=function(e){var n=this;if(!this._isShown&&!this._isTransitioning){t(this._element).hasClass("fade")&&(this._isTransitioning=!0);var i=t.Event("show.bs.modal",{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on("click.dismiss.bs.modal",'[data-dismiss="modal"]',function(e){return n.hide(e)}),t(this._dialog).on("mousedown.dismiss.bs.modal",function(){t(n._element).one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(e)}))}},n.hide=function(e){var n=this;if(e&&e.preventDefault(),this._isShown&&!this._isTransitioning){var i=t.Event("hide.bs.modal");if(t(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var o=t(this._element).hasClass("fade");if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off("focusin.bs.modal"),t(this._element).removeClass("show"),t(this._element).off("click.dismiss.bs.modal"),t(this._dialog).off("mousedown.dismiss.bs.modal"),o){var r=u.getTransitionDurationFromElement(this._element);t(this._element).one(u.TRANSITION_END,function(e){return n._hideModal(e)}).emulateTransitionEnd(r)}else this._hideModal()}}},n.dispose=function(){[window,this._element,this._dialog].forEach(function(e){return t(e).off(".bs.modal")}),t(document).off("focusin.bs.modal"),t.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(e){return e=a(a({},F),e),u.typeCheckConfig("modal",e,R),e},n._triggerBackdropTransition=function(){var e=this;if("static"===this._config.backdrop){var n=t.Event("hidePrevented.bs.modal");if(t(this._element).trigger(n),n.defaultPrevented)return;this._element.classList.add("modal-static");var i=u.getTransitionDurationFromElement(this._element);t(this._element).one(u.TRANSITION_END,function(){e._element.classList.remove("modal-static")}).emulateTransitionEnd(i),this._element.focus()}else this.hide()},n._showElement=function(e){var n=this,i=t(this._element).hasClass("fade"),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),t(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,i&&u.reflow(this._element),t(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var r=t.Event("shown.bs.modal",{relatedTarget:e}),s=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,t(n._element).trigger(r)};if(i){var a=u.getTransitionDurationFromElement(this._dialog);t(this._dialog).one(u.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},n._enforceFocus=function(){var e=this;t(document).off("focusin.bs.modal").on("focusin.bs.modal",function(n){document!==n.target&&e._element!==n.target&&0===t(e._element).has(n.target).length&&e._element.focus()})},n._setEscapeEvent=function(){var e=this;this._isShown?t(this._element).on("keydown.dismiss.bs.modal",function(t){e._config.keyboard&&27===t.which?(t.preventDefault(),e.hide()):e._config.keyboard||27!==t.which||e._triggerBackdropTransition()}):this._isShown||t(this._element).off("keydown.dismiss.bs.modal")},n._setResizeEvent=function(){var e=this;this._isShown?t(window).on("resize.bs.modal",function(t){return e.handleUpdate(t)}):t(window).off("resize.bs.modal")},n._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass("modal-open"),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger("hidden.bs.modal")})},n._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(e){var n=this,i=t(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",i&&this._backdrop.classList.add(i),t(this._backdrop).appendTo(document.body),t(this._element).on("click.dismiss.bs.modal",function(e){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:e.target===e.currentTarget&&n._triggerBackdropTransition()}),i&&u.reflow(this._backdrop),t(this._backdrop).addClass("show"),!e)return;if(!i)return void e();var o=u.getTransitionDurationFromElement(this._backdrop);t(this._backdrop).one(u.TRANSITION_END,e).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass("show");var r=function(){n._removeBackdrop(),e&&e()};if(t(this._element).hasClass("fade")){var s=u.getTransitionDurationFromElement(this._backdrop);t(this._backdrop).one(u.TRANSITION_END,r).emulateTransitionEnd(s)}else r()}else e&&e()},n._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(e.left+e.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){var n=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")),i=[].slice.call(document.querySelectorAll(".sticky-top"));t(n).each(function(n,i){var o=i.style.paddingRight,r=t(i).css("padding-right");t(i).data("padding-right",o).css("padding-right",parseFloat(r)+e._scrollbarWidth+"px")}),t(i).each(function(n,i){var o=i.style.marginRight,r=t(i).css("margin-right");t(i).data("margin-right",o).css("margin-right",parseFloat(r)-e._scrollbarWidth+"px")});var o=document.body.style.paddingRight,r=t(document.body).css("padding-right");t(document.body).data("padding-right",o).css("padding-right",parseFloat(r)+this._scrollbarWidth+"px")}t(document.body).addClass("modal-open")},n._resetScrollbar=function(){var e=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"));t(e).each(function(e,n){var i=t(n).data("padding-right");t(n).removeData("padding-right"),n.style.paddingRight=i||""});var n=[].slice.call(document.querySelectorAll(".sticky-top"));t(n).each(function(e,n){var i=t(n).data("margin-right");void 0!==i&&t(n).css("margin-right",i).removeData("margin-right")});var i=t(document.body).data("padding-right");t(document.body).removeData("padding-right"),document.body.style.paddingRight=i||""},n._getScrollbarWidth=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},e._jQueryInterface=function(n,i){return this.each(function(){var o=t(this).data("bs.modal"),r=a(a(a({},F),t(this).data()),"object"==typeof n&&n?n:{});if(o||(o=new e(this,r),t(this).data("bs.modal",o)),"string"==typeof n){if(void 0===o[n])throw new TypeError('No method named "'+n+'"');o[n](i)}else r.show&&o.show(i)})},o(e,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return F}}]),e}();t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(e){var n,i=this,o=u.getSelectorFromElement(this);o&&(n=document.querySelector(o));var r=t(n).data("bs.modal")?"toggle":a(a({},t(n).data()),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var s=t(n).one("show.bs.modal",function(e){e.isDefaultPrevented()||s.one("hidden.bs.modal",function(){t(i).is(":visible")&&i.focus()})});L._jQueryInterface.call(t(n),r,this)}),t.fn.modal=L._jQueryInterface,t.fn.modal.Constructor=L,t.fn.modal.noConflict=function(){return t.fn.modal=M,L._jQueryInterface};var N=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],B={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},U=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,j=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,z="tooltip",H=t.fn[z],W=new RegExp("(^|\\s)bs-tooltip\\S+","g"),q=["sanitize","whiteList","sanitizeFn"],V={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Y={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},G={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:B,popperConfig:null},X={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},K=function(){function e(e,t){if(void 0===n)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var i=e.prototype;return i.enable=function(){this._isEnabled=!0},i.disable=function(){this._isEnabled=!1},i.toggleEnabled=function(){this._isEnabled=!this._isEnabled},i.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},i.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},i.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var i=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(i);var o=u.findShadowRoot(this.element),r=t.contains(null!==o?o:this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!r)return;var s=this.getTipElement(),a=u.getUID(this.constructor.NAME);s.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&t(s).addClass("fade");var l="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,c=this._getAttachment(l);this.addAttachmentClass(c);var d=this._getContainer();t(s).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(s).appendTo(d),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,s,this._getPopperConfig(c)),t(s).addClass("show"),"ontouchstart"in document.documentElement&&t(document.body).children().on("mouseover",null,t.noop);var h=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),"out"===n&&e._leave(null,e)};if(t(this.tip).hasClass("fade")){var p=u.getTransitionDurationFromElement(this.tip);t(this.tip).one(u.TRANSITION_END,h).emulateTransitionEnd(p)}else h()}},i.hide=function(e){var n=this,i=this.getTipElement(),o=t.Event(this.constructor.Event.HIDE),r=function(){"show"!==n._hoverState&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};if(t(this.element).trigger(o),!o.isDefaultPrevented()){if(t(i).removeClass("show"),"ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,t(this.tip).hasClass("fade")){var s=u.getTransitionDurationFromElement(i);t(i).one(u.TRANSITION_END,r).emulateTransitionEnd(s)}else r();this._hoverState=""}},i.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},i.isWithContent=function(){return Boolean(this.getTitle())},i.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},i.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},i.setContent=function(){var e=this.getTipElement();this.setElementContent(t(e.querySelectorAll(".tooltip-inner")),this.getTitle()),t(e).removeClass("fade show")},i.setElementContent=function(e,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=c(n,this.config.whiteList,this.config.sanitizeFn)),e.html(n)):e.text(n):this.config.html?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text())},i.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},i._getPopperConfig=function(e){var t=this;return a(a({},{placement:e,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}}),this.config.popperConfig)},i._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=a(a({},t.offsets),e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},i._getContainer=function(){return!1===this.config.container?document.body:u.isElement(this.config.container)?t(this.config.container):t(document).find(this.config.container)},i._getAttachment=function(e){return Y[e.toUpperCase()]},i._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if("manual"!==n){var i="hover"===n?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,o="hover"===n?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(o,e.config.selector,function(t){return e._leave(t)})}}),this._hideModalHandler=function(){e.element&&e.hide()},t(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a(a({},this.config),{},{trigger:"manual",selector:""}):this._fixTitle()},i._fixTitle=function(){var e=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},i._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?"focus":"hover"]=!0),t(n.getTipElement()).hasClass("show")||"show"===n._hoverState?n._hoverState="show":(clearTimeout(n._timeout),n._hoverState="show",n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){"show"===n._hoverState&&n.show()},n.config.delay.show):n.show())},i._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?"focus":"hover"]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState="out",n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){"out"===n._hoverState&&n.hide()},n.config.delay.hide):n.hide())},i._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},i._getConfig=function(e){var n=t(this.element).data();return Object.keys(n).forEach(function(e){-1!==q.indexOf(e)&&delete n[e]}),"number"==typeof(e=a(a(a({},this.constructor.Default),n),"object"==typeof e&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),u.typeCheckConfig(z,e,this.constructor.DefaultType),e.sanitize&&(e.template=c(e.template,e.whiteList,e.sanitizeFn)),e},i._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},i._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(W);null!==n&&n.length&&e.removeClass(n.join(""))},i._handlePopperPlacementChange=function(e){this.tip=e.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},i._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data("bs.tooltip"),o="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new e(this,o),t(this).data("bs.tooltip",i)),"string"==typeof n)){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},o(e,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return G}},{key:"NAME",get:function(){return z}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return X}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",
get:function(){return V}}]),e}();t.fn[z]=K._jQueryInterface,t.fn[z].Constructor=K,t.fn[z].noConflict=function(){return t.fn[z]=H,K._jQueryInterface};var Q="popover",J=t.fn[Q],Z=new RegExp("(^|\\s)bs-popover\\S+","g"),ee=a(a({},K.Default),{},{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),te=a(a({},K.DefaultType),{},{content:"(string|element|function)"}),ne={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},ie=function(e){function n(){return e.apply(this,arguments)||this}var i,r;r=e,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r;var s=n.prototype;return s.isWithContent=function(){return this.getTitle()||this._getContent()},s.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},s.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},s.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(".popover-body"),n),e.removeClass("fade show")},s._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},s._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(Z);null!==n&&n.length>0&&e.removeClass(n.join(""))},n._jQueryInterface=function(e){return this.each(function(){var i=t(this).data("bs.popover"),o="object"==typeof e?e:null;if((i||!/dispose|hide/.test(e))&&(i||(i=new n(this,o),t(this).data("bs.popover",i)),"string"==typeof e)){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},o(n,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return ee}},{key:"NAME",get:function(){return Q}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return ne}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return te}}]),n}(K);t.fn[Q]=ie._jQueryInterface,t.fn[Q].Constructor=ie,t.fn[Q].noConflict=function(){return t.fn[Q]=J,ie._jQueryInterface};var oe="scrollspy",re=t.fn[oe],se={offset:10,method:"auto",target:""},ae={offset:"number",method:"string",target:"(string|element)"},le=function(){function e(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on("scroll.bs.scrollspy",function(e){return i._process(e)}),this.refresh(),this._process()}var n=e.prototype;return n.refresh=function(){var e=this,n=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?n:this._config.method,o="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(e){var n,r=u.getSelectorFromElement(e);if(r&&(n=document.querySelector(r)),n){var s=n.getBoundingClientRect();if(s.width||s.height)return[t(n)[i]().top+o,r]}return null}).filter(function(e){return e}).sort(function(e,t){return e[0]-t[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},n.dispose=function(){t.removeData(this._element,"bs.scrollspy"),t(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(e){if("string"!=typeof(e=a(a({},se),"object"==typeof e&&e?e:{})).target&&u.isElement(e.target)){var n=t(e.target).attr("id");n||(n=u.getUID(oe),t(e.target).attr("id",n)),e.target="#"+n}return u.typeCheckConfig(oe,e,ae),e},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),n=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&e>=this._offsets[o]&&(void 0===this._offsets[o+1]||e<this._offsets[o+1])&&this._activate(this._targets[o])}},n._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",").map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'}),i=t([].slice.call(document.querySelectorAll(n.join(","))));i.hasClass("dropdown-item")?(i.closest(".dropdown").find(".dropdown-toggle").addClass("active"),i.addClass("active")):(i.addClass("active"),i.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"),i.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")),t(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:e})},n._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(e){return e.classList.contains("active")}).forEach(function(e){return e.classList.remove("active")})},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data("bs.scrollspy");if(i||(i=new e(this,"object"==typeof n&&n),t(this).data("bs.scrollspy",i)),"string"==typeof n){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},o(e,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return se}}]),e}();t(window).on("load.bs.scrollspy.data-api",function(){for(var e=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),n=e.length;n--;){var i=t(e[n]);le._jQueryInterface.call(i,i.data())}}),t.fn[oe]=le._jQueryInterface,t.fn[oe].Constructor=le,t.fn[oe].noConflict=function(){return t.fn[oe]=re,le._jQueryInterface};var ce=t.fn.tab,ue=function(){function e(e){this._element=e}var n=e.prototype;return n.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass("active")||t(this._element).hasClass("disabled"))){var n,i,o=t(this._element).closest(".nav, .list-group")[0],r=u.getSelectorFromElement(this._element);if(o){var s="UL"===o.nodeName||"OL"===o.nodeName?"> li > .active":".active";i=(i=t.makeArray(t(o).find(s)))[i.length-1]}var a=t.Event("hide.bs.tab",{relatedTarget:this._element}),l=t.Event("show.bs.tab",{relatedTarget:i});if(i&&t(i).trigger(a),t(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){r&&(n=document.querySelector(r)),this._activate(this._element,o);var c=function(){var n=t.Event("hidden.bs.tab",{relatedTarget:e._element}),o=t.Event("shown.bs.tab",{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(o)};n?this._activate(n,n.parentNode,c):c()}}},n.dispose=function(){t.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(e,n,i){var o=this,r=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?t(n).children(".active"):t(n).find("> li > .active"))[0],s=i&&r&&t(r).hasClass("fade"),a=function(){return o._transitionComplete(e,r,i)};if(r&&s){var l=u.getTransitionDurationFromElement(r);t(r).removeClass("show").one(u.TRANSITION_END,a).emulateTransitionEnd(l)}else a()},n._transitionComplete=function(e,n,i){if(n){t(n).removeClass("active");var o=t(n.parentNode).find("> .dropdown-menu .active")[0];o&&t(o).removeClass("active"),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(t(e).addClass("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),u.reflow(e),e.classList.contains("fade")&&e.classList.add("show"),e.parentNode&&t(e.parentNode).hasClass("dropdown-menu")){var r=t(e).closest(".dropdown")[0];if(r){var s=[].slice.call(r.querySelectorAll(".dropdown-toggle"));t(s).addClass("active")}e.setAttribute("aria-expanded",!0)}i&&i()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data("bs.tab");if(o||(o=new e(this),i.data("bs.tab",o)),"string"==typeof n){if(void 0===o[n])throw new TypeError('No method named "'+n+'"');o[n]()}})},o(e,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),e}();t(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',function(e){e.preventDefault(),ue._jQueryInterface.call(t(this),"show")}),t.fn.tab=ue._jQueryInterface,t.fn.tab.Constructor=ue,t.fn.tab.noConflict=function(){return t.fn.tab=ce,ue._jQueryInterface};var de=t.fn.toast,he={animation:"boolean",autohide:"boolean",delay:"number"},pe={animation:!0,autohide:!0,delay:500},fe=function(){function e(e,t){this._element=e,this._config=this._getConfig(t),this._timeout=null,this._setListeners()}var n=e.prototype;return n.show=function(){var e=this,n=t.Event("show.bs.toast");if(t(this._element).trigger(n),!n.isDefaultPrevented()){this._config.animation&&this._element.classList.add("fade");var i=function(){e._element.classList.remove("showing"),e._element.classList.add("show"),t(e._element).trigger("shown.bs.toast"),e._config.autohide&&(e._timeout=setTimeout(function(){e.hide()},e._config.delay))};if(this._element.classList.remove("hide"),u.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=u.getTransitionDurationFromElement(this._element);t(this._element).one(u.TRANSITION_END,i).emulateTransitionEnd(o)}else i()}},n.hide=function(){if(this._element.classList.contains("show")){var e=t.Event("hide.bs.toast");t(this._element).trigger(e),e.isDefaultPrevented()||this._close()}},n.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains("show")&&this._element.classList.remove("show"),t(this._element).off("click.dismiss.bs.toast"),t.removeData(this._element,"bs.toast"),this._element=null,this._config=null},n._getConfig=function(e){return e=a(a(a({},pe),t(this._element).data()),"object"==typeof e&&e?e:{}),u.typeCheckConfig("toast",e,this.constructor.DefaultType),e},n._setListeners=function(){var e=this;t(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',function(){return e.hide()})},n._close=function(){var e=this,n=function(){e._element.classList.add("hide"),t(e._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var i=u.getTransitionDurationFromElement(this._element);t(this._element).one(u.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data("bs.toast");if(o||(o=new e(this,"object"==typeof n&&n),i.data("bs.toast",o)),"string"==typeof n){if(void 0===o[n])throw new TypeError('No method named "'+n+'"');o[n](this)}})},o(e,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"DefaultType",get:function(){return he}},{key:"Default",get:function(){return pe}}]),e}();t.fn.toast=fe._jQueryInterface,t.fn.toast.Constructor=fe,t.fn.toast.noConflict=function(){return t.fn.toast=de,fe._jQueryInterface},e.Alert=p,e.Button=g,e.Carousel=x,e.Collapse=E,e.Dropdown=O,e.Modal=L,e.Popover=ie,e.Scrollspy=le,e.Tab=ue,e.Toast=fe,e.Tooltip=K,e.Util=u,Object.defineProperty(e,"__esModule",{value:!0})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):(e=e||self).metisMenu=t(e.jQuery)}(this,function(e){"use strict";function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function n(e){var t=this,n=!1;return i(this).one(r.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||r.triggerTransitionEnd(t)},e),this}e=e&&e.hasOwnProperty("default")?e.default:e;var i,o,r,s=(o="transitionend",r={TRANSITION_END:"mmTransitionEnd",triggerTransitionEnd:function(e){i(e).trigger(o)},supportsTransitionEnd:function(){return Boolean(o)}},(i=e).fn.mmEmulateTransitionEnd=n,i.event.special[r.TRANSITION_END]={bindType:o,delegateType:o,handle:function(e){if(i(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}},r),a="metisMenu",l="metisMenu",c="."+l,u=e.fn[a],d={toggle:!0,preventDefault:!0,triggerElement:"a",parentTrigger:"li",subMenu:"ul"},h={SHOW:"show"+c,SHOWN:"shown"+c,HIDE:"hide"+c,HIDDEN:"hidden"+c,CLICK_DATA_API:"click"+c+".data-api"},p="metismenu",f="mm-active",g="mm-show",m="mm-collapse",v="mm-collapsing",_=function(){function n(e,n){this.element=e,this.config=t({},d,{},n),this.transitioning=null,this.init()}var i=n.prototype;return i.init=function(){var t=this,n=this.config,i=e(this.element);i.addClass(p),i.find(n.parentTrigger+"."+f).children(n.triggerElement).attr("aria-expanded","true"),i.find(n.parentTrigger+"."+f).parents(n.parentTrigger).addClass(f),i.find(n.parentTrigger+"."+f).parents(n.parentTrigger).children(n.triggerElement).attr("aria-expanded","true"),i.find(n.parentTrigger+"."+f).has(n.subMenu).children(n.subMenu).addClass(m+" "+g),i.find(n.parentTrigger).not("."+f).has(n.subMenu).children(n.subMenu).addClass(m),i.find(n.parentTrigger).children(n.triggerElement).on(h.CLICK_DATA_API,function(i){var o=e(this);if("true"!==o.attr("aria-disabled")){n.preventDefault&&"#"===o.attr("href")&&i.preventDefault();var r=o.parent(n.parentTrigger),s=r.siblings(n.parentTrigger),a=s.children(n.triggerElement);r.hasClass(f)?(o.attr("aria-expanded","false"),t.removeActive(r)):(o.attr("aria-expanded","true"),t.setActive(r),n.toggle&&(t.removeActive(s),a.attr("aria-expanded","false"))),n.onTransitionStart&&n.onTransitionStart(i)}})},i.setActive=function(t){e(t).addClass(f);var n=e(t).children(this.config.subMenu);0<n.length&&!n.hasClass(g)&&this.show(n)},i.removeActive=function(t){e(t).removeClass(f);var n=e(t).children(this.config.subMenu+"."+g);0<n.length&&this.hide(n)},i.show=function(t){var n=this;if(!this.transitioning&&!e(t).hasClass(v)){var i=e(t),o=e.Event(h.SHOW);if(i.trigger(o),!o.isDefaultPrevented()){if(i.parent(this.config.parentTrigger).addClass(f),this.config.toggle){var r=i.parent(this.config.parentTrigger).siblings().children(this.config.subMenu+"."+g);this.hide(r)}i.removeClass(m).addClass(v).height(0),this.setTransitioning(!0),i.height(t[0].scrollHeight).one(s.TRANSITION_END,function(){n.config&&n.element&&(i.removeClass(v).addClass(m+" "+g).height(""),n.setTransitioning(!1),i.trigger(h.SHOWN))}).mmEmulateTransitionEnd(350)}}},i.hide=function(t){var n=this;if(!this.transitioning&&e(t).hasClass(g)){var i=e(t),o=e.Event(h.HIDE);if(i.trigger(o),!o.isDefaultPrevented()){i.parent(this.config.parentTrigger).removeClass(f),i.height(i.height())[0].offsetHeight,i.addClass(v).removeClass(m).removeClass(g),this.setTransitioning(!0);var r=function(){n.config&&n.element&&(n.transitioning&&n.config.onTransitionEnd&&n.config.onTransitionEnd(),n.setTransitioning(!1),i.trigger(h.HIDDEN),i.removeClass(v).addClass(m))};0===i.height()||"none"===i.css("display")?r():i.height(0).one(s.TRANSITION_END,r).mmEmulateTransitionEnd(350)}}},i.setTransitioning=function(e){this.transitioning=e},i.dispose=function(){e.removeData(this.element,l),e(this.element).find(this.config.parentTrigger).children(this.config.triggerElement).off(h.CLICK_DATA_API),this.transitioning=null,this.config=null,this.element=null},n.jQueryInterface=function(i){return this.each(function(){var o=e(this),r=o.data(l),s=t({},d,{},o.data(),{},"object"==typeof i&&i?i:{});if(r||(r=new n(this,s),o.data(l,r)),"string"==typeof i){if(void 0===r[i])throw new Error('No method named "'+i+'"');r[i]()}})},n}();return e.fn[a]=_.jQueryInterface,e.fn[a].Constructor=_,e.fn[a].noConflict=function(){return e.fn[a]=u,_.jQueryInterface},_}),function(e,t){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(e.jQuery)}(this,function(e){!function(e){"use strict";function t(t,n){var i=t.nodeName.toLowerCase();if(-1!==e.inArray(i,n))return-1===e.inArray(i,p)||Boolean(t.nodeValue.match(g)||t.nodeValue.match(m));for(var o=e(n).filter(function(e,t){return t instanceof RegExp}),r=0,s=o.length;r<s;r++)if(i.match(o[r]))return!0;return!1}function n(e,n,i){if(i&&"function"==typeof i)return i(e);for(var o=Object.keys(n),r=0,s=e.length;r<s;r++)for(var a=e[r].querySelectorAll("*"),l=0,c=a.length;l<c;l++){var u=a[l],d=u.nodeName.toLowerCase();if(-1!==o.indexOf(d))for(var h=[].slice.call(u.attributes),p=[].concat(n["*"]||[],n[d]||[]),f=0,g=h.length;f<g;f++){var m=h[f];t(m,p)||u.removeAttribute(m.nodeName)}else u.parentNode.removeChild(u)}}function i(e){if(null==this)throw new TypeError;var t=String(this);if(e&&"[object RegExp]"==_.call(e))throw new TypeError;var n=t.length,i=String(e),o=i.length,r=1<arguments.length?arguments[1]:void 0,s=r?Number(r):0;s!=s&&(s=0);var a=Math.min(Math.max(s,0),n);if(n<o+a)return!1;for(var l=-1;++l<o;)if(t.charCodeAt(a+l)!=i.charCodeAt(l))return!1;return!0}function o(e,t){var n,i=e.selectedOptions,o=[];if(t){for(var r=0,s=i.length;r<s;r++)(n=i[r]).disabled||"OPTGROUP"===n.parentNode.tagName&&n.parentNode.disabled||o.push(n);return o}return i}function r(e,t){for(var n,i=[],o=t||e.selectedOptions,r=0,s=o.length;r<s;r++)(n=o[r]).disabled||"OPTGROUP"===n.parentNode.tagName&&n.parentNode.disabled||i.push(n.value||n.text);return e.multiple?i:i.length?i[0]:null}function s(e,t,n,i){for(var o=["display","subtext","tokens"],r=!1,s=0;s<o.length;s++){var a=o[s],l=e[a];if(l&&(l=l.toString(),"display"===a&&(l=l.replace(/<[^>]+>/g,"")),i&&(l=c(l)),l=l.toUpperCase(),r="contains"===n?0<=l.indexOf(t):l.startsWith(t)))break}return r}function a(e){return parseInt(e,10)||0}function l(e){return D[e]}function c(e){return(e=e.toString())&&e.replace(I,l).replace($,"")}function u(e){return T[e]}function d(t){var n,i=arguments,o=t;if([].shift.apply(i),!j.success){try{j.full=(e.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".")}catch(t){Z.BootstrapVersion?j.full=Z.BootstrapVersion.split(" ")[0].split("."):(j.full=[j.major,"0","0"],console.warn("There was an issue retrieving Bootstrap's version. Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.",t))}j.major=j.full[0],j.success=!0}if("4"===j.major){var r=[];Z.DEFAULTS.style===W.BUTTONCLASS&&r.push({name:"style",className:"BUTTONCLASS"}),Z.DEFAULTS.iconBase===W.ICONBASE&&r.push({name:"iconBase",className:"ICONBASE"}),Z.DEFAULTS.tickIcon===W.TICKICON&&r.push({name:"tickIcon",className:"TICKICON"}),W.DIVIDER="dropdown-divider",W.SHOW="show",W.BUTTONCLASS="btn-light",W.POPOVERHEADER="popover-header",W.ICONBASE="",W.TICKICON="bs-ok-default";for(var s=0;s<r.length;s++)t=r[s],Z.DEFAULTS[t.name]=W[t.className]}var a=this.each(function(){var t=e(this);if(t.is("select")){var r=t.data("selectpicker"),s="object"==typeof o&&o;if(r){if(s)for(var a in s)s.hasOwnProperty(a)&&(r.options[a]=s[a])}else{var l=t.data();for(var c in l)l.hasOwnProperty(c)&&-1!==e.inArray(c,h)&&delete l[c];var u=e.extend({},Z.DEFAULTS,e.fn.selectpicker.defaults||{},l,s);u.template=e.extend({},Z.DEFAULTS.template,e.fn.selectpicker.defaults?e.fn.selectpicker.defaults.template:{},l.template,s.template),t.data("selectpicker",r=new Z(this,u))}"string"==typeof o&&(n=r[o]instanceof Function?r[o].apply(r,i):r.options[o])}});return void 0!==n?n:a}var h=["sanitize","whiteList","sanitizeFn"],p=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],f={"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},g=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,m=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;"classList"in document.createElement("_")||function(t){if("Element"in t){var n="classList",i="prototype",o=t.Element[i],r=Object,s=function(){var t=e(this);return{add:function(e){return e=Array.prototype.slice.call(arguments).join(" "),t.addClass(e)},remove:function(e){return e=Array.prototype.slice.call(arguments).join(" "),t.removeClass(e)},toggle:function(e,n){return t.toggleClass(e,n)},contains:function(e){return t.hasClass(e)}}};if(r.defineProperty){var a={get:s,enumerable:!0,configurable:!0};try{r.defineProperty(o,n,a)}catch(t){void 0!==t.number&&-2146823252!==t.number||(a.enumerable=!1,r.defineProperty(o,n,a))}}else r[i].__defineGetter__&&o.__defineGetter__(n,s)}}(window);var v,_,y=document.createElement("_");if(y.classList.add("c1","c2"),!y.classList.contains("c2")){var b=DOMTokenList.prototype.add,w=DOMTokenList.prototype.remove;DOMTokenList.prototype.add=function(){Array.prototype.forEach.call(arguments,b.bind(this))},DOMTokenList.prototype.remove=function(){Array.prototype.forEach.call(arguments,w.bind(this))}}if(y.classList.toggle("c3",!1),y.classList.contains("c3")){var x=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:x.call(this,e)}}y=null,String.prototype.startsWith||(v=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(e){}return n}(),_={}.toString,v?v(String.prototype,"startsWith",{value:i,configurable:!0,writable:!0}):String.prototype.startsWith=i),Object.keys||(Object.keys=function(e,t,n){for(t in n=[],e)n.hasOwnProperty.call(e,t)&&n.push(t);return n}),HTMLSelectElement&&!HTMLSelectElement.prototype.hasOwnProperty("selectedOptions")&&Object.defineProperty(HTMLSelectElement.prototype,"selectedOptions",{get:function(){return this.querySelectorAll(":checked")}});var k={useDefault:!1,_set:e.valHooks.select.set};e.valHooks.select.set=function(t,n){return n&&!k.useDefault&&e(t).data("selected",!0),k._set.apply(this,arguments)};var C=null,S=function(){try{return new Event("change"),!0}catch(e){return!1}}();e.fn.triggerNative=function(e){var t,n=this[0];n.dispatchEvent?(S?t=new Event(e,{bubbles:!0}):(t=document.createEvent("Event")).initEvent(e,!0,!1),n.dispatchEvent(t)):n.fireEvent?((t=document.createEventObject()).eventType=e,n.fireEvent("on"+e,t)):this.trigger(e)};var T,E,P,A,D={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},I=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g"),O=(T={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},E="(?:"+Object.keys(T).join("|")+")",P=RegExp(E),A=RegExp(E,"g"),function(e){return e=null==e?"":""+e,P.test(e)?e.replace(A,u):e}),M={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},F=27,R=13,L=32,N=9,B=38,U=40,j={success:!1,major:"3"};try{j.full=(e.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split("."),j.major=j.full[0],j.success=!0}catch(f){}var z=0,H=".bs.select",W={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},q={MENU:"."+W.MENU},V={span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" "),fragment:document.createDocumentFragment()};V.a.setAttribute("role","option"),V.subtext.className="text-muted",V.text=V.span.cloneNode(!1),V.text.className="text",V.checkMark=V.span.cloneNode(!1);var Y=new RegExp(B+"|"+U),G=new RegExp("^"+N+"$|"+F),X=function(e,t,n){var i=V.li.cloneNode(!1);return e&&(1===e.nodeType||11===e.nodeType?i.appendChild(e):i.innerHTML=e),void 0!==t&&""!==t&&(i.className=t),null!=n&&i.classList.add("optgroup-"+n),i},K=function(e,t,n){var i=V.a.cloneNode(!0);return e&&(11===e.nodeType?i.appendChild(e):i.insertAdjacentHTML("beforeend",e)),void 0!==t&&""!==t&&(i.className=t),"4"===j.major&&i.classList.add("dropdown-item"),n&&i.setAttribute("style",n),i},Q=function(e,t){var n,i,o=V.text.cloneNode(!1);if(e.content)o.innerHTML=e.content;else{if(o.textContent=e.text,e.icon){var r=V.whitespace.cloneNode(!1);(i=(!0===t?V.i:V.span).cloneNode(!1)).className=e.iconBase+" "+e.icon,V.fragment.appendChild(i),V.fragment.appendChild(r)}e.subtext&&((n=V.subtext.cloneNode(!1)).textContent=e.subtext,o.appendChild(n))}if(!0===t)for(;0<o.childNodes.length;)V.fragment.appendChild(o.childNodes[0]);else V.fragment.appendChild(o);return V.fragment},J=function(e){var t,n,i=V.text.cloneNode(!1);if(i.innerHTML=e.label,e.icon){var o=V.whitespace.cloneNode(!1);(n=V.span.cloneNode(!1)).className=e.iconBase+" "+e.icon,V.fragment.appendChild(n),V.fragment.appendChild(o)}return e.subtext&&((t=V.subtext.cloneNode(!1)).textContent=e.subtext,i.appendChild(t)),V.fragment.appendChild(i),V.fragment},Z=function(t,n){var i=this;k.useDefault||(e.valHooks.select.set=k._set,k.useDefault=!0),this.$element=e(t),this.$newElement=null,this.$button=null,this.$menu=null,this.options=n,this.selectpicker={main:{},search:{},current:{},view:{},keydown:{keyHistory:"",resetKeyHistory:{start:function(){return setTimeout(function(){i.selectpicker.keydown.keyHistory=""},800)}}}},null===this.options.title&&(this.options.title=this.$element.attr("title"));var o=this.options.windowPadding;"number"==typeof o&&(this.options.windowPadding=[o,o,o,o]),this.val=Z.prototype.val,this.render=Z.prototype.render,this.refresh=Z.prototype.refresh,this.setStyle=Z.prototype.setStyle,this.selectAll=Z.prototype.selectAll,this.deselectAll=Z.prototype.deselectAll,this.destroy=Z.prototype.destroy,this.remove=Z.prototype.remove,this.show=Z.prototype.show,this.hide=Z.prototype.hide,this.init()};Z.VERSION="1.13.12",Z.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(e,t){return 1==e?"{0} item selected":"{0} items selected"},maxOptionsText:function(e,t){return[1==e?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==t?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:W.BUTTONCLASS,size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:W.ICONBASE,tickIcon:W.TICKICON,showTick:!1,template:{caret:'<span class="caret"></span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:f},Z.prototype={constructor:Z,init:function(){var e=this,t=this.$element.attr("id");z++,this.selectId="bs-select-"+z,this.$element[0].classList.add("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$element[0].classList.contains("show-tick")&&(this.options.showTick=!0),this.$newElement=this.createDropdown(),this.$element.after(this.$newElement).prependTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(q.MENU),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element[0].classList.remove("bs-select-hidden"),!0===this.options.dropdownAlignRight&&this.$menu[0].classList.add(W.MENURIGHT),void 0!==t&&this.$button.attr("data-id",t),this.checkDisabled(),this.clickListener(),this.options.liveSearch?(this.liveSearchListener(),this.focusedParent=this.$searchbox[0]):this.focusedParent=this.$menuInner[0],this.setStyle(),this.render(),this.setWidth(),this.options.container?this.selectPosition():this.$element.on("hide"+H,function(){if(e.isVirtual()){var t=e.$menuInner[0],n=t.firstChild.cloneNode(!1);t.replaceChild(n,t.firstChild),t.scrollTop=0}}),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(t){e.$element.trigger("hide"+H,t)},"hidden.bs.dropdown":function(t){e.$element.trigger("hidden"+H,t)},"show.bs.dropdown":function(t){e.$element.trigger("show"+H,t)},"shown.bs.dropdown":function(t){e.$element.trigger("shown"+H,t)}}),e.$element[0].hasAttribute("required")&&this.$element.on("invalid"+H,function(){e.$button[0].classList.add("bs-invalid"),e.$element.on("shown"+H+".invalid",function(){e.$element.val(e.$element.val()).off("shown"+H+".invalid")}).on("rendered"+H,function(){this.validity.valid&&e.$button[0].classList.remove("bs-invalid"),e.$element.off("rendered"+H)}),e.$button.on("blur"+H,function(){e.$element.trigger("focus").trigger("blur"),e.$button.off("blur"+H)})}),setTimeout(function(){e.createLi(),e.$element.trigger("loaded"+H)})},createDropdown:function(){var t=this.multiple||this.options.showTick?" show-tick":"",n=this.multiple?' aria-multiselectable="true"':"",i="",o=this.autofocus?" autofocus":""
;j.major<4&&this.$element.parent().hasClass("input-group")&&(i=" input-group-btn");var r,s="",a="",l="",c="";return this.options.header&&(s='<div class="'+W.POPOVERHEADER+'"><button type="button" class="close" aria-hidden="true">&times;</button>'+this.options.header+"</div>"),this.options.liveSearch&&(a='<div class="bs-searchbox"><input type="search" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+O(this.options.liveSearchPlaceholder)+'"')+' role="combobox" aria-label="Search" aria-controls="'+this.selectId+'" aria-autocomplete="list"></div>'),this.multiple&&this.options.actionsBox&&(l='<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn '+W.BUTTONCLASS+'">'+this.options.selectAllText+'</button><button type="button" class="actions-btn bs-deselect-all btn '+W.BUTTONCLASS+'">'+this.options.deselectAllText+"</button></div></div>"),this.multiple&&this.options.doneButton&&(c='<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm '+W.BUTTONCLASS+'">'+this.options.doneButtonText+"</button></div></div>"),r='<div class="dropdown bootstrap-select'+t+i+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" '+("static"===this.options.display?'data-display="static"':"")+'data-toggle="dropdown"'+o+' role="combobox" aria-owns="'+this.selectId+'" aria-haspopup="listbox" aria-expanded="false"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner"></div></div> </div>'+("4"===j.major?"":'<span class="bs-caret">'+this.options.template.caret+"</span>")+'</button><div class="'+W.MENU+" "+("4"===j.major?"":W.SHOW)+'">'+s+a+l+'<div class="inner '+W.SHOW+'" role="listbox" id="'+this.selectId+'" tabindex="-1" '+n+'><ul class="'+W.MENU+" inner "+("4"===j.major?W.SHOW:"")+'" role="presentation"></ul></div>'+c+"</div></div>",e(r)},setPositionData:function(){this.selectpicker.view.canHighlight=[];for(var e=this.selectpicker.view.size=0;e<this.selectpicker.current.data.length;e++){var t=this.selectpicker.current.data[e],n=!0;"divider"===t.type?(n=!1,t.height=this.sizeInfo.dividerHeight):"optgroup-label"===t.type?(n=!1,t.height=this.sizeInfo.dropdownHeaderHeight):t.height=this.sizeInfo.liHeight,t.disabled&&(n=!1),this.selectpicker.view.canHighlight.push(n),n&&(this.selectpicker.view.size++,t.posinset=this.selectpicker.view.size),t.position=(0===e?0:this.selectpicker.current.data[e-1].position)+t.height}},isVirtual:function(){return!1!==this.options.virtualScroll&&this.selectpicker.main.elements.length>=this.options.virtualScroll||!0===this.options.virtualScroll},createView:function(t,i,o){function r(e,i){var o,r,c,d,h,p,f,g,m=l.selectpicker.current.elements.length,v=[],_=!0,y=l.isVirtual();l.selectpicker.view.scrollTop=e,o=Math.ceil(l.sizeInfo.menuInnerHeight/l.sizeInfo.liHeight*1.5),r=Math.round(m/o)||1;for(var b=0;b<r;b++){var w=(b+1)*o;if(b===r-1&&(w=m),v[b]=[b*o+(b?1:0),w],!m)break;void 0===h&&e-1<=l.selectpicker.current.data[w-1].position-l.sizeInfo.menuInnerHeight&&(h=b)}if(void 0===h&&(h=0),p=[l.selectpicker.view.position0,l.selectpicker.view.position1],c=Math.max(0,h-1),d=Math.min(r-1,h+1),l.selectpicker.view.position0=!1===y?0:Math.max(0,v[c][0])||0,l.selectpicker.view.position1=!1===y?m:Math.min(m,v[d][1])||0,f=p[0]!==l.selectpicker.view.position0||p[1]!==l.selectpicker.view.position1,void 0!==l.activeIndex&&(a=l.selectpicker.main.elements[l.prevActiveIndex],u=l.selectpicker.main.elements[l.activeIndex],s=l.selectpicker.main.elements[l.selectedIndex],i&&(l.activeIndex!==l.selectedIndex&&l.defocusItem(u),l.activeIndex=void 0),l.activeIndex&&l.activeIndex!==l.selectedIndex&&l.defocusItem(s)),void 0!==l.prevActiveIndex&&l.prevActiveIndex!==l.activeIndex&&l.prevActiveIndex!==l.selectedIndex&&l.defocusItem(a),(i||f)&&(g=l.selectpicker.view.visibleElements?l.selectpicker.view.visibleElements.slice():[],l.selectpicker.view.visibleElements=!1===y?l.selectpicker.current.elements:l.selectpicker.current.elements.slice(l.selectpicker.view.position0,l.selectpicker.view.position1),l.setOptionStatus(),(t||!1===y&&i)&&(_=!function(e,t){return e.length===t.length&&e.every(function(e,n){return e===t[n]})}(g,l.selectpicker.view.visibleElements)),(i||!0===y)&&_)){var x,k,C=l.$menuInner[0],S=document.createDocumentFragment(),T=C.firstChild.cloneNode(!1),E=l.selectpicker.view.visibleElements,P=[];C.replaceChild(T,C.firstChild),b=0;for(var A=E.length;b<A;b++){var D,I,$=E[b];l.options.sanitize&&(D=$.lastChild)&&(I=l.selectpicker.current.data[b+l.selectpicker.view.position0])&&I.content&&!I.sanitized&&(P.push(D),I.sanitized=!0),S.appendChild($)}if(l.options.sanitize&&P.length&&n(P,l.options.whiteList,l.options.sanitizeFn),!0===y?(x=0===l.selectpicker.view.position0?0:l.selectpicker.current.data[l.selectpicker.view.position0-1].position,k=l.selectpicker.view.position1>m-1?0:l.selectpicker.current.data[m-1].position-l.selectpicker.current.data[l.selectpicker.view.position1-1].position,C.firstChild.style.marginTop=x+"px",C.firstChild.style.marginBottom=k+"px"):(C.firstChild.style.marginTop=0,C.firstChild.style.marginBottom=0),C.firstChild.appendChild(S),!0===y&&l.sizeInfo.hasScrollBar){var O=C.firstChild.offsetWidth;if(i&&O<l.sizeInfo.menuInnerInnerWidth&&l.sizeInfo.totalMenuWidth>l.sizeInfo.selectWidth)C.firstChild.style.minWidth=l.sizeInfo.menuInnerInnerWidth+"px";else if(O>l.sizeInfo.menuInnerInnerWidth){l.$menu[0].style.minWidth=0;var M=C.firstChild.offsetWidth;M>l.sizeInfo.menuInnerInnerWidth&&(l.sizeInfo.menuInnerInnerWidth=M,C.firstChild.style.minWidth=l.sizeInfo.menuInnerInnerWidth+"px"),l.$menu[0].style.minWidth=""}}}if(l.prevActiveIndex=l.activeIndex,l.options.liveSearch){if(t&&i){var F,R=0;l.selectpicker.view.canHighlight[R]||(R=1+l.selectpicker.view.canHighlight.slice(1).indexOf(!0)),F=l.selectpicker.view.visibleElements[R],l.defocusItem(l.selectpicker.view.currentActive),l.activeIndex=(l.selectpicker.current.data[R]||{}).index,l.focusItem(F)}}else l.$menuInner.trigger("focus")}var s,a,l=this,c=0,u=[];if(this.selectpicker.current=t?this.selectpicker.search:this.selectpicker.main,this.setPositionData(),i)if(o)c=this.$menuInner[0].scrollTop;else if(!l.multiple){var d=l.$element[0],h=(d.options[d.selectedIndex]||{}).liIndex;if("number"==typeof h&&!1!==l.options.size){var p=l.selectpicker.main.data[h],f=p&&p.position;f&&(c=f-(l.sizeInfo.menuInnerHeight+l.sizeInfo.liHeight)/2)}}r(c,!0),this.$menuInner.off("scroll.createView").on("scroll.createView",function(e,t){l.noScroll||r(this.scrollTop,t),l.noScroll=!1}),e(window).off("resize"+H+"."+this.selectId+".createView").on("resize"+H+"."+this.selectId+".createView",function(){l.$newElement.hasClass(W.SHOW)&&r(l.$menuInner[0].scrollTop)})},focusItem:function(e,t,n){if(e){t=t||this.selectpicker.main.data[this.activeIndex];var i=e.firstChild;i&&(i.setAttribute("aria-setsize",this.selectpicker.view.size),i.setAttribute("aria-posinset",t.posinset),!0!==n&&(this.focusedParent.setAttribute("aria-activedescendant",i.id),e.classList.add("active"),i.classList.add("active")))}},defocusItem:function(e){e&&(e.classList.remove("active"),e.firstChild&&e.firstChild.classList.remove("active"))},setPlaceholder:function(){var t=!1;if(this.options.title&&!this.multiple){this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option")),t=!0;var n=this.$element[0],i=!1,o=!this.selectpicker.view.titleOption.parentNode;o&&(this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="",i=void 0===e(n.options[n.selectedIndex]).attr("selected")&&void 0===this.$element.data("selected")),!o&&0===this.selectpicker.view.titleOption.index||n.insertBefore(this.selectpicker.view.titleOption,n.firstChild),i&&(n.selectedIndex=0)}return t},createLi:function(){function e(e){var t=a[a.length-1];t&&"divider"===t.type&&(t.optID||e.optID)||((e=e||{}).type="divider",s.push(X(!1,W.DIVIDER,e.optID?e.optID+"div":void 0)),a.push(e))}function t(t,n){if((n=n||{}).divider="true"===t.getAttribute("data-divider"),n.divider)e({optID:n.optID});else{var r=a.length,c=t.style.cssText,u=c?O(c):"",d=(t.className||"")+(n.optgroupClass||"");n.optID&&(d="opt "+d),n.text=t.textContent,n.content=t.getAttribute("data-content"),n.tokens=t.getAttribute("data-tokens"),n.subtext=t.getAttribute("data-subtext"),n.icon=t.getAttribute("data-icon"),n.iconBase=o;var h=Q(n),p=X(K(h,d,u),"",n.optID);p.firstChild&&(p.firstChild.id=i.selectId+"-"+r),s.push(p),t.liIndex=r,n.display=n.content||n.text,n.type="option",n.index=r,n.option=t,n.disabled=n.disabled||t.disabled,a.push(n);var f=0;n.display&&(f+=n.display.length),n.subtext&&(f+=n.subtext.length),n.icon&&(f+=1),l<f&&(l=f,i.selectpicker.view.widestOption=s[s.length-1])}}function n(n,i){var l=i[n],u=i[n-1],d=i[n+1],h=l.querySelectorAll("option"+r);if(h.length){var p,f,g={label:O(l.label),subtext:l.getAttribute("data-subtext"),icon:l.getAttribute("data-icon"),iconBase:o},m=" "+(l.className||"");c++,u&&e({optID:c});var v=J(g);s.push(X(v,"dropdown-header"+m,c)),a.push({display:g.label,subtext:g.subtext,type:"optgroup-label",optID:c});for(var _=0,y=h.length;_<y;_++){var b=h[_];0===_&&(f=(p=a.length-1)+y),t(b,{headerIndex:p,lastIndex:f,optID:c,optgroupClass:m,disabled:l.disabled})}d&&e({optID:c})}}var i=this,o=this.options.iconBase,r=':not([hidden]):not([data-hidden="true"])',s=[],a=[],l=0,c=0,u=this.setPlaceholder()?1:0;this.options.hideDisabled&&(r+=":not(:disabled)"),!i.options.showTick&&!i.multiple||V.checkMark.parentNode||(V.checkMark.className=o+" "+i.options.tickIcon+" check-mark",V.a.appendChild(V.checkMark));for(var d=this.$element[0].querySelectorAll("select > *"+r),h=d.length;u<h;u++){var p=d[u];"OPTGROUP"!==p.tagName?t(p,{}):n(u,d)}this.selectpicker.main.elements=s,this.selectpicker.main.data=a,this.selectpicker.current=this.selectpicker.main},findLis:function(){return this.$menuInner.find(".inner > li")},render:function(){this.setPlaceholder();var e,t=this,i=this.$element[0],s=o(i,this.options.hideDisabled),a=s.length,l=this.$button[0],c=l.querySelector(".filter-option-inner-inner"),u=document.createTextNode(this.options.multipleSeparator),d=V.fragment.cloneNode(!1),h=!1;if(l.classList.toggle("bs-placeholder",t.multiple?!a:!r(i,s)),this.tabIndex(),"static"===this.options.selectedTextFormat)d=Q({text:this.options.title},!0);else if(!1===(this.multiple&&-1!==this.options.selectedTextFormat.indexOf("count")&&1<a&&(1<(e=this.options.selectedTextFormat.split(">")).length&&a>e[1]||1===e.length&&2<=a))){for(var p=0;p<a&&p<50;p++){var f=s[p],g={},m={content:f.getAttribute("data-content"),subtext:f.getAttribute("data-subtext"),icon:f.getAttribute("data-icon")};this.multiple&&0<p&&d.appendChild(u.cloneNode(!1)),f.title?g.text=f.title:m.content&&t.options.showContent?(g.content=m.content.toString(),h=!0):(t.options.showIcon&&(g.icon=m.icon,g.iconBase=this.options.iconBase),t.options.showSubtext&&!t.multiple&&m.subtext&&(g.subtext=" "+m.subtext),g.text=f.textContent.trim()),d.appendChild(Q(g,!0))}49<a&&d.appendChild(document.createTextNode("..."))}else{var v=':not([hidden]):not([data-hidden="true"]):not([data-divider="true"])';this.options.hideDisabled&&(v+=":not(:disabled)");var _=this.$element[0].querySelectorAll("select > option"+v+", optgroup"+v+" option"+v).length,y="function"==typeof this.options.countSelectedText?this.options.countSelectedText(a,_):this.options.countSelectedText;d=Q({text:y.replace("{0}",a.toString()).replace("{1}",_.toString())},!0)}if(null==this.options.title&&(this.options.title=this.$element.attr("title")),d.childNodes.length||(d=Q({text:void 0!==this.options.title?this.options.title:this.options.noneSelectedText},!0)),l.title=d.textContent.replace(/<[^>]*>?/g,"").trim(),this.options.sanitize&&h&&n([d],t.options.whiteList,t.options.sanitizeFn),c.innerHTML="",c.appendChild(d),j.major<4&&this.$newElement[0].classList.contains("bs3-has-addon")){var b=l.querySelector(".filter-expand"),w=c.cloneNode(!0);w.className="filter-expand",b?l.replaceChild(w,b):l.appendChild(w)}this.$element.trigger("rendered"+H)},setStyle:function(e,t){var n,i=this.$button[0],o=this.$newElement[0],r=this.options.style.trim();this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,"")),j.major<4&&(o.classList.add("bs3"),o.parentNode.classList.contains("input-group")&&(o.previousElementSibling||o.nextElementSibling)&&(o.previousElementSibling||o.nextElementSibling).classList.contains("input-group-addon")&&o.classList.add("bs3-has-addon")),n=e?e.trim():r,"add"==t?n&&i.classList.add.apply(i.classList,n.split(" ")):"remove"==t?n&&i.classList.remove.apply(i.classList,n.split(" ")):(r&&i.classList.remove.apply(i.classList,r.split(" ")),n&&i.classList.add.apply(i.classList,n.split(" ")))},liHeight:function(t){if(t||!1!==this.options.size&&!this.sizeInfo){this.sizeInfo||(this.sizeInfo={});var n=document.createElement("div"),i=document.createElement("div"),o=document.createElement("div"),r=document.createElement("ul"),s=document.createElement("li"),l=document.createElement("li"),c=document.createElement("li"),u=document.createElement("a"),d=document.createElement("span"),h=this.options.header&&0<this.$menu.find("."+W.POPOVERHEADER).length?this.$menu.find("."+W.POPOVERHEADER)[0].cloneNode(!0):null,p=this.options.liveSearch?document.createElement("div"):null,f=this.options.actionsBox&&this.multiple&&0<this.$menu.find(".bs-actionsbox").length?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,g=this.options.doneButton&&this.multiple&&0<this.$menu.find(".bs-donebutton").length?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null,m=this.$element.find("option")[0];if(this.sizeInfo.selectWidth=this.$newElement[0].offsetWidth,d.className="text",u.className="dropdown-item "+(m?m.className:""),n.className=this.$menu[0].parentNode.className+" "+W.SHOW,n.style.width=0,"auto"===this.options.width&&(i.style.minWidth=0),i.className=W.MENU+" "+W.SHOW,o.className="inner "+W.SHOW,r.className=W.MENU+" inner "+("4"===j.major?W.SHOW:""),s.className=W.DIVIDER,l.className="dropdown-header",d.appendChild(document.createTextNode("​")),u.appendChild(d),c.appendChild(u),l.appendChild(d.cloneNode(!0)),this.selectpicker.view.widestOption&&r.appendChild(this.selectpicker.view.widestOption.cloneNode(!0)),r.appendChild(c),r.appendChild(s),r.appendChild(l),h&&i.appendChild(h),p){var v=document.createElement("input");p.className="bs-searchbox",v.className="form-control",p.appendChild(v),i.appendChild(p)}f&&i.appendChild(f),o.appendChild(r),i.appendChild(o),g&&i.appendChild(g),n.appendChild(i),document.body.appendChild(n);var _,y=c.offsetHeight,b=l?l.offsetHeight:0,w=h?h.offsetHeight:0,x=p?p.offsetHeight:0,k=f?f.offsetHeight:0,C=g?g.offsetHeight:0,S=e(s).outerHeight(!0),T=!!window.getComputedStyle&&window.getComputedStyle(i),E=i.offsetWidth,P=T?null:e(i),A={vert:a(T?T.paddingTop:P.css("paddingTop"))+a(T?T.paddingBottom:P.css("paddingBottom"))+a(T?T.borderTopWidth:P.css("borderTopWidth"))+a(T?T.borderBottomWidth:P.css("borderBottomWidth")),horiz:a(T?T.paddingLeft:P.css("paddingLeft"))+a(T?T.paddingRight:P.css("paddingRight"))+a(T?T.borderLeftWidth:P.css("borderLeftWidth"))+a(T?T.borderRightWidth:P.css("borderRightWidth"))},D={vert:A.vert+a(T?T.marginTop:P.css("marginTop"))+a(T?T.marginBottom:P.css("marginBottom"))+2,horiz:A.horiz+a(T?T.marginLeft:P.css("marginLeft"))+a(T?T.marginRight:P.css("marginRight"))+2};o.style.overflowY="scroll",_=i.offsetWidth-E,document.body.removeChild(n),this.sizeInfo.liHeight=y,this.sizeInfo.dropdownHeaderHeight=b,this.sizeInfo.headerHeight=w,this.sizeInfo.searchHeight=x,this.sizeInfo.actionsHeight=k,this.sizeInfo.doneButtonHeight=C,this.sizeInfo.dividerHeight=S,this.sizeInfo.menuPadding=A,this.sizeInfo.menuExtras=D,this.sizeInfo.menuWidth=E,this.sizeInfo.menuInnerInnerWidth=E-A.horiz,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth,this.sizeInfo.scrollBarWidth=_,this.sizeInfo.selectHeight=this.$newElement[0].offsetHeight,this.setPositionData()}},getSelectPosition:function(){var t,n=e(window),i=this.$newElement.offset(),o=e(this.options.container);this.options.container&&o.length&&!o.is("body")?((t=o.offset()).top+=parseInt(o.css("borderTopWidth")),t.left+=parseInt(o.css("borderLeftWidth"))):t={top:0,left:0};var r=this.options.windowPadding;this.sizeInfo.selectOffsetTop=i.top-t.top-n.scrollTop(),this.sizeInfo.selectOffsetBot=n.height()-this.sizeInfo.selectOffsetTop-this.sizeInfo.selectHeight-t.top-r[2],this.sizeInfo.selectOffsetLeft=i.left-t.left-n.scrollLeft(),this.sizeInfo.selectOffsetRight=n.width()-this.sizeInfo.selectOffsetLeft-this.sizeInfo.selectWidth-t.left-r[1],this.sizeInfo.selectOffsetTop-=r[0],this.sizeInfo.selectOffsetLeft-=r[3]},setMenuSize:function(e){this.getSelectPosition();var t,n,i,o,r,s,a,l=this.sizeInfo.selectWidth,c=this.sizeInfo.liHeight,u=this.sizeInfo.headerHeight,d=this.sizeInfo.searchHeight,h=this.sizeInfo.actionsHeight,p=this.sizeInfo.doneButtonHeight,f=this.sizeInfo.dividerHeight,g=this.sizeInfo.menuPadding,m=0;if(this.options.dropupAuto&&(a=c*this.selectpicker.current.elements.length+g.vert,this.$newElement.toggleClass(W.DROPUP,this.sizeInfo.selectOffsetTop-this.sizeInfo.selectOffsetBot>this.sizeInfo.menuExtras.vert&&a+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot)),"auto"===this.options.size)o=3<this.selectpicker.current.elements.length?3*this.sizeInfo.liHeight+this.sizeInfo.menuExtras.vert-2:0,n=this.sizeInfo.selectOffsetBot-this.sizeInfo.menuExtras.vert,i=o+u+d+h+p,s=Math.max(o-g.vert,0),this.$newElement.hasClass(W.DROPUP)&&(n=this.sizeInfo.selectOffsetTop-this.sizeInfo.menuExtras.vert),t=(r=n)-u-d-h-p-g.vert;else if(this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size){for(var v=0;v<this.options.size;v++)"divider"===this.selectpicker.current.data[v].type&&m++;t=(n=c*this.options.size+m*f+g.vert)-g.vert,r=n+u+d+h+p,i=s=""}this.$menu.css({"max-height":r+"px",overflow:"hidden","min-height":i+"px"}),this.$menuInner.css({"max-height":t+"px","overflow-y":"auto","min-height":s+"px"}),this.sizeInfo.menuInnerHeight=Math.max(t,1),this.selectpicker.current.data.length&&this.selectpicker.current.data[this.selectpicker.current.data.length-1].position>this.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth),"auto"===this.options.dropdownAlignRight&&this.$menu.toggleClass(W.MENURIGHT,this.sizeInfo.selectOffsetLeft>this.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRight<this.sizeInfo.totalMenuWidth-l),this.dropdown&&this.dropdown._popper&&this.dropdown._popper.update()},setSize:function(t){if(this.liHeight(t),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var n=this,i=e(window);this.setMenuSize(),this.options.liveSearch&&this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",function(){return n.setMenuSize()}),"auto"===this.options.size?i.off("resize"+H+"."+this.selectId+".setMenuSize scroll"+H+"."+this.selectId+".setMenuSize").on("resize"+H+"."+this.selectId+".setMenuSize scroll"+H+"."+this.selectId+".setMenuSize",function(){return n.setMenuSize()}):this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size&&i.off("resize"+H+"."+this.selectId+".setMenuSize scroll"+H+"."+this.selectId+".setMenuSize"),n.createView(!1,!0,t)}},setWidth:function(){var e=this;"auto"===this.options.width?requestAnimationFrame(function(){e.$menu.css("min-width","0"),e.$element.on("loaded"+H,function(){e.liHeight(),e.setMenuSize();var t=e.$newElement.clone().appendTo("body"),n=t.css("width","auto").children("button").outerWidth();t.remove(),e.sizeInfo.selectWidth=Math.max(e.sizeInfo.totalMenuWidth,n),e.$newElement.css("width",e.sizeInfo.selectWidth+"px")})}):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width","")),this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement[0].classList.remove("fit-width")},selectPosition:function(){function t(t){var a={},l=r.options.display||!!e.fn.dropdown.Constructor.Default&&e.fn.dropdown.Constructor.Default.display;r.$bsContainer.addClass(t.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(W.DROPUP,t.hasClass(W.DROPUP)),n=t.offset(),s.is("body")?i={top:0,left:0}:((i=s.offset()).top+=parseInt(s.css("borderTopWidth"))-s.scrollTop(),i.left+=parseInt(s.css("borderLeftWidth"))-s.scrollLeft()),o=t.hasClass(W.DROPUP)?0:t[0].offsetHeight,(j.major<4||"static"===l)&&(a.top=n.top-i.top+o,a.left=n.left-i.left),a.width=t[0].offsetWidth,r.$bsContainer.css(a)}this.$bsContainer=e('<div class="bs-container" />');var n,i,o,r=this,s=e(this.options.container);this.$button.on("click.bs.dropdown.data-api",function(){r.isDisabled()||(t(r.$newElement),r.$bsContainer.appendTo(r.options.container).toggleClass(W.SHOW,!r.$button.hasClass(W.SHOW)).append(r.$menu))}),e(window).off("resize"+H+"."+this.selectId+" scroll"+H+"."+this.selectId).on("resize"+H+"."+this.selectId+" scroll"+H+"."+this.selectId,function(){r.$newElement.hasClass(W.SHOW)&&t(r.$newElement)}),this.$element.on("hide"+H,function(){r.$menu.data("height",r.$menu.height()),r.$bsContainer.detach()})},setOptionStatus:function(e){var t=this;if(t.noScroll=!1,t.selectpicker.view.visibleElements&&t.selectpicker.view.visibleElements.length)for(var n=0;n<t.selectpicker.view.visibleElements.length;n++){var i=t.selectpicker.current.data[n+t.selectpicker.view.position0],o=i.option;o&&(!0!==e&&t.setDisabled(i.index,i.disabled),t.setSelected(i.index,o.selected))}},setSelected:function(e,t){var n,i,o=this.selectpicker.main.elements[e],r=this.selectpicker.main.data[e],s=void 0!==this.activeIndex,a=this.activeIndex===e||t&&!this.multiple&&!s;r.selected=t,i=o.firstChild,t&&(this.selectedIndex=e),o.classList.toggle("selected",t),a?(this.focusItem(o,r),this.selectpicker.view.currentActive=o,this.activeIndex=e):this.defocusItem(o),i&&(i.classList.toggle("selected",t),t?i.setAttribute("aria-selected",!0):this.multiple?i.setAttribute("aria-selected",!1):i.removeAttribute("aria-selected")),a||s||!t||void 0===this.prevActiveIndex||(n=this.selectpicker.main.elements[this.prevActiveIndex],this.defocusItem(n))},setDisabled:function(e,t){var n,i=this.selectpicker.main.elements[e];this.selectpicker.main.data[e].disabled=t,n=i.firstChild,i.classList.toggle(W.DISABLED,t),n&&("4"===j.major&&n.classList.toggle(W.DISABLED,t),t?(n.setAttribute("aria-disabled",t),n.setAttribute("tabindex",-1)):(n.removeAttribute("aria-disabled"),n.setAttribute("tabindex",0)))},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){this.isDisabled()?(this.$newElement[0].classList.add(W.DISABLED),this.$button.addClass(W.DISABLED).attr("tabindex",-1).attr("aria-disabled",!0)):(this.$button[0].classList.contains(W.DISABLED)&&(this.$newElement[0].classList.remove(W.DISABLED),this.$button.removeClass(W.DISABLED).attr("aria-disabled",!1)),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex"))},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&-98!==this.$element.attr("tabindex")&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex"))),this.$element.attr("tabindex",-98)},clickListener:function(){function t(){i.options.liveSearch?i.$searchbox.trigger("focus"):i.$menuInner.trigger("focus")}function n(){i.dropdown&&i.dropdown._popper&&i.dropdown._popper.state.isCreated?t():requestAnimationFrame(n)}var i=this,s=e(document);s.data("spaceSelect",!1),this.$button.on("keyup",function(e){/(32)/.test(e.keyCode.toString(10))&&s.data("spaceSelect")&&(e.preventDefault(),s.data("spaceSelect",!1))}),this.$newElement.on("show.bs.dropdown",function(){3<j.major&&!i.dropdown&&(i.dropdown=i.$button.data("bs.dropdown"),i.dropdown._menu=i.$menu[0])}),this.$button.on("click.bs.dropdown.data-api",function(){i.$newElement.hasClass(W.SHOW)||i.setSize()}),this.$element.on("shown"+H,function(){i.$menuInner[0].scrollTop!==i.selectpicker.view.scrollTop&&(i.$menuInner[0].scrollTop=i.selectpicker.view.scrollTop),3<j.major?requestAnimationFrame(n):t()}),this.$menuInner.on("mouseenter","li a",function(e){var t=this.parentElement,n=i.isVirtual()?i.selectpicker.view.position0:0,o=Array.prototype.indexOf.call(t.parentElement.children,t),r=i.selectpicker.current.data[o+n];i.focusItem(t,r,!0)}),this.$menuInner.on("click","li a",function(t,n){var s=e(this),a=i.$element[0],l=i.isVirtual()?i.selectpicker.view.position0:0,c=i.selectpicker.current.data[s.parent().index()+l],u=c.index,d=r(a),h=a.selectedIndex,p=a.options[h],f=!0;if(i.multiple&&1!==i.options.maxOptions&&t.stopPropagation(),t.preventDefault(),!i.isDisabled()&&!s.parent().hasClass(W.DISABLED)){var g=c.option,m=e(g),v=g.selected,_=m.parent("optgroup"),y=_.find("option"),b=i.options.maxOptions,w=_.data("maxOptions")||!1;if(u===i.activeIndex&&(n=!0),n||(i.prevActiveIndex=i.activeIndex,i.activeIndex=void 0),i.multiple){if(g.selected=!v,i.setSelected(u,!v),s.trigger("blur"),!1!==b||!1!==w){var x=b<o(a).length,k=w<_.find("option:selected").length;if(b&&x||w&&k)if(b&&1==b)a.selectedIndex=-1,g.selected=!0,i.setOptionStatus(!0);else if(w&&1==w){for(var S=0;S<y.length;S++){var T=y[S];T.selected=!1,i.setSelected(T.liIndex,!1)}g.selected=!0,i.setSelected(u,!0)}else{var E="string"==typeof i.options.maxOptionsText?[i.options.maxOptionsText,i.options.maxOptionsText]:i.options.maxOptionsText,P="function"==typeof E?E(b,w):E,A=P[0].replace("{n}",b),D=P[1].replace("{n}",w),I=e('<div class="notify"></div>');P[2]&&(A=A.replace("{var}",P[2][1<b?0:1]),D=D.replace("{var}",P[2][1<w?0:1])),g.selected=!1,i.$menu.append(I),b&&x&&(I.append(e("<div>"+A+"</div>")),f=!1,i.$element.trigger("maxReached"+H)),w&&k&&(I.append(e("<div>"+D+"</div>")),f=!1,i.$element.trigger("maxReachedGrp"+H)),setTimeout(function(){i.setSelected(u,!1)},10),I[0].classList.add("fadeOut"),setTimeout(function(){I.remove()},1050)}}}else p&&(p.selected=!1),g.selected=!0,i.setSelected(u,!0);!i.multiple||i.multiple&&1===i.options.maxOptions?i.$button.trigger("focus"):i.options.liveSearch&&i.$searchbox.trigger("focus"),f&&(!i.multiple&&h===a.selectedIndex||(C=[g.index,m.prop("selected"),d],i.$element.triggerNative("change")))}}),this.$menu.on("click","li."+W.DISABLED+" a, ."+W.POPOVERHEADER+", ."+W.POPOVERHEADER+" :not(.close)",function(t){t.currentTarget==this&&(t.preventDefault(),t.stopPropagation(),i.options.liveSearch&&!e(t.target).hasClass("close")?i.$searchbox.trigger("focus"):i.$button.trigger("focus"))}),this.$menuInner.on("click",".divider, .dropdown-header",function(e){e.preventDefault(),e.stopPropagation(),i.options.liveSearch?i.$searchbox.trigger("focus"):i.$button.trigger("focus")}),this.$menu.on("click","."+W.POPOVERHEADER+" .close",function(){i.$button.trigger("click")}),this.$searchbox.on("click",function(e){e.stopPropagation()}),this.$menu.on("click",".actions-btn",function(t){i.options.liveSearch?i.$searchbox.trigger("focus"):i.$button.trigger("focus"),t.preventDefault(),t.stopPropagation(),e(this).hasClass("bs-select-all")?i.selectAll():i.deselectAll()}),this.$element.on("change"+H,function(){i.render(),i.$element.trigger("changed"+H,C),C=null}).on("focus"+H,function(){i.options.mobile||i.$button.trigger("focus")})},liveSearchListener:function(){var e=this,t=document.createElement("li");this.$button.on("click.bs.dropdown.data-api",function(){e.$searchbox.val()&&e.$searchbox.val("")}),this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(e){e.stopPropagation()}),this.$searchbox.on("input propertychange",function(){var n=e.$searchbox.val();if(e.selectpicker.search.elements=[],e.selectpicker.search.data=[],n){var i=[],o=n.toUpperCase(),r={},a=[],l=e._searchStyle(),u=e.options.liveSearchNormalize;u&&(o=c(o)),e._$lisSelected=e.$menuInner.find(".selected");for(var d=0;d<e.selectpicker.main.data.length;d++){var h=e.selectpicker.main.data[d];r[d]||(r[d]=s(h,o,l,u)),r[d]&&void 0!==h.headerIndex&&-1===a.indexOf(h.headerIndex)&&(0<h.headerIndex&&(r[h.headerIndex-1]=!0,a.push(h.headerIndex-1)),r[h.headerIndex]=!0,a.push(h.headerIndex),r[h.lastIndex+1]=!0),r[d]&&"optgroup-label"!==h.type&&a.push(d)}d=0;for(var p=a.length;d<p;d++){var f=a[d],g=a[d-1],m=(h=e.selectpicker.main.data[f],e.selectpicker.main.data[g]);("divider"!==h.type||"divider"===h.type&&m&&"divider"!==m.type&&p-1!==d)&&(e.selectpicker.search.data.push(h),i.push(e.selectpicker.main.elements[f]))}e.activeIndex=void 0,e.noScroll=!0,e.$menuInner.scrollTop(0),e.selectpicker.search.elements=i,e.createView(!0),i.length||(t.className="no-results",t.innerHTML=e.options.noneResultsText.replace("{0}",'"'+O(n)+'"'),e.$menuInner[0].firstChild.appendChild(t))}else e.$menuInner.scrollTop(0),e.createView(!1)})},_searchStyle:function(){return this.options.liveSearchStyle||"contains"},val:function(e){var t=this.$element[0];if(void 0===e)return this.$element.val();var n=r(t);if(C=[null,null,n],this.$element.val(e).trigger("changed"+H,C),this.$newElement.hasClass(W.SHOW))if(this.multiple)this.setOptionStatus(!0);else{var i=(t.options[t.selectedIndex]||{}).liIndex;"number"==typeof i&&(this.setSelected(this.selectedIndex,!1),this.setSelected(i,!0))}return this.render(),C=null,this.$element},changeAll:function(e){if(this.multiple){void 0===e&&(e=!0);var t=this.$element[0],n=0,i=0,o=r(t);t.classList.add("bs-select-hidden");for(var s=0,a=this.selectpicker.current.elements.length;s<a;s++){var l=this.selectpicker.current.data[s],c=l.option;c&&!l.disabled&&"divider"!==l.type&&(l.selected&&n++,(c.selected=e)&&i++)}t.classList.remove("bs-select-hidden"),n!==i&&(this.setOptionStatus(),C=[null,null,o],this.$element.triggerNative("change"))}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(e){(e=e||window.event)&&e.stopPropagation(),this.$button.trigger("click.bs.dropdown.data-api")},keydown:function(t){var n,i,o,r,a,l=e(this),c=l.hasClass("dropdown-toggle"),u=(c?l.closest(".dropdown"):l.closest(q.MENU)).data("this"),d=u.findLis(),h=!1,p=t.which===N&&!c&&!u.options.selectOnTab,f=Y.test(t.which)||p,g=u.$menuInner[0].scrollTop,m=!0===u.isVirtual()?u.selectpicker.view.position0:0;if(!(112<=t.which&&t.which<=123))if(!(i=u.$newElement.hasClass(W.SHOW))&&(f||48<=t.which&&t.which<=57||96<=t.which&&t.which<=105||65<=t.which&&t.which<=90)&&(u.$button.trigger("click.bs.dropdown.data-api"),u.options.liveSearch))u.$searchbox.trigger("focus");else{if(t.which===F&&i&&(t.preventDefault(),u.$button.trigger("click.bs.dropdown.data-api").trigger("focus")),f){if(!d.length)return;-1!==(n=(o=u.selectpicker.main.elements[u.activeIndex])?Array.prototype.indexOf.call(o.parentElement.children,o):-1)&&u.defocusItem(o),t.which===B?(-1!==n&&n--,n+m<0&&(n+=d.length),u.selectpicker.view.canHighlight[n+m]||-1==(n=u.selectpicker.view.canHighlight.slice(0,n+m).lastIndexOf(!0)-m)&&(n=d.length-1)):t.which!==U&&!p||(++n+m>=u.selectpicker.view.canHighlight.length&&(n=0),u.selectpicker.view.canHighlight[n+m]||(n=n+1+u.selectpicker.view.canHighlight.slice(n+m+1).indexOf(!0))),t.preventDefault();var v=m+n;t.which===B?0===m&&n===d.length-1?(u.$menuInner[0].scrollTop=u.$menuInner[0].scrollHeight,v=u.selectpicker.current.elements.length-1):h=(a=(r=u.selectpicker.current.data[v]).position-r.height)<g:t.which!==U&&!p||(0===n?v=u.$menuInner[0].scrollTop=0:h=g<(a=(r=u.selectpicker.current.data[v]).position-u.sizeInfo.menuInnerHeight)),
o=u.selectpicker.current.elements[v],u.activeIndex=u.selectpicker.current.data[v].index,u.focusItem(o),u.selectpicker.view.currentActive=o,h&&(u.$menuInner[0].scrollTop=a),u.options.liveSearch?u.$searchbox.trigger("focus"):l.trigger("focus")}else if(!l.is("input")&&!G.test(t.which)||t.which===L&&u.selectpicker.keydown.keyHistory){var _,y,b=[];t.preventDefault(),u.selectpicker.keydown.keyHistory+=M[t.which],u.selectpicker.keydown.resetKeyHistory.cancel&&clearTimeout(u.selectpicker.keydown.resetKeyHistory.cancel),u.selectpicker.keydown.resetKeyHistory.cancel=u.selectpicker.keydown.resetKeyHistory.start(),y=u.selectpicker.keydown.keyHistory,/^(.)\1+$/.test(y)&&(y=y.charAt(0));for(var w=0;w<u.selectpicker.current.data.length;w++){var x=u.selectpicker.current.data[w];s(x,y,"startsWith",!0)&&u.selectpicker.view.canHighlight[w]&&b.push(x.index)}if(b.length){var k=0;d.removeClass("active").find("a").removeClass("active"),1===y.length&&(-1===(k=b.indexOf(u.activeIndex))||k===b.length-1?k=0:k++),_=b[k],h=0<g-(r=u.selectpicker.main.data[_]).position?(a=r.position-r.height,!0):(a=r.position-u.sizeInfo.menuInnerHeight,r.position>g+u.sizeInfo.menuInnerHeight),o=u.selectpicker.main.elements[_],u.activeIndex=b[k],u.focusItem(o),o&&o.firstChild.focus(),h&&(u.$menuInner[0].scrollTop=a),l.trigger("focus")}}i&&(t.which===L&&!u.selectpicker.keydown.keyHistory||t.which===R||t.which===N&&u.options.selectOnTab)&&(t.which!==L&&t.preventDefault(),u.options.liveSearch&&t.which===L||(u.$menuInner.find(".active a").trigger("click",!0),l.trigger("focus"),u.options.liveSearch||(t.preventDefault(),e(document).data("spaceSelect",!0))))}},mobile:function(){this.$element[0].classList.add("mobile-device")},refresh:function(){var t=e.extend({},this.options,this.$element.data());this.options=t,this.checkDisabled(),this.setStyle(),this.render(),this.createLi(),this.setWidth(),this.setSize(!0),this.$element.trigger("refreshed"+H)},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(H).removeData("selectpicker").removeClass("bs-select-hidden selectpicker"),e(window).off(H+"."+this.selectId)}};var ee=e.fn.selectpicker;e.fn.selectpicker=d,e.fn.selectpicker.Constructor=Z,e.fn.selectpicker.noConflict=function(){return e.fn.selectpicker=ee,this},e(document).off("keydown.bs.dropdown.data-api",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select .dropdown-menu').on("keydown"+H,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',Z.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(e){e.stopPropagation()}),e(window).on("load"+H+".data-api",function(){e(".selectpicker").each(function(){var t=e(this);d.call(t,t.data())})})}(e)}),function(e){function t(){return((new Date).getTime()+Math.floor(1e4*Math.random()+1)).toString(16)}function n(e){var t=document.createElement("div");return e.replace(/\&#?[0-9a-z]+;/gi,function(e){return t.innerHTML=e,t.innerText})}function i(e,t){if(!e)return console.warn("Tagify: ","invalid input element ",e),this;this.applySettings(e,t||{}),this.state={editing:{},actions:{},dropdown:{}},this.value=[],this.tagsDataById={},this.listeners={},this.DOM={},this.extend(this,new this.EventDispatcher(this)),this.build(e),this.getCSSVars(),this.loadOriginalValues(),this.events.customBinding.call(this),this.events.binding.call(this),e.autofocus&&this.DOM.input.focus()}e.fn.tagify=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.each(function(){var n,o=e(this);if(o.data("tagify"))return this;t.isJQueryPlugin=!0,n=new i(o[0],t),o.data("tagify",n)})};var o="undefined"!=typeof InstallTrigger;i.prototype={isIE:window.document.documentMode,TEXTS:{empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},DEFAULTS:{delimiters:",",pattern:null,maxTags:1/0,callbacks:{},addTagOnBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,keepInvalidTags:!1,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,editTags:2,transformTag:function(){},autoComplete:{enabled:!0,rightKey:!1},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:[],fuzzySearch:!0,highlightFirst:!1,closeOnSelect:!0,position:"all"}},templates:{wrapper:function(e,t){return'<tags class="tagify '.concat(t.mode?"tagify--"+t.mode:""," ").concat(e.className,'"\n                        ').concat(t.readonly?'readonly aria-readonly="true"':'aria-haspopup="listbox" aria-expanded="false"','\n                        role="tagslist"\n                        tabIndex="-1">\n                <span contenteditable data-placeholder="').concat(t.placeholder||"&#8203;",'" aria-placeholder="').concat(t.placeholder||"",'"\n                    class="tagify__input"\n                    role="textbox"\n                    aria-autocomplete="both"\n                    aria-multiline="').concat("mix"==t.mode,'"></span>\n            </tags>')},tag:function(e,t){return'<tag title="'.concat(t.title||e,"\"\n                        contenteditable='false'\n                        spellcheck='false'\n                        tabIndex=\"-1\"\n                        class=\"tagify__tag ").concat(t.class?t.class:"",'"\n                        ').concat(this.getAttributes(t),">\n                <x title='' class='tagify__tag__removeBtn' role='button' aria-label='remove tag'></x>\n                <div>\n                    <span class='tagify__tag-text'>").concat(e,"</span>\n                </div>\n            </tag>")},dropdownItem:function(e){var t=this.settings.dropdown.mapValueTo,n=((t?"function"==typeof t?t(e):e[t]:e.value)||e.value||e).replace(/`|'/g,"&#39;");return"<div ".concat(this.getAttributes(e),"\n                        class='tagify__dropdown__item ").concat(e.class?e.class:"",'\'\n                        tabindex="0"\n                        role="option">').concat(n,"</div>")}},customEventsList:["add","remove","invalid","input","click","keydown","focus","blur","edit:input","edit:updated","edit:start","edit:keydown","dropdown:show","dropdown:hide","dropdown:select"],applySettings:function(e,t){var n=this;if(this.DEFAULTS.templates=this.templates,this.settings=this.extend({},this.DEFAULTS,t),this.settings.readonly=e.hasAttribute("readonly"),this.settings.placeholder=e.getAttribute("placeholder")||this.settings.placeholder||"",this.isIE&&(this.settings.autoComplete=!1),["whitelist","blacklist"].forEach(function(t){var i=e.getAttribute("data-"+t);i&&(i=i.split(n.settings.delimiters))instanceof Array&&(n.settings[t]=i)}),"autoComplete"in t&&!this.isObject(t.autoComplete)&&(this.settings.autoComplete=this.DEFAULTS.autoComplete,this.settings.autoComplete.enabled=t.autoComplete),e.pattern)try{this.settings.pattern=new RegExp(e.pattern)}catch(t){}if(this.settings.delimiters)try{this.settings.delimiters=new RegExp(this.settings.delimiters,"g")}catch(t){}"select"==this.settings.mode&&(this.settings.dropdown.enabled=0),"mix"==this.settings.mode&&(this.settings.autoComplete.rightKey=!0)},getAttributes:function(e){if("[object Object]"!=Object.prototype.toString.call(e))return"";var t,n,i=Object.keys(e),o="";for(n=i.length;n--;)"class"!=(t=i[n])&&e.hasOwnProperty(t)&&e[t]&&(o+=" "+t+(e[t]?'="'.concat(e[t],'"'):""));return o},parseHTML:function(e){return(new DOMParser).parseFromString(e.trim(),"text/html").body.firstElementChild},getCaretGlobalPosition:function(){var e=document.getSelection();if(e.rangeCount){var t,n,i=e.getRangeAt(0),o=i.startContainer,r=i.startOffset;if(0<r)return(n=document.createRange()).setStart(o,r-1),n.setEnd(o,r),{left:(t=n.getBoundingClientRect()).right,top:t.top,bottom:t.bottom}}return{left:-9999,top:-9999}},getCSSVars:function(){var e,t,n,i=getComputedStyle(this.DOM.scope,null);this.CSSVars={tagHideTransition:(e=function(e){if(!e)return{};var t=(e=e.trim().split(" ")[0]).split(/\d+/g).filter(function(e){return e}).pop().trim();return{value:+e.split(t).filter(function(e){return e})[0].trim(),unit:t}}((n="tag-hide-transition",i.getPropertyValue("--"+n))),t=e.value,"s"==e.unit?1e3*t:t)}},build:function(e){var t=this.DOM,n=this.settings.templates.wrapper(e,this.settings);t.originalInput=e,t.scope=this.parseHTML(n),t.input=t.scope.querySelector("[contenteditable]"),e.parentNode.insertBefore(t.scope,e),0<=this.settings.dropdown.enabled&&this.dropdown.init.call(this)},destroy:function(){this.DOM.scope.parentNode.removeChild(this.DOM.scope),this.dropdown.hide.call(this,!0)},loadOriginalValues:function(e){if(e=e||this.DOM.originalInput.value)if(this.removeAllTags(),"mix"==this.settings.mode)this.parseMixTags(e.trim());else{try{"string"!=typeof JSON.parse(e)&&(e=JSON.parse(e))}catch(e){}this.addTags(e).forEach(function(e){return e&&e.classList.add("tagify--noAnim")})}},isObject:function(e){var t=Object.prototype.toString.call(e).split(" ")[1].slice(0,-1);return e===Object(e)&&"Array"!=t&&"Function"!=t&&"RegExp"!=t&&"HTMLUnknownElement"!=t},extend:function(e,t,n){function i(e,t){for(var n in t)t.hasOwnProperty(n)&&(o.isObject(t[n])?o.isObject(e[n])?i(e[n],t[n]):e[n]=Object.assign({},t[n]):e[n]=t[n])}var o=this;return e instanceof Object||(e={}),i(e,t),n&&i(e,n),e},cloneEvent:function(e){var t={};for(var n in e)t[n]=e[n];return t},EventDispatcher:function(e){function t(e,t,i){i&&t.split(/\s+/g).forEach(function(t){return n[e+"EventListener"].call(n,t,i)})}var n=document.createTextNode("");this.off=function(e,n){return t("remove",e,n),this},this.on=function(e,n){return n&&"function"==typeof n&&t("add",e,n),this},this.trigger=function(t,i){var o;if(t)if(e.settings.isJQueryPlugin)"remove"==t&&(t="removeTag"),jQuery(e.DOM.originalInput).triggerHandler(t,[i]);else{try{o=new CustomEvent(t,{detail:this.extend({},i,{tagify:this})})}catch(t){console.warn(t)}n.dispatchEvent(o)}}},loading:function(e){return this.DOM.scope.classList[e?"add":"remove"]("tagify--loading"),this},toggleFocusClass:function(e){this.DOM.scope.classList.toggle("tagify--focus",!!e)},events:{customBinding:function(){var e=this;this.customEventsList.forEach(function(t){e.on(t,e.settings.callbacks[t])})},binding:function(e){var t,n=!(0<arguments.length&&void 0!==e)||e,i=this.events.callbacks,o=n?"addEventListener":"removeEventListener";if(!this.state.mainEvents||!n)for(var r in(this.state.mainEvents=n)&&!this.listeners.main&&(this.DOM.input.addEventListener(this.isIE?"keydown":"input",i[this.isIE?"onInputIE":"onInput"].bind(this)),this.settings.isJQueryPlugin&&jQuery(this.DOM.originalInput).on("tagify.removeAllTags",this.removeAllTags.bind(this))),t=this.listeners.main=this.listeners.main||{focus:["input",i.onFocusBlur.bind(this)],blur:["input",i.onFocusBlur.bind(this)],keydown:["input",i.onKeydown.bind(this)],click:["scope",i.onClickScope.bind(this)],dblclick:["scope",i.onDoubleClickScope.bind(this)]}){if("blur"==r&&!n)return;this.DOM[t[r][0]][o](r,t[r][1])}},callbacks:{onFocusBlur:function(e){var t=e.target?e.target.textContent.trim():"",n=this.settings,i=e.type;if(!(e.relatedTarget&&e.relatedTarget.classList.contains("tagify__tag")&&this.DOM.scope.contains(e.relatedTarget))){if("blur"==i&&e.relatedTarget===this.DOM.scope)return this.dropdown.hide.call(this),void this.DOM.input.focus();if(!this.state.actions.selectOption||!n.dropdown.enabled&&n.dropdown.closeOnSelect)if(this.state.hasFocus="focus"==i&&+new Date,this.toggleFocusClass(this.state.hasFocus),this.setRangeAtStartEnd(!1),"mix"!=n.mode){if("focus"==i)return this.trigger("focus",{relatedTarget:e.relatedTarget}),void(0===n.dropdown.enabled&&"select"!=n.mode&&this.dropdown.show.call(this));"blur"==i&&(this.trigger("blur",{relatedTarget:e.relatedTarget}),this.loading(!1),("select"==this.settings.mode?!this.value.length||this.value[0].value!=t:t&&!this.state.actions.selectOption&&n.addTagOnBlur)&&this.addTags(t,!0)),this.DOM.input.removeAttribute("style"),this.dropdown.hide.call(this)}else"blur"==e.type&&this.dropdown.hide.call(this)}},onKeydown:function(e){var t=this,i=e.target.textContent.trim();if(this.trigger("keydown",{originalEvent:this.cloneEvent(e)}),"mix"==this.settings.mode){switch(e.key){case"Left":case"ArrowLeft":this.state.actions.ArrowLeft=!0;break;case"Delete":case"Backspace":var o=document.getSelection(),r=[],s=n(this.DOM.input.innerHTML);setTimeout(function(){if(n(t.DOM.input.innerHTML).length>=s.length&&(t.removeTag(o.anchorNode.previousElementSibling),2==t.DOM.input.children.length&&"BR"==t.DOM.input.children[1].tagName))return t.DOM.input.innerHTML="",!(t.value.length=0);var e=t.DOM.input.querySelectorAll(".tagify__tag");[].forEach.call(e,function(e){return r.push(e.getAttribute("value"))}),t.value=t.value.filter(function(e){return-1!=r.indexOf(e.value)})},50)}return!0}switch(e.key){case"Backspace":this.state.dropdown.visible||""!=i&&8203!=i.charCodeAt(0)||(!0===this.settings.backspace?this.removeTag():"edit"==this.settings.backspace&&setTimeout(this.editTag.bind(this),0));break;case"Esc":case"Escape":if(this.state.dropdown.visible)return;e.target.blur();break;case"Down":case"ArrowDown":this.state.dropdown.visible||this.dropdown.show.call(this);break;case"ArrowRight":var a=this.state.inputSuggestion||this.state.ddItemData;if(a&&this.settings.autoComplete.rightKey)return void this.addTags([a],!0);break;case"Tab":if(!i||"select"==this.settings.mode)return!0;case"Enter":e.preventDefault(),setTimeout(function(){t.state.actions.selectOption||t.addTags(i,!0)})}},onInput:function(e){var t="mix"==this.settings.mode?this.DOM.input.textContent:this.input.normalize.call(this),n=t.length>=this.settings.dropdown.enabled,i={value:t,inputElm:this.DOM.input};if("mix"==this.settings.mode)return this.events.callbacks.onMixTagsInput.call(this,e);t?this.input.value!=t&&(i.isValid=this.validateTag(t),this.trigger("input",i),this.input.set.call(this,t,!1),-1!=t.search(this.settings.delimiters)?this.addTags(t)&&this.input.set.call(this):0<=this.settings.dropdown.enabled&&this.dropdown[n?"show":"hide"].call(this,t)):this.input.set.call(this,"")},onMixTagsInput:function(){var e,t,n,i,o,r=this,s=this.settings;if(this.hasMaxTags())return!0;window.getSelection&&0<(e=window.getSelection()).rangeCount&&((t=e.getRangeAt(0).cloneRange()).collapse(!0),t.setStart(window.getSelection().focusNode,0),(i=(n=t.toString().split(s.mixTagsAllowedAfter))[n.length-1].match(s.pattern))&&(this.state.actions.ArrowLeft=!1,this.state.tag={prefix:i[0],value:i.input.split(i[0])[1]},o=this.state.tag.value.length>=s.dropdown.enabled)),setTimeout(function(){r.update(),r.trigger("input",r.extend({},r.state.tag,{textContent:r.DOM.input.textContent})),r.state.tag&&r.dropdown[o?"show":"hide"].call(r,r.state.tag.value)},10)},onInputIE:function(e){var t=this;setTimeout(function(){t.events.callbacks.onInput.call(t,e)})},onClickScope:function(e){var t,n=e.target.closest(".tagify__tag"),i=this.settings,o=new Date-this.state.hasFocus;if(e.target!=this.DOM.scope){if(!e.target.classList.contains("tagify__tag__removeBtn"))return n?(t=this.getNodeIndex(n),this.trigger("click",{tag:n,index:t,data:this.value[t],originalEvent:this.cloneEvent(e)}),void(1==this.settings.editTags&&this.events.callbacks.onDoubleClickScope.call(this,e))):void(e.target==this.DOM.input&&500<o?this.state.dropdown.visible?this.dropdown.hide.call(this):0===i.dropdown.enabled&&"mix"!=i.mode&&this.dropdown.show.call(this):"select"==i.mode&&(this.state.dropdown.visible||this.dropdown.show.call(this)));this.removeTag(e.target.parentNode)}else this.DOM.input.focus()},onEditTagInput:function(e,t){var n=e.closest("tag"),i=this.getNodeIndex(n),o=this.input.normalize.call(this,e),r=o.toLowerCase()==e.originalValue.toLowerCase()||this.validateTag(o);n.classList.toggle("tagify--invalid",!0!==r),n.isValid=!0===r,o.length>=this.settings.dropdown.enabled&&(this.state.editing.value=o,this.dropdown.show.call(this,o)),this.trigger("edit:input",{tag:n,index:i,data:this.extend({},this.value[i],{newValue:o}),originalEvent:this.cloneEvent(t)})},onEditTagBlur:function(e){if(this.state.hasFocus||this.toggleFocusClass(),this.DOM.scope.contains(e)){var t=e.closest(".tagify__tag"),n=this.input.normalize.call(this,e),i=n||e.originalValue,o=i!=e.originalValue,r=(t.isValid,_objectSpread({},this.tagsDataById[t.__tagifyId],{value:i}));if(!n)return this.removeTag(t),void this.onEditTagDone();o?(this.settings.transformTag.call(this,r),!0==(!0===this.validateTag(r.value))&&this.onEditTagDone(t,r)):this.onEditTagDone(t)}},onEditTagkeydown:function(e){switch(this.trigger("edit:keydown",{originalEvent:this.cloneEvent(e)}),e.key){case"Esc":case"Escape":e.target.textContent=e.target.originalValue;case"Enter":case"Tab":e.preventDefault(),e.target.blur()}},onDoubleClickScope:function(e){var t,n,i=e.target.closest("tag"),o=this.settings;i&&(t=i.classList.contains("tagify__tag--editable"),n=i.hasAttribute("readonly"),"select"==o.mode||o.readonly||t||n||!this.settings.editTags||this.editTag(i),this.toggleFocusClass(!0))}}},editTag:function(e,t){var n=this;t=t||{};var i=(e=e||this.getLastTag()).querySelector(".tagify__tag-text"),o=this.getNodeIndex(e),r=this.tagsDataById[e.__tagifyId],s=this.events.callbacks,a=this,l=!0;if(i){if(!(r instanceof Object&&"editable"in r)||r.editable)return e.classList.add("tagify__tag--editable"),i.originalValue=i.textContent,i.setAttribute("contenteditable",!0),i.addEventListener("blur",function(){setTimeout(s.onEditTagBlur.bind(a),0,i)}),i.addEventListener("input",s.onEditTagInput.bind(this,i)),i.addEventListener("keydown",function(e){return s.onEditTagkeydown.call(n,e)}),i.focus(),this.setRangeAtStartEnd(!1,i),t.skipValidation||(l=this.editTagToggleValidity(e,r.value)),this.state.editing={scope:e,input:e.querySelector("[contenteditable]")},this.trigger("edit:start",{tag:e,index:o,data:r,isValid:l}),this}else console.warn("Cannot find element in Tag template: ",".tagify__tag-text")},editTagToggleValidity:function(e,t){var n=this.validateTag(t,e.__tagifyId);return e.classList.toggle("tagify--invalid",!0!==n),e.isValid=n},onEditTagDone:function(e,t){var n={tag:e,index:this.getNodeIndex(e),data:t};this.trigger("edit:beforeUpdate",n),e&&this.replaceTag(e,t),this.trigger("edit:updated",n),this.dropdown.hide.call(this)},replaceTag:function(e,t){var n=this;t&&t.value||(t=this.tagsDataById[e.__tagifyId]),t=!0===e.isValid?t:this.extend(t,this.getInvaildTagParams(t,t));var i=this.createTagElem(t);this.state.editing.locked||(this.state.editing={locked:!0},setTimeout(function(){return delete n.state.editing.locked},500),i.__tagifyId=e.__tagifyId,e.parentNode.replaceChild(i,e),this.tagsDataById[e.__tagifyId]=t,this.updateValueByDOMTags())},updateValueByDOMTags:function(){var e=this;this.value=[],[].forEach.call(this.getTagElms(),function(t){t.classList.contains("tagify--notAllowed")||e.value.push(e.tagsDataById[t.__tagifyId])}),this.update()},setRangeAtStartEnd:function(e,t){t=(t=t||this.DOM.input).lastChild||t;var n=document.getSelection();n.rangeCount&&["Start","End"].forEach(function(i){return n.getRangeAt(0)["set"+i](t,e?0:t.length)})},input:{value:"",set:function(e,t){var n=0<arguments.length&&void 0!==e?e:"",i=!(1<arguments.length&&void 0!==t)||t,o=this.settings.dropdown.closeOnSelect;this.input.value=n,i&&(this.DOM.input.innerHTML=n),!n&&o&&setTimeout(this.dropdown.hide.bind(this),20),this.input.autocomplete.suggest.call(this),this.input.validate.call(this)},validate:function(){var e=!this.input.value||this.validateTag(this.input.value);"select"==this.settings.mode?this.DOM.scope.classList.toggle("tagify--invalid",!0!==e):this.DOM.input.classList.toggle("tagify__input--invalid",!0!==e)},normalize:function(e){var t=e||this.DOM.input,n=[];t.childNodes.forEach(function(e){return 3==e.nodeType&&n.push(e.nodeValue)}),n=n.join("\n");try{n=n.replace(/(?:\r\n|\r|\n)/g,this.settings.delimiters.source.charAt(0))}catch(e){}return n=n.replace(/\s/g," ").replace(/^\s+/,"")},autocomplete:{suggest:function(e){if(this.settings.autoComplete.enabled){"string"==typeof(e=e||{})&&(e={value:e});var t=e.value||"",n=t.substr(0,this.input.value.length).toLowerCase(),i=t.substring(this.input.value.length);t&&this.input.value&&n==this.input.value.toLowerCase()?(this.DOM.input.setAttribute("data-suggest",i),this.state.inputSuggestion=e):(this.DOM.input.removeAttribute("data-suggest"),delete this.state.inputSuggestion)}},set:function(e){var t=this.DOM.input.getAttribute("data-suggest"),n=e||(t?this.input.value+t:null);return!!n&&("mix"==this.settings.mode?this.replaceTextWithNode(document.createTextNode(this.state.tag.prefix+n)):(this.input.set.call(this,n),this.setRangeAtStartEnd()),this.input.autocomplete.suggest.call(this),this.dropdown.hide.call(this),!0)}}},getNodeIndex:function(e){var t=0;if(e)for(;e=e.previousElementSibling;)t++;return t},getTagElms:function(){return this.DOM.scope.querySelectorAll(".tagify__tag")},getLastTag:function(){var e=this.DOM.scope.querySelectorAll("tag:not(.tagify--hide):not([readonly])");return e[e.length-1]},isTagDuplicate:function(e,t){var n=this;return"select"!=this.settings.mode&&this.value.some(function(i){return i.__tagifyId!=t&&(n.isObject(e)?JSON.stringify(i).toLowerCase()===JSON.stringify(e).toLowerCase():e.trim().toLowerCase()===i.value.toLowerCase())})},getTagIndexByValue:function(e){var t=[];return this.getTagElms().forEach(function(n,i){n.textContent.trim().toLowerCase()==e.toLowerCase()&&t.push(i)}),t},getTagElmByValue:function(e){var t=this.getTagIndexByValue(e)[0];return this.getTagElms()[t]},markTagByValue:function(e,t){return!!(t=t||this.getTagElmByValue(e))&&(t.classList.add("tagify--mark"),setTimeout(function(){t.classList.remove("tagify--mark")},100),t)},isTagBlacklisted:function(e){return e=e.toLowerCase().trim(),this.settings.blacklist.filter(function(t){return e==t.toLowerCase()}).length},isTagWhitelisted:function(e){return this.settings.whitelist.some(function(t){return"string"==typeof e?e.trim().toLowerCase()===(t.value||t).toLowerCase():JSON.stringify(t).toLowerCase()===JSON.stringify(e).toLowerCase()})},validateTag:function(e,t){var n=e.trim(),i=this.settings,o=!0;return n?i.pattern&&!i.pattern.test(n)?o=this.TEXTS.pattern:!i.duplicates&&this.isTagDuplicate(n,t)?o=this.TEXTS.duplicate:(this.isTagBlacklisted(n)||i.enforceWhitelist&&!this.isTagWhitelisted(n))&&(o=this.TEXTS.notAllowed):o=this.TEXTS.empty,o},getInvaildTagParams:function(e,t){return{"aria-invalid":!0,class:(e.class||"")+" tagify--notAllowed",title:t}},hasMaxTags:function(){return this.value.length>=this.settings.maxTags&&this.TEXTS.exceed},normalizeTags:function(e){function t(e){return(e+"").split(r).filter(function(e){return e}).map(function(e){return{value:e.trim()}})}var n,i=this.settings,o=i.whitelist,r=i.delimiters,s=i.mode,a=!!o&&o[0]instanceof Object,l=e instanceof Array,c=l&&e[0]instanceof Object&&"value"in e[0],u=[];if(c)return(n=[]).concat.apply(n,_toConsumableArray(e.map(function(e){return t(e.value).map(function(t){return _objectSpread({},e,{},t)})})));if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(!e.trim())return[];e=t(e)}else if(l){var d;e=(d=[]).concat.apply(d,_toConsumableArray(e.map(function(e){return t(e)})))}return a&&(e.forEach(function(e){var t=o.filter(function(t){return t.value.toLowerCase()==e.value.toLowerCase()});t[0]?u.push(t[0]):"mix"!=s&&u.push(e)}),e=u),e},parseMixTags:function(e){var n=this,i=this.settings,o=i.mixTagsInterpolator,r=i.duplicates,s=i.transformTag,a=i.enforceWhitelist;return e=e.split(o[0]).map(function(e,i){var l,c,u=e.split(o[1]),d=u[0];try{l=JSON.parse(d)}catch(e){l=n.normalizeTags(d)[0]}if(!(1<u.length)||a&&!n.isTagWhitelisted(l.value)||!r&&n.isTagDuplicate(l)){if(e)return i?o[0]+e:e}else s.call(n,l),l.__tagifyId=t(),(c=n.createTagElem(l)).classList.add("tagify--noAnim"),c.__tagifyId=l.__tagifyId,n.tagsDataById[c.__tagifyId]=l,u[0]=c.outerHTML,n.value.push(l);return u.join("")}).join(""),this.DOM.input.innerHTML=e,this.DOM.input.appendChild(document.createTextNode("")),this.update(),e},replaceTextWithNode:function(e,t){if(this.state.tag||t){t=t||this.state.tag.prefix+this.state.tag.value;var n,i,o=this.state.selection||window.getSelection(),r=o.anchorNode;return r.splitText(o.anchorOffset),n=r.nodeValue.lastIndexOf(t),(i=r.splitText(n)).nodeValue=i.nodeValue.replace(t,""),r.parentNode.insertBefore(e,i),this.DOM.input.normalize(),i}},selectTag:function(e,t){return this.input.set.call(this,t.value,!0),this.state.actions.selectOption&&setTimeout(this.setRangeAtStartEnd.bind(this)),this.getLastTag()?this.replaceTag(this.getLastTag(),t):this.appendTag(e),this.value[0]=t,this.trigger("add",{tag:e,data:t}),this.update(),[e]},addEmptyTag:function(){var e={value:"",__tagifyId:t()},n=this.createTagElem(e);this.tagsDataById[e.__tagifyId]=e,n.__tagifyId=e.__tagifyId,this.appendTag(n),this.editTag(n,{skipValidation:!0})},addTags:function(e,n,i){var o,r=this,s=2<arguments.length&&void 0!==i?i:this.settings.skipInvalid,a=[],l=this.settings;return e&&0!=e.length?(e=this.normalizeTags(e),this.state.editing.scope?this.onEditTagDone(this.state.editing.scope,e[0]):"mix"==l.mode?(l.transformTag.call(this,e[0]),o=this.createTagElem(e[0]),this.replaceTextWithNode(o)||this.DOM.input.appendChild(o),this.DOM.input.appendChild(document.createTextNode("")),setTimeout(function(){return o.classList.add("tagify--noAnim")},300),e[0].prefix=e[0].prefix||this.state.tag?this.state.tag.prefix:(l.pattern.source||l.pattern)[0],this.value.push(e[0]),this.update(),this.state.tag=null,this.trigger("add",this.extend({},{tag:o},{data:e[0]})),this.DOM.input.appendChild(document.createTextNode("")),o):("select"==l.mode&&(n=!1),this.DOM.input.removeAttribute("style"),e.forEach(function(e){var n,i,o={};if((e=Object.assign({},e)).__tagifyId=t(),r.tagsDataById[e.__tagifyId]=e,l.transformTag.call(r,e),!0!==(n=r.hasMaxTags()||r.validateTag(e.value))){if(s)return;r.extend(o,r.getInvaildTagParams(e,n)),n==r.TEXTS.duplicate&&r.markTagByValue(e.value)}if(o.role="tag",e.readonly&&(o["aria-readonly"]=!0),(i=r.createTagElem(r.extend({},e,o))).__tagifyId=e.__tagifyId,a.push(i),"select"==l.mode)return r.selectTag(i,e);r.appendTag(i),!0===n?(r.value.push(e),r.update(),r.trigger("add",{tag:i,index:r.value.length-1,data:e})):(r.trigger("invalid",{data:e,index:r.value.length,tag:i,message:n}),l.keepInvalidTags||setTimeout(function(){return r.removeTag(i,!0)},1e3)),r.dropdown.position.call(r)}),e.length&&n&&this.input.set.call(this),this.dropdown.refilter.call(this),a)):("select"==l.mode&&this.removeAllTags(),a)},appendTag:function(e){var t=this.DOM.scope.lastElementChild;t===this.DOM.input?this.DOM.scope.insertBefore(e,t):this.DOM.scope.appendChild(e)},minify:function(e){return e?e.replace(/\>[\r\n ]+\</g,"><").replace(/(<.*?>)|\s+/g,function(e,t){return t||" "}):""},createTagElem:function(e){var t=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}(e.value),n=this.settings.templates.tag.call(this,t,e);return this.settings.readonly&&(e.readonly=!0),n=this.minify(n),this.parseHTML(n)},reCheckInvalidTags:function(){var e=this,t=this.DOM.scope.querySelectorAll(".tagify__tag.tagify--notAllowed");[].forEach.call(t,function(t){var n=e.tagsDataById[t.__tagifyId],i=t.getAttribute("title")==e.TEXTS.duplicate,o=!0===e.validateTag(n.value,n.__tagifyId);i&&o&&(t.isValid=!0,e.replaceTag(t,n))})},removeTag:function(e,t,n){function i(){e.parentNode&&(e.parentNode.removeChild(e),t?o.settings.keepInvalidTags&&o.trigger("remove",{tag:e,index:s}):(o.removeValueById(r),delete o.tagsDataById[r],o.update(),o.trigger("remove",{tag:e,index:s,data:o.tagsDataById[r]}),o.dropdown.refilter.call(o),o.dropdown.position.call(o),o.settings.keepInvalidTags&&o.reCheckInvalidTags()))}if(e=e||this.getLastTag(),n=n||this.CSSVars.tagHideTransition,"string"==typeof e&&(e=this.getTagElmByValue(e)),e instanceof HTMLElement){var o=this,r=e.__tagifyId,s=this.getNodeIndex(e);"select"==this.settings.mode&&(n=0,this.input.set.call(this)),e.classList.contains("tagify--notAllowed")&&(t=!0),n&&10<n?(e.style.width=parseFloat(window.getComputedStyle(e).width)+"px",document.body.clientTop,e.classList.add("tagify--hide"),setTimeout(i,n)):i()}},removeAllTags:function(){this.value=[],this.update(),Array.prototype.slice.call(this.getTagElms()).forEach(function(e){return e.parentNode.removeChild(e)}),this.dropdown.position.call(this),"select"==this.settings.mode&&this.input.set.call(this)},removeValueById:function(e){this.value=this.value.filter(function(t){return t.__tagifyId!=e})},preUpdate:function(){this.DOM.scope.classList.toggle("tagify--hasMaxTags",this.value.length>=this.settings.maxTags),this.DOM.scope.classList.toggle("tagify--noTags",!this.value.length)},update:function(){this.preUpdate();var e=function(e,t){return e.map(function(e){var n={};for(var i in e)i!=t&&(n[i]=e[i]);return n})}(this.value,"__tagifyId");this.DOM.originalInput.value="mix"==this.settings.mode?this.getMixedTagsAsString(e):this.value.length?JSON.stringify(e):""},getMixedTagsAsString:function(e){var t="",n=0,i=e,r=this.settings.mixTagsInterpolator;return function e(s){s.childNodes.forEach(function(s){if(1==s.nodeType){if(s.classList.contains("tagify__tag"))return void(t+=r[0]+JSON.stringify(i[n++])+r[1]);o&&"BR"==s.tagName?t+="\r\n":"DIV"==s.tagName&&(t+="\r\n",e(s))}else t+=s.textContent})}(this.DOM.input),t},getNodeHeight:function(e){var t,n=e.cloneNode(!0);return n.style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(n),t=n.clientHeight,n.parentNode.removeChild(n),t},dropdown:{init:function(){this.DOM.dropdown=this.dropdown.build.call(this),this.DOM.dropdown.content=this.DOM.dropdown.querySelector(".tagify__dropdown__wrapper")},build:function(){var e=this.settings.dropdown,t=e.position,n=e.classname,i="".concat("manual"==t?"":"tagify__dropdown tagify__dropdown--".concat(t)," ").concat(n).trim();return this.parseHTML('<div class="'.concat(i,'" role="listbox" aria-labelledby="dropdown">\n                        <div class="tagify__dropdown__wrapper"></div>\n                    </div>'))},show:function(e){var t,n,i,o,r=this,s=this.settings,a=window.getSelection(),l="manual"==s.dropdown.position;if(s.whitelist&&s.whitelist.length&&!1!==s.dropdown.enable){if(this.suggestedListItems=this.dropdown.filterListItems.call(this,e),!this.suggestedListItems.length){if("mix"!=s.mode||s.enforceWhitelist)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide.call(this);this.suggestedListItems=[{value:e}]}i=(n=this.suggestedListItems[0]).value||n,s.autoComplete&&0==i.indexOf(e)&&this.input.autocomplete.suggest.call(this,n),t=this.dropdown.createListHTML.call(this,this.suggestedListItems),this.DOM.dropdown.content.innerHTML=this.minify(t),(s.enforceWhitelist&&!l||s.dropdown.highlightFirst)&&this.dropdown.highlightOption.call(this,this.DOM.dropdown.content.children[0]),this.DOM.scope.setAttribute("aria-expanded",!0),this.trigger("dropdown:show",this.DOM.dropdown),this.state.dropdown.visible=e||!0,this.state.selection={anchorOffset:a.anchorOffset,anchorNode:a.anchorNode},this.dropdown.position.call(this),document.body.contains(this.DOM.dropdown)||(l||(this.events.binding.call(this,!1),o=this.getNodeHeight(this.DOM.dropdown),this.DOM.dropdown.classList.add("tagify__dropdown--initial"),this.dropdown.position.call(this,o),document.body.appendChild(this.DOM.dropdown),setTimeout(function(){return r.DOM.dropdown.classList.remove("tagify__dropdown--initial")})),setTimeout(this.dropdown.events.binding.bind(this)))}},hide:function(e){var t=this.DOM,n=t.scope,i=t.dropdown,o="manual"==this.settings.dropdown.position&&!e;i&&document.body.contains(i)&&!o&&(window.removeEventListener("resize",this.dropdown.position),
this.dropdown.events.binding.call(this,!1),setTimeout(this.events.binding.bind(this),250),n.setAttribute("aria-expanded",!1),i.parentNode.removeChild(i),this.state.dropdown.visible=!1,this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.trigger("dropdown:hide",i))},refilter:function(){this.suggestedListItems=this.dropdown.filterListItems.call(this,"");var e=this.dropdown.createListHTML.call(this,this.suggestedListItems);this.DOM.dropdown.content.innerHTML=this.minify(e),this.trigger("dropdown:updated",this.DOM.dropdown)},position:function(e){var t,n,i,o,r,s,a=this.DOM.dropdown;this.state.dropdown.visible&&(s="text"==this.settings.dropdown.position?(o=(n=this.getCaretGlobalPosition()).bottom,i=n.top,r=n.left,"auto"):(i=(n=this.DOM.scope.getBoundingClientRect()).top,o=n.bottom-1,r=n.left,n.width+"px"),i=Math.floor(i),o=Math.ceil(o),t=document.documentElement.clientHeight-o<(e||a.clientHeight),a.style.cssText="left:"+(r+window.pageXOffset)+"px; width:"+s+";"+(t?"bottom:"+(document.documentElement.clientHeight-i-window.pageYOffset-2)+"px;":"top: "+(o+window.pageYOffset)+"px"),a.setAttribute("placement",t?"top":"bottom"))},events:{binding:function(e){var t=!(0<arguments.length&&void 0!==e)||e,n=this.dropdown.events.callbacks,i=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this),onKeyDown:n.onKeyDown.bind(this),onMouseOver:n.onMouseOver.bind(this),onMouseLeave:n.onMouseLeave.bind(this),onClick:n.onClick.bind(this),onScroll:n.onScroll.bind(this)},o=t?"addEventListener":"removeEventListener";"manual"!=this.settings.dropdown.position&&(window[o]("resize",i.position),window[o]("keydown",i.onKeyDown)),this.DOM.dropdown[o]("mouseover",i.onMouseOver),this.DOM.dropdown[o]("mouseleave",i.onMouseLeave),this.DOM.dropdown[o]("mousedown",i.onClick),this.DOM.dropdown.content[o]("scroll",i.onScroll),this.DOM[this.listeners.main.click[0]][o]("click",this.listeners.main.click[1])},callbacks:{onKeyDown:function(e){var t=this.DOM.dropdown.querySelector("[class$='--active']"),n=t;switch(e.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":var i;e.preventDefault(),n=(n=n&&n[("ArrowUp"==e.key||"Up"==e.key?"previous":"next")+"ElementSibling"])||(i=this.DOM.dropdown.content.children)["ArrowUp"==e.key||"Up"==e.key?i.length-1:0],this.dropdown.highlightOption.call(this,n,!0);break;case"Escape":case"Esc":this.dropdown.hide.call(this);break;case"ArrowRight":if(this.state.actions.ArrowLeft)return;case"Tab":if("mix"!=this.settings.mode&&!this.settings.autoComplete.rightKey){try{var o=n?n.textContent:this.suggestedListItems[0].value;this.input.autocomplete.set.call(this,o)}catch(e){}return!1}case"Enter":e.preventDefault(),this.dropdown.selectOption.call(this,t);break;case"Backspace":if("mix"==this.settings.mode||this.state.editing.scope)return;var r=this.input.value.trim();""!=r&&8203!=r.charCodeAt(0)||(!0===this.settings.backspace?this.removeTag():"edit"==this.settings.backspace&&setTimeout(this.editTag.bind(this),0))}},onMouseOver:function(e){var t=e.target.closest(".tagify__dropdown__item");t&&this.dropdown.highlightOption.call(this,t)},onMouseLeave:function(){this.dropdown.highlightOption.call(this)},onClick:function(e){if(0==e.button&&e.target!=this.DOM.dropdown){var t=e.target.closest(".tagify__dropdown__item");this.dropdown.selectOption.call(this,t)}},onScroll:function(e){var t=e.target,n=t.scrollTop/(t.scrollHeight-t.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(n)})}}},highlightOption:function(e,t){var n,i="tagify__dropdown__item--active";if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(i),this.state.ddItemElm.removeAttribute("aria-selected")),!e)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);n=this.suggestedListItems[this.getNodeIndex(e)],this.state.ddItemData=n,(this.state.ddItemElm=e).classList.add(i),e.setAttribute("aria-selected",!0),t&&(e.parentNode.scrollTop=e.clientHeight+e.offsetTop-e.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,n),"manual"!=this.settings.dropdown.position&&this.dropdown.position.call(this))},selectOption:function(e){var t=this;if(e){this.state.actions.selectOption=!0,setTimeout(function(){return t.state.actions.selectOption=!1},50);var n=this.settings.dropdown.closeOnSelect,i=this.suggestedListItems[this.getNodeIndex(e)]||this.input.value;this.trigger("dropdown:select",i),this.addTags([i],!0),setTimeout(function(){t.DOM.input.focus(),t.toggleFocusClass(!0)}),n&&this.dropdown.hide.call(this)}},filterListItems:function(e){var t,n,i,o,r=this,s=this.settings,a=[],l=s.whitelist,c=s.dropdown.maxItems||1/0,u=s.dropdown.searchKeys.concat(["searchBy","value"]),d=0;if(!e)return(s.duplicates?l:l.filter(function(e){return!r.isTagDuplicate(e.value||e)})).slice(0,c);for(;d<l.length&&(t=l[d]instanceof Object?l[d]:{value:l[d]},i=u.reduce(function(e,n){return e+" "+(t[n]||"")},"").toLowerCase().indexOf(e.toLowerCase()),n=s.dropdown.fuzzySearch?0<=i:0==i,o=!s.duplicates&&this.isTagDuplicate(t.value),n&&!o&&c--&&a.push(t),0!=c);d++);return a},createListHTML:function(e){var t=this.settings.templates.dropdownItem.bind(this);return this.minify(e.map(t).join(""))}}}}(jQuery),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("jquery"));else if("function"==typeof define&&define.amd)define(["jquery"],t);else{var n="object"==typeof exports?t(require("jquery")):t(e.jQuery);for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(window,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(i,o,function(t){return e[t]}.bind(null,o));return i},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=53)}({0:function(t,n){t.exports=e},1:function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var r=n(0),s=n.n(r),a=function(){function e(t,n,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.markup=t,this.children=n,this.options=i,this.callback=o}var t,n,i;return t=e,(n=[{key:"render",value:function(e){var t=s()(this.markup);if(this.options&&this.options.contents&&t.html(this.options.contents),this.options&&this.options.className&&t.addClass(this.options.className),this.options&&this.options.data&&s.a.each(this.options.data,function(e,n){t.attr("data-"+e,n)}),this.options&&this.options.click&&t.on("click",this.options.click),this.children){var n=t.find(".note-children-container");this.children.forEach(function(e){e.render(n.length?n:t)})}return this.callback&&this.callback(t,this.options),this.options&&this.options.callback&&this.options.callback(t),e&&e.append(t),t}}])&&o(t.prototype,n),i&&o(t,i),e}();t.a={create:function(e,t){return function(){var n="object"===i(arguments[1])?arguments[1]:arguments[0],o=Array.isArray(arguments[0])?arguments[0]:[];return n&&n.children&&(o=n.children),new a(e,o,n,t)}}}},2:function(e,t){(function(t){e.exports=t}).call(this,{})},3:function(e,t,n){"use strict";function i(e){return-1===_e.a.inArray(e.toLowerCase(),we)?"'".concat(e,"'"):e}function o(e){return e[0]}function r(e){return e[e.length-1]}function s(e){return e.slice(1)}function a(e,t){if(e&&e.length&&t){if(e.indexOf)return-1!==e.indexOf(t);if(e.contains)return e.contains(t)}return!1}function l(e){return e&&_e()(e).hasClass("note-editable")}function c(e){return e=e.toUpperCase(),function(t){return t&&t.nodeName.toUpperCase()===e}}function u(e){return e&&3===e.nodeType}function d(e){return e&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(e.nodeName.toUpperCase())}function h(e){return!l(e)&&e&&/^DIV|^P|^LI|^H[1-7]/.test(e.nodeName.toUpperCase())}function p(e){return!(m(e)||f(e)||Ne(e)||h(e)||Re(e)||Be(e)||Le(e))}function f(e){return e&&/^UL|^OL/.test(e.nodeName.toUpperCase())}function g(e){return e&&/^TD|^TH/.test(e.nodeName.toUpperCase())}function m(e){return g(e)||Be(e)||l(e)}function v(e){return u(e)?e.nodeValue.length:e?e.childNodes.length:0}function _(e){var t=v(e);return 0===t||!u(e)&&1===t&&e.innerHTML===ze||!(!$e.all(e.childNodes,u)||""!==e.innerHTML)}function y(e){d(e)||v(e)||(e.innerHTML=ze)}function b(e,t){for(;e;){if(t(e))return e;if(l(e))break;e=e.parentNode}return null}function w(e,t){t=t||Ie.fail;var n=[];return b(e,function(e){return l(e)||n.push(e),t(e)}),n}function x(e,t){t=t||Ie.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.nextSibling;return n}function k(e,t){var n=t.nextSibling,i=t.parentNode;return n?i.insertBefore(e,n):i.appendChild(e),e}function C(e,t){return _e.a.each(t,function(t,n){e.appendChild(n)}),e}function S(e){return 0===e.offset}function T(e){return e.offset===v(e.node)}function E(e){return S(e)||T(e)}function P(e,t){for(;e&&e!==t;){if(0!==D(e))return!1;e=e.parentNode}return!0}function A(e,t){if(!t)return!1;for(;e&&e!==t;){if(D(e)!==v(e.parentNode)-1)return!1;e=e.parentNode}return!0}function D(e){for(var t=0;e=e.previousSibling;)t+=1;return t}function I(e){return!!(e&&e.childNodes&&e.childNodes.length)}function $(e,t){var n,i;if(0===e.offset){if(l(e.node))return null;n=e.node.parentNode,i=D(e.node)}else I(e.node)?i=v(n=e.node.childNodes[e.offset-1]):(n=e.node,i=t?0:e.offset-1);return{node:n,offset:i}}function O(e,t){var n,i;if(_(e.node))return null;if(v(e.node)===e.offset){if(l(e.node))return null;n=e.node.parentNode,i=D(e.node)+1}else if(I(e.node)){if(i=0,_(n=e.node.childNodes[e.offset]))return null}else if(n=e.node,i=t?v(e.node):e.offset+1,_(n))return null;return{node:n,offset:i}}function M(e,t){return e.node===t.node&&e.offset===t.offset}function F(e,t){var n=t&&t.isSkipPaddingBlankHTML,i=t&&t.isNotSplitEdgePoint,o=t&&t.isDiscardEmptySplits;if(o&&(n=!0),E(e)&&(u(e.node)||i)){if(S(e))return e.node;if(T(e))return e.node.nextSibling}if(u(e.node))return e.node.splitText(e.offset);var r=e.node.childNodes[e.offset],s=k(e.node.cloneNode(!1),e.node);return C(s,x(r)),n||(y(e.node),y(s)),o&&(_(e.node)&&N(e.node),_(s))?(N(s),e.node.nextSibling):s}function R(e,t,n){var i=w(t.node,Ie.eq(e));return i.length?1===i.length?F(t,n):i.reduce(function(e,i){return e===t.node&&(e=F(t,n)),F({node:i,offset:e?D(e):v(i)},n)}):null}function L(e){return document.createElement(e)}function N(e,t){if(e&&e.parentNode){if(e.removeNode)return e.removeNode(t);var n=e.parentNode;if(!t){for(var i=[],o=0,r=e.childNodes.length;o<r;o++)i.push(e.childNodes[o]);for(var s=0,a=i.length;s<a;s++)n.insertBefore(i[s],e)}n.removeChild(e)}}function B(e,t){var n=He(e[0])?e.val():e.html();return t?n.replace(/[\n\r]/g,""):n}function U(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function j(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function z(e,t){var n,i,o=e.parentElement(),r=document.body.createTextRange(),s=$e.from(o.childNodes);for(n=0;n<s.length;n++)if(!We.isText(s[n])){if(r.moveToElementText(s[n]),r.compareEndPoints("StartToStart",e)>=0)break;i=s[n]}if(0!==n&&We.isText(s[n-1])){var a=document.body.createTextRange(),l=null;a.moveToElementText(i||o),a.collapse(!i),l=i?i.nextSibling:o.firstChild;var c=e.duplicate();c.setEndPoint("StartToStart",a);for(var u=c.text.replace(/[\r\n]/g,"").length;u>l.nodeValue.length&&l.nextSibling;)u-=l.nodeValue.length,l=l.nextSibling;l.nodeValue,t&&l.nextSibling&&We.isText(l.nextSibling)&&u===l.nodeValue.length&&(u-=l.nodeValue.length,l=l.nextSibling),o=l,n=u}return{cont:o,offset:n}}function H(e){var t=document.body.createTextRange(),n=function e(t,n){var i,o;if(We.isText(t)){var r=We.listPrev(t,Ie.not(We.isText)),s=$e.last(r).previousSibling;i=s||t.parentNode,n+=$e.sum($e.tail(r),We.nodeLength),o=!s}else{if(i=t.childNodes[n]||t,We.isText(i))return e(i,0);n=0,o=!1}return{node:i,collapseToStart:o,offset:n}}(e.node,e.offset);return t.moveToElementText(n.node),t.collapse(n.collapseToStart),t.moveStart("character",n.offset),t}function W(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function q(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function V(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Y(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function G(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function X(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function K(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Q(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function J(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Z(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ee(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function te(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ne(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ie(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function oe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function re(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function se(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ae(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function le(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ce(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ue(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function de(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function he(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function pe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function fe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ge(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function me(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ve=n(0),_e=n.n(ve);_e.a.summernote=_e.a.summernote||{lang:{}},_e.a.extend(_e.a.summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size",sizeunit:"Font Size Unit"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize full",resizeHalf:"Resize half",resizeQuarter:"Resize quarter",resizeNone:"Original size",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Remove float",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image",original:"Original"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL",providers:"(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window",useProtocol:"Use default protocol"},table:{table:"Table",addRowAbove:"Add row above",addRowBelow:"Add row below",addColLeft:"Add column left",addColRight:"Add column right",delRow:"Delete row",delCol:"Delete column",delTable:"Delete table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",p:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Text Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default",cpSelect:"Select"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{insertParagraph:"Insert Paragraph",undo:"Undoes the last command",redo:"Redoes the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"},output:{noSelection:"No Selection Made!"}}});var ye,be="function"==typeof define&&n(2),we=["sans-serif","serif","monospace","cursive","fantasy"],xe=navigator.userAgent,ke=/MSIE|Trident/i.test(xe);if(ke){var Ce=/MSIE (\d+[.]\d+)/.exec(xe);Ce&&(ye=parseFloat(Ce[1])),(Ce=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(xe))&&(ye=parseFloat(Ce[1]))}var Se=/Edge\/\d+/.test(xe),Te=!!window.CodeMirror,Ee="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,Pe=ke?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input",Ae={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:ke,isEdge:Se,isFF:!Se&&/firefox/i.test(xe),isPhantom:/PhantomJS/i.test(xe),isWebkit:!Se&&/webkit/i.test(xe),isChrome:!Se&&/chrome/i.test(xe),isSafari:!Se&&/safari/i.test(xe)&&!/chrome/i.test(xe),browserVersion:ye,jqueryVersion:parseFloat(_e.a.fn.jquery),isSupportAmd:be,isSupportTouch:Ee,hasCodeMirror:Te,isFontInstalled:function(e){var t="Comic Sans MS"===e?"Courier New":"Comic Sans MS",n=document.createElement("canvas").getContext("2d");n.font="200px '"+t+"'";var o=n.measureText("mmmmmmmmmmwwwww").width;return n.font="200px "+i(e)+', "'+t+'"',o!==n.measureText("mmmmmmmmmmwwwww").width},isW3CRangeSupport:!!document.createRange,inputEventName:Pe,genericFontFamilies:we,validFontName:i},De=0,Ie={eq:function(e){return function(t){return e===t}},eq2:function(e,t){return e===t},peq2:function(e){return function(t,n){return t[e]===n[e]}},ok:function(){return!0},fail:function(){return!1},self:function(e){return e},not:function(e){return function(){return!e.apply(e,arguments)}},and:function(e,t){return function(n){return e(n)&&t(n)}},invoke:function(e,t){return function(){return e[t].apply(e,arguments)}},resetUniqueId:function(){De=0},uniqueId:function(e){var t=++De+"";return e?e+t:t},rect2bnd:function(e){var t=_e()(document);return{top:e.top+t.scrollTop(),left:e.left+t.scrollLeft(),width:e.right-e.left,height:e.bottom-e.top}},invertObject:function(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[e[n]]=n);return t},namespaceToCamel:function(e,t){return(t=t||"")+e.split(".").map(function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}).join("")},debounce:function(e,t,n){var i;return function(){var o=this,r=arguments,s=function(){i=null,n||e.apply(o,r)},a=n&&!i;clearTimeout(i),i=setTimeout(s,t),a&&e.apply(o,r)}},isValidUrl:function(e){return/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi.test(e)}},$e={head:o,last:r,initial:function(e){return e.slice(0,e.length-1)},tail:s,prev:function(e,t){if(e&&e.length&&t){var n=e.indexOf(t);return-1===n?null:e[n-1]}return null},next:function(e,t){if(e&&e.length&&t){var n=e.indexOf(t);return-1===n?null:e[n+1]}return null},find:function(e,t){for(var n=0,i=e.length;n<i;n++){var o=e[n];if(t(o))return o}},contains:a,all:function(e,t){for(var n=0,i=e.length;n<i;n++)if(!t(e[n]))return!1;return!0},sum:function(e,t){return t=t||Ie.self,e.reduce(function(e,n){return e+t(n)},0)},from:function(e){for(var t=[],n=e.length,i=-1;++i<n;)t[i]=e[i];return t},isEmpty:function(e){return!e||!e.length},clusterBy:function(e,t){return e.length?s(e).reduce(function(e,n){var i=r(e);return t(r(i),n)?i[i.length]=n:e[e.length]=[n],e},[[o(e)]]):[]},compact:function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&t.push(e[n]);return t},unique:function(e){for(var t=[],n=0,i=e.length;n<i;n++)a(t,e[n])||t.push(e[n]);return t}},Oe=String.fromCharCode(160),Me=c("PRE"),Fe=c("LI"),Re=c("TABLE"),Le=c("DATA"),Ne=c("HR"),Be=c("BLOCKQUOTE"),Ue=c("A"),je=c("BODY"),ze=Ae.isMSIE&&Ae.browserVersion<11?"&nbsp;":"<br>",He=c("TEXTAREA"),We={NBSP_CHAR:Oe,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:ze,emptyPara:"<p>".concat(ze,"</p>"),makePredByNodeName:c,isEditable:l,isControlSizing:function(e){return e&&_e()(e).hasClass("note-control-sizing")},isText:u,isElement:function(e){return e&&1===e.nodeType},isVoid:d,isPara:h,isPurePara:function(e){return h(e)&&!Fe(e)},isHeading:function(e){return e&&/^H[1-7]/.test(e.nodeName.toUpperCase())},isInline:p,isBlock:Ie.not(p),isBodyInline:function(e){return p(e)&&!b(e,h)},isBody:je,isParaInline:function(e){return p(e)&&!!b(e,h)},isPre:Me,isList:f,isTable:Re,isData:Le,isCell:g,isBlockquote:Be,isBodyContainer:m,isAnchor:Ue,isDiv:c("DIV"),isLi:Fe,isBR:c("BR"),isSpan:c("SPAN"),isB:c("B"),isU:c("U"),isS:c("S"),isI:c("I"),isImg:c("IMG"),isTextarea:He,deepestChildIsEmpty:function(e){do{if(null===e.firstElementChild||""===e.firstElementChild.innerHTML)break}while(e=e.firstElementChild);return _(e)},isEmpty:_,isEmptyAnchor:Ie.and(Ue,_),isClosestSibling:function(e,t){return e.nextSibling===t||e.previousSibling===t},withClosestSiblings:function(e,t){t=t||Ie.ok;var n=[];return e.previousSibling&&t(e.previousSibling)&&n.push(e.previousSibling),n.push(e),e.nextSibling&&t(e.nextSibling)&&n.push(e.nextSibling),n},nodeLength:v,isLeftEdgePoint:S,isRightEdgePoint:T,isEdgePoint:E,isLeftEdgeOf:P,isRightEdgeOf:A,isLeftEdgePointOf:function(e,t){return S(e)&&P(e.node,t)},isRightEdgePointOf:function(e,t){return T(e)&&A(e.node,t)},prevPoint:$,nextPoint:O,isSamePoint:M,isVisiblePoint:function(e){if(u(e.node)||!I(e.node)||_(e.node))return!0;var t=e.node.childNodes[e.offset-1],n=e.node.childNodes[e.offset];return!(t&&!d(t)||n&&!d(n))},prevPointUntil:function(e,t){for(;e;){if(t(e))return e;e=$(e)}return null},nextPointUntil:function(e,t){for(;e;){if(t(e))return e;e=O(e)}return null},isCharPoint:function(e){if(!u(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return t&&" "!==t&&t!==Oe},isSpacePoint:function(e){if(!u(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return" "===t||t===Oe},walkPoint:function(e,t,n,i){for(var o=e;o&&(n(o),!M(o,t));)o=O(o,i&&e.node!==o.node&&t.node!==o.node)},ancestor:b,singleChildAncestor:function(e,t){for(e=e.parentNode;e&&1===v(e);){if(t(e))return e;if(l(e))break;e=e.parentNode}return null},listAncestor:w,lastAncestor:function(e,t){var n=w(e);return $e.last(n.filter(t))},listNext:x,listPrev:function(e,t){t=t||Ie.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.previousSibling;return n},listDescendant:function(e,t){var n=[];return t=t||Ie.ok,function i(o){e!==o&&t(o)&&n.push(o);for(var r=0,s=o.childNodes.length;r<s;r++)i(o.childNodes[r])}(e),n},commonAncestor:function(e,t){for(var n=w(e),i=t;i;i=i.parentNode)if(n.indexOf(i)>-1)return i;return null},wrap:function(e,t){var n=e.parentNode,i=_e()("<"+t+">")[0];return n.insertBefore(i,e),i.appendChild(e),i},insertAfter:k,appendChildNodes:C,position:D,hasChildren:I,makeOffsetPath:function(e,t){return w(t,Ie.eq(e)).map(D).reverse()},fromOffsetPath:function(e,t){for(var n=e,i=0,o=t.length;i<o;i++)n=n.childNodes.length<=t[i]?n.childNodes[n.childNodes.length-1]:n.childNodes[t[i]];return n},splitTree:R,splitPoint:function(e,t){var n,i,o=t?h:m,r=w(e.node,o),s=$e.last(r)||e.node;o(s)?(n=r[r.length-2],i=s):i=(n=s).parentNode;var a=n&&R(n,e,{isSkipPaddingBlankHTML:t,isNotSplitEdgePoint:t});return a||i!==e.node||(a=e.node.childNodes[e.offset]),{rightNode:a,container:i}},create:L,createText:function(e){return document.createTextNode(e)},remove:N,removeWhile:function(e,t){for(;e&&!l(e)&&t(e);){var n=e.parentNode;N(e),e=n}},replace:function(e,t){if(e.nodeName.toUpperCase()===t.toUpperCase())return e;var n=L(t);return e.style.cssText&&(n.style.cssText=e.style.cssText),C(n,$e.from(e.childNodes)),k(n,e),N(e),n},html:function(e,t){var n=B(e);return t&&(n=(n=n.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,function(e,t,n){n=n.toUpperCase();var i=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!t,o=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return e+(i||o?"\n":"")})).trim()),n},value:B,posFromPlaceholder:function(e){var t=_e()(e),n=t.offset(),i=t.outerHeight(!0);return{left:n.left,top:n.top+i}},attachEvents:function(e,t){Object.keys(t).forEach(function(n){e.on(n,t[n])})},detachEvents:function(e,t){Object.keys(t).forEach(function(n){e.off(n,t[n])})},isCustomStyleTag:function(e){return e&&!u(e)&&$e.contains(e.classList,"note-styletag")}},qe=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$note=t,this.memos={},this.modules={},this.layoutInfo={},this.options=_e.a.extend(!0,{},n),_e.a.summernote.ui=_e.a.summernote.ui_template(this.options),this.ui=_e.a.summernote.ui,this.initialize()}var t,n,i;return t=e,(n=[{key:"initialize",value:function(){return this.layoutInfo=this.ui.createLayout(this.$note),this._initialize(),this.$note.hide(),this}},{key:"destroy",value:function(){this._destroy(),this.$note.removeData("summernote"),this.ui.removeLayout(this.$note,this.layoutInfo)}},{key:"reset",value:function(){var e=this.isDisabled();this.code(We.emptyPara),this._destroy(),this._initialize(),e&&this.disable()}},{key:"_initialize",value:function(){var e=this;this.options.id=Ie.uniqueId(_e.a.now()),this.options.container=this.options.container||this.layoutInfo.editor;var t=_e.a.extend({},this.options.buttons);Object.keys(t).forEach(function(n){e.memo("button."+n,t[n])});var n=_e.a.extend({},this.options.modules,_e.a.summernote.plugins||{});Object.keys(n).forEach(function(t){e.module(t,n[t],!0)}),Object.keys(this.modules).forEach(function(t){e.initializeModule(t)})}},{key:"_destroy",value:function(){var e=this;Object.keys(this.modules).reverse().forEach(function(t){e.removeModule(t)}),Object.keys(this.memos).forEach(function(t){e.removeMemo(t)}),this.triggerEvent("destroy",this)}},{key:"code",value:function(e){var t=this.invoke("codeview.isActivated");if(void 0===e)return this.invoke("codeview.sync"),t?this.layoutInfo.codable.val():this.layoutInfo.editable.html();t?this.layoutInfo.codable.val(e):this.layoutInfo.editable.html(e),this.$note.val(e),this.triggerEvent("change",e,this.layoutInfo.editable)}},{key:"isDisabled",value:function(){return"false"===this.layoutInfo.editable.attr("contenteditable")}},{key:"enable",value:function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1),this.options.editing=!0}},{key:"disable",value:function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.options.editing=!1,this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)}},{key:"triggerEvent",value:function(){var e=$e.head(arguments),t=$e.tail($e.from(arguments)),n=this.options.callbacks[Ie.namespaceToCamel(e,"on")];n&&n.apply(this.$note[0],t),this.$note.trigger("summernote."+e,t)}},{key:"initializeModule",value:function(e){var t=this.modules[e];t.shouldInitialize=t.shouldInitialize||Ie.ok,t.shouldInitialize()&&(t.initialize&&t.initialize(),t.events&&We.attachEvents(this.$note,t.events))}},{key:"module",value:function(e,t,n){if(1===arguments.length)return this.modules[e];this.modules[e]=new t(this),n||this.initializeModule(e)}},{
key:"removeModule",value:function(e){var t=this.modules[e];t.shouldInitialize()&&(t.events&&We.detachEvents(this.$note,t.events),t.destroy&&t.destroy()),delete this.modules[e]}},{key:"memo",value:function(e,t){if(1===arguments.length)return this.memos[e];this.memos[e]=t}},{key:"removeMemo",value:function(e){this.memos[e]&&this.memos[e].destroy&&this.memos[e].destroy(),delete this.memos[e]}},{key:"createInvokeHandlerAndUpdateState",value:function(e,t){var n=this;return function(i){n.createInvokeHandler(e,t)(i),n.invoke("buttons.updateCurrentStyle")}}},{key:"createInvokeHandler",value:function(e,t){var n=this;return function(i){i.preventDefault();var o=_e()(i.target);n.invoke(e,t||o.closest("[data-value]").data("value"),o)}}},{key:"invoke",value:function(){var e=$e.head(arguments),t=$e.tail($e.from(arguments)),n=e.split("."),i=n.length>1,o=i&&$e.head(n),r=i?$e.last(n):$e.head(n),s=this.modules[o||"editor"];return!o&&this[r]?this[r].apply(this,t):s&&s[r]&&s.shouldInitialize()?s[r].apply(s,t):void 0}}])&&U(t.prototype,n),i&&U(t,i),e}();_e.a.fn.extend({summernote:function(){var e=_e.a.type($e.head(arguments)),t="string"===e,n="object"===e,i=_e.a.extend({},_e.a.summernote.options,n?$e.head(arguments):{});i.langInfo=_e.a.extend(!0,{},_e.a.summernote.lang["en-US"],_e.a.summernote.lang[i.lang]),i.icons=_e.a.extend(!0,{},_e.a.summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!Ae.isSupportTouch:i.tooltip,this.each(function(e,t){var n=_e()(t);if(!n.data("summernote")){var o=new qe(n,i);n.data("summernote",o),n.data("summernote").triggerEvent("init",o.layoutInfo)}});var o=this.first();if(o.length){var r=o.data("summernote");if(t)return r.invoke.apply(r,$e.from(arguments));i.focus&&r.invoke("editor.focus")}return this}});var Ve=function(){function e(t,n,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sc=t,this.so=n,this.ec=i,this.eo=o,this.isOnEditable=this.makeIsOn(We.isEditable),this.isOnList=this.makeIsOn(We.isList),this.isOnAnchor=this.makeIsOn(We.isAnchor),this.isOnCell=this.makeIsOn(We.isCell),this.isOnData=this.makeIsOn(We.isData)}var t,n,i;return t=e,(n=[{key:"nativeRange",value:function(){if(Ae.isW3CRangeSupport){var e=document.createRange();return e.setStart(this.sc,this.sc.data&&this.so>this.sc.data.length?0:this.so),e.setEnd(this.ec,this.sc.data?Math.min(this.eo,this.sc.data.length):this.eo),e}var t=H({node:this.sc,offset:this.so});return t.setEndPoint("EndToEnd",H({node:this.ec,offset:this.eo})),t}},{key:"getPoints",value:function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}}},{key:"getStartPoint",value:function(){return{node:this.sc,offset:this.so}}},{key:"getEndPoint",value:function(){return{node:this.ec,offset:this.eo}}},{key:"select",value:function(){var e=this.nativeRange();if(Ae.isW3CRangeSupport){var t=document.getSelection();t.rangeCount>0&&t.removeAllRanges(),t.addRange(e)}else e.select();return this}},{key:"scrollIntoView",value:function(e){var t=_e()(e).height();return e.scrollTop+t<this.sc.offsetTop&&(e.scrollTop+=Math.abs(e.scrollTop+t-this.sc.offsetTop)),this}},{key:"normalize",value:function(){var t=function(e,t){if(!e)return e;if(We.isVisiblePoint(e)&&(!We.isEdgePoint(e)||We.isRightEdgePoint(e)&&!t||We.isLeftEdgePoint(e)&&t||We.isRightEdgePoint(e)&&t&&We.isVoid(e.node.nextSibling)||We.isLeftEdgePoint(e)&&!t&&We.isVoid(e.node.previousSibling)||We.isBlock(e.node)&&We.isEmpty(e.node)))return e;var n=We.ancestor(e.node,We.isBlock),i=!1;if(!i){var o=We.prevPoint(e)||{node:null};i=(We.isLeftEdgePointOf(e,n)||We.isVoid(o.node))&&!t}var r=!1;if(!r){var s=We.nextPoint(e)||{node:null};r=(We.isRightEdgePointOf(e,n)||We.isVoid(s.node))&&t}if(i||r){if(We.isVisiblePoint(e))return e;t=!t}return(t?We.nextPointUntil(We.nextPoint(e),We.isVisiblePoint):We.prevPointUntil(We.prevPoint(e),We.isVisiblePoint))||e},n=t(this.getEndPoint(),!1),i=this.isCollapsed()?n:t(this.getStartPoint(),!0);return new e(i.node,i.offset,n.node,n.offset)}},{key:"nodes",value:function(e,t){e=e||Ie.ok;var n=t&&t.includeAncestor,i=t&&t.fullyContains,o=this.getStartPoint(),r=this.getEndPoint(),s=[],a=[];return We.walkPoint(o,r,function(t){var o;We.isEditable(t.node)||(i?(We.isLeftEdgePoint(t)&&a.push(t.node),We.isRightEdgePoint(t)&&$e.contains(a,t.node)&&(o=t.node)):o=n?We.ancestor(t.node,e):t.node,o&&e(o)&&s.push(o))},!0),$e.unique(s)}},{key:"commonAncestor",value:function(){return We.commonAncestor(this.sc,this.ec)}},{key:"expand",value:function(t){var n=We.ancestor(this.sc,t),i=We.ancestor(this.ec,t);if(!n&&!i)return new e(this.sc,this.so,this.ec,this.eo);var o=this.getPoints();return n&&(o.sc=n,o.so=0),i&&(o.ec=i,o.eo=We.nodeLength(i)),new e(o.sc,o.so,o.ec,o.eo)}},{key:"collapse",value:function(t){return t?new e(this.sc,this.so,this.sc,this.so):new e(this.ec,this.eo,this.ec,this.eo)}},{key:"splitText",value:function(){var t=this.sc===this.ec,n=this.getPoints();return We.isText(this.ec)&&!We.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),We.isText(this.sc)&&!We.isEdgePoint(this.getStartPoint())&&(n.sc=this.sc.splitText(this.so),n.so=0,t&&(n.ec=n.sc,n.eo=this.eo-this.so)),new e(n.sc,n.so,n.ec,n.eo)}},{key:"deleteContents",value:function(){if(this.isCollapsed())return this;var t=this.splitText(),n=t.nodes(null,{fullyContains:!0}),i=We.prevPointUntil(t.getStartPoint(),function(e){return!$e.contains(n,e.node)}),o=[];return _e.a.each(n,function(e,t){var n=t.parentNode;i.node!==n&&1===We.nodeLength(n)&&o.push(n),We.remove(t,!1)}),_e.a.each(o,function(e,t){We.remove(t,!1)}),new e(i.node,i.offset,i.node,i.offset).normalize()}},{key:"makeIsOn",value:function(e){return function(){var t=We.ancestor(this.sc,e);return!!t&&t===We.ancestor(this.ec,e)}}},{key:"isLeftEdgeOf",value:function(e){if(!We.isLeftEdgePoint(this.getStartPoint()))return!1;var t=We.ancestor(this.sc,e);return t&&We.isLeftEdgeOf(this.sc,t)}},{key:"isCollapsed",value:function(){return this.sc===this.ec&&this.so===this.eo}},{key:"wrapBodyInlineWithPara",value:function(){if(We.isBodyContainer(this.sc)&&We.isEmpty(this.sc))return this.sc.innerHTML=We.emptyPara,new e(this.sc.firstChild,0,this.sc.firstChild,0);var t,n=this.normalize();if(We.isParaInline(this.sc)||We.isPara(this.sc))return n;if(We.isInline(n.sc)){var i=We.listAncestor(n.sc,Ie.not(We.isInline));t=$e.last(i),We.isInline(t)||(t=i[i.length-2]||n.sc.childNodes[n.so])}else t=n.sc.childNodes[n.so>0?n.so-1:0];if(t){var o=We.listPrev(t,We.isParaInline).reverse();if((o=o.concat(We.listNext(t.nextSibling,We.isParaInline))).length){var r=We.wrap($e.head(o),"p");We.appendChildNodes(r,$e.tail(o))}}return this.normalize()}},{key:"insertNode",value:function(e){var t=this;(We.isText(e)||We.isInline(e))&&(t=this.wrapBodyInlineWithPara().deleteContents());var n=We.splitPoint(t.getStartPoint(),We.isInline(e));return n.rightNode?n.rightNode.parentNode.insertBefore(e,n.rightNode):n.container.appendChild(e),e}},{key:"pasteHTML",value:function(e){e=_e.a.trim(e);var t=_e()("<div></div>").html(e)[0],n=$e.from(t.childNodes),i=this;return i.so>=0&&(n=n.reverse()),n=n.map(function(e){return i.insertNode(e)}),i.so>0&&(n=n.reverse()),n}},{key:"toString",value:function(){var e=this.nativeRange();return Ae.isW3CRangeSupport?e.toString():e.text}},{key:"getWordRange",value:function(t){var n=this.getEndPoint();if(!We.isCharPoint(n))return this;var i=We.prevPointUntil(n,function(e){return!We.isCharPoint(e)});return t&&(n=We.nextPointUntil(n,function(e){return!We.isCharPoint(e)})),new e(i.node,i.offset,n.node,n.offset)}},{key:"getWordsRange",value:function(t){var n=this.getEndPoint(),i=function(e){return!We.isCharPoint(e)&&!We.isSpacePoint(e)};if(i(n))return this;var o=We.prevPointUntil(n,i);return t&&(n=We.nextPointUntil(n,i)),new e(o.node,o.offset,n.node,n.offset)}},{key:"getWordsMatchRange",value:function(t){var n=this.getEndPoint(),i=We.prevPointUntil(n,function(i){if(!We.isCharPoint(i)&&!We.isSpacePoint(i))return!0;var o=new e(i.node,i.offset,n.node,n.offset),r=t.exec(o.toString());return r&&0===r.index}),o=new e(i.node,i.offset,n.node,n.offset),r=o.toString(),s=t.exec(r);return s&&s[0].length===r.length?o:null}},{key:"bookmark",value:function(e){return{s:{path:We.makeOffsetPath(e,this.sc),offset:this.so},e:{path:We.makeOffsetPath(e,this.ec),offset:this.eo}}}},{key:"paraBookmark",value:function(e){return{s:{path:$e.tail(We.makeOffsetPath($e.head(e),this.sc)),offset:this.so},e:{path:$e.tail(We.makeOffsetPath($e.last(e),this.ec)),offset:this.eo}}}},{key:"getClientRects",value:function(){return this.nativeRange().getClientRects()}}])&&j(t.prototype,n),i&&j(t,i),e}(),Ye={create:function(e,t,n,i){if(4===arguments.length)return new Ve(e,t,n,i);if(2===arguments.length)return new Ve(e,t,n=e,i=t);var o=this.createFromSelection();if(!o&&1===arguments.length){var r=arguments[0];return We.isEditable(r)&&(r=r.lastChild),this.createFromBodyElement(r,We.emptyPara===arguments[0].innerHTML)}return o},createFromBodyElement:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.createFromNode(e);return n.collapse(t)},createFromSelection:function(){var e,t,n,i;if(Ae.isW3CRangeSupport){var o=document.getSelection();if(!o||0===o.rangeCount)return null;if(We.isBody(o.anchorNode))return null;var r=o.getRangeAt(0);e=r.startContainer,t=r.startOffset,n=r.endContainer,i=r.endOffset}else{var s=document.selection.createRange(),a=s.duplicate();a.collapse(!1);var l=s;l.collapse(!0);var c=z(l,!0),u=z(a,!1);We.isText(c.node)&&We.isLeftEdgePoint(c)&&We.isTextNode(u.node)&&We.isRightEdgePoint(u)&&u.node.nextSibling===c.node&&(c=u),e=c.cont,t=c.offset,n=u.cont,i=u.offset}return new Ve(e,t,n,i)},createFromNode:function(e){var t=e,n=0,i=e,o=We.nodeLength(i);return We.isVoid(t)&&(n=We.listPrev(t).length-1,t=t.parentNode),We.isBR(i)?(o=We.listPrev(i).length-1,i=i.parentNode):We.isVoid(i)&&(o=We.listPrev(i).length,i=i.parentNode),this.create(t,n,i,o)},createFromNodeBefore:function(e){return this.createFromNode(e).collapse(!0)},createFromNodeAfter:function(e){return this.createFromNode(e).collapse()},createFromBookmark:function(e,t){var n=We.fromOffsetPath(e,t.s.path),i=t.s.offset,o=We.fromOffsetPath(e,t.e.path),r=t.e.offset;return new Ve(n,i,o,r)},createFromParaBookmark:function(e,t){var n=e.s.offset,i=e.e.offset,o=We.fromOffsetPath($e.head(t),e.s.path),r=We.fromOffsetPath($e.last(t),e.e.path);return new Ve(o,n,r,i)}},Ge={BACKSPACE:8,TAB:9,ENTER:13,SPACE:32,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34},Xe={isEdit:function(e){return $e.contains([Ge.BACKSPACE,Ge.TAB,Ge.ENTER,Ge.SPACE,Ge.DELETE],e)},isMove:function(e){return $e.contains([Ge.LEFT,Ge.UP,Ge.RIGHT,Ge.DOWN],e)},isNavigation:function(e){return $e.contains([Ge.HOME,Ge.END,Ge.PAGEUP,Ge.PAGEDOWN],e)},nameFromCode:Ie.invertObject(Ge),code:Ge},Ke=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.stack=[],this.stackOffset=-1,this.context=t,this.$editable=t.layoutInfo.editable,this.editable=this.$editable[0]}var t,n,i;return t=e,(n=[{key:"makeSnapshot",value:function(){var e=Ye.create(this.editable);return{contents:this.$editable.html(),bookmark:e&&e.isOnEditable()?e.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}}},{key:"applySnapshot",value:function(e){null!==e.contents&&this.$editable.html(e.contents),null!==e.bookmark&&Ye.createFromBookmark(this.editable,e.bookmark).select()}},{key:"rewind",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset=0,this.applySnapshot(this.stack[this.stackOffset])}},{key:"commit",value:function(){this.stack=[],this.stackOffset=-1,this.recordUndo()}},{key:"reset",value:function(){this.stack=[],this.stackOffset=-1,this.$editable.html(""),this.recordUndo()}},{key:"undo",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset>0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"redo",value:function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"recordUndo",value:function(){this.stackOffset++,this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset)),this.stack.push(this.makeSnapshot()),this.stack.length>this.context.options.historyLimit&&(this.stack.shift(),this.stackOffset-=1)}}])&&W(t.prototype,n),i&&W(t,i),e}(),Qe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"jQueryCSS",value:function(e,t){if(Ae.jqueryVersion<1.9){var n={};return _e.a.each(t,function(t,i){n[i]=e.css(i)}),n}return e.css(t)}},{key:"fromNode",value:function(e){var t=this.jQueryCSS(e,["font-family","font-size","text-align","list-style-type","line-height"])||{},n=e[0].style.fontSize||t["font-size"];return t["font-size"]=parseInt(n,10),t["font-size-unit"]=n.match(/[a-z%]+$/),t}},{key:"stylePara",value:function(e,t){_e.a.each(e.nodes(We.isPara,{includeAncestor:!0}),function(e,n){_e()(n).css(t)})}},{key:"styleNodes",value:function(e,t){e=e.splitText();var n=t&&t.nodeName||"SPAN",i=!(!t||!t.expandClosestSibling),o=!(!t||!t.onlyPartialContains);if(e.isCollapsed())return[e.insertNode(We.create(n))];var r=We.makePredByNodeName(n),s=e.nodes(We.isText,{fullyContains:!0}).map(function(e){return We.singleChildAncestor(e,r)||We.wrap(e,n)});if(i){if(o){var a=e.nodes();r=Ie.and(r,function(e){return $e.contains(a,e)})}return s.map(function(e){var t=We.withClosestSiblings(e,r),n=$e.head(t),i=$e.tail(t);return _e.a.each(i,function(e,t){We.appendChildNodes(n,t.childNodes),We.remove(t)}),$e.head(t)})}return s}},{key:"current",value:function(e){var t=_e()(We.isElement(e.sc)?e.sc:e.sc.parentNode),n=this.fromNode(t);try{n=_e.a.extend(n,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||n["font-family"]})}catch(e){}if(e.isOnList()){var i=["circle","disc","disc-leading-zero","square"].indexOf(n["list-style-type"])>-1;n["list-style"]=i?"unordered":"ordered"}else n["list-style"]="none";var o=We.ancestor(e.sc,We.isPara);if(o&&o.style["line-height"])n["line-height"]=o.style.lineHeight;else{var r=parseInt(n["line-height"],10)/parseInt(n["font-size"],10);n["line-height"]=r.toFixed(1)}return n.anchor=e.isOnAnchor()&&We.ancestor(e.sc,We.isAnchor),n.ancestors=We.listAncestor(e.sc,We.isEditable),n.range=e,n}}])&&q(t.prototype,n),i&&q(t,i),e}(),Je=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"insertOrderedList",value:function(e){this.toggleList("OL",e)}},{key:"insertUnorderedList",value:function(e){this.toggleList("UL",e)}},{key:"indent",value:function(e){var t=this,n=Ye.create(e).wrapBodyInlineWithPara(),i=n.nodes(We.isPara,{includeAncestor:!0}),o=$e.clusterBy(i,Ie.peq2("parentNode"));_e.a.each(o,function(e,n){var i=$e.head(n);if(We.isLi(i)){var o=t.findList(i.previousSibling);o?n.map(function(e){return o.appendChild(e)}):(t.wrapList(n,i.parentNode.nodeName),n.map(function(e){return e.parentNode}).map(function(e){return t.appendToPrevious(e)}))}else _e.a.each(n,function(e,t){_e()(t).css("marginLeft",function(e,t){return(parseInt(t,10)||0)+25})})}),n.select()}},{key:"outdent",value:function(e){var t=this,n=Ye.create(e).wrapBodyInlineWithPara(),i=n.nodes(We.isPara,{includeAncestor:!0}),o=$e.clusterBy(i,Ie.peq2("parentNode"));_e.a.each(o,function(e,n){var i=$e.head(n);We.isLi(i)?t.releaseList([n]):_e.a.each(n,function(e,t){_e()(t).css("marginLeft",function(e,t){return(t=parseInt(t,10)||0)>25?t-25:""})})}),n.select()}},{key:"toggleList",value:function(e,t){var n=this,i=Ye.create(t).wrapBodyInlineWithPara(),o=i.nodes(We.isPara,{includeAncestor:!0}),r=i.paraBookmark(o),s=$e.clusterBy(o,Ie.peq2("parentNode"));if($e.find(o,We.isPurePara)){var a=[];_e.a.each(s,function(t,i){a=a.concat(n.wrapList(i,e))}),o=a}else{var l=i.nodes(We.isList,{includeAncestor:!0}).filter(function(t){return!_e.a.nodeName(t,e)});l.length?_e.a.each(l,function(t,n){We.replace(n,e)}):o=this.releaseList(s,!0)}Ye.createFromParaBookmark(r,o).select()}},{key:"wrapList",value:function(e,t){var n=$e.head(e),i=$e.last(e),o=We.isList(n.previousSibling)&&n.previousSibling,r=We.isList(i.nextSibling)&&i.nextSibling,s=o||We.insertAfter(We.create(t||"UL"),i);return e=e.map(function(e){return We.isPurePara(e)?We.replace(e,"LI"):e}),We.appendChildNodes(s,e),r&&(We.appendChildNodes(s,$e.from(r.childNodes)),We.remove(r)),e}},{key:"releaseList",value:function(e,t){var n=this,i=[];return _e.a.each(e,function(e,o){var r=$e.head(o),s=$e.last(o),a=t?We.lastAncestor(r,We.isList):r.parentNode,l=a.parentNode;if("LI"===a.parentNode.nodeName)o.map(function(e){var t=n.findNextSiblings(e);l.nextSibling?l.parentNode.insertBefore(e,l.nextSibling):l.parentNode.appendChild(e),t.length&&(n.wrapList(t,a.nodeName),e.appendChild(t[0].parentNode))}),0===a.children.length&&l.removeChild(a),0===l.childNodes.length&&l.parentNode.removeChild(l);else{var c=a.childNodes.length>1?We.splitTree(a,{node:s.parentNode,offset:We.position(s)+1},{isSkipPaddingBlankHTML:!0}):null,u=We.splitTree(a,{node:r.parentNode,offset:We.position(r)},{isSkipPaddingBlankHTML:!0});o=t?We.listDescendant(u,We.isLi):$e.from(u.childNodes).filter(We.isLi),!t&&We.isList(a.parentNode)||(o=o.map(function(e){return We.replace(e,"P")})),_e.a.each($e.from(o).reverse(),function(e,t){We.insertAfter(t,a)});var d=$e.compact([a,u,c]);_e.a.each(d,function(e,t){var n=[t].concat(We.listDescendant(t,We.isList));_e.a.each(n.reverse(),function(e,t){We.nodeLength(t)||We.remove(t,!0)})})}i=i.concat(o)}),i}},{key:"appendToPrevious",value:function(e){return e.previousSibling?We.appendChildNodes(e.previousSibling,[e]):this.wrapList([e],"LI")}},{key:"findList",value:function(e){return e?$e.find(e.children,function(e){return["OL","UL"].indexOf(e.nodeName)>-1}):null}},{key:"findNextSiblings",value:function(e){for(var t=[];e.nextSibling;)t.push(e.nextSibling),e=e.nextSibling;return t}}])&&V(t.prototype,n),i&&V(t,i),e}(),Ze=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bullet=new Je,this.options=t.options}var t,n,i;return t=e,(n=[{key:"insertTab",value:function(e,t){var n=We.createText(new Array(t+1).join(We.NBSP_CHAR));(e=e.deleteContents()).insertNode(n,!0),(e=Ye.create(n,t)).select()}},{key:"insertParagraph",value:function(e,t){t=(t=(t=t||Ye.create(e)).deleteContents()).wrapBodyInlineWithPara();var n,i=We.ancestor(t.sc,We.isPara);if(i){if(We.isLi(i)&&(We.isEmpty(i)||We.deepestChildIsEmpty(i)))return void this.bullet.toggleList(i.parentNode.nodeName);var o=null;if(1===this.options.blockquoteBreakingLevel?o=We.ancestor(i,We.isBlockquote):2===this.options.blockquoteBreakingLevel&&(o=We.lastAncestor(i,We.isBlockquote)),o){n=_e()(We.emptyPara)[0],We.isRightEdgePoint(t.getStartPoint())&&We.isBR(t.sc.nextSibling)&&_e()(t.sc.nextSibling).remove();var r=We.splitTree(o,t.getStartPoint(),{isDiscardEmptySplits:!0});r?r.parentNode.insertBefore(n,r):We.insertAfter(n,o)}else{n=We.splitTree(i,t.getStartPoint());var s=We.listDescendant(i,We.isEmptyAnchor);s=s.concat(We.listDescendant(n,We.isEmptyAnchor)),_e.a.each(s,function(e,t){We.remove(t)}),(We.isHeading(n)||We.isPre(n)||We.isCustomStyleTag(n))&&We.isEmpty(n)&&(n=We.replace(n,"p"))}}else{var a=t.sc.childNodes[t.so];n=_e()(We.emptyPara)[0],a?t.sc.insertBefore(n,a):t.sc.appendChild(n)}Ye.create(n,0).normalize().select().scrollIntoView(e)}}])&&Y(t.prototype,n),i&&Y(t,i),e}(),et=function e(t,n,i,o){function r(e,t,n,i,o,r,s){var a={baseRow:n,baseCell:i,isRowSpan:o,isColSpan:r,isVirtual:s};p[e]||(p[e]=[]),p[e][t]=a}function s(e,t,n,i){return{baseCell:e.baseCell,action:t,virtualTable:{rowIndex:n,cellIndex:i}}}function a(e,t){if(!p[e])return t;if(!p[e][t])return t;for(var n=t;p[e][n];)if(n++,!p[e][n])return n}function l(e,t){var n=a(e.rowIndex,t.cellIndex),i=t.colSpan>1,o=t.rowSpan>1,s=e.rowIndex===h.rowPos&&t.cellIndex===h.colPos;r(e.rowIndex,n,e,t,o,i,!1);var l=t.attributes.rowSpan?parseInt(t.attributes.rowSpan.value,10):0;if(l>1)for(var u=1;u<l;u++){var d=e.rowIndex+u;c(d,n,t,s),r(d,n,e,t,!0,i,!0)}var p=t.attributes.colSpan?parseInt(t.attributes.colSpan.value,10):0;if(p>1)for(var f=1;f<p;f++){var g=a(e.rowIndex,n+f);c(e.rowIndex,g,t,s),r(e.rowIndex,g,e,t,o,!0,!0)}}function c(e,t,n,i){e===h.rowPos&&h.colPos>=n.cellIndex&&n.cellIndex<=t&&!i&&h.colPos++}function u(t){switch(n){case e.where.Column:if(t.isColSpan)return e.resultAction.SubtractSpanCount;break;case e.where.Row:if(!t.isVirtual&&t.isRowSpan)return e.resultAction.AddCell;if(t.isRowSpan)return e.resultAction.SubtractSpanCount}return e.resultAction.RemoveCell}function d(t){switch(n){case e.where.Column:if(t.isColSpan)return e.resultAction.SumSpanCount;if(t.isRowSpan&&t.isVirtual)return e.resultAction.Ignore;break;case e.where.Row:if(t.isRowSpan)return e.resultAction.SumSpanCount;if(t.isColSpan&&t.isVirtual)return e.resultAction.Ignore}return e.resultAction.AddCell}var h={colPos:0,rowPos:0},p=[],f=[];this.getActionList=function(){for(var t=n===e.where.Row?h.rowPos:-1,o=n===e.where.Column?h.colPos:-1,r=0,a=!0;a;){var l=t>=0?t:r,c=o>=0?o:r,g=p[l];if(!g)return a=!1,f;var m=g[c];if(!m)return a=!1,f;var v=e.resultAction.Ignore;switch(i){case e.requestAction.Add:v=d(m);break;case e.requestAction.Delete:v=u(m)}f.push(s(m,v,l,c)),r++}return f},t&&t.tagName&&("td"===t.tagName.toLowerCase()||"th"===t.tagName.toLowerCase())&&(h.colPos=t.cellIndex,t.parentElement&&t.parentElement.tagName&&"tr"===t.parentElement.tagName.toLowerCase()&&(h.rowPos=t.parentElement.rowIndex)),function(){for(var e=o.rows,t=0;t<e.length;t++)for(var n=e[t].cells,i=0;i<n.length;i++)l(e[t],n[i])}()};et.where={Row:0,Column:1},et.requestAction={Add:0,Delete:1},et.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var tt,nt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"tab",value:function(e,t){var n=We.ancestor(e.commonAncestor(),We.isCell),i=We.ancestor(n,We.isTable),o=We.listDescendant(i,We.isCell),r=$e[t?"prev":"next"](o,n);r&&Ye.create(r,0).select()}},{key:"addRow",value:function(e,t){for(var n=We.ancestor(e.commonAncestor(),We.isCell),i=_e()(n).closest("tr"),o=this.recoverAttributes(i),r=_e()("<tr"+o+"></tr>"),s=new et(n,et.where.Row,et.requestAction.Add,_e()(i).closest("table")[0]).getActionList(),a=0;a<s.length;a++){var l=s[a],c=this.recoverAttributes(l.baseCell);switch(l.action){case et.resultAction.AddCell:r.append("<td"+c+">"+We.blank+"</td>");break;case et.resultAction.SumSpanCount:if("top"===t&&(l.baseCell.parent?l.baseCell.closest("tr").rowIndex:0)<=i[0].rowIndex){var u=_e()("<div></div>").append(_e()("<td"+c+">"+We.blank+"</td>").removeAttr("rowspan")).html();r.append(u);break}var d=parseInt(l.baseCell.rowSpan,10);d++,l.baseCell.setAttribute("rowSpan",d)}}if("top"===t)i.before(r);else{if(n.rowSpan>1){var h=i[0].rowIndex+(n.rowSpan-2);return void _e()(_e()(i).parent().find("tr")[h]).after(_e()(r))}i.after(r)}}},{key:"addCol",value:function(e,t){var n=We.ancestor(e.commonAncestor(),We.isCell),i=_e()(n).closest("tr");_e()(i).siblings().push(i);for(var o=new et(n,et.where.Column,et.requestAction.Add,_e()(i).closest("table")[0]).getActionList(),r=0;r<o.length;r++){var s=o[r],a=this.recoverAttributes(s.baseCell);switch(s.action){case et.resultAction.AddCell:"right"===t?_e()(s.baseCell).after("<td"+a+">"+We.blank+"</td>"):_e()(s.baseCell).before("<td"+a+">"+We.blank+"</td>");break;case et.resultAction.SumSpanCount:if("right"===t){var l=parseInt(s.baseCell.colSpan,10);l++,s.baseCell.setAttribute("colSpan",l)}else _e()(s.baseCell).before("<td"+a+">"+We.blank+"</td>")}}}},{key:"recoverAttributes",value:function(e){var t="";if(!e)return t;for(var n=e.attributes||[],i=0;i<n.length;i++)"id"!==n[i].name.toLowerCase()&&n[i].specified&&(t+=" "+n[i].name+"='"+n[i].value+"'");return t}},{key:"deleteRow",value:function(e){for(var t=We.ancestor(e.commonAncestor(),We.isCell),n=_e()(t).closest("tr"),i=n.children("td, th").index(_e()(t)),o=n[0].rowIndex,r=new et(t,et.where.Row,et.requestAction.Delete,_e()(n).closest("table")[0]).getActionList(),s=0;s<r.length;s++)if(r[s]){var a=r[s].baseCell,l=r[s].virtualTable,c=a.rowSpan&&a.rowSpan>1,u=c?parseInt(a.rowSpan,10):0;switch(r[s].action){case et.resultAction.Ignore:continue;case et.resultAction.AddCell:var d=n.next("tr")[0];if(!d)continue;var h=n[0].cells[i];c&&(u>2?(u--,d.insertBefore(h,d.cells[i]),d.cells[i].setAttribute("rowSpan",u),d.cells[i].innerHTML=""):2===u&&(d.insertBefore(h,d.cells[i]),d.cells[i].removeAttribute("rowSpan"),d.cells[i].innerHTML=""));continue;case et.resultAction.SubtractSpanCount:c&&(u>2?(u--,a.setAttribute("rowSpan",u),l.rowIndex!==o&&a.cellIndex===i&&(a.innerHTML="")):2===u&&(a.removeAttribute("rowSpan"),l.rowIndex!==o&&a.cellIndex===i&&(a.innerHTML="")));continue;case et.resultAction.RemoveCell:continue}}n.remove()}},{key:"deleteCol",value:function(e){for(var t=We.ancestor(e.commonAncestor(),We.isCell),n=_e()(t).closest("tr"),i=n.children("td, th").index(_e()(t)),o=new et(t,et.where.Column,et.requestAction.Delete,_e()(n).closest("table")[0]).getActionList(),r=0;r<o.length;r++)if(o[r])switch(o[r].action){case et.resultAction.Ignore:continue;case et.resultAction.SubtractSpanCount:var s=o[r].baseCell;if(s.colSpan&&s.colSpan>1){var a=s.colSpan?parseInt(s.colSpan,10):0;a>2?(a--,s.setAttribute("colSpan",a),s.cellIndex===i&&(s.innerHTML="")):2===a&&(s.removeAttribute("colSpan"),s.cellIndex===i&&(s.innerHTML=""))}continue;case et.resultAction.RemoveCell:We.remove(o[r].baseCell,!0);continue}}},{key:"createTable",value:function(e,t,n){for(var i,o=[],r=0;r<e;r++)o.push("<td>"+We.blank+"</td>");i=o.join("");for(var s,a=[],l=0;l<t;l++)a.push("<tr>"+i+"</tr>");s=a.join("");var c=_e()("<table>"+s+"</table>");return n&&n.tableClassName&&c.addClass(n.tableClassName),c[0]}},{key:"deleteTable",value:function(e){var t=We.ancestor(e.commonAncestor(),We.isCell);_e()(t).closest("table").remove()}}])&&G(t.prototype,n),i&&G(t,i),e}(),it=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$note=t.layoutInfo.note,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.options=t.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.snapshot=null,this.style=new Qe,this.table=new nt,this.typing=new Ze(t),this.bullet=new Je,this.history=new Ke(t),this.context.memo("help.undo",this.lang.help.undo),this.context.memo("help.redo",this.lang.help.redo),this.context.memo("help.tab",this.lang.help.tab),this.context.memo("help.untab",this.lang.help.untab),this.context.memo("help.insertParagraph",this.lang.help.insertParagraph),this.context.memo("help.insertOrderedList",this.lang.help.insertOrderedList),this.context.memo("help.insertUnorderedList",this.lang.help.insertUnorderedList),this.context.memo("help.indent",this.lang.help.indent),this.context.memo("help.outdent",this.lang.help.outdent),this.context.memo("help.formatPara",this.lang.help.formatPara),this.context.memo("help.insertHorizontalRule",this.lang.help.insertHorizontalRule),this.context.memo("help.fontName",this.lang.help.fontName);for(var i=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],o=0,r=i.length;o<r;o++)this[i[o]]=function(e){return function(t){n.beforeCommand(),document.execCommand(e,!1,t),n.afterCommand(!0)}}(i[o]),this.context.memo("help."+i[o],this.lang.help[i[o]]);this.fontName=this.wrapCommand(function(e){return n.fontStyling("font-family",Ae.validFontName(e))}),this.fontSize=this.wrapCommand(function(e){var t=n.currentStyle()["font-size-unit"];return n.fontStyling("font-size",e+t)}),this.fontSizeUnit=this.wrapCommand(function(e){var t=n.currentStyle()["font-size"];return n.fontStyling("font-size",t+e)});for(var s=1;s<=6;s++)this["formatH"+s]=function(e){return function(){n.formatBlock("H"+e)}}(s),this.context.memo("help.formatH"+s,this.lang.help["formatH"+s]);this.insertParagraph=this.wrapCommand(function(){n.typing.insertParagraph(n.editable)}),this.insertOrderedList=this.wrapCommand(function(){n.bullet.insertOrderedList(n.editable)}),this.insertUnorderedList=this.wrapCommand(function(){n.bullet.insertUnorderedList(n.editable)}),this.indent=this.wrapCommand(function(){n.bullet.indent(n.editable)}),this.outdent=this.wrapCommand(function(){n.bullet.outdent(n.editable)}),this.insertNode=this.wrapCommand(function(e){n.isLimited(_e()(e).text().length)||(n.getLastRange().insertNode(e),n.setLastRange(Ye.createFromNodeAfter(e).select()))}),this.insertText=this.wrapCommand(function(e){if(!n.isLimited(e.length)){var t=n.getLastRange().insertNode(We.createText(e));n.setLastRange(Ye.create(t,We.nodeLength(t)).select())}}),this.pasteHTML=this.wrapCommand(function(e){if(!n.isLimited(e.length)){e=n.context.invoke("codeview.purify",e);var t=n.getLastRange().pasteHTML(e);n.setLastRange(Ye.createFromNodeAfter($e.last(t)).select())}}),this.formatBlock=this.wrapCommand(function(e,t){var i=n.options.callbacks.onApplyCustomStyle;i?i.call(n,t,n.context,n.onFormatBlock):n.onFormatBlock(e,t)}),this.insertHorizontalRule=this.wrapCommand(function(){var e=n.getLastRange().insertNode(We.create("HR"));e.nextSibling&&n.setLastRange(Ye.create(e.nextSibling,0).normalize().select())}),this.lineHeight=this.wrapCommand(function(e){n.style.stylePara(n.getLastRange(),{lineHeight:e})}),this.createLink=this.wrapCommand(function(e){var t=e.url,i=e.text,o=e.isNewWindow,r=e.checkProtocol,s=e.range||n.getLastRange(),a=i.length-s.toString().length;if(!(a>0&&n.isLimited(a))){var l=s.toString()!==i;"string"==typeof t&&(t=t.trim()),n.options.onCreateLink?t=n.options.onCreateLink(t):r&&(t=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/.test(t)?t:n.options.defaultProtocol+t);var c=[];if(l){var u=(s=s.deleteContents()).insertNode(_e()("<A>"+i+"</A>")[0]);c.push(u)}else c=n.style.styleNodes(s,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});_e.a.each(c,function(e,n){_e()(n).attr("href",t),o?_e()(n).attr("target","_blank"):_e()(n).removeAttr("target")});var d=Ye.createFromNodeBefore($e.head(c)).getStartPoint(),h=Ye.createFromNodeAfter($e.last(c)).getEndPoint();n.setLastRange(Ye.create(d.node,d.offset,h.node,h.offset).select())}}),this.color=this.wrapCommand(function(e){var t=e.foreColor,n=e.backColor;t&&document.execCommand("foreColor",!1,t),n&&document.execCommand("backColor",!1,n)}),this.foreColor=this.wrapCommand(function(e){document.execCommand("foreColor",!1,e)}),this.insertTable=this.wrapCommand(function(e){var t=e.split("x");n.getLastRange().deleteContents().insertNode(n.table.createTable(t[0],t[1],n.options))}),this.removeMedia=this.wrapCommand(function(){var e=_e()(n.restoreTarget()).parent();e.closest("figure").length?e.closest("figure").remove():e=_e()(n.restoreTarget()).detach(),n.context.triggerEvent("media.delete",e,n.$editable)}),this.floatMe=this.wrapCommand(function(e){var t=_e()(n.restoreTarget());t.toggleClass("note-float-left","left"===e),t.toggleClass("note-float-right","right"===e),
t.css("float","none"===e?"":e)}),this.resize=this.wrapCommand(function(e){var t=_e()(n.restoreTarget());0===(e=parseFloat(e))?t.css("width",""):t.css({width:100*e+"%",height:""})})}var t,n,i;return t=e,(n=[{key:"initialize",value:function(){var e=this;this.$editable.on("keydown",function(t){if(t.keyCode===Xe.code.ENTER&&e.context.triggerEvent("enter",t),e.context.triggerEvent("keydown",t),e.snapshot=e.history.makeSnapshot(),e.hasKeyShortCut=!1,t.isDefaultPrevented()||(e.options.shortcuts?e.hasKeyShortCut=e.handleKeyMap(t):e.preventDefaultEditableShortCuts(t)),e.isLimited(1,t)){var n=e.getLastRange();if(n.eo-n.so==0)return!1}e.setLastRange(),e.options.recordEveryKeystroke&&!1===e.hasKeyShortCut&&e.history.recordUndo()}).on("keyup",function(t){e.setLastRange(),e.context.triggerEvent("keyup",t)}).on("focus",function(t){e.setLastRange(),e.context.triggerEvent("focus",t)}).on("blur",function(t){e.context.triggerEvent("blur",t)}).on("mousedown",function(t){e.context.triggerEvent("mousedown",t)}).on("mouseup",function(t){e.setLastRange(),e.history.recordUndo(),e.context.triggerEvent("mouseup",t)}).on("scroll",function(t){e.context.triggerEvent("scroll",t)}).on("paste",function(t){e.setLastRange(),e.context.triggerEvent("paste",t)}).on("input",function(){e.isLimited(0)&&e.snapshot&&e.history.applySnapshot(e.snapshot)}),this.$editable.attr("spellcheck",this.options.spellCheck),this.$editable.attr("autocorrect",this.options.spellCheck),this.options.disableGrammar&&this.$editable.attr("data-gramm",!1),this.$editable.html(We.html(this.$note)||We.emptyPara),this.$editable.on(Ae.inputEventName,Ie.debounce(function(){e.context.triggerEvent("change",e.$editable.html(),e.$editable)},10)),this.$editable.on("focusin",function(t){e.context.triggerEvent("focusin",t)}).on("focusout",function(t){e.context.triggerEvent("focusout",t)}),this.options.airMode?this.options.overrideContextMenu&&this.$editor.on("contextmenu",function(t){return e.context.triggerEvent("contextmenu",t),!1}):(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css("max-height",this.options.maxHeight),this.options.minHeight&&this.$editable.css("min-height",this.options.minHeight)),this.history.recordUndo(),this.setLastRange()}},{key:"destroy",value:function(){this.$editable.off()}},{key:"handleKeyMap",value:function(e){var t=this.options.keyMap[Ae.isMac?"mac":"pc"],n=[];e.metaKey&&n.push("CMD"),e.ctrlKey&&!e.altKey&&n.push("CTRL"),e.shiftKey&&n.push("SHIFT");var i=Xe.nameFromCode[e.keyCode];i&&n.push(i);var o=t[n.join("+")];if("TAB"!==i||this.options.tabDisable)if(o){if(!1!==this.context.invoke(o))return e.preventDefault(),!0}else Xe.isEdit(e.keyCode)&&this.afterCommand();else this.afterCommand();return!1}},{key:"preventDefaultEditableShortCuts",value:function(e){(e.ctrlKey||e.metaKey)&&$e.contains([66,73,85],e.keyCode)&&e.preventDefault()}},{key:"isLimited",value:function(e,t){return e=e||0,(void 0===t||!(Xe.isMove(t.keyCode)||Xe.isNavigation(t.keyCode)||t.ctrlKey||t.metaKey||$e.contains([Xe.code.BACKSPACE,Xe.code.DELETE],t.keyCode)))&&this.options.maxTextLength>0&&this.$editable.text().length+e>this.options.maxTextLength}},{key:"createRange",value:function(){return this.focus(),this.setLastRange(),this.getLastRange()}},{key:"setLastRange",value:function(e){e?this.lastRange=e:(this.lastRange=Ye.create(this.editable),0===_e()(this.lastRange.sc).closest(".note-editable").length&&(this.lastRange=Ye.createFromBodyElement(this.editable)))}},{key:"getLastRange",value:function(){return this.lastRange||this.setLastRange(),this.lastRange}},{key:"saveRange",value:function(e){e&&this.getLastRange().collapse().select()}},{key:"restoreRange",value:function(){this.lastRange&&(this.lastRange.select(),this.focus())}},{key:"saveTarget",value:function(e){this.$editable.data("target",e)}},{key:"clearTarget",value:function(){this.$editable.removeData("target")}},{key:"restoreTarget",value:function(){return this.$editable.data("target")}},{key:"currentStyle",value:function(){var e=Ye.create();return e&&(e=e.normalize()),e?this.style.current(e):this.style.fromNode(this.$editable)}},{key:"styleFromNode",value:function(e){return this.style.fromNode(e)}},{key:"undo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"commit",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.commit(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"redo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"beforeCommand",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),document.execCommand("styleWithCSS",!1,this.options.styleWithCSS),this.focus()}},{key:"afterCommand",value:function(e){this.normalizeContent(),this.history.recordUndo(),e||this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"tab",value:function(){var e=this.getLastRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(e,this.options.tabSize),this.afterCommand())}}},{key:"untab",value:function(){var e=this.getLastRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e,!0);else if(0===this.options.tabSize)return!1}},{key:"wrapCommand",value:function(e){return function(){this.beforeCommand(),e.apply(this,arguments),this.afterCommand()}}},{key:"insertImage",value:function(e,t){var n,i=this;return(n=e,_e.a.Deferred(function(e){var t=_e()("<img>");t.one("load",function(){t.off("error abort"),e.resolve(t)}).one("error abort",function(){t.off("load").detach(),e.reject(t)}).css({display:"none"}).appendTo(document.body).attr("src",n)}).promise()).then(function(e){i.beforeCommand(),"function"==typeof t?t(e):("string"==typeof t&&e.attr("data-filename",t),e.css("width",Math.min(i.$editable.width(),e.width()))),e.show(),i.getLastRange().insertNode(e[0]),i.setLastRange(Ye.createFromNodeAfter(e[0]).select()),i.afterCommand()}).fail(function(e){i.context.triggerEvent("image.upload.error",e)})}},{key:"insertImagesAsDataURL",value:function(e){var t=this;_e.a.each(e,function(e,n){var i=n.name;t.options.maximumImageFileSize&&t.options.maximumImageFileSize<n.size?t.context.triggerEvent("image.upload.error",t.lang.image.maximumFileSizeError):function(e){return _e.a.Deferred(function(t){_e.a.extend(new FileReader,{onload:function(e){var n=e.target.result;t.resolve(n)},onerror:function(e){t.reject(e)}}).readAsDataURL(e)}).promise()}(n).then(function(e){return t.insertImage(e,i)}).fail(function(){t.context.triggerEvent("image.upload.error")})})}},{key:"insertImagesOrCallback",value:function(e){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",e):this.insertImagesAsDataURL(e)}},{key:"getSelectedText",value:function(){var e=this.getLastRange();return e.isOnAnchor()&&(e=Ye.createFromNode(We.ancestor(e.sc,We.isAnchor))),e.toString()}},{key:"onFormatBlock",value:function(e,t){if(document.execCommand("FormatBlock",!1,Ae.isMSIE?"<"+e+">":e),t&&t.length&&(t[0].tagName.toUpperCase()!==e.toUpperCase()&&(t=t.find(e)),t&&t.length)){var n=t[0].className||"";if(n){var i=this.createRange();_e()([i.sc,i.ec]).closest(e).addClass(n)}}}},{key:"formatPara",value:function(){this.formatBlock("P")}},{key:"fontStyling",value:function(e,t){var n=this.getLastRange();if(""!==n){var i=this.style.styleNodes(n);if(this.$editor.find(".note-status-output").html(""),_e()(i).css(e,t),n.isCollapsed()){var o=$e.head(i);o&&!We.nodeLength(o)&&(o.innerHTML=We.ZERO_WIDTH_NBSP_CHAR,Ye.createFromNodeAfter(o.firstChild).select(),this.setLastRange(),this.$editable.data("bogus",o))}}else{var r=_e.a.now();this.$editor.find(".note-status-output").html('<div id="note-status-output-'+r+'" class="alert alert-info">'+this.lang.output.noSelection+"</div>"),setTimeout(function(){_e()("#note-status-output-"+r).remove()},5e3)}}},{key:"unlink",value:function(){var e=this.getLastRange();if(e.isOnAnchor()){var t=We.ancestor(e.sc,We.isAnchor);(e=Ye.createFromNode(t)).select(),this.setLastRange(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}}},{key:"getLinkInfo",value:function(){var e=this.getLastRange().expand(We.isAnchor),t=_e()($e.head(e.nodes(We.isAnchor))),n={range:e,text:e.toString(),url:t.length?t.attr("href"):""};return t.length&&(n.isNewWindow="_blank"===t.attr("target")),n}},{key:"addRow",value:function(e){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addRow(t,e),this.afterCommand())}},{key:"addCol",value:function(e){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addCol(t,e),this.afterCommand())}},{key:"deleteRow",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(e),this.afterCommand())}},{key:"deleteCol",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(e),this.afterCommand())}},{key:"deleteTable",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(e),this.afterCommand())}},{key:"resizeTo",value:function(e,t,n){var i;if(n){var o=e.y/e.x,r=t.data("ratio");i={width:r>o?e.x:e.y/r,height:r>o?e.x*r:e.y}}else i={width:e.x,height:e.y};t.css(i)}},{key:"hasFocus",value:function(){return this.$editable.is(":focus")}},{key:"focus",value:function(){this.hasFocus()||this.$editable.focus()}},{key:"isEmpty",value:function(){return We.isEmpty(this.$editable[0])||We.emptyPara===this.$editable.html()}},{key:"empty",value:function(){this.context.invoke("code",We.emptyPara)}},{key:"normalizeContent",value:function(){this.$editable[0].normalize()}}])&&X(t.prototype,n),i&&X(t,i),e}(),ot=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editable=t.layoutInfo.editable}var t,n,i;return t=e,(n=[{key:"initialize",value:function(){this.$editable.on("paste",this.pasteByEvent.bind(this))}},{key:"pasteByEvent",value:function(e){var t=this,n=e.originalEvent.clipboardData;if(n&&n.items&&n.items.length){var i=n.items.length>1?n.items[1]:$e.head(n.items);"file"===i.kind&&-1!==i.type.indexOf("image/")?(this.context.invoke("editor.insertImagesOrCallback",[i.getAsFile()]),e.preventDefault()):"string"===i.kind&&this.context.invoke("editor.isLimited",n.getData("Text").length)&&e.preventDefault()}else if(window.clipboardData){var o=window.clipboardData.getData("text");this.context.invoke("editor.isLimited",o.length)&&e.preventDefault()}setTimeout(function(){t.context.invoke("editor.afterCommand")},10)}}])&&K(t.prototype,n),i&&K(t,i),e}(),rt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$eventListener=_e()(document),this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.options=t.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=_e()(['<div class="note-dropzone">','<div class="note-dropzone-message"/>',"</div>"].join("")).prependTo(this.$editor)}var t,n,i;return t=e,(n=[{key:"initialize",value:function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(e){e.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()}},{key:"attachDragAndDropEvent",value:function(){var e=this,t=_e()(),n=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(i){var o=e.context.invoke("codeview.isActivated"),r=e.$editor.width()>0&&e.$editor.height()>0;o||t.length||!r||(e.$editor.addClass("dragover"),e.$dropzone.width(e.$editor.width()),e.$dropzone.height(e.$editor.height()),n.text(e.lang.image.dragImageHere)),t=t.add(i.target)},this.documentEventHandlers.onDragleave=function(n){(t=t.not(n.target)).length&&"BODY"!==n.target.nodeName||(t=_e()(),e.$editor.removeClass("dragover"))},this.documentEventHandlers.onDrop=function(){t=_e()(),e.$editor.removeClass("dragover")},this.$eventListener.on("dragenter",this.documentEventHandlers.onDragenter).on("dragleave",this.documentEventHandlers.onDragleave).on("drop",this.documentEventHandlers.onDrop),this.$dropzone.on("dragenter",function(){e.$dropzone.addClass("hover"),n.text(e.lang.image.dropImage)}).on("dragleave",function(){e.$dropzone.removeClass("hover"),n.text(e.lang.image.dragImageHere)}),this.$dropzone.on("drop",function(t){var n=t.originalEvent.dataTransfer;t.preventDefault(),n&&n.files&&n.files.length?(e.$editable.focus(),e.context.invoke("editor.insertImagesOrCallback",n.files)):_e.a.each(n.types,function(t,i){if(!(i.toLowerCase().indexOf("_moz_")>-1)){var o=n.getData(i);i.toLowerCase().indexOf("text")>-1?e.context.invoke("editor.pasteHTML",o):_e()(o).each(function(t,n){e.context.invoke("editor.insertNode",n)})}})}).on("dragover",!1)}},{key:"destroy",value:function(){var e=this;Object.keys(this.documentEventHandlers).forEach(function(t){e.$eventListener.off(t.substr(2).toLowerCase(),e.documentEventHandlers[t])}),this.documentEventHandlers={}}}])&&Q(t.prototype,n),i&&Q(t,i),e}();Ae.hasCodeMirror&&(tt=window.CodeMirror);var st=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.options=t.options}var t,n,i;return t=e,(n=[{key:"sync",value:function(){this.isActivated()&&Ae.hasCodeMirror&&this.$codable.data("cmEditor").save()}},{key:"isActivated",value:function(){return this.$editor.hasClass("codeview")}},{key:"toggle",value:function(){this.isActivated()?this.deactivate():this.activate(),this.context.triggerEvent("codeview.toggled")}},{key:"purify",value:function(e){if(this.options.codeviewFilter&&(e=e.replace(this.options.codeviewFilterRegex,""),this.options.codeviewIframeFilter)){var t=this.options.codeviewIframeWhitelistSrc.concat(this.options.codeviewIframeWhitelistSrcBase);e=e.replace(/(<iframe.*?>.*?(?:<\/iframe>)?)/gi,function(e){if(/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(e))return"";var n=!0,i=!1,o=void 0;try{for(var r,s=t[Symbol.iterator]();!(n=(r=s.next()).done);n=!0){var a=r.value;if(new RegExp('src="(https?:)?//'+a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+'/(.+)"').test(e))return e}}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return""})}return e}},{key:"activate",value:function(){var e=this;if(this.$codable.val(We.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.focus(),Ae.hasCodeMirror){var t=tt.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var n=new tt.TernServer(this.options.codemirror.tern);t.ternServer=n,t.on("cursorActivity",function(e){n.updateArgHints(e)})}t.on("blur",function(n){e.context.triggerEvent("blur.codeview",t.getValue(),n)}),t.on("change",function(){e.context.triggerEvent("change.codeview",t.getValue(),t)}),t.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",t)}else this.$codable.on("blur",function(t){e.context.triggerEvent("blur.codeview",e.$codable.val(),t)}),this.$codable.on("input",function(){e.context.triggerEvent("change.codeview",e.$codable.val(),e.$codable)})}},{key:"deactivate",value:function(){if(Ae.hasCodeMirror){var e=this.$codable.data("cmEditor");this.$codable.val(e.getValue()),e.toTextArea()}var t=this.purify(We.value(this.$codable,this.options.prettifyHtml)||We.emptyPara),n=this.$editable.html()!==t;this.$editable.html(t),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),n&&this.context.triggerEvent("change",this.$editable.html(),this.$editable),this.$editable.focus(),this.context.invoke("toolbar.updateCodeview",!1)}},{key:"destroy",value:function(){this.isActivated()&&this.deactivate()}}])&&J(t.prototype,n),i&&J(t,i),e}(),at=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$document=_e()(document),this.$statusbar=t.layoutInfo.statusbar,this.$editable=t.layoutInfo.editable,this.options=t.options}var t,n,i;return t=e,(n=[{key:"initialize",value:function(){var e=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",function(t){t.preventDefault(),t.stopPropagation();var n=e.$editable.offset().top-e.$document.scrollTop(),i=function(t){var i=t.clientY-(n+24);i=e.options.minheight>0?Math.max(i,e.options.minheight):i,i=e.options.maxHeight>0?Math.min(i,e.options.maxHeight):i,e.$editable.height(i)};e.$document.on("mousemove",i).one("mouseup",function(){e.$document.off("mousemove",i)})})}},{key:"destroy",value:function(){this.$statusbar.off(),this.$statusbar.addClass("locked")}}])&&Z(t.prototype,n),i&&Z(t,i),e}(),lt=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editor=t.layoutInfo.editor,this.$toolbar=t.layoutInfo.toolbar,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.$window=_e()(window),this.$scrollbar=_e()("html, body"),this.onResize=function(){n.resizeTo({h:n.$window.height()-n.$toolbar.outerHeight()})}}var t,n,i;return t=e,(n=[{key:"resizeTo",value:function(e){this.$editable.css("height",e.h),this.$codable.css("height",e.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,e.h)}},{key:"toggle",value:function(){this.$editor.toggleClass("fullscreen"),this.isFullscreen()?(this.$editable.data("orgHeight",this.$editable.css("height")),this.$editable.data("orgMaxHeight",this.$editable.css("maxHeight")),this.$editable.css("maxHeight",""),this.$window.on("resize",this.onResize).trigger("resize"),this.$scrollbar.css("overflow","hidden")):(this.$window.off("resize",this.onResize),this.resizeTo({h:this.$editable.data("orgHeight")}),this.$editable.css("maxHeight",this.$editable.css("orgMaxHeight")),this.$scrollbar.css("overflow","visible")),this.context.invoke("toolbar.updateFullscreen",this.isFullscreen())}},{key:"isFullscreen",value:function(){return this.$editor.hasClass("fullscreen")}}])&&ee(t.prototype,n),i&&ee(t,i),e}(),ct=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$document=_e()(document),this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(e,t){n.update(t.target,t)&&t.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){n.update()},"summernote.disable summernote.blur":function(){n.hide()},"summernote.codeview.toggled":function(){n.update()}}}var t,n,i;return t=e,(n=[{key:"initialize",value:function(){var e=this;this.$handle=_e()(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',this.options.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"></div>',this.options.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(this.$editingArea),this.$handle.on("mousedown",function(t){if(We.isControlSizing(t.target)){t.preventDefault(),t.stopPropagation();var n=e.$handle.find(".note-control-selection").data("target"),i=n.offset(),o=e.$document.scrollTop(),r=function(t){e.context.invoke("editor.resizeTo",{x:t.clientX-i.left,y:t.clientY-(i.top-o)},n,!t.shiftKey),e.update(n[0],t)};e.$document.on("mousemove",r).one("mouseup",function(t){t.preventDefault(),e.$document.off("mousemove",r),e.context.invoke("editor.afterCommand")}),n.data("ratio")||n.data("ratio",n.height()/n.width())}}),this.$handle.on("wheel",function(t){t.preventDefault(),e.update()})}},{key:"destroy",value:function(){this.$handle.remove()}},{key:"update",value:function(e,t){if(this.context.isDisabled())return!1;var n=We.isImg(e),i=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",e,t),n){var o=_e()(e),r=o.position(),s={left:r.left+parseInt(o.css("marginLeft"),10),top:r.top+parseInt(o.css("marginTop"),10)},a={w:o.outerWidth(!1),h:o.outerHeight(!1)};i.css({display:"block",left:s.left,top:s.top,width:a.w,height:a.h}).data("target",o);var l=new Image;l.src=o.attr("src");var c=a.w+"x"+a.h+" ("+this.lang.image.original+": "+l.width+"x"+l.height+")";i.find(".note-control-selection-info").text(c),this.context.invoke("editor.saveTarget",e)}else this.hide();return n}},{key:"hide",value:function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()}}])&&te(t.prototype,n),i&&te(t,i),e}(),ut=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/]{2}|tel:|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,dt=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)}}}var t,n,i;return t=e,(n=[{key:"initialize",value:function(){this.lastWordRange=null}},{key:"destroy",value:function(){this.lastWordRange=null}},{key:"replace",value:function(){if(this.lastWordRange){var e=this.lastWordRange.toString(),t=e.match(ut);if(t&&(t[1]||t[2])){var n=t[1]?e:"http://"+e,i=e.replace(/^(?:https?:\/\/)?(?:tel?:?)?(?:mailto?:?)?(?:www\.)?/i,"").split("/")[0],o=_e()("<a />").html(i).attr("href",n)[0];this.context.options.linkTargetBlank&&_e()(o).attr("target","_blank"),this.lastWordRange.insertNode(o),this.lastWordRange=null,this.context.invoke("editor.focus")}}}},{key:"handleKeydown",value:function(e){if($e.contains([Xe.code.ENTER,Xe.code.SPACE],e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=t}}},{key:"handleKeyup",value:function(e){$e.contains([Xe.code.ENTER,Xe.code.SPACE],e.keyCode)&&this.replace()}}])&&ne(t.prototype,n),i&&ne(t,i),e}(),ht=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$note=t.layoutInfo.note,this.events={"summernote.change":function(){n.$note.val(t.invoke("code"))}}}var t,n,i;return t=e,(n=[{key:"shouldInitialize",value:function(){return We.isTextarea(this.$note[0])}}])&&ie(t.prototype,n),i&&ie(t,i),e}(),pt=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.options=t.options.replace||{},this.keys=[Xe.code.ENTER,Xe.code.SPACE,Xe.code.PERIOD,Xe.code.COMMA,Xe.code.SEMICOLON,Xe.code.SLASH],this.previousKeydownCode=null,this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)}}}var t,n,i;return t=e,(n=[{key:"shouldInitialize",value:function(){return!!this.options.match}},{key:"initialize",value:function(){this.lastWord=null}},{key:"destroy",value:function(){this.lastWord=null}},{key:"replace",value:function(){if(this.lastWord){var e=this,t=this.lastWord.toString();this.options.match(t,function(t){if(t){var n="";if("string"==typeof t?n=We.createText(t):t instanceof jQuery?n=t[0]:t instanceof Node&&(n=t),!n)return;e.lastWord.insertNode(n),e.lastWord=null,e.context.invoke("editor.focus")}})}}},{key:"handleKeydown",value:function(e){if(this.previousKeydownCode&&$e.contains(this.keys,this.previousKeydownCode))this.previousKeydownCode=e.keyCode;else{if($e.contains(this.keys,e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWord=t}this.previousKeydownCode=e.keyCode}}},{key:"handleKeyup",value:function(e){$e.contains(this.keys,e.keyCode)&&this.replace()}}])&&oe(t.prototype,n),i&&oe(t,i),e}(),ft=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,!0===this.options.inheritPlaceholder&&(this.options.placeholder=this.context.$note.attr("placeholder")||this.options.placeholder),this.events={"summernote.init summernote.change":function(){n.update()},"summernote.codeview.toggled":function(){n.update()}}}var t,n,i;return t=e,(n=[{key:"shouldInitialize",value:function(){return!!this.options.placeholder}},{key:"initialize",value:function(){var e=this;this.$placeholder=_e()('<div class="note-placeholder">'),this.$placeholder.on("click",function(){e.context.invoke("focus")}).html(this.options.placeholder).prependTo(this.$editingArea),this.update()}},{key:"destroy",value:function(){this.$placeholder.remove()}},{key:"update",value:function(){var e=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(e)}}])&&re(t.prototype,n),i&&re(t,i),e}(),gt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ui=_e.a.summernote.ui,this.context=t,this.$toolbar=t.layoutInfo.toolbar,this.options=t.options,this.lang=this.options.langInfo,this.invertedKeyMap=Ie.invertObject(this.options.keyMap[Ae.isMac?"mac":"pc"])}var t,n,i;return t=e,(n=[{key:"representShortcut",value:function(e){var t=this.invertedKeyMap[e];return this.options.shortcuts&&t?(Ae.isMac&&(t=t.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(t=t.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""}},{key:"button",value:function(e){return!this.options.tooltip&&e.tooltip&&delete e.tooltip,e.container=this.options.container,this.ui.button(e)}},{key:"initialize",value:function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}}},{key:"destroy",value:function(){delete this.fontInstalledMap}},{key:"isFontInstalled",value:function(e){return Object.prototype.hasOwnProperty.call(this.fontInstalledMap,e)||(this.fontInstalledMap[e]=Ae.isFontInstalled(e)||$e.contains(this.options.fontNamesIgnoreCheck,e)),this.fontInstalledMap[e]}},{key:"isFontDeservedToAdd",value:function(e){return""!==(e=e.toLowerCase())&&this.isFontInstalled(e)&&-1===Ae.genericFontFamilies.indexOf(e)}},{key:"colorPalette",value:function(e,t,n,i){var o=this;return this.ui.buttonGroup({className:"note-color "+e,children:[this.button({className:"note-current-color-button",contents:this.ui.icon(this.options.icons.font+" note-recent-color"),tooltip:t,click:function(e){var t=_e()(e.currentTarget);n&&i?o.context.invoke("editor.color",{backColor:t.attr("data-backColor"),foreColor:t.attr("data-foreColor")}):n?o.context.invoke("editor.color",{backColor:t.attr("data-backColor")}):i&&o.context.invoke("editor.color",{foreColor:t.attr("data-foreColor")})},callback:function(e){var t=e.find(".note-recent-color");n&&(t.css("background-color",o.options.colorButton.backColor),e.attr("data-backColor",o.options.colorButton.backColor)),i?(t.css("color",o.options.colorButton.foreColor),e.attr("data-foreColor",o.options.colorButton.foreColor)):t.css("color","transparent")}}),this.button({className:"dropdown-toggle",contents:this.ui.dropdownButtonContents("",this.options),tooltip:this.lang.color.more,data:{toggle:"dropdown"}}),this.ui.dropdown({items:(n?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.background+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light" data-event="backColor" data-value="inherit">',this.lang.color.transparent,"</button>","</div>",'<div class="note-holder" data-event="backColor"/>',"<div>",'<button type="button" class="note-color-select btn btn-light" data-event="openPalette" data-value="backColorPicker">',this.lang.color.cpSelect,"</button>",'<input type="color" id="backColorPicker" class="note-btn note-color-select-btn" value="'+this.options.colorButton.backColor+'" data-event="backColorPalette">',"</div>",'<div class="note-holder-custom" id="backColorPalette" data-event="backColor"/>',"</div>"].join(""):"")+(i?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.foreground+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light" data-event="removeFormat" data-value="foreColor">',this.lang.color.resetToDefault,"</button>","</div>",'<div class="note-holder" data-event="foreColor"/>',"<div>",'<button type="button" class="note-color-select btn btn-light" data-event="openPalette" data-value="foreColorPicker">',this.lang.color.cpSelect,"</button>",'<input type="color" id="foreColorPicker" class="note-btn note-color-select-btn" value="'+this.options.colorButton.foreColor+'" data-event="foreColorPalette">',"</div>",'<div class="note-holder-custom" id="foreColorPalette" data-event="foreColor"/>',"</div>"].join(""):""),callback:function(e){e.find(".note-holder").each(function(e,t){var n=_e()(t);n.append(o.ui.palette({colors:o.options.colors,colorsName:o.options.colorsName,eventName:n.data("event"),container:o.options.container,tooltip:o.options.tooltip}).render())});var t=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];e.find(".note-holder-custom").each(function(e,n){var i=_e()(n);i.append(o.ui.palette({colors:t,colorsName:t,eventName:i.data("event"),container:o.options.container,tooltip:o.options.tooltip}).render())}),e.find("input[type=color]").each(function(t,n){_e()(n).change(function(){var t=e.find("#"+_e()(this).data("event")).find(".note-color-btn").first(),n=this.value.toUpperCase();t.css("background-color",n).attr("aria-label",n).attr("data-value",n).attr("data-original-title",n),t.click()})})},click:function(t){t.stopPropagation();var n=_e()("."+e).find(".note-dropdown-menu"),i=_e()(t.target),r=i.data("event"),s=i.attr("data-value");if("openPalette"===r){var a=n.find("#"+s),l=_e()(n.find("#"+a.data("event")).find(".note-color-row")[0]),c=l.find(".note-color-btn").last().detach(),u=a.val();c.css("background-color",u).attr("aria-label",u).attr("data-value",u).attr("data-original-title",u),l.prepend(c),a.click()}else{if($e.contains(["backColor","foreColor"],r)){var d="backColor"===r?"background-color":"color",h=i.closest(".note-color").find(".note-recent-color"),p=i.closest(".note-color").find(".note-current-color-button");h.css(d,s),p.attr("data-"+r,s)}o.context.invoke("editor."+r,s)}}})]}).render()}},{key:"addToolbarButtons",value:function(){var e=this;this.context.memo("button.style",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.magic),e.options),tooltip:e.lang.style.style,data:{toggle:"dropdown"}}),e.ui.dropdown({className:"dropdown-style",items:e.options.styleTags,title:e.lang.style.style,template:function(t){"string"==typeof t&&(t={tag:t,title:Object.prototype.hasOwnProperty.call(e.lang.style,t)?e.lang.style[t]:t});var n=t.tag,i=t.title
;return"<"+n+(t.style?' style="'+t.style+'" ':"")+(t.className?' class="'+t.className+'"':"")+">"+i+"</"+n+">"},click:e.context.createInvokeHandler("editor.formatBlock")})]).render()});for(var t=function(t,n){var i=e.options.styleTags[t];e.context.memo("button.style."+i,function(){return e.button({className:"note-btn-style-"+i,contents:'<div data-value="'+i+'">'+i.toUpperCase()+"</div>",tooltip:e.lang.style[i],click:e.context.createInvokeHandler("editor.formatBlock")}).render()})},n=0,i=this.options.styleTags.length;n<i;n++)t(n);this.context.memo("button.bold",function(){return e.button({className:"note-btn-bold",contents:e.ui.icon(e.options.icons.bold),tooltip:e.lang.font.bold+e.representShortcut("bold"),click:e.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()}),this.context.memo("button.italic",function(){return e.button({className:"note-btn-italic",contents:e.ui.icon(e.options.icons.italic),tooltip:e.lang.font.italic+e.representShortcut("italic"),click:e.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()}),this.context.memo("button.underline",function(){return e.button({className:"note-btn-underline",contents:e.ui.icon(e.options.icons.underline),tooltip:e.lang.font.underline+e.representShortcut("underline"),click:e.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()}),this.context.memo("button.clear",function(){return e.button({contents:e.ui.icon(e.options.icons.eraser),tooltip:e.lang.font.clear+e.representShortcut("removeFormat"),click:e.context.createInvokeHandler("editor.removeFormat")}).render()}),this.context.memo("button.strikethrough",function(){return e.button({className:"note-btn-strikethrough",contents:e.ui.icon(e.options.icons.strikethrough),tooltip:e.lang.font.strikethrough+e.representShortcut("strikethrough"),click:e.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()}),this.context.memo("button.superscript",function(){return e.button({className:"note-btn-superscript",contents:e.ui.icon(e.options.icons.superscript),tooltip:e.lang.font.superscript,click:e.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()}),this.context.memo("button.subscript",function(){return e.button({className:"note-btn-subscript",contents:e.ui.icon(e.options.icons.subscript),tooltip:e.lang.font.subscript,click:e.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()}),this.context.memo("button.fontname",function(){var t=e.context.invoke("editor.currentStyle");return e.options.addDefaultFonts&&_e.a.each(t["font-family"].split(","),function(t,n){n=n.trim().replace(/['"]+/g,""),e.isFontDeservedToAdd(n)&&-1===e.options.fontNames.indexOf(n)&&e.options.fontNames.push(n)}),e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontname"/>',e.options),tooltip:e.lang.font.name,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:e.options.icons.menuCheck,items:e.options.fontNames.filter(e.isFontInstalled.bind(e)),title:e.lang.font.name,template:function(e){return'<span style="font-family: '+Ae.validFontName(e)+'">'+e+"</span>"},click:e.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()}),this.context.memo("button.fontsize",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsize"/>',e.options),tooltip:e.lang.font.size,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizes,title:e.lang.font.size,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()}),this.context.memo("button.fontsizeunit",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsizeunit"/>',e.options),tooltip:e.lang.font.sizeunit,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsizeunit",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizeUnits,title:e.lang.font.sizeunit,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit")})]).render()}),this.context.memo("button.color",function(){return e.colorPalette("note-color-all",e.lang.color.recent,!0,!0)}),this.context.memo("button.forecolor",function(){return e.colorPalette("note-color-fore",e.lang.color.foreground,!1,!0)}),this.context.memo("button.backcolor",function(){return e.colorPalette("note-color-back",e.lang.color.background,!0,!1)}),this.context.memo("button.ul",function(){return e.button({contents:e.ui.icon(e.options.icons.unorderedlist),tooltip:e.lang.lists.unordered+e.representShortcut("insertUnorderedList"),click:e.context.createInvokeHandler("editor.insertUnorderedList")}).render()}),this.context.memo("button.ol",function(){return e.button({contents:e.ui.icon(e.options.icons.orderedlist),tooltip:e.lang.lists.ordered+e.representShortcut("insertOrderedList"),click:e.context.createInvokeHandler("editor.insertOrderedList")}).render()});var o=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),r=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),s=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),a=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),l=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),c=this.button({contents:this.ui.icon(this.options.icons.indent),tooltip:this.lang.paragraph.indent+this.representShortcut("indent"),click:this.context.createInvokeHandler("editor.indent")});this.context.memo("button.justifyLeft",Ie.invoke(o,"render")),this.context.memo("button.justifyCenter",Ie.invoke(r,"render")),this.context.memo("button.justifyRight",Ie.invoke(s,"render")),this.context.memo("button.justifyFull",Ie.invoke(a,"render")),this.context.memo("button.outdent",Ie.invoke(l,"render")),this.context.memo("button.indent",Ie.invoke(c,"render")),this.context.memo("button.paragraph",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.alignLeft),e.options),tooltip:e.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),e.ui.dropdown([e.ui.buttonGroup({className:"note-align",children:[o,r,s,a]}),e.ui.buttonGroup({className:"note-list",children:[l,c]})])]).render()}),this.context.memo("button.height",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.textHeight),e.options),tooltip:e.lang.font.height,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({items:e.options.lineHeights,checkClassName:e.options.icons.menuCheck,className:"dropdown-line-height",title:e.lang.font.height,click:e.context.createInvokeHandler("editor.lineHeight")})]).render()}),this.context.memo("button.table",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.table),e.options),tooltip:e.lang.table.table,data:{toggle:"dropdown"}}),e.ui.dropdown({title:e.lang.table.table,className:"note-table",items:['<div class="note-dimension-picker">','<div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"/>','<div class="note-dimension-picker-highlighted"/>','<div class="note-dimension-picker-unhighlighted"/>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(t){t.find(".note-dimension-picker-mousecatcher").css({width:e.options.insertTableMaxSize.col+"em",height:e.options.insertTableMaxSize.row+"em"}).mousedown(e.context.createInvokeHandler("editor.insertTable")).on("mousemove",e.tableMoveHandler.bind(e))}}).render()}),this.context.memo("button.link",function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.link+e.representShortcut("linkDialog.show"),click:e.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.picture",function(){return e.button({contents:e.ui.icon(e.options.icons.picture),tooltip:e.lang.image.image,click:e.context.createInvokeHandler("imageDialog.show")}).render()}),this.context.memo("button.video",function(){return e.button({contents:e.ui.icon(e.options.icons.video),tooltip:e.lang.video.video,click:e.context.createInvokeHandler("videoDialog.show")}).render()}),this.context.memo("button.hr",function(){return e.button({contents:e.ui.icon(e.options.icons.minus),tooltip:e.lang.hr.insert+e.representShortcut("insertHorizontalRule"),click:e.context.createInvokeHandler("editor.insertHorizontalRule")}).render()}),this.context.memo("button.fullscreen",function(){return e.button({className:"btn-fullscreen",contents:e.ui.icon(e.options.icons.arrowsAlt),tooltip:e.lang.options.fullscreen,click:e.context.createInvokeHandler("fullscreen.toggle")}).render()}),this.context.memo("button.codeview",function(){return e.button({className:"btn-codeview",contents:e.ui.icon(e.options.icons.code),tooltip:e.lang.options.codeview,click:e.context.createInvokeHandler("codeview.toggle")}).render()}),this.context.memo("button.redo",function(){return e.button({contents:e.ui.icon(e.options.icons.redo),tooltip:e.lang.history.redo+e.representShortcut("redo"),click:e.context.createInvokeHandler("editor.redo")}).render()}),this.context.memo("button.undo",function(){return e.button({contents:e.ui.icon(e.options.icons.undo),tooltip:e.lang.history.undo+e.representShortcut("undo"),click:e.context.createInvokeHandler("editor.undo")}).render()}),this.context.memo("button.help",function(){return e.button({contents:e.ui.icon(e.options.icons.question),tooltip:e.lang.options.help,click:e.context.createInvokeHandler("helpDialog.show")}).render()})}},{key:"addImagePopoverButtons",value:function(){var e=this;this.context.memo("button.resizeFull",function(){return e.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:e.lang.image.resizeFull,click:e.context.createInvokeHandler("editor.resize","1")}).render()}),this.context.memo("button.resizeHalf",function(){return e.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:e.lang.image.resizeHalf,click:e.context.createInvokeHandler("editor.resize","0.5")}).render()}),this.context.memo("button.resizeQuarter",function(){return e.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:e.lang.image.resizeQuarter,click:e.context.createInvokeHandler("editor.resize","0.25")}).render()}),this.context.memo("button.resizeNone",function(){return e.button({contents:e.ui.icon(e.options.icons.rollback),tooltip:e.lang.image.resizeNone,click:e.context.createInvokeHandler("editor.resize","0")}).render()}),this.context.memo("button.floatLeft",function(){return e.button({contents:e.ui.icon(e.options.icons.floatLeft),tooltip:e.lang.image.floatLeft,click:e.context.createInvokeHandler("editor.floatMe","left")}).render()}),this.context.memo("button.floatRight",function(){return e.button({contents:e.ui.icon(e.options.icons.floatRight),tooltip:e.lang.image.floatRight,click:e.context.createInvokeHandler("editor.floatMe","right")}).render()}),this.context.memo("button.floatNone",function(){return e.button({contents:e.ui.icon(e.options.icons.rollback),tooltip:e.lang.image.floatNone,click:e.context.createInvokeHandler("editor.floatMe","none")}).render()}),this.context.memo("button.removeMedia",function(){return e.button({contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.image.remove,click:e.context.createInvokeHandler("editor.removeMedia")}).render()})}},{key:"addLinkPopoverButtons",value:function(){var e=this;this.context.memo("button.linkDialogShow",function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.edit,click:e.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.unlink",function(){return e.button({contents:e.ui.icon(e.options.icons.unlink),tooltip:e.lang.link.unlink,click:e.context.createInvokeHandler("editor.unlink")}).render()})}},{key:"addTablePopoverButtons",value:function(){var e=this;this.context.memo("button.addRowUp",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowAbove),tooltip:e.lang.table.addRowAbove,click:e.context.createInvokeHandler("editor.addRow","top")}).render()}),this.context.memo("button.addRowDown",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowBelow),tooltip:e.lang.table.addRowBelow,click:e.context.createInvokeHandler("editor.addRow","bottom")}).render()}),this.context.memo("button.addColLeft",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colBefore),tooltip:e.lang.table.addColLeft,click:e.context.createInvokeHandler("editor.addCol","left")}).render()}),this.context.memo("button.addColRight",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colAfter),tooltip:e.lang.table.addColRight,click:e.context.createInvokeHandler("editor.addCol","right")}).render()}),this.context.memo("button.deleteRow",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowRemove),tooltip:e.lang.table.delRow,click:e.context.createInvokeHandler("editor.deleteRow")}).render()}),this.context.memo("button.deleteCol",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colRemove),tooltip:e.lang.table.delCol,click:e.context.createInvokeHandler("editor.deleteCol")}).render()}),this.context.memo("button.deleteTable",function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.table.delTable,click:e.context.createInvokeHandler("editor.deleteTable")}).render()})}},{key:"build",value:function(e,t){for(var n=0,i=t.length;n<i;n++){for(var o=t[n],r=Array.isArray(o)?o[0]:o,s=Array.isArray(o)?1===o.length?[o[0]]:o[1]:[o],a=this.ui.buttonGroup({className:"note-"+r}).render(),l=0,c=s.length;l<c;l++){var u=this.context.memo("button."+s[l]);u&&a.append("function"==typeof u?u(this.context):u)}a.appendTo(e)}}},{key:"updateCurrentStyle",value:function(e){var t=this,n=e||this.$toolbar,i=this.context.invoke("editor.currentStyle");if(this.updateBtnStates(n,{".note-btn-bold":function(){return"bold"===i["font-bold"]},".note-btn-italic":function(){return"italic"===i["font-italic"]},".note-btn-underline":function(){return"underline"===i["font-underline"]},".note-btn-subscript":function(){return"subscript"===i["font-subscript"]},".note-btn-superscript":function(){return"superscript"===i["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===i["font-strikethrough"]}}),i["font-family"]){var o=i["font-family"].split(",").map(function(e){return e.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}),r=$e.find(o,this.isFontInstalled.bind(this));n.find(".dropdown-fontname a").each(function(e,t){var n=_e()(t),i=n.data("value")+""==r+"";n.toggleClass("checked",i)}),n.find(".note-current-fontname").text(r).css("font-family",r)}if(i["font-size"]){var s=i["font-size"];n.find(".dropdown-fontsize a").each(function(e,t){var n=_e()(t),i=n.data("value")+""==s+"";n.toggleClass("checked",i)}),n.find(".note-current-fontsize").text(s);var a=i["font-size-unit"];n.find(".dropdown-fontsizeunit a").each(function(e,t){var n=_e()(t),i=n.data("value")+""==a+"";n.toggleClass("checked",i)}),n.find(".note-current-fontsizeunit").text(a)}if(i["line-height"]){var l=i["line-height"];n.find(".dropdown-line-height li a").each(function(e,n){var i=_e()(n).data("value")+""==l+"";t.className=i?"checked":""})}}},{key:"updateBtnStates",value:function(e,t){var n=this;_e.a.each(t,function(t,i){n.ui.toggleBtnActive(e.find(t),i())})}},{key:"tableMoveHandler",value:function(e){var t,n=_e()(e.target.parentNode),i=n.next(),o=n.find(".note-dimension-picker-mousecatcher"),r=n.find(".note-dimension-picker-highlighted"),s=n.find(".note-dimension-picker-unhighlighted");if(void 0===e.offsetX){var a=_e()(e.target).offset();t={x:e.pageX-a.left,y:e.pageY-a.top}}else t={x:e.offsetX,y:e.offsetY};var l=Math.ceil(t.x/18)||1,c=Math.ceil(t.y/18)||1;r.css({width:l+"em",height:c+"em"}),o.data("value",l+"x"+c),l>3&&l<this.options.insertTableMaxSize.col&&s.css({width:l+1+"em"}),c>3&&c<this.options.insertTableMaxSize.row&&s.css({height:c+1+"em"}),i.html(l+" x "+c)}}])&&se(t.prototype,n),i&&se(t,i),e}(),mt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$window=_e()(window),this.$document=_e()(document),this.ui=_e.a.summernote.ui,this.$note=t.layoutInfo.note,this.$editor=t.layoutInfo.editor,this.$toolbar=t.layoutInfo.toolbar,this.$editable=t.layoutInfo.editable,this.$statusbar=t.layoutInfo.statusbar,this.options=t.options,this.isFollowing=!1,this.followScroll=this.followScroll.bind(this)}var t,n,i;return t=e,(n=[{key:"shouldInitialize",value:function(){return!this.options.airMode}},{key:"initialize",value:function(){var e=this;this.options.toolbar=this.options.toolbar||[],this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide(),this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.changeContainer(!1),this.$note.on("summernote.keyup summernote.mouseup summernote.change",function(){e.context.invoke("buttons.updateCurrentStyle")}),this.context.invoke("buttons.updateCurrentStyle"),this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)}},{key:"destroy",value:function(){this.$toolbar.children().remove(),this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)}},{key:"followScroll",value:function(){if(this.$editor.hasClass("fullscreen"))return!1;var e=this.$editor.outerHeight(),t=this.$editor.width(),n=this.$toolbar.height(),i=this.$statusbar.height(),o=0;this.options.otherStaticBar&&(o=_e()(this.options.otherStaticBar).outerHeight());var r=this.$document.scrollTop(),s=this.$editor.offset().top,a=s-o,l=s+e-o-n-i;!this.isFollowing&&r>a&&r<l-n?(this.isFollowing=!0,this.$editable.css({marginTop:this.$toolbar.outerHeight()}),this.$toolbar.css({position:"fixed",top:o,width:t,zIndex:1e3})):this.isFollowing&&(r<a||r>l)&&(this.isFollowing=!1,this.$toolbar.css({position:"relative",top:0,width:"100%",zIndex:"auto"}),this.$editable.css({marginTop:""}))}},{key:"changeContainer",value:function(e){e?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.options.followingToolbar&&this.followScroll()}},{key:"updateFullscreen",value:function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),e),this.changeContainer(e)}},{key:"updateCodeview",value:function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),e),e?this.deactivate():this.activate()}},{key:"activate",value:function(e){var t=this.$toolbar.find("button");e||(t=t.not(".btn-codeview").not(".btn-fullscreen")),this.ui.toggleBtn(t,!0)}},{key:"deactivate",value:function(e){var t=this.$toolbar.find("button");e||(t=t.not(".btn-codeview").not(".btn-fullscreen")),this.ui.toggleBtn(t,!1)}}])&&ae(t.prototype,n),i&&ae(t,i),e}(),vt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=_e.a.summernote.ui,this.$body=_e()(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo,t.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}var t,n,i;return t=e,(n=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<div class="form-group note-form-group">','<label for="note-dialog-link-txt-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.textToDisplay,"</label>"),'<input id="note-dialog-link-txt-'.concat(this.options.id,'" class="note-link-text form-control note-form-control note-input" type="text"/>'),"</div>",'<div class="form-group note-form-group">','<label for="note-dialog-link-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.url,"</label>"),'<input id="note-dialog-link-url-'.concat(this.options.id,'" class="note-link-url form-control note-form-control note-input" type="text" value="http://"/>'),"</div>",this.options.disableLinkTarget?"":_e()("<div/>").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html(),_e()("<div/>").append(this.ui.checkbox({className:"sn-checkbox-use-protocol",text:this.lang.link.useProtocol,checked:!0}).render()).html()].join(""),n='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-link-btn",'" value="').concat(this.lang.link.insert,'" disabled>');this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:t,footer:n}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",function(e){e.keyCode===Xe.code.ENTER&&(e.preventDefault(),t.trigger("click"))})}},{key:"toggleLinkBtn",value:function(e,t,n){this.ui.toggleBtn(e,t.val()&&n.val())}},{key:"showLinkDialog",value:function(e){var t=this;return _e.a.Deferred(function(n){var i=t.$dialog.find(".note-link-text"),o=t.$dialog.find(".note-link-url"),r=t.$dialog.find(".note-link-btn"),s=t.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]"),a=t.$dialog.find(".sn-checkbox-use-protocol input[type=checkbox]");t.ui.onDialogShown(t.$dialog,function(){t.context.triggerEvent("dialog.shown"),!e.url&&Ie.isValidUrl(e.text)&&(e.url=e.text),i.on("input paste propertychange",function(){e.text=i.val(),t.toggleLinkBtn(r,i,o)}).val(e.text),o.on("input paste propertychange",function(){e.text||i.val(o.val()),t.toggleLinkBtn(r,i,o)}).val(e.url),Ae.isSupportTouch||o.trigger("focus"),t.toggleLinkBtn(r,i,o),t.bindEnterKey(o,r),t.bindEnterKey(i,r);var l=void 0!==e.isNewWindow?e.isNewWindow:t.context.options.linkTargetBlank;s.prop("checked",l);var c=!e.url&&t.context.options.useProtocol;a.prop("checked",c),r.one("click",function(r){r.preventDefault(),n.resolve({range:e.range,url:o.val(),text:i.val(),isNewWindow:s.is(":checked"),checkProtocol:a.is(":checked")}),t.ui.hideDialog(t.$dialog)})}),t.ui.onDialogHidden(t.$dialog,function(){i.off(),o.off(),r.off(),"pending"===n.state()&&n.reject()}),t.ui.showDialog(t.$dialog)}).promise()}},{key:"show",value:function(){var e=this,t=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(t).then(function(t){e.context.invoke("editor.restoreRange"),e.context.invoke("editor.createLink",t)}).fail(function(){e.context.invoke("editor.restoreRange")})}}])&&le(t.prototype,n),i&&le(t,i),e}(),_t=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=_e.a.summernote.ui,this.options=t.options,this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){n.update()},"summernote.disable summernote.dialog.shown summernote.blur":function(){n.hide()}}}var t,n,i;return t=e,(n=[{key:"shouldInitialize",value:function(){return!$e.isEmpty(this.options.popover.link)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(e){e.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a>&nbsp;</span>')}}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.link),this.$popover.on("mousedown",function(e){e.preventDefault()})}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(){if(this.context.invoke("editor.hasFocus")){var e=this.context.invoke("editor.getLastRange");if(e.isCollapsed()&&e.isOnAnchor()){var t=We.ancestor(e.sc,We.isAnchor),n=_e()(t).attr("href");this.$popover.find("a").attr("href",n).text(n);var i=We.posFromPlaceholder(t),o=_e()(this.options.container).offset();i.top-=o.top,i.left-=o.left,this.$popover.css({display:"block",left:i.left,top:i.top})}else this.hide()}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}])&&ce(t.prototype,n),i&&ce(t,i),e}(),yt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=_e.a.summernote.ui,this.$body=_e()(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}var t,n,i;return t=e,(n=[{key:"initialize",value:function(){var e="";if(this.options.maximumImageFileSize){var t=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),n=1*(this.options.maximumImageFileSize/Math.pow(1024,t)).toFixed(2)+" "+" KMGTP"[t]+"B";e="<small>".concat(this.lang.image.maximumFileSize+" : "+n,"</small>")}var i=this.options.dialogsInBody?this.$body:this.options.container,o=['<div class="form-group note-form-group note-group-select-from-files">','<label for="note-dialog-image-file-'+this.options.id+'" class="note-form-label">'+this.lang.image.selectFromFiles+"</label>",'<input id="note-dialog-image-file-'+this.options.id+'" class="note-image-input form-control-file note-form-control note-input" ',' type="file" name="files" accept="image/*" multiple="multiple"/>',e,"</div>",'<div class="form-group note-group-image-url">','<label for="note-dialog-image-url-'+this.options.id+'" class="note-form-label">'+this.lang.image.url+"</label>",'<input id="note-dialog-image-url-'+this.options.id+'" class="note-image-url form-control note-form-control note-input" type="text"/>',"</div>"].join(""),r='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-image-btn",'" value="').concat(this.lang.image.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:o,footer:r}).render().appendTo(i)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",function(e){e.keyCode===Xe.code.ENTER&&(e.preventDefault(),t.trigger("click"))})}},{key:"show",value:function(){var e=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then(function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange"),"string"==typeof t?e.options.callbacks.onImageLinkInsert?e.context.triggerEvent("image.link.insert",t):e.context.invoke("editor.insertImage",t):e.context.invoke("editor.insertImagesOrCallback",t)}).fail(function(){e.context.invoke("editor.restoreRange")})}},{key:"showImageDialog",value:function(){var e=this;return _e.a.Deferred(function(t){var n=e.$dialog.find(".note-image-input"),i=e.$dialog.find(".note-image-url"),o=e.$dialog.find(".note-image-btn");e.ui.onDialogShown(e.$dialog,function(){e.context.triggerEvent("dialog.shown"),n.replaceWith(n.clone().on("change",function(e){t.resolve(e.target.files||e.target.value)}).val("")),i.on("input paste propertychange",function(){e.ui.toggleBtn(o,i.val())}).val(""),Ae.isSupportTouch||i.trigger("focus"),o.click(function(e){e.preventDefault(),t.resolve(i.val())}),e.bindEnterKey(i,o)}),e.ui.onDialogHidden(e.$dialog,function(){n.off(),i.off(),o.off(),"pending"===t.state()&&t.reject()}),e.ui.showDialog(e.$dialog)})}}])&&ue(t.prototype,n),i&&ue(t,i),e}(),bt=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=_e.a.summernote.ui,this.editable=t.layoutInfo.editable[0],this.options=t.options,this.events={"summernote.disable summernote.blur":function(){n.hide()}}}var t,n,i;return t=e,(n=[{key:"shouldInitialize",value:function(){return!$e.isEmpty(this.options.popover.image)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.image),this.$popover.on("mousedown",function(e){e.preventDefault()})}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e,t){if(We.isImg(e)){var n=_e()(e).offset(),i=_e()(this.options.container).offset(),o={};this.options.popatmouse?(o.left=t.pageX-20,o.top=t.pageY):o=n,o.top-=i.top,o.left-=i.left,this.$popover.css({display:"block",left:o.left,top:o.top})}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}])&&de(t.prototype,n),i&&de(t,i),e}(),wt=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=_e.a.summernote.ui,this.options=t.options,this.events={"summernote.mousedown":function(e,t){n.update(t.target)},"summernote.keyup summernote.scroll summernote.change":function(){n.update()},"summernote.disable summernote.blur":function(){n.hide()}}}var t,n,i;return t=e,(n=[{key:"shouldInitialize",value:function(){return!$e.isEmpty(this.options.popover.table)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.table),Ae.isFF&&document.execCommand("enableInlineTableEditing",!1,!1),this.$popover.on("mousedown",function(e){e.preventDefault()})}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e){if(this.context.isDisabled())return!1;var t=We.isCell(e);if(t){var n=We.posFromPlaceholder(e),i=_e()(this.options.container).offset();n.top-=i.top,n.left-=i.left,this.$popover.css({display:"block",left:n.left,top:n.top})}else this.hide();return t}},{key:"hide",value:function(){this.$popover.hide()}}])&&he(t.prototype,n),i&&he(t,i),e}(),xt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=_e.a.summernote.ui,this.$body=_e()(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}var t,n,i;return t=e,(n=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<div class="form-group note-form-group row-fluid">','<label for="note-dialog-video-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.video.url,' <small class="text-muted">').concat(this.lang.video.providers,"</small></label>"),'<input id="note-dialog-video-url-'.concat(this.options.id,'" class="note-video-url form-control note-form-control note-input" type="text"/>'),"</div>"].join(""),n='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-video-btn",'" value="').concat(this.lang.video.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,
body:t,footer:n}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",function(e){e.keyCode===Xe.code.ENTER&&(e.preventDefault(),t.trigger("click"))})}},{key:"createVideoNode",value:function(e){var t,n=e.match(/\/\/(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/),i=e.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),o=e.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),r=e.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),s=e.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),a=e.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),l=e.match(/\/\/v\.qq\.com.*?vid=(.+)/),c=e.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),u=e.match(/^.+.(mp4|m4v)$/),d=e.match(/^.+.(ogg|ogv)$/),h=e.match(/^.+.(webm)$/),p=e.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/);if(n&&11===n[1].length){var f=n[1],g=0;if(void 0!==n[2]){var m=n[2].match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);if(m)for(var v=[3600,60,1],_=0,y=v.length;_<y;_++)g+=void 0!==m[_+1]?v[_]*parseInt(m[_+1],10):0}t=_e()("<iframe>").attr("frameborder",0).attr("src","https://www.youtube.com/embed/"+f+(g>0?"?start="+g:"")).attr("width","640").attr("height","360")}else if(i&&i[0].length)t=_e()("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+i[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(o&&o[0].length)t=_e()("<iframe>").attr("frameborder",0).attr("src",o[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(r&&r[3].length)t=_e()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+r[3]).attr("width","640").attr("height","360");else if(s&&s[2].length)t=_e()("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+s[2]).attr("width","640").attr("height","360");else if(a&&a[1].length)t=_e()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+a[1]);else if(l&&l[1].length||c&&c[2].length){var b=l&&l[1].length?l[1]:c[2];t=_e()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","https://v.qq.com/iframe/player.html?vid="+b+"&amp;auto=0")}else if(u||d||h)t=_e()("<video controls>").attr("src",e).attr("width","640").attr("height","360");else{if(!p||!p[0].length)return!1;t=_e()("<iframe>").attr("frameborder",0).attr("src","https://www.facebook.com/plugins/video.php?href="+encodeURIComponent(p[0])+"&show_text=0&width=560").attr("width","560").attr("height","301").attr("scrolling","no").attr("allowtransparency","true")}return t.addClass("note-video-clip"),t[0]}},{key:"show",value:function(){var e=this,t=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(t).then(function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange");var n=e.createVideoNode(t);n&&e.context.invoke("editor.insertNode",n)}).fail(function(){e.context.invoke("editor.restoreRange")})}},{key:"showVideoDialog",value:function(){var e=this;return _e.a.Deferred(function(t){var n=e.$dialog.find(".note-video-url"),i=e.$dialog.find(".note-video-btn");e.ui.onDialogShown(e.$dialog,function(){e.context.triggerEvent("dialog.shown"),n.on("input paste propertychange",function(){e.ui.toggleBtn(i,n.val())}),Ae.isSupportTouch||n.trigger("focus"),i.click(function(e){e.preventDefault(),t.resolve(n.val())}),e.bindEnterKey(n,i)}),e.ui.onDialogHidden(e.$dialog,function(){n.off(),i.off(),"pending"===t.state()&&t.reject()}),e.ui.showDialog(e.$dialog)})}}])&&pe(t.prototype,n),i&&pe(t,i),e}(),kt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=_e.a.summernote.ui,this.$body=_e()(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}var t,n,i;return t=e,(n=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<p class="text-center">','<a href="http://summernote.org/" target="_blank">Summernote 0.8.16</a> · ','<a href="https://github.com/summernote/summernote" target="_blank">Project</a> · ','<a href="https://github.com/summernote/summernote/issues" target="_blank">Issues</a>',"</p>"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:t,callback:function(e){e.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"createShortcutList",value:function(){var e=this,t=this.options.keyMap[Ae.isMac?"mac":"pc"];return Object.keys(t).map(function(n){var i=t[n],o=_e()('<div><div class="help-list-item"/></div>');return o.append(_e()("<label><kbd>"+n+"</kdb></label>").css({width:180,"margin-right":10})).append(_e()("<span/>").html(e.context.memo("help."+i)||i)),o.html()}).join("")}},{key:"showHelpDialog",value:function(){var e=this;return _e.a.Deferred(function(t){e.ui.onDialogShown(e.$dialog,function(){e.context.triggerEvent("dialog.shown"),t.resolve()}),e.ui.showDialog(e.$dialog)}).promise()}},{key:"show",value:function(){var e=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then(function(){e.context.invoke("editor.restoreRange")})}}])&&fe(t.prototype,n),i&&fe(t,i),e}(),Ct=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=_e.a.summernote.ui,this.options=t.options,this.hidable=!0,this.onContextmenu=!1,this.pageX=null,this.pageY=null,this.events={"summernote.contextmenu":function(e){n.options.editing&&(e.preventDefault(),e.stopPropagation(),n.onContextmenu=!0,n.update(!0))},"summernote.mousedown":function(e,t){n.pageX=t.pageX,n.pageY=t.pageY},"summernote.keyup summernote.mouseup summernote.scroll":function(e,t){n.options.editing&&!n.onContextmenu&&(n.pageX=t.pageX,n.pageY=t.pageY,n.update()),n.onContextmenu=!1},"summernote.disable summernote.change summernote.dialog.shown summernote.blur":function(){n.hide()},"summernote.focusout":function(){n.$popover.is(":active,:focus")||n.hide()}}}var t,n,i;return t=e,(n=[{key:"shouldInitialize",value:function(){return this.options.airMode&&!$e.isEmpty(this.options.popover.air)}},{key:"initialize",value:function(){var e=this;this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content");this.context.invoke("buttons.build",t,this.options.popover.air),this.$popover.on("mousedown",function(){e.hidable=!1}),this.$popover.on("mouseup",function(){e.hidable=!0})}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e){var t=this.context.invoke("editor.currentStyle");if(!t.range||t.range.isCollapsed()&&!e)this.hide();else{var n={left:this.pageX,top:this.pageY},i=_e()(this.options.container).offset();n.top-=i.top,n.left-=i.left,this.$popover.css({display:"block",left:Math.max(n.left,0)+-5,top:n.top+5}),this.context.invoke("buttons.updateCurrentStyle",this.$popover)}}},{key:"hide",value:function(){this.hidable&&this.$popover.hide()}}])&&ge(t.prototype,n),i&&ge(t,i),e}(),St=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=_e.a.summernote.ui,this.$editable=t.layoutInfo.editable,this.options=t.options,this.hint=this.options.hint||[],this.direction=this.options.hintDirection||"bottom",this.hints=Array.isArray(this.hint)?this.hint:[this.hint],this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)},"summernote.disable summernote.dialog.shown summernote.blur":function(){n.hide()}}}var t,n,i;return t=e,(n=[{key:"shouldInitialize",value:function(){return this.hints.length>0}},{key:"initialize",value:function(){var e=this;this.lastWordRange=null,this.matchingWord=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",function(t){e.$content.find(".active").removeClass("active"),_e()(t.currentTarget).addClass("active"),e.replace()}),this.$popover.on("mousedown",function(e){e.preventDefault()})}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"selectItem",value:function(e){this.$content.find(".active").removeClass("active"),e.addClass("active"),this.$content[0].scrollTop=e[0].offsetTop-this.$content.innerHeight()/2}},{key:"moveDown",value:function(){var e=this.$content.find(".note-hint-item.active"),t=e.next();if(t.length)this.selectItem(t);else{var n=e.parent().next();n.length||(n=this.$content.find(".note-hint-group").first()),this.selectItem(n.find(".note-hint-item").first())}}},{key:"moveUp",value:function(){var e=this.$content.find(".note-hint-item.active"),t=e.prev();if(t.length)this.selectItem(t);else{var n=e.parent().prev();n.length||(n=this.$content.find(".note-hint-group").last()),this.selectItem(n.find(".note-hint-item").last())}}},{key:"replace",value:function(){var e=this.$content.find(".note-hint-item.active");if(e.length){var t=this.nodeFromItem(e);if(null!==this.matchingWord&&0===this.matchingWord.length)this.lastWordRange.so=this.lastWordRange.eo;else if(null!==this.matchingWord&&this.matchingWord.length>0&&!this.lastWordRange.isCollapsed()){var n=this.lastWordRange.eo-this.lastWordRange.so-this.matchingWord.length;n>0&&(this.lastWordRange.so+=n)}if(this.lastWordRange.insertNode(t),"next"===this.options.hintSelect){var i=document.createTextNode("");_e()(t).after(i),Ye.createFromNodeBefore(i).select()}else Ye.createFromNodeAfter(t).select();this.lastWordRange=null,this.hide(),this.context.invoke("editor.focus")}}},{key:"nodeFromItem",value:function(e){var t=this.hints[e.data("index")],n=e.data("item"),i=t.content?t.content(n):n;return"string"==typeof i&&(i=We.createText(i)),i}},{key:"createItemTemplates",value:function(e,t){var n=this.hints[e];return t.map(function(t){var i=_e()('<div class="note-hint-item"/>');return i.append(n.template?n.template(t):t+""),i.data({index:e,item:t}),i})}},{key:"handleKeydown",value:function(e){this.$popover.is(":visible")&&(e.keyCode===Xe.code.ENTER?(e.preventDefault(),this.replace()):e.keyCode===Xe.code.UP?(e.preventDefault(),this.moveUp()):e.keyCode===Xe.code.DOWN&&(e.preventDefault(),this.moveDown()))}},{key:"searchKeyword",value:function(e,t,n){var i=this.hints[e];if(i&&i.match.test(t)&&i.search){var o=i.match.exec(t);this.matchingWord=o[0],i.search(o[1],n)}else n()}},{key:"createGroup",value:function(e,t){var n=this,i=_e()('<div class="note-hint-group note-hint-group-'+e+'"/>');return this.searchKeyword(e,t,function(t){(t=t||[]).length&&(i.html(n.createItemTemplates(e,t)),n.show())}),i}},{key:"handleKeyup",value:function(e){var t=this;if(!$e.contains([Xe.code.ENTER,Xe.code.UP,Xe.code.DOWN],e.keyCode)){var n,i,o=this.context.invoke("editor.getLastRange");if("words"===this.options.hintMode){if(n=o.getWordsRange(o),i=n.toString(),this.hints.forEach(function(e){if(e.match.test(i))return n=o.getWordsMatchRange(e.match),!1}),!n)return void this.hide();i=n.toString()}else n=o.getWordRange(),i=n.toString();if(this.hints.length&&i){this.$content.empty();var r=Ie.rect2bnd($e.last(n.getClientRects())),s=_e()(this.options.container).offset();r&&(r.top-=s.top,r.left-=s.left,this.$popover.hide(),this.lastWordRange=n,this.hints.forEach(function(e,n){e.match.test(i)&&t.createGroup(n,i).appendTo(t.$content)}),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:r.left,top:r.top-this.$popover.outerHeight()-5}):this.$popover.css({left:r.left,top:r.top+r.height+5}))}else this.hide()}}},{key:"show",value:function(){this.$popover.show()}},{key:"hide",value:function(){this.$popover.hide()}}])&&me(t.prototype,n),i&&me(t,i),e}();_e.a.summernote=_e.a.extend(_e.a.summernote,{version:"0.8.16",plugins:{},dom:We,range:Ye,lists:$e,options:{langInfo:_e.a.summernote.lang["en-US"],editing:!0,modules:{editor:it,clipboard:ot,dropzone:rt,codeview:st,statusbar:at,fullscreen:lt,handle:ct,hintPopover:St,autoLink:dt,autoSync:ht,autoReplace:pt,placeholder:ft,buttons:gt,toolbar:mt,linkDialog:vt,linkPopover:_t,imageDialog:yt,imagePopover:bt,tablePopover:wt,videoDialog:xt,helpDialog:kt,airPopover:Ct},buttons:{},lang:"en-US",followingToolbar:!1,toolbarPosition:"top",otherStaticBar:"",toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["resize",["resizeFull","resizeHalf","resizeQuarter","resizeNone"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]],["view",["fullscreen","codeview"]]]},airMode:!1,overrideContextMenu:!1,width:null,height:null,linkTargetBlank:!0,useProtocol:!0,defaultProtocol:"http://",focus:!1,tabDisabled:!1,tabSize:4,styleWithCSS:!1,shortcuts:!0,textareaAutoSync:!0,tooltip:"auto",container:null,maxTextLength:0,blockquoteBreakingLevel:2,spellCheck:!0,disableGrammar:!1,placeholder:null,inheritPlaceholder:!1,recordEveryKeystroke:!1,historyLimit:200,hintMode:"word",hintSelect:"after",hintDirection:"bottom",styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontNamesIgnoreCheck:[],addDefaultFonts:!0,fontSizes:["8","9","10","11","12","14","18","24","36"],fontSizeUnits:["px","pt"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],colorButton:{foreColor:"#000000",backColor:"#FFFF00"},lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,callbacks:{onBeforeCommand:null,onBlur:null,onBlurCodeview:null,onChange:null,onChangeCodeview:null,onDialogShown:null,onEnter:null,onFocus:null,onImageLinkInsert:null,onImageUpload:null,onImageUploadError:null,onInit:null,onKeydown:null,onKeyup:null,onMousedown:null,onMouseup:null,onPaste:null,onScroll:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},codeviewFilter:!1,codeviewFilterRegex:/<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|ilayer|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|t(?:itle|extarea)|xml)[^>]*?>/gi,codeviewIframeFilter:!0,codeviewIframeWhitelistSrc:[],codeviewIframeWhitelistSrcBase:["www.youtube.com","www.youtube-nocookie.com","www.facebook.com","vine.co","instagram.com","player.vimeo.com","www.dailymotion.com","player.youku.com","v.qq.com"],keyMap:{pc:{ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",floatLeft:"note-icon-float-left",floatRight:"note-icon-float-right",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-menu-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",rollback:"note-icon-rollback",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}})},5:function(e,t,n){},53:function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.r(t);var o=n(0),r=n.n(o),s=n(1),a=s.a.create('<div class="note-editor note-frame card"/>'),l=s.a.create('<div class="note-toolbar card-header" role="toolbar"></div>'),c=s.a.create('<div class="note-editing-area"/>'),u=s.a.create('<textarea class="note-codable" aria-multiline="true"/>'),d=s.a.create('<div class="note-editable card-block" contentEditable="true" role="textbox" aria-multiline="true"/>'),h=s.a.create(['<output class="note-status-output" role="status" aria-live="polite"/>','<div class="note-statusbar" role="status">','<output class="note-status-output" aria-live="polite"></output>','<div class="note-resizebar" aria-label="Resize">','<div class="note-icon-bar"/>','<div class="note-icon-bar"/>','<div class="note-icon-bar"/>',"</div>","</div>"].join("")),p=s.a.create('<div class="note-editor note-airframe"/>'),f=s.a.create(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"/>','<output class="note-status-output" role="status" aria-live="polite"/>'].join("")),g=s.a.create('<div class="note-btn-group btn-group">'),m=s.a.create('<div class="note-dropdown-menu dropdown-menu" role="list">',function(e,t){var n=Array.isArray(t.items)?t.items.map(function(e){var n="string"==typeof e?e:e.value||"",o=t.template?t.template(e):e,r="object"===i(e)?e.option:void 0;return'<a class="dropdown-item" href="#" data-value="'+n+'"'+(void 0!==r?' data-option="'+r+'"':"")+' role="listitem" aria-label="'+n+'">'+o+"</a>"}).join(""):t.items;e.html(n).attr({"aria-label":t.title})}),v=function(e){return e},_=s.a.create('<div class="note-dropdown-menu dropdown-menu note-check" role="list">',function(e,t){var n=Array.isArray(t.items)?t.items.map(function(e){var n="string"==typeof e?e:e.value||"",i=t.template?t.template(e):e;return'<a class="dropdown-item" href="#" data-value="'+n+'" role="listitem" aria-label="'+e+'">'+x(t.checkClassName)+" "+i+"</a>"}).join(""):t.items;e.html(n).attr({"aria-label":t.title})}),y=s.a.create('<div class="modal note-modal" aria-hidden="false" tabindex="-1" role="dialog"/>',function(e,t){t.fade&&e.addClass("fade"),e.attr({"aria-label":t.title}),e.html(['<div class="modal-dialog">','<div class="modal-content">',t.title?'<div class="modal-header"><h4 class="modal-title">'+t.title+'</h4><button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">&times;</button></div>':"",'<div class="modal-body">'+t.body+"</div>",t.footer?'<div class="modal-footer">'+t.footer+"</div>":"","</div>","</div>"].join(""))}),b=s.a.create(['<div class="note-popover popover in">','<div class="arrow"/>','<div class="popover-content note-children-container"/>',"</div>"].join(""),function(e,t){var n=void 0!==t.direction?t.direction:"bottom";e.addClass(n),t.hideArrow&&e.find(".arrow").hide()}),w=s.a.create('<div class="form-check"></div>',function(e,t){e.html(['<label class="form-check-label"'+(t.id?' for="note-'+t.id+'"':"")+">",'<input type="checkbox" class="form-check-input"'+(t.id?' id="note-'+t.id+'"':""),t.checked?" checked":"",' aria-label="'+(t.text?t.text:"")+'"',' aria-checked="'+(t.checked?"true":"false")+'"/>'," "+(t.text?t.text:"")+"</label>"].join(""))}),x=function(e,t){return"<"+(t=t||"i")+' class="'+e+'"/>'},k=function(e){return{editor:a,toolbar:l,editingArea:c,codable:u,editable:d,statusbar:h,airEditor:p,airEditable:f,buttonGroup:g,dropdown:m,dropdownButtonContents:v,dropdownCheck:_,dialog:y,popover:b,icon:x,checkbox:w,options:e,palette:function(t,n){return s.a.create('<div class="note-color-palette"/>',function(t,n){for(var i=[],o=0,r=n.colors.length;o<r;o++){for(var s=n.eventName,a=n.colors[o],l=n.colorsName[o],c=[],u=0,d=a.length;u<d;u++){var h=a[u],p=l[u];c.push(['<button type="button" class="note-color-btn"','style="background-color:',h,'" ','data-event="',s,'" ','data-value="',h,'" ','title="',p,'" ','aria-label="',p,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}i.push('<div class="note-color-row">'+c.join("")+"</div>")}t.html(i.join("")),n.tooltip&&t.find(".note-color-btn").tooltip({container:n.container||e.container,trigger:"hover",placement:"bottom"})})(t,n)},button:function(t,n){return s.a.create('<button type="button" class="note-btn btn btn-light btn-sm" tabindex="-1">',function(t,n){n&&n.tooltip&&t.attr({title:n.tooltip,"aria-label":n.tooltip}).tooltip({container:n.container||e.container,trigger:"hover",placement:"bottom"}).on("click",function(e){r()(e.currentTarget).tooltip("hide")})})(t,n)},toggleBtn:function(e,t){e.toggleClass("disabled",!t),e.attr("disabled",!t)},toggleBtnActive:function(e,t){e.toggleClass("active",t)},onDialogShown:function(e,t){e.one("shown.bs.modal",t)},onDialogHidden:function(e,t){e.one("hidden.bs.modal",t)},showDialog:function(e){e.modal("show")},hideDialog:function(e){e.modal("hide")},createLayout:function(t){var n=(e.airMode?p([c([u(),f()])]):"bottom"===e.toolbarPosition?a([c([u(),d()]),l(),h()]):a([l(),c([u(),d()]),h()])).render();return n.insertAfter(t),{note:t,editor:n,toolbar:n.find(".note-toolbar"),editingArea:n.find(".note-editing-area"),editable:n.find(".note-editable"),codable:n.find(".note-codable"),statusbar:n.find(".note-statusbar")}},removeLayout:function(e,t){e.html(t.editable.html()),t.editor.remove(),e.show()}}};n(3),n(5),r.a.summernote=r.a.extend(r.a.summernote,{ui_template:k,interface:"bs4"}),r.a.summernote.options.styleTags=["p",{title:"Blockquote",tag:"blockquote",className:"blockquote",value:"blockquote"},"pre","h1","h2","h3","h4","h5","h6"]}})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";function e(){return yi.apply(null,arguments)}function t(e){yi=e}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){var t;for(t in e)return!1;return!0}function r(e){return void 0===e}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,i=[];for(n=0;n<e.length;++n)i.push(t(e[n],n));return i}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,n,i){return _t(e,t,n,i,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function p(e){return null==e._pf&&(e._pf=h()),e._pf}function f(e){if(null==e._isValid){var t=p(e),n=xi.call(t.parsedDateParts,function(e){return null!=e}),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function g(e){var t=d(NaN);return null!=e?u(p(t),e):p(t).userInvalidated=!0,t}function m(e,t){var n,i,o;if(r(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),r(t._i)||(e._i=t._i),r(t._f)||(e._f=t._f),r(t._l)||(e._l=t._l),r(t._strict)||(e._strict=t._strict),r(t._tzm)||(e._tzm=t._tzm),r(t._isUTC)||(e._isUTC=t._isUTC),r(t._offset)||(e._offset=t._offset),r(t._pf)||(e._pf=p(t)),r(t._locale)||(e._locale=t._locale),ki.length>0)for(n=0;n<ki.length;n++)i=ki[n],o=t[i],r(o)||(e[i]=o);return e}function v(t){m(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===Ci&&(Ci=!0,e.updateOffset(this),Ci=!1)}function _(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function y(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function b(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=y(t)),n}function w(e,t,n){var i,o=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),s=0;for(i=0;i<o;i++)(n&&e[i]!==t[i]||!n&&b(e[i])!==b(t[i]))&&s++;return s+r}function x(t){!1===e.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function k(t,n){var i=!0;return u(function(){if(null!=e.deprecationHandler&&e.deprecationHandler(null,t),i){for(var o,r=[],s=0;s<arguments.length;s++){if(o="","object"==typeof arguments[s]){for(var a in o+="\n["+s+"] ",arguments[0])o+=a+": "+arguments[0][a]+", ";o=o.slice(0,-2)}else o=arguments[s];r.push(o)}x(t+"\nArguments: "+Array.prototype.slice.call(r).join("")+"\n"+(new Error).stack),i=!1}return n.apply(this,arguments)},n)}function C(t,n){null!=e.deprecationHandler&&e.deprecationHandler(t,n),Si[t]||(x(n),Si[t]=!0)}function S(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function T(e){var t,n;for(n in e)t=e[n],S(t)?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function E(e,t){var n,o=u({},e);for(n in t)c(t,n)&&(i(e[n])&&i(t[n])?(o[n]={},u(o[n],e[n]),u(o[n],t[n])):null!=t[n]?o[n]=t[n]:delete o[n]);for(n in e)c(e,n)&&!c(t,n)&&i(e[n])&&(o[n]=u({},o[n]));return o}function P(e){null!=e&&this.set(e)}function A(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return S(i)?i.call(t,n):i}function D(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}function I(){return this._invalidDate}function $(e){return this._ordinal.replace("%d",e)}function O(e,t,n,i){var o=this._relativeTime[n];return S(o)?o(e,t,n,i):o.replace(/%d/i,e)}function M(e,t){var n=this._relativeTime[e>0?"future":"past"];return S(n)?n(t):n.replace(/%s/i,t)}function F(e,t){var n=e.toLowerCase();Mi[n]=Mi[n+"s"]=Mi[t]=e}function R(e){return"string"==typeof e?Mi[e]||Mi[e.toLowerCase()]:void 0}function L(e){var t,n,i={};for(n in e)c(e,n)&&(t=R(n),t&&(i[t]=e[n]));return i}function N(e,t){Fi[e]=t}function B(e){var t=[];for(var n in e)t.push({unit:n,priority:Fi[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function U(t,n){return function(i){return null!=i?(z(this,t,i),e.updateOffset(this,n),this):j(this,t)}}function j(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function z(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function H(e){return e=R(e),S(this[e])?this[e]():this}function W(e,t){if("object"==typeof e){e=L(e);for(var n=B(e),i=0;i<n.length;i++)this[n[i].unit](e[n[i].unit])}else if(e=R(e),S(this[e]))return this[e](t);return this}function q(e,t,n){var i=""+Math.abs(e),o=t-i.length,r=e>=0;return(r?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+i}function V(e,t,n,i){var o=i;"string"==typeof i&&(o=function(){return this[i]()}),e&&(Bi[e]=o),t&&(Bi[t[0]]=function(){return q(o.apply(this,arguments),t[1],t[2])}),n&&(Bi[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function Y(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function G(e){var t,n,i=e.match(Ri);for(t=0,n=i.length;t<n;t++)Bi[i[t]]?i[t]=Bi[i[t]]:i[t]=Y(i[t]);return function(t){var o,r="";for(o=0;o<n;o++)r+=S(i[o])?i[o].call(t,e):i[o];return r}}function X(e,t){return e.isValid()?(t=K(t,e.localeData()),Ni[t]=Ni[t]||G(t),Ni[t](e)):e.localeData().invalidDate()}function K(e,t){function n(e){return t.longDateFormat(e)||e}var i=5;for(Li.lastIndex=0;i>=0&&Li.test(e);)e=e.replace(Li,n),Li.lastIndex=0,i-=1;return e}function Q(e,t,n){
io[e]=S(t)?t:function(e,i){return e&&n?n:t}}function J(e,t){return c(io,e)?io[e](t._strict,t._locale):new RegExp(Z(e))}function Z(e){return ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,i,o){return t||n||i||o}))}function ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function te(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),s(t)&&(i=function(e,n){n[t]=b(e)}),n=0;n<e.length;n++)oo[e[n]]=i}function ne(e,t){te(e,function(e,n,i,o){i._w=i._w||{},t(e,i._w,i,o)})}function ie(e,t,n){null!=t&&c(oo,e)&&oo[e](t,n._a,n,e)}function oe(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function re(e,t){return e?n(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||mo).test(t)?"format":"standalone"][e.month()]:n(this._months)?this._months:this._months.standalone}function se(e,t){return e?n(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[mo.test(t)?"format":"standalone"][e.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ae(e,t,n){var i,o,r,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=d([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?(o=go.call(this._shortMonthsParse,s),-1!==o?o:null):(o=go.call(this._longMonthsParse,s),-1!==o?o:null):"MMM"===t?(o=go.call(this._shortMonthsParse,s),-1!==o?o:(o=go.call(this._longMonthsParse,s),-1!==o?o:null)):(o=go.call(this._longMonthsParse,s),-1!==o?o:(o=go.call(this._shortMonthsParse,s),-1!==o?o:null))}function le(e,t,n){var i,o,r;if(this._monthsParseExact)return ae.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(o=d([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}}function ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=b(t);else if(t=e.localeData().monthsParse(t),!s(t))return e;return n=Math.min(e.date(),oe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ue(t){return null!=t?(ce(this,t),e.updateOffset(this,!0),this):j(this,"Month")}function de(){return oe(this.year(),this.month())}function he(e){return this._monthsParseExact?(c(this,"_monthsRegex")||fe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=yo),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function pe(e){return this._monthsParseExact?(c(this,"_monthsRegex")||fe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=bo),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function fe(){function e(e,t){return t.length-e.length}var t,n,i=[],o=[],r=[];for(t=0;t<12;t++)n=d([2e3,t]),i.push(this.monthsShort(n,"")),o.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(e),o.sort(e),r.sort(e),t=0;t<12;t++)i[t]=ee(i[t]),o[t]=ee(o[t]);for(t=0;t<24;t++)r[t]=ee(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function ge(e){return me(e)?366:365}function me(e){return e%4==0&&e%100!=0||e%400==0}function ve(){return me(this.year())}function _e(e,t,n,i,o,r,s){var a=new Date(e,t,n,i,o,r,s);return e<100&&e>=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function ye(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function be(e,t,n){var i=7+t-n,o=(7+ye(e,0,i).getUTCDay()-t)%7;return-o+i-1}function we(e,t,n,i,o){var r,s,a=(7+n-i)%7,l=be(e,i,o),c=1+7*(t-1)+a+l;return c<=0?(r=e-1,s=ge(r)+c):c>ge(e)?(r=e+1,s=c-ge(e)):(r=e,s=c),{year:r,dayOfYear:s}}function xe(e,t,n){var i,o,r=be(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1;return s<1?(o=e.year()-1,i=s+ke(o,t,n)):s>ke(e.year(),t,n)?(i=s-ke(e.year(),t,n),o=e.year()+1):(o=e.year(),i=s),{week:i,year:o}}function ke(e,t,n){var i=be(e,t,n),o=be(e+1,t,n);return(ge(e)-i+o)/7}function Ce(e){return xe(e,this._week.dow,this._week.doy).week}function Se(){return this._week.dow}function Te(){return this._week.doy}function Ee(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Pe(e){var t=xe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ae(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function De(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ie(e,t){return e?n(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:n(this._weekdays)?this._weekdays:this._weekdays.standalone}function $e(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Oe(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Me(e,t,n){var i,o,r,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=d([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?(o=go.call(this._weekdaysParse,s),-1!==o?o:null):"ddd"===t?(o=go.call(this._shortWeekdaysParse,s),-1!==o?o:null):(o=go.call(this._minWeekdaysParse,s),-1!==o?o:null):"dddd"===t?(o=go.call(this._weekdaysParse,s),-1!==o?o:(o=go.call(this._shortWeekdaysParse,s),-1!==o?o:(o=go.call(this._minWeekdaysParse,s),-1!==o?o:null))):"ddd"===t?(o=go.call(this._shortWeekdaysParse,s),-1!==o?o:(o=go.call(this._weekdaysParse,s),-1!==o?o:(o=go.call(this._minWeekdaysParse,s),-1!==o?o:null))):(o=go.call(this._minWeekdaysParse,s),-1!==o?o:(o=go.call(this._weekdaysParse,s),-1!==o?o:(o=go.call(this._shortWeekdaysParse,s),-1!==o?o:null)))}function Fe(e,t,n){var i,o,r;if(this._weekdaysParseExact)return Me.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(o=d([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(o,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(o,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function Re(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Ae(e,this.localeData()),this.add(e-t,"d")):t}function Le(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ne(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=De(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Be(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ze.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=To),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ue(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ze.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Eo),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function je(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ze.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Po),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ze(){function e(e,t){return t.length-e.length}var t,n,i,o,r,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),i=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),r=this.weekdays(n,""),s.push(i),a.push(o),l.push(r),c.push(i),c.push(o),c.push(r);for(s.sort(e),a.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)a[t]=ee(a[t]),l[t]=ee(l[t]),c[t]=ee(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function He(){return this.hours()%12||12}function We(){return this.hours()||24}function qe(e,t){V(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ve(e,t){return t._meridiemParse}function Ye(e){return"p"===(e+"").toLowerCase().charAt(0)}function Ge(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Xe(e){return e?e.toLowerCase().replace("_","-"):e}function Ke(e){for(var t,n,i,o,r=0;r<e.length;){for(o=Xe(e[r]).split("-"),t=o.length,n=Xe(e[r+1]),n=n?n.split("-"):null;t>0;){if(i=Qe(o.slice(0,t).join("-")))return i;if(n&&n.length>=t&&w(o,n,!0)>=t-1)break;t--}r++}return null}function Qe(e){var t=null;if(!Oo[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=Ao._abbr,require("./locale/"+e),Je(t)}catch(e){}return Oo[e]}function Je(e,t){var n;return e&&(n=r(t)?tt(e):Ze(e,t),n&&(Ao=n)),Ao._abbr}function Ze(e,t){if(null!==t){var n=$o;if(t.abbr=e,null!=Oo[e])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Oo[e]._config;else if(null!=t.parentLocale){if(null==Oo[t.parentLocale])return Mo[t.parentLocale]||(Mo[t.parentLocale]=[]),Mo[t.parentLocale].push({name:e,config:t}),null;n=Oo[t.parentLocale]._config}return Oo[e]=new P(E(n,t)),Mo[e]&&Mo[e].forEach(function(e){Ze(e.name,e.config)}),Je(e),Oo[e]}return delete Oo[e],null}function et(e,t){if(null!=t){var n,i=$o;null!=Oo[e]&&(i=Oo[e]._config),t=E(i,t),n=new P(t),n.parentLocale=Oo[e],Oo[e]=n,Je(e)}else null!=Oo[e]&&(null!=Oo[e].parentLocale?Oo[e]=Oo[e].parentLocale:null!=Oo[e]&&delete Oo[e]);return Oo[e]}function tt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ao;if(!n(e)){if(t=Qe(e))return t;e=[e]}return Ke(e)}function nt(){return Ei(Oo)}function it(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[so]<0||n[so]>11?so:n[ao]<1||n[ao]>oe(n[ro],n[so])?ao:n[lo]<0||n[lo]>24||24===n[lo]&&(0!==n[co]||0!==n[uo]||0!==n[ho])?lo:n[co]<0||n[co]>59?co:n[uo]<0||n[uo]>59?uo:n[ho]<0||n[ho]>999?ho:-1,p(e)._overflowDayOfYear&&(t<ro||t>ao)&&(t=ao),p(e)._overflowWeeks&&-1===t&&(t=po),p(e)._overflowWeekday&&-1===t&&(t=fo),p(e).overflow=t),e}function ot(e){var t,n,i,o,r,s,a=e._i,l=Fo.exec(a)||Ro.exec(a);if(l){for(p(e).iso=!0,t=0,n=No.length;t<n;t++)if(No[t][1].exec(l[1])){o=No[t][0],i=!1!==No[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=Bo.length;t<n;t++)if(Bo[t][1].exec(l[3])){r=(l[2]||" ")+Bo[t][0];break}if(null==r)return void(e._isValid=!1)}if(!i&&null!=r)return void(e._isValid=!1);if(l[4]){if(!Lo.exec(l[4]))return void(e._isValid=!1);s="Z"}e._f=o+(r||"")+(s||""),dt(e)}else e._isValid=!1}function rt(e){var t,n,i,o,r,s,a,l,c={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"},u="YXWVUTSRQPONZABCDEFGHIKLM";if(t=e._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,""),n=jo.exec(t)){if(i=n[1]?"ddd"+(5===n[1].length?", ":" "):"",o="D MMM "+(n[2].length>10?"YYYY ":"YY "),r="HH:mm"+(n[4]?":ss":""),n[1]){var d=new Date(n[2]),h=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][d.getDay()];if(n[1].substr(0,3)!==h)return p(e).weekdayMismatch=!0,void(e._isValid=!1)}switch(n[5].length){case 2:0===l?a=" +0000":(l=u.indexOf(n[5][1].toUpperCase())-12,a=(l<0?" -":" +")+(""+l).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:a=c[n[5]];break;default:a=c[" GMT"]}n[5]=a,e._i=n.splice(1).join(""),s=" ZZ",e._f=i+o+r+s,dt(e),p(e).rfc2822=!0}else e._isValid=!1}function st(t){var n=Uo.exec(t._i);return null!==n?void(t._d=new Date(+n[1])):(ot(t),void(!1===t._isValid&&(delete t._isValid,rt(t),!1===t._isValid&&(delete t._isValid,e.createFromInputFallback(t)))))}function at(e,t,n){return null!=e?e:null!=t?t:n}function lt(t){var n=new Date(e.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function ct(e){var t,n,i,o,r=[];if(!e._d){for(i=lt(e),e._w&&null==e._a[ao]&&null==e._a[so]&&ut(e),null!=e._dayOfYear&&(o=at(e._a[ro],i[ro]),(e._dayOfYear>ge(o)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=ye(o,0,e._dayOfYear),e._a[so]=n.getUTCMonth(),e._a[ao]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[lo]&&0===e._a[co]&&0===e._a[uo]&&0===e._a[ho]&&(e._nextDay=!0,e._a[lo]=0),e._d=(e._useUTC?ye:_e).apply(null,r),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[lo]=24)}}function ut(e){var t,n,i,o,r,s,a,l;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)r=1,s=4,n=at(t.GG,e._a[ro],xe(yt(),1,4).year),i=at(t.W,1),o=at(t.E,1),(o<1||o>7)&&(l=!0);else{r=e._locale._week.dow,s=e._locale._week.doy;var c=xe(yt(),r,s);n=at(t.gg,e._a[ro],c.year),i=at(t.w,c.week),null!=t.d?(o=t.d,(o<0||o>6)&&(l=!0)):null!=t.e?(o=t.e+r,(t.e<0||t.e>6)&&(l=!0)):o=r}i<1||i>ke(n,r,s)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(a=we(n,i,o,r,s),e._a[ro]=a.year,e._dayOfYear=a.dayOfYear)}function dt(t){if(t._f!==e.ISO_8601)if(t._f!==e.RFC_2822){t._a=[],p(t).empty=!0;var n,i,o,r,s,a=""+t._i,l=a.length,c=0;for(o=K(t._f,t._locale).match(Ri)||[],n=0;n<o.length;n++)r=o[n],i=(a.match(J(r,t))||[])[0],i&&(s=a.substr(0,a.indexOf(i)),s.length>0&&p(t).unusedInput.push(s),a=a.slice(a.indexOf(i)+i.length),c+=i.length),Bi[r]?(i?p(t).empty=!1:p(t).unusedTokens.push(r),ie(r,i,t)):t._strict&&!i&&p(t).unusedTokens.push(r);p(t).charsLeftOver=l-c,a.length>0&&p(t).unusedInput.push(a),t._a[lo]<=12&&!0===p(t).bigHour&&t._a[lo]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[lo]=ht(t._locale,t._a[lo],t._meridiem),ct(t),it(t)}else rt(t);else ot(t)}function ht(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(i=e.isPM(n),i&&t<12&&(t+=12),i||12!==t||(t=0),t):t}function pt(e){var t,n,i,o,r;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)r=0,t=m({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],dt(t),f(t)&&(r+=p(t).charsLeftOver,r+=10*p(t).unusedTokens.length,p(t).score=r,(null==i||r<i)&&(i=r,n=t));u(e,n||t)}function ft(e){if(!e._d){var t=L(e._i);e._a=l([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ct(e)}}function gt(e){var t=new v(it(mt(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function mt(e){var t=e._i,i=e._f;return e._locale=e._locale||tt(e._l),null===t||void 0===i&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),_(t)?new v(it(t)):(a(t)?e._d=t:n(i)?pt(e):i?dt(e):vt(e),f(e)||(e._d=null),e))}function vt(t){var o=t._i;r(o)?t._d=new Date(e.now()):a(o)?t._d=new Date(o.valueOf()):"string"==typeof o?st(t):n(o)?(t._a=l(o.slice(0),function(e){return parseInt(e,10)}),ct(t)):i(o)?ft(t):s(o)?t._d=new Date(o):e.createFromInputFallback(t)}function _t(e,t,r,s,a){var l={};return!0!==r&&!1!==r||(s=r,r=void 0),(i(e)&&o(e)||n(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=r,l._i=e,l._f=t,l._strict=s,gt(l)}function yt(e,t,n,i){return _t(e,t,n,i,!1)}function bt(e,t){var i,o;if(1===t.length&&n(t[0])&&(t=t[0]),!t.length)return yt();for(i=t[0],o=1;o<t.length;++o)t[o].isValid()&&!t[o][e](i)||(i=t[o]);return i}function wt(){var e=[].slice.call(arguments,0);return bt("isBefore",e)}function xt(){var e=[].slice.call(arguments,0);return bt("isAfter",e)}function kt(e){for(var t in e)if(-1===qo.indexOf(t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,i=0;i<qo.length;++i)if(e[qo[i]]){if(n)return!1;parseFloat(e[qo[i]])!==b(e[qo[i]])&&(n=!0)}return!0}function Ct(){return this._isValid}function St(){return Wt(NaN)}function Tt(e){var t=L(e),n=t.year||0,i=t.quarter||0,o=t.month||0,r=t.week||0,s=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=kt(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*a*60*60,this._days=+s+7*r,this._months=+o+3*i+12*n,this._data={},this._locale=tt(),this._bubble()}function Et(e){return e instanceof Tt}function Pt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function At(e,t){V(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+q(~~(e/60),2)+t+q(~~e%60,2)})}function Dt(e,t){var n=(t||"").match(e);if(null===n)return null;var i=n[n.length-1]||[],o=(i+"").match(Vo)||["-",0,0],r=60*o[1]+b(o[2]);return 0===r?0:"+"===o[0]?r:-r}function It(t,n){var i,o;return n._isUTC?(i=n.clone(),o=(_(t)||a(t)?t.valueOf():yt(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+o),e.updateOffset(i,!1),i):yt(t).local()}function $t(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Ot(t,n,i){var o,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(t=Dt(eo,t),null===t)return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&n&&(o=$t(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),r!==t&&(!n||this._changeInProgress?Xt(this,Wt(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:$t(this)}function Mt(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Ft(e){return this.utcOffset(0,e)}function Rt(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract($t(this),"m")),this}function Lt(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Dt(Zi,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Nt(e){return!!this.isValid()&&(e=e?yt(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function Bt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ut(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e={};if(m(e,this),e=mt(e),e._a){var t=e._isUTC?d(e._a):yt(e._a);this._isDSTShifted=this.isValid()&&w(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function jt(){return!!this.isValid()&&!this._isUTC}function zt(){return!!this.isValid()&&this._isUTC}function Ht(){return!!this.isValid()&&this._isUTC&&0===this._offset}function Wt(e,t){var n,i,o,r=e,a=null;return Et(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:s(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=Yo.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:b(a[ao])*n,h:b(a[lo])*n,m:b(a[co])*n,s:b(a[uo])*n,ms:b(Pt(1e3*a[ho]))*n}):(a=Go.exec(e))?(n="-"===a[1]?-1:1,r={y:qt(a[2],n),M:qt(a[3],n),w:qt(a[4],n),d:qt(a[5],n),h:qt(a[6],n),m:qt(a[7],n),s:qt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(o=Yt(yt(r.from),yt(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),i=new Tt(r),Et(e)&&c(e,"_locale")&&(i._locale=e._locale),i}function qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Vt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Yt(e,t){var n;return e.isValid()&&t.isValid()?(t=It(t,e),e.isBefore(t)?n=Vt(e,t):(n=Vt(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Gt(e,t){return function(n,i){var o,r;return null===i||isNaN(+i)||(C(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=i,i=r),n="string"==typeof n?+n:n,o=Wt(n,i),Xt(this,o,e),this}}function Xt(t,n,i,o){var r=n._milliseconds,s=Pt(n._days),a=Pt(n._months);t.isValid()&&(o=null==o||o,r&&t._d.setTime(t._d.valueOf()+r*i),s&&z(t,"Date",j(t,"Date")+s*i),a&&ce(t,j(t,"Month")+a*i),o&&e.updateOffset(t,s||a))}function Kt(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Qt(t,n){var i=t||yt(),o=It(i,this).startOf("day"),r=e.calendarFormat(this,o)||"sameElse",s=n&&(S(n[r])?n[r].call(this,i):n[r]);return this.format(s||this.localeData().calendar(r,this,yt(i)))}function Jt(){return new v(this)}function Zt(e,t){var n=_(e)?e:yt(e);return!(!this.isValid()||!n.isValid())&&(t=R(r(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function en(e,t){var n=_(e)?e:yt(e);return!(!this.isValid()||!n.isValid())&&(t=R(r(t)?"millisecond":t),"millisecond"===t?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function tn(e,t,n,i){return i=i||"()",("("===i[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===i[1]?this.isBefore(t,n):!this.isAfter(t,n))}function nn(e,t){var n,i=_(e)?e:yt(e);return!(!this.isValid()||!i.isValid())&&(t=R(t||"millisecond"),"millisecond"===t?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function on(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function rn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function sn(e,t,n){var i,o,r,s;return this.isValid()?(i=It(e,this),i.isValid()?(o=6e4*(i.utcOffset()-this.utcOffset()),t=R(t),"year"===t||"month"===t||"quarter"===t?(s=an(this,i),"quarter"===t?s/=3:"year"===t&&(s/=12)):(r=this-i,s="second"===t?r/1e3:"minute"===t?r/6e4:"hour"===t?r/36e5:"day"===t?(r-o)/864e5:"week"===t?(r-o)/6048e5:r),n?s:y(s)):NaN):NaN}function an(e,t){var n,i,o=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(o,"months");return t-r<0?(n=e.clone().add(o-1,"months"),i=(t-r)/(r-n)):(n=e.clone().add(o+1,"months"),i=(t-r)/(n-r)),-(o+i)||0}function ln(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function cn(){if(!this.isValid())return null;var e=this.clone().utc();return e.year()<0||e.year()>9999?X(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):S(Date.prototype.toISOString)?this.toDate().toISOString():X(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function un(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",r=t+'[")]';return this.format(n+i+o+r)}function dn(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var n=X(this,t);return this.localeData().postformat(n)}function hn(e,t){return this.isValid()&&(_(e)&&e.isValid()||yt(e).isValid())?Wt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function pn(e){return this.from(yt(),e)}function fn(e,t){return this.isValid()&&(_(e)&&e.isValid()||yt(e).isValid())?Wt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function gn(e){return this.to(yt(),e)}function mn(e){var t;return void 0===e?this._locale._abbr:(t=tt(e),null!=t&&(this._locale=t),this)}function vn(){return this._locale}function _n(e){switch(e=R(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function yn(e){return e=R(e),void 0===e||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function bn(){return this._d.valueOf()-6e4*(this._offset||0)}function wn(){return Math.floor(this.valueOf()/1e3)}function xn(){return new Date(this.valueOf())}function kn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Cn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Sn(){return this.isValid()?this.toISOString():null}function Tn(){return f(this)}function En(){return u({},p(this))}function Pn(){return p(this).overflow}function An(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Dn(e,t){V(0,[e,e.length],0,t)}function In(e){return Fn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function $n(e){return Fn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function On(){return ke(this.year(),1,4)}function Mn(){var e=this.localeData()._week;return ke(this.year(),e.dow,e.doy)}function Fn(e,t,n,i,o){var r;return null==e?xe(this,i,o).year:(r=ke(e,i,o),t>r&&(t=r),Rn.call(this,e,t,n,i,o))}function Rn(e,t,n,i,o){var r=we(e,t,n,i,o),s=ye(r.year,0,r.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Ln(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Nn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Bn(e,t){t[ho]=b(1e3*("0."+e))}function Un(){return this._isUTC?"UTC":""}function jn(){return this._isUTC?"Coordinated Universal Time":""}function zn(e){return yt(1e3*e)}function Hn(){return yt.apply(null,arguments).parseZone()}function Wn(e){return e}function qn(e,t,n,i){var o=tt(),r=d().set(i,t);return o[n](r,e)}function Vn(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return qn(e,t,n,"month");var i,o=[];for(i=0;i<12;i++)o[i]=qn(e,i,n,"month");return o}function Yn(e,t,n,i){"boolean"==typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var o=tt(),r=e?o._week.dow:0;if(null!=n)return qn(t,(n+r)%7,i,"day");var a,l=[];for(a=0;a<7;a++)l[a]=qn(t,(a+r)%7,i,"day");return l}function Gn(e,t){return Vn(e,t,"months")}function Xn(e,t){return Vn(e,t,"monthsShort")}function Kn(e,t,n){return Yn(e,t,n,"weekdays")}function Qn(e,t,n){return Yn(e,t,n,"weekdaysShort")}function Jn(e,t,n){return Yn(e,t,n,"weekdaysMin")}function Zn(){var e=this._data;return this._milliseconds=rr(this._milliseconds),this._days=rr(this._days),this._months=rr(this._months),e.milliseconds=rr(e.milliseconds),e.seconds=rr(e.seconds),e.minutes=rr(e.minutes),e.hours=rr(e.hours),e.months=rr(e.months),e.years=rr(e.years),this}function ei(e,t,n,i){var o=Wt(t,n);return e._milliseconds+=i*o._milliseconds,e._days+=i*o._days,e._months+=i*o._months,e._bubble()}function ti(e,t){return ei(this,e,t,1)}function ni(e,t){return ei(this,e,t,-1)}function ii(e){return e<0?Math.floor(e):Math.ceil(e)}function oi(){var e,t,n,i,o,r=this._milliseconds,s=this._days,a=this._months,l=this._data;return r>=0&&s>=0&&a>=0||r<=0&&s<=0&&a<=0||(r+=864e5*ii(si(a)+s),s=0,a=0),l.milliseconds=r%1e3,e=y(r/1e3),l.seconds=e%60,t=y(e/60),l.minutes=t%60,n=y(t/60),l.hours=n%24,s+=y(n/24),o=y(ri(s)),a+=o,s-=ii(si(o)),i=y(a/12),a%=12,l.days=s,l.months=a,l.years=i,this}function ri(e){return 4800*e/146097}function si(e){return 146097*e/4800}function ai(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if(e=R(e),"month"===e||"year"===e)return t=this._days+i/864e5,n=this._months+ri(t),"month"===e?n:n/12;switch(t=this._days+Math.round(si(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function li(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*b(this._months/12):NaN}function ci(e){return function(){return this.as(e)}}function ui(e){return e=R(e),this.isValid()?this[e+"s"]():NaN}function di(e){return function(){return this.isValid()?this._data[e]:NaN}}function hi(){return y(this.days()/7)}function pi(e,t,n,i,o){return o.relativeTime(t||1,!!n,e,i)}function fi(e,t,n){var i=Wt(e).abs(),o=wr(i.as("s")),r=wr(i.as("m")),s=wr(i.as("h")),a=wr(i.as("d")),l=wr(i.as("M")),c=wr(i.as("y")),u=o<=xr.ss&&["s",o]||o<xr.s&&["ss",o]||r<=1&&["m"]||r<xr.m&&["mm",r]||s<=1&&["h"]||s<xr.h&&["hh",s]||a<=1&&["d"]||a<xr.d&&["dd",a]||l<=1&&["M"]||l<xr.M&&["MM",l]||c<=1&&["y"]||["yy",c];return u[2]=t,u[3]=+e>0,u[4]=n,pi.apply(null,u)}function gi(e){return void 0===e?wr:"function"==typeof e&&(wr=e,!0)}function mi(e,t){return void 0!==xr[e]&&(void 0===t?xr[e]:(xr[e]=t,"s"===e&&(xr.ss=t-1),!0))}function vi(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=fi(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function _i(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i=kr(this._milliseconds)/1e3,o=kr(this._days),r=kr(this._months);e=y(i/60),t=y(e/60),i%=60,e%=60,n=y(r/12),r%=12;var s=n,a=r,l=o,c=t,u=e,d=i,h=this.asSeconds();return h?(h<0?"-":"")+"P"+(s?s+"Y":"")+(a?a+"M":"")+(l?l+"D":"")+(c||u||d?"T":"")+(c?c+"H":"")+(u?u+"M":"")+(d?d+"S":""):"P0D"}var yi,bi;bi=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,i=0;i<n;i++)if(i in t&&e.call(this,t[i],i,t))return!0;return!1};var wi,xi=bi,ki=e.momentProperties=[],Ci=!1,Si={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null,wi=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};var Ti,Ei=wi,Pi={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ai={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Di="Invalid date",Ii="%d",$i=/\d{1,2}/,Oi={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"
},Mi={},Fi={},Ri=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Li=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ni={},Bi={},Ui=/\d/,ji=/\d\d/,zi=/\d{3}/,Hi=/\d{4}/,Wi=/[+-]?\d{6}/,qi=/\d\d?/,Vi=/\d\d\d\d?/,Yi=/\d\d\d\d\d\d?/,Gi=/\d{1,3}/,Xi=/\d{1,4}/,Ki=/[+-]?\d{1,6}/,Qi=/\d+/,Ji=/[+-]?\d+/,Zi=/Z|[+-]\d\d:?\d\d/gi,eo=/Z|[+-]\d\d(?::?\d\d)?/gi,to=/[+-]?\d+(\.\d{1,3})?/,no=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,io={},oo={},ro=0,so=1,ao=2,lo=3,co=4,uo=5,ho=6,po=7,fo=8;Ti=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};var go=Ti;V("M",["MM",2],"Mo",function(){return this.month()+1}),V("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),V("MMMM",0,0,function(e){return this.localeData().months(this,e)}),F("month","M"),N("month",8),Q("M",qi),Q("MM",qi,ji),Q("MMM",function(e,t){return t.monthsShortRegex(e)}),Q("MMMM",function(e,t){return t.monthsRegex(e)}),te(["M","MM"],function(e,t){t[so]=b(e)-1}),te(["MMM","MMMM"],function(e,t,n,i){var o=n._locale.monthsParse(e,i,n._strict);null!=o?t[so]=o:p(n).invalidMonth=e});var mo=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,vo="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),_o="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),yo=no,bo=no;V("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),V(0,["YY",2],0,function(){return this.year()%100}),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),F("year","y"),N("year",1),Q("Y",Ji),Q("YY",qi,ji),Q("YYYY",Xi,Hi),Q("YYYYY",Ki,Wi),Q("YYYYYY",Ki,Wi),te(["YYYYY","YYYYYY"],ro),te("YYYY",function(t,n){n[ro]=2===t.length?e.parseTwoDigitYear(t):b(t)}),te("YY",function(t,n){n[ro]=e.parseTwoDigitYear(t)}),te("Y",function(e,t){t[ro]=parseInt(e,10)}),e.parseTwoDigitYear=function(e){return b(e)+(b(e)>68?1900:2e3)};var wo=U("FullYear",!0);V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),N("week",5),N("isoWeek",5),Q("w",qi),Q("ww",qi,ji),Q("W",qi),Q("WW",qi,ji),ne(["w","ww","W","WW"],function(e,t,n,i){t[i.substr(0,1)]=b(e)});var xo={dow:0,doy:6};V("d",0,"do","day"),V("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),V("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),V("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),N("day",11),N("weekday",11),N("isoWeekday",11),Q("d",qi),Q("e",qi),Q("E",qi),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),ne(["dd","ddd","dddd"],function(e,t,n,i){var o=n._locale.weekdaysParse(e,i,n._strict);null!=o?t.d=o:p(n).invalidWeekday=e}),ne(["d","e","E"],function(e,t,n,i){t[i]=b(e)});var ko="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Co="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),So="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),To=no,Eo=no,Po=no;V("H",["HH",2],0,"hour"),V("h",["hh",2],0,He),V("k",["kk",2],0,We),V("hmm",0,0,function(){return""+He.apply(this)+q(this.minutes(),2)}),V("hmmss",0,0,function(){return""+He.apply(this)+q(this.minutes(),2)+q(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+q(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+q(this.minutes(),2)+q(this.seconds(),2)}),qe("a",!0),qe("A",!1),F("hour","h"),N("hour",13),Q("a",Ve),Q("A",Ve),Q("H",qi),Q("h",qi),Q("k",qi),Q("HH",qi,ji),Q("hh",qi,ji),Q("kk",qi,ji),Q("hmm",Vi),Q("hmmss",Yi),Q("Hmm",Vi),Q("Hmmss",Yi),te(["H","HH"],lo),te(["k","kk"],function(e,t,n){var i=b(e);t[lo]=24===i?0:i}),te(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),te(["h","hh"],function(e,t,n){t[lo]=b(e),p(n).bigHour=!0}),te("hmm",function(e,t,n){var i=e.length-2;t[lo]=b(e.substr(0,i)),t[co]=b(e.substr(i)),p(n).bigHour=!0}),te("hmmss",function(e,t,n){var i=e.length-4,o=e.length-2;t[lo]=b(e.substr(0,i)),t[co]=b(e.substr(i,2)),t[uo]=b(e.substr(o)),p(n).bigHour=!0}),te("Hmm",function(e,t,n){var i=e.length-2;t[lo]=b(e.substr(0,i)),t[co]=b(e.substr(i))}),te("Hmmss",function(e,t,n){var i=e.length-4,o=e.length-2;t[lo]=b(e.substr(0,i)),t[co]=b(e.substr(i,2)),t[uo]=b(e.substr(o))});var Ao,Do=/[ap]\.?m?\.?/i,Io=U("Hours",!0),$o={calendar:Pi,longDateFormat:Ai,invalidDate:Di,ordinal:Ii,dayOfMonthOrdinalParse:$i,relativeTime:Oi,months:vo,monthsShort:_o,week:xo,weekdays:ko,weekdaysMin:So,weekdaysShort:Co,meridiemParse:Do},Oo={},Mo={},Fo=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ro=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Lo=/Z|[+-]\d\d(?::?\d\d)?/,No=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Bo=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Uo=/^\/?Date\((\-?\d+)/i,jo=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;e.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),e.ISO_8601=function(){},e.RFC_2822=function(){};var zo=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=yt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()}),Ho=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=yt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()}),Wo=function(){return Date.now?Date.now():+new Date},qo=["year","quarter","month","week","day","hour","minute","second","millisecond"];At("Z",":"),At("ZZ",""),Q("Z",eo),Q("ZZ",eo),te(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Dt(eo,e)});var Vo=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Yo=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Go=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Wt.fn=Tt.prototype,Wt.invalid=St;var Xo=Gt(1,"add"),Ko=Gt(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Qo=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Dn("gggg","weekYear"),Dn("ggggg","weekYear"),Dn("GGGG","isoWeekYear"),Dn("GGGGG","isoWeekYear"),F("weekYear","gg"),F("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),Q("G",Ji),Q("g",Ji),Q("GG",qi,ji),Q("gg",qi,ji),Q("GGGG",Xi,Hi),Q("gggg",Xi,Hi),Q("GGGGG",Ki,Wi),Q("ggggg",Ki,Wi),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,i){t[i.substr(0,2)]=b(e)}),ne(["gg","GG"],function(t,n,i,o){n[o]=e.parseTwoDigitYear(t)}),V("Q",0,"Qo","quarter"),F("quarter","Q"),N("quarter",7),Q("Q",Ui),te("Q",function(e,t){t[so]=3*(b(e)-1)}),V("D",["DD",2],"Do","date"),F("date","D"),N("date",9),Q("D",qi),Q("DD",qi,ji),Q("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),te(["D","DD"],ao),te("Do",function(e,t){t[ao]=b(e.match(qi)[0],10)});var Jo=U("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),F("dayOfYear","DDD"),N("dayOfYear",4),Q("DDD",Gi),Q("DDDD",zi),te(["DDD","DDDD"],function(e,t,n){n._dayOfYear=b(e)}),V("m",["mm",2],0,"minute"),F("minute","m"),N("minute",14),Q("m",qi),Q("mm",qi,ji),te(["m","mm"],co);var Zo=U("Minutes",!1);V("s",["ss",2],0,"second"),F("second","s"),N("second",15),Q("s",qi),Q("ss",qi,ji),te(["s","ss"],uo);var er,tr=U("Seconds",!1);for(V("S",0,0,function(){return~~(this.millisecond()/100)}),V(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,function(){return 10*this.millisecond()}),V(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),V(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),V(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),V(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),V(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),F("millisecond","ms"),N("millisecond",16),Q("S",Gi,Ui),Q("SS",Gi,ji),Q("SSS",Gi,zi),er="SSSS";er.length<=9;er+="S")Q(er,Qi);for(er="S";er.length<=9;er+="S")te(er,Bn);var nr=U("Milliseconds",!1);V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var ir=v.prototype;ir.add=Xo,ir.calendar=Qt,ir.clone=Jt,ir.diff=sn,ir.endOf=yn,ir.format=dn,ir.from=hn,ir.fromNow=pn,ir.to=fn,ir.toNow=gn,ir.get=H,ir.invalidAt=Pn,ir.isAfter=Zt,ir.isBefore=en,ir.isBetween=tn,ir.isSame=nn,ir.isSameOrAfter=on,ir.isSameOrBefore=rn,ir.isValid=Tn,ir.lang=Qo,ir.locale=mn,ir.localeData=vn,ir.max=Ho,ir.min=zo,ir.parsingFlags=En,ir.set=W,ir.startOf=_n,ir.subtract=Ko,ir.toArray=kn,ir.toObject=Cn,ir.toDate=xn,ir.toISOString=cn,ir.inspect=un,ir.toJSON=Sn,ir.toString=ln,ir.unix=wn,ir.valueOf=bn,ir.creationData=An,ir.year=wo,ir.isLeapYear=ve,ir.weekYear=In,ir.isoWeekYear=$n,ir.quarter=ir.quarters=Ln,ir.month=ue,ir.daysInMonth=de,ir.week=ir.weeks=Ee,ir.isoWeek=ir.isoWeeks=Pe,ir.weeksInYear=Mn,ir.isoWeeksInYear=On,ir.date=Jo,ir.day=ir.days=Re,ir.weekday=Le,ir.isoWeekday=Ne,ir.dayOfYear=Nn,ir.hour=ir.hours=Io,ir.minute=ir.minutes=Zo,ir.second=ir.seconds=tr,ir.millisecond=ir.milliseconds=nr,ir.utcOffset=Ot,ir.utc=Ft,ir.local=Rt,ir.parseZone=Lt,ir.hasAlignedHourOffset=Nt,ir.isDST=Bt,ir.isLocal=jt,ir.isUtcOffset=zt,ir.isUtc=Ht,ir.isUTC=Ht,ir.zoneAbbr=Un,ir.zoneName=jn,ir.dates=k("dates accessor is deprecated. Use date instead.",Jo),ir.months=k("months accessor is deprecated. Use month instead",ue),ir.years=k("years accessor is deprecated. Use year instead",wo),ir.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Mt),ir.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ut);var or=P.prototype;or.calendar=A,or.longDateFormat=D,or.invalidDate=I,or.ordinal=$,or.preparse=Wn,or.postformat=Wn,or.relativeTime=O,or.pastFuture=M,or.set=T,or.months=re,or.monthsShort=se,or.monthsParse=le,or.monthsRegex=pe,or.monthsShortRegex=he,or.week=Ce,or.firstDayOfYear=Te,or.firstDayOfWeek=Se,or.weekdays=Ie,or.weekdaysMin=Oe,or.weekdaysShort=$e,or.weekdaysParse=Fe,or.weekdaysRegex=Be,or.weekdaysShortRegex=Ue,or.weekdaysMinRegex=je,or.isPM=Ye,or.meridiem=Ge,Je("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===b(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),e.lang=k("moment.lang is deprecated. Use moment.locale instead.",Je),e.langData=k("moment.langData is deprecated. Use moment.localeData instead.",tt);var rr=Math.abs,sr=ci("ms"),ar=ci("s"),lr=ci("m"),cr=ci("h"),ur=ci("d"),dr=ci("w"),hr=ci("M"),pr=ci("y"),fr=di("milliseconds"),gr=di("seconds"),mr=di("minutes"),vr=di("hours"),_r=di("days"),yr=di("months"),br=di("years"),wr=Math.round,xr={ss:44,s:45,m:45,h:22,d:26,M:11},kr=Math.abs,Cr=Tt.prototype;return Cr.isValid=Ct,Cr.abs=Zn,Cr.add=ti,Cr.subtract=ni,Cr.as=ai,Cr.asMilliseconds=sr,Cr.asSeconds=ar,Cr.asMinutes=lr,Cr.asHours=cr,Cr.asDays=ur,Cr.asWeeks=dr,Cr.asMonths=hr,Cr.asYears=pr,Cr.valueOf=li,Cr._bubble=oi,Cr.get=ui,Cr.milliseconds=fr,Cr.seconds=gr,Cr.minutes=mr,Cr.hours=vr,Cr.days=_r,Cr.weeks=hi,Cr.months=yr,Cr.years=br,Cr.humanize=vi,Cr.toISOString=_i,Cr.toString=_i,Cr.toJSON=_i,Cr.locale=mn,Cr.localeData=vn,Cr.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_i),Cr.lang=Qo,V("X",0,0,"unix"),V("x",0,0,"valueOf"),Q("x",Ji),Q("X",to),te("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),te("x",function(e,t,n){n._d=new Date(b(e))}),e.version="2.18.1",t(yt),e.fn=ir,e.min=wt,e.max=xt,e.now=Wo,e.utc=d,e.unix=zn,e.months=Gn,e.isDate=a,e.locale=Je,e.invalid=g,e.duration=Wt,e.isMoment=_,e.weekdays=Kn,e.parseZone=Hn,e.localeData=tt,e.isDuration=Et,e.monthsShort=Xn,e.weekdaysMin=Jn,e.defineLocale=Ze,e.updateLocale=et,e.locales=nt,e.weekdaysShort=Qn,e.normalizeUnits=R,e.relativeTimeRounding=gi,e.relativeTimeThreshold=mi,e.calendarFormat=Kt,e.prototype=ir,e}),function(e){"object"==typeof module&&module.exports?module.exports=e():window.intlTelInput=e()}(function(e){"use strict";return function(){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}for(var o=[["Afghanistan (‫افغانستان‬‎)","af","93"],["Albania (Shqipëri)","al","355"],["Algeria (‫الجزائر‬‎)","dz","213"],["American Samoa","as","1",5,["684"]],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1",6,["264"]],["Antigua and Barbuda","ag","1",7,["268"]],["Argentina","ar","54"],["Armenia (Հայաստան)","am","374"],["Aruba","aw","297"],["Australia","au","61",0],["Austria (Österreich)","at","43"],["Azerbaijan (Azərbaycan)","az","994"],["Bahamas","bs","1",8,["242"]],["Bahrain (‫البحرين‬‎)","bh","973"],["Bangladesh (বাংলাদেশ)","bd","880"],["Barbados","bb","1",9,["246"]],["Belarus (Беларусь)","by","375"],["Belgium (België)","be","32"],["Belize","bz","501"],["Benin (Bénin)","bj","229"],["Bermuda","bm","1",10,["441"]],["Bhutan (འབྲུག)","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina (Босна и Херцеговина)","ba","387"],["Botswana","bw","267"],["Brazil (Brasil)","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1",11,["284"]],["Brunei","bn","673"],["Bulgaria (България)","bg","359"],["Burkina Faso","bf","226"],["Burundi (Uburundi)","bi","257"],["Cambodia (កម្ពុជា)","kh","855"],["Cameroon (Cameroun)","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)","cv","238"],["Caribbean Netherlands","bq","599",1,["3","4","7"]],["Cayman Islands","ky","1",12,["345"]],["Central African Republic (République centrafricaine)","cf","236"],["Chad (Tchad)","td","235"],["Chile","cl","56"],["China (中国)","cn","86"],["Christmas Island","cx","61",2],["Cocos (Keeling) Islands","cc","61",1],["Colombia","co","57"],["Comoros (‫جزر القمر‬‎)","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia (Hrvatska)","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus (Κύπρος)","cy","357"],["Czech Republic (Česká republika)","cz","420"],["Denmark (Danmark)","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1",13,["767"]],["Dominican Republic (República Dominicana)","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt (‫مصر‬‎)","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea (Guinea Ecuatorial)","gq","240"],["Eritrea","er","291"],["Estonia (Eesti)","ee","372"],["Ethiopia","et","251"],["Falkland Islands (Islas Malvinas)","fk","500"],["Faroe Islands (Føroyar)","fo","298"],["Fiji","fj","679"],["Finland (Suomi)","fi","358",0],["France","fr","33"],["French Guiana (Guyane française)","gf","594"],["French Polynesia (Polynésie française)","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia (საქართველო)","ge","995"],["Germany (Deutschland)","de","49"],["Ghana (Gaana)","gh","233"],["Gibraltar","gi","350"],["Greece (Ελλάδα)","gr","30"],["Greenland (Kalaallit Nunaat)","gl","299"],["Grenada","gd","1",14,["473"]],["Guadeloupe","gp","590",0],["Guam","gu","1",15,["671"]],["Guatemala","gt","502"],["Guernsey","gg","44",1,["1481","7781","7839","7911"]],["Guinea (Guinée)","gn","224"],["Guinea-Bissau (Guiné Bissau)","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong (香港)","hk","852"],["Hungary (Magyarország)","hu","36"],["Iceland (Ísland)","is","354"],["India (भारत)","in","91"],["Indonesia","id","62"],["Iran (‫ایران‬‎)","ir","98"],["Iraq (‫العراق‬‎)","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2,["1624","74576","7524","7924","7624"]],["Israel (‫ישראל‬‎)","il","972"],["Italy (Italia)","it","39",0],["Jamaica","jm","1",4,["876","658"]],["Japan (日本)","jp","81"],["Jersey","je","44",3,["1534","7509","7700","7797","7829","7937"]],["Jordan (‫الأردن‬‎)","jo","962"],["Kazakhstan (Казахстан)","kz","7",1,["33","7"]],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait (‫الكويت‬‎)","kw","965"],["Kyrgyzstan (Кыргызстан)","kg","996"],["Laos (ລາວ)","la","856"],["Latvia (Latvija)","lv","371"],["Lebanon (‫لبنان‬‎)","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya (‫ليبيا‬‎)","ly","218"],["Liechtenstein","li","423"],["Lithuania (Lietuva)","lt","370"],["Luxembourg","lu","352"],["Macau (澳門)","mo","853"],["Macedonia (FYROM) (Македонија)","mk","389"],["Madagascar (Madagasikara)","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania (‫موريتانيا‬‎)","mr","222"],["Mauritius (Moris)","mu","230"],["Mayotte","yt","262",1,["269","639"]],["Mexico (México)","mx","52"],["Micronesia","fm","691"],["Moldova (Republica Moldova)","md","373"],["Monaco","mc","377"],["Mongolia (Монгол)","mn","976"],["Montenegro (Crna Gora)","me","382"],["Montserrat","ms","1",16,["664"]],["Morocco (‫المغرب‬‎)","ma","212",0],["Mozambique (Moçambique)","mz","258"],["Myanmar (Burma) (မြန်မာ)","mm","95"],["Namibia (Namibië)","na","264"],["Nauru","nr","674"],["Nepal (नेपाल)","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia (Nouvelle-Calédonie)","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger (Nijar)","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea (조선 민주주의 인민 공화국)","kp","850"],["Northern Mariana Islands","mp","1",17,["670"]],["Norway (Norge)","no","47",0],["Oman (‫عُمان‬‎)","om","968"],["Pakistan (‫پاکستان‬‎)","pk","92"],["Palau","pw","680"],["Palestine (‫فلسطين‬‎)","ps","970"],["Panama (Panamá)","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru (Perú)","pe","51"],["Philippines","ph","63"],["Poland (Polska)","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar (‫قطر‬‎)","qa","974"],["Réunion (La Réunion)","re","262",0],["Romania (România)","ro","40"],["Russia (Россия)","ru","7",0],["Rwanda","rw","250"],["Saint Barthélemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1",18,["869"]],["Saint Lucia","lc","1",19,["758"]],["Saint Martin (Saint-Martin (partie française))","mf","590",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)","pm","508"],["Saint Vincent and the Grenadines","vc","1",20,["784"]],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé and Príncipe (São Tomé e Príncipe)","st","239"],["Saudi Arabia (‫المملكة العربية السعودية‬‎)","sa","966"],["Senegal (Sénégal)","sn","221"],["Serbia (Србија)","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1",21,["721"]],["Slovakia (Slovensko)","sk","421"],["Slovenia (Slovenija)","si","386"],["Solomon Islands","sb","677"],["Somalia (Soomaaliya)","so","252"],["South Africa","za","27"],["South Korea (대한민국)","kr","82"],["South Sudan (‫جنوب السودان‬‎)","ss","211"],["Spain (España)","es","34"],["Sri Lanka (ශ්‍රී ලංකාව)","lk","94"],["Sudan (‫السودان‬‎)","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1,["79"]],["Swaziland","sz","268"],["Sweden (Sverige)","se","46"],["Switzerland (Schweiz)","ch","41"],["Syria (‫سوريا‬‎)","sy","963"],["Taiwan (台灣)","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand (ไทย)","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1",22,["868"]],["Tunisia (‫تونس‬‎)","tn","216"],["Turkey (Türkiye)","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1",23,["649"]],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1",24,["340"]],["Uganda","ug","256"],["Ukraine (Україна)","ua","380"],["United Arab Emirates (‫الإمارات العربية المتحدة‬‎)","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan (Oʻzbekiston)","uz","998"],["Vanuatu","vu","678"],["Vatican City (Città del Vaticano)","va","39",1,["06698"]],["Venezuela","ve","58"],["Vietnam (Việt Nam)","vn","84"],["Wallis and Futuna (Wallis-et-Futuna)","wf","681"],["Western Sahara (‫الصحراء الغربية‬‎)","eh","212",1,["5288","5289"]],["Yemen (‫اليمن‬‎)","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1,["18"]]],r=0;r<o.length;r++){var s=o[r];o[r]={name:s[0],iso2:s[1],dialCode:s[2],priority:s[3]||0,areaCodes:s[4]||null}}var a={getInstance:function(e){var t=e.getAttribute("data-intl-tel-input-id");return window.intlTelInputGlobals.instances[t]},instances:{}};"object"==typeof window&&(window.intlTelInputGlobals=a);var l=0,c={allowDropdown:!0,autoHideDialCode:!0,autoPlaceholder:"polite",customContainer:"",customPlaceholder:null,dropdownContainer:null,excludeCountries:[],formatOnDisplay:!0,geoIpLookup:null,hiddenInput:"",initialCountry:"",localizedCountries:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,utilsScript:""},u=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"];"object"==typeof window&&window.addEventListener("load",function(){window.intlTelInputGlobals.windowLoaded=!0});var d=function(e,t){for(var n=Object.keys(e),i=0;i<n.length;i++)t(n[i],e[n[i]])},h=function(e){d(window.intlTelInputGlobals.instances,function(t){window.intlTelInputGlobals.instances[t][e]()})},p=function(){function n(e,i){var o=this;t(this,n),this.id=l++,this.a=e,this.b=null,this.c=null;var r=i||{};this.d={},d(c,function(e,t){o.d[e]=r.hasOwnProperty(e)?r[e]:t}),this.e=Boolean(e.getAttribute("placeholder"))}return i(n,[{key:"_init",value:function(){var e=this;if(this.d.nationalMode&&(this.d.autoHideDialCode=!1),this.d.separateDialCode&&(this.d.autoHideDialCode=this.d.nationalMode=!1),this.g=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.g&&(document.body.classList.add("iti-mobile"),this.d.dropdownContainer||(this.d.dropdownContainer=document.body)),"undefined"!=typeof Promise){var t=new Promise(function(t,n){e.h=t,e.i=n}),n=new Promise(function(t,n){e.i0=t,e.i1=n});this.promise=Promise.all([t,n])}else this.h=this.i=function(){},this.i0=this.i1=function(){};this.s={},this._b(),this._f(),this._h(),this._i(),this._i3()}},{key:"_b",value:function(){this._d(),this._d2(),this._e(),this.d.localizedCountries&&this._d0(),(this.d.onlyCountries.length||this.d.localizedCountries)&&this.p.sort(this._d1)}},{key:"_c",value:function(t,n,i){n.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=n.length),this.q.hasOwnProperty(n)||(this.q[n]=[]);for(var o=0;o<this.q[n].length;o++)if(this.q[n][o]===t)return;var r=i!==e?i:this.q[n].length;this.q[n][r]=t}},{key:"_d",value:function(){if(this.d.onlyCountries.length){var e=this.d.onlyCountries.map(function(e){return e.toLowerCase()});this.p=o.filter(function(t){return e.indexOf(t.iso2)>-1})}else if(this.d.excludeCountries.length){var t=this.d.excludeCountries.map(function(e){return e.toLowerCase()});this.p=o.filter(function(e){return-1===t.indexOf(e.iso2)})}else this.p=o}},{key:"_d0",value:function(){for(var e=0;e<this.p.length;e++){var t=this.p[e].iso2.toLowerCase();this.d.localizedCountries.hasOwnProperty(t)&&(this.p[e].name=this.d.localizedCountries[t])}}},{key:"_d1",value:function(e,t){return e.name.localeCompare(t.name)}},{key:"_d2",value:function(){this.dialCodeMaxLen=0,this.q={};for(var e=0;e<this.p.length;e++){var t=this.p[e];this._c(t.iso2,t.dialCode,t.priority)}for(var n=0;n<this.p.length;n++){var i=this.p[n];if(i.areaCodes)for(var o=this.q[i.dialCode][0],r=0;r<i.areaCodes.length;r++){for(var s=i.areaCodes[r],a=1;a<s.length;a++){var l=i.dialCode+s.substr(0,a);this._c(o,l),this._c(i.iso2,l)}this._c(i.iso2,i.dialCode+s)}}}},{key:"_e",value:function(){this.preferredCountries=[];for(var e=0;e<this.d.preferredCountries.length;e++){var t=this.d.preferredCountries[e].toLowerCase(),n=this._y(t,!1,!0);n&&this.preferredCountries.push(n)}}},{key:"_e2",value:function(e,t,n){var i=document.createElement(e);return t&&d(t,function(e,t){return i.setAttribute(e,t)}),n&&n.appendChild(i),i}},{key:"_f",value:function(){this.a.hasAttribute("autocomplete")||this.a.form&&this.a.form.hasAttribute("autocomplete")||this.a.setAttribute("autocomplete","off");var e="iti";this.d.allowDropdown&&(e+=" iti--allow-dropdown"),this.d.separateDialCode&&(e+=" iti--separate-dial-code"),this.d.customContainer&&(e+=" ",e+=this.d.customContainer);var t=this._e2("div",{class:e});if(this.a.parentNode.insertBefore(t,this.a),this.k=this._e2("div",{class:"iti__flag-container"},t),t.appendChild(this.a),this.selectedFlag=this._e2("div",{class:"iti__selected-flag",role:"combobox","aria-owns":"country-listbox","aria-expanded":"false"},this.k),this.l=this._e2("div",{class:"iti__flag"},this.selectedFlag),this.d.separateDialCode&&(this.t=this._e2("div",{class:"iti__selected-dial-code"},this.selectedFlag)),this.d.allowDropdown&&(this.selectedFlag.setAttribute("tabindex","0"),this.u=this._e2("div",{class:"iti__arrow"},this.selectedFlag),this.m=this._e2("ul",{class:"iti__country-list iti__hide",id:"country-listbox",role:"listbox"}),this.preferredCountries.length&&(this._g(this.preferredCountries,"iti__preferred"),this._e2("li",{class:"iti__divider",role:"separator","aria-disabled":"true"},this.m)),this._g(this.p,"iti__standard"),this.d.dropdownContainer?(this.dropdown=this._e2("div",{class:"iti iti--container"}),this.dropdown.appendChild(this.m)):this.k.appendChild(this.m)),this.d.hiddenInput){var n=this.d.hiddenInput,i=this.a.getAttribute("name");if(i){var o=i.lastIndexOf("[");-1!==o&&(n="".concat(i.substr(0,o),"[").concat(n,"]"))}this.hiddenInput=this._e2("input",{type:"hidden",name:n}),t.appendChild(this.hiddenInput)}}},{key:"_g",value:function(e,t){for(var n="",i=0;i<e.length;i++){var o=e[i];n+="<li class='iti__country ".concat(t,"' tabIndex='-1' id='iti-item-").concat(o.iso2,"' role='option' data-dial-code='").concat(o.dialCode,"' data-country-code='").concat(o.iso2,"'>"),n+="<div class='iti__flag-box'><div class='iti__flag iti__".concat(o.iso2,"'></div></div>"),n+="<span class='iti__country-name'>".concat(o.name,"</span>"),n+="<span class='iti__dial-code'>+".concat(o.dialCode,"</span>"),n+="</li>"}this.m.insertAdjacentHTML("beforeend",n)}},{key:"_h",value:function(){var e=this.a.value,t=this._5(e),n=this._w(e),i=this.d,o=i.initialCountry,r=i.nationalMode,s=i.autoHideDialCode,a=i.separateDialCode;t&&!n?this._v(e):"auto"!==o&&(o?this._z(o.toLowerCase()):t&&n?this._z("us"):(this.j=this.preferredCountries.length?this.preferredCountries[0].iso2:this.p[0].iso2,e||this._z(this.j)),e||r||s||a||(this.a.value="+".concat(this.s.dialCode))),e&&this._u(e)}},{key:"_i",value:function(){this._j(),this.d.autoHideDialCode&&this._l(),this.d.allowDropdown&&this._i2(),this.hiddenInput&&this._i0()}},{key:"_i0",value:function(){var e=this;this._a14=function(){e.hiddenInput.value=e.getNumber()},this.a.form&&this.a.form.addEventListener("submit",this._a14)}},{key:"_i1",value:function(){for(var e=this.a;e&&"LABEL"!==e.tagName;)e=e.parentNode;return e}},{key:"_i2",value:function(){var e=this;this._a9=function(t){e.m.classList.contains("iti__hide")?e.a.focus():t.preventDefault()};var t=this._i1();t&&t.addEventListener("click",this._a9),this._a10=function(){!e.m.classList.contains("iti__hide")||e.a.disabled||e.a.readOnly||e._n()},this.selectedFlag.addEventListener("click",this._a10),this._a11=function(t){e.m.classList.contains("iti__hide")&&-1!==["ArrowUp","Up","ArrowDown","Down"," ","Enter"].indexOf(t.key)&&(t.preventDefault(),t.stopPropagation(),e._n()),"Tab"===t.key&&e._2()},this.k.addEventListener("keydown",this._a11)}},{key:"_i3",value:function(){var e=this;this.d.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.windowLoaded?window.intlTelInputGlobals.loadUtils(this.d.utilsScript):window.addEventListener("load",function(){window.intlTelInputGlobals.loadUtils(e.d.utilsScript)}):this.i0(),"auto"===this.d.initialCountry?this._i4():this.h()}},{key:"_i4",value:function(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.d.geoIpLookup&&this.d.geoIpLookup(function(e){window.intlTelInputGlobals.autoCountry=e.toLowerCase(),setTimeout(function(){return h("handleAutoCountry")})},function(){return h("rejectAutoCountryPromise")}))}},{key:"_j",value:function(){var e=this;this._a12=function(){e._v(e.a.value)&&e._8()},this.a.addEventListener("keyup",this._a12),this._a13=function(){setTimeout(e._a12)},this.a.addEventListener("cut",this._a13),this.a.addEventListener("paste",this._a13)}},{key:"_j2",value:function(e){var t=this.a.getAttribute("maxlength");return t&&e.length>t?e.substr(0,t):e}},{key:"_l",value:function(){var e=this;this._a8=function(){e._l2()},this.a.form&&this.a.form.addEventListener("submit",this._a8),this.a.addEventListener("blur",this._a8)}},{key:"_l2",value:function(){if("+"===this.a.value.charAt(0)){var e=this._m(this.a.value);e&&this.s.dialCode!==e||(this.a.value="")}}},{key:"_m",value:function(e){return e.replace(/\D/g,"")}},{key:"_m2",value:function(e){var t=document.createEvent("Event");t.initEvent(e,!0,!0),this.a.dispatchEvent(t)}},{key:"_n",value:function(){this.m.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._o(),this.b&&(this._x(this.b,!1),this._3(this.b,!0)),this._p(),this.u.classList.add("iti__arrow--up"),this._m2("open:countrydropdown")}},{key:"_n2",value:function(e,t,n){n&&!e.classList.contains(t)?e.classList.add(t):!n&&e.classList.contains(t)&&e.classList.remove(t)}},{key:"_o",value:function(){var e=this;if(this.d.dropdownContainer&&this.d.dropdownContainer.appendChild(this.dropdown),!this.g){
var t=this.a.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,i=t.top+n,o=this.m.offsetHeight,r=i+this.a.offsetHeight+o<n+window.innerHeight,s=i-o>n;if(this._n2(this.m,"iti__country-list--dropup",!r&&s),this.d.dropdownContainer){var a=!r&&s?0:this.a.offsetHeight;this.dropdown.style.top="".concat(i+a,"px"),this.dropdown.style.left="".concat(t.left+document.body.scrollLeft,"px"),this._a4=function(){return e._2()},window.addEventListener("scroll",this._a4)}}}},{key:"_o2",value:function(e){for(var t=e;t&&t!==this.m&&!t.classList.contains("iti__country");)t=t.parentNode;return t===this.m?null:t}},{key:"_p",value:function(){var e=this;this._a0=function(t){var n=e._o2(t.target);n&&e._x(n,!1)},this.m.addEventListener("mouseover",this._a0),this._a1=function(t){var n=e._o2(t.target);n&&e._1(n)},this.m.addEventListener("click",this._a1);var t=!0;this._a2=function(){t||e._2(),t=!1},document.documentElement.addEventListener("click",this._a2);var n="",i=null;this._a3=function(t){t.preventDefault(),"ArrowUp"===t.key||"Up"===t.key||"ArrowDown"===t.key||"Down"===t.key?e._q(t.key):"Enter"===t.key?e._r():"Escape"===t.key?e._2():/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(t.key)&&(i&&clearTimeout(i),n+=t.key.toLowerCase(),e._s(n),i=setTimeout(function(){n=""},1e3))},document.addEventListener("keydown",this._a3)}},{key:"_q",value:function(e){var t="ArrowUp"===e||"Up"===e?this.c.previousElementSibling:this.c.nextElementSibling;t&&(t.classList.contains("iti__divider")&&(t="ArrowUp"===e||"Up"===e?t.previousElementSibling:t.nextElementSibling),this._x(t,!0))}},{key:"_r",value:function(){this.c&&this._1(this.c)}},{key:"_s",value:function(e){for(var t=0;t<this.p.length;t++)if(this._t(this.p[t].name,e)){var n=this.m.querySelector("#iti-item-".concat(this.p[t].iso2));this._x(n,!1),this._3(n,!0);break}}},{key:"_t",value:function(e,t){return e.substr(0,t.length).toLowerCase()===t}},{key:"_u",value:function(e){var t=e;if(this.d.formatOnDisplay&&window.intlTelInputUtils&&this.s){var n=!this.d.separateDialCode&&(this.d.nationalMode||"+"!==t.charAt(0)),i=intlTelInputUtils.numberFormat,o=i.NATIONAL,r=i.INTERNATIONAL,s=n?o:r;t=intlTelInputUtils.formatNumber(t,this.s.iso2,s)}t=this._7(t),this.a.value=t}},{key:"_v",value:function(e){var t=e,n=this.s.dialCode,i="1"===n;t&&this.d.nationalMode&&i&&"+"!==t.charAt(0)&&("1"!==t.charAt(0)&&(t="1".concat(t)),t="+".concat(t)),this.d.separateDialCode&&n&&"+"!==t.charAt(0)&&(t="+".concat(n).concat(t));var o=this._5(t),r=this._m(t),s=null;if(o){var a=this.q[this._m(o)],l=-1!==a.indexOf(this.s.iso2)&&r.length<=o.length-1;if(!("1"===n&&this._w(r)||l))for(var c=0;c<a.length;c++)if(a[c]){s=a[c];break}}else"+"===t.charAt(0)&&r.length?s="":t&&"+"!==t||(s=this.j);return null!==s&&this._z(s)}},{key:"_w",value:function(e){var t=this._m(e);if("1"===t.charAt(0)){var n=t.substr(1,3);return-1!==u.indexOf(n)}return!1}},{key:"_x",value:function(e,t){var n=this.c;n&&n.classList.remove("iti__highlight"),this.c=e,this.c.classList.add("iti__highlight"),t&&this.c.focus()}},{key:"_y",value:function(e,t,n){for(var i=t?o:this.p,r=0;r<i.length;r++)if(i[r].iso2===e)return i[r];if(n)return null;throw new Error("No country data for '".concat(e,"'"))}},{key:"_z",value:function(e){var t=this.s.iso2?this.s:{};this.s=e?this._y(e,!1,!1):{},this.s.iso2&&(this.j=this.s.iso2),this.l.setAttribute("class","iti__flag iti__".concat(e));var n=e?"".concat(this.s.name,": +").concat(this.s.dialCode):"Unknown";if(this.selectedFlag.setAttribute("title",n),this.d.separateDialCode){var i=this.s.dialCode?"+".concat(this.s.dialCode):"";this.t.innerHTML=i;var o=this.selectedFlag.offsetWidth||this._getHiddenSelectedFlagWidth();this.a.style.paddingLeft="".concat(o+6,"px")}if(this._0(),this.d.allowDropdown){var r=this.b;if(r&&(r.classList.remove("iti__active"),r.setAttribute("aria-selected","false")),e){var s=this.m.querySelector("#iti-item-".concat(e));s.setAttribute("aria-selected","true"),s.classList.add("iti__active"),this.b=s,this.selectedFlag.setAttribute("aria-activedescendant",s.getAttribute("id"))}}return t.iso2!==e}},{key:"_getHiddenSelectedFlagWidth",value:function(){var e=this.a.parentNode.cloneNode();e.style.visibility="hidden",document.body.appendChild(e);var t=this.selectedFlag.cloneNode(!0);e.appendChild(t);var n=t.offsetWidth;return e.parentNode.removeChild(e),n}},{key:"_0",value:function(){var e="aggressive"===this.d.autoPlaceholder||!this.e&&"polite"===this.d.autoPlaceholder;if(window.intlTelInputUtils&&e){var t=intlTelInputUtils.numberType[this.d.placeholderNumberType],n=this.s.iso2?intlTelInputUtils.getExampleNumber(this.s.iso2,this.d.nationalMode,t):"";n=this._7(n),"function"==typeof this.d.customPlaceholder&&(n=this.d.customPlaceholder(n,this.s)),this.a.setAttribute("placeholder",n)}}},{key:"_1",value:function(e){var t=this._z(e.getAttribute("data-country-code"));this._2(),this._4(e.getAttribute("data-dial-code"),!0),this.a.focus();var n=this.a.value.length;this.a.setSelectionRange(n,n),t&&this._8()}},{key:"_2",value:function(){this.m.classList.add("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","false"),this.u.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._a3),document.documentElement.removeEventListener("click",this._a2),this.m.removeEventListener("mouseover",this._a0),this.m.removeEventListener("click",this._a1),this.d.dropdownContainer&&(this.g||window.removeEventListener("scroll",this._a4),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._m2("close:countrydropdown")}},{key:"_3",value:function(e,t){var n=this.m,i=window.pageYOffset||document.documentElement.scrollTop,o=n.offsetHeight,r=n.getBoundingClientRect().top+i,s=r+o,a=e.offsetHeight,l=e.getBoundingClientRect().top+i,c=l+a,u=l-r+n.scrollTop,d=o/2-a/2;if(l<r)t&&(u-=d),n.scrollTop=u;else if(c>s){t&&(u+=d);var h=o-a;n.scrollTop=u-h}}},{key:"_4",value:function(e,t){var n,i=this.a.value,o="+".concat(e);if("+"===i.charAt(0)){var r=this._5(i);n=r?i.replace(r,o):o}else{if(this.d.nationalMode||this.d.separateDialCode)return;if(i)n=o+i;else{if(!t&&this.d.autoHideDialCode)return;n=o}}this.a.value=n}},{key:"_5",value:function(e){var t="";if("+"===e.charAt(0))for(var n="",i=0;i<e.length;i++){var o=e.charAt(i);if(!isNaN(parseInt(o,10))&&(n+=o,this.q[n]&&(t=e.substr(0,i+1)),n.length===this.dialCodeMaxLen))break}return t}},{key:"_6",value:function(){var e=this.a.value.trim(),t=this.s.dialCode,n=this._m(e);return(this.d.separateDialCode&&"+"!==e.charAt(0)&&t&&n?"+".concat(t):"")+e}},{key:"_7",value:function(e){var t=e;if(this.d.separateDialCode){var n=this._5(t);if(n){n="+".concat(this.s.dialCode);var i=" "===t[n.length]||"-"===t[n.length]?n.length+1:n.length;t=t.substr(i)}}return this._j2(t)}},{key:"_8",value:function(){this._m2("countrychange")}},{key:"handleAutoCountry",value:function(){"auto"===this.d.initialCountry&&(this.j=window.intlTelInputGlobals.autoCountry,this.a.value||this.setCountry(this.j),this.h())}},{key:"handleUtils",value:function(){window.intlTelInputUtils&&(this.a.value&&this._u(this.a.value),this._0()),this.i0()}},{key:"destroy",value:function(){var e=this.a.form;if(this.d.allowDropdown){this._2(),this.selectedFlag.removeEventListener("click",this._a10),this.k.removeEventListener("keydown",this._a11);var t=this._i1();t&&t.removeEventListener("click",this._a9)}this.hiddenInput&&e&&e.removeEventListener("submit",this._a14),this.d.autoHideDialCode&&(e&&e.removeEventListener("submit",this._a8),this.a.removeEventListener("blur",this._a8)),this.a.removeEventListener("keyup",this._a12),this.a.removeEventListener("cut",this._a13),this.a.removeEventListener("paste",this._a13),this.a.removeAttribute("data-intl-tel-input-id");var n=this.a.parentNode;n.parentNode.insertBefore(this.a,n),n.parentNode.removeChild(n),delete window.intlTelInputGlobals.instances[this.id]}},{key:"getExtension",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getExtension(this._6(),this.s.iso2):""}},{key:"getNumber",value:function(e){if(window.intlTelInputUtils){var t=this.s.iso2;return intlTelInputUtils.formatNumber(this._6(),t,e)}return""}},{key:"getNumberType",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getNumberType(this._6(),this.s.iso2):-99}},{key:"getSelectedCountryData",value:function(){return this.s}},{key:"getValidationError",value:function(){if(window.intlTelInputUtils){var e=this.s.iso2;return intlTelInputUtils.getValidationError(this._6(),e)}return-99}},{key:"isValidNumber",value:function(){var e=this._6().trim(),t=this.d.nationalMode?this.s.iso2:"";return window.intlTelInputUtils?intlTelInputUtils.isValidNumber(e,t):null}},{key:"setCountry",value:function(e){var t=e.toLowerCase();this.l.classList.contains("iti__".concat(t))||(this._z(t),this._4(this.s.dialCode,!1),this._8())}},{key:"setNumber",value:function(e){var t=this._v(e);this._u(e),t&&this._8()}},{key:"setPlaceholderNumberType",value:function(e){this.d.placeholderNumberType=e,this._0()}}]),n}();a.getCountryData=function(){return o};var f=function(e,t,n){var i=document.createElement("script");i.onload=function(){h("handleUtils"),t&&t()},i.onerror=function(){h("rejectUtilsScriptPromise"),n&&n()},i.className="iti-load-utils",i.async=!0,i.src=e,document.body.appendChild(i)};return a.loadUtils=function(e){if(!window.intlTelInputUtils&&!window.intlTelInputGlobals.startedLoadingUtilsScript){if(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,"undefined"!=typeof Promise)return new Promise(function(t,n){return f(e,t,n)});f(e)}return null},a.defaults=c,a.version="16.1.0",function(e,t){var n=new p(e,t);return n._init(),e.setAttribute("data-intl-tel-input-id",n.id),window.intlTelInputGlobals.instances[n.id]=n,n}}()}),function(e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():window.noUiSlider=e()}(function(){"use strict";function e(e){e.parentElement.removeChild(e)}function t(e){return null!=e}function n(e){e.preventDefault()}function i(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function o(e,t,n){0<n&&(l(e,t),setTimeout(function(){c(e,t)},n))}function r(e){return Math.max(Math.min(e,100),0)}function s(e){return Array.isArray(e)?e:[e]}function a(e){var t=(e=String(e)).split(".");return 1<t.length?t[1].length:0}function l(e,t){e.classList&&!/\s/.test(t)?e.classList.add(t):e.className+=" "+t}function c(e,t){e.classList&&!/\s/.test(t)?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function u(e){var t=void 0!==window.pageXOffset,n="CSS1Compat"===(e.compatMode||"");return{x:t?window.pageXOffset:n?e.documentElement.scrollLeft:e.body.scrollLeft,y:t?window.pageYOffset:n?e.documentElement.scrollTop:e.body.scrollTop}}function d(e,t){return 100/(t-e)}function h(e,t,n){return 100*t/(e[n+1]-e[n])}function p(e,t){for(var n=1;e>=t[n];)n+=1;return n}function f(e,t,n){if(n>=e.slice(-1)[0])return 100;var i,o,r=p(n,e),s=e[r-1],a=e[r],l=t[r-1],c=t[r];return l+(o=n,h(i=[s,a],i[0]<0?o+Math.abs(i[0]):o-i[0],0)/d(l,c))}function g(e,t,n,i){if(100===i)return i;var o,r,s=p(i,e),a=e[s-1],l=e[s];return n?(l-a)/2<i-a?l:a:t[s-1]?e[s-1]+(o=i-e[s-1],r=t[s-1],Math.round(o/r)*r):i}function m(e,t,n){var o;if("number"==typeof t&&(t=[t]),!Array.isArray(t))throw new Error("noUiSlider ("+W+"): 'range' contains invalid value.");if(!i(o="min"===e?0:"max"===e?100:parseFloat(e))||!i(t[0]))throw new Error("noUiSlider ("+W+"): 'range' value isn't numeric.");n.xPct.push(o),n.xVal.push(t[0]),o?n.xSteps.push(!isNaN(t[1])&&t[1]):isNaN(t[1])||(n.xSteps[0]=t[1]),n.xHighestCompleteStep.push(0)}function v(e,t,n){if(t)if(n.xVal[e]!==n.xVal[e+1]){n.xSteps[e]=h([n.xVal[e],n.xVal[e+1]],t,0)/d(n.xPct[e],n.xPct[e+1]);var i=(n.xVal[e+1]-n.xVal[e])/n.xNumSteps[e],o=Math.ceil(Number(i.toFixed(3))-1),r=n.xVal[e]+n.xNumSteps[e]*o;n.xHighestCompleteStep[e]=r}else n.xSteps[e]=n.xHighestCompleteStep[e]=n.xVal[e]}function _(e,t,n){var i;this.xPct=[],this.xVal=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=t;var o=[];for(i in e)e.hasOwnProperty(i)&&o.push([e[i],i]);for(o.length&&"object"==typeof o[0][0]?o.sort(function(e,t){return e[0][0]-t[0][0]}):o.sort(function(e,t){return e[0]-t[0]}),i=0;i<o.length;i++)m(o[i][1],o[i][0],this);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)v(i,this.xNumSteps[i],this)}function y(e){if("object"==typeof(t=e)&&"function"==typeof t.to&&"function"==typeof t.from)return!0;var t;throw new Error("noUiSlider ("+W+"): 'format' requires 'to' and 'from' methods.")}function b(e,t){if(!i(t))throw new Error("noUiSlider ("+W+"): 'step' is not numeric.");e.singleStep=t}function w(e,t){if(!i(t))throw new Error("noUiSlider ("+W+"): 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function x(e,t){if(!i(t))throw new Error("noUiSlider ("+W+"): 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function k(e,t){if("object"!=typeof t||Array.isArray(t))throw new Error("noUiSlider ("+W+"): 'range' is not an object.");if(void 0===t.min||void 0===t.max)throw new Error("noUiSlider ("+W+"): Missing 'min' or 'max' in 'range'.");if(t.min===t.max)throw new Error("noUiSlider ("+W+"): 'range' 'min' and 'max' cannot be equal.");e.spectrum=new _(t,e.snap,e.singleStep)}function C(e,t){if(t=s(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider ("+W+"): 'start' option is incorrect.");e.handles=t.length,e.start=t}function S(e,t){if("boolean"!=typeof(e.snap=t))throw new Error("noUiSlider ("+W+"): 'snap' option must be a boolean.")}function T(e,t){if("boolean"!=typeof(e.animate=t))throw new Error("noUiSlider ("+W+"): 'animate' option must be a boolean.")}function E(e,t){if("number"!=typeof(e.animationDuration=t))throw new Error("noUiSlider ("+W+"): 'animationDuration' option must be a number.")}function P(e,t){var n,i=[!1];if("lower"===t?t=[!0,!1]:"upper"===t&&(t=[!1,!0]),!0===t||!1===t){for(n=1;n<e.handles;n++)i.push(t);i.push(!1)}else{if(!Array.isArray(t)||!t.length||t.length!==e.handles+1)throw new Error("noUiSlider ("+W+"): 'connect' option doesn't match handle count.");i=t}e.connect=i}function A(e,t){switch(t){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider ("+W+"): 'orientation' option is invalid.")}}function D(e,t){if(!i(t))throw new Error("noUiSlider ("+W+"): 'margin' option must be numeric.");0!==t&&(e.margin=e.spectrum.getDistance(t))}function I(e,t){if(!i(t))throw new Error("noUiSlider ("+W+"): 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(t),!e.limit||e.handles<2)throw new Error("noUiSlider ("+W+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function $(e,t){var n;if(!i(t)&&!Array.isArray(t))throw new Error("noUiSlider ("+W+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&2!==t.length&&!i(t[0])&&!i(t[1]))throw new Error("noUiSlider ("+W+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==t){for(Array.isArray(t)||(t=[t,t]),e.padding=[e.spectrum.getDistance(t[0]),e.spectrum.getDistance(t[1])],n=0;n<e.spectrum.xNumSteps.length-1;n++)if(e.padding[0][n]<0||e.padding[1][n]<0)throw new Error("noUiSlider ("+W+"): 'padding' option must be a positive number(s).");var o=t[0]+t[1],r=e.spectrum.xVal[0];if(1<o/(e.spectrum.xVal[e.spectrum.xVal.length-1]-r))throw new Error("noUiSlider ("+W+"): 'padding' option must not exceed 100% of the range.")}}function O(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider ("+W+"): 'direction' option was not recognized.")}}function M(e,t){if("string"!=typeof t)throw new Error("noUiSlider ("+W+"): 'behaviour' must be a string containing options.");var n=0<=t.indexOf("tap"),i=0<=t.indexOf("drag"),o=0<=t.indexOf("fixed"),r=0<=t.indexOf("snap"),s=0<=t.indexOf("hover"),a=0<=t.indexOf("unconstrained");if(o){if(2!==e.handles)throw new Error("noUiSlider ("+W+"): 'fixed' behaviour must be used with 2 handles");D(e,e.start[1]-e.start[0])}if(a&&(e.margin||e.limit))throw new Error("noUiSlider ("+W+"): 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:n||r,drag:i,fixed:o,snap:r,hover:s,unconstrained:a}}function F(e,t){if(!1!==t)if(!0===t){e.tooltips=[];for(var n=0;n<e.handles;n++)e.tooltips.push(!0)}else{if(e.tooltips=s(t),e.tooltips.length!==e.handles)throw new Error("noUiSlider ("+W+"): must pass a formatter for all handles.");e.tooltips.forEach(function(e){if("boolean"!=typeof e&&("object"!=typeof e||"function"!=typeof e.to))throw new Error("noUiSlider ("+W+"): 'tooltips' must be passed a formatter or 'false'.")})}}function R(e,t){y(e.ariaFormat=t)}function L(e,t){y(e.format=t)}function N(e,t){if("boolean"!=typeof(e.keyboardSupport=t))throw new Error("noUiSlider ("+W+"): 'keyboardSupport' option must be a boolean.")}function B(e,t){e.documentElement=t}function U(e,t){if("string"!=typeof t&&!1!==t)throw new Error("noUiSlider ("+W+"): 'cssPrefix' must be a string or `false`.");e.cssPrefix=t}function j(e,t){if("object"!=typeof t)throw new Error("noUiSlider ("+W+"): 'cssClasses' must be an object.");if("string"==typeof e.cssPrefix)for(var n in e.cssClasses={},t)t.hasOwnProperty(n)&&(e.cssClasses[n]=e.cssPrefix+t[n]);else e.cssClasses=t}function z(e){var n={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:q,format:q},i={step:{r:!1,t:b},keyboardPageMultiplier:{r:!1,t:w},keyboardDefaultStep:{r:!1,t:x},start:{r:!0,t:C},connect:{r:!0,t:P},direction:{r:!0,t:O},snap:{r:!1,t:S},animate:{r:!1,t:T},animationDuration:{r:!1,t:E},range:{r:!0,t:k},orientation:{r:!1,t:A},margin:{r:!1,t:D},limit:{r:!1,t:I},padding:{r:!1,t:$},behaviour:{r:!0,t:M},ariaFormat:{r:!1,t:R},format:{r:!1,t:L},tooltips:{r:!1,t:F},keyboardSupport:{r:!0,t:N},documentElement:{r:!1,t:B},cssPrefix:{r:!0,t:U},cssClasses:{r:!0,t:j}},o={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:V,keyboardPageMultiplier:5,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(i).forEach(function(r){if(!t(e[r])&&void 0===o[r]){if(i[r].r)throw new Error("noUiSlider ("+W+"): '"+r+"' is required.");return!0}i[r].t(n,t(e[r])?e[r]:o[r])}),n.pips=e.pips;var r=document.createElement("div"),s=void 0!==r.style.msTransform,a=void 0!==r.style.transform;return n.transformRule=a?"transform":s?"msTransform":"webkitTransform",n.style=[["left","top"],["right","bottom"]][n.dir][n.ort],n}function H(t,i,a){function d(e,t){var n=ue.createElement("div");return t&&l(n,t),e.appendChild(n),n}function h(e,t){var n=d(e,i.cssClasses.origin),o=d(n,i.cssClasses.handle);return d(o,i.cssClasses.touchArea),o.setAttribute("data-handle",t),i.keyboardSupport&&(o.setAttribute("tabindex","0"),o.addEventListener("keydown",function(e){return function(e,t){if(g()||m(t))return!1;var n=["Left","Right"],o=["Down","Up"],r=["PageDown","PageUp"],s=["Home","End"];i.dir&&!i.ort?n.reverse():i.ort&&!i.dir&&(o.reverse(),r.reverse());var a,l=e.key.replace("Arrow",""),c=l===r[0],u=l===r[1],d=l===o[0]||l===n[0]||c,h=l===o[1]||l===n[1]||u,p=l===s[0],f=l===s[1];if(!(d||h||p||f))return!0;if(e.preventDefault(),h||d){var v=i.keyboardPageMultiplier,_=d?0:1,y=V(t),b=y[_];if(null===b)return!1;!1===b&&(b=oe.getDefaultStep(se[t],d,i.keyboardDefaultStep)),(u||c)&&(b*=v),b=Math.max(b,1e-7),b*=d?-1:1,a=re[t]+b}else a=f?i.spectrum.xVal[i.spectrum.xVal.length-1]:i.spectrum.xVal[0];return B(t,oe.toStepping(a),!0,!0),O("slide",t),O("update",t),O("change",t),O("set",t),!1}(e,t)})),o.setAttribute("role","slider"),o.setAttribute("aria-orientation",i.ort?"vertical":"horizontal"),0===t?l(o,i.cssClasses.handleLower):t===i.handles-1&&l(o,i.cssClasses.handleUpper),n}function p(e,t){return!!t&&d(e,i.cssClasses.connect)}function f(e,t){return!!i.tooltips[t]&&d(e.firstChild,i.cssClasses.tooltip)}function g(){return ie.hasAttribute("disabled")}function m(e){return G[e].hasAttribute("disabled")}function v(){Q&&($("update.tooltips"),Q.forEach(function(t){t&&e(t)}),Q=null)}function _(){v(),Q=G.map(f),I("update.tooltips",function(e,t,n){if(Q[t]){var o=e[t];!0!==i.tooltips[t]&&(o=i.tooltips[t].to(n[t])),Q[t].innerHTML=o}})}function y(e,t,n){function o(e,t){var n=t===i.cssClasses.value,o=n?s:a;return t+" "+(n?c:u)[i.ort]+" "+o[e]}var r=ue.createElement("div"),s=[];s[fe]=i.cssClasses.valueNormal,s[ge]=i.cssClasses.valueLarge,s[me]=i.cssClasses.valueSub;var a=[];a[fe]=i.cssClasses.markerNormal,a[ge]=i.cssClasses.markerLarge,a[me]=i.cssClasses.markerSub;var c=[i.cssClasses.valueHorizontal,i.cssClasses.valueVertical],u=[i.cssClasses.markerHorizontal,i.cssClasses.markerVertical];return l(r,i.cssClasses.pips),l(r,0===i.ort?i.cssClasses.pipsHorizontal:i.cssClasses.pipsVertical),Object.keys(e).forEach(function(s){!function(e,s,a){if((a=t?t(s,a):a)!==pe){var l=d(r,!1);l.className=o(a,i.cssClasses.marker),l.style[i.style]=e+"%",fe<a&&((l=d(r,!1)).className=o(a,i.cssClasses.value),l.setAttribute("data-value",s),l.style[i.style]=e+"%",l.innerHTML=n.to(s))}}(s,e[s][0],e[s][1])}),r}function b(){K&&(e(K),K=null)}function w(e){b();var t,n,i,o,r,s,a,l,c,u=e.mode,d=e.density||1,h=e.filter||!1,p=function(e,t,n){if("range"===e||"steps"===e)return oe.xVal;if("count"===e){if(t<2)throw new Error("noUiSlider ("+W+"): 'values' (>= 2) required for mode 'count'.");var i=t-1,o=100/i;for(t=[];i--;)t[i]=i*o;t.push(100),e="positions"}return"positions"===e?t.map(function(e){return oe.fromStepping(n?oe.getStep(e):e)}):"values"===e?n?t.map(function(e){return oe.fromStepping(oe.getStep(oe.toStepping(e)))}):t:void 0}(u,e.values||!1,e.stepped||!1),f=(t=d,n=u,i=p,o={},r=oe.xVal[0],s=oe.xVal[oe.xVal.length-1],l=a=!1,c=0,(i=i.slice().sort(function(e,t){return e-t}).filter(function(e){return!this[e]&&(this[e]=!0)},{}))[0]!==r&&(i.unshift(r),a=!0),i[i.length-1]!==s&&(i.push(s),l=!0),i.forEach(function(e,r){var s,u,d,h,p,f,g,m,v,_,y=e,b=i[r+1],w="steps"===n;if(w&&(s=oe.xNumSteps[r]),s||(s=b-y),!1!==y)for(void 0===b&&(b=y),s=Math.max(s,1e-7),u=y;u<=b;u=(u+s).toFixed(7)/1){for(m=(p=(h=oe.toStepping(u))-c)/t,_=p/(v=Math.round(m)),d=1;d<=v;d+=1)o[(f=c+d*_).toFixed(5)]=[oe.fromStepping(f),0];g=-1<i.indexOf(u)?ge:w?me:fe,!r&&a&&u!==b&&(g=0),u===b&&l||(o[h.toFixed(5)]=[u,g]),c=h}}),o),g=e.format||{to:Math.round};return K=ie.appendChild(y(f,h,g))}function x(){var e=Y.getBoundingClientRect(),t="offset"+["Width","Height"][i.ort];return 0===i.ort?e.width||Y[t]:e.height||Y[t]}function k(e,t,n,o){var r=function(r){return!!(r=function(e,t,n){var i,o,r=0===e.type.indexOf("touch"),s=0===e.type.indexOf("mouse"),a=0===e.type.indexOf("pointer");if(0===e.type.indexOf("MSPointer")&&(a=!0),"mousedown"===e.type&&!e.buttons&&!e.touches)return!1;if(r){var l=function(e){return e.target===n||n.contains(e.target)||e.target.shadowRoot&&e.target.shadowRoot.contains(n)};if("touchstart"===e.type){var c=Array.prototype.filter.call(e.touches,l);if(1<c.length)return!1;i=c[0].pageX,o=c[0].pageY}else{var d=Array.prototype.find.call(e.changedTouches,l);if(!d)return!1;i=d.pageX,o=d.pageY}}return t=t||u(ue),(s||a)&&(i=e.clientX+t.x,o=e.clientY+t.y),e.pageOffset=t,e.points=[i,o],e.cursor=s||a,e}(r,o.pageOffset,o.target||t))&&!(g()&&!o.doNotReject)&&(s=ie,a=i.cssClasses.tap,!((s.classList?s.classList.contains(a):new RegExp("\\b"+a+"\\b").test(s.className))&&!o.doNotReject)&&!(e===te.start&&void 0!==r.buttons&&1<r.buttons)&&(!o.hover||!r.buttons)&&(ne||r.preventDefault(),r.calcPoint=r.points[i.ort],void n(r,o)));var s,a},s=[];return e.split(" ").forEach(function(e){t.addEventListener(e,r,!!ne&&{passive:!0}),s.push([e,r])}),s}function C(e){var t,n,o,s,a,l,c=100*(e-(t=Y,n=i.ort,o=t.getBoundingClientRect(),s=t.ownerDocument,a=s.documentElement,l=u(s),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(l.x=0),n?o.top+l.y-a.clientTop:o.left+l.x-a.clientLeft))/x();return c=r(c),i.dir?100-c:c}function S(e,t){"mouseout"===e.type&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&E(e,t)}function T(e,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==t.buttonsProperty)return E(e,t);var n=(i.dir?-1:1)*(e.calcPoint-t.startCalcPoint);R(0<n,100*n/t.baseSize,t.locations,t.handleNumbers)}function E(e,t){t.handle&&(c(t.handle,i.cssClasses.active),le-=1),t.listeners.forEach(function(e){de.removeEventListener(e[0],e[1])}),0===le&&(c(ie,i.cssClasses.drag),N(),e.cursor&&(he.style.cursor="",he.removeEventListener("selectstart",n))),t.handleNumbers.forEach(function(e){O("change",e),O("set",e),O("end",e)})}function P(e,t){if(t.handleNumbers.some(m))return!1;var o;1===t.handleNumbers.length&&(o=G[t.handleNumbers[0]].children[0],le+=1,l(o,i.cssClasses.active)),e.stopPropagation();var r=[],s=k(te.move,de,T,{target:e.target,handle:o,listeners:r,startCalcPoint:e.calcPoint,baseSize:x(),pageOffset:e.pageOffset,handleNumbers:t.handleNumbers,buttonsProperty:e.buttons,locations:se.slice()}),a=k(te.end,de,E,{target:e.target,handle:o,listeners:r,doNotReject:!0,handleNumbers:t.handleNumbers}),c=k("mouseout",de,S,{target:e.target,handle:o,listeners:r,doNotReject:!0,handleNumbers:t.handleNumbers});r.push.apply(r,s.concat(a,c)),e.cursor&&(he.style.cursor=getComputedStyle(e.target).cursor,1<G.length&&l(ie,i.cssClasses.drag),he.addEventListener("selectstart",n,!1)),t.handleNumbers.forEach(function(e){O("start",e)})}function A(e){e.stopPropagation();var t,n,r,s=C(e.calcPoint),a=(t=s,r=!(n=100),G.forEach(function(e,i){if(!m(i)){var o=se[i],s=Math.abs(o-t);(s<n||s<=n&&o<t||100===s&&100===n)&&(r=i,n=s)}}),r);if(!1===a)return!1;i.events.snap||o(ie,i.cssClasses.tap,i.animationDuration),B(a,s,!0,!0),N(),O("slide",a,!0),O("update",a,!0),O("change",a,!0),O("set",a,!0),i.events.snap&&P(e,{handleNumbers:[a]})}function D(e){var t=C(e.calcPoint),n=oe.getStep(t),i=oe.fromStepping(n);Object.keys(ce).forEach(function(e){"hover"===e.split(".")[0]&&ce[e].forEach(function(e){e.call(J,i)})})}function I(e,t){ce[e]=ce[e]||[],ce[e].push(t),"update"===e.split(".")[0]&&G.forEach(function(e,t){O("update",t)})}function $(e){var t=e&&e.split(".")[0],n=t&&e.substring(t.length);Object.keys(ce).forEach(function(e){var i=e.split(".")[0],o=e.substring(i.length);t&&t!==i||n&&n!==o||delete ce[e]})}function O(e,t,n){Object.keys(ce).forEach(function(o){var r=o.split(".")[0];e===r&&ce[o].forEach(function(e){e.call(J,re.map(i.format.to),t,re.slice(),n||!1,se.slice(),J)})})}function M(e,t,n,o,s,a){var l;return 1<G.length&&!i.events.unconstrained&&(o&&0<t&&(l=oe.getAbsoluteDistance(e[t-1],i.margin,0),n=Math.max(n,l)),s&&t<G.length-1&&(l=oe.getAbsoluteDistance(e[t+1],i.margin,1),n=Math.min(n,l))),1<G.length&&i.limit&&(o&&0<t&&(l=oe.getAbsoluteDistance(e[t-1],i.limit,0),n=Math.min(n,l)),s&&t<G.length-1&&(l=oe.getAbsoluteDistance(e[t+1],i.limit,1),n=Math.max(n,l))),i.padding&&(0===t&&(l=oe.getAbsoluteDistance(0,i.padding[0],0),n=Math.max(n,l)),t===G.length-1&&(l=oe.getAbsoluteDistance(100,i.padding[1],1),n=Math.min(n,l))),!((n=r(n=oe.getStep(n)))===e[t]&&!a)&&n}function F(e,t){var n=i.ort;return(n?t:e)+", "+(n?e:t)}function R(e,t,n,i){var o=n.slice(),r=[!e,e],s=[e,!e];i=i.slice(),e&&i.reverse(),1<i.length?i.forEach(function(e,n){var i=M(o,e,o[e]+t,r[n],s[n],!1);!1===i?t=0:(t=i-o[e],o[e]=i)}):r=s=[!0];var a=!1;i.forEach(function(e,i){a=B(e,n[e]+t,r[i],s[i])||a}),a&&i.forEach(function(e){O("update",e),O("slide",e)})}function L(e,t){return i.dir?100-e-t:e}function N(){ae.forEach(function(e){var t=50<se[e]?-1:1,n=3+(G.length+t*e);G[e].style.zIndex=n})}function B(e,t,n,o,r){return r||(t=M(se,e,t,n,o,!1)),!1!==t&&(function(e,t){se[e]=t,re[e]=oe.fromStepping(t);var n="translate("+F(10*(L(t,0)-ve)+"%","0")+")";G[e].style[i.transformRule]=n,U(e),U(e+1)}(e,t),!0)}function U(e){if(X[e]){var t=0,n=100;0!==e&&(t=se[e-1]),e!==X.length-1&&(n=se[e]);var o=n-t,r="translate("+F(L(t,o)+"%","0")+")",s="scale("+F(o/100,"1")+")";X[e].style[i.transformRule]=r+" "+s}}function j(e,t){return null===e||!1===e||void 0===e?se[t]:("number"==typeof e&&(e=String(e)),e=i.format.from(e),!1===(e=oe.toStepping(e))||isNaN(e)?se[t]:e)}function H(e,t,n){var r=s(e),a=void 0===se[0];t=void 0===t||!!t,i.animate&&!a&&o(ie,i.cssClasses.tap,i.animationDuration),ae.forEach(function(e){B(e,j(r[e],e),!0,!1,n)});for(var l=1===ae.length?0:1;l<ae.length;++l)ae.forEach(function(e){B(e,se[e],!0,!0,n)});N(),ae.forEach(function(e){O("update",e),null!==r[e]&&t&&O("set",e)})}function q(){var e=re.map(i.format.to);return 1===e.length?e[0]:e}function V(e){var t=se[e],n=oe.getNearbySteps(t),o=re[e],r=n.thisStep.step,s=null;if(i.snap)return[o-n.stepBefore.startValue||null,n.stepAfter.startValue-o||null];!1!==r&&o+r>n.stepAfter.startValue&&(r=n.stepAfter.startValue-o),s=o>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&o-n.stepBefore.highestStep,100===t?r=null:0===t&&(s=null);var a=oe.countStepDecimals();return null!==r&&!1!==r&&(r=Number(r.toFixed(a))),null!==s&&!1!==s&&(s=Number(s.toFixed(a))),[s,r]}var Y,G,X,K,Q,J,Z,ee,te=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},ne=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}(),ie=t,oe=i.spectrum,re=[],se=[],ae=[],le=0,ce={},ue=t.ownerDocument,de=i.documentElement||ue.documentElement,he=ue.body,pe=-1,fe=0,ge=1,me=2,ve="rtl"===ue.dir||1===i.ort?0:100;return l(Z=ie,i.cssClasses.target),0===i.dir?l(Z,i.cssClasses.ltr):l(Z,i.cssClasses.rtl),0===i.ort?l(Z,i.cssClasses.horizontal):l(Z,i.cssClasses.vertical),l(Z,"rtl"===getComputedStyle(Z).direction?i.cssClasses.textDirectionRtl:i.cssClasses.textDirectionLtr),Y=d(Z,i.cssClasses.base),function(e,t){var n=d(t,i.cssClasses.connects);G=[],(X=[]).push(p(n,e[0]));for(var o=0;o<i.handles;o++)G.push(h(t,o)),ae[o]=o,X.push(p(n,e[o+1]))}(i.connect,Y),(ee=i.events).fixed||G.forEach(function(e,t){k(te.start,e.children[0],P,{handleNumbers:[t]})}),ee.tap&&k(te.start,Y,A,{}),ee.hover&&k(te.move,Y,D,{hover:!0}),ee.drag&&X.forEach(function(e,t){if(!1!==e&&0!==t&&t!==X.length-1){var n=G[t-1],o=G[t],r=[e];l(e,i.cssClasses.draggable),ee.fixed&&(r.push(n.children[0]),r.push(o.children[0])),r.forEach(function(e){k(te.start,e,P,{handles:[n,o],handleNumbers:[t-1,t]})})}}),H(i.start),i.pips&&w(i.pips),i.tooltips&&_(),I("update",function(e,t,n,o,r){ae.forEach(function(e){var t=G[e],o=M(se,e,0,!0,!0,!0),s=M(se,e,100,!0,!0,!0),a=r[e],l=i.ariaFormat.to(n[e]);o=oe.fromStepping(o).toFixed(1),s=oe.fromStepping(s).toFixed(1),a=oe.fromStepping(a).toFixed(1),t.children[0].setAttribute("aria-valuemin",o),t.children[0].setAttribute("aria-valuemax",s),t.children[0].setAttribute("aria-valuenow",a),t.children[0].setAttribute("aria-valuetext",l)})}),J={destroy:function(){for(var e in i.cssClasses)i.cssClasses.hasOwnProperty(e)&&c(ie,i.cssClasses[e]);for(;ie.firstChild;)ie.removeChild(ie.firstChild);delete ie.noUiSlider},steps:function(){return ae.map(V)},on:I,off:$,get:q,set:H,setHandle:function(e,t,n,i){if(!(0<=(e=Number(e))&&e<ae.length))throw new Error("noUiSlider ("+W+"): invalid handle number, got: "+e);B(e,j(t,e),!0,!0,i),O("update",e),n&&O("set",e)},reset:function(e){H(i.start,e)},__moveHandles:function(e,t,n){R(e,t,se,n)},options:a,updateOptions:function(e,t){var n=q(),o=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];o.forEach(function(t){void 0!==e[t]&&(a[t]=e[t])});var r=z(a);o.forEach(function(t){void 0!==e[t]&&(i[t]=r[t])}),oe=r.spectrum,i.margin=r.margin,i.limit=r.limit,i.padding=r.padding,i.pips?w(i.pips):b(),i.tooltips?_():v(),se=[],H(e.start||n,t)},target:ie,removePips:b,removeTooltips:v,getTooltips:function(){return Q},getOrigins:function(){return G},pips:w}}var W="14.6.2";_.prototype.getDistance=function(e){var t,n=[];for(t=0;t<this.xNumSteps.length-1;t++){var i=this.xNumSteps[t]
;if(i&&e/i%1!=0)throw new Error("noUiSlider ("+W+"): 'limit', 'margin' and 'padding' of "+this.xPct[t]+"% range must be divisible by step.");n[t]=h(this.xVal,e,t)}return n},_.prototype.getAbsoluteDistance=function(e,t,n){var i,o=0;if(e<this.xPct[this.xPct.length-1])for(;e>this.xPct[o+1];)o++;else e===this.xPct[this.xPct.length-1]&&(o=this.xPct.length-2);n||e!==this.xPct[o+1]||o++;var r=1,s=t[o],a=0,l=0,c=0,u=0;for(i=n?(e-this.xPct[o])/(this.xPct[o+1]-this.xPct[o]):(this.xPct[o+1]-e)/(this.xPct[o+1]-this.xPct[o]);0<s;)a=this.xPct[o+1+u]-this.xPct[o+u],100<t[o+u]*r+100-100*i?(l=a*i,r=(s-100*i)/t[o+u],i=1):(l=t[o+u]*a/100*r,r=0),n?(c-=l,1<=this.xPct.length+u&&u--):(c+=l,1<=this.xPct.length-u&&u++),s=t[o+u]*r;return e+c},_.prototype.toStepping=function(e){return f(this.xVal,this.xPct,e)},_.prototype.fromStepping=function(e){return function(e,t,n){if(100<=n)return e.slice(-1)[0];var i,o=p(n,t),r=e[o-1],s=e[o],a=t[o-1],l=t[o];return i=[r,s],(n-a)*d(a,l)*(i[1]-i[0])/100+i[0]}(this.xVal,this.xPct,e)},_.prototype.getStep=function(e){return g(this.xPct,this.xSteps,this.snap,e)},_.prototype.getDefaultStep=function(e,t,n){var i=p(e,this.xPct);return(100===e||t&&e===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/n},_.prototype.getNearbySteps=function(e){var t=p(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},_.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(a);return Math.max.apply(null,e)},_.prototype.convert=function(e){return this.getStep(this.toStepping(e))};var q={to:function(e){return void 0!==e&&e.toFixed(2)},from:Number},V={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"};return{__spectrum:_,version:W,cssClasses:V,create:function(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider ("+W+"): create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider ("+W+"): Slider was already initialized.");var n=H(e,z(t),t);return e.noUiSlider=n}}}),function(e,t){if("function"==typeof define&&define.amd)define(["moment","jquery"],function(e,n){return n.fn||(n.fn={}),"function"!=typeof e&&e.default&&(e=e.default),t(e,n)});else if("object"==typeof module&&module.exports){var n="undefined"!=typeof window?window.jQuery:void 0;n||(n=require("jquery")).fn||(n.fn={});var i="undefined"!=typeof window&&void 0!==window.moment?window.moment:require("moment");module.exports=t(i,n)}else e.daterangepicker=t(e.moment,e.jQuery)}(this,function(e,t){var n=function(n,i,o){if(this.parentEl="body",this.element=t(n),this.startDate=e().startOf("day"),this.endDate=e().endOf("day"),this.minDate=!1,this.maxDate=!1,this.maxSpan=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.minYear=e().subtract(100,"year").format("YYYY"),this.maxYear=e().add(100,"year").format("YYYY"),this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyButtonClasses="btn-primary",this.cancelButtonClasses="btn-default",this.locale={direction:"ltr",format:e.localeData().longDateFormat("L"),separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:e.weekdaysMin(),monthNames:e.monthsShort(),firstDay:e.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof i&&null!==i||(i={}),"string"==typeof(i=t.extend(this.element.data(),i)).template||i.template instanceof t||(i.template='<div class="daterangepicker"><div class="ranges"></div><div class="drp-calendar left"><div class="calendar-table"></div><div class="calendar-time"></div></div><div class="drp-calendar right"><div class="calendar-table"></div><div class="calendar-time"></div></div><div class="drp-buttons"><span class="drp-selected"></span><button class="cancelBtn" type="button"></button><button class="applyBtn" disabled="disabled" type="button"></button> </div></div>'),this.parentEl=i.parentEl&&t(i.parentEl).length?t(i.parentEl):t(this.parentEl),this.container=t(i.template).appendTo(this.parentEl),"object"==typeof i.locale&&("string"==typeof i.locale.direction&&(this.locale.direction=i.locale.direction),"string"==typeof i.locale.format&&(this.locale.format=i.locale.format),"string"==typeof i.locale.separator&&(this.locale.separator=i.locale.separator),"object"==typeof i.locale.daysOfWeek&&(this.locale.daysOfWeek=i.locale.daysOfWeek.slice()),"object"==typeof i.locale.monthNames&&(this.locale.monthNames=i.locale.monthNames.slice()),"number"==typeof i.locale.firstDay&&(this.locale.firstDay=i.locale.firstDay),"string"==typeof i.locale.applyLabel&&(this.locale.applyLabel=i.locale.applyLabel),"string"==typeof i.locale.cancelLabel&&(this.locale.cancelLabel=i.locale.cancelLabel),"string"==typeof i.locale.weekLabel&&(this.locale.weekLabel=i.locale.weekLabel),"string"==typeof i.locale.customRangeLabel)){(h=document.createElement("textarea")).innerHTML=i.locale.customRangeLabel;var r=h.value;this.locale.customRangeLabel=r}if(this.container.addClass(this.locale.direction),"string"==typeof i.startDate&&(this.startDate=e(i.startDate,this.locale.format)),"string"==typeof i.endDate&&(this.endDate=e(i.endDate,this.locale.format)),"string"==typeof i.minDate&&(this.minDate=e(i.minDate,this.locale.format)),"string"==typeof i.maxDate&&(this.maxDate=e(i.maxDate,this.locale.format)),"object"==typeof i.startDate&&(this.startDate=e(i.startDate)),"object"==typeof i.endDate&&(this.endDate=e(i.endDate)),"object"==typeof i.minDate&&(this.minDate=e(i.minDate)),"object"==typeof i.maxDate&&(this.maxDate=e(i.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),"string"==typeof i.applyButtonClasses&&(this.applyButtonClasses=i.applyButtonClasses),"string"==typeof i.applyClass&&(this.applyButtonClasses=i.applyClass),"string"==typeof i.cancelButtonClasses&&(this.cancelButtonClasses=i.cancelButtonClasses),"string"==typeof i.cancelClass&&(this.cancelButtonClasses=i.cancelClass),"object"==typeof i.maxSpan&&(this.maxSpan=i.maxSpan),"object"==typeof i.dateLimit&&(this.maxSpan=i.dateLimit),"string"==typeof i.opens&&(this.opens=i.opens),"string"==typeof i.drops&&(this.drops=i.drops),"boolean"==typeof i.showWeekNumbers&&(this.showWeekNumbers=i.showWeekNumbers),"boolean"==typeof i.showISOWeekNumbers&&(this.showISOWeekNumbers=i.showISOWeekNumbers),"string"==typeof i.buttonClasses&&(this.buttonClasses=i.buttonClasses),"object"==typeof i.buttonClasses&&(this.buttonClasses=i.buttonClasses.join(" ")),"boolean"==typeof i.showDropdowns&&(this.showDropdowns=i.showDropdowns),"number"==typeof i.minYear&&(this.minYear=i.minYear),"number"==typeof i.maxYear&&(this.maxYear=i.maxYear),"boolean"==typeof i.showCustomRangeLabel&&(this.showCustomRangeLabel=i.showCustomRangeLabel),"boolean"==typeof i.singleDatePicker&&(this.singleDatePicker=i.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof i.timePicker&&(this.timePicker=i.timePicker),"boolean"==typeof i.timePickerSeconds&&(this.timePickerSeconds=i.timePickerSeconds),"number"==typeof i.timePickerIncrement&&(this.timePickerIncrement=i.timePickerIncrement),"boolean"==typeof i.timePicker24Hour&&(this.timePicker24Hour=i.timePicker24Hour),"boolean"==typeof i.autoApply&&(this.autoApply=i.autoApply),"boolean"==typeof i.autoUpdateInput&&(this.autoUpdateInput=i.autoUpdateInput),"boolean"==typeof i.linkedCalendars&&(this.linkedCalendars=i.linkedCalendars),"function"==typeof i.isInvalidDate&&(this.isInvalidDate=i.isInvalidDate),"function"==typeof i.isCustomDate&&(this.isCustomDate=i.isCustomDate),"boolean"==typeof i.alwaysShowCalendars&&(this.alwaysShowCalendars=i.alwaysShowCalendars),0!=this.locale.firstDay)for(var s=this.locale.firstDay;s>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),s--;var a,l,c;if(void 0===i.startDate&&void 0===i.endDate&&t(this.element).is(":text")){var u=t(this.element).val(),d=u.split(this.locale.separator);a=l=null,2==d.length?(a=e(d[0],this.locale.format),l=e(d[1],this.locale.format)):this.singleDatePicker&&""!==u&&(a=e(u,this.locale.format),l=e(u,this.locale.format)),null!==a&&null!==l&&(this.setStartDate(a),this.setEndDate(l))}if("object"==typeof i.ranges){for(c in i.ranges){a="string"==typeof i.ranges[c][0]?e(i.ranges[c][0],this.locale.format):e(i.ranges[c][0]),l="string"==typeof i.ranges[c][1]?e(i.ranges[c][1],this.locale.format):e(i.ranges[c][1]),this.minDate&&a.isBefore(this.minDate)&&(a=this.minDate.clone());var h,p=this.maxDate;if(this.maxSpan&&p&&a.clone().add(this.maxSpan).isAfter(p)&&(p=a.clone().add(this.maxSpan)),p&&l.isAfter(p)&&(l=p.clone()),!(this.minDate&&l.isBefore(this.minDate,this.timepicker?"minute":"day")||p&&a.isAfter(p,this.timepicker?"minute":"day")))(h=document.createElement("textarea")).innerHTML=c,r=h.value,this.ranges[r]=[a,l]}var f="<ul>";for(c in this.ranges)f+='<li data-range-key="'+c+'">'+c+"</li>";this.showCustomRangeLabel&&(f+='<li data-range-key="'+this.locale.customRangeLabel+'">'+this.locale.customRangeLabel+"</li>"),f+="</ul>",this.container.find(".ranges").prepend(f)}"function"==typeof o&&(this.callback=o),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&this.container.addClass("auto-apply"),"object"==typeof i.ranges&&this.container.addClass("show-ranges"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".drp-calendar.left").addClass("single"),this.container.find(".drp-calendar.left").show(),this.container.find(".drp-calendar.right").hide(),this.timePicker||this.container.addClass("auto-apply")),(void 0===i.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyButtonClasses.length&&this.container.find(".applyBtn").addClass(this.applyButtonClasses),this.cancelButtonClasses.length&&this.container.find(".cancelBtn").addClass(this.cancelButtonClasses),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".drp-calendar").on("click.daterangepicker",".prev",t.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",t.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",t.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",t.proxy(this.hoverDate,this)).on("change.daterangepicker","select.yearselect",t.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",t.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",t.proxy(this.timeChanged,this)),this.container.find(".ranges").on("click.daterangepicker","li",t.proxy(this.clickRange,this)),this.container.find(".drp-buttons").on("click.daterangepicker","button.applyBtn",t.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",t.proxy(this.clickCancel,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":t.proxy(this.show,this),"focus.daterangepicker":t.proxy(this.show,this),"keyup.daterangepicker":t.proxy(this.elementChanged,this),"keydown.daterangepicker":t.proxy(this.keydown,this)}):(this.element.on("click.daterangepicker",t.proxy(this.toggle,this)),this.element.on("keydown.daterangepicker",t.proxy(this.toggle,this))),this.updateElement()};return n.prototype={constructor:n,setStartDate:function(t){"string"==typeof t&&(this.startDate=e(t,this.locale.format)),"object"==typeof t&&(this.startDate=e(t)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(t){"string"==typeof t&&(this.endDate=e(t,this.locale.format)),"object"==typeof t&&(this.endDate=e(t)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),this.maxSpan&&this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.maxSpan)),this.previousRightTime=this.endDate.clone(),this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled"):this.container.find(".right .calendar-time select").attr("disabled","disabled").addClass("disabled")),this.endDate&&this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){var e,t,n,i;this.timePicker&&(this.endDate?(e=parseInt(this.container.find(".left .hourselect").val(),10),t=parseInt(this.container.find(".left .minuteselect").val(),10),isNaN(t)&&(t=parseInt(this.container.find(".left .minuteselect option:last").val(),10)),n=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,this.timePicker24Hour||("PM"===(i=this.container.find(".left .ampmselect").val())&&e<12&&(e+=12),"AM"===i&&12===e&&(e=0))):(e=parseInt(this.container.find(".right .hourselect").val(),10),t=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(t)&&(t=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),n=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,this.timePicker24Hour||("PM"===(i=this.container.find(".right .ampmselect").val())&&e<12&&(e+=12),"AM"===i&&12===e&&(e=0))),this.leftCalendar.month.hour(e).minute(t).second(n),this.rightCalendar.month.hour(e).minute(t).second(n));this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(n){var i,o=(i="left"==n?this.leftCalendar:this.rightCalendar).month.month(),r=i.month.year(),s=i.month.hour(),a=i.month.minute(),l=i.month.second(),c=e([r,o]).daysInMonth(),u=e([r,o,1]),d=e([r,o,c]),h=e(u).subtract(1,"month").month(),p=e(u).subtract(1,"month").year(),f=e([p,h]).daysInMonth(),g=u.day();(i=[]).firstDay=u,i.lastDay=d;for(var m=0;m<6;m++)i[m]=[];var v=f-g+this.locale.firstDay+1;v>f&&(v-=7),g==this.locale.firstDay&&(v=f-6);for(var _=e([p,h,v,12,a,l]),y=(m=0,0),b=0;m<42;m++,y++,_=e(_).add(24,"hour"))m>0&&y%7==0&&(y=0,b++),i[b][y]=_.clone().hour(s).minute(a).second(l),_.hour(12),this.minDate&&i[b][y].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&i[b][y].isBefore(this.minDate)&&"left"==n&&(i[b][y]=this.minDate.clone()),this.maxDate&&i[b][y].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&i[b][y].isAfter(this.maxDate)&&"right"==n&&(i[b][y]=this.maxDate.clone());"left"==n?this.leftCalendar.calendar=i:this.rightCalendar.calendar=i;var w="left"==n?this.minDate:this.startDate,x=this.maxDate,k=("left"==n?this.startDate:this.endDate,this.locale.direction,'<table class="table-condensed">');k+="<thead>",k+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(k+="<th></th>"),w&&!w.isBefore(i.firstDay)||this.linkedCalendars&&"left"!=n?k+="<th></th>":k+='<th class="prev available"><span></span></th>';var C=this.locale.monthNames[i[1][1].month()]+i[1][1].format(" YYYY");if(this.showDropdowns){for(var S=i[1][1].month(),T=i[1][1].year(),E=x&&x.year()||this.maxYear,P=w&&w.year()||this.minYear,A=T==P,D=T==E,I='<select class="monthselect">',$=0;$<12;$++)(!A||w&&$>=w.month())&&(!D||x&&$<=x.month())?I+="<option value='"+$+"'"+($===S?" selected='selected'":"")+">"+this.locale.monthNames[$]+"</option>":I+="<option value='"+$+"'"+($===S?" selected='selected'":"")+" disabled='disabled'>"+this.locale.monthNames[$]+"</option>";I+="</select>";for(var O='<select class="yearselect">',M=P;M<=E;M++)O+='<option value="'+M+'"'+(M===T?' selected="selected"':"")+">"+M+"</option>";C=I+(O+="</select>")}if(k+='<th colspan="5" class="month">'+C+"</th>",x&&!x.isAfter(i.lastDay)||this.linkedCalendars&&"right"!=n&&!this.singleDatePicker?k+="<th></th>":k+='<th class="next available"><span></span></th>',k+="</tr>",k+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(k+='<th class="week">'+this.locale.weekLabel+"</th>"),t.each(this.locale.daysOfWeek,function(e,t){k+="<th>"+t+"</th>"}),k+="</tr>",k+="</thead>",k+="<tbody>",null==this.endDate&&this.maxSpan){var F=this.startDate.clone().add(this.maxSpan).endOf("day");x&&!F.isBefore(x)||(x=F)}for(b=0;b<6;b++){for(k+="<tr>",this.showWeekNumbers?k+='<td class="week">'+i[b][0].week()+"</td>":this.showISOWeekNumbers&&(k+='<td class="week">'+i[b][0].isoWeek()+"</td>"),y=0;y<7;y++){var R=[];i[b][y].isSame(new Date,"day")&&R.push("today"),i[b][y].isoWeekday()>5&&R.push("weekend"),i[b][y].month()!=i[1][1].month()&&R.push("off","ends"),this.minDate&&i[b][y].isBefore(this.minDate,"day")&&R.push("off","disabled"),x&&i[b][y].isAfter(x,"day")&&R.push("off","disabled"),this.isInvalidDate(i[b][y])&&R.push("off","disabled"),i[b][y].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&R.push("active","start-date"),null!=this.endDate&&i[b][y].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&R.push("active","end-date"),null!=this.endDate&&i[b][y]>this.startDate&&i[b][y]<this.endDate&&R.push("in-range");var L=this.isCustomDate(i[b][y]);!1!==L&&("string"==typeof L?R.push(L):Array.prototype.push.apply(R,L));var N="",B=!1;for(m=0;m<R.length;m++)N+=R[m]+" ","disabled"==R[m]&&(B=!0);B||(N+="available"),k+='<td class="'+N.replace(/^\s+|\s+$/g,"")+'" data-title="r'+b+"c"+y+'">'+i[b][y].date()+"</td>"}k+="</tr>"}k+="</tbody>",k+="</table>",this.container.find(".drp-calendar."+n+" .calendar-table").html(k)},renderTimePicker:function(e){if("right"!=e||this.endDate){var t,n,i,o=this.maxDate;if(!this.maxSpan||this.maxDate&&!this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate)||(o=this.startDate.clone().add(this.maxSpan)),"left"==e)n=this.startDate.clone(),i=this.minDate;else if("right"==e){n=this.endDate.clone(),i=this.startDate;var r=this.container.find(".drp-calendar.right .calendar-time");if(""!=r.html()&&(n.hour(isNaN(n.hour())?r.find(".hourselect option:selected").val():n.hour()),n.minute(isNaN(n.minute())?r.find(".minuteselect option:selected").val():n.minute()),n.second(isNaN(n.second())?r.find(".secondselect option:selected").val():n.second()),!this.timePicker24Hour)){var s=r.find(".ampmselect option:selected").val();"PM"===s&&n.hour()<12&&n.hour(n.hour()+12),"AM"===s&&12===n.hour()&&n.hour(0)}n.isBefore(this.startDate)&&(n=this.startDate.clone()),o&&n.isAfter(o)&&(n=o.clone())}t='<select class="hourselect">';for(var a=this.timePicker24Hour?0:1,l=this.timePicker24Hour?23:12,c=a;c<=l;c++){var u=c;this.timePicker24Hour||(u=n.hour()>=12?12==c?12:c+12:12==c?0:c);var d=n.clone().hour(u),h=!1;i&&d.minute(59).isBefore(i)&&(h=!0),o&&d.minute(0).isAfter(o)&&(h=!0),u!=n.hour()||h?t+=h?'<option value="'+c+'" disabled="disabled" class="disabled">'+c+"</option>":'<option value="'+c+'">'+c+"</option>":t+='<option value="'+c+'" selected="selected">'+c+"</option>"}for(t+="</select> ",t+=': <select class="minuteselect">',c=0;c<60;c+=this.timePickerIncrement){var p=c<10?"0"+c:c;d=n.clone().minute(c),h=!1,i&&d.second(59).isBefore(i)&&(h=!0),o&&d.second(0).isAfter(o)&&(h=!0),n.minute()!=c||h?t+=h?'<option value="'+c+'" disabled="disabled" class="disabled">'+p+"</option>":'<option value="'+c+'">'+p+"</option>":t+='<option value="'+c+'" selected="selected">'+p+"</option>"}if(t+="</select> ",this.timePickerSeconds){for(t+=': <select class="secondselect">',c=0;c<60;c++)p=c<10?"0"+c:c,d=n.clone().second(c),h=!1,i&&d.isBefore(i)&&(h=!0),o&&d.isAfter(o)&&(h=!0),n.second()!=c||h?t+=h?'<option value="'+c+'" disabled="disabled" class="disabled">'+p+"</option>":'<option value="'+c+'">'+p+"</option>":t+='<option value="'+c+'" selected="selected">'+p+"</option>";t+="</select> "}if(!this.timePicker24Hour){t+='<select class="ampmselect">';var f="",g="";i&&n.clone().hour(12).minute(0).second(0).isBefore(i)&&(f=' disabled="disabled" class="disabled"'),o&&n.clone().hour(0).minute(0).second(0).isAfter(o)&&(g=' disabled="disabled" class="disabled"'),n.hour()>=12?t+='<option value="AM"'+f+'>AM</option><option value="PM" selected="selected"'+g+">PM</option>":t+='<option value="AM" selected="selected"'+f+'>AM</option><option value="PM"'+g+">PM</option>",t+="</select>"}this.container.find(".drp-calendar."+e+" .calendar-time").html(t)}},updateFormInputs:function(){this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled")},move:function(){var e,n={top:0,left:0},i=t(window).width();this.parentEl.is("body")||(n={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},i=this.parentEl[0].clientWidth+this.parentEl.offset().left),e="up"==this.drops?this.element.offset().top-this.container.outerHeight()-n.top:this.element.offset().top+this.element.outerHeight()-n.top,this.container.css({top:0,left:0,right:"auto"});var o=this.container.outerWidth();if(this.container["up"==this.drops?"addClass":"removeClass"]("drop-up"),"left"==this.opens){var r=i-this.element.offset().left-this.element.outerWidth();o+r>t(window).width()?this.container.css({top:e,right:"auto",left:9}):this.container.css({top:e,right:r,left:"auto"})}else if("center"==this.opens)(s=this.element.offset().left-n.left+this.element.outerWidth()/2-o/2)<0?this.container.css({top:e,right:"auto",left:9}):s+o>t(window).width()?this.container.css({top:e,left:"auto",right:0}):this.container.css({top:e,left:s,right:"auto"});else{var s;(s=this.element.offset().left-n.left)+o>t(window).width()?this.container.css({top:e,left:"auto",right:0}):this.container.css({top:e,left:s,right:"auto"})}},show:function(e){this.isShowing||(this._outsideClickProxy=t.proxy(function(e){this.outsideClick(e)},this),t(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),t(window).on("resize.daterangepicker",t.proxy(function(e){this.move(e)},this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(e){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate.clone(),this.endDate.clone(),this.chosenLabel),this.updateElement(),t(document).off(".daterangepicker"),t(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(e){this.isShowing?this.hide():this.show()},outsideClick:function(e){var n=t(e.target);"focusin"==e.type||n.closest(this.element).length||n.closest(this.container).length||n.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},clickRange:function(e){var t=e.target.getAttribute("data-range-key");if(this.chosenLabel=t,t==this.locale.customRangeLabel)this.showCalendars();else{var n=this.ranges[t];this.startDate=n[0],this.endDate=n[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply()}},clickPrev:function(e){t(e.target).parents(".drp-calendar").hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(e){t(e.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(e){if(t(e.target).hasClass("available")){var n=t(e.target).attr("data-title"),i=n.substr(1,1),o=n.substr(3,1),r=t(e.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.calendar[i][o]:this.rightCalendar.calendar[i][o],s=this.leftCalendar,a=this.rightCalendar,l=this.startDate;this.endDate||this.container.find(".drp-calendar tbody td").each(function(e,n){if(!t(n).hasClass("week")){var i=t(n).attr("data-title"),o=i.substr(1,1),c=i.substr(3,1),u=t(n).parents(".drp-calendar").hasClass("left")?s.calendar[o][c]:a.calendar[o][c];u.isAfter(l)&&u.isBefore(r)||u.isSame(r,"day")?t(n).addClass("in-range"):t(n).removeClass("in-range")}})}},clickDate:function(e){if(t(e.target).hasClass("available")){var n=t(e.target).attr("data-title"),i=n.substr(1,1),o=n.substr(3,1),r=t(e.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.calendar[i][o]:this.rightCalendar.calendar[i][o];if(this.endDate||r.isBefore(this.startDate,"day")){if(this.timePicker){var s=parseInt(this.container.find(".left .hourselect").val(),10);this.timePicker24Hour||("PM"===(c=this.container.find(".left .ampmselect").val())&&s<12&&(s+=12),"AM"===c&&12===s&&(s=0));var a=parseInt(this.container.find(".left .minuteselect").val(),10);isNaN(a)&&(a=parseInt(this.container.find(".left .minuteselect option:last").val(),10));var l=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;r=r.clone().hour(s).minute(a).second(l)}this.endDate=null,this.setStartDate(r.clone())}else if(!this.endDate&&r.isBefore(this.startDate))this.setEndDate(this.startDate.clone());else{var c;if(this.timePicker)s=parseInt(this.container.find(".right .hourselect").val(),10),this.timePicker24Hour||("PM"===(c=this.container.find(".right .ampmselect").val())&&s<12&&(s+=12),"AM"===c&&12===s&&(s=0)),a=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(a)&&(a=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),l=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,r=r.clone().hour(s).minute(a).second(l);this.setEndDate(r.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),this.timePicker||this.clickApply()),this.updateView(),e.stopPropagation()}},calculateChosenLabel:function(){var e=!0,t=0;for(var n in this.ranges){if(this.timePicker){var i=this.timePickerSeconds?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm";if(this.startDate.format(i)==this.ranges[n][0].format(i)&&this.endDate.format(i)==this.ranges[n][1].format(i)){e=!1,this.chosenLabel=this.container.find(".ranges li:eq("+t+")").addClass("active").attr("data-range-key");break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[n][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[n][1].format("YYYY-MM-DD")){e=!1,this.chosenLabel=this.container.find(".ranges li:eq("+t+")").addClass("active").attr("data-range-key");break}t++}e&&(this.showCustomRangeLabel?this.chosenLabel=this.container.find(".ranges li:last").addClass("active").attr("data-range-key"):this.chosenLabel=null,this.showCalendars())},clickApply:function(e){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(e){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(e){
var n=t(e.target).closest(".drp-calendar").hasClass("left"),i=n?"left":"right",o=this.container.find(".drp-calendar."+i),r=parseInt(o.find(".monthselect").val(),10),s=o.find(".yearselect").val();n||(s<this.startDate.year()||s==this.startDate.year()&&r<this.startDate.month())&&(r=this.startDate.month(),s=this.startDate.year()),this.minDate&&(s<this.minDate.year()||s==this.minDate.year()&&r<this.minDate.month())&&(r=this.minDate.month(),s=this.minDate.year()),this.maxDate&&(s>this.maxDate.year()||s==this.maxDate.year()&&r>this.maxDate.month())&&(r=this.maxDate.month(),s=this.maxDate.year()),n?(this.leftCalendar.month.month(r).year(s),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(r).year(s),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(e){var n=t(e.target).closest(".drp-calendar"),i=n.hasClass("left"),o=parseInt(n.find(".hourselect").val(),10),r=parseInt(n.find(".minuteselect").val(),10);isNaN(r)&&(r=parseInt(n.find(".minuteselect option:last").val(),10));var s=this.timePickerSeconds?parseInt(n.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){var a=n.find(".ampmselect").val();"PM"===a&&o<12&&(o+=12),"AM"===a&&12===o&&(o=0)}if(i){var l=this.startDate.clone();l.hour(o),l.minute(r),l.second(s),this.setStartDate(l),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==l.format("YYYY-MM-DD")&&this.endDate.isBefore(l)&&this.setEndDate(l.clone())}else if(this.endDate){var c=this.endDate.clone();c.hour(o),c.minute(r),c.second(s),this.setEndDate(c)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},elementChanged:function(){if(this.element.is("input")&&this.element.val().length){var t=this.element.val().split(this.locale.separator),n=null,i=null;2===t.length&&(n=e(t[0],this.locale.format),i=e(t[1],this.locale.format)),(this.singleDatePicker||null===n||null===i)&&(i=n=e(this.element.val(),this.locale.format)),n.isValid()&&i.isValid()&&(this.setStartDate(n),this.setEndDate(i),this.updateView())}},keydown:function(e){9!==e.keyCode&&13!==e.keyCode||this.hide(),27===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.hide())},updateElement:function(){if(this.element.is("input")&&this.autoUpdateInput){var e=this.startDate.format(this.locale.format);this.singleDatePicker||(e+=this.locale.separator+this.endDate.format(this.locale.format)),e!==this.element.val()&&this.element.val(e).trigger("change")}},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData()}},t.fn.daterangepicker=function(e,i){var o=t.extend(!0,{},t.fn.daterangepicker.defaultOptions,e);return this.each(function(){var e=t(this);e.data("daterangepicker")&&e.data("daterangepicker").remove(),e.data("daterangepicker",new n(e,o,i))}),this},n}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){"use strict";function t(e){if(e instanceof Date)return e;if(String(e).match(s))return String(e).match(/^[0-9]*$/)&&(e=Number(e)),String(e).match(/\-/)&&(e=String(e).replace(/\-/g,"/")),new Date(e);throw new Error("Couldn't cast `"+e+"` to a date object.")}function n(e){var t=e.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(t)}function i(e){return function(t){var i=t.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(i)for(var r=0,s=i.length;r<s;++r){var a=i[r].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),c=n(a[0]),u=a[1]||"",d=a[3]||"",h=null;a=a[2],l.hasOwnProperty(a)&&(h=l[a],h=Number(e[h])),null!==h&&("!"===u&&(h=o(d,h)),""===u&&h<10&&(h="0"+h.toString()),t=t.replace(c,h.toString()))}return t.replace(/%%/,"%")}}function o(e,t){var n="s",i="";return e&&(e=e.replace(/(:|;|\s)/gi,"").split(/\,/),1===e.length?n=e[0]:(i=e[0],n=e[1])),Math.abs(t)>1?n:i}var r=[],s=[],a={precision:100,elapse:!1,defer:!1};s.push(/^[0-9]*$/.source),s.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),s.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),s=new RegExp(s.join("|"));var l={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},c=function(t,n,i){this.el=t,this.$el=e(t),this.interval=null,this.offset={},this.options=e.extend({},a),this.instanceNumber=r.length,r.push(this),this.$el.data("countdown-instance",this.instanceNumber),i&&("function"==typeof i?(this.$el.on("update.countdown",i),this.$el.on("stoped.countdown",i),this.$el.on("finish.countdown",i)):this.options=e.extend({},a,i)),this.setFinalDate(n),!1===this.options.defer&&this.start()};e.extend(c.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var e=this;this.update(),this.interval=setInterval(function(){e.update.call(e)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),r[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(e){this.finalDate=t(e)},update:function(){if(0!==this.$el.closest("html").length){var t,n=void 0!==e._data(this.el,"events"),i=new Date;t=this.finalDate.getTime()-i.getTime(),t=Math.ceil(t/1e3),t=!this.options.elapse&&t<0?0:Math.abs(t),this.totalSecsLeft!==t&&n&&(this.totalSecsLeft=t,this.elapsed=i>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-i.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))}else this.remove()},dispatchEvent:function(t){var n=e.Event(t+".countdown");n.finalDate=this.finalDate,n.elapsed=this.elapsed,n.offset=e.extend({},this.offset),n.strftime=i(this.offset),this.$el.trigger(n)}}),e.fn.countdown=function(){var t=Array.prototype.slice.call(arguments,0);return this.each(function(){var n=e(this).data("countdown-instance");if(void 0!==n){var i=r[n],o=t[0];c.prototype.hasOwnProperty(o)?i[o].apply(i,t.slice(1)):null===String(o).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(i.setFinalDate.call(i,o),i.start()):e.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,o))}else new c(this,t[0],t[1])})}}),function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Uppy=e()}(function(){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,function(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function randomBlock(){return _$pad_16((_$getRandomValue_15()*discreteValues<<0).toString(base),blockSize)}function safeCounter(){return c=c<discreteValues?c:0,++c-1}function cuid(){return"c"+(new Date).getTime().toString(base)+_$pad_16(safeCounter().toString(base),blockSize)+_$fingerprintBrowser_14()+(randomBlock()+randomBlock())}function WildcardMatcher(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}function ___extends_163(){return(___extends_163=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function encodeFilename(e){var t="";return e.replace(/[^A-Z0-9]/gi,function(e){return t+="-"+function(e){return e.charCodeAt(0).toString(32)}(e),"/"})+t}function __pad_217(e){return 2!==e.length?0+e:e}function ___extends_92(){return(___extends_92=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___extends_93(){return(___extends_93=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){function n(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(n,e)})(e)}function _construct(e,t,n){return(_construct=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&_setPrototypeOf(o,n.prototype),o}).apply(null,arguments)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ___wrapNativeSuper_85(e){var t="function"==typeof Map?new Map:void 0;return(___wrapNativeSuper_85=function(e){function n(){return ___construct_85(e,arguments,___getPrototypeOf_85(this).constructor)}if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),___setPrototypeOf_85(n,e)})(e)}function ___construct_85(e,t,n){return(___construct_85=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&___setPrototypeOf_85(o,n.prototype),o}).apply(null,arguments)}function ___setPrototypeOf_85(e,t){return(___setPrototypeOf_85=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ___getPrototypeOf_85(e){return(___getPrototypeOf_85=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ___extends_87(){return(___extends_87=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___defineProperties_87(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ___extends_86(){return(___extends_86=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function FileIcon(){return __h_150("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:11,height:14.5,viewBox:"0 0 44 58"},__h_150("path",{d:"M27.437.517a1 1 0 0 0-.094.03H4.25C2.037.548.217 2.368.217 4.58v48.405c0 2.212 1.82 4.03 4.03 4.03H39.03c2.21 0 4.03-1.818 4.03-4.03V15.61a1 1 0 0 0-.03-.28 1 1 0 0 0 0-.093 1 1 0 0 0-.03-.032 1 1 0 0 0 0-.03 1 1 0 0 0-.032-.063 1 1 0 0 0-.03-.063 1 1 0 0 0-.032 0 1 1 0 0 0-.03-.063 1 1 0 0 0-.032-.03 1 1 0 0 0-.03-.063 1 1 0 0 0-.063-.062l-14.593-14a1 1 0 0 0-.062-.062A1 1 0 0 0 28 .708a1 1 0 0 0-.374-.157 1 1 0 0 0-.156 0 1 1 0 0 0-.03-.03l-.003-.003zM4.25 2.547h22.218v9.97c0 2.21 1.82 4.03 4.03 4.03h10.564v36.438a2.02 2.02 0 0 1-2.032 2.032H4.25c-1.13 0-2.032-.9-2.032-2.032V4.58c0-1.13.902-2.032 2.03-2.032zm24.218 1.345l10.375 9.937.75.718H30.5c-1.13 0-2.032-.9-2.032-2.03V3.89z"}))}function FolderIcon(){return __h_150("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",style:{width:16,marginRight:3},viewBox:"0 0 276.157 276.157"},__h_150("path",{d:"M273.08 101.378c-3.3-4.65-8.86-7.32-15.254-7.32h-24.34V67.59c0-10.2-8.3-18.5-18.5-18.5h-85.322c-3.63 0-9.295-2.875-11.436-5.805l-6.386-8.735c-4.982-6.814-15.104-11.954-23.546-11.954H58.73c-9.292 0-18.638 6.608-21.737 15.372l-2.033 5.752c-.958 2.71-4.72 5.37-7.596 5.37H18.5C8.3 49.09 0 57.39 0 67.59v167.07c0 .886.16 1.73.443 2.52.152 3.306 1.18 6.424 3.053 9.064 3.3 4.652 8.86 7.32 15.255 7.32h188.487c11.395 0 23.27-8.425 27.035-19.18l40.677-116.188c2.11-6.035 1.43-12.164-1.87-16.816zM18.5 64.088h8.864c9.295 0 18.64-6.607 21.738-15.37l2.032-5.75c.96-2.712 4.722-5.373 7.597-5.373h29.565c3.63 0 9.295 2.876 11.437 5.806l6.386 8.735c4.982 6.815 15.104 11.954 23.546 11.954h85.322c1.898 0 3.5 1.602 3.5 3.5v26.47H69.34c-11.395 0-23.27 8.423-27.035 19.178L15 191.23V67.59c0-1.898 1.603-3.5 3.5-3.5zm242.29 49.15l-40.676 116.188c-1.674 4.78-7.812 9.135-12.877 9.135H18.75c-1.447 0-2.576-.372-3.02-.997-.442-.625-.422-1.814.057-3.18l40.677-116.19c1.674-4.78 7.812-9.134 12.877-9.134h188.487c1.448 0 2.577.372 3.02.997.443.625.423 1.814-.056 3.18z"}))}function VideoIcon(){return __h_150("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 58 58"},__h_150("path",{d:"M36.537 28.156l-11-7a1.005 1.005 0 0 0-1.02-.033C24.2 21.3 24 21.635 24 22v14a1 1 0 0 0 1.537.844l11-7a1.002 1.002 0 0 0 0-1.688zM26 34.18V23.82L34.137 29 26 34.18z"}),__h_150("path",{d:"M57 6H1a1 1 0 0 0-1 1v44a1 1 0 0 0 1 1h56a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zM10 28H2v-9h8v9zm-8 2h8v9H2v-9zm10 10V8h34v42H12V40zm44-12h-8v-9h8v9zm-8 2h8v9h-8v-9zm8-22v9h-8V8h8zM2 8h8v9H2V8zm0 42v-9h8v9H2zm54 0h-8v-9h8v9z"}))}function ___extends_152(){return(___extends_152=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___extends_153(){return(___extends_153=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___extends_146(){return(___extends_146=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___extends_155(){return(___extends_155=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___extends_165(){return(___extends_165=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___extends_118(){return(___extends_118=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function progressIndicatorTitle(e){return e.isUploaded?e.i18n("uploadComplete"):e.error?e.i18n("retryUpload"):e.resumableUploads?e.file.isPaused?e.i18n("resumeUpload"):e.i18n("pauseUpload"):e.individualCancellation?e.i18n("cancelUpload"):""}function ___extends_106(){return(___extends_106=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___extends_107(){return(___extends_107=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UploadStatus(e){switch(function(e,t,n,i){if(void 0===i&&(i={}),e)return uploadStates.STATE_ERROR;if(t)return uploadStates.STATE_COMPLETE;if(n)return uploadStates.STATE_PAUSED;for(var o=uploadStates.STATE_WAITING,r=Object.keys(i),s=0;s<r.length;s++){var a=i[r[s]].progress;if(a.uploadStarted&&!a.uploadComplete)return uploadStates.STATE_UPLOADING;a.preprocess&&o!==uploadStates.STATE_UPLOADING&&(o=uploadStates.STATE_PREPROCESSING),a.postprocess&&o!==uploadStates.STATE_UPLOADING&&o!==uploadStates.STATE_PREPROCESSING&&(o=uploadStates.STATE_POSTPROCESSING)}return o}(e.isAllErrored,e.isAllComplete,e.isAllPaused,e.files)){case"uploading":return e.i18n("uploadingXFiles",{smart_count:e.inProgressNotPausedFiles.length});case"preprocessing":case"postprocessing":return e.i18n("processingXFiles",{smart_count:e.processingFiles.length});case"paused":return e.i18n("uploadPaused");case"waiting":return e.i18n("xFilesSelected",{smart_count:e.newFiles.length});case"complete":return e.i18n("uploadComplete")}}function ___extends_100(){return(___extends_100=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___extends_99(){return(___extends_99=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function TransitionWrapper(e){return __h_99(_$preactCssTransitionGroup_52,{transitionName:"uppy-transition-slideDownUp",transitionEnterTimeout:250,transitionLeaveTimeout:250},e.children)}function ___extends_159(){return(___extends_159=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___extends_161(){return(___extends_161=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_161(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___extends_138(){return(___extends_138=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___extends_168(){return(___extends_168=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function focusOnFirstNode(e,t){var n=t[0];n&&(n.focus(),e.preventDefault())}function trapFocus(e,t,n){var i=_$getActiveOverlayEl_115(n,t),o=_$toArray_229(i.querySelectorAll(_$FOCUSABLE_ELEMENTS_196)),r=o.indexOf(document.activeElement);!function(e){return e.contains(document.activeElement)}(i)?focusOnFirstNode(e,o):e.shiftKey&&0===r?function(e,t){var n=o[o.length-1];n&&(n.focus(),e.preventDefault())}(e):e.shiftKey||r!==o.length-1||focusOnFirstNode(e,o)}function areInputsEqual(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ___extends_112(){return(___extends_112=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_112(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function createPromise(){var e={};return e.promise=new Promise(function(t,n){e.resolve=t,e.reject=n}),e}function ___extends_122(){return(___extends_122=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_122(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___extends_126(){return(___extends_126=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_126(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___extends_142(){return(___extends_142=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_124(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___assertThisInitialized_136(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___assertThisInitialized_140(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___assertThisInitialized_191(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___extends_192(){return(___extends_192=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_192(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UrlIcon(){return __h_192("svg",{"aria-hidden":"true",focusable:"false",width:"23",height:"23",viewBox:"0 0 23 23"},__h_192("path",{d:"M20.485 11.236l-2.748 2.737c-.184.182-.367.365-.642.547-1.007.73-2.107 1.095-3.298 1.095-1.65 0-3.298-.73-4.398-2.19-.275-.365-.183-1.003.183-1.277.367-.273 1.008-.182 1.283.183 1.191 1.642 3.482 1.915 5.13.73a.714.714 0 0 0 .367-.365l2.75-2.737c1.373-1.46 1.373-3.74-.093-5.108a3.72 3.72 0 0 0-5.13 0L12.33 6.4a.888.888 0 0 1-1.283 0 .88.88 0 0 1 0-1.277l1.558-1.55a5.38 5.38 0 0 1 7.605 0c2.29 2.006 2.382 5.564.274 7.662zm-8.979 6.294L9.95 19.081a3.72 3.72 0 0 1-5.13 0c-1.467-1.368-1.467-3.74-.093-5.108l2.75-2.737.366-.365c.824-.547 1.74-.82 2.748-.73 1.008.183 1.833.639 2.382 1.46.275.365.917.456 1.283.182.367-.273.458-.912.183-1.277-.916-1.186-2.199-1.915-3.573-2.098-1.374-.273-2.84.091-4.031 1.004l-.55.547-2.749 2.737c-2.107 2.189-2.015 5.655.092 7.753C4.727 21.453 6.101 22 7.475 22c1.374 0 2.749-.547 3.848-1.55l1.558-1.551a.88.88 0 0 0 0-1.278c-.367-.364-1.008-.456-1.375-.09z",fill:"#FF814F","fill-rule":"nonzero"}))}function isModeAvailable(e,t){return-1!==e.indexOf(t)}function ___extends_235(){return(___extends_235=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_235(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function decode(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function ___extends_238(){return(___extends_238=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function buildResponseError(e,t){return t||(t=new Error("Upload error")),"string"==typeof t&&(t=new Error(t)),t instanceof Error||(t=___extends_238(new Error("Upload error"),{data:t})),t.request=e,t}function setTypeInBlob(e){return e.data.slice(0,e.data.size,e.meta.type)}function ___assertThisInitialized_83(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___extends_83(){return(___extends_83=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function isXml(e){var t=e.headers?e.headers["content-type"]:e.getResponseHeader("Content-Type");return"string"==typeof t&&"application/xml"===t.toLowerCase()}function getXmlValue(e,t){var n=e.indexOf("<"+t+">"),i=e.indexOf("</"+t+">",n);return-1!==n&&-1!==i?e.slice(n+t.length+2,i):""}function assertServerError(e){if(e&&e.error){var t=new Error(e.message);throw ___extends_83(t,e.error),t}return e}function ___extends_80(){return(___extends_80=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function remove(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}function ___assertThisInitialized_81(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___extends_81(){return(___extends_81=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function __assertServerError_81(e){if(e&&e.error){var t=new Error(e.message);throw ___extends_81(t,e.error),t}return e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function len(e){return void 0===e?0:void 0!==e.size?e.size:e.length}function ___interopRequireDefault_179(e){return e&&e.__esModule?e:{default:e}}function ___interopRequireDefault_189(e){return e&&e.__esModule?e:{default:e}}function inStatusCategory(e,t){return e>=t&&e<t+100}function setupXHR(e,t){e.setRequestHeader("Tus-Resumable","1.0.0");var n=t.headers||{};for(var i in n)e.setRequestHeader(i,n[i]);e.withCredentials=t.withCredentials}function ___extends_178(){return(___extends_178=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_178(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function plural(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}function createDebug(e){function t(){if(t.enabled){var e=t,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var r=new Array(arguments.length),s=0;s<r.length;s++)r[s]=arguments[s];r[0]=_$debug_65.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;a++;var i=_$debug_65.formatters[n];if("function"==typeof i){var o=r[a];t=i.call(e,o),r.splice(a,1),a--}return t}),_$debug_65.formatArgs.call(e,r),(t.log||_$debug_65.log||console.log.bind(console)).apply(e,r)}}var n;return t.namespace=e,t.enabled=_$debug_65.enabled(e),t.useColors=_$debug_65.useColors(),t.color=function(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return _$debug_65.colors[Math.abs(n)%_$debug_65.colors.length]}(e),t.destroy=destroy,"function"==typeof _$debug_65.init&&_$debug_65.init(t),_$debug_65.instances.push(t),t}function destroy(){var e=_$debug_65.instances.indexOf(this);return-1!==e&&(_$debug_65.instances.splice(e,1),!0)}function __plural_74(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}function __createDebug_72(e){function t(){if(t.enabled){var e=t,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var r=new Array(arguments.length),s=0;s<r.length;s++)r[s]=arguments[s];r[0]=_$debug_72.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;a++;var i=_$debug_72.formatters[n];if("function"==typeof i){var o=r[a];t=i.call(e,o),r.splice(a,1),a--}return t}),_$debug_72.formatArgs.call(e,r),(t.log||_$debug_72.log||console.log.bind(console)).apply(e,r)}}var n;return t.namespace=e,t.enabled=_$debug_72.enabled(e),t.useColors=_$debug_72.useColors(),t.color=function(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return _$debug_72.colors[Math.abs(n)%_$debug_72.colors.length]}(e),t.destroy=__destroy_72,"function"==typeof _$debug_72.init&&_$debug_72.init(t),_$debug_72.instances.push(t),t}function __destroy_72(){var e=_$debug_72.instances.indexOf(this);return-1!==e&&(_$debug_72.instances.splice(e,1),!0)}function Emitter(e){if(e)return function(e){for(var t in Emitter.prototype)e[t]=Emitter.prototype[t];return e}(e)}function getLens(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function encodeChunk(e,t,n){for(var i,o,r=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),r.push(lookup[(o=i)>>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[63&o]);return r.join("")}function Encoder(){}function encodeAsString(e){var t=""+e.type;if(_$socketIoParser_68.BINARY_EVENT!==e.type&&_$socketIoParser_68.BINARY_ACK!==e.type||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),
null!=e.id&&(t+=e.id),null!=e.data){var n=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===n)return ERROR_PACKET;t+=n}return __debug_68("encoded %j as %s",e,t),t}function Decoder(){this.reconstructor=null}function BinaryReconstructor(e){this.reconPack=e,this.buffers=[]}function error(e){return{type:_$socketIoParser_68.ERROR,data:"parser error: "+e}}function __Emitter_26(e){if(e)return function(e){for(var t in __Emitter_26.prototype)e[t]=__Emitter_26.prototype[t];return e}(e)}function __plural_29(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}function __createDebug_28(e){function t(){if(t.enabled){var e=t,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var r=new Array(arguments.length),s=0;s<r.length;s++)r[s]=arguments[s];r[0]=_$debug_28.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;a++;var i=_$debug_28.formatters[n];if("function"==typeof i){var o=r[a];t=i.call(e,o),r.splice(a,1),a--}return t}),_$debug_28.formatArgs.call(e,r),(t.log||_$debug_28.log||console.log.bind(console)).apply(e,r)}}var n;return t.namespace=e,t.enabled=_$debug_28.enabled(e),t.useColors=_$debug_28.useColors(),t.color=function(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return _$debug_28.colors[Math.abs(n)%_$debug_28.colors.length]}(e),t.destroy=__destroy_28,"function"==typeof _$debug_28.init&&_$debug_28.init(t),_$debug_28.instances.push(t),t}function __destroy_28(){var e=_$debug_28.instances.indexOf(this);return-1!==e&&(_$debug_28.instances.splice(e,1),!0)}function __noop_1(){}function ucs2decode(e){for(var t,n,i=[],o=0,r=e.length;o<r;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<r?56320==(64512&(n=e.charCodeAt(o++)))?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),o--):i.push(t);return i}function checkScalarValue(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function createByte(e,t){return stringFromCharCode(e>>t&63|128)}function encodeCodePoint(e,t){if(0==(4294967168&e))return stringFromCharCode(e);var n="";return 0==(4294965248&e)?n=stringFromCharCode(e>>6&31|192):0==(4294901760&e)?(checkScalarValue(e,t)||(e=65533),n=stringFromCharCode(e>>12&15|224),n+=createByte(e,6)):0==(4292870144&e)&&(n=stringFromCharCode(e>>18&7|240),n+=createByte(e,12),n+=createByte(e,6)),n+stringFromCharCode(63&e|128)}function readContinuationByte(){if(byteIndex>=byteCount)throw Error("Invalid byte index");var e=255&byteArray[byteIndex];if(byteIndex++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function decodeSymbol(e){var t,n;if(byteIndex>byteCount)throw Error("Invalid byte index");if(byteIndex==byteCount)return!1;if(t=255&byteArray[byteIndex],byteIndex++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|readContinuationByte())>=128)return n;throw Error("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|readContinuationByte()<<6|readContinuationByte())>=2048)return checkScalarValue(n,e)?n:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|readContinuationByte()<<12|readContinuationByte()<<6|readContinuationByte())>=65536&&n<=1114111)return n;throw Error("Invalid UTF-8 detected")}function mapArrayBufferViews(e){return e.map(function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e})}function BlobBuilderConstructor(e,t){t=t||{};var n=new BlobBuilder;return mapArrayBufferViews(e).forEach(function(e){n.append(e)}),t.type?n.getBlob(t.type):n.getBlob()}function BlobConstructor(e,t){return new Blob(mapArrayBufferViews(e),t||{})}function map(e,t,n){for(var i=new Array(e.length),o=_$after_1(e.length,n),r=function(e,n,o){t(n,function(t,n){i[e]=n,o(t,i)})},s=0;s<e.length;s++)r(s,e[s],o)}function Transport(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}function encode(e){var t="";do{t=alphabet[e%length]+t,e=Math.floor(e/length)}while(e>0);return t}function yeast(){var e=encode(+new Date);return e!==prev?(seed=0,prev=e):e+"."+encode(seed++)}function Polling(e){var t=e&&e.forceBase64;hasXHR2&&!t||(this.supportsBinary=!1),_$transport_19.call(this,e)}function empty(){}function XHR(e){if(_$Polling_23.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,"undefined"!=typeof location){var t="https:"===location.protocol,n=location.port;n||(n=t?443:80),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}}function Request(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function unloadHandler(){for(var e in Request.requests)Request.requests.hasOwnProperty(e)&&Request.requests[e].abort()}function __Socket_18(e,t){if(!(this instanceof __Socket_18))return new __Socket_18(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=_$parseuri_51(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=_$parseuri_51(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=_$parseqs_50.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function __Emitter_63(e){if(e)return function(e){for(var t in __Emitter_63.prototype)e[t]=__Emitter_63.prototype[t];return e}(e)}function __Socket_61(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}function Backoff(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}function Manager(e,t){if(!(this instanceof Manager))return new Manager(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new _$backo2_3({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||_$socketIoParser_68;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}function __Emitter_11(e){if(e)return function(e){for(var t in __Emitter_11.prototype)e[t]=__Emitter_11.prototype[t];return e}(e)}function ___extends_170(){return(___extends_170=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function isStatus(e,t){return statusOrder.indexOf(e)>=statusOrder.indexOf(t)}function validateParams(e){if(!e)throw new Error("Transloadit: The `params` option is required.");if("string"==typeof e)try{e=JSON.parse(e)}catch(e){throw e.message="Transloadit: The `params` option is a malformed JSON string: "+e.message,e}if(!e.auth||!e.auth.key)throw new Error("Transloadit: The `params.auth.key` option is required. You can find your Transloadit API key at https://transloadit.com/account/api-settings.")}function ___assertThisInitialized_172(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___extends_174(){return(___extends_174=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_174(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function defaultGetAssemblyOptions(e,t){return{params:t.params,signature:t.signature,fields:t.fields}}function getFormData(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{trim:!1};if(!e)throw new Error("A form is required by getFormData, was given form="+e);for(var n={},i=void 0,o=[],r={},s=0,a=e.elements.length;s<a;s++){var l=e.elements[s];IGNORED_ELEMENT_TYPES[l.type]||l.disabled||(i=l.name||l.id)&&!r[i]&&(o.push(i),r[i]=!0)}for(var c=0,u=o.length;c<u;c++){var d=getFieldData(e,i=o[c],t);null!=d&&(n[i]=d)}return n}function getFieldData(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{trim:!1};if(!e)throw new Error("A form is required by getFieldData, was given form="+e);if(!t&&"[object String]"!==__toString_37.call(t))throw new Error("A field name is required by getFieldData, was given fieldName="+t);var i=e.elements[t];if(!i||i.disabled)return null;if(!NODE_LIST_CLASSES[__toString_37.call(i)])return getFormElementValue(i,n.trim);for(var o=[],r=!0,s=0,a=i.length;s<a;s++)if(!i[s].disabled){r&&"radio"!==i[s].type&&(r=!1);var l=getFormElementValue(i[s],n.trim);null!=l&&(o=o.concat(l))}return r&&1===o.length?o[0]:o.length>0?o:null}function getFormElementValue(e,t){var n=null,i=e.type;if("select-one"===i)return e.options.length&&(n=e.options[e.selectedIndex].value),n;if("select-multiple"===i){n=[];for(var o=0,r=e.options.length;o<r;o++)e.options[o].selected&&n.push(e.options[o].value);return 0===n.length&&(n=null),n}return"file"===i&&"files"in e?(e.multiple?0===(n=__slice_37.call(e.files)).length&&(n=null):n=e.files[0],n):(CHECKED_INPUT_TYPES[i]?e.checked&&(n=e.value):n=t?e.value.replace(TRIM_RE,""):e.value,n)}function ___extends_128(){return(___extends_128=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_128(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___extends_130(){return(___extends_130=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function connect(e){var t=indexedDB.open(e,DB_VERSION);return new Promise(function(e,n){t.onupgradeneeded=function(t){var n=t.target.result,i=t.currentTarget.transaction;if(t.oldVersion<2&&n.createObjectStore(STORE_NAME,{keyPath:"id"}).createIndex("store","store",{unique:!1}),t.oldVersion<3){var o=i.objectStore(STORE_NAME);o.createIndex("expires","expires",{unique:!1}),o.openCursor().onsuccess=function(e){var t=e.target.result;if(t){var n=t.value;n.expires=Date.now()+DEFAULT_EXPIRY,t.update(n)}}}i.oncomplete=function(){e(n)}},t.onsuccess=function(t){e(t.target.result)},t.onerror=n})}function waitForRequest(e){return new Promise(function(t,n){e.onsuccess=function(e){t(e.target.result)},e.onerror=n})}function ___extends_131(){return(___extends_131=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function maybeParse(e){try{return JSON.parse(e)}catch(e){return null}}function ___extends_133(){return(___extends_133=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_133(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ___extends_157(){return(___extends_157=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function ___assertThisInitialized_157(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var define,module,exports,createModuleFactory=function(e){var t;return function(n){return t||e(t={exports:{},parent:n},t.exports),t.exports}},_$lib_58=createModuleFactory(function(e,t){function n(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r=_$url_62(e),s=r.source,a=r.id,l=r.path,c=o[a]&&l in o[a].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||c?(i("ignoring socket cache for %s",s),n=_$manager_59(s,t)):(o[a]||(i("new io instance for %s",s),o[a]=_$manager_59(s,t)),n=o[a]),r.query&&!t.query&&(t.query=r.query),n.socket(r.path,t)}var i=_$browser_64("socket.io-client");e.exports=t=n;var o=t.managers={};t.protocol=_$socketIoParser_68.protocol,t.connect=n,t.Manager=_$manager_59,t.Socket=_$socket_61}),_$empty_7=createModuleFactory(function(e,t){}),_$buffer_8=createModuleFactory(function(e,t){(function(e){"use strict";function n(t){if(t>M)throw new RangeError('The value "'+t+'" is invalid for option "size"');var n=new Uint8Array(t);return n.__proto__=e.prototype,n}function e(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return r(e)}return i(e,t,n)}function i(t,i,o){if("string"==typeof t)return function(t,i){if("string"==typeof i&&""!==i||(i="utf8"),!e.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var o=0|l(t,i),r=n(o),s=r.write(t,i);return s!==o&&(r=r.slice(0,s)),r}(t,i);if(ArrayBuffer.isView(t))return s(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($(t,ArrayBuffer)||t&&$(t.buffer,ArrayBuffer))return function(t,n,i){if(n<0||t.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<n+(i||0))throw new RangeError('"length" is outside of buffer bounds');var o;return(o=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i)).__proto__=e.prototype,o}(t,i,o);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return e.from(r,i,o);var c=function(t){if(e.isBuffer(t)){var i=0|a(t.length),o=n(i);return 0===o.length?o:(t.copy(o,0,0,i),o)}return void 0!==t.length?"number"!=typeof t.length||O(t.length)?n(0):s(t):"Buffer"===t.type&&Array.isArray(t.data)?s(t.data):void 0}(t);if(c)return c;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return e.from(t[Symbol.toPrimitive]("string"),i,o);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function r(e){return o(e),n(e<0?0:0|a(e))}function s(e){for(var t=e.length<0?0:0|a(e.length),i=n(t),o=0;o<t;o+=1)i[o]=255&e[o];return i}function a(e){if(e>=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return 0|e}function l(t,n){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var i=t.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===i)return 0;for(var r=!1;;)switch(n){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return A(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return D(t).length;default:if(r)return o?-1:A(t).length;n=(""+n).toLowerCase(),r=!0}}function c(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function u(t,n,i,o,r){if(0===t.length)return-1;if("string"==typeof i?(o=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),O(i=+i)&&(i=r?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(r)return-1;i=t.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof n&&(n=e.from(n,o)),e.isBuffer(n))return 0===n.length?-1:d(t,n,i,o,r);if("number"==typeof n)return n&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,n,i):Uint8Array.prototype.lastIndexOf.call(t,n,i):d(t,[n],i,o,r);throw new TypeError("val must be string, number or Buffer")}function d(e,t,n,i,o){function r(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var s,a=1,l=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,l/=2,c/=2,n/=2}if(o){var u=-1;for(s=n;s<l;s++)if(r(e,s)===r(t,-1===u?0:s-u)){if(-1===u&&(u=s),s-u+1===c)return u*a}else-1!==u&&(s-=s-u),u=-1}else for(n+c>l&&(n=l-c),s=n;s>=0;s--){for(var d=!0,h=0;h<c;h++)if(r(e,s+h)!==r(t,h)){d=!1;break}if(d)return s}return-1}function h(e,t,n,i){n=Number(n)||0;var o=e.length-n;i?(i=Number(i))>o&&(i=o):i=o;var r=t.length;i>r/2&&(i=r/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(2*s,2),16);if(O(a))return s;e[n+s]=a}return s}function p(e,t,n,i){return I(A(t,e.length-n),e,n,i)}function f(e,t,n,i){return I(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function g(e,t,n,i){return f(e,t,n,i)}function m(e,t,n,i){return I(D(t),e,n,i)}function v(e,t,n,i){return I(function(e,t){for(var n,i,o,r=[],s=0;s<e.length&&!((t-=2)<0);++s)i=(n=e.charCodeAt(s))>>8,o=n%256,r.push(o),r.push(i);return r}(t,e.length-n),e,n,i)}function _(e,t,n){return 0===t&&n===e.length?_$base64Js_5.fromByteArray(e):_$base64Js_5.fromByteArray(e.slice(t,n))}function y(e,t,n){n=Math.min(e.length,n);for(var i=[],o=t;o<n;){var r,s,a,l,c=e[o],u=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(r=e[o+1]))&&(l=(31&c)<<6|63&r)>127&&(u=l);break;case 3:r=e[o+1],s=e[o+2],128==(192&r)&&128==(192&s)&&(l=(15&c)<<12|(63&r)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:r=e[o+1],s=e[o+2],a=e[o+3],128==(192&r)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&r)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),o+=d}return function(e){var t=e.length;if(t<=F)return String.fromCharCode.apply(String,e);for(var n="",i=0;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=F));return n}(i)}function b(e,t,n){var i="";n=Math.min(e.length,n);for(var o=t;o<n;++o)i+=String.fromCharCode(127&e[o]);return i}function w(e,t,n){var i="";n=Math.min(e.length,n);for(var o=t;o<n;++o)i+=String.fromCharCode(e[o]);return i}function x(e,t,n){var i,o=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>o)&&(n=o);for(var r="",s=t;s<n;++s)r+=(i=e[s])<16?"0"+i.toString(16):i.toString(16);return r}function k(e,t,n){for(var i=e.slice(t,n),o="",r=0;r<i.length;r+=2)o+=String.fromCharCode(i[r]+256*i[r+1]);return o}function C(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function S(t,n,i,o,r,s){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>r||n<s)throw new RangeError('"value" argument is out of bounds');if(i+o>t.length)throw new RangeError("Index out of range")}function T(e,t,n,i,o,r){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function E(e,t,n,i,o){return t=+t,n>>>=0,o||T(e,0,n,4),_$ieee754_41.write(e,t,n,i,23,4),n+4}function P(e,t,n,i,o){return t=+t,n>>>=0,o||T(e,0,n,8),_$ieee754_41.write(e,t,n,i,52,8),n+8}function A(e,t){var n;t=t||1/0;for(var i=e.length,o=null,r=[],s=0;s<i;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&r.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;r.push(n)}else if(n<2048){if((t-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function D(e){return _$base64Js_5.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function I(e,t,n,i){for(var o=0;o<i&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function O(e){return e!=e}t.Buffer=e,t.INSPECT_MAX_BYTES=50;var M=2147483647;e.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),e.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192,e.from=function(e,t,n){return i(e,t,n)},e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array,e.alloc=function(e,t,i){return function(e,t,i){return o(e),e<=0?n(e):void 0!==t?"string"==typeof i?n(e).fill(t,i):n(e).fill(t):n(e)}(e,t,i)},e.allocUnsafe=function(e){return r(e)},e.allocUnsafeSlow=function(e){return r(e)},e.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==e.prototype},e.compare=function(t,n){if($(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),$(n,Uint8Array)&&(n=e.from(n,n.offset,n.byteLength)),!e.isBuffer(t)||!e.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===n)return 0;for(var i=t.length,o=n.length,r=0,s=Math.min(i,o);r<s;++r)if(t[r]!==n[r]){i=t[r],o=n[r];break}return i<o?-1:o<i?1:0},e.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,n){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return e.alloc(0);var i;if(void 0===n)for(n=0,i=0;i<t.length;++i)n+=t[i].length;var o=e.allocUnsafe(n),r=0;for(i=0;i<t.length;++i){var s=t[i];if($(s,Uint8Array)&&(s=e.from(s)),!e.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(o,r),r+=s.length}return o},e.byteLength=l,e.prototype._isBuffer=!0,e.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)c(this,t,t+1);return this},e.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)c(this,t,t+3),c(this,t+1,t+2);return this},e.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)c(this,t,t+7),c(this,t+1,t+6),c(this,t+2,t+5),c(this,t+3,t+4);return this},e.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?y(this,0,e):function(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return y(this,t,n);case"ascii":return b(this,t,n);case"latin1":case"binary":return w(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},e.prototype.compare=function(t,n,i,o,r){if($(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===n&&(n=0),void 0===i&&(i=t?t.length:0),void 0===o&&(o=0),void 0===r&&(r=this.length),n<0||i>t.length||o<0||r>this.length)throw new RangeError("out of range index");if(o>=r&&n>=i)return 0;if(o>=r)return-1;if(n>=i)return 1;if(this===t)return 0;for(var s=(r>>>=0)-(o>>>=0),a=(i>>>=0)-(n>>>=0),l=Math.min(s,a),c=this.slice(o,r),u=t.slice(n,i),d=0;d<l;++d)if(c[d]!==u[d]){s=c[d],a=u[d];break}return s<a?-1:a<s?1:0},e.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},e.prototype.indexOf=function(e,t,n){return u(this,e,t,n,!0)},e.prototype.lastIndexOf=function(e,t,n){return u(this,e,t,n,!1)},e.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var r=!1;;)switch(i){case"hex":return h(this,e,t,n);case"utf8":case"utf-8":return p(this,e,t,n);case"ascii":return f(this,e,t,n);case"latin1":case"binary":return g(this,e,t,n);case"base64":return m(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,e,t,n);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),r=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var F=4096;e.prototype.slice=function(t,n){var i=this.length;(t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(n=void 0===n?i:~~n)<0?(n+=i)<0&&(n=0):n>i&&(n=i),n<t&&(n=t);var o=this.subarray(t,n);return o.__proto__=e.prototype,o},e.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||C(e,t,this.length);for(var i=this[e],o=1,r=0;++r<t&&(o*=256);)i+=this[e+r]*o;return i},e.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||C(e,t,this.length);for(var i=this[e+--t],o=1;t>0&&(o*=256);)i+=this[e+--t]*o;return i},e.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},e.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},e.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},e.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},e.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},e.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||C(e,t,this.length);for(var i=this[e],o=1,r=0;++r<t&&(o*=256);)i+=this[e+r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},e.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||C(e,t,this.length);for(var i=t,o=1,r=this[e+--i];i>0&&(o*=256);)r+=this[e+--i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},e.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},e.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},e.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},e.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),_$ieee754_41.read(this,e,!0,23,4)},e.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),_$ieee754_41.read(this,e,!1,23,4)},e.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),_$ieee754_41.read(this,e,!0,52,8)},e.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),_$ieee754_41.read(this,e,!1,52,8)},e.prototype.writeUIntLE=function(e,t,n,i){e=+e,t>>>=0,n>>>=0,
i||S(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,r=0;for(this[t]=255&e;++r<n&&(o*=256);)this[t+r]=e/o&255;return t+n},e.prototype.writeUIntBE=function(e,t,n,i){e=+e,t>>>=0,n>>>=0,i||S(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,r=1;for(this[t+o]=255&e;--o>=0&&(r*=256);)this[t+o]=e/r&255;return t+n},e.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,1,255,0),this[t]=255&e,t+1},e.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},e.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},e.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},e.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},e.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t>>>=0,!i){var o=Math.pow(2,8*n-1);S(this,e,t,n,o-1,-o)}var r=0,s=1,a=0;for(this[t]=255&e;++r<n&&(s*=256);)e<0&&0===a&&0!==this[t+r-1]&&(a=1),this[t+r]=(e/s>>0)-a&255;return t+n},e.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t>>>=0,!i){var o=Math.pow(2,8*n-1);S(this,e,t,n,o-1,-o)}var r=n-1,s=1,a=0;for(this[t+r]=255&e;--r>=0&&(s*=256);)e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/s>>0)-a&255;return t+n},e.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},e.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},e.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},e.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},e.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},e.prototype.writeFloatLE=function(e,t,n){return E(this,e,t,!0,n)},e.prototype.writeFloatBE=function(e,t,n){return E(this,e,t,!1,n)},e.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},e.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},e.prototype.copy=function(t,n,i,o){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),o||0===o||(o=this.length),n>=t.length&&(n=t.length),n||(n=0),o>0&&o<i&&(o=i),o===i)return 0;if(0===t.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-n<o-i&&(o=t.length-n+i);var r=o-i;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(n,i,o);else if(this===t&&i<n&&n<o)for(var s=r-1;s>=0;--s)t[s+n]=this[s+i];else Uint8Array.prototype.set.call(t,this.subarray(i,o),n);return r},e.prototype.fill=function(t,n,i,o){if("string"==typeof t){if("string"==typeof n?(o=n,n=0,i=this.length):"string"==typeof i&&(o=i,i=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!e.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===t.length){var r=t.charCodeAt(0);("utf8"===o&&r<128||"latin1"===o)&&(t=r)}}else"number"==typeof t&&(t&=255);if(n<0||this.length<n||this.length<i)throw new RangeError("Out of range index");if(i<=n)return this;var s;if(n>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(s=n;s<i;++s)this[s]=t;else{var a=e.isBuffer(t)?t:e.from(t,o),l=a.length;if(0===l)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<i-n;++s)this[s+n]=a[s%l]}return this};var R=/[^+\/0-9A-Za-z-_]/g}).call(this,_$buffer_8({}).Buffer)}),_$browser_54={},cachedSetTimeout,cachedClearTimeout,process=_$browser_54={};!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;process.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(e){return[]},process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};var _$es6Promise_34={exports:{}};(function(e,t){!function(e,t){"object"==typeof _$es6Promise_34.exports?_$es6Promise_34.exports=t():"function"==typeof define&&define.amd?define(t):e.ES6Promise=t()}(this,function(){"use strict";function n(e){return"function"==typeof e}function i(){var e=setTimeout;return function(){return e(o,1)}}function o(){for(var e=0;e<k;e+=2)(0,$[e])($[e+1]),$[e]=void 0,$[e+1]=void 0;k=0}function r(e,t){var n=this,i=new this.constructor(a);void 0===i[M]&&v(i);var o=n._state;if(o){var r=arguments[o-1];T(function(){return m(o,i,r,n._result)})}else f(n,i,e,t);return i}function s(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(a);return u(t,e),t}function a(){}function l(e){try{return e.then}catch(e){return N.error=e,N}}function c(e,t,i){t.constructor===e.constructor&&i===r&&t.constructor.resolve===s?function(e,t){t._state===R?h(e,t._result):t._state===L?p(e,t._result):f(t,void 0,function(t){return u(e,t)},function(t){return p(e,t)})}(e,t):i===N?(p(e,N.error),N.error=null):void 0===i?h(e,t):n(i)?function(e,t,n){T(function(e){var i=!1,o=function(n,o,r,s){try{n.call(o,function(n){i||(i=!0,t!==n?u(e,n):h(e,n))},function(t){i||(i=!0,p(e,t))})}catch(e){return e}}(n,t,0,0,e._label);!i&&o&&(i=!0,p(e,o))},e)}(e,t,i):h(e,t)}function u(e,t){var n,i;e===t?p(e,new TypeError("You cannot resolve a promise with itself")):(i=typeof(n=t),null===n||"object"!==i&&"function"!==i?h(e,t):c(e,t,l(t)))}function d(e){e._onerror&&e._onerror(e._result),g(e)}function h(e,t){e._state===F&&(e._result=t,e._state=R,0!==e._subscribers.length&&T(g,e))}function p(e,t){e._state===F&&(e._state=L,e._result=t,T(d,e))}function f(e,t,n,i){var o=e._subscribers,r=o.length;e._onerror=null,o[r]=t,o[r+R]=n,o[r+L]=i,0===r&&e._state&&T(g,e)}function g(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var i=void 0,o=void 0,r=e._result,s=0;s<t.length;s+=3)i=t[s],o=t[s+n],i?m(n,i,o,r):o(r);e._subscribers.length=0}}function m(e,t,i,o){var r=n(i),s=void 0,a=void 0,l=void 0,c=void 0;if(r){if((s=function(e,t){try{return e(t)}catch(e){return N.error=e,N}}(i,o))===N?(c=!0,a=s.error,s.error=null):l=!0,t===s)return void p(t,new TypeError("A promises callback cannot return that same promise."))}else s=o,l=!0;t._state!==F||(r&&l?u(t,s):c?p(t,a):e===R?h(t,s):e===L&&p(t,s))}function v(e){e[M]=B++,e._state=void 0,e._result=void 0,e._subscribers=[]}var _,y,b,w,x=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},k=0,C=void 0,S=void 0,T=function(e,t){$[k]=e,$[k+1]=t,2===(k+=2)&&(S?S(o):O())},E="undefined"!=typeof window?window:void 0,P=E||{},A=P.MutationObserver||P.WebKitMutationObserver,D="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),I="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,$=new Array(1e3),O=void 0;D?O=function(){return e.nextTick(o)}:A?(y=0,b=new A(o),w=document.createTextNode(""),b.observe(w,{characterData:!0}),O=function(){w.data=y=++y%2}):I?((_=new MessageChannel).port1.onmessage=o,O=function(){return _.port2.postMessage(0)}):O=void 0===E?function(){try{var e=Function("return this")().require("vertx");return void 0!==(C=e.runOnLoop||e.runOnContext)?function(){C(o)}:i()}catch(e){return i()}}():i();var M=Math.random().toString(36).substring(2),F=void 0,R=1,L=2,N={error:null},B=0,U=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(a),this.promise[M]||v(this.promise),x(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?h(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&h(this.promise,this._result))):p(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===F&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,i=n.resolve;if(i===s){var o=l(e);if(o===r&&e._state!==F)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===j){var u=new n(a);c(u,e,o),this._willSettleAt(u,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(i(e),t)},e.prototype._settledAt=function(e,t,n){var i=this.promise;i._state===F&&(this._remaining--,e===L?p(i,n):this._result[t]=n),0===this._remaining&&h(i,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;f(e,void 0,function(e){return n._settledAt(R,t,e)},function(e){return n._settledAt(L,t,e)})},e}(),j=function(){function e(t){this[M]=B++,this._result=this._state=void 0,this._subscribers=[],a!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(e,t){try{t(function(t){u(e,t)},function(t){p(e,t)})}catch(t){p(e,t)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this.constructor;return n(e)?this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})}):this.then(e,e)},e}();return j.prototype.then=r,j.all=function(e){return new U(this,e).promise},j.race=function(e){var t=this;return x(e)?new t(function(n,i){for(var o=e.length,r=0;r<o;r++)t.resolve(e[r]).then(n,i)}):new t(function(e,t){return t(new TypeError("You must pass an array to race."))})},j.resolve=s,j.reject=function(e){var t=new this(a);return p(t,e),t},j._setScheduler=function(e){S=e},j._setAsap=function(e){T=e},j._asap=T,j.polyfill=function(){var e=void 0;if(void 0!==t)e=t;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;if(n){var i=null;try{i=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===i&&!n.cast)return}e.Promise=j},j.Promise=j,j})}).call(this,_$browser_54,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),_$es6Promise_34=_$es6Promise_34.exports;var _$auto_33=_$es6Promise_34.polyfill(),_$fetchUmd_77={exports:{}},__global_77,factory;__global_77=this,factory=function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function i(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return f.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function r(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function s(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function a(e){var t=new FileReader,n=s(t);return t.readAsArrayBuffer(e),n}function l(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function c(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:f.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:f.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():f.arrayBuffer&&f.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=l(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||m(e))?this._bodyArrayBuffer=l(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):f.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var e=r(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?r(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(a)}),this.text=function(){var e,t,n,i=r(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,n=s(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),i=0;i<t.length;i++)n[i]=String.fromCharCode(t[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},f.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(e,t){var n,i,r=(t=t||{}).body;if(e instanceof u){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=(i=(n=t.method||this.method||"GET").toUpperCase(),v.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(o))}}),t}function h(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}function p(t,n){return new Promise(function(i,r){function s(){l.abort()}var a=new u(t,n);if(a.signal&&a.signal.aborted)return r(new e.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;l.onload=function(){var e,t,n={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new o,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),i=n.shift().trim();if(i){var o=n.join(":").trim();t.append(i,o)}}),t)};n.url="responseURL"in l?l.responseURL:n.headers.get("X-Request-URL");var r="response"in l?l.response:l.responseText;i(new h(r,n))},l.onerror=function(){r(new TypeError("Network request failed"))},l.ontimeout=function(){r(new TypeError("Network request failed"))},l.onabort=function(){r(new e.DOMException("Aborted","AbortError"))},l.open(a.method,a.url,!0),"include"===a.credentials?l.withCredentials=!0:"omit"===a.credentials&&(l.withCredentials=!1),"responseType"in l&&f.blob&&(l.responseType="blob"),a.headers.forEach(function(e,t){l.setRequestHeader(t,e)}),a.signal&&(a.signal.addEventListener("abort",s),l.onreadystatechange=function(){4===l.readyState&&a.signal.removeEventListener("abort",s)}),l.send(void 0===a._bodyInit?null:a._bodyInit)})}var f={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(f.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=ArrayBuffer.isView||function(e){return e&&g.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,i){e=t(e),i=n(i);var o=this.map[e];this.map[e]=o?o+", "+i:i},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,i){this.map[t(e)]=n(i)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),i(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),i(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),i(e)},f.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];u.prototype.clone=function(){return new u(this,{body:this._bodyInit})},c.call(u.prototype),c.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""});return e.type="error",e};var _=[301,302,303,307,308];h.redirect=function(e,t){if(-1===_.indexOf(t))throw new RangeError("Invalid status code");return new h(null,{status:t,headers:{location:e}})},e.DOMException=self.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}p.polyfill=!0,self.fetch||(self.fetch=p,self.Headers=o,self.Request=u,self.Response=h),e.Headers=o,e.Request=u,e.Response=h,e.fetch=p,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof _$fetchUmd_77.exports?factory(_$fetchUmd_77.exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory(__global_77.WHATWGFetch={}),_$fetchUmd_77=_$fetchUmd_77.exports;var _$hasProperty_218=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},_$Translator_199=function(){function e(e){var t=this;this.locale={strings:{},pluralize:function(e){return 1===e?0:1}},Array.isArray(e)?e.forEach(function(e){return t._apply(e)}):this._apply(e)}var t=e.prototype;return t._apply=function(e){if(e&&e.strings){var t=this.locale;this.locale=_extends({},t,{strings:_extends({},t.strings,e.strings)}),this.locale.pluralize=e.pluralize||t.pluralize}},t.interpolate=function(e,t){function n(e,t,n){var i=[];return e.forEach(function(e){o.call(e,t).forEach(function(e,t,o){""!==e&&i.push(e),t<o.length-1&&i.push(n)})}),i}var i=String.prototype,o=i.split,r=i.replace,s=/\$/g,a=[e];for(var l in t)if("_"!==l&&_$hasProperty_218(t,l)){var c=t[l];"string"==typeof c&&(c=r.call(t[l],s,"$$$$")),a=n(a,new RegExp("%\\{"+l+"\\}","g"),c)}return a},t.translate=function(e,t){return this.translateArray(e,t).join("")},t.translateArray=function(e,t){if(t&&void 0!==t.smart_count){var n=this.locale.pluralize(t.smart_count);return this.interpolate(this.locale.strings[e][n],t)}return this.interpolate(this.locale.strings[e],t)},e}(),_$namespaceEmitter_49=function(){var e={},t=e._fns={};return e.emit=function(e,n,i,o,r,s,a){var l=function(e){for(var n=t[e]?t[e]:[],i=e.indexOf(":"),o=-1===i?[e]:[e.substring(0,i),e.substring(i+1)],r=Object.keys(t),s=0,a=r.length;s<a;s++){var l=r[s];if("*"===l&&(n=n.concat(t[l])),2===o.length&&o[0]===l){n=n.concat(t[l]);break}}return n}(e);l.length&&function(e,t,n){for(var i=0,o=t.length;i<o&&t[i];i++)t[i].event=e,t[i].apply(t[i],n)}(e,l,[n,i,o,r,s,a])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,function i(){n.apply(this,arguments),e.off(t,i)})},e.off=function(e,t){var n=[];if(e&&t)for(var i=this._fns[e],o=0,r=i?i.length:0;o<r;o++)i[o]!==t&&n.push(i[o]);n.length?this._fns[e]=n:delete this._fns[e]},e},_$pad_16=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},env="object"==typeof window?window:self,globalCount=Object.keys(env).length,clientId=_$pad_16(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+globalCount.toString(36),4),_$fingerprintBrowser_14=function(){return clientId},getRandomValue,crypto=window.crypto||window.msCrypto;if(crypto){var lim=Math.pow(2,32)-1;getRandomValue=function(){return Math.abs(crypto.getRandomValues(new Uint32Array(1))[0]/lim)}}else getRandomValue=Math.random;var _$getRandomValue_15=getRandomValue,_$cuid_13={},c=0,blockSize=4,base=36,discreteValues=Math.pow(base,blockSize);cuid.slug=function(){var e=(new Date).getTime().toString(36),t=safeCounter().toString(36).slice(-4),n=_$fingerprintBrowser_14().slice(0,1)+_$fingerprintBrowser_14().slice(-1),i=randomBlock().slice(-2);return e.slice(-2)+t+n+i},cuid.isCuid=function(e){return"string"==typeof e&&!!e.startsWith("c")},cuid.isSlug=function(e){if("string"!=typeof e)return!1;var t=e.length;return t>=7&&t<=10},cuid.fingerprint=_$fingerprintBrowser_14,_$cuid_13=cuid;var _$lodashThrottle_46={};(function(e){function t(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function n(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&f.call(e)==r}(e))return o;if(t(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=t(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var i=l.test(e);return i||c.test(e)?u(e.slice(2),i?2:8):a.test(e)?o:+e}var i="Expected a function",o=NaN,r="[object Symbol]",s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt,d="object"==typeof e&&e&&e.Object===Object&&e,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")(),f=Object.prototype.toString,g=Math.max,m=Math.min,v=function(){return p.Date.now()};_$lodashThrottle_46=function(e,o,r){var s=!0,a=!0;if("function"!=typeof e)throw new TypeError(i);return t(r)&&(s="leading"in r?!!r.leading:s,a="trailing"in r?!!r.trailing:a),function(e,o,r){function s(t){var n=d,i=h;return d=h=void 0,b=t,f=e.apply(i,n)}function a(e){var t=e-y;return void 0===y||t>=o||t<0||x&&e-b>=p}function l(){var e=v();if(a(e))return c(e);_=setTimeout(l,function(e){var t=o-(e-y);return x?m(t,p-(e-b)):t}(e))}function c(e){return _=void 0,k&&d?s(e):(d=h=void 0,f)}function u(){var e=v(),t=a(e);if(d=arguments,h=this,y=e,t){if(void 0===_)return function(e){return b=e,_=setTimeout(l,o),w?s(e):f}(y);if(x)return _=setTimeout(l,o),s(y)}return void 0===_&&(_=setTimeout(l,o)),f}var d,h,p,f,_,y,b=0,w=!1,x=!1,k=!0;if("function"!=typeof e)throw new TypeError(i);return o=n(o)||0,t(r)&&(w=!!r.leading,p=(x="maxWait"in r)?g(n(r.maxWait)||0,o):p,k="trailing"in r?!!r.trailing:k),u.cancel=function(){void 0!==_&&clearTimeout(_),b=0,d=y=h=_=void 0},u.flush=function(){return void 0===_?f:c(v())},u}(e,o,{leading:s,maxWait:o,trailing:a})}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var _$prettyBytes_225=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var i=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,i));var o=n[i];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o},_$wildcard_78={};WildcardMatcher.prototype.match=function(e){var t,n,i=!0,o=this.parts,r=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;i&&t<r;t++)"*"!==o[t]&&(i=t<n.length&&o[t]===n[t]);i=i&&n}else i=!1;else if("function"==typeof e.splice)for(i=[],t=e.length;t--;)this.match(e[t])&&(i[i.length]=e[t]);else if("object"==typeof e)for(var s in i={},e)this.match(s)&&(i[s]=e[s]);return i},_$wildcard_78=function(e,t,n){var i=new WildcardMatcher(e,n||/[\/\.]/);return void 0!==t?i.match(t):i};var reMimePartSplit=/[\/\+\.]/,_$mimeMatch_48=function(e,t){function n(t){var n=_$wildcard_78(t,e,reMimePartSplit);return n&&n.length>=2}return t?n(t.split(";")[0]):n},_$package_164={version:"1.2.0"},_$lib_163={},DefaultStore=function(){function e(){this.state={},this.callbacks=[]}var t=e.prototype;return t.getState=function(){return this.state},t.setState=function(e){var t=___extends_163({},this.state),n=___extends_163({},this.state,e);this.state=n,this._publish(t,n,e)},t.subscribe=function(e){var t=this;return this.callbacks.push(e),function(){t.callbacks.splice(t.callbacks.indexOf(e),1)}},t._publish=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach(function(e){e.apply(void 0,t)})},e}();DefaultStore.VERSION=_$package_164.version,_$lib_163=function(){return new DefaultStore};var _$getFileNameAndExtension_212=function(e){var t=/(?:\.([^.]+))?$/.exec(e)[1];return{name:e.replace("."+t,""),extension:t}},_$mimeTypes_224={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf"},_$getFileType_213=function(e){var t=e.name?_$getFileNameAndExtension_212(e.name).extension:null;return t=t?t.toLowerCase():null,e.type?e.type:t&&_$mimeTypes_224[t]?_$mimeTypes_224[t]:"application/octet-stream"},_$generateFileID_205=function(e){return["uppy",e.name?encodeFilename(e.name.toLowerCase()):"",e.type,e.meta&&e.meta.relativePath?encodeFilename(e.meta.relativePath.toLowerCase()):"",e.data.size,e.data.lastModified].filter(function(e){return e}).join("-")},_$supportsUploadProgress_95=function(e){if(null==e&&(e="undefined"!=typeof navigator?navigator.userAgent:null),!e)return!0;var t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;var n=t[1].split("."),i=n[0],o=n[1];return i=parseInt(i,10),o=parseInt(o,10),i<15||15===i&&o<15063||i>18||18===i&&o>=18218},_$getTimeStamp_217=function(){var e=new Date;return __pad_217(e.getHours().toString())+":"+__pad_217(e.getMinutes().toString())+":"+__pad_217(e.getSeconds().toString())},debugLogger={debug:function(){for(var e=console.debug||console.log,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e.call.apply(e,[console,"[Uppy] ["+_$getTimeStamp_217()+"]"].concat(n))},warn:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=console).warn.apply(e,["[Uppy] ["+_$getTimeStamp_217()+"]"].concat(n))},error:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=console).error.apply(e,["[Uppy] ["+_$getTimeStamp_217()+"]"].concat(n))}},_$loggers_94={nullLogger:{debug:function(){},warn:function(){},error:function(){}},debugLogger:debugLogger},_$preact_53={exports:{}};!function(){"use strict";function e(){}function t(t,n){var i,o,r,s,a=x;for(s=arguments.length;s-- >2;)w.push(arguments[s]);for(n&&null!=n.children&&(w.length||w.push(n.children),delete n.children);w.length;)if((o=w.pop())&&void 0!==o.pop)for(s=o.length;s--;)w.push(o[s]);else"boolean"==typeof o&&(o=null),(r="function"!=typeof t)&&(null==o?o="":"number"==typeof o?o=String(o):"string"!=typeof o&&(r=!1)),r&&i?a[a.length-1]+=o:a===x?a=[o]:a.push(o),i=r;var l=new e;return l.nodeName=t,l.children=a,l.attributes=null==n?void 0:n,l.key=null==n?void 0:n.key,void 0!==b.vnode&&b.vnode(l),l}function n(e,t){for(var n in t)e[n]=t[n];return e}function i(e){!e.__d&&(e.__d=!0)&&1==S.push(e)&&(b.debounceRendering||k)(o)}function o(){var e,t=S;for(S=[];e=t.pop();)e.__d&&v(e)}function r(e,t){return e.__n===t||e.nodeName.toLowerCase()===t.toLowerCase()}function s(e){var t=n({},e.attributes);t.children=e.children;var i=e.nodeName.defaultProps;if(void 0!==i)for(var o in i)void 0===t[o]&&(t[o]=i[o]);return t}function a(e){var t=e.parentNode;t&&t.removeChild(e)}function l(e,t,n,i,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),i&&i(e);else if("class"!==t||o)if("style"===t){if(i&&"string"!=typeof i&&"string"!=typeof n||(e.style.cssText=i||""),i&&"object"==typeof i){if("string"!=typeof n)for(var r in n)r in i||(e.style[r]="");for(var r in i)e.style[r]="number"==typeof i[r]&&!1===C.test(r)?i[r]+"px":i[r]}}else if("dangerouslySetInnerHTML"===t)i&&(e.innerHTML=i.__html||"");else if("o"==t[0]&&"n"==t[1]){var s=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),i?n||e.addEventListener(t,c,s):e.removeEventListener(t,c,s),(e.__l||(e.__l={}))[t]=i}else if("list"!==t&&"type"!==t&&!o&&t in e)!function(e,t,n){try{e[t]=n}catch(e){}}(e,t,null==i?"":i),null!=i&&!1!==i||e.removeAttribute(t);else{var a=o&&t!==(t=t.replace(/^xlink:?/,""));null==i||!1===i?a?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof i&&(a?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),i):e.setAttribute(t,i))}else e.className=i||""}function c(e){return this.__l[e.type](b.event&&b.event(e)||e)}function u(){
for(var e;e=T.pop();)b.afterMount&&b.afterMount(e),e.componentDidMount&&e.componentDidMount()}function d(e,t,n,i,o,c){E++||(P=null!=o&&void 0!==o.ownerSVGElement,A=null!=e&&!("__preactattr_"in e));var d=function e(t,n,i,o,c){var u=t,d=P;if(null!=n&&"boolean"!=typeof n||(n=""),"string"==typeof n||"number"==typeof n)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||c)?t.nodeValue!=n&&(t.nodeValue=n):(u=document.createTextNode(n),t&&(t.parentNode&&t.parentNode.replaceChild(u,t),h(t,!0))),u.__preactattr_=!0,u;var p,g,v=n.nodeName;if("function"==typeof v)return function(e,t,n,i){for(var o=e&&e._component,r=o,a=e,l=o&&e._componentConstructor===t.nodeName,c=l,u=s(t);o&&!c&&(o=o.__u);)c=o.constructor===t.nodeName;return o&&c&&(!i||o._component)?(m(o,u,3,n,i),e=o.base):(r&&!l&&(_(r),e=a=null),o=f(t.nodeName,u,n),e&&!o.__b&&(o.__b=e,a=null),m(o,u,1,n,i),e=o.base,a&&e!==a&&(a._component=null,h(a,!1))),e}(t,n,i,o);if(P="svg"===v||"foreignObject"!==v&&P,v=String(v),(!t||!r(t,v))&&(p=v,(g=P?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p)).__n=p,u=g,t)){for(;t.firstChild;)u.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(u,t),h(t,!0)}var y=u.firstChild,b=u.__preactattr_,w=n.children;if(null==b){b=u.__preactattr_={};for(var x=u.attributes,k=x.length;k--;)b[x[k].name]=x[k].value}return!A&&w&&1===w.length&&"string"==typeof w[0]&&null!=y&&void 0!==y.splitText&&null==y.nextSibling?y.nodeValue!=w[0]&&(y.nodeValue=w[0]):(w&&w.length||null!=y)&&function(t,n,i,o,s){var l,c,u,d,p,f,g,m,v=t.childNodes,_=[],y={},b=0,w=0,x=v.length,k=0,C=n?n.length:0;if(0!==x)for(var S=0;S<x;S++){var T=v[S],E=T.__preactattr_,P=C&&E?T._component?T._component.__k:E.key:null;null!=P?(b++,y[P]=T):(E||(void 0!==T.splitText?!s||T.nodeValue.trim():s))&&(_[k++]=T)}if(0!==C)for(S=0;S<C;S++){d=n[S],p=null;P=d.key;if(null!=P)b&&void 0!==y[P]&&(p=y[P],y[P]=void 0,b--);else if(!p&&w<k)for(l=w;l<k;l++)if(void 0!==_[l]&&(f=c=_[l],m=s,"string"==typeof(g=d)||"number"==typeof g?void 0!==f.splitText:"string"==typeof g.nodeName?!f._componentConstructor&&r(f,g.nodeName):m||f._componentConstructor===g.nodeName)){p=c,_[l]=void 0,l===k-1&&k--,l===w&&w++;break}p=e(p,d,i,o),u=v[S],p&&p!==t&&p!==u&&(null==u?t.appendChild(p):p===u.nextSibling?a(u):t.insertBefore(p,u))}if(b)for(var S in y)void 0!==y[S]&&h(y[S],!1);for(;w<=k;)void 0!==(p=_[k--])&&h(p,!1)}(u,w,i,o,A||null!=b.dangerouslySetInnerHTML),function(e,t,n){var i;for(i in n)t&&null!=t[i]||null==n[i]||l(e,i,n[i],n[i]=void 0,P);for(i in t)"children"===i||"innerHTML"===i||i in n&&t[i]===("value"===i||"checked"===i?e[i]:n[i])||l(e,i,n[i],n[i]=t[i],P)}(u,n.attributes,b),P=d,u}(e,t,n,i,c);return o&&d.parentNode!==o&&o.appendChild(d),--E||(A=!1,c||u()),d}function h(e,t){var n=e._component;n?_(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||a(e),p(e))}function p(e){for(e=e.lastChild;e;){var t=e.previousSibling;h(e,!0),e=t}}function f(e,t,n){var i,o=D[e.name];if(e.prototype&&e.prototype.render?(i=new e(t,n),y.call(i,t,n)):((i=new y(t,n)).constructor=e,i.render=g),o)for(var r=o.length;r--;)if(o[r].constructor===e){i.__b=o[r].__b,o.splice(r,1);break}return i}function g(e,t,n){return this.constructor(e,n)}function m(e,t,n,o,r){e.__x||(e.__x=!0,(e.__r=t.ref)&&delete t.ref,(e.__k=t.key)&&delete t.key,!e.base||r?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,o),o&&o!==e.context&&(e.__c||(e.__c=e.context),e.context=o),e.__p||(e.__p=e.props),e.props=t,e.__x=!1,0!==n&&(1!==n&&!1===b.syncComponentUpdates&&e.base?i(e):v(e,1,r)),e.__r&&e.__r(e))}function v(e,t,i,o){if(!e.__x){var r,a,l,c=e.props,p=e.state,g=e.context,y=e.__p||c,w=e.__s||p,x=e.__c||g,k=e.base,C=e.__b,S=k||C,P=e._component,A=!1;if(k&&(e.props=y,e.state=w,e.context=x,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(c,p,g)?A=!0:e.componentWillUpdate&&e.componentWillUpdate(c,p,g),e.props=c,e.state=p,e.context=g),e.__p=e.__s=e.__c=e.__b=null,e.__d=!1,!A){r=e.render(c,p,g),e.getChildContext&&(g=n(n({},g),e.getChildContext()));var D,I,$=r&&r.nodeName;if("function"==typeof $){var O=s(r);(a=P)&&a.constructor===$&&O.key==a.__k?m(a,O,1,g,!1):(D=a,e._component=a=f($,O,g),a.__b=a.__b||C,a.__u=e,m(a,O,0,g,!1),v(a,1,i,!0)),I=a.base}else l=S,(D=P)&&(l=e._component=null),(S||1===t)&&(l&&(l._component=null),I=d(l,r,g,i||!k,S&&S.parentNode,!0));if(S&&I!==S&&a!==P){var M=S.parentNode;M&&I!==M&&(M.replaceChild(I,S),D||(S._component=null,h(S,!1)))}if(D&&_(D),e.base=I,I&&!o){for(var F=e,R=e;R=R.__u;)(F=R).base=I;I._component=F,I._componentConstructor=F.constructor}}if(!k||i?T.unshift(e):A||(e.componentDidUpdate&&e.componentDidUpdate(y,w,x),b.afterUpdate&&b.afterUpdate(e)),null!=e.__h)for(;e.__h.length;)e.__h.pop().call(e);E||o||u()}}function _(e){b.beforeUnmount&&b.beforeUnmount(e);var t=e.base;e.__x=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?_(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.__b=t,a(t),function(e){var t=e.constructor.name;(D[t]||(D[t]=[])).push(e)}(e),p(t)),e.__r&&e.__r(null)}function y(e,t){this.__d=!0,this.context=t,this.props=e,this.state=this.state||{}}var b={},w=[],x=[],k="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,C=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,S=[],T=[],E=0,P=!1,A=!1,D={};n(y.prototype,{setState:function(e,t){var o=this.state;this.__s||(this.__s=n({},o)),n(o,"function"==typeof e?e(o,this.props):e),t&&(this.__h=this.__h||[]).push(t),i(this)},forceUpdate:function(e){e&&(this.__h=this.__h||[]).push(e),v(this,2)},render:function(){}});var I={h:t,createElement:t,cloneElement:function(e,i){return t(e.nodeName,n(n({},e.attributes),i),arguments.length>2?[].slice.call(arguments,2):e.children)},Component:y,render:function(e,t,n){return d(n,e,{},!1,t,!1)},rerender:o,options:b};_$preact_53.exports=I}(),_$preact_53=_$preact_53.exports;var _$isDOMElement_219=function(e){return e&&"object"==typeof e&&e.nodeType===Node.ELEMENT_NODE},_$findDOMElement_204=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):"object"==typeof e&&_$isDOMElement_219(e)?e:void 0},_$Plugin_92=function(){function e(e,t){this.uppy=e,this.opts=t||{},this.update=this.update.bind(this),this.mount=this.mount.bind(this),this.install=this.install.bind(this),this.uninstall=this.uninstall.bind(this)}var t=e.prototype;return t.getPluginState=function(){return this.uppy.getState().plugins[this.id]||{}},t.setPluginState=function(e){var t,n=this.uppy.getState().plugins;this.uppy.setState({plugins:___extends_92({},n,(t={},t[this.id]=___extends_92({},n[this.id],{},e),t))})},t.setOptions=function(e){this.opts=___extends_92({},this.opts,{},e),this.setPluginState()},t.update=function(e){void 0!==this.el&&this._updateUI&&this._updateUI(e)},t.afterUpdate=function(){},t.onMount=function(){},t.mount=function(t,n){var i,o,r,s,a=this,l=n.id,c=_$findDOMElement_204(t);if(c)return this.isTargetDOMEl=!0,this.rerender=function(e){a.uppy.getPlugin(a.id)&&(a.el=_$preact_53.render(a.render(e),c,a.el),a.afterUpdate())},this._updateUI=(i=this.rerender,o=null,r=null,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r=t,o||(o=Promise.resolve().then(function(){return o=null,i.apply(void 0,r)})),o}),this.uppy.log("Installing "+l+" to a DOM element '"+t+"'"),this.opts.replaceTargetContent&&(c.innerHTML=""),this.el=_$preact_53.render(this.render(this.uppy.getState()),c),this.onMount(),this.el;if("object"==typeof t&&t instanceof e)s=t;else if("function"==typeof t){var u=t;this.uppy.iteratePlugins(function(e){if(e instanceof u)return s=e,!1})}if(s)return this.uppy.log("Installing "+l+" to "+s.id),this.parent=s,this.el=s.addTarget(n),this.onMount(),this.el;throw this.uppy.log("Not installing "+l),new Error("Invalid target option given to "+l+". Please make sure that the element\n      exists on the page, or that the plugin you are targeting has been installed. Check that the <script> tag initializing Uppy\n      comes at the bottom of the page, before the closing </body> tag (see https://github.com/transloadit/uppy/issues/1042).")},t.render=function(e){throw new Error("Extend the render method to add your plugin to a DOM element")},t.addTarget=function(e){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")},t.unmount=function(){this.isTargetDOMEl&&this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},t.install=function(){},t.uninstall=function(){this.unmount()},e}(),_$package_96={version:"1.6.0"},_$lib_93={},nullLogger=_$loggers_94.nullLogger,__debugLogger_93=_$loggers_94.debugLogger,RestrictionError=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(t=e.call.apply(e,[this].concat(i))||this).isRestriction=!0,t}var n,i;return i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i,t}(_wrapNativeSuper(Error)),Uppy=function(){function e(e){var t=this;this.defaultLocale={strings:{youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files",2:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files",2:"You have to select at least %{smart_count} files"},exceedsSize:"This file exceeds maximum allowed size of",youCanOnlyUploadFileTypes:"You can only upload: %{types}",companionError:"Connection with Companion failed",companionAuthError:"Authorization required",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}",2:"Select %{smart_count}"},selectAllFilesFromFolderNamed:"Select all files from folder %{name}",unselectAllFilesFromFolderNamed:"Unselect all files from folder %{name}",selectFileNamed:"Select file %{name}",unselectFileNamed:"Unselect file %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",emptyFolderAdded:"No files were added from empty folder",folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}",2:"Added %{smart_count} files from %{folder}"}}};var n={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,debug:!1,restrictions:{maxFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null},meta:{},onBeforeFileAdded:function(e,t){return e},onBeforeUpload:function(e){return e},store:_$lib_163(),logger:nullLogger};if(this.opts=___extends_93({},n,{},e,{restrictions:___extends_93({},n.restrictions,{},e&&e.restrictions)}),e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=__debugLogger_93),this.log("Using Core v"+this.constructor.VERSION),this.opts.restrictions.allowedFileTypes&&null!==this.opts.restrictions.allowedFileTypes&&!Array.isArray(this.opts.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");this.i18nInit(),this.plugins={},this.getState=this.getState.bind(this),this.getPlugin=this.getPlugin.bind(this),this.setFileMeta=this.setFileMeta.bind(this),this.setFileState=this.setFileState.bind(this),this.log=this.log.bind(this),this.info=this.info.bind(this),this.hideInfo=this.hideInfo.bind(this),this.addFile=this.addFile.bind(this),this.removeFile=this.removeFile.bind(this),this.pauseResume=this.pauseResume.bind(this),this._calculateProgress=_$lodashThrottle_46(this._calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.updateOnlineStatus=this.updateOnlineStatus.bind(this),this.resetProgress=this.resetProgress.bind(this),this.pauseAll=this.pauseAll.bind(this),this.resumeAll=this.resumeAll.bind(this),this.retryAll=this.retryAll.bind(this),this.cancelAll=this.cancelAll.bind(this),this.retryUpload=this.retryUpload.bind(this),this.upload=this.upload.bind(this),this.emitter=_$namespaceEmitter_49(),this.on=this.on.bind(this),this.off=this.off.bind(this),this.once=this.emitter.once.bind(this.emitter),this.emit=this.emitter.emit.bind(this.emitter),this.preProcessors=[],this.uploaders=[],this.postProcessors=[],this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:_$supportsUploadProgress_95(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:___extends_93({},this.opts.meta),info:{isHidden:!0,type:"info",message:""}}),this._storeUnsubscribe=this.store.subscribe(function(e,n,i){t.emit("state-update",e,n,i),t.updateAll(n)}),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),this._addListeners()}var t,n,i=e.prototype;return i.on=function(e,t){return this.emitter.on(e,t),this},i.off=function(e,t){return this.emitter.off(e,t),this},i.updateAll=function(e){this.iteratePlugins(function(t){t.update(e)})},i.setState=function(e){this.store.setState(e)},i.getState=function(){return this.store.getState()},i.setFileState=function(e,t){var n;if(!this.getState().files[e])throw new Error("Can’t set state for "+e+" (the file could have been removed)");this.setState({files:___extends_93({},this.getState().files,(n={},n[e]=___extends_93({},this.getState().files[e],t),n))})},i.i18nInit=function(){this.translator=new _$Translator_199([this.defaultLocale,this.opts.locale]),this.locale=this.translator.locale,this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator)},i.setOptions=function(e){this.opts=___extends_93({},this.opts,{},e,{restrictions:___extends_93({},this.opts.restrictions,{},e&&e.restrictions)}),e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(function(e){e.setOptions()}),this.setState()},i.resetProgress=function(){var e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t=___extends_93({},this.getState().files),n={};Object.keys(t).forEach(function(i){var o=___extends_93({},t[i]);o.progress=___extends_93({},o.progress,e),n[i]=o}),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")},i.addPreProcessor=function(e){this.preProcessors.push(e)},i.removePreProcessor=function(e){var t=this.preProcessors.indexOf(e);-1!==t&&this.preProcessors.splice(t,1)},i.addPostProcessor=function(e){this.postProcessors.push(e)},i.removePostProcessor=function(e){var t=this.postProcessors.indexOf(e);-1!==t&&this.postProcessors.splice(t,1)},i.addUploader=function(e){this.uploaders.push(e)},i.removeUploader=function(e){var t=this.uploaders.indexOf(e);-1!==t&&this.uploaders.splice(t,1)},i.setMeta=function(e){var t=___extends_93({},this.getState().meta,e),n=___extends_93({},this.getState().files);Object.keys(n).forEach(function(t){n[t]=___extends_93({},n[t],{meta:___extends_93({},n[t].meta,e)})}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})},i.setFileMeta=function(e,t){var n=___extends_93({},this.getState().files);if(n[e]){var i=___extends_93({},n[e].meta,t);n[e]=___extends_93({},n[e],{meta:i}),this.setState({files:n})}else this.log("Was trying to set metadata for a file that has been removed: ",e)},i.getFile=function(e){return this.getState().files[e]},i.getFiles=function(){var e=this.getState().files;return Object.keys(e).map(function(t){return e[t]})},i._checkMinNumberOfFiles=function(e){var t=this.opts.restrictions.minNumberOfFiles;if(Object.keys(e).length<t)throw new RestrictionError(""+this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))},i._checkRestrictions=function(e){var t=this.opts.restrictions,n=t.maxFileSize,i=t.maxNumberOfFiles,o=t.allowedFileTypes;if(i&&Object.keys(this.getState().files).length+1>i)throw new RestrictionError(""+this.i18n("youCanOnlyUploadX",{smart_count:i}));if(o&&!o.some(function(t){return t.indexOf("/")>-1?!!e.type&&_$mimeMatch_48(e.type,t):"."===t[0]&&e.extension.toLowerCase()===t.substr(1).toLowerCase()})){var r=o.join(", ");throw new RestrictionError(this.i18n("youCanOnlyUploadFileTypes",{types:r}))}if(n&&null!=e.data.size&&e.data.size>n)throw new RestrictionError(this.i18n("exceedsSize")+" "+_$prettyBytes_225(n))},i._showOrLogErrorAndThrow=function(e,t){var n=void 0===t?{}:t,i=n.showInformer,o=void 0===i||i,r=n.file,s=void 0===r?null:r,a="object"==typeof e?e.message:e,l="object"==typeof e&&e.details?e.details:"";throw e.isRestriction?(this.log(a+" "+l),this.emit("restriction-failed",s,e)):this.log(a+" "+l,"error"),o&&this.info({message:a,details:l},"error",5e3),"object"==typeof e?e:new Error(e)},i.addFile=function(e){var t,n=this,i=this.getState(),o=i.files;!1===i.allowNewUpload&&this._showOrLogErrorAndThrow(new RestrictionError("Cannot add new files: already uploading."),{file:e});var r=_$getFileType_213(e);e.type=r;var s,a=this.opts.onBeforeFileAdded(e,o);!1===a&&this._showOrLogErrorAndThrow(new RestrictionError("Cannot add the file because onBeforeFileAdded returned false."),{showInformer:!1,file:e}),"object"==typeof a&&a&&(e=a),s=e.name?e.name:"image"===r.split("/")[0]?r.split("/")[0]+"."+r.split("/")[1]:"noname";var l=_$getFileNameAndExtension_212(s).extension,c=e.isRemote||!1,u=_$generateFileID_205(e);o[u]&&this._showOrLogErrorAndThrow(new RestrictionError("Cannot add the duplicate file '"+s+"', it already exists."),{file:e});var d=e.meta||{};d.name=s,d.type=r;var h=isFinite(e.data.size)?e.data.size:null,p={source:e.source||"",id:u,name:s,extension:l||"",meta:___extends_93({},this.getState().meta,d),type:r,data:e.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:h,uploadComplete:!1,uploadStarted:null},size:h,isRemote:c,remote:e.remote||"",preview:e.preview};try{this._checkRestrictions(p)}catch(e){this._showOrLogErrorAndThrow(e,{file:p})}return this.setState({files:___extends_93({},o,(t={},t[u]=p,t))}),this.emit("file-added",p),this.log("Added file: "+s+", "+u+", mime type: "+r),this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(function(){n.scheduledAutoProceed=null,n.upload().catch(function(e){e.isRestriction||n.log(e.stack||e.message||e)})},4)),u},i.removeFile=function(e){var t=this,n=this.getState(),i=n.files,o=n.currentUploads,r=___extends_93({},i),s=r[e];delete r[e];var a=___extends_93({},o),l=[];Object.keys(a).forEach(function(t){var n=o[t].fileIDs.filter(function(t){return t!==e});0!==n.length?a[t]=___extends_93({},o[t],{fileIDs:n}):l.push(t)}),this.setState(___extends_93({currentUploads:a,files:r},0===Object.keys(r).length&&{allowNewUpload:!0})),l.forEach(function(e){t._removeUpload(e)}),this._calculateTotalProgress(),this.emit("file-removed",s),this.log("File removed: "+s.id)},i.pauseResume=function(e){if(this.getState().capabilities.resumableUploads&&!this.getFile(e).uploadComplete){var t=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}},i.pauseAll=function(){var e=___extends_93({},this.getState().files);Object.keys(e).filter(function(t){return!e[t].progress.uploadComplete&&e[t].progress.uploadStarted}).forEach(function(t){var n=___extends_93({},e[t],{isPaused:!0});e[t]=n}),this.setState({files:e}),this.emit("pause-all")},i.resumeAll=function(){var e=___extends_93({},this.getState().files);Object.keys(e).filter(function(t){return!e[t].progress.uploadComplete&&e[t].progress.uploadStarted}).forEach(function(t){var n=___extends_93({},e[t],{isPaused:!1,error:null});e[t]=n}),this.setState({files:e}),this.emit("resume-all")},i.retryAll=function(){var e=___extends_93({},this.getState().files),t=Object.keys(e).filter(function(t){return e[t].error});t.forEach(function(t){var n=___extends_93({},e[t],{isPaused:!1,error:null});e[t]=n}),this.setState({files:e,error:null}),this.emit("retry-all",t);var n=this._createUpload(t);return this._runUpload(n)},i.cancelAll=function(){var e=this;this.emit("cancel-all"),Object.keys(this.getState().files).forEach(function(t){e.removeFile(t)}),this.setState({totalProgress:0,error:null})},i.retryUpload=function(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);var t=this._createUpload([e]);return this._runUpload(t)},i.reset=function(){this.cancelAll()},i._calculateProgress=function(e,t){if(this.getFile(e.id)){var n=isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:___extends_93({},this.getFile(e.id).progress,{bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0})}),this._calculateTotalProgress()}else this.log("Not setting progress for a file that has been removed: "+e.id)},i._calculateTotalProgress=function(){var e=this.getFiles().filter(function(e){return e.progress.uploadStarted});if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});var t=e.filter(function(e){return null!=e.progress.bytesTotal}),n=e.filter(function(e){return null==e.progress.bytesTotal});if(0!==t.length){var i=t.reduce(function(e,t){return e+t.progress.bytesTotal},0),o=i/t.length;i+=o*n.length;var r=0;t.forEach(function(e){r+=e.progress.bytesUploaded}),n.forEach(function(e){r+=o*(e.progress.percentage||0)/100});var s=0===i?0:Math.round(r/i*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}else{var a=100*e.length,l=n.reduce(function(e,t){return e+t.progress.percentage},0),c=Math.round(l/a*100);this.setState({totalProgress:c})}},i._addListeners=function(){var e=this;this.on("error",function(t){e.setState({error:t.message||"Unknown error"})}),this.on("upload-error",function(t,n,i){e.setFileState(t.id,{error:n.message||"Unknown error",response:i}),e.setState({error:n.message});var o=e.i18n("failedToUpload",{file:t.name});"object"==typeof n&&n.message&&(o={message:o,details:n.message}),e.info(o,"error",5e3)}),this.on("upload",function(){e.setState({error:null})}),this.on("upload-started",function(t,n){e.getFile(t.id)?e.setFileState(t.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:t.size}}):e.log("Not setting progress for a file that has been removed: "+t.id)}),this.on("upload-progress",this._calculateProgress),this.on("upload-success",function(t,n){if(e.getFile(t.id)){var i=e.getFile(t.id).progress;e.setFileState(t.id,{progress:___extends_93({},i,{uploadComplete:!0,percentage:100,bytesUploaded:i.bytesTotal}),response:n,uploadURL:n.uploadURL,isPaused:!1}),e._calculateTotalProgress()}else e.log("Not setting progress for a file that has been removed: "+t.id)}),this.on("preprocess-progress",function(t,n){e.getFile(t.id)?e.setFileState(t.id,{progress:___extends_93({},e.getFile(t.id).progress,{preprocess:n})}):e.log("Not setting progress for a file that has been removed: "+t.id)}),this.on("preprocess-complete",function(t){if(e.getFile(t.id)){var n=___extends_93({},e.getState().files);n[t.id]=___extends_93({},n[t.id],{progress:___extends_93({},n[t.id].progress)}),delete n[t.id].progress.preprocess,e.setState({files:n})}else e.log("Not setting progress for a file that has been removed: "+t.id)}),this.on("postprocess-progress",function(t,n){e.getFile(t.id)?e.setFileState(t.id,{progress:___extends_93({},e.getState().files[t.id].progress,{postprocess:n})}):e.log("Not setting progress for a file that has been removed: "+t.id)}),this.on("postprocess-complete",function(t){if(e.getFile(t.id)){var n=___extends_93({},e.getState().files);n[t.id]=___extends_93({},n[t.id],{progress:___extends_93({},n[t.id].progress)}),delete n[t.id].progress.postprocess,e.setState({files:n})}else e.log("Not setting progress for a file that has been removed: "+t.id)}),this.on("restored",function(){e._calculateTotalProgress()}),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",function(){return e.updateOnlineStatus()}),window.addEventListener("offline",function(){return e.updateOnlineStatus()}),setTimeout(function(){return e.updateOnlineStatus()},3e3))},i.updateOnlineStatus=function(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)},i.getID=function(){return this.opts.id},i.use=function(e,t){if("function"!=typeof e)throw new TypeError("Expected a plugin class, but got "+(null===e?"null":typeof e)+". Please verify that the plugin was imported and spelled correctly.");var n=new e(this,t),i=n.id;if(this.plugins[n.type]=this.plugins[n.type]||[],!i)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");var o=this.getPlugin(i);if(o){var r="Already found a plugin named '"+o.id+"'. Tried to use: '"+i+"'.\nUppy plugins must have unique `id` options. See https://uppy.io/docs/plugins/#id.";throw new Error(r)}return e.VERSION&&this.log("Using "+i+" v"+e.VERSION),this.plugins[n.type].push(n),n.install(),this},i.getPlugin=function(e){var t=null;return this.iteratePlugins(function(n){if(n.id===e)return t=n,!1}),t},i.iteratePlugins=function(e){var t=this;Object.keys(this.plugins).forEach(function(n){t.plugins[n].forEach(e)})},i.removePlugin=function(e){this.log("Removing plugin "+e.id),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();var t=this.plugins[e.type].slice(),n=t.indexOf(e);-1!==n&&(t.splice(n,1),this.plugins[e.type]=t);var i=this.getState();delete i.plugins[e.id],this.setState(i)},i.close=function(){var e=this;this.log("Closing Uppy instance "+this.opts.id+": removing all files and uninstalling plugins"),this.reset(),this._storeUnsubscribe(),this.iteratePlugins(function(t){e.removePlugin(t)})},i.info=function(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);var i="object"==typeof e;this.setState({info:{isHidden:!1,type:t,message:i?e.message:e,details:i?e.details:null}}),this.emit("info-visible"),clearTimeout(this.infoTimeoutID),this.infoTimeoutID=0!==n?setTimeout(this.hideInfo,n):void 0},i.hideInfo=function(){var e=___extends_93({},this.getState().info,{isHidden:!0});this.setState({info:e}),this.emit("info-hidden")},i.log=function(e,t){var n=this.opts.logger;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}},i.run=function(){return this.log("Calling run() is no longer necessary.","warning"),this},i.restore=function(e){return this.log('Core: attempting to restore upload "'+e+'"'),this.getState().currentUploads[e]?this._runUpload(e):(this._removeUpload(e),Promise.reject(new Error("Nonexistent upload")))},i._createUpload=function(e){var t,n=this.getState(),i=n.allowNewUpload,o=n.currentUploads;if(!i)throw new Error("Cannot create a new upload: already uploading.");var r=_$cuid_13();return this.emit("upload",{id:r,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploads,currentUploads:___extends_93({},o,(t={},t[r]={fileIDs:e,step:0,result:{}},t))}),r},i._getUpload=function(e){return this.getState().currentUploads[e]},i.addResultData=function(e,t){var n;if(this._getUpload(e)){var i=this.getState().currentUploads,o=___extends_93({},i[e],{result:___extends_93({},i[e].result,t)});this.setState({currentUploads:___extends_93({},i,(n={},n[e]=o,n))})}else this.log("Not setting result for an upload that has been removed: "+e)},i._removeUpload=function(e){var t=___extends_93({},this.getState().currentUploads);delete t[e],this.setState({currentUploads:t})},i._runUpload=function(e){var t=this,n=this.getState().currentUploads[e].step,i=[].concat(this.preProcessors,this.uploaders,this.postProcessors),o=Promise.resolve();return i.forEach(function(i,r){r<n||(o=o.then(function(){var n,o=t.getState().currentUploads,s=o[e];if(s){var a=___extends_93({},s,{step:r});return t.setState({currentUploads:___extends_93({},o,(n={},n[e]=a,n))}),i(a.fileIDs,e)}}).then(function(e){return null}))}),o.catch(function(n){t.emit("error",n,e),t._removeUpload(e)}),o.then(function(){var n=t.getState().currentUploads[e];if(n){var i=n.fileIDs.map(function(e){return t.getFile(e)}),o=i.filter(function(e){return!e.error}),r=i.filter(function(e){return e.error});t.addResultData(e,{successful:o,failed:r,uploadID:e})}}).then(function(){var n=t.getState().currentUploads;if(n[e]){var i=n[e].result;return t.emit("complete",i),t._removeUpload(e),i}}).then(function(n){return null==n&&t.log("Not setting result for an upload that has been removed: "+e),n})},i.upload=function(){var e=this;this.plugins.uploader||this.log("No uploader type plugins are used","warning");var t=this.getState().files,n=this.opts.onBeforeUpload(t);return!1===n?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&"object"==typeof n&&(t=n),Promise.resolve().then(function(){return e._checkMinNumberOfFiles(t)}).then(function(){var n=e.getState().currentUploads,i=Object.keys(n).reduce(function(e,t){return e.concat(n[t].fileIDs)},[]),o=[];Object.keys(t).forEach(function(t){var n=e.getFile(t);n.progress.uploadStarted||-1!==i.indexOf(t)||o.push(n.id)});var r=e._createUpload(o);return e._runUpload(r)}).catch(function(t){e._showOrLogErrorAndThrow(t)}))},t=e,(n=[{key:"state",get:function(){return this.getState()}}])&&_defineProperties(t.prototype,n),e}();Uppy.VERSION=_$package_96.version,_$lib_93=function(e){return new Uppy(e)},_$lib_93.Uppy=Uppy,_$lib_93.Plugin=_$Plugin_92,_$lib_93.debugLogger=__debugLogger_93;var AuthError=function(e){function t(){var t;return(t=e.call(this,"Authorization required")||this).name="AuthError",t.isAuthError=!0,t}var n,i;return i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i,t}(___wrapNativeSuper_85(Error)),_$AuthError_85=AuthError,_$package_91={version:"1.4.1"},_class,_temp,_$RequestClient_87=(_temp=_class=function(){function e(e,t){this.uppy=e,this.opts=t,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1}var t,n,i=e.prototype;return i.headers=function(){var e=this.opts.companionHeaders||this.opts.serverHeaders||{};return Promise.resolve(___extends_87({},this.defaultHeaders,{},e))},i._getPostResponseFunc=function(e){var t=this;return function(n){return e?n:t.onReceiveResponse(n)}},i.onReceiveResponse=function(e){var t,n=this.uppy.getState().companion||{},i=this.opts.companionUrl,o=e.headers;return o.has("i-am")&&o.get("i-am")!==n[i]&&this.uppy.setState({companion:___extends_87({},n,(t={},t[i]=o.get("i-am"),t))}),e},i._getUrl=function(e){return/^(https?:|)\/\//.test(e)?e:this.hostname+"/"+e},i._json=function(e){if(401===e.status)throw new _$AuthError_85;if(e.status<200||e.status>300){var t="Failed request with status: "+e.status+". "+e.statusText;return e.json().then(function(e){throw t=e.message?t+" message: "+e.message:t,t=e.requestId?t+" request-Id: "+e.requestId:t,new Error(t)}).catch(function(){throw new Error(t)})}return e.json()},i.preflight=function(e){var t=this;return new Promise(function(n,i){if(t.preflightDone)return n(t.allowedHeaders.slice());fetch(t._getUrl(e),{method:"OPTIONS"}).then(function(e){e.headers.has("access-control-allow-headers")&&(t.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map(function(e){return e.trim().toLowerCase()})),t.preflightDone=!0,n(t.allowedHeaders.slice())}).catch(function(e){t.uppy.log("[CompanionClient] unable to make preflight request "+e,"warning"),t.preflightDone=!0,n(t.allowedHeaders.slice())})})},i.preflightAndHeaders=function(e){
var t=this;return Promise.all([this.preflight(e),this.headers()]).then(function(e){var n=e[0],i=e[1];return Object.keys(i).forEach(function(e){-1===n.indexOf(e.toLowerCase())&&(t.uppy.log("[CompanionClient] excluding unallowed header "+e),delete i[e])}),i})},i.get=function(e,t){var n=this;return new Promise(function(i,o){n.preflightAndHeaders(e).then(function(r){fetch(n._getUrl(e),{method:"get",headers:r,credentials:"same-origin"}).then(n._getPostResponseFunc(t)).then(function(e){return n._json(e).then(i)}).catch(function(t){t=t.isAuthError?t:new Error("Could not get "+n._getUrl(e)+". "+t),o(t)})}).catch(o)})},i.post=function(e,t,n){var i=this;return new Promise(function(o,r){i.preflightAndHeaders(e).then(function(s){fetch(i._getUrl(e),{method:"post",headers:s,credentials:"same-origin",body:JSON.stringify(t)}).then(i._getPostResponseFunc(n)).then(function(e){return i._json(e).then(o)}).catch(function(t){t=t.isAuthError?t:new Error("Could not post "+i._getUrl(e)+". "+t),r(t)})}).catch(r)})},i.delete=function(e,t,n){var i=this;return new Promise(function(o,r){i.preflightAndHeaders(e).then(function(s){fetch(i.hostname+"/"+e,{method:"delete",headers:s,credentials:"same-origin",body:t?JSON.stringify(t):null}).then(i._getPostResponseFunc(n)).then(function(e){return i._json(e).then(o)}).catch(function(t){t=t.isAuthError?t:new Error("Could not delete "+i._getUrl(e)+". "+t),r(t)})}).catch(r)})},t=e,(n=[{key:"hostname",get:function(){var e=this.uppy.getState().companion,t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}},{key:"defaultHeaders",get:function(){return{Accept:"application/json","Content-Type":"application/json","Uppy-Versions":"@uppy/companion-client="+e.VERSION}}}])&&___defineProperties_87(t.prototype,n),e}(),_class.VERSION=_$package_91.version,_temp),_$tokenStorage_90={setItem:function(e,t){return new Promise(function(n){localStorage.setItem(e,t),n()})},getItem:function(e){return Promise.resolve(localStorage.getItem(e))},removeItem:function(e){return new Promise(function(t){localStorage.removeItem(e),t()})}},_getName=function(e){return e.split("-").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" ")},_$Provider_86=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).provider=n.provider,i.id=i.provider,i.authProvider=n.authProvider||i.provider,i.name=i.opts.name||_getName(i.id),i.pluginId=i.opts.pluginId,i.tokenKey="companion-"+i.pluginId+"-auth-token",i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.headers=function(){var t=this;return new Promise(function(n,i){e.prototype.headers.call(t).then(function(e){t.getAuthToken().then(function(t){n(___extends_86({},e,{"uppy-auth-token":t}))})}).catch(i)})},o.onReceiveResponse=function(t){t=e.prototype.onReceiveResponse.call(this,t);var n=this.uppy.getPlugin(this.pluginId),i=n.getPluginState().authenticated?401!==t.status:t.status<400;return n.setPluginState({authenticated:i}),t},o.setAuthToken=function(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)},o.getAuthToken=function(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)},o.authUrl=function(){return this.hostname+"/"+this.id+"/connect"},o.fileUrl=function(e){return this.hostname+"/"+this.id+"/get/"+e},o.list=function(e){return this.get(this.id+"/list/"+(e||""))},o.logout=function(){var e=this;return new Promise(function(t,n){e.get(e.id+"/logout").then(function(i){e.uppy.getPlugin(e.pluginId).storage.removeItem(e.tokenKey).then(function(){return t(i)}).catch(n)}).catch(n)})},t.initPlugin=function(e,t,n){if(e.type="acquirer",e.files=[],n&&(e.opts=___extends_86({},n,t)),t.serverUrl||t.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(t.companionAllowedHosts){var i=t.companionAllowedHosts;if(!("string"==typeof i||Array.isArray(i)||i instanceof RegExp))throw new TypeError(e.id+': the option "companionAllowedHosts" must be one of string, Array, RegExp');e.opts.companionAllowedHosts=i}else/^(?!https?:\/\/).*$/i.test(t.companionUrl)?e.opts.companionAllowedHosts="https://"+t.companionUrl.replace(/^\/\//,""):e.opts.companionAllowedHosts=t.companionUrl;e.storage=e.opts.storage||_$tokenStorage_90},t}(_$RequestClient_87),_$Socket_88=function(){function e(e){this.opts=e,this._queued=[],this.isOpen=!1,this.emitter=_$namespaceEmitter_49(),this._handleMessage=this._handleMessage.bind(this),this.close=this.close.bind(this),this.emit=this.emit.bind(this),this.on=this.on.bind(this),this.once=this.once.bind(this),this.send=this.send.bind(this),e&&!1===e.autoOpen||this.open()}var t=e.prototype;return t.open=function(){var e=this;this.socket=new WebSocket(this.opts.target),this.socket.onopen=function(t){for(e.isOpen=!0;e._queued.length>0&&e.isOpen;){var n=e._queued[0];e.send(n.action,n.payload),e._queued=e._queued.slice(1)}},this.socket.onclose=function(t){e.isOpen=!1},this.socket.onmessage=this._handleMessage},t.close=function(){this.socket&&this.socket.close()},t.send=function(e,t){this.isOpen?this.socket.send(JSON.stringify({action:e,payload:t})):this._queued.push({action:e,payload:t})},t.on=function(e,t){this.emitter.on(e,t)},t.emit=function(e,t){this.emitter.emit(e,t)},t.once=function(e,t){this.emitter.once(e,t)},t._handleMessage=function(e){try{var t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}},e}(),_$lib_89={RequestClient:_$RequestClient_87,Provider:_$Provider_86,Socket:_$Socket_88},h=_$preact_53.h,AuthView=function(e){function t(){return e.apply(this,arguments)||this}var n,i;return i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i,t.prototype.render=function(){var e=h("span",{class:"uppy-Provider-authTitleName"},this.props.pluginName,h("br",null));return h("div",{class:"uppy-Provider-auth"},h("div",{class:"uppy-Provider-authIcon"},this.props.pluginIcon()),h("div",{class:"uppy-Provider-authTitle"},this.props.i18nArray("authenticateWithTitle",{pluginName:e})),h("button",{type:"button",class:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn",onclick:this.props.handleAuth,"data-uppy-super-focusable":!0},this.props.i18nArray("authenticateWith",{pluginName:this.props.pluginName})))},t}(_$preact_53.Component),_$AuthView_144=AuthView,_$classnames_9={exports:{}};!function(){"use strict";function e(){for(var n=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var r=typeof o;if("string"===r||"number"===r)n.push(o);else if(Array.isArray(o)&&o.length){var s=e.apply(null,o);s&&n.push(s)}else if("object"===r)for(var a in o)t.call(o,a)&&o[a]&&n.push(a)}}return n.join(" ")}var t={}.hasOwnProperty;_$classnames_9.exports?(e.default=e,_$classnames_9.exports=e):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return e}):window.classNames=e}(),_$classnames_9=_$classnames_9.exports;var __h_145=_$preact_53.h,Breadcrumb=function(e){return __h_145("span",null,__h_145("button",{type:"button",class:"uppy-u-reset",onclick:e.getFolder},e.title),e.isLast?"":" / ")},_$Breadcrumbs_145=function(e){return __h_145("div",{class:"uppy-Provider-breadcrumbs"},__h_145("div",{class:"uppy-Provider-breadcrumbsIcon"},e.breadcrumbsIcon),e.directories.map(function(t,n){return __h_145(Breadcrumb,{key:t.id,getFolder:function(){return e.getFolder(t.id)},title:0===n?e.title:t.title,isLast:n+1===e.directories.length})}))},__h_147=_$preact_53.h,Component=_$preact_53.Component,_$Filter_147=function(e){function t(t){var n;return(n=e.call(this,t)||this).preventEnterPress=n.preventEnterPress.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.preventEnterPress=function(e){13===e.keyCode&&(e.stopPropagation(),e.preventDefault())},o.render=function(){var e=this;return __h_147("div",{class:"uppy-ProviderBrowser-search"},__h_147("input",{class:"uppy-u-reset uppy-ProviderBrowser-searchInput",type:"text",placeholder:this.props.i18n("filter"),"aria-label":this.props.i18n("filter"),onkeyup:this.preventEnterPress,onkeydown:this.preventEnterPress,onkeypress:this.preventEnterPress,oninput:function(t){return e.props.filterQuery(t)},value:this.props.filterInput}),__h_147("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon uppy-ProviderBrowser-searchIcon",width:"12",height:"12",viewBox:"0 0 12 12"},__h_147("path",{d:"M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z"})),this.props.filterInput&&__h_147("button",{class:"uppy-u-reset uppy-ProviderBrowser-searchClose",type:"button","aria-label":this.props.i18n("resetFilter"),title:this.props.i18n("resetFilter"),onclick:this.props.filterQuery},__h_147("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",viewBox:"0 0 19 19"},__h_147("path",{d:"M17.318 17.232L9.94 9.854 9.586 9.5l-.354.354-7.378 7.378h.707l-.62-.62v.706L9.318 9.94l.354-.354-.354-.354L1.94 1.854v.707l.62-.62h-.706l7.378 7.378.354.354.354-.354 7.378-7.378h-.707l.622.62v-.706L9.854 9.232l-.354.354.354.354 7.378 7.378.708-.707-7.38-7.378v.708l7.38-7.38.353-.353-.353-.353-.622-.622-.353-.353-.354.352-7.378 7.38h.708L2.56 1.23 2.208.88l-.353.353-.622.62-.353.355.352.353 7.38 7.38v-.708l-7.38 7.38-.353.353.352.353.622.622.353.353.354-.353 7.38-7.38h-.708l7.38 7.38z"}))))},t}(Component),__h_150=_$preact_53.h,_$ItemIcon_150=function(e){if(null!==e.itemIconString)switch(e.itemIconString){case"file":return __h_150(FileIcon,null);case"folder":return __h_150(FolderIcon,null);case"video":return __h_150(VideoIcon,null);default:return __h_150("img",{src:e.itemIconString})}},__h_149=_$preact_53.h,_$GridLi_149=function(e){return __h_149("li",{class:e.className},__h_149("div",{"aria-hidden":!0,class:"uppy-ProviderBrowserItem-fakeCheckbox "+(e.isChecked?"uppy-ProviderBrowserItem-fakeCheckbox--is-checked":"")}),__h_149("button",{type:"button",class:"uppy-u-reset uppy-ProviderBrowserItem-inner",onclick:e.toggleCheckbox,role:"option","aria-label":e.isChecked?e.i18n("unselectFileNamed",{name:e.title}):e.i18n("selectFileNamed",{name:e.title}),"aria-selected":e.isChecked,"aria-disabled":e.isDisabled,"data-uppy-super-focusable":!0},e.itemIconEl,e.showTitles&&e.title))},__h_151=_$preact_53.h,getAriaLabelOfCheckbox=function(e){return"folder"===e.type?e.isChecked?e.i18n("unselectAllFilesFromFolderNamed",{name:e.title}):e.i18n("selectAllFilesFromFolderNamed",{name:e.title}):e.isChecked?e.i18n("unselectFileNamed",{name:e.title}):e.i18n("selectFileNamed",{name:e.title})},_$ListLi_151=function(e){return __h_151("li",{class:e.className},__h_151("button",{type:"button",class:"uppy-u-reset uppy-ProviderBrowserItem-fakeCheckbox "+(e.isChecked?"uppy-ProviderBrowserItem-fakeCheckbox--is-checked":""),onClick:e.toggleCheckbox,id:e.id,role:"option","aria-label":getAriaLabelOfCheckbox(e),"aria-selected":e.isChecked,"aria-disabled":e.isDisabled,"data-uppy-super-focusable":!0}),"file"===e.type?__h_151("label",{for:e.id,className:"uppy-u-reset uppy-ProviderBrowserItem-inner"},e.itemIconEl,e.showTitles&&e.title):__h_151("button",{type:"button",class:"uppy-u-reset uppy-ProviderBrowserItem-inner",onclick:e.handleFolderClick,"aria-label":e.i18n("openFolderNamed",{name:e.title})},e.itemIconEl,e.showTitles&&e.title))},__h_152=_$preact_53.h,_$Item_152=function(e){var t=e.getItemIcon(),n=_$classnames_9("uppy-ProviderBrowserItem",{"uppy-ProviderBrowserItem--selected":e.isChecked},{"uppy-ProviderBrowserItem--noPreview":"video"===t}),i=__h_152(_$ItemIcon_150,{itemIconString:t});switch(e.viewType){case"grid":return __h_152(_$GridLi_149,___extends_152({},e,{className:n,itemIconEl:i}));case"list":return __h_152(_$ListLi_151,___extends_152({},e,{className:n,itemIconEl:i}));default:throw new Error("There is no such type "+e.viewType)}},__h_153=_$preact_53.h,getSharedProps=function(e,t){return{id:e.id,title:e.name,getItemIcon:function(){return e.icon},isChecked:t.isChecked(e),toggleCheckbox:function(n){return t.toggleCheckbox(n,e)},columns:t.columns,showTitles:t.showTitles,viewType:t.viewType,i18n:t.i18n}},_$ItemList_153=function(e){return e.folders.length||e.files.length?__h_153("div",{class:"uppy-ProviderBrowser-body"},__h_153("ul",{class:"uppy-ProviderBrowser-list",onscroll:e.handleScroll,role:"listbox",tabindex:"-1"},e.folders.map(function(t){return _$Item_152(___extends_153({},getSharedProps(t,e),{type:"folder",isDisabled:!!e.isChecked(t)&&e.isChecked(t).loading,handleFolderClick:function(){return e.handleFolderClick(t)}}))}),e.files.map(function(t){return _$Item_152(___extends_153({},getSharedProps(t,e),{type:"file",isDisabled:!1}))}))):__h_153("div",{class:"uppy-Provider-empty"},e.i18n("noFilesFound"))},__h_148=_$preact_53.h,_$FooterActions_148=function(e){return __h_148("div",{class:"uppy-ProviderBrowser-footer"},__h_148("button",{class:"uppy-u-reset uppy-c-btn uppy-c-btn-primary",onclick:e.done},e.i18n("selectX",{smart_count:e.selected})),__h_148("button",{class:"uppy-u-reset uppy-c-btn uppy-c-btn-link",onclick:e.cancel},e.i18n("cancel")))},__h_146=_$preact_53.h,_$Browser_146=function(e){var t=e.folders,n=e.files;""!==e.filterInput&&(t=e.filterItems(e.folders),n=e.filterItems(e.files));var i=e.currentSelection.length;return __h_146("div",{class:_$classnames_9("uppy-ProviderBrowser","uppy-ProviderBrowser-viewType--"+e.viewType)},__h_146("div",{class:"uppy-ProviderBrowser-header"},__h_146("div",{class:_$classnames_9("uppy-ProviderBrowser-headerBar",!e.showBreadcrumbs&&"uppy-ProviderBrowser-headerBar--simple")},e.showBreadcrumbs&&_$Breadcrumbs_145({getFolder:e.getFolder,directories:e.directories,breadcrumbsIcon:e.pluginIcon&&e.pluginIcon(),title:e.title}),__h_146("span",{class:"uppy-ProviderBrowser-user"},e.username),__h_146("button",{type:"button",onclick:e.logout,class:"uppy-u-reset uppy-ProviderBrowser-userLogout"},e.i18n("logOut")))),e.showFilter&&__h_146(_$Filter_147,e),__h_146(_$ItemList_153,{columns:[{name:"Name",key:"title"}],folders:t,files:n,activeRow:e.isActiveRow,sortByTitle:e.sortByTitle,sortByDate:e.sortByDate,isChecked:e.isChecked,handleFolderClick:e.getNextFolder,toggleCheckbox:e.toggleCheckbox,handleScroll:e.handleScroll,title:e.title,showTitles:e.showTitles,i18n:e.i18n,viewType:e.viewType}),i>0&&__h_146(_$FooterActions_148,___extends_146({selected:i},e)))},__h_154=_$preact_53.h,_$Loader_154=function(e){return __h_154("div",{class:"uppy-Provider-loading"},__h_154("span",null,e.i18n("loading")))},_$isPreviewSupported_222=function(e){if(!e)return!1;var t=e.split("/")[1];return!!/^(jpe?g|gif|png|svg|svg\+xml|bmp)$/.test(t)},_$package_156={version:"1.5.0"},___class_155,___temp_155,__h_155=_$preact_53.h,__Component_155=_$preact_53.Component,CloseWrapper=function(e){function t(){return e.apply(this,arguments)||this}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.componentWillUnmount=function(){this.props.onUnmount()},o.render=function(){return this.props.children[0]},t}(__Component_155),_$lib_155=(___temp_155=___class_155=function(){function e(e,t){this.plugin=e,this.provider=t.provider,this.opts=___extends_155({},{viewType:"list",showTitles:!0,showFilter:!0,showBreadcrumbs:!0},{},t),this.addFile=this.addFile.bind(this),this.filterItems=this.filterItems.bind(this),this.filterQuery=this.filterQuery.bind(this),this.toggleSearch=this.toggleSearch.bind(this),this.getFolder=this.getFolder.bind(this),this.getNextFolder=this.getNextFolder.bind(this),this.logout=this.logout.bind(this),this.preFirstRender=this.preFirstRender.bind(this),this.handleAuth=this.handleAuth.bind(this),this.sortByTitle=this.sortByTitle.bind(this),this.sortByDate=this.sortByDate.bind(this),this.isActiveRow=this.isActiveRow.bind(this),this.isChecked=this.isChecked.bind(this),this.toggleCheckbox=this.toggleCheckbox.bind(this),this.handleError=this.handleError.bind(this),this.handleScroll=this.handleScroll.bind(this),this.listAllFiles=this.listAllFiles.bind(this),this.donePicking=this.donePicking.bind(this),this.cancelPicking=this.cancelPicking.bind(this),this.clearSelection=this.clearSelection.bind(this),this.render=this.render.bind(this),this.clearSelection()}var t=e.prototype;return t.tearDown=function(){},t._updateFilesAndFolders=function(e,t,n){this.nextPagePath=e.nextPagePath,e.items.forEach(function(e){e.isFolder?n.push(e):t.push(e)}),this.plugin.setPluginState({folders:n,files:t})},t.preFirstRender=function(){this.plugin.setPluginState({didFirstRender:!0}),this.plugin.onFirstRender()},t.getFolder=function(e,t){var n=this;return this._loaderWrapper(this.provider.list(e),function(i){var o,r=n.plugin.getPluginState(),s=function(t,n){for(var i=0;i<t.length;i++)if(o=t[i],e===o.id)return i;var o;return-1}(r.directories);o=-1!==s?r.directories.slice(0,s+1):r.directories.concat([{id:e,title:t}]),n.username=n.username?n.username:i.username,n._updateFilesAndFolders(i,[],[]),n.plugin.setPluginState({directories:o})},this.handleError)},t.getNextFolder=function(e){this.getFolder(e.requestPath,e.name),this.lastCheckbox=void 0},t.addFile=function(e){var t={id:this.providerFileToId(e),source:this.plugin.id,data:e,name:e.name||e.id,type:e.mimeType,isRemote:!0,body:{fileId:e.id},remote:{companionUrl:this.plugin.opts.companionUrl,url:""+this.provider.fileUrl(e.requestPath),body:{fileId:e.id},providerOptions:this.provider.opts}},n=_$getFileType_213(t);n&&_$isPreviewSupported_222(n)&&(t.preview=e.thumbnail),this.plugin.uppy.log("Adding remote file");try{this.plugin.uppy.addFile(t)}catch(e){e.isRestriction||this.plugin.uppy.log(e)}},t.removeFile=function(e){var t=this.plugin.getPluginState().currentSelection;this.plugin.setPluginState({currentSelection:t.filter(function(t){return t.id!==e})})},t.logout=function(){var e=this;this.provider.logout().then(function(t){if(t.ok){if(!t.revoked){var n=e.plugin.uppy.i18n("companionUnauthorizeHint",{provider:e.plugin.title,url:t.manual_revoke_url});e.plugin.uppy.info(n,"info",7e3)}e.plugin.setPluginState({authenticated:!1,files:[],folders:[],directories:[]})}}).catch(this.handleError)},t.filterQuery=function(e){var t=this.plugin.getPluginState();this.plugin.setPluginState(___extends_155({},t,{filterInput:e?e.target.value:""}))},t.toggleSearch=function(e){var t=this.plugin.getPluginState();this.plugin.setPluginState({isSearchVisible:!t.isSearchVisible,filterInput:""})},t.filterItems=function(e){var t=this.plugin.getPluginState();return t.filterInput&&""!==t.filterInput?e.filter(function(e){return-1!==e.name.toLowerCase().indexOf(t.filterInput.toLowerCase())}):e},t.sortByTitle=function(){var e=___extends_155({},this.plugin.getPluginState()),t=e.files,n=e.folders,i=e.sorting,o=t.sort(function(e,t){return"titleDescending"===i?t.name.localeCompare(e.name):e.name.localeCompare(t.name)}),r=n.sort(function(e,t){return"titleDescending"===i?t.name.localeCompare(e.name):e.name.localeCompare(t.name)});this.plugin.setPluginState(___extends_155({},e,{files:o,folders:r,sorting:"titleDescending"===i?"titleAscending":"titleDescending"}))},t.sortByDate=function(){var e=___extends_155({},this.plugin.getPluginState()),t=e.files,n=e.folders,i=e.sorting,o=t.sort(function(e,t){var n=new Date(e.modifiedDate),o=new Date(t.modifiedDate);return"dateDescending"===i?n>o?-1:n<o?1:0:n>o?1:n<o?-1:0}),r=n.sort(function(e,t){var n=new Date(e.modifiedDate),o=new Date(t.modifiedDate);return"dateDescending"===i?n>o?-1:n<o?1:0:n>o?1:n<o?-1:0});this.plugin.setPluginState(___extends_155({},e,{files:o,folders:r,sorting:"dateDescending"===i?"dateAscending":"dateDescending"}))},t.sortBySize=function(){var e=___extends_155({},this.plugin.getPluginState()),t=e.files,n=e.sorting;if(t.length&&this.plugin.getItemData(t[0]).size){var i=t.sort(function(e,t){var i=e.size,o=t.size;return"sizeDescending"===n?i>o?-1:i<o?1:0:i>o?1:i<o?-1:0});this.plugin.setPluginState(___extends_155({},e,{files:i,sorting:"sizeDescending"===n?"sizeAscending":"sizeDescending"}))}},t.isActiveRow=function(e){return this.plugin.getPluginState().activeRow===this.plugin.getItemId(e)},t.isChecked=function(e){return this.plugin.getPluginState().currentSelection.some(function(t){return t.id===e.id})},t.addFolder=function(e){var t=this,n=this.providerFileToId(e),i=this.plugin.getPluginState(),o=i.selectedFolders||{};if(!(n in o&&o[n].loading))return o[n]={loading:!0,files:[]},this.plugin.setPluginState({selectedFolders:o}),this.listAllFiles(e.requestPath).then(function(r){r.forEach(function(e){t.addFile(e)});var s,a=r.map(t.providerFileToId);(i=t.plugin.getPluginState()).selectedFolders[n]={loading:!1,files:a},t.plugin.setPluginState({selectedFolders:o}),s=r.length?t.plugin.uppy.i18n("folderAdded",{smart_count:r.length,folder:e.name}):t.plugin.uppy.i18n("emptyFolderAdded"),t.plugin.uppy.info(s)}).catch(function(e){delete(i=t.plugin.getPluginState()).selectedFolders[n],t.plugin.setPluginState({selectedFolders:i.selectedFolders}),t.handleError(e)})},t.toggleCheckbox=function(e,t){e.stopPropagation(),e.preventDefault(),e.currentTarget.focus();var n=this.plugin.getPluginState(),i=n.folders,o=n.files,r=this.filterItems(i.concat(o));if(this.lastCheckbox&&e.shiftKey){var s,a=r.indexOf(this.lastCheckbox),l=r.indexOf(t);return s=a<l?r.slice(a,l+1):r.slice(l,a+1),void this.plugin.setPluginState({currentSelection:s})}this.lastCheckbox=t;var c=this.plugin.getPluginState().currentSelection;this.isChecked(t)?this.plugin.setPluginState({currentSelection:c.filter(function(e){return e.id!==t.id})}):this.plugin.setPluginState({currentSelection:c.concat([t])})},t.providerFileToId=function(e){return _$generateFileID_205({data:e,name:e.name||e.id,type:e.mimeType})},t.handleAuth=function(){var t=this,n=btoa(JSON.stringify({origin:"origin"in location?location.origin:location.protocol+"//"+location.hostname+(location.port?":"+location.port:"")})),i=encodeURIComponent("@uppy/provider-views="+e.VERSION),o=this.provider.authUrl()+"?state="+n+"&uppyVersions="+i,r=window.open(o,"_blank");window.addEventListener("message",function e(n){if(t._isOriginAllowed(n.origin,t.plugin.opts.companionAllowedHosts)&&n.source===r){var i="string"==typeof n.data?JSON.parse(n.data):n.data;i.token?(r.close(),window.removeEventListener("message",e),t.provider.setAuthToken(i.token),t.preFirstRender()):t.plugin.uppy.log("did not receive token from auth window")}else t.plugin.uppy.log("rejecting event from "+n.origin+" vs allowed pattern "+t.plugin.opts.companionAllowedHosts)})},t._isOriginAllowed=function(e,t){var n=function(e){return"string"==typeof e?new RegExp("^"+e+"$"):e instanceof RegExp?e:void 0};return(Array.isArray(t)?t.map(n):[n(t)]).filter(function(e){return null!=e}).some(function(t){return t.test(e)||t.test(e+"/")})},t.handleError=function(e){var t=this.plugin.uppy;if(t.log(e.toString()),!e.isAuthError){var n=t.i18n("companionError");t.info({message:n,details:e.toString()},"error",5e3)}},t.handleScroll=function(e){var t=this,n=e.target.scrollHeight-(e.target.scrollTop+e.target.offsetHeight),i=this.nextPagePath||null;n<50&&i&&!this._isHandlingScroll&&(this.provider.list(i).then(function(e){var n=t.plugin.getPluginState(),i=n.files,o=n.folders;t._updateFilesAndFolders(e,i,o)}).catch(this.handleError).then(function(){t._isHandlingScroll=!1}),this._isHandlingScroll=!0)},t.listAllFiles=function(e,t){var n=this;return void 0===t&&(t=null),t=t||[],new Promise(function(i,o){n.provider.list(e).then(function(e){e.items.forEach(function(e){e.isFolder||t.push(e)});var r=e.nextPagePath||null;return r?n.listAllFiles(r,t).then(function(e){return i(e)}).catch(function(e){return o(e)}):i(t)}).catch(function(e){return o(e)})})},t.donePicking=function(){var e=this,t=this.plugin.getPluginState().currentSelection.map(function(t){return t.isFolder?e.addFolder(t):e.addFile(t)});this._loaderWrapper(Promise.all(t),function(){e.clearSelection()},function(){})},t.cancelPicking=function(){this.clearSelection();var e=this.plugin.uppy.getPlugin("Dashboard");e&&e.hideAllPanels()},t.clearSelection=function(){this.plugin.setPluginState({currentSelection:[]})},t._loaderWrapper=function(e,t,n){var i=this;e.then(function(e){i.plugin.setPluginState({loading:!1}),t(e)}).catch(function(e){i.plugin.setPluginState({loading:!1}),n(e)}),this.plugin.setPluginState({loading:!0})},t.render=function(e,t){void 0===t&&(t={});var n=this.plugin.getPluginState(),i=n.authenticated;if(n.didFirstRender||this.preFirstRender(),this.plugin.getPluginState().loading)return __h_155(CloseWrapper,{onUnmount:this.clearSelection},__h_155(_$Loader_154,{i18n:this.plugin.uppy.i18n}));if(!i)return __h_155(CloseWrapper,{onUnmount:this.clearSelection},__h_155(_$AuthView_144,{pluginName:this.plugin.title,pluginIcon:this.plugin.icon,handleAuth:this.handleAuth,i18n:this.plugin.uppy.i18n,i18nArray:this.plugin.uppy.i18nArray}));var o=___extends_155({},this.opts,{},t),r=___extends_155({},this.plugin.getPluginState(),{username:this.username,getNextFolder:this.getNextFolder,getFolder:this.getFolder,filterItems:this.filterItems,filterQuery:this.filterQuery,toggleSearch:this.toggleSearch,sortByTitle:this.sortByTitle,sortByDate:this.sortByDate,logout:this.logout,isActiveRow:this.isActiveRow,isChecked:this.isChecked,toggleCheckbox:this.toggleCheckbox,handleScroll:this.handleScroll,listAllFiles:this.listAllFiles,done:this.donePicking,cancel:this.cancelPicking,title:this.plugin.title,viewType:o.viewType,showTitles:o.showTitles,showFilter:o.showFilter,showBreadcrumbs:o.showBreadcrumbs,pluginIcon:this.plugin.icon,i18n:this.plugin.uppy.i18n});return __h_155(CloseWrapper,{onUnmount:this.clearSelection},__h_155(_$Browser_146,r))},e}(),___class_155.VERSION=_$package_156.version,___temp_155),_$package_166={version:"1.2.0"},_$lib_165={},STATE_UPDATE="uppy/STATE_UPDATE",defaultSelector=function(e){return function(t){return t.uppy[e]}},ReduxStore=function(){function e(e){this._store=e.store,this._id=e.id||_$cuid_13(),this._selector=e.selector||defaultSelector(this._id),this.setState({})}var t=e.prototype;return t.setState=function(e){this._store.dispatch({type:STATE_UPDATE,id:this._id,payload:e})},t.getState=function(){return this._selector(this._store.getState())},t.subscribe=function(e){var t=this,n=this.getState();return this._store.subscribe(function(){var i=t.getState();if(n!==i){var o=function(e,t){var n=Object.keys(t),i={};return n.forEach(function(n){e[n]!==t[n]&&(i[n]=t[n])}),i}(n,i);e(n,i,o),n=i}})},e}();ReduxStore.VERSION=_$package_166.version,_$lib_165=function(e){return new ReduxStore(e)},_$lib_165.STATE_UPDATE=STATE_UPDATE,_$lib_165.reducer=function(e,t){if(void 0===e&&(e={}),t.type===STATE_UPDATE){var n,i=___extends_165({},e[t.id],t.payload);return ___extends_165({},e,((n={})[t.id]=i,n))}return e},_$lib_165.middleware=function(){return function(){return function(e){return function(t){e(t)}}}};var _$isShallowEqual_43=function(e,t){if(e===t)return!0;for(var n in e)if(!(n in t))return!1;for(var n in t)if(e[n]!==t[n])return!1;return!0},__h_118=_$preact_53.h,__Component_118=_$preact_53.Component,_$pure_118=function(e){return function(t){function n(){return t.apply(this,arguments)||this}var i,o;o=t,(i=n).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var r=n.prototype;return r.shouldComponentUpdate=function(e){return!_$isShallowEqual_43(this.props,e)},r.render=function(){var t=___extends_118({},this.props);return __h_118(e,t)},n}(__Component_118)},__h_111=_$preact_53.h,_$icons_111={defaultPickerIcon:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30"},__h_111("path",{d:"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z"}))},iconRetry:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon retry",width:"28",height:"31",viewBox:"0 0 16 19"},__h_111("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),__h_111("path",{d:"M7.9 3H10v2H7.9z"}),__h_111("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),__h_111("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))},localIcon:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",fill:"#607d8b",width:"27",height:"25",viewBox:"0 0 27 25"},__h_111("path",{d:"M5.586 9.288a.313.313 0 0 0 .282.176h4.84v3.922c0 1.514 1.25 2.24 2.792 2.24 1.54 0 2.79-.726 2.79-2.24V9.464h4.84c.122 0 .23-.068.284-.176a.304.304 0 0 0-.046-.324L13.735.106a.316.316 0 0 0-.472 0l-7.63 8.857a.302.302 0 0 0-.047.325z"}),__h_111("path",{d:"M24.3 5.093c-.218-.76-.54-1.187-1.208-1.187h-4.856l1.018 1.18h3.948l2.043 11.038h-7.193v2.728H9.114v-2.725h-7.36l2.66-11.04h3.33l1.018-1.18H3.907c-.668 0-1.06.46-1.21 1.186L0 16.456v7.062C0 24.338.676 25 1.51 25h23.98c.833 0 1.51-.663 1.51-1.482v-7.062L24.3 5.093z"}))},iconAudio:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"25",height:"25",viewBox:"0 0 25 25"},__h_111("path",{d:"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z",fill:"#049BCF","fill-rule":"nonzero"}))},iconVideo:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"25",height:"25",viewBox:"0 0 25 25"},__h_111("path",{d:"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z",fill:"#19AF67","fill-rule":"nonzero"}))},iconPDF:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"25",height:"25",viewBox:"0 0 25 25"},__h_111("path",{d:"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z",fill:"#E2514A","fill-rule":"nonzero"}))},iconFile:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"25",height:"25",viewBox:"0 0 25 25"},__h_111("g",{fill:"#A7AFB7","fill-rule":"nonzero"},__h_111("path",{d:"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z"}),__h_111("path",{
d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})))},iconText:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"25",height:"25",viewBox:"0 0 25 25"},__h_111("path",{d:"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z",fill:"#5A5E69","fill-rule":"nonzero"}))},iconCopyLink:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"14",height:"14",viewBox:"0 0 14 12"},__h_111("path",{d:"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z"}))},iconPencil:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"14",height:"14",viewBox:"0 0 14 14"},__h_111("g",{"fill-rule":"evenodd"},__h_111("path",{d:"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z","fill-rule":"nonzero"}),__h_111("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),__h_111("path",{"fill-rule":"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))},iconCross:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"18",height:"18",viewBox:"0 0 18 18"},__h_111("path",{d:"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z"}),__h_111("path",{fill:"#FFF",d:"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z"}))},iconPlus:function(){return __h_111("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"15",height:"15",viewBox:"0 0 15 15"},__h_111("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"}))}},iconFile=_$icons_111.iconFile,iconText=_$icons_111.iconText,iconAudio=_$icons_111.iconAudio,iconVideo=_$icons_111.iconVideo,iconPDF=_$icons_111.iconPDF,_$getFileTypeIcon_116=function(e){var t={color:"#838999",icon:iconFile()};if(!e)return t;var n=e.split("/")[0],i=e.split("/")[1];return"text"===n?{color:"#5a5e69",icon:iconText()}:"audio"===n?{color:"#068dbb",icon:iconAudio()}:"video"===n?{color:"#19af67",icon:iconVideo()}:"application"===n&&"pdf"===i?{color:"#e25149",icon:iconPDF()}:"image"===n?{color:"#f2f2f2",icon:""}:t},__h_108=_$preact_53.h,_$FilePreview_108=function(e){var t=e.file;if(t.preview)return __h_108("img",{class:"uppy-DashboardItem-previewImg",alt:t.name,src:t.preview});var n=_$getFileTypeIcon_116(t.type),i=n.color,o=n.icon;return __h_108("div",{class:"uppy-DashboardItem-previewIconWrap"},__h_108("span",{class:"uppy-DashboardItem-previewIcon",style:{color:i}},o),__h_108("svg",{"aria-hidden":"true",focusable:"false",class:"uppy-DashboardItem-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},__h_108("rect",{fill:"#FFF",width:"58",height:"76",rx:"3","fill-rule":"evenodd"})))},__h_103=_$preact_53.h,_$FilePreviewAndLink_103=function(e){return __h_103("div",{class:"uppy-DashboardItem-previewInnerWrap",style:{backgroundColor:_$getFileTypeIcon_116(e.file.type).color}},e.showLinkToFileUploadResult&&e.file.uploadURL&&__h_103("a",{class:"uppy-DashboardItem-previewLink",href:e.file.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":e.file.meta.name}),__h_103(_$FilePreview_108,{file:e.file}))},__h_104=_$preact_53.h,circleLength=2*Math.PI*15,_$PauseResumeCancelIcon_104=function(e){return __h_104("svg",{"aria-hidden":"true",focusable:"false",width:"70",height:"70",viewBox:"0 0 36 36",class:"UppyIcon UppyIcon-progressCircle"},__h_104("g",{class:"progress-group"},__h_104("circle",{class:"bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),__h_104("circle",{class:"progress",r:"15",cx:"18",cy:"18",transform:"rotate(-90, 18, 18)","stroke-width":"2",fill:"none","stroke-dasharray":circleLength,"stroke-dashoffset":circleLength-circleLength/100*e.progress})),!e.hidePauseResumeCancelButtons&&__h_104("g",null,__h_104("polygon",{class:"play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}),__h_104("g",{class:"pause",transform:"translate(14.5, 13)"},__h_104("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),__h_104("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})),__h_104("polygon",{class:"cancel",transform:"translate(2, 2)",points:"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12"})),__h_104("polygon",{class:"check",transform:"translate(2, 3)",points:"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634"}))},__h_105=_$preact_53.h,iconRetry=_$icons_111.iconRetry,_$FileProgress_105=function(e){return e.hideRetryButton&&e.error?__h_105("div",{class:"uppy-DashboardItem-progress"}):e.isUploaded||e.hidePauseResumeCancelButtons&&!e.error?__h_105("div",{class:"uppy-DashboardItem-progress"},__h_105("div",{class:"uppy-DashboardItem-progressIndicator"},__h_105(_$PauseResumeCancelIcon_104,{progress:e.file.progress.percentage,hidePauseResumeCancelButtons:e.hidePauseResumeCancelButtons}))):__h_105("div",{class:"uppy-DashboardItem-progress"},__h_105("button",{class:"uppy-u-reset uppy-DashboardItem-progressIndicator",type:"button","aria-label":progressIndicatorTitle(e),title:progressIndicatorTitle(e),onclick:function(){return function(e){e.isUploaded||(!e.error||e.hideRetryButton?e.hidePauseResumeCancelButtons||(e.resumableUploads?e.pauseUpload(e.file.id):e.individualCancellation&&e.cancelUpload(e.file.id)):e.retryUpload(e.file.id))}(e)}},e.error?e.hideRetryButton?null:iconRetry():__h_105(_$PauseResumeCancelIcon_104,{progress:e.file.progress.percentage,hidePauseResumeCancelButtons:e.hidePauseResumeCancelButtons})))},_$truncateString_120=function(e,t){if(e.length<=t)return e;if(t<="...".length)return e.substr(0,t);var n=t-"...".length,i=Math.ceil(n/2),o=Math.floor(n/2);return e.substr(0,i)+"..."+e.substr(e.length-o)},__h_102=_$preact_53.h,renderFileSource=function(e){return e.file.source&&e.file.source!==e.id&&__h_102("div",{class:"uppy-DashboardItem-sourceIcon"},e.acquirers.map(function(t){if(t.id===e.file.source)return function(e,t){return __h_102("span",{title:t.i18n("fileSource",{name:e.name})},e.icon())}(t,e)}))},_$FileInfo_102=function(e){return __h_102("div",{class:"uppy-DashboardItem-fileInfo","data-uppy-file-source":e.file.source},function(e){var t;return t=e.containerWidth<=352?35:e.containerWidth<=576?60:30,__h_102("div",{class:"uppy-DashboardItem-name",title:e.file.meta.name},_$truncateString_120(e.file.meta.name,t))}(e),__h_102("div",{class:"uppy-DashboardItem-status"},function(e){return e.file.data.size&&__h_102("div",{class:"uppy-DashboardItem-statusSize"},_$prettyBytes_225(e.file.data.size))}(e),renderFileSource(e)))},_$copyToClipboard_113=function(e,t){return t=t||"Copy the URL below",new Promise(function(n){var i=document.createElement("textarea");i.setAttribute("style",{position:"fixed",top:0,left:0,width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}),i.value=e,document.body.appendChild(i),i.select();var o=function(){document.body.removeChild(i),window.prompt(t,e),n()};try{return document.execCommand("copy")?(document.body.removeChild(i),n()):o()}catch(e){return document.body.removeChild(i),o()}})},__h_101=_$preact_53.h,iconPencil=_$icons_111.iconPencil,iconCross=_$icons_111.iconCross,iconCopyLink=_$icons_111.iconCopyLink,renderCopyLinkButton=function(e){return e.showLinkToFileUploadResult&&e.file.uploadURL&&__h_101("button",{class:"uppy-u-reset uppy-DashboardItem-action uppy-DashboardItem-action--copyLink",type:"button","aria-label":e.i18n("copyLink"),title:e.i18n("copyLink"),onclick:function(t){return function(e,t){return _$copyToClipboard_113(t.file.uploadURL,t.i18n("copyLinkToClipboardFallback")).then(function(){t.log("Link copied to clipboard."),t.info(t.i18n("copyLinkToClipboardSuccess"),"info",3e3)}).catch(t.log).then(function(){return e.target.focus({preventScroll:!0})})}(t,e)}},iconCopyLink())},_$Buttons_101=function(e){return __h_101("div",{className:"uppy-DashboardItem-actionWrapper"},function(e){return!e.uploadInProgressOrComplete&&e.metaFields&&e.metaFields.length>0&&__h_101("button",{class:"uppy-u-reset uppy-DashboardItem-action uppy-DashboardItem-action--edit",type:"button","aria-label":e.i18n("editFile")+" "+e.file.meta.name,title:e.i18n("editFile"),onclick:function(t){return e.toggleFileCard(e.file.id)}},iconPencil())}(e),renderCopyLinkButton(e),function(e){return e.showRemoveButton&&__h_101("button",{class:"uppy-u-reset uppy-DashboardItem-action uppy-DashboardItem-action--remove",type:"button","aria-label":e.i18n("removeFile"),title:e.i18n("removeFile"),onclick:function(){return e.removeFile(e.file.id)}},iconCross())}(e))},__h_106=_$preact_53.h,_$FileItem_106=_$pure_118(function(e){var t=e.file,n=t.progress.preprocess||t.progress.postprocess,i=t.progress.uploadComplete&&!n&&!t.error,o=t.progress.uploadStarted||n,r=t.progress.uploadStarted&&!t.progress.uploadComplete||n,s=t.isPaused||!1,a=t.error||!1,l=e.individualCancellation?!i:!r&&!i,c=_$classnames_9("uppy-u-reset","uppy-DashboardItem",{"is-inprogress":r},{"is-processing":n},{"is-complete":i},{"is-paused":s},{"is-error":!!a},{"is-resumable":e.resumableUploads},{"is-noIndividualCancellation":!e.individualCancellation});return __h_106("li",{class:c,id:"uppy_"+t.id},__h_106("div",{class:"uppy-DashboardItem-preview"},__h_106(_$FilePreviewAndLink_103,{file:t,showLinkToFileUploadResult:e.showLinkToFileUploadResult}),__h_106(_$FileProgress_105,___extends_106({},e,{file:t,error:a,isUploaded:i}))),__h_106("div",{class:"uppy-DashboardItem-fileInfoAndButtons"},__h_106(_$FileInfo_102,{file:t,id:e.id,acquirers:e.acquirers,containerWidth:e.containerWidth,i18n:e.i18n}),__h_106(_$Buttons_101,{file:t,metaFields:e.metaFields,showLinkToFileUploadResult:e.showLinkToFileUploadResult,showRemoveButton:l,uploadInProgressOrComplete:o,removeFile:e.removeFile,toggleFileCard:e.toggleFileCard,i18n:e.i18n,log:e.log,info:e.info})))}),__h_107=_$preact_53.h,_$FileList_107=function(e){var t=0===e.totalFileCount,n=_$classnames_9("uppy-Dashboard-files",{"uppy-Dashboard-files--noFiles":t}),i={id:e.id,error:e.error,i18n:e.i18n,log:e.log,info:e.info,acquirers:e.acquirers,resumableUploads:e.resumableUploads,individualCancellation:e.individualCancellation,hideRetryButton:e.hideRetryButton,hidePauseResumeCancelButtons:e.hidePauseResumeCancelButtons,showLinkToFileUploadResult:e.showLinkToFileUploadResult,isWide:e.isWide,metaFields:e.metaFields,retryUpload:e.retryUpload,pauseUpload:e.pauseUpload,cancelUpload:e.cancelUpload,toggleFileCard:e.toggleFileCard,removeFile:e.removeFile};return __h_107("ul",{class:n,tabindex:"-1"},Object.keys(e.files).map(function(t){return __h_107(_$FileItem_106,___extends_107({key:t},i,{file:e.files[t]}))}))},localIcon=_$icons_111.localIcon,__h_97=_$preact_53.h,AddFiles=function(e){function t(t){var n;return(n=e.call(this,t)||this).triggerFileInputClick=n.triggerFileInputClick.bind(_assertThisInitialized(n)),n.handleFileInputChange=n.handleFileInputChange.bind(_assertThisInitialized(n)),n.renderPoweredByUppy=n.renderPoweredByUppy.bind(_assertThisInitialized(n)),n.renderHiddenFileInput=n.renderHiddenFileInput.bind(_assertThisInitialized(n)),n.renderDropPasteBrowseTagline=n.renderDropPasteBrowseTagline.bind(_assertThisInitialized(n)),n.renderMyDeviceAcquirer=n.renderMyDeviceAcquirer.bind(_assertThisInitialized(n)),n.renderAcquirer=n.renderAcquirer.bind(_assertThisInitialized(n)),n}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.triggerFileInputClick=function(){this.fileInput.click()},o.handleFileInputChange=function(e){this.props.handleInputChange(e),e.target.value=null},o.renderPoweredByUppy=function(){return __h_97("a",{tabindex:"-1",href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",class:"uppy-Dashboard-poweredBy"},this.props.i18n("poweredBy")+" ",__h_97("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},__h_97("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z","fill-rule":"evenodd"})),__h_97("span",{class:"uppy-Dashboard-poweredByUppy"},"Uppy"))},o.renderHiddenFileInput=function(){var e=this;return __h_97("input",{class:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabindex:-1,type:"file",name:"files[]",multiple:1!==this.props.maxNumberOfFiles,onchange:this.handleFileInputChange,accept:this.props.allowedFileTypes,ref:function(t){e.fileInput=t}})},o.renderDropPasteBrowseTagline=function(){var e=__h_97("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-browse",onclick:this.triggerFileInputClick},this.props.i18n("browse"));return __h_97("div",{class:"uppy-Dashboard-dropFilesTitle"},0===this.props.acquirers.length?this.props.i18nArray("dropPaste",{browse:e}):this.props.i18nArray("dropPasteImport",{browse:e}))},o.renderMyDeviceAcquirer=function(){return __h_97("div",{class:"uppy-DashboardTab",role:"presentation"},__h_97("button",{type:"button",class:"uppy-DashboardTab-btn",role:"tab",tabindex:0,"data-uppy-super-focusable":!0,onclick:this.triggerFileInputClick},localIcon(),__h_97("div",{class:"uppy-DashboardTab-name"},this.props.i18n("myDevice"))))},o.renderAcquirer=function(e){var t=this;return __h_97("div",{class:"uppy-DashboardTab",role:"presentation"},__h_97("button",{type:"button",class:"uppy-DashboardTab-btn",role:"tab",tabindex:0,"aria-controls":"uppy-DashboardContent-panel--"+e.id,"aria-selected":this.props.activePickerPanel.id===e.id,"data-uppy-super-focusable":!0,onclick:function(){return t.props.showPanel(e.id)}},e.icon(),__h_97("div",{class:"uppy-DashboardTab-name"},e.name)))},o.render=function(){var e=this;return __h_97("div",{class:"uppy-DashboardAddFiles"},this.renderHiddenFileInput(),__h_97("div",{class:"uppy-DashboardTabs"},this.renderDropPasteBrowseTagline(),this.props.acquirers.length>0&&__h_97("div",{class:"uppy-DashboardTabs-list",role:"tablist"},this.renderMyDeviceAcquirer(),this.props.acquirers.map(function(t){return e.renderAcquirer(t)}))),__h_97("div",{class:"uppy-DashboardAddFiles-info"},this.props.note&&__h_97("div",{class:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))},t}(_$preact_53.Component),_$AddFiles_97=AddFiles,__h_98=_$preact_53.h,_$AddFilesPanel_98=function(e){return __h_98("div",{class:"uppy-Dashboard-AddFilesPanel","data-uppy-panelType":"AddFiles","aria-hidden":e.showAddFilesPanel},__h_98("div",{class:"uppy-DashboardContent-bar"},__h_98("div",{class:"uppy-DashboardContent-title",role:"heading","aria-level":"h1"},e.i18n("addingMoreFiles")),__h_98("button",{class:"uppy-DashboardContent-back",type:"button",onclick:function(t){return e.toggleAddFilesPanel(!1)}},e.i18n("back"))),__h_98(_$AddFiles_97,e))},_$ignoreEvent_117=function(e){var t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t?(e.preventDefault(),e.stopPropagation()):e.stopPropagation()},__h_109=_$preact_53.h,_$PickerPanelContent_109=function(e){return __h_109("div",{class:"uppy-DashboardContent-panel",role:"tabpanel","data-uppy-panelType":"PickerPanel",id:"uppy-DashboardContent-panel--"+e.activePickerPanel.id,onDragOver:_$ignoreEvent_117,onDragLeave:_$ignoreEvent_117,onDrop:_$ignoreEvent_117,onPaste:_$ignoreEvent_117},__h_109("div",{class:"uppy-DashboardContent-bar"},__h_109("div",{class:"uppy-DashboardContent-title",role:"heading","aria-level":"h1"},e.i18n("importFrom",{name:e.activePickerPanel.name})),__h_109("button",{class:"uppy-DashboardContent-back",type:"button",onclick:e.hideAllPanels},e.i18n("done"))),__h_109("div",{class:"uppy-DashboardContent-panelBody"},e.getPlugin(e.activePickerPanel.id).render(e.state)))},__h_110=_$preact_53.h,iconPlus=_$icons_111.iconPlus,uploadStates={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete",STATE_PAUSED:"paused"},_$PickerPanelTopBar_110=function(e){var t=e.allowNewUpload;return t&&e.maxNumberOfFiles&&(t=e.totalFileCount<e.maxNumberOfFiles),__h_110("div",{class:"uppy-DashboardContent-bar"},e.isAllComplete?__h_110("div",null):__h_110("button",{class:"uppy-DashboardContent-back",type:"button",onclick:e.cancelAll},e.i18n("cancel")),__h_110("div",{class:"uppy-DashboardContent-title",role:"heading","aria-level":"h1"},__h_110(UploadStatus,e)),t?__h_110("button",{class:"uppy-DashboardContent-addMore",type:"button","aria-label":e.i18n("addMoreFiles"),title:e.i18n("addMoreFiles"),onclick:function(){return e.toggleAddFilesPanel(!0)}},iconPlus(),__h_110("span",{class:"uppy-DashboardContent-addMoreCaption"},e.i18n("addMore"))):__h_110("div",null))},__h_100=_$preact_53.h,__Component_100=_$preact_53.Component,FileCard=function(e){function t(t){var n;(n=e.call(this,t)||this).saveOnEnter=function(e){if(13===e.keyCode){e.stopPropagation(),e.preventDefault();var t=n.props.files[n.props.fileCardFor];n.props.saveFileCard(n.state.formState,t.id)}},n.tempStoreMeta=function(e,t){var i;n.setState({formState:___extends_100({},n.state.formState,(i={},i[t]=e.target.value,i))})},n.handleSave=function(){var e=n.props.fileCardFor;n.props.saveFileCard(n.state.formState,e)},n.handleCancel=function(){n.props.toggleFileCard()},n.renderMetaFields=function(){return(n.props.metaFields||[]).map(function(e){var t="uppy-Dashboard-FileCard-input-"+e.id;return __h_100("fieldset",{key:e.id,class:"uppy-Dashboard-FileCard-fieldset"},__h_100("label",{class:"uppy-Dashboard-FileCard-label",for:t},e.name),__h_100("input",{class:"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input",id:t,type:"text",value:n.state.formState[e.id],placeholder:e.placeholder,onkeyup:n.saveOnEnter,onkeydown:n.saveOnEnter,onkeypress:n.saveOnEnter,oninput:function(t){return n.tempStoreMeta(t,e.id)},"data-uppy-super-focusable":!0}))})};var i=n.props.files[n.props.fileCardFor],o=n.props.metaFields||[],r={};return o.forEach(function(e){r[e.id]=i.meta[e.id]||""}),n.state={formState:r},n}var n,i;return i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i,t.prototype.render=function(){var e=this.props.files[this.props.fileCardFor];return __h_100("div",{class:"uppy-Dashboard-FileCard","data-uppy-panelType":"FileCard",onDragOver:_$ignoreEvent_117,onDragLeave:_$ignoreEvent_117,onDrop:_$ignoreEvent_117,onPaste:_$ignoreEvent_117},__h_100("div",{class:"uppy-DashboardContent-bar"},__h_100("div",{class:"uppy-DashboardContent-title",role:"heading","aria-level":"h1"},this.props.i18nArray("editing",{file:__h_100("span",{class:"uppy-DashboardContent-titleFile"},e.meta?e.meta.name:e.name)})),__h_100("button",{class:"uppy-DashboardContent-back",type:"button",title:this.props.i18n("finishEditingFile"),onclick:this.handleSave},this.props.i18n("done"))),__h_100("div",{class:"uppy-Dashboard-FileCard-inner"},__h_100("div",{class:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:_$getFileTypeIcon_116(e.type).color}},__h_100(_$FilePreview_108,{file:e})),__h_100("div",{class:"uppy-Dashboard-FileCard-info"},this.renderMetaFields()),__h_100("div",{class:"uppy-Dashboard-FileCard-actions"},__h_100("button",{class:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn",type:"button",onclick:this.handleSave},this.props.i18n("saveChanges")),__h_100("button",{class:"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn",type:"button",onclick:this.handleCancel},this.props.i18n("cancel")))))},t}(__Component_100),_$FileCard_100=FileCard,_$isTouchDevice_223=function(){return"ontouchstart"in window||!!navigator.maxTouchPoints},_$preactCssTransitionGroup_52={exports:{}},__global_52,__factory_52;__global_52=this,__factory_52=function(e){"use strict";function t(e){return e.attributes&&e.attributes.key}function n(e){return e.base}function i(e){return e&&e.filter(function(e){return null!==e})}function o(e,t){for(var n=e.length;n--;)if(t(e[n]))return!0;return!1}function r(e,n){return o(e,function(e){return t(e)===n})}function s(e,n){return r(e,t(n))}function a(e,n,i){return o(e,function(e){return t(e)===n&&e.props[i]})}function l(e,n,i){return a(e,t(n),i)}function c(e,t){var n;e.classList?(n=e.classList).add.apply(n,t.split(" ")):e.className+=" "+t}function u(e,t){if(t=t.trim(),e.classList){var n;(n=e.classList).remove.apply(n,t.split(" "))}else{var i=e.className.trim(),o=p(i);for(t=d+t+d;o.indexOf(t)>=0;)o=o.replace(t,d);e.className=o.trim()}}var d=" ",h=/[\n\t\r]+/g,p=function(e){return(d+e+d).replace(h,d)},f={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},g=[];"undefined"!=typeof window&&function(){var e=document.createElement("div").style;for(var t in"AnimationEvent"in window||delete f.animationend.animation,"TransitionEvent"in window||delete f.transitionend.transition,f){var n=f[t];for(var i in n)if(i in e){g.push(n[i]);break}}}();var m=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},v=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},_=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},y=function(e){function t(){var i,o;m(this,t);for(var r=arguments.length,s=Array(r),a=0;a<r;a++)s[a]=arguments[a];return i=o=_(this,e.call.apply(e,[this].concat(s))),o.flushClassNameQueue=function(){n(o)&&c(n(o),o.classNameQueue.join(" ")),o.classNameQueue.length=0,o.timeout=null},_(o,i)}return v(t,e),t.prototype.transition=function(e,t,i){var o=this,r=n(this),s=this.props.name[e]||this.props.name+"-"+e,a=this.props.name[e+"Active"]||s+"-active",l=null;this.endListener&&this.endListener(),this.endListener=function(e){e&&e.target!==r||(clearTimeout(l),u(r,s),u(r,a),function(e,t){g.length&&g.forEach(function(n){e.removeEventListener(n,t,!1)})}(r,o.endListener),o.endListener=null,t&&t())},i?(l=setTimeout(this.endListener,i),this.transitionTimeouts.push(l)):function(e,t){if(!g.length)return window.setTimeout(t,0);g.forEach(function(n){e.addEventListener(n,t,!1)})}(r,this.endListener),c(r,s),this.queueClass(a)},t.prototype.queueClass=function(e){this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,17))},t.prototype.stop=function(){this.timeout&&(clearTimeout(this.timeout),this.classNameQueue.length=0,this.timeout=null),this.endListener&&this.endListener()},t.prototype.componentWillMount=function(){this.classNameQueue=[],this.transitionTimeouts=[]},t.prototype.componentWillUnmount=function(){this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach(function(e){clearTimeout(e)})},t.prototype.componentWillEnter=function(e){this.props.enter?this.transition("enter",e,this.props.enterTimeout):e()},t.prototype.componentWillLeave=function(e){this.props.leave?this.transition("leave",e,this.props.leaveTimeout):e()},t.prototype.render=function(){return(e=this.props.children)&&e[0];var e},t}(e.Component),b=function(n){function o(i){m(this,o);var r=_(this,n.call(this));return r.renderChild=function(n){var i=r.props,o=i.transitionName,s=i.transitionEnter,a=i.transitionLeave,l=i.transitionEnterTimeout,c=i.transitionLeaveTimeout,u=t(n);return e.h(y,{key:u,ref:function(e){(r.refs[u]=e)||(n=null)},name:o,enter:s,leave:a,enterTimeout:l,leaveTimeout:c},n)},r.refs={},r.state={children:(i.children||[]).slice()},r}return v(o,n),o.prototype.shouldComponentUpdate=function(e,t){return t.children!==this.state.children},o.prototype.componentWillMount=function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},o.prototype.componentWillReceiveProps=function(n){var o,a,c,u,d=this,h=n.children,p=n.exclusive,f=n.showProp,g=i(h||[]).slice(),m=i(p?this.props.children:this.state.children),v=(o=g,a=[],c={},u=[],m.forEach(function(e){var n=t(e);r(o,n)?u.length&&(c[n]=u,u=[]):u.push(e)}),o.forEach(function(e){var n=t(e);c.hasOwnProperty(n)&&(a=a.concat(c[n])),a.push(e)}),a.concat(u));f&&(v=v.map(function(t){var n;return!t.props[f]&&l(m,t,f)&&(t=e.cloneElement(t,((n={})[f]=!0,n))),t})),p&&v.forEach(function(e){return d.stop(t(e))}),this.setState({children:v}),this.forceUpdate(),g.forEach(function(e){var t=e.key,n=m&&s(m,e);if(f){if(n){var i=l(m,e,f),o=e.props[f];i||!o||d.currentlyTransitioningKeys[t]||d.keysToEnter.push(t)}}else n||d.currentlyTransitioningKeys[t]||d.keysToEnter.push(t)}),m.forEach(function(e){var t=e.key,n=g&&s(g,e);if(f){if(n){var i=l(g,e,f),o=e.props[f];i||!o||d.currentlyTransitioningKeys[t]||d.keysToLeave.push(t)}}else n||d.currentlyTransitioningKeys[t]||d.keysToLeave.push(t)})},o.prototype.performEnter=function(e){var t=this;this.currentlyTransitioningKeys[e]=!0;var n=this.refs[e];n.componentWillEnter?n.componentWillEnter(function(){return t._handleDoneEntering(e)}):this._handleDoneEntering(e)},o.prototype._handleDoneEntering=function(e){delete this.currentlyTransitioningKeys[e];var t=i(this.props.children),n=this.props.showProp;!t||!n&&!r(t,e)||n&&!a(t,e,n)?this.performLeave(e):this.setState({children:t})},o.prototype.stop=function(e){delete this.currentlyTransitioningKeys[e];var t=this.refs[e];t&&t.stop()},o.prototype.performLeave=function(e){var t=this;this.currentlyTransitioningKeys[e]=!0;var n=this.refs[e];n&&n.componentWillLeave?n.componentWillLeave(function(){return t._handleDoneLeaving(e)}):this._handleDoneLeaving(e)},o.prototype._handleDoneLeaving=function(e){delete this.currentlyTransitioningKeys[e];var t=this.props.showProp,n=i(this.props.children);t&&n&&a(n,e,t)?this.performEnter(e):!t&&n&&r(n,e)?this.performEnter(e):this.setState({children:n})},o.prototype.componentDidUpdate=function(){var e=this,t=this.keysToEnter,n=this.keysToLeave;this.keysToEnter=[],t.forEach(function(t){return e.performEnter(t)}),this.keysToLeave=[],n.forEach(function(t){return e.performLeave(t)})},o.prototype.render=function(t,n){var o=t.component,r=(t.transitionName,t.transitionEnter,t.transitionLeave,t.transitionEnterTimeout,t.transitionLeaveTimeout,t.children,function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(t,["component","transitionName","transitionEnter","transitionLeave","transitionEnterTimeout","transitionLeaveTimeout","children"])),s=n.children;return e.h(o,r,i(s).map(this.renderChild))},o}(e.Component);return b.defaultProps={component:"span",transitionEnter:!0,transitionLeave:!0},b},"object"==typeof _$preactCssTransitionGroup_52.exports?_$preactCssTransitionGroup_52.exports=__factory_52(_$preact_53):"function"==typeof define&&define.amd?define(["preact"],__factory_52):__global_52.PreactCSSTransitionGroup=__factory_52(__global_52.preact),_$preactCssTransitionGroup_52=_$preactCssTransitionGroup_52.exports;var __h_99=_$preact_53.h,_$Dashboard_99=function(e){var t=0===e.totalFileCount,n=_$classnames_9({"uppy-Root":e.isTargetDOMEl},"uppy-Dashboard",{"Uppy--isTouchDevice":_$isTouchDevice_223()},{"uppy-Dashboard--animateOpenClose":e.animateOpenClose},{"uppy-Dashboard--isClosing":e.isClosing},{"uppy-Dashboard--isDraggingOver":e.isDraggingOver},{"uppy-Dashboard--modal":!e.inline},{"uppy-size--md":e.containerWidth>576},{"uppy-size--lg":e.containerWidth>700},{"uppy-size--xl":e.containerWidth>900},{"uppy-Dashboard--isAddFilesPanelVisible":e.showAddFilesPanel},{"uppy-Dashboard--isInnerWrapVisible":e.areInsidesReadyToBeVisible});return __h_99("div",{class:n,"aria-hidden":e.inline?"false":e.isHidden,"aria-label":e.inline?e.i18n("dashboardTitle"):e.i18n("dashboardWindowTitle"),onpaste:e.handlePaste,onDragOver:e.handleDragOver,onDragLeave:e.handleDragLeave,onDrop:e.handleDrop},__h_99("div",{class:"uppy-Dashboard-overlay",tabindex:-1,onclick:e.handleClickOutside}),__h_99("div",{class:"uppy-Dashboard-inner","aria-modal":!e.inline&&"true",role:!e.inline&&"dialog",style:{width:e.inline&&e.width?e.width:"",height:e.inline&&e.height?e.height:""}},e.inline?null:__h_99("button",{class:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":e.i18n("closeModal"),title:e.i18n("closeModal"),onclick:e.closeModal},__h_99("span",{"aria-hidden":"true"},"×")),__h_99("div",{class:"uppy-Dashboard-innerWrap"},__h_99("div",{class:"uppy-Dashboard-dropFilesHereHint"},e.i18n("dropHint")),!t&&e.showSelectedFiles&&__h_99(_$PickerPanelTopBar_110,e),e.showSelectedFiles?__h_99(t?_$AddFiles_97:_$FileList_107,e):__h_99(_$AddFiles_97,e),__h_99(TransitionWrapper,null,e.showAddFilesPanel?__h_99(_$AddFilesPanel_98,___extends_99({key:"AddFilesPanel"},e)):null),__h_99(TransitionWrapper,null,e.fileCardFor?__h_99(_$FileCard_100,___extends_99({key:"FileCard"},e)):null),__h_99(TransitionWrapper,null,e.activePickerPanel?__h_99(_$PickerPanelContent_109,___extends_99({key:"PickerPanelContent"},e)):null),__h_99("div",{class:"uppy-Dashboard-progressindicators"},e.progressindicators.map(function(t){return e.getPlugin(t.id).render(e.state)})))))},_$StatusBarStates_160={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"},_$secondsToTime_227=function(e){return{hours:Math.floor(e/3600)%24,minutes:Math.floor(e/60)%60,seconds:Math.floor(e%60)}},_$prettyETA_226=function(e){var t=_$secondsToTime_227(e),n=t.hours?t.hours+"h ":"",i=t.hours?("0"+t.minutes).substr(-2):t.minutes,o=i?i+"m":"",r=i?("0"+t.seconds).substr(-2):t.seconds;return""+n+o+(t.hours?"":i?" "+r+"s":r+"s")},__h_159=_$preact_53.h,_$StatusBar_159=function(e){var t,n,i=e=e||{},o=i.newFiles,r=i.allowNewUpload,s=i.isUploadInProgress,a=i.isAllPaused,l=i.resumableUploads,c=i.error,u=i.hideUploadButton,d=i.hidePauseResumeButton,h=i.hideCancelButton,p=i.hideRetryButton,f=e.uploadState,g=e.totalProgress;if(f===_$StatusBarStates_160.STATE_PREPROCESSING||f===_$StatusBarStates_160.STATE_POSTPROCESSING){var m=function(e){var t=[];Object.keys(e).forEach(function(n){var i=e[n].progress;i.preprocess&&t.push(i.preprocess),i.postprocess&&t.push(i.postprocess)});var n=t[0];return{mode:n.mode,message:n.message,value:t.filter(function(e){return"determinate"===e.mode}).reduce(function(e,t,n,i){return e+t.value/i.length},0)}}(e.files);"determinate"===(t=m.mode)&&(g=100*m.value),n=ProgressBarProcessing(m)}else f===_$StatusBarStates_160.STATE_COMPLETE?n=ProgressBarComplete(e):f===_$StatusBarStates_160.STATE_UPLOADING?(e.supportsUploadProgress||(t="indeterminate",g=null),n=ProgressBarUploading(e)):f===_$StatusBarStates_160.STATE_ERROR&&(g=void 0,n=ProgressBarError(e))
;var v="number"==typeof g?g:100,_=f===_$StatusBarStates_160.STATE_WAITING&&e.hideUploadButton||f===_$StatusBarStates_160.STATE_WAITING&&!e.newFiles>0||f===_$StatusBarStates_160.STATE_COMPLETE&&e.hideAfterFinish,y=!c&&o&&!s&&!a&&r&&!u,b=!h&&f!==_$StatusBarStates_160.STATE_WAITING&&f!==_$StatusBarStates_160.STATE_COMPLETE,w=l&&!d&&f!==_$StatusBarStates_160.STATE_WAITING&&f!==_$StatusBarStates_160.STATE_PREPROCESSING&&f!==_$StatusBarStates_160.STATE_POSTPROCESSING&&f!==_$StatusBarStates_160.STATE_COMPLETE,x=c&&!p,k="uppy-StatusBar-progress\n                           "+(t?"is-"+t:""),C=_$classnames_9({"uppy-Root":e.isTargetDOMEl},"uppy-StatusBar","is-"+f);return __h_159("div",{class:C,"aria-hidden":_},__h_159("div",{class:k,style:{width:v+"%"},role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":g}),n,__h_159("div",{class:"uppy-StatusBar-actions"},y?__h_159(UploadBtn,___extends_159({},e,{uploadState:f})):null,x?__h_159(RetryBtn,e):null,w?__h_159(PauseResumeButton,e):null,b?__h_159(CancelBtn,e):null))},UploadBtn=function(e){var t=_$classnames_9("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":e.uploadState===_$StatusBarStates_160.STATE_WAITING});return __h_159("button",{type:"button",class:t,"aria-label":e.i18n("uploadXFiles",{smart_count:e.newFiles}),onclick:e.startUpload,"data-uppy-super-focusable":!0},e.newFiles&&e.isUploadStarted?e.i18n("uploadXNewFiles",{smart_count:e.newFiles}):e.i18n("uploadXFiles",{smart_count:e.newFiles}))},RetryBtn=function(e){return __h_159("button",{type:"button",class:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":e.i18n("retryUpload"),onclick:e.retryAll,"data-uppy-super-focusable":!0},__h_159("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"8",height:"10",viewBox:"0 0 8 10"},__h_159("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})),e.i18n("retry"))},CancelBtn=function(e){return __h_159("button",{type:"button",class:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:e.i18n("cancel"),"aria-label":e.i18n("cancel"),onclick:e.cancelAll,"data-uppy-super-focusable":!0},__h_159("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"16",height:"16",viewBox:"0 0 16 16"},__h_159("g",{fill:"none","fill-rule":"evenodd"},__h_159("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),__h_159("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"}))))},PauseResumeButton=function(e){var t=e.isAllPaused,n=(0,e.i18n)(t?"resume":"pause");return __h_159("button",{title:n,"aria-label":n,class:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onclick:function(){return function(e){if(!e.isAllComplete)return e.resumableUploads?e.isAllPaused?e.resumeAll():e.pauseAll():e.cancelAll()}(e)},"data-uppy-super-focusable":!0},__h_159("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"16",height:"16",viewBox:"0 0 16 16"},__h_159("g",{fill:"none","fill-rule":"evenodd"},__h_159("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),__h_159("path",t?{fill:"#FFF",d:"M6 4.25L11.5 8 6 11.75z"}:{d:"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z",fill:"#FFF"}))))},LoadingSpinner=function(){return __h_159("svg",{"aria-hidden":"true",focusable:"false",class:"uppy-StatusBar-spinner",width:"14",height:"14"},__h_159("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0","fill-rule":"evenodd"}))},ProgressBarProcessing=function(e){var t=Math.round(100*e.value);return __h_159("div",{class:"uppy-StatusBar-content"},__h_159(LoadingSpinner,null),"determinate"===e.mode?t+"% · ":"",e.message)},UnknownProgressDetails=function(e){return __h_159("div",{class:"uppy-StatusBar-statusSecondary"},e.i18n("filesUploadedOfTotal",{complete:e.complete,smart_count:e.numUploads}))},UploadNewlyAddedFiles=function(e){var t=_$classnames_9("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return __h_159("div",{class:"uppy-StatusBar-statusSecondary"},__h_159("div",{class:"uppy-StatusBar-statusSecondaryHint"},e.i18n("xMoreFilesAdded",{smart_count:e.newFiles})),__h_159("button",{type:"button",class:t,"aria-label":e.i18n("uploadXFiles",{smart_count:e.newFiles}),onclick:e.startUpload},e.i18n("upload")))},ThrottledProgressDetails=_$lodashThrottle_46(function(e){var t=e.numUploads>1;return __h_159("div",{class:"uppy-StatusBar-statusSecondary"},t&&e.i18n("filesUploadedOfTotal",{complete:e.complete,smart_count:e.numUploads}),__h_159("span",{class:"uppy-StatusBar-additionalInfo"},t&&" · ",e.i18n("dataUploadedOfTotal",{complete:_$prettyBytes_225(e.totalUploadedSize),total:_$prettyBytes_225(e.totalSize)})," · ",e.i18n("xTimeLeft",{time:_$prettyETA_226(e.totalETA)})))},500,{leading:!0,trailing:!0}),ProgressBarUploading=function(e){if(!e.isUploadStarted||e.isAllComplete)return null;var t=e.isAllPaused?e.i18n("paused"):e.i18n("uploading"),n=e.newFiles&&e.isUploadStarted;return __h_159("div",{class:"uppy-StatusBar-content","aria-label":t,title:t},e.isAllPaused?null:__h_159(LoadingSpinner,null),__h_159("div",{class:"uppy-StatusBar-status"},__h_159("div",{class:"uppy-StatusBar-statusPrimary"},e.supportsUploadProgress?t+": "+e.totalProgress+"%":t),e.isAllPaused||n||!e.showProgressDetails?null:e.supportsUploadProgress?__h_159(ThrottledProgressDetails,e):__h_159(UnknownProgressDetails,e),n?__h_159(UploadNewlyAddedFiles,e):null))},ProgressBarComplete=function(e){e.totalProgress;var t=e.i18n;return __h_159("div",{class:"uppy-StatusBar-content",role:"status",title:t("complete")},__h_159("div",{class:"uppy-StatusBar-status"},__h_159("div",{class:"uppy-StatusBar-statusPrimary"},__h_159("svg",{"aria-hidden":"true",focusable:"false",class:"uppy-StatusBar-statusIndicator UppyIcon",width:"15",height:"11",viewBox:"0 0 15 11"},__h_159("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})),t("complete"))))},ProgressBarError=function(e){var t=e.error,n=(e.retryAll,e.hideRetryButton,e.i18n);return __h_159("div",{class:"uppy-StatusBar-content",role:"alert",title:n("uploadFailed")},__h_159("div",{class:"uppy-StatusBar-status"},__h_159("div",{class:"uppy-StatusBar-statusPrimary"},__h_159("svg",{"aria-hidden":"true",focusable:"false",class:"uppy-StatusBar-statusIndicator UppyIcon",width:"11",height:"11",viewBox:"0 0 11 11"},__h_159("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})),n("uploadFailed"))),__h_159("span",{class:"uppy-StatusBar-details","aria-label":t,"data-microtip-position":"top-right","data-microtip-size":"medium",role:"tooltip"},"?"))},_$getSpeed_216=function(e){if(!e.bytesUploaded)return 0;var t=new Date-e.uploadStarted;return e.bytesUploaded/(t/1e3)},_$getBytesRemaining_206=function(e){return e.bytesTotal-e.bytesUploaded},_$package_162={version:"1.4.0"},___class_161,___temp_161,__Plugin_161=_$lib_93.Plugin,_$lib_161=(___temp_161=___class_161=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).startUpload=function(){return i.uppy.upload().catch(function(e){e.isRestriction||i.uppy.log(e.stack||e.message||e)})},i.id=i.opts.id||"StatusBar",i.title="StatusBar",i.type="progressindicator",i.defaultLocale={strings:{uploading:"Uploading",upload:"Upload",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",cancel:"Cancel",pause:"Pause",resume:"Resume",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded",2:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files",2:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files",2:"Upload +%{smart_count} files"},xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added",2:"%{smart_count} more files added"}}},i.opts=___extends_161({},{target:"body",hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0},{},n),i.i18nInit(),i.render=i.render.bind(___assertThisInitialized_161(i)),i.install=i.install.bind(___assertThisInitialized_161(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.setOptions=function(t){e.prototype.setOptions.call(this,t),this.i18nInit()},o.i18nInit=function(){this.translator=new _$Translator_199([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.setPluginState()},o.getTotalSpeed=function(e){var t=0;return e.forEach(function(e){t+=_$getSpeed_216(e.progress)}),t},o.getTotalETA=function(e){var t=this.getTotalSpeed(e);if(0===t)return 0;var n=e.reduce(function(e,t){return e+_$getBytesRemaining_206(t.progress)},0);return Math.round(n/t*10)/10},o.getUploadingState=function(e,t,n){if(e)return _$StatusBarStates_160.STATE_ERROR;if(t)return _$StatusBarStates_160.STATE_COMPLETE;for(var i=_$StatusBarStates_160.STATE_WAITING,o=Object.keys(n),r=0;r<o.length;r++){var s=n[o[r]].progress;if(s.uploadStarted&&!s.uploadComplete)return _$StatusBarStates_160.STATE_UPLOADING;s.preprocess&&i!==_$StatusBarStates_160.STATE_UPLOADING&&(i=_$StatusBarStates_160.STATE_PREPROCESSING),s.postprocess&&i!==_$StatusBarStates_160.STATE_UPLOADING&&i!==_$StatusBarStates_160.STATE_PREPROCESSING&&(i=_$StatusBarStates_160.STATE_POSTPROCESSING)}return i},o.render=function(e){var t=e.capabilities,n=e.files,i=e.allowNewUpload,o=e.totalProgress,r=e.error,s=Object.keys(n).map(function(e){return n[e]}),a=s.filter(function(e){return!e.progress.uploadStarted&&!e.progress.preprocess&&!e.progress.postprocess}),l=s.filter(function(e){return e.progress.uploadStarted}),c=l.filter(function(e){return e.isPaused}),u=s.filter(function(e){return e.progress.uploadComplete}),d=s.filter(function(e){return e.error}),h=s.filter(function(e){return!e.progress.uploadComplete&&e.progress.uploadStarted}),p=h.filter(function(e){return!e.isPaused}),f=s.filter(function(e){return e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess}),g=s.filter(function(e){return e.progress.preprocess||e.progress.postprocess}),m=this.getTotalETA(p),v=0,_=0;l.forEach(function(e){v+=e.progress.bytesTotal||0,_+=e.progress.bytesUploaded||0});var y=l.length>0,b=100===o&&u.length===Object.keys(n).length&&0===g.length,w=y&&d.length===l.length,x=0!==h.length&&c.length===h.length,k=h.length>0,C=t.resumableUploads||!1,S=!1!==t.uploadProgress;return _$StatusBar_159({error:r,uploadState:this.getUploadingState(w,b,e.files||{}),allowNewUpload:i,totalProgress:o,totalSize:v,totalUploadedSize:_,isAllComplete:b,isAllPaused:x,isAllErrored:w,isUploadStarted:y,isUploadInProgress:k,complete:u.length,newFiles:a.length,numUploads:f.length,totalETA:m,files:n,i18n:this.i18n,pauseAll:this.uppy.pauseAll,resumeAll:this.uppy.resumeAll,retryAll:this.uppy.retryAll,cancelAll:this.uppy.cancelAll,startUpload:this.startUpload,resumableUploads:C,supportsUploadProgress:S,showProgressDetails:this.opts.showProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideAfterFinish:this.opts.hideAfterFinish,isTargetDOMEl:this.isTargetDOMEl})},o.install=function(){var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.unmount()},t}(__Plugin_161),___class_161.VERSION=_$package_162.version,___temp_161),_$package_139={version:"1.3.2"},___class_138,___temp_138,__Plugin_138=_$lib_93.Plugin,__h_138=_$preact_53.h,_$lib_138=(___temp_138=___class_138=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).type="progressindicator",i.id=i.opts.id||"Informer",i.title="Informer",i.opts=___extends_138({},{},n),i.render=i.render.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.render=function(e){var t=e.info,n=t.isHidden,i=t.message,o=t.details;return __h_138("div",{class:"uppy uppy-Informer","aria-hidden":n},__h_138("p",{role:"alert"},i," ",o&&__h_138("span",{"aria-label":o,"data-microtip-position":"top-left","data-microtip-size":"medium",role:"tooltip"},"?")))},o.install=function(){var e=this.opts.target;e&&this.mount(e,this)},t}(__Plugin_138),___class_138.VERSION=_$package_139.version,___temp_138),_$exif_35={exports:{}};(function(){function e(e){return!!e.exifdata}function t(e,t){function n(n){var r=i(n);e.exifdata=r||{};var s=function(e){var t=new DataView(e);if(d&&console.log("Got file of length "+e.byteLength),255!=t.getUint8(0)||216!=t.getUint8(1))return d&&console.log("Not a valid JPEG"),!1;for(var n=2,i=e.byteLength,r=function(e,t){return 56===e.getUint8(t)&&66===e.getUint8(t+1)&&73===e.getUint8(t+2)&&77===e.getUint8(t+3)&&4===e.getUint8(t+4)&&4===e.getUint8(t+5)};n<i;){if(r(t,n)){var s=t.getUint8(n+7);return s%2!=0&&(s+=1),0===s&&(s=4),o(e,n+8+s,t.getUint16(n+6+s))}n++}}(n);if(e.iptcdata=s||{},h.isXmpEnabled){var l=function(e){if("DOMParser"in self){var t=new DataView(e);if(d&&console.log("Got file of length "+e.byteLength),255!=t.getUint8(0)||216!=t.getUint8(1))return d&&console.log("Not a valid JPEG"),!1;for(var n=2,i=e.byteLength,o=new DOMParser;n<i-4;){if("http"==a(t,n,4)){var r=n-1,s=t.getUint16(n-2)-1,l=a(t,r,s),c=l.indexOf("xmpmeta>")+8,h=(l=l.substring(l.indexOf("<x:xmpmeta"),c)).indexOf("x:xmpmeta")+10;return l=l.slice(0,h)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+l.slice(h),u(o.parseFromString(l,"text/xml"))}n++}}}(n);e.xmpdata=l||{}}t&&t.call(e)}if(e.src)if(/^data\:/i.test(e.src))n(function(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var n=atob(e),i=n.length,o=new ArrayBuffer(i),r=new Uint8Array(o),s=0;s<i;s++)r[s]=n.charCodeAt(s);return o}(e.src));else if(/^blob\:/i.test(e.src))(s=new FileReader).onload=function(e){n(e.target.result)},function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(e){var t;200!=this.status&&0!==this.status||(t=this.response,s.readAsArrayBuffer(t))},n.send()}(e.src);else{var r=new XMLHttpRequest;r.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";n(r.response),r=null},r.open("GET",e.src,!0),r.responseType="arraybuffer",r.send(null)}else if(self.FileReader&&(e instanceof self.Blob||e instanceof self.File)){var s;(s=new FileReader).onload=function(e){d&&console.log("Got file of length "+e.target.result.byteLength),n(e.target.result)},s.readAsArrayBuffer(e)}}function i(e){var t=new DataView(e);if(d&&console.log("Got file of length "+e.byteLength),255!=t.getUint8(0)||216!=t.getUint8(1))return d&&console.log("Not a valid JPEG"),!1;for(var n,i=2,o=e.byteLength;i<o;){if(255!=t.getUint8(i))return d&&console.log("Not a valid marker at offset "+i+", found: "+t.getUint8(i)),!1;if(n=t.getUint8(i+1),d&&console.log(n),225==n)return d&&console.log("Found 0xFFE1 marker"),l(t,i+4,t.getUint16(i+2));i+=2+t.getUint16(i+2)}}function o(e,t,n){for(var i,o,r,s,l=new DataView(e),c={},u=t;u<t+n;)28===l.getUint8(u)&&2===l.getUint8(u+1)&&(s=l.getUint8(u+2))in _&&(r=l.getInt16(u+3),o=_[s],i=a(l,u+5,r),c.hasOwnProperty(o)?c[o]instanceof Array?c[o].push(i):c[o]=[c[o],i]:c[o]=i),u++;return c}function r(e,t,n,i,o){var r,a,l,c=e.getUint16(n,!o),u={};for(l=0;l<c;l++)r=n+12*l+2,!(a=i[e.getUint16(r,!o)])&&d&&console.log("Unknown tag: "+e.getUint16(r,!o)),u[a]=s(e,r,t,n,o);return u}function s(e,t,n,i,o){var r,s,l,c,u,d,h=e.getUint16(t+2,!o),p=e.getUint32(t+4,!o),f=e.getUint32(t+8,!o)+n;switch(h){case 1:case 7:if(1==p)return e.getUint8(t+8,!o);for(r=p>4?f:t+8,s=[],c=0;c<p;c++)s[c]=e.getUint8(r+c);return s;case 2:return a(e,r=p>4?f:t+8,p-1);case 3:if(1==p)return e.getUint16(t+8,!o);for(r=p>2?f:t+8,s=[],c=0;c<p;c++)s[c]=e.getUint16(r+2*c,!o);return s;case 4:if(1==p)return e.getUint32(t+8,!o);for(s=[],c=0;c<p;c++)s[c]=e.getUint32(f+4*c,!o);return s;case 5:if(1==p)return u=e.getUint32(f,!o),d=e.getUint32(f+4,!o),(l=new Number(u/d)).numerator=u,l.denominator=d,l;for(s=[],c=0;c<p;c++)u=e.getUint32(f+8*c,!o),d=e.getUint32(f+4+8*c,!o),s[c]=new Number(u/d),s[c].numerator=u,s[c].denominator=d;return s;case 9:if(1==p)return e.getInt32(t+8,!o);for(s=[],c=0;c<p;c++)s[c]=e.getInt32(f+4*c,!o);return s;case 10:if(1==p)return e.getInt32(f,!o)/e.getInt32(f+4,!o);for(s=[],c=0;c<p;c++)s[c]=e.getInt32(f+8*c,!o)/e.getInt32(f+4+8*c,!o);return s}}function a(e,t,i){var o="";for(n=t;n<t+i;n++)o+=String.fromCharCode(e.getUint8(n));return o}function l(e,t){if("Exif"!=a(e,t,4))return d&&console.log("Not valid EXIF data! "+a(e,t,4)),!1;var n,i,o,s,l,c=t+6;if(18761==e.getUint16(c))n=!1;else{if(19789!=e.getUint16(c))return d&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;n=!0}if(42!=e.getUint16(c+2,!n))return d&&console.log("Not valid TIFF data! (no 0x002A)"),!1;var u=e.getUint32(c+4,!n);if(u<8)return d&&console.log("Not valid TIFF data! (First offset less than 8)",e.getUint32(c+4,!n)),!1;if((i=r(e,c,c+u,f,n)).ExifIFDPointer)for(o in s=r(e,c,c+i.ExifIFDPointer,p,n)){switch(o){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":s[o]=v[o][s[o]];break;case"ExifVersion":case"FlashpixVersion":s[o]=String.fromCharCode(s[o][0],s[o][1],s[o][2],s[o][3]);break;case"ComponentsConfiguration":s[o]=v.Components[s[o][0]]+v.Components[s[o][1]]+v.Components[s[o][2]]+v.Components[s[o][3]]}i[o]=s[o]}if(i.GPSInfoIFDPointer)for(o in l=r(e,c,c+i.GPSInfoIFDPointer,g,n)){switch(o){case"GPSVersionID":l[o]=l[o][0]+"."+l[o][1]+"."+l[o][2]+"."+l[o][3]}i[o]=l[o]}return i.thumbnail=function(e,t,n,i){var o=function(e,t,n){var i=e.getUint16(t,!n);return e.getUint32(t+2+12*i,!n)}(e,t+n,i);if(!o)return{};if(o>e.byteLength)return{};var s=r(e,t,t+o,m,i);if(s.Compression)switch(s.Compression){case 6:if(s.JpegIFOffset&&s.JpegIFByteCount){var a=t+s.JpegIFOffset,l=s.JpegIFByteCount;s.blob=new Blob([new Uint8Array(e.buffer,a,l)],{type:"image/jpeg"})}break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",s.Compression)}else 2==s.PhotometricInterpretation&&console.log("Thumbnail image format is RGB, which is not implemented.");return s}(e,c,u,n),i}function c(e){var t={};if(1==e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var n=0;n<e.attributes.length;n++){var i=e.attributes.item(n);t["@attributes"][i.nodeName]=i.nodeValue}}}else if(3==e.nodeType)return e.nodeValue;if(e.hasChildNodes())for(var o=0;o<e.childNodes.length;o++){var r=e.childNodes.item(o),s=r.nodeName;if(null==t[s])t[s]=c(r);else{if(null==t[s].push){var a=t[s];t[s]=[],t[s].push(a)}t[s].push(c(r))}}return t}function u(e){try{var t={};if(e.children.length>0)for(var n=0;n<e.children.length;n++){var i=e.children.item(n),o=i.attributes;for(var r in o){var s=o[r],a=s.nodeName,l=s.nodeValue;void 0!==a&&(t[a]=l)}var u=i.nodeName;if(void 0===t[u])t[u]=c(i);else{if(void 0===t[u].push){var d=t[u];t[u]=[],t[u].push(d)}t[u].push(c(i))}}else t=e.textContent;return t}catch(e){console.log(e.message)}}var d=!1,h=function(e){return e instanceof h?e:this instanceof h?void(this.EXIFwrapped=e):new h(e)};void 0!==_$exif_35.exports?(_$exif_35.exports&&(_$exif_35.exports=_$exif_35.exports=h),_$exif_35.exports.EXIF=h):this.EXIF=h;var p=h.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},f=h.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},g=h.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},m=h.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},v=h.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}},_={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};h.enableXmp=function(){h.isXmpEnabled=!0},h.disableXmp=function(){h.isXmpEnabled=!1},h.getData=function(n,i){return!((self.Image&&n instanceof self.Image||self.HTMLImageElement&&n instanceof self.HTMLImageElement)&&!n.complete||(e(n)?i&&i.call(n):t(n,i),0))},h.getTag=function(t,n){if(e(t))return t.exifdata[n]},h.getIptcTag=function(t,n){if(e(t))return t.iptcdata[n]},h.getAllTags=function(t){if(!e(t))return{};var n,i=t.exifdata,o={};for(n in i)i.hasOwnProperty(n)&&(o[n]=i[n]);return o},h.getAllIptcTags=function(t){if(!e(t))return{};var n,i=t.iptcdata,o={};for(n in i)i.hasOwnProperty(n)&&(o[n]=i[n]);return o},h.pretty=function(t){if(!e(t))return"";var n,i=t.exifdata,o="";for(n in i)i.hasOwnProperty(n)&&("object"==typeof i[n]?i[n]instanceof Number?o+=n+" : "+i[n]+" ["+i[n].numerator+"/"+i[n].denominator+"]\r\n":o+=n+" : ["+i[n].length+" values]\r\n":o+=n+" : "+i[n]+"\r\n");return o},h.readFromBinaryFile=function(e){return i(e)},"function"==typeof define&&define.amd&&define("exif-js",[],function(){return h})}).call(this),_$exif_35=_$exif_35.exports;var _$dataURItoBlob_201=function(e,t,n){var i=e.split(",")[1],o=t.mimeType||e.split(",")[0].split(":")[1].split(";")[0];null==o&&(o="plain/text");for(var r,s=atob(i),a=[],l=0;l<s.length;l++)a.push(s.charCodeAt(l));try{r=new Uint8Array(a)}catch(e){return null}return n?new File([r],t.name||"",{type:o}):new Blob([r],{type:o})},_$isObjectURL_221=function(e){return 0===e.indexOf("blob:")},_$imageOrientations_167={1:{rotation:0,xScale:1,yScale:1},2:{rotation:0,xScale:-1,yScale:1},3:{rotation:180,xScale:1,yScale:1},4:{rotation:180,xScale:-1,yScale:1},5:{rotation:90,xScale:1,yScale:-1},6:{rotation:90,xScale:1,yScale:1},7:{rotation:270,xScale:1,yScale:-1},8:{rotation:270,xScale:1,yScale:1}},_$package_169={version:"1.5.0"},___class_168,___temp_168,__Plugin_168=_$lib_93.Plugin,_$lib_168=(___temp_168=___class_168=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).onFileAdded=function(e){e.preview||i.addToQueue(e)},i.onFileRemoved=function(e){var t=i.queue.indexOf(e);-1!==t&&i.queue.splice(t,1),e.preview&&_$isObjectURL_221(e.preview)&&URL.revokeObjectURL(e.preview)},i.onRestored=function(){var e=i.uppy.getState().files;Object.keys(e).forEach(function(e){var t=i.uppy.getFile(e);t.isRestored&&(t.preview&&!_$isObjectURL_221(t.preview)||i.addToQueue(t))})},i.waitUntilAllProcessed=function(e){return e.forEach(function(e){var t=i.uppy.getFile(e);i.uppy.emit("preprocess-progress",t,{mode:"indeterminate",message:i.i18n("generatingThumbnails")})}),new Promise(function(e,t){i.queueProcessing?i.uppy.once("thumbnail:all-generated",function(){e()}):e()})},i.type="modifier",i.id=i.opts.id||"ThumbnailGenerator",i.title="Thumbnail Generator",i.queue=[],i.queueProcessing=!1,i.defaultThumbnailDimension=200,i.defaultLocale={strings:{generatingThumbnails:"Generating thumbnails..."}},i.opts=___extends_168({},{thumbnailWidth:null,thumbnailHeight:null,waitForThumbnailsBeforeUpload:!1},{},n),i.i18nInit(),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.setOptions=function(t){e.prototype.setOptions.call(this,t),this.i18nInit()},o.i18nInit=function(){this.translator=new _$Translator_199([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.setPluginState()},o.createThumbnail=function(e,t,n){var i=this,o=URL.createObjectURL(e.data),r=new Promise(function(e,t){var n=new Image;n.src=o,n.addEventListener("load",function(){URL.revokeObjectURL(o),e(n)}),n.addEventListener("error",function(e){URL.revokeObjectURL(o),t(e.error||new Error("Could not create thumbnail"))})});return Promise.all([r,this.getOrientation(e)]).then(function(e){var o=e[0],r=e[1],s=i.getProportionalDimensions(o,t,n,r.rotation),a=i.rotateImage(o,r),l=i.resizeImage(a,s.width,s.height);return i.canvasToBlob(l,"image/png")}).then(function(e){return URL.createObjectURL(e)})},o.getProportionalDimensions=function(e,t,n,i){var o=e.width/e.height;return 90!==i&&270!==i||(o=e.height/e.width),null!=t?{width:t,height:Math.round(t/o)}:null!=n?{width:Math.round(n*o),height:n}:{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/o)}},o.getOrientation=function(e){var t=this;return new Promise(function(n){var i=t.uppy;_$exif_35.getData(e.data,function(){var t=_$exif_35.getAllTags(this);delete t.thumbnail,i.setFileMeta(e.id,{exifdata:t});var o=_$exif_35.getTag(this,"Orientation")||1;n(_$imageOrientations_167[o])})})},o.protect=function(e){var t=e.width/e.height,n=Math.floor(Math.sqrt(5e6*t)),i=Math.floor(5e6/Math.sqrt(5e6*t));if(n>4096&&(n=4096,i=Math.round(n/t)),i>4096&&(i=4096,n=Math.round(t*i)),e.width>n){var o=document.createElement("canvas");o.width=n,o.height=i,o.getContext("2d").drawImage(e,0,0,n,i),e=o}return e},o.resizeImage=function(e,t,n){e=this.protect(e);var i=Math.ceil(Math.log(e.width/t)*Math.LOG2E);i<1&&(i=1)
;for(var o=t*Math.pow(2,i-1),r=n*Math.pow(2,i-1);i--;){var s=document.createElement("canvas");s.width=o,s.height=r,s.getContext("2d").drawImage(e,0,0,o,r),e=s,o=Math.round(o/2),r=Math.round(r/2)}return e},o.rotateImage=function(e,t){var n=e.width,i=e.height;90!==t.rotation&&270!==t.rotation||(n=e.height,i=e.width);var o=document.createElement("canvas");o.width=n,o.height=i;var r=o.getContext("2d");return r.translate(n/2,i/2),r.rotate(t.rotation*Math.PI/180),r.scale(t.xScale,t.yScale),r.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),o},o.canvasToBlob=function(e,t,n){try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){if(18===e.code)return Promise.reject(new Error("cannot read image, probably an svg with external resources"))}return e.toBlob?new Promise(function(i){e.toBlob(i,t,n)}).then(function(e){if(null===e)throw new Error("cannot read image, probably an svg with external resources");return e}):Promise.resolve().then(function(){return _$dataURItoBlob_201(e.toDataURL(t,n),{})}).then(function(e){if(null===e)throw new Error("could not extract blob, probably an old browser");return e})},o.setPreviewURL=function(e,t){this.uppy.setFileState(e,{preview:t})},o.addToQueue=function(e){this.queue.push(e),!1===this.queueProcessing&&this.processQueue()},o.processQueue=function(){var e=this;if(this.queueProcessing=!0,this.queue.length>0){var t=this.queue.shift();return this.requestThumbnail(t).catch(function(e){}).then(function(){return e.processQueue()})}this.queueProcessing=!1,this.uppy.log("[ThumbnailGenerator] Emptied thumbnail queue"),this.uppy.emit("thumbnail:all-generated")},o.requestThumbnail=function(e){var t=this;return _$isPreviewSupported_222(e.type)&&!e.isRemote?this.createThumbnail(e,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then(function(n){t.setPreviewURL(e.id,n),t.uppy.log("[ThumbnailGenerator] Generated thumbnail for "+e.id),t.uppy.emit("thumbnail:generated",t.uppy.getFile(e.id),n)}).catch(function(n){t.uppy.log("[ThumbnailGenerator] Failed thumbnail for "+e.id+":","warning"),t.uppy.log(n,"warning"),t.uppy.emit("thumbnail:error",t.uppy.getFile(e.id),n)}):Promise.resolve()},o.install=function(){this.uppy.on("file-added",this.onFileAdded),this.uppy.on("file-removed",this.onFileRemoved),this.uppy.on("restored",this.onRestored),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.addPreProcessor(this.waitUntilAllProcessed)},o.uninstall=function(){this.uppy.off("file-added",this.onFileAdded),this.uppy.off("file-removed",this.onFileRemoved),this.uppy.off("restored",this.onRestored),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.removePreProcessor(this.waitUntilAllProcessed)},t}(__Plugin_168),___class_168.VERSION=_$package_169.version,___temp_168),_$findAllDOMElements_203=function(e){if("string"==typeof e){var t=[].slice.call(document.querySelectorAll(e));return t.length>0?t:null}if("object"==typeof e&&_$isDOMElement_219(e))return[e]},_$toArray_229=function(e){return Array.prototype.slice.call(e||[],0)},_$getRelativePath_210=function(e){return e.fullPath&&e.fullPath!=="/"+e.name?e.fullPath:null},_$getFilesAndDirectoriesFromDirectory_209=function e(t,n,i,o){var r=o.onSuccess;t.readEntries(function(o){var s=[].concat(n,o);o.length?setTimeout(function(){e(t,s,i,{onSuccess:r})},0):r(s)},function(e){i(e),r(n)})},_$webkitGetAsEntryApi_211=function(e,t){var n=[],i=[];return _$toArray_229(e.items).forEach(function(e){var o=e.webkitGetAsEntry();o&&i.push(function e(i){return new Promise(function(o){if(i.isFile)i.file(function(e){e.relativePath=_$getRelativePath_210(i),n.push(e),o()},function(e){t(e),o()});else if(i.isDirectory){var r=i.createReader();_$getFilesAndDirectoriesFromDirectory_209(r,[],t,{onSuccess:function(t){var n=t.map(function(t){return e(t)});Promise.all(n).then(function(){return o()})}})}})}(o))}),Promise.all(i).then(function(){return n})},_$fallbackApi_208=function(e){var t=_$toArray_229(e.files);return Promise.resolve(t)},_$getDroppedFiles_207=function(e,t){var n=(void 0===t?{}:t).logDropError,i=void 0===n?function(){}:n;return e.items&&e.items[0]&&"webkitGetAsEntry"in e.items[0]?_$webkitGetAsEntryApi_211(e,i):_$fallbackApi_208(e)},_$getActiveOverlayEl_115=function(e,t){if(t){var n=e.querySelector('[data-uppy-paneltype="'+t+'"]');if(n)return n}return e},_$FOCUSABLE_ELEMENTS_196=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])'],_$trapFocus_119={forModal:function(e,t,n){trapFocus(e,t,n)},forInline:function(e,t,n){null===t||trapFocus(e,t,n)}},_$ResizeObserver_57={exports:{}};(function(e){!function(e,t){"object"==typeof _$ResizeObserver_57.exports?_$ResizeObserver_57.exports=t():"function"==typeof define&&define.amd?define(t):e.ResizeObserver=t()}(this,function(){"use strict";function t(e){return parseFloat(e)||0}function n(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return n.reduce(function(n,i){return n+t(e["border-"+i+"-width"])},0)}function i(e){return s?v(e)?function(e){var t=e.getBBox();return o(0,0,t.width,t.height)}(e):function(e){var i=e.clientWidth,r=e.clientHeight;if(!i&&!r)return m;var s=g(e).getComputedStyle(e),a=function(e){for(var n={},i=0,o=["top","right","bottom","left"];i<o.length;i++){var r=o[i],s=e["padding-"+r];n[r]=t(s)}return n}(s),l=a.left+a.right,c=a.top+a.bottom,u=t(s.width),d=t(s.height);if("border-box"===s.boxSizing&&(Math.round(u+l)!==i&&(u-=n(s,"left","right")+l),Math.round(d+c)!==r&&(d-=n(s,"top","bottom")+c)),!function(e){return e===g(e).document.documentElement}(e)){var h=Math.round(u+l)-i,p=Math.round(d+c)-r;1!==Math.abs(h)&&(u-=h),1!==Math.abs(p)&&(d-=p)}return o(a.left,a.top,u,d)}(e):m}function o(e,t,n,i){return{x:e,y:t,width:n,height:i}}var r=function(){function e(e,t){var n=-1;return e.some(function(e,i){return e[0]===t&&(n=i,!0)}),n}return"undefined"!=typeof Map?Map:function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(t,n){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,i=e(n,t);~i&&n.splice(i,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var o=i[n];e.call(t,o[1],o[0])}},t}()}(),s="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,a=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),l="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(a):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},c=2,u=20,d=["top","right","bottom","left","width","height","size","weight"],h="undefined"!=typeof MutationObserver,p=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){function n(){r&&(r=!1,e()),s&&o()}function i(){l(n)}function o(){var e=Date.now();if(r){if(e-a<c)return;s=!0}else r=!0,s=!1,setTimeout(i,t);a=e}var r=!1,s=!1,a=0;return o}(this.refresh.bind(this),u)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){s&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),h?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){s&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;d.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),f=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},g=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||a},m=o(0,0,0,0),v="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof g(e).SVGGraphicsElement}:function(e){return e instanceof g(e).SVGElement&&"function"==typeof e.getBBox},_=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=o(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=i(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),y=function(e,t){var n,i,o,r,s,a,l,c=(i=(n=t).x,o=n.y,r=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(a.prototype),f(l,{x:i,y:o,width:r,height:s,top:o,right:i+r,bottom:s+o,left:i}),l);f(this,{target:e,contentRect:c})},b=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new r,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof g(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new _(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof g(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new y(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new r,x=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=p.getInstance(),i=new b(t,n,this);w.set(this,i)};return["observe","unobserve","disconnect"].forEach(function(e){x.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}),void 0!==a.ResizeObserver?a.ResizeObserver:x})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),_$ResizeObserver_57=_$ResizeObserver_57.exports;var _$lodashDebounce_45={};(function(e){function t(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function n(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==o}(e))return i;if(t(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=t(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var u=a.test(e);return u||l.test(e)?c(e.slice(2),u?2:8):s.test(e)?i:+e}var i=NaN,o="[object Symbol]",r=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof e&&e&&e.Object===Object&&e,d="object"==typeof self&&self&&self.Object===Object&&self,h=u||d||Function("return this")(),p=Object.prototype.toString,f=Math.max,g=Math.min,m=function(){return h.Date.now()};_$lodashDebounce_45=function(e,i,o){function r(t){var n=u,i=d;return u=d=void 0,y=t,p=e.apply(i,n)}function s(e){var t=e-_;return void 0===_||t>=i||t<0||w&&e-y>=h}function a(){var e=m();if(s(e))return l(e);v=setTimeout(a,function(e){var t=i-(e-_);return w?g(t,h-(e-y)):t}(e))}function l(e){return v=void 0,x&&u?r(e):(u=d=void 0,p)}function c(){var e=m(),t=s(e);if(u=arguments,d=this,_=e,t){if(void 0===v)return function(e){return y=e,v=setTimeout(a,i),b?r(e):p}(_);if(w)return v=setTimeout(a,i),r(_)}return void 0===v&&(v=setTimeout(a,i)),p}var u,d,h,p,v,_,y=0,b=!1,w=!1,x=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i=n(i)||0,t(o)&&(b=!!o.leading,h=(w="maxWait"in o)?f(n(o.maxWait)||0,i):h,x="trailing"in o?!!o.trailing:x),c.cancel=function(){void 0!==v&&clearTimeout(v),y=0,u=_=d=v=void 0},c.flush=function(){return void 0===v?p:l(m())},c}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var _$createSuperFocus_114=function(){var e=!1;return _$lodashDebounce_45(function(t,n){var i=_$getActiveOverlayEl_115(t,n),o=i.contains(document.activeElement);if(!o||!e){var r=i.querySelector("[data-uppy-super-focusable]");if(!o||r)if(r)r.focus({preventScroll:!0}),e=!0;else{var s=i.querySelector(_$FOCUSABLE_ELEMENTS_196);s&&s.focus({preventScroll:!0}),e=!1}}},260)},_$memoizeOneCjs_47=function(e,t){var n;void 0===t&&(t=areInputsEqual);var i,o=[],r=!1;return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return r&&n===this&&t(a,o)?i:(i=e.apply(this,a),r=!0,n=this,o=a,i)}},_$package_121={version:"1.5.0"},___class_112,___temp_112,__Plugin_112=_$lib_93.Plugin,ResizeObserver=_$ResizeObserver_57.default||_$ResizeObserver_57,defaultPickerIcon=_$icons_111.defaultPickerIcon,memoize=_$memoizeOneCjs_47.default||_$memoizeOneCjs_47,_$lib_112=(___temp_112=___class_112=function(e){function t(t,n){var i;(i=e.call(this,t,n)||this).cancelUpload=function(e){i.uppy.removeFile(e)},i.saveFileCard=function(e,t){i.uppy.setFileMeta(t,e),i.toggleFileCard()},i._attachRenderFunctionToTarget=function(e){var t=i.uppy.getPlugin(e.id);return ___extends_112({},e,{icon:t.icon||i.opts.defaultPickerIcon,render:t.render})},i._isTargetSupported=function(e){var t=i.uppy.getPlugin(e.id);return"function"!=typeof t.isSupported||t.isSupported()},i._getAcquirers=memoize(function(e){return e.filter(function(e){return"acquirer"===e.type&&i._isTargetSupported(e)}).map(i._attachRenderFunctionToTarget)}),i._getProgressIndicators=memoize(function(e){return e.filter(function(e){return"progressindicator"===e.type}).map(i._attachRenderFunctionToTarget)}),i.id=i.opts.id||"Dashboard",i.title="Dashboard",i.type="orchestrator",i.modalName="uppy-Dashboard-"+_$cuid_13(),i.defaultLocale={strings:{closeModal:"Close Modal",importFrom:"Import from %{name}",addingMoreFiles:"Adding more files",addMoreFiles:"Add more files",dashboardWindowTitle:"File Uploader Window (Press escape to close)",dashboardTitle:"File Uploader",copyLinkToClipboardSuccess:"Link copied to clipboard",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",link:"Link",fileSource:"File source: %{name}",done:"Done",back:"Back",addMore:"Add more",removeFile:"Remove file",editFile:"Edit file",editing:"Editing %{file}",edit:"Edit",finishEditingFile:"Finish editing file",saveChanges:"Save changes",cancel:"Cancel",myDevice:"My Device",dropPasteImport:"Drop files here, paste, %{browse} or import from",dropPaste:"Drop files here, paste or %{browse}",dropHint:"Drop your files here",browse:"browse",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected",2:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files",2:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files",2:"Processing %{smart_count} files"},poweredBy:"Powered by"}};var o={target:"body",metaFields:[],trigger:"#uppy-select-files",inline:!1,width:750,height:550,thumbnailWidth:280,waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:defaultPickerIcon,showLinkToFileUploadResult:!0,showProgressDetails:!1,hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeCancelButtons:!1,hideProgressAfterFinish:!1,note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,proudlyDisplayPoweredByUppy:!0,onRequestCloseModal:function(){return i.closeModal()},showSelectedFiles:!0,browserBackButtonClose:!1};return i.opts=___extends_112({},o,{},n),i.i18nInit(),i.openModal=i.openModal.bind(___assertThisInitialized_112(i)),i.closeModal=i.closeModal.bind(___assertThisInitialized_112(i)),i.requestCloseModal=i.requestCloseModal.bind(___assertThisInitialized_112(i)),i.isModalOpen=i.isModalOpen.bind(___assertThisInitialized_112(i)),i.addTarget=i.addTarget.bind(___assertThisInitialized_112(i)),i.removeTarget=i.removeTarget.bind(___assertThisInitialized_112(i)),i.hideAllPanels=i.hideAllPanels.bind(___assertThisInitialized_112(i)),i.showPanel=i.showPanel.bind(___assertThisInitialized_112(i)),i.toggleFileCard=i.toggleFileCard.bind(___assertThisInitialized_112(i)),i.toggleAddFilesPanel=i.toggleAddFilesPanel.bind(___assertThisInitialized_112(i)),i.initEvents=i.initEvents.bind(___assertThisInitialized_112(i)),i.handlePopState=i.handlePopState.bind(___assertThisInitialized_112(i)),i.handleKeyDownInModal=i.handleKeyDownInModal.bind(___assertThisInitialized_112(i)),i.handleKeyDownInInline=i.handleKeyDownInInline.bind(___assertThisInitialized_112(i)),i.handleComplete=i.handleComplete.bind(___assertThisInitialized_112(i)),i.handleClickOutside=i.handleClickOutside.bind(___assertThisInitialized_112(i)),i.handlePaste=i.handlePaste.bind(___assertThisInitialized_112(i)),i.handlePasteOnBody=i.handlePasteOnBody.bind(___assertThisInitialized_112(i)),i.handleInputChange=i.handleInputChange.bind(___assertThisInitialized_112(i)),i.handleDragOver=i.handleDragOver.bind(___assertThisInitialized_112(i)),i.handleDragLeave=i.handleDragLeave.bind(___assertThisInitialized_112(i)),i.handleDrop=i.handleDrop.bind(___assertThisInitialized_112(i)),i.superFocusOnEachUpdate=i.superFocusOnEachUpdate.bind(___assertThisInitialized_112(i)),i.recordIfFocusedOnUppyRecently=i.recordIfFocusedOnUppyRecently.bind(___assertThisInitialized_112(i)),i.render=i.render.bind(___assertThisInitialized_112(i)),i.install=i.install.bind(___assertThisInitialized_112(i)),i.superFocus=_$createSuperFocus_114(),i.ifFocusedOnUppyRecently=!1,i.makeDashboardInsidesVisibleAnywayTimeout=null,i.removeDragOverClassTimeout=null,i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.setOptions=function(t){e.prototype.setOptions.call(this,t),this.i18nInit()},o.i18nInit=function(){this.translator=new _$Translator_199([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator),this.setPluginState()},o.removeTarget=function(e){var t=this.getPluginState().targets.filter(function(t){return t.id!==e.id});this.setPluginState({targets:t})},o.addTarget=function(e){var t=e.id||e.constructor.name,n=e.title||t,i=e.type;if("acquirer"===i||"progressindicator"===i||"presenter"===i){var o={id:t,name:n,type:i},r=this.getPluginState().targets.slice();return r.push(o),this.setPluginState({targets:r}),this.el}this.uppy.log("Dashboard: Modal can only be used by plugins of types: acquirer, progressindicator, presenter","error")},o.hideAllPanels=function(){this.setPluginState({activePickerPanel:!1,showAddFilesPanel:!1,activeOverlayType:null})},o.showPanel=function(e){var t=this.getPluginState().targets.filter(function(t){return"acquirer"===t.type&&t.id===e})[0];this.setPluginState({activePickerPanel:t,activeOverlayType:"PickerPanel"})},o.openModal=function(){var e=this,t=createPromise(),n=t.promise,i=t.resolve;return this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),this.opts.animateOpenClose&&this.getPluginState().isClosing?this.el.addEventListener("animationend",function t(){e.setPluginState({isHidden:!1}),e.el.removeEventListener("animationend",t,!1),i()},!1):(this.setPluginState({isHidden:!1}),i()),this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener("keydown",this.handleKeyDownInModal),this.uppy.emit("dashboard:modal-open"),n},o.closeModal=function(e){var t=this;void 0===e&&(e={});var n=e.manualClose,i=void 0===n||n,o=this.getPluginState(),r=o.isHidden,s=o.isClosing;if(!r&&!s){var a=createPromise(),l=a.promise,c=a.resolve;return this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.opts.animateOpenClose?(this.setPluginState({isClosing:!0}),this.el.addEventListener("animationend",function e(){t.setPluginState({isHidden:!0,isClosing:!1}),t.superFocus.cancel(),t.savedActiveElement.focus(),t.el.removeEventListener("animationend",e,!1),c()},!1)):(this.setPluginState({isHidden:!0}),this.superFocus.cancel(),this.savedActiveElement.focus(),c()),document.removeEventListener("keydown",this.handleKeyDownInModal),i&&this.opts.browserBackButtonClose&&history.state&&history.state[this.modalName]&&history.go(-1),this.uppy.emit("dashboard:modal-closed"),l}},o.isModalOpen=function(){return!this.getPluginState().isHidden||!1},o.requestCloseModal=function(){return this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal()},o.toggleFileCard=function(e){e?this.uppy.emit("dashboard:file-edit-start"):this.uppy.emit("dashboard:file-edit-complete"),this.setPluginState({fileCardFor:e||null,activeOverlayType:e?"FileCard":null})},o.toggleAddFilesPanel=function(e){this.setPluginState({showAddFilesPanel:e,activeOverlayType:e?"AddFiles":null})},o.addFile=function(e){try{this.uppy.addFile({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||null}})}catch(e){e.isRestriction||this.uppy.log(e)}},o.startListeningToResize=function(){var e=this;this.resizeObserver=new ResizeObserver(function(t,n){var i=t[0].contentRect,o=i.width,r=i.height;e.uppy.log("[Dashboard] resized: "+o+" / "+r,"debug"),e.setPluginState({containerWidth:o,containerHeight:r,areInsidesReadyToBeVisible:!0})}),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout(function(){var t=e.getPluginState(),n=!e.opts.inline&&t.isHidden;t.areInsidesReadyToBeVisible||n||(e.uppy.log("[Dashboard] resize event didn't fire on time: defaulted to mobile layout","debug"),e.setPluginState({areInsidesReadyToBeVisible:!0}))},1e3)},o.stopListeningToResize=function(){this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)},o.recordIfFocusedOnUppyRecently=function(e){this.el.contains(e.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())},o.updateBrowserHistory=function(){var e;history.state&&history.state[this.modalName]||history.pushState(___extends_112({},history.state,((e={})[this.modalName]=!0,e)),""),window.addEventListener("popstate",this.handlePopState,!1)},o.handlePopState=function(e){!this.isModalOpen()||e.state&&e.state[this.modalName]||this.closeModal({manualClose:!1}),!this.isModalOpen()&&e.state&&e.state[this.modalName]&&history.go(-1)},o.handleKeyDownInModal=function(e){27===e.keyCode&&this.requestCloseModal(e),9===e.keyCode&&_$trapFocus_119.forModal(e,this.getPluginState().activeOverlayType,this.el)},o.handleClickOutside=function(){this.opts.closeModalOnClickOutside&&this.requestCloseModal()},o.handlePaste=function(e){var t=this;this.uppy.iteratePlugins(function(t){"acquirer"===t.type&&t.handleRootPaste&&t.handleRootPaste(e)}),_$toArray_229(e.clipboardData.files).forEach(function(e){t.uppy.log("[Dashboard] File pasted"),t.addFile(e)})},o.handleInputChange=function(e){var t=this;e.preventDefault(),_$toArray_229(e.target.files).forEach(function(e){return t.addFile(e)})},o.handleDragOver=function(e){e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0})},o.handleDragLeave=function(e){var t=this;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout(function(){t.setPluginState({isDraggingOver:!1})},50)},o.handleDrop=function(e,t){var n=this;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),e.dataTransfer.dropEffect="copy",this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins(function(t){"acquirer"===t.type&&t.handleRootDrop&&t.handleRootDrop(e)});var i=!1;_$getDroppedFiles_207(e.dataTransfer,{logDropError:function(e){n.uppy.log(e,"error"),i||(n.uppy.info(e.message,"error"),i=!0)}}).then(function(e){e.length>0&&(n.uppy.log("[Dashboard] Files were dropped"),e.forEach(function(e){return n.addFile(e)}))})},o.handleKeyDownInInline=function(e){9===e.keyCode&&_$trapFocus_119.forInline(e,this.getPluginState().activeOverlayType,this.el)},o.handlePasteOnBody=function(e){this.el.contains(document.activeElement)&&this.handlePaste(e)},o.handleComplete=function(e){var t=e.failed;e.uploadID,this.opts.closeAfterFinish&&0===t.length&&this.requestCloseModal()},o.initEvents=function(){var e=this,t=_$findAllDOMElements_203(this.opts.trigger);!this.opts.inline&&t&&t.forEach(function(t){return t.addEventListener("click",e.openModal)}),this.opts.inline||t||this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options unless you are planning to call openModal() method yourself","error"),this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline)},o.removeEvents=function(){var e=this,t=_$findAllDOMElements_203(this.opts.trigger);!this.opts.inline&&t&&t.forEach(function(t){return t.removeEventListener("click",e.openModal)}),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline)},o.superFocusOnEachUpdate=function(){var e=this.el.contains(document.activeElement),t=document.activeElement===document.querySelector("body")||null===document.activeElement,n=this.uppy.getState().info.isHidden,i=!this.opts.inline;n&&(i||e||t&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()},o.afterUpdate=function(){this.superFocusOnEachUpdate()},o.render=function(e){var t=this.getPluginState(),n=e.files,i=e.capabilities,o=e.allowNewUpload,r=Object.keys(n).filter(function(e){return!n[e].progress.uploadStarted}),s=Object.keys(n).filter(function(e){return n[e].progress.uploadStarted}),a=Object.keys(n).filter(function(e){return n[e].isPaused}),l=Object.keys(n).filter(function(e){return n[e].progress.uploadComplete}),c=Object.keys(n).filter(function(e){return n[e].error}),u=Object.keys(n).filter(function(e){return!n[e].progress.uploadComplete&&n[e].progress.uploadStarted}),d=u.filter(function(e){return!n[e].isPaused}),h=Object.keys(n).filter(function(e){return n[e].progress.preprocess||n[e].progress.postprocess}),p=s.length>0,f=100===e.totalProgress&&l.length===Object.keys(n).length&&0===h.length,g=p&&c.length===s.length,m=0!==u.length&&a.length===u.length,v=this._getAcquirers(t.targets),_=this._getProgressIndicators(t.targets);return _$Dashboard_99({state:e,isHidden:t.isHidden,files:n,newFiles:r,uploadStartedFiles:s,completeFiles:l,erroredFiles:c,inProgressFiles:u,inProgressNotPausedFiles:d,processingFiles:h,isUploadStarted:p,isAllComplete:f,isAllErrored:g,isAllPaused:m,totalFileCount:Object.keys(n).length,totalProgress:e.totalProgress,allowNewUpload:o,acquirers:v,activePickerPanel:t.activePickerPanel,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,getPlugin:this.uppy.getPlugin,progressindicators:_,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,log:this.uppy.log,i18n:this.i18n,i18nArray:this.i18nArray,addFile:this.uppy.addFile,removeFile:this.uppy.removeFile,info:this.uppy.info,note:this.opts.note,metaFields:t.metaFields,resumableUploads:i.resumableUploads||!1,individualCancellation:i.individualCancellation,pauseUpload:this.uppy.pauseResume,retryUpload:this.uppy.retryUpload,cancelUpload:this.cancelUpload,cancelAll:this.uppy.cancelAll,fileCardFor:t.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:t.showAddFilesPanel,saveFileCard:this.saveFileCard,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,
proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,containerWidth:t.containerWidth,areInsidesReadyToBeVisible:t.areInsidesReadyToBeVisible,isTargetDOMEl:this.isTargetDOMEl,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,showSelectedFiles:this.opts.showSelectedFiles,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop})},o.discoverProviderPlugins=function(){var e=this;this.uppy.iteratePlugins(function(t){t&&!t.target&&t.opts&&t.opts.target===e.constructor&&e.addTarget(t)})},o.install=function(){var e=this;this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});var t=this.opts,n=t.inline,i=t.closeAfterFinish;if(n&&i)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");this.uppy.opts.allowMultipleUploads&&i&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploads` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");var o=this.opts.target;o&&this.mount(o,this),(this.opts.plugins||[]).forEach(function(t){var n=e.uppy.getPlugin(t);n&&n.mount(e,n)}),this.opts.disableStatusBar||this.uppy.use(_$lib_161,{id:this.id+":StatusBar",target:this,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,showProgressDetails:this.opts.showProgressDetails,hideAfterFinish:this.opts.hideProgressAfterFinish,locale:this.opts.locale}),this.opts.disableInformer||this.uppy.use(_$lib_138,{id:this.id+":Informer",target:this}),this.opts.disableThumbnailGenerator||this.uppy.use(_$lib_168,{id:this.id+":ThumbnailGenerator",thumbnailWidth:this.opts.thumbnailWidth,waitForThumbnailsBeforeUpload:this.opts.waitForThumbnailsBeforeUpload}),this.discoverProviderPlugins(),this.initEvents()},o.uninstall=function(){var e=this;if(!this.opts.disableInformer){var t=this.uppy.getPlugin(this.id+":Informer");t&&this.uppy.removePlugin(t)}if(!this.opts.disableStatusBar){var n=this.uppy.getPlugin(this.id+":StatusBar");n&&this.uppy.removePlugin(n)}if(!this.opts.disableThumbnailGenerator){var i=this.uppy.getPlugin(this.id+":ThumbnailGenerator");i&&this.uppy.removePlugin(i)}(this.opts.plugins||[]).forEach(function(t){var n=e.uppy.getPlugin(t);n&&n.unmount()}),this.unmount(),this.removeEvents()},t}(__Plugin_112),___class_112.VERSION=_$package_121.version,___temp_112),_$isDragDropSupported_220=function(){var e=document.createElement("div");return"draggable"in e&&"ondragstart"in e&&"ondrop"in e&&"FormData"in window&&"FileReader"in window},_$package_123={version:"1.4.0"},___class_122,___temp_122,__Plugin_122=_$lib_93.Plugin,__h_122=_$preact_53.h,_$lib_122=(___temp_122=___class_122=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).type="acquirer",i.id=i.opts.id||"DragDrop",i.title="Drag & Drop",i.defaultLocale={strings:{dropHereOr:"Drop files here or %{browse}",browse:"browse"}},i.opts=___extends_122({},{target:null,inputName:"files[]",width:"100%",height:"100%",note:null},{},n),i.isDragDropSupported=_$isDragDropSupported_220(),i.removeDragOverClassTimeout=null,i.i18nInit(),i.handleInputChange=i.handleInputChange.bind(___assertThisInitialized_122(i)),i.handleDragOver=i.handleDragOver.bind(___assertThisInitialized_122(i)),i.handleDragLeave=i.handleDragLeave.bind(___assertThisInitialized_122(i)),i.handleDrop=i.handleDrop.bind(___assertThisInitialized_122(i)),i.addFile=i.addFile.bind(___assertThisInitialized_122(i)),i.render=i.render.bind(___assertThisInitialized_122(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.setOptions=function(t){e.prototype.setOptions.call(this,t),this.i18nInit()},o.i18nInit=function(){this.translator=new _$Translator_199([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator),this.setPluginState()},o.addFile=function(e){try{this.uppy.addFile({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||null}})}catch(e){e.isRestriction||this.uppy.log(e)}},o.handleInputChange=function(e){this.uppy.log("[DragDrop] Files selected through input"),_$toArray_229(e.target.files).forEach(this.addFile),e.target.value=null},o.handleDrop=function(e,t){var n=this;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),e.dataTransfer.dropEffect="copy",this.setPluginState({isDraggingOver:!1}),this.uppy.log("[DragDrop] Files were dropped"),_$getDroppedFiles_207(e.dataTransfer,{logDropError:function(e){n.uppy.log(e,"error")}}).then(function(e){e.forEach(n.addFile)})},o.handleDragOver=function(e){e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0})},o.handleDragLeave=function(e){var t=this;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout(function(){t.setPluginState({isDraggingOver:!1})},50)},o.renderHiddenFileInput=function(){var e=this,t=this.uppy.opts.restrictions;return __h_122("input",{class:"uppy-DragDrop-input",type:"file",tabindex:-1,focusable:"false",ref:function(t){e.fileInputRef=t},name:this.opts.inputName,multiple:1!==t.maxNumberOfFiles,accept:t.allowedFileTypes,onchange:this.handleInputChange})},o.renderArrowSvg=function(){return __h_122("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon uppy-DragDrop-arrow",width:"16",height:"16",viewBox:"0 0 16 16"},__h_122("path",{d:"M11 10V0H5v10H2l6 6 6-6h-3zm0 0","fill-rule":"evenodd"}))},o.renderLabel=function(){return __h_122("div",{class:"uppy-DragDrop-label"},this.i18nArray("dropHereOr",{browse:__h_122("span",{class:"uppy-DragDrop-browse"},this.i18n("browse"))}))},o.renderNote=function(){return __h_122("span",{class:"uppy-DragDrop-note"},this.opts.note)},o.render=function(e){var t=this,n="\n      uppy-Root\n      uppy-u-reset\n      uppy-DragDrop-container\n      "+(this.isDragDropSupported?"uppy-DragDrop--is-dragdrop-supported":"")+"\n      "+(this.getPluginState().isDraggingOver?"uppy-DragDrop--isDraggingOver":"")+"\n    ",i={width:this.opts.width,height:this.opts.height};return __h_122("button",{type:"button",class:n,style:i,onClick:function(){return t.fileInputRef.click()},onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},this.renderHiddenFileInput(),__h_122("div",{class:"uppy-DragDrop-inner"},this.renderArrowSvg(),this.renderLabel(),this.renderNote()))},o.install=function(){this.setPluginState({isDraggingOver:!1});var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.unmount()},t}(__Plugin_122),___class_122.VERSION=_$package_123.version,___temp_122),_$package_127={version:"1.4.0"},___class_126,___temp_126,__Plugin_126=_$lib_93.Plugin,__h_126=_$preact_53.h,_$lib_126=(___temp_126=___class_126=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).id=i.opts.id||"FileInput",i.title="File Input",i.type="acquirer",i.defaultLocale={strings:{chooseFiles:"Choose files"}},i.opts=___extends_126({},{target:null,pretty:!0,inputName:"files[]"},{},n),i.i18nInit(),i.render=i.render.bind(___assertThisInitialized_126(i)),i.handleInputChange=i.handleInputChange.bind(___assertThisInitialized_126(i)),i.handleClick=i.handleClick.bind(___assertThisInitialized_126(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.setOptions=function(t){e.prototype.setOptions.call(this,t),this.i18nInit()},o.i18nInit=function(){this.translator=new _$Translator_199([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator),this.setPluginState()},o.handleInputChange=function(e){var t=this;this.uppy.log("[FileInput] Something selected through input..."),_$toArray_229(e.target.files).forEach(function(e){try{t.uppy.addFile({source:t.id,name:e.name,type:e.type,data:e})}catch(e){e.isRestriction||t.uppy.log(e)}}),e.target.value=null},o.handleClick=function(e){this.input.click()},o.render=function(e){var t=this,n=this.uppy.opts.restrictions,i=n.allowedFileTypes?n.allowedFileTypes.join(","):null;return __h_126("div",{class:"uppy-Root uppy-FileInput-container"},__h_126("input",{class:"uppy-FileInput-input",style:this.opts.pretty&&{width:"0.1px",height:"0.1px",opacity:0,overflow:"hidden",position:"absolute",zIndex:-1},type:"file",name:this.opts.inputName,onchange:this.handleInputChange,multiple:1!==n.maxNumberOfFiles,accept:i,ref:function(e){t.input=e}}),this.opts.pretty&&__h_126("button",{class:"uppy-FileInput-btn",type:"button",onclick:this.handleClick},this.i18n("chooseFiles")))},o.install=function(){var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.unmount()},t}(__Plugin_126),___class_126.VERSION=_$package_127.version,___temp_126),_$package_143={version:"1.3.2"},___class_142,___temp_142,__Plugin_142=_$lib_93.Plugin,__h_142=_$preact_53.h,_$lib_142=(___temp_142=___class_142=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).id=i.opts.id||"ProgressBar",i.title="Progress Bar",i.type="progressindicator",i.opts=___extends_142({},{target:"body",replaceTargetContent:!1,fixed:!1,hideAfterFinish:!0},n),i.render=i.render.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.render=function(e){var t=e.totalProgress||0,n=100===t&&this.opts.hideAfterFinish;return __h_142("div",{class:"uppy uppy-ProgressBar",style:{position:this.opts.fixed?"fixed":"initial"},"aria-hidden":n},__h_142("div",{class:"uppy-ProgressBar-inner",style:{width:t+"%"}}),__h_142("div",{class:"uppy-ProgressBar-percentage"},t))},o.install=function(){var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.unmount()},t}(__Plugin_142),___class_142.VERSION=_$package_143.version,___temp_142),_$package_125={version:"1.3.3"},___class_124,___temp_124,__Plugin_124=_$lib_93.Plugin,__Provider_124=_$lib_89.Provider,__h_124=_$preact_53.h,_$lib_124=(___temp_124=___class_124=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).id=i.opts.id||"Dropbox",__Provider_124.initPlugin(___assertThisInitialized_124(i),n),i.title=i.opts.title||"Dropbox",i.icon=function(){return __h_124("svg",{"aria-hidden":"true",focusable:"false",width:"128",height:"128",viewBox:"0 0 128 128"},__h_124("path",{d:"M31.997 11L64 31.825 31.997 52.651 0 31.825 31.997 11zM96 11l32 20.825-32 20.826-32-20.826L96 11zM0 73.476l31.997-20.825L64 73.476 31.997 94.302 0 73.476zm96-20.825l32 20.825-32 20.826-32-20.826 32-20.825zm-64.508 48.254l32.003-20.826 31.997 20.826-31.997 20.825-32.003-20.825z",fill:"#0260FF","fill-rule":"nonzero"}))},i.provider=new __Provider_124(t,{companionUrl:i.opts.companionUrl,companionHeaders:i.opts.companionHeaders||i.opts.serverHeaders,storage:i.opts.storage,provider:"dropbox",pluginId:i.id}),i.onFirstRender=i.onFirstRender.bind(___assertThisInitialized_124(i)),i.render=i.render.bind(___assertThisInitialized_124(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.install=function(){this.view=new _$lib_155(this,{provider:this.provider}),this.setPluginState({authenticated:!1,files:[],folders:[],directories:[],activeRow:-1,filterInput:"",isSearchVisible:!1});var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.view.tearDown(),this.unmount()},o.onFirstRender=function(){return this.view.getFolder()},o.render=function(e){return this.view.render(e)},t}(__Plugin_124),___class_124.VERSION=_$package_125.version,___temp_124),_$DriveProviderViews_135=function(e){function t(){return e.apply(this,arguments)||this}var n,i;return i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i,t.prototype.toggleCheckbox=function(t,n){t.stopPropagation(),t.preventDefault(),n.custom.isTeamDrive||n.custom.isSharedDrive||e.prototype.toggleCheckbox.call(this,t,n)},t}(_$lib_155),_$package_137={version:"1.3.3"},___class_136,___temp_136,__Plugin_136=_$lib_93.Plugin,__Provider_136=_$lib_89.Provider,__h_136=_$preact_53.h,_$lib_136=(___temp_136=___class_136=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).id=i.opts.id||"GoogleDrive",i.title=i.opts.title||"Google Drive",__Provider_136.initPlugin(___assertThisInitialized_136(i),n),i.title=i.opts.title||"Google Drive",i.icon=function(){return __h_136("svg",{"aria-hidden":"true",focusable:"false",width:"18px",height:"16px",viewBox:"0 0 18 16",version:"1.1"},__h_136("g",{"fill-rule":"evenodd"},__h_136("polygon",{fill:"#3089FC",points:"6.32475 10.2 18 10.2 14.999625 15.3 3.324375 15.3"}),__h_136("polygon",{fill:"#00A85D",points:"3.000375 15.3 0 10.2 5.83875 0.275974026 8.838 5.37597403 5.999625 10.2"}),__h_136("polygon",{fill:"#FFD024",points:"11.838375 9.92402597 5.999625 0 12.000375 0 17.839125 9.92402597"})))},i.provider=new __Provider_136(t,{companionUrl:i.opts.companionUrl,companionHeaders:i.opts.companionHeaders||i.opts.serverHeaders,storage:i.opts.storage,provider:"drive",authProvider:"google",pluginId:i.id}),i.onFirstRender=i.onFirstRender.bind(___assertThisInitialized_136(i)),i.render=i.render.bind(___assertThisInitialized_136(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.install=function(){this.view=new _$DriveProviderViews_135(this,{provider:this.provider}),this.setPluginState({authenticated:!1,files:[],folders:[],directories:[],activeRow:-1,filterInput:"",isSearchVisible:!1,hasTeamDrives:!1,teamDrives:[],teamDriveId:""});var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.view.tearDown(),this.unmount()},o.onFirstRender=function(){return this.view.getFolder("root","/")},o.render=function(e){return this.view.render(e)},t}(__Plugin_136),___class_136.VERSION=_$package_137.version,___temp_136),_$package_141={version:"1.3.3"},___class_140,___temp_140,__Plugin_140=_$lib_93.Plugin,__Provider_140=_$lib_89.Provider,__h_140=_$preact_53.h,_$lib_140=(___temp_140=___class_140=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).id=i.opts.id||"Instagram",__Provider_140.initPlugin(___assertThisInitialized_140(i),n),i.title=i.opts.title||"Instagram",i.icon=function(){return __h_140("svg",{"aria-hidden":"true",focusable:"false",fill:"#DE3573",width:"28",height:"28",viewBox:"0 0 512 512"},__h_140("path",{d:"M256,49.471c67.266,0,75.233.257,101.8,1.469,24.562,1.121,37.9,5.224,46.778,8.674a78.052,78.052,0,0,1,28.966,18.845,78.052,78.052,0,0,1,18.845,28.966c3.45,8.877,7.554,22.216,8.674,46.778,1.212,26.565,1.469,34.532,1.469,101.8s-0.257,75.233-1.469,101.8c-1.121,24.562-5.225,37.9-8.674,46.778a83.427,83.427,0,0,1-47.811,47.811c-8.877,3.45-22.216,7.554-46.778,8.674-26.56,1.212-34.527,1.469-101.8,1.469s-75.237-.257-101.8-1.469c-24.562-1.121-37.9-5.225-46.778-8.674a78.051,78.051,0,0,1-28.966-18.845,78.053,78.053,0,0,1-18.845-28.966c-3.45-8.877-7.554-22.216-8.674-46.778-1.212-26.564-1.469-34.532-1.469-101.8s0.257-75.233,1.469-101.8c1.121-24.562,5.224-37.9,8.674-46.778A78.052,78.052,0,0,1,78.458,78.458a78.053,78.053,0,0,1,28.966-18.845c8.877-3.45,22.216-7.554,46.778-8.674,26.565-1.212,34.532-1.469,101.8-1.469m0-45.391c-68.418,0-77,.29-103.866,1.516-26.815,1.224-45.127,5.482-61.151,11.71a123.488,123.488,0,0,0-44.62,29.057A123.488,123.488,0,0,0,17.3,90.982C11.077,107.007,6.819,125.319,5.6,152.134,4.369,179,4.079,187.582,4.079,256S4.369,333,5.6,359.866c1.224,26.815,5.482,45.127,11.71,61.151a123.489,123.489,0,0,0,29.057,44.62,123.486,123.486,0,0,0,44.62,29.057c16.025,6.228,34.337,10.486,61.151,11.71,26.87,1.226,35.449,1.516,103.866,1.516s77-.29,103.866-1.516c26.815-1.224,45.127-5.482,61.151-11.71a128.817,128.817,0,0,0,73.677-73.677c6.228-16.025,10.486-34.337,11.71-61.151,1.226-26.87,1.516-35.449,1.516-103.866s-0.29-77-1.516-103.866c-1.224-26.815-5.482-45.127-11.71-61.151a123.486,123.486,0,0,0-29.057-44.62A123.487,123.487,0,0,0,421.018,17.3C404.993,11.077,386.681,6.819,359.866,5.6,333,4.369,324.418,4.079,256,4.079h0Z"}),__h_140("path",{d:"M256,126.635A129.365,129.365,0,1,0,385.365,256,129.365,129.365,0,0,0,256,126.635Zm0,213.338A83.973,83.973,0,1,1,339.974,256,83.974,83.974,0,0,1,256,339.973Z"}),__h_140("circle",{cx:"390.476",cy:"121.524",r:"30.23"}))},i.provider=new __Provider_140(t,{companionUrl:i.opts.companionUrl,companionHeaders:i.opts.companionHeaders||i.opts.serverHeaders,storage:i.opts.storage,provider:"instagram",authProvider:"instagram",pluginId:i.id}),i.onFirstRender=i.onFirstRender.bind(___assertThisInitialized_140(i)),i.render=i.render.bind(___assertThisInitialized_140(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.install=function(){this.view=new _$lib_155(this,{provider:this.provider,viewType:"grid",showTitles:!1,showFilter:!1,showBreadcrumbs:!1}),this.setPluginState({authenticated:!1,files:[],folders:[],directories:[],activeRow:-1,filterInput:"",isSearchVisible:!1});var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.view.tearDown(),this.unmount()},o.onFirstRender=function(){this.view.getFolder("recent")},o.render=function(e){return this.view.render(e)},t}(__Plugin_140),___class_140.VERSION=_$package_141.version,___temp_140),__h_191=_$preact_53.h,UrlUI=function(e){function t(t){var n;return(n=e.call(this,t)||this).handleKeyPress=n.handleKeyPress.bind(___assertThisInitialized_191(n)),n.handleClick=n.handleClick.bind(___assertThisInitialized_191(n)),n}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.componentDidMount=function(){this.input.value=""},o.handleKeyPress=function(e){13===e.keyCode&&this.props.addFile(this.input.value)},o.handleClick=function(){this.props.addFile(this.input.value)},o.render=function(){var e=this;return __h_191("div",{class:"uppy-Url"},__h_191("input",{class:"uppy-u-reset uppy-c-textInput uppy-Url-input",type:"text","aria-label":this.props.i18n("enterUrlToImport"),placeholder:this.props.i18n("enterUrlToImport"),onkeyup:this.handleKeyPress,ref:function(t){e.input=t},"data-uppy-super-focusable":!0}),__h_191("button",{class:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton",type:"button",onclick:this.handleClick},this.props.i18n("import")))},t}(_$preact_53.Component),_$UrlUI_191=UrlUI,_$forEachDroppedOrPastedUrl_193=function(e,t,n){var i,o=_$toArray_229(e.items);switch(t){case"paste":if(o.some(function(e){return"file"===e.kind}))return;i=o.filter(function(e){return"string"===e.kind&&"text/plain"===e.type});break;case"drop":i=o.filter(function(e){return"string"===e.kind&&"text/uri-list"===e.type});break;default:throw new Error("isDropOrPaste must be either 'drop' or 'paste', but it's "+t)}i.forEach(function(e){e.getAsString(function(e){return n(e)})})},_$package_194={version:"1.4.0"},___class_192,___temp_192,__Plugin_192=_$lib_93.Plugin,__h_192=_$preact_53.h,__RequestClient_192=_$lib_89.RequestClient,_$lib_192=(___temp_192=___class_192=function(e){function t(t,n){var i;if((i=e.call(this,t,n)||this).id=i.opts.id||"Url",i.title=i.opts.title||"Link",i.type="acquirer",i.icon=function(){return __h_192(UrlIcon,null)},i.defaultLocale={strings:{import:"Import",enterUrlToImport:"Enter URL to import a file",failedToFetch:"Companion failed to fetch this URL, please make sure it’s correct",enterCorrectUrl:"Incorrect URL: Please make sure you are entering a direct link to a file"}},i.opts=___extends_192({},{},{},n),i.i18nInit(),i.hostname=i.opts.companionUrl,!i.hostname)throw new Error("Companion hostname is required, please consult https://uppy.io/docs/companion");return i.getMeta=i.getMeta.bind(___assertThisInitialized_192(i)),i.addFile=i.addFile.bind(___assertThisInitialized_192(i)),i.handleRootDrop=i.handleRootDrop.bind(___assertThisInitialized_192(i)),i.handleRootPaste=i.handleRootPaste.bind(___assertThisInitialized_192(i)),i.client=new __RequestClient_192(t,{companionUrl:i.opts.companionUrl,companionHeaders:i.opts.companionHeaders||i.opts.serverHeaders}),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.setOptions=function(t){e.prototype.setOptions.call(this,t),this.i18nInit()},o.i18nInit=function(){this.translator=new _$Translator_199([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator),this.setPluginState()},o.getFileNameFromUrl=function(e){return e.substring(e.lastIndexOf("/")+1)},o.checkIfCorrectURL=function(e){if(!e)return!1;var t=e.match(/^([a-z0-9]+):\/\//)[1];return"http"===t||"https"===t},o.addProtocolToURL=function(e){return/^[a-z0-9]+:\/\//.test(e)?e:"http://"+e},o.getMeta=function(e){var t=this;return this.client.post("url/meta",{url:e}).then(function(e){if(e.error)throw t.uppy.log("[URL] Error:"),t.uppy.log(e.error),new Error("Failed to fetch the file");return e})},o.addFile=function(e){var t=this;return e=this.addProtocolToURL(e),this.checkIfCorrectURL(e)?this.getMeta(e).then(function(n){return{source:t.id,name:t.getFileNameFromUrl(e),type:n.type,data:{size:n.size},isRemote:!0,body:{url:e},remote:{companionUrl:t.opts.companionUrl,url:t.hostname+"/url/get",body:{fileId:e,url:e},providerOptions:t.client.opts}}}).then(function(e){t.uppy.log("[Url] Adding remote file");try{t.uppy.addFile(e)}catch(e){e.isRestriction||t.uppy.log(e)}}).catch(function(e){t.uppy.log(e),t.uppy.info({message:t.i18n("failedToFetch"),details:e},"error",4e3)}):(this.uppy.log("[URL] Incorrect URL entered: "+e),void this.uppy.info(this.i18n("enterCorrectUrl"),"error",4e3))},o.handleRootDrop=function(e){var t=this;_$forEachDroppedOrPastedUrl_193(e.dataTransfer,"drop",function(e){t.uppy.log("[URL] Adding file from dropped url: "+e),t.addFile(e)})},o.handleRootPaste=function(e){var t=this;_$forEachDroppedOrPastedUrl_193(e.clipboardData,"paste",function(e){t.uppy.log("[URL] Adding file from pasted url: "+e),t.addFile(e)})},o.render=function(e){return __h_192(_$UrlUI_191,{i18n:this.i18n,addFile:this.addFile})},o.install=function(){var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.unmount()},t}(__Plugin_192),___class_192.VERSION=_$package_194.version,___temp_192),mimeToExtensions={"video/ogg":"ogv","audio/ogg":"ogg","video/webm":"webm","audio/webm":"webm","video/x-matroska":"mkv","video/mp4":"mp4","audio/mp3":"mp3"},_$getFileTypeExtension_214=function(e){return e=e.replace(/;.*$/,""),mimeToExtensions[e]||null},_$canvasToBlob_200=function(e,t,n){return e.toBlob?new Promise(function(i){e.toBlob(i,t,n)}):Promise.resolve().then(function(){return _$dataURItoBlob_201(e.toDataURL(t,n),{})})},_$supportsMediaRecorder_236=function(){return"function"==typeof MediaRecorder&&!!MediaRecorder.prototype&&"function"==typeof MediaRecorder.prototype.start},__h_230=_$preact_53.h,_$CameraIcon_230=function(e){return __h_230("svg",{"aria-hidden":"true",focusable:"false",fill:"#0097DC",width:"66",height:"55",viewBox:"0 0 66 55"},__h_230("path",{d:"M57.3 8.433c4.59 0 8.1 3.51 8.1 8.1v29.7c0 4.59-3.51 8.1-8.1 8.1H8.7c-4.59 0-8.1-3.51-8.1-8.1v-29.7c0-4.59 3.51-8.1 8.1-8.1h9.45l4.59-7.02c.54-.54 1.35-1.08 2.16-1.08h16.2c.81 0 1.62.54 2.16 1.08l4.59 7.02h9.45zM33 14.64c-8.62 0-15.393 6.773-15.393 15.393 0 8.62 6.773 15.393 15.393 15.393 8.62 0 15.393-6.773 15.393-15.393 0-8.62-6.773-15.393-15.393-15.393zM33 40c-5.648 0-9.966-4.319-9.966-9.967 0-5.647 4.318-9.966 9.966-9.966s9.966 4.319 9.966 9.966C42.966 35.681 38.648 40 33 40z","fill-rule":"evenodd"}))},__h_234=_$preact_53.h,_$SnapshotButton_234=function(e){var t=e.onSnapshot,n=e.i18n;return __h_234("button",{class:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--picture",type:"button",title:n("takePicture"),"aria-label":n("takePicture"),onclick:t,"data-uppy-super-focusable":!0},_$CameraIcon_230())},__h_233=_$preact_53.h,_$RecordButton_233=function(e){var t=e.recording,n=e.onStartRecording,i=e.onStopRecording,o=e.i18n;return t?__h_233("button",{class:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--video",type:"button",title:o("stopRecording"),"aria-label":o("stopRecording"),onclick:i,"data-uppy-super-focusable":!0},__h_233("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"100",height:"100",viewBox:"0 0 100 100"},__h_233("rect",{x:"15",y:"15",width:"70",height:"70"}))):__h_233("button",{class:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--video",type:"button",title:o("startRecording"),"aria-label":o("startRecording"),onclick:n,"data-uppy-super-focusable":!0},__h_233("svg",{"aria-hidden":"true",focusable:"false",class:"UppyIcon",width:"100",height:"100",viewBox:"0 0 100 100"},__h_233("circle",{cx:"50",cy:"50",r:"40"})))},__h_231=_$preact_53.h,__Component_231=_$preact_53.Component,CameraScreen=function(e){function t(){return e.apply(this,arguments)||this}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.componentDidMount=function(){this.props.onFocus()},o.componentWillUnmount=function(){this.props.onStop()},o.render=function(){var e=this.props.supportsRecording&&(isModeAvailable(this.props.modes,"video-only")||isModeAvailable(this.props.modes,"audio-only")||isModeAvailable(this.props.modes,"video-audio")),t=isModeAvailable(this.props.modes,"picture");return __h_231("div",{class:"uppy uppy-Webcam-container"},__h_231("div",{class:"uppy-Webcam-videoContainer"},__h_231("video",{class:"uppy-Webcam-video  "+(this.props.mirror?"uppy-Webcam-video--mirrored":""),autoplay:!0,muted:!0,playsinline:!0,srcObject:this.props.src||""})),__h_231("div",{class:"uppy-Webcam-buttonContainer"},t?_$SnapshotButton_234(this.props):null," ",e?_$RecordButton_233(this.props):null))},t}(__Component_231),_$CameraScreen_231=CameraScreen,__h_232=_$preact_53.h,_$PermissionsScreen_232=function(e){return __h_232("div",{class:"uppy-Webcam-permissons"},__h_232("div",{class:"uppy-Webcam-permissonsIcon"},e.icon()),__h_232("h1",{class:"uppy-Webcam-title"},e.i18n("allowAccessTitle")),__h_232("p",null,e.i18n("allowAccessDescription")))},_$package_237={version:"1.4.0"},___class_235,___temp_235,__h_235=_$preact_53.h,__Plugin_235=_$lib_93.Plugin,_$lib_235=(___temp_235=___class_235=function(e){function t(t,n){var i;(i=e.call(this,t,n)||this).mediaDevices=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)return navigator.mediaDevices;var e=navigator.mozGetUserMedia||navigator.webkitGetUserMedia;return e?{getUserMedia:function(t){return new Promise(function(n,i){e.call(navigator,t,n,i)})}}:null}(),i.supportsUserMedia=!!i.mediaDevices,i.protocol=location.protocol.match(/https/i)?"https":"http",i.id=i.opts.id||"Webcam",i.title=i.opts.title||"Camera",i.type="acquirer",i.icon=_$CameraIcon_230,i.defaultLocale={strings:{smile:"Smile!",takePicture:"Take a picture",startRecording:"Begin video recording",stopRecording:"Stop video recording",allowAccessTitle:"Please allow access to your camera",allowAccessDescription:"In order to take pictures or record video with your camera, please allow camera access for this site."}};var o={onBeforeSnapshot:function(){return Promise.resolve()},countdown:!1,modes:["video-audio","video-only","audio-only","picture"],mirror:!0,facingMode:"user",preferredVideoMimeType:null};return i.opts=___extends_235({},o,{},n),i.i18nInit(),i.install=i.install.bind(___assertThisInitialized_235(i)),i.setPluginState=i.setPluginState.bind(___assertThisInitialized_235(i)),i.render=i.render.bind(___assertThisInitialized_235(i)),i.start=i.start.bind(___assertThisInitialized_235(i)),i.stop=i.stop.bind(___assertThisInitialized_235(i)),i.takeSnapshot=i.takeSnapshot.bind(___assertThisInitialized_235(i)),i.startRecording=i.startRecording.bind(___assertThisInitialized_235(i)),i.stopRecording=i.stopRecording.bind(___assertThisInitialized_235(i)),i.oneTwoThreeSmile=i.oneTwoThreeSmile.bind(___assertThisInitialized_235(i)),i.focus=i.focus.bind(___assertThisInitialized_235(i)),i.webcamActive=!1,i.opts.countdown&&(i.opts.onBeforeSnapshot=i.oneTwoThreeSmile),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.setOptions=function(t){e.prototype.setOptions.call(this,t),this.i18nInit()},o.i18nInit=function(){this.translator=new _$Translator_199([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator),this.setPluginState()},o.isSupported=function(){return!!this.mediaDevices},o.getConstraints=function(){return{audio:-1!==this.opts.modes.indexOf("video-audio")||-1!==this.opts.modes.indexOf("audio-only"),video:!(-1===this.opts.modes.indexOf("video-audio")&&-1===this.opts.modes.indexOf("video-only")&&-1===this.opts.modes.indexOf("picture"))&&{facingMode:this.opts.facingMode}}},o.start=function(){var e=this;if(!this.isSupported())return Promise.reject(new Error("Webcam access not supported"));this.webcamActive=!0;var t=this.getConstraints();return this.mediaDevices.getUserMedia(t).then(function(t){e.stream=t,e.setPluginState({cameraReady:!0})}).catch(function(t){e.setPluginState({cameraError:t})})},o.startRecording=function(){var e=this,t={},n=this.opts.preferredVideoMimeType;n&&MediaRecorder.isTypeSupported(n)&&_$getFileTypeExtension_214(n)&&(t.mimeType=n),this.recorder=new MediaRecorder(this.stream,t),this.recordingChunks=[],this.recorder.addEventListener("dataavailable",function(t){e.recordingChunks.push(t.data)}),this.recorder.start(),this.setPluginState({isRecording:!0})},o.stopRecording=function(){var e=this;return new Promise(function(t,n){e.recorder.addEventListener("stop",function(){t()}),e.recorder.stop()}).then(function(){return e.setPluginState({isRecording:!1}),e.getVideo()}).then(function(t){try{e.uppy.addFile(t)}catch(t){t.isRestriction||e.uppy.log(t)}}).then(function(){e.recordingChunks=null,e.recorder=null},function(t){throw e.recordingChunks=null,e.recorder=null,t})},o.stop=function(){this.stream.getAudioTracks().forEach(function(e){e.stop()}),this.stream.getVideoTracks().forEach(function(e){e.stop()}),this.webcamActive=!1,this.stream=null},o.getVideoElement=function(){return this.el.querySelector(".uppy-Webcam-video")},o.oneTwoThreeSmile=function(){var e=this;return new Promise(function(t,n){var i=e.opts.countdown,o=setInterval(function(){if(!e.webcamActive)return clearInterval(o),e.captureInProgress=!1,n(new Error("Webcam is not active"));i>0?(e.uppy.info(i+"...","warning",800),i--):(clearInterval(o),e.uppy.info(e.i18n("smile"),"success",1500),setTimeout(function(){return t()},1500))},1e3)})},o.takeSnapshot=function(){var e=this;this.captureInProgress||(this.captureInProgress=!0,this.opts.onBeforeSnapshot().catch(function(t){var n="object"==typeof t?t.message:t;return e.uppy.info(n,"error",5e3),Promise.reject(new Error("onBeforeSnapshot: "+n))}).then(function(){return e.getImage()}).then(function(t){e.captureInProgress=!1;try{e.uppy.addFile(t)}catch(t){t.isRestriction||e.uppy.log(t)}},function(t){
throw e.captureInProgress=!1,t}))},o.getImage=function(){var e=this,t=this.getVideoElement();if(!t)return Promise.reject(new Error("No video element found, likely due to the Webcam tab being closed."));var n="cam-"+Date.now()+".jpg",i=t.videoWidth,o=t.videoHeight,r=document.createElement("canvas");return r.width=i,r.height=o,r.getContext("2d").drawImage(t,0,0),_$canvasToBlob_200(r,"image/jpeg").then(function(t){return{source:e.id,name:n,data:new Blob([t],{type:"image/jpeg"}),type:"image/jpeg"}})},o.getVideo=function(){var e=this.recordingChunks[0].type,t=_$getFileTypeExtension_214(e);if(!t)return Promise.reject(new Error('Could not retrieve recording: Unsupported media type "'+e+'"'));var n="webcam-"+Date.now()+"."+t,i=new Blob(this.recordingChunks,{type:e}),o={source:this.id,name:n,data:new Blob([i],{type:e}),type:e};return Promise.resolve(o)},o.focus=function(){var e=this;this.opts.countdown&&setTimeout(function(){e.uppy.info(e.i18n("smile"),"success",1500)},1e3)},o.render=function(e){this.webcamActive||this.start();var t=this.getPluginState();return t.cameraReady?__h_235(_$CameraScreen_231,___extends_235({},t,{onSnapshot:this.takeSnapshot,onStartRecording:this.startRecording,onStopRecording:this.stopRecording,onFocus:this.focus,onStop:this.stop,i18n:this.i18n,modes:this.opts.modes,supportsRecording:_$supportsMediaRecorder_236(),recording:t.isRecording,mirror:this.opts.mirror,src:this.stream})):__h_235(_$PermissionsScreen_232,{icon:_$CameraIcon_230,i18n:this.i18n})},o.install=function(){this.setPluginState({cameraReady:!1});var e=this.opts.target;e&&this.mount(e,this)},o.uninstall=function(){this.stream&&this.stop(),this.unmount()},t}(__Plugin_235),___class_235.VERSION=_$package_237.version,___temp_235),_$requiresPort_56=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e},_$querystringify_55={},undef,__has_55=Object.prototype.hasOwnProperty;_$querystringify_55.stringify=function(e,t){t=t||"";var n,i,o=[];for(i in"string"!=typeof t&&(t="?"),e)if(__has_55.call(e,i)){if((n=e[i])||null!==n&&n!==undef&&!isNaN(n)||(n=""),i=encodeURIComponent(i),n=encodeURIComponent(n),null===i||null===n)continue;o.push(i+"="+n)}return o.length?t+o.join("&"):""},_$querystringify_55.parse=function(e){for(var t,n=/([^=?&]+)=?([^&]*)/g,i={};t=n.exec(e);){var o=decode(t[1]),r=decode(t[2]);null===o||null===r||o in i||(i[o]=r)}return i};var _$urlParse_76={};(function(e){"use strict";function t(e){return(e||"").toString().replace(a,"")}function n(t){var n,i=("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).location||{},s={},a=typeof(t=t||i);if("blob:"===t.protocol)s=new o(unescape(t.pathname),{});else if("string"===a)for(n in s=new o(t,{}),c)delete s[n];else if("object"===a){for(n in t)n in c||(s[n]=t[n]);void 0===s.slashes&&(s.slashes=r.test(t.href))}return s}function i(e){e=t(e);var n=s.exec(e);return{protocol:n[1]?n[1].toLowerCase():"",slashes:!!n[2],rest:n[3]}}function o(e,r,s){if(e=t(e),!(this instanceof o))return new o(e,r,s);var a,c,u,d,h,p,f=l.slice(),g=typeof r,m=this,v=0;for("object"!==g&&"string"!==g&&(s=r,r=null),s&&"function"!=typeof s&&(s=_$querystringify_55.parse),r=n(r),a=!(c=i(e||"")).protocol&&!c.slashes,m.slashes=c.slashes||a&&r.slashes,m.protocol=c.protocol||r.protocol||"",e=c.rest,c.slashes||(f[3]=[/(.*)/,"pathname"]);v<f.length;v++)"function"!=typeof(d=f[v])?(u=d[0],p=d[1],u!=u?m[p]=e:"string"==typeof u?~(h=e.indexOf(u))&&("number"==typeof d[2]?(m[p]=e.slice(0,h),e=e.slice(h+d[2])):(m[p]=e.slice(h),e=e.slice(0,h))):(h=u.exec(e))&&(m[p]=h[1],e=e.slice(0,h.index)),m[p]=m[p]||a&&d[3]&&r[p]||"",d[4]&&(m[p]=m[p].toLowerCase())):e=d(e);s&&(m.query=s(m.query)),a&&r.slashes&&"/"!==m.pathname.charAt(0)&&(""!==m.pathname||""!==r.pathname)&&(m.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),i=n.length,o=n[i-1],r=!1,s=0;i--;)"."===n[i]?n.splice(i,1):".."===n[i]?(n.splice(i,1),s++):s&&(0===i&&(r=!0),n.splice(i,1),s--);return r&&n.unshift(""),"."!==o&&".."!==o||n.push(""),n.join("/")}(m.pathname,r.pathname)),_$requiresPort_56(m.port,m.protocol)||(m.host=m.hostname,m.port=""),m.username=m.password="",m.auth&&(d=m.auth.split(":"),m.username=d[0]||"",m.password=d[1]||""),m.origin=m.protocol&&m.host&&"file:"!==m.protocol?m.protocol+"//"+m.host:"null",m.href=m.toString()}var r=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,s=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,a=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+"),l=[["#","hash"],["?","query"],function(e){return e.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],c={hash:1,query:1};o.prototype={set:function(e,t,n){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||_$querystringify_55.parse)(t)),i[e]=t;break;case"port":i[e]=t,_$requiresPort_56(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,/:\d+$/.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!n;break;case"pathname":case"hash":if(t){var o="pathname"===e?"/":"#";i[e]=t.charAt(0)!==o?o+t:t}else i[e]=t;break;default:i[e]=t}for(var r=0;r<l.length;r++){var s=l[r];s[4]&&(i[s[1]]=i[s[1]].toLowerCase())}return i.origin=i.protocol&&i.host&&"file:"!==i.protocol?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=_$querystringify_55.stringify);var t,n=this,i=n.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var o=i+(n.slashes?"//":"");return n.username&&(o+=n.username,n.password&&(o+=":"+n.password),o+="@"),o+=n.host+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(o+=n.hash),o}},o.extractProtocol=i,o.location=n,o.trimLeft=t,o.qs=_$querystringify_55,_$urlParse_76=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var _$RateLimitedQueue_198=function(){function e(e){this.limit="number"!=typeof e||0===e?1/0:e,this.activeRequests=0,this.queuedHandlers=[]}var t=e.prototype;return t._call=function(e){var t=this;this.activeRequests+=1;var n,i=!1;try{n=e()}catch(e){throw this.activeRequests-=1,e}return{abort:function(){i||(i=!0,t.activeRequests-=1,n(),t._queueNext())},done:function(){i||(i=!0,t.activeRequests-=1,t._queueNext())}}},t._queueNext=function(){var e=this;Promise.resolve().then(function(){e._next()})},t._next=function(){if(!(this.activeRequests>=this.limit)&&0!==this.queuedHandlers.length){var e=this.queuedHandlers.shift(),t=this._call(e.fn);e.abort=t.abort,e.done=t.done}},t._queue=function(e){var t=this,n={fn:e,abort:function(){t._dequeue(n)},done:function(){throw new Error("Cannot mark a queued request as done: this indicates a bug")}};return this.queuedHandlers.push(n),n},t._dequeue=function(e){var t=this.queuedHandlers.indexOf(e);-1!==t&&this.queuedHandlers.splice(t,1)},t.run=function(e){return this.activeRequests<this.limit?this._call(e):this._queue(e)},t.wrapPromiseFunction=function(e){var t=this;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return new Promise(function(n,o){var r=t.run(function(){var t,s;try{s=Promise.resolve(e.apply(void 0,i))}catch(e){s=Promise.reject(e)}return s.then(function(e){t?o(t):(r.done(),n(e))},function(e){t?o(t):(r.done(),o(e))}),function(){t=new Error("Cancelled")}})})}},e}(),_$emitSocketProgress_202=_$lodashThrottle_46(function(e,t,n){var i=t.progress,o=t.bytesUploaded,r=t.bytesTotal;i&&(e.uppy.log("Upload progress: "+i),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:o,bytesTotal:r}))},300,{leading:!0,trailing:!0}),_$getSocketHost_215=function(e){var t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return(/^http:\/\//i.test(e)?"ws":"wss")+"://"+t},_$settle_228=function(e){function t(e){i.push(e)}function n(e){o.push(e)}var i=[],o=[];return Promise.all(e.map(function(e){return e.then(t,n)})).then(function(){return{successful:i,failed:o}})},_$EventTracker_195=function(){function e(e){this._events=[],this._emitter=e}var t=e.prototype;return t.on=function(e,t){return this._events.push([e,t]),this._emitter.on(e,t)},t.remove=function(){var e=this;this._events.forEach(function(t){var n=t[0],i=t[1];e._emitter.off(n,i)})},e}(),ProgressTimeout=function(){function e(e,t){this._timeout=e,this._onTimedOut=t,this._isDone=!1,this._aliveTimer=null,this._onTimedOut=this._onTimedOut.bind(this)}var t=e.prototype;return t.progress=function(){this._isDone||this._timeout>0&&(this._aliveTimer&&clearTimeout(this._aliveTimer),this._aliveTimer=setTimeout(this._onTimedOut,this._timeout))},t.done=function(){this._aliveTimer&&(clearTimeout(this._aliveTimer),this._aliveTimer=null),this._isDone=!0},e}(),_$ProgressTimeout_197=ProgressTimeout,_$package_239={version:"1.4.0"},___class_238,___temp_238,__Plugin_238=_$lib_93.Plugin,__Provider_238=_$lib_89.Provider,__RequestClient_238=_$lib_89.RequestClient,__Socket_238=_$lib_89.Socket,_$lib_238=(___temp_238=___class_238=function(e){function t(t,n){var i;(i=e.call(this,t,n)||this).type="uploader",i.id=i.opts.id||"XHRUpload",i.title="XHRUpload",i.defaultLocale={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}};var o={formData:!0,fieldName:"files[]",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:0,withCredentials:!1,responseType:"",getResponseData:function(e,t){var n={};try{n=JSON.parse(e)}catch(e){console.log(e)}return n},getResponseError:function(e,t){return new Error("Upload error")},validateStatus:function(e,t,n){return e>=200&&e<300}};if(i.opts=___extends_238({},o,{},n),i.i18nInit(),i.handleUpload=i.handleUpload.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i)),i.opts.__queue instanceof _$RateLimitedQueue_198?i.requests=i.opts.__queue:i.requests=new _$RateLimitedQueue_198(i.opts.limit),i.opts.bundle&&!i.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");return i.uploaderEvents=Object.create(null),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.setOptions=function(t){e.prototype.setOptions.call(this,t),this.i18nInit()},o.i18nInit=function(){this.translator=new _$Translator_199([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.setPluginState()},o.getOptions=function(e){var t=this.uppy.getState().xhrUpload,n=___extends_238({},this.opts,{},t||{},{},e.xhrUpload||{},{headers:{}});return ___extends_238(n.headers,this.opts.headers),t&&___extends_238(n.headers,t.headers),e.xhrUpload&&___extends_238(n.headers,e.xhrUpload.headers),n},o.addMetadata=function(e,t,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(t)).forEach(function(n){e.append(n,t[n])})},o.createFormDataUpload=function(e,t){var n=new FormData;this.addMetadata(n,e.meta,t);var i=setTypeInBlob(e);return e.name?n.append(t.fieldName,i,e.meta.name):n.append(t.fieldName,i),n},o.createBundledUpload=function(e,t){var n=this,i=new FormData,o=this.uppy.getState().meta;return this.addMetadata(i,o,t),e.forEach(function(e){var t=n.getOptions(e),o=setTypeInBlob(e);e.name?i.append(t.fieldName,o,e.name):i.append(t.fieldName,o)}),i},o.createBareUpload=function(e,t){return e.data},o.upload=function(e,t,n){var i=this,o=this.getOptions(e);return this.uppy.log("uploading "+t+" of "+n),new Promise(function(t,n){i.uppy.emit("upload-started",e);var r=o.formData?i.createFormDataUpload(e,o):i.createBareUpload(e,o),s=new _$ProgressTimeout_197(o.timeout,function(){a.abort();var t=new Error(i.i18n("timedOut",{seconds:Math.ceil(o.timeout/1e3)}));i.uppy.emit("upload-error",e,t),n(t)}),a=new XMLHttpRequest;i.uploaderEvents[e.id]=new _$EventTracker_195(i.uppy);var l=_$cuid_13();a.upload.addEventListener("loadstart",function(e){i.uppy.log("[XHRUpload] "+l+" started")}),a.upload.addEventListener("progress",function(t){i.uppy.log("[XHRUpload] "+l+" progress: "+t.loaded+" / "+t.total),s.progress(),t.lengthComputable&&i.uppy.emit("upload-progress",e,{uploader:i,bytesUploaded:t.loaded,bytesTotal:t.total})}),a.addEventListener("load",function(r){if(i.uppy.log("[XHRUpload] "+l+" finished"),s.done(),c.done(),i.uploaderEvents[e.id]&&(i.uploaderEvents[e.id].remove(),i.uploaderEvents[e.id]=null),o.validateStatus(r.target.status,a.responseText,a)){var u=o.getResponseData(a.responseText,a),d=u[o.responseUrlFieldName],h={status:r.target.status,body:u,uploadURL:d};return i.uppy.emit("upload-success",e,h),d&&i.uppy.log("Download "+e.name+" from "+d),t(e)}var p=o.getResponseData(a.responseText,a),f=buildResponseError(a,o.getResponseError(a.responseText,a)),g={status:r.target.status,body:p};return i.uppy.emit("upload-error",e,f,g),n(f)}),a.addEventListener("error",function(t){i.uppy.log("[XHRUpload] "+l+" errored"),s.done(),c.done(),i.uploaderEvents[e.id]&&(i.uploaderEvents[e.id].remove(),i.uploaderEvents[e.id]=null);var r=buildResponseError(a,o.getResponseError(a.responseText,a));return i.uppy.emit("upload-error",e,r),n(r)}),a.open(o.method.toUpperCase(),o.endpoint,!0),a.withCredentials=o.withCredentials,""!==o.responseType&&(a.responseType=o.responseType),Object.keys(o.headers).forEach(function(e){a.setRequestHeader(e,o.headers[e])});var c=i.requests.run(function(){return a.send(r),function(){s.done(),a.abort()}});i.onFileRemove(e.id,function(){c.abort(),n(new Error("File removed"))}),i.onCancelAll(e.id,function(){c.abort(),n(new Error("Upload cancelled"))})})},o.uploadRemote=function(e,t,n){var i=this,o=this.getOptions(e);return new Promise(function(t,n){i.uppy.emit("upload-started",e);var r={};(Array.isArray(o.metaFields)?o.metaFields:Object.keys(e.meta)).forEach(function(t){r[t]=e.meta[t]}),new(e.remote.providerOptions.provider?__Provider_238:__RequestClient_238)(i.uppy,e.remote.providerOptions).post(e.remote.url,___extends_238({},e.remote.body,{endpoint:o.endpoint,size:e.data.size,fieldname:o.fieldName,metadata:r,headers:o.headers})).then(function(r){var s=r.token,a=_$getSocketHost_215(e.remote.companionUrl),l=new __Socket_238({target:a+"/api/"+s,autoOpen:!1});i.uploaderEvents[e.id]=new _$EventTracker_195(i.uppy),i.onFileRemove(e.id,function(){l.send("pause",{}),c.abort(),t("upload "+e.id+" was removed")}),i.onCancelAll(e.id,function(){l.send("pause",{}),c.abort(),t("upload "+e.id+" was canceled")}),i.onRetry(e.id,function(){l.send("pause",{}),l.send("resume",{})}),i.onRetryAll(e.id,function(){l.send("pause",{}),l.send("resume",{})}),l.on("progress",function(t){return _$emitSocketProgress_202(i,t,e)}),l.on("success",function(n){var r=o.getResponseData(n.response.responseText,n.response),s=r[o.responseUrlFieldName],a={status:n.response.status,body:r,uploadURL:s};return i.uppy.emit("upload-success",e,a),c.done(),i.uploaderEvents[e.id]&&(i.uploaderEvents[e.id].remove(),i.uploaderEvents[e.id]=null),t()}),l.on("error",function(t){var r=t.response,s=r?o.getResponseError(r.responseText,r):___extends_238(new Error(t.error.message),{cause:t.error});i.uppy.emit("upload-error",e,s),c.done(),i.uploaderEvents[e.id]&&(i.uploaderEvents[e.id].remove(),i.uploaderEvents[e.id]=null),n(s)});var c=i.requests.run(function(){return l.open(),e.isPaused&&l.send("pause",{}),function(){return l.close()}})})})},o.uploadBundle=function(e){var t=this;return new Promise(function(n,i){var o=t.opts.endpoint,r=t.opts.method,s=t.uppy.getState().xhrUpload,a=t.createBundledUpload(e,___extends_238({},t.opts,{},s||{})),l=new XMLHttpRequest,c=new _$ProgressTimeout_197(t.opts.timeout,function(){l.abort();var e=new Error(t.i18n("timedOut",{seconds:Math.ceil(t.opts.timeout/1e3)}));u(e),i(e)}),u=function(n){e.forEach(function(e){t.uppy.emit("upload-error",e,n)})};l.upload.addEventListener("loadstart",function(e){t.uppy.log("[XHRUpload] started uploading bundle"),c.progress()}),l.upload.addEventListener("progress",function(n){c.progress(),n.lengthComputable&&e.forEach(function(e){t.uppy.emit("upload-progress",e,{uploader:t,bytesUploaded:n.loaded/n.total*e.size,bytesTotal:e.size})})}),l.addEventListener("load",function(o){if(c.done(),t.opts.validateStatus(o.target.status,l.responseText,l)){var r=t.opts.getResponseData(l.responseText,l),s={status:o.target.status,body:r};return e.forEach(function(e){t.uppy.emit("upload-success",e,s)}),n()}var a=t.opts.getResponseError(l.responseText,l)||new Error("Upload error");return a.request=l,u(a),i(a)}),l.addEventListener("error",function(e){c.done();var n=t.opts.getResponseError(l.responseText,l)||new Error("Upload error");return u(n),i(n)}),t.uppy.on("cancel-all",function(){c.done(),l.abort()}),l.open(r.toUpperCase(),o,!0),l.withCredentials=t.opts.withCredentials,""!==t.opts.responseType&&(l.responseType=t.opts.responseType),Object.keys(t.opts.headers).forEach(function(e){l.setRequestHeader(e,t.opts.headers[e])}),l.send(a),e.forEach(function(e){t.uppy.emit("upload-started",e)})})},o.uploadFiles=function(e){var t=this,n=e.map(function(n,i){var o=parseInt(i,10)+1,r=e.length;return n.error?Promise.reject(new Error(n.error)):n.isRemote?t.uploadRemote(n,o,r):t.upload(n,o,r)});return _$settle_228(n)},o.onFileRemove=function(e,t){this.uploaderEvents[e].on("file-removed",function(n){e===n.id&&t(n.id)})},o.onRetry=function(e,t){this.uploaderEvents[e].on("upload-retry",function(n){e===n&&t()})},o.onRetryAll=function(e,t){var n=this;this.uploaderEvents[e].on("retry-all",function(i){n.uppy.getFile(e)&&t()})},o.onCancelAll=function(e,t){var n=this;this.uploaderEvents[e].on("cancel-all",function(){n.uppy.getFile(e)&&t()})},o.handleUpload=function(e){var t=this;if(0===e.length)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();0===this.opts.limit&&this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");var n=e.map(function(e){return t.uppy.getFile(e)});if(this.opts.bundle){if(n.some(function(e){return e.isRemote}))throw new Error("Can’t upload remote files when bundle: true option is set");return this.uploadBundle(n)}return this.uploadFiles(n).then(function(){return null})},o.install=function(){if(this.opts.bundle){var e=this.uppy.getState().capabilities;this.uppy.setState({capabilities:___extends_238({},e,{individualCancellation:!1})})}this.uppy.addUploader(this.handleUpload)},o.uninstall=function(){if(this.opts.bundle){var e=this.uppy.getState().capabilities;this.uppy.setState({capabilities:___extends_238({},e,{individualCancellation:!0})})}this.uppy.removeUploader(this.handleUpload)},t}(__Plugin_238),___class_238.VERSION=_$package_239.version,___temp_238),_$package_84={version:"1.3.3"},___class_83,___temp_83,URL_="function"==typeof URL?URL:_$urlParse_76,__Plugin_83=_$lib_93.Plugin,__RequestClient_83=_$lib_89.RequestClient,_$lib_83=(___temp_83=___class_83=function(e){function t(t,n){var i;(i=e.call(this,t,n)||this).type="uploader",i.id=i.opts.id||"AwsS3",i.title="AWS S3",i.defaultLocale={strings:{preparingUpload:"Preparing upload..."}};var o={timeout:3e4,limit:0,getUploadParameters:i.getUploadParameters.bind(___assertThisInitialized_83(i))};return i.opts=___extends_83({},o,{},n),i.i18nInit(),i.client=new __RequestClient_83(t,n),i.prepareUpload=i.prepareUpload.bind(___assertThisInitialized_83(i)),i.requests=new _$RateLimitedQueue_198(i.opts.limit),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.setOptions=function(t){e.prototype.setOptions.call(this,t),this.i18nInit()},o.i18nInit=function(){this.translator=new _$Translator_199([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.setPluginState()},o.getUploadParameters=function(e){if(!this.opts.companionUrl)throw new Error("Expected a `companionUrl` option containing a Companion address.");var t=encodeURIComponent(e.meta.name),n=encodeURIComponent(e.meta.type);return this.client.get("s3/params?filename="+t+"&type="+n).then(assertServerError)},o.validateParameters=function(e,t){if("object"!=typeof t||!t||"string"!=typeof t.url||"object"!=typeof t.fields&&null!=t.fields||null!=t.method&&!/^(put|post)$/i.test(t.method)){var n=new TypeError("AwsS3: got incorrect result from 'getUploadParameters()' for file '"+e.name+"', expected an object '{ url, method, fields, headers }'.\nSee https://uppy.io/docs/aws-s3/#getUploadParameters-file for more on the expected format.");throw console.error(n),n}return t},o.prepareUpload=function(e){var t=this;e.forEach(function(e){var n=t.uppy.getFile(e);t.uppy.emit("preprocess-progress",n,{mode:"determinate",message:t.i18n("preparingUpload"),value:0})});var n=this.requests.wrapPromiseFunction(function(e){return t.opts.getUploadParameters(e)});return Promise.all(e.map(function(e){var i=t.uppy.getFile(e);return n(i).then(function(e){return t.validateParameters(i,e)}).then(function(e){return t.uppy.emit("preprocess-progress",i,{mode:"determinate",message:t.i18n("preparingUpload"),value:1}),e}).catch(function(e){t.uppy.emit("upload-error",i,e)})})).then(function(n){var i={};e.forEach(function(e,o){var r=t.uppy.getFile(e);if(r&&!r.error){var s=n[o],a=s.method,l=void 0===a?"post":a,c=s.url,u=s.fields,d=s.headers,h={method:l,formData:"post"===l.toLowerCase(),endpoint:c,metaFields:u?Object.keys(u):[]};d&&(h.headers=d);var p=___extends_83({},r,{meta:___extends_83({},r.meta,{},u),xhrUpload:h});i[e]=p}});var o=t.uppy.getState().files;t.uppy.setState({files:___extends_83({},o,{},i)}),e.forEach(function(e){var n=t.uppy.getFile(e);t.uppy.emit("preprocess-complete",n)})})},o.install=function(){var e=this.uppy.log;this.uppy.addPreProcessor(this.prepareUpload);var t=!1,n={fieldName:"file",responseUrlFieldName:"location",timeout:this.opts.timeout,__queue:this.requests,responseType:"text",getResponseData:function(n,i){var o,r;return isXml(i)?{location:(o=i.responseURL,r=getXmlValue(n,"Location"),new URL_(r,o).toString()),bucket:getXmlValue(n,"Bucket"),key:getXmlValue(n,"Key"),etag:getXmlValue(n,"ETag")}:"POST"===this.method.toUpperCase()?(t||(e("[AwsS3] No response data found, make sure to set the success_action_status AWS SDK option to 201. See https://uppy.io/docs/aws-s3/#POST-Uploads","warning"),t=!0),{location:null}):i.responseURL?{location:i.responseURL.replace(/\?.*$/,"")}:{location:null}},getResponseError:function(e,t){if(isXml(t)){var n=getXmlValue(e,"Message");return new Error(n)}}};this.opts.getResponseData&&(n.getResponseData=this.opts.getResponseData),this.uppy.use(_$lib_238,n)},o.uninstall=function(){var e=this.uppy.getPlugin("XHRUpload");this.uppy.removePlugin(e),this.uppy.removePreProcessor(this.prepareUpload)},t}(__Plugin_83),___class_83.VERSION=_$package_84.version,___temp_83),defaultOptions={limit:1,onStart:function(){},onProgress:function(){},onPartComplete:function(){},onSuccess:function(){},onError:function(e){throw e}},MultipartUploader=function(){function e(e,t){this.options=___extends_80({},defaultOptions,{},t),this.file=e,this.key=this.options.key||null,this.uploadId=this.options.uploadId||null,this.parts=this.options.parts||[],this.createdPromise=Promise.reject(),this.isPaused=!1,this.chunks=null,this.chunkState=null,this.uploading=[],this._initChunks(),this.createdPromise.catch(function(){})}var t=e.prototype;return t._initChunks=function(){for(var e=[],t=Math.max(Math.ceil(this.file.size/1e4),5242880),n=0;n<this.file.size;n+=t){var i=Math.min(this.file.size,n+t);e.push(this.file.slice(n,i))}this.chunks=e,this.chunkState=e.map(function(){return{uploaded:0,busy:!1,done:!1}})},t._createUpload=function(){var e=this;return this.createdPromise=Promise.resolve().then(function(){return e.options.createMultipartUpload()}),this.createdPromise.then(function(t){if("object"!=typeof t||!t||"string"!=typeof t.uploadId||"string"!=typeof t.key)throw new TypeError("AwsS3/Multipart: Got incorrect result from `createMultipartUpload()`, expected an object `{ uploadId, key }`.");e.key=t.key,e.uploadId=t.uploadId,e.options.onStart(t),e._uploadParts()}).catch(function(t){e._onError(t)})},t._resumeUpload=function(){var e=this;return Promise.resolve().then(function(){return e.options.listParts({uploadId:e.uploadId,key:e.key})}).then(function(t){t.forEach(function(t){var n=t.PartNumber-1;e.chunkState[n]={uploaded:t.Size,etag:t.ETag,done:!0},e.parts.some(function(e){return e.PartNumber===t.PartNumber})||e.parts.push({PartNumber:t.PartNumber,ETag:t.ETag})}),e._uploadParts()}).catch(function(t){e._onError(t)})},t._uploadParts=function(){var e=this;if(!this.isPaused){var t=this.options.limit-this.uploading.length;if(0!==t)if(this.chunkState.every(function(e){return e.done}))this._completeUpload();else{for(var n=[],i=0;i<this.chunkState.length;i++){var o=this.chunkState[i];if(!o.done&&!o.busy&&(n.push(i),n.length>=t))break}n.forEach(function(t){e._uploadPart(t)})}}},t._uploadPart=function(e){var t=this,n=this.chunks[e];return this.chunkState[e].busy=!0,Promise.resolve().then(function(){return t.options.prepareUploadPart({key:t.key,uploadId:t.uploadId,body:n,number:e+1})}).then(function(e){if("object"!=typeof e||!e||"string"!=typeof e.url)throw new TypeError("AwsS3/Multipart: Got incorrect result from `prepareUploadPart()`, expected an object `{ url }`.");return e}).then(function(n){var i=n.url;t._uploadPartBytes(e,i)},function(e){t._onError(e)})},t._onPartProgress=function(e,t,n){this.chunkState[e].uploaded=t;var i=this.chunkState.reduce(function(e,t){return e+t.uploaded},0);this.options.onProgress(i,this.file.size)},t._onPartComplete=function(e,t){this.chunkState[e].etag=t,this.chunkState[e].done=!0;var n={PartNumber:e+1,ETag:t};this.parts.push(n),this.options.onPartComplete(n),this._uploadParts()},t._uploadPartBytes=function(e,t){var n=this,i=this.chunks[e],o=new XMLHttpRequest;o.open("PUT",t,!0),o.responseType="text",this.uploading.push(o),o.upload.addEventListener("progress",function(t){t.lengthComputable&&n._onPartProgress(e,t.loaded,t.total)}),o.addEventListener("abort",function(t){remove(n.uploading,t.target),n.chunkState[e].busy=!1}),o.addEventListener("load",function(t){if(remove(n.uploading,t.target),n.chunkState[e].busy=!1,t.target.status<200||t.target.status>=300)n._onError(new Error("Non 2xx"));else{n._onPartProgress(e,i.size,i.size);var o=t.target.getResponseHeader("ETag");null!==o?n._onPartComplete(e,o):n._onError(new Error("AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. Seee https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions."))}}),o.addEventListener("error",function(t){remove(n.uploading,t.target),n.chunkState[e].busy=!1;var i=new Error("Unknown error");i.source=t.target,n._onError(i)}),o.send(i)},t._completeUpload=function(){var e=this;return this.parts.sort(function(e,t){return e.PartNumber-t.PartNumber}),Promise.resolve().then(function(){return e.options.completeMultipartUpload({key:e.key,uploadId:e.uploadId,parts:e.parts})}).then(function(t){e.options.onSuccess(t)},function(t){e._onError(t)})},t._abortUpload=function(){var e=this;this.uploading.slice().forEach(function(e){e.abort()}),this.createdPromise.then(function(){e.options.abortMultipartUpload({key:e.key,uploadId:e.uploadId})},function(){}),this.uploading=[]},t._onError=function(e){this.options.onError(e)},t.start=function(){this.isPaused=!1,this.uploadId?this._resumeUpload():this._createUpload()},t.pause=function(){this.uploading.slice().forEach(function(e){e.abort()}),this.isPaused=!0},t.abort=function(e){if(void 0===e&&(e={}),!e.really)return this.pause();this._abortUpload()},e}(),_$MultipartUploader_80=MultipartUploader,_$package_82={version:"1.3.4"},___class_81,___temp_81,__Plugin_81=_$lib_93.Plugin,__Socket_81=_$lib_89.Socket,__Provider_81=_$lib_89.Provider,__RequestClient_81=_$lib_89.RequestClient,_$lib_81=(___temp_81=___class_81=function(e){function t(t,n){var i;(i=e.call(this,t,n)||this).type="uploader",i.id=i.opts.id||"AwsS3Multipart",i.title="AWS S3 Multipart",i.client=new __RequestClient_81(t,n);var o={timeout:3e4,limit:0,createMultipartUpload:i.createMultipartUpload.bind(___assertThisInitialized_81(i)),listParts:i.listParts.bind(___assertThisInitialized_81(i)),prepareUploadPart:i.prepareUploadPart.bind(___assertThisInitialized_81(i)),abortMultipartUpload:i.abortMultipartUpload.bind(___assertThisInitialized_81(i)),completeMultipartUpload:i.completeMultipartUpload.bind(___assertThisInitialized_81(i))};return i.opts=___extends_81({},o,{},n),i.upload=i.upload.bind(___assertThisInitialized_81(i)),i.requests=new _$RateLimitedQueue_198(i.opts.limit),i.uploaders=Object.create(null),i.uploaderEvents=Object.create(null),i.uploaderSockets=Object.create(null),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.resetUploaderReferences=function(e,t){void 0===t&&(t={}),this.uploaders[e]&&(this.uploaders[e].abort({really:t.abort||!1}),this.uploaders[e]=null),this.uploaderEvents[e]&&(this.uploaderEvents[e].remove(),this.uploaderEvents[e]=null),this.uploaderSockets[e]&&(this.uploaderSockets[e].close(),this.uploaderSockets[e]=null)},o.assertHost=function(){if(!this.opts.companionUrl)throw new Error("Expected a `companionUrl` option containing a Companion address.")},o.createMultipartUpload=function(e){this.assertHost();var t={};return Object.keys(e.meta).map(function(n){null!=e.meta[n]&&(t[n]=e.meta[n].toString())}),this.client.post("s3/multipart",{filename:e.name,type:e.type,metadata:t}).then(__assertServerError_81)},o.listParts=function(e,t){var n=t.key,i=t.uploadId;this.assertHost();var o=encodeURIComponent(n);return this.client.get("s3/multipart/"+i+"?key="+o).then(__assertServerError_81)},o.prepareUploadPart=function(e,t){var n=t.key,i=t.uploadId,o=t.number;this.assertHost();var r=encodeURIComponent(n);return this.client.get("s3/multipart/"+i+"/"+o+"?key="+r).then(__assertServerError_81)},o.completeMultipartUpload=function(e,t){var n=t.key,i=t.uploadId,o=t.parts;this.assertHost();var r=encodeURIComponent(n),s=encodeURIComponent(i);return this.client.post("s3/multipart/"+s+"/complete?key="+r,{parts:o}).then(__assertServerError_81)},o.abortMultipartUpload=function(e,t){var n=t.key,i=t.uploadId;this.assertHost();var o=encodeURIComponent(n),r=encodeURIComponent(i);return this.client.delete("s3/multipart/"+r+"?key="+o).then(__assertServerError_81)},o.uploadFile=function(e){var t=this;return new Promise(function(n,i){var o=new _$MultipartUploader_80(e.data,___extends_81({createMultipartUpload:t.opts.createMultipartUpload.bind(t,e),listParts:t.opts.listParts.bind(t,e),prepareUploadPart:t.opts.prepareUploadPart.bind(t,e),completeMultipartUpload:t.opts.completeMultipartUpload.bind(t,e),abortMultipartUpload:t.opts.abortMultipartUpload.bind(t,e),onStart:function(n){var i=t.uppy.getFile(e.id);t.uppy.setFileState(e.id,{s3Multipart:___extends_81({},i.s3Multipart,{key:n.key,uploadId:n.uploadId,parts:[]})})},onProgress:function(n,i){t.uppy.emit("upload-progress",e,{uploader:t,bytesUploaded:n,bytesTotal:i})},onError:function(n){t.uppy.log(n),t.uppy.emit("upload-error",e,n),n.message="Failed because: "+n.message,r.done(),t.resetUploaderReferences(e.id),i(n)},onSuccess:function(i){var s={uploadURL:i.location};r.done(),t.resetUploaderReferences(e.id),t.uppy.emit("upload-success",e,s),
i.location&&t.uppy.log("Download "+o.file.name+" from "+i.location),n(o)},onPartComplete:function(n){var i=t.uppy.getFile(e.id);i&&(t.uppy.setFileState(e.id,{s3Multipart:___extends_81({},i.s3Multipart,{parts:[].concat(i.s3Multipart.parts,[n])})}),t.uppy.emit("s3-multipart:part-uploaded",i,n))},limit:t.opts.limit||5},e.s3Multipart));t.uploaders[e.id]=o,t.uploaderEvents[e.id]=new _$EventTracker_195(t.uppy);var r=t.requests.run(function(){return e.isPaused||o.start(),function(){}});t.onFileRemove(e.id,function(i){r.abort(),t.resetUploaderReferences(e.id,{abort:!0}),n("upload "+i.id+" was removed")}),t.onCancelAll(e.id,function(){r.abort(),t.resetUploaderReferences(e.id,{abort:!0}),n("upload "+e.id+" was canceled")}),t.onFilePause(e.id,function(e){e?(r.abort(),o.pause()):(r.abort(),r=t.requests.run(function(){return o.start(),function(){}}))}),t.onPauseAll(e.id,function(){r.abort(),o.pause()}),t.onResumeAll(e.id,function(){r.abort(),e.error&&o.abort(),r=t.requests.run(function(){return o.start(),function(){}})}),e.isRestored||t.uppy.emit("upload-started",e,o)})},o.uploadRemote=function(e){var t=this;return this.resetUploaderReferences(e.id),this.uppy.emit("upload-started",e),e.serverToken?this.connectToServerSocket(e):new Promise(function(n,i){new(e.remote.providerOptions.provider?__Provider_81:__RequestClient_81)(t.uppy,e.remote.providerOptions).post(e.remote.url,___extends_81({},e.remote.body,{protocol:"s3-multipart",size:e.data.size,metadata:e.meta})).then(function(n){return t.uppy.setFileState(e.id,{serverToken:n.token}),e=t.uppy.getFile(e.id)}).then(function(e){return t.connectToServerSocket(e)}).then(function(){n()}).catch(function(e){i(new Error(e))})})},o.connectToServerSocket=function(e){var t=this;return new Promise(function(n,i){var o=e.serverToken,r=_$getSocketHost_215(e.remote.companionUrl),s=new __Socket_81({target:r+"/api/"+o,autoOpen:!1});t.uploaderSockets[e.id]=s,t.uploaderEvents[e.id]=new _$EventTracker_195(t.uppy),t.onFileRemove(e.id,function(i){a.abort(),s.send("pause",{}),t.resetUploaderReferences(e.id,{abort:!0}),n("upload "+e.id+" was removed")}),t.onFilePause(e.id,function(e){e?(a.abort(),s.send("pause",{})):(a.abort(),a=t.requests.run(function(){return s.send("resume",{}),function(){}}))}),t.onPauseAll(e.id,function(){a.abort(),s.send("pause",{})}),t.onCancelAll(e.id,function(){a.abort(),s.send("pause",{}),t.resetUploaderReferences(e.id),n("upload "+e.id+" was canceled")}),t.onResumeAll(e.id,function(){a.abort(),e.error&&s.send("pause",{}),a=t.requests.run(function(){s.send("resume",{})})}),t.onRetry(e.id,function(){s.isOpen&&(s.send("pause",{}),s.send("resume",{}))}),t.onRetryAll(e.id,function(){s.isOpen&&(s.send("pause",{}),s.send("resume",{}))}),s.on("progress",function(n){return _$emitSocketProgress_202(t,n,e)}),s.on("error",function(n){t.uppy.emit("upload-error",e,new Error(n.error)),t.resetUploaderReferences(e.id),a.done(),i(new Error(n.error))}),s.on("success",function(i){var o={uploadURL:i.url};t.uppy.emit("upload-success",e,o),t.resetUploaderReferences(e.id),a.done(),n()});var a=t.requests.run(function(){return s.open(),e.isPaused&&s.send("pause",{}),function(){}})})},o.upload=function(e){var t=this;if(0===e.length)return Promise.resolve();var n=e.map(function(e){var n=t.uppy.getFile(e);return n.isRemote?t.uploadRemote(n):t.uploadFile(n)});return Promise.all(n)},o.onFileRemove=function(e,t){this.uploaderEvents[e].on("file-removed",function(n){e===n.id&&t(n.id)})},o.onFilePause=function(e,t){this.uploaderEvents[e].on("upload-pause",function(n,i){e===n&&t(i)})},o.onRetry=function(e,t){this.uploaderEvents[e].on("upload-retry",function(n){e===n&&t()})},o.onRetryAll=function(e,t){var n=this;this.uploaderEvents[e].on("retry-all",function(i){n.uppy.getFile(e)&&t()})},o.onPauseAll=function(e,t){var n=this;this.uploaderEvents[e].on("pause-all",function(){n.uppy.getFile(e)&&t()})},o.onCancelAll=function(e,t){var n=this;this.uploaderEvents[e].on("cancel-all",function(){n.uppy.getFile(e)&&t()})},o.onResumeAll=function(e,t){var n=this;this.uploaderEvents[e].on("resume-all",function(){n.uppy.getFile(e)&&t()})},o.install=function(){var e=this.uppy.getState().capabilities;this.uppy.setState({capabilities:___extends_81({},e,{resumableUploads:!0})}),this.uppy.addUploader(this.upload)},o.uninstall=function(){var e=this.uppy.getState().capabilities;this.uppy.setState({capabilities:___extends_81({},e,{resumableUploads:!1})}),this.uppy.removeUploader(this.upload)},t}(__Plugin_81),___class_81.VERSION=_$package_82.version,___temp_81),_$error_187={};Object.defineProperty(_$error_187,"__esModule",{value:!0});var DetailedError=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.message));o.originalRequest=i,o.causingError=n;var r=e.message;return null!=n&&(r+=", caused by "+n.toString()),null!=i&&(r+=", originated from request (response code: "+i.status+", response text: "+i.responseText+")"),o.message=r,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Error),t}();_$error_187.default=DetailedError;var hasOwn=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===toStr.call(e)},isPlainObject=function(e){if(!e||"[object Object]"!==toStr.call(e))return!1;var t,n=hasOwn.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&hasOwn.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||hasOwn.call(e,t)},setProperty=function(e,t){defineProperty&&"__proto__"===t.name?defineProperty(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},getProperty=function(e,t){if("__proto__"===t){if(!hasOwn.call(e,t))return;if(gOPD)return gOPD(e,t).value}return e[t]},_$extend_36=function e(){var t,n,i,o,r,s,a=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},l=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=getProperty(a,n),a!==(o=getProperty(t,n))&&(u&&o&&(isPlainObject(o)||(r=isArray(o)))?(r?(r=!1,s=i&&isArray(i)?i:[]):s=i&&isPlainObject(i)?i:{},setProperty(a,{name:n,newValue:e(u,s,o)})):void 0!==o&&setProperty(a,{name:n,newValue:o}));return a},_$base64_44={exports:{}};(function(global){var e,t;e="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==global?global:this,t=function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.1",buffer;if(_$base64_44.exports)try{buffer=eval("require('buffer').Buffer")}catch(e){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(e){for(var t={},n=0,i=e.length;n<i;n++)t[e.charAt(n)]=n;return t}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?fromCharCode(192|t>>>6)+fromCharCode(128|63&t):fromCharCode(224|t>>>12&15)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return fromCharCode(240|t>>>18&7)+fromCharCode(128|t>>>12&63)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(e){return e.replace(re_utob,cb_utob)},cb_encode=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[b64chars.charAt(n>>>18),b64chars.charAt(n>>>12&63),t>=2?"=":b64chars.charAt(n>>>6&63),t>=1?"=":b64chars.charAt(63&n)].join("")},btoa=global.btoa?function(e){return global.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e)).toString("base64")}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e)).toString("base64")}:function(e){return btoa(utob(e))},encode=function(e,t){return t?_encode(String(e)).replace(/[+\/]/g,function(e){return"+"==e?"-":"_"}).replace(/=/g,""):_encode(String(e))},encodeURI=function(e){return encode(e,!0)},re_btou=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),cb_btou=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return fromCharCode(55296+(t>>>10))+fromCharCode(56320+(1023&t));case 3:return fromCharCode((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return fromCharCode((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=function(e){return e.replace(re_btou,cb_btou)},cb_decode=function(e){var t=e.length,n=t%4,i=(t>0?b64tab[e.charAt(0)]<<18:0)|(t>1?b64tab[e.charAt(1)]<<12:0)|(t>2?b64tab[e.charAt(2)]<<6:0)|(t>3?b64tab[e.charAt(3)]:0),o=[fromCharCode(i>>>16),fromCharCode(i>>>8&255),fromCharCode(255&i)];return o.length-=[0,0,2,1][n],o.join("")},_atob=global.atob?function(e){return global.atob(e)}:function(e){return e.replace(/\S{1,4}/g,cb_decode)},atob=function(e){return _atob(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e,"base64")).toString()}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e,"base64")).toString()}:function(e){return btou(_atob(e))},decode=function(e){return _decode(String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var e=global.Base64;return global.Base64=_Base64,e};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(e){return encode(this,e)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),_$base64_44.exports?_$base64_44.exports.Base64=global.Base64:"function"==typeof define&&define.amd&&define([],function(){return global.Base64}),{Base64:global.Base64}},"object"==typeof _$base64_44.exports?_$base64_44.exports=t(e):"function"==typeof define&&define.amd?define(t):t(e)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),_$base64_44=_$base64_44.exports;var _$request_183={};Object.defineProperty(_$request_183,"__esModule",{value:!0}),_$request_183.newRequest=function(){return new window.XMLHttpRequest},_$request_183.resolveUrl=function(e,t){return new _urlParse2.default(t,e).toString()};var obj,_urlParse2=(obj=_$urlParse_76)&&obj.__esModule?obj:{default:obj},_$isReactNative_181={};Object.defineProperty(_$isReactNative_181,"__esModule",{value:!0}),_$isReactNative_181.default=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()};var _$uriToBlob_186={};Object.defineProperty(_$uriToBlob_186,"__esModule",{value:!0}),_$uriToBlob_186.default=function(e,t){var n=new XMLHttpRequest;n.responseType="blob",n.onload=function(){var e=n.response;t(null,e)},n.onerror=function(e){t(e)},n.open("GET",e),n.send()};var _$isCordova_180={};Object.defineProperty(_$isCordova_180,"__esModule",{value:!0}),_$isCordova_180.default=function(){return"undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)};var _$readAsByteArray_182={};Object.defineProperty(_$readAsByteArray_182,"__esModule",{value:!0}),_$readAsByteArray_182.default=function(e,t){var n=new FileReader;n.onload=function(){t(null,new Uint8Array(n.result))},n.onerror=function(e){t(e)},n.readAsArrayBuffer(e)};var _$source_184={};Object.defineProperty(_$source_184,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();_$source_184.getSource=function(e,t,n){if((0,_isReactNative2.default)()&&e&&void 0!==e.uri)(0,_uriToBlob2.default)(e.uri,function(e,t){if(e)return n(new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. "+e));n(null,new FileSource(t))});else{if("function"!=typeof e.slice||void 0===e.size)return"function"==typeof e.read?(t=+t,isFinite(t)?void n(null,new StreamSource(e,t)):void n(new Error("cannot create source for stream without a finite value for the `chunkSize` option"))):void n(new Error("source object may only be an instance of File, Blob, or Reader in this environment"));n(null,new FileSource(e))}};var _isReactNative2=_interopRequireDefault(_$isReactNative_181),_uriToBlob2=_interopRequireDefault(_$uriToBlob_186),_isCordova2=_interopRequireDefault(_$isCordova_180),_readAsByteArray2=_interopRequireDefault(_$readAsByteArray_182),FileSource=function(){function e(t){_classCallCheck(this,e),this._file=t,this.size=t.size}return _createClass(e,[{key:"slice",value:function(e,t,n){(0,_isCordova2.default)()?(0,_readAsByteArray2.default)(this._file.slice(e,t),function(e,t){if(e)return n(e);n(null,t)}):n(null,this._file.slice(e,t))}},{key:"close",value:function(){}}]),e}(),StreamSource=function(){function e(t,n){_classCallCheck(this,e),this._chunkSize=n,this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1}return _createClass(e,[{key:"slice",value:function(e,t,n){if(!(e<this._bufferOffset))return this._readUntilEnoughDataOrDone(e,t,n);n(new Error("Requested data is before the reader's current offset"))}},{key:"_readUntilEnoughDataOrDone",value:function(e,t,n){var i=this,o=t<=this._bufferOffset+len(this._buffer);if(this._done||o){var r=this._getDataFromBuffer(e,t);n(null,r,null==r&&this._done)}else this._reader.read().then(function(o){var r=o.value;o.done?i._done=!0:void 0===i._buffer?i._buffer=r:i._buffer=function(e,t){if(e.concat)return e.concat(t);if(e instanceof Blob)return new Blob([e,t],{type:e.type});if(e.set){var n=new e.constructor(e.length+t.length);return n.set(e),n.set(t,e.length),n}throw new Error("Unknown data type")}(i._buffer,r),i._readUntilEnoughDataOrDone(e,t,n)}).catch(function(e){n(new Error("Error during read: "+e))})}},{key:"_getDataFromBuffer",value:function(e,t){e>this._bufferOffset&&(this._buffer=this._buffer.slice(e-this._bufferOffset),this._bufferOffset=e);var n=0===len(this._buffer);return this._done&&n?null:this._buffer.slice(0,t-e)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),e}(),_$storage_185={};Object.defineProperty(_$storage_185,"__esModule",{value:!0});var ___createClass_185=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();_$storage_185.getStorage=function(){return hasStorage?new LocalStorage:null};var hasStorage=!1;try{hasStorage="localStorage"in window;var key="tusSupport";localStorage.setItem(key,localStorage.getItem(key))}catch(e){if(e.code!==e.SECURITY_ERR&&e.code!==e.QUOTA_EXCEEDED_ERR)throw e;hasStorage=!1}_$storage_185.canStoreURLs=hasStorage;var LocalStorage=function(){function e(){!function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this)}return ___createClass_185(e,[{key:"setItem",value:function(e,t,n){n(null,localStorage.setItem(e,t))}},{key:"getItem",value:function(e,t){t(null,localStorage.getItem(e))}},{key:"removeItem",value:function(e,t){t(null,localStorage.removeItem(e))}}]),e}(),_$fingerprint_179={};Object.defineProperty(_$fingerprint_179,"__esModule",{value:!0}),_$fingerprint_179.default=function(e,t,n){return(0,___isCordova2_179.default)()?n(new Error("Fingerprint cannot be computed for file input type")):(0,___isReactNative2_179.default)()?n(null,function(e,t){var n=e.exif?function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",n,t.endpoint].join("/")}(e,t)):n(null,["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))};var ___isReactNative2_179=___interopRequireDefault_179(_$isReactNative_181),___isCordova2_179=___interopRequireDefault_179(_$isCordova_180),_$upload_189={};Object.defineProperty(_$upload_189,"__esModule",{value:!0});var ___createClass_189=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_error2=___interopRequireDefault_189(_$error_187),_extend2=___interopRequireDefault_189(_$extend_36),__defaultOptions_189={endpoint:null,fingerprint:___interopRequireDefault_189(_$fingerprint_179).default,resume:!0,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,headers:{},chunkSize:1/0,withCredentials:!1,uploadUrl:null,uploadSize:null,overridePatchMethod:!1,retryDelays:null,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,urlStorage:null,fileReader:null},Upload=function(){function e(t,n){!function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.options=(0,_extend2.default)(!0,{},__defaultOptions_189,n),this._storage=this.options.urlStorage,this.file=t,this.url=null,this._xhr=null,this._fingerprint=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0}return ___createClass_189(e,[{key:"start",value:function(){var e=this,t=this.file;t?this.options.endpoint||this.options.uploadUrl?(this.options.resume&&null==this._storage&&(this._storage=(0,_$storage_185.getStorage)()),this._source?this._start(this._source):(this.options.fileReader||_$source_184.getSource)(t,this.options.chunkSize,function(t,n){t?e._emitError(t):(e._source=n,e._start(n))})):this._emitError(new Error("tus: neither an endpoint or an upload URL is provided")):this._emitError(new Error("tus: no file or stream to upload provided"))}},{key:"_start",value:function(e){var t=this,n=this.file;if(this.options.uploadLengthDeferred)this._size=null;else if(null!=this.options.uploadSize){if(this._size=+this.options.uploadSize,isNaN(this._size))return void this._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(this._size=e.size,null==this._size)return void this._emitError(new Error("tus: cannot automatically derive upload's size from input and must be specified manually using the `uploadSize` option"));var i=this.options.retryDelays;if(null!=i){if("[object Array]"!==Object.prototype.toString.call(i))return void this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"));var o=this.options.onError;this.options.onError=function(e){t.options.onError=o,null!=t._offset&&t._offset>t._offsetBeforeRetry&&(t._retryAttempt=0);var n=!0;"undefined"!=typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(n=!1);var r=e.originalRequest?e.originalRequest.status:0,s=!inStatusCategory(r,400)||409===r||423===r;if(t._retryAttempt<i.length&&null!=e.originalRequest&&s&&n){var a=i[t._retryAttempt++];t._offsetBeforeRetry=t._offset,t.options.uploadUrl=t.url,t._retryTimeout=setTimeout(function(){t.start()},a)}else t._emitError(e)}}if(this._aborted=!1,null==this.url)return null!=this.options.uploadUrl?(this.url=this.options.uploadUrl,void this._resumeUpload()):void(this._hasStorage()?this.options.fingerprint(n,this.options,function(e,n){e?t._emitError(e):(t._fingerprint=n,t._storage.getItem(t._fingerprint,function(e,n){e?t._emitError(e):null!=n?(t.url=n,t._resumeUpload()):t._createUpload()}))}):this._createUpload());this._resumeUpload()}},{key:"abort",value:function(t,n){var i=this;null!==this._xhr&&(this._xhr.abort(),this._source.close()),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),n=n||function(){},t?e.terminate(this.url,this.options,function(e,t){if(e)return n(e,t);i._hasStorage()?i._storage.removeItem(i._fingerprint,n):n()}):n()}},{key:"_hasStorage",value:function(){return this.options.resume&&this._storage}},{key:"_emitXhrError",value:function(e,t,n){this._emitError(new _error2.default(t,n,e))}},{key:"_emitError",value:function(e){if("function"!=typeof this.options.onError)throw e;this.options.onError(e)}},{key:"_emitSuccess",value:function(){"function"==typeof this.options.onSuccess&&this.options.onSuccess()}},{key:"_emitProgress",value:function(e,t){"function"==typeof this.options.onProgress&&this.options.onProgress(e,t)}},{key:"_emitChunkComplete",value:function(e,t,n){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(e,t,n)}},{key:"_setupXHR",value:function(e){this._xhr=e,setupXHR(e,this.options)}},{key:"_createUpload",value:function(){var e=this;if(this.options.endpoint){var t=(0,_$request_183.newRequest)();t.open("POST",this.options.endpoint,!0),t.onload=function(){if(inStatusCategory(t.status,200)){var n=t.getResponseHeader("Location");if(null!=n){if(e.url=(0,_$request_183.resolveUrl)(e.options.endpoint,n),0===e._size)return e._emitSuccess(),void e._source.close();e._hasStorage()&&e._storage.setItem(e._fingerprint,e.url,function(t){t&&e._emitError(t)}),e._offset=0,e._startUpload()}else e._emitXhrError(t,new Error("tus: invalid or missing Location header"))}else e._emitXhrError(t,new Error("tus: unexpected response while creating upload"))},t.onerror=function(n){e._emitXhrError(t,new Error("tus: failed to create upload"),n)},this._setupXHR(t),this.options.uploadLengthDeferred?t.setRequestHeader("Upload-Defer-Length",1):t.setRequestHeader("Upload-Length",this._size);var n=function(e){var t=[];for(var n in e)t.push(n+" "+_$base64_44.Base64.encode(e[n]));return t.join(",")}(this.options.metadata);""!==n&&t.setRequestHeader("Upload-Metadata",n),t.send(null)}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function(){var e=this,t=(0,_$request_183.newRequest)();t.open("HEAD",this.url,!0),t.onload=function(){if(!inStatusCategory(t.status,200))return e._hasStorage()&&inStatusCategory(t.status,400)&&e._storage.removeItem(e._fingerprint,function(t){t&&e._emitError(t)}),423===t.status?void e._emitXhrError(t,new Error("tus: upload is currently locked; retry later")):e.options.endpoint?(e.url=null,void e._createUpload()):void e._emitXhrError(t,new Error("tus: unable to resume upload (new upload cannot be created without an endpoint)"));var n=parseInt(t.getResponseHeader("Upload-Offset"),10);if(isNaN(n))e._emitXhrError(t,new Error("tus: invalid or missing offset value"));else{var i=parseInt(t.getResponseHeader("Upload-Length"),10);if(!isNaN(i)||e.options.uploadLengthDeferred){if(n===i)return e._emitProgress(i,i),void e._emitSuccess();e._offset=n,e._startUpload()}else e._emitXhrError(t,new Error("tus: invalid or missing length value"))}},t.onerror=function(n){e._emitXhrError(t,new Error("tus: failed to resume upload"),n)},this._setupXHR(t),t.send(null)}},{key:"_startUpload",value:function(){var e=this;if(!this._aborted){var t=(0,_$request_183.newRequest)();this.options.overridePatchMethod?(t.open("POST",this.url,!0),t.setRequestHeader("X-HTTP-Method-Override","PATCH")):t.open("PATCH",this.url,!0),t.onload=function(){if(inStatusCategory(t.status,200)){var n=parseInt(t.getResponseHeader("Upload-Offset"),10);if(isNaN(n))e._emitXhrError(t,new Error("tus: invalid or missing offset value"));else{if(e._emitProgress(n,e._size),e._emitChunkComplete(n-e._offset,n,e._size),e._offset=n,n==e._size)return e.options.removeFingerprintOnSuccess&&e.options.resume&&e._storage.removeItem(e._fingerprint,function(t){t&&e._emitError(t)}),e._emitSuccess(),void e._source.close();e._startUpload()}}else e._emitXhrError(t,new Error("tus: unexpected response while uploading chunk"))},t.onerror=function(n){e._aborted||e._emitXhrError(t,new Error("tus: failed to upload chunk at offset "+e._offset),n)},"upload"in t&&(t.upload.onprogress=function(t){t.lengthComputable&&e._emitProgress(n+t.loaded,e._size)}),this._setupXHR(t),t.setRequestHeader("Upload-Offset",this._offset),t.setRequestHeader("Content-Type","application/offset+octet-stream");var n=this._offset,i=this._offset+this.options.chunkSize;(i===1/0||i>this._size)&&!this.options.uploadLengthDeferred&&(i=this._size),this._source.slice(n,i,function(n,i,o){n?e._emitError(n):(e.options.uploadLengthDeferred&&o&&(e._size=e._offset+(i&&i.size?i.size:0),t.setRequestHeader("Upload-Length",e._size)),null===i?t.send():(t.send(i),e._emitProgress(e._offset,e._size)))})}}}],[{key:"terminate",value:function(e,t,n){if("function"!=typeof t&&"function"!=typeof n)throw new Error("tus: a callback function must be specified");"function"==typeof t&&(n=t,t={});var i=(0,_$request_183.newRequest)();i.open("DELETE",e,!0),i.onload=function(){204===i.status?n():n(new _error2.default(new Error("tus: unexpected response while terminating upload"),null,i))},i.onerror=function(e){n(new _error2.default(e,new Error("tus: failed to terminate upload"),i))},setupXHR(i,t),i.send(null)}}]),e}();Upload.defaultOptions=__defaultOptions_189,_$upload_189.default=Upload;var __obj_188,_upload2=(__obj_188=_$upload_189)&&__obj_188.__esModule?__obj_188:{default:__obj_188},storage=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(_$storage_185),__defaultOptions_188=_upload2.default.defaultOptions,moduleExport={Upload:_upload2.default,canStoreURLs:storage.canStoreURLs,defaultOptions:__defaultOptions_188};if("undefined"!=typeof window){var _window=window,__XMLHttpRequest_188=_window.XMLHttpRequest,__Blob_188=_window.Blob;moduleExport.isSupported=__XMLHttpRequest_188&&__Blob_188&&"function"==typeof __Blob_188.prototype.slice}else moduleExport.isSupported=!0,moduleExport.FileStorage=storage.FileStorage;var _$moduleExport_188=moduleExport,_$getFingerprint_177=function(e){return function(t,n,i){return"undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)||"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()?_$moduleExport_188.Upload.defaultOptions.fingerprint(t,n,i):i(null,["tus",e.id,n.endpoint].join("-"))}},_$package_190={version:"1.5.0"},___class_178,___temp_178,__Plugin_178=_$lib_93.Plugin,__Provider_178=_$lib_89.Provider,__RequestClient_178=_$lib_89.RequestClient,__Socket_178=_$lib_89.Socket,tusDefaultOptions={endpoint:"",resume:!0,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,headers:{},chunkSize:1/0,withCredentials:!1,uploadUrl:null,uploadSize:null,overridePatchMethod:!1,retryDelays:null},_$lib_178=(___temp_178=___class_178=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).type="uploader",i.id=i.opts.id||"Tus",i.title="Tus",i.opts=___extends_178({},{resume:!0,autoRetry:!0,useFastRemoteRetry:!0,limit:0,retryDelays:[0,1e3,3e3,5e3]},n),i.requests=new _$RateLimitedQueue_198(i.opts.limit),i.uploaders=Object.create(null),i.uploaderEvents=Object.create(null),i.uploaderSockets=Object.create(null),i.handleResetProgress=i.handleResetProgress.bind(___assertThisInitialized_178(i)),i.handleUpload=i.handleUpload.bind(___assertThisInitialized_178(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.handleResetProgress=function(){var e=___extends_178({},this.uppy.getState().files);Object.keys(e).forEach(function(t){if(e[t].tus&&e[t].tus.uploadUrl){var n=___extends_178({},e[t].tus);delete n.uploadUrl,e[t]=___extends_178({},e[t],{tus:n})}}),this.uppy.setState({files:e})},o.resetUploaderReferences=function(e,t){if(void 0===t&&(t={}),this.uploaders[e]){var n=this.uploaders[e];n.abort(),t.abort&&setTimeout(function(){return n.abort(!0)},1e3),this.uploaders[e]=null}this.uploaderEvents[e]&&(this.uploaderEvents[e].remove(),this.uploaderEvents[e]=null),this.uploaderSockets[e]&&(this.uploaderSockets[e].close(),this.uploaderSockets[e]=null)},o.upload=function(e,t,n){var i=this;return this.resetUploaderReferences(e.id),new Promise(function(t,n){i.uppy.emit("upload-started",e);var o=___extends_178({},tusDefaultOptions,i.opts,e.tus||{});o.fingerprint=_$getFingerprint_177(e),o.onError=function(t){i.uppy.log(t),i.uppy.emit("upload-error",e,t),t.message="Failed because: "+t.message,i.resetUploaderReferences(e.id),l.done(),n(t)},o.onProgress=function(t,n){i.onReceiveUploadUrl(e,a.url),i.uppy.emit("upload-progress",e,{uploader:i,bytesUploaded:t,bytesTotal:n})},o.onSuccess=function(){var n={uploadURL:a.url};i.uppy.emit("upload-success",e,n),a.url&&i.uppy.log("Download "+a.file.name+" from "+a.url),i.resetUploaderReferences(e.id),l.done(),t(a)};var r=function(e,t,n){Object.prototype.hasOwnProperty.call(e,t)&&!Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=e[t])},s={};(Array.isArray(o.metaFields)?o.metaFields:Object.keys(e.meta)).forEach(function(t){s[t]=e.meta[t]}),r(s,"type","filetype"),r(s,"name","filename"),o.metadata=s;var a=new _$moduleExport_188.Upload(e.data,o);i.uploaders[e.id]=a,i.uploaderEvents[e.id]=new _$EventTracker_195(i.uppy);var l=i.requests.run(function(){return e.isPaused||a.start(),function(){}});i.onFileRemove(e.id,function(n){l.abort(),i.resetUploaderReferences(e.id,{abort:!!a.url}),t("upload "+n+" was removed")}),i.onPause(e.id,function(e){e?(l.abort(),a.abort()):(l.abort(),l=i.requests.run(function(){return a.start(),function(){}}))}),i.onPauseAll(e.id,function(){l.abort(),a.abort()}),i.onCancelAll(e.id,function(){l.abort(),i.resetUploaderReferences(e.id,{abort:!!a.url}),t("upload "+e.id+" was canceled")}),i.onResumeAll(e.id,function(){l.abort(),e.error&&a.abort(),l=i.requests.run(function(){return a.start(),function(){}})})}).catch(function(t){throw i.uppy.emit("upload-error",e,t),t})},o.uploadRemote=function(e,t,n){var i=this;this.resetUploaderReferences(e.id);var o=___extends_178({},this.opts);return e.tus&&___extends_178(o,e.tus),this.uppy.emit("upload-started",e),this.uppy.log(e.remote.url),e.serverToken?this.connectToServerSocket(e):new Promise(function(t,n){new(e.remote.providerOptions.provider?__Provider_178:__RequestClient_178)(i.uppy,e.remote.providerOptions).post(e.remote.url,___extends_178({},e.remote.body,{endpoint:o.endpoint,uploadUrl:o.uploadUrl,protocol:"tus",size:e.data.size,metadata:e.meta})).then(function(t){return i.uppy.setFileState(e.id,{serverToken:t.token}),e=i.uppy.getFile(e.id),i.connectToServerSocket(e)}).then(function(){t()}).catch(function(e){n(new Error(e))})})},o.connectToServerSocket=function(e){var t=this;return new Promise(function(n,i){
var o=e.serverToken,r=_$getSocketHost_215(e.remote.companionUrl),s=new __Socket_178({target:r+"/api/"+o,autoOpen:!1});t.uploaderSockets[e.id]=s,t.uploaderEvents[e.id]=new _$EventTracker_195(t.uppy),t.onFileRemove(e.id,function(){a.abort(),s.send("pause",{}),s.send("cancel",{}),t.resetUploaderReferences(e.id),n("upload "+e.id+" was removed")}),t.onPause(e.id,function(e){e?(a.abort(),s.send("pause",{})):(a.abort(),a=t.requests.run(function(){return s.send("resume",{}),function(){}}))}),t.onPauseAll(e.id,function(){a.abort(),s.send("pause",{})}),t.onCancelAll(e.id,function(){a.abort(),s.send("pause",{}),s.send("cancel",{}),t.resetUploaderReferences(e.id),n("upload "+e.id+" was canceled")}),t.onResumeAll(e.id,function(){a.abort(),e.error&&s.send("pause",{}),a=t.requests.run(function(){return s.send("resume",{}),function(){}})}),t.onRetry(e.id,function(){s.isOpen&&(s.send("pause",{}),s.send("resume",{}))}),t.onRetryAll(e.id,function(){s.isOpen&&(s.send("pause",{}),s.send("resume",{}))}),s.on("progress",function(n){return _$emitSocketProgress_202(t,n,e)}),s.on("error",function(n){var o=n.error.message,r=___extends_178(new Error(o),{cause:n.error});t.opts.useFastRemoteRetry?s.close():(t.resetUploaderReferences(e.id),t.uppy.setFileState(e.id,{serverToken:null})),t.uppy.emit("upload-error",e,r),a.done(),i(r)}),s.on("success",function(i){var o={uploadURL:i.url};t.uppy.emit("upload-success",e,o),t.resetUploaderReferences(e.id),a.done(),n()});var a=t.requests.run(function(){return s.open(),e.isPaused&&s.send("pause",{}),function(){}})})},o.onReceiveUploadUrl=function(e,t){var n=this.uppy.getFile(e.id);n&&(n.tus&&n.tus.uploadUrl===t||(this.uppy.log("[Tus] Storing upload url"),this.uppy.setFileState(n.id,{tus:___extends_178({},n.tus,{uploadUrl:t})})))},o.onFileRemove=function(e,t){this.uploaderEvents[e].on("file-removed",function(n){e===n.id&&t(n.id)})},o.onPause=function(e,t){this.uploaderEvents[e].on("upload-pause",function(n,i){e===n&&t(i)})},o.onRetry=function(e,t){this.uploaderEvents[e].on("upload-retry",function(n){e===n&&t()})},o.onRetryAll=function(e,t){var n=this;this.uploaderEvents[e].on("retry-all",function(i){n.uppy.getFile(e)&&t()})},o.onPauseAll=function(e,t){var n=this;this.uploaderEvents[e].on("pause-all",function(){n.uppy.getFile(e)&&t()})},o.onCancelAll=function(e,t){var n=this;this.uploaderEvents[e].on("cancel-all",function(){n.uppy.getFile(e)&&t()})},o.onResumeAll=function(e,t){var n=this;this.uploaderEvents[e].on("resume-all",function(){n.uppy.getFile(e)&&t()})},o.uploadFiles=function(e){var t=this,n=e.map(function(n,i){var o=i+1,r=e.length;return"error"in n&&n.error?Promise.reject(new Error(n.error)):n.isRemote?t.uploadRemote(n,o,r):t.upload(n,o,r)});return _$settle_228(n)},o.handleUpload=function(e){var t=this;if(0===e.length)return this.uppy.log("[Tus] No files to upload"),Promise.resolve();0===this.opts.limit&&this.uppy.log("[Tus] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/tus/#limit-0","warning"),this.uppy.log("[Tus] Uploading...");var n=e.map(function(e){return t.uppy.getFile(e)});return this.uploadFiles(n).then(function(){return null})},o.install=function(){this.uppy.setState({capabilities:___extends_178({},this.uppy.getState().capabilities,{resumableUploads:!0})}),this.uppy.addUploader(this.handleUpload),this.uppy.on("reset-progress",this.handleResetProgress),this.opts.autoRetry&&this.uppy.on("back-online",this.uppy.retryAll)},o.uninstall=function(){this.uppy.setState({capabilities:___extends_178({},this.uppy.getState().capabilities,{resumableUploads:!1})}),this.uppy.removeUploader(this.handleUpload),this.opts.autoRetry&&this.uppy.off("back-online",this.uppy.retryAll)},t}(__Plugin_178),___class_178.VERSION=_$package_190.version,___temp_178),re=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],_$parseuri_51=function(e){var t=e,n=e.indexOf("["),i=e.indexOf("]");-1!=n&&-1!=i&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));for(var o=re.exec(e||""),r={},s=14;s--;)r[parts[s]]=o[s]||"";return-1!=n&&-1!=i&&(r.source=t,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r},s=1e3,m=60*s,__h_66=60*m,d=24*__h_66,y=365.25*d,_$ms_66=function(e,t){t=t||{};var n,i=typeof e;if("string"===i&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*y;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*__h_66;case"minutes":case"minute":case"mins":case"min":case"m":return n*m;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===i&&!1===isNaN(e))return t.long?plural(n=e,d,"day")||plural(n,__h_66,"hour")||plural(n,m,"minute")||plural(n,s,"second")||n+" ms":function(e){return e>=d?Math.round(e/d)+"d":e>=__h_66?Math.round(e/__h_66)+"h":e>=m?Math.round(e/m)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},_$debug_65={};_$debug_65=_$debug_65=createDebug.debug=createDebug.default=createDebug,_$debug_65.coerce=function(e){return e instanceof Error?e.stack||e.message:e},_$debug_65.disable=function(){_$debug_65.enable("")},_$debug_65.enable=function(e){var t;_$debug_65.save(e),_$debug_65.names=[],_$debug_65.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?_$debug_65.skips.push(new RegExp("^"+e.substr(1)+"$")):_$debug_65.names.push(new RegExp("^"+e+"$")));for(t=0;t<_$debug_65.instances.length;t++){var o=_$debug_65.instances[t];o.enabled=_$debug_65.enabled(o.namespace)}},_$debug_65.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=_$debug_65.skips.length;t<n;t++)if(_$debug_65.skips[t].test(e))return!1;for(t=0,n=_$debug_65.names.length;t<n;t++)if(_$debug_65.names[t].test(e))return!0;return!1},_$debug_65.humanize=_$ms_66,_$debug_65.instances=[],_$debug_65.names=[],_$debug_65.skips=[],_$debug_65.formatters={};var _$browser_64={};(function(e){function t(){var t;try{t=_$browser_64.storage.debug}catch(e){}return!t&&void 0!==e&&"env"in e&&(t=e.env.DEBUG),t}(_$browser_64=_$browser_64=_$debug_65).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},_$browser_64.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+_$browser_64.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,n)}},_$browser_64.save=function(e){try{null==e?_$browser_64.storage.removeItem("debug"):_$browser_64.storage.debug=e}catch(e){}},_$browser_64.load=t,_$browser_64.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},_$browser_64.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),_$browser_64.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],_$browser_64.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},_$browser_64.enable(t())}).call(this,_$browser_54);var debug=_$browser_64("socket.io-client:url"),_$url_62=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(debug("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),debug("parse %s",e),n=_$parseuri_51(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port,n.href=n.protocol+"://"+i+(t&&t.port===n.port?"":":"+n.port),n},__s_74=1e3,__m_74=60*__s_74,__h_74=60*__m_74,__d_74=24*__h_74,__y_74=365.25*__d_74,_$ms_74=function(e,t){t=t||{};var n,i=typeof e;if("string"===i&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*__y_74;case"days":case"day":case"d":return n*__d_74;case"hours":case"hour":case"hrs":case"hr":case"h":return n*__h_74;case"minutes":case"minute":case"mins":case"min":case"m":return n*__m_74;case"seconds":case"second":case"secs":case"sec":case"s":return n*__s_74;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===i&&!1===isNaN(e))return t.long?__plural_74(n=e,__d_74,"day")||__plural_74(n,__h_74,"hour")||__plural_74(n,__m_74,"minute")||__plural_74(n,__s_74,"second")||n+" ms":function(e){return e>=__d_74?Math.round(e/__d_74)+"d":e>=__h_74?Math.round(e/__h_74)+"h":e>=__m_74?Math.round(e/__m_74)+"m":e>=__s_74?Math.round(e/__s_74)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},_$debug_72={};_$debug_72=_$debug_72=__createDebug_72.debug=__createDebug_72.default=__createDebug_72,_$debug_72.coerce=function(e){return e instanceof Error?e.stack||e.message:e},_$debug_72.disable=function(){_$debug_72.enable("")},_$debug_72.enable=function(e){var t;_$debug_72.save(e),_$debug_72.names=[],_$debug_72.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?_$debug_72.skips.push(new RegExp("^"+e.substr(1)+"$")):_$debug_72.names.push(new RegExp("^"+e+"$")));for(t=0;t<_$debug_72.instances.length;t++){var o=_$debug_72.instances[t];o.enabled=_$debug_72.enabled(o.namespace)}},_$debug_72.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=_$debug_72.skips.length;t<n;t++)if(_$debug_72.skips[t].test(e))return!1;for(t=0,n=_$debug_72.names.length;t<n;t++)if(_$debug_72.names[t].test(e))return!0;return!1},_$debug_72.humanize=_$ms_74,_$debug_72.instances=[],_$debug_72.names=[],_$debug_72.skips=[],_$debug_72.formatters={};var _$browser_71={};(function(e){function t(){var t;try{t=_$browser_71.storage.debug}catch(e){}return!t&&void 0!==e&&"env"in e&&(t=e.env.DEBUG),t}(_$browser_71=_$browser_71=_$debug_72).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},_$browser_71.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+_$browser_71.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,n)}},_$browser_71.save=function(e){try{null==e?_$browser_71.storage.removeItem("debug"):_$browser_71.storage.debug=e}catch(e){}},_$browser_71.load=t,_$browser_71.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},_$browser_71.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),_$browser_71.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],_$browser_71.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},_$browser_71.enable(t())}).call(this,_$browser_54);var _$componentEmitter_70={exports:{}};_$componentEmitter_70.exports=Emitter,Emitter.prototype.on=Emitter.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Emitter.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<i.length;o++)if((n=i[o])===t||n.fn===t){i.splice(o,1);break}return this},Emitter.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var i=0,o=(n=n.slice(0)).length;i<o;++i)n[i].apply(this,t);return this},Emitter.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Emitter.prototype.hasListeners=function(e){return!!this.listeners(e).length},_$componentEmitter_70=_$componentEmitter_70.exports;for(var toString={}.toString,_$isarray_73=Array.isArray||function(e){return"[object Array]"==toString.call(e)},_$base64Js_5={toByteArray:function(e){for(var t,n=getLens(e),i=n[0],o=n[1],r=new Arr(function(e,t,n){return 3*(t+n)/4-n}(0,i,o)),s=0,a=o>0?i-4:i,l=0;l<a;l+=4)t=revLookup[e.charCodeAt(l)]<<18|revLookup[e.charCodeAt(l+1)]<<12|revLookup[e.charCodeAt(l+2)]<<6|revLookup[e.charCodeAt(l+3)],r[s++]=t>>16&255,r[s++]=t>>8&255,r[s++]=255&t;return 2===o&&(t=revLookup[e.charCodeAt(l)]<<2|revLookup[e.charCodeAt(l+1)]>>4,r[s++]=255&t),1===o&&(t=revLookup[e.charCodeAt(l)]<<10|revLookup[e.charCodeAt(l+1)]<<4|revLookup[e.charCodeAt(l+2)]>>2,r[s++]=t>>8&255,r[s++]=255&t),r},fromByteArray:function(e){for(var t,n=e.length,i=n%3,o=[],r=0,s=n-i;r<s;r+=16383)o.push(encodeChunk(e,r,r+16383>s?s:r+16383));return 1===i?(t=e[n-1],o.push(lookup[t>>2]+lookup[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(lookup[t>>10]+lookup[t>>4&63]+lookup[t<<2&63]+"=")),o.join("")}},lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,__len_5=code.length;i<__len_5;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;var _$ieee754_41={read:function(e,t,n,i,o){var r,s,a=8*o-i-1,l=(1<<a)-1,c=l>>1,u=-7,d=n?o-1:0,h=n?-1:1,p=e[t+d];for(d+=h,r=p&(1<<-u)-1,p>>=-u,u+=a;u>0;r=256*r+e[t+d],d+=h,u-=8);for(s=r&(1<<-u)-1,r>>=-u,u+=i;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===r)r=1-c;else{if(r===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,i),r-=c}return(p?-1:1)*s*Math.pow(2,r-i)},write:function(e,t,n,i,o,r){var s,a,l,c=8*r-o-1,u=(1<<c)-1,d=u>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:r-1,f=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,o),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&a,p+=f,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[n+p]=255&s,p+=f,s/=256,c-=8);e[n+p-f]|=128*g}},_$isBuffer_69={};(function(e){_$isBuffer_69=function(o){return t&&e.isBuffer(o)||n&&(o instanceof ArrayBuffer||i(o))};var t="function"==typeof e&&"function"==typeof e.isBuffer,n="function"==typeof ArrayBuffer,i=function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}}).call(this,_$buffer_8({}).Buffer);var _$binary_67={},__toString_67=Object.prototype.toString,withNativeBlob="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===__toString_67.call(Blob),withNativeFile="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===__toString_67.call(File);_$binary_67.deconstructPacket=function(e){var t=[],n=e.data,i=e;return i.data=function e(t,n){if(!t)return t;if(_$isBuffer_69(t)){var i={_placeholder:!0,num:n.length};return n.push(t),i}if(_$isarray_73(t)){for(var o=new Array(t.length),r=0;r<t.length;r++)o[r]=e(t[r],n);return o}if("object"==typeof t&&!(t instanceof Date)){for(var s in o={},t)o[s]=e(t[s],n);return o}return t}(n,t),i.attachments=t.length,{packet:i,buffers:t}},_$binary_67.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(_$isarray_73(t))for(var i=0;i<t.length;i++)t[i]=e(t[i],n);else if("object"==typeof t)for(var o in t)t[o]=e(t[o],n);return t}(e.data,t),e.attachments=void 0,e},_$binary_67.removeBlobs=function(e,t){var n=0,i=e;!function e(o,r,s){if(!o)return o;if(withNativeBlob&&o instanceof Blob||withNativeFile&&o instanceof File){n++;var a=new FileReader;a.onload=function(){s?s[r]=this.result:i=this.result,--n||t(i)},a.readAsArrayBuffer(o)}else if(_$isarray_73(o))for(var l=0;l<o.length;l++)e(o[l],l,o);else if("object"==typeof o&&!_$isBuffer_69(o))for(var c in o)e(o[c],c,o)}(i),n||t(i)};var _$socketIoParser_68={},__debug_68=_$browser_71("socket.io-parser");_$socketIoParser_68.protocol=4,_$socketIoParser_68.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],_$socketIoParser_68.CONNECT=0,_$socketIoParser_68.DISCONNECT=1,_$socketIoParser_68.EVENT=2,_$socketIoParser_68.ACK=3,_$socketIoParser_68.ERROR=4,_$socketIoParser_68.BINARY_EVENT=5,_$socketIoParser_68.BINARY_ACK=6,_$socketIoParser_68.Encoder=Encoder,_$socketIoParser_68.Decoder=Decoder;var ERROR_PACKET=_$socketIoParser_68.ERROR+'"encode error"';Encoder.prototype.encode=function(e,t){__debug_68("encoding packet %j",e),_$socketIoParser_68.BINARY_EVENT===e.type||_$socketIoParser_68.BINARY_ACK===e.type?function(e,t){_$binary_67.removeBlobs(e,function(e){var n=_$binary_67.deconstructPacket(e),i=encodeAsString(n.packet),o=n.buffers;o.unshift(i),t(o)})}(e,t):t([encodeAsString(e)])},_$componentEmitter_70(Decoder.prototype),Decoder.prototype.add=function(e){var t;if("string"==typeof e)t=function(e){var t=0,n={type:Number(e.charAt(0))};if(null==_$socketIoParser_68.types[n.type])return error("unknown packet type "+n.type);if(_$socketIoParser_68.BINARY_EVENT===n.type||_$socketIoParser_68.BINARY_ACK===n.type){for(var i="";"-"!==e.charAt(++t)&&(i+=e.charAt(t),t!=e.length););if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1))for(n.nsp="";++t&&","!==(r=e.charAt(t))&&(n.nsp+=r,t!==e.length););else n.nsp="/";var o=e.charAt(t+1);if(""!==o&&Number(o)==o){for(n.id="";++t;){var r;if(null==(r=e.charAt(t))||Number(r)!=r){--t;break}if(n.id+=e.charAt(t),t===e.length)break}n.id=Number(n.id)}if(e.charAt(++t)){var s=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(t));if(!1===s||n.type!==_$socketIoParser_68.ERROR&&!_$isarray_73(s))return error("invalid payload");n.data=s}return __debug_68("decoded %s as %j",e,n),n}(e),_$socketIoParser_68.BINARY_EVENT===t.type||_$socketIoParser_68.BINARY_ACK===t.type?(this.reconstructor=new BinaryReconstructor(t),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",t)):this.emit("decoded",t);else{if(!_$isBuffer_69(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(t=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",t))}},Decoder.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},BinaryReconstructor.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=_$binary_67.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},BinaryReconstructor.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};var _$componentEmitter_26={exports:{}};_$componentEmitter_26.exports=__Emitter_26,__Emitter_26.prototype.on=__Emitter_26.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},__Emitter_26.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},__Emitter_26.prototype.off=__Emitter_26.prototype.removeListener=__Emitter_26.prototype.removeAllListeners=__Emitter_26.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<i.length;o++)if((n=i[o])===t||n.fn===t){i.splice(o,1);break}return this},__Emitter_26.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var i=0,o=(n=n.slice(0)).length;i<o;++i)n[i].apply(this,t);return this},__Emitter_26.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},__Emitter_26.prototype.hasListeners=function(e){return!!this.listeners(e).length},_$componentEmitter_26=_$componentEmitter_26.exports;var __s_29=1e3,__m_29=60*__s_29,__h_29=60*__m_29,__d_29=24*__h_29,__y_29=365.25*__d_29,_$ms_29=function(e,t){t=t||{};var n,i=typeof e;if("string"===i&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*__y_29;case"days":case"day":case"d":return n*__d_29;case"hours":case"hour":case"hrs":case"hr":case"h":return n*__h_29;case"minutes":case"minute":case"mins":case"min":case"m":return n*__m_29;case"seconds":case"second":case"secs":case"sec":case"s":return n*__s_29;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===i&&!1===isNaN(e))return t.long?__plural_29(n=e,__d_29,"day")||__plural_29(n,__h_29,"hour")||__plural_29(n,__m_29,"minute")||__plural_29(n,__s_29,"second")||n+" ms":function(e){return e>=__d_29?Math.round(e/__d_29)+"d":e>=__h_29?Math.round(e/__h_29)+"h":e>=__m_29?Math.round(e/__m_29)+"m":e>=__s_29?Math.round(e/__s_29)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},_$debug_28={};_$debug_28=_$debug_28=__createDebug_28.debug=__createDebug_28.default=__createDebug_28,_$debug_28.coerce=function(e){return e instanceof Error?e.stack||e.message:e},_$debug_28.disable=function(){_$debug_28.enable("")},_$debug_28.enable=function(e){var t;_$debug_28.save(e),_$debug_28.names=[],_$debug_28.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?_$debug_28.skips.push(new RegExp("^"+e.substr(1)+"$")):_$debug_28.names.push(new RegExp("^"+e+"$")));for(t=0;t<_$debug_28.instances.length;t++){var o=_$debug_28.instances[t];o.enabled=_$debug_28.enabled(o.namespace)}},_$debug_28.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=_$debug_28.skips.length;t<n;t++)if(_$debug_28.skips[t].test(e))return!1;for(t=0,n=_$debug_28.names.length;t<n;t++)if(_$debug_28.names[t].test(e))return!0;return!1},_$debug_28.humanize=_$ms_29,_$debug_28.instances=[],_$debug_28.names=[],_$debug_28.skips=[],_$debug_28.formatters={};var _$browser_27={};(function(e){function t(){var t;try{t=_$browser_27.storage.debug}catch(e){}return!t&&void 0!==e&&"env"in e&&(t=e.env.DEBUG),t}(_$browser_27=_$browser_27=_$debug_28).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},_$browser_27.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+_$browser_27.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,n)}},_$browser_27.save=function(e){try{null==e?_$browser_27.storage.removeItem("debug"):_$browser_27.storage.debug=e}catch(e){}},_$browser_27.load=t,_$browser_27.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},_$browser_27.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),_$browser_27.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],_$browser_27.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},_$browser_27.enable(t())}).call(this,_$browser_54);var indexOf=[].indexOf,_$indexof_42=function(e,t){if(indexOf)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1},_$parseqs_50={encode:function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},decode:function(e){for(var t={},n=e.split("&"),i=0,o=n.length;i<o;i++){var r=n[i].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}},_$keys_31=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var i in e)n.call(e,i)&&t.push(i);return t},__toString_39={}.toString,_$isarray_39=Array.isArray||function(e){return"[object Array]"==__toString_39.call(e)},_$hasBinary_38={};(function(e){var t=Object.prototype.toString,n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===t.call(Blob),i="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===t.call(File);_$hasBinary_38=function t(o){if(!o||"object"!=typeof o)return!1;if(_$isarray_39(o)){for(var r=0,s=o.length;r<s;r++)if(t(o[r]))return!0;return!1}if("function"==typeof e&&e.isBuffer&&e.isBuffer(o)||"function"==typeof ArrayBuffer&&o instanceof ArrayBuffer||n&&o instanceof Blob||i&&o instanceof File)return!0;if(o.toJSON&&"function"==typeof o.toJSON&&1===arguments.length)return t(o.toJSON(),!0);for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)&&t(o[a]))return!0;return!1}}).call(this,_$buffer_8({}).Buffer);var _$arraybufferSlice_2=function(e,t,n){var i=e.byteLength;if(t=t||0,n=n||i,e.slice)return e.slice(t,n);if(t<0&&(t+=i),n<0&&(n+=i),n>i&&(n=i),t>=i||t>=n||0===i)return new ArrayBuffer(0);for(var o=new Uint8Array(e),r=new Uint8Array(n-t),s=t,a=0;s<n;s++,a++)r[a]=o[s];return r.buffer},_$after_1=function(e,t,n){function i(e,r){if(i.count<=0)throw new Error("after called too many times");--i.count,e?(o=!0,t(e),t=n):0!==i.count||o||t(null,r)}var o=!1;return n=n||__noop_1,i.count=e,0===e?t():i},byteArray,byteCount,byteIndex,stringFromCharCode=String.fromCharCode,_$utf8_32={encode:function(e,t){for(var n=!1!==(t=t||{}).strict,i=ucs2decode(e),o=i.length,r=-1,s="";++r<o;)s+=encodeCodePoint(i[r],n);return s},decode:function(e,t){var n=!1!==(t=t||{}).strict;byteArray=ucs2decode(e),byteCount=byteArray.length,byteIndex=0;for(var i,o=[];!1!==(i=decodeSymbol(n));)o.push(i);return function(e){for(var t,n=e.length,i=-1,o="";++i<n;)(t=e[i])>65535&&(o+=stringFromCharCode((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=stringFromCharCode(t);return o}(o)}},_$base64Arraybuffer_4={};!function(){"use strict"
;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),n=0;n<e.length;n++)t[e.charCodeAt(n)]=n;_$base64Arraybuffer_4.encode=function(t){var n,i=new Uint8Array(t),o=i.length,r="";for(n=0;n<o;n+=3)r+=e[i[n]>>2],r+=e[(3&i[n])<<4|i[n+1]>>4],r+=e[(15&i[n+1])<<2|i[n+2]>>6],r+=e[63&i[n+2]];return o%3==2?r=r.substring(0,r.length-1)+"=":o%3==1&&(r=r.substring(0,r.length-2)+"=="),r},_$base64Arraybuffer_4.decode=function(e){var n,i,o,r,s,a=.75*e.length,l=e.length,c=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var u=new ArrayBuffer(a),d=new Uint8Array(u);for(n=0;n<l;n+=4)i=t[e.charCodeAt(n)],o=t[e.charCodeAt(n+1)],r=t[e.charCodeAt(n+2)],s=t[e.charCodeAt(n+3)],d[c++]=i<<2|o>>4,d[c++]=(15&o)<<4|r>>2,d[c++]=(3&r)<<6|63&s;return u}}();var _$blob_6={},BlobBuilder=void 0!==BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,blobSupported=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),blobSupportsArrayBufferView=blobSupported&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),blobBuilderSupported=BlobBuilder&&BlobBuilder.prototype.append&&BlobBuilder.prototype.getBlob;"undefined"!=typeof Blob&&(BlobBuilderConstructor.prototype=Blob.prototype,BlobConstructor.prototype=Blob.prototype),_$blob_6=blobSupported?blobSupportsArrayBufferView?Blob:BlobConstructor:blobBuilderSupported?BlobBuilderConstructor:void 0;var _$browser_30={},base64encoder;"undefined"!=typeof ArrayBuffer&&(base64encoder=_$base64Arraybuffer_4);var isAndroid="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),isPhantomJS="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),dontSendBlobs=isAndroid||isPhantomJS;_$browser_30.protocol=3;var packets=_$browser_30.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},packetslist=_$keys_31(packets),err={type:"error",data:"parser error"};_$browser_30.encodePacket=function(e,t,n,i){"function"==typeof t&&(i=t,t=!1),"function"==typeof n&&(i=n,n=null);var o=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&o instanceof ArrayBuffer)return function(e,t,n){if(!t)return _$browser_30.encodeBase64Packet(e,n);var i=e.data,o=new Uint8Array(i),r=new Uint8Array(1+i.byteLength);r[0]=packets[e.type];for(var s=0;s<o.length;s++)r[s+1]=o[s];return n(r.buffer)}(e,t,i);if(void 0!==_$blob_6&&o instanceof _$blob_6)return function(e,t,n){if(!t)return _$browser_30.encodeBase64Packet(e,n);if(dontSendBlobs)return function(e,t,n){if(!t)return _$browser_30.encodeBase64Packet(e,n);var i=new FileReader;return i.onload=function(){_$browser_30.encodePacket({type:e.type,data:i.result},t,!0,n)},i.readAsArrayBuffer(e.data)}(e,t,n);var i=new Uint8Array(1);return i[0]=packets[e.type],n(new _$blob_6([i.buffer,e.data]))}(e,t,i);if(o&&o.base64)return function(e,t){return t("b"+_$browser_30.packets[e.type]+e.data.data)}(e,i);var r=packets[e.type];return void 0!==e.data&&(r+=n?_$utf8_32.encode(String(e.data),{strict:!1}):String(e.data)),i(""+r)},_$browser_30.encodeBase64Packet=function(e,t){var n,i="b"+_$browser_30.packets[e.type];if(void 0!==_$blob_6&&e.data instanceof _$blob_6){var o=new FileReader;return o.onload=function(){var e=o.result.split(",")[1];t(i+e)},o.readAsDataURL(e.data)}try{n=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var r=new Uint8Array(e.data),s=new Array(r.length),a=0;a<r.length;a++)s[a]=r[a];n=String.fromCharCode.apply(null,s)}return i+=btoa(n),t(i)},_$browser_30.decodePacket=function(e,t,n){if(void 0===e)return err;if("string"==typeof e){if("b"===e.charAt(0))return _$browser_30.decodeBase64Packet(e.substr(1),t);if(n&&!1===(e=function(e){try{e=_$utf8_32.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return err;var i=e.charAt(0);return Number(i)==i&&packetslist[i]?e.length>1?{type:packetslist[i],data:e.substring(1)}:{type:packetslist[i]}:err}i=new Uint8Array(e)[0];var o=_$arraybufferSlice_2(e,1);return _$blob_6&&"blob"===t&&(o=new _$blob_6([o])),{type:packetslist[i],data:o}},_$browser_30.decodeBase64Packet=function(e,t){var n=packetslist[e.charAt(0)];if(!base64encoder)return{type:n,data:{base64:!0,data:e.substr(1)}};var i=base64encoder.decode(e.substr(1));return"blob"===t&&_$blob_6&&(i=new _$blob_6([i])),{type:n,data:i}},_$browser_30.encodePayload=function(e,t,n){"function"==typeof t&&(n=t,t=null);var i=_$hasBinary_38(e);return t&&i?_$blob_6&&!dontSendBlobs?_$browser_30.encodePayloadAsBlob(e,n):_$browser_30.encodePayloadAsArrayBuffer(e,n):e.length?void map(e,function(e,n){_$browser_30.encodePacket(e,!!i&&t,!1,function(e){n(null,function(e){return e.length+":"+e}(e))})},function(e,t){return n(t.join(""))}):n("0:")},_$browser_30.decodePayload=function(e,t,n){if("string"!=typeof e)return _$browser_30.decodePayloadAsBinary(e,t,n);var i;if("function"==typeof t&&(n=t,t=null),""===e)return n(err,0,1);for(var o,r,s="",a=0,l=e.length;a<l;a++){var c=e.charAt(a);if(":"===c){if(""===s||s!=(o=Number(s)))return n(err,0,1);if(s!=(r=e.substr(a+1,o)).length)return n(err,0,1);if(r.length){if(i=_$browser_30.decodePacket(r,t,!1),err.type===i.type&&err.data===i.data)return n(err,0,1);if(!1===n(i,a+o,l))return}a+=o,s=""}else s+=c}return""!==s?n(err,0,1):void 0},_$browser_30.encodePayloadAsArrayBuffer=function(e,t){if(!e.length)return t(new ArrayBuffer(0));map(e,function(e,t){_$browser_30.encodePacket(e,!0,!0,function(e){return t(null,e)})},function(e,n){var i=n.reduce(function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2},0),o=new Uint8Array(i),r=0;return n.forEach(function(e){var t="string"==typeof e,n=e;if(t){for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);n=i.buffer}o[r++]=t?0:1;var a=n.byteLength.toString();for(s=0;s<a.length;s++)o[r++]=parseInt(a[s]);for(o[r++]=255,i=new Uint8Array(n),s=0;s<i.length;s++)o[r++]=i[s]}),t(o.buffer)})},_$browser_30.encodePayloadAsBlob=function(e,t){map(e,function(e,t){_$browser_30.encodePacket(e,!0,!0,function(e){var n=new Uint8Array(1);if(n[0]=1,"string"==typeof e){for(var i=new Uint8Array(e.length),o=0;o<e.length;o++)i[o]=e.charCodeAt(o);e=i.buffer,n[0]=0}var r=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),s=new Uint8Array(r.length+1);for(o=0;o<r.length;o++)s[o]=parseInt(r[o]);if(s[r.length]=255,_$blob_6){var a=new _$blob_6([n.buffer,s.buffer,e]);t(null,a)}})},function(e,n){return t(new _$blob_6(n))})},_$browser_30.decodePayloadAsBinary=function(e,t,n){"function"==typeof t&&(n=t,t=null);for(var i=e,o=[];i.byteLength>0;){for(var r=new Uint8Array(i),s=0===r[0],a="",l=1;255!==r[l];l++){if(a.length>310)return n(err,0,1);a+=r[l]}i=_$arraybufferSlice_2(i,2+a.length),a=parseInt(a);var c=_$arraybufferSlice_2(i,0,a);if(s)try{c=String.fromCharCode.apply(null,new Uint8Array(c))}catch(e){var u=new Uint8Array(c);for(c="",l=0;l<u.length;l++)c+=String.fromCharCode(u[l])}o.push(c),i=_$arraybufferSlice_2(i,a)}var d=o.length;o.forEach(function(e,i){n(_$browser_30.decodePacket(e,t,!0),i,d)})};var _$transport_19={};_$transport_19=Transport,_$componentEmitter_26(Transport.prototype),Transport.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},Transport.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},Transport.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},Transport.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},Transport.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},Transport.prototype.onData=function(e){var t=_$browser_30.decodePacket(e,this.socket.binaryType);this.onPacket(t)},Transport.prototype.onPacket=function(e){this.emit("packet",e)},Transport.prototype.onClose=function(){this.readyState="closed",this.emit("close")};var _$hasCors_40={};try{_$hasCors_40="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(err){_$hasCors_40=!1}for(var _$xmlhttprequest_25=function(e){var t=e.xdomain,n=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||_$hasCors_40))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(e){}if(!t)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}},_$componentInherit_12=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},_$yeast_79={},prev,alphabet="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),length=64,__map_79={},seed=0,__i_79=0;__i_79<length;__i_79++)__map_79[alphabet[__i_79]]=__i_79;yeast.encode=encode,yeast.decode=function(e){var t=0;for(__i_79=0;__i_79<e.length;__i_79++)t=t*length+__map_79[e.charAt(__i_79)];return t},_$yeast_79=yeast;var __debug_23=_$browser_27("engine.io-client:polling"),_$Polling_23=Polling,hasXHR2=null!=new _$xmlhttprequest_25({xdomain:!1}).responseType;_$componentInherit_12(Polling,_$transport_19),Polling.prototype.name="polling",Polling.prototype.doOpen=function(){this.poll()},Polling.prototype.pause=function(e){function t(){__debug_23("paused"),n.readyState="paused",e()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var i=0;this.polling&&(__debug_23("we are currently polling - waiting to pause"),i++,this.once("pollComplete",function(){__debug_23("pre-pause polling complete"),--i||t()})),this.writable||(__debug_23("we are currently writing - waiting to pause"),i++,this.once("drain",function(){__debug_23("pre-pause writing complete"),--i||t()}))}else t()},Polling.prototype.poll=function(){__debug_23("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},Polling.prototype.onData=function(e){var t=this;__debug_23("polling got data %s",e),_$browser_30.decodePayload(e,this.socket.binaryType,function(e,n,i){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():__debug_23('ignoring poll - transport state "%s"',this.readyState))},Polling.prototype.doClose=function(){function e(){__debug_23("writing close packet"),t.write([{type:"close"}])}var t=this;"open"===this.readyState?(__debug_23("transport open - closing"),e()):(__debug_23("transport not open - deferring close"),this.once("open",e))},Polling.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};_$browser_30.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},Polling.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=_$yeast_79()),this.supportsBinary||e.sid||(e.b64=1),e=_$parseqs_50.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e};var _$pollingXhr_22={},__debug_22=_$browser_27("engine.io-client:polling-xhr");if(_$pollingXhr_22=XHR,_$pollingXhr_22.Request=Request,_$componentInherit_12(XHR,_$Polling_23),XHR.prototype.supportsBinary=!0,XHR.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new Request(e)},XHR.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,i=this.request({method:"POST",data:e,isBinary:n}),o=this;i.on("success",t),i.on("error",function(e){o.onError("xhr post error",e)}),this.sendXhr=i},XHR.prototype.doPoll=function(){__debug_22("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},_$componentEmitter_26(Request.prototype),Request.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new _$xmlhttprequest_25(e),n=this;try{__debug_22("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var i in t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&t.setRequestHeader(i,this.extraHeaders[i])}catch(e){}if("POST"===this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=!0),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){n.onLoad()},t.onerror=function(){n.onError(t.responseText)}):t.onreadystatechange=function(){if(2===t.readyState)try{var e=t.getResponseHeader("Content-Type");n.supportsBinary&&"application/octet-stream"===e&&(t.responseType="arraybuffer")}catch(e){}4===t.readyState&&(200===t.status||1223===t.status?n.onLoad():setTimeout(function(){n.onError(t.status)},0))},__debug_22("xhr data %s",this.data),t.send(this.data)}catch(e){return void setTimeout(function(){n.onError(e)},0)}"undefined"!=typeof document&&(this.index=Request.requestsCount++,Request.requests[this.index]=this)},Request.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},Request.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},Request.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},Request.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=empty:this.xhr.onreadystatechange=empty,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Request.requests[this.index],this.xhr=null}},Request.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e="application/octet-stream"===t&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},Request.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},Request.prototype.abort=function(){this.cleanup()},Request.requestsCount=0,Request.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",unloadHandler);else if("function"==typeof addEventListener){var terminationEvent="onpagehide"in self?"pagehide":"unload";addEventListener(terminationEvent,unloadHandler,!1)}var _$JSONPPolling_21={};(function(e){function t(){}function n(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:{}}function i(e){if(_$Polling_23.call(this,e),this.query=this.query||{},!o){var i=n();o=i.___eio=i.___eio||[]}this.index=o.length;var r=this;o.push(function(e){r.onData(e)}),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",function(){r.script&&(r.script.onerror=t)},!1)}_$JSONPPolling_21=i;var o,r=/\n/g,s=/\\n/g;_$componentInherit_12(i,_$Polling_23),i.prototype.supportsBinary=!1,i.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),_$Polling_23.prototype.doClose.call(this)},i.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},i.prototype.doWrite=function(e,t){function n(){i(),t()}function i(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(e){o.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+o.iframeId+'">';a=document.createElement(e)}catch(e){(a=document.createElement("iframe")).name=o.iframeId,a.src="javascript:0"}a.id=o.iframeId,o.form.appendChild(a),o.iframe=a}var o=this;if(!this.form){var a,l=document.createElement("form"),c=document.createElement("textarea"),u=this.iframeId="eio_iframe_"+this.index;l.className="socketio",l.style.position="absolute",l.style.top="-1000px",l.style.left="-1000px",l.target=u,l.method="POST",l.setAttribute("accept-charset","utf-8"),c.name="d",l.appendChild(c),document.body.appendChild(l),this.form=l,this.area=c}this.form.action=this.uri(),i(),e=e.replace(s,"\\\n"),this.area.value=e.replace(r,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===o.iframe.readyState&&n()}:this.iframe.onload=n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var _$websocket_24={};(function(e){function t(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=n&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(r=i),_$transport_19.call(this,e)}var n,i,o=_$browser_27("engine.io-client:websocket");if("undefined"!=typeof WebSocket)n=WebSocket;else if("undefined"!=typeof self)n=self.WebSocket||self.MozWebSocket;else try{i=_$empty_7({})}catch(e){}var r=n||i;_$websocket_24=t,_$componentInherit_12(t,_$transport_19),t.prototype.name="websocket",t.prototype.supportsBinary=!0,t.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new r(e,t):new r(e):new r(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},t.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},t.prototype.write=function(t){var n=this;this.writable=!1;for(var i=t.length,r=0,s=i;r<s;r++)!function(t){_$browser_30.encodePacket(t,n.supportsBinary,function(r){if(!n.usingBrowserWebSocket){var s={};t.options&&(s.compress=t.options.compress),n.perMessageDeflate&&("string"==typeof r?e.byteLength(r):r.length)<n.perMessageDeflate.threshold&&(s.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(r):n.ws.send(r,s)}catch(e){o("websocket closed before onclose event")}--i||(n.emit("flush"),setTimeout(function(){n.writable=!0,n.emit("drain")},0))})}(t[r])},t.prototype.onClose=function(){_$transport_19.prototype.onClose.call(this)},t.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},t.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=_$yeast_79()),this.supportsBinary||(e.b64=1),(e=_$parseqs_50.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},t.prototype.check=function(){return!(!r||"__initialize"in r&&this.name===t.prototype.name)}}).call(this,_$buffer_8({}).Buffer);var _$transports_20={polling:function(e){var t=!1,n=!1,i=!1!==e.jsonp;if("undefined"!=typeof location){var o="https:"===location.protocol,r=location.port;r||(r=o?443:80),t=e.hostname!==location.hostname||r!==e.port,n=e.secure!==o}if(e.xdomain=t,e.xscheme=n,"open"in new _$xmlhttprequest_25(e)&&!e.forceJSONP)return new _$pollingXhr_22(e);if(!i)throw new Error("JSONP disabled");return new _$JSONPPolling_21(e)}};_$transports_20.websocket=_$websocket_24;var _$socket_18={},__debug_18=_$browser_27("engine.io-client:socket");_$socket_18=__Socket_18,__Socket_18.priorWebsocketSuccess=!1,_$componentEmitter_26(__Socket_18.prototype),__Socket_18.protocol=_$browser_30.protocol,__Socket_18.Socket=__Socket_18,__Socket_18.Transport=_$transport_19,__Socket_18.transports=_$transports_20,__Socket_18.parser=_$browser_30,__Socket_18.prototype.createTransport=function(e){__debug_18('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=_$browser_30.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new _$transports_20[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},__Socket_18.prototype.open=function(){var e;if(this.rememberUpgrade&&__Socket_18.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},__Socket_18.prototype.setTransport=function(e){__debug_18("setting transport %s",e.name);var t=this;this.transport&&(__debug_18("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},__Socket_18.prototype.probe=function(e){function t(){if(u.onlyBinaryUpgrades){var t=!this.supportsBinary&&u.transport.supportsBinary;c=c||t}c||(__debug_18('probe transport "%s" opened',e),l.send([{type:"ping",data:"probe"}]),l.once("packet",function(t){if(!c)if("pong"===t.type&&"probe"===t.data){if(__debug_18('probe transport "%s" pong',e),u.upgrading=!0,u.emit("upgrading",l),!l)return;__Socket_18.priorWebsocketSuccess="websocket"===l.name,__debug_18('pausing current transport "%s"',u.transport.name),u.transport.pause(function(){c||"closed"!==u.readyState&&(__debug_18("changing transport and sending upgrade packet"),a(),u.setTransport(l),l.send([{type:"upgrade"}]),u.emit("upgrade",l),l=null,u.upgrading=!1,u.flush())})}else{__debug_18('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=l.name,u.emit("upgradeError",n)}}))}function n(){c||(c=!0,a(),l.close(),l=null)}function i(t){var i=new Error("probe error: "+t);i.transport=l.name,n(),__debug_18('probe transport "%s" failed because of error: %s',e,t),u.emit("upgradeError",i)}function o(){i("transport closed")}function r(){i("socket closed")}function s(e){l&&e.name!==l.name&&(__debug_18('"%s" works - aborting "%s"',e.name,l.name),n())}function a(){l.removeListener("open",t),l.removeListener("error",i),l.removeListener("close",o),u.removeListener("close",r),u.removeListener("upgrading",s)}__debug_18('probing transport "%s"',e);var l=this.createTransport(e,{probe:1}),c=!1,u=this;__Socket_18.priorWebsocketSuccess=!1,l.once("open",t),l.once("error",i),l.once("close",o),this.once("close",r),this.once("upgrading",s),l.open()},__Socket_18.prototype.onOpen=function(){if(__debug_18("socket open"),this.readyState="open",__Socket_18.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){__debug_18("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},__Socket_18.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(__debug_18('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else __debug_18('packet received with socket readyState "%s"',this.readyState)},__Socket_18.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},__Socket_18.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!==t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},__Socket_18.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){__debug_18("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},__Socket_18.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},__Socket_18.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},__Socket_18.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(__debug_18("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},__Socket_18.prototype.write=__Socket_18.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},__Socket_18.prototype.sendPacket=function(e,t,n,i){if("function"==typeof t&&(i=t,t=void 0),"function"==typeof n&&(i=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:e,data:t,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}},__Socket_18.prototype.close=function(){function e(){i.onClose("forced close"),__debug_18("socket closing - telling transport to close"),i.transport.close()}function t(){i.removeListener("upgrade",t),i.removeListener("upgradeError",t),e()}function n(){i.once("upgrade",t),i.once("upgradeError",t)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var i=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():e()}):this.upgrading?n():e()}return this},__Socket_18.prototype.onError=function(e){__debug_18("socket error %j",e),__Socket_18.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},__Socket_18.prototype.onClose=function(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(__debug_18('socket close with reason: "%s"',e),clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)},__Socket_18.prototype.filterUpgrades=function(e){for(var t=[],n=0,i=e.length;n<i;n++)~_$indexof_42(this.transports,e[n])&&t.push(e[n]);return t};var _$lib_17={};_$lib_17=_$socket_18,_$lib_17.parser=_$browser_30;var _$componentEmitter_63={exports:{}};_$componentEmitter_63.exports=__Emitter_63,__Emitter_63.prototype.on=__Emitter_63.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},__Emitter_63.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},__Emitter_63.prototype.off=__Emitter_63.prototype.removeListener=__Emitter_63.prototype.removeAllListeners=__Emitter_63.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<i.length;o++)if((n=i[o])===t||n.fn===t){i.splice(o,1);break}return this},__Emitter_63.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var i=0,o=(n=n.slice(0)).length;i<o;++i)n[i].apply(this,t);return this},__Emitter_63.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},__Emitter_63.prototype.hasListeners=function(e){return!!this.listeners(e).length},_$componentEmitter_63=_$componentEmitter_63.exports;var _$toArray_75=function(e,t){for(var n=[],i=(t=t||0)||0;i<e.length;i++)n[i-t]=e[i];return n},_$on_60=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}},slice=[].slice,_$componentBind_10=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var n=slice.call(arguments,2);return function(){return t.apply(e,n.concat(slice.call(arguments)))}},_$socket_61={},__debug_61=_$browser_64("socket.io-client:socket");_$socket_61=_$socket_61=__Socket_61;var events={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},emit=_$componentEmitter_63.prototype.emit;_$componentEmitter_63(__Socket_61.prototype),__Socket_61.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[_$on_60(e,"open",_$componentBind_10(this,"onopen")),_$on_60(e,"packet",_$componentBind_10(this,"onpacket")),_$on_60(e,"close",_$componentBind_10(this,"onclose"))]}},__Socket_61.prototype.open=__Socket_61.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},__Socket_61.prototype.send=function(){var e=_$toArray_75(arguments);return e.unshift("message"),this.emit.apply(this,e),this},
__Socket_61.prototype.emit=function(e){if(events.hasOwnProperty(e))return emit.apply(this,arguments),this;var t=_$toArray_75(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:_$hasBinary_38(t))?_$socketIoParser_68.BINARY_EVENT:_$socketIoParser_68.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(__debug_61("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},__Socket_61.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},__Socket_61.prototype.onopen=function(){if(__debug_61("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?_$parseqs_50.encode(this.query):this.query;__debug_61("sending connect packet with query %s",e),this.packet({type:_$socketIoParser_68.CONNECT,query:e})}else this.packet({type:_$socketIoParser_68.CONNECT})},__Socket_61.prototype.onclose=function(e){__debug_61("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},__Socket_61.prototype.onpacket=function(e){var t=e.nsp===this.nsp,n=e.type===_$socketIoParser_68.ERROR&&"/"===e.nsp;if(t||n)switch(e.type){case _$socketIoParser_68.CONNECT:this.onconnect();break;case _$socketIoParser_68.EVENT:case _$socketIoParser_68.BINARY_EVENT:this.onevent(e);break;case _$socketIoParser_68.ACK:case _$socketIoParser_68.BINARY_ACK:this.onack(e);break;case _$socketIoParser_68.DISCONNECT:this.ondisconnect();break;case _$socketIoParser_68.ERROR:this.emit("error",e.data)}},__Socket_61.prototype.onevent=function(e){var t=e.data||[];__debug_61("emitting event %j",t),null!=e.id&&(__debug_61("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?emit.apply(this,t):this.receiveBuffer.push(t)},__Socket_61.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var i=_$toArray_75(arguments);__debug_61("sending ack %j",i),t.packet({type:_$hasBinary_38(i)?_$socketIoParser_68.BINARY_ACK:_$socketIoParser_68.ACK,id:e,data:i})}}},__Socket_61.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(__debug_61("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):__debug_61("bad ack %s",e.id)},__Socket_61.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},__Socket_61.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)emit.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},__Socket_61.prototype.ondisconnect=function(){__debug_61("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},__Socket_61.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},__Socket_61.prototype.close=__Socket_61.prototype.disconnect=function(){return this.connected&&(__debug_61("performing disconnect (%s)",this.nsp),this.packet({type:_$socketIoParser_68.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},__Socket_61.prototype.compress=function(e){return this.flags.compress=e,this},__Socket_61.prototype.binary=function(e){return this.flags.binary=e,this};var _$backo2_3={};_$backo2_3=Backoff,Backoff.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},Backoff.prototype.reset=function(){this.attempts=0},Backoff.prototype.setMin=function(e){this.ms=e},Backoff.prototype.setMax=function(e){this.max=e},Backoff.prototype.setJitter=function(e){this.jitter=e};var _$manager_59={},__debug_59=_$browser_64("socket.io-client:manager"),__has_59=Object.prototype.hasOwnProperty;_$manager_59=Manager,Manager.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)__has_59.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},Manager.prototype.updateSocketIds=function(){for(var e in this.nsps)__has_59.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},Manager.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},_$componentEmitter_63(Manager.prototype),Manager.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},Manager.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},Manager.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},Manager.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},Manager.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},Manager.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},Manager.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},Manager.prototype.open=Manager.prototype.connect=function(e,t){if(__debug_59("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;__debug_59("opening %s",this.uri),this.engine=_$lib_17(this.uri,this.opts);var n=this.engine,i=this;this.readyState="opening",this.skipReconnect=!1;var o=_$on_60(n,"open",function(){i.onopen(),e&&e()}),r=_$on_60(n,"error",function(t){if(__debug_59("connect_error"),i.cleanup(),i.readyState="closed",i.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else i.maybeReconnectOnOpen()});if(!1!==this._timeout){var s=this._timeout;__debug_59("connect attempt will timeout after %d",s);var a=setTimeout(function(){__debug_59("connect attempt timed out after %d",s),o.destroy(),n.close(),n.emit("error","timeout"),i.emitAll("connect_timeout",s)},s);this.subs.push({destroy:function(){clearTimeout(a)}})}return this.subs.push(o),this.subs.push(r),this},Manager.prototype.onopen=function(){__debug_59("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(_$on_60(e,"data",_$componentBind_10(this,"ondata"))),this.subs.push(_$on_60(e,"ping",_$componentBind_10(this,"onping"))),this.subs.push(_$on_60(e,"pong",_$componentBind_10(this,"onpong"))),this.subs.push(_$on_60(e,"error",_$componentBind_10(this,"onerror"))),this.subs.push(_$on_60(e,"close",_$componentBind_10(this,"onclose"))),this.subs.push(_$on_60(this.decoder,"decoded",_$componentBind_10(this,"ondecoded")))},Manager.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},Manager.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},Manager.prototype.ondata=function(e){this.decoder.add(e)},Manager.prototype.ondecoded=function(e){this.emit("packet",e)},Manager.prototype.onerror=function(e){__debug_59("error",e),this.emitAll("error",e)},Manager.prototype.socket=function(e,t){function n(){~_$indexof_42(o.connecting,i)||o.connecting.push(i)}var i=this.nsps[e];if(!i){i=new _$socket_61(this,e,t),this.nsps[e]=i;var o=this;i.on("connecting",n),i.on("connect",function(){i.id=o.generateId(e)}),this.autoConnect&&n()}return i},Manager.prototype.destroy=function(e){var t=_$indexof_42(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},Manager.prototype.packet=function(e){__debug_59("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(n){for(var i=0;i<n.length;i++)t.engine.write(n[i],e.options);t.encoding=!1,t.processPacketQueue()}))},Manager.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},Manager.prototype.cleanup=function(){__debug_59("cleanup");for(var e=this.subs.length,t=0;t<e;t++)this.subs.shift().destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},Manager.prototype.close=Manager.prototype.disconnect=function(){__debug_59("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},Manager.prototype.onclose=function(e){__debug_59("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},Manager.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)__debug_59("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();__debug_59("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout(function(){e.skipReconnect||(__debug_59("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(__debug_59("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(__debug_59("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(n)}})}},Manager.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)};var _$componentEmitter_11={exports:{}};_$componentEmitter_11.exports=__Emitter_11,__Emitter_11.prototype.on=__Emitter_11.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},__Emitter_11.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},__Emitter_11.prototype.off=__Emitter_11.prototype.removeListener=__Emitter_11.prototype.removeAllListeners=__Emitter_11.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<i.length;o++)if((n=i[o])===t||n.fn===t){i.splice(o,1);break}return 0===i.length&&delete this._callbacks["$"+e],this},__Emitter_11.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){i=0;for(var o=(n=n.slice(0)).length;i<o;++i)n[i].apply(this,t)}return this},__Emitter_11.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},__Emitter_11.prototype.hasListeners=function(e){return!!this.listeners(e).length},_$componentEmitter_11=_$componentEmitter_11.exports;var _$parseUrl_175=function(e){var t=/^\w+:\/\//.exec(e),n=0;t&&(n=t[0].length+1);var i=e.indexOf("/",n);return-1===i?{origin:e,pathname:"/"}:{origin:e.slice(0,i),pathname:e.slice(i)}},socketIo,io=function(){return socketIo||(socketIo=_$lib_58({})),socketIo},statusOrder=["ASSEMBLY_UPLOADING","ASSEMBLY_EXECUTING","ASSEMBLY_COMPLETED"],TransloaditAssembly=function(e){function t(t){var n;return(n=e.call(this)||this).status=t,n.socket=null,n.pollInterval=null,n.closed=!1,n}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.connect=function(){this._connectSocket(),this._beginPolling()},o._onFinished=function(){this.emit("finished"),this.close()},o._connectSocket=function(){var e=this,t=_$parseUrl_175(this.status.websocket_url),n=io().connect(t.origin,{transports:["websocket"],path:t.pathname});n.on("connect",function(){n.emit("assembly_connect",{id:e.status.assembly_id}),e.emit("connect")}),n.on("error",function(){n.disconnect(),e.socket=null}),n.on("assembly_finished",function(){e._onFinished()}),n.on("assembly_upload_finished",function(t){e.emit("upload",t),e.status.uploads.push(t)}),n.on("assembly_uploading_finished",function(){e.emit("executing")}),n.on("assembly_upload_meta_data_extracted",function(){e.emit("metadata"),e._fetchStatus({diff:!1})}),n.on("assembly_result_finished",function(t,n){e.emit("result",t,n),e.status.results[t]||(e.status.results[t]=[]),e.status.results[t].push(n)}),n.on("assembly_error",function(t){e._onError(t),e._fetchStatus({diff:!1})}),this.socket=n},o._onError=function(e){this.emit("error",___extends_170(new Error(e.message),e))},o._beginPolling=function(){var e=this;this.pollInterval=setInterval(function(){e.socket&&e.socket.connected||e._fetchStatus()},2e3)},o._fetchStatus=function(e){var t=this,n=(void 0===e?{}:e).diff,i=void 0===n||n;return fetch(this.status.assembly_ssl_url).then(function(e){return e.json()}).then(function(e){t.closed||(t.emit("status",e),i?t.updateStatus(e):t.status=e)})},o.update=function(){return this._fetchStatus({diff:!0})},o.updateStatus=function(e){this._diffStatus(this.status,e),this.status=e},o._diffStatus=function(e,t){var n=this,i=e.ok,o=t.ok;if(t.error&&!e.error)return this._onError(t);var r=isStatus(o,"ASSEMBLY_EXECUTING")&&!isStatus(i,"ASSEMBLY_EXECUTING");r&&this.emit("executing"),Object.keys(t.uploads).filter(function(t){return!_$hasProperty_218(e.uploads,t)}).map(function(e){return t.uploads[e]}).forEach(function(e){n.emit("upload",e)}),r&&this.emit("metadata"),Object.keys(t.results).forEach(function(i){var o=t.results[i],r=e.results[i];o.filter(function(e){return!r||!r.some(function(t){return t.id===e.id})}).forEach(function(e){n.emit("result",i,e)})}),isStatus(o,"ASSEMBLY_COMPLETED")&&!isStatus(i,"ASSEMBLY_COMPLETED")&&this.emit("finished")},o.close=function(){this.closed=!0,this.socket&&(this.socket.disconnect(),this.socket=null),clearInterval(this.pollInterval)},t}(_$componentEmitter_11),_$TransloaditAssembly_170=TransloaditAssembly,_$Client_173=function(){function e(e){void 0===e&&(e={}),this.opts=e,this._reportError=this._reportError.bind(this),this._headers={"Transloadit-Client":this.opts.client}}var t=e.prototype;return t.createAssembly=function(e){var t=this,n=(e.templateId,e.params),i=e.fields,o=e.signature,r=e.expectedFiles,s=new FormData;s.append("params","string"==typeof n?n:JSON.stringify(n)),o&&s.append("signature",o),Object.keys(i).forEach(function(e){s.append(e,i[e])}),s.append("num_expected_upload_files",r);var a=this.opts.service+"/assemblies";return fetch(a,{method:"post",headers:this._headers,body:s}).then(function(e){return e.json()}).then(function(e){if(e.error){var t=new Error(e.error);throw t.message=e.error,t.details=e.reason,t}return e}).catch(function(e){return t._reportError(e,{url:a,type:"API_ERROR"})})},t.reserveFile=function(e,t){var n=this,i=encodeURIComponent(t.size),o=e.assembly_ssl_url+"/reserve_file?size="+i;return fetch(o,{method:"post",headers:this._headers}).then(function(e){return e.json()}).catch(function(i){return n._reportError(i,{assembly:e,file:t,url:o,type:"API_ERROR"})})},t.addFile=function(e,t){var n=this;if(!t.uploadURL)return Promise.reject(new Error("File does not have an `uploadURL`."));var i=encodeURIComponent(t.size),o=encodeURIComponent(t.uploadURL),r="size="+i+"&filename="+encodeURIComponent(t.name)+"&fieldname=file&s3Url="+o,s=e.assembly_ssl_url+"/add_file?"+r;return fetch(s,{method:"post",headers:this._headers}).then(function(e){return e.json()}).catch(function(i){return n._reportError(i,{assembly:e,file:t,url:s,type:"API_ERROR"})})},t.cancelAssembly=function(e){var t=this,n=e.assembly_ssl_url;return fetch(n,{method:"delete",headers:this._headers}).then(function(e){return e.json()}).catch(function(e){return t._reportError(e,{url:n,type:"API_ERROR"})})},t.getAssemblyStatus=function(e){var t=this;return fetch(e,{headers:this._headers}).then(function(e){return e.json()}).catch(function(n){return t._reportError(n,{url:e,type:"STATUS_ERROR"})})},t.submitError=function(e,t){var n=t.endpoint,i=t.instance,o=t.assembly,r=e.details?e.message+" ("+e.details+")":e.message;return fetch("https://status.transloadit.com/client_error",{method:"post",body:JSON.stringify({endpoint:n,instance:i,assembly_id:o,agent:"undefined"!=typeof navigator?navigator.userAgent:"",client:this.opts.client,error:r})}).then(function(e){return e.json()})},t._reportError=function(e,t){if(!1===this.opts.errorReporting)throw e;var n={type:t.type};throw t.assembly&&(n.assembly=t.assembly.assembly_id,n.instance=t.assembly.instance),t.url&&(n.endpoint=t.url),this.submitError(e,n).catch(function(e){}),e},e}(),_$AssemblyOptions_171={},AssemblyOptions=function(){function e(e,t){this.files=e,this.opts=t}var t=e.prototype;return t._normalizeAssemblyOptions=function(e,t){if(Array.isArray(t.fields)){var n=t.fields;t.fields={},n.forEach(function(n){t.fields[n]=e.meta[n]})}return t.fields||(t.fields={}),t},t._getAssemblyOptions=function(e){var t=this,n=this.opts;return Promise.resolve().then(function(){return n.getAssemblyOptions(e,n)}).then(function(n){return t._normalizeAssemblyOptions(e,n)}).then(function(t){return validateParams(t.params),{fileIDs:[e.id],options:t}})},t._dedupe=function(e){var t=Object.create(null);return e.forEach(function(e){var n,i=e.fileIDs,o=e.options,r=JSON.stringify(o);t[r]?(n=t[r].fileIDs).push.apply(n,i):t[r]={options:o,fileIDs:[].concat(i)}}),Object.keys(t).map(function(e){return t[e]})},t.build=function(){var e=this,t=this.opts;return this.files.length>0?Promise.all(this.files.map(function(t){return e._getAssemblyOptions(t)})).then(function(t){return e._dedupe(t)}):t.alwaysRunAssembly?Promise.resolve(t.getAssemblyOptions(null,t)).then(function(t){return validateParams(t.params),[{fileIDs:e.files.map(function(e){return e.id}),options:t}]}):Promise.resolve([])},e}();_$AssemblyOptions_171=AssemblyOptions,_$AssemblyOptions_171.validateParams=validateParams;var TransloaditAssemblyWatcher=function(e){function t(t,n){var i;return(i=e.call(this)||this)._uppy=t,i._assemblyIDs=n,i._remaining=n.length,i.promise=new Promise(function(e,t){i._resolve=e,i._reject=t}),i._onAssemblyComplete=i._onAssemblyComplete.bind(___assertThisInitialized_172(i)),i._onAssemblyCancel=i._onAssemblyCancel.bind(___assertThisInitialized_172(i)),i._onAssemblyError=i._onAssemblyError.bind(___assertThisInitialized_172(i)),i._onImportError=i._onImportError.bind(___assertThisInitialized_172(i)),i._addListeners(),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o._watching=function(e){return-1!==this._assemblyIDs.indexOf(e)},o._onAssemblyComplete=function(e){this._watching(e.assembly_id)&&(this._uppy.log("[Transloadit] AssemblyWatcher: Got Assembly finish "+e.assembly_id),this.emit("assembly-complete",e.assembly_id),this._checkAllComplete())},o._onAssemblyCancel=function(e){this._watching(e.assembly_id)&&this._checkAllComplete()},o._onAssemblyError=function(e,t){this._watching(e.assembly_id)&&(this._uppy.log("[Transloadit] AssemblyWatcher: Got Assembly error "+e.assembly_id),this._uppy.log(t),this.emit("assembly-error",e.assembly_id,t),this._checkAllComplete())},o._onImportError=function(e,t,n){this._watching(e.assembly_id)&&this._onAssemblyError(e,n)},o._checkAllComplete=function(){this._remaining-=1,0===this._remaining&&(this._removeListeners(),this._resolve())},o._removeListeners=function(){this._uppy.off("transloadit:complete",this._onAssemblyComplete),this._uppy.off("transloadit:assembly-cancel",this._onAssemblyCancel),this._uppy.off("transloadit:assembly-error",this._onAssemblyError),this._uppy.off("transloadit:import-error",this._onImportError)},o._addListeners=function(){this._uppy.on("transloadit:complete",this._onAssemblyComplete),this._uppy.on("transloadit:assembly-cancel",this._onAssemblyCancel),this._uppy.on("transloadit:assembly-error",this._onAssemblyError),this._uppy.on("transloadit:import-error",this._onImportError)},t}(_$componentEmitter_11),_$TransloaditAssemblyWatcher_172=TransloaditAssemblyWatcher,_$package_176={version:"1.4.0"},_$lib_174={},___class_174,___temp_174,__Plugin_174=_$lib_93.Plugin,COMPANION="https://api2.transloadit.com/companion",TL_COMPANION=/https?:\/\/api2(?:-\w+)?\.transloadit\.com\/companion/,TL_UPPY_SERVER=/https?:\/\/api2(?:-\w+)?\.transloadit\.com\/uppy-server/;___temp_174=___class_174=function(e){function t(t,n){var i;(i=e.call(this,t,n)||this).type="uploader",i.id=i.opts.id||"Transloadit",i.title="Transloadit",i.defaultLocale={strings:{creatingAssembly:"Preparing upload...",creatingAssemblyFailed:"Transloadit: Could not create Assembly",encoding:"Encoding..."}};var o={service:"https://api2.transloadit.com",errorReporting:!0,waitForEncoding:!1,waitForMetadata:!1,alwaysRunAssembly:!1,importFromUploadURLs:!1,signature:null,params:null,fields:{},getAssemblyOptions:defaultGetAssemblyOptions,limit:0};i.opts=___extends_174({},o,{},n),i.i18nInit(),i._prepareUpload=i._prepareUpload.bind(___assertThisInitialized_174(i)),i._afterUpload=i._afterUpload.bind(___assertThisInitialized_174(i)),i._onError=i._onError.bind(___assertThisInitialized_174(i)),i._onTusError=i._onTusError.bind(___assertThisInitialized_174(i)),i._onCancelAll=i._onCancelAll.bind(___assertThisInitialized_174(i)),i._onFileUploadURLAvailable=i._onFileUploadURLAvailable.bind(___assertThisInitialized_174(i)),i._onRestored=i._onRestored.bind(___assertThisInitialized_174(i)),i._getPersistentData=i._getPersistentData.bind(___assertThisInitialized_174(i));var r=i.opts.getAssemblyOptions!==o.getAssemblyOptions;return i.opts.params?_$AssemblyOptions_171.validateParams(i.opts.params):r||_$AssemblyOptions_171.validateParams(null),i.client=new _$Client_173({service:i.opts.service,client:i._getClientVersion(),errorReporting:i.opts.errorReporting}),i.activeAssemblies={},i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.setOptions=function(t){e.prototype.setOptions.call(this,t),this.i18nInit()},o.i18nInit=function(){this.translator=new _$Translator_199([this.defaultLocale,this.uppy.locale,this.opts.locale]),this.i18n=this.translator.translate.bind(this.translator),this.i18nArray=this.translator.translateArray.bind(this.translator),this.setPluginState()},o._getClientVersion=function(){var e=this,t=["uppy-core:"+this.uppy.constructor.VERSION,"uppy-transloadit:"+this.constructor.VERSION,"uppy-tus:"+_$lib_178.VERSION],n=function(n,i){var o=e.uppy.getPlugin(n);o&&t.push(i+":"+o.constructor.VERSION)};return this.opts.importFromUploadURLs&&(n("XHRUpload","uppy-xhr-upload"),n("AwsS3","uppy-aws-s3"),n("AwsS3Multipart","uppy-aws-s3-multipart")),n("Dropbox","uppy-dropbox"),n("Facebook","uppy-facebook"),n("GoogleDrive","uppy-google-drive"),n("Instagram","uppy-instagram"),n("OneDrive","uppy-onedrive"),n("Url","uppy-url"),t.join(",")},o._attachAssemblyMetadata=function(e,t){var n=___extends_174({},e.meta,{assembly_url:t.assembly_url,filename:e.name,fieldname:"file"}),i=___extends_174({},e.tus,{endpoint:t.tus_url}),o=e.remote;if(e.remote&&TL_UPPY_SERVER.test(e.remote.companionUrl)){var r=new Error("The https://api2.transloadit.com/uppy-server endpoint was renamed to https://api2.transloadit.com/companion, please update your `companionUrl` options accordingly.");throw this.uppy.log(r),r}if(e.remote&&TL_COMPANION.test(e.remote.companionUrl)){var s=t.companion_url.replace(/\/$/,""),a=e.remote.url.replace(e.remote.companionUrl,"").replace(/^\//,"");o=___extends_174({},e.remote,{companionUrl:s,url:s+"/"+a})}var l=___extends_174({},e,{transloadit:{assembly:t.assembly_id}});return this.opts.importFromUploadURLs||___extends_174(l,{meta:n,tus:i,remote:o}),l},o._createAssembly=function(e,t,n){var i=this;return this.uppy.log("[Transloadit] create Assembly"),this.client.createAssembly({params:n.params,fields:n.fields,expectedFiles:e.length,signature:n.signature}).then(function(n){var o,r,s=new _$TransloaditAssembly_170(n),a=s.status,l=i.getPluginState(),c=l.assemblies,u=l.uploadsAssemblies;i.setPluginState({assemblies:___extends_174({},c,(o={},o[a.assembly_id]=a,o)),uploadsAssemblies:___extends_174({},u,(r={},r[t]=[].concat(u[t],[a.assembly_id]),r))});var d=i.uppy.getState().files,h={};return e.forEach(function(e){h[e]=i._attachAssemblyMetadata(i.uppy.getFile(e),a)}),i.uppy.setState({files:___extends_174({},d,{},h)}),i.uppy.emit("transloadit:assembly-created",a,e),i._connectAssembly(s),i.uppy.log("[Transloadit] Created Assembly "+a.assembly_id),s}).catch(function(e){throw e.message=i.i18n("creatingAssemblyFailed")+": "+e.message,e})},o._shouldWaitAfterUpload=function(){return this.opts.waitForEncoding||this.opts.waitForMetadata},o._reserveFiles=function(e,t){var n=this;return Promise.all(t.map(function(t){var i=n.uppy.getFile(t);return n.client.reserveFile(e,i)}))},o._onFileUploadURLAvailable=function(e){var t=this;if(e&&e.transloadit&&e.transloadit.assembly){var n=this.getPluginState().assemblies[e.transloadit.assembly];this.client.addFile(n,e).catch(function(i){t.uppy.log(i),t.uppy.emit("transloadit:import-error",n,e.id,i)})}},o._findFile=function(e){for(var t=this.uppy.getFiles(),n=0;n<t.length;n++){var i=t[n];if(i.uploadURL===e.tus_upload_url)return i;if(i.tus&&i.tus.uploadUrl===e.tus_upload_url)return i;if(!e.is_tus_file&&i.name===e.name&&i.size===e.size)return i}},o._onFileUploadComplete=function(e,t){var n,i=this.getPluginState(),o=this._findFile(t);o?(this.setPluginState({files:___extends_174({},i.files,(n={},n[t.id]={assembly:e,id:o.id,uploadedFile:t},n))}),this.uppy.emit("transloadit:upload",t,this.getAssembly(e))):this.uppy.log("[Transloadit] Couldn’t file the file, it was likely removed in the process")},o._onResult=function(e,t,n){var i=this.getPluginState(),o=i.files[n.original_id];n.localId=o?o.id:null;var r={result:n,stepName:t,id:n.id,assembly:e};this.setPluginState({results:[].concat(i.results,[r])}),this.uppy.emit("transloadit:result",t,n,this.getAssembly(e))},o._onAssemblyFinished=function(e){var t=this,n=e.assembly_ssl_url;this.client.getAssemblyStatus(n).then(function(e){var n,i=t.getPluginState();t.setPluginState({assemblies:___extends_174({},i.assemblies,(n={},n[e.assembly_id]=e,n))}),t.uppy.emit("transloadit:complete",e)})},o._cancelAssembly=function(e){var t=this;return this.client.cancelAssembly(e).then(function(){t.uppy.emit("transloadit:assembly-cancelled",e)})},o._onCancelAll=function(){var e=this,t=this.getPluginState().assemblies,n=Object.keys(t).map(function(t){var n=e.getAssembly(t);return e._cancelAssembly(n)});Promise.all(n).catch(function(t){e.uppy.log(t)})},o._getPersistentData=function(e){var t,n=this.getPluginState(),i=n.assemblies,o=n.uploadsAssemblies;e(((t={})[this.id]={assemblies:i,uploadsAssemblies:o},t))},o._onRestored=function(e){var t=this,n=e&&e[this.id]?e[this.id]:{},i=n.assemblies||{},o=n.uploadsAssemblies||{};0!==Object.keys(o).length&&(this.restored=Promise.resolve().then(function(){var e,n,r;return e=i,n={},r=[],Object.keys(e).forEach(function(i){var o=e[i];o.uploads.forEach(function(e){var o=t._findFile(e);n[e.id]={id:o.id,assembly:i,uploadedFile:e}});var s=t.getPluginState();Object.keys(o.results).forEach(function(e){o.results[e].forEach(function(t){var n=s.files[t.original_id];t.localId=n?n.id:null,r.push({id:t.id,result:t,stepName:e,assembly:i})})})}),t.setPluginState({assemblies:e,files:n,results:r,uploadsAssemblies:o}),function(){var e=t.getPluginState().assemblies;Object.keys(e).forEach(function(n){var i=new _$TransloaditAssembly_170(e[n]);t._connectAssembly(i)})}(),function(){var e=t.getPluginState().assemblies;return Promise.all(Object.keys(e).map(function(e){return t.activeAssemblies[e].update()}))}()}),this.restored.then(function(){t.restored=null}))},o._connectAssembly=function(e){var t=this,n=e.status.assembly_id;return this.activeAssemblies[n]=e,e.on("status",function(e){var i,o=t.getPluginState().assemblies;t.setPluginState({assemblies:___extends_174({},o,(i={},i[n]=e,i))})}),e.on("upload",function(e){t._onFileUploadComplete(n,e)}),e.on("error",function(n){n.assembly=e.status,t.uppy.emit("transloadit:assembly-error",e.status,n)}),e.on("executing",function(){t.uppy.emit("transloadit:assembly-executing",e.status)}),this.opts.waitForEncoding&&e.on("result",function(e,i){t._onResult(n,e,i)}),this.opts.waitForEncoding?e.on("finished",function(){t._onAssemblyFinished(e.status)}):this.opts.waitForMetadata&&e.on("metadata",function(){t._onAssemblyFinished(e.status)}),"ASSEMBLY_COMPLETE"===e.ok?e:(new Promise(function(t,n){e.once("connect",t),e.once("status",t),e.once("error",n)}).then(function(){t.uppy.log("[Transloadit] Socket is ready")}),e.connect(),e)},o._prepareUpload=function(e,t){var n,i=this;(e=e.filter(function(e){return!e.error})).forEach(function(e){var t=i.uppy.getFile(e);i.uppy.emit("preprocess-progress",t,{mode:"indeterminate",message:i.i18n("creatingAssembly")})});var o=function(e){var n=e.fileIDs,o=e.options;return i._createAssembly(n,t,o).then(function(e){if(i.opts.importFromUploadURLs)return i._reserveFiles(e,n)}).then(function(){n.forEach(function(e){var t=i.uppy.getFile(e);i.uppy.emit("preprocess-complete",t)})}).catch(function(e){throw n.forEach(function(t){var n=i.uppy.getFile(t);i.uppy.emit("preprocess-complete",n),i.uppy.emit("upload-error",n,e)}),e})},r=this.getPluginState().uploadsAssemblies;this.setPluginState({uploadsAssemblies:___extends_174({},r,(n={},n[t]=[],n))});var s=e.map(function(e){return i.uppy.getFile(e)});return new _$AssemblyOptions_171(s,this.opts).build().then(function(e){return Promise.all(e.map(o))},function(t){throw e.forEach(function(e){var n=i.uppy.getFile(e);i.uppy.emit("preprocess-complete",n),i.uppy.emit("upload-error",n,t)}),t})},o._afterUpload=function(e,t){var n=this;e=e.filter(function(e){return!e.error});var i=this.getPluginState();if(this.restored)return this.restored.then(function(){return n._afterUpload(e,t)});var o=i.uploadsAssemblies[t];if(!this._shouldWaitAfterUpload()){o.forEach(function(e){n.activeAssemblies[e].close(),delete n.activeAssemblies[e]});var r=o.map(function(e){return n.getAssembly(e)});return this.uppy.addResultData(t,{transloadit:r}),Promise.resolve()}if(0===o.length)return this.uppy.addResultData(t,{transloadit:[]}),Promise.resolve();var s=new _$TransloaditAssemblyWatcher_172(this.uppy,o);return e.forEach(function(e){var t=n.uppy.getFile(e);n.uppy.emit("postprocess-progress",t,{mode:"indeterminate",message:n.i18n("encoding")})}),s.on("assembly-complete",function(e){n.getAssemblyFiles(e).forEach(function(e){n.uppy.emit("postprocess-complete",e)})}),s.on("assembly-error",function(e,t){n.getAssemblyFiles(e).forEach(function(e){n.uppy.emit("upload-error",e,t),n.uppy.emit("postprocess-complete",e)})}),s.promise.then(function(){var e=o.map(function(e){return n.getAssembly(e)}),i=___extends_174({},n.getPluginState().uploadsAssemblies);delete i[t],n.setPluginState({uploadsAssemblies:i}),n.uppy.addResultData(t,{transloadit:e})})},o._onError=function(e,t){var n=this;this.uppy.log("[Transloadit] _onError in upload "+t),this.uppy.log(e),this.getPluginState().uploadsAssemblies[t].forEach(function(e){n.activeAssemblies[e]&&n.activeAssemblies[e].close()})},o._onTusError=function(e){if(e&&/^tus: /.test(e.message)){var t=e.originalRequest&&e.originalRequest.responseURL?e.originalRequest.responseURL:null;this.client.submitError(e,{url:t,type:"TUS_ERROR"}).then(function(e){})}},o.install=function(){this.uppy.addPreProcessor(this._prepareUpload),this.uppy.addPostProcessor(this._afterUpload),this.uppy.on("error",this._onError),this.uppy.on("cancel-all",this._onCancelAll),this.uppy.on("upload-error",this._onTusError),
this.opts.importFromUploadURLs?this.uppy.on("upload-success",this._onFileUploadURLAvailable):this.uppy.use(_$lib_178,{resume:!1,useFastRemoteRetry:!1,metaFields:["assembly_url","filename","fieldname"],limit:this.opts.limit}),this.uppy.on("restore:get-data",this._getPersistentData),this.uppy.on("restored",this._onRestored),this.setPluginState({assemblies:{},uploadsAssemblies:{},files:{},results:[]});var e=this.uppy.getState().capabilities;this.uppy.setState({capabilities:___extends_174({},e,{individualCancellation:!1})})},o.uninstall=function(){this.uppy.removePreProcessor(this._prepareUpload),this.uppy.removePostProcessor(this._afterUpload),this.uppy.off("error",this._onError),this.opts.importFromUploadURLs&&this.uppy.off("upload-success",this._onFileUploadURLAvailable);var e=this.uppy.getState().capabilities;this.uppy.setState({capabilities:___extends_174({},e,{individualCancellation:!0})})},o.getAssembly=function(e){return this.getPluginState().assemblies[e]},o.getAssemblyFiles=function(e){return this.uppy.getFiles().filter(function(t){return t&&t.transloadit&&t.transloadit.assembly===e})},t}(__Plugin_174),___class_174.VERSION=_$package_176.version,_$lib_174=___temp_174,_$lib_174.COMPANION=COMPANION,_$lib_174.UPPY_SERVER=COMPANION,_$lib_174.COMPANION_PATTERN=/\.transloadit\.com$/;var _$lib_37={__esModule:!0};_$lib_37.default=getFormData,_$lib_37.getFieldData=getFieldData;var NODE_LIST_CLASSES={"[object HTMLCollection]":!0,"[object NodeList]":!0,"[object RadioNodeList]":!0},IGNORED_ELEMENT_TYPES={button:!0,fieldset:!0,reset:!0,submit:!0},CHECKED_INPUT_TYPES={checkbox:!0,radio:!0},TRIM_RE=/^\s+|\s+$/g,__slice_37=Array.prototype.slice,__toString_37=Object.prototype.toString;getFormData.getFieldData=getFieldData;var _$package_129={version:"1.3.3"},___class_128,___temp_128,__Plugin_128=_$lib_93.Plugin,__getFormData_128=_$lib_37.default||_$lib_37,_$lib_128=(___temp_128=___class_128=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).type="acquirer",i.id=i.opts.id||"Form",i.title="Form",i.opts=___extends_128({},{target:null,resultName:"uppyResult",getMetaFromForm:!0,addResultToForm:!0,multipleResults:!1,submitOnSuccess:!1,triggerUploadOnSubmit:!1},n),i.handleFormSubmit=i.handleFormSubmit.bind(___assertThisInitialized_128(i)),i.handleUploadStart=i.handleUploadStart.bind(___assertThisInitialized_128(i)),i.handleSuccess=i.handleSuccess.bind(___assertThisInitialized_128(i)),i.addResultToForm=i.addResultToForm.bind(___assertThisInitialized_128(i)),i.getMetaFromForm=i.getMetaFromForm.bind(___assertThisInitialized_128(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.handleUploadStart=function(){this.opts.getMetaFromForm&&this.getMetaFromForm()},o.handleSuccess=function(e){this.opts.addResultToForm&&this.addResultToForm(e),this.opts.submitOnSuccess&&this.form.submit()},o.handleFormSubmit=function(e){var t=this;if(this.opts.triggerUploadOnSubmit){e.preventDefault();var n=_$toArray_229(e.target.elements),i=[];n.forEach(function(e){("BUTTON"===e.tagName||"INPUT"===e.tagName&&"submit"===e.type)&&!e.disabled&&(e.disabled=!0,i.push(e))}),this.uppy.upload().then(function(){i.forEach(function(e){e.disabled=!1})},function(e){return i.forEach(function(e){e.disabled=!1}),Promise.reject(e)}).catch(function(e){t.uppy.log(e.stack||e.message||e)})}},o.addResultToForm=function(e){this.uppy.log("[Form] Adding result to the original form:"),this.uppy.log(e);var t=this.form.querySelector('[name="'+this.opts.resultName+'"]');if(t)if(this.opts.multipleResults){var n;try{n=JSON.parse(t.value)}catch(e){}Array.isArray(n)||(n=[]),n.push(e),t.value=JSON.stringify(n)}else t.value=JSON.stringify(e);else(t=document.createElement("input")).name=this.opts.resultName,t.type="hidden",this.opts.multipleResults?t.value=JSON.stringify([e]):t.value=JSON.stringify(e),this.form.appendChild(t)},o.getMetaFromForm=function(){var e=__getFormData_128(this.form);delete e[this.opts.resultName],this.uppy.setMeta(e)},o.install=function(){this.form=_$findDOMElement_204(this.opts.target),this.form&&"FORM"===this.form.nodeName?(this.form.addEventListener("submit",this.handleFormSubmit),this.uppy.on("upload",this.handleUploadStart),this.uppy.on("complete",this.handleSuccess)):this.uppy.log("Form plugin requires a <form> target element passed in options to operate, none was found","error")},o.uninstall=function(){this.form.removeEventListener("submit",this.handleFormSubmit),this.uppy.off("upload",this.handleUploadStart),this.uppy.off("complete",this.handleSuccess)},t}(__Plugin_128),___class_128.VERSION=_$package_129.version,___temp_128),_$ServiceWorkerStore_132={},isSupported="undefined"!=typeof navigator&&"serviceWorker"in navigator,ServiceWorkerStore=function(){function e(e){this.ready=new Promise(function(e,t){isSupported?navigator.serviceWorker.controller?e():navigator.serviceWorker.addEventListener("controllerchange",function(){e()}):t(new Error("Unsupported"))}),this.name=e.storeName}var t=e.prototype;return t.list=function(){var e=this,t={},n=new Promise(function(e,n){t.resolve=e,t.reject=n});console.log("Loading stored blobs from Service Worker");var i=function n(i){if(i.data.store===e.name)switch(i.data.type){case"uppy/ALL_FILES":t.resolve(i.data.files),navigator.serviceWorker.removeEventListener("message",n)}};return this.ready.then(function(){navigator.serviceWorker.addEventListener("message",i),navigator.serviceWorker.controller.postMessage({type:"uppy/GET_FILES",store:e.name})}),n},t.put=function(e){var t=this;return this.ready.then(function(){navigator.serviceWorker.controller.postMessage({type:"uppy/ADD_FILE",store:t.name,file:e})})},t.delete=function(e){var t=this;return this.ready.then(function(){navigator.serviceWorker.controller.postMessage({type:"uppy/REMOVE_FILE",store:t.name,fileID:e})})},e}();ServiceWorkerStore.isSupported=isSupported,_$ServiceWorkerStore_132=ServiceWorkerStore;var _$IndexedDBStore_130={},indexedDB="undefined"!=typeof window&&(window.indexedDB||window.webkitIndexedDB||window.mozIndexedDB||window.OIndexedDB||window.msIndexedDB),__isSupported_130=!!indexedDB,DB_NAME="uppy-blobs",STORE_NAME="files",DEFAULT_EXPIRY=864e5,DB_VERSION=3,cleanedUp=!1,IndexedDBStore=function(){function e(t){var n=this;this.opts=___extends_130({dbName:DB_NAME,storeName:"default",expires:DEFAULT_EXPIRY,maxFileSize:10485760,maxTotalSize:314572800},t),this.name=this.opts.storeName;var i=function(){return connect(n.opts.dbName)};cleanedUp?this.ready=i():(cleanedUp=!0,this.ready=e.cleanup().then(i,i))}var t=e.prototype;return t.key=function(e){return this.name+"!"+e},t.list=function(){var e=this;return this.ready.then(function(t){return waitForRequest(t.transaction([STORE_NAME],"readonly").objectStore(STORE_NAME).index("store").getAll(IDBKeyRange.only(e.name)))}).then(function(e){var t={};return e.forEach(function(e){t[e.fileID]=e.data}),t})},t.get=function(e){var t=this;return this.ready.then(function(n){return waitForRequest(n.transaction([STORE_NAME],"readonly").objectStore(STORE_NAME).get(t.key(e)))}).then(function(e){return{id:e.data.fileID,data:e.data.data}})},t.getSize=function(){var e=this;return this.ready.then(function(t){var n=t.transaction([STORE_NAME],"readonly").objectStore(STORE_NAME).index("store").openCursor(IDBKeyRange.only(e.name));return new Promise(function(e,t){var i=0;n.onsuccess=function(t){var n=t.target.result;n?(i+=n.value.data.size,n.continue()):e(i)},n.onerror=function(){t(new Error("Could not retrieve stored blobs size"))}})})},t.put=function(e){var t=this;return e.data.size>this.opts.maxFileSize?Promise.reject(new Error("File is too big to store.")):this.getSize().then(function(e){return e>t.opts.maxTotalSize?Promise.reject(new Error("No space left")):t.ready}).then(function(n){return waitForRequest(n.transaction([STORE_NAME],"readwrite").objectStore(STORE_NAME).add({id:t.key(e.id),fileID:e.id,store:t.name,expires:Date.now()+t.opts.expires,data:e.data}))})},t.delete=function(e){var t=this;return this.ready.then(function(n){return waitForRequest(n.transaction([STORE_NAME],"readwrite").objectStore(STORE_NAME).delete(t.key(e)))})},e.cleanup=function(){return connect(DB_NAME).then(function(e){var t=e.transaction([STORE_NAME],"readwrite").objectStore(STORE_NAME).index("expires").openCursor(IDBKeyRange.upperBound(Date.now()));return new Promise(function(n,i){t.onsuccess=function(t){var i=t.target.result;if(i){var o=i.value;console.log("[IndexedDBStore] Deleting record",o.fileID,"of size",_$prettyBytes_225(o.data.size),"- expired on",new Date(o.expires)),i.delete(),i.continue()}else n(e)},t.onerror=i})}).then(function(e){e.close()})},e}();IndexedDBStore.isSupported=__isSupported_130,_$IndexedDBStore_130=IndexedDBStore;var __cleanedUp_131=!1,_$MetaDataStore_131=function(){function e(t){this.opts=___extends_131({expires:864e5},t),this.name="uppyState:"+t.storeName,__cleanedUp_131||(__cleanedUp_131=!0,e.cleanup())}var t=e.prototype;return t.load=function(){var e=localStorage.getItem(this.name);if(!e)return null;var t=maybeParse(e);return t?t.metadata?t.metadata:(this.save(t),t):null},t.save=function(e){var t=Date.now()+this.opts.expires,n=JSON.stringify({metadata:e,expires:t});localStorage.setItem(this.name,n)},e.cleanup=function(){var e=function(){for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);/^uppyState:/.test(n)&&e.push(n.slice("uppyState:".length))}return e}(),t=Date.now();e.forEach(function(e){var n=localStorage.getItem("uppyState:"+e);if(!n)return null;var i=maybeParse(n);if(!i)return null;i.expires&&i.expires<t&&localStorage.removeItem("uppyState:"+e)})},e}(),_$package_134={version:"1.3.2"},___class_133,___temp_133,__Plugin_133=_$lib_93.Plugin,_$lib_133=(___temp_133=___class_133=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).type="debugger",i.id=i.opts.id||"GoldenRetriever",i.title="Golden Retriever",i.opts=___extends_133({},{expires:864e5,serviceWorker:!1},n),i.MetaDataStore=new _$MetaDataStore_131({expires:i.opts.expires,storeName:t.getID()}),i.ServiceWorkerStore=null,i.opts.serviceWorker&&(i.ServiceWorkerStore=new _$ServiceWorkerStore_132({storeName:t.getID()})),i.IndexedDBStore=new _$IndexedDBStore_130(___extends_133({expires:i.opts.expires},i.opts.indexedDB||{},{storeName:t.getID()})),i.saveFilesStateToLocalStorage=i.saveFilesStateToLocalStorage.bind(___assertThisInitialized_133(i)),i.loadFilesStateFromLocalStorage=i.loadFilesStateFromLocalStorage.bind(___assertThisInitialized_133(i)),i.loadFileBlobsFromServiceWorker=i.loadFileBlobsFromServiceWorker.bind(___assertThisInitialized_133(i)),i.loadFileBlobsFromIndexedDB=i.loadFileBlobsFromIndexedDB.bind(___assertThisInitialized_133(i)),i.onBlobsLoaded=i.onBlobsLoaded.bind(___assertThisInitialized_133(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.loadFilesStateFromLocalStorage=function(){var e=this.MetaDataStore.load();e&&(this.uppy.log("[GoldenRetriever] Recovered some state from Local Storage"),this.uppy.setState({currentUploads:e.currentUploads||{},files:e.files||{}}),this.savedPluginData=e.pluginData)},o.getWaitingFiles=function(){var e={};return this.uppy.getFiles().forEach(function(t){t.progress&&t.progress.uploadStarted||(e[t.id]=t)}),e},o.getUploadingFiles=function(){var e=this,t={},n=this.uppy.getState().currentUploads;return n&&Object.keys(n).forEach(function(i){n[i].fileIDs.forEach(function(n){t[n]=e.uppy.getFile(n)})}),t},o.saveFilesStateToLocalStorage=function(){var e=___extends_133(this.getWaitingFiles(),this.getUploadingFiles()),t={};this.uppy.emit("restore:get-data",function(e){___extends_133(t,e)});var n=this.uppy.getState().currentUploads;this.MetaDataStore.save({currentUploads:n,files:e,pluginData:t})},o.loadFileBlobsFromServiceWorker=function(){var e=this;this.ServiceWorkerStore.list().then(function(t){var n=Object.keys(t).length;return n===e.uppy.getFiles().length?(e.uppy.log("[GoldenRetriever] Successfully recovered "+n+" blobs from Service Worker!"),e.uppy.info("Successfully recovered "+n+" files","success",3e3),e.onBlobsLoaded(t)):(e.uppy.log("[GoldenRetriever] No blobs found in Service Worker, trying IndexedDB now..."),e.loadFileBlobsFromIndexedDB())}).catch(function(t){e.uppy.log("[GoldenRetriever] Failed to recover blobs from Service Worker","warning"),e.uppy.log(t)})},o.loadFileBlobsFromIndexedDB=function(){var e=this;this.IndexedDBStore.list().then(function(t){var n=Object.keys(t).length;if(n>0)return e.uppy.log("[GoldenRetriever] Successfully recovered "+n+" blobs from IndexedDB!"),e.uppy.info("Successfully recovered "+n+" files","success",3e3),e.onBlobsLoaded(t);e.uppy.log("[GoldenRetriever] No blobs found in IndexedDB")}).catch(function(t){e.uppy.log("[GoldenRetriever] Failed to recover blobs from IndexedDB","warning"),e.uppy.log(t)})},o.onBlobsLoaded=function(e){var t=this,n=[],i=___extends_133({},this.uppy.getState().files);Object.keys(e).forEach(function(o){var r=t.uppy.getFile(o);if(r){var s=___extends_133({},r,{data:e[o],isRestored:!0});i[o]=s}else n.push(o)}),this.uppy.setState({files:i}),this.uppy.emit("restored",this.savedPluginData),n.length&&this.deleteBlobs(n).then(function(){t.uppy.log("[GoldenRetriever] Cleaned up "+n.length+" old files")}).catch(function(e){t.uppy.log("[GoldenRetriever] Could not clean up "+n.length+" old files","warning"),t.uppy.log(e)})},o.deleteBlobs=function(e){var t=this,n=[];return e.forEach(function(e){t.ServiceWorkerStore&&n.push(t.ServiceWorkerStore.delete(e)),t.IndexedDBStore&&n.push(t.IndexedDBStore.delete(e))}),Promise.all(n)},o.install=function(){var e=this;this.loadFilesStateFromLocalStorage(),this.uppy.getFiles().length>0?this.ServiceWorkerStore?(this.uppy.log("[GoldenRetriever] Attempting to load files from Service Worker..."),this.loadFileBlobsFromServiceWorker()):(this.uppy.log("[GoldenRetriever] Attempting to load files from Indexed DB..."),this.loadFileBlobsFromIndexedDB()):(this.uppy.log("[GoldenRetriever] No files need to be loaded, only restoring processing state..."),this.onBlobsLoaded([])),this.uppy.on("file-added",function(t){t.isRemote||(e.ServiceWorkerStore&&e.ServiceWorkerStore.put(t).catch(function(t){e.uppy.log("[GoldenRetriever] Could not store file","warning"),e.uppy.log(t)}),e.IndexedDBStore.put(t).catch(function(t){e.uppy.log("[GoldenRetriever] Could not store file","warning"),e.uppy.log(t)}))}),this.uppy.on("file-removed",function(t){e.ServiceWorkerStore&&e.ServiceWorkerStore.delete(t.id).catch(function(t){e.uppy.log("[GoldenRetriever] Failed to remove file","warning"),e.uppy.log(t)}),e.IndexedDBStore.delete(t.id).catch(function(t){e.uppy.log("[GoldenRetriever] Failed to remove file","warning"),e.uppy.log(t)})}),this.uppy.on("complete",function(t){var n=t.successful,i=n.map(function(e){return e.id});e.deleteBlobs(i).then(function(){e.uppy.log("[GoldenRetriever] Removed "+n.length+" files that finished uploading")}).catch(function(t){e.uppy.log("[GoldenRetriever] Could not remove "+n.length+" files that finished uploading","warning"),e.uppy.log(t)})}),this.uppy.on("state-update",this.saveFilesStateToLocalStorage),this.uppy.on("restored",function(){var t=e.uppy.getState().currentUploads;t&&Object.keys(t).forEach(function(n){e.uppy.restore(n,t[n])})})},t}(__Plugin_133),___class_133.VERSION=_$package_134.version,___temp_133),_$package_158={version:"1.3.1"},___class_157,___temp_157,__Plugin_157=_$lib_93.Plugin,_$lib_157=(___temp_157=___class_157=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).type="debugger",i.id=i.opts.id||"ReduxDevTools",i.title="Redux DevTools",i.opts=___extends_157({},{},n),i.handleStateChange=i.handleStateChange.bind(___assertThisInitialized_157(i)),i.initDevTools=i.initDevTools.bind(___assertThisInitialized_157(i)),i}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var o=t.prototype;return o.handleStateChange=function(e,t,n){this.devTools.send("UPPY_STATE_UPDATE",t)},o.initDevTools=function(){var e=this;this.devTools=window.devToolsExtension.connect(),this.devToolsUnsubscribe=this.devTools.subscribe(function(t){if("DISPATCH"===t.type)switch(console.log(t.payload.type),t.payload.type){case"RESET":return void e.uppy.reset();case"IMPORT_STATE":var n=t.payload.nextLiftedState.computedStates;return e.uppy.store.state=___extends_157({},e.uppy.getState(),n[n.length-1].state),void e.uppy.updateAll(e.uppy.getState());case"JUMP_TO_STATE":case"JUMP_TO_ACTION":e.uppy.store.state=___extends_157({},e.uppy.getState(),JSON.parse(t.state)),e.uppy.updateAll(e.uppy.getState())}})},o.install=function(){this.withDevTools="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__,this.withDevTools&&(this.initDevTools(),this.uppy.on("state-update",this.handleStateChange))},o.uninstall=function(){this.withDevTools&&(this.devToolsUnsubscribe(),this.uppy.off("state-update",this.handleStateUpdate))},t}(__Plugin_157),___class_157.VERSION=_$package_158.version,___temp_157),_$uppy_241={};_$uppy_241.Core=_$lib_93,_$uppy_241.debugLogger=_$uppy_241.Core.debugLogger,_$uppy_241.server=_$lib_89,_$uppy_241.views={ProviderView:_$lib_155},_$uppy_241.DefaultStore=_$lib_163,_$uppy_241.ReduxStore=_$lib_165,_$uppy_241.Dashboard=_$lib_112,_$uppy_241.DragDrop=_$lib_122,_$uppy_241.FileInput=_$lib_126,_$uppy_241.Informer=_$lib_138,_$uppy_241.ProgressBar=_$lib_142,_$uppy_241.StatusBar=_$lib_161,_$uppy_241.Dropbox=_$lib_124,_$uppy_241.GoogleDrive=_$lib_136,_$uppy_241.Instagram=_$lib_140,_$uppy_241.Url=_$lib_192,_$uppy_241.Webcam=_$lib_235,_$uppy_241.AwsS3=_$lib_83,_$uppy_241.AwsS3Multipart=_$lib_81,_$uppy_241.Transloadit=_$lib_174,_$uppy_241.Tus=_$lib_178,_$uppy_241.XHRUpload=_$lib_238,_$uppy_241.Form=_$lib_128,_$uppy_241.GoldenRetriever=_$lib_133,_$uppy_241.ReduxDevTools=_$lib_157,_$uppy_241.ThumbnailGenerator=_$lib_168,_$uppy_241.locales={};var _$bundle_240={};return _$bundle_240=_$uppy_241,_$bundle_240}),function(e,t){window.console=window.console||{log:function(){},error:function(){}},e.fn.footable=function(e,n){return e=e||{},this.filter("table").each(function(i,o){t.init(o,e,n)})};var n={events:[]};t.__debug__=JSON.parse(localStorage.getItem("footable_debug"))||!1,t.__debug_options__=JSON.parse(localStorage.getItem("footable_debug_options"))||n,t.debug=function(i,o){return t.is.boolean(i)?(t.__debug__=i,void(t.__debug__?(localStorage.setItem("footable_debug",JSON.stringify(t.__debug__)),t.__debug_options__=e.extend(!0,{},n,o||{}),t.is.hash(o)&&localStorage.setItem("footable_debug_options",JSON.stringify(t.__debug_options__))):(localStorage.removeItem("footable_debug"),localStorage.removeItem("footable_debug_options")))):t.__debug__},t.get=function(t){return e(t).first().data("__FooTable__")},t.init=function(e,n,i){var o=t.get(e);return o instanceof t.Table&&o.destroy(),new t.Table(e,n,i)},t.getRow=function(t){var n=e(t).closest("tr");return n.hasClass("footable-detail-row")&&(n=n.prev()),n.data("__FooTableRow__")}}(jQuery,FooTable=window.FooTable||{}),function(e){var t=function(){return!0};e.arr={},e.arr.each=function(t,n){if(e.is.array(t)&&e.is.fn(n))for(var i=0,o=t.length;o>i&&!1!==n(t[i],i);i++);},e.arr.get=function(t,n){var i=[];if(!e.is.array(t))return i;if(!e.is.fn(n))return t;for(var o=0,r=t.length;r>o;o++)n(t[o],o)&&i.push(t[o]);return i},e.arr.any=function(n,i){if(!e.is.array(n))return!1;i=e.is.fn(i)?i:t;for(var o=0,r=n.length;r>o;o++)if(i(n[o],o))return!0;return!1},e.arr.contains=function(t,n){if(!e.is.array(t)||e.is.undef(n))return!1;for(var i=0,o=t.length;o>i;i++)if(t[i]==n)return!0;return!1},e.arr.first=function(n,i){if(!e.is.array(n))return null;i=e.is.fn(i)?i:t;for(var o=0,r=n.length;r>o;o++)if(i(n[o],o))return n[o];return null},e.arr.map=function(t,n){var i=[],o=null;if(!e.is.array(t)||!e.is.fn(n))return i;for(var r=0,s=t.length;s>r;r++)null!=(o=n(t[r],r))&&i.push(o);return i},e.arr.remove=function(t,n){var i=[],o=[];if(!e.is.array(t)||!e.is.fn(n))return o;for(var r=0,s=t.length;s>r;r++)n(t[r],r,o)&&(i.push(r),o.push(t[r]));for(i.sort(function(e,t){return t-e}),r=0,s=i.length;s>r;r++){var a=i[r]-r;t.splice(a,1)}return o},e.arr.delete=function(t,n){var i=-1,o=null;if(!e.is.array(t)||e.is.undef(n))return o;for(var r=0,s=t.length;s>r;r++)if(t[r]==n){i=r,o=t[r];break}return-1!=i&&t.splice(i,1),o},e.arr.replace=function(e,t,n){var i=e.indexOf(t);-1!==i&&(e[i]=n)}}(FooTable),function(e){e.is={},e.is.type=function(e,t){return typeof e===t},e.is.defined=function(e){return void 0!==e},e.is.undef=function(e){return void 0===e},e.is.array=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.is.date=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},e.is.boolean=function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},e.is.string=function(e){return"[object String]"===Object.prototype.toString.call(e)},e.is.number=function(e){return"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)},e.is.fn=function(t){return e.is.defined(window)&&t===window.alert||"[object Function]"===Object.prototype.toString.call(t)},e.is.error=function(e){return"[object Error]"===Object.prototype.toString.call(e)},e.is.object=function(e){return"[object Object]"===Object.prototype.toString.call(e)},e.is.hash=function(t){return e.is.object(t)&&t.constructor===Object&&!t.nodeType&&!t.setInterval},e.is.element=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},e.is.promise=function(t){return e.is.object(t)&&e.is.fn(t.then)&&e.is.fn(t.promise)},e.is.jq=function(t){return e.is.defined(window.jQuery)&&t instanceof jQuery&&t.length>0},e.is.moment=function(t){return e.is.defined(window.moment)&&e.is.object(t)&&e.is.boolean(t._isAMomentObject)},e.is.emptyObject=function(t){if(!e.is.hash(t))return!1;for(var n in t)if(t.hasOwnProperty(n))return!1;return!0},e.is.emptyArray=function(t){return!e.is.array(t)||0===t.length},e.is.emptyString=function(t){return!e.is.string(t)||0===t.length}}(FooTable),function(e){e.str={},e.str.contains=function(t,n,i){return!e.is.emptyString(t)&&!e.is.emptyString(n)&&(n.length<=t.length&&-1!==(i?t.toUpperCase().indexOf(n.toUpperCase()):t.indexOf(n)))},e.str.containsExact=function(t,n,i){return!(e.is.emptyString(t)||e.is.emptyString(n)||n.length>t.length)&&new RegExp("\\b"+e.str.escapeRegExp(n)+"\\b",i?"i":"").test(t)},e.str.containsWord=function(t,n,i){if(e.is.emptyString(t)||e.is.emptyString(n)||t.length<n.length)return!1;for(var o=t.split(/\W/),r=0,s=o.length;s>r;r++)if(i?o[r].toUpperCase()==n.toUpperCase():o[r]==n)return!0;return!1},e.str.from=function(t,n){return e.is.emptyString(t)?t:e.str.contains(t,n)?t.substring(t.indexOf(n)+1):t},e.str.startsWith=function(t,n){return e.is.emptyString(t)?t==n:t.slice(0,n.length)==n},e.str.toCamelCase=function(t){return e.is.emptyString(t)?t:t.toUpperCase()===t?t.toLowerCase():t.replace(/^([A-Z])|[-\s_](\w)/g,function(t,n,i){return e.is.string(i)?i.toUpperCase():n.toLowerCase()})},e.str.random=function(t){return t=e.is.emptyString(t)?"":t,t+Math.random().toString(36).substr(2,9)},e.str.escapeRegExp=function(t){return e.is.emptyString(t)?t:t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}(FooTable),function(e){"use strict";function t(){}Object.create||(Object.create=function(){var t=function(){};return function(n){if(arguments.length>1)throw Error("Second argument not supported");if(!e.is.object(n))throw TypeError("Argument must be an object");t.prototype=n;var i=new t;return t.prototype=null,i}}());var n=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;t.__extend__=function(t,i,o,r){t[i]=e.is.fn(r)&&n.test(o)?function(e,t){return function(){var e,n;return e=this._super,this._super=r,n=t.apply(this,arguments),this._super=e,n}}(0,o):o},t.extend=function(i,o){function r(t,i,o,r){t[i]=e.is.fn(r)&&n.test(o)?function(e,t,n){return function(){var e,i;return e=this._super,this._super=n,i=t.apply(this,arguments),this._super=e,i}}(0,o,r):o}var s=Array.prototype.slice.call(arguments);if(i=s.shift(),o=s.shift(),e.is.hash(i)){var a=Object.create(this.prototype),l=this.prototype;for(var c in i)"__ctor__"!==c&&r(a,c,i[c],l[c]);var u=e.is.fn(a.__ctor__)?a.__ctor__:function(){if(!e.is.fn(this.construct))throw new SyntaxError('FooTable class objects must be constructed with the "new" keyword.');this.construct.apply(this,arguments)};return a.construct=e.is.fn(a.construct)?a.construct:function(){},u.prototype=a,a.constructor=u,u.extend=t.extend,u}e.is.string(i)&&e.is.fn(o)&&r(this.prototype,i,o,this.prototype[i])},e.Class=t,e.ClassFactory=e.Class.extend({construct:function(){this.registered={}},contains:function(t){return e.is.defined(this.registered[t])},names:function(){var e,t=[];for(e in this.registered)this.registered.hasOwnProperty(e)&&t.push(e);return t},register:function(t,n,i){if(e.is.string(t)&&e.is.fn(n)){var o=this.registered[t];this.registered[t]={name:t,klass:n,priority:e.is.number(i)?i:e.is.defined(o)?o.priority:0}}},load:function(t,n,i){var o,r,s=this,a=Array.prototype.slice.call(arguments),l=[],c=[];for(o in t=a.shift()||{},s.registered)if(s.registered.hasOwnProperty(o)){var u=s.registered[o];t.hasOwnProperty(o)&&(r=t[o],e.is.string(r)&&(r=e.getFnPointer(t[o])),e.is.fn(r)&&(u={name:o,klass:r,priority:s.registered[o].priority})),l.push(u)}for(o in t)t.hasOwnProperty(o)&&!s.registered.hasOwnProperty(o)&&(r=t[o],e.is.string(r)&&(r=e.getFnPointer(t[o])),e.is.fn(r)&&l.push({name:o,klass:r,priority:0}));return l.sort(function(e,t){return t.priority-e.priority}),e.arr.each(l,function(t){e.is.fn(t.klass)&&c.push(s._make(t.klass,a))}),c},make:function(t,n,i){var o,r=this,s=Array.prototype.slice.call(arguments);return t=s.shift(),o=r.registered[t],e.is.fn(o.klass)?r._make(o.klass,s):null},_make:function(e,t){function n(){return e.apply(this,t)}return n.prototype=e.prototype,new n}})}(FooTable),function(e,t){t.css2json=function(n){if(t.is.emptyString(n))return{};for(var i,o,r,s={},a=n.split(";"),l=0,c=a.length;c>l;l++)t.is.emptyString(a[l])||(i=a[l].split(":"),t.is.emptyString(i[0])||t.is.emptyString(i[1])||(o=t.str.toCamelCase(e.trim(i[0])),r=e.trim(i[1]),s[o]=r));return s},t.getFnPointer=function(e){if(t.is.emptyString(e))return null;var n=window,i=e.split(".");return t.arr.each(i,function(e){n[e]&&(n=n[e])}),t.is.fn(n)?n:null},t.checkFnValue=function(e,n,i){function o(e,n,i){return t.is.fn(n)?function(){return n.apply(e,arguments)}:i}return i=t.is.fn(i)?i:null,t.is.fn(n)?o(e,n,i):t.is.type(n,"string")?o(e,t.getFnPointer(n),i):i}}(jQuery,FooTable),function(e,t){t.Cell=t.Class.extend({construct:function(e,t,n,i){this.ft=e,this.row=t,this.column=n,this.created=!1,this.define(i)},define:function(n){this.$el=t.is.element(n)||t.is.jq(n)?e(n):null,this.$detail=null;var i=t.is.hash(n)&&t.is.hash(n.options)&&t.is.defined(n.value);this.value=this.column.parser.call(this.column,t.is.jq(this.$el)?this.$el:i?n.value:n,this.ft.o),this.o=e.extend(!0,{classes:null,style:null},i?n.options:{}),this.classes=t.is.jq(this.$el)&&this.$el.attr("class")?this.$el.attr("class").match(/\S+/g):t.is.array(this.o.classes)?this.o.classes:t.is.string(this.o.classes)?this.o.classes.match(/\S+/g):[],this.style=t.is.jq(this.$el)&&this.$el.attr("style")?t.css2json(this.$el.attr("style")):t.is.hash(this.o.style)?this.o.style:t.is.string(this.o.style)?t.css2json(this.o.style):{}},$create:function(){this.created||((this.$el=t.is.jq(this.$el)?this.$el:e("<td/>")).data("value",this.value).contents().detach().end().append(this.format(this.value)),this._setClasses(this.$el),this._setStyle(this.$el),this.$detail=e("<tr/>").addClass(this.row.classes.join(" ")).data("__FooTableCell__",this).append(e("<th/>")).append(e("<td/>")),this.created=!0)},collapse:function(){this.created&&(this.$detail.children("th").html(this.column.title),this.$el.clone().attr("id",this.$el.attr("id")?this.$el.attr("id")+"-detail":void 0).css("display","table-cell").html("").append(this.$el.contents().detach()).replaceAll(this.$detail.children("td").first()),t.is.jq(this.$detail.parent())||this.$detail.appendTo(this.row.$details.find(".footable-details > tbody")))},restore:function(){if(this.created){if(t.is.jq(this.$detail.parent())){var e=this.$detail.children("td").first();this.$el.attr("class",e.attr("class")).attr("style",e.attr("style")).css("display",this.column.hidden||!this.column.visible?"none":"table-cell").append(e.contents().detach())}this.$detail.detach()}},parse:function(){return this.column.parser.call(this.column,this.$el,this.ft.o)},format:function(e){return this.column.formatter.call(this.column,e,this.ft.o,this.row.value)},val:function(n,i,o){if(t.is.undef(n))return this.value;var r=this,s=t.is.hash(n)&&t.is.hash(n.options)&&t.is.defined(n.value);if(this.o=e.extend(!0,{classes:r.classes,style:r.style},s?n.options:{}),this.value=s?n.value:n,this.classes=t.is.array(this.o.classes)?this.o.classes:t.is.string(this.o.classes)?this.o.classes.match(/\S+/g):[],this.style=t.is.hash(this.o.style)?this.o.style:t.is.string(this.o.style)?t.css2json(this.o.style):{},o=!t.is.boolean(o)||o,this.created&&o){this.$el.data("value",this.value).empty();var a=this.$detail.children("td").first().empty(),l=t.is.jq(this.$detail.parent())?a:this.$el;l.append(this.format(this.value)),this._setClasses(l),this._setStyle(l),(!t.is.boolean(i)||i)&&this.row.draw()}},_setClasses:function(e){var n=!t.is.emptyArray(this.column.classes),i=!t.is.emptyArray(this.classes),o=null;e.removeAttr("class"),(n||i)&&(n&&i?o=this.classes.concat(this.column.classes).join(" "):n?o=this.column.classes.join(" "):i&&(o=this.classes.join(" ")),t.is.emptyString(o)||e.addClass(o))},_setStyle:function(n){var i=!t.is.emptyObject(this.column.style),o=!t.is.emptyObject(this.style),r=null;n.removeAttr("style"),(i||o)&&(i&&o?r=e.extend({},this.column.style,this.style):i?r=this.column.style:o&&(r=this.style),t.is.hash(r)&&n.css(r))}})}(jQuery,FooTable),function(e,t){t.Column=t.Class.extend({construct:function(e,n,i){this.ft=e,this.type=t.is.emptyString(i)?"text":i,this.virtual=!!t.is.boolean(n.virtual)&&n.virtual,this.$el=t.is.jq(n.$el)?n.$el:null,this.index=t.is.number(n.index)?n.index:-1,this.internal=!1,this.define(n),this.$create()},define:function(e){this.hidden=!!t.is.boolean(e.hidden)&&e.hidden,this.visible=!t.is.boolean(e.visible)||e.visible,this.name=t.is.string(e.name)?e.name:null,null==this.name&&(this.name="col"+(e.index+1)),this.title=t.is.string(e.title)?e.title:null,!this.virtual&&null==this.title&&t.is.jq(this.$el)&&(this.title=this.$el.html()),null==this.title&&(this.title="Column "+(e.index+1)),this.style=t.is.hash(e.style)?e.style:t.is.string(e.style)?t.css2json(e.style):{},this.classes=t.is.array(e.classes)?e.classes:t.is.string(e.classes)?e.classes.match(/\S+/g):[],this.parser=t.checkFnValue(this,e.parser,this.parser),this.formatter=t.checkFnValue(this,e.formatter,this.formatter)},$create:function(){(this.$el=!this.virtual&&t.is.jq(this.$el)?this.$el:e("<th/>")).html(this.title).addClass(this.classes.join(" ")).css(this.style)},parser:function(n){if(t.is.element(n)||t.is.jq(n)){var i=e(n).data("value");return t.is.defined(i)?i:e(n).html()}return t.is.defined(n)&&null!=n?n+"":null},formatter:function(e,t,n){return null==e?"":e},createCell:function(e){var n=t.is.jq(e.$el)?e.$el.children("td,th").get(this.index):null,i=t.is.hash(e.value)?e.value[this.name]:null;return new t.Cell(this.ft,e,this,n||i)}}),t.columns=new t.ClassFactory,t.columns.register("text",t.Column)}(jQuery,FooTable),function(e,t){t.Component=t.Class.extend({construct:function(e,n){if(!(e instanceof t.Table))throw new TypeError("The instance parameter must be an instance of FooTable.Table.");this.ft=e,this.enabled=!!t.is.boolean(n)&&n},preinit:function(e){},init:function(){},destroy:function(){},predraw:function(){},draw:function(){},postdraw:function(){}}),t.components=new t.ClassFactory}(jQuery,FooTable),function(e,t){t.Defaults=function(){this.stopPropagation=!1,this.on=null},t.defaults=new t.Defaults}(jQuery,FooTable),
function(e,t){t.Row=t.Class.extend({construct:function(e,t,n){this.ft=e,this.columns=t,this.created=!1,this.define(n)},define:function(n){this.$el=t.is.element(n)||t.is.jq(n)?e(n):null,this.$toggle=e("<span/>",{class:"footable-toggle fooicon fooicon-plus"});var i=t.is.hash(n),o=i&&t.is.hash(n.options)&&t.is.hash(n.value);this.value=i?o?n.value:n:null,this.o=e.extend(!0,{expanded:!1,classes:null,style:null},o?n.options:{}),this.expanded=t.is.jq(this.$el)&&this.$el.data("expanded")||this.o.expanded,this.classes=t.is.jq(this.$el)&&this.$el.attr("class")?this.$el.attr("class").match(/\S+/g):t.is.array(this.o.classes)?this.o.classes:t.is.string(this.o.classes)?this.o.classes.match(/\S+/g):[],this.style=t.is.jq(this.$el)&&this.$el.attr("style")?t.css2json(this.$el.attr("style")):t.is.hash(this.o.style)?this.o.style:t.is.string(this.o.style)?t.css2json(this.o.style):{},this.cells=this.createCells();var r=this;r.value={},t.arr.each(r.cells,function(e){r.value[e.column.name]=e.val()})},$create:function(){if(!this.created){(this.$el=t.is.jq(this.$el)?this.$el:e("<tr/>")).data("__FooTableRow__",this),this._setClasses(this.$el),this._setStyle(this.$el),"last"==this.ft.rows.toggleColumn&&this.$toggle.addClass("last-column"),this.$details=e("<tr/>",{class:"footable-detail-row"}).append(e("<td/>",{colspan:this.ft.columns.visibleColspan}).append(e("<table/>",{class:"footable-details "+this.ft.classes.join(" ")}).append("<tbody/>")));var n=this;t.arr.each(n.cells,function(e){e.created||e.$create(),n.$el.append(e.$el)}),n.$el.off("click.ft.row").on("click.ft.row",{self:n},n._onToggle),this.created=!0}},createCells:function(){var e=this;return t.arr.map(e.columns,function(t){return t.createCell(e)})},val:function(n,i,o){var r=this;if(!t.is.hash(n))return t.is.hash(this.value)&&!t.is.emptyObject(this.value)||(this.value={},t.arr.each(this.cells,function(e){e.column.internal||(r.value[e.column.name]=e.val())})),this.value;this.collapse(!1);var s=t.is.hash(n),a=s&&t.is.hash(n.options)&&t.is.hash(n.value);if(this.o=e.extend(!0,{expanded:r.expanded,classes:r.classes,style:r.style},a?n.options:{}),this.expanded=this.o.expanded,this.classes=t.is.array(this.o.classes)?this.o.classes:t.is.string(this.o.classes)?this.o.classes.match(/\S+/g):[],this.style=t.is.hash(this.o.style)?this.o.style:t.is.string(this.o.style)?t.css2json(this.o.style):{},s)if(a&&(n=n.value),t.is.hash(this.value))for(var l in n)n.hasOwnProperty(l)&&(this.value[l]=n[l]);else this.value=n;else this.value=null;o=!t.is.boolean(o)||o,t.arr.each(this.cells,function(e){!e.column.internal&&t.is.defined(r.value[e.column.name])&&e.val(r.value[e.column.name],!1,o)}),this.created&&o&&(this._setClasses(this.$el),this._setStyle(this.$el),(!t.is.boolean(i)||i)&&this.draw())},_setClasses:function(e){var n=!t.is.emptyArray(this.classes),i=null;e.removeAttr("class"),n&&(i=this.classes.join(" "),t.is.emptyString(i)||e.addClass(i))},_setStyle:function(e){var n=!t.is.emptyObject(this.style),i=null;e.removeAttr("style"),n&&(i=this.style,t.is.hash(i)&&e.css(i))},expand:function(){if(this.created){var e=this;e.ft.raise("expand.ft.row",[e]).then(function(){e.__hidden__=t.arr.map(e.cells,function(e){return e.column.hidden&&e.column.visible?e:null}),e.__hidden__.length>0&&(e.$details.insertAfter(e.$el).children("td").first().attr("colspan",e.ft.columns.visibleColspan),t.arr.each(e.__hidden__,function(e){e.collapse()})),e.$el.attr("data-expanded",!0),e.$toggle.removeClass("fooicon-plus").addClass("fooicon-minus"),e.expanded=!0,e.ft.raise("expanded.ft.row",[e])})}},collapse:function(e){if(this.created){var n=this;n.ft.raise("collapse.ft.row",[n]).then(function(){t.arr.each(n.__hidden__,function(e){e.restore()}),n.$details.detach(),n.$el.removeAttr("data-expanded"),n.$toggle.removeClass("fooicon-minus").addClass("fooicon-plus"),(!t.is.boolean(e)||e)&&(n.expanded=!1),n.ft.raise("collapsed.ft.row",[n])})}},predraw:function(e){this.created&&(this.expanded&&this.collapse(!1),this.$toggle.detach(),e=!t.is.boolean(e)||e,e&&this.$el.detach())},draw:function(e){this.created||this.$create(),t.is.jq(e)&&e.append(this.$el);var n=this;t.arr.each(n.cells,function(e){e.$el.css("display",e.column.hidden||!e.column.visible?"none":"table-cell"),n.ft.rows.showToggle&&n.ft.columns.hasHidden&&("first"==n.ft.rows.toggleColumn&&e.column.index==n.ft.columns.firstVisibleIndex||"last"==n.ft.rows.toggleColumn&&e.column.index==n.ft.columns.lastVisibleIndex)&&e.$el.prepend(n.$toggle),e.$el.add(e.column.$el).removeClass("footable-first-visible footable-last-visible"),e.column.index==n.ft.columns.firstVisibleIndex&&e.$el.add(e.column.$el).addClass("footable-first-visible"),e.column.index==n.ft.columns.lastVisibleIndex&&e.$el.add(e.column.$el).addClass("footable-last-visible")}),this.expanded&&this.expand()},toggle:function(){this.created&&this.ft.columns.hasHidden&&(this.expanded?this.collapse():this.expand())},_onToggle:function(t){var n=t.data.self;e(t.target).is(n.ft.rows.toggleSelector)&&n.toggle()}})}(jQuery,FooTable),function(e,t){t.instances=[],t.Table=t.Class.extend({construct:function(n,i,o){this._resizeTimeout=null,this.id=t.instances.push(this),this.initialized=!1,this.$el=(t.is.jq(n)?n:e(n)).first(),this.$loader=e("<div/>",{class:"footable-loader"}).append(e("<span/>",{class:"fooicon fooicon-loader"})),this.o=e.extend(!0,{},t.defaults,i),this.data=this.$el.data()||{},this.classes=[],this.components=t.components.load(t.is.hash(this.data.components)?this.data.components:this.o.components,this),this.breakpoints=this.use(FooTable.Breakpoints),this.columns=this.use(FooTable.Columns),this.rows=this.use(FooTable.Rows),this._construct(o)},_construct:function(e){var n=this;return this._preinit().then(function(){return n._init().then(function(){return n.raise("ready.ft.table").then(function(){t.is.fn(e)&&e.call(n,n)})})}).always(function(e){n.$el.show(),t.is.error(e)&&console.error("FooTable: unhandled error thrown during initialization.",e)})},_preinit:function(){var e=this;return this.raise("preinit.ft.table",[e.data]).then(function(){var n=(e.$el.attr("class")||"").match(/\S+/g)||[];e.o.ajax=t.checkFnValue(e,e.data.ajax,e.o.ajax),e.o.stopPropagation=t.is.boolean(e.data.stopPropagation)?e.data.stopPropagation:e.o.stopPropagation;for(var i=0,o=n.length;o>i;i++)t.str.startsWith(n[i],"footable")||e.classes.push(n[i]);return e.$el.hide().after(e.$loader),e.execute(!1,!1,"preinit",e.data)})},_init:function(){var n=this;return n.raise("init.ft.table").then(function(){var i=n.$el.children("thead"),o=n.$el.children("tbody"),r=n.$el.children("tfoot");return n.$el.addClass("footable footable-"+n.id),t.is.hash(n.o.on)&&n.$el.on(n.o.on),0==r.length&&n.$el.append(r=e("<tfoot/>")),0==o.length&&n.$el.append("<tbody/>"),0==i.length&&n.$el.prepend(i=e("<thead/>")),n.execute(!1,!0,"init").then(function(){return n.$el.data("__FooTable__",n),0==r.children("tr").length&&r.remove(),0==i.children("tr").length&&i.remove(),n.raise("postinit.ft.table").then(function(){return n.draw()}).always(function(){e(window).off("resize.ft"+n.id,n._onWindowResize).on("resize.ft"+n.id,{self:n},n._onWindowResize),n.initialized=!0})})})},destroy:function(){var n=this;return n.raise("destroy.ft.table").then(function(){return n.execute(!0,!0,"destroy").then(function(){n.$el.removeData("__FooTable__").removeClass("footable-"+n.id),t.is.hash(n.o.on)&&n.$el.off(n.o.on),e(window).off("resize.ft"+n.id,n._onWindowResize),n.initialized=!1,t.instances[n.id]=null})}).fail(function(e){t.is.error(e)&&console.error("FooTable: unhandled error thrown while destroying the plugin.",e)})},raise:function(n,i){var o=this,r=t.__debug__&&(t.is.emptyArray(t.__debug_options__.events)||t.arr.any(t.__debug_options__.events,function(e){return t.str.contains(n,e)}));return i=i||[],i.unshift(this),e.Deferred(function(t){var s=e.Event(n);1==o.o.stopPropagation&&o.$el.one(n,function(e){e.stopPropagation()}),r&&console.log("FooTable:"+n+": ",i),o.$el.trigger(s,i),s.isDefaultPrevented()?(r&&console.log('FooTable: default prevented for the "'+n+'" event.'),t.reject(s)):t.resolve(s)})},use:function(e){for(var t=0,n=this.components.length;n>t;t++)if(this.components[t]instanceof e)return this.components[t];return null},draw:function(){var e=this,n=e.$el.clone().insertBefore(e.$el);return e.$el.detach(),e.execute(!1,!0,"predraw").then(function(){return e.raise("predraw.ft.table").then(function(){return e.execute(!1,!0,"draw").then(function(){return e.raise("draw.ft.table").then(function(){return e.execute(!1,!0,"postdraw").then(function(){return e.raise("postdraw.ft.table")})})})})}).fail(function(e){t.is.error(e)&&console.error("FooTable: unhandled error thrown during a draw operation.",e)}).always(function(){n.replaceWith(e.$el),e.$loader.remove()})},execute:function(e,n,i,o,r){var s=this,a=Array.prototype.slice.call(arguments);e=a.shift(),n=a.shift();var l=n?t.arr.get(s.components,function(e){return e.enabled}):s.components.slice(0);return a.unshift(e?l.reverse():l),s._execute.apply(s,a)},_execute:function(n,i,o,r){if(!n||!n.length)return e.when();var s,a=this,l=Array.prototype.slice.call(arguments);return n=l.shift(),i=l.shift(),s=n.shift(),t.is.fn(s[i])?e.Deferred(function(e){try{var n=s[i].apply(s,l);if(t.is.promise(n))return n.then(e.resolve,e.reject);e.resolve(n)}catch(t){e.reject(t)}}).then(function(){return a._execute.apply(a,[n,i].concat(l))}):a._execute.apply(a,[n,i].concat(l))},_onWindowResize:function(e){var t=e.data.self;null!=t._resizeTimeout&&clearTimeout(t._resizeTimeout),t._resizeTimeout=setTimeout(function(){t._resizeTimeout=null,t.raise("resize.ft.table").then(function(){t.breakpoints.check()})},300)}})}(jQuery,FooTable),function(e,t){t.ArrayColumn=t.Column.extend({construct:function(e,t){this._super(e,t,"array")},parser:function(n){if(t.is.element(n)||t.is.jq(n)){var i=e(n),o=i.data("value");if(t.is.array(o))return o;o=i.html();try{o=JSON.parse(o)}catch(e){o=null}return t.is.array(o)?o:null}return t.is.array(n)?n:null},formatter:function(e,n,i){return t.is.array(e)?JSON.stringify(e):""}}),t.columns.register("array",t.ArrayColumn)}(jQuery,FooTable),function(e,t){t.is.undef(window.moment)||(t.DateColumn=t.Column.extend({construct:function(e,n){this._super(e,n,"date"),this.formatString=t.is.string(n.formatString)?n.formatString:"MM-DD-YYYY"},parser:function(n){if(t.is.element(n)||t.is.jq(n)){var i=e(n).data("value");n=t.is.defined(i)?i:e(n).text(),t.is.string(n)&&(n=isNaN(n)?n:+n)}if(t.is.date(n))return moment(n);if(t.is.object(n)&&t.is.boolean(n._isAMomentObject))return n;if(t.is.string(n)){if(isNaN(n))return moment(n,this.formatString);n=+n}return t.is.number(n)?moment(n):null},formatter:function(e,n,i){return t.is.object(e)&&t.is.boolean(e._isAMomentObject)&&e.isValid()?e.format(this.formatString):""},filterValue:function(n){if((t.is.element(n)||t.is.jq(n))&&(n=e(n).data("filterValue")||e(n).text()),t.is.hash(n)&&t.is.hash(n.options)&&(t.is.string(n.options.filterValue)&&(n=n.options.filterValue),t.is.defined(n.value)&&(n=n.value)),t.is.object(n)&&t.is.boolean(n._isAMomentObject))return n.format(this.formatString);if(t.is.string(n)){if(isNaN(n))return n;n=+n}return t.is.number(n)||t.is.date(n)?moment(n).format(this.formatString):t.is.defined(n)&&null!=n?n+"":""}}),t.columns.register("date",t.DateColumn))}(jQuery,FooTable),function(e,t){t.HTMLColumn=t.Column.extend({construct:function(e,t){this._super(e,t,"html")},parser:function(n){if(t.is.string(n)&&(n=e(e.trim(n))),t.is.element(n)&&(n=e(n)),t.is.jq(n)){var i=n.prop("tagName").toLowerCase();if("td"==i||"th"==i){var o=n.data("value");return t.is.defined(o)?o:n.contents()}return n}return null}}),t.columns.register("html",t.HTMLColumn)}(jQuery,FooTable),function(e,t){t.NumberColumn=t.Column.extend({construct:function(e,n){this._super(e,n,"number"),this.decimalSeparator=t.is.string(n.decimalSeparator)?n.decimalSeparator:".",this.thousandSeparator=t.is.string(n.thousandSeparator)?n.thousandSeparator:",",this.decimalSeparatorRegex=new RegExp(t.str.escapeRegExp(this.decimalSeparator),"g"),this.thousandSeparatorRegex=new RegExp(t.str.escapeRegExp(this.thousandSeparator),"g"),this.cleanRegex=new RegExp("[^-0-9"+t.str.escapeRegExp(this.decimalSeparator)+"]","g")},parser:function(n){if(t.is.element(n)||t.is.jq(n)){var i=e(n).data("value");n=t.is.defined(i)?i:e(n).text().replace(this.cleanRegex,"")}return t.is.string(n)&&(n=n.replace(this.thousandSeparatorRegex,"").replace(this.decimalSeparatorRegex,"."),n=parseFloat(n)),t.is.number(n)?n:null},formatter:function(e,t,n){if(null==e)return"";var i=(e+"").split(".");return 2==i.length&&i[0].length>3&&(i[0]=i[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,this.thousandSeparator)),i.join(this.decimalSeparator)}}),t.columns.register("number",t.NumberColumn)}(jQuery,FooTable),function(e,t){t.ObjectColumn=t.Column.extend({construct:function(e,t){this._super(e,t,"object")},parser:function(n){if(t.is.element(n)||t.is.jq(n)){var i=e(n),o=i.data("value");if(t.is.object(o))return o;o=i.html();try{o=JSON.parse(o)}catch(e){o=null}return t.is.object(o)?o:null}return t.is.object(n)?n:null},formatter:function(e,n,i){return t.is.object(e)?JSON.stringify(e):""}}),t.columns.register("object",t.ObjectColumn)}(jQuery,FooTable),function(e,t){t.Breakpoint=t.Class.extend({construct:function(e,t){this.name=e,this.width=t}})}(jQuery,FooTable),function(e,t){t.Breakpoints=t.Component.extend({construct:function(e){this._super(e,!0),this.o=e.o,this.current=null,this.array=[],this.cascade=this.o.cascade,this.useParentWidth=this.o.useParentWidth,this.hidden=null,this._classNames="",this.getWidth=t.checkFnValue(this,this.o.getWidth,this.getWidth)},preinit:function(e){var n=this;return this.ft.raise("preinit.ft.breakpoints",[e]).then(function(){for(var i in n.cascade=t.is.boolean(e.cascade)?e.cascade:n.cascade,n.o.breakpoints=t.is.hash(e.breakpoints)?e.breakpoints:n.o.breakpoints,n.getWidth=t.checkFnValue(n,e.getWidth,n.getWidth),null==n.o.breakpoints&&(n.o.breakpoints={xs:480,sm:768,md:992,lg:1200}),n.o.breakpoints)n.o.breakpoints.hasOwnProperty(i)&&(n.array.push(new t.Breakpoint(i,n.o.breakpoints[i])),n._classNames+="breakpoint-"+i+" ");n.array.sort(function(e,t){return t.width-e.width})})},init:function(){var e=this;return this.ft.raise("init.ft.breakpoints").then(function(){e.current=e.get()})},draw:function(){this.ft.$el.removeClass(this._classNames).addClass("breakpoint-"+this.current.name)},calculate:function(){for(var e,n=this,i=null,o=[],r=null,s=n.getWidth(),a=0,l=n.array.length;l>a;a++)e=n.array[a],(!i&&a==l-1||s>=e.width&&(!(r instanceof t.Breakpoint)||s<r.width))&&(i=e),i||o.push(e.name),r=e;return o.push(i.name),n.hidden=o.join(" "),i},visible:function(e){if(t.is.emptyString(e))return!0;if("all"===e)return!1;for(var n=e.split(" "),i=0,o=n.length;o>i;i++)if(this.cascade?t.str.containsWord(this.hidden,n[i]):n[i]==this.current.name)return!1;return!0},check:function(){var e=this,n=e.get();n instanceof t.Breakpoint&&n!=e.current&&e.ft.raise("before.ft.breakpoints",[e.current,n]).then(function(){var t=e.current;return e.current=n,e.ft.draw().then(function(){e.ft.raise("after.ft.breakpoints",[e.current,t])})})},get:function(e){return t.is.undef(e)?this.calculate():e instanceof t.Breakpoint?e:t.is.string(e)?t.arr.first(this.array,function(t){return t.name==e}):t.is.number(e)&&e>=0&&e<this.array.length?this.array[e]:null},getWidth:function(){return t.is.fn(this.o.getWidth)?this.o.getWidth(this.ft):1==this.useParentWidth?this.getParentWidth():this.getViewportWidth()},getParentWidth:function(){return this.ft.$el.parent().width()},getViewportWidth:function(){return Math.max(document.documentElement.clientWidth,window.innerWidth,0)}}),t.components.register("breakpoints",t.Breakpoints,1e3)}(jQuery,FooTable),function(e){e.Column.prototype.breakpoints=null,e.Column.prototype.__breakpoints_define__=function(t){this.breakpoints=e.is.emptyString(t.breakpoints)?null:t.breakpoints},e.Column.extend("define",function(e){this._super(e),this.__breakpoints_define__(e)})}(FooTable),function(e){e.Defaults.prototype.breakpoints=null,e.Defaults.prototype.cascade=!1,e.Defaults.prototype.useParentWidth=!1,e.Defaults.prototype.getWidth=null}(FooTable),function(e,t){t.Columns=t.Component.extend({construct:function(e){this._super(e,!0),this.o=e.o,this.array=[],this.$header=null,this.showHeader=e.o.showHeader,this._fromHTML=t.is.emptyArray(e.o.columns)&&!t.is.promise(e.o.columns)},parse:function(n){var i=this;return e.Deferred(function(n){function o(n,i){var o=[];if(0==n.length||0==i.length)o=n.concat(i);else{var r=0;t.arr.each(n.concat(i),function(e){e.index>r&&(r=e.index)}),r++;for(var s,a,l=0;r>l;l++)s={},t.arr.each(n,function(e){return e.index==l?(s=e,!1):void 0}),a={},t.arr.each(i,function(e){return e.index==l?(a=e,!1):void 0}),o.push(e.extend(!0,{},s,a))}return o}var r,s,a=[],l=[],c=i.ft.$el.find("tr.footable-header, thead > tr:last:has([data-breakpoints]), tbody > tr:first:has([data-breakpoints]), thead > tr:last, tbody > tr:first").first();if(c.length>0){var u=c.parent().is("tbody")&&c.children().length==c.children("td").length;u||(i.$header=c.addClass("footable-header")),c.children("td,th").each(function(t,n){r=e(n),s=r.data(),s.index=t,s.$el=r,s.virtual=u,l.push(s)}),u&&(i.showHeader=!1)}t.is.array(i.o.columns)&&!t.is.emptyArray(i.o.columns)?(t.arr.each(i.o.columns,function(e,t){e.index=t,a.push(e)}),i.parseFinalize(n,o(a,l))):t.is.promise(i.o.columns)?i.o.columns.then(function(e){t.arr.each(e,function(e,t){e.index=t,a.push(e)}),i.parseFinalize(n,o(a,l))},function(e){n.reject(Error("Columns ajax request error: "+e.status+" ("+e.statusText+")"))}):i.parseFinalize(n,o(a,l))})},parseFinalize:function(e,n){var i,o=this,r=[];t.arr.each(n,function(e){(i=t.columns.contains(e.type)?t.columns.make(e.type,o.ft,e):new t.Column(o.ft,e))&&r.push(i)}),t.is.emptyArray(r)?e.reject(Error("No columns supplied.")):(r.sort(function(e,t){return e.index-t.index}),e.resolve(r))},preinit:function(e){var n=this;return n.ft.raise("preinit.ft.columns",[e]).then(function(){return n.parse(e).then(function(i){n.array=i,n.showHeader=t.is.boolean(e.showHeader)?e.showHeader:n.showHeader})})},init:function(){var e=this;return this.ft.raise("init.ft.columns",[e.array]).then(function(){e.$create()})},destroy:function(){var e=this;this.ft.raise("destroy.ft.columns").then(function(){e._fromHTML||e.$header.remove()})},predraw:function(){var e=this,n=!0;e.visibleColspan=0,e.firstVisibleIndex=0,e.lastVisibleIndex=0,e.hasHidden=!1,t.arr.each(e.array,function(t){t.hidden=!e.ft.breakpoints.visible(t.breakpoints),!t.hidden&&t.visible&&(n&&(e.firstVisibleIndex=t.index,n=!1),e.lastVisibleIndex=t.index,e.visibleColspan++),t.hidden&&(e.hasHidden=!0)}),e.ft.$el.toggleClass("breakpoint",e.hasHidden)},draw:function(){t.arr.each(this.array,function(e){e.$el.css("display",e.hidden||!e.visible?"none":"table-cell")}),!this.showHeader&&t.is.jq(this.$header.parent())&&this.$header.detach()},$create:function(){var n=this;n.$header=t.is.jq(n.$header)?n.$header:e("<tr/>",{class:"footable-header"}),n.$header.children("th,td").detach(),t.arr.each(n.array,function(e){n.$header.append(e.$el)}),n.showHeader&&!t.is.jq(n.$header.parent())&&n.ft.$el.children("thead").append(n.$header)},get:function(e){return e instanceof t.Column?e:t.is.string(e)?t.arr.first(this.array,function(t){return t.name==e}):t.is.number(e)?t.arr.first(this.array,function(t){return t.index==e}):t.is.fn(e)?t.arr.get(this.array,e):null},ensure:function(e){var n=this,i=[];return t.is.array(e)?(t.arr.each(e,function(e){i.push(n.get(e))}),i):i}}),t.components.register("columns",t.Columns,900)}(jQuery,FooTable),function(e){e.Defaults.prototype.columns=[],e.Defaults.prototype.showHeader=!0}(FooTable),function(e,t){t.Rows=t.Component.extend({construct:function(e){this._super(e,!0),this.o=e.o,this.array=[],this.all=[],this.showToggle=e.o.showToggle,this.toggleSelector=e.o.toggleSelector,this.toggleColumn=e.o.toggleColumn,this.emptyString=e.o.empty,this.expandFirst=e.o.expandFirst,this.expandAll=e.o.expandAll,this.$empty=null,this._fromHTML=t.is.emptyArray(e.o.rows)&&!t.is.promise(e.o.rows)},parse:function(){var n=this;return e.Deferred(function(e){var i=n.ft.$el.children("tbody").children("tr");t.is.array(n.o.rows)&&n.o.rows.length>0?n.parseFinalize(e,n.o.rows):t.is.promise(n.o.rows)?n.o.rows.then(function(t){n.parseFinalize(e,t)},function(t){e.reject(Error("Rows ajax request error: "+t.status+" ("+t.statusText+")"))}):t.is.jq(i)?(n.parseFinalize(e,i),i.detach()):n.parseFinalize(e,[])})},parseFinalize:function(n,i){var o=this,r=e.map(i,function(e){return new t.Row(o.ft,o.ft.columns.array,e)});n.resolve(r)},preinit:function(e){var n=this;return n.ft.raise("preinit.ft.rows",[e]).then(function(){return n.parse().then(function(i){n.all=i,n.array=n.all.slice(0),n.showToggle=t.is.boolean(e.showToggle)?e.showToggle:n.showToggle,n.toggleSelector=t.is.string(e.toggleSelector)?e.toggleSelector:n.toggleSelector,n.toggleColumn=t.is.string(e.toggleColumn)?e.toggleColumn:n.toggleColumn,"first"!=n.toggleColumn&&"last"!=n.toggleColumn&&(n.toggleColumn="first"),n.emptyString=t.is.string(e.empty)?e.empty:n.emptyString,n.expandFirst=t.is.boolean(e.expandFirst)?e.expandFirst:n.expandFirst,n.expandAll=t.is.boolean(e.expandAll)?e.expandAll:n.expandAll})})},init:function(){var e=this;return e.ft.raise("init.ft.rows",[e.all]).then(function(){e.$create()})},destroy:function(){var e=this;this.ft.raise("destroy.ft.rows").then(function(){t.arr.each(e.array,function(t){t.predraw(!e._fromHTML)}),e.all=e.array=[]})},predraw:function(){t.arr.each(this.array,function(e){e.predraw()}),this.array=this.all.slice(0)},$create:function(){this.$empty=e("<tr/>",{class:"footable-empty"}).append(e("<td/>").text(this.emptyString))},draw:function(){var e=this,n=e.ft.$el.children("tbody"),i=!0;e.array.length>0?(e.$empty.detach(),t.arr.each(e.array,function(t){(e.expandFirst&&i||e.expandAll)&&(t.expanded=!0,i=!1),t.draw(n)})):(e.$empty.children("td").attr("colspan",e.ft.columns.visibleColspan),n.append(e.$empty))},load:function(n,i){var o=this,r=e.map(n,function(e){return new t.Row(o.ft,o.ft.columns.array,e)});t.arr.each(this.array,function(e){e.predraw()}),this.all=t.is.boolean(i)&&i?this.all.concat(r):r,this.array=this.all.slice(0),this.ft.draw()},expand:function(){t.arr.each(this.array,function(e){e.expand()})},collapse:function(){t.arr.each(this.array,function(e){e.collapse()})}}),t.components.register("rows",t.Rows,800)}(jQuery,FooTable),function(e){e.Defaults.prototype.rows=[],e.Defaults.prototype.empty="No results",e.Defaults.prototype.showToggle=!0,e.Defaults.prototype.toggleSelector="tr,td,.footable-toggle",e.Defaults.prototype.toggleColumn="first",e.Defaults.prototype.expandFirst=!1,e.Defaults.prototype.expandAll=!1}(FooTable),function(e){e.Table.prototype.loadRows=function(e,t){this.rows.load(e,t)}}(FooTable),function(e){e.Filter=e.Class.extend({construct:function(t,n,i,o,r,s,a){this.name=t,this.space=!e.is.string(o)||"OR"!=o&&"AND"!=o?"AND":o,this.connectors=!e.is.boolean(r)||r,this.ignoreCase=!e.is.boolean(s)||s,this.hidden=!!e.is.boolean(a)&&a,this.query=n instanceof e.Query?n:new e.Query(n,this.space,this.connectors,this.ignoreCase),this.columns=i},match:function(t){return!!e.is.string(t)&&(e.is.string(this.query)&&(this.query=new e.Query(this.query,this.space,this.connectors,this.ignoreCase)),this.query instanceof e.Query&&this.query.match(t))},matchRow:function(t){var n=this,i=e.arr.map(t.cells,function(t){return e.arr.contains(n.columns,t.column)?t.filterValue:null}).join(" ");return n.match(i)}})}(FooTable),function(e,t){t.Filtering=t.Component.extend({construct:function(e){this._super(e,e.o.filtering.enabled),this.filters=e.o.filtering.filters,this.delay=e.o.filtering.delay,this.min=e.o.filtering.min,this.space=e.o.filtering.space,this.connectors=e.o.filtering.connectors,this.ignoreCase=e.o.filtering.ignoreCase,this.exactMatch=e.o.filtering.exactMatch,this.placeholder=e.o.filtering.placeholder,this.dropdownTitle=e.o.filtering.dropdownTitle,this.position=e.o.filtering.position,this.focus=e.o.filtering.focus,this.container=e.o.filtering.container,this.$container=null,this.$row=null,this.$cell=null,this.$form=null,this.$dropdown=null,this.$input=null,this.$button=null,this._filterTimeout=null,this._exactRegExp=/^"(.*?)"$/},preinit:function(e){var n=this;return n.ft.raise("preinit.ft.filtering").then(function(){n.ft.$el.hasClass("footable-filtering")&&(n.enabled=!0),n.enabled=t.is.boolean(e.filtering)?e.filtering:n.enabled,n.enabled&&(n.space=t.is.string(e.filterSpace)?e.filterSpace:n.space,n.min=t.is.number(e.filterMin)?e.filterMin:n.min,n.connectors=t.is.boolean(e.filterConnectors)?e.filterConnectors:n.connectors,n.ignoreCase=t.is.boolean(e.filterIgnoreCase)?e.filterIgnoreCase:n.ignoreCase,n.exactMatch=t.is.boolean(e.filterExactMatch)?e.filterExactMatch:n.exactMatch,n.focus=t.is.boolean(e.filterFocus)?e.filterFocus:n.focus,n.delay=t.is.number(e.filterDelay)?e.filterDelay:n.delay,n.placeholder=t.is.string(e.filterPlaceholder)?e.filterPlaceholder:n.placeholder,n.dropdownTitle=t.is.string(e.filterDropdownTitle)?e.filterDropdownTitle:n.dropdownTitle,n.container=t.is.string(e.filterContainer)?e.filterContainer:n.container,n.filters=t.is.array(e.filterFilters)?n.ensure(e.filterFilters):n.ensure(n.filters),n.ft.$el.hasClass("footable-filtering-left")&&(n.position="left"),n.ft.$el.hasClass("footable-filtering-center")&&(n.position="center"),n.ft.$el.hasClass("footable-filtering-right")&&(n.position="right"),n.position=t.is.string(e.filterPosition)?e.filterPosition:n.position)},function(){n.enabled=!1})},init:function(){var e=this;return e.ft.raise("init.ft.filtering").then(function(){e.$create()},function(){e.enabled=!1})},destroy:function(){var e=this;return e.ft.raise("destroy.ft.filtering").then(function(){e.ft.$el.removeClass("footable-filtering").find("thead > tr.footable-filtering").remove()})},$create:function(){var n,i=this,o=e("<div/>",{class:"form-group footable-filtering-search"}).append(e("<label/>",{class:"sr-only",text:"Search"})),r=e("<div/>",{class:"input-group"}).appendTo(o),s=e("<div/>",{class:"input-group-btn"}),a=e("<button/>",{type:"button",class:"btn btn-default dropdown-toggle"}).on("click",{self:i},i._onDropdownToggleClicked).append(e("<span/>",{class:"caret"}));switch(i.position){case"left":n="footable-filtering-left";break;case"center":n="footable-filtering-center";break;default:n="footable-filtering-right"}i.ft.$el.addClass("footable-filtering").addClass(n),i.$container=null===i.container?e():e(i.container).first(),i.$container.length?i.$container.addClass("footable-filtering-external").addClass(n):(i.$row=e("<tr/>",{class:"footable-filtering"}).prependTo(i.ft.$el.children("thead")),i.$cell=e("<th/>").attr("colspan",i.ft.columns.visibleColspan).appendTo(i.$row),i.$container=i.$cell),i.$form=e("<form/>",{class:"form-inline"}).append(o).appendTo(i.$container),i.$input=e("<input/>",{type:"text",class:"form-control",placeholder:i.placeholder}),i.$button=e("<button/>",{type:"button",class:"btn btn-primary"}).on("click",{self:i},i._onSearchButtonClicked).append(e("<span/>",{class:"fooicon fooicon-search"})),i.$dropdown=e("<ul/>",{class:"dropdown-menu dropdown-menu-right"}),t.is.emptyString(i.dropdownTitle)||i.$dropdown.append(e("<li/>",{class:"dropdown-header",text:i.dropdownTitle})),i.$dropdown.append(t.arr.map(i.ft.columns.array,function(t){return t.filterable?e("<li/>").append(e("<a/>",{class:"checkbox"}).append(e("<label/>",{html:t.title}).prepend(e("<input/>",{type:"checkbox",checked:!0}).data("__FooTableColumn__",t)))):null})),i.delay>0&&(i.$input.on("keypress keyup paste",{self:i},i._onSearchInputChanged),i.$dropdown.on("click",'input[type="checkbox"]',{self:i},i._onSearchColumnClicked)),s.append(i.$button,a,i.$dropdown),r.append(i.$input,s)},predraw:function(){if(!t.is.emptyArray(this.filters)){var n=this;n.ft.rows.array=e.grep(n.ft.rows.array,function(e){return e.filtered(n.filters)})}},draw:function(){t.is.jq(this.$cell)&&this.$cell.attr("colspan",this.ft.columns.visibleColspan);var e=this.find("search");if(e instanceof t.Filter){var n=e.query.val();this.exactMatch&&this._exactRegExp.test(n)&&(n=n.replace(this._exactRegExp,"$1")),this.$input.val(n)}else this.$input.val(null);this.setButton(!t.arr.any(this.filters,function(e){return!e.hidden}))},addFilter:function(e,n,i,o,r,s,a){var l=this.createFilter(e,n,i,o,r,s,a);l instanceof t.Filter&&(this.removeFilter(l.name),this.filters.push(l))},removeFilter:function(e){t.arr.remove(this.filters,function(t){return t.name==e})},filter:function(e){var t=this;return t.filters=t.ensure(t.filters),t.ft.raise("before.ft.filtering",[t.filters]).then(function(){if(t.filters=t.ensure(t.filters),e)var n=t.$input.prop("selectionStart"),i=t.$input.prop("selectionEnd");return t.ft.draw().then(function(){e&&t.$input.focus().prop({selectionStart:n,selectionEnd:i}),t.ft.raise("after.ft.filtering",[t.filters])})})},clear:function(){return this.filters=t.arr.get(this.filters,function(e){return e.hidden}),this.filter(this.focus)},setButton:function(e){e?this.$button.children(".fooicon").removeClass("fooicon-remove").addClass("fooicon-search"):this.$button.children(".fooicon").removeClass("fooicon-search").addClass("fooicon-remove")},find:function(e){return t.arr.first(this.filters,function(t){return t.name==e})},columns:function(){return t.is.jq(this.$dropdown)?this.$dropdown.find("input:checked").map(function(){return e(this).data("__FooTableColumn__")}).get():this.ft.columns.get(function(e){return e.filterable})},ensure:function(e){var n=this,i=[],o=n.columns();return t.is.emptyArray(e)||t.arr.each(e,function(e){e=n._ensure(e,o),e instanceof t.Filter&&i.push(e)}),i},createFilter:function(e,n,i,o,r,s,a){return t.is.string(e)&&(e={name:e,query:n,columns:i,ignoreCase:o,connectors:r,space:s,hidden:a}),this._ensure(e,this.columns())},_ensure:function(e,n){return(t.is.hash(e)||e instanceof t.Filter)&&!t.is.emptyString(e.name)&&(!t.is.emptyString(e.query)||e.query instanceof t.Query)?(e.columns=t.is.emptyArray(e.columns)?n:this.ft.columns.ensure(e.columns),e.ignoreCase=t.is.boolean(e.ignoreCase)?e.ignoreCase:this.ignoreCase,e.connectors=t.is.boolean(e.connectors)?e.connectors:this.connectors,e.hidden=!!t.is.boolean(e.hidden)&&e.hidden,e.space=!t.is.string(e.space)||"AND"!==e.space&&"OR"!==e.space?this.space:e.space,e.query=t.is.string(e.query)?new t.Query(e.query,e.space,e.connectors,e.ignoreCase):e.query,e instanceof t.Filter?e:new t.Filter(e.name,e.query,e.columns,e.space,e.connectors,e.ignoreCase,e.hidden)):null},_onSearchInputChanged:function(e){var n=e.data.self,i="keypress"==e.type&&!t.is.emptyString(String.fromCharCode(e.charCode)),o="keyup"==e.type&&(8==e.which||46==e.which),r="paste"==e.type;(i||o||r)&&(13==e.which&&e.preventDefault(),null!=n._filterTimeout&&clearTimeout(n._filterTimeout),n._filterTimeout=setTimeout(function(){n._filterTimeout=null;var e=n.$input.val();e.length>=n.min?(n.exactMatch&&!n._exactRegExp.test(e)&&(e='"'+e+'"'),n.addFilter("search",e),n.filter(n.focus)):t.is.emptyString(e)&&n.clear()},n.delay))},_onSearchButtonClicked:function(e){e.preventDefault();var t=e.data.self;null!=t._filterTimeout&&clearTimeout(t._filterTimeout);var n=t.$button.children(".fooicon");if(n.hasClass("fooicon-remove"))t.clear();else{var i=t.$input.val();i.length>=t.min&&(t.exactMatch&&!t._exactRegExp.test(i)&&(i='"'+i+'"'),t.addFilter("search",i),t.filter(t.focus))}},_onSearchColumnClicked:function(e){var t=e.data.self;null!=t._filterTimeout&&clearTimeout(t._filterTimeout),t._filterTimeout=setTimeout(function(){t._filterTimeout=null;var e=t.$button.children(".fooicon");e.hasClass("fooicon-remove")&&(e.removeClass("fooicon-remove").addClass("fooicon-search"),t.addFilter("search",t.$input.val()),t.filter())},t.delay)},_onDropdownToggleClicked:function(t){t.preventDefault(),t.stopPropagation();var n=t.data.self;n.$dropdown.parent().toggleClass("open"),n.$dropdown.parent().hasClass("open")?e(document).on("click.footable",{self:n
},n._onDocumentClicked):e(document).off("click.footable",n._onDocumentClicked)},_onDocumentClicked:function(t){if(0==e(t.target).closest(".dropdown-menu").length){t.preventDefault();var n=t.data.self;n.$dropdown.parent().removeClass("open"),e(document).off("click.footable",n._onDocumentClicked)}}}),t.components.register("filtering",t.Filtering,500)}(jQuery,FooTable),function(e){e.Query=e.Class.extend({construct:function(t,n,i,o){this._original=null,this._value=null,this.space=!e.is.string(n)||"OR"!=n&&"AND"!=n?"AND":n,this.connectors=!e.is.boolean(i)||i,this.ignoreCase=!e.is.boolean(o)||o,this.left=null,this.right=null,this.parts=[],this.operator=null,this.val(t)},val:function(t){if(e.is.emptyString(t))return this._value;if(e.is.emptyString(this._original))this._original=t;else if(this._original==t)return;this._value=t,this._parse()},match:function(t){return e.is.emptyString(this.operator)||"OR"===this.operator?this._left(t,!1)||this._match(t,!1)||this._right(t,!1):"AND"===this.operator?this._left(t,!0)&&this._match(t,!0)&&this._right(t,!0):void 0},_match:function(t,n){var i=this,o=!1,r=e.is.emptyString(t);return e.is.emptyArray(i.parts)&&i.left instanceof e.Query?n:e.is.emptyArray(i.parts)?o:("OR"===i.space?e.arr.each(i.parts,function(n){if(n.empty&&r){if(o=!0,n.negate)return o=!1}else{var s=(n.exact?e.str.containsExact:e.str.contains)(t,n.query,i.ignoreCase);if(s&&!n.negate&&(o=!0),s&&n.negate)return o=!1}}):(o=!0,e.arr.each(i.parts,function(n){if(n.empty)return(!r&&!n.negate||r&&n.negate)&&(o=!1),o;var s=(n.exact?e.str.containsExact:e.str.contains)(t,n.query,i.ignoreCase);return(!s&&!n.negate||s&&n.negate)&&(o=!1),o})),o)},_left:function(t,n){return this.left instanceof e.Query?this.left.match(t):n},_right:function(t,n){return this.right instanceof e.Query?this.right.match(t):n},_parse:function(){if(!e.is.emptyString(this._value))if(/\sOR\s/.test(this._value)){this.operator="OR";var t=this._value.split(/(?:\sOR\s)(.*)?/);this.left=new e.Query(t[0],this.space,this.connectors,this.ignoreCase),this.right=new e.Query(t[1],this.space,this.connectors,this.ignoreCase)}else if(/\sAND\s/.test(this._value)){this.operator="AND";var n=this._value.split(/(?:\sAND\s)(.*)?/);this.left=new e.Query(n[0],this.space,this.connectors,this.ignoreCase),this.right=new e.Query(n[1],this.space,this.connectors,this.ignoreCase)}else{var i=this;this.parts=e.arr.map(this._value.match(/(?:[^\s"]+|"[^"]*")+/g),function(e){return i._part(e)})}},_part:function(t){var n={query:t,negate:!1,phrase:!1,exact:!1,empty:!1};return e.str.startsWith(n.query,"-")&&(n.query=e.str.from(n.query,"-"),n.negate=!0),/^"(.*?)"$/.test(n.query)?(n.query=n.query.replace(/^"(.*?)"$/,"$1"),n.phrase=!0,n.exact=!0):this.connectors&&/(?:\w)+?([-_\+\.])(?:\w)+?/.test(n.query)&&(n.query=n.query.replace(/(?:\w)+?([-_\+\.])(?:\w)+?/g,function(e,t){return e.replace(t," ")}),n.phrase=!0),n.empty=n.phrase&&e.is.emptyString(n.query),n}})}(FooTable),function(e){e.Cell.prototype.filterValue=null,e.Cell.prototype.__filtering_define__=function(e){this.filterValue=this.column.filterValue.call(this.column,e)},e.Cell.prototype.__filtering_val__=function(t){e.is.defined(t)&&(this.filterValue=this.column.filterValue.call(this.column,t))},e.Cell.extend("define",function(e){this._super(e),this.__filtering_define__(e)}),e.Cell.extend("val",function(e,t,n){var i=this._super(e,t,n);return this.__filtering_val__(e),i})}(FooTable),function(e,t){t.Column.prototype.filterable=!0,t.Column.prototype.filterValue=function(n){if(t.is.element(n)||t.is.jq(n)){var i=e(n).data("filterValue");return t.is.defined(i)?""+i:e(n).text()}if(t.is.hash(n)&&t.is.hash(n.options)){if(t.is.string(n.options.filterValue))return n.options.filterValue;t.is.defined(n.value)&&(n=n.value)}return t.is.defined(n)&&null!=n?n+"":""},t.Column.prototype.__filtering_define__=function(e){this.filterable=t.is.boolean(e.filterable)?e.filterable:this.filterable,this.filterValue=t.checkFnValue(this,e.filterValue,this.filterValue)},t.Column.extend("define",function(e){this._super(e),this.__filtering_define__(e)})}(jQuery,FooTable),function(e){e.Defaults.prototype.filtering={enabled:!1,filters:[],delay:1200,min:1,space:"AND",placeholder:"Search",dropdownTitle:null,position:"right",connectors:!0,ignoreCase:!0,exactMatch:!1,focus:!0,container:null}}(FooTable),function(e){e.Row.prototype.filtered=function(t){var n=!0,i=this;return e.arr.each(t,function(e){return 0!=(n=e.matchRow(i))&&void 0}),n}}(FooTable),function(e,t){t.Sorter=t.Class.extend({construct:function(e,t){this.column=e,this.direction=t}})}(jQuery,FooTable),function(e,t){t.Sorting=t.Component.extend({construct:function(e){this._super(e,e.o.sorting.enabled),this.o=e.o.sorting,this.column=null,this.allowed=!0,this.initial=null},preinit:function(e){var n=this;this.ft.raise("preinit.ft.sorting",[e]).then(function(){n.ft.$el.hasClass("footable-sorting")&&(n.enabled=!0),n.enabled=t.is.boolean(e.sorting)?e.sorting:n.enabled,n.enabled&&(n.column=t.arr.first(n.ft.columns.array,function(e){return e.sorted}))},function(){n.enabled=!1})},init:function(){var n=this;this.ft.raise("init.ft.sorting").then(function(){if(!n.initial){var i=!!n.column;n.initial={isset:i,rows:n.ft.rows.all.slice(0),column:i?n.column.name:null,direction:i?n.column.direction:null}}t.arr.each(n.ft.columns.array,function(t){t.sortable&&t.$el.addClass("footable-sortable").append(e("<span/>",{class:"fooicon fooicon-sort"}))}),n.ft.$el.on("click.footable",".footable-sortable",{self:n},n._onSortClicked)},function(){n.enabled=!1})},destroy:function(){var e=this;this.ft.raise("destroy.ft.paging").then(function(){e.ft.$el.off("click.footable",".footable-sortable",e._onSortClicked),e.ft.$el.children("thead").children("tr.footable-header").children(".footable-sortable").removeClass("footable-sortable footable-asc footable-desc").find("span.fooicon").remove()})},predraw:function(){if(this.column){var e=this,t=e.column;e.ft.rows.array.sort(function(e,n){return"DESC"==t.direction?t.sorter(n.cells[t.index].sortValue,e.cells[t.index].sortValue):t.sorter(e.cells[t.index].sortValue,n.cells[t.index].sortValue)})}},draw:function(){if(this.column){var e=this,t=e.ft.$el.find("thead > tr > .footable-sortable"),n=e.column.$el;t.removeClass("footable-asc footable-desc").children(".fooicon").removeClass("fooicon-sort fooicon-sort-asc fooicon-sort-desc"),t.not(n).children(".fooicon").addClass("fooicon-sort"),n.addClass("DESC"==e.column.direction?"footable-desc":"footable-asc").children(".fooicon").addClass("DESC"==e.column.direction?"fooicon-sort-desc":"fooicon-sort-asc")}},sort:function(e,t){return this._sort(e,t)},toggleAllowed:function(e){e=t.is.boolean(e)?e:!this.allowed,this.allowed=e,this.ft.$el.toggleClass("footable-sorting-disabled",!this.allowed)},hasChanged:function(){return!(!this.initial||!this.column||this.column.name===this.initial.column&&(this.column.direction===this.initial.direction||null===this.initial.direction&&"ASC"===this.column.direction))},reset:function(){this.initial&&(this.initial.isset?this.sort(this.initial.column,this.initial.direction):(this.column&&(this.column.$el.removeClass("footable-asc footable-desc"),this.column=null),this.ft.rows.all=this.initial.rows,this.ft.draw()))},_sort:function(n,i){if(!this.allowed)return e.Deferred().reject("sorting disabled");var o=this,r=new t.Sorter(o.ft.columns.get(n),t.Sorting.dir(i));return o.ft.raise("before.ft.sorting",[r]).then(function(){return t.arr.each(o.ft.columns.array,function(e){e!=o.column&&(e.direction=null)}),o.column=o.ft.columns.get(r.column),o.column&&(o.column.direction=t.Sorting.dir(r.direction)),o.ft.draw().then(function(){o.ft.raise("after.ft.sorting",[r])})})},_onSortClicked:function(t){var n=t.data.self,i=e(this).closest("th,td"),o=i.is(".footable-asc, .footable-desc")?i.hasClass("footable-desc")?"ASC":"DESC":"ASC";n._sort(i.index(),o)}}),t.Sorting.dir=function(e){return!t.is.string(e)||"ASC"!=e&&"DESC"!=e?"ASC":e},t.components.register("sorting",t.Sorting,600)}(jQuery,FooTable),function(e){e.Cell.prototype.sortValue=null,e.Cell.prototype.__sorting_define__=function(e){this.sortValue=this.column.sortValue.call(this.column,e)},e.Cell.prototype.__sorting_val__=function(t){e.is.defined(t)&&(this.sortValue=this.column.sortValue.call(this.column,t))},e.Cell.extend("define",function(e){this._super(e),this.__sorting_define__(e)}),e.Cell.extend("val",function(e,t,n){var i=this._super(e,t,n);return this.__sorting_val__(e),i})}(FooTable),function(e,t){t.Column.prototype.direction=null,t.Column.prototype.sortable=!0,t.Column.prototype.sorted=!1,t.Column.prototype.sorter=function(e,t){return"string"==typeof e&&(e=e.toLowerCase()),"string"==typeof t&&(t=t.toLowerCase()),e===t?0:t>e?-1:1},t.Column.prototype.sortValue=function(n){if(t.is.element(n)||t.is.jq(n)){var i=e(n).data("sortValue");return t.is.defined(i)?i:this.parser(n)}if(t.is.hash(n)&&t.is.hash(n.options)){if(t.is.string(n.options.sortValue))return n.options.sortValue;t.is.defined(n.value)&&(n=n.value)}return t.is.defined(n)&&null!=n?n:null},t.Column.prototype.__sorting_define__=function(e){this.sorter=t.checkFnValue(this,e.sorter,this.sorter),this.direction=t.is.type(e.direction,"string")?t.Sorting.dir(e.direction):null,this.sortable=!t.is.boolean(e.sortable)||e.sortable,this.sorted=!!t.is.boolean(e.sorted)&&e.sorted,this.sortValue=t.checkFnValue(this,e.sortValue,this.sortValue)},t.Column.extend("define",function(e){this._super(e),this.__sorting_define__(e)})}(jQuery,FooTable),function(e){e.Defaults.prototype.sorting={enabled:!1}}(FooTable),function(e,t){t.HTMLColumn.extend("__sorting_define__",function(n){this._super(n),this.sortUse=t.is.string(n.sortUse)&&-1!==e.inArray(n.sortUse,["html","text"])?n.sortUse:"html"}),t.HTMLColumn.prototype.sortValue=function(n){if(t.is.element(n)||t.is.jq(n)){var i=e(n).data("sortValue");return t.is.defined(i)?i:this.parser(n)}if(t.is.hash(n)&&t.is.hash(n.options)){if(t.is.string(n.options.sortValue))return n.options.sortValue;t.is.defined(n.value)&&(n=n.value)}return t.is.defined(n)&&null!=n?n:null}}(jQuery,FooTable),function(e,t){t.NumberColumn.prototype.sortValue=function(n){if(t.is.element(n)||t.is.jq(n)){var i=e(n).data("sortValue");return t.is.number(i)?i:this.parser(n)}if(t.is.hash(n)&&t.is.hash(n.options)){if(t.is.string(n.options.sortValue))return this.parser(n);if(t.is.number(n.options.sortValue))return n.options.sortValue;if(t.is.number(n.value))return n.value}return t.is.string(n)?this.parser(n):t.is.number(n)?n:null}}(jQuery,FooTable),function(e){e.Table.prototype.sort=function(t,n){return this.use(e.Sorting).sort(t,n)}}(FooTable),function(e,t){t.Pager=t.Class.extend({construct:function(e,t,n,i,o){this.total=e,this.current=t,this.size=n,this.page=i,this.forward=o}})}(jQuery,FooTable),function(e,t){t.Paging=t.Component.extend({construct:function(e){this._super(e,e.o.paging.enabled),this.strings=e.o.paging.strings,this.current=e.o.paging.current,this.size=e.o.paging.size,this.limit=e.o.paging.limit,this.position=e.o.paging.position,this.countFormat=e.o.paging.countFormat,this.container=e.o.paging.container,this.total=-1,this.totalRows=0,this.previous=-1,this.formattedCount=null,this.$container=null,this.$wrapper=null,this.$row=null,this.$cell=null,this.$pagination=null,this.$count=null,this.detached=!0,this._createdLinks=0},preinit:function(e){var n=this;this.ft.raise("preinit.ft.paging",[e]).then(function(){n.ft.$el.hasClass("footable-paging")&&(n.enabled=!0),n.enabled=t.is.boolean(e.paging)?e.paging:n.enabled,n.enabled&&(n.size=t.is.number(e.pagingSize)?e.pagingSize:n.size,n.current=t.is.number(e.pagingCurrent)?e.pagingCurrent:n.current,n.limit=t.is.number(e.pagingLimit)?e.pagingLimit:n.limit,n.ft.$el.hasClass("footable-paging-left")&&(n.position="left"),n.ft.$el.hasClass("footable-paging-center")&&(n.position="center"),n.ft.$el.hasClass("footable-paging-right")&&(n.position="right"),n.position=t.is.string(e.pagingPosition)?e.pagingPosition:n.position,n.countFormat=t.is.string(e.pagingCountFormat)?e.pagingCountFormat:n.countFormat,n.container=t.is.string(e.pagingContainer)?e.pagingContainer:n.container,n.total=Math.ceil(n.ft.rows.all.length/n.size))},function(){n.enabled=!1})},init:function(){var e=this;this.ft.raise("init.ft.paging").then(function(){e.$create()},function(){e.enabled=!1})},destroy:function(){var e=this;this.ft.raise("destroy.ft.paging").then(function(){e.ft.$el.removeClass("footable-paging").find("tfoot > tr.footable-paging").remove(),e.detached=!0,e._createdLinks=0})},predraw:function(){this.total=Math.ceil(this.ft.rows.array.length/this.size),this.current=this.current>this.total?this.total:this.current<1?1:this.current,this.totalRows=this.ft.rows.array.length,this.totalRows>this.size&&(this.ft.rows.array=this.ft.rows.array.splice((this.current-1)*this.size,this.size)),this.formattedCount=this.format(this.countFormat)},draw:function(){if(this.total<=1)this.detached||(this.$row?this.$row.detach():this.$wrapper.detach(),this.detached=!0);else{if(this.detached){if(this.$row){var n=this.ft.$el.children("tfoot");0==n.length&&(n=e("<tfoot/>"),this.ft.$el.append(n)),this.$row.appendTo(n)}else this.$wrapper.appendTo(this.$container);this.detached=!1}t.is.jq(this.$cell)&&this.$cell.attr("colspan",this.ft.columns.visibleColspan),this._createLinks(),this._setVisible(this.current,this.current>this.previous),this._setNavigation(!0),this.$count.text(this.formattedCount)}},$create:function(){this._createdLinks=0;var n="footable-paging-center";switch(this.position){case"left":n="footable-paging-left";break;case"right":n="footable-paging-right"}if(this.ft.$el.addClass("footable-paging").addClass(n),this.$container=null===this.container?null:e(this.container).first(),t.is.jq(this.$container))this.$container.addClass("footable-paging-external").addClass(n);else{var i=this.ft.$el.children("tfoot");0==i.length&&(i=e("<tfoot/>"),this.ft.$el.append(i)),this.$row=e("<tr/>",{class:"footable-paging"}).prependTo(i),this.$container=this.$cell=e("<td/>").attr("colspan",this.ft.columns.visibleColspan).appendTo(this.$row)}this.$wrapper=e("<div/>",{class:"footable-pagination-wrapper"}).appendTo(this.$container),this.$pagination=e("<ul/>",{class:"pagination"}).on("click.footable","a.footable-page-link",{self:this},this._onPageClicked),this.$count=e("<span/>",{class:"label label-default"}),this.$wrapper.append(this.$pagination,e("<div/>",{class:"divider"}),this.$count),this.detached=!1},format:function(e){var t=this.size*(this.current-1)+1,n=this.size*this.current;return 0==this.ft.rows.array.length?(t=0,n=0):n=n>this.totalRows?this.totalRows:n,e.replace(/\{CP}/g,this.current).replace(/\{TP}/g,this.total).replace(/\{PF}/g,t).replace(/\{PL}/g,n).replace(/\{TR}/g,this.totalRows)},first:function(){return this._set(1)},prev:function(){return this._set(this.current-1>0?this.current-1:1)},next:function(){return this._set(this.current+1<this.total?this.current+1:this.total)},last:function(){return this._set(this.total)},goto:function(e){return this._set(e>this.total?this.total:1>e?1:e)},prevPages:function(){var e=this.$pagination.children("li.footable-page.visible:first").data("page")-1;this._setVisible(e,!0),this._setNavigation(!1)},nextPages:function(){var e=this.$pagination.children("li.footable-page.visible:last").data("page")+1;this._setVisible(e,!1),this._setNavigation(!1)},pageSize:function(e){return e=parseInt(e),isNaN(e)?this.size:(this.size=e,this.total=Math.ceil(this.ft.rows.all.length/this.size),t.is.jq(this.$wrapper)&&(this.$container.is("td")?this.$row.remove():this.$wrapper.remove()),this.$create(),void this.ft.draw())},_set:function(n){var i=this,o=new t.Pager(i.total,i.current,i.size,n,n>i.current);return i.ft.raise("before.ft.paging",[o]).then(function(){return o.page=o.page>o.total?o.total:o.page,o.page=o.page<1?1:o.page,i.current==n?e.when():(i.previous=i.current,i.current=o.page,i.ft.draw().then(function(){i.ft.raise("after.ft.paging",[o])}))})},_createLinks:function(){if(this._createdLinks!==this.total){var t=this,n=t.total>1,i=function(t,n,i){return e("<li/>",{class:i}).attr("data-page",t).append(e("<a/>",{class:"footable-page-link",href:"#"}).data("page",t).html(n))};t.$pagination.empty(),n&&(t.$pagination.append(i("first",t.strings.first,"footable-page-nav")),t.$pagination.append(i("prev",t.strings.prev,"footable-page-nav")),t.limit>0&&t.limit<t.total&&t.$pagination.append(i("prev-limit",t.strings.prevPages,"footable-page-nav")));for(var o,r=0;r<t.total;r++)o=i(r+1,r+1,"footable-page"),t.$pagination.append(o);n&&(t.limit>0&&t.limit<t.total&&t.$pagination.append(i("next-limit",t.strings.nextPages,"footable-page-nav")),t.$pagination.append(i("next",t.strings.next,"footable-page-nav")),t.$pagination.append(i("last",t.strings.last,"footable-page-nav"))),t._createdLinks=t.total}},_setNavigation:function(e){1==this.current?this.$pagination.children('li[data-page="first"],li[data-page="prev"]').addClass("disabled"):this.$pagination.children('li[data-page="first"],li[data-page="prev"]').removeClass("disabled"),this.current==this.total?this.$pagination.children('li[data-page="next"],li[data-page="last"]').addClass("disabled"):this.$pagination.children('li[data-page="next"],li[data-page="last"]').removeClass("disabled"),1==(this.$pagination.children("li.footable-page.visible:first").data("page")||1)?this.$pagination.children('li[data-page="prev-limit"]').addClass("disabled"):this.$pagination.children('li[data-page="prev-limit"]').removeClass("disabled"),(this.$pagination.children("li.footable-page.visible:last").data("page")||this.limit)==this.total?this.$pagination.children('li[data-page="next-limit"]').addClass("disabled"):this.$pagination.children('li[data-page="next-limit"]').removeClass("disabled"),this.limit>0&&this.total<this.limit?this.$pagination.children('li[data-page="prev-limit"],li[data-page="next-limit"]').css("display","none"):this.$pagination.children('li[data-page="prev-limit"],li[data-page="next-limit"]').css("display",""),e&&this.$pagination.children("li.footable-page").removeClass("active").filter('li[data-page="'+this.current+'"]').addClass("active")},_setVisible:function(e,t){if(this.limit>0&&this.total>this.limit){if(!this.$pagination.children('li.footable-page[data-page="'+e+'"]').hasClass("visible")){var n=0,i=0;1==t?(i=e>this.total?this.total:e,n=i-this.limit):(n=1>e?0:e-1,i=n+this.limit),0>n&&(n=0,i=this.limit>this.total?this.total:this.limit),i>this.total&&(i=this.total,n=this.total-this.limit<0?0:this.total-this.limit),this.$pagination.children("li.footable-page").removeClass("visible").slice(n,i).addClass("visible")}}else this.$pagination.children("li.footable-page").removeClass("visible").slice(0,this.total).addClass("visible")},_onPageClicked:function(t){if(t.preventDefault(),!e(t.target).closest("li").is(".active,.disabled")){var n=t.data.self,i=e(this).data("page");switch(i){case"first":return void n.first();case"prev":return void n.prev();case"next":return void n.next();case"last":return void n.last();case"prev-limit":return void n.prevPages();case"next-limit":return void n.nextPages();default:return void n._set(i)}}}}),t.components.register("paging",t.Paging,400)}(jQuery,FooTable),function(e){e.Defaults.prototype.paging={enabled:!1,countFormat:"{CP} of {TP}",current:1,limit:5,position:"center",size:10,container:null,strings:{first:"&laquo;",prev:"&lsaquo;",next:"&rsaquo;",last:"&raquo;",prevPages:"...",nextPages:"..."}}}(FooTable),function(e){e.Table.prototype.gotoPage=function(t){return this.use(e.Paging).goto(t)},e.Table.prototype.nextPage=function(){return this.use(e.Paging).next()},e.Table.prototype.prevPage=function(){return this.use(e.Paging).prev()},e.Table.prototype.firstPage=function(){return this.use(e.Paging).first()},e.Table.prototype.lastPage=function(){return this.use(e.Paging).last()},e.Table.prototype.nextPages=function(){return this.use(e.Paging).nextPages()},e.Table.prototype.prevPages=function(){return this.use(e.Paging).prevPages()},e.Table.prototype.pageSize=function(t){return this.use(e.Paging).pageSize(t)}}(FooTable),function(e,t){t.Editing=t.Component.extend({construct:function(n){this._super(n,n.o.editing.enabled),this.pageToNew=n.o.editing.pageToNew,this.alwaysShow=n.o.editing.alwaysShow,this.column=e.extend(!0,{},n.o.editing.column,{visible:this.alwaysShow}),this.position=n.o.editing.position,this.showText=n.o.editing.showText,this.hideText=n.o.editing.hideText,this.addText=n.o.editing.addText,this.editText=n.o.editing.editText,this.deleteText=n.o.editing.deleteText,this.viewText=n.o.editing.viewText,this.allowAdd=n.o.editing.allowAdd,this.allowEdit=n.o.editing.allowEdit,this.allowDelete=n.o.editing.allowDelete,this.allowView=n.o.editing.allowView,this._$buttons=null,this.callbacks={addRow:t.checkFnValue(this,n.o.editing.addRow),editRow:t.checkFnValue(this,n.o.editing.editRow),deleteRow:t.checkFnValue(this,n.o.editing.deleteRow),viewRow:t.checkFnValue(this,n.o.editing.viewRow)}},preinit:function(n){var i=this;this.ft.raise("preinit.ft.editing",[n]).then(function(){if(i.ft.$el.hasClass("footable-editing")&&(i.enabled=!0),i.enabled=t.is.boolean(n.editing)?n.editing:i.enabled,i.enabled){if(i.pageToNew=t.is.boolean(n.editingPageToNew)?n.editingPageToNew:i.pageToNew,i.alwaysShow=t.is.boolean(n.editingAlwaysShow)?n.editingAlwaysShow:i.alwaysShow,i.position=t.is.string(n.editingPosition)?n.editingPosition:i.position,i.showText=t.is.string(n.editingShowText)?n.editingShowText:i.showText,i.hideText=t.is.string(n.editingHideText)?n.editingHideText:i.hideText,i.addText=t.is.string(n.editingAddText)?n.editingAddText:i.addText,i.editText=t.is.string(n.editingEditText)?n.editingEditText:i.editText,i.deleteText=t.is.string(n.editingDeleteText)?n.editingDeleteText:i.deleteText,i.viewText=t.is.string(n.editingViewText)?n.editingViewText:i.viewText,i.allowAdd=t.is.boolean(n.editingAllowAdd)?n.editingAllowAdd:i.allowAdd,i.allowEdit=t.is.boolean(n.editingAllowEdit)?n.editingAllowEdit:i.allowEdit,i.allowDelete=t.is.boolean(n.editingAllowDelete)?n.editingAllowDelete:i.allowDelete,i.allowView=t.is.boolean(n.editingAllowView)?n.editingAllowView:i.allowView,i.column=new t.EditingColumn(i.ft,i,e.extend(!0,{},i.column,n.editingColumn,{visible:i.alwaysShow})),i.ft.$el.hasClass("footable-editing-left")&&(i.position="left"),i.ft.$el.hasClass("footable-editing-right")&&(i.position="right"),"right"===i.position)i.column.index=i.ft.columns.array.length;else{i.column.index=0;for(var o=0,r=i.ft.columns.array.length;r>o;o++)i.ft.columns.array[o].index+=1}i.ft.columns.array.push(i.column),i.ft.columns.array.sort(function(e,t){return e.index-t.index}),i.callbacks.addRow=t.checkFnValue(i,n.editingAddRow,i.callbacks.addRow),i.callbacks.editRow=t.checkFnValue(i,n.editingEditRow,i.callbacks.editRow),i.callbacks.deleteRow=t.checkFnValue(i,n.editingDeleteRow,i.callbacks.deleteRow),i.callbacks.viewRow=t.checkFnValue(i,n.editingViewRow,i.callbacks.viewRow)}},function(){i.enabled=!1})},init:function(){var e=this;this.ft.raise("init.ft.editing").then(function(){e.$create()},function(){e.enabled=!1})},destroy:function(){var e=this;this.ft.raise("destroy.ft.editing").then(function(){e.ft.$el.removeClass("footable-editing footable-editing-always-show footable-editing-no-add footable-editing-no-edit footable-editing-no-delete footable-editing-no-view").off("click.ft.editing").find("tfoot > tr.footable-editing").remove()})},$create:function(){var t=this,n="right"===t.position?"footable-editing-right":"footable-editing-left";t.ft.$el.addClass("footable-editing").addClass(n).on("click.ft.editing",".footable-show",{self:t},t._onShowClick).on("click.ft.editing",".footable-hide",{self:t},t._onHideClick).on("click.ft.editing",".footable-edit",{self:t},t._onEditClick).on("click.ft.editing",".footable-delete",{self:t},t._onDeleteClick).on("click.ft.editing",".footable-view",{self:t},t._onViewClick).on("click.ft.editing",".footable-add",{self:t},t._onAddClick),t.$cell=e("<td/>").attr("colspan",t.ft.columns.visibleColspan).append(t.$buttonShow()),t.allowAdd&&t.$cell.append(t.$buttonAdd()),t.$cell.append(t.$buttonHide()),t.alwaysShow&&t.ft.$el.addClass("footable-editing-always-show"),t.allowAdd||t.ft.$el.addClass("footable-editing-no-add"),t.allowEdit||t.ft.$el.addClass("footable-editing-no-edit"),t.allowDelete||t.ft.$el.addClass("footable-editing-no-delete"),t.allowView||t.ft.$el.addClass("footable-editing-no-view");var i=t.ft.$el.children("tfoot");0==i.length&&(i=e("<tfoot/>"),t.ft.$el.append(i)),t.$row=e("<tr/>",{class:"footable-editing"}).append(t.$cell).appendTo(i)},$buttonShow:function(){return'<button type="button" class="btn btn-primary footable-show">'+this.showText+"</button>"},$buttonHide:function(){return'<button type="button" class="btn btn-default footable-hide">'+this.hideText+"</button>"},$buttonAdd:function(){return'<button type="button" class="btn btn-primary footable-add">'+this.addText+"</button> "},$buttonEdit:function(){return'<button type="button" class="btn btn-default footable-edit">'+this.editText+"</button> "},$buttonDelete:function(){return'<button type="button" class="btn btn-default footable-delete">'+this.deleteText+"</button>"},$buttonView:function(){return'<button type="button" class="btn btn-default footable-view">'+this.viewText+"</button> "},$rowButtons:function(){return t.is.jq(this._$buttons)?this._$buttons.clone():(this._$buttons=e('<div class="btn-group btn-group-xs" role="group"></div>'),this.allowView&&this._$buttons.append(this.$buttonView()),this.allowEdit&&this._$buttons.append(this.$buttonEdit()),this.allowDelete&&this._$buttons.append(this.$buttonDelete()),this._$buttons)},draw:function(){this.$cell.attr("colspan",this.ft.columns.visibleColspan)},_onEditClick:function(n){n.preventDefault();var i=n.data.self,o=e(this).closest("tr").data("__FooTableRow__");o instanceof t.Row&&i.ft.raise("edit.ft.editing",[o]).then(function(){i.callbacks.editRow.call(i.ft,o)})},_onDeleteClick:function(n){n.preventDefault();var i=n.data.self,o=e(this).closest("tr").data("__FooTableRow__");o instanceof t.Row&&i.ft.raise("delete.ft.editing",[o]).then(function(){i.callbacks.deleteRow.call(i.ft,o)})},_onViewClick:function(n){n.preventDefault();var i=n.data.self,o=e(this).closest("tr").data("__FooTableRow__");o instanceof t.Row&&i.ft.raise("view.ft.editing",[o]).then(function(){i.callbacks.viewRow.call(i.ft,o)})},_onAddClick:function(e){e.preventDefault();var t=e.data.self;t.ft.raise("add.ft.editing").then(function(){t.callbacks.addRow.call(t.ft)})},_onShowClick:function(e){e.preventDefault();var t=e.data.self;t.ft.raise("show.ft.editing").then(function(){t.ft.$el.addClass("footable-editing-show"),t.column.visible=!0,t.ft.draw()})},_onHideClick:function(e){e.preventDefault();var t=e.data.self;t.ft.raise("hide.ft.editing").then(function(){t.ft.$el.removeClass("footable-editing-show"),t.column.visible=!1,t.ft.draw()})}}),t.components.register("editing",t.Editing,850)}(jQuery,FooTable),function(e,t){t.EditingColumn=t.Column.extend({construct:function(e,t,n){this._super(e,n,"editing"),this.editing=t,this.internal=!0},$create:function(){(this.$el=!this.virtual&&t.is.jq(this.$el)?this.$el:e("<th/>",{class:"footable-editing"})).html(this.title)},parser:function(n){if(t.is.string(n)&&(n=e(e.trim(n))),t.is.element(n)&&(n=e(n)),t.is.jq(n)){var i=n.prop("tagName").toLowerCase();return"td"==i||"th"==i?n.data("value")||n.contents():n}return null},createCell:function(n){var i=this.editing.$rowButtons(),o=e("<td/>").append(i);return t.is.jq(n.$el)&&(0===this.index?o.prependTo(n.$el):o.insertAfter(n.$el.children().eq(this.index-1))),new t.Cell(this.ft,n,this,o||o.html())}}),t.columns.register("editing",t.EditingColumn)}(jQuery,FooTable),function(e,t){t.Defaults.prototype.editing={enabled:!1,pageToNew:!0,position:"right",alwaysShow:!1,addRow:function(){},editRow:function(e){},deleteRow:function(e){},viewRow:function(e){},showText:'<span class="fooicon fooicon-pencil" aria-hidden="true"></span> Edit rows',hideText:"Cancel",addText:"New row",editText:'<span class="fooicon fooicon-pencil" aria-hidden="true"></span>',deleteText:'<span class="fooicon fooicon-trash" aria-hidden="true"></span>',viewText:'<span class="fooicon fooicon-stats" aria-hidden="true"></span>',allowAdd:!0,allowEdit:!0,allowDelete:!0,allowView:!1,column:{classes:"footable-editing",name:"editing",title:"",filterable:!1,sortable:!1}}}(jQuery,FooTable),function(e,t){t.is.defined(t.Paging)&&(t.Paging.prototype.unpaged=[],t.Paging.extend("predraw",function(){this.unpaged=this.ft.rows.array.slice(0),this._super()}))}(jQuery,FooTable),function(e,t){t.Row.prototype.add=function(n){n=!t.is.boolean(n)||n;var i=this;return e.Deferred(function(e){var t=i.ft.rows.all.push(i)-1;return n?i.ft.draw().then(function(){e.resolve(t)}):void e.resolve(t)})},t.Row.prototype.delete=function(n){n=!t.is.boolean(n)||n;var i=this;return e.Deferred(function(e){var o=i.ft.rows.all.indexOf(i);return t.is.number(o)&&o>=0&&o<i.ft.rows.all.length&&(i.ft.rows.all.splice(o,1),n)?i.ft.draw().then(function(){e.resolve(i)}):void e.resolve(i)})},t.is.defined(t.Paging)&&t.Row.extend("add",function(e){e=!t.is.boolean(e)||e;var n,i=this,o=this._super(e),r=i.ft.use(t.Editing);return r&&r.pageToNew&&(n=i.ft.use(t.Paging))&&e?o.then(function(){var e=n.unpaged.indexOf(i),t=Math.ceil((e+1)/n.size);return n.current!==t?n.goto(t):void 0}):o}),t.is.defined(t.Sorting)&&t.Row.extend("val",function(e,n){n=!t.is.boolean(n)||n;var i=this._super(e);if(!t.is.hash(e))return i;var o=this;return n&&o.ft.draw().then(function(){var e,n=o.ft.use(t.Editing);if(t.is.defined(t.Paging)&&n&&n.pageToNew&&(e=o.ft.use(t.Paging))){var i=e.unpaged.indexOf(o),r=Math.ceil((i+1)/e.size);if(e.current!==r)return e.goto(r)}}),i})}(jQuery,FooTable),function(e){e.Rows.prototype.add=function(t,n){var i=t;e.is.hash(t)&&(i=new FooTable.Row(this.ft,this.ft.columns.array,t)),i instanceof FooTable.Row&&i.add(n)},e.Rows.prototype.update=function(t,n,i){var o=this.ft.rows.all.length,r=t;e.is.number(t)&&t>=0&&o>t&&(r=this.ft.rows.all[t]),r instanceof FooTable.Row&&e.is.hash(n)&&r.val(n,i)},e.Rows.prototype.delete=function(t,n){var i=this.ft.rows.all.length,o=t;e.is.number(t)&&t>=0&&i>t&&(o=this.ft.rows.all[t]),o instanceof FooTable.Row&&o.delete(n)}}(FooTable),function(e,t){var n=0,i=function(e){var t,n,i=2166136261;for(t=0,n=e.length;n>t;t++)i^=e.charCodeAt(t),i+=(i<<1)+(i<<4)+(i<<7)+(i<<8)+(i<<24);return i>>>0}(location.origin+location.pathname);t.State=t.Component.extend({construct:function(e){this._super(e,e.o.state.enabled),this._key="1",this.key=this._key+(t.is.string(e.o.state.key)?e.o.state.key:this._uid()),this.filtering=!t.is.boolean(e.o.state.filtering)||e.o.state.filtering,this.paging=!t.is.boolean(e.o.state.paging)||e.o.state.paging,this.sorting=!t.is.boolean(e.o.state.sorting)||e.o.state.sorting},preinit:function(e){var n=this;this.ft.raise("preinit.ft.state",[e]).then(function(){n.enabled=t.is.boolean(e.state)?e.state:n.enabled,n.enabled&&(n.key=n._key+(t.is.string(e.stateKey)?e.stateKey:n.key),n.filtering=t.is.boolean(e.stateFiltering)?e.stateFiltering:n.filtering,n.paging=t.is.boolean(e.statePaging)?e.statePaging:n.paging,n.sorting=t.is.boolean(e.stateSorting)?e.stateSorting:n.sorting)},function(){n.enabled=!1})},get:function(e){return JSON.parse(localStorage.getItem(this.key+":"+e))},set:function(e,t){localStorage.setItem(this.key+":"+e,JSON.stringify(t))},remove:function(e){localStorage.removeItem(this.key+":"+e)},read:function(){this.ft.execute(!1,!0,"readState")},write:function(){this.ft.execute(!1,!0,"writeState")},clear:function(){this.ft.execute(!1,!0,"clearState")},_uid:function(){var e=this.ft.$el.attr("id");return i+"_"+(t.is.string(e)?e:++n)}}),t.components.register("state",t.State,700)}(jQuery,FooTable),function(e){e.Component.prototype.readState=function(){},e.Component.prototype.writeState=function(){},e.Component.prototype.clearState=function(){}}(FooTable),function(e){e.Defaults.prototype.state={enabled:!1,filtering:!0,paging:!0,sorting:!0,key:null}}(FooTable),function(e){
e.Filtering&&(e.Filtering.prototype.readState=function(){if(this.ft.state.filtering){var t=this.ft.state.get("filtering");e.is.hash(t)&&!e.is.emptyArray(t.filters)&&(this.filters=this.ensure(t.filters))}},e.Filtering.prototype.writeState=function(){if(this.ft.state.filtering){var t=e.arr.map(this.filters,function(t){return{name:t.name,query:t.query instanceof e.Query?t.query.val():t.query,columns:e.arr.map(t.columns,function(e){return e.name}),hidden:t.hidden,space:t.space,connectors:t.connectors,ignoreCase:t.ignoreCase}});this.ft.state.set("filtering",{filters:t})}},e.Filtering.prototype.clearState=function(){this.ft.state.filtering&&this.ft.state.remove("filtering")})}(FooTable),function(e){e.Paging&&(e.Paging.prototype.readState=function(){if(this.ft.state.paging){var t=this.ft.state.get("paging");e.is.hash(t)&&(this.current=t.current,this.size=t.size)}},e.Paging.prototype.writeState=function(){this.ft.state.paging&&this.ft.state.set("paging",{current:this.current,size:this.size})},e.Paging.prototype.clearState=function(){this.ft.state.paging&&this.ft.state.remove("paging")})}(FooTable),function(e){e.Sorting&&(e.Sorting.prototype.readState=function(){if(this.ft.state.sorting){var t=this.ft.state.get("sorting");if(e.is.hash(t)){var n=this.ft.columns.get(t.column);n instanceof e.Column&&(this.column=n,this.column.direction=t.direction)}}},e.Sorting.prototype.writeState=function(){this.ft.state.sorting&&this.column instanceof e.Column&&this.ft.state.set("sorting",{column:this.column.name,direction:this.column.direction})},e.Sorting.prototype.clearState=function(){this.ft.state.sorting&&this.ft.state.remove("sorting")})}(FooTable),function(e){e.Table.extend("_construct",function(e){return this.state=this.use(FooTable.State),this._super(e)}),e.Table.extend("_preinit",function(){var e=this;return e._super().then(function(){e.state.enabled&&e.state.read()})}),e.Table.extend("draw",function(){var e=this;return e._super().then(function(){e.state.enabled&&e.state.write()})})}(FooTable),function(e,t){t.Export=t.Component.extend({construct:function(e){this._super(e,!0),this.snapshot=[]},predraw:function(){this.snapshot=this.ft.rows.array.slice(0)},columns:function(){var e=[];return t.arr.each(this.ft.columns.array,function(t){t.internal||e.push({type:t.type,name:t.name,title:t.title,visible:t.visible,hidden:t.hidden,classes:t.classes,style:t.style})}),e},rows:function(e){e=!!t.is.boolean(e)&&e;var n=e?this.ft.rows.all:this.snapshot,i=[];return t.arr.each(n,function(e){i.push(e.val())}),i},json:function(e){return JSON.parse(JSON.stringify({columns:this.columns(),rows:this.rows(e)}))},csv:function(e){var n,i,o="",r=this.columns();t.arr.each(r,function(e,t){i='"'+e.title.replace(/"/g,'""')+'"',o+=0===t?i:","+i}),o+="\n";var s=e?this.ft.rows.all:this.snapshot;return t.arr.each(s,function(e){t.arr.each(e.cells,function(e,t){e.column.internal||(n=e.column.stringify.call(e.column,e.value,e.ft.o,e.row.value),i='"'+n.replace(/"/g,'""')+'"',o+=0===t?i:","+i)}),o+="\n"}),o}}),t.components.register("export",t.Export,490)}(jQuery,FooTable),function(e){e.Column.prototype.__export_define__=function(t){this.stringify=e.checkFnValue(this,t.stringify,this.stringify)},e.Column.extend("define",function(e){this._super(e),this.__export_define__(e)}),e.Column.prototype.stringify=function(e,t,n){return e+""},e.DateColumn.prototype.stringify=function(t,n,i){return e.is.object(t)&&e.is.boolean(t._isAMomentObject)&&t.isValid()?t.format(this.formatString):""},e.ObjectColumn.prototype.stringify=function(t,n,i){return e.is.object(t)?JSON.stringify(t):""},e.ArrayColumn.prototype.stringify=function(t,n,i){return e.is.array(t)?JSON.stringify(t):""}}(FooTable),function(e){e.Table.prototype.toJSON=function(t){return this.use(e.Export).json(t)},e.Table.prototype.toCSV=function(t){return this.use(e.Export).csv(t)}}(FooTable),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){function t(t){var n=!1;return e('[data-notify="container"]').each(function(i,o){var r=e(o),s=r.find('[data-notify="title"]').text().trim(),a=r.find('[data-notify="message"]').html().trim(),l=s===e("<div>"+t.settings.content.title+"</div>").html().trim(),c=a===e("<div>"+t.settings.content.message+"</div>").html().trim(),u=r.hasClass("alert-"+t.settings.type);return l&&c&&u&&(n=!0),!n}),n}function n(n,o,r){var s={content:{message:"object"==typeof o?o.message:o,title:o.title?o.title:"",icon:o.icon?o.icon:"",url:o.url?o.url:"#",target:o.target?o.target:"-"}};r=e.extend(!0,{},s,r),this.settings=e.extend(!0,{},i,r),this._defaults=i,"-"===this.settings.content.target&&(this.settings.content.target=this.settings.url_target),this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"},"number"==typeof this.settings.offset&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset}),(this.settings.allow_duplicates||!this.settings.allow_duplicates&&!t(this))&&this.init()}var i={element:"body",position:null,type:"info",allow_dismiss:!0,allow_duplicates:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:"class",template:'<div data-notify="container" class="col-xs-11 col-sm-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">&times;</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'};String.format=function(){for(var e=arguments[0],t=1;t<arguments.length;t++)e=e.replace(RegExp("\\{"+(t-1)+"\\}","gm"),arguments[t]);return e},e.extend(n.prototype,{init:function(){var e=this;this.buildNotify(),this.settings.content.icon&&this.setIcon(),"#"!=this.settings.content.url&&this.styleURL(),this.styleDismiss(),this.placement(),this.bind(),this.notify={$ele:this.$ele,update:function(t,n){var i={};for(var o in"string"==typeof t?i[t]=n:i=t,i)switch(o){case"type":this.$ele.removeClass("alert-"+e.settings.type),this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass("progress-bar-"+e.settings.type),e.settings.type=i[o],this.$ele.addClass("alert-"+i[o]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+i[o]);break;case"icon":var r=this.$ele.find('[data-notify="icon"]');"class"===e.settings.icon_type.toLowerCase()?r.removeClass(e.settings.content.icon).addClass(i[o]):(r.is("img")||r.find("img"),r.attr("src",i[o]));break;case"progress":var s=e.settings.delay-e.settings.delay*(i[o]/100);this.$ele.data("notify-delay",s),this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",i[o]).css("width",i[o]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",i[o]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",i[o]);break;default:this.$ele.find('[data-notify="'+o+'"]').html(i[o])}var a=this.$ele.outerHeight()+parseInt(e.settings.spacing)+parseInt(e.settings.offset.y);e.reposition(a)},close:function(){e.close()}}},buildNotify:function(){var t=this.settings.content;this.$ele=e(String.format(this.settings.template,this.settings.type,t.title,t.message,t.url,t.target)),this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align),this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none"),(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){"class"===this.settings.icon_type.toLowerCase()?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('<img src="'+this.settings.content.icon+'" alt="Notify Icon" />')},styleDismiss:function(){this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:this.settings.z_index+1})},placement:function(){var t=this,n=this.settings.offset.y,i={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:"body"===this.settings.element?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},o=!1,r=this.settings;switch(e('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){n=Math.max(n,parseInt(e(this).css(r.placement.from))+parseInt(e(this).outerHeight())+parseInt(r.spacing))}),!0===this.settings.newest_on_top&&(n=this.settings.offset.y),i[this.settings.placement.from]=n+"px",this.settings.placement.align){case"left":case"right":i[this.settings.placement.align]=this.settings.offset.x+"px";break;case"center":i.left=0,i.right=0}this.$ele.css(i).addClass(this.settings.animate.enter),e.each(Array("webkit-","moz-","o-","ms-",""),function(e,n){t.$ele[0].style[n+"AnimationIterationCount"]=1}),e(this.settings.element).append(this.$ele),!0===this.settings.newest_on_top&&(n=parseInt(n)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(n)),e.isFunction(t.settings.onShow)&&t.settings.onShow.call(this.$ele),this.$ele.one(this.animations.start,function(){o=!0}).one(this.animations.end,function(){t.$ele.removeClass(t.settings.animate.enter),e.isFunction(t.settings.onShown)&&t.settings.onShown.call(this)}),setTimeout(function(){o||e.isFunction(t.settings.onShown)&&t.settings.onShown.call(this)},600)},bind:function(){var t=this;if(this.$ele.find('[data-notify="dismiss"]').on("click",function(){t.close()}),this.$ele.mouseover(function(){e(this).data("data-hover","true")}).mouseout(function(){e(this).data("data-hover","false")}),this.$ele.data("data-hover","false"),this.settings.delay>0){t.$ele.data("notify-delay",t.settings.delay);var n=setInterval(function(){var e=parseInt(t.$ele.data("notify-delay"))-t.settings.timer;if("false"===t.$ele.data("data-hover")&&"pause"===t.settings.mouse_over||"pause"!=t.settings.mouse_over){var i=(t.settings.delay-e)/t.settings.delay*100;t.$ele.data("notify-delay",e),t.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",i).css("width",i+"%")}e<=-t.settings.timer&&(clearInterval(n),t.close())},t.settings.timer)}},close:function(){var t=this,n=parseInt(this.$ele.css(this.settings.placement.from)),i=!1;this.$ele.attr("data-closing","true").addClass(this.settings.animate.exit),t.reposition(n),e.isFunction(t.settings.onClose)&&t.settings.onClose.call(this.$ele),this.$ele.one(this.animations.start,function(){i=!0}).one(this.animations.end,function(){e(this).remove(),e.isFunction(t.settings.onClosed)&&t.settings.onClosed.call(this)}),setTimeout(function(){i||(t.$ele.remove(),t.settings.onClosed&&t.settings.onClosed(t.$ele))},600)},reposition:function(t){var n=this,i='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',o=this.$ele.nextAll(i);!0===this.settings.newest_on_top&&(o=this.$ele.prevAll(i)),o.each(function(){e(this).css(n.settings.placement.from,t),t=parseInt(t)+parseInt(n.settings.spacing)+e(this).outerHeight()})}}),e.notify=function(e,t){var i=new n(this,e,t);return i.notify},e.notifyDefaults=function(t){return i=e.extend(!0,{},i,t)},e.notifyClose=function(t){"warning"===t&&(t="danger"),void 0===t||"all"===t?e("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):"success"===t||"info"===t||"warning"===t||"danger"===t?e(".alert-"+t+"[data-notify]").find('[data-notify="dismiss"]').trigger("click"):t?e(t+"[data-notify]").find('[data-notify="dismiss"]').trigger("click"):e('[data-notify-position="'+t+'"]').find('[data-notify="dismiss"]').trigger("click")},e.notifyCloseExcept=function(t){"warning"===t&&(t="danger"),"success"===t||"info"===t||"warning"===t||"danger"===t?e("[data-notify]").not(".alert-"+t).find('[data-notify="dismiss"]').trigger("click"):e("[data-notify]").not(t).find('[data-notify="dismiss"]').trigger("click")}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var t=window.Slick||{};t=function(){function t(t,i){var o,r=this;r.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:e(t),appendDots:e(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(t,n){return e('<button type="button" />').text(n+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},r.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},e.extend(r,r.initials),r.activeBreakpoint=null,r.animType=null,r.animProp=null,r.breakpoints=[],r.breakpointSettings=[],r.cssTransitions=!1,r.focussed=!1,r.interrupted=!1,r.hidden="hidden",r.paused=!0,r.positionProp=null,r.respondTo=null,r.rowCount=1,r.shouldClick=!0,r.$slider=e(t),r.$slidesCache=null,r.transformType=null,r.transitionType=null,r.visibilityChange="visibilitychange",r.windowWidth=0,r.windowTimer=null,o=e(t).data("slick")||{},r.options=e.extend({},r.defaults,i,o),r.currentSlide=r.options.initialSlide,r.originalSettings=r.options,void 0!==document.mozHidden?(r.hidden="mozHidden",r.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(r.hidden="webkitHidden",r.visibilityChange="webkitvisibilitychange"),r.autoPlay=e.proxy(r.autoPlay,r),r.autoPlayClear=e.proxy(r.autoPlayClear,r),r.autoPlayIterator=e.proxy(r.autoPlayIterator,r),r.changeSlide=e.proxy(r.changeSlide,r),r.clickHandler=e.proxy(r.clickHandler,r),r.selectHandler=e.proxy(r.selectHandler,r),r.setPosition=e.proxy(r.setPosition,r),r.swipeHandler=e.proxy(r.swipeHandler,r),r.dragHandler=e.proxy(r.dragHandler,r),r.keyHandler=e.proxy(r.keyHandler,r),r.instanceUid=n++,r.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,r.registerBreakpoints(),r.init(!0)}var n=0;return t}(),t.prototype.activateADA=function(){var e=this;e.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},t.prototype.addSlide=t.prototype.slickAdd=function(t,n,i){var o=this;if("boolean"==typeof n)i=n,n=null;else if(n<0||n>=o.slideCount)return!1;o.unload(),"number"==typeof n?0===n&&0===o.$slides.length?e(t).appendTo(o.$slideTrack):i?e(t).insertBefore(o.$slides.eq(n)):e(t).insertAfter(o.$slides.eq(n)):!0===i?e(t).prependTo(o.$slideTrack):e(t).appendTo(o.$slideTrack),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slides.each(function(t,n){e(n).attr("data-slick-index",t)}),o.$slidesCache=o.$slides,o.reinit()},t.prototype.animateHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.animate({height:t},e.options.speed)}},t.prototype.animateSlide=function(t,n){var i={},o=this;o.animateHeight(),!0===o.options.rtl&&!1===o.options.vertical&&(t=-t),!1===o.transformsEnabled?!1===o.options.vertical?o.$slideTrack.animate({left:t},o.options.speed,o.options.easing,n):o.$slideTrack.animate({top:t},o.options.speed,o.options.easing,n):!1===o.cssTransitions?(!0===o.options.rtl&&(o.currentLeft=-o.currentLeft),e({animStart:o.currentLeft}).animate({animStart:t},{duration:o.options.speed,easing:o.options.easing,step:function(e){e=Math.ceil(e),!1===o.options.vertical?(i[o.animType]="translate("+e+"px, 0px)",o.$slideTrack.css(i)):(i[o.animType]="translate(0px,"+e+"px)",o.$slideTrack.css(i))},complete:function(){n&&n.call()}})):(o.applyTransition(),t=Math.ceil(t),!1===o.options.vertical?i[o.animType]="translate3d("+t+"px, 0px, 0px)":i[o.animType]="translate3d(0px,"+t+"px, 0px)",o.$slideTrack.css(i),n&&setTimeout(function(){o.disableTransition(),n.call()},o.options.speed))},t.prototype.getNavTarget=function(){var t=this,n=t.options.asNavFor;return n&&null!==n&&(n=e(n).not(t.$slider)),n},t.prototype.asNavFor=function(t){var n=this,i=n.getNavTarget();null!==i&&"object"==typeof i&&i.each(function(){var n=e(this).slick("getSlick");n.unslicked||n.slideHandler(t,!0)})},t.prototype.applyTransition=function(e){var t=this,n={};!1===t.options.fade?n[t.transitionType]=t.transformType+" "+t.options.speed+"ms "+t.options.cssEase:n[t.transitionType]="opacity "+t.options.speed+"ms "+t.options.cssEase,!1===t.options.fade?t.$slideTrack.css(n):t.$slides.eq(e).css(n)},t.prototype.autoPlay=function(){var e=this;e.autoPlayClear(),e.slideCount>e.options.slidesToShow&&(e.autoPlayTimer=setInterval(e.autoPlayIterator,e.options.autoplaySpeed))},t.prototype.autoPlayClear=function(){var e=this;e.autoPlayTimer&&clearInterval(e.autoPlayTimer)},t.prototype.autoPlayIterator=function(){var e=this,t=e.currentSlide+e.options.slidesToScroll;e.paused||e.interrupted||e.focussed||(!1===e.options.infinite&&(1===e.direction&&e.currentSlide+1===e.slideCount-1?e.direction=0:0===e.direction&&(t=e.currentSlide-e.options.slidesToScroll,e.currentSlide-1==0&&(e.direction=1))),e.slideHandler(t))},t.prototype.buildArrows=function(){var t=this;!0===t.options.arrows&&(t.$prevArrow=e(t.options.prevArrow).addClass("slick-arrow"),t.$nextArrow=e(t.options.nextArrow).addClass("slick-arrow"),t.slideCount>t.options.slidesToShow?(t.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.prependTo(t.options.appendArrows),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.appendTo(t.options.appendArrows),!0!==t.options.infinite&&t.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):t.$prevArrow.add(t.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},t.prototype.buildDots=function(){var t,n,i=this;if(!0===i.options.dots&&i.slideCount>i.options.slidesToShow){for(i.$slider.addClass("slick-dotted"),n=e("<ul />").addClass(i.options.dotsClass),t=0;t<=i.getDotCount();t+=1)n.append(e("<li />").append(i.options.customPaging.call(this,i,t)));i.$dots=n.appendTo(i.options.appendDots),i.$dots.find("li").first().addClass("slick-active")}},t.prototype.buildOut=function(){var t=this;t.$slides=t.$slider.children(t.options.slide+":not(.slick-cloned)").addClass("slick-slide"),t.slideCount=t.$slides.length,t.$slides.each(function(t,n){e(n).attr("data-slick-index",t).data("originalStyling",e(n).attr("style")||"")}),t.$slider.addClass("slick-slider"),t.$slideTrack=0===t.slideCount?e('<div class="slick-track"/>').appendTo(t.$slider):t.$slides.wrapAll('<div class="slick-track"/>').parent(),t.$list=t.$slideTrack.wrap('<div class="slick-list"/>').parent(),t.$slideTrack.css("opacity",0),!0!==t.options.centerMode&&!0!==t.options.swipeToSlide||(t.options.slidesToScroll=1),e("img[data-lazy]",t.$slider).not("[src]").addClass("slick-loading"),t.setupInfinite(),t.buildArrows(),t.buildDots(),t.updateDots(),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),!0===t.options.draggable&&t.$list.addClass("draggable")},t.prototype.buildRows=function(){var e,t,n,i,o,r,s,a=this;if(i=document.createDocumentFragment(),r=a.$slider.children(),a.options.rows>0){for(s=a.options.slidesPerRow*a.options.rows,o=Math.ceil(r.length/s),e=0;e<o;e++){var l=document.createElement("div");for(t=0;t<a.options.rows;t++){var c=document.createElement("div");for(n=0;n<a.options.slidesPerRow;n++){var u=e*s+(t*a.options.slidesPerRow+n);r.get(u)&&c.appendChild(r.get(u))}l.appendChild(c)}i.appendChild(l)}a.$slider.empty().append(i),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},t.prototype.checkResponsive=function(t,n){var i,o,r,s=this,a=!1,l=s.$slider.width(),c=window.innerWidth||e(window).width();if("window"===s.respondTo?r=c:"slider"===s.respondTo?r=l:"min"===s.respondTo&&(r=Math.min(c,l)),s.options.responsive&&s.options.responsive.length&&null!==s.options.responsive){for(i in o=null,s.breakpoints)s.breakpoints.hasOwnProperty(i)&&(!1===s.originalSettings.mobileFirst?r<s.breakpoints[i]&&(o=s.breakpoints[i]):r>s.breakpoints[i]&&(o=s.breakpoints[i]));null!==o?null!==s.activeBreakpoint?(o!==s.activeBreakpoint||n)&&(s.activeBreakpoint=o,"unslick"===s.breakpointSettings[o]?s.unslick(o):(s.options=e.extend({},s.originalSettings,s.breakpointSettings[o]),!0===t&&(s.currentSlide=s.options.initialSlide),s.refresh(t)),a=o):(s.activeBreakpoint=o,"unslick"===s.breakpointSettings[o]?s.unslick(o):(s.options=e.extend({},s.originalSettings,s.breakpointSettings[o]),!0===t&&(s.currentSlide=s.options.initialSlide),s.refresh(t)),a=o):null!==s.activeBreakpoint&&(s.activeBreakpoint=null,s.options=s.originalSettings,!0===t&&(s.currentSlide=s.options.initialSlide),s.refresh(t),a=o),t||!1===a||s.$slider.trigger("breakpoint",[s,a])}},t.prototype.changeSlide=function(t,n){var i,o,r,s=this,a=e(t.currentTarget);switch(a.is("a")&&t.preventDefault(),a.is("li")||(a=a.closest("li")),r=s.slideCount%s.options.slidesToScroll!=0,i=r?0:(s.slideCount-s.currentSlide)%s.options.slidesToScroll,t.data.message){case"previous":o=0===i?s.options.slidesToScroll:s.options.slidesToShow-i,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide-o,!1,n);break;case"next":o=0===i?s.options.slidesToScroll:i,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide+o,!1,n);break;case"index":var l=0===t.data.index?0:t.data.index||a.index()*s.options.slidesToScroll;s.slideHandler(s.checkNavigable(l),!1,n),a.children().trigger("focus");break;default:return}},t.prototype.checkNavigable=function(e){var t,n,i=this;if(t=i.getNavigableIndexes(),n=0,e>t[t.length-1])e=t[t.length-1];else for(var o in t){if(e<t[o]){e=n;break}n=t[o]}return e},t.prototype.cleanUpEvents=function(){var t=this;t.options.dots&&null!==t.$dots&&(e("li",t.$dots).off("click.slick",t.changeSlide).off("mouseenter.slick",e.proxy(t.interrupt,t,!0)).off("mouseleave.slick",e.proxy(t.interrupt,t,!1)),!0===t.options.accessibility&&t.$dots.off("keydown.slick",t.keyHandler)),t.$slider.off("focus.slick blur.slick"),!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow&&t.$prevArrow.off("click.slick",t.changeSlide),t.$nextArrow&&t.$nextArrow.off("click.slick",t.changeSlide),!0===t.options.accessibility&&(t.$prevArrow&&t.$prevArrow.off("keydown.slick",t.keyHandler),t.$nextArrow&&t.$nextArrow.off("keydown.slick",t.keyHandler))),t.$list.off("touchstart.slick mousedown.slick",t.swipeHandler),t.$list.off("touchmove.slick mousemove.slick",t.swipeHandler),t.$list.off("touchend.slick mouseup.slick",t.swipeHandler),t.$list.off("touchcancel.slick mouseleave.slick",t.swipeHandler),t.$list.off("click.slick",t.clickHandler),e(document).off(t.visibilityChange,t.visibility),t.cleanUpSlideEvents(),!0===t.options.accessibility&&t.$list.off("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().off("click.slick",t.selectHandler),e(window).off("orientationchange.slick.slick-"+t.instanceUid,t.orientationChange),e(window).off("resize.slick.slick-"+t.instanceUid,t.resize),e("[draggable!=true]",t.$slideTrack).off("dragstart",t.preventDefault),e(window).off("load.slick.slick-"+t.instanceUid,t.setPosition)},t.prototype.cleanUpSlideEvents=function(){var t=this;t.$list.off("mouseenter.slick",e.proxy(t.interrupt,t,!0)),t.$list.off("mouseleave.slick",e.proxy(t.interrupt,t,!1))},t.prototype.cleanUpRows=function(){var e,t=this;t.options.rows>0&&(e=t.$slides.children().children(),e.removeAttr("style"),t.$slider.empty().append(e))},t.prototype.clickHandler=function(e){var t=this;!1===t.shouldClick&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())},t.prototype.destroy=function(t){var n=this;n.autoPlayClear(),n.touchObject={},n.cleanUpEvents(),e(".slick-cloned",n.$slider).detach(),n.$dots&&n.$dots.remove(),n.$prevArrow&&n.$prevArrow.length&&(n.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),n.htmlExpr.test(n.options.prevArrow)&&n.$prevArrow.remove()),n.$nextArrow&&n.$nextArrow.length&&(n.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),n.htmlExpr.test(n.options.nextArrow)&&n.$nextArrow.remove()),n.$slides&&(n.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){e(this).attr("style",e(this).data("originalStyling"))}),n.$slideTrack.children(this.options.slide).detach(),n.$slideTrack.detach(),n.$list.detach(),n.$slider.append(n.$slides)),n.cleanUpRows(),n.$slider.removeClass("slick-slider"),n.$slider.removeClass("slick-initialized"),n.$slider.removeClass("slick-dotted"),n.unslicked=!0,t||n.$slider.trigger("destroy",[n])},t.prototype.disableTransition=function(e){var t=this,n={};n[t.transitionType]="",!1===t.options.fade?t.$slideTrack.css(n):t.$slides.eq(e).css(n)},t.prototype.fadeSlide=function(e,t){var n=this;!1===n.cssTransitions?(n.$slides.eq(e).css({zIndex:n.options.zIndex}),n.$slides.eq(e).animate({opacity:1},n.options.speed,n.options.easing,t)):(n.applyTransition(e),n.$slides.eq(e).css({opacity:1,zIndex:n.options.zIndex}),t&&setTimeout(function(){n.disableTransition(e),t.call()},n.options.speed))},t.prototype.fadeSlideOut=function(e){var t=this;!1===t.cssTransitions?t.$slides.eq(e).animate({opacity:0,zIndex:t.options.zIndex-2},t.options.speed,t.options.easing):(t.applyTransition(e),t.$slides.eq(e).css({opacity:0,zIndex:t.options.zIndex-2}))},t.prototype.filterSlides=t.prototype.slickFilter=function(e){var t=this;null!==e&&(t.$slidesCache=t.$slides,t.unload(),t.$slideTrack.children(this.options.slide).detach(),t.$slidesCache.filter(e).appendTo(t.$slideTrack),t.reinit())},t.prototype.focusHandler=function(){var t=this;t.$slider.off("focus.slick blur.slick").on("focus.slick","*",function(n){var i=e(this);setTimeout(function(){t.options.pauseOnFocus&&i.is(":focus")&&(t.focussed=!0,t.autoPlay())},0)}).on("blur.slick","*",function(n){e(this),t.options.pauseOnFocus&&(t.focussed=!1,t.autoPlay())})},t.prototype.getCurrent=t.prototype.slickCurrentSlide=function(){var e=this;return e.currentSlide},t.prototype.getDotCount=function(){var e=this,t=0,n=0,i=0;if(!0===e.options.infinite)if(e.slideCount<=e.options.slidesToShow)++i;else for(;t<e.slideCount;)++i,t=n+e.options.slidesToScroll,n+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;else if(!0===e.options.centerMode)i=e.slideCount;else if(e.options.asNavFor)for(;t<e.slideCount;)++i,t=n+e.options.slidesToScroll,n+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;else i=1+Math.ceil((e.slideCount-e.options.slidesToShow)/e.options.slidesToScroll);return i-1},t.prototype.getLeft=function(e){var t,n,i,o,r=this,s=0;return r.slideOffset=0,n=r.$slides.first().outerHeight(!0),!0===r.options.infinite?(r.slideCount>r.options.slidesToShow&&(r.slideOffset=r.slideWidth*r.options.slidesToShow*-1,o=-1,!0===r.options.vertical&&!0===r.options.centerMode&&(2===r.options.slidesToShow?o=-1.5:1===r.options.slidesToShow&&(o=-2)),s=n*r.options.slidesToShow*o),r.slideCount%r.options.slidesToScroll!=0&&e+r.options.slidesToScroll>r.slideCount&&r.slideCount>r.options.slidesToShow&&(e>r.slideCount?(r.slideOffset=(r.options.slidesToShow-(e-r.slideCount))*r.slideWidth*-1,s=(r.options.slidesToShow-(e-r.slideCount))*n*-1):(r.slideOffset=r.slideCount%r.options.slidesToScroll*r.slideWidth*-1,s=r.slideCount%r.options.slidesToScroll*n*-1))):e+r.options.slidesToShow>r.slideCount&&(r.slideOffset=(e+r.options.slidesToShow-r.slideCount)*r.slideWidth,s=(e+r.options.slidesToShow-r.slideCount)*n),r.slideCount<=r.options.slidesToShow&&(r.slideOffset=0,s=0),!0===r.options.centerMode&&r.slideCount<=r.options.slidesToShow?r.slideOffset=r.slideWidth*Math.floor(r.options.slidesToShow)/2-r.slideWidth*r.slideCount/2:!0===r.options.centerMode&&!0===r.options.infinite?r.slideOffset+=r.slideWidth*Math.floor(r.options.slidesToShow/2)-r.slideWidth:!0===r.options.centerMode&&(r.slideOffset=0,r.slideOffset+=r.slideWidth*Math.floor(r.options.slidesToShow/2)),t=!1===r.options.vertical?e*r.slideWidth*-1+r.slideOffset:e*n*-1+s,!0===r.options.variableWidth&&(i=r.slideCount<=r.options.slidesToShow||!1===r.options.infinite?r.$slideTrack.children(".slick-slide").eq(e):r.$slideTrack.children(".slick-slide").eq(e+r.options.slidesToShow),t=!0===r.options.rtl?i[0]?-1*(r.$slideTrack.width()-i[0].offsetLeft-i.width()):0:i[0]?-1*i[0].offsetLeft:0,!0===r.options.centerMode&&(i=r.slideCount<=r.options.slidesToShow||!1===r.options.infinite?r.$slideTrack.children(".slick-slide").eq(e):r.$slideTrack.children(".slick-slide").eq(e+r.options.slidesToShow+1),t=!0===r.options.rtl?i[0]?-1*(r.$slideTrack.width()-i[0].offsetLeft-i.width()):0:i[0]?-1*i[0].offsetLeft:0,t+=(r.$list.width()-i.outerWidth())/2)),t},t.prototype.getOption=t.prototype.slickGetOption=function(e){var t=this;return t.options[e]},t.prototype.getNavigableIndexes=function(){var e,t=this,n=0,i=0,o=[];for(!1===t.options.infinite?e=t.slideCount:(n=-1*t.options.slidesToScroll,i=-1*t.options.slidesToScroll,e=2*t.slideCount);n<e;)o.push(n),n=i+t.options.slidesToScroll,i+=t.options.slidesToScroll<=t.options.slidesToShow?t.options.slidesToScroll:t.options.slidesToShow;return o},t.prototype.getSlick=function(){return this},t.prototype.getSlideCount=function(){var t,n,i,o=this;return i=!0===o.options.centerMode?Math.floor(o.$list.width()/2):0,n=-1*o.swipeLeft+i,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(i,r){var s,a,l;if(s=e(r).outerWidth(),a=r.offsetLeft,!0!==o.options.centerMode&&(a+=s/2),l=a+s,n<l)return t=r,!1}),Math.abs(e(t).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},t.prototype.goTo=t.prototype.slickGoTo=function(e,t){var n=this;n.changeSlide({data:{message:"index",index:parseInt(e)}},t)},t.prototype.init=function(t){var n=this;e(n.$slider).hasClass("slick-initialized")||(e(n.$slider).addClass("slick-initialized"),n.buildRows(),n.buildOut(),n.setProps(),n.startLoad(),n.loadSlider(),n.initializeEvents(),n.updateArrows(),n.updateDots(),
n.checkResponsive(!0),n.focusHandler()),t&&n.$slider.trigger("init",[n]),!0===n.options.accessibility&&n.initADA(),n.options.autoplay&&(n.paused=!1,n.autoPlay())},t.prototype.initADA=function(){var t=this,n=Math.ceil(t.slideCount/t.options.slidesToShow),i=t.getNavigableIndexes().filter(function(e){return e>=0&&e<t.slideCount});t.$slides.add(t.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==t.$dots&&(t.$slides.not(t.$slideTrack.find(".slick-cloned")).each(function(n){var o=i.indexOf(n);if(e(this).attr({role:"tabpanel",id:"slick-slide"+t.instanceUid+n,tabindex:-1}),-1!==o){var r="slick-slide-control"+t.instanceUid+o;e("#"+r).length&&e(this).attr({"aria-describedby":r})}}),t.$dots.attr("role","tablist").find("li").each(function(o){var r=i[o];e(this).attr({role:"presentation"}),e(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+t.instanceUid+o,"aria-controls":"slick-slide"+t.instanceUid+r,"aria-label":o+1+" of "+n,"aria-selected":null,tabindex:"-1"})}).eq(t.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var o=t.currentSlide,r=o+t.options.slidesToShow;o<r;o++)t.options.focusOnChange?t.$slides.eq(o).attr({tabindex:"0"}):t.$slides.eq(o).removeAttr("tabindex");t.activateADA()},t.prototype.initArrowEvents=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},e.changeSlide),e.$nextArrow.off("click.slick").on("click.slick",{message:"next"},e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow.on("keydown.slick",e.keyHandler),e.$nextArrow.on("keydown.slick",e.keyHandler)))},t.prototype.initDotEvents=function(){var t=this;!0===t.options.dots&&t.slideCount>t.options.slidesToShow&&(e("li",t.$dots).on("click.slick",{message:"index"},t.changeSlide),!0===t.options.accessibility&&t.$dots.on("keydown.slick",t.keyHandler)),!0===t.options.dots&&!0===t.options.pauseOnDotsHover&&t.slideCount>t.options.slidesToShow&&e("li",t.$dots).on("mouseenter.slick",e.proxy(t.interrupt,t,!0)).on("mouseleave.slick",e.proxy(t.interrupt,t,!1))},t.prototype.initSlideEvents=function(){var t=this;t.options.pauseOnHover&&(t.$list.on("mouseenter.slick",e.proxy(t.interrupt,t,!0)),t.$list.on("mouseleave.slick",e.proxy(t.interrupt,t,!1)))},t.prototype.initializeEvents=function(){var t=this;t.initArrowEvents(),t.initDotEvents(),t.initSlideEvents(),t.$list.on("touchstart.slick mousedown.slick",{action:"start"},t.swipeHandler),t.$list.on("touchmove.slick mousemove.slick",{action:"move"},t.swipeHandler),t.$list.on("touchend.slick mouseup.slick",{action:"end"},t.swipeHandler),t.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},t.swipeHandler),t.$list.on("click.slick",t.clickHandler),e(document).on(t.visibilityChange,e.proxy(t.visibility,t)),!0===t.options.accessibility&&t.$list.on("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().on("click.slick",t.selectHandler),e(window).on("orientationchange.slick.slick-"+t.instanceUid,e.proxy(t.orientationChange,t)),e(window).on("resize.slick.slick-"+t.instanceUid,e.proxy(t.resize,t)),e("[draggable!=true]",t.$slideTrack).on("dragstart",t.preventDefault),e(window).on("load.slick.slick-"+t.instanceUid,t.setPosition),e(t.setPosition)},t.prototype.initUI=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.show(),e.$nextArrow.show()),!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&e.$dots.show()},t.prototype.keyHandler=function(e){var t=this;e.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===e.keyCode&&!0===t.options.accessibility?t.changeSlide({data:{message:!0===t.options.rtl?"next":"previous"}}):39===e.keyCode&&!0===t.options.accessibility&&t.changeSlide({data:{message:!0===t.options.rtl?"previous":"next"}}))},t.prototype.lazyLoad=function(){function t(t){e("img[data-lazy]",t).each(function(){var t=e(this),n=e(this).attr("data-lazy"),i=e(this).attr("data-srcset"),o=e(this).attr("data-sizes")||s.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){t.animate({opacity:0},100,function(){i&&(t.attr("srcset",i),o&&t.attr("sizes",o)),t.attr("src",n).animate({opacity:1},200,function(){t.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),s.$slider.trigger("lazyLoaded",[s,t,n])})},r.onerror=function(){t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),s.$slider.trigger("lazyLoadError",[s,t,n])},r.src=n})}var n,i,o,r,s=this;if(!0===s.options.centerMode?!0===s.options.infinite?(o=s.currentSlide+(s.options.slidesToShow/2+1),r=o+s.options.slidesToShow+2):(o=Math.max(0,s.currentSlide-(s.options.slidesToShow/2+1)),r=s.options.slidesToShow/2+1+2+s.currentSlide):(o=s.options.infinite?s.options.slidesToShow+s.currentSlide:s.currentSlide,r=Math.ceil(o+s.options.slidesToShow),!0===s.options.fade&&(o>0&&o--,r<=s.slideCount&&r++)),n=s.$slider.find(".slick-slide").slice(o,r),"anticipated"===s.options.lazyLoad)for(var a=o-1,l=r,c=s.$slider.find(".slick-slide"),u=0;u<s.options.slidesToScroll;u++)a<0&&(a=s.slideCount-1),n=n.add(c.eq(a)),n=n.add(c.eq(l)),a--,l++;t(n),s.slideCount<=s.options.slidesToShow?(i=s.$slider.find(".slick-slide"),t(i)):s.currentSlide>=s.slideCount-s.options.slidesToShow?(i=s.$slider.find(".slick-cloned").slice(0,s.options.slidesToShow),t(i)):0===s.currentSlide&&(i=s.$slider.find(".slick-cloned").slice(-1*s.options.slidesToShow),t(i))},t.prototype.loadSlider=function(){var e=this;e.setPosition(),e.$slideTrack.css({opacity:1}),e.$slider.removeClass("slick-loading"),e.initUI(),"progressive"===e.options.lazyLoad&&e.progressiveLazyLoad()},t.prototype.next=t.prototype.slickNext=function(){var e=this;e.changeSlide({data:{message:"next"}})},t.prototype.orientationChange=function(){var e=this;e.checkResponsive(),e.setPosition()},t.prototype.pause=t.prototype.slickPause=function(){var e=this;e.autoPlayClear(),e.paused=!0},t.prototype.play=t.prototype.slickPlay=function(){var e=this;e.autoPlay(),e.options.autoplay=!0,e.paused=!1,e.focussed=!1,e.interrupted=!1},t.prototype.postSlide=function(t){var n=this;if(!n.unslicked&&(n.$slider.trigger("afterChange",[n,t]),n.animating=!1,n.slideCount>n.options.slidesToShow&&n.setPosition(),n.swipeLeft=null,n.options.autoplay&&n.autoPlay(),!0===n.options.accessibility&&(n.initADA(),n.options.focusOnChange))){var i=e(n.$slides.get(n.currentSlide));i.attr("tabindex",0).focus()}},t.prototype.prev=t.prototype.slickPrev=function(){var e=this;e.changeSlide({data:{message:"previous"}})},t.prototype.preventDefault=function(e){e.preventDefault()},t.prototype.progressiveLazyLoad=function(t){t=t||1;var n,i,o,r,s,a=this,l=e("img[data-lazy]",a.$slider);l.length?(n=l.first(),i=n.attr("data-lazy"),o=n.attr("data-srcset"),r=n.attr("data-sizes")||a.$slider.attr("data-sizes"),s=document.createElement("img"),s.onload=function(){o&&(n.attr("srcset",o),r&&n.attr("sizes",r)),n.attr("src",i).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===a.options.adaptiveHeight&&a.setPosition(),a.$slider.trigger("lazyLoaded",[a,n,i]),a.progressiveLazyLoad()},s.onerror=function(){t<3?setTimeout(function(){a.progressiveLazyLoad(t+1)},500):(n.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),a.$slider.trigger("lazyLoadError",[a,n,i]),a.progressiveLazyLoad())},s.src=i):a.$slider.trigger("allImagesLoaded",[a])},t.prototype.refresh=function(t){var n,i,o=this;i=o.slideCount-o.options.slidesToShow,!o.options.infinite&&o.currentSlide>i&&(o.currentSlide=i),o.slideCount<=o.options.slidesToShow&&(o.currentSlide=0),n=o.currentSlide,o.destroy(!0),e.extend(o,o.initials,{currentSlide:n}),o.init(),t||o.changeSlide({data:{message:"index",index:n}},!1)},t.prototype.registerBreakpoints=function(){var t,n,i,o=this,r=o.options.responsive||null;if("array"===e.type(r)&&r.length){for(t in o.respondTo=o.options.respondTo||"window",r)if(i=o.breakpoints.length-1,r.hasOwnProperty(t)){for(n=r[t].breakpoint;i>=0;)o.breakpoints[i]&&o.breakpoints[i]===n&&o.breakpoints.splice(i,1),i--;o.breakpoints.push(n),o.breakpointSettings[n]=r[t].settings}o.breakpoints.sort(function(e,t){return o.options.mobileFirst?e-t:t-e})}},t.prototype.reinit=function(){var t=this;t.$slides=t.$slideTrack.children(t.options.slide).addClass("slick-slide"),t.slideCount=t.$slides.length,t.currentSlide>=t.slideCount&&0!==t.currentSlide&&(t.currentSlide=t.currentSlide-t.options.slidesToScroll),t.slideCount<=t.options.slidesToShow&&(t.currentSlide=0),t.registerBreakpoints(),t.setProps(),t.setupInfinite(),t.buildArrows(),t.updateArrows(),t.initArrowEvents(),t.buildDots(),t.updateDots(),t.initDotEvents(),t.cleanUpSlideEvents(),t.initSlideEvents(),t.checkResponsive(!1,!0),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().on("click.slick",t.selectHandler),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),t.setPosition(),t.focusHandler(),t.paused=!t.options.autoplay,t.autoPlay(),t.$slider.trigger("reInit",[t])},t.prototype.resize=function(){var t=this;e(window).width()!==t.windowWidth&&(clearTimeout(t.windowDelay),t.windowDelay=window.setTimeout(function(){t.windowWidth=e(window).width(),t.checkResponsive(),t.unslicked||t.setPosition()},50))},t.prototype.removeSlide=t.prototype.slickRemove=function(e,t,n){var i=this;return"boolean"==typeof e?(t=e,e=!0===t?0:i.slideCount-1):e=!0===t?--e:e,!(i.slideCount<1||e<0||e>i.slideCount-1)&&(i.unload(),!0===n?i.$slideTrack.children().remove():i.$slideTrack.children(this.options.slide).eq(e).remove(),i.$slides=i.$slideTrack.children(this.options.slide),i.$slideTrack.children(this.options.slide).detach(),i.$slideTrack.append(i.$slides),i.$slidesCache=i.$slides,void i.reinit())},t.prototype.setCSS=function(e){var t,n,i=this,o={};!0===i.options.rtl&&(e=-e),t="left"==i.positionProp?Math.ceil(e)+"px":"0px",n="top"==i.positionProp?Math.ceil(e)+"px":"0px",o[i.positionProp]=e,!1===i.transformsEnabled?i.$slideTrack.css(o):(o={},!1===i.cssTransitions?(o[i.animType]="translate("+t+", "+n+")",i.$slideTrack.css(o)):(o[i.animType]="translate3d("+t+", "+n+", 0px)",i.$slideTrack.css(o)))},t.prototype.setDimensions=function(){var e=this;!1===e.options.vertical?!0===e.options.centerMode&&e.$list.css({padding:"0px "+e.options.centerPadding}):(e.$list.height(e.$slides.first().outerHeight(!0)*e.options.slidesToShow),!0===e.options.centerMode&&e.$list.css({padding:e.options.centerPadding+" 0px"})),e.listWidth=e.$list.width(),e.listHeight=e.$list.height(),!1===e.options.vertical&&!1===e.options.variableWidth?(e.slideWidth=Math.ceil(e.listWidth/e.options.slidesToShow),e.$slideTrack.width(Math.ceil(e.slideWidth*e.$slideTrack.children(".slick-slide").length))):!0===e.options.variableWidth?e.$slideTrack.width(5e3*e.slideCount):(e.slideWidth=Math.ceil(e.listWidth),e.$slideTrack.height(Math.ceil(e.$slides.first().outerHeight(!0)*e.$slideTrack.children(".slick-slide").length)));var t=e.$slides.first().outerWidth(!0)-e.$slides.first().width();!1===e.options.variableWidth&&e.$slideTrack.children(".slick-slide").width(e.slideWidth-t)},t.prototype.setFade=function(){var t,n=this;n.$slides.each(function(i,o){t=n.slideWidth*i*-1,!0===n.options.rtl?e(o).css({position:"relative",right:t,top:0,zIndex:n.options.zIndex-2,opacity:0}):e(o).css({position:"relative",left:t,top:0,zIndex:n.options.zIndex-2,opacity:0})}),n.$slides.eq(n.currentSlide).css({zIndex:n.options.zIndex-1,opacity:1})},t.prototype.setHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.css("height",t)}},t.prototype.setOption=t.prototype.slickSetOption=function(){var t,n,i,o,r,s=this,a=!1;if("object"===e.type(arguments[0])?(i=arguments[0],a=arguments[1],r="multiple"):"string"===e.type(arguments[0])&&(i=arguments[0],o=arguments[1],a=arguments[2],"responsive"===arguments[0]&&"array"===e.type(arguments[1])?r="responsive":void 0!==arguments[1]&&(r="single")),"single"===r)s.options[i]=o;else if("multiple"===r)e.each(i,function(e,t){s.options[e]=t});else if("responsive"===r)for(n in o)if("array"!==e.type(s.options.responsive))s.options.responsive=[o[n]];else{for(t=s.options.responsive.length-1;t>=0;)s.options.responsive[t].breakpoint===o[n].breakpoint&&s.options.responsive.splice(t,1),t--;s.options.responsive.push(o[n])}a&&(s.unload(),s.reinit())},t.prototype.setPosition=function(){var e=this;e.setDimensions(),e.setHeight(),!1===e.options.fade?e.setCSS(e.getLeft(e.currentSlide)):e.setFade(),e.$slider.trigger("setPosition",[e])},t.prototype.setProps=function(){var e=this,t=document.body.style;e.positionProp=!0===e.options.vertical?"top":"left","top"===e.positionProp?e.$slider.addClass("slick-vertical"):e.$slider.removeClass("slick-vertical"),void 0===t.WebkitTransition&&void 0===t.MozTransition&&void 0===t.msTransition||!0===e.options.useCSS&&(e.cssTransitions=!0),e.options.fade&&("number"==typeof e.options.zIndex?e.options.zIndex<3&&(e.options.zIndex=3):e.options.zIndex=e.defaults.zIndex),void 0!==t.OTransform&&(e.animType="OTransform",e.transformType="-o-transform",e.transitionType="OTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(e.animType=!1)),void 0!==t.MozTransform&&(e.animType="MozTransform",e.transformType="-moz-transform",e.transitionType="MozTransition",void 0===t.perspectiveProperty&&void 0===t.MozPerspective&&(e.animType=!1)),void 0!==t.webkitTransform&&(e.animType="webkitTransform",e.transformType="-webkit-transform",e.transitionType="webkitTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(e.animType=!1)),void 0!==t.msTransform&&(e.animType="msTransform",e.transformType="-ms-transform",e.transitionType="msTransition",void 0===t.msTransform&&(e.animType=!1)),void 0!==t.transform&&!1!==e.animType&&(e.animType="transform",e.transformType="transform",e.transitionType="transition"),e.transformsEnabled=e.options.useTransform&&null!==e.animType&&!1!==e.animType},t.prototype.setSlideClasses=function(e){var t,n,i,o,r=this;if(n=r.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),r.$slides.eq(e).addClass("slick-current"),!0===r.options.centerMode){var s=r.options.slidesToShow%2==0?1:0;t=Math.floor(r.options.slidesToShow/2),!0===r.options.infinite&&(e>=t&&e<=r.slideCount-1-t?r.$slides.slice(e-t+s,e+t+1).addClass("slick-active").attr("aria-hidden","false"):(i=r.options.slidesToShow+e,n.slice(i-t+1+s,i+t+2).addClass("slick-active").attr("aria-hidden","false")),0===e?n.eq(n.length-1-r.options.slidesToShow).addClass("slick-center"):e===r.slideCount-1&&n.eq(r.options.slidesToShow).addClass("slick-center")),r.$slides.eq(e).addClass("slick-center")}else e>=0&&e<=r.slideCount-r.options.slidesToShow?r.$slides.slice(e,e+r.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):n.length<=r.options.slidesToShow?n.addClass("slick-active").attr("aria-hidden","false"):(o=r.slideCount%r.options.slidesToShow,i=!0===r.options.infinite?r.options.slidesToShow+e:e,r.options.slidesToShow==r.options.slidesToScroll&&r.slideCount-e<r.options.slidesToShow?n.slice(i-(r.options.slidesToShow-o),i+o).addClass("slick-active").attr("aria-hidden","false"):n.slice(i,i+r.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==r.options.lazyLoad&&"anticipated"!==r.options.lazyLoad||r.lazyLoad()},t.prototype.setupInfinite=function(){var t,n,i,o=this;if(!0===o.options.fade&&(o.options.centerMode=!1),!0===o.options.infinite&&!1===o.options.fade&&(n=null,o.slideCount>o.options.slidesToShow)){for(i=!0===o.options.centerMode?o.options.slidesToShow+1:o.options.slidesToShow,t=o.slideCount;t>o.slideCount-i;t-=1)n=t-1,e(o.$slides[n]).clone(!0).attr("id","").attr("data-slick-index",n-o.slideCount).prependTo(o.$slideTrack).addClass("slick-cloned");for(t=0;t<i+o.slideCount;t+=1)n=t,e(o.$slides[n]).clone(!0).attr("id","").attr("data-slick-index",n+o.slideCount).appendTo(o.$slideTrack).addClass("slick-cloned");o.$slideTrack.find(".slick-cloned").find("[id]").each(function(){e(this).attr("id","")})}},t.prototype.interrupt=function(e){var t=this;e||t.autoPlay(),t.interrupted=e},t.prototype.selectHandler=function(t){var n=this,i=e(t.target).is(".slick-slide")?e(t.target):e(t.target).parents(".slick-slide"),o=parseInt(i.attr("data-slick-index"));return o||(o=0),n.slideCount<=n.options.slidesToShow?void n.slideHandler(o,!1,!0):void n.slideHandler(o)},t.prototype.slideHandler=function(e,t,n){var i,o,r,s,a,l=null,c=this;if(t=t||!1,!(!0===c.animating&&!0===c.options.waitForAnimate||!0===c.options.fade&&c.currentSlide===e))return!1===t&&c.asNavFor(e),i=e,l=c.getLeft(i),s=c.getLeft(c.currentSlide),c.currentLeft=null===c.swipeLeft?s:c.swipeLeft,!1===c.options.infinite&&!1===c.options.centerMode&&(e<0||e>c.getDotCount()*c.options.slidesToScroll)?void(!1===c.options.fade&&(i=c.currentSlide,!0!==n&&c.slideCount>c.options.slidesToShow?c.animateSlide(s,function(){c.postSlide(i)}):c.postSlide(i))):!1===c.options.infinite&&!0===c.options.centerMode&&(e<0||e>c.slideCount-c.options.slidesToScroll)?void(!1===c.options.fade&&(i=c.currentSlide,!0!==n&&c.slideCount>c.options.slidesToShow?c.animateSlide(s,function(){c.postSlide(i)}):c.postSlide(i))):(c.options.autoplay&&clearInterval(c.autoPlayTimer),o=i<0?c.slideCount%c.options.slidesToScroll!=0?c.slideCount-c.slideCount%c.options.slidesToScroll:c.slideCount+i:i>=c.slideCount?c.slideCount%c.options.slidesToScroll!=0?0:i-c.slideCount:i,c.animating=!0,c.$slider.trigger("beforeChange",[c,c.currentSlide,o]),r=c.currentSlide,c.currentSlide=o,c.setSlideClasses(c.currentSlide),c.options.asNavFor&&(a=c.getNavTarget(),a=a.slick("getSlick"),a.slideCount<=a.options.slidesToShow&&a.setSlideClasses(c.currentSlide)),c.updateDots(),c.updateArrows(),!0===c.options.fade?(!0!==n?(c.fadeSlideOut(r),c.fadeSlide(o,function(){c.postSlide(o)})):c.postSlide(o),void c.animateHeight()):void(!0!==n&&c.slideCount>c.options.slidesToShow?c.animateSlide(l,function(){c.postSlide(o)}):c.postSlide(o)))},t.prototype.startLoad=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.hide(),e.$nextArrow.hide()),!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&e.$dots.hide(),e.$slider.addClass("slick-loading")},t.prototype.swipeDirection=function(){var e,t,n,i,o=this;return e=o.touchObject.startX-o.touchObject.curX,t=o.touchObject.startY-o.touchObject.curY,n=Math.atan2(t,e),i=Math.round(180*n/Math.PI),i<0&&(i=360-Math.abs(i)),i<=45&&i>=0?!1===o.options.rtl?"left":"right":i<=360&&i>=315?!1===o.options.rtl?"left":"right":i>=135&&i<=225?!1===o.options.rtl?"right":"left":!0===o.options.verticalSwiping?i>=35&&i<=135?"down":"up":"vertical"},t.prototype.swipeEnd=function(e){var t,n,i=this;if(i.dragging=!1,i.swiping=!1,i.scrolling)return i.scrolling=!1,!1;if(i.interrupted=!1,i.shouldClick=!(i.touchObject.swipeLength>10),void 0===i.touchObject.curX)return!1;if(!0===i.touchObject.edgeHit&&i.$slider.trigger("edge",[i,i.swipeDirection()]),i.touchObject.swipeLength>=i.touchObject.minSwipe){switch(n=i.swipeDirection()){case"left":case"down":t=i.options.swipeToSlide?i.checkNavigable(i.currentSlide+i.getSlideCount()):i.currentSlide+i.getSlideCount(),i.currentDirection=0;break;case"right":case"up":t=i.options.swipeToSlide?i.checkNavigable(i.currentSlide-i.getSlideCount()):i.currentSlide-i.getSlideCount(),i.currentDirection=1}"vertical"!=n&&(i.slideHandler(t),i.touchObject={},i.$slider.trigger("swipe",[i,n]))}else i.touchObject.startX!==i.touchObject.curX&&(i.slideHandler(i.currentSlide),i.touchObject={})},t.prototype.swipeHandler=function(e){var t=this;if(!(!1===t.options.swipe||"ontouchend"in document&&!1===t.options.swipe||!1===t.options.draggable&&-1!==e.type.indexOf("mouse")))switch(t.touchObject.fingerCount=e.originalEvent&&void 0!==e.originalEvent.touches?e.originalEvent.touches.length:1,t.touchObject.minSwipe=t.listWidth/t.options.touchThreshold,!0===t.options.verticalSwiping&&(t.touchObject.minSwipe=t.listHeight/t.options.touchThreshold),e.data.action){case"start":t.swipeStart(e);break;case"move":t.swipeMove(e);break;case"end":t.swipeEnd(e)}},t.prototype.swipeMove=function(e){var t,n,i,o,r,s,a=this;return r=void 0!==e.originalEvent?e.originalEvent.touches:null,!(!a.dragging||a.scrolling||r&&1!==r.length)&&(t=a.getLeft(a.currentSlide),a.touchObject.curX=void 0!==r?r[0].pageX:e.clientX,a.touchObject.curY=void 0!==r?r[0].pageY:e.clientY,a.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(a.touchObject.curX-a.touchObject.startX,2))),s=Math.round(Math.sqrt(Math.pow(a.touchObject.curY-a.touchObject.startY,2))),!a.options.verticalSwiping&&!a.swiping&&s>4?(a.scrolling=!0,!1):(!0===a.options.verticalSwiping&&(a.touchObject.swipeLength=s),n=a.swipeDirection(),void 0!==e.originalEvent&&a.touchObject.swipeLength>4&&(a.swiping=!0,e.preventDefault()),o=(!1===a.options.rtl?1:-1)*(a.touchObject.curX>a.touchObject.startX?1:-1),!0===a.options.verticalSwiping&&(o=a.touchObject.curY>a.touchObject.startY?1:-1),i=a.touchObject.swipeLength,a.touchObject.edgeHit=!1,!1===a.options.infinite&&(0===a.currentSlide&&"right"===n||a.currentSlide>=a.getDotCount()&&"left"===n)&&(i=a.touchObject.swipeLength*a.options.edgeFriction,a.touchObject.edgeHit=!0),!1===a.options.vertical?a.swipeLeft=t+i*o:a.swipeLeft=t+i*(a.$list.height()/a.listWidth)*o,!0===a.options.verticalSwiping&&(a.swipeLeft=t+i*o),!0!==a.options.fade&&!1!==a.options.touchMove&&(!0===a.animating?(a.swipeLeft=null,!1):void a.setCSS(a.swipeLeft))))},t.prototype.swipeStart=function(e){var t,n=this;return n.interrupted=!0,1!==n.touchObject.fingerCount||n.slideCount<=n.options.slidesToShow?(n.touchObject={},!1):(void 0!==e.originalEvent&&void 0!==e.originalEvent.touches&&(t=e.originalEvent.touches[0]),n.touchObject.startX=n.touchObject.curX=void 0!==t?t.pageX:e.clientX,n.touchObject.startY=n.touchObject.curY=void 0!==t?t.pageY:e.clientY,void(n.dragging=!0))},t.prototype.unfilterSlides=t.prototype.slickUnfilter=function(){var e=this;null!==e.$slidesCache&&(e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.appendTo(e.$slideTrack),e.reinit())},t.prototype.unload=function(){var t=this;e(".slick-cloned",t.$slider).remove(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove(),t.$nextArrow&&t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove(),t.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},t.prototype.unslick=function(e){var t=this;t.$slider.trigger("unslick",[t,e]),t.destroy()},t.prototype.updateArrows=function(){var e=this;Math.floor(e.options.slidesToShow/2),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&!e.options.infinite&&(e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===e.currentSlide?(e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-e.options.slidesToShow&&!1===e.options.centerMode?(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-1&&!0===e.options.centerMode&&(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},t.prototype.updateDots=function(){var e=this;null!==e.$dots&&(e.$dots.find("li").removeClass("slick-active").end(),e.$dots.find("li").eq(Math.floor(e.currentSlide/e.options.slidesToScroll)).addClass("slick-active"))},t.prototype.visibility=function(){var e=this;e.options.autoplay&&(document[e.hidden]?e.interrupted=!0:e.interrupted=!1)},e.fn.slick=function(){var e,n,i=this,o=arguments[0],r=Array.prototype.slice.call(arguments,1),s=i.length;for(e=0;e<s;e++)if("object"==typeof o||void 0===o?i[e].slick=new t(i[e],o):n=i[e].slick[o].apply(i[e].slick,r),void 0!==n)return n;return i}}),function(e,t,n){"use strict";var i=function(t,n){this.widget="",this.$element=e(t),this.defaultTime=n.defaultTime,this.disableFocus=n.disableFocus,this.disableMousewheel=n.disableMousewheel,this.isOpen=n.isOpen,this.minuteStep=n.minuteStep,this.modalBackdrop=n.modalBackdrop,this.orientation=n.orientation,this.secondStep=n.secondStep,this.snapToStep=n.snapToStep,this.showInputs=n.showInputs,this.showMeridian=n.showMeridian,this.showSeconds=n.showSeconds,this.template=n.template,this.appendWidgetTo=n.appendWidgetTo,this.showWidgetOnAddonClick=n.showWidgetOnAddonClick,this.icons=n.icons,this.maxHours=n.maxHours,this.explicitMode=n.explicitMode,this.handleDocumentClick=function(e){var t=e.data.scope;t.$element.parent().find(e.target).length||t.$widget.is(e.target)||t.$widget.find(e.target).length||t.hideWidget()},this._init()};i.prototype={constructor:i,_init:function(){var t=this;this.showWidgetOnAddonClick&&this.$element.parent().hasClass("input-group")&&this.$element.parent().hasClass("bootstrap-timepicker")?(this.$element.parent(".input-group.bootstrap-timepicker").find(".input-group-addon").on({"click.timepicker":e.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":e.proxy(this.highlightUnit,this),"click.timepicker":e.proxy(this.highlightUnit,this),"keydown.timepicker":e.proxy(this.elementKeydown,this),"blur.timepicker":e.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":e.proxy(this.mousewheel,this)})):this.template?this.$element.on({"focus.timepicker":e.proxy(this.showWidget,this),"click.timepicker":e.proxy(this.showWidget,this),"blur.timepicker":e.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":e.proxy(this.mousewheel,this)}):this.$element.on({"focus.timepicker":e.proxy(this.highlightUnit,this),"click.timepicker":e.proxy(this.highlightUnit,this),"keydown.timepicker":e.proxy(this.elementKeydown,this),"blur.timepicker":e.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":e.proxy(this.mousewheel,this)}),!1!==this.template?this.$widget=e(this.getTemplate()).on("click",e.proxy(this.widgetClick,this)):this.$widget=!1,this.showInputs&&!1!==this.$widget&&this.$widget.find("input").each(function(){e(this).on({"click.timepicker":function(){e(this).select()},"keydown.timepicker":e.proxy(t.widgetKeydown,t),"keyup.timepicker":e.proxy(t.widgetKeyup,t)})}),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=null,this.updateFromElementVal()},clear:function(){this.hour="",this.minute="",this.second="",this.meridian="",this.$element.val("")},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour<=0?this.hour=this.maxHours-1:this.hour--},decrementMinute:function(e){var t;t=e?this.minute-e:this.minute-this.minuteStep,0>t?(this.decrementHour(),this.minute=t+60):this.minute=t},decrementSecond:function(){var e=this.second-this.secondStep;0>e?(this.decrementMinute(!0),this.second=e+60):this.second=e},elementKeydown:function(e){switch(e.which){case 9:if(e.shiftKey){if("hour"===this.highlightedUnit){this.hideWidget();break}this.highlightPrevUnit()}else{if(this.showMeridian&&"meridian"===this.highlightedUnit||this.showSeconds&&"second"===this.highlightedUnit||!this.showMeridian&&!this.showSeconds&&"minute"===this.highlightedUnit){this.hideWidget();break}this.highlightNextUnit()}e.preventDefault(),this.updateFromElementVal();break;case 27:this.updateFromElementVal();break;case 37:e.preventDefault(),this.highlightPrevUnit(),this.updateFromElementVal();break;case 38:switch(e.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update();break;case 39:e.preventDefault(),this.highlightNextUnit(),this.updateFromElementVal();break;case 40:switch(e.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update()}},getCursorPosition:function(){var e=this.$element.get(0);if("selectionStart"in e)return e.selectionStart;if(n.selection){e.focus();var t=n.selection.createRange(),i=n.selection.createRange().text.length;return t.moveStart("character",-e.value.length),t.text.length-i}},getTemplate:function(){var e,t,n,i,o,r;switch(this.showInputs?(t='<input type="text" class="bootstrap-timepicker-hour" maxlength="2"/>',n='<input type="text" class="bootstrap-timepicker-minute" maxlength="2"/>',i='<input type="text" class="bootstrap-timepicker-second" maxlength="2"/>',o='<input type="text" class="bootstrap-timepicker-meridian" maxlength="2"/>'):(t='<span class="bootstrap-timepicker-hour"></span>',n='<span class="bootstrap-timepicker-minute"></span>',i='<span class="bootstrap-timepicker-second"></span>',o='<span class="bootstrap-timepicker-meridian"></span>'),r='<table><tr><td><a href="#" data-action="incrementHour"><span class="'+this.icons.up+'"></span></a></td><td class="separator">&nbsp;</td><td><a href="#" data-action="incrementMinute"><span class="'+this.icons.up+'"></span></a></td>'+(this.showSeconds?'<td class="separator">&nbsp;</td><td><a href="#" data-action="incrementSecond"><span class="'+this.icons.up+'"></span></a></td>':"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><span class="'+this.icons.up+'"></span></a></td>':"")+"</tr><tr><td>"+t+'</td> <td class="separator">:</td><td>'+n+"</td> "+(this.showSeconds?'<td class="separator">:</td><td>'+i+"</td>":"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td>'+o+"</td>":"")+'</tr><tr><td><a href="#" data-action="decrementHour"><span class="'+this.icons.down+'"></span></a></td><td class="separator"></td><td><a href="#" data-action="decrementMinute"><span class="'+this.icons.down+'"></span></a></td>'+(this.showSeconds?'<td class="separator">&nbsp;</td><td><a href="#" data-action="decrementSecond"><span class="'+this.icons.down+'"></span></a></td>':"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td><a href="#" data-action="toggleMeridian"><span class="'+this.icons.down+'"></span></a></td>':"")+"</tr></table>",this.template){case"modal":e='<div class="bootstrap-timepicker-widget modal hide fade in" data-backdrop="'+(this.modalBackdrop?"true":"false")+'"><div class="modal-header"><a href="#" class="close" data-dismiss="modal">&times;</a><h3>Pick a Time</h3></div><div class="modal-content">'+r+'</div><div class="modal-footer"><a href="#" class="btn btn-primary" data-dismiss="modal">OK</a></div></div>';break;case"dropdown":e='<div class="bootstrap-timepicker-widget dropdown-menu">'+r+"</div>"}return e},getTime:function(){return""===this.hour?"":this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:"")},hideWidget:function(){!1!==this.isOpen&&(this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),"modal"===this.template&&this.$widget.modal?this.$widget.modal("hide"):this.$widget.removeClass("open"),e(n).off("mousedown.timepicker, touchend.timepicker",this.handleDocumentClick),this.isOpen=!1,
this.$widget.detach())},highlightUnit:function(){this.position=this.getCursorPosition(),this.position>=0&&this.position<=2?this.highlightHour():this.position>=3&&this.position<=5?this.highlightMinute():this.position>=6&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.showMeridian?this.highlightMeridian():this.showSeconds?this.highlightSecond():this.highlightMinute();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="hour",e.setSelectionRange&&setTimeout(function(){t.hour<10?e.setSelectionRange(0,1):e.setSelectionRange(0,2)},0)},highlightMinute:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="minute",e.setSelectionRange&&setTimeout(function(){t.hour<10?e.setSelectionRange(2,4):e.setSelectionRange(3,5)},0)},highlightSecond:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="second",e.setSelectionRange&&setTimeout(function(){t.hour<10?e.setSelectionRange(5,7):e.setSelectionRange(6,8)},0)},highlightMeridian:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="meridian",e.setSelectionRange&&(this.showSeconds?setTimeout(function(){t.hour<10?e.setSelectionRange(8,10):e.setSelectionRange(9,11)},0):setTimeout(function(){t.hour<10?e.setSelectionRange(5,7):e.setSelectionRange(6,8)},0))},incrementHour:function(){if(this.showMeridian){if(11===this.hour)return this.hour++,this.toggleMeridian();12===this.hour&&(this.hour=0)}return this.hour===this.maxHours-1?void(this.hour=0):void this.hour++},incrementMinute:function(e){var t;t=e?this.minute+e:this.minute+this.minuteStep-this.minute%this.minuteStep,t>59?(this.incrementHour(),this.minute=t-60):this.minute=t},incrementSecond:function(){var e=this.second+this.secondStep-this.second%this.secondStep;e>59?(this.incrementMinute(!0),this.second=e-60):this.second=e},mousewheel:function(t){if(!this.disableMousewheel){t.preventDefault(),t.stopPropagation();var n=t.originalEvent.wheelDelta||-t.originalEvent.detail,i=null;switch("mousewheel"===t.type?i=-1*t.originalEvent.wheelDelta:"DOMMouseScroll"===t.type&&(i=40*t.originalEvent.detail),i&&(t.preventDefault(),e(this).scrollTop(i+e(this).scrollTop())),this.highlightedUnit){case"minute":n>0?this.incrementMinute():this.decrementMinute(),this.highlightMinute();break;case"second":n>0?this.incrementSecond():this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian();break;default:n>0?this.incrementHour():this.decrementHour(),this.highlightHour()}return!1}},changeToNearestStep:function(e,t){return e%t==0?e:Math.round(e%t/t)?(e+(t-e%t))%60:e-e%t},place:function(){if(!this.isInline){var n=this.$widget.outerWidth(),i=this.$widget.outerHeight(),o=10,r=e(t).width(),s=e(t).height(),a=e(t).scrollTop(),l=parseInt(this.$element.parents().filter(function(){return"auto"!==e(this).css("z-index")}).first().css("z-index"),10)+10,c=this.component?this.component.parent().offset():this.$element.offset(),u=this.component?this.component.outerHeight(!0):this.$element.outerHeight(!1),d=this.component?this.component.outerWidth(!0):this.$element.outerWidth(!1),h=c.left,p=c.top;this.$widget.removeClass("timepicker-orient-top timepicker-orient-bottom timepicker-orient-right timepicker-orient-left"),"auto"!==this.orientation.x?(this.$widget.addClass("timepicker-orient-"+this.orientation.x),"right"===this.orientation.x&&(h-=n-d)):(this.$widget.addClass("timepicker-orient-left"),c.left<0?h-=c.left-o:c.left+n>r&&(h=r-n-o));var f,g,m=this.orientation.y;"auto"===m&&(f=-a+c.top-i,g=a+s-(c.top+u+i),m=Math.max(f,g)===g?"top":"bottom"),this.$widget.addClass("timepicker-orient-"+m),"top"===m?p+=u:p-=i+parseInt(this.$widget.css("padding-top"),10),this.$widget.css({top:p,left:h,zIndex:l})}},remove:function(){e("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(e){if(this.$element.val())this.updateFromElementVal();else if("current"===e){var t=new Date,n=t.getHours(),i=t.getMinutes(),o=t.getSeconds(),r="AM";0!==o&&(o=Math.ceil(t.getSeconds()/this.secondStep)*this.secondStep,60===o&&(i+=1,o=0)),0!==i&&(i=Math.ceil(t.getMinutes()/this.minuteStep)*this.minuteStep,60===i&&(n+=1,i=0)),this.showMeridian&&(0===n?n=12:n>=12?(n>12&&(n-=12),r="PM"):r="AM"),this.hour=n,this.minute=i,this.second=o,this.meridian=r,this.update()}else!1===e?(this.hour=0,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(e)},setTime:function(e,t){if(e){var n,i,o,r,s,a;if("object"==typeof e&&e.getMonth)o=e.getHours(),r=e.getMinutes(),s=e.getSeconds(),this.showMeridian&&(a="AM",o>12&&(a="PM",o%=12),12===o&&(a="PM"));else{if(n=(/a/i.test(e)?1:0)+(/p/i.test(e)?2:0),n>2)return void this.clear();if(i=e.replace(/[^0-9\:]/g,"").split(":"),o=i[0]?i[0].toString():i.toString(),this.explicitMode&&o.length>2&&o.length%2!=0)return void this.clear();r=i[1]?i[1].toString():"",s=i[2]?i[2].toString():"",o.length>4&&(s=o.slice(-2),o=o.slice(0,-2)),o.length>2&&(r=o.slice(-2),o=o.slice(0,-2)),r.length>2&&(s=r.slice(-2),r=r.slice(0,-2)),o=parseInt(o,10),r=parseInt(r,10),s=parseInt(s,10),isNaN(o)&&(o=0),isNaN(r)&&(r=0),isNaN(s)&&(s=0),s>59&&(s=59),r>59&&(r=59),o>=this.maxHours&&(o=this.maxHours-1),this.showMeridian?(o>12&&(n=2,o-=12),n||(n=1),0===o&&(o=12),a=1===n?"AM":"PM"):12>o&&2===n?o+=12:o>=this.maxHours?o=this.maxHours-1:(0>o||12===o&&1===n)&&(o=0)}this.hour=o,this.snapToStep?(this.minute=this.changeToNearestStep(r,this.minuteStep),this.second=this.changeToNearestStep(s,this.secondStep)):(this.minute=r,this.second=s),this.meridian=a,this.update(t)}else this.clear()},showWidget:function(){this.isOpen||this.$element.is(":disabled")||(this.$widget.appendTo(this.appendWidgetTo),e(n).on("mousedown.timepicker, touchend.timepicker",{scope:this},this.handleDocumentClick),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.place(),this.disableFocus&&this.$element.blur(),""===this.hour&&(this.defaultTime?this.setDefaultTime(this.defaultTime):this.setTime("0:0:0")),"modal"===this.template&&this.$widget.modal?this.$widget.modal("show").on("hidden",e.proxy(this.hideWidget,this)):!1===this.isOpen&&this.$widget.addClass("open"),this.isOpen=!0)},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM"},update:function(e){this.updateElement(),e||this.updateWidget(),this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}})},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){this.setTime(this.$element.val())},updateWidget:function(){if(!1!==this.$widget){var e=this.hour,t=1===this.minute.toString().length?"0"+this.minute:this.minute,n=1===this.second.toString().length?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(e),this.$widget.find("input.bootstrap-timepicker-minute").val(t),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(n),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(e),this.$widget.find("span.bootstrap-timepicker-minute").text(t),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(n),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))}},updateFromWidgetInputs:function(){if(!1!==this.$widget){var e=this.$widget.find("input.bootstrap-timepicker-hour").val()+":"+this.$widget.find("input.bootstrap-timepicker-minute").val()+(this.showSeconds?":"+this.$widget.find("input.bootstrap-timepicker-second").val():"")+(this.showMeridian?this.$widget.find("input.bootstrap-timepicker-meridian").val():"");this.setTime(e,!0)}},widgetClick:function(t){t.stopPropagation(),t.preventDefault();var n=e(t.target),i=n.closest("a").data("action");i&&this[i](),this.update(),n.is("input")&&n.get(0).setSelectionRange(0,2)},widgetKeydown:function(t){var n=e(t.target),i=n.attr("class").replace("bootstrap-timepicker-","");switch(t.which){case 9:if(t.shiftKey){if("hour"===i)return this.hideWidget()}else if(this.showMeridian&&"meridian"===i||this.showSeconds&&"second"===i||!this.showMeridian&&!this.showSeconds&&"minute"===i)return this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(t.preventDefault(),i){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),n.get(0).setSelectionRange(0,2);break;case 40:switch(t.preventDefault(),i){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),n.get(0).setSelectionRange(0,2)}},widgetKeyup:function(e){(65===e.which||77===e.which||80===e.which||46===e.which||8===e.which||e.which>=48&&e.which<=57||e.which>=96&&e.which<=105)&&this.updateFromWidgetInputs()}},e.fn.timepicker=function(t){var n=Array.apply(null,arguments);return n.shift(),this.each(function(){var o=e(this),r=o.data("timepicker"),s="object"==typeof t&&t;r||o.data("timepicker",r=new i(this,e.extend({},e.fn.timepicker.defaults,s,e(this).data()))),"string"==typeof t&&r[t].apply(r,n)})},e.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,disableMousewheel:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,orientation:{x:"auto",y:"auto"},secondStep:15,snapToStep:!1,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:"body",showWidgetOnAddonClick:!0,icons:{up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},maxHours:24,explicitMode:!1},e.fn.timepicker.Constructor=i,e(n).on("focus.timepicker.data-api click.timepicker.data-api",'[data-provide="timepicker"]',function(t){var n=e(this);n.data("timepicker")||(t.preventDefault(),n.timepicker())})}(jQuery,window,document),function(e,t){var n=t(e,e.document,Date);e.lazySizes=n,"object"==typeof module&&module.exports&&(module.exports=n)}("undefined"!=typeof window?window:{},function(e,t,n){"use strict";var i,o;if(function(){var t,n={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(t in o=e.lazySizesConfig||e.lazysizesConfig||{},n)t in o||(o[t]=n[t])}(),!t||!t.getElementsByClassName)return{init:function(){},cfg:o,noSupport:!0};var r=t.documentElement,s=e.HTMLPictureElement,a="addEventListener",l="getAttribute",c=e[a].bind(e),u=e.setTimeout,d=e.requestAnimationFrame||u,h=e.requestIdleCallback,p=/^picture$/i,f=["load","error","lazyincluded","_lazyloaded"],g={},m=Array.prototype.forEach,v=function(e,t){return g[t]||(g[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),g[t].test(e[l]("class")||"")&&g[t]},_=function(e,t){v(e,t)||e.setAttribute("class",(e[l]("class")||"").trim()+" "+t)},y=function(e,t){var n;(n=v(e,t))&&e.setAttribute("class",(e[l]("class")||"").replace(n," "))},b=function(e,t,n){var i=n?a:"removeEventListener";n&&b(e,t),f.forEach(function(n){e[i](n,t)})},w=function(e,n,o,r,s){var a=t.createEvent("Event");return o||(o={}),o.instance=i,a.initEvent(n,!r,!s),a.detail=o,e.dispatchEvent(a),a},x=function(t,n){var i;!s&&(i=e.picturefill||o.pf)?(n&&n.src&&!t[l]("srcset")&&t.setAttribute("srcset",n.src),i({reevaluate:!0,elements:[t]})):n&&n.src&&(t.src=n.src)},k=function(e,t){return(getComputedStyle(e,null)||{})[t]},C=function(e,t,n){for(n=n||e.offsetWidth;n<o.minSize&&t&&!e._lazysizesWidth;)n=t.offsetWidth,t=t.parentNode;return n},S=function(){var e,n,i=[],o=[],r=i,s=function(){var t=r;for(r=i.length?o:i,e=!0,n=!1;t.length;)t.shift()();e=!1},a=function(i,o){e&&!o?i.apply(this,arguments):(r.push(i),n||(n=!0,(t.hidden?u:d)(s)))};return a._lsFlush=s,a}(),T=function(e,t){return t?function(){S(e)}:function(){var t=this,n=arguments;S(function(){e.apply(t,n)})}},E=function(e){var t,i=0,r=o.throttleDelay,s=o.ricTimeout,a=function(){t=!1,i=n.now(),e()},l=h&&s>49?function(){h(a,{timeout:s}),s!==o.ricTimeout&&(s=o.ricTimeout)}:T(function(){u(a)},!0);return function(e){var o;(e=!0===e)&&(s=33),t||(t=!0,o=r-(n.now()-i),o<0&&(o=0),e||o<9?l():u(l,o))}},P=function(e){var t,i,o=99,r=function(){t=null,e()},s=function(){var e=n.now()-i;e<o?u(s,o-e):(h||r)(r)};return function(){i=n.now(),t||(t=u(s,o))}},A=function(){var s,h,f,g,C,A,I,$,O,M,F,R,L=/^img$/i,N=/^iframe$/i,B="onscroll"in e&&!/(gle|ing)bot/.test(navigator.userAgent),U=0,j=0,z=0,H=-1,W=function(e){z--,(!e||z<0||!e.target)&&(z=0)},q=function(e){return null==R&&(R="hidden"==k(t.body,"visibility")),R||!("hidden"==k(e.parentNode,"visibility")&&"hidden"==k(e,"visibility"))},V=function(e,n){var i,o=e,s=q(e);for($-=n,F+=n,O-=n,M+=n;s&&(o=o.offsetParent)&&o!=t.body&&o!=r;)(s=(k(o,"opacity")||1)>0)&&"visible"!=k(o,"overflow")&&(i=o.getBoundingClientRect(),s=M>i.left&&O<i.right&&F>i.top-1&&$<i.bottom+1);return s},Y=function(){var e,n,a,c,u,d,p,f,m,v,_,y,b=i.elements;if((g=o.loadMode)&&z<8&&(e=b.length)){for(n=0,H++;n<e;n++)if(b[n]&&!b[n]._lazyRace)if(!B||i.prematureUnveil&&i.prematureUnveil(b[n]))te(b[n]);else if((f=b[n][l]("data-expand"))&&(d=1*f)||(d=j),v||(v=!o.expand||o.expand<1?r.clientHeight>500&&r.clientWidth>500?500:370:o.expand,i._defEx=v,_=v*o.expFactor,y=o.hFac,R=null,j<_&&z<1&&H>2&&g>2&&!t.hidden?(j=_,H=0):j=g>1&&H>1&&z<6?v:U),m!==d&&(A=innerWidth+d*y,I=innerHeight+d,p=-1*d,m=d),a=b[n].getBoundingClientRect(),(F=a.bottom)>=p&&($=a.top)<=I&&(M=a.right)>=p*y&&(O=a.left)<=A&&(F||M||O||$)&&(o.loadHidden||q(b[n]))&&(h&&z<3&&!f&&(g<3||H<4)||V(b[n],d))){if(te(b[n]),u=!0,z>9)break}else!u&&h&&!c&&z<4&&H<4&&g>2&&(s[0]||o.preloadAfterLoad)&&(s[0]||!f&&(F||M||O||$||"auto"!=b[n][l](o.sizesAttr)))&&(c=s[0]||b[n]);c&&!u&&te(c)}},G=E(Y),X=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(W(e),_(t,o.loadedClass),y(t,o.loadingClass),b(t,Q),w(t,"lazyloaded"))},K=T(X),Q=function(e){K({target:e.target})},J=function(e,t){try{e.contentWindow.location.replace(t)}catch(n){e.src=t}},Z=function(e){var t,n=e[l](o.srcsetAttr);(t=o.customMedia[e[l]("data-media")||e[l]("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)},ee=T(function(e,t,n,i,r){var s,a,c,d,h,g;(h=w(e,"lazybeforeunveil",t)).defaultPrevented||(i&&(n?_(e,o.autosizesClass):e.setAttribute("sizes",i)),a=e[l](o.srcsetAttr),s=e[l](o.srcAttr),r&&(c=e.parentNode,d=c&&p.test(c.nodeName||"")),g=t.firesLoad||"src"in e&&(a||s||d),h={target:e},_(e,o.loadingClass),g&&(clearTimeout(f),f=u(W,2500),b(e,Q,!0)),d&&m.call(c.getElementsByTagName("source"),Z),a?e.setAttribute("srcset",a):s&&!d&&(N.test(e.nodeName)?J(e,s):e.src=s),r&&(a||d)&&x(e,{src:s})),e._lazyRace&&delete e._lazyRace,y(e,o.lazyClass),S(function(){var t=e.complete&&e.naturalWidth>1;g&&!t||(t&&_(e,"ls-is-cached"),X(h),e._lazyCache=!0,u(function(){"_lazyCache"in e&&delete e._lazyCache},9)),"lazy"==e.loading&&z--},!0)}),te=function(e){if(!e._lazyRace){var t,n=L.test(e.nodeName),i=n&&(e[l](o.sizesAttr)||e[l]("sizes")),r="auto"==i;(!r&&h||!n||!e[l]("src")&&!e.srcset||e.complete||v(e,o.errorClass)||!v(e,o.lazyClass))&&(t=w(e,"lazyunveilread").detail,r&&D.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,z++,ee(e,t,r,i,n))}},ne=P(function(){o.loadMode=3,G()}),ie=function(){3==o.loadMode&&(o.loadMode=2),ne()},oe=function(){if(!h){if(n.now()-C<999)return void u(oe,999);h=!0,o.loadMode=3,G(),c("scroll",ie,!0)}};return{_:function(){C=n.now(),i.elements=t.getElementsByClassName(o.lazyClass),s=t.getElementsByClassName(o.lazyClass+" "+o.preloadClass),c("scroll",G,!0),c("resize",G,!0),c("pageshow",function(e){if(e.persisted){var n=t.querySelectorAll("."+o.loadingClass);n.length&&n.forEach&&d(function(){n.forEach(function(e){e.complete&&te(e)})})}}),e.MutationObserver?new MutationObserver(G).observe(r,{childList:!0,subtree:!0,attributes:!0}):(r[a]("DOMNodeInserted",G,!0),r[a]("DOMAttrModified",G,!0),setInterval(G,999)),c("hashchange",G,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){t[a](e,G,!0)}),/d$|^c/.test(t.readyState)?oe():(c("load",oe),t[a]("DOMContentLoaded",G),u(oe,2e4)),i.elements.length?(Y(),S._lsFlush()):G()},checkElems:G,unveil:te,_aLSL:ie}}(),D=function(){var e,n=T(function(e,t,n,i){var o,r,s;if(e._lazysizesWidth=i,i+="px",e.setAttribute("sizes",i),p.test(t.nodeName||""))for(o=t.getElementsByTagName("source"),r=0,s=o.length;r<s;r++)o[r].setAttribute("sizes",i);n.detail.dataAttr||x(e,n.detail)}),i=function(e,t,i){var o,r=e.parentNode;r&&(i=C(e,r,i),o=w(e,"lazybeforesizes",{width:i,dataAttr:!!t}),o.defaultPrevented||(i=o.detail.width)&&i!==e._lazysizesWidth&&n(e,r,o,i))},r=function(){var t,n=e.length;if(n)for(t=0;t<n;t++)i(e[t])},s=P(r);return{_:function(){e=t.getElementsByClassName(o.autosizesClass),c("resize",s)},checkElems:s,updateElem:i}}(),I=function(){!I.i&&t.getElementsByClassName&&(I.i=!0,D._(),A._())};return u(function(){o.init&&I()}),i={cfg:o,autoSizer:D,loader:A,init:I,uP:x,aC:_,rC:y,hC:v,fire:w,gW:C,rAF:S}}),function(e,t,n){function i(e,n){var i=t(e);i.data(r,this),this._$element=i,this.shares=[],this._init(n),this._render()}var o="JSSocials",r=o,s=function(e,n){return t.isFunction(e)?e.apply(n,t.makeArray(arguments).slice(2)):e},a=/(\.(jpeg|png|gif|bmp|svg)$|^data:image\/(jpeg|png|gif|bmp|svg\+xml);base64)/i,l=/(&?[a-zA-Z0-9]+=)?\{([a-zA-Z0-9]+)\}/g,c={G:1e9,M:1e6,K:1e3},u={};i.prototype={url:"",text:"",shareIn:"blank",showLabel:function(e){return!1===this.showCount?e>this.smallScreenWidth:e>=this.largeScreenWidth},showCount:function(e){return!(e<=this.smallScreenWidth)||"inside"},smallScreenWidth:640,largeScreenWidth:1024,resizeTimeout:200,elementClass:"jssocials",sharesClass:"jssocials-shares",shareClass:"jssocials-share",shareButtonClass:"jssocials-share-button",shareLinkClass:"jssocials-share-link",shareLogoClass:"jssocials-share-logo",shareLabelClass:"jssocials-share-label",shareLinkCountClass:"jssocials-share-link-count",shareCountBoxClass:"jssocials-share-count-box",shareCountClass:"jssocials-share-count",shareZeroCountClass:"jssocials-share-no-count",_init:function(e){this._initDefaults(),t.extend(this,e),this._initShares(),this._attachWindowResizeCallback()},_initDefaults:function(){this.url=e.location.href,this.text=t.trim(t("meta[name=description]").attr("content")||t("title").text())},_initShares:function(){this.shares=t.map(this.shares,t.proxy(function(e){"string"==typeof e&&(e={share:e});var n=e.share&&u[e.share];if(!n&&!e.renderer)throw Error("Share '"+e.share+"' is not found");return t.extend({url:this.url,text:this.text},n,e)},this))},_attachWindowResizeCallback:function(){t(e).on("resize",t.proxy(this._windowResizeHandler,this))},_detachWindowResizeCallback:function(){t(e).off("resize",this._windowResizeHandler)},_windowResizeHandler:function(){(t.isFunction(this.showLabel)||t.isFunction(this.showCount))&&(e.clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(t.proxy(this.refresh,this),this.resizeTimeout))},_render:function(){this._clear(),this._defineOptionsByScreen(),this._$element.addClass(this.elementClass),this._$shares=t("<div>").addClass(this.sharesClass).appendTo(this._$element),this._renderShares()},_defineOptionsByScreen:function(){this._screenWidth=t(e).width(),this._showLabel=s(this.showLabel,this,this._screenWidth),this._showCount=s(this.showCount,this,this._screenWidth)},_renderShares:function(){t.each(this.shares,t.proxy(function(e,t){this._renderShare(t)},this))},_renderShare:function(e){var n;n=t.isFunction(e.renderer)?t(e.renderer()):this._createShare(e),n.addClass(this.shareClass).addClass(e.share?"jssocials-share-"+e.share:"").addClass(e.css).appendTo(this._$shares)},_createShare:function(e){var n=t("<div>"),i=this._createShareLink(e).appendTo(n);if(this._showCount){var o="inside"===this._showCount,r=o?i:t("<div>").addClass(this.shareCountBoxClass).appendTo(n);r.addClass(o?this.shareLinkCountClass:this.shareCountBoxClass),this._renderShareCount(e,r)}return n},_createShareLink:function(e){var n=this._getShareStrategy(e),i=n.call(e,{shareUrl:this._getShareUrl(e)});return i.addClass(this.shareLinkClass).append(this._createShareLogo(e)),this._showLabel&&i.append(this._createShareLabel(e)),t.each(this.on||{},function(n,o){t.isFunction(o)&&i.on(n,t.proxy(o,e))}),i},_getShareStrategy:function(e){var t=h[e.shareIn||this.shareIn];if(!t)throw Error("Share strategy '"+this.shareIn+"' not found");return t},_getShareUrl:function(e){var t=s(e.shareUrl,e);return this._formatShareUrl(t,e)},_createShareLogo:function(e){var n=e.logo,i=a.test(n)?t("<img>").attr("src",e.logo):t("<i>").addClass(n);return i.addClass(this.shareLogoClass),i},_createShareLabel:function(e){return t("<span>").addClass(this.shareLabelClass).text(e.label)},_renderShareCount:function(e,n){var i=t("<span>").addClass(this.shareCountClass);n.addClass(this.shareZeroCountClass).append(i),this._loadCount(e).done(t.proxy(function(e){e&&(n.removeClass(this.shareZeroCountClass),i.text(e))},this))},_loadCount:function(e){var n=t.Deferred(),i=this._getCountUrl(e);if(!i)return n.resolve(0).promise();var o=t.proxy(function(t){n.resolve(this._getCountValue(t,e))},this);return t.getJSON(i).done(o).fail(function(){t.get(i).done(o).fail(function(){n.resolve(0)})}),n.promise()},_getCountUrl:function(e){var t=s(e.countUrl,e);return this._formatShareUrl(t,e)},_getCountValue:function(e,n){var i=(t.isFunction(n.getCount)?n.getCount(e):e)||0;return"string"==typeof i?i:this._formatNumber(i)},_formatNumber:function(e){return t.each(c,function(t,n){return e>=n?(e=parseFloat((e/n).toFixed(2))+t,!1):void 0}),e},_formatShareUrl:function(t,n){return t.replace(l,function(t,i,o){var r=n[o]||"";return r?(i||"")+e.encodeURIComponent(r):""})},_clear:function(){e.clearTimeout(this._resizeTimer),this._$element.empty()},_passOptionToShares:function(e,n){var i=this.shares;t.each(["url","text"],function(o,r){r===e&&t.each(i,function(t,i){i[e]=n})})},_normalizeShare:function(e){return t.isNumeric(e)?this.shares[e]:"string"==typeof e?t.grep(this.shares,function(t){return t.share===e})[0]:e},refresh:function(){this._render()},destroy:function(){this._clear(),this._detachWindowResizeCallback(),this._$element.removeClass(this.elementClass).removeData(r)},option:function(e,t){return 1===arguments.length?this[e]:(this[e]=t,this._passOptionToShares(e,t),void this.refresh())},shareOption:function(e,t,n){return e=this._normalizeShare(e),2===arguments.length?e[t]:(e[t]=n,void this.refresh())}},t.fn.jsSocials=function(e){var o=t.makeArray(arguments),s=o.slice(1),a=this;return this.each(function(){var o,l=t(this),c=l.data(r);if(c)if("string"==typeof e){if(o=c[e].apply(c,s),o!==n&&o!==c)return a=o,!1}else c._detachWindowResizeCallback(),c._init(e),c._render();else new i(l,e)}),a};var d=function(e){var n;t.isPlainObject(e)?n=i.prototype:(n=u[e],e=arguments[1]||{}),t.extend(n,e)},h={popup:function(n){return t("<a>").attr("href","#").on("click",function(){return e.open(n.shareUrl,null,"width=600, height=400, location=0, menubar=0, resizeable=0, scrollbars=0, status=0, titlebar=0, toolbar=0"),!1})},blank:function(e){return t("<a>").attr({target:"_blank",href:e.shareUrl})},self:function(e){return t("<a>").attr({target:"_self",href:e.shareUrl})}};e.jsSocials={Socials:i,shares:u,shareStrategies:h,setDefaults:d}}(window,jQuery),function(e,t,n){t.extend(n.shares,{email:{label:"E-mail",logo:"fa fa-at",shareUrl:"mailto:{to}?subject={text}&body={url}",countUrl:"",shareIn:"self"},twitter:{label:"Tweet",logo:"fa fa-twitter",shareUrl:"https://twitter.com/share?url={url}&text={text}&via={via}&hashtags={hashtags}",countUrl:""},facebook:{label:"Like",logo:"fa fa-facebook",shareUrl:"https://facebook.com/sharer/sharer.php?u={url}",countUrl:"https://graph.facebook.com/?id={url}",getCount:function(e){return e.share&&e.share.share_count||0}},vkontakte:{label:"Like",logo:"fa fa-vk",shareUrl:"https://vk.com/share.php?url={url}&title={title}&description={text}",countUrl:"https://vk.com/share.php?act=count&index=1&url={url}",getCount:function(e){return parseInt(e.slice(15,-2).split(", ")[1])}},googleplus:{label:"+1",logo:"fa fa-google",shareUrl:"https://plus.google.com/share?url={url}",countUrl:""},linkedin:{label:"Share",logo:"fa fa-linkedin",shareUrl:"https://www.linkedin.com/shareArticle?mini=true&url={url}",countUrl:"https://www.linkedin.com/countserv/count/share?format=jsonp&url={url}&callback=?",getCount:function(e){return e.count}},pinterest:{label:"Pin it",logo:"fa fa-pinterest",shareUrl:"https://pinterest.com/pin/create/bookmarklet/?media={media}&url={url}&description={text}",countUrl:"https://api.pinterest.com/v1/urls/count.json?&url={url}&callback=?",getCount:function(e){return e.count}},stumbleupon:{label:"Share",logo:"fa fa-stumbleupon",shareUrl:"http://www.stumbleupon.com/submit?url={url}&title={title}",countUrl:"https://cors-anywhere.herokuapp.com/https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}",getCount:function(e){return e.result.views}},telegram:{label:"Telegram",logo:"fa fa-paper-plane",shareUrl:"tg://msg?text={url} {text}",countUrl:"",shareIn:"self"},whatsapp:{label:"WhatsApp",logo:"fa fa-whatsapp",shareUrl:"whatsapp://send?text={url} {text}",countUrl:"",shareIn:"self"},line:{label:"LINE",logo:"fa fa-comment",shareUrl:"http://line.me/R/msg/text/?{text} {url}",countUrl:""},viber:{label:"Viber",logo:"fa fa-volume-control-phone",shareUrl:"viber://forward?text={url} {text}",countUrl:"",shareIn:"self"},pocket:{label:"Pocket",logo:"fa fa-get-pocket",shareUrl:"https://getpocket.com/save?url={url}&title={title}",countUrl:""},messenger:{label:"Share",logo:"fa fa-commenting",shareUrl:"fb-messenger://share?link={url}",countUrl:"",shareIn:"self"}})}(window,jQuery,window.jsSocials),function(e){var t={url:!1,callback:!1,target:!1,duration:120,on:"mouseover",touch:!0,onZoomIn:!1,onZoomOut:!1,magnify:1};e.zoom=function(t,n,i,o){var r,s,a,l,c,u,d,h=e(t),p=h.css("position"),f=e(n);return t.style.position=/(absolute|fixed)/.test(p)?p:"relative",t.style.overflow="hidden",i.style.width=i.style.height="",e(i).addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:i.width*o,height:i.height*o,border:"none",maxWidth:"none",maxHeight:"none"}).appendTo(t),{init:function(){s=h.outerWidth(),r=h.outerHeight(),n===t?(l=s,a=r):(l=f.outerWidth(),a=f.outerHeight()),c=(i.width-s)/l,u=(i.height-r)/a,d=f.offset()},move:function(e){var t=e.pageX-d.left,n=e.pageY-d.top;n=Math.max(Math.min(n,a),0),t=Math.max(Math.min(t,l),0),i.style.left=t*-c+"px",i.style.top=n*-u+"px"}}},e.fn.zoom=function(n){return this.each(function(){var i=e.extend({},t,n||{}),o=i.target&&e(i.target)[0]||this,r=this,s=e(r),a=document.createElement("img"),l=e(a),c="mousemove.zoom",u=!1,d=!1;if(!i.url){var h=r.querySelector("img");if(h&&(i.url=h.getAttribute("data-src")||h.currentSrc||h.src),!i.url)return}s.one("zoom.destroy",function(e,t){s.off(".zoom"),o.style.position=e,o.style.overflow=t,a.onload=null,l.remove()}.bind(this,o.style.position,o.style.overflow)),a.onload=function(){function t(t){h.init(),h.move(t),l.stop().fadeTo(e.support.opacity?i.duration:0,1,!!e.isFunction(i.onZoomIn)&&i.onZoomIn.call(a))}function n(){l.stop().fadeTo(i.duration,0,!!e.isFunction(i.onZoomOut)&&i.onZoomOut.call(a))}var h=e.zoom(o,r,a,i.magnify);"grab"===i.on?s.on("mousedown.zoom",function(i){1===i.which&&(e(document).one("mouseup.zoom",function(){n(),e(document).off(c,h.move)}),t(i),e(document).on(c,h.move),i.preventDefault())}):"click"===i.on?s.on("click.zoom",function(i){return u?void 0:(u=!0,t(i),e(document).on(c,h.move),e(document).one("click.zoom",function(){n(),u=!1,e(document).off(c,h.move)}),!1)}):"toggle"===i.on?s.on("click.zoom",function(e){u?n():t(e),u=!u}):"mouseover"===i.on&&(h.init(),s.on("mouseenter.zoom",t).on("mouseleave.zoom",n).on(c,h.move)),i.touch&&s.on("touchstart.zoom",function(e){e.preventDefault(),d?(d=!1,n()):(d=!0,t(e.originalEvent.touches[0]||e.originalEvent.changedTouches[0]))}).on("touchmove.zoom",function(e){e.preventDefault(),h.move(e.originalEvent.touches[0]||e.originalEvent.changedTouches[0])}).on("touchend.zoom",function(e){e.preventDefault(),d&&(d=!1,n())}),e.isFunction(i.callback)&&i.callback.call(a)},a.setAttribute("role","presentation"),a.alt="",a.src=i.url})},e.fn.zoom.defaults=t}(window.jQuery),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(function(){try{return require("moment")}catch(e){}}()):"function"==typeof define&&define.amd?define(["require"],function(e){return t(function(){try{return e("moment")}catch(e){}}())}):e.Chart=t(e.moment)}(this,function(e){"use strict";function t(e){var t,n,i=e[0]/255,o=e[1]/255,r=e[2]/255,s=Math.min(i,o,r),a=Math.max(i,o,r),l=a-s;return a==s?t=0:i==a?t=(o-r)/l:o==a?t=2+(r-i)/l:r==a&&(t=4+(i-o)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(s+a)/2,[t,100*(a==s?0:n<=.5?l/(a+s):l/(2-a-s)),100*n]}function n(e){var t,n,i=e[0],o=e[1],r=e[2],s=Math.min(i,o,r),a=Math.max(i,o,r),l=a-s;return n=0==a?0:l/a*1e3/10,a==s?t=0:i==a?t=(o-r)/l:o==a?t=2+(r-i)/l:r==a&&(t=4+(i-o)/l),(t=Math.min(60*t,360))<0&&(t+=360),[t,n,a/255*1e3/10]}function i(e){var n=e[0],i=e[1],o=e[2];return[t(e)[0],1/255*Math.min(n,Math.min(i,o))*100,100*(o=1-1/255*Math.max(n,Math.max(i,o)))]}function o(e){var t,n=e[0]/255,i=e[1]/255,o=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-i,1-o)))/(1-t)||0),100*((1-i-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]}function s(e){return Ne[JSON.stringify(e)]}function a(e){var t=e[0]/255,n=e[1]/255,i=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*t+.7152*n+.0722*i),100*(.0193*t+.1192*n+.9505*i)]}function l(e){var t=a(e),n=t[0],i=t[1],o=t[2];return i/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function c(e){var t,n,i,o,r,s=e[0]/360,a=e[1]/100,l=e[2]/100;if(0==a)return[r=255*l,r,r];t=2*l-(n=l<.5?l*(1+a):l+a-l*a),o=[0,0,0];for(var c=0;c<3;c++)(i=s+1/3*-(c-1))<0&&i++,i>1&&i--,r=6*i<1?t+6*(n-t)*i:2*i<1?n:3*i<2?t+(n-t)*(2/3-i)*6:t,o[c]=255*r;return o}function u(e){var t=e[0]/60,n=e[1]/100,i=e[2]/100,o=Math.floor(t)%6,r=t-Math.floor(t),s=255*i*(1-n),a=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,o){case 0:return[i,l,s];case 1:return[a,i,s];case 2:return[s,i,l];case 3:return[s,a,i];case 4:return[l,s,i];case 5:return[i,s,a]}}function d(e){var t,n,i,o,s=e[0]/360,a=e[1]/100,l=e[2]/100,c=a+l;switch(c>1&&(a/=c,l/=c),i=6*s-(t=Math.floor(6*s)),0!=(1&t)&&(i=1-i),o=a+i*((n=1-l)-a),t){default:case 6:case 0:r=n,g=o,b=a;break;case 1:r=o,g=n,b=a;break;case 2:r=a,g=n,b=o;break;case 3:r=a,g=o,b=n;break;case 4:r=o,g=a,b=n;break;case 5:r=n,g=a,b=o}return[255*r,255*g,255*b]}function h(e){var t=e[0]/100,n=e[1]/100,i=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,i*(1-o)+o))]}function p(e){var t,n,i,o=e[0]/100,r=e[1]/100,s=e[2]/100;return n=-.9689*o+1.8758*r+.0415*s,
i=.0557*o+-.204*r+1.057*s,t=(t=3.2406*o+-1.5372*r+-.4986*s)>.0031308?1.055*Math.pow(t,1/2.4)-.055:t*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]}function f(e){var t=e[0],n=e[1],i=e[2];return n/=100,i/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]}function m(e){var t,n,i,o,r=e[0],s=e[1],a=e[2];return r<=8?o=(n=100*r/903.3)/100*7.787+16/116:(n=100*Math.pow((r+16)/116,3),o=Math.pow(n/100,1/3)),[t=t/95.047<=.008856?t=95.047*(s/500+o-16/116)/7.787:95.047*Math.pow(s/500+o,3),n,i=i/108.883<=.008859?i=108.883*(o-a/200-16/116)/7.787:108.883*Math.pow(o-a/200,3)]}function v(e){var t,n=e[0],i=e[1],o=e[2];return(t=360*Math.atan2(o,i)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(i*i+o*o),t]}function _(e){return p(m(e))}function y(e){var t,n=e[0],i=e[1];return t=e[2]/360*2*Math.PI,[n,i*Math.cos(t),i*Math.sin(t)]}function w(e){return Le[e]}function x(e){if(e){var t=[0,0,0],n=1,i=e.match(/^#([a-fA-F0-9]{3,4})$/i),o="";if(i){o=(i=i[1])[3];for(var r=0;r<t.length;r++)t[r]=parseInt(i[r]+i[r],16);o&&(n=Math.round(parseInt(o+o,16)/255*100)/100)}else if(i=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(o=i[2],i=i[1],r=0;r<t.length;r++)t[r]=parseInt(i.slice(2*r,2*r+2),16);o&&(n=Math.round(parseInt(o,16)/255*100)/100)}else if(i=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<t.length;r++)t[r]=parseInt(i[r+1]);n=parseFloat(i[4])}else if(i=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<t.length;r++)t[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=e.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(t=Ye[i[1]]))return}for(r=0;r<t.length;r++)t[r]=P(t[r],0,255);return n=n||0==n?P(n,0,1):1,t[3]=n,t}}function k(e){if(e){var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[P(parseInt(t[1]),0,360),P(parseFloat(t[2]),0,100),P(parseFloat(t[3]),0,100),P(isNaN(n)?1:n,0,1)]}}}function C(e){if(e){var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[P(parseInt(t[1]),0,360),P(parseFloat(t[2]),0,100),P(parseFloat(t[3]),0,100),P(isNaN(n)?1:n,0,1)]}}}function S(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function T(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function E(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function P(e,t,n){return Math.min(Math.max(t,e),n)}function A(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}function D(e,t){var n=e._chartjs;if(n){var i=n.listeners,o=i.indexOf(t);-1!==o&&i.splice(o,1),i.length>0||(Tt.forEach(function(t){delete e[t]}),delete e._chartjs)}}function I(e){var t=this._view;return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}function $(e){return e&&void 0!==e.width}function O(e){var t,n,i,o,r;return $(e)?(r=e.width/2,t=e.x-r,n=e.x+r,i=Math.min(e.y,e.base),o=Math.max(e.y,e.base)):(r=e.height/2,t=Math.min(e.x,e.base),n=Math.max(e.x,e.base),i=e.y-r,o=e.y+r),{left:t,top:i,right:n,bottom:o}}function M(e,t,n){return e===t?n:e===n?t:e}function F(e,t,n){var i,o,r,s,a=e.borderWidth,l=function(e){var t=e.borderSkipped,n={};return t?(e.horizontal?e.base>e.x&&(t=M(t,"left","right")):e.base<e.y&&(t=M(t,"bottom","top")),n[t]=!0,n):n}(e);return mt.isObject(a)?(i=+a.top||0,o=+a.right||0,r=+a.bottom||0,s=+a.left||0):i=o=r=s=+a||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||o<0?0:o>t?t:o,b:l.bottom||r<0?0:r>n?n:r,l:l.left||s<0?0:s>t?t:s}}function R(e,t,n){var i=null===t,o=null===n,r=!(!e||i&&o)&&O(e);return r&&(i||t>=r.left&&t<=r.right)&&(o||n>=r.top&&n<=r.bottom)}function L(e,t){return Jt(e.showLine,t.showLines)}function N(e,t){return e.native?{x:e.x,y:e.y}:mt.getRelativePosition(e,t)}function B(e,t){var n,i,o,r,s;for(i=0,r=e.data.datasets.length;i<r;++i)if(e.isDatasetVisible(i))for(o=0,s=(n=e.getDatasetMeta(i)).data.length;o<s;++o){var a=n.data[o];a._view.skip||t(a)}}function U(e,t){var n=[];return B(e,function(e){e.inRange(t.x,t.y)&&n.push(e)}),n}function j(e,t,n,i){var o=Number.POSITIVE_INFINITY,r=[];return B(e,function(e){if(!n||e.inRange(t.x,t.y)){var s=e.getCenterPoint(),a=i(t,s);a<o?(r=[e],o=a):a===o&&r.push(e)}}),r}function z(e){var t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,i){var o=t?Math.abs(e.x-i.x):0,r=n?Math.abs(e.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function H(e,t,n){var i=N(t,e);n.axis=n.axis||"x";var o=z(n.axis),r=n.intersect?U(e,i):j(e,i,!1,o),s=[];return r.length?(e.data.datasets.forEach(function(t,n){if(e.isDatasetVisible(n)){var i=e.getDatasetMeta(n).data[r[0]._index];i&&!i._view.skip&&s.push(i)}}),s):[]}function W(e,t){return mt.where(e,function(e){return e.position===t})}function q(e,t){e.forEach(function(e,t){return e._tmpIndex_=t,e}),e.sort(function(e,n){var i=t?n:e,o=t?e:n;return i.weight===o.weight?i._tmpIndex_-o._tmpIndex_:i.weight-o.weight}),e.forEach(function(e){delete e._tmpIndex_})}function V(e,t){mt.each(e,function(e){t[e.position]+=e.isHorizontal()?e.height:e.width})}function Y(e,t){var n=mt.getStyle(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}function G(e,t,n){e.addEventListener(t,n,bn)}function X(e,t,n){e.removeEventListener(t,n,bn)}function K(e,t,n,i,o){return{type:e,chart:t,native:o||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Q(e){var t=document.createElement("div");return t.className=e||"",t}function J(e,t,n){var i,o,r,s,a=e[fn]||(e[fn]={}),l=a.resizer=function(e){var t=Q(gn),n=Q(gn+"-expand"),i=Q(gn+"-shrink");n.appendChild(Q()),i.appendChild(Q()),t.appendChild(n),t.appendChild(i),t._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var o=function(){t._reset(),e()};return G(n,"scroll",o.bind(n,"expand")),G(i,"scroll",o.bind(i,"shrink")),t}((i=function(){if(a.resizer){var i=n.options.maintainAspectRatio&&e.parentNode,o=i?i.clientWidth:0;t(K("resize",n)),i&&i.clientWidth<o&&n.canvas&&t(K("resize",n))}},r=!1,s=[],function(){s=Array.prototype.slice.call(arguments),o=o||this,r||(r=!0,mt.requestAnimFrame.call(window,function(){r=!1,i.apply(o,s)}))}));!function(e,t){var n=e[fn]||(e[fn]={}),i=n.renderProxy=function(e){e.animationName===vn&&t()};mt.each(_n,function(t){G(e,t,i)}),n.reflow=!!e.offsetParent,e.classList.add(mn)}(e,function(){if(a.resizer){var t=e.parentNode;t&&t!==l.parentNode&&t.insertBefore(l,t.firstChild),l._reset()}})}function Z(e){var t=e[fn]||{},n=t.resizer;delete t.resizer,function(e){var t=e[fn]||{},n=t.renderProxy;n&&(mt.each(_n,function(t){X(e,t,n)}),delete t.renderProxy),e.classList.remove(mn)}(e),n&&n.parentNode&&n.parentNode.removeChild(n)}function ee(e,t){return t&&(mt.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function te(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function ne(e){var t=pt.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Tn(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Tn(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Tn(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Tn(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Tn(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Tn(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Tn(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Tn(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Tn(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function ie(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function oe(e){return ee([],te(e))}function re(){return mt.merge({},[].slice.call(arguments),{merger:function(e,t,n,i){if("xAxes"===e||"yAxes"===e){var o,r,s,a=n[e].length;for(t[e]||(t[e]=[]),o=0;o<a;++o)s=n[e][o],r=In(s.type,"xAxes"===e?"category":"linear"),o>=t[e].length&&t[e].push({}),!t[e][o].type||s.type&&s.type!==t[e][o].type?mt.merge(t[e][o],[Sn.getScaleDefaults(r),s]):mt.merge(t[e][o],s)}else mt._merger(e,t,n,i)}})}function se(){return mt.merge({},[].slice.call(arguments),{merger:function(e,t,n,i){var o=t[e]||{},r=n[e];"scales"===e?t[e]=re(o,r):"scale"===e?t[e]=mt.merge(o,[Sn.getScaleDefaults(r.type),r]):mt._merger(e,t,n,i)}})}function ae(e){return"top"===e||"bottom"===e}function le(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function ce(e){this.options=e||{}}function ue(e){var t,n,i=[];for(t=0,n=e.length;t<n;++t)i.push(e[t].label);return i}function de(e,t,n){return mt.isArray(t)?mt.longestText(e,n,t):e.measureText(t).width}function he(e,t){return mt.isFinite(e)&&e>=0?e:t}function pe(e){var t=e.options;return t.angleLines.display||t.pointLabels.display?e.chart.data.labels.length:0}function fe(e){var t=e.ticks;return t.display&&e.display?Qn(t.fontSize,pt.global.defaultFontSize)+2*t.backdropPaddingY:0}function ge(e,t,n,i,o){return e===i||e===o?{start:t-n/2,end:t+n/2}:e<i||e>o?{start:t-n,end:t}:{start:t,end:t+n}}function me(e){return 0===e||180===e?"center":e<180?"left":"right"}function ve(e,t,n,i){var o,r,s=n.y+i/2;if(mt.isArray(t))for(o=0,r=t.length;o<r;++o)e.fillText(t[o],n.x,s),s+=i;else e.fillText(t,n.x,s)}function _e(e,t,n){90===e||270===e?n.y-=t.h/2:(e>270||e<90)&&(n.y-=t.h)}function ye(e){return mt.isNumber(e)?e:0}function be(e,t){return e-t}function we(e){var t,n,i,o={},r=[];for(t=0,n=e.length;t<n;++t)o[i=e[t]]||(o[i]=!0,r.push(i));return r}function xe(e,t,n,i){var o=function(e,t,n){for(var i,o,r,s=0,a=e.length-1;s>=0&&s<=a;){if(o=e[(i=s+a>>1)-1]||null,r=e[i],!o)return{lo:null,hi:r};if(r[t]<n)s=i+1;else{if(!(o[t]>n))return{lo:o,hi:r};a=i-1}}return{lo:r,hi:null}}(e,t,n),r=o.lo?o.hi?o.lo:e[e.length-2]:e[0],s=o.lo?o.hi?o.hi:e[e.length-1]:e[1],a=s[t]-r[t],l=a?(n-r[t])/a:0,c=(s[i]-r[i])*l;return r[i]+c}function ke(e,t){var n=e._adapter,i=e.options.time,o=i.parser,r=o||i.format,s=t;return"function"==typeof o&&(s=o(s)),mt.isFinite(s)||(s="string"==typeof r?n.parse(s,r):n.parse(s)),null!==s?+s:(o||"function"!=typeof r||(s=r(t),mt.isFinite(s)||(s=n.parse(s))),s)}function Ce(e,t){if(mt.isNullOrUndef(t))return null;var n=e.options.time,i=ke(e,e.getRightValue(t));return null===i?i:(n.round&&(i=+e._adapter.startOf(i,n.round)),i)}function Se(e){for(var t=ai.indexOf(e)+1,n=ai.length;t<n;++t)if(si[ai[t]].common)return ai[t]}function Te(e,t,n,i){var o,r=e._adapter,s=e.options,a=s.time,l=a.unit||function(e,t,n,i){var o,r,s,a=ai.length;for(o=ai.indexOf(e);o<a-1;++o)if(s=(r=si[ai[o]]).steps?r.steps[r.steps.length-1]:ri,r.common&&Math.ceil((n-t)/(s*r.size))<=i)return ai[o];return ai[a-1]}(a.minUnit,t,n,i),c=Se(l),u=ii(a.stepSize,a.unitStepSize),d="week"===l&&a.isoWeekday,h=s.ticks.major.enabled,p=si[l],f=t,g=n,m=[];for(u||(u=function(e,t,n,i){var o,r,s,a=t-e,l=si[n],c=l.size,u=l.steps;if(!u)return Math.ceil(a/(i*c));for(o=0,r=u.length;o<r&&(s=u[o],!(Math.ceil(a/(c*s))<=i));++o);return s}(t,n,l,i)),d&&(f=+r.startOf(f,"isoWeek",d),g=+r.startOf(g,"isoWeek",d)),f=+r.startOf(f,d?"day":l),(g=+r.startOf(g,d?"day":l))<n&&(g=+r.add(g,1,l)),o=f,h&&c&&!d&&!a.round&&(o=+r.startOf(o,c),o=+r.add(o,~~((f-o)/(p.size*u))*u,l));o<g;o=+r.add(o,u,l))m.push(+o);return m.push(+o),m}function Ee(e,t,n){var i,o=e._model||{},r=o.fill;if(void 0===r&&(r=!!o.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=t+i),!(i===t||i<0||i>=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function Pe(e){var t,n=e.el._model||{},i=e.el._scale||{},o=e.fill,r=null;if(isFinite(o))return null;if("start"===o?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===o?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePosition?r=i.getBasePosition():i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(mt.isFinite(r))return{x:(t=i.isHorizontal())?r:null,y:t?null:r}}return null}function Ae(e,t,n){var i,o=e[t].fill,r=[t];if(!n)return o;for(;!1!==o&&-1===r.indexOf(o);){if(!isFinite(o))return o;if(!(i=e[o]))return!1;if(i.visible)return o;r.push(o),o=i.fill}return!1}function De(e){var t=e.fill,n="dataset";return!1===t?null:(isFinite(t)||(n="boundary"),hi[n](e))}function Ie(e){return e&&!e.skip}function $e(e,t,n,i,o){var r;if(i&&o){for(e.moveTo(t[0].x,t[0].y),r=1;r<i;++r)mt.canvas.lineTo(e,t[r-1],t[r]);for(e.lineTo(n[o-1].x,n[o-1].y),r=o-1;r>0;--r)mt.canvas.lineTo(e,n[r],n[r-1],!0)}}function Oe(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}function Me(e,t){var n=new mi({ctx:e.ctx,options:t,chart:e});hn.configure(e,n,t),hn.addBox(e,n),e.legend=n}function Fe(e,t){var n=new yi({ctx:e.ctx,options:t,chart:e});hn.configure(e,n,t),hn.addBox(e,n),e.titleBlock=n}e=e&&e.hasOwnProperty("default")?e.default:e;var Re={rgb2hsl:t,rgb2hsv:n,rgb2hwb:i,rgb2cmyk:o,rgb2keyword:s,rgb2xyz:a,rgb2lab:l,rgb2lch:function(e){return v(l(e))},hsl2rgb:c,hsl2hsv:function(e){var t=e[0],n=e[1]/100,i=e[2]/100;return 0===i?[0,0,0]:[t,2*(n*=(i*=2)<=1?i:2-i)/(i+n)*100,(i+n)/2*100]},hsl2hwb:function(e){return i(c(e))},hsl2cmyk:function(e){return o(c(e))},hsl2keyword:function(e){return s(c(e))},hsv2rgb:u,hsv2hsl:function(e){var t,n,i=e[0],o=e[1]/100,r=e[2]/100;return t=o*r,[i,100*(t=(t/=(n=(2-o)*r)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(e){return i(u(e))},hsv2cmyk:function(e){return o(u(e))},hsv2keyword:function(e){return s(u(e))},hwb2rgb:d,hwb2hsl:function(e){return t(d(e))},hwb2hsv:function(e){return n(d(e))},hwb2cmyk:function(e){return o(d(e))},hwb2keyword:function(e){return s(d(e))},cmyk2rgb:h,cmyk2hsl:function(e){return t(h(e))},cmyk2hsv:function(e){return n(h(e))},cmyk2hwb:function(e){return i(h(e))},cmyk2keyword:function(e){return s(h(e))},keyword2rgb:w,keyword2hsl:function(e){return t(w(e))},keyword2hsv:function(e){return n(w(e))},keyword2hwb:function(e){return i(w(e))},keyword2cmyk:function(e){return o(w(e))},keyword2lab:function(e){return l(w(e))},keyword2xyz:function(e){return a(w(e))},xyz2rgb:p,xyz2lab:f,xyz2lch:function(e){return v(f(e))},lab2xyz:m,lab2rgb:_,lab2lch:v,lch2lab:y,lch2xyz:function(e){return m(y(e))},lch2rgb:function(e){return _(y(e))}},Le={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],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],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],rebeccapurple:[102,51,153],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]},Ne={};for(var Be in Le)Ne[JSON.stringify(Le[Be])]=Be;var Ue=function(){return new qe};for(var je in Re){Ue[je+"Raw"]=function(e){return function(t){return"number"==typeof t&&(t=Array.prototype.slice.call(arguments)),Re[e](t)}}(je);var ze=/(\w+)2(\w+)/.exec(je),He=ze[1],We=ze[2];(Ue[He]=Ue[He]||{})[We]=Ue[je]=function(e){return function(t){"number"==typeof t&&(t=Array.prototype.slice.call(arguments));var n=Re[e](t);if("string"==typeof n||void 0===n)return n;for(var i=0;i<n.length;i++)n[i]=Math.round(n[i]);return n}}(je)}var qe=function(){this.convs={}};qe.prototype.routeSpace=function(e,t){var n=t[0];return void 0===n?this.getValues(e):("number"==typeof n&&(n=Array.prototype.slice.call(t)),this.setValues(e,n))},qe.prototype.setValues=function(e,t){return this.space=e,this.convs={},this.convs[e]=t,this},qe.prototype.getValues=function(e){var t=this.convs[e];if(!t){var n=this.space,i=this.convs[n];t=Ue[n][e](i),this.convs[e]=t}return t},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(e){qe.prototype[e]=function(t){return this.routeSpace(e,arguments)}});var Ve=Ue,Ye={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],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],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],rebeccapurple:[102,51,153],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]},Ge={getRgba:x,getHsla:k,getRgb:function(e){var t=x(e);return t&&t.slice(0,3)},getHsl:function(e){var t=k(e);return t&&t.slice(0,3)},getHwb:C,getAlpha:function(e){var t=x(e);return t?t[3]:(t=k(e))?t[3]:(t=C(e))?t[3]:void 0},hexString:function(e,t){t=void 0!==t&&3===e.length?t:e[3];return"#"+A(e[0])+A(e[1])+A(e[2])+(t>=0&&t<1?A(Math.round(255*t)):"")},rgbString:function(e,t){return t<1||e[3]&&e[3]<1?S(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:S,percentString:function(e,t){if(t<1||e[3]&&e[3]<1)return T(e,t);var n=Math.round(e[0]/255*100),i=Math.round(e[1]/255*100),o=Math.round(e[2]/255*100);return"rgb("+n+"%, "+i+"%, "+o+"%)"},percentaString:T,hslString:function(e,t){return t<1||e[3]&&e[3]<1?E(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:E,hwbString:function(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return Xe[e.slice(0,3)]}},Xe={};for(var Ke in Ye)Xe[Ye[Ke]]=Ke;var Qe=function(e){return e instanceof Qe?e:this instanceof Qe?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=Ge.getRgba(e))?this.setValues("rgb",t):(t=Ge.getHsla(e))?this.setValues("hsl",t):(t=Ge.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new Qe(e);var t};Qe.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return Ge.hexString(this.values.rgb)},rgbString:function(){return Ge.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return Ge.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return Ge.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return Ge.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return Ge.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return Ge.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return Ge.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n<e.length;n++){var i=e[n]/255;t[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=e,i=void 0===t?.5:t,o=2*i-1,r=this.alpha()-n.alpha(),s=((o*r==-1?o:(o+r)/(1+o*r))+1)/2,a=1-s;return this.rgb(s*this.red()+a*n.red(),s*this.green()+a*n.green(),s*this.blue()+a*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new Qe,i=this.values,o=n.values;for(var r in i)i.hasOwnProperty(r)&&(e=i[r],"[object Array]"===(t={}.toString.call(e))?o[r]=e.slice(0):"[object Number]"===t?o[r]=e:console.error("unexpected color value:",e));return n}},Qe.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},Qe.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},Qe.prototype.getValues=function(e){for(var t=this.values,n={},i=0;i<e.length;i++)n[e.charAt(i)]=t[e][i];return 1!==t.alpha&&(n.a=t.alpha),n},Qe.prototype.setValues=function(e,t){var n,i,o=this.values,r=this.spaces,s=this.maxes,a=1;if(this.valid=!0,"alpha"===e)a=t;else if(t.length)o[e]=t.slice(0,e.length),a=t[e.length];else if(void 0!==t[e.charAt(0)]){for(n=0;n<e.length;n++)o[e][n]=t[e.charAt(n)];a=t.a}else if(void 0!==t[r[e][0]]){var l=r[e];for(n=0;n<e.length;n++)o[e][n]=t[l[n]];a=t.alpha}if(o.alpha=Math.max(0,Math.min(1,void 0===a?o.alpha:a)),"alpha"===e)return!1;for(n=0;n<e.length;n++)i=Math.max(0,Math.min(s[e][n],o[e][n])),o[e][n]=Math.round(i);for(var c in r)c!==e&&(o[c]=Ve[e][c](o[e]));return!0},Qe.prototype.setSpace=function(e,t){var n=t[0];return void 0===n?this.getValues(e):("number"==typeof n&&(n=Array.prototype.slice.call(t)),this.setValues(e,n),this)},Qe.prototype.setChannel=function(e,t,n){var i=this.values[e];return void 0===n?i[t]:n===i[t]?this:(i[t]=n,this.setValues(e,i),this)},"undefined"!=typeof window&&(window.Color=Qe);var Je,Ze=Qe,et={noop:function(){},uid:(Je=0,function(){return Je++}),isNullOrUndef:function(e){return null==e},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)},isObject:function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},isFinite:function(e){return("number"==typeof e||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return void 0===e?t:e},valueAtIndexOrDefault:function(e,t,n){return et.valueOrDefault(et.isArray(e)?e[t]:e,n)},callback:function(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)},each:function(e,t,n,i){var o,r,s;if(et.isArray(e))if(r=e.length,i)for(o=r-1;o>=0;o--)t.call(n,e[o],o);else for(o=0;o<r;o++)t.call(n,e[o],o);else if(et.isObject(e))for(r=(s=Object.keys(e)).length,o=0;o<r;o++)t.call(n,e[s[o]],s[o])},arrayEquals:function(e,t){var n,i,o,r;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(o=e[n],r=t[n],o instanceof Array&&r instanceof Array){if(!et.arrayEquals(o,r))return!1}else if(o!==r)return!1;return!0},clone:function(e){if(et.isArray(e))return e.map(et.clone);if(et.isObject(e)){for(var t={},n=Object.keys(e),i=n.length,o=0;o<i;++o)t[n[o]]=et.clone(e[n[o]]);return t}return e},_merger:function(e,t,n,i){var o=t[e],r=n[e];et.isObject(o)&&et.isObject(r)?et.merge(o,r,i):t[e]=et.clone(r)},_mergerIf:function(e,t,n){var i=t[e],o=n[e]
;et.isObject(i)&&et.isObject(o)?et.mergeIf(i,o):t.hasOwnProperty(e)||(t[e]=et.clone(o))},merge:function(e,t,n){var i,o,r,s,a,l=et.isArray(t)?t:[t],c=l.length;if(!et.isObject(e))return e;for(i=(n=n||{}).merger||et._merger,o=0;o<c;++o)if(t=l[o],et.isObject(t))for(a=0,s=(r=Object.keys(t)).length;a<s;++a)i(r[a],e,t,n);return e},mergeIf:function(e,t){return et.merge(e,t,{merger:et._mergerIf})},extend:function(e){for(var t=function(t,n){e[n]=t},n=1,i=arguments.length;n<i;++n)et.each(arguments[n],t);return e},inherits:function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=t.prototype,n.prototype=new i,n.extend=et.inherits,e&&et.extend(n.prototype,e),n.__super__=t.prototype,n}},tt=et;et.callCallback=et.callback,et.indexOf=function(e,t,n){return Array.prototype.indexOf.call(e,t,n)},et.getValueOrDefault=et.valueOrDefault,et.getValueAtIndexOrDefault=et.valueAtIndexOrDefault;var nt={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,i=1;return 0===e?0:1===e?1:(n||(n=.3),i<1?(i=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,i=1;return 0===e?0:1===e?1:(n||(n=.3),i<1?(i=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,i=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),i<1?(i=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/i),e<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-nt.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*nt.easeInBounce(2*e):.5*nt.easeOutBounce(2*e-1)+.5}},it={effects:nt};tt.easingEffects=nt;var ot=Math.PI,rt=ot/180,st=2*ot,at=ot/2,lt=ot/4,ct=2*ot/3,ut={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,i,o,r){if(r){var s=Math.min(r,o/2,i/2),a=t+s,l=n+s,c=t+i-s,u=n+o-s;e.moveTo(t,l),a<c&&l<u?(e.arc(a,l,s,-ot,-at),e.arc(c,l,s,-at,0),e.arc(c,u,s,0,at),e.arc(a,u,s,at,ot)):a<c?(e.moveTo(a,n),e.arc(c,l,s,-at,at),e.arc(a,l,s,at,ot+at)):l<u?(e.arc(a,l,s,-ot,0),e.arc(a,u,s,0,ot)):e.arc(a,l,s,-ot,ot),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,i,o)},drawPoint:function(e,t,n,i,o,r){var s,a,l,c,u,d=(r||0)*rt;if(!t||"object"!=typeof t||"[object HTMLImageElement]"!==(s=t.toString())&&"[object HTMLCanvasElement]"!==s){if(!(isNaN(n)||n<=0)){switch(e.beginPath(),t){default:e.arc(i,o,n,0,st),e.closePath();break;case"triangle":e.moveTo(i+Math.sin(d)*n,o-Math.cos(d)*n),d+=ct,e.lineTo(i+Math.sin(d)*n,o-Math.cos(d)*n),d+=ct,e.lineTo(i+Math.sin(d)*n,o-Math.cos(d)*n),e.closePath();break;case"rectRounded":c=n-(u=.516*n),a=Math.cos(d+lt)*c,l=Math.sin(d+lt)*c,e.arc(i-a,o-l,u,d-ot,d-at),e.arc(i+l,o-a,u,d-at,d),e.arc(i+a,o+l,u,d,d+at),e.arc(i-l,o+a,u,d+at,d+ot),e.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*n,e.rect(i-c,o-c,2*c,2*c);break}d+=lt;case"rectRot":a=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(i-a,o-l),e.lineTo(i+l,o-a),e.lineTo(i+a,o+l),e.lineTo(i-l,o+a),e.closePath();break;case"crossRot":d+=lt;case"cross":a=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(i-a,o-l),e.lineTo(i+a,o+l),e.moveTo(i+l,o-a),e.lineTo(i-l,o+a);break;case"star":a=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(i-a,o-l),e.lineTo(i+a,o+l),e.moveTo(i+l,o-a),e.lineTo(i-l,o+a),d+=lt,a=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(i-a,o-l),e.lineTo(i+a,o+l),e.moveTo(i+l,o-a),e.lineTo(i-l,o+a);break;case"line":a=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(i-a,o-l),e.lineTo(i+a,o+l);break;case"dash":e.moveTo(i,o),e.lineTo(i+Math.cos(d)*n,o+Math.sin(d)*n)}e.fill(),e.stroke()}}else e.drawImage(t,i-t.width/2,o-t.height/2,t.width,t.height)},_isPointInArea:function(e,t){return e.x>t.left-1e-6&&e.x<t.right+1e-6&&e.y>t.top-1e-6&&e.y<t.bottom+1e-6},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,n,i){var o=n.steppedLine;if(o){if("middle"===o){var r=(t.x+n.x)/2;e.lineTo(r,i?n.y:t.y),e.lineTo(r,i?t.y:n.y)}else"after"===o&&!i||"after"!==o&&i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}else n.tension?e.bezierCurveTo(i?t.controlPointPreviousX:t.controlPointNextX,i?t.controlPointPreviousY:t.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):e.lineTo(n.x,n.y)}},dt=ut;tt.clear=ut.clear,tt.drawRoundedRectangle=function(e){e.beginPath(),ut.roundedRect.apply(ut,arguments)};var ht={_set:function(e,t){return tt.merge(this[e]||(this[e]={}),t)}};ht._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var pt=ht,ft=tt.valueOrDefault,gt={toLineHeight:function(e,t){var n=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e},toPadding:function(e){var t,n,i,o;return tt.isObject(e)?(t=+e.top||0,n=+e.right||0,i=+e.bottom||0,o=+e.left||0):t=n=i=o=+e||0,{top:t,right:n,bottom:i,left:o,height:t+i,width:o+n}},_parseFont:function(e){var t=pt.global,n=ft(e.fontSize,t.defaultFontSize),i={family:ft(e.fontFamily,t.defaultFontFamily),lineHeight:tt.options.toLineHeight(ft(e.lineHeight,t.defaultLineHeight),n),size:n,style:ft(e.fontStyle,t.defaultFontStyle),weight:null,string:""};return i.string=function(e){return!e||tt.isNullOrUndef(e.size)||tt.isNullOrUndef(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(i),i},resolve:function(e,t,n){var i,o,r;for(i=0,o=e.length;i<o;++i)if(void 0!==(r=e[i])&&(void 0!==t&&"function"==typeof r&&(r=r(t)),void 0!==n&&tt.isArray(r)&&(r=r[n]),void 0!==r))return r}},mt=tt,vt=it,_t=dt,yt=gt;mt.easing=vt,mt.canvas=_t,mt.options=yt;var bt=function(e){mt.extend(this,e),this.initialize.apply(this,arguments)};mt.extend(bt.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var e=this;return e._view||(e._view=mt.clone(e._model)),e._start={},e},transition:function(e){var t=this,n=t._model,i=t._start,o=t._view;return n&&1!==e?(o||(o=t._view={}),i||(i=t._start={}),function(e,t,n,i){var o,r,s,a,l,c,u,d,h,p=Object.keys(n);for(o=0,r=p.length;o<r;++o)if(c=n[s=p[o]],t.hasOwnProperty(s)||(t[s]=c),(a=t[s])!==c&&"_"!==s[0]){if(e.hasOwnProperty(s)||(e[s]=a),(u=typeof c)==typeof(l=e[s]))if("string"===u){if((d=Ze(l)).valid&&(h=Ze(c)).valid){t[s]=h.mix(d,i).rgbString();continue}}else if(mt.isFinite(l)&&mt.isFinite(c)){t[s]=l+(c-l)*i;continue}t[s]=c}}(i,o,n,e),t):(t._view=n,t._start=null,t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return mt.isNumber(this._model.x)&&mt.isNumber(this._model.y)}}),bt.extend=mt.inherits;var wt=bt,xt=wt.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),kt=xt;Object.defineProperty(xt.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(xt.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),pt._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:mt.noop,onComplete:mt.noop}});var Ct={animations:[],request:null,addAnimation:function(e,t,n,i){var o,r,s=this.animations;for(t.chart=e,t.startTime=Date.now(),t.duration=n,i||(e.animating=!0),o=0,r=s.length;o<r;++o)if(s[o].chart===e)return void(s[o]=t);s.push(t),1===s.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=mt.findIndex(this.animations,function(t){return t.chart===e});-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var e=this;null===e.request&&(e.request=mt.requestAnimFrame.call(window,function(){e.request=null,e.startDigest()}))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var e,t,n,i,o=this.animations,r=0;r<o.length;)t=(e=o[r]).chart,n=e.numSteps,i=Math.floor((Date.now()-e.startTime)/e.duration*n)+1,e.currentStep=Math.min(i,n),mt.callback(e.render,[t,e],t),mt.callback(e.onAnimationProgress,[e],t),e.currentStep>=n?(mt.callback(e.onAnimationComplete,[e],t),t.animating=!1,o.splice(r,1)):++r}},St=mt.options.resolve,Tt=["push","pop","shift","splice","unshift"],Et=function(e,t){this.initialize(e,t)};mt.extend(Et.prototype,{datasetElementType:null,dataElementType:null,initialize:function(e,t){this.chart=e,this.index=t,this.linkScales(),this.addElements()},updateIndex:function(e){this.index=e},linkScales:function(){var e=this,t=e.getMeta(),n=e.getDataset();null!==t.xAxisID&&t.xAxisID in e.chart.scales||(t.xAxisID=n.xAxisID||e.chart.options.scales.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in e.chart.scales||(t.yAxisID=n.yAxisID||e.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this.update(!0)},destroy:function(){this._data&&D(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,n=this.getMeta(),i=this.getDataset().data||[],o=n.data;for(e=0,t=i.length;e<t;++e)o[e]=o[e]||this.createMetaData(e);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var e,t,n=this,i=n.getDataset(),o=i.data||(i.data=[]);n._data!==o&&(n._data&&D(n._data,n),o&&Object.isExtensible(o)&&(t=n,(e=o)._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Tt.forEach(function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),i=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),o=i.apply(this,t);return mt.each(e._chartjs.listeners,function(e){"function"==typeof e[n]&&e[n].apply(e,t)}),o}})}))),n._data=o),n.resyncElements()},update:mt.noop,transition:function(e){for(var t=this.getMeta(),n=t.data||[],i=n.length,o=0;o<i;++o)n[o].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],n=t.length,i=0;for(e.dataset&&e.dataset.draw();i<n;++i)t[i].draw()},removeHoverStyle:function(e){mt.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],n=e._index,i=e.custom||{},o=e._model,r=mt.getHoverColor;e.$previousStyle={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderWidth:o.borderWidth},o.backgroundColor=St([i.hoverBackgroundColor,t.hoverBackgroundColor,r(o.backgroundColor)],void 0,n),o.borderColor=St([i.hoverBorderColor,t.hoverBorderColor,r(o.borderColor)],void 0,n),o.borderWidth=St([i.hoverBorderWidth,t.hoverBorderWidth,o.borderWidth],void 0,n)},resyncElements:function(){var e=this.getMeta(),t=this.getDataset().data,n=e.data.length,i=t.length;i<n?e.data.splice(i,n-i):i>n&&this.insertElements(n,i-n)},insertElements:function(e,t){for(var n=0;n<t;++n)this.addElementAndReset(e+n)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),Et.extend=mt.inherits;var Pt=Et;pt._set("global",{elements:{arc:{backgroundColor:pt.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var At=wt.extend({inLabelRange:function(e){var t=this._view;return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var n=this._view;if(n){for(var i=mt.getAngleFromPoint(n,{x:e,y:t}),o=i.angle,r=i.distance,s=n.startAngle,a=n.endAngle;a<s;)a+=2*Math.PI;for(;o>a;)o-=2*Math.PI;for(;o<s;)o+=2*Math.PI;var l=o>=s&&o<=a,c=r>=n.innerRadius&&r<=n.outerRadius;return l&&c}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,i=n.startAngle,o=n.endAngle,r="inner"===n.borderAlign?.33:0;t.save(),t.beginPath(),t.arc(n.x,n.y,Math.max(n.outerRadius-r,0),i,o),t.arc(n.x,n.y,n.innerRadius,o,i,!0),t.closePath(),t.fillStyle=n.backgroundColor,t.fill(),n.borderWidth&&("inner"===n.borderAlign?(t.beginPath(),e=r/n.outerRadius,t.arc(n.x,n.y,n.outerRadius,i-e,o+e),n.innerRadius>r?(e=r/n.innerRadius,t.arc(n.x,n.y,n.innerRadius-r,o+e,i-e,!0)):t.arc(n.x,n.y,r,o+Math.PI/2,i-Math.PI/2),t.closePath(),t.clip(),t.beginPath(),t.arc(n.x,n.y,n.outerRadius,i,o),t.arc(n.x,n.y,n.innerRadius,o,i,!0),t.closePath(),t.lineWidth=2*n.borderWidth,t.lineJoin="round"):(t.lineWidth=n.borderWidth,t.lineJoin="bevel"),t.strokeStyle=n.borderColor,t.stroke()),t.restore()}}),Dt=mt.valueOrDefault,It=pt.global.defaultColor;pt._set("global",{elements:{line:{tension:.4,backgroundColor:It,borderWidth:3,borderColor:It,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var $t=wt.extend({draw:function(){var e,t,n,i,o=this._view,r=this._chart.ctx,s=o.spanGaps,a=this._children.slice(),l=pt.global,c=l.elements.line,u=-1;for(this._loop&&a.length&&a.push(a[0]),r.save(),r.lineCap=o.borderCapStyle||c.borderCapStyle,r.setLineDash&&r.setLineDash(o.borderDash||c.borderDash),r.lineDashOffset=Dt(o.borderDashOffset,c.borderDashOffset),r.lineJoin=o.borderJoinStyle||c.borderJoinStyle,r.lineWidth=Dt(o.borderWidth,c.borderWidth),r.strokeStyle=o.borderColor||l.defaultColor,r.beginPath(),u=-1,e=0;e<a.length;++e)t=a[e],n=mt.previousItem(a,e),i=t._view,0===e?i.skip||(r.moveTo(i.x,i.y),u=e):(n=-1===u?n:a[u],i.skip||(u!==e-1&&!s||-1===u?r.moveTo(i.x,i.y):mt.canvas.lineTo(r,n._view,t._view),u=e));r.stroke(),r.restore()}}),Ot=mt.valueOrDefault,Mt=pt.global.defaultColor;pt._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:Mt,borderColor:Mt,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var Ft=wt.extend({inRange:function(e,t){var n=this._view;return!!n&&Math.pow(e-n.x,2)+Math.pow(t-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:I,inXRange:I,inYRange:function(e){var t=this._view;return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,n=this._chart.ctx,i=t.pointStyle,o=t.rotation,r=t.radius,s=t.x,a=t.y,l=pt.global,c=l.defaultColor;t.skip||(void 0===e||mt.canvas._isPointInArea(t,e))&&(n.strokeStyle=t.borderColor||c,n.lineWidth=Ot(t.borderWidth,l.elements.point.borderWidth),n.fillStyle=t.backgroundColor||c,mt.canvas.drawPoint(n,i,r,s,a,o))}}),Rt=pt.global.defaultColor;pt._set("global",{elements:{rectangle:{backgroundColor:Rt,borderColor:Rt,borderSkipped:"bottom",borderWidth:0}}});var Lt=wt.extend({draw:function(){var e=this._chart.ctx,t=this._view,n=function(e){var t=O(e),n=t.right-t.left,i=t.bottom-t.top,o=F(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i},inner:{x:t.left+o.l,y:t.top+o.t,w:n-o.l-o.r,h:i-o.t-o.b}}}(t),i=n.outer,o=n.inner;e.fillStyle=t.backgroundColor,e.fillRect(i.x,i.y,i.w,i.h),i.w===o.w&&i.h===o.h||(e.save(),e.beginPath(),e.rect(i.x,i.y,i.w,i.h),e.clip(),e.fillStyle=t.borderColor,e.rect(o.x,o.y,o.w,o.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return R(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return $(n)?R(n,e,null):R(n,null,t)},inXRange:function(e){return R(this._view,e,null)},inYRange:function(e){return R(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return $(n)?(e=n.x,t=(n.y+n.base)/2):(e=(n.x+n.base)/2,t=n.y),{x:e,y:t}},getArea:function(){var e=this._view;return $(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),Nt={},Bt=At,Ut=$t,jt=Ft,zt=Lt;Nt.Arc=Bt,Nt.Line=Ut,Nt.Point=jt,Nt.Rectangle=zt;var Ht=mt.options.resolve;pt._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}});var Wt=Pt.extend({dataElementType:Nt.Rectangle,initialize:function(){var e;Pt.prototype.initialize.apply(this,arguments),(e=this.getMeta()).stack=this.getDataset().stack,e.bar=!0},update:function(e){var t,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),t=0,n=i.length;t<n;++t)this.updateElement(i[t],t,e)},updateElement:function(e,t,n){var i=this,o=i.getMeta(),r=i.getDataset(),s=i._resolveElementOptions(e,t);e._xScale=i.getScaleForId(o.xAxisID),e._yScale=i.getScaleForId(o.yAxisID),e._datasetIndex=i.index,e._index=t,e._model={backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderSkipped:s.borderSkipped,borderWidth:s.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[t]},i._updateElementGeometry(e,t,n),e.pivot()},_updateElementGeometry:function(e,t,n){var i=this,o=e._model,r=i._getValueScale(),s=r.getBasePixel(),a=r.isHorizontal(),l=i._ruler||i.getRuler(),c=i.calculateBarValuePixels(i.index,t),u=i.calculateBarIndexPixels(i.index,t,l);o.horizontal=a,o.base=n?s:c.base,o.x=a?n?s:c.head:u.center,o.y=a?u.center:n?s:c.head,o.height=a?u.size:void 0,o.width=a?void 0:u.size},_getStacks:function(e){var t,n,i=this.chart,o=this._getIndexScale().options.stacked,r=void 0===e?i.data.datasets.length:e+1,s=[];for(t=0;t<r;++t)(n=i.getDatasetMeta(t)).bar&&i.isDatasetVisible(t)&&(!1===o||!0===o&&-1===s.indexOf(n.stack)||void 0===o&&(void 0===n.stack||-1===s.indexOf(n.stack)))&&s.push(n.stack);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var n=this._getStacks(e),i=void 0!==t?n.indexOf(t):-1;return-1===i?n.length-1:i},getRuler:function(){var e,t,n=this._getIndexScale(),i=this.getStackCount(),o=this.index,r=n.isHorizontal(),s=r?n.left:n.top,a=s+(r?n.width:n.height),l=[];for(e=0,t=this.getMeta().data.length;e<t;++e)l.push(n.getPixelForValue(null,e,o));return{min:mt.isNullOrUndef(n.options.barThickness)?function(e,t){var n,i,o,r,s=e.isHorizontal()?e.width:e.height,a=e.getTicks();for(o=1,r=t.length;o<r;++o)s=Math.min(s,Math.abs(t[o]-t[o-1]));for(o=0,r=a.length;o<r;++o)i=e.getPixelForTick(o),s=o>0?Math.min(s,i-n):s,n=i;return s}(n,l):-1,pixels:l,start:s,end:a,stackCount:i,scale:n}},calculateBarValuePixels:function(e,t){var n,i,o,r,s,a,l=this.chart,c=this.getMeta(),u=this._getValueScale(),d=u.isHorizontal(),h=l.data.datasets,p=+u.getRightValue(h[e].data[t]),f=u.options.minBarLength,g=u.options.stacked,m=c.stack,v=0;if(g||void 0===g&&void 0!==m)for(n=0;n<e;++n)(i=l.getDatasetMeta(n)).bar&&i.stack===m&&i.controller._getValueScaleId()===u.id&&l.isDatasetVisible(n)&&(o=+u.getRightValue(h[n].data[t]),(p<0&&o<0||p>=0&&o>0)&&(v+=o));return r=u.getPixelForValue(v),a=(s=u.getPixelForValue(v+p))-r,void 0!==f&&Math.abs(a)<f&&(a=f,s=p>=0&&!d||p<0&&d?r-f:r+f),{size:a,base:r,head:s,center:s+a/2}},calculateBarIndexPixels:function(e,t,n){var i=n.scale.options,o="flex"===i.barThickness?function(e,t,n){var i,o=t.pixels,r=o[e],s=e>0?o[e-1]:null,a=e<o.length-1?o[e+1]:null,l=n.categoryPercentage;return null===s&&(s=r-(null===a?t.end-t.start:a-r)),null===a&&(a=r+r-s),i=r-(r-Math.min(s,a))/2*l,{chunk:Math.abs(a-s)/2*l/t.stackCount,ratio:n.barPercentage,start:i}}(t,n,i):function(e,t,n){var i,o,r=n.barThickness,s=t.stackCount,a=t.pixels[e];return mt.isNullOrUndef(r)?(i=t.min*n.categoryPercentage,o=n.barPercentage):(i=r*s,o=1),{chunk:i/s,ratio:o,start:a-i/2}}(t,n,i),r=this.getStackIndex(e,this.getMeta().stack),s=o.start+o.chunk*r+o.chunk/2,a=Math.min(mt.valueOrDefault(i.maxBarThickness,1/0),o.chunk*o.ratio);return{base:s-a/2,head:s+a/2,center:s,size:a}},draw:function(){var e=this.chart,t=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),o=n.length,r=0;for(mt.canvas.clipArea(e.ctx,e.chartArea);r<o;++r)isNaN(t.getRightValue(i.data[r]))||n[r].draw();mt.canvas.unclipArea(e.ctx)},_resolveElementOptions:function(e,t){var n,i,o,r=this.chart,s=r.data.datasets[this.index],a=e.custom||{},l=r.options.elements.rectangle,c={},u={chart:r,dataIndex:t,dataset:s,datasetIndex:this.index},d=["backgroundColor","borderColor","borderSkipped","borderWidth"];for(n=0,i=d.length;n<i;++n)c[o=d[n]]=Ht([a[o],s[o],l[o]],u,t);return c}}),qt=mt.valueOrDefault,Vt=mt.options.resolve;pt._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.datasets[e.datasetIndex].label||"",i=t.datasets[e.datasetIndex].data[e.index];return n+": ("+e.xLabel+", "+e.yLabel+", "+i.r+")"}}}});var Yt=Pt.extend({dataElementType:Nt.Point,update:function(e){var t=this,n=t.getMeta().data;mt.each(n,function(n,i){t.updateElement(n,i,e)})},updateElement:function(e,t,n){var i=this,o=i.getMeta(),r=e.custom||{},s=i.getScaleForId(o.xAxisID),a=i.getScaleForId(o.yAxisID),l=i._resolveElementOptions(e,t),c=i.getDataset().data[t],u=i.index,d=n?s.getPixelForDecimal(.5):s.getPixelForValue("object"==typeof c?c:NaN,t,u),h=n?a.getBasePixel():a.getPixelForValue(c,t,u);e._xScale=s,e._yScale=a,e._options=l,e._datasetIndex=u,e._index=t,e._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:r.skip||isNaN(d)||isNaN(h),x:d,y:h},e.pivot()},setHoverStyle:function(e){var t=e._model,n=e._options,i=mt.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=qt(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=qt(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=qt(n.hoverBorderWidth,n.borderWidth),t.radius=n.radius+n.hoverRadius},_resolveElementOptions:function(e,t){var n,i,o,r=this.chart,s=r.data.datasets[this.index],a=e.custom||{},l=r.options.elements.point,c=s.data[t],u={},d={chart:r,dataIndex:t,dataset:s,datasetIndex:this.index},h=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"];for(n=0,i=h.length;n<i;++n)u[o=h[n]]=Vt([a[o],s[o],l[o]],d,t);return u.radius=Vt([a.radius,c?c.r:void 0,s.radius,l.radius],d,t),u}}),Gt=mt.options.resolve,Xt=mt.valueOrDefault;pt._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t=[];t.push('<ul class="'+e.id+'-legend">');var n=e.data,i=n.datasets,o=n.labels;if(i.length)for(var r=0;r<i[0].data.length;++r)t.push('<li><span style="background-color:'+i[0].backgroundColor[r]+'"></span>'),o[r]&&t.push(o[r]),t.push("</li>");return t.push("</ul>"),t.join("")},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(function(n,i){var o=e.getDatasetMeta(0),r=t.datasets[0],s=o.data[i],a=s&&s.custom||{},l=e.options.elements.arc;return{text:n,fillStyle:Gt([a.backgroundColor,r.backgroundColor,l.backgroundColor],void 0,i),strokeStyle:Gt([a.borderColor,r.borderColor,l.borderColor],void 0,i),lineWidth:Gt([a.borderWidth,r.borderWidth,l.borderWidth],void 0,i),hidden:isNaN(r.data[i])||o.data[i].hidden,index:i}}):[]}},onClick:function(e,t){var n,i,o,r=t.index,s=this.chart;for(n=0,i=(s.data.datasets||[]).length;n<i;++n)(o=s.getDatasetMeta(n)).data[r]&&(o.data[r].hidden=!o.data[r].hidden);s.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.labels[e.index],i=": "+t.datasets[e.datasetIndex].data[e.index];return mt.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Kt=Pt.extend({dataElementType:Nt.Arc,linkScales:mt.noop,getRingIndex:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&++t;return t},update:function(e){var t,n,i=this,o=i.chart,r=o.chartArea,s=o.options,a=r.right-r.left,l=r.bottom-r.top,c=Math.min(a,l),u={x:0,y:0},d=i.getMeta(),h=d.data,p=s.cutoutPercentage,f=s.circumference,g=i._getRingWeight(i.index);if(f<2*Math.PI){var m=s.rotation%(2*Math.PI),v=(m+=2*Math.PI*(m>=Math.PI?-1:m<-Math.PI?1:0))+f,_={x:Math.cos(m),y:Math.sin(m)},y={x:Math.cos(v),y:Math.sin(v)},b=m<=0&&v>=0||m<=2*Math.PI&&2*Math.PI<=v,w=m<=.5*Math.PI&&.5*Math.PI<=v||m<=2.5*Math.PI&&2.5*Math.PI<=v,x=m<=-Math.PI&&-Math.PI<=v||m<=Math.PI&&Math.PI<=v,k=m<=.5*-Math.PI&&.5*-Math.PI<=v||m<=1.5*Math.PI&&1.5*Math.PI<=v,C=p/100,S={x:x?-1:Math.min(_.x*(_.x<0?1:C),y.x*(y.x<0?1:C)),y:k?-1:Math.min(_.y*(_.y<0?1:C),y.y*(y.y<0?1:C))},T={x:b?1:Math.max(_.x*(_.x>0?1:C),y.x*(y.x>0?1:C)),y:w?1:Math.max(_.y*(_.y>0?1:C),y.y*(y.y>0?1:C))},E={width:.5*(T.x-S.x),height:.5*(T.y-S.y)};c=Math.min(a/E.width,l/E.height),u={x:-.5*(T.x+S.x),y:-.5*(T.y+S.y)}}for(t=0,n=h.length;t<n;++t)h[t]._options=i._resolveElementOptions(h[t],t);for(o.borderWidth=i.getMaxBorderWidth(),o.outerRadius=Math.max((c-o.borderWidth)/2,0),o.innerRadius=Math.max(p?o.outerRadius/100*p:0,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(i._getVisibleDatasetWeightTotal()||1),o.offsetX=u.x*o.outerRadius,o.offsetY=u.y*o.outerRadius,d.total=i.calculateTotal(),i.outerRadius=o.outerRadius-o.radiusLength*i._getRingWeightOffset(i.index),i.innerRadius=Math.max(i.outerRadius-o.radiusLength*g,0),t=0,n=h.length;t<n;++t)i.updateElement(h[t],t,e)},updateElement:function(e,t,n){var i=this,o=i.chart,r=o.chartArea,s=o.options,a=s.animation,l=(r.left+r.right)/2,c=(r.top+r.bottom)/2,u=s.rotation,d=s.rotation,h=i.getDataset(),p=n&&a.animateRotate?0:e.hidden?0:i.calculateCircumference(h.data[t])*(s.circumference/(2*Math.PI)),f=n&&a.animateScale?0:i.innerRadius,g=n&&a.animateScale?0:i.outerRadius,m=e._options||{};mt.extend(e,{_datasetIndex:i.index,_index:t,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+o.offsetX,y:c+o.offsetY,startAngle:u,endAngle:d,circumference:p,outerRadius:g,innerRadius:f,label:mt.valueAtIndexOrDefault(h.label,t,o.data.labels[t])}});var v=e._model;n&&a.animateRotate||(v.startAngle=0===t?s.rotation:i.getMeta().data[t-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),e.pivot()},calculateTotal:function(){var e,t=this.getDataset(),n=this.getMeta(),i=0;return mt.each(n.data,function(n,o){e=t.data[o],isNaN(e)||n.hidden||(i+=Math.abs(e))}),i},calculateCircumference:function(e){var t=this.getMeta().total;return t>0&&!isNaN(e)?2*Math.PI*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,i,o,r,s,a,l,c=0,u=this.chart;if(!e)for(t=0,n=u.data.datasets.length;t<n;++t)if(u.isDatasetVisible(t)){e=(i=u.getDatasetMeta(t)).data,t!==this.index&&(r=i.controller);break}if(!e)return 0;for(t=0,n=e.length;t<n;++t)o=e[t],"inner"!==(s=r?r._resolveElementOptions(o,t):o._options).borderAlign&&(a=s.borderWidth,c=(l=s.hoverBorderWidth)>(c=a>c?a:c)?l:c);return c},setHoverStyle:function(e){var t=e._model,n=e._options,i=mt.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Xt(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=Xt(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=Xt(n.hoverBorderWidth,n.borderWidth)},_resolveElementOptions:function(e,t){var n,i,o,r=this.chart,s=this.getDataset(),a=e.custom||{},l=r.options.elements.arc,c={},u={chart:r,dataIndex:t,dataset:s,datasetIndex:this.index},d=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(n=0,i=d.length;n<i;++n)c[o=d[n]]=Gt([a[o],s[o],l[o]],u,t);return c},_getRingWeightOffset:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t},_getRingWeight:function(e){return Math.max(Xt(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});pt._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}});var Qt=Wt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Jt=mt.valueOrDefault,Zt=mt.options.resolve,en=mt.canvas._isPointInArea;pt._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var tn=Pt.extend({datasetElementType:Nt.Line,dataElementType:Nt.Point,update:function(e){var t,n,i=this,o=i.getMeta(),r=o.dataset,s=o.data||[],a=i.getScaleForId(o.yAxisID),l=i.getDataset(),c=L(l,i.chart.options);for(c&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=a,r._datasetIndex=i.index,
r._children=s,r._model=i._resolveLineOptions(r),r.pivot()),t=0,n=s.length;t<n;++t)i.updateElement(s[t],t,e);for(c&&0!==r._model.tension&&i.updateBezierControlPoints(),t=0,n=s.length;t<n;++t)s[t].pivot()},updateElement:function(e,t,n){var i,o,r=this,s=r.getMeta(),a=e.custom||{},l=r.getDataset(),c=r.index,u=l.data[t],d=r.getScaleForId(s.yAxisID),h=r.getScaleForId(s.xAxisID),p=s.dataset._model,f=r._resolvePointOptions(e,t);i=h.getPixelForValue("object"==typeof u?u:NaN,t,c),o=n?d.getBasePixel():r.calculatePointY(u,t,c),e._xScale=h,e._yScale=d,e._options=f,e._datasetIndex=c,e._index=t,e._model={x:i,y:o,skip:a.skip||isNaN(i)||isNaN(o),radius:f.radius,pointStyle:f.pointStyle,rotation:f.rotation,backgroundColor:f.backgroundColor,borderColor:f.borderColor,borderWidth:f.borderWidth,tension:Jt(a.tension,p?p.tension:0),steppedLine:!!p&&p.steppedLine,hitRadius:f.hitRadius}},_resolvePointOptions:function(e,t){var n,i,o,r=this.chart,s=r.data.datasets[this.index],a=e.custom||{},l=r.options.elements.point,c={},u={chart:r,dataIndex:t,dataset:s,datasetIndex:this.index},d={backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},h=Object.keys(d);for(n=0,i=h.length;n<i;++n)c[o=h[n]]=Zt([a[o],s[d[o]],s[o],l[o]],u,t);return c},_resolveLineOptions:function(e){var t,n,i,o=this.chart,r=o.data.datasets[this.index],s=e.custom||{},a=o.options,l=a.elements.line,c={},u=["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill","cubicInterpolationMode"];for(t=0,n=u.length;t<n;++t)c[i=u[t]]=Zt([s[i],r[i],l[i]]);return c.spanGaps=Jt(r.spanGaps,a.spanGaps),c.tension=Jt(r.lineTension,l.tension),c.steppedLine=Zt([s.steppedLine,r.steppedLine,l.stepped]),c},calculatePointY:function(e,t,n){var i,o,r,s=this.chart,a=this.getMeta(),l=this.getScaleForId(a.yAxisID),c=0,u=0;if(l.options.stacked){for(i=0;i<n;i++)if(o=s.data.datasets[i],"line"===(r=s.getDatasetMeta(i)).type&&r.yAxisID===l.id&&s.isDatasetVisible(i)){var d=Number(l.getRightValue(o.data[t]));d<0?u+=d||0:c+=d||0}var h=Number(l.getRightValue(e));return h<0?l.getPixelForValue(u+h):l.getPixelForValue(c+h)}return l.getPixelForValue(e)},updateBezierControlPoints:function(){function e(e,t,n){return Math.max(Math.min(e,n),t)}var t,n,i,o,r=this.chart,s=this.getMeta(),a=s.dataset._model,l=r.chartArea,c=s.data||[];if(a.spanGaps&&(c=c.filter(function(e){return!e._model.skip})),"monotone"===a.cubicInterpolationMode)mt.splineCurveMonotone(c);else for(t=0,n=c.length;t<n;++t)i=c[t]._model,o=mt.splineCurve(mt.previousItem(c,t)._model,i,mt.nextItem(c,t)._model,a.tension),i.controlPointPreviousX=o.previous.x,i.controlPointPreviousY=o.previous.y,i.controlPointNextX=o.next.x,i.controlPointNextY=o.next.y;if(r.options.elements.line.capBezierPoints)for(t=0,n=c.length;t<n;++t)i=c[t]._model,en(i,l)&&(t>0&&en(c[t-1]._model,l)&&(i.controlPointPreviousX=e(i.controlPointPreviousX,l.left,l.right),i.controlPointPreviousY=e(i.controlPointPreviousY,l.top,l.bottom)),t<c.length-1&&en(c[t+1]._model,l)&&(i.controlPointNextX=e(i.controlPointNextX,l.left,l.right),i.controlPointNextY=e(i.controlPointNextY,l.top,l.bottom)))},draw:function(){var e,t=this.chart,n=this.getMeta(),i=n.data||[],o=t.chartArea,r=i.length,s=0;for(L(this.getDataset(),t.options)&&(e=(n.dataset._model.borderWidth||0)/2,mt.canvas.clipArea(t.ctx,{left:o.left,right:o.right,top:o.top-e,bottom:o.bottom+e}),n.dataset.draw(),mt.canvas.unclipArea(t.ctx));s<r;++s)i[s].draw(o)},setHoverStyle:function(e){var t=e._model,n=e._options,i=mt.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Jt(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=Jt(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=Jt(n.hoverBorderWidth,n.borderWidth),t.radius=Jt(n.hoverRadius,n.radius)}}),nn=mt.options.resolve;pt._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var t=[];t.push('<ul class="'+e.id+'-legend">');var n=e.data,i=n.datasets,o=n.labels;if(i.length)for(var r=0;r<i[0].data.length;++r)t.push('<li><span style="background-color:'+i[0].backgroundColor[r]+'"></span>'),o[r]&&t.push(o[r]),t.push("</li>");return t.push("</ul>"),t.join("")},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(function(n,i){var o=e.getDatasetMeta(0),r=t.datasets[0],s=o.data[i].custom||{},a=e.options.elements.arc;return{text:n,fillStyle:nn([s.backgroundColor,r.backgroundColor,a.backgroundColor],void 0,i),strokeStyle:nn([s.borderColor,r.borderColor,a.borderColor],void 0,i),lineWidth:nn([s.borderWidth,r.borderWidth,a.borderWidth],void 0,i),hidden:isNaN(r.data[i])||o.data[i].hidden,index:i}}):[]}},onClick:function(e,t){var n,i,o,r=t.index,s=this.chart;for(n=0,i=(s.data.datasets||[]).length;n<i;++n)(o=s.getDatasetMeta(n)).data[r].hidden=!o.data[r].hidden;s.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var on=Pt.extend({dataElementType:Nt.Arc,linkScales:mt.noop,update:function(e){var t,n,i,o=this,r=o.getDataset(),s=o.getMeta(),a=o.chart.options.startAngle||0,l=o._starts=[],c=o._angles=[],u=s.data;for(o._updateRadius(),s.count=o.countVisibleElements(),t=0,n=r.data.length;t<n;t++)l[t]=a,i=o._computeAngle(t),c[t]=i,a+=i;for(t=0,n=u.length;t<n;++t)u[t]._options=o._resolveElementOptions(u[t],t),o.updateElement(u[t],t,e)},_updateRadius:function(){var e=this,t=e.chart,n=t.chartArea,i=t.options,o=Math.min(n.right-n.left,n.bottom-n.top);t.outerRadius=Math.max(o/2,0),t.innerRadius=Math.max(i.cutoutPercentage?t.outerRadius/100*i.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),e.outerRadius=t.outerRadius-t.radiusLength*e.index,e.innerRadius=e.outerRadius-t.radiusLength},updateElement:function(e,t,n){var i=this,o=i.chart,r=i.getDataset(),s=o.options,a=s.animation,l=o.scale,c=o.data.labels,u=l.xCenter,d=l.yCenter,h=s.startAngle,p=e.hidden?0:l.getDistanceFromCenterForValue(r.data[t]),f=i._starts[t],g=f+(e.hidden?0:i._angles[t]),m=a.animateScale?0:l.getDistanceFromCenterForValue(r.data[t]),v=e._options||{};mt.extend(e,{_datasetIndex:i.index,_index:t,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:u,y:d,innerRadius:0,outerRadius:n?m:p,startAngle:n&&a.animateRotate?h:f,endAngle:n&&a.animateRotate?h:g,label:mt.valueAtIndexOrDefault(c,t,c[t])}}),e.pivot()},countVisibleElements:function(){var e=this.getDataset(),t=this.getMeta(),n=0;return mt.each(t.data,function(t,i){isNaN(e.data[i])||t.hidden||n++}),n},setHoverStyle:function(e){var t=e._model,n=e._options,i=mt.getHoverColor,o=mt.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=o(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=o(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=o(n.hoverBorderWidth,n.borderWidth)},_resolveElementOptions:function(e,t){var n,i,o,r=this.chart,s=this.getDataset(),a=e.custom||{},l=r.options.elements.arc,c={},u={chart:r,dataIndex:t,dataset:s,datasetIndex:this.index},d=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(n=0,i=d.length;n<i;++n)c[o=d[n]]=nn([a[o],s[o],l[o]],u,t);return c},_computeAngle:function(e){var t=this,n=this.getMeta().count,i=t.getDataset(),o=t.getMeta();if(isNaN(i.data[e])||o.data[e].hidden)return 0;var r={chart:t.chart,dataIndex:e,dataset:i,datasetIndex:t.index};return nn([t.chart.options.elements.arc.angle,2*Math.PI/n],r,e)}});pt._set("pie",mt.clone(pt.doughnut)),pt._set("pie",{cutoutPercentage:0});var rn=Kt,sn=mt.valueOrDefault,an=mt.options.resolve;pt._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}});var ln=Pt.extend({datasetElementType:Nt.Line,dataElementType:Nt.Point,linkScales:mt.noop,update:function(e){var t,n,i=this,o=i.getMeta(),r=o.dataset,s=o.data||[],a=i.chart.scale,l=i.getDataset();for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=a,r._datasetIndex=i.index,r._children=s,r._loop=!0,r._model=i._resolveLineOptions(r),r.pivot(),t=0,n=s.length;t<n;++t)i.updateElement(s[t],t,e);for(i.updateBezierControlPoints(),t=0,n=s.length;t<n;++t)s[t].pivot()},updateElement:function(e,t,n){var i=this,o=e.custom||{},r=i.getDataset(),s=i.chart.scale,a=s.getPointPositionForValue(t,r.data[t]),l=i._resolvePointOptions(e,t),c=i.getMeta().dataset._model,u=n?s.xCenter:a.x,d=n?s.yCenter:a.y;e._scale=s,e._options=l,e._datasetIndex=i.index,e._index=t,e._model={x:u,y:d,skip:o.skip||isNaN(u)||isNaN(d),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:sn(o.tension,c?c.tension:0),hitRadius:l.hitRadius}},_resolvePointOptions:function(e,t){var n,i,o,r=this.chart,s=r.data.datasets[this.index],a=e.custom||{},l=r.options.elements.point,c={},u={chart:r,dataIndex:t,dataset:s,datasetIndex:this.index},d={backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},h=Object.keys(d);for(n=0,i=h.length;n<i;++n)c[o=h[n]]=an([a[o],s[d[o]],s[o],l[o]],u,t);return c},_resolveLineOptions:function(e){var t,n,i,o=this.chart,r=o.data.datasets[this.index],s=e.custom||{},a=o.options.elements.line,l={},c=["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"];for(t=0,n=c.length;t<n;++t)l[i=c[t]]=an([s[i],r[i],a[i]]);return l.tension=sn(r.lineTension,a.tension),l},updateBezierControlPoints:function(){function e(e,t,n){return Math.max(Math.min(e,n),t)}var t,n,i,o,r=this.getMeta(),s=this.chart.chartArea,a=r.data||[];for(t=0,n=a.length;t<n;++t)i=a[t]._model,o=mt.splineCurve(mt.previousItem(a,t,!0)._model,i,mt.nextItem(a,t,!0)._model,i.tension),i.controlPointPreviousX=e(o.previous.x,s.left,s.right),i.controlPointPreviousY=e(o.previous.y,s.top,s.bottom),i.controlPointNextX=e(o.next.x,s.left,s.right),i.controlPointNextY=e(o.next.y,s.top,s.bottom)},setHoverStyle:function(e){var t=e._model,n=e._options,i=mt.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=sn(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=sn(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=sn(n.hoverBorderWidth,n.borderWidth),t.radius=sn(n.hoverRadius,n.radius)}});pt._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}});var cn={bar:Wt,bubble:Yt,doughnut:Kt,horizontalBar:Qt,line:tn,polarArea:on,pie:rn,radar:ln,scatter:tn},un={modes:{single:function(e,t){var n=N(t,e),i=[];return B(e,function(e){if(e.inRange(n.x,n.y))return i.push(e),i}),i.slice(0,1)},label:H,index:H,dataset:function(e,t,n){var i=N(t,e);n.axis=n.axis||"xy";var o=z(n.axis),r=n.intersect?U(e,i):j(e,i,!1,o);return r.length>0&&(r=e.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(e,t){return H(e,t,{intersect:!1})},point:function(e,t){return U(e,N(t,e))},nearest:function(e,t,n){var i=N(t,e);n.axis=n.axis||"xy";var o=z(n.axis);return j(e,i,n.intersect,o)},x:function(e,t,n){var i=N(t,e),o=[],r=!1;return B(e,function(e){e.inXRange(i.x)&&o.push(e),e.inRange(i.x,i.y)&&(r=!0)}),n.intersect&&!r&&(o=[]),o},y:function(e,t,n){var i=N(t,e),o=[],r=!1;return B(e,function(e){e.inYRange(i.y)&&o.push(e),e.inRange(i.x,i.y)&&(r=!0)}),n.intersect&&!r&&(o=[]),o}}};pt._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var dn,hn={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,e.boxes.push(t)},removeBox:function(e,t){var n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure:function(e,t,n){for(var i,o=["fullWidth","position","weight"],r=o.length,s=0;s<r;++s)i=o[s],n.hasOwnProperty(i)&&(t[i]=n[i])},update:function(e,t,n){function i(e){var t=mt.findNextWhere(T,function(t){return t.box===e});if(t)if(t.horizontal){var n={left:Math.max(S.left,m.left),right:Math.max(S.right,m.right),top:0,bottom:0};e.update(e.fullWidth?b:k,w/2,n)}else e.update(t.width,C)}function o(e){e.isHorizontal()?(e.left=e.fullWidth?a:S.left,e.right=e.fullWidth?t-l:S.left+k,e.top=$,e.bottom=$+e.height,$=e.bottom):(e.left=I,e.right=I+e.width,e.top=S.top,e.bottom=S.top+C,I=e.right)}if(e){var r=e.options.layout||{},s=mt.options.toPadding(r.padding),a=s.left,l=s.right,c=s.top,u=s.bottom,d=W(e.boxes,"left"),h=W(e.boxes,"right"),p=W(e.boxes,"top"),f=W(e.boxes,"bottom"),g=W(e.boxes,"chartArea");q(d,!0),q(h,!1),q(p,!0),q(f,!1);var m,v=d.concat(h),_=p.concat(f),y=v.concat(_),b=t-a-l,w=n-c-u,x=(t-b/2)/v.length,k=b,C=w,S={top:c,left:a,bottom:u,right:l},T=[];mt.each(y,function(e){var t,n=e.isHorizontal();n?(t=e.update(e.fullWidth?b:k,w/2),C-=t.height):(t=e.update(x,C),k-=t.width),T.push({horizontal:n,width:t.width,box:e})}),m=function(e){var t=0,n=0,i=0,o=0;return mt.each(e,function(e){if(e.getPadding){var r=e.getPadding();t=Math.max(t,r.top),n=Math.max(n,r.left),i=Math.max(i,r.bottom),o=Math.max(o,r.right)}}),{top:t,left:n,bottom:i,right:o}}(y),mt.each(v,i),V(v,S),mt.each(_,i),V(_,S),mt.each(v,function(e){var t=mt.findNextWhere(T,function(t){return t.box===e}),n={left:0,right:0,top:S.top,bottom:S.bottom};t&&e.update(t.width,C,n)}),V(y,S={top:c,left:a,bottom:u,right:l});var E=Math.max(m.left-S.left,0);S.left+=E,S.right+=Math.max(m.right-S.right,0);var P=Math.max(m.top-S.top,0);S.top+=P,S.bottom+=Math.max(m.bottom-S.bottom,0);var A=n-S.top-S.bottom,D=t-S.left-S.right;D===k&&A===C||(mt.each(v,function(e){e.height=A}),mt.each(_,function(e){e.fullWidth||(e.width=D)}),C=A,k=D);var I=a+E,$=c+P;mt.each(d.concat(p),o),I+=k,$+=C,mt.each(h,o),mt.each(f,o),e.chartArea={left:S.left,top:S.top,right:S.left+k,bottom:S.top+C},mt.each(g,function(t){t.left=e.chartArea.left,t.top=e.chartArea.top,t.right=e.chartArea.right,t.bottom=e.chartArea.bottom,t.update(k,C)})}}},pn=(dn=Object.freeze({default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&dn.default||dn,fn="$chartjs",gn="chartjs-size-monitor",mn="chartjs-render-monitor",vn="chartjs-render-animation",_n=["animationstart","webkitAnimationStart"],yn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},bn=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0},wn={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(){var e,t,n;this._loaded||(this._loaded=!0,this.disableCSSInjection||(t=pn,n=(e=this)._style||document.createElement("style"),e._style||(e._style=n,t="/* Chart.js */\n"+t,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(t))))},acquireContext:function(e,t){"string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var n=e&&e.getContext&&e.getContext("2d");return this._ensureLoaded(),n&&n.canvas===e?(function(e,t){var n=e.style,i=e.getAttribute("height"),o=e.getAttribute("width");if(e[fn]={initial:{height:i,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===o||""===o){var r=Y(e,"width");void 0!==r&&(e.width=r)}if(null===i||""===i)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var s=Y(e,"height");void 0!==r&&(e.height=s)}}(e,t),n):null},releaseContext:function(e){var t=e.canvas;if(t[fn]){var n=t[fn].initial;["height","width"].forEach(function(e){var i=n[e];mt.isNullOrUndef(i)?t.removeAttribute(e):t.setAttribute(e,i)}),mt.each(n.style||{},function(e,n){t.style[n]=e}),t.width=t.width,delete t[fn]}},addEventListener:function(e,t,n){var i=e.canvas;if("resize"!==t){var o=n[fn]||(n[fn]={});G(i,t,(o.proxies||(o.proxies={}))[e.id+"_"+t]=function(t){n(function(e,t){var n=yn[e.type]||e.type,i=mt.getRelativePosition(e,t);return K(n,t,i.x,i.y,e)}(t,e))})}else J(i,n,e)},removeEventListener:function(e,t,n){var i=e.canvas;if("resize"!==t){var o=((n[fn]||{}).proxies||{})[e.id+"_"+t];o&&X(i,t,o)}else Z(i)}};mt.addEvent=G,mt.removeEvent=X;var xn=wn._enabled?wn:{acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}},kn=mt.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},xn);pt._set("global",{plugins:{}});var Cn={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach(function(e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,n){var i,o,r,s,a,l=this.descriptors(e),c=l.length;for(i=0;i<c;++i)if("function"==typeof(a=(r=(o=l[i]).plugin)[t])&&((s=[e].concat(n||[])).push(o.options),!1===a.apply(r,s)))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var n=[],i=[],o=e&&e.config||{},r=o.options&&o.options.plugins||{};return this._plugins.concat(o.plugins||[]).forEach(function(e){if(-1===n.indexOf(e)){var t=e.id,o=r[t];!1!==o&&(!0===o&&(o=mt.clone(pt.global.plugins[t])),n.push(e),i.push({plugin:e,options:o||{}}))}}),t.descriptors=i,t.id=this._cacheId,i},_invalidate:function(e){delete e.$plugins}},Sn={constructors:{},defaults:{},registerScaleType:function(e,t,n){this.constructors[e]=t,this.defaults[e]=mt.clone(n)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?mt.merge({},[pt.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){this.defaults.hasOwnProperty(e)&&(this.defaults[e]=mt.extend(this.defaults[e],t))},addScalesToLayout:function(e){mt.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,hn.addBox(e,t)})}},Tn=mt.valueOrDefault;pt._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:mt.noop,title:function(e,t){var n="",i=t.labels,o=i?i.length:0;if(e.length>0){var r=e[0];r.label?n=r.label:r.xLabel?n=r.xLabel:o>0&&r.index<o&&(n=i[r.index])}return n},afterTitle:mt.noop,beforeBody:mt.noop,beforeLabel:mt.noop,label:function(e,t){var n=t.datasets[e.datasetIndex].label||"";return n&&(n+=": "),mt.isNullOrUndef(e.value)?n+=e.yLabel:n+=e.value,n},labelColor:function(e,t){var n=t.getDatasetMeta(e.datasetIndex).data[e.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:mt.noop,afterBody:mt.noop,beforeFooter:mt.noop,footer:mt.noop,afterFooter:mt.noop}}});var En={average:function(e){if(!e.length)return!1;var t,n,i=0,o=0,r=0;for(t=0,n=e.length;t<n;++t){var s=e[t];if(s&&s.hasValue()){var a=s.tooltipPosition();i+=a.x,o+=a.y,++r}}return{x:i/r,y:o/r}},nearest:function(e,t){var n,i,o,r=t.x,s=t.y,a=Number.POSITIVE_INFINITY;for(n=0,i=e.length;n<i;++n){var l=e[n];if(l&&l.hasValue()){var c=l.getCenterPoint(),u=mt.distanceBetweenPoints(t,c);u<a&&(a=u,o=l)}}if(o){var d=o.tooltipPosition();r=d.x,s=d.y}return{x:r,y:s}}},Pn=wt.extend({initialize:function(){this._model=ne(this._options),this._lastActive=[]},getTitle:function(){var e=this._options.callbacks,t=e.beforeTitle.apply(this,arguments),n=e.title.apply(this,arguments),i=e.afterTitle.apply(this,arguments),o=[];return o=ee(o,te(t)),o=ee(o,te(n)),ee(o,te(i))},getBeforeBody:function(){return oe(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var n=this,i=n._options.callbacks,o=[];return mt.each(e,function(e){var r={before:[],lines:[],after:[]};ee(r.before,te(i.beforeLabel.call(n,e,t))),ee(r.lines,i.label.call(n,e,t)),ee(r.after,te(i.afterLabel.call(n,e,t))),o.push(r)}),o},getAfterBody:function(){return oe(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this._options.callbacks,t=e.beforeFooter.apply(this,arguments),n=e.footer.apply(this,arguments),i=e.afterFooter.apply(this,arguments),o=[];return o=ee(o,te(t)),o=ee(o,te(n)),ee(o,te(i))},update:function(e){var t,n,i,o,r,s,a,l,c,u,d=this,h=d._options,p=d._model,f=d._model=ne(h),g=d._active,m=d._data,v={xAlign:p.xAlign,yAlign:p.yAlign},_={x:p.x,y:p.y},y={width:p.width,height:p.height},b={x:p.caretX,y:p.caretY};if(g.length){f.opacity=1;var w=[],x=[];b=En[h.position].call(d,g,d._eventPosition);var k=[];for(t=0,n=g.length;t<n;++t)k.push((i=g[t],o=void 0,r=void 0,s=void 0,a=void 0,l=void 0,c=void 0,u=void 0,o=i._xScale,r=i._yScale||i._scale,s=i._index,a=i._datasetIndex,l=i._chart.getDatasetMeta(a).controller,c=l._getIndexScale(),u=l._getValueScale(),{xLabel:o?o.getLabelForIndex(s,a):"",yLabel:r?r.getLabelForIndex(s,a):"",label:c?""+c.getLabelForIndex(s,a):"",value:u?""+u.getLabelForIndex(s,a):"",index:s,datasetIndex:a,x:i._model.x,y:i._model.y}));h.filter&&(k=k.filter(function(e){return h.filter(e,m)})),h.itemSort&&(k=k.sort(function(e,t){return h.itemSort(e,t,m)})),mt.each(k,function(e){w.push(h.callbacks.labelColor.call(d,e,d._chart)),x.push(h.callbacks.labelTextColor.call(d,e,d._chart))}),f.title=d.getTitle(k,m),f.beforeBody=d.getBeforeBody(k,m),f.body=d.getBody(k,m),f.afterBody=d.getAfterBody(k,m),f.footer=d.getFooter(k,m),f.x=b.x,f.y=b.y,f.caretPadding=h.caretPadding,f.labelColors=w,f.labelTextColors=x,f.dataPoints=k,y=function(e,t){var n=e._chart.ctx,i=2*t.yPadding,o=0,r=t.body,s=r.reduce(function(e,t){return e+t.before.length+t.lines.length+t.after.length},0);s+=t.beforeBody.length+t.afterBody.length;var a=t.title.length,l=t.footer.length,c=t.titleFontSize,u=t.bodyFontSize,d=t.footerFontSize;i+=a*c,i+=a?(a-1)*t.titleSpacing:0,i+=a?t.titleMarginBottom:0,i+=s*u,i+=s?(s-1)*t.bodySpacing:0,i+=l?t.footerMarginTop:0,i+=l*d,i+=l?(l-1)*t.footerSpacing:0;var h=0,p=function(e){o=Math.max(o,n.measureText(e).width+h)};return n.font=mt.fontString(c,t._titleFontStyle,t._titleFontFamily),mt.each(t.title,p),n.font=mt.fontString(u,t._bodyFontStyle,t._bodyFontFamily),mt.each(t.beforeBody.concat(t.afterBody),p),h=t.displayColors?u+2:0,mt.each(r,function(e){mt.each(e.before,p),mt.each(e.lines,p),mt.each(e.after,p)}),h=0,n.font=mt.fontString(d,t._footerFontStyle,t._footerFontFamily),mt.each(t.footer,p),{width:o+=2*t.xPadding,height:i}}(this,f),_=function(e,t,n,i){var o=e.x,r=e.y,s=e.caretSize,a=e.caretPadding,l=e.cornerRadius,c=n.xAlign,u=n.yAlign,d=s+a,h=l+a;return"right"===c?o-=t.width:"center"===c&&((o-=t.width/2)+t.width>i.width&&(o=i.width-t.width),o<0&&(o=0)),"top"===u?r+=d:r-="bottom"===u?t.height+d:t.height/2,"center"===u?"left"===c?o+=d:"right"===c&&(o-=d):"left"===c?o-=h:"right"===c&&(o+=h),{x:o,y:r}}(f,y,v=function(e,t){var n,i,o,r,s,a=e._model,l=e._chart,c=e._chart.chartArea,u="center",d="center";a.y<t.height?d="top":a.y>l.height-t.height&&(d="bottom");var h=(c.left+c.right)/2,p=(c.top+c.bottom)/2;"center"===d?(n=function(e){return e<=h},i=function(e){return e>h}):(n=function(e){return e<=t.width/2},i=function(e){return e>=l.width-t.width/2}),o=function(e){return e+t.width+a.caretSize+a.caretPadding>l.width},r=function(e){return e-t.width-a.caretSize-a.caretPadding<0},s=function(e){return e<=p?"top":"bottom"},n(a.x)?(u="left",o(a.x)&&(u="center",d=s(a.y))):i(a.x)&&(u="right",r(a.x)&&(u="center",d=s(a.y)));var f=e._options;return{xAlign:f.xAlign?f.xAlign:u,yAlign:f.yAlign?f.yAlign:d}}(this,y),d._chart)}else f.opacity=0;return f.xAlign=v.xAlign,f.yAlign=v.yAlign,f.x=_.x,f.y=_.y,f.width=y.width,f.height=y.height,f.caretX=b.x,f.caretY=b.y,d._model=f,e&&h.custom&&h.custom.call(d,f),d},drawCaret:function(e,t){var n=this._chart.ctx,i=this._view,o=this.getCaretPosition(e,t,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(e,t,n){var i,o,r,s,a,l,c=n.caretSize,u=n.cornerRadius,d=n.xAlign,h=n.yAlign,p=e.x,f=e.y,g=t.width,m=t.height;if("center"===h)a=f+m/2,"left"===d?(o=(i=p)-c,r=i,s=a+c,l=a-c):(o=(i=p+g)+c,r=i,s=a-c,l=a+c);else if("left"===d?(i=(o=p+u+c)-c,r=o+c):"right"===d?(i=(o=p+g-u-c)-c,r=o+c):(i=(o=n.caretX)-c,r=o+c),"top"===h)a=(s=f)-c,l=s;else{a=(s=f+m)+c,l=s;var v=r;r=i,i=v}return{x1:i,x2:o,x3:r,y1:s,y2:a,y3:l}},drawTitle:function(e,t,n){var i=t.title;if(i.length){e.x=ie(t,t._titleAlign),n.textAlign=t._titleAlign,n.textBaseline="top";var o,r,s=t.titleFontSize,a=t.titleSpacing;for(n.fillStyle=t.titleFontColor,n.font=mt.fontString(s,t._titleFontStyle,t._titleFontFamily),o=0,r=i.length;o<r;++o)n.fillText(i[o],e.x,e.y),e.y+=s+a,o+1===i.length&&(e.y+=t.titleMarginBottom-a)}},drawBody:function(e,t,n){var i,o=t.bodyFontSize,r=t.bodySpacing,s=t._bodyAlign,a=t.body,l=t.displayColors,c=t.labelColors,u=0,d=l?ie(t,"left"):0;n.textAlign=s,n.textBaseline="top",n.font=mt.fontString(o,t._bodyFontStyle,t._bodyFontFamily),e.x=ie(t,s);var h=function(t){n.fillText(t,e.x+u,e.y),e.y+=o+r};n.fillStyle=t.bodyFontColor,mt.each(t.beforeBody,h),u=l&&"right"!==s?"center"===s?o/2+1:o+2:0,mt.each(a,function(r,s){i=t.labelTextColors[s],n.fillStyle=i,mt.each(r.before,h),mt.each(r.lines,function(r){l&&(n.fillStyle=t.legendColorBackground,n.fillRect(d,e.y,o,o),n.lineWidth=1,n.strokeStyle=c[s].borderColor,n.strokeRect(d,e.y,o,o),n.fillStyle=c[s].backgroundColor,n.fillRect(d+1,e.y+1,o-2,o-2),n.fillStyle=i),h(r)}),mt.each(r.after,h)}),u=0,mt.each(t.afterBody,h),e.y-=r},drawFooter:function(e,t,n){var i=t.footer;i.length&&(e.x=ie(t,t._footerAlign),e.y+=t.footerMarginTop,n.textAlign=t._footerAlign,n.textBaseline="top",n.fillStyle=t.footerFontColor,n.font=mt.fontString(t.footerFontSize,t._footerFontStyle,t._footerFontFamily),mt.each(i,function(i){n.fillText(i,e.x,e.y),e.y+=t.footerFontSize+t.footerSpacing}))},drawBackground:function(e,t,n,i){n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,n.lineWidth=t.borderWidth;var o=t.xAlign,r=t.yAlign,s=e.x,a=e.y,l=i.width,c=i.height,u=t.cornerRadius;n.beginPath(),n.moveTo(s+u,a),"top"===r&&this.drawCaret(e,i),n.lineTo(s+l-u,a),n.quadraticCurveTo(s+l,a,s+l,a+u),"center"===r&&"right"===o&&this.drawCaret(e,i),n.lineTo(s+l,a+c-u),n.quadraticCurveTo(s+l,a+c,s+l-u,a+c),"bottom"===r&&this.drawCaret(e,i),n.lineTo(s+u,a+c),n.quadraticCurveTo(s,a+c,s,a+c-u),"center"===r&&"left"===o&&this.drawCaret(e,i),n.lineTo(s,a+u),n.quadraticCurveTo(s,a,s+u,a),n.closePath(),n.fill(),t.borderWidth>0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},i={x:t.x,y:t.y},o=Math.abs(t.opacity<.001)?0:t.opacity,r=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&r&&(e.save(),e.globalAlpha=o,this.drawBackground(i,t,e,n),i.y+=t.yPadding,this.drawTitle(i,t,e),this.drawBody(i,t,e),this.drawFooter(i,t,e),e.restore())}},handleEvent:function(e){var t,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===e.type?n._active=[]:n._active=n._chart.getElementsAtEventForMode(e,i.mode,i),(t=!mt.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}}),An=En,Dn=Pn;Dn.positioners=An;var In=mt.valueOrDefault;pt._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var $n=function(e,t){return this.construct(e,t),this};mt.extend($n.prototype,{construct:function(e,t){var n=this;t=function(e){var t=(e=e||{}).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=se(pt.global,pt[e.type],e.options||{}),e}(t);var i=kn.acquireContext(e,t),o=i&&i.canvas,r=o&&o.height,s=o&&o.width;n.id=mt.uid(),n.ctx=i,n.canvas=o,n.config=t,n.width=s,n.height=r,n.aspectRatio=r?s/r:null,n.options=t.options,n._bufferedRender=!1,n.chart=n,n.controller=n,$n.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(e){n.config.data=e}}),i&&o?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return Cn.notify(e,"beforeInit"),mt.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.initToolTip(),Cn.notify(e,"afterInit"),e},clear:function(){return mt.canvas.clear(this),this},stop:function(){return Ct.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,i=t.canvas,o=n.maintainAspectRatio&&t.aspectRatio||null,r=Math.max(0,Math.floor(mt.getMaximumWidth(i))),s=Math.max(0,Math.floor(o?r/o:mt.getMaximumHeight(i)));if((t.width!==r||t.height!==s)&&(i.width=t.width=r,i.height=t.height=s,i.style.width=r+"px",i.style.height=s+"px",mt.retinaScale(t,n.devicePixelRatio),!e)){var a={width:r,height:s};Cn.notify(t,"resize",[a]),n.onResize&&n.onResize(t,a),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;mt.each(t.xAxes,function(e,t){e.id=e.id||"x-axis-"+t}),mt.each(t.yAxes,function(e,t){e.id=e.id||"y-axis-"+t}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},i=[],o=Object.keys(n).reduce(function(e,t){return e[t]=!1,e},{});t.scales&&(i=i.concat((t.scales.xAxes||[]).map(function(e){return{options:e,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(e){return{options:e,dtype:"linear",dposition:"left"}}))),t.scale&&i.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),mt.each(i,function(t){
var i=t.options,r=i.id,s=In(i.type,t.dtype);ae(i.position)!==ae(t.dposition)&&(i.position=t.dposition),o[r]=!0;var a=null;if(r in n&&n[r].type===s)(a=n[r]).options=i,a.ctx=e.ctx,a.chart=e;else{var l=Sn.getScaleConstructor(s);if(!l)return;a=new l({id:r,type:s,options:i,ctx:e.ctx,chart:e}),n[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(e.scale=a)}),mt.each(o,function(e,t){e||delete n[t]}),e.scales=n,Sn.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,t=[];return mt.each(e.data.datasets,function(n,i){var o=e.getDatasetMeta(i),r=n.type||e.config.type;if(o.type&&o.type!==r&&(e.destroyDatasetMeta(i),o=e.getDatasetMeta(i)),o.type=r,o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{var s=cn[o.type];if(void 0===s)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new s(e,i),t.push(o.controller)}},e),t},resetElements:function(){var e=this;mt.each(e.data.datasets,function(t,n){e.getDatasetMeta(n).controller.reset()},e)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var t,n,i=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),n=(t=i).options,mt.each(t.scales,function(e){hn.removeBox(t,e)}),n=se(pt.global,pt[t.config.type],n),t.options=t.config.options=n,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=n.tooltips,t.tooltip.initialize(),Cn._invalidate(i),!1!==Cn.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var o=i.buildOrUpdateControllers();mt.each(i.data.datasets,function(e,t){i.getDatasetMeta(t).controller.buildOrUpdateElements()},i),i.updateLayout(),i.options.animation&&i.options.animation.duration&&mt.each(o,function(e){e.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Cn.notify(i,"afterUpdate"),i._bufferedRender?i._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:i.render(e)}},updateLayout:function(){!1!==Cn.notify(this,"beforeLayout")&&(hn.update(this,this.width,this.height),Cn.notify(this,"afterScaleUpdate"),Cn.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==Cn.notify(this,"beforeDatasetsUpdate")){for(var e=0,t=this.data.datasets.length;e<t;++e)this.updateDataset(e);Cn.notify(this,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this.getDatasetMeta(e),n={meta:t,index:e};!1!==Cn.notify(this,"beforeDatasetUpdate",[n])&&(t.controller.update(),Cn.notify(this,"afterDatasetUpdate",[n]))},render:function(e){var t=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=t.options.animation,i=In(e.duration,n&&n.duration),o=e.lazy;if(!1!==Cn.notify(t,"beforeRender")){var r=function(e){Cn.notify(t,"afterRender"),mt.callback(n&&n.onComplete,[e],t)};if(n&&i){var s=new kt({numSteps:i/16.66,easing:e.easing||n.easing,render:function(e,t){var n=mt.easing.effects[t.easing],i=t.currentStep,o=i/t.numSteps;e.draw(n(o),o,i)},onAnimationProgress:n.onProgress,onAnimationComplete:r});Ct.addAnimation(t,s,i,o)}else t.draw(),r(new kt({numSteps:0,chart:t}));return t}},draw:function(e){var t=this;t.clear(),mt.isNullOrUndef(e)&&(e=1),t.transition(e),t.width<=0||t.height<=0||!1!==Cn.notify(t,"beforeDraw",[e])&&(mt.each(t.boxes,function(e){e.draw(t.chartArea)},t),t.drawDatasets(e),t._drawTooltip(e),Cn.notify(t,"afterDraw",[e]))},transition:function(e){for(var t=0,n=(this.data.datasets||[]).length;t<n;++t)this.isDatasetVisible(t)&&this.getDatasetMeta(t).controller.transition(e);this.tooltip.transition(e)},drawDatasets:function(e){var t=this;if(!1!==Cn.notify(t,"beforeDatasetsDraw",[e])){for(var n=(t.data.datasets||[]).length-1;n>=0;--n)t.isDatasetVisible(n)&&t.drawDataset(n,e);Cn.notify(t,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n=this.getDatasetMeta(e),i={meta:n,index:e,easingValue:t};!1!==Cn.notify(this,"beforeDatasetDraw",[i])&&(n.controller.draw(t),Cn.notify(this,"afterDatasetDraw",[i]))},_drawTooltip:function(e){var t=this.tooltip,n={tooltip:t,easingValue:e};!1!==Cn.notify(this,"beforeTooltipDraw",[n])&&(t.draw(),Cn.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(e){return un.modes.single(this,e)},getElementsAtEvent:function(e){return un.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return un.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var i=un.modes[t];return"function"==typeof i?i(this,e,n):[]},getDatasetAtEvent:function(e){return un.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e];t._meta||(t._meta={});var n=t._meta[this.id];return n||(n=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t<n;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,n=this.data.datasets[e],i=n._meta&&n._meta[t];i&&(i.controller.destroy(),delete n._meta[t])},destroy:function(){var e,t,n=this,i=n.canvas;for(n.stop(),e=0,t=n.data.datasets.length;e<t;++e)n.destroyDatasetMeta(e);i&&(n.unbindEvents(),mt.canvas.clear(n),kn.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Cn.notify(n,"destroy"),delete $n.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new Dn({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var e=this,t=e._listeners={},n=function(){e.eventHandler.apply(e,arguments)};mt.each(e.options.events,function(i){kn.addEventListener(e,i,n),t[i]=n}),e.options.responsive&&(n=function(){e.resize()},kn.addEventListener(e,"resize",n),t.resize=n)},unbindEvents:function(){var e=this,t=e._listeners;t&&(delete e._listeners,mt.each(t,function(t,n){kn.removeEventListener(e,n,t)}))},updateHoverStyle:function(e,t,n){var i,o,r,s=n?"setHoverStyle":"removeHoverStyle";for(o=0,r=e.length;o<r;++o)(i=e[o])&&this.getDatasetMeta(i._datasetIndex).controller[s](i)},eventHandler:function(e){var t=this,n=t.tooltip;if(!1!==Cn.notify(t,"beforeEvent",[e])){t._bufferedRender=!0,t._bufferedRequest=null;var i=t.handleEvent(e);n&&(i=n._start?n.handleEvent(e):i|n.handleEvent(e)),Cn.notify(t,"afterEvent",[e]);var o=t._bufferedRequest;return o?t.render(o):i&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t,n=this,i=n.options||{},o=i.hover;return n.lastActive=n.lastActive||[],"mouseout"===e.type?n.active=[]:n.active=n.getElementsAtEventForMode(e,o.mode,o),mt.callback(i.onHover||i.hover.onHover,[e.native,n.active],n),"mouseup"!==e.type&&"click"!==e.type||i.onClick&&i.onClick.call(n,e.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,o.mode,!1),n.active.length&&o.mode&&n.updateHoverStyle(n.active,o.mode,!0),t=!mt.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,t}}),$n.instances={};var On=$n;$n.Controller=$n,$n.types={},mt.configMerge=se,mt.scaleMerge=re,mt.extend(ce.prototype,{formats:le,parse:le,format:le,add:le,diff:le,startOf:le,endOf:le,_create:function(e){return e}}),ce.override=function(e){mt.extend(ce.prototype,e)};var Mn={_date:ce},Fn={formatters:{values:function(e){return mt.isArray(e)?e:""+e},linear:function(e,t,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&e!==Math.floor(e)&&(i=e-Math.floor(e));var o=mt.log10(Math.abs(i)),r="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var s=mt.log10(Math.abs(e));r=e.toExponential(Math.floor(s)-Math.floor(o))}else{var a=-1*Math.floor(o);a=Math.max(Math.min(a,20),0),r=e.toFixed(a)}else r="0";return r},logarithmic:function(e,t,n){var i=e/Math.pow(10,Math.floor(mt.log10(e)));return 0===e?"0":1===i||2===i||5===i||0===t||t===n.length-1?e.toExponential():""}}},Rn=mt.valueOrDefault,Ln=mt.valueAtIndexOrDefault;pt._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:Fn.formatters.values,minor:{},major:{}}});var Nn=wt.extend({getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var e=this.options.ticks;for(var t in!1===e.minor&&(e.minor={display:!1}),!1===e.major&&(e.major={display:!1}),e)"major"!==t&&"minor"!==t&&(void 0===e.minor[t]&&(e.minor[t]=e[t]),void 0===e.major[t]&&(e.major[t]=e[t]))},beforeUpdate:function(){mt.callback(this.options.beforeUpdate,[this])},update:function(e,t,n){var i,o,r,s,a,l,c=this;for(c.beforeUpdate(),c.maxWidth=e,c.maxHeight=t,c.margins=mt.extend({left:0,right:0,top:0,bottom:0},n),c._maxLabelLines=0,c.longestLabelWidth=0,c.longestTextCache=c.longestTextCache||{},c.beforeSetDimensions(),c.setDimensions(),c.afterSetDimensions(),c.beforeDataLimits(),c.determineDataLimits(),c.afterDataLimits(),c.beforeBuildTicks(),a=c.buildTicks()||[],a=c.afterBuildTicks(a)||a,c.beforeTickToLabelConversion(),r=c.convertTicksToLabels(a)||c.ticks,c.afterTickToLabelConversion(),c.ticks=r,i=0,o=r.length;i<o;++i)s=r[i],(l=a[i])?l.label=s:a.push(l={label:s,major:!1});return c._ticks=a,c.beforeCalculateTickRotation(),c.calculateTickRotation(),c.afterCalculateTickRotation(),c.beforeFit(),c.fit(),c.afterFit(),c.afterUpdate(),c.minSize},afterUpdate:function(){mt.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){mt.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){mt.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){mt.callback(this.options.beforeDataLimits,[this])},determineDataLimits:mt.noop,afterDataLimits:function(){mt.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){mt.callback(this.options.beforeBuildTicks,[this])},buildTicks:mt.noop,afterBuildTicks:function(e){var t=this;return mt.isArray(e)&&e.length?mt.callback(t.options.afterBuildTicks,[t,e]):(t.ticks=mt.callback(t.options.afterBuildTicks,[t,t.ticks])||t.ticks,e)},beforeTickToLabelConversion:function(){mt.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this.options.ticks;this.ticks=this.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){mt.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){mt.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e=this,t=e.ctx,n=e.options.ticks,i=ue(e._ticks),o=mt.options._parseFont(n);t.font=o.string;var r=n.minRotation||0;if(i.length&&e.options.display&&e.isHorizontal())for(var s,a=mt.longestText(t,o.string,i,e.longestTextCache),l=a,c=e.getPixelForTick(1)-e.getPixelForTick(0)-6;l>c&&r<n.maxRotation;){var u=mt.toRadians(r);if(s=Math.cos(u),Math.sin(u)*a>e.maxHeight){r--;break}r++,l=s*a}e.labelRotation=r},afterCalculateTickRotation:function(){mt.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){mt.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=ue(e._ticks),i=e.options,o=i.ticks,r=i.scaleLabel,s=i.gridLines,a=e._isVisible(),l=i.position,c=e.isHorizontal(),u=mt.options._parseFont,d=u(o),h=i.gridLines.tickMarkLength;if(t.width=c?e.isFullWidth()?e.maxWidth-e.margins.left-e.margins.right:e.maxWidth:a&&s.drawTicks?h:0,t.height=c?a&&s.drawTicks?h:0:e.maxHeight,r.display&&a){var p=u(r),f=mt.options.toPadding(r.padding),g=p.lineHeight+f.height;c?t.height+=g:t.width+=g}if(o.display&&a){var m=mt.longestText(e.ctx,d.string,n,e.longestTextCache),v=mt.numberOfLabelLines(n),_=.5*d.size,y=e.options.ticks.padding;if(e._maxLabelLines=v,e.longestLabelWidth=m,c){var b=mt.toRadians(e.labelRotation),w=Math.cos(b),x=Math.sin(b)*m+d.lineHeight*v+_;t.height=Math.min(e.maxHeight,t.height+x+y),e.ctx.font=d.string;var k,C,S=de(e.ctx,n[0],d.string),T=de(e.ctx,n[n.length-1],d.string),E=e.getPixelForTick(0)-e.left,P=e.right-e.getPixelForTick(n.length-1);0!==e.labelRotation?(k="bottom"===l?w*S:w*_,C="bottom"===l?w*_:w*T):(k=S/2,C=T/2),e.paddingLeft=Math.max(k-E,0)+3,e.paddingRight=Math.max(C-P,0)+3}else o.mirror?m=0:m+=y+_,t.width=Math.min(e.maxWidth,t.width+m),e.paddingTop=d.size/2,e.paddingBottom=d.size/2}e.handleMargins(),e.width=t.width,e.height=t.height},handleMargins:function(){var e=this;e.margins&&(e.paddingLeft=Math.max(e.paddingLeft-e.margins.left,0),e.paddingTop=Math.max(e.paddingTop-e.margins.top,0),e.paddingRight=Math.max(e.paddingRight-e.margins.right,0),e.paddingBottom=Math.max(e.paddingBottom-e.margins.bottom,0))},afterFit:function(){mt.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(mt.isNullOrUndef(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},getLabelForIndex:mt.noop,getPixelForValue:mt.noop,getValueForPixel:mt.noop,getPixelForTick:function(e){var t=this,n=t.options.offset;if(t.isHorizontal()){var i=(t.width-(t.paddingLeft+t.paddingRight))/Math.max(t._ticks.length-(n?0:1),1),o=i*e+t.paddingLeft;n&&(o+=i/2);var r=t.left+o;return r+(t.isFullWidth()?t.margins.left:0)}var s=t.height-(t.paddingTop+t.paddingBottom);return t.top+e*(s/(t._ticks.length-1))},getPixelForDecimal:function(e){var t=this;if(t.isHorizontal()){var n=(t.width-(t.paddingLeft+t.paddingRight))*e+t.paddingLeft,i=t.left+n;return i+(t.isFullWidth()?t.margins.left:0)}return t.top+e*t.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},_autoSkip:function(e){var t,n,i=this,o=i.isHorizontal(),r=i.options.ticks.minor,s=e.length,a=!1,l=r.maxTicksLimit,c=i._tickSize()*(s-1),u=o?i.width-(i.paddingLeft+i.paddingRight):i.height-(i.paddingTop+i.PaddingBottom),d=[];for(c>u&&(a=1+Math.floor(c/u)),s>l&&(a=Math.max(a,1+Math.floor(s/l))),t=0;t<s;t++)n=e[t],a>1&&t%a>0&&delete n.label,d.push(n);return d},_tickSize:function(){var e=this,t=e.isHorizontal(),n=e.options.ticks.minor,i=mt.toRadians(e.labelRotation),o=Math.abs(Math.cos(i)),r=Math.abs(Math.sin(i)),s=n.autoSkipPadding||0,a=e.longestLabelWidth+s||0,l=mt.options._parseFont(n),c=e._maxLabelLines*l.lineHeight+s||0;return t?c*o>a*r?a/o:c/r:c*r<a*o?c/o:a/r},_isVisible:function(){var e,t,n,i=this.chart,o=this.options.display;if("auto"!==o)return!!o;for(e=0,t=i.data.datasets.length;e<t;++e)if(i.isDatasetVisible(e)&&((n=i.getDatasetMeta(e)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},draw:function(e){var t=this,n=t.options;if(t._isVisible()){var i,o,r,s=t.chart,a=t.ctx,l=pt.global.defaultFontColor,c=n.ticks.minor,u=n.ticks.major||c,d=n.gridLines,h=n.scaleLabel,p=n.position,f=0!==t.labelRotation,g=c.mirror,m=t.isHorizontal(),v=mt.options._parseFont,_=c.display&&c.autoSkip?t._autoSkip(t.getTicks()):t.getTicks(),y=Rn(c.fontColor,l),b=v(c),w=b.lineHeight,x=Rn(u.fontColor,l),k=v(u),C=c.padding,S=c.labelOffset,T=d.drawTicks?d.tickMarkLength:0,E=Rn(h.fontColor,l),P=v(h),A=mt.options.toPadding(h.padding),D=mt.toRadians(t.labelRotation),I=[],$=d.drawBorder?Ln(d.lineWidth,0,0):0,O=mt._alignPixel;if("top"===p?(i=O(s,t.bottom,$),o=t.bottom-T,r=i-$/2):"bottom"===p?(i=O(s,t.top,$),o=i+$/2,r=t.top+T):"left"===p?(i=O(s,t.right,$),o=t.right-T,r=i-$/2):(i=O(s,t.left,$),o=i+$/2,r=t.left+T),mt.each(_,function(i,a){if(!mt.isNullOrUndef(i.label)){var l,c,u,h,v,_,y,b,x,k,E,P,A,M,F,R,L=i.label;a===t.zeroLineIndex&&n.offset===d.offsetGridLines?(l=d.zeroLineWidth,c=d.zeroLineColor,u=d.zeroLineBorderDash||[],h=d.zeroLineBorderDashOffset||0):(l=Ln(d.lineWidth,a),c=Ln(d.color,a),u=d.borderDash||[],h=d.borderDashOffset||0);var N=mt.isArray(L)?L.length:1,B=function(e,t,n){var i=e.getPixelForTick(t);return n&&(1===e.getTicks().length?i-=e.isHorizontal()?Math.max(i-e.left,e.right-i):Math.max(i-e.top,e.bottom-i):i-=0===t?(e.getPixelForTick(1)-i)/2:(i-e.getPixelForTick(t-1))/2),i}(t,a,d.offsetGridLines);if(m){var U=T+C;B<t.left-1e-7&&(c="rgba(0,0,0,0)"),v=y=x=E=O(s,B,l),_=o,b=r,A=t.getPixelForTick(a)+S,"top"===p?(k=O(s,e.top,$)+$/2,P=e.bottom,F=((f?1:.5)-N)*w,R=f?"left":"center",M=t.bottom-U):(k=e.top,P=O(s,e.bottom,$)-$/2,F=(f?0:.5)*w,R=f?"right":"center",M=t.top+U)}else{var j=(g?0:T)+C;B<t.top-1e-7&&(c="rgba(0,0,0,0)"),v=o,y=r,_=b=k=P=O(s,B,l),M=t.getPixelForTick(a)+S,F=(1-N)*w/2,"left"===p?(x=O(s,e.left,$)+$/2,E=e.right,R=g?"left":"right",A=t.right-j):(x=e.left,E=O(s,e.right,$)-$/2,R=g?"right":"left",A=t.left+j)}I.push({tx1:v,ty1:_,tx2:y,ty2:b,x1:x,y1:k,x2:E,y2:P,labelX:A,labelY:M,glWidth:l,glColor:c,glBorderDash:u,glBorderDashOffset:h,rotation:-1*D,label:L,major:i.major,textOffset:F,textAlign:R})}}),mt.each(I,function(e){var t=e.glWidth,n=e.glColor;if(d.display&&t&&n&&(a.save(),a.lineWidth=t,a.strokeStyle=n,a.setLineDash&&(a.setLineDash(e.glBorderDash),a.lineDashOffset=e.glBorderDashOffset),a.beginPath(),d.drawTicks&&(a.moveTo(e.tx1,e.ty1),a.lineTo(e.tx2,e.ty2)),d.drawOnChartArea&&(a.moveTo(e.x1,e.y1),a.lineTo(e.x2,e.y2)),a.stroke(),a.restore()),c.display){a.save(),a.translate(e.labelX,e.labelY),a.rotate(e.rotation),a.font=e.major?k.string:b.string,a.fillStyle=e.major?x:y,a.textBaseline="middle",a.textAlign=e.textAlign;var i=e.label,o=e.textOffset;if(mt.isArray(i))for(var r=0;r<i.length;++r)a.fillText(""+i[r],0,o),o+=w;else a.fillText(i,0,o);a.restore()}}),h.display){var M,F,R=0,L=P.lineHeight/2;if(m)M=t.left+(t.right-t.left)/2,F="bottom"===p?t.bottom-L-A.bottom:t.top+L+A.top;else{var N="left"===p;M=N?t.left+L+A.top:t.right-L-A.top,F=t.top+(t.bottom-t.top)/2,R=N?-.5*Math.PI:.5*Math.PI}a.save(),a.translate(M,F),a.rotate(R),a.textAlign="center",a.textBaseline="middle",a.fillStyle=E,a.font=P.string,a.fillText(h.labelString,0,0),a.restore()}if($){var B,U,j,z,H=$,W=Ln(d.lineWidth,_.length-1,0);m?(B=O(s,t.left,H)-H/2,U=O(s,t.right,W)+W/2,j=z=i):(j=O(s,t.top,H)-H/2,z=O(s,t.bottom,W)+W/2,B=U=i),a.lineWidth=$,a.strokeStyle=Ln(d.color,0),a.beginPath(),a.moveTo(B,j),a.lineTo(U,z),a.stroke()}}}}),Bn=Nn.extend({getLabels:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels},determineDataLimits:function(){var e,t=this,n=t.getLabels();t.minIndex=0,t.maxIndex=n.length-1,void 0!==t.options.ticks.min&&(e=n.indexOf(t.options.ticks.min),t.minIndex=-1!==e?e:t.minIndex),void 0!==t.options.ticks.max&&(e=n.indexOf(t.options.ticks.max),t.maxIndex=-1!==e?e:t.maxIndex),t.min=n[t.minIndex],t.max=n[t.maxIndex]},buildTicks:function(){var e=this,t=e.getLabels();e.ticks=0===e.minIndex&&e.maxIndex===t.length-1?t:t.slice(e.minIndex,e.maxIndex+1)},getLabelForIndex:function(e,t){var n=this,i=n.chart;return i.getDatasetMeta(t).controller._getValueScaleId()===n.id?n.getRightValue(i.data.datasets[t].data[e]):n.ticks[e-n.minIndex]},getPixelForValue:function(e,t){var n,i=this,o=i.options.offset,r=Math.max(i.maxIndex+1-i.minIndex-(o?0:1),1);if(null!=e&&(n=i.isHorizontal()?e.x:e.y),void 0!==n||void 0!==e&&isNaN(t)){e=n||e;var s=i.getLabels().indexOf(e);t=-1!==s?s:t}if(i.isHorizontal()){var a=i.width/r,l=a*(t-i.minIndex);return o&&(l+=a/2),i.left+l}var c=i.height/r,u=c*(t-i.minIndex);return o&&(u+=c/2),i.top+u},getPixelForTick:function(e){return this.getPixelForValue(this.ticks[e],e+this.minIndex,null)},getValueForPixel:function(e){var t=this,n=t.options.offset,i=Math.max(t._ticks.length-(n?0:1),1),o=t.isHorizontal(),r=(o?t.width:t.height)/i;return e-=o?t.left:t.top,n&&(e-=r/2),(e<=0?0:Math.round(e/r))+t.minIndex},getBasePixel:function(){return this.bottom}}),Un={position:"bottom"};Bn._defaults=Un;var jn=mt.noop,zn=mt.isNullOrUndef,Hn=Nn.extend({getRightValue:function(e){return"string"==typeof e?+e:Nn.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=mt.sign(e.min),i=mt.sign(e.max);n<0&&i<0?e.max=0:n>0&&i>0&&(e.min=0)}var o=void 0!==t.min||void 0!==t.suggestedMin,r=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),o!==r&&e.min>=e.max&&(o?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,n=t.stepSize,i=t.maxTicksLimit;return n?e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(e=this._computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:jn,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:mt.valueOrDefault(t.fixedStepSize,t.stepSize)},o=e.ticks=function(e,t){var n,i,o,r,s=[],a=e.stepSize,l=a||1,c=e.maxTicks-1,u=e.min,d=e.max,h=e.precision,p=t.min,f=t.max,g=mt.niceNum((f-p)/c/l)*l;if(g<1e-14&&zn(u)&&zn(d))return[p,f];(r=Math.ceil(f/g)-Math.floor(p/g))>c&&(g=mt.niceNum(r*g/c/l)*l),a||zn(h)?n=Math.pow(10,mt._decimalPlaces(g)):(n=Math.pow(10,h),g=Math.ceil(g*n)/n),i=Math.floor(p/g)*g,o=Math.ceil(f/g)*g,a&&(!zn(u)&&mt.almostWhole(u/g,g/1e3)&&(i=u),!zn(d)&&mt.almostWhole(d/g,g/1e3)&&(o=d)),r=(o-i)/g,r=mt.almostEquals(r,Math.round(r),g/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,o=Math.round(o*n)/n,s.push(zn(u)?i:u);for(var m=1;m<r;++m)s.push(Math.round((i+m*g)*n)/n);return s.push(zn(d)?o:d),s}(i,e);e.handleDirectionalChanges(),e.max=mt.max(o),e.min=mt.min(o),t.reverse?(o.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),Nn.prototype.convertTicksToLabels.call(e)}}),Wn={position:"left",ticks:{callback:Fn.formatters.linear}},qn=Hn.extend({determineDataLimits:function(){function e(e){return r?e.xAxisID===t.id:e.yAxisID===t.id}var t=this,n=t.options,i=t.chart,o=i.data.datasets,r=t.isHorizontal();t.min=null,t.max=null;var s=n.stacked;if(void 0===s&&mt.each(o,function(t,n){if(!s){var o=i.getDatasetMeta(n);i.isDatasetVisible(n)&&e(o)&&void 0!==o.stack&&(s=!0)}}),n.stacked||s){var a={};mt.each(o,function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");void 0===a[l]&&(a[l]={positiveValues:[],negativeValues:[]});var c=a[l].positiveValues,u=a[l].negativeValues;i.isDatasetVisible(r)&&e(s)&&mt.each(o.data,function(e,i){var o=+t.getRightValue(e);isNaN(o)||s.data[i].hidden||(c[i]=c[i]||0,u[i]=u[i]||0,n.relativePoints?c[i]=100:o<0?u[i]+=o:c[i]+=o)})}),mt.each(a,function(e){var n=e.positiveValues.concat(e.negativeValues),i=mt.min(n),o=mt.max(n);t.min=null===t.min?i:Math.min(t.min,i),t.max=null===t.max?o:Math.max(t.max,o)})}else mt.each(o,function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&e(r)&&mt.each(n.data,function(e,n){var i=+t.getRightValue(e);isNaN(i)||r.data[n].hidden||(null===t.min?t.min=i:i<t.min&&(t.min=i),null===t.max?t.max=i:i>t.max&&(t.max=i))})});t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},_computeTickLimit:function(){var e;return this.isHorizontal()?Math.ceil(this.width/40):(e=mt.options._parseFont(this.options.ticks),Math.ceil(this.height/e.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){var t=this,n=t.start,i=+t.getRightValue(e),o=t.end-n;return t.isHorizontal()?t.left+t.width/o*(i-n):t.bottom-t.height/o*(i-n)},getValueForPixel:function(e){var t=this,n=t.isHorizontal(),i=n?t.width:t.height,o=(n?e-t.left:t.bottom-e)/i;return t.start+(t.end-t.start)*o},getPixelForTick:function(e){return this.getPixelForValue(this.ticksAsNumbers[e])}}),Vn=Wn;qn._defaults=Vn;var Yn=mt.valueOrDefault,Gn={position:"left",ticks:{callback:Fn.formatters.logarithmic}},Xn=Nn.extend({determineDataLimits:function(){function e(e){return r?e.xAxisID===t.id:e.yAxisID===t.id}var t=this,n=t.options,i=t.chart,o=i.data.datasets,r=t.isHorizontal();t.min=null,t.max=null,t.minNotZero=null;var s=n.stacked;if(void 0===s&&mt.each(o,function(t,n){if(!s){var o=i.getDatasetMeta(n);i.isDatasetVisible(n)&&e(o)&&void 0!==o.stack&&(s=!0)}}),n.stacked||s){var a={};mt.each(o,function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&e(s)&&(void 0===a[l]&&(a[l]=[]),mt.each(o.data,function(e,n){var i=a[l],o=+t.getRightValue(e);isNaN(o)||s.data[n].hidden||o<0||(i[n]=i[n]||0,i[n]+=o)}))}),mt.each(a,function(e){if(e.length>0){var n=mt.min(e),i=mt.max(e);t.min=null===t.min?n:Math.min(t.min,n),t.max=null===t.max?i:Math.max(t.max,i)}})}else mt.each(o,function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&e(r)&&mt.each(n.data,function(e,n){var i=+t.getRightValue(e);isNaN(i)||r.data[n].hidden||i<0||(null===t.min?t.min=i:i<t.min&&(t.min=i),null===t.max?t.max=i:i>t.max&&(t.max=i),0!==i&&(null===t.minNotZero||i<t.minNotZero)&&(t.minNotZero=i))})});this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;e.min=he(t.min,e.min),e.max=he(t.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(mt.log10(e.min))-1),e.max=Math.pow(10,Math.floor(mt.log10(e.max))+1)):(e.min=1,e.max=10)),null===e.min&&(e.min=Math.pow(10,Math.floor(mt.log10(e.max))-1)),null===e.max&&(e.max=0!==e.min?Math.pow(10,Math.floor(mt.log10(e.min))+1):10),null===e.minNotZero&&(e.min>0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(mt.log10(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),i={min:he(t.min),max:he(t.max)},o=e.ticks=function(e,t){var n,i,o=[],r=Yn(e.min,Math.pow(10,Math.floor(mt.log10(t.min)))),s=Math.floor(mt.log10(t.max)),a=Math.ceil(t.max/Math.pow(10,s));0===r?(n=Math.floor(mt.log10(t.minNotZero)),i=Math.floor(t.minNotZero/Math.pow(10,n)),o.push(r),r=i*Math.pow(10,n)):(n=Math.floor(mt.log10(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{o.push(r),10==++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n<s||n===s&&i<a);var c=Yn(e.max,r);return o.push(c),o}(i,e);e.max=mt.max(o),e.min=mt.min(o),t.reverse?(n=!n,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n&&o.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),Nn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){return this.getPixelForValue(this.tickValues[e])},_getFirstTickValue:function(e){var t=Math.floor(mt.log10(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},getPixelForValue:function(e){var t,n,i,o,r,s=this,a=s.options.ticks,l=a.reverse,c=mt.log10,u=s._getFirstTickValue(s.minNotZero),d=0;return e=+s.getRightValue(e),l?(i=s.end,o=s.start,r=-1):(i=s.start,o=s.end,r=1),s.isHorizontal()?(t=s.width,n=l?s.right:s.left):(t=s.height,r*=-1,n=l?s.top:s.bottom),e!==i&&(0===i&&(t-=d=Yn(a.fontSize,pt.global.defaultFontSize),i=u),0!==e&&(d+=t/(c(o)-c(i))*(c(e)-c(i))),n+=r*d),n},getValueForPixel:function(e){var t,n,i,o,r=this,s=r.options.ticks,a=s.reverse,l=mt.log10,c=r._getFirstTickValue(r.minNotZero);if(a?(n=r.end,i=r.start):(n=r.start,i=r.end),r.isHorizontal()?(t=r.width,o=a?r.right-e:e-r.left):(t=r.height,o=a?e-r.top:r.bottom-e),o!==n){if(0===n){var u=Yn(s.fontSize,pt.global.defaultFontSize);o-=u,t-=u,n=c}o*=l(i)-l(n),o/=t,o=Math.pow(10,l(n)+o)}return o}}),Kn=Gn;Xn._defaults=Kn;var Qn=mt.valueOrDefault,Jn=mt.valueAtIndexOrDefault,Zn=mt.options.resolve,ei={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Fn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}},ti=Hn.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=fe(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;mt.each(t.data.datasets,function(o,r){if(t.isDatasetVisible(r)){var s=t.getDatasetMeta(r);mt.each(o.data,function(t,o){var r=+e.getRightValue(t);isNaN(r)||s.data[o].hidden||(n=Math.min(r,n),i=Math.max(r,i))})}}),e.min=n===Number.POSITIVE_INFINITY?0:n,e.max=i===Number.NEGATIVE_INFINITY?0:i,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/fe(this.options))},convertTicksToLabels:function(){var e=this;Hn.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options;e.display&&e.pointLabels.display?function(e){var t,n,i,o=mt.options._parseFont(e.options.pointLabels),r={l:0,r:e.width,t:0,b:e.height-e.paddingTop},s={};e.ctx.font=o.string,e._pointLabelSizes=[];var a,l,c,u=pe(e);for(t=0;t<u;t++){i=e.getPointPosition(t,e.drawingArea+5),a=e.ctx,l=o.lineHeight,c=e.pointLabels[t]||"",n=mt.isArray(c)?{w:mt.longestText(a,a.font,c),h:c.length*l}:{w:a.measureText(c).width,h:l},e._pointLabelSizes[t]=n;var d=e.getIndexAngle(t),h=mt.toDegrees(d)%360,p=ge(h,i.x,n.w,0,180),f=ge(h,i.y,n.h,90,270);p.start<r.l&&(r.l=p.start,s.l=d),p.end>r.r&&(r.r=p.end,s.r=d),f.start<r.t&&(r.t=f.start,s.t=d),f.end>r.b&&(r.b=f.end,s.b=d)}e.setReductions(e.drawingArea,r,s)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var i=this,o=t.l/Math.sin(n.l),r=Math.max(t.r-i.width,0)/Math.sin(n.r),s=-t.t/Math.cos(n.t),a=-Math.max(t.b-(i.height-i.paddingTop),0)/Math.cos(n.b);o=ye(o),r=ye(r),s=ye(s),a=ye(a),i.drawingArea=Math.min(Math.floor(e-(o+r)/2),Math.floor(e-(s+a)/2)),i.setCenterPoint(o,r,s,a)},setCenterPoint:function(e,t,n,i){var o=this,r=o.width-t-o.drawingArea,s=e+o.drawingArea,a=n+o.drawingArea,l=o.height-o.paddingTop-i-o.drawingArea;o.xCenter=Math.floor((s+r)/2+o.left),o.yCenter=Math.floor((a+l)/2+o.top+o.paddingTop)},getIndexAngle:function(e){return e*(2*Math.PI/pe(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(null===e)return 0;var n=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*n:(e-t.min)*n},getPointPosition:function(e,t){var n=this.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},
getBasePosition:function(){var e=this.min,t=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0)},draw:function(){var e=this,t=e.options,n=t.gridLines,i=t.ticks;if(t.display){var o=e.ctx,r=this.getIndexAngle(0),s=mt.options._parseFont(i);(t.angleLines.display||t.pointLabels.display)&&function(e){var t=e.ctx,n=e.options,i=n.angleLines,o=n.gridLines,r=n.pointLabels,s=Qn(i.lineWidth,o.lineWidth),a=Qn(i.color,o.color),l=fe(n);t.save(),t.lineWidth=s,t.strokeStyle=a,t.setLineDash&&(t.setLineDash(Zn([i.borderDash,o.borderDash,[]])),t.lineDashOffset=Zn([i.borderDashOffset,o.borderDashOffset,0]));var c=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),u=mt.options._parseFont(r);t.font=u.string,t.textBaseline="middle";for(var d=pe(e)-1;d>=0;d--){if(i.display&&s&&a){var h=e.getPointPosition(d,c);t.beginPath(),t.moveTo(e.xCenter,e.yCenter),t.lineTo(h.x,h.y),t.stroke()}if(r.display){var p=0===d?l/2:0,f=e.getPointPosition(d,c+p+5),g=Jn(r.fontColor,d,pt.global.defaultFontColor);t.fillStyle=g;var m=e.getIndexAngle(d),v=mt.toDegrees(m);t.textAlign=me(v),_e(v,e._pointLabelSizes[d],f),ve(t,e.pointLabels[d]||"",f,u.lineHeight)}}t.restore()}(e),mt.each(e.ticks,function(t,a){if(a>0||i.reverse){var l=e.getDistanceFromCenterForValue(e.ticksAsNumbers[a]);if(n.display&&0!==a&&function(e,t,n,i){var o,r=e.ctx,s=t.circular,a=pe(e),l=Jn(t.color,i-1),c=Jn(t.lineWidth,i-1);if((s||a)&&l&&c){if(r.save(),r.strokeStyle=l,r.lineWidth=c,r.setLineDash&&(r.setLineDash(t.borderDash||[]),r.lineDashOffset=t.borderDashOffset||0),r.beginPath(),s)r.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{o=e.getPointPosition(0,n),r.moveTo(o.x,o.y);for(var u=1;u<a;u++)o=e.getPointPosition(u,n),r.lineTo(o.x,o.y)}r.closePath(),r.stroke(),r.restore()}}(e,n,l,a),i.display){var c=Qn(i.fontColor,pt.global.defaultFontColor);if(o.font=s.string,o.save(),o.translate(e.xCenter,e.yCenter),o.rotate(r),i.showLabelBackdrop){var u=o.measureText(t).width;o.fillStyle=i.backdropColor,o.fillRect(-u/2-i.backdropPaddingX,-l-s.size/2-i.backdropPaddingY,u+2*i.backdropPaddingX,s.size+2*i.backdropPaddingY)}o.textAlign="center",o.textBaseline="middle",o.fillStyle=c,o.fillText(t,0,-l),o.restore()}}})}}}),ni=ei;ti._defaults=ni;var ii=mt.valueOrDefault,oi=Number.MIN_SAFE_INTEGER||-9007199254740991,ri=Number.MAX_SAFE_INTEGER||9007199254740991,si={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,15,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,15,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},ai=Object.keys(si),li=Nn.extend({initialize:function(){this.mergeTicksOptions(),Nn.prototype.initialize.call(this)},update:function(){var e=this.options,t=e.time||(e.time={}),n=this._adapter=new Mn._date(e.adapters.date);return t.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),mt.mergeIf(t.displayFormats,n.formats()),Nn.prototype.update.apply(this,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),Nn.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,i,o,r,s=this,a=s.chart,l=s._adapter,c=s.options.time,u=c.unit||"day",d=ri,h=oi,p=[],f=[],g=[],m=a.data.labels||[];for(e=0,n=m.length;e<n;++e)g.push(Ce(s,m[e]));for(e=0,n=(a.data.datasets||[]).length;e<n;++e)if(a.isDatasetVisible(e))if(o=a.data.datasets[e].data,mt.isObject(o[0]))for(f[e]=[],t=0,i=o.length;t<i;++t)r=Ce(s,o[t]),p.push(r),f[e][t]=r;else{for(t=0,i=g.length;t<i;++t)p.push(g[t]);f[e]=g.slice(0)}else f[e]=[];g.length&&(g=we(g).sort(be),d=Math.min(d,g[0]),h=Math.max(h,g[g.length-1])),p.length&&(p=we(p).sort(be),d=Math.min(d,p[0]),h=Math.max(h,p[p.length-1])),d=Ce(s,c.min)||d,h=Ce(s,c.max)||h,d=d===ri?+l.startOf(Date.now(),u):d,h=h===oi?+l.endOf(Date.now(),u)+1:h,s.min=Math.min(d,h),s.max=Math.max(d+1,h),s._horizontal=s.isHorizontal(),s._table=[],s._timestamps={data:p,datasets:f,labels:g}},buildTicks:function(){var e,t,n,i=this,o=i.min,r=i.max,s=i.options,a=s.time,l=[],c=[];switch(s.ticks.source){case"data":l=i._timestamps.data;break;case"labels":l=i._timestamps.labels;break;case"auto":default:l=Te(i,o,r,i.getLabelCapacity(o))}for("ticks"===s.bounds&&l.length&&(o=l[0],r=l[l.length-1]),o=Ce(i,a.min)||o,r=Ce(i,a.max)||r,e=0,t=l.length;e<t;++e)(n=l[e])>=o&&n<=r&&c.push(n);return i.min=o,i.max=r,i._unit=a.unit||function(e,t,n,i,o){var r,s;for(r=ai.length-1;r>=ai.indexOf(n);r--)if(s=ai[r],si[s].common&&e._adapter.diff(o,i,s)>=t.length)return s;return ai[n?ai.indexOf(n):0]}(i,c,a.minUnit,i.min,i.max),i._majorUnit=Se(i._unit),i._table=function(e,t,n,i){if("linear"===i||!e.length)return[{time:t,pos:0},{time:n,pos:1}];var o,r,s,a,l,c=[],u=[t];for(o=0,r=e.length;o<r;++o)(a=e[o])>t&&a<n&&u.push(a);for(u.push(n),o=0,r=u.length;o<r;++o)l=u[o+1],s=u[o-1],a=u[o],void 0!==s&&void 0!==l&&Math.round((l+s)/2)===a||c.push({time:a,pos:o/(r-1)});return c}(i._timestamps.data,o,r,s.distribution),i._offsets=function(e,t,n,i,o){var r,s,a=0,l=0;return o.offset&&t.length&&(o.time.min||(r=xe(e,"time",t[0],"pos"),a=1===t.length?1-r:(xe(e,"time",t[1],"pos")-r)/2),o.time.max||(s=xe(e,"time",t[t.length-1],"pos"),l=1===t.length?s:(s-xe(e,"time",t[t.length-2],"pos"))/2)),{start:a,end:l}}(i._table,c,0,0,s),s.ticks.reverse&&c.reverse(),function(e,t,n){var i,o,r,s,a=[];for(i=0,o=t.length;i<o;++i)r=t[i],s=!!n&&r===+e._adapter.startOf(r,n),a.push({value:r,major:s});return a}(i,c,i._majorUnit)},getLabelForIndex:function(e,t){var n=this,i=n._adapter,o=n.chart.data,r=n.options.time,s=o.labels&&e<o.labels.length?o.labels[e]:"",a=o.datasets[t].data[e];return mt.isObject(a)&&(s=n.getRightValue(a)),r.tooltipFormat?i.format(ke(n,s),r.tooltipFormat):"string"==typeof s?s:i.format(ke(n,s),r.displayFormats.datetime)},tickFormatFunction:function(e,t,n,i){var o=this._adapter,r=this.options,s=r.time.displayFormats,a=s[this._unit],l=this._majorUnit,c=s[l],u=+o.startOf(e,l),d=r.ticks.major,h=d.enabled&&l&&c&&e===u,p=o.format(e,i||(h?c:a)),f=h?d:r.ticks.minor,g=ii(f.callback,f.userCallback);return g?g(p,t,n):p},convertTicksToLabels:function(e){var t,n,i=[];for(t=0,n=e.length;t<n;++t)i.push(this.tickFormatFunction(e[t].value,t,e));return i},getPixelForOffset:function(e){var t=this,n=t.options.ticks.reverse,i=t._horizontal?t.width:t.height,o=t._horizontal?n?t.right:t.left:n?t.bottom:t.top,r=xe(t._table,"time",e,"pos"),s=i*(t._offsets.start+r)/(t._offsets.start+1+t._offsets.end);return n?o-s:o+s},getPixelForValue:function(e,t,n){var i=null;if(void 0!==t&&void 0!==n&&(i=this._timestamps.datasets[n][t]),null===i&&(i=Ce(this,e)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(e){var t=this.getTicks();return e>=0&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this,n=t._horizontal?t.width:t.height,i=t._horizontal?t.left:t.top,o=(n?(e-i)/n:0)*(t._offsets.start+1+t._offsets.start)-t._offsets.end,r=xe(t._table,"pos",o,"time");return t._adapter._create(r)},getLabelWidth:function(e){var t=this.options.ticks,n=this.ctx.measureText(e).width,i=mt.toRadians(t.maxRotation),o=Math.cos(i),r=Math.sin(i);return n*o+ii(t.fontSize,pt.global.defaultFontSize)*r},getLabelCapacity:function(e){var t=this,n=t.options.time.displayFormats.millisecond,i=t.tickFormatFunction(e,0,[],n),o=t.getLabelWidth(i),r=t.isHorizontal()?t.width:t.height,s=Math.floor(r/o);return s>0?s:1}}),ci={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};li._defaults=ci;var ui={category:Bn,linear:qn,logarithmic:Xn,radialLinear:ti,time:li},di={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Mn._date.override("function"==typeof e?{_id:"moment",formats:function(){return di},parse:function(t,n){return"string"==typeof t&&"string"==typeof n?t=e(t,n):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,n){return e(t).format(n)},add:function(t,n,i){return e(t).add(n,i).valueOf()},diff:function(t,n,i){return e.duration(e(t).diff(e(n))).as(i)},startOf:function(t,n,i){return t=e(t),"isoWeek"===n?t.isoWeekday(i).valueOf():t.startOf(n).valueOf()},endOf:function(t,n){return e(t).endOf(n).valueOf()},_create:function(t){return e(t)}}:{}),pt._set("global",{plugins:{filler:{propagate:!0}}});var hi={dataset:function(e){var t=e.fill,n=e.chart,i=n.getDatasetMeta(t),o=i&&n.isDatasetVisible(t)&&i.dataset._children||[],r=o.length||0;return r?function(e,t){return t<r&&o[t]._view||null}:null},boundary:function(e){var t=e.boundary,n=t?t.x:null,i=t?t.y:null;return function(e){return{x:null===n?e.x:n,y:null===i?e.y:i}}}},pi={id:"filler",afterDatasetsUpdate:function(e,t){var n,i,o,r,s=(e.data.datasets||[]).length,a=t.propagate,l=[];for(i=0;i<s;++i)r=null,(o=(n=e.getDatasetMeta(i)).dataset)&&o._model&&o instanceof Nt.Line&&(r={visible:e.isDatasetVisible(i),fill:Ee(o,i,s),chart:e,el:o}),n.$filler=r,l.push(r);for(i=0;i<s;++i)(r=l[i])&&(r.fill=Ae(l,i,a),r.boundary=Pe(r),r.mapper=De(r))},beforeDatasetDraw:function(e,t){var n=t.meta.$filler;if(n){var i=e.ctx,o=n.el,r=o._view,s=o._children||[],a=n.mapper,l=r.backgroundColor||pt.global.defaultColor;a&&l&&s.length&&(mt.canvas.clipArea(i,e.chartArea),function(e,t,n,i,o,r){var s,a,l,c,u,d,h,p=t.length,f=i.spanGaps,g=[],m=[],v=0,_=0;for(e.beginPath(),s=0,a=p+!!r;s<a;++s)u=n(c=t[l=s%p]._view,l,i),d=Ie(c),h=Ie(u),d&&h?(v=g.push(c),_=m.push(u)):v&&_&&(f?(d&&g.push(c),h&&m.push(u)):($e(e,g,m,v,_),v=_=0,g=[],m=[]));$e(e,g,m,v,_),e.closePath(),e.fillStyle=o,e.fill()}(i,s,a,r,l,o._loop),mt.canvas.unclipArea(i))}}},fi=mt.noop,gi=mt.valueOrDefault;pt._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,i=this.chart,o=i.getDatasetMeta(n);o.hidden=null===o.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data;return mt.isArray(t.datasets)?t.datasets.map(function(t,n){return{text:t.label,fillStyle:mt.isArray(t.backgroundColor)?t.backgroundColor[0]:t.backgroundColor,hidden:!e.isDatasetVisible(n),lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,pointStyle:t.pointStyle,datasetIndex:n}},this):[]}}},legendCallback:function(e){var t=[];t.push('<ul class="'+e.id+'-legend">');for(var n=0;n<e.data.datasets.length;n++)t.push('<li><span style="background-color:'+e.data.datasets[n].backgroundColor+'"></span>'),e.data.datasets[n].label&&t.push(e.data.datasets[n].label),t.push("</li>");return t.push("</ul>"),t.join("")}});var mi=wt.extend({initialize:function(e){mt.extend(this,e),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:fi,update:function(e,t,n){var i=this;return i.beforeUpdate(),i.maxWidth=e,i.maxHeight=t,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:fi,beforeSetDimensions:fi,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:fi,beforeBuildLabels:fi,buildLabels:function(){var e=this,t=e.options.labels||{},n=mt.callback(t.generateLabels,[e.chart],e)||[];t.filter&&(n=n.filter(function(n){return t.filter(n,e.chart.data)})),e.options.reverse&&n.reverse(),e.legendItems=n},afterBuildLabels:fi,beforeFit:fi,fit:function(){var e=this,t=e.options,n=t.labels,i=t.display,o=e.ctx,r=mt.options._parseFont(n),s=r.size,a=e.legendHitBoxes=[],l=e.minSize,c=e.isHorizontal();if(c?(l.width=e.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=e.maxHeight),i)if(o.font=r.string,c){var u=e.lineWidths=[0],d=0;o.textAlign="left",o.textBaseline="top",mt.each(e.legendItems,function(e,t){var i=Oe(n,s)+s/2+o.measureText(e.text).width;(0===t||u[u.length-1]+i+n.padding>l.width)&&(d+=s+n.padding,u[u.length-(t>0?0:1)]=n.padding),a[t]={left:0,top:0,width:i,height:s},u[u.length-1]+=i+n.padding}),l.height+=d}else{var h=n.padding,p=e.columnWidths=[],f=n.padding,g=0,m=0,v=s+h;mt.each(e.legendItems,function(e,t){var i=Oe(n,s)+s/2+o.measureText(e.text).width;t>0&&m+v>l.height-h&&(f+=g+n.padding,p.push(g),g=0,m=0),g=Math.max(g,i),m+=v,a[t]={left:0,top:0,width:i,height:s}}),f+=g,p.push(g),l.width+=f}e.width=l.width,e.height=l.height},afterFit:fi,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,n=t.labels,i=pt.global,o=i.defaultColor,r=i.elements.line,s=e.width,a=e.lineWidths;if(t.display){var l,c=e.ctx,u=gi(n.fontColor,i.defaultFontColor),d=mt.options._parseFont(n),h=d.size;c.textAlign="left",c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=u,c.fillStyle=u,c.font=d.string;var p=Oe(n,h),f=e.legendHitBoxes,g=e.isHorizontal();l=g?{x:e.left+(s-a[0])/2+n.padding,y:e.top+n.padding,line:0}:{x:e.left+n.padding,y:e.top+n.padding,line:0};var m=h+n.padding;mt.each(e.legendItems,function(i,u){var d=c.measureText(i.text).width,v=p+h/2+d,_=l.x,y=l.y;g?u>0&&_+v+n.padding>e.left+e.minSize.width&&(y=l.y+=m,l.line++,_=l.x=e.left+(s-a[l.line])/2+n.padding):u>0&&y+m>e.top+e.minSize.height&&(_=l.x=_+e.columnWidths[l.line]+n.padding,y=l.y=e.top+n.padding,l.line++),function(e,n,i){if(!(isNaN(p)||p<=0)){c.save();var s=gi(i.lineWidth,r.borderWidth);if(c.fillStyle=gi(i.fillStyle,o),c.lineCap=gi(i.lineCap,r.borderCapStyle),c.lineDashOffset=gi(i.lineDashOffset,r.borderDashOffset),c.lineJoin=gi(i.lineJoin,r.borderJoinStyle),c.lineWidth=s,c.strokeStyle=gi(i.strokeStyle,o),c.setLineDash&&c.setLineDash(gi(i.lineDash,r.borderDash)),t.labels&&t.labels.usePointStyle){var a=p*Math.SQRT2/2,l=e+p/2,u=n+h/2;mt.canvas.drawPoint(c,i.pointStyle,a,l,u)}else 0!==s&&c.strokeRect(e,n,p,h),c.fillRect(e,n,p,h);c.restore()}}(_,y,i),f[u].left=_,f[u].top=y,function(e,t,n,i){var o=h/2,r=p+o+e,s=t+o;c.fillText(n.text,r,s),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,s),c.lineTo(r+i,s),c.stroke())}(_,y,i,d),g?l.x+=v+n.padding:l.y+=m})}},_getLegendItemAt:function(e,t){var n,i,o,r=this;if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom)for(o=r.legendHitBoxes,n=0;n<o.length;++n)if(e>=(i=o[n]).left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(e){var t,n=this,i=n.options,o="mouseup"===e.type?"click":e.type;if("mousemove"===o){if(!i.onHover&&!i.onLeave)return}else{if("click"!==o)return;if(!i.onClick)return}t=n._getLegendItemAt(e.x,e.y),"click"===o?t&&i.onClick&&i.onClick.call(n,e.native,t):(i.onLeave&&t!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,e.native,n._hoveredItem),n._hoveredItem=t),i.onHover&&t&&i.onHover.call(n,e.native,t))}}),vi={id:"legend",_element:mi,beforeInit:function(e){var t=e.options.legend;t&&Me(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(mt.mergeIf(t,pt.global.legend),n?(hn.configure(e,n,t),n.options=t):Me(e,t)):n&&(hn.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},_i=mt.noop;pt._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var yi=wt.extend({initialize:function(e){mt.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:_i,update:function(e,t,n){var i=this;return i.beforeUpdate(),i.maxWidth=e,i.maxHeight=t,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:_i,beforeSetDimensions:_i,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:_i,beforeBuildLabels:_i,buildLabels:_i,afterBuildLabels:_i,beforeFit:_i,fit:function(){var e=this,t=e.options,n=t.display,i=e.minSize,o=mt.isArray(t.text)?t.text.length:1,r=mt.options._parseFont(t),s=n?o*r.lineHeight+2*t.padding:0;e.isHorizontal()?(i.width=e.maxWidth,i.height=s):(i.width=s,i.height=e.maxHeight),e.width=i.width,e.height=i.height},afterFit:_i,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var i,o,r,s=mt.options._parseFont(n),a=s.lineHeight,l=a/2+n.padding,c=0,u=e.top,d=e.left,h=e.bottom,p=e.right;t.fillStyle=mt.valueOrDefault(n.fontColor,pt.global.defaultFontColor),t.font=s.string,e.isHorizontal()?(o=d+(p-d)/2,r=u+l,i=p-d):(o="left"===n.position?d+l:p-l,r=u+(h-u)/2,i=h-u,c=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(o,r),t.rotate(c),t.textAlign="center",t.textBaseline="middle";var f=n.text;if(mt.isArray(f))for(var g=0,m=0;m<f.length;++m)t.fillText(f[m],0,g,i),g+=a;else t.fillText(f,0,0,i);t.restore()}}}),bi={},wi=pi,xi=vi,ki={id:"title",_element:yi,beforeInit:function(e){var t=e.options.title;t&&Fe(e,t)},beforeUpdate:function(e){var t=e.options.title,n=e.titleBlock;t?(mt.mergeIf(t,pt.global.title),n?(hn.configure(e,n,t),n.options=t):Fe(e,t)):n&&(hn.removeBox(e,n),delete e.titleBlock)}};for(var Ci in bi.filler=wi,bi.legend=xi,bi.title=ki,On.helpers=mt,function(){function e(e,t,n){var i;return"string"==typeof e?(i=parseInt(e,10),-1!==e.indexOf("%")&&(i=i/100*t.parentNode[n])):i=e,i}function t(e){return null!=e&&"none"!==e}function n(n,i,o){var r=document.defaultView,s=mt._getParentNode(n),a=r.getComputedStyle(n)[i],l=r.getComputedStyle(s)[i],c=t(a),u=t(l),d=Number.POSITIVE_INFINITY;return c||u?Math.min(c?e(a,n,o):d,u?e(l,s,o):d):"none"}mt.where=function(e,t){if(mt.isArray(e)&&Array.prototype.filter)return e.filter(t);var n=[];return mt.each(e,function(e){t(e)&&n.push(e)}),n},mt.findIndex=Array.prototype.findIndex?function(e,t,n){return e.findIndex(t,n)}:function(e,t,n){n=void 0===n?e:n;for(var i=0,o=e.length;i<o;++i)if(t.call(n,e[i],i,e))return i;return-1},mt.findNextWhere=function(e,t,n){mt.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<e.length;i++){var o=e[i];if(t(o))return o}},mt.findPreviousWhere=function(e,t,n){mt.isNullOrUndef(n)&&(n=e.length);for(var i=n-1;i>=0;i--){var o=e[i];if(t(o))return o}},mt.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},mt.almostEquals=function(e,t,n){return Math.abs(e-t)<n},mt.almostWhole=function(e,t){var n=Math.round(e);return n-t<e&&n+t>e},mt.max=function(e){return e.reduce(function(e,t){return isNaN(t)?e:Math.max(e,t)},Number.NEGATIVE_INFINITY)},mt.min=function(e){return e.reduce(function(e,t){return isNaN(t)?e:Math.min(e,t)},Number.POSITIVE_INFINITY)},mt.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},mt.log10=Math.log10?function(e){return Math.log10(e)}:function(e){var t=Math.log(e)*Math.LOG10E,n=Math.round(t);return e===Math.pow(10,n)?n:t},mt.toRadians=function(e){return e*(Math.PI/180)},mt.toDegrees=function(e){return e*(180/Math.PI)},mt._decimalPlaces=function(e){if(mt.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},mt.getAngleFromPoint=function(e,t){var n=t.x-e.x,i=t.y-e.y,o=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:o}},mt.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},mt.aliasPixel=function(e){return e%2==0?0:.5},mt._alignPixel=function(e,t,n){var i=e.currentDevicePixelRatio,o=n/2;return Math.round((t-o)*i)/i+o},mt.splineCurve=function(e,t,n,i){var o=e.skip?t:e,r=t,s=n.skip?t:n,a=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),l=Math.sqrt(Math.pow(s.x-r.x,2)+Math.pow(s.y-r.y,2)),c=a/(a+l),u=l/(a+l),d=i*(c=isNaN(c)?0:c),h=i*(u=isNaN(u)?0:u);return{previous:{x:r.x-d*(s.x-o.x),y:r.y-d*(s.y-o.y)},next:{x:r.x+h*(s.x-o.x),y:r.y+h*(s.y-o.y)}}},mt.EPSILON=Number.EPSILON||1e-14,mt.splineCurveMonotone=function(e){var t,n,i,o,r,s,a,l,c,u=(e||[]).map(function(e){return{model:e._model,deltaK:0,mK:0}}),d=u.length;for(t=0;t<d;++t)if(!(i=u[t]).model.skip){if(n=t>0?u[t-1]:null,(o=t<d-1?u[t+1]:null)&&!o.model.skip){var h=o.model.x-i.model.x;i.deltaK=0!==h?(o.model.y-i.model.y)/h:0}!n||n.model.skip?i.mK=i.deltaK:!o||o.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(t=0;t<d-1;++t)i=u[t],o=u[t+1],i.model.skip||o.model.skip||(mt.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=o.mK=0:(r=i.mK/i.deltaK,s=o.mK/i.deltaK,(l=Math.pow(r,2)+Math.pow(s,2))<=9||(a=3/Math.sqrt(l),i.mK=r*a*i.deltaK,o.mK=s*a*i.deltaK)));for(t=0;t<d;++t)(i=u[t]).model.skip||(n=t>0?u[t-1]:null,o=t<d-1?u[t+1]:null,n&&!n.model.skip&&(c=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-c,i.model.controlPointPreviousY=i.model.y-c*i.mK),o&&!o.model.skip&&(c=(o.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+c,i.model.controlPointNextY=i.model.y+c*i.mK))},mt.nextItem=function(e,t,n){return n?t>=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},mt.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},mt.niceNum=function(e,t){var n=Math.floor(mt.log10(e)),i=e/Math.pow(10,n);return(t?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},mt.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},mt.getRelativePosition=function(e,t){var n,i,o=e.originalEvent||e,r=e.target||e.srcElement,s=r.getBoundingClientRect(),a=o.touches;a&&a.length>0?(n=a[0].clientX,i=a[0].clientY):(n=o.clientX,i=o.clientY);var l=parseFloat(mt.getStyle(r,"padding-left")),c=parseFloat(mt.getStyle(r,"padding-top")),u=parseFloat(mt.getStyle(r,"padding-right")),d=parseFloat(mt.getStyle(r,"padding-bottom")),h=s.right-s.left-l-u,p=s.bottom-s.top-c-d;return{x:n=Math.round((n-s.left-l)/h*r.width/t.currentDevicePixelRatio),y:i=Math.round((i-s.top-c)/p*r.height/t.currentDevicePixelRatio)}},mt.getConstraintWidth=function(e){return n(e,"max-width","clientWidth")},mt.getConstraintHeight=function(e){return n(e,"max-height","clientHeight")},mt._calculatePadding=function(e,t,n){return(t=mt.getStyle(e,t)).indexOf("%")>-1?n*parseInt(t,10)/100:parseInt(t,10)},mt._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},mt.getMaximumWidth=function(e){var t=mt._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,i=n-mt._calculatePadding(t,"padding-left",n)-mt._calculatePadding(t,"padding-right",n),o=mt.getConstraintWidth(e);return isNaN(o)?i:Math.min(i,o)},mt.getMaximumHeight=function(e){var t=mt._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,i=n-mt._calculatePadding(t,"padding-top",n)-mt._calculatePadding(t,"padding-bottom",n),o=mt.getConstraintHeight(e);return isNaN(o)?i:Math.min(i,o)},mt.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},mt.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=e.canvas,o=e.height,r=e.width;i.height=o*n,i.width=r*n,e.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=o+"px",i.style.width=r+"px")}},mt.fontString=function(e,t,n){return t+" "+e+"px "+n},mt.longestText=function(e,t,n,i){var o=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(o=i.data={},r=i.garbageCollect=[],i.font=t),e.font=t;var s=0;mt.each(n,function(t){null!=t&&!0!==mt.isArray(t)?s=mt.measureText(e,o,r,s,t):mt.isArray(t)&&mt.each(t,function(t){null==t||mt.isArray(t)||(s=mt.measureText(e,o,r,s,t))})});var a=r.length/2;if(a>n.length){for(var l=0;l<a;l++)delete o[r[l]];r.splice(0,a)}return s},mt.measureText=function(e,t,n,i,o){var r=t[o];return r||(r=t[o]=e.measureText(o).width,n.push(o)),r>i&&(i=r),i},mt.numberOfLabelLines=function(e){var t=1;return mt.each(e,function(e){mt.isArray(e)&&e.length>t&&(t=e.length)}),t},mt.color=Ze?function(e){return e instanceof CanvasGradient&&(e=pt.global.defaultColor),Ze(e)}:function(e){return console.error("Color.js not found!"),e},mt.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:mt.color(e).saturate(.5).darken(.1).rgbString()}}(),On._adapters=Mn,On.Animation=kt,On.animationService=Ct,On.controllers=cn,On.DatasetController=Pt,On.defaults=pt,On.Element=wt,On.elements=Nt,On.Interaction=un,On.layouts=hn,On.platform=kn,On.plugins=Cn,On.Scale=Nn,On.scaleService=Sn,On.Ticks=Fn,On.Tooltip=Dn,On.helpers.each(ui,function(e,t){On.scaleService.registerScaleType(t,e,e._defaults)}),bi)bi.hasOwnProperty(Ci)&&On.plugins.register(bi[Ci]);On.platform.initialize();var Si=On;return"undefined"!=typeof window&&(window.Chart=On),On.Chart=On,On.Legend=bi.legend._element,On.Title=bi.title._element,On.pluginService=On.plugins,On.PluginBase=On.Element.extend({}),On.canvasHelpers=On.helpers.canvas,On.layoutService=On.layouts,On.LinearScaleBase=Hn,On.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(e){On[e]=function(t,n){return new On(t,On.helpers.merge(n||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}}),Si}),function(e){e.fn.ClassyCountdown=function(t,n){function i(){s=Math.floor(u/864e5),a=Math.floor(u%86400/3600),l=Math.floor(u%86400%3600/60),c=Math.floor(u%86400%3600%60%60)}function o(){u--,i(),u<=0&&(h||(h=!0,p.onEndCallback()),c=l=a=s=0),d.find(".ClassyCountdown-days input").val(365-s).trigger("change"),d.find(".ClassyCountdown-hours input").val(24-a).trigger("change"),d.find(".ClassyCountdown-minutes input").val(60-l).trigger("change"),d.find(".ClassyCountdown-seconds input").val(60-c).trigger("change"),d.find(".ClassyCountdown-days .ClassyCountdown-value > div").html(s),d.find(".ClassyCountdown-hours .ClassyCountdown-value > div").html(a),d.find(".ClassyCountdown-minutes .ClassyCountdown-value > div").html(l),d.find(".ClassyCountdown-seconds .ClassyCountdown-value > div").html(c)}function r(){d.find(".ClassyCountdown-wrapper > div").each(function(){e(this).css("height",e(this).width()+"px")}),p.style.textResponsive&&d.find(".ClassyCountdown-value").css("font-size",Math.floor(d.find("> div").eq(0).width()*p.style.textResponsive/10)+"px"),d.find(".ClassyCountdown-value").each(function(){e(this).css("margin-top",Math.floor(0-parseInt(e(this).height())/2)+"px")}),d.find(".ClassyCountdown-days input").trigger("change"),d.find(".ClassyCountdown-hours input").trigger("change"),d.find(".ClassyCountdown-minutes input").trigger("change"),d.find(".ClassyCountdown-seconds input").trigger("change")}var s,a,l,c,u,d=e(this),h=!1,p={end:void 0,now:e.now(),labels:!0,labelsOptions:{lang:{days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},style:"font-size: 0.5em;"},style:{element:"",labels:!1,textResponsive:.5,days:{gauge:{thickness:.02,bgColor:"rgba(0, 0, 0, 0)",fgColor:"rgba(0, 0, 0, 1)",lineCap:"butt"},textCSS:""},hours:{gauge:{thickness:.02,bgColor:"rgba(0, 0, 0, 0)",fgColor:"rgba(0, 0, 0, 1)",lineCap:"butt"},textCSS:""},minutes:{gauge:{thickness:.02,bgColor:"rgba(0, 0, 0, 0)",fgColor:"rgba(0, 0, 0, 1)",lineCap:"butt"},textCSS:""},seconds:{gauge:{thickness:.02,bgColor:"rgba(0, 0, 0, 0)",fgColor:"rgba(0, 0, 0, 1)",lineCap:"butt"},textCSS:""}},onEndCallback:function(){}};t.theme&&(p=e.extend(!0,p,function(e){switch(e){case"flat-colors":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.01,bgColor:"rgba(0,0,0,0.05)",fgColor:"#1abc9c"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},hours:{gauge:{thickness:.01,bgColor:"rgba(0,0,0,0.05)",fgColor:"#2980b9"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},minutes:{gauge:{thickness:.01,bgColor:"rgba(0,0,0,0.05)",fgColor:"#8e44ad"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},seconds:{gauge:{thickness:.01,bgColor:"rgba(0,0,0,0.05)",fgColor:"#f39c12"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"}}};case"flat-colors-wide":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.03,bgColor:"rgba(0,0,0,0.05)",fgColor:"#1abc9c"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},hours:{gauge:{thickness:.03,bgColor:"rgba(0,0,0,0.05)",fgColor:"#2980b9"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},minutes:{gauge:{thickness:.03,bgColor:"rgba(0,0,0,0.05)",fgColor:"#8e44ad"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},seconds:{gauge:{thickness:.03,bgColor:"rgba(0,0,0,0.05)",fgColor:"#f39c12"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"}}};case"flat-colors-very-wide":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.1,bgColor:"rgba(255,255,255,.3)",fgColor:"#1abc9c"},textCSS:"font-weight:600;color:#fff;"},hours:{gauge:{thickness:.1,bgColor:"rgba(255,255,255,.3)",fgColor:"#2980b9"},textCSS:"font-weight:600;color:#fff;"},minutes:{gauge:{thickness:.1,bgColor:"rgba(255,255,255,.3)",fgColor:"#8e44ad"},textCSS:"font-weight:600;color:#fff;"},seconds:{gauge:{thickness:.1,bgColor:"rgba(255,255,255,.3)",fgColor:"#f39c12"},textCSS:"font-weight:600;color:#fff;"}}};case"flat-colors-black":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.25,bgColor:"rgba(0,0,0,0.05)",fgColor:"#1abc9c",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},hours:{gauge:{thickness:.25,bgColor:"rgba(0,0,0,0.05)",fgColor:"#2980b9",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},minutes:{gauge:{thickness:.25,bgColor:"rgba(0,0,0,0.05)",fgColor:"#8e44ad",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},seconds:{gauge:{thickness:.25,bgColor:"rgba(0,0,0,0.05)",fgColor:"#f39c12",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"}}};case"black":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.01,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},hours:{gauge:{thickness:.01,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},minutes:{gauge:{thickness:.01,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},seconds:{gauge:{thickness:.01,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"}}};case"black-wide":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.03,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},hours:{gauge:{thickness:.03,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},minutes:{gauge:{thickness:.03,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},seconds:{gauge:{thickness:.03,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"}}};case"black-very-wide":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.17,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},hours:{gauge:{
thickness:.17,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},minutes:{gauge:{thickness:.17,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},seconds:{gauge:{thickness:.17,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"}}};case"black-black":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.25,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},hours:{gauge:{thickness:.25,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},minutes:{gauge:{thickness:.25,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"},seconds:{gauge:{thickness:.25,bgColor:"rgba(0,0,0,0.05)",fgColor:"#222",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#34495e;"}}};case"white":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.03,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},hours:{gauge:{thickness:.03,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},minutes:{gauge:{thickness:.03,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},seconds:{gauge:{thickness:.03,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"}}};case"white-wide":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.06,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},hours:{gauge:{thickness:.06,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},minutes:{gauge:{thickness:.06,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},seconds:{gauge:{thickness:.06,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"}}};case"white-very-wide":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.16,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},hours:{gauge:{thickness:.16,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},minutes:{gauge:{thickness:.16,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},seconds:{gauge:{thickness:.16,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"}}};case"white-black":return{labels:!0,style:{element:"",textResponsive:.5,days:{gauge:{thickness:.25,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},hours:{gauge:{thickness:.25,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},minutes:{gauge:{thickness:.25,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"},seconds:{gauge:{thickness:.25,bgColor:"rgba(255,255,255,0.05)",fgColor:"#fff",lineCap:"round"},textCSS:"font-family:'Open Sans';font-weight:300;color:#fff;"}}}}}(t.theme))),p=e.extend(!0,p,t),d.append('<div class="ClassyCountdown-wrapper"><div class="ClassyCountdown-days"><input type="text" /><span class="ClassyCountdown-value"><div></div><span></span></span></div><div class="ClassyCountdown-hours"><input type="text" /><span class="ClassyCountdown-value"><div></div><span></span></span></div><div class="ClassyCountdown-minutes"><input type="text" /><span class="ClassyCountdown-value"><div></div><span></span></span></div><div class="ClassyCountdown-seconds"><input type="text" /><span class="ClassyCountdown-value"><div></div><span></span></span></div></div>'),d.find(".ClassyCountdown-days input").knob(e.extend({width:"100%",displayInput:!1,readOnly:!0,max:365},p.style.days.gauge)),d.find(".ClassyCountdown-hours input").knob(e.extend({width:"100%",displayInput:!1,readOnly:!0,max:24},p.style.hours.gauge)),d.find(".ClassyCountdown-minutes input").knob(e.extend({width:"100%",displayInput:!1,readOnly:!0,max:60},p.style.minutes.gauge)),d.find(".ClassyCountdown-seconds input").knob(e.extend({width:"100%",displayInput:!1,readOnly:!0,max:60},p.style.seconds.gauge)),d.find(".ClassyCountdown-wrapper > div").attr("style",p.style.element),d.find(".ClassyCountdown-days .ClassyCountdown-value").attr("style",p.style.days.textCSS),d.find(".ClassyCountdown-hours .ClassyCountdown-value").attr("style",p.style.hours.textCSS),d.find(".ClassyCountdown-minutes .ClassyCountdown-value").attr("style",p.style.minutes.textCSS),d.find(".ClassyCountdown-seconds .ClassyCountdown-value").attr("style",p.style.seconds.textCSS),d.find(".ClassyCountdown-value").each(function(){e(this).css("margin-top",Math.floor(0-parseInt(e(this).height())/2)+"px")}),p.labels&&(d.find(".ClassyCountdown-days .ClassyCountdown-value > span").html(p.labelsOptions.lang.days),d.find(".ClassyCountdown-hours .ClassyCountdown-value > span").html(p.labelsOptions.lang.hours),d.find(".ClassyCountdown-minutes .ClassyCountdown-value > span").html(p.labelsOptions.lang.minutes),d.find(".ClassyCountdown-seconds .ClassyCountdown-value > span").html(p.labelsOptions.lang.seconds),d.find(".ClassyCountdown-value > span").attr("style",p.labelsOptions.style)),u=p.end-p.now,i(),o(),setInterval(o,1e3),d.find(".ClassyCountdown-wrapper > div").each(function(){e(this).css("height",e(this).width()+"px")}),p.style.textResponsive&&(d.find(".ClassyCountdown-value").css("font-size",Math.floor(d.find("> div").eq(0).width()*p.style.textResponsive/10)+"px"),d.find(".ClassyCountdown-value").each(function(){e(this).css("margin-top",Math.floor(0-parseInt(e(this).height())/2)+"px")})),e(window).trigger("resize"),e(window).resize(e.throttle(50,r))}}(jQuery),function(e){"object"==typeof exports?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){"use strict";var t={},n=Math.max,i=Math.min;t.c={},t.c.d=e(document),t.c.t=function(e){return e.originalEvent.touches.length-1},t.o=function(){var n=this;this.o=null,this.$=null,this.i=null,this.g=null,this.v=null,this.cv=null,this.x=0,this.y=0,this.w=0,this.h=0,this.$c=null,this.c=null,this.t=0,this.isInit=!1,this.fgColor=null,this.pColor=null,this.dH=null,this.cH=null,this.eH=null,this.rH=null,this.scale=1,this.relative=!1,this.relativeWidth=!1,this.relativeHeight=!1,this.$div=null,this.run=function(){var t=function(e,t){var i;for(i in t)n.o[i]=t[i];n._carve().init(),n._configure()._draw()};if(!this.$.data("kontroled")){if(this.$.data("kontroled",!0),this.extend(),this.o=e.extend({min:void 0!==this.$.data("min")?this.$.data("min"):0,max:void 0!==this.$.data("max")?this.$.data("max"):100,stopper:!0,readOnly:this.$.data("readonly")||"readonly"===this.$.attr("readonly"),cursor:(!0===this.$.data("cursor")?30:this.$.data("cursor"))||0,thickness:this.$.data("thickness")&&Math.max(Math.min(this.$.data("thickness"),1),.01)||.35,lineCap:this.$.data("linecap")||"butt",width:this.$.data("width")||200,height:this.$.data("height")||200,displayInput:null==this.$.data("displayinput")||this.$.data("displayinput"),displayPrevious:this.$.data("displayprevious"),fgColor:this.$.data("fgcolor")||"#87CEEB",inputColor:this.$.data("inputcolor"),font:this.$.data("font")||"Arial",fontWeight:this.$.data("font-weight")||"bold",inline:!1,step:this.$.data("step")||1,rotation:this.$.data("rotation"),draw:null,change:null,cancel:null,release:null,format:function(e){return e},parse:function(e){return parseFloat(e)}},this.o),this.o.flip="anticlockwise"===this.o.rotation||"acw"===this.o.rotation,this.o.inputColor||(this.o.inputColor=this.o.fgColor),this.$.is("fieldset")?(this.v={},this.i=this.$.find("input"),this.i.each(function(t){var i=e(this);n.i[t]=i,n.v[t]=n.o.parse(i.val()),i.bind("change blur",function(){var e={};e[t]=i.val(),n.val(n._validate(e))})}),this.$.find("legend").remove()):(this.i=this.$,this.v=this.o.parse(this.$.val()),""===this.v&&(this.v=this.o.min),this.$.bind("change blur",function(){n.val(n._validate(n.o.parse(n.$.val())))})),!this.o.displayInput&&this.$.hide(),this.$c=e(document.createElement("canvas")).attr({width:this.o.width,height:this.o.height}),this.$div=e('<div style="'+(this.o.inline?"display:inline;":"")+"width:"+this.o.width+"px;height:"+this.o.height+'px;"></div>'),this.$.wrap(this.$div).before(this.$c),this.$div=this.$.parent(),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(this.$c[0]),this.c=this.$c[0].getContext?this.$c[0].getContext("2d"):null,!this.c)throw{name:"CanvasNotSupportedException",message:"Canvas not supported. Please use excanvas on IE8.0.",toString:function(){return this.name+": "+this.message}};return this.scale=(window.devicePixelRatio||1)/(this.c.webkitBackingStorePixelRatio||this.c.mozBackingStorePixelRatio||this.c.msBackingStorePixelRatio||this.c.oBackingStorePixelRatio||this.c.backingStorePixelRatio||1),this.relativeWidth=this.o.width%1!=0&&this.o.width.indexOf("%"),this.relativeHeight=this.o.height%1!=0&&this.o.height.indexOf("%"),this.relative=this.relativeWidth||this.relativeHeight,this._carve(),this.v instanceof Object?(this.cv={},this.copy(this.v,this.cv)):this.cv=this.v,this.$.bind("configure",t).parent().bind("configure",t),this._listen()._configure()._xy().init(),this.isInit=!0,this.$.val(this.o.format(this.v)),this._draw(),this}},this._carve=function(){if(this.relative){var e=this.relativeWidth?this.$div.parent().width()*parseInt(this.o.width)/100:this.$div.parent().width(),t=this.relativeHeight?this.$div.parent().height()*parseInt(this.o.height)/100:this.$div.parent().height();this.w=this.h=Math.min(e,t)}else this.w=this.o.width,this.h=this.o.height;return this.$div.css({width:this.w+"px",height:this.h+"px"}),this.$c.attr({width:this.w,height:this.h}),1!==this.scale&&(this.$c[0].width=this.$c[0].width*this.scale,this.$c[0].height=this.$c[0].height*this.scale,this.$c.width(this.w),this.$c.height(this.h)),this},this._draw=function(){var e=!0;n.g=n.c,n.clear(),n.dH&&(e=n.dH()),!1!==e&&n.draw()},this._touch=function(e){var i=function(e){var t=n.xy2val(e.originalEvent.touches[n.t].pageX,e.originalEvent.touches[n.t].pageY);t!=n.cv&&(n.cH&&!1===n.cH(t)||(n.change(n._validate(t)),n._draw()))};return this.t=t.c.t(e),i(e),t.c.d.bind("touchmove.k",i).bind("touchend.k",function(){t.c.d.unbind("touchmove.k touchend.k"),n.val(n.cv)}),this},this._mouse=function(e){var i=function(e){var t=n.xy2val(e.pageX,e.pageY);t!=n.cv&&(n.cH&&!1===n.cH(t)||(n.change(n._validate(t)),n._draw()))};return i(e),t.c.d.bind("mousemove.k",i).bind("keyup.k",function(e){if(27===e.keyCode){if(t.c.d.unbind("mouseup.k mousemove.k keyup.k"),n.eH&&!1===n.eH())return;n.cancel()}}).bind("mouseup.k",function(e){t.c.d.unbind("mousemove.k mouseup.k keyup.k"),n.val(n.cv)}),this},this._xy=function(){var e=this.$c.offset();return this.x=e.left,this.y=e.top,this},this._listen=function(){return this.o.readOnly?this.$.attr("readonly","readonly"):(this.$c.bind("mousedown",function(e){e.preventDefault(),n._xy()._mouse(e)}).bind("touchstart",function(e){e.preventDefault(),n._xy()._touch(e)}),this.listen()),this.relative&&e(window).resize(e.debounce(50,function(){n._carve().init(),n._draw()})),this},this._configure=function(){return this.o.draw&&(this.dH=this.o.draw),this.o.change&&(this.cH=this.o.change),this.o.cancel&&(this.eH=this.o.cancel),this.o.release&&(this.rH=this.o.release),this.o.displayPrevious?(this.pColor=this.h2rgba(this.o.fgColor,"0.4"),this.fgColor=this.h2rgba(this.o.fgColor,"0.6")):this.fgColor=this.o.fgColor,this},this._clear=function(){this.$c[0].width=this.$c[0].width},this._validate=function(e){var t=~~((e<0?-.5:.5)+e/this.o.step)*this.o.step;return Math.round(100*t)/100},this.listen=function(){},this.extend=function(){},this.init=function(){},this.change=function(e){},this.val=function(e){},this.xy2val=function(e,t){},this.draw=function(){},this.clear=function(){this._clear()},this.h2rgba=function(e,t){var n;return e=e.substring(1,7),n=[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)],"rgba("+n[0]+","+n[1]+","+n[2]+","+t+")"},this.copy=function(e,t){for(var n in e)t[n]=e[n]}},t.Dial=function(){t.o.call(this),this.startAngle=null,this.xy=null,this.radius=null,this.lineWidth=null,this.cursorExt=null,this.w2=null,this.PI2=2*Math.PI,this.extend=function(){this.o=e.extend({bgColor:this.$.data("bgcolor")||"#EEEEEE",angleOffset:this.$.data("angleoffset")||0,angleArc:this.$.data("anglearc")||360,inline:!0},this.o)},this.val=function(e,t){if(null==e)return this.v;e=this.o.parse(e),!1!==t&&e!=this.v&&this.rH&&!1===this.rH(e)||(this.cv=this.o.stopper?n(i(e,this.o.max),this.o.min):e,this.v=this.cv,this.$.val(this.o.format(this.v)),this._draw())},this.xy2val=function(e,t){var o,r;return o=Math.atan2(e-(this.x+this.w2),-(t-this.y-this.w2))-this.angleOffset,this.o.flip&&(o=this.angleArc-o-this.PI2),this.angleArc!=this.PI2&&o<0&&o>-.5?o=0:o<0&&(o+=this.PI2),r=o*(this.o.max-this.o.min)/this.angleArc+this.o.min,this.o.stopper&&(r=n(i(r,this.o.max),this.o.min)),r},this.listen=function(){var t,o,r,s,a=this,l=function(e){e.preventDefault();var r=e.originalEvent,s=r.detail||r.wheelDeltaX,l=r.detail||r.wheelDeltaY,c=a._validate(a.o.parse(a.$.val()))+(s>0||l>0?a.o.step:s<0||l<0?-a.o.step:0);c=n(i(c,a.o.max),a.o.min),a.val(c,!1),a.rH&&(clearTimeout(t),t=setTimeout(function(){a.rH(c),t=null},100),o||(o=setTimeout(function(){t&&a.rH(c),o=null},200)))},c=1,u={37:-a.o.step,38:a.o.step,39:a.o.step,40:-a.o.step};this.$.bind("keydown",function(t){var o=t.keyCode;if(o>=96&&o<=105&&(o=t.keyCode=o-48),r=parseInt(String.fromCharCode(o)),isNaN(r)&&(13!==o&&8!==o&&9!==o&&189!==o&&(190!==o||a.$.val().match(/\./))&&t.preventDefault(),e.inArray(o,[37,38,39,40])>-1)){t.preventDefault();var l=a.o.parse(a.$.val())+u[o]*c;a.o.stopper&&(l=n(i(l,a.o.max),a.o.min)),a.change(a._validate(l)),a._draw(),s=window.setTimeout(function(){c*=2},30)}}).bind("keyup",function(e){isNaN(r)?s&&(window.clearTimeout(s),s=null,c=1,a.val(a.$.val())):a.$.val()>a.o.max&&a.$.val(a.o.max)||a.$.val()<a.o.min&&a.$.val(a.o.min)}),this.$c.bind("mousewheel DOMMouseScroll",l),this.$.bind("mousewheel DOMMouseScroll",l)},this.init=function(){(this.v<this.o.min||this.v>this.o.max)&&(this.v=this.o.min),this.$.val(this.v),this.w2=this.w/2,this.cursorExt=this.o.cursor/100,this.xy=this.w2*this.scale,this.lineWidth=this.xy*this.o.thickness,this.lineCap=this.o.lineCap,this.radius=this.xy-this.lineWidth/2,this.o.angleOffset&&(this.o.angleOffset=isNaN(this.o.angleOffset)?0:this.o.angleOffset),this.o.angleArc&&(this.o.angleArc=isNaN(this.o.angleArc)?this.PI2:this.o.angleArc),this.angleOffset=this.o.angleOffset*Math.PI/180,this.angleArc=this.o.angleArc*Math.PI/180,this.startAngle=1.5*Math.PI+this.angleOffset,this.endAngle=1.5*Math.PI+this.angleOffset+this.angleArc;var e=n(String(Math.abs(this.o.max)).length,String(Math.abs(this.o.min)).length,2)+2;this.o.displayInput&&this.i.css({width:(this.w/2+4>>0)+"px",height:(this.w/3>>0)+"px",position:"absolute","vertical-align":"middle","margin-top":(this.w/3>>0)+"px","margin-left":"-"+(3*this.w/4+2>>0)+"px",border:0,background:"none",font:this.o.fontWeight+" "+(this.w/e>>0)+"px "+this.o.font,"text-align":"center",color:this.o.inputColor||this.o.fgColor,padding:"0px","-webkit-appearance":"none"})||this.i.css({width:"0px",visibility:"hidden"})},this.change=function(e){this.cv=e,this.$.val(this.o.format(e))},this.angle=function(e){return(e-this.o.min)*this.angleArc/(this.o.max-this.o.min)},this.arc=function(e){var t,n;return e=this.angle(e),this.o.flip?(t=this.endAngle+1e-5,n=t-e-1e-5):(t=this.startAngle-1e-5,n=t+e+1e-5),this.o.cursor&&(t=n-this.cursorExt)&&(n+=this.cursorExt),{s:t,e:n,d:this.o.flip&&!this.o.cursor}},this.draw=function(){var e,t=this.g,n=this.arc(this.cv),i=1;t.lineWidth=this.lineWidth,t.lineCap=this.lineCap,"none"!==this.o.bgColor&&(t.beginPath(),t.strokeStyle=this.o.bgColor,t.arc(this.xy,this.xy,this.radius,this.endAngle-1e-5,this.startAngle+1e-5,!0),t.stroke()),this.o.displayPrevious&&(e=this.arc(this.v),t.beginPath(),t.strokeStyle=this.pColor,t.arc(this.xy,this.xy,this.radius,e.s,e.e,e.d),t.stroke(),i=this.cv==this.v),t.beginPath(),t.strokeStyle=i?this.o.fgColor:this.fgColor,t.arc(this.xy,this.xy,this.radius,n.s,n.e,n.d),t.stroke()},this.cancel=function(){this.val(this.v)}},e.fn.dial=e.fn.knob=function(n){return this.each(function(){var i=new t.Dial;i.o=n,i.$=e(this),i.run()}).parent()}}),function(e,t){var n,i=e.jQuery||e.Cowboy||(e.Cowboy={});i.throttle=n=function(e,n,o,r){function s(){function i(){l=+new Date,o.apply(c,d)}function s(){a=t}var c=this,u=+new Date-l,d=arguments;r&&!a&&i(),a&&clearTimeout(a),r===t&&u>e?i():!0!==n&&(a=setTimeout(r?s:i,r===t?e-u:e))}var a,l=0;return"boolean"!=typeof n&&(r=o,o=n,n=t),i.guid&&(s.guid=o.guid=o.guid||i.guid++),s},i.debounce=function(e,i,o){return o===t?n(e,i,!1):n(e,o,!1!==i)}}(this);var pJS=function(e,t){var n=document.querySelector("#"+e+" > .particles-js-canvas-el");this.pJS={canvas:{el:n,w:n.offsetWidth,h:n.offsetHeight},particles:{number:{value:400,density:{enable:!0,value_area:800}},color:{value:"#fff"},shape:{type:"circle",stroke:{width:0,color:"#ff0000"},polygon:{nb_sides:5},image:{src:"",width:100,height:100}},opacity:{value:1,random:!1,anim:{enable:!1,speed:2,opacity_min:0,sync:!1}},size:{value:20,random:!1,anim:{enable:!1,speed:20,size_min:0,sync:!1}},line_linked:{enable:!0,distance:100,color:"#fff",opacity:1,width:1},move:{enable:!0,speed:2,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:3e3,rotateY:3e3}},array:[]},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"grab"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:100,line_linked:{opacity:1}},bubble:{distance:200,size:80,duration:.4},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}},mouse:{}},retina_detect:!1,fn:{interact:{},modes:{},vendors:{}},tmp:{}};var i=this.pJS;t&&Object.deepExtend(i,t),i.tmp.obj={size_value:i.particles.size.value,size_anim_speed:i.particles.size.anim.speed,move_speed:i.particles.move.speed,line_linked_distance:i.particles.line_linked.distance,line_linked_width:i.particles.line_linked.width,mode_grab_distance:i.interactivity.modes.grab.distance,mode_bubble_distance:i.interactivity.modes.bubble.distance,mode_bubble_size:i.interactivity.modes.bubble.size,mode_repulse_distance:i.interactivity.modes.repulse.distance},i.fn.retinaInit=function(){i.retina_detect&&window.devicePixelRatio>1?(i.canvas.pxratio=window.devicePixelRatio,i.tmp.retina=!0):(i.canvas.pxratio=1,i.tmp.retina=!1),i.canvas.w=i.canvas.el.offsetWidth*i.canvas.pxratio,i.canvas.h=i.canvas.el.offsetHeight*i.canvas.pxratio,i.particles.size.value=i.tmp.obj.size_value*i.canvas.pxratio,i.particles.size.anim.speed=i.tmp.obj.size_anim_speed*i.canvas.pxratio,i.particles.move.speed=i.tmp.obj.move_speed*i.canvas.pxratio,i.particles.line_linked.distance=i.tmp.obj.line_linked_distance*i.canvas.pxratio,i.interactivity.modes.grab.distance=i.tmp.obj.mode_grab_distance*i.canvas.pxratio,i.interactivity.modes.bubble.distance=i.tmp.obj.mode_bubble_distance*i.canvas.pxratio,i.particles.line_linked.width=i.tmp.obj.line_linked_width*i.canvas.pxratio,i.interactivity.modes.bubble.size=i.tmp.obj.mode_bubble_size*i.canvas.pxratio,i.interactivity.modes.repulse.distance=i.tmp.obj.mode_repulse_distance*i.canvas.pxratio},i.fn.canvasInit=function(){i.canvas.ctx=i.canvas.el.getContext("2d")},i.fn.canvasSize=function(){i.canvas.el.width=i.canvas.w,i.canvas.el.height=i.canvas.h,i&&i.interactivity.events.resize&&window.addEventListener("resize",function(){i.canvas.w=i.canvas.el.offsetWidth,i.canvas.h=i.canvas.el.offsetHeight,i.tmp.retina&&(i.canvas.w*=i.canvas.pxratio,i.canvas.h*=i.canvas.pxratio),i.canvas.el.width=i.canvas.w,i.canvas.el.height=i.canvas.h,i.particles.move.enable||(i.fn.particlesEmpty(),i.fn.particlesCreate(),i.fn.particlesDraw(),i.fn.vendors.densityAutoParticles()),i.fn.vendors.densityAutoParticles()})},i.fn.canvasPaint=function(){i.canvas.ctx.fillRect(0,0,i.canvas.w,i.canvas.h)},i.fn.canvasClear=function(){i.canvas.ctx.clearRect(0,0,i.canvas.w,i.canvas.h)},i.fn.particle=function(e,t,n){if(this.radius=(i.particles.size.random?Math.random():1)*i.particles.size.value,i.particles.size.anim.enable&&(this.size_status=!1,this.vs=i.particles.size.anim.speed/100,i.particles.size.anim.sync||(this.vs=this.vs*Math.random())),this.x=n?n.x:Math.random()*i.canvas.w,this.y=n?n.y:Math.random()*i.canvas.h,this.x>i.canvas.w-2*this.radius?this.x=this.x-this.radius:this.x<2*this.radius&&(this.x=this.x+this.radius),this.y>i.canvas.h-2*this.radius?this.y=this.y-this.radius:this.y<2*this.radius&&(this.y=this.y+this.radius),i.particles.move.bounce&&i.fn.vendors.checkOverlap(this,n),this.color={},"object"==typeof e.value)if(e.value instanceof Array){var o=e.value[Math.floor(Math.random()*i.particles.color.value.length)];this.color.rgb=hexToRgb(o)}else null!=e.value.r&&null!=e.value.g&&null!=e.value.b&&(this.color.rgb={r:e.value.r,g:e.value.g,b:e.value.b}),null!=e.value.h&&null!=e.value.s&&null!=e.value.l&&(this.color.hsl={h:e.value.h,s:e.value.s,l:e.value.l});else"random"==e.value?this.color.rgb={r:Math.floor(256*Math.random())+0,g:Math.floor(256*Math.random())+0,b:Math.floor(256*Math.random())+0}:"string"==typeof e.value&&(this.color=e,this.color.rgb=hexToRgb(this.color.value));this.opacity=(i.particles.opacity.random?Math.random():1)*i.particles.opacity.value,i.particles.opacity.anim.enable&&(this.opacity_status=!1,this.vo=i.particles.opacity.anim.speed/100,i.particles.opacity.anim.sync||(this.vo=this.vo*Math.random()));var r={};switch(i.particles.move.direction){case"top":r={x:0,y:-1};break;case"top-right":r={x:.5,y:-.5};break;case"right":r={x:1,y:-0};break;case"bottom-right":r={x:.5,y:.5};break;case"bottom":r={x:0,y:1};break;case"bottom-left":r={x:-.5,y:1};break;case"left":r={x:-1,y:0};break;case"top-left":r={x:-.5,y:-.5};break;default:r={x:0,y:0}}i.particles.move.straight?(this.vx=r.x,this.vy=r.y,i.particles.move.random&&(this.vx=this.vx*Math.random(),this.vy=this.vy*Math.random())):(this.vx=r.x+Math.random()-.5,this.vy=r.y+Math.random()-.5),this.vx_i=this.vx,this.vy_i=this.vy;var s=i.particles.shape.type;if("object"==typeof s){if(s instanceof Array){var a=s[Math.floor(Math.random()*s.length)];this.shape=a}}else this.shape=s;if("image"==this.shape){var l=i.particles.shape;this.img={src:l.image.src,ratio:l.image.width/l.image.height},this.img.ratio||(this.img.ratio=1),"svg"==i.tmp.img_type&&null!=i.tmp.source_svg&&(i.fn.vendors.createSvgImg(this),i.tmp.pushing&&(this.img.loaded=!1))}},i.fn.particle.prototype.draw=function(){function e(){i.canvas.ctx.drawImage(s,t.x-n,t.y-n,2*n,2*n/t.img.ratio)}var t=this;if(null!=t.radius_bubble)var n=t.radius_bubble;else n=t.radius;if(null!=t.opacity_bubble)var o=t.opacity_bubble;else o=t.opacity;if(t.color.rgb)var r="rgba("+t.color.rgb.r+","+t.color.rgb.g+","+t.color.rgb.b+","+o+")";else r="hsla("+t.color.hsl.h+","+t.color.hsl.s+"%,"+t.color.hsl.l+"%,"+o+")";switch(i.canvas.ctx.fillStyle=r,i.canvas.ctx.beginPath(),t.shape){case"circle":i.canvas.ctx.arc(t.x,t.y,n,0,2*Math.PI,!1);break;case"edge":i.canvas.ctx.rect(t.x-n,t.y-n,2*n,2*n);break;case"triangle":i.fn.vendors.drawShape(i.canvas.ctx,t.x-n,t.y+n/1.66,2*n,3,2);break;case"polygon":i.fn.vendors.drawShape(i.canvas.ctx,t.x-n/(i.particles.shape.polygon.nb_sides/3.5),t.y-n/.76,2.66*n/(i.particles.shape.polygon.nb_sides/3),i.particles.shape.polygon.nb_sides,1);break;case"star":i.fn.vendors.drawShape(i.canvas.ctx,t.x-2*n/(i.particles.shape.polygon.nb_sides/4),t.y-n/1.52,2*n*2.66/(i.particles.shape.polygon.nb_sides/3),i.particles.shape.polygon.nb_sides,2);break;case"image":if("svg"==i.tmp.img_type)var s=t.img.obj;else s=i.tmp.img_obj;s&&e()}i.canvas.ctx.closePath(),i.particles.shape.stroke.width>0&&(i.canvas.ctx.strokeStyle=i.particles.shape.stroke.color,i.canvas.ctx.lineWidth=i.particles.shape.stroke.width,i.canvas.ctx.stroke()),i.canvas.ctx.fill()},i.fn.particlesCreate=function(){for(var e=0;e<i.particles.number.value;e++)i.particles.array.push(new i.fn.particle(i.particles.color,i.particles.opacity.value))},i.fn.particlesUpdate=function(){for(var e=0;e<i.particles.array.length;e++){var t=i.particles.array[e];if(i.particles.move.enable){var n=i.particles.move.speed/2;t.x+=t.vx*n,t.y+=t.vy*n}if(i.particles.opacity.anim.enable&&(1==t.opacity_status?(t.opacity>=i.particles.opacity.value&&(t.opacity_status=!1),t.opacity+=t.vo):(t.opacity<=i.particles.opacity.anim.opacity_min&&(t.opacity_status=!0),t.opacity-=t.vo),t.opacity<0&&(t.opacity=0)),i.particles.size.anim.enable&&(1==t.size_status?(t.radius>=i.particles.size.value&&(t.size_status=!1),t.radius+=t.vs):(t.radius<=i.particles.size.anim.size_min&&(t.size_status=!0),t.radius-=t.vs),t.radius<0&&(t.radius=0)),"bounce"==i.particles.move.out_mode)var o={x_left:t.radius,x_right:i.canvas.w,y_top:t.radius,y_bottom:i.canvas.h};else o={x_left:-t.radius,x_right:i.canvas.w+t.radius,y_top:-t.radius,y_bottom:i.canvas.h+t.radius};switch(t.x-t.radius>i.canvas.w?(t.x=o.x_left,t.y=Math.random()*i.canvas.h):t.x+t.radius<0&&(t.x=o.x_right,t.y=Math.random()*i.canvas.h),t.y-t.radius>i.canvas.h?(t.y=o.y_top,t.x=Math.random()*i.canvas.w):t.y+t.radius<0&&(t.y=o.y_bottom,t.x=Math.random()*i.canvas.w),i.particles.move.out_mode){case"bounce":t.x+t.radius>i.canvas.w?t.vx=-t.vx:t.x-t.radius<0&&(t.vx=-t.vx),t.y+t.radius>i.canvas.h?t.vy=-t.vy:t.y-t.radius<0&&(t.vy=-t.vy)}if(isInArray("grab",i.interactivity.events.onhover.mode)&&i.fn.modes.grabParticle(t),(isInArray("bubble",i.interactivity.events.onhover.mode)||isInArray("bubble",i.interactivity.events.onclick.mode))&&i.fn.modes.bubbleParticle(t),(isInArray("repulse",i.interactivity.events.onhover.mode)||isInArray("repulse",i.interactivity.events.onclick.mode))&&i.fn.modes.repulseParticle(t),i.particles.line_linked.enable||i.particles.move.attract.enable)for(var r=e+1;r<i.particles.array.length;r++){var s=i.particles.array[r];i.particles.line_linked.enable&&i.fn.interact.linkParticles(t,s),i.particles.move.attract.enable&&i.fn.interact.attractParticles(t,s),i.particles.move.bounce&&i.fn.interact.bounceParticles(t,s)}}},i.fn.particlesDraw=function(){i.canvas.ctx.clearRect(0,0,i.canvas.w,i.canvas.h),i.fn.particlesUpdate();for(var e=0;e<i.particles.array.length;e++){var t=i.particles.array[e];t.draw()}},i.fn.particlesEmpty=function(){i.particles.array=[]},i.fn.particlesRefresh=function(){cancelRequestAnimFrame(i.fn.checkAnimFrame),cancelRequestAnimFrame(i.fn.drawAnimFrame),i.tmp.source_svg=void 0,i.tmp.img_obj=void 0,i.tmp.count_svg=0,i.fn.particlesEmpty(),i.fn.canvasClear(),i.fn.vendors.start()},i.fn.interact.linkParticles=function(e,t){var n=e.x-t.x,o=e.y-t.y,r=Math.sqrt(n*n+o*o);if(r<=i.particles.line_linked.distance){var s=i.particles.line_linked.opacity-r/(1/i.particles.line_linked.opacity)/i.particles.line_linked.distance;if(s>0){var a=i.particles.line_linked.color_rgb_line;i.canvas.ctx.strokeStyle="rgba("+a.r+","+a.g+","+a.b+","+s+")",i.canvas.ctx.lineWidth=i.particles.line_linked.width,i.canvas.ctx.beginPath(),i.canvas.ctx.moveTo(e.x,e.y),i.canvas.ctx.lineTo(t.x,t.y),i.canvas.ctx.stroke(),i.canvas.ctx.closePath()}}},i.fn.interact.attractParticles=function(e,t){var n=e.x-t.x,o=e.y-t.y,r=Math.sqrt(n*n+o*o);if(r<=i.particles.line_linked.distance){var s=n/(1e3*i.particles.move.attract.rotateX),a=o/(1e3*i.particles.move.attract.rotateY);e.vx-=s,e.vy-=a,t.vx+=s,t.vy+=a}},i.fn.interact.bounceParticles=function(e,t){var n=e.x-t.x,i=e.y-t.y,o=Math.sqrt(n*n+i*i),r=e.radius+t.radius;r>=o&&(e.vx=-e.vx,e.vy=-e.vy,t.vx=-t.vx,t.vy=-t.vy)},i.fn.modes.pushParticles=function(e,t){i.tmp.pushing=!0;for(var n=0;e>n;n++)i.particles.array.push(new i.fn.particle(i.particles.color,i.particles.opacity.value,{x:t?t.pos_x:Math.random()*i.canvas.w,y:t?t.pos_y:Math.random()*i.canvas.h})),n==e-1&&(i.particles.move.enable||i.fn.particlesDraw(),i.tmp.pushing=!1)},i.fn.modes.removeParticles=function(e){i.particles.array.splice(0,e),i.particles.move.enable||i.fn.particlesDraw()},i.fn.modes.bubbleParticle=function(e){function t(){e.opacity_bubble=e.opacity,e.radius_bubble=e.radius}function n(t,n,o,r,a){if(t!=n)if(i.tmp.bubble_duration_end){if(null!=o){var l=r-d*(r-t)/i.interactivity.modes.bubble.duration,c=t-l;h=t+c,"size"==a&&(e.radius_bubble=h),"opacity"==a&&(e.opacity_bubble=h)}}else if(s<=i.interactivity.modes.bubble.distance){if(null!=o)var u=o;else u=r;if(u!=t){var h=r-d*(r-t)/i.interactivity.modes.bubble.duration;"size"==a&&(e.radius_bubble=h),"opacity"==a&&(e.opacity_bubble=h)}}else"size"==a&&(e.radius_bubble=void 0),"opacity"==a&&(e.opacity_bubble=void 0)}if(i.interactivity.events.onhover.enable&&isInArray("bubble",i.interactivity.events.onhover.mode)){var o=e.x-i.interactivity.mouse.pos_x,r=e.y-i.interactivity.mouse.pos_y,s=Math.sqrt(o*o+r*r),a=1-s/i.interactivity.modes.bubble.distance;if(s<=i.interactivity.modes.bubble.distance){if(a>=0&&"mousemove"==i.interactivity.status){if(i.interactivity.modes.bubble.size!=i.particles.size.value)if(i.interactivity.modes.bubble.size>i.particles.size.value){var l=e.radius+i.interactivity.modes.bubble.size*a;l>=0&&(e.radius_bubble=l)}else{var c=e.radius-i.interactivity.modes.bubble.size;l=e.radius-c*a;e.radius_bubble=l>0?l:0}if(i.interactivity.modes.bubble.opacity!=i.particles.opacity.value)if(i.interactivity.modes.bubble.opacity>i.particles.opacity.value){var u=i.interactivity.modes.bubble.opacity*a;u>e.opacity&&u<=i.interactivity.modes.bubble.opacity&&(e.opacity_bubble=u)}else{u=e.opacity-(i.particles.opacity.value-i.interactivity.modes.bubble.opacity)*a;u<e.opacity&&u>=i.interactivity.modes.bubble.opacity&&(e.opacity_bubble=u)}}}else t();"mouseleave"==i.interactivity.status&&t()}else if(i.interactivity.events.onclick.enable&&isInArray("bubble",i.interactivity.events.onclick.mode)){if(i.tmp.bubble_clicking){o=e.x-i.interactivity.mouse.click_pos_x,r=e.y-i.interactivity.mouse.click_pos_y,s=Math.sqrt(o*o+r*r);var d=((new Date).getTime()-i.interactivity.mouse.click_time)/1e3;d>i.interactivity.modes.bubble.duration&&(i.tmp.bubble_duration_end=!0),d>2*i.interactivity.modes.bubble.duration&&(i.tmp.bubble_clicking=!1,i.tmp.bubble_duration_end=!1)}i.tmp.bubble_clicking&&(n(i.interactivity.modes.bubble.size,i.particles.size.value,e.radius_bubble,e.radius,"size"),n(i.interactivity.modes.bubble.opacity,i.particles.opacity.value,e.opacity_bubble,e.opacity,"opacity"))}},i.fn.modes.repulseParticle=function(e){function t(){var t=Math.atan2(h,d);if(e.vx=f*Math.cos(t),e.vy=f*Math.sin(t),"bounce"==i.particles.move.out_mode){var n={x:e.x+e.vx,y:e.y+e.vy};n.x+e.radius>i.canvas.w?e.vx=-e.vx:n.x-e.radius<0&&(e.vx=-e.vx),n.y+e.radius>i.canvas.h?e.vy=-e.vy:n.y-e.radius<0&&(e.vy=-e.vy)}}if(i.interactivity.events.onhover.enable&&isInArray("repulse",i.interactivity.events.onhover.mode)&&"mousemove"==i.interactivity.status){var n=e.x-i.interactivity.mouse.pos_x,o=e.y-i.interactivity.mouse.pos_y,r=Math.sqrt(n*n+o*o),s={x:n/r,y:o/r},a=i.interactivity.modes.repulse.distance,l=100,c=clamp(1/a*(-1*Math.pow(r/a,2)+1)*a*l,0,50),u={x:e.x+s.x*c,y:e.y+s.y*c};"bounce"==i.particles.move.out_mode?(u.x-e.radius>0&&u.x+e.radius<i.canvas.w&&(e.x=u.x),u.y-e.radius>0&&u.y+e.radius<i.canvas.h&&(e.y=u.y)):(e.x=u.x,e.y=u.y)}else if(i.interactivity.events.onclick.enable&&isInArray("repulse",i.interactivity.events.onclick.mode))if(i.tmp.repulse_finish||(i.tmp.repulse_count++,
i.tmp.repulse_count==i.particles.array.length&&(i.tmp.repulse_finish=!0)),i.tmp.repulse_clicking){a=Math.pow(i.interactivity.modes.repulse.distance/6,3);var d=i.interactivity.mouse.click_pos_x-e.x,h=i.interactivity.mouse.click_pos_y-e.y,p=d*d+h*h,f=-a/p*1;a>=p&&t()}else 0==i.tmp.repulse_clicking&&(e.vx=e.vx_i,e.vy=e.vy_i)},i.fn.modes.grabParticle=function(e){if(i.interactivity.events.onhover.enable&&"mousemove"==i.interactivity.status){var t=e.x-i.interactivity.mouse.pos_x,n=e.y-i.interactivity.mouse.pos_y,o=Math.sqrt(t*t+n*n);if(o<=i.interactivity.modes.grab.distance){var r=i.interactivity.modes.grab.line_linked.opacity-o/(1/i.interactivity.modes.grab.line_linked.opacity)/i.interactivity.modes.grab.distance;if(r>0){var s=i.particles.line_linked.color_rgb_line;i.canvas.ctx.strokeStyle="rgba("+s.r+","+s.g+","+s.b+","+r+")",i.canvas.ctx.lineWidth=i.particles.line_linked.width,i.canvas.ctx.beginPath(),i.canvas.ctx.moveTo(e.x,e.y),i.canvas.ctx.lineTo(i.interactivity.mouse.pos_x,i.interactivity.mouse.pos_y),i.canvas.ctx.stroke(),i.canvas.ctx.closePath()}}}},i.fn.vendors.eventsListeners=function(){"window"==i.interactivity.detect_on?i.interactivity.el=window:i.interactivity.el=i.canvas.el,(i.interactivity.events.onhover.enable||i.interactivity.events.onclick.enable)&&(i.interactivity.el.addEventListener("mousemove",function(e){if(i.interactivity.el==window)var t=e.clientX,n=e.clientY;else t=e.offsetX||e.clientX,n=e.offsetY||e.clientY;i.interactivity.mouse.pos_x=t,i.interactivity.mouse.pos_y=n,i.tmp.retina&&(i.interactivity.mouse.pos_x*=i.canvas.pxratio,i.interactivity.mouse.pos_y*=i.canvas.pxratio),i.interactivity.status="mousemove"}),i.interactivity.el.addEventListener("mouseleave",function(e){i.interactivity.mouse.pos_x=null,i.interactivity.mouse.pos_y=null,i.interactivity.status="mouseleave"})),i.interactivity.events.onclick.enable&&i.interactivity.el.addEventListener("click",function(){if(i.interactivity.mouse.click_pos_x=i.interactivity.mouse.pos_x,i.interactivity.mouse.click_pos_y=i.interactivity.mouse.pos_y,i.interactivity.mouse.click_time=(new Date).getTime(),i.interactivity.events.onclick.enable)switch(i.interactivity.events.onclick.mode){case"push":i.particles.move.enable?i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb,i.interactivity.mouse):1==i.interactivity.modes.push.particles_nb?i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb,i.interactivity.mouse):i.interactivity.modes.push.particles_nb>1&&i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb);break;case"remove":i.fn.modes.removeParticles(i.interactivity.modes.remove.particles_nb);break;case"bubble":i.tmp.bubble_clicking=!0;break;case"repulse":i.tmp.repulse_clicking=!0,i.tmp.repulse_count=0,i.tmp.repulse_finish=!1,setTimeout(function(){i.tmp.repulse_clicking=!1},1e3*i.interactivity.modes.repulse.duration)}})},i.fn.vendors.densityAutoParticles=function(){if(i.particles.number.density.enable){var e=i.canvas.el.width*i.canvas.el.height/1e3;i.tmp.retina&&(e/=2*i.canvas.pxratio);var t=e*i.particles.number.value/i.particles.number.density.value_area,n=i.particles.array.length-t;0>n?i.fn.modes.pushParticles(Math.abs(n)):i.fn.modes.removeParticles(n)}},i.fn.vendors.checkOverlap=function(e,t){for(var n=0;n<i.particles.array.length;n++){var o=i.particles.array[n],r=e.x-o.x,s=e.y-o.y,a=Math.sqrt(r*r+s*s);a<=e.radius+o.radius&&(e.x=t?t.x:Math.random()*i.canvas.w,e.y=t?t.y:Math.random()*i.canvas.h,i.fn.vendors.checkOverlap(e))}},i.fn.vendors.createSvgImg=function(e){var t=i.tmp.source_svg,n=/#([0-9A-F]{3,6})/gi,o=t.replace(n,function(t,n,i,o){if(e.color.rgb)var r="rgba("+e.color.rgb.r+","+e.color.rgb.g+","+e.color.rgb.b+","+e.opacity+")";else r="hsla("+e.color.hsl.h+","+e.color.hsl.s+"%,"+e.color.hsl.l+"%,"+e.opacity+")";return r}),r=new Blob([o],{type:"image/svg+xml;charset=utf-8"}),s=window.URL||window.webkitURL||window,a=s.createObjectURL(r),l=new Image;l.addEventListener("load",function(){e.img.obj=l,e.img.loaded=!0,s.revokeObjectURL(a),i.tmp.count_svg++}),l.src=a},i.fn.vendors.destroypJS=function(){cancelAnimationFrame(i.fn.drawAnimFrame),n.remove(),pJSDom=null},i.fn.vendors.drawShape=function(e,t,n,i,o,r){var s=o*r,a=o/r,l=180*(a-2)/a,c=Math.PI-Math.PI*l/180;e.save(),e.beginPath(),e.translate(t,n),e.moveTo(0,0);for(var u=0;s>u;u++)e.lineTo(i,0),e.translate(i,0),e.rotate(c);e.fill(),e.restore()},i.fn.vendors.exportImg=function(){window.open(i.canvas.el.toDataURL("image/png"),"_blank")},i.fn.vendors.loadImg=function(e){if(i.tmp.img_error=void 0,""!=i.particles.shape.image.src)if("svg"==e){var t=new XMLHttpRequest;t.open("GET",i.particles.shape.image.src),t.onreadystatechange=function(e){4==t.readyState&&(200==t.status?(i.tmp.source_svg=e.currentTarget.response,i.fn.vendors.checkBeforeDraw()):(console.log("Error pJS - Image not found"),i.tmp.img_error=!0))},t.send()}else{var n=new Image;n.addEventListener("load",function(){i.tmp.img_obj=n,i.fn.vendors.checkBeforeDraw()}),n.src=i.particles.shape.image.src}else console.log("Error pJS - No image.src"),i.tmp.img_error=!0},i.fn.vendors.draw=function(){"image"==i.particles.shape.type?"svg"==i.tmp.img_type?i.tmp.count_svg>=i.particles.number.value?(i.fn.particlesDraw(),i.particles.move.enable?i.fn.drawAnimFrame=requestAnimFrame(i.fn.vendors.draw):cancelRequestAnimFrame(i.fn.drawAnimFrame)):i.tmp.img_error||(i.fn.drawAnimFrame=requestAnimFrame(i.fn.vendors.draw)):null!=i.tmp.img_obj?(i.fn.particlesDraw(),i.particles.move.enable?i.fn.drawAnimFrame=requestAnimFrame(i.fn.vendors.draw):cancelRequestAnimFrame(i.fn.drawAnimFrame)):i.tmp.img_error||(i.fn.drawAnimFrame=requestAnimFrame(i.fn.vendors.draw)):(i.fn.particlesDraw(),i.particles.move.enable?i.fn.drawAnimFrame=requestAnimFrame(i.fn.vendors.draw):cancelRequestAnimFrame(i.fn.drawAnimFrame))},i.fn.vendors.checkBeforeDraw=function(){"image"==i.particles.shape.type?"svg"==i.tmp.img_type&&null==i.tmp.source_svg?i.tmp.checkAnimFrame=requestAnimFrame(check):(cancelRequestAnimFrame(i.tmp.checkAnimFrame),i.tmp.img_error||(i.fn.vendors.init(),i.fn.vendors.draw())):(i.fn.vendors.init(),i.fn.vendors.draw())},i.fn.vendors.init=function(){i.fn.retinaInit(),i.fn.canvasInit(),i.fn.canvasSize(),i.fn.canvasPaint(),i.fn.particlesCreate(),i.fn.vendors.densityAutoParticles(),i.particles.line_linked.color_rgb_line=hexToRgb(i.particles.line_linked.color)},i.fn.vendors.start=function(){isInArray("image",i.particles.shape.type)?(i.tmp.img_type=i.particles.shape.image.src.substr(i.particles.shape.image.src.length-3),i.fn.vendors.loadImg(i.tmp.img_type)):i.fn.vendors.checkBeforeDraw()},i.fn.vendors.eventsListeners(),i.fn.vendors.start()};Object.deepExtend=function(e,t){for(var n in t)t[n]&&t[n].constructor&&t[n].constructor===Object?(e[n]=e[n]||{},arguments.callee(e[n],t[n])):e[n]=t[n];return e},window.requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},window.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout,window.pJSDom=[],window.particlesJS=function(e,t){"string"!=typeof e&&(t=e,e="particles-js"),e||(e="particles-js");var n=document.getElementById(e),i="particles-js-canvas-el",o=n.getElementsByClassName(i);if(o.length)for(;o.length>0;)n.removeChild(o[0]);var r=document.createElement("canvas");r.className=i,r.style.width="100%",r.style.height="100%";var s=document.getElementById(e).appendChild(r);null!=s&&pJSDom.push(new pJS(e,t))},window.particlesJS.load=function(e,t,n){var i=new XMLHttpRequest;i.open("GET",t),i.onreadystatechange=function(t){if(4==i.readyState)if(200==i.status){var o=JSON.parse(t.currentTarget.response);window.particlesJS(e,o),n&&n()}else console.log("Error pJS - XMLHttpRequest status: "+i.status),console.log("Error pJS - File config not found")},i.send()},function(){"use strict";function e(e,t,n){e.classList[n?"add":"remove"](t)}function t(e,t,n){n=""+n,e["_s_"+t]!==n&&(e.style.setProperty(t,n),e["_s_"+t]=n)}function n(e,n){n&&(t(e,"transition","none"),n()),Q||(Q=e.clientTop&&0),n&&t(e,"transition","")}function i(e,t,n,i){o(!0,e,t,n,i)}function o(e,t,n,i,o){t[(e?"add":"remove")+"EventListener"](n,i,!o&&!1!==o||o)}function r(e,t){e.stopPropagation(),t&&e.preventDefault()}function s(e,n){t(e,"display",n?"":"none")}function a(e,n){t(e,"visibility",n?"":"hidden")}function l(e,n){t(e,"transition",n?"":"none")}function c(e,t,n,i){if("node"!==i)for(var o,r=Object.keys(n),s=0;s<r.length;s++)if(o=r[s],3<o.length&&0===o.indexOf("src"))if("video"===i){var a=ct[o];if(a){if(0<a){var l=n[o];break}}else{if(ut.canPlayType("video/"+o.substring(3).replace("-","").toLowerCase())){ct[o]=1,l=n[o];break}ct[o]=-1}}else if((a=parseInt(o.substring(4),10))&&(a=Math.abs(t-a),!c||a<c)){var c=a;l=n[o]}return l||n.src||n.href||e.src||e.href}function u(){function e(e){return dt[e]=(ee||document).getElementsByClassName("spl-"+e)[0]}if(!Be){Be=document.body,He=e("scene"),We=e("header"),qe=e("footer"),Ve=e("title"),Ye=e("description"),Ge=e("button"),Xe=e("prev"),Ke=e("next"),Je=e("page"),et=e("progress"),tt=e("spinner"),je=[e("pane")],d("close",W),Be[at="requestFullscreen"]||Be[at="msRequestFullscreen"]||Be[at="webkitRequestFullscreen"]||Be[at="mozRequestFullscreen"]||(at=""),at?(lt=at.replace("request","exit").replace("mozRequest","mozCancel").replace("Request","Exit"),Qe=d("fullscreen",L)):J.pop(),d("autofit",B),d("zoom-in",U),d("zoom-out",j),d("theme",N),Ze=d("play",A),d("download",H),i(Xe,"click",V),i(Ke,"click",Y);var t=e("track");i(t,"mousedown",M),i(t,"mousemove",R),i(t,"mouseleave",F),i(t,"mouseup",F),i(t,"touchstart",M,{passive:!1}),i(t,"touchmove",R,{passive:!0}),i(t,"touchend",F),i(Ge,"click",function(){$e?$e(ge,_e):Ie&&(location.href=Ie)})}}function d(e,t){var n=document.createElement("div");return n.className="spl-"+e,i(n,"click",t),We.appendChild(n),dt[e]=n}function h(e){var t=e.target.closest(".spotlight");if(t){r(e,!0),e=t.closest(".spotlight-group"),ve=(e||document).getElementsByClassName("spotlight");for(var n=0;n<ve.length;n++)if(ve[n]===t){be=e&&e.dataset,p(n+1);break}}}function p(n){if(me=ve.length){Be||u(),ke&&ke(n);for(var i=je[0],o=i.parentNode,r=je.length;r<me;r++){var a=i.cloneNode(!1);t(a,"left",100*r+"%"),o.appendChild(a),je[r]=a}Ue||(Be.appendChild(ee),b()),ge=n||1,l(He),K(!0),at&&s(Qe,0<screen.availHeight-window.innerHeight),history.pushState({spl:1},""),history.pushState({spl:2},""),l(ee,!0),e(Be,"hide-scrollbars",!0),e(ee,"show",!0),S(!0),b(),I(),Pe&&A(!0,!0)}}function f(e,t){return e=_e[e],void 0!==e?(e=""+e,"false"!==e&&(e||t)):t}function g(i){i?n(ze,g):(l(He,Le),t(ze,"opacity",Re?0:1),x(Fe&&.8),Ne&&e(ze,Ne,!0))}function m(n){if(Ue=je[n-1],ze=Ue.firstChild,ge=n,ze)pe&&B(),Te&&e(ze,Te,!0),g(!0),Ne&&e(ze,Ne),Re&&t(ze,"opacity",1),Fe&&t(ze,"transform",""),t(ze,"visibility","visible"),it&&(ft.src=it),Pe&&D(ot);else{var i=nt.media,o=f("spinner",!0);if("video"===i)v(o,!0),ze=document.createElement("video"),ze.onloadedmetadata=function(){ze===this&&(ze.onerror=null,ze.width=ze.videoWidth,ze.height=ze.videoHeight,w(),v(o),m(n))},ze.poster=_e.poster,ze.preload=De?"auto":"metadata",ze.controls=f("controls",!0),ze.autoplay=_e.autoplay,ze.h=f("inline"),ze.muted=f("muted"),ze.src=nt.src,Ue.appendChild(ze);else{if("node"===i)return ze=nt.src,"string"==typeof ze&&(ze=document.querySelector(ze)),void(ze&&(ze.g||(ze.g=ze.parentNode),w(),Ue.appendChild(ze),m(n)));v(o,!0),ze=document.createElement("img"),ze.onload=function(){ze===this&&(ze.onerror=null,v(o),m(n),w())},ze.src=nt.src,Ue.appendChild(ze)}ze&&(o||t(ze,"visibility","visible"),ze.onerror=function(){ze===this&&(q(ze),e(tt,"error",!0),v(o))})}}function v(t,n){t&&e(tt,"spin",n)}function _(){return document.fullscreen||document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement}function y(){if(b(),ze&&w(),at){var t=_();e(Qe,"on",t),t||s(Qe,0<screen.availHeight-window.innerHeight)}}function b(){re=ee.clientWidth,se=ee.clientHeight}function w(){ae=ze.clientWidth,le=ze.clientHeight}function x(e){t(ze,"transform","translate(-50%, -50%) scale("+(e||ce)+")")}function k(e,n){t(Ue,"transform",e||n?"translate("+e+"px, "+n+"px)":"")}function C(e,i,o){i?n(He,function(){C(e,!1,o)}):t(He,"transform","translateX("+(100*-e+(o||0))+"%)")}function S(e){o(e,window,"keydown",E),o(e,window,"wheel",P),o(e,window,"resize",y),o(e,window,"popstate",T)}function T(e){Ue&&e.state.spl&&W(!0)}function E(e){if(Ue){var t=!1!==_e["zoom-in"];switch(e.keyCode){case 8:t&&B();break;case 27:W();break;case 32:Pe&&A();break;case 37:V();break;case 39:Y();break;case 38:case 107:case 187:t&&U();break;case 40:case 109:case 189:t&&j()}}}function P(e){Ue&&!1!==_e["zoom-in"]&&(e=e.deltaY,0>.5*(0>e?1:e?-1:0)?j():U())}function A(t,n){("boolean"==typeof t?t:!ot)===!ot&&(ot=ot?clearTimeout(ot):1,e(Ze,"on",ot),n||D(ot))}function D(e){xe&&(n(et,function(){t(et,"transition-duration",""),t(et,"transform","")}),e&&(t(et,"transition-duration",Me+"s"),t(et,"transform","translateX(0)"))),e&&(ot=setTimeout(Y,1e3*Me))}function I(){Ee&&(st=Date.now()+2950,rt||(e(ee,"menu",!0),$(3e3)))}function $(t){rt=setTimeout(function(){var t=Date.now();t>=st?(e(ee,"menu"),rt=0):$(st-t)},t)}function O(t){"boolean"==typeof t&&(rt=t?rt:0),rt?(rt=clearTimeout(rt),e(ee,"menu")):I()}function M(e){r(e,!0),ue=!0,de=!1;var t=e.touches;t&&(t=t[0])&&(e=t),he=ae*ce<=re,ie=e.pageX,oe=e.pageY,l(Ue)}function F(e){if(r(e),ue){if(de){if(he&&de){var t=(e=te<-re/7&&(ge<me||we))||te>re/7&&(1<ge||we);(e||t)&&(C(ge-1,!0,te/re*100),e&&Y()||t&&V()),te=0,k()}l(Ue,!0)}else O();ue=!1}}function R(e){if(r(e),ue){var t=e.touches;t&&(t=t[0])&&(e=t),t=(ae*ce-re)/2,te-=ie-(ie=e.pageX),he||(te>t?te=t:te<-t&&(te=-t),le*ce>se&&(t=(le*ce-se)/2,ne-=oe-(oe=e.pageY),ne>t?ne=t:ne<-t&&(ne=-t))),de=!0,k(te,ne)}else I()}function L(e){var t=_();"boolean"==typeof e&&e===!!t||(t?document[lt]():ee[at]())}function N(t){"string"!=typeof t&&(t=fe?"":Ae||"white"),fe!==t&&(fe&&e(ee,fe),t&&e(ee,t,!0),fe=t)}function B(n){"boolean"==typeof n&&(pe=!n),pe=1===ce&&!pe,e(ze,"autofit",pe),t(ze,"transform",""),ce=1,ne=te=0,w(),l(Ue),k()}function U(){var e=ce/.65;50>=e&&(pe&&B(),te/=.65,ne/=.65,k(te,ne),z(e))}function j(){var e=.65*ce;pe&&B(),1<=e&&(1===e?te=ne=0:(te*=.65,ne*=.65),k(te,ne),z(e))}function z(e){ce=e||1,x()}function H(){var e=Be,t=document.createElement("a"),n=ze.src;t.href=n,t.download=n.substring(n.lastIndexOf("/")+1),e.appendChild(t),t.click(),e.removeChild(t)}function W(t){setTimeout(function(){Be.removeChild(ee),Ue=ze=nt=_e=be=ve=ke=Ce=Se=$e=null},200),e(Be,"hide-scrollbars"),e(ee,"show"),L(!1),S(),history.go(!0===t?-1:-2),it&&(ft.src=""),ot&&A(),ze&&q(ze),rt&&(rt=clearTimeout(rt)),fe&&N(),Oe&&e(ee,Oe),Se&&Se()}function q(e){if(e.g)e.g.appendChild(e),e.g=null;else{var t=e.parentNode;t&&t.removeChild(e),e.src=e.onerror=""}}function V(e){if(e&&I(),1<me){if(1<ge)return G(ge-1);if(we)return C(me,!0),G(me)}}function Y(e){if(e&&I(),1<me){if(ge<me)return G(ge+1);if(we)return C(-1,!0),G(1);ot&&A()}}function G(e){if(e!==ge){ot?(clearTimeout(ot),D()):I();var t=e>ge;return ge=e,K(t),!0}}function X(t){var i,o=ve[ge-1],r=o;if(_e={},be&&Object.assign(_e,be),Object.assign(_e,r.dataset||r),ye=_e.media,$e=_e.onclick,Ae=_e.theme,Oe=_e.class,Ee=f("autohide",!0),we=f("infinite"),xe=f("progress",!0),Pe=f("autoslide"),De=f("preload",!0),Ie=_e.buttonHref,Me=Pe&&parseFloat(Pe)||7,fe||Ae&&N(Ae),Oe&&e(ee,Oe,!0),Oe&&n(ee),r=_e.control){r="string"==typeof r?r.split(","):r;for(var a=0;a<J.length;a++)_e[J[a]]=!1;for(a=0;a<r.length;a++){var l=r[a].trim();"zoom"===l?_e["zoom-in"]=_e["zoom-out"]=!0:_e[l]=!0}}if(r=_e.animation,Fe=Re=Le=!r,Ne=!1,r)for(r="string"==typeof r?r.split(","):r,a=0;a<r.length;a++)l=r[a].trim(),"scale"===l?Fe=!0:"fade"===l?Re=!0:"slide"===l?Le=!0:l&&(Ne=l);for(Te=_e.fit,a=ht&&ht.downlink,r=Math.max(se,re)*pt,a&&1200*a<r&&(r=1200*a),nt={media:ye,src:c(o,r,_e,ye),title:f("title",o.alt||o.title||(i=o.firstElementChild)&&(i.alt||i.title))},it&&(ft.src=it=""),De&&t&&(o=ve[ge])&&(t=o.dataset||o,(i=t.media)&&"image"!==i||(it=c(o,r,t,i))),o=0;o<J.length;o++)t=J[o],s(dt[t],f(t,Z[t]))}function K(n){if(ne=te=0,ce=1,ze)if(ze.onerror)q(ze);else{var i=ze;setTimeout(function(){i&&ze!==i&&(q(i),i=null)},650),g(),k()}X(n),C(ge-1),e(tt,"error"),m(ge),l(Ue),k(),n=nt.title;var o=f("description"),r=f("button"),c=n||o||r;c&&(n&&(Ve.firstChild.nodeValue=n),o&&(Ye.firstChild.nodeValue=o),r&&(Ge.firstChild.nodeValue=r),s(Ve,n),s(Ye,o),s(Ge,r),t(qe,"transform","all"===Ee?"":"none")),Ee||e(ee,"menu",!0),a(qe,c),a(Xe,we||1<ge),a(Ke,we||ge<me),Je.firstChild.nodeValue=1<me?ge+" / "+me:"",Ce&&Ce(ge,_e)}Object.assign||(Object.assign=function(e,t){for(var n,i=Object.keys(t),o=0;o<i.length;o++)n=i[o],e[n]=t[n];return e}),Element.prototype.closest||(Element.prototype.closest=function(e){e=e.substring(1);for(var t=this;t&&1===t.nodeType;){if(t.classList.contains(e))return t;t=t.parentElement}return null});var Q=0,J="theme download play page close autofit zoom-in zoom-out prev next fullscreen".split(" "),Z={page:1,close:1,autofit:1,"zoom-in":1,"zoom-out":1,prev:1,next:1,fullscreen:1},ee=document.createElement("div");ee.id="spotlight",ee.innerHTML="<div class=spl-spinner></div><div class=spl-track><div class=spl-scene><div class=spl-pane></div></div></div><div class=spl-header><div class=spl-page> </div></div><div class=spl-progress></div><div class=spl-footer><div class=spl-title> </div><div class=spl-description> </div><div class=spl-button> </div></div><div class=spl-prev></div><div class=spl-next></div>";var te,ne,ie,oe,re,se,ae,le,ce,ue,de,he,pe,fe,ge,me,ve,_e,ye,be,we,xe,ke,Ce,Se,Te,Ee,Pe,Ae,De,Ie,$e,Oe,Me,Fe,Re,Le,Ne,Be,Ue,je,ze,He,We,qe,Ve,Ye,Ge,Xe,Ke,Qe,Je,Ze,et,tt,nt,it,ot,rt,st,at,lt,ct={},ut=document.createElement("video"),dt={},ht=navigator.connection,pt=window.devicePixelRatio||1,ft=document.createElement("img");i(document,"click",h),window.Spotlight={init:u,theme:N,fullscreen:L,download:H,autofit:B,next:Y,prev:V,goto:G,close:W,zoom:z,menu:O,show:function(e,t,n){ve=e,t&&(be=t,ke=t.onshow,Ce=t.onchange,Se=t.onclose,n=n||t.index),p(n)},play:A,addControl:d,removeControl:function(e){var t=dt[e];t&&(We.removeChild(t),dt[e]=null)}}}.call(this);