ok

Mini Shell

Direktori : /proc/thread-self/root/home2/selectio/www/fms-worksuite/public/vendor/jquery/
Upload File :
Current File : //proc/thread-self/root/home2/selectio/www/fms-worksuite/public/vendor/jquery/plugins.bundle.min.js

function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _createSuper(t){var e=_isNativeReflectConstruct();return function(){var n,i=_getPrototypeOf(t);if(e){var r=_getPrototypeOf(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _possibleConstructorReturn(t,e){return!e||"object"!==_typeof(e)&&"function"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){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(t){return!1}}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _createForOfIteratorHelper(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),t}!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Popper=e()}(this,function(){"use strict";var t="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,e=function(){for(var e=["Edge","Trident","Firefox"],n=0;n<e.length;n+=1)if(t&&navigator.userAgent.indexOf(e[n])>=0)return 1;return 0}();var n=t&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){var n=!1;return function(){n||(n=!0,setTimeout(function(){n=!1,t()},e))}};function i(t){return t&&"[object Function]"==={}.toString.call(t)}function r(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function o(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function a(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=r(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/(auto|scroll|overlay)/.test(n+s+i)?t:a(o(t))}function s(t){return t&&t.referenceNode?t.referenceNode:t}var l=t&&!(!window.MSInputMethodContext||!document.documentMode),u=t&&/MSIE 10/.test(navigator.userAgent);function c(t){return 11===t?l:10===t?u:l||u}function d(t){if(!t)return document.documentElement;for(var e=c(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===r(n,"position")?d(n):n:t?t.ownerDocument.documentElement:document.documentElement}function f(t){return null!==t.parentNode?f(t.parentNode):t}function h(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,r=n?e:t,o=document.createRange();o.setStart(i,0),o.setEnd(r,0);var a,s,l=o.commonAncestorContainer;if(t!==l&&e!==l||i.contains(r))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&d(a.firstElementChild)!==a?d(l):l;var u=f(t);return u.host?h(u.host,e):h(t,f(e).host)}function p(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var i=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||i)[e]}return t[e]}function v(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+i+"Width"])}function m(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],c(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function g(t){var e=t.body,n=t.documentElement,i=c(10)&&getComputedStyle(n);return{height:m("Height",e,n,i),width:m("Width",e,n,i)}}var y=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},b=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),k=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},w=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function x(t){return w({},t,{right:t.left+t.width,bottom:t.top+t.height})}function _(t){var e={};try{if(c(10)){e=t.getBoundingClientRect();var n=p(t,"top"),i=p(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},a="HTML"===t.nodeName?g(t.ownerDocument):{},s=a.width||t.clientWidth||o.width,l=a.height||t.clientHeight||o.height,u=t.offsetWidth-s,d=t.offsetHeight-l;if(u||d){var f=r(t);u-=v(f,"x"),d-=v(f,"y"),o.width-=u,o.height-=d}return x(o)}function E(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=c(10),o="HTML"===e.nodeName,s=_(t),l=_(e),u=a(t),d=r(e),f=parseFloat(d.borderTopWidth),h=parseFloat(d.borderLeftWidth);n&&o&&(l.top=Math.max(l.top,0),l.left=Math.max(l.left,0));var v=x({top:s.top-l.top-f,left:s.left-l.left-h,width:s.width,height:s.height});if(v.marginTop=0,v.marginLeft=0,!i&&o){var m=parseFloat(d.marginTop),g=parseFloat(d.marginLeft);v.top-=f-m,v.bottom-=f-m,v.left-=h-g,v.right-=h-g,v.marginTop=m,v.marginLeft=g}return(i&&!n?e.contains(u):e===u&&"BODY"!==u.nodeName)&&(v=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=p(e,"top"),r=p(e,"left"),o=n?-1:1;return t.top+=i*o,t.bottom+=i*o,t.left+=r*o,t.right+=r*o,t}(v,e)),v}function S(t){if(!t||!t.parentElement||c())return document.documentElement;for(var e=t.parentElement;e&&"none"===r(e,"transform");)e=e.parentElement;return e||document.documentElement}function O(t,e,n,i){var l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u={top:0,left:0},c=l?S(t):h(t,s(e));if("viewport"===i)u=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=E(t,n),r=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:p(n),s=e?0:p(n,"left");return x({top:a-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:r,height:o})}(c,l);else{var d=void 0;"scrollParent"===i?"BODY"===(d=a(o(e))).nodeName&&(d=t.ownerDocument.documentElement):d="window"===i?t.ownerDocument.documentElement:i;var f=E(d,c,l);if("HTML"!==d.nodeName||function t(e){var n=e.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===r(e,"position"))return!0;var i=o(e);return!!i&&t(i)}(c))u=f;else{var v=g(t.ownerDocument),m=v.height,y=v.width;u.top+=f.top-f.marginTop,u.bottom=m+f.top,u.left+=f.left-f.marginLeft,u.right=y+f.left}}var b="number"==typeof(n=n||0);return u.left+=b?n:n.left||0,u.top+=b?n:n.top||0,u.right-=b?n:n.right||0,u.bottom-=b?n:n.bottom||0,u}function A(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=O(n,i,o,r),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map(function(t){return w({key:t},s[t],{area:(e=s[t],e.width*e.height)});var e}).sort(function(t,e){return e.area-t.area}),u=l.filter(function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight}),c=u.length>0?u[0].key:l[0].key,d=t.split("-")[1];return c+(d?"-"+d:"")}function C(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return E(n,i?S(e):h(e,s(n)),i)}function T(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function P(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function N(t,e,n){n=n.split("-")[0];var i=T(t),r={width:i.width,height:i.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",u=o?"width":"height";return r[a]=e[a]+e[l]/2-i[l]/2,r[s]=n===s?e[s]-i[u]:e[P(s)],r}function I(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function L(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var i=I(t,function(t){return t[e]===n});return t.indexOf(i)}(t,"name",n))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&i(n)&&(e.offsets.popper=x(e.offsets.popper),e.offsets.reference=x(e.offsets.reference),e=n(e,t))}),e}function M(t,e){return t.some(function(t){var n=t.name;return t.enabled&&n===e})}function D(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var r=e[i],o=r?""+r+n:t;if(void 0!==document.body.style[o])return o}return null}function j(t){var e=t.ownerDocument;return e?e.defaultView:window}function R(t,e,n,i){n.updateBound=i,j(t).addEventListener("resize",n.updateBound,{passive:!0});var r=a(t);return function t(e,n,i,r){var o="BODY"===e.nodeName,s=o?e.ownerDocument.defaultView:e;s.addEventListener(n,i,{passive:!0}),o||t(a(s.parentNode),n,i,r),r.push(s)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function F(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,j(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function $(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function H(t,e){Object.keys(e).forEach(function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&$(e[n])&&(i="px"),t.style[n]=e[n]+i})}var B=t&&/Firefox/i.test(navigator.userAgent);function q(t,e,n){var i=I(t,function(t){return t.name===e}),r=!!i&&t.some(function(t){return t.name===n&&t.enabled&&t.order<i.order});if(!r){var o="`"+e+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}var z=["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"],U=z.slice(3);function V(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=U.indexOf(t),i=U.slice(n+1).concat(U.slice(0,n));return e?i.reverse():i}var K={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function W(t,e,n,i){var r=[0,0],o=-1!==["right","left"].indexOf(i),a=t.split(/(\+|\-)/).map(function(t){return t.trim()}),s=a.indexOf(I(a,function(t){return-1!==t.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(u=u.map(function(t,i){var r=(1===i?!o:o)?"height":"width",a=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)},[]).map(function(t){return function(t,e,n,i){var r=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+r[1],a=r[2];if(!o)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=i}return x(s)[e]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(t,r,e,n)})})).forEach(function(t,e){t.forEach(function(n,i){$(n)&&(r[e]+=n*("-"===t[i-1]?-1:1))})}),r}var G={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var r=t.offsets,o=r.reference,a=r.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",c={start:k({},l,o[l]),end:k({},l,o[l]+o[u]-a[u])};t.offsets.popper=w({},a,c[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,i=t.placement,r=t.offsets,o=r.popper,a=r.reference,s=i.split("-")[0],l=void 0;return l=$(+n)?[+n,0]:W(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||d(t.instance.popper);t.instance.reference===n&&(n=d(n));var i=D("transform"),r=t.instance.popper.style,o=r.top,a=r.left,s=r[i];r.top="",r.left="",r[i]="";var l=O(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);r.top=o,r.left=a,r[i]=s,e.boundaries=l;var u=e.priority,c=t.offsets.popper,f={primary:function(t){var n=c[t];return c[t]<l[t]&&!e.escapeWithReference&&(n=Math.max(c[t],l[t])),k({},t,n)},secondary:function(t){var n="right"===t?"left":"top",i=c[n];return c[t]>l[t]&&!e.escapeWithReference&&(i=Math.min(c[n],l[t]-("right"===t?c.width:c.height))),k({},n,i)}};return u.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=w({},c,f[e](t))}),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,r=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(r),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return n[s]<o(i[l])&&(t.offsets.popper[l]=o(i[l])-n[u]),n[l]>o(i[s])&&(t.offsets.popper[l]=o(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!q(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],a=t.offsets,s=a.popper,l=a.reference,u=-1!==["left","right"].indexOf(o),c=u?"height":"width",d=u?"Top":"Left",f=d.toLowerCase(),h=u?"left":"top",p=u?"bottom":"right",v=T(i)[c];l[p]-v<s[f]&&(t.offsets.popper[f]-=s[f]-(l[p]-v)),l[f]+v>s[p]&&(t.offsets.popper[f]+=l[f]+v-s[p]),t.offsets.popper=x(t.offsets.popper);var m=l[f]+l[c]/2-v/2,g=r(t.instance.popper),y=parseFloat(g["margin"+d]),b=parseFloat(g["border"+d+"Width"]),w=m-t.offsets.popper[f]-y-b;return w=Math.max(Math.min(s[c]-v,w),0),t.arrowElement=i,t.offsets.arrow=(k(n={},f,Math.round(w)),k(n,h,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(M(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=O(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],r=P(i),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case K.FLIP:a=[i,r];break;case K.CLOCKWISE:a=V(i);break;case K.COUNTERCLOCKWISE:a=V(i,!0);break;default:a=e.behavior}return a.forEach(function(s,l){if(i!==s||a.length===l+1)return t;i=t.placement.split("-")[0],r=P(i);var u=t.offsets.popper,c=t.offsets.reference,d=Math.floor,f="left"===i&&d(u.right)>d(c.left)||"right"===i&&d(u.left)<d(c.right)||"top"===i&&d(u.bottom)>d(c.top)||"bottom"===i&&d(u.top)<d(c.bottom),h=d(u.left)<d(n.left),p=d(u.right)>d(n.right),v=d(u.top)<d(n.top),m=d(u.bottom)>d(n.bottom),g="left"===i&&h||"right"===i&&p||"top"===i&&v||"bottom"===i&&m,y=-1!==["top","bottom"].indexOf(i),b=!!e.flipVariations&&(y&&"start"===o&&h||y&&"end"===o&&p||!y&&"start"===o&&v||!y&&"end"===o&&m),k=!!e.flipVariationsByContent&&(y&&"start"===o&&p||y&&"end"===o&&h||!y&&"start"===o&&m||!y&&"end"===o&&v),x=b||k;(f||g||x)&&(t.flipped=!0,(f||g)&&(i=a[l+1]),x&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=i+(o?"-"+o:""),t.offsets.popper=w({},t.offsets.popper,N(t.instance.popper,t.offsets.reference,t.placement)),t=L(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,r=i.popper,o=i.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=o[n]-(s?r[a?"width":"height"]:0),t.placement=P(e),t.offsets.popper=x(r),t}},hide:{order:800,enabled:!0,fn:function(t){if(!q(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=I(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var n=e.x,i=e.y,r=t.offsets.popper,o=I(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:e.gpuAcceleration,s=d(t.instance.popper),l=_(s),u={position:r.position},c=function(t,e){var n=t.offsets,i=n.popper,r=n.reference,o=Math.round,a=Math.floor,s=function(t){return t},l=o(r.width),u=o(i.width),c=-1!==["left","right"].indexOf(t.placement),d=-1!==t.placement.indexOf("-"),f=e?c||d||l%2==u%2?o:a:s,h=e?o:s;return{left:f(l%2==1&&u%2==1&&!d&&e?i.left-1:i.left),top:h(i.top),bottom:h(i.bottom),right:f(i.right)}}(t,window.devicePixelRatio<2||!B),f="bottom"===n?"top":"bottom",h="right"===i?"left":"right",p=D("transform"),v=void 0,m=void 0;if(m="bottom"===f?"HTML"===s.nodeName?-s.clientHeight+c.bottom:-l.height+c.bottom:c.top,v="right"===h?"HTML"===s.nodeName?-s.clientWidth+c.right:-l.width+c.right:c.left,a&&p)u[p]="translate3d("+v+"px, "+m+"px, 0)",u[f]=0,u[h]=0,u.willChange="transform";else{var g="bottom"===f?-1:1,y="right"===h?-1:1;u[f]=m*g,u[h]=v*y,u.willChange=f+", "+h}var b={"x-placement":t.placement};return t.attributes=w({},b,t.attributes),t.styles=w({},u,t.styles),t.arrowStyles=w({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,n;return H(t.instance.popper,t.styles),e=t.instance.popper,n=t.attributes,Object.keys(n).forEach(function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)}),t.arrowElement&&Object.keys(t.arrowStyles).length&&H(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,n,i,r){var o=C(r,e,t,n.positionFixed),a=A(n.placement,o,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",a),H(e,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},Y=function(){function t(e,r){var o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};y(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=n(this.update.bind(this)),this.options=w({},t.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.options.modifiers={},Object.keys(w({},t.Defaults.modifiers,a.modifiers)).forEach(function(e){o.options.modifiers[e]=w({},t.Defaults.modifiers[e]||{},a.modifiers?a.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return w({name:t},o.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&i(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 b(t,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=C(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=A(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=N(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=L(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,M(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[D("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=R(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return F.call(this)}}]),t}();return Y.Utils=("undefined"!=typeof window?window:global).PopperUtils,Y.placements=z,Y.Defaults=G,Y}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).PerfectScrollbar=e()}(this,function(){"use strict";function t(t){return getComputedStyle(t)}function e(t,e){for(var n in e){var i=e[n];"number"==typeof i&&(i+="px"),t.style[n]=i}return t}function n(t){var e=document.createElement("div");return e.className=t,e}var i="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function r(t,e){if(!i)throw new Error("No element matching method supported");return i.call(t,e)}function o(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function a(t,e){return Array.prototype.filter.call(t.children,function(t){return r(t,e)})}var s={main:"ps",rtl:"ps__rtl",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},l={x:null,y:null};function u(t,e){var n=t.element.classList,i=s.state.scrolling(e);n.contains(i)?clearTimeout(l[e]):n.add(i)}function c(t,e){l[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(s.state.scrolling(e))},t.settings.scrollingThreshold)}var d=function(t){this.element=t,this.handlers={}},f={isEmpty:{configurable:!0}};d.prototype.bind=function(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},d.prototype.unbind=function(t,e){var n=this;this.handlers[t]=this.handlers[t].filter(function(i){return!(!e||i===e)||(n.element.removeEventListener(t,i,!1),!1)})},d.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},f.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(d.prototype,f);var h=function(){this.eventElements=[]};function p(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}function v(t,e,n,i,r){var o;if(void 0===i&&(i=!0),void 0===r&&(r=!1),"top"===e)o=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");o=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,n,i,r){var o=n[0],a=n[1],s=n[2],l=n[3],d=n[4],f=n[5];void 0===i&&(i=!0);void 0===r&&(r=!1);var h=t.element;t.reach[l]=null,h[s]<1&&(t.reach[l]="start");h[s]>t[o]-t[a]-1&&(t.reach[l]="end");e&&(h.dispatchEvent(p("ps-scroll-"+l)),e<0?h.dispatchEvent(p("ps-scroll-"+d)):e>0&&h.dispatchEvent(p("ps-scroll-"+f)),i&&function(t,e){u(t,e),c(t,e)}(t,l));t.reach[l]&&(e||r)&&h.dispatchEvent(p("ps-"+l+"-reach-"+t.reach[l]))}(t,n,o,i,r)}function m(t){return parseInt(t,10)||0}h.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new d(t),this.eventElements.push(e)),e},h.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},h.prototype.unbind=function(t,e,n){var i=this.eventElement(t);i.unbind(e,n),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},h.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},h.prototype.once=function(t,e,n){var i=this.eventElement(t),r=function(t){i.unbind(e,r),n(t)};i.bind(e,r)};var g={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function y(t){var n=t.element,i=Math.floor(n.scrollTop),r=n.getBoundingClientRect();t.containerWidth=Math.ceil(r.width),t.containerHeight=Math.ceil(r.height),t.contentWidth=n.scrollWidth,t.contentHeight=n.scrollHeight,n.contains(t.scrollbarXRail)||(a(n,s.element.rail("x")).forEach(function(t){return o(t)}),n.appendChild(t.scrollbarXRail)),n.contains(t.scrollbarYRail)||(a(n,s.element.rail("y")).forEach(function(t){return o(t)}),n.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=b(t,m(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=m((t.negativeScrollAdjustment+n.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=b(t,m(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=m(i*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,n){var i={width:n.railXWidth},r=Math.floor(t.scrollTop);n.isRtl?i.left=n.negativeScrollAdjustment+t.scrollLeft+n.containerWidth-n.contentWidth:i.left=t.scrollLeft;n.isScrollbarXUsingBottom?i.bottom=n.scrollbarXBottom-r:i.top=n.scrollbarXTop+r;e(n.scrollbarXRail,i);var o={top:r,height:n.railYHeight};n.isScrollbarYUsingRight?n.isRtl?o.right=n.contentWidth-(n.negativeScrollAdjustment+t.scrollLeft)-n.scrollbarYRight-n.scrollbarYOuterWidth-9:o.right=n.scrollbarYRight-t.scrollLeft:n.isRtl?o.left=n.negativeScrollAdjustment+t.scrollLeft+2*n.containerWidth-n.contentWidth-n.scrollbarYLeft-n.scrollbarYOuterWidth:o.left=n.scrollbarYLeft+t.scrollLeft;e(n.scrollbarYRail,o),e(n.scrollbarX,{left:n.scrollbarXLeft,width:n.scrollbarXWidth-n.railBorderXWidth}),e(n.scrollbarY,{top:n.scrollbarYTop,height:n.scrollbarYHeight-n.railBorderYWidth})}(n,t),t.scrollbarXActive?n.classList.add(s.state.active("x")):(n.classList.remove(s.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,n.scrollLeft=!0===t.isRtl?t.contentWidth:0),t.scrollbarYActive?n.classList.add(s.state.active("y")):(n.classList.remove(s.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,n.scrollTop=0)}function b(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function k(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],d=e[6],f=e[7],h=e[8],p=t.element,v=null,m=null,g=null;function b(e){e.touches&&e.touches[0]&&(e[r]=e.touches[0].pageY),p[d]=v+g*(e[r]-m),u(t,f),y(t),e.stopPropagation(),e.preventDefault()}function k(){c(t,f),t[h].classList.remove(s.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",b)}function w(e,a){v=p[d],a&&e.touches&&(e[r]=e.touches[0].pageY),m=e[r],g=(t[i]-t[n])/(t[o]-t[l]),a?t.event.bind(t.ownerDocument,"touchmove",b):(t.event.bind(t.ownerDocument,"mousemove",b),t.event.once(t.ownerDocument,"mouseup",k),e.preventDefault()),t[h].classList.add(s.state.clicking),e.stopPropagation()}t.event.bind(t[a],"mousedown",function(t){w(t)}),t.event.bind(t[a],"touchstart",function(t){w(t,!0)})}var w={"click-rail":function(t){t.element,t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var n=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=n*t.containerHeight,y(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var n=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=n*t.containerWidth,y(t),e.stopPropagation()})},"drag-thumb":function(t){k(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),k(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",function(n){if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(r(e,":hover")||r(t.scrollbarX,":focus")||r(t.scrollbarY,":focus"))){var i,o=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(o){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(r(i=o,"input,[contenteditable]")||r(i,"select,[contenteditable]")||r(i,"textarea,[contenteditable]")||r(i,"button,[contenteditable]"))return}var a=0,s=0;switch(n.which){case 37:a=n.metaKey?-t.contentWidth:n.altKey?-t.containerWidth:-30;break;case 38:s=n.metaKey?t.contentHeight:n.altKey?t.containerHeight:30;break;case 39:a=n.metaKey?t.contentWidth:n.altKey?t.containerWidth:30;break;case 40:s=n.metaKey?-t.contentHeight:n.altKey?-t.containerHeight:-30;break;case 32:s=n.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:s=t.containerHeight;break;case 34:s=-t.containerHeight;break;case 36:s=t.contentHeight;break;case 35:s=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==a||t.settings.suppressScrollY&&0!==s||(e.scrollTop-=s,e.scrollLeft+=a,y(t),function(n,i){var r=Math.floor(e.scrollTop);if(0===n){if(!t.scrollbarYActive)return!1;if(0===r&&i>0||r>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var o=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===o&&n<0||o>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}(a,s)&&n.preventDefault())}})},wheel:function(e){var n=e.element;function i(i){var r=function(t){var e=t.deltaX,n=-1*t.deltaY;return void 0!==e&&void 0!==n||(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!=e&&n!=n&&(e=0,n=t.wheelDelta),t.shiftKey?[-n,-e]:[e,n]}(i),o=r[0],a=r[1];if(!function(e,i,r){if(!g.isWebKit&&n.querySelector("select:focus"))return!0;if(!n.contains(e))return!1;for(var o=e;o&&o!==n;){if(o.classList.contains(s.element.consuming))return!0;var a=t(o);if(r&&a.overflowY.match(/(scroll|auto)/)){var l=o.scrollHeight-o.clientHeight;if(l>0&&(o.scrollTop>0&&r<0||o.scrollTop<l&&r>0))return!0}if(i&&a.overflowX.match(/(scroll|auto)/)){var u=o.scrollWidth-o.clientWidth;if(u>0&&(o.scrollLeft>0&&i<0||o.scrollLeft<u&&i>0))return!0}o=o.parentNode}return!1}(i.target,o,a)){var l=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(a?n.scrollTop-=a*e.settings.wheelSpeed:n.scrollTop+=o*e.settings.wheelSpeed,l=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(o?n.scrollLeft+=o*e.settings.wheelSpeed:n.scrollLeft-=a*e.settings.wheelSpeed,l=!0):(n.scrollTop-=a*e.settings.wheelSpeed,n.scrollLeft+=o*e.settings.wheelSpeed),y(e),(l=l||function(t,i){var r=Math.floor(n.scrollTop),o=0===n.scrollTop,a=r+n.offsetHeight===n.scrollHeight,s=0===n.scrollLeft,l=n.scrollLeft+n.offsetWidth===n.scrollWidth;return!(Math.abs(i)>Math.abs(t)?o||a:s||l)||!e.settings.wheelPropagation}(o,a))&&!i.ctrlKey&&(i.stopPropagation(),i.preventDefault())}}void 0!==window.onwheel?e.event.bind(n,"wheel",i):void 0!==window.onmousewheel&&e.event.bind(n,"mousewheel",i)},touch:function(e){if(g.supportsTouch||g.supportsIePointer){var n=e.element,i={},r=0,o={},a=null;g.supportsTouch?(e.event.bind(n,"touchstart",d),e.event.bind(n,"touchmove",f),e.event.bind(n,"touchend",h)):g.supportsIePointer&&(window.PointerEvent?(e.event.bind(n,"pointerdown",d),e.event.bind(n,"pointermove",f),e.event.bind(n,"pointerup",h)):window.MSPointerEvent&&(e.event.bind(n,"MSPointerDown",d),e.event.bind(n,"MSPointerMove",f),e.event.bind(n,"MSPointerUp",h)))}function l(t,i){n.scrollTop-=i,n.scrollLeft-=t,y(e)}function u(t){return t.targetTouches?t.targetTouches[0]:t}function c(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function d(t){if(c(t)){var e=u(t);i.pageX=e.pageX,i.pageY=e.pageY,r=(new Date).getTime(),null!==a&&clearInterval(a)}}function f(a){if(c(a)){var d=u(a),f={pageX:d.pageX,pageY:d.pageY},h=f.pageX-i.pageX,p=f.pageY-i.pageY;if(function(e,i,r){if(!n.contains(e))return!1;for(var o=e;o&&o!==n;){if(o.classList.contains(s.element.consuming))return!0;var a=t(o);if(r&&a.overflowY.match(/(scroll|auto)/)){var l=o.scrollHeight-o.clientHeight;if(l>0&&(o.scrollTop>0&&r<0||o.scrollTop<l&&r>0))return!0}if(i&&a.overflowX.match(/(scroll|auto)/)){var u=o.scrollWidth-o.clientWidth;if(u>0&&(o.scrollLeft>0&&i<0||o.scrollLeft<u&&i>0))return!0}o=o.parentNode}return!1}(a.target,h,p))return;l(h,p),i=f;var v=(new Date).getTime(),m=v-r;m>0&&(o.x=h/m,o.y=p/m,r=v),function(t,i){var r=Math.floor(n.scrollTop),o=n.scrollLeft,a=Math.abs(t),s=Math.abs(i);if(s>a){if(i<0&&r===e.contentHeight-e.containerHeight||i>0&&0===r)return 0===window.scrollY&&i>0&&g.isChrome}else if(a>s&&(t<0&&o===e.contentWidth-e.containerWidth||t>0&&0===o))return!0;return!0}(h,p)&&a.preventDefault()}}function h(){e.settings.swipeEasing&&(clearInterval(a),a=setInterval(function(){e.isInitialized?clearInterval(a):o.x||o.y?Math.abs(o.x)<.01&&Math.abs(o.y)<.01?clearInterval(a):(l(30*o.x,30*o.y),o.x*=.8,o.y*=.8):clearInterval(a)},10))}}},x=function(i,r){var o=this;if(void 0===r&&(r={}),"string"==typeof i&&(i=document.querySelector(i)),!i||!i.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var a in this.element=i,i.classList.add(s.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},r)this.settings[a]=r[a];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var l,u,c=function(){return i.classList.add(s.state.focus)},d=function(){return i.classList.remove(s.state.focus)};this.isRtl="rtl"===t(i).direction,!0===this.isRtl&&i.classList.add(s.rtl),this.isNegativeScroll=(u=i.scrollLeft,i.scrollLeft=-1,l=i.scrollLeft<0,i.scrollLeft=u,l),this.negativeScrollAdjustment=this.isNegativeScroll?i.scrollWidth-i.clientWidth:0,this.event=new h,this.ownerDocument=i.ownerDocument||document,this.scrollbarXRail=n(s.element.rail("x")),i.appendChild(this.scrollbarXRail),this.scrollbarX=n(s.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",c),this.event.bind(this.scrollbarX,"blur",d),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var f=t(this.scrollbarXRail);this.scrollbarXBottom=parseInt(f.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=m(f.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=m(f.borderLeftWidth)+m(f.borderRightWidth),e(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=m(f.marginLeft)+m(f.marginRight),e(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=n(s.element.rail("y")),i.appendChild(this.scrollbarYRail),this.scrollbarY=n(s.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",c),this.event.bind(this.scrollbarY,"blur",d),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var p=t(this.scrollbarYRail);this.scrollbarYRight=parseInt(p.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=m(p.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(e){var n=t(e);return m(n.width)+m(n.paddingLeft)+m(n.paddingRight)+m(n.borderLeftWidth)+m(n.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=m(p.borderTopWidth)+m(p.borderBottomWidth),e(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=m(p.marginTop)+m(p.marginBottom),e(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:i.scrollLeft<=0?"start":i.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:i.scrollTop<=0?"start":i.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return w[t](o)}),this.lastScrollTop=Math.floor(i.scrollTop),this.lastScrollLeft=i.scrollLeft,this.event.bind(this.element,"scroll",function(t){return o.onScroll(t)}),y(this)};return x.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,e(this.scrollbarXRail,{display:"block"}),e(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=m(t(this.scrollbarXRail).marginLeft)+m(t(this.scrollbarXRail).marginRight),this.railYMarginHeight=m(t(this.scrollbarYRail).marginTop)+m(t(this.scrollbarYRail).marginBottom),e(this.scrollbarXRail,{display:"none"}),e(this.scrollbarYRail,{display:"none"}),y(this),v(this,"top",0,!1,!0),v(this,"left",0,!1,!0),e(this.scrollbarXRail,{display:""}),e(this.scrollbarYRail,{display:""}))},x.prototype.onScroll=function(t){this.isAlive&&(y(this),v(this,"top",this.element.scrollTop-this.lastScrollTop),v(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},x.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),o(this.scrollbarX),o(this.scrollbarY),o(this.scrollbarXRail),o(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},x.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")},x}),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.wNumb=t()}(function(){"use strict";var t=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function e(t){return t.split("").reverse().join("")}function n(t,e){return t.substring(0,e.length)===e}function i(t,e,n){if((t[e]||t[n])&&t[e]===t[n])throw new Error(e)}function r(t){return"number"==typeof t&&isFinite(t)}function o(t,n,i,o,a,s,l,u,c,d,f,h){var p,v,m,g,y,b=h,k="",w="";return s&&(h=s(h)),!!r(h)&&(!1!==t&&0===parseFloat(h.toFixed(t))&&(h=0),h<0&&(p=!0,h=Math.abs(h)),!1!==t&&(y=t,g=(g=h).toString().split("e"),h=(+((g=(g=Math.round(+(g[0]+"e"+(g[1]?+g[1]+y:y)))).toString().split("e"))[0]+"e"+(g[1]?+g[1]-y:-y))).toFixed(y)),-1!==(h=h.toString()).indexOf(".")?(m=(v=h.split("."))[0],i&&(k=i+v[1])):m=h,n&&(m=e(m).match(/.{1,3}/g),m=e(m.join(e(n)))),p&&u&&(w+=u),o&&(w+=o),p&&c&&(w+=c),w+=m,w+=k,a&&(w+=a),d&&(w=d(w,b)),w)}function a(t,e,i,o,a,s,l,u,c,d,f,h){var p,v="";return f&&(h=f(h)),!(!h||"string"!=typeof h)&&(u&&n(h,u)&&(h=h.replace(u,""),p=!0),o&&n(h,o)&&(h=h.replace(o,"")),c&&n(h,c)&&(h=h.replace(c,""),p=!0),a&&function(t,e){return t.slice(-1*e.length)===e}(h,a)&&(h=h.slice(0,-1*a.length)),e&&(h=h.split(e).join("")),i&&(h=h.replace(i,".")),p&&(v+="-"),""!==(v=(v+=h).replace(/[^0-9\.\-.]/g,""))&&(v=Number(v),l&&(v=l(v)),!!r(v)&&v))}function s(e,n,i){var r,o=[];for(r=0;r<t.length;r+=1)o.push(e[t[r]]);return o.push(i),n.apply("",o)}return function e(n){if(!(this instanceof e))return new e(n);"object"==typeof n&&(n=function(e){var n,r,o,a={};for(void 0===e.suffix&&(e.suffix=e.postfix),n=0;n<t.length;n+=1)if(void 0===(o=e[r=t[n]]))"negative"!==r||a.negativeBefore?"mark"===r&&"."!==a.thousand?a[r]=".":a[r]=!1:a[r]="-";else if("decimals"===r){if(!(o>=0&&o<8))throw new Error(r);a[r]=o}else if("encoder"===r||"decoder"===r||"edit"===r||"undo"===r){if("function"!=typeof o)throw new Error(r);a[r]=o}else{if("string"!=typeof o)throw new Error(r);a[r]=o}return i(a,"mark","thousand"),i(a,"prefix","negative"),i(a,"prefix","negativeBefore"),a}(n),this.to=function(t){return s(n,o,t)},this.from=function(t){return s(n,a,t)})}}),function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.returnExports=e()}(this,function(){"use strict";var t,e=Function.call.bind(Function.apply),n=Function.call.bind(Function.call),i=Array.isArray,r=Object.keys,o=function(t){try{return t(),!1}catch(t){return!0}},a=function(t){try{return t()}catch(t){return!1}},s=function(t){return function(){return!e(t,this,arguments)}}(o),l=!!Object.defineProperty&&!o(function(){return Object.defineProperty({},"x",{get:function(){}})}),u="foo"===function(){}.name,c=Function.call.bind(Array.prototype.forEach),d=Function.call.bind(Array.prototype.reduce),f=Function.call.bind(Array.prototype.filter),h=Function.call.bind(Array.prototype.some),p=function(t,e,n,i){!i&&e in t||(l?Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:n}):t[e]=n)},v=function(t,e,n){c(r(e),function(i){var r=e[i];p(t,i,r,!!n)})},m=Function.call.bind(Object.prototype.toString),g="function"==typeof/abc/?function(t){return"function"==typeof t&&"[object Function]"===m(t)}:function(t){return"function"==typeof t},y=function(t,e,n){if(!l)throw new TypeError("getters require true ES5 support");Object.defineProperty(t,e,{configurable:!0,enumerable:!1,get:n})},b=function(t,e,n){if(!l)throw new TypeError("getters require true ES5 support");var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,{configurable:i.configurable,enumerable:i.enumerable,get:function(){return t[e]},set:function(n){t[e]=n}})},k=function(t,e,n){if(l){var i=Object.getOwnPropertyDescriptor(t,e);i.value=n,Object.defineProperty(t,e,i)}else t[e]=n},w=function(t,e,n){l?Object.defineProperty(t,e,n):"value"in n&&(t[e]=n.value)},x=function(t,e){e&&g(e.toString)&&p(t,"toString",e.toString.bind(e),!0)},_=Object.create||function(t,e){var n=function(){};n.prototype=t;var i=new n;return void 0!==e&&r(e).forEach(function(t){w(i,t,e[t])}),i},E=function(t,e){return!!Object.setPrototypeOf&&a(function(){var n=function e(n){var i=new t(n);return Object.setPrototypeOf(i,e.prototype),i};return Object.setPrototypeOf(n,t),n.prototype=_(t.prototype,{constructor:{value:n}}),e(n)})},S=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}(),O=S.isFinite,A=Function.call.bind(String.prototype.indexOf),C=Function.apply.bind(Array.prototype.indexOf),T=Function.call.bind(Array.prototype.concat),P=Function.call.bind(String.prototype.slice),N=Function.call.bind(Array.prototype.push),I=Function.apply.bind(Array.prototype.push),L=Function.call.bind(Array.prototype.shift),M=Math.max,D=Math.min,j=Math.floor,R=Math.abs,F=Math.exp,$=Math.log,H=Math.sqrt,B=Function.call.bind(Object.prototype.hasOwnProperty),q=function(){},z=S.Map,U=z&&z.prototype.delete,V=z&&z.prototype.get,K=z&&z.prototype.has,W=z&&z.prototype.set,G=S.Symbol||{},Y=G.species||"@@species",Z=Number.isNaN||function(t){return t!=t},X=Number.isFinite||function(t){return"number"==typeof t&&O(t)},Q=g(Math.sign)?Math.sign:function(t){var e=Number(t);return 0===e?e:Z(e)?e:e<0?-1:1},J=function(t){var e=Number(t);return e<-1||Z(e)?NaN:0===e||e===1/0?e:-1===e?-1/0:1+e-1==0?e:e*($(1+e)/(1+e-1))},tt=function(t){return"[object Arguments]"===m(t)},et=tt(arguments)?tt:function(t){return null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==m(t)&&"[object Function]"===m(t.callee)},nt=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},it=function(t){return"[object String]"===m(t)},rt=function(t){return"[object RegExp]"===m(t)},ot=function(t){return"function"==typeof S.Symbol&&"symbol"==typeof t},at=function(t,e,n){var i=t[e];p(t,e,n,!0),x(t[e],i)},st="function"==typeof G&&"function"==typeof G.for&&ot(G()),lt=ot(G.iterator)?G.iterator:"_es6-shim iterator_";S.Set&&"function"==typeof(new S.Set)["@@iterator"]&&(lt="@@iterator"),S.Reflect||p(S,"Reflect",{},!0);var ut=S.Reflect,ct=String,dt="undefined"!=typeof document&&document?document.all:null,ft=null==dt?function(t){return null==t}:function(t){return null==t&&t!==dt},ht={Call:function(t,n){var i=arguments.length>2?arguments[2]:[];if(!ht.IsCallable(t))throw new TypeError(t+" is not a function");return e(t,n,i)},RequireObjectCoercible:function(t,e){if(ft(t))throw new TypeError(e||"Cannot call method on "+t);return t},TypeIsObject:function(t){return null!=t&&!0!==t&&!1!==t&&("function"==typeof t||"object"==typeof t||t===dt)},ToObject:function(t,e){return Object(ht.RequireObjectCoercible(t,e))},IsCallable:g,IsConstructor:function(t){return ht.IsCallable(t)},ToInt32:function(t){return ht.ToNumber(t)>>0},ToUint32:function(t){return ht.ToNumber(t)>>>0},ToNumber:function(t){if("[object Symbol]"===m(t))throw new TypeError("Cannot convert a Symbol value to a number");return+t},ToInteger:function(t){var e=ht.ToNumber(t);return Z(e)?0:0!==e&&X(e)?(e>0?1:-1)*j(R(e)):e},ToLength:function(t){var e=ht.ToInteger(t);return e<=0?0:e>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e},SameValue:function(t,e){return t===e?0!==t||1/t==1/e:Z(t)&&Z(e)},SameValueZero:function(t,e){return t===e||Z(t)&&Z(e)},IsIterable:function(t){return ht.TypeIsObject(t)&&(void 0!==t[lt]||et(t))},GetIterator:function(e){if(et(e))return new t(e,"value");var n=ht.GetMethod(e,lt);if(!ht.IsCallable(n))throw new TypeError("value is not an iterable");var i=ht.Call(n,e);if(!ht.TypeIsObject(i))throw new TypeError("bad iterator");return i},GetMethod:function(t,e){var n=ht.ToObject(t)[e];if(!ft(n)){if(!ht.IsCallable(n))throw new TypeError("Method not callable: "+e);return n}},IteratorComplete:function(t){return!!t.done},IteratorClose:function(t,e){var n=ht.GetMethod(t,"return");if(void 0!==n){var i,r;try{i=ht.Call(n,t)}catch(t){r=t}if(!e){if(r)throw r;if(!ht.TypeIsObject(i))throw new TypeError("Iterator's return method returned a non-object.")}}},IteratorNext:function(t){var e=arguments.length>1?t.next(arguments[1]):t.next();if(!ht.TypeIsObject(e))throw new TypeError("bad iterator");return e},IteratorStep:function(t){var e=ht.IteratorNext(t);return!ht.IteratorComplete(e)&&e},Construct:function(t,e,n,i){var r=void 0===n?t:n;if(!i&&ut.construct)return ut.construct(t,e,r);var o=r.prototype;ht.TypeIsObject(o)||(o=Object.prototype);var a=_(o),s=ht.Call(t,a,e);return ht.TypeIsObject(s)?s:a},SpeciesConstructor:function(t,e){var n=t.constructor;if(void 0===n)return e;if(!ht.TypeIsObject(n))throw new TypeError("Bad constructor");var i=n[Y];if(ft(i))return e;if(!ht.IsConstructor(i))throw new TypeError("Bad @@species");return i},CreateHTML:function(t,e,n,i){var r=ht.ToString(t),o="<"+e;""!==n&&(o+=" "+n+'="'+ht.ToString(i).replace(/"/g,"&quot;")+'"');return o+">"+r+"</"+e+">"},IsRegExp:function(t){if(!ht.TypeIsObject(t))return!1;var e=t[G.match];return void 0!==e?!!e:rt(t)},ToString:function(t){return ct(t)}};if(l&&st){var pt=function(t){if(ot(G[t]))return G[t];var e=G.for("Symbol."+t);return Object.defineProperty(G,t,{configurable:!1,enumerable:!1,writable:!1,value:e}),e};if(!ot(G.search)){var vt=pt("search"),mt=String.prototype.search;p(RegExp.prototype,vt,function(t){return ht.Call(mt,t,[this])});at(String.prototype,"search",function(t){var e=ht.RequireObjectCoercible(this);if(!ft(t)){var n=ht.GetMethod(t,vt);if(void 0!==n)return ht.Call(n,t,[e])}return ht.Call(mt,e,[ht.ToString(t)])})}if(!ot(G.replace)){var gt=pt("replace"),yt=String.prototype.replace;p(RegExp.prototype,gt,function(t,e){return ht.Call(yt,t,[this,e])});at(String.prototype,"replace",function(t,e){var n=ht.RequireObjectCoercible(this);if(!ft(t)){var i=ht.GetMethod(t,gt);if(void 0!==i)return ht.Call(i,t,[n,e])}return ht.Call(yt,n,[ht.ToString(t),e])})}if(!ot(G.split)){var bt=pt("split"),kt=String.prototype.split;p(RegExp.prototype,bt,function(t,e){return ht.Call(kt,t,[this,e])});at(String.prototype,"split",function(t,e){var n=ht.RequireObjectCoercible(this);if(!ft(t)){var i=ht.GetMethod(t,bt);if(void 0!==i)return ht.Call(i,t,[n,e])}return ht.Call(kt,n,[ht.ToString(t),e])})}var wt=ot(G.match),xt=wt&&function(){var t={};return t[G.match]=function(){return 42},42!=="a".match(t)}();if(!wt||xt){var _t=pt("match"),Et=String.prototype.match;p(RegExp.prototype,_t,function(t){return ht.Call(Et,t,[this])});at(String.prototype,"match",function(t){var e=ht.RequireObjectCoercible(this);if(!ft(t)){var n=ht.GetMethod(t,_t);if(void 0!==n)return ht.Call(n,t,[e])}return ht.Call(Et,e,[ht.ToString(t)])})}}var St=function(t,e,n){x(e,t),Object.setPrototypeOf&&Object.setPrototypeOf(t,e),l?c(Object.getOwnPropertyNames(t),function(i){i in q||n[i]||b(t,i,e)}):c(Object.keys(t),function(i){i in q||n[i]||(e[i]=t[i])}),e.prototype=t.prototype,k(t.prototype,"constructor",e)},Ot=function(){return this},At=function(t){l&&!B(t,Y)&&y(t,Y,Ot)},Ct=function(t,e){var n=e||function(){return this};p(t,lt,n),!t[lt]&&ot(lt)&&(t[lt]=n)},Tt=function(t,e,n){if(function(t,e,n){l?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:n}):t[e]=n}(t,e,n),!ht.SameValue(t[e],n))throw new TypeError("property is nonconfigurable")},Pt=function(t,e,n,i){if(!ht.TypeIsObject(t))throw new TypeError("Constructor requires `new`: "+e.name);var r=e.prototype;ht.TypeIsObject(r)||(r=n);var o=_(r);for(var a in i)if(B(i,a)){var s=i[a];p(o,a,s,!0)}return o};if(String.fromCodePoint&&1!==String.fromCodePoint.length){var Nt=String.fromCodePoint;at(String,"fromCodePoint",function(t){return ht.Call(Nt,this,arguments)})}var It={fromCodePoint:function(t){for(var e,n=[],i=0,r=arguments.length;i<r;i++){if(e=Number(arguments[i]),!ht.SameValue(e,ht.ToInteger(e))||e<0||e>1114111)throw new RangeError("Invalid code point "+e);e<65536?N(n,String.fromCharCode(e)):(e-=65536,N(n,String.fromCharCode(55296+(e>>10))),N(n,String.fromCharCode(e%1024+56320)))}return n.join("")},raw:function(t){var e=ht.ToObject(t,"bad callSite"),n=ht.ToObject(e.raw,"bad raw value"),i=n.length,r=ht.ToLength(i);if(r<=0)return"";for(var o,a,s,l,u=[],c=0;c<r&&(o=ht.ToString(c),s=ht.ToString(n[o]),N(u,s),!(c+1>=r));)a=c+1<arguments.length?arguments[c+1]:"",l=ht.ToString(a),N(u,l),c+=1;return u.join("")}};String.raw&&"xy"!==String.raw({raw:{0:"x",1:"y",length:2}})&&at(String,"raw",It.raw),v(String,It);var Lt={repeat:function(t){var e=ht.ToString(ht.RequireObjectCoercible(this)),n=ht.ToInteger(t);if(n<0||n>=1/0)throw new RangeError("repeat count must be less than infinity and not overflow maximum string size");return function t(e,n){if(n<1)return"";if(n%2)return t(e,n-1)+e;var i=t(e,n/2);return i+i}(e,n)},startsWith:function(t){var e=ht.ToString(ht.RequireObjectCoercible(this));if(ht.IsRegExp(t))throw new TypeError('Cannot call method "startsWith" with a regex');var n,i=ht.ToString(t);arguments.length>1&&(n=arguments[1]);var r=M(ht.ToInteger(n),0);return P(e,r,r+i.length)===i},endsWith:function(t){var e=ht.ToString(ht.RequireObjectCoercible(this));if(ht.IsRegExp(t))throw new TypeError('Cannot call method "endsWith" with a regex');var n,i=ht.ToString(t),r=e.length;arguments.length>1&&(n=arguments[1]);var o=void 0===n?r:ht.ToInteger(n),a=D(M(o,0),r);return P(e,a-i.length,a)===i},includes:function(t){if(ht.IsRegExp(t))throw new TypeError('"includes" does not accept a RegExp');var e,n=ht.ToString(t);return arguments.length>1&&(e=arguments[1]),-1!==A(this,n,e)},codePointAt:function(t){var e=ht.ToString(ht.RequireObjectCoercible(this)),n=ht.ToInteger(t),i=e.length;if(n>=0&&n<i){var r=e.charCodeAt(n);if(r<55296||r>56319||n+1===i)return r;var o=e.charCodeAt(n+1);return o<56320||o>57343?r:1024*(r-55296)+(o-56320)+65536}}};if(String.prototype.includes&&!1!=="a".includes("a",1/0)&&at(String.prototype,"includes",Lt.includes),String.prototype.startsWith&&String.prototype.endsWith){var Mt=o(function(){return"/a/".startsWith(/a/)}),Dt=a(function(){return!1==="abc".startsWith("a",1/0)});Mt&&Dt||(at(String.prototype,"startsWith",Lt.startsWith),at(String.prototype,"endsWith",Lt.endsWith))}st&&(a(function(){var t=/a/;return t[G.match]=!1,"/a/".startsWith(t)})||at(String.prototype,"startsWith",Lt.startsWith),a(function(){var t=/a/;return t[G.match]=!1,"/a/".endsWith(t)})||at(String.prototype,"endsWith",Lt.endsWith),a(function(){var t=/a/;return t[G.match]=!1,"/a/".includes(t)})||at(String.prototype,"includes",Lt.includes));v(String.prototype,Lt);var jt=["\t\n\v\f\r   ᠎    ","          \u2028","\u2029\ufeff"].join(""),Rt=new RegExp("(^["+jt+"]+)|(["+jt+"]+$)","g"),Ft=function(){return ht.ToString(ht.RequireObjectCoercible(this)).replace(Rt,"")},$t=["…","​","￾"].join(""),Ht=new RegExp("["+$t+"]","g"),Bt=/^[-+]0x[0-9a-f]+$/i,qt=$t.trim().length!==$t.length;p(String.prototype,"trim",Ft,qt);var zt=function(t){return{value:t,done:0===arguments.length}},Ut=function(t){ht.RequireObjectCoercible(t),this._s=ht.ToString(t),this._i=0};Ut.prototype.next=function(){var t=this._s,e=this._i;if(void 0===t||e>=t.length)return this._s=void 0,zt();var n,i,r=t.charCodeAt(e);return i=r<55296||r>56319||e+1===t.length?1:(n=t.charCodeAt(e+1))<56320||n>57343?1:2,this._i=e+i,zt(t.substr(e,i))},Ct(Ut.prototype),Ct(String.prototype,function(){return new Ut(this)});var Vt={from:function(t){var e,i,r,o,a,s,l=this;if(arguments.length>1&&(e=arguments[1]),void 0===e)i=!1;else{if(!ht.IsCallable(e))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(r=arguments[2]),i=!0}if(void 0!==(et(t)||ht.GetMethod(t,lt))){a=ht.IsConstructor(l)?Object(new l):[];var u,c,d=ht.GetIterator(t);for(s=0;!1!==(u=ht.IteratorStep(d));){c=u.value;try{i&&(c=void 0===r?e(c,s):n(e,r,c,s)),a[s]=c}catch(t){throw ht.IteratorClose(d,!0),t}s+=1}o=s}else{var f,h=ht.ToObject(t);for(o=ht.ToLength(h.length),a=ht.IsConstructor(l)?Object(new l(o)):new Array(o),s=0;s<o;++s)f=h[s],i&&(f=void 0===r?e(f,s):n(e,r,f,s)),Tt(a,s,f)}return a.length=o,a},of:function(){for(var t=arguments.length,e=this,n=i(e)||!ht.IsCallable(e)?new Array(t):ht.Construct(e,[t]),r=0;r<t;++r)Tt(n,r,arguments[r]);return n.length=t,n}};v(Array,Vt),At(Array),v((t=function(t,e){this.i=0,this.array=t,this.kind=e}).prototype,{next:function(){var e=this.i,n=this.array;if(!(this instanceof t))throw new TypeError("Not an ArrayIterator");if(void 0!==n)for(var i=ht.ToLength(n.length);e<i;e++){var r,o=this.kind;return"key"===o?r=e:"value"===o?r=n[e]:"entry"===o&&(r=[e,n[e]]),this.i=e+1,zt(r)}return this.array=void 0,zt()}}),Ct(t.prototype),Array.of===Vt.of||function(){var t=function(t){this.length=t};t.prototype=[];var e=Array.of.apply(t,[1,2]);return e instanceof t&&2===e.length}()||at(Array,"of",Vt.of);var Kt={copyWithin:function(t,e){var n,i=ht.ToObject(this),r=ht.ToLength(i.length),o=ht.ToInteger(t),a=ht.ToInteger(e),s=o<0?M(r+o,0):D(o,r),l=a<0?M(r+a,0):D(a,r);arguments.length>2&&(n=arguments[2]);var u=void 0===n?r:ht.ToInteger(n),c=u<0?M(r+u,0):D(u,r),d=D(c-l,r-s),f=1;for(l<s&&s<l+d&&(f=-1,l+=d-1,s+=d-1);d>0;)l in i?i[s]=i[l]:delete i[s],l+=f,s+=f,d-=1;return i},fill:function(t){var e,n;arguments.length>1&&(e=arguments[1]),arguments.length>2&&(n=arguments[2]);var i=ht.ToObject(this),r=ht.ToLength(i.length);e=ht.ToInteger(void 0===e?0:e);for(var o=(n=ht.ToInteger(void 0===n?r:n))<0?r+n:n,a=e<0?M(r+e,0):D(e,r);a<r&&a<o;++a)i[a]=t;return i},find:function(t){var e=ht.ToObject(this),i=ht.ToLength(e.length);if(!ht.IsCallable(t))throw new TypeError("Array#find: predicate must be a function");for(var r,o=arguments.length>1?arguments[1]:null,a=0;a<i;a++)if(r=e[a],o){if(n(t,o,r,a,e))return r}else if(t(r,a,e))return r},findIndex:function(t){var e=ht.ToObject(this),i=ht.ToLength(e.length);if(!ht.IsCallable(t))throw new TypeError("Array#findIndex: predicate must be a function");for(var r=arguments.length>1?arguments[1]:null,o=0;o<i;o++)if(r){if(n(t,r,e[o],o,e))return o}else if(t(e[o],o,e))return o;return-1},keys:function(){return new t(this,"key")},values:function(){return new t(this,"value")},entries:function(){return new t(this,"entry")}};if(Array.prototype.keys&&!ht.IsCallable([1].keys().next)&&delete Array.prototype.keys,Array.prototype.entries&&!ht.IsCallable([1].entries().next)&&delete Array.prototype.entries,Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[lt]&&(v(Array.prototype,{values:Array.prototype[lt]}),ot(G.unscopables)&&(Array.prototype[G.unscopables].values=!0)),u&&Array.prototype.values&&"values"!==Array.prototype.values.name){var Wt=Array.prototype.values;at(Array.prototype,"values",function(){return ht.Call(Wt,this,arguments)}),p(Array.prototype,lt,Array.prototype.values,!0)}v(Array.prototype,Kt),1/[!0].indexOf(!0,-0)<0&&p(Array.prototype,"indexOf",function(t){var e=C(this,arguments);return 0===e&&1/e<0?0:e},!0),Ct(Array.prototype,function(){return this.values()}),Object.getPrototypeOf&&Ct(Object.getPrototypeOf([].values()));var Gt=a(function(){return 0===Array.from({length:-1}).length}),Yt=function(){var t=Array.from([0].entries());return 1===t.length&&i(t[0])&&0===t[0][0]&&0===t[0][1]}();if(Gt&&Yt||at(Array,"from",Vt.from),!a(function(){return Array.from([0],void 0)})){var Zt=Array.from;at(Array,"from",function(t){return arguments.length>1&&void 0!==arguments[1]?ht.Call(Zt,this,arguments):n(Zt,this,t)})}var Xt=-(Math.pow(2,32)-1),Qt=function(t,e){var i={length:Xt};return i[e?(i.length>>>0)-1:0]=!0,a(function(){return n(t,i,function(){throw new RangeError("should not reach here")},[]),!0})};if(!Qt(Array.prototype.forEach)){var Jt=Array.prototype.forEach;at(Array.prototype,"forEach",function(t){return ht.Call(Jt,this.length>=0?this:[],arguments)})}if(!Qt(Array.prototype.map)){var te=Array.prototype.map;at(Array.prototype,"map",function(t){return ht.Call(te,this.length>=0?this:[],arguments)})}if(!Qt(Array.prototype.filter)){var ee=Array.prototype.filter;at(Array.prototype,"filter",function(t){return ht.Call(ee,this.length>=0?this:[],arguments)})}if(!Qt(Array.prototype.some)){var ne=Array.prototype.some;at(Array.prototype,"some",function(t){return ht.Call(ne,this.length>=0?this:[],arguments)})}if(!Qt(Array.prototype.every)){var ie=Array.prototype.every;at(Array.prototype,"every",function(t){return ht.Call(ie,this.length>=0?this:[],arguments)})}if(!Qt(Array.prototype.reduce)){var re=Array.prototype.reduce;at(Array.prototype,"reduce",function(t){return ht.Call(re,this.length>=0?this:[],arguments)})}if(!Qt(Array.prototype.reduceRight,!0)){var oe=Array.prototype.reduceRight;at(Array.prototype,"reduceRight",function(t){return ht.Call(oe,this.length>=0?this:[],arguments)})}var ae=8!==Number("0o10"),se=2!==Number("0b10"),le=h($t,function(t){return 0===Number(t+0+t)});if(ae||se||le){var ue=Number,ce=/^0b[01]+$/i,de=/^0o[0-7]+$/i,fe=ce.test.bind(ce),he=de.test.bind(de),pe=Ht.test.bind(Ht),ve=Bt.test.bind(Bt),me=function(){var t=function(e){var n;"string"==typeof(n=arguments.length>0?nt(e)?e:function(t){var e;if("function"==typeof t.valueOf&&(e=t.valueOf(),nt(e)))return e;if("function"==typeof t.toString&&(e=t.toString(),nt(e)))return e;throw new TypeError("No default value")}(e):0)&&(n=ht.Call(Ft,n),fe(n)?n=parseInt(P(n,2),2):he(n)?n=parseInt(P(n,2),8):(pe(n)||ve(n))&&(n=NaN));var i=this,r=a(function(){return ue.prototype.valueOf.call(i),!0});return i instanceof t&&!r?new ue(n):ue(n)};return t}();St(ue,me,{}),v(me,{NaN:ue.NaN,MAX_VALUE:ue.MAX_VALUE,MIN_VALUE:ue.MIN_VALUE,NEGATIVE_INFINITY:ue.NEGATIVE_INFINITY,POSITIVE_INFINITY:ue.POSITIVE_INFINITY}),Number=me,k(S,"Number",me)}var ge=Math.pow(2,53)-1;v(Number,{MAX_SAFE_INTEGER:ge,MIN_SAFE_INTEGER:-ge,EPSILON:2.220446049250313e-16,parseInt:S.parseInt,parseFloat:S.parseFloat,isFinite:X,isInteger:function(t){return X(t)&&ht.ToInteger(t)===t},isSafeInteger:function(t){return Number.isInteger(t)&&R(t)<=Number.MAX_SAFE_INTEGER},isNaN:Z}),p(Number,"parseInt",S.parseInt,Number.parseInt!==S.parseInt),1===[,1].find(function(){return!0})&&at(Array.prototype,"find",Kt.find),0!==[,1].findIndex(function(){return!0})&&at(Array.prototype,"findIndex",Kt.findIndex);var ye=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable),be=function(t,e){l&&ye(t,e)&&Object.defineProperty(t,e,{enumerable:!1})},ke=function(){for(var t=Number(this),e=arguments.length,n=e-t,i=new Array(n<0?0:n),r=t;r<e;++r)i[r-t]=arguments[r];return i},we=function(t){return function(e,n){return e[n]=t[n],e}},xe=function(t,e){var n,i=r(Object(e));return ht.IsCallable(Object.getOwnPropertySymbols)&&(n=f(Object.getOwnPropertySymbols(Object(e)),ye(e))),d(T(i,n||[]),we(e),t)},_e={assign:function(t,e){var n=ht.ToObject(t,"Cannot convert undefined or null to object");return d(ht.Call(ke,1,arguments),xe,n)},is:function(t,e){return ht.SameValue(t,e)}};if(Object.assign&&Object.preventExtensions&&function(){var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch(e){return"y"===t[1]}}()&&at(Object,"assign",_e.assign),v(Object,_e),l){var Ee={setPrototypeOf:function(t,e){var i,r=function(t,e){return function(t,e){if(!ht.TypeIsObject(t))throw new TypeError("cannot set prototype on a non-object");if(null!==e&&!ht.TypeIsObject(e))throw new TypeError("can only set prototype to an object or null"+e)}(t,e),n(i,t,e),t};try{i=t.getOwnPropertyDescriptor(t.prototype,e).set,n(i,{},null)}catch(n){if(t.prototype!=={}[e])return;i=function(t){this[e]=t},r.polyfill=r(r({},null),t.prototype)instanceof t}return r}(Object,"__proto__")};v(Object,Ee)}if(Object.setPrototypeOf&&Object.getPrototypeOf&&null!==Object.getPrototypeOf(Object.setPrototypeOf({},null))&&null===Object.getPrototypeOf(Object.create(null))&&function(){var t=Object.create(null),e=Object.getPrototypeOf,n=Object.setPrototypeOf;Object.getPrototypeOf=function(n){var i=e(n);return i===t?null:i},Object.setPrototypeOf=function(e,i){return n(e,null===i?t:i)},Object.setPrototypeOf.polyfill=!1}(),!!o(function(){return Object.keys("foo")})){var Se=Object.keys;at(Object,"keys",function(t){return Se(ht.ToObject(t))}),r=Object.keys}if(o(function(){return Object.keys(/a/g)})){var Oe=Object.keys;at(Object,"keys",function(t){if(rt(t)){var e=[];for(var n in t)B(t,n)&&N(e,n);return e}return Oe(t)}),r=Object.keys}if(Object.getOwnPropertyNames&&!!o(function(){return Object.getOwnPropertyNames("foo")})){var Ae="object"==typeof window?Object.getOwnPropertyNames(window):[],Ce=Object.getOwnPropertyNames;at(Object,"getOwnPropertyNames",function(t){var e=ht.ToObject(t);if("[object Window]"===m(e))try{return Ce(e)}catch(t){return T([],Ae)}return Ce(e)})}if(Object.getOwnPropertyDescriptor&&!!o(function(){return Object.getOwnPropertyDescriptor("foo","bar")})){var Te=Object.getOwnPropertyDescriptor;at(Object,"getOwnPropertyDescriptor",function(t,e){return Te(ht.ToObject(t),e)})}if(Object.seal&&!!o(function(){return Object.seal("foo")})){var Pe=Object.seal;at(Object,"seal",function(t){return ht.TypeIsObject(t)?Pe(t):t})}if(Object.isSealed&&!!o(function(){return Object.isSealed("foo")})){var Ne=Object.isSealed;at(Object,"isSealed",function(t){return!ht.TypeIsObject(t)||Ne(t)})}if(Object.freeze&&!!o(function(){return Object.freeze("foo")})){var Ie=Object.freeze;at(Object,"freeze",function(t){return ht.TypeIsObject(t)?Ie(t):t})}if(Object.isFrozen&&!!o(function(){return Object.isFrozen("foo")})){var Le=Object.isFrozen;at(Object,"isFrozen",function(t){return!ht.TypeIsObject(t)||Le(t)})}if(Object.preventExtensions&&!!o(function(){return Object.preventExtensions("foo")})){var Me=Object.preventExtensions;at(Object,"preventExtensions",function(t){return ht.TypeIsObject(t)?Me(t):t})}if(Object.isExtensible&&!!o(function(){return Object.isExtensible("foo")})){var De=Object.isExtensible;at(Object,"isExtensible",function(t){return!!ht.TypeIsObject(t)&&De(t)})}if(Object.getPrototypeOf&&!!o(function(){return Object.getPrototypeOf("foo")})){var je=Object.getPrototypeOf;at(Object,"getPrototypeOf",function(t){return je(ht.ToObject(t))})}var Re=l&&function(){var t=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags");return t&&ht.IsCallable(t.get)}();if(l&&!Re){y(RegExp.prototype,"flags",function(){if(!ht.TypeIsObject(this))throw new TypeError("Method called on incompatible type: must be an object.");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t})}var Fe=l&&a(function(){return"/a/i"===String(new RegExp(/a/g,"i"))}),$e=st&&l&&function(){var t=/./;return t[G.match]=!1,RegExp(t)===t}(),He=a(function(){return"/abc/"===RegExp.prototype.toString.call({source:"abc"})}),Be=He&&a(function(){return"/a/b"===RegExp.prototype.toString.call({source:"a",flags:"b"})});if(!He||!Be){var qe=RegExp.prototype.toString;p(RegExp.prototype,"toString",function(){var t=ht.RequireObjectCoercible(this);return rt(t)?n(qe,t):"/"+ct(t.source)+"/"+ct(t.flags)},!0),x(RegExp.prototype.toString,qe)}if(l&&(!Fe||$e)){var ze=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags").get,Ue=Object.getOwnPropertyDescriptor(RegExp.prototype,"source")||{},Ve=ht.IsCallable(Ue.get)?Ue.get:function(){return this.source},Ke=RegExp,We=function t(e,n){var i=ht.IsRegExp(e);return this instanceof t||!i||void 0!==n||e.constructor!==t?rt(e)?new t(ht.Call(Ve,e),void 0===n?ht.Call(ze,e):n):(i&&(e.source,void 0===n&&e.flags),new Ke(e,n)):e};St(Ke,We,{$input:!0}),RegExp=We,k(S,"RegExp",We)}if(l){var Ge={input:"$_",lastMatch:"$&",lastParen:"$+",leftContext:"$`",rightContext:"$'"};c(r(Ge),function(t){t in RegExp&&!(Ge[t]in RegExp)&&y(RegExp,Ge[t],function(){return RegExp[t]})})}At(RegExp);var Ye=1/Number.EPSILON,Ze=Math.pow(2,-23),Xe=Math.pow(2,127)*(2-Ze),Qe=Math.pow(2,-126),Je=Math.E,tn=Math.LOG2E,en=Math.LOG10E,nn=Number.prototype.clz;delete Number.prototype.clz;var rn={acosh:function(t){var e=Number(t);if(Z(e)||t<1)return NaN;if(1===e)return 0;if(e===1/0)return e;var n=1/(e*e);if(e<2)return J(e-1+H(1-n)*e);var i=e/2;return J(i+H(1-n)*i-1)+1/tn},asinh:function(t){var e=Number(t);if(0===e||!O(e))return e;var n=R(e),i=n*n,r=Q(e);return n<1?r*J(n+i/(H(i+1)+1)):r*(J(n/2+H(1+1/i)*n/2-1)+1/tn)},atanh:function(t){var e=Number(t);if(0===e)return e;if(-1===e)return-1/0;if(1===e)return 1/0;if(Z(e)||e<-1||e>1)return NaN;var n=R(e);return Q(e)*J(2*n/(1-n))/2},cbrt:function(t){var e=Number(t);if(0===e)return e;var n,i=e<0;return i&&(e=-e),n=e===1/0?1/0:(e/((n=F($(e)/3))*n)+2*n)/3,i?-n:n},clz32:function(t){var e=Number(t),n=ht.ToUint32(e);return 0===n?32:nn?ht.Call(nn,n):31-j($(n+.5)*tn)},cosh:function(t){var e=Number(t);if(0===e)return 1;if(Z(e))return NaN;if(!O(e))return 1/0;var n=F(R(e)-1);return(n+1/(n*Je*Je))*(Je/2)},expm1:function(t){var e=Number(t);if(e===-1/0)return-1;if(!O(e)||0===e)return e;if(R(e)>.5)return F(e)-1;for(var n=e,i=0,r=1;i+n!==i;)i+=n,n*=e/(r+=1);return i},hypot:function(t,e){for(var n=0,i=0,r=0;r<arguments.length;++r){var o=R(Number(arguments[r]));i<o?(n*=i/o*(i/o),n+=1,i=o):n+=o>0?o/i*(o/i):o}return i===1/0?1/0:i*H(n)},log2:function(t){return $(t)*tn},log10:function(t){return $(t)*en},log1p:J,sign:Q,sinh:function(t){var e=Number(t);if(!O(e)||0===e)return e;var n=R(e);if(n<1){var i=Math.expm1(n);return Q(e)*i*(1+1/(i+1))/2}var r=F(n-1);return Q(e)*(r-1/(r*Je*Je))*(Je/2)},tanh:function(t){var e=Number(t);return Z(e)||0===e?e:e>=20?1:e<=-20?-1:(Math.expm1(e)-Math.expm1(-e))/(F(e)+F(-e))},trunc:function(t){var e=Number(t);return e<0?-j(-e):j(e)},imul:function(t,e){var n=ht.ToUint32(t),i=ht.ToUint32(e),r=65535&n,o=65535&i;return r*o+((n>>>16&65535)*o+r*(i>>>16&65535)<<16>>>0)|0},fround:function(t){var e=Number(t);if(0===e||e===1/0||e===-1/0||Z(e))return e;var n=Q(e),i=R(e);if(i<Qe)return n*function(t){return t+Ye-Ye}(i/Qe/Ze)*Qe*Ze;var r=(1+Ze/Number.EPSILON)*i,o=r-(r-i);return o>Xe||Z(o)?n*(1/0):n*o}},on=function(t,e,n){return R(1-t/e)/Number.EPSILON<(n||8)};v(Math,rn),p(Math,"sinh",rn.sinh,Math.sinh(710)===1/0),p(Math,"cosh",rn.cosh,Math.cosh(710)===1/0),p(Math,"log1p",rn.log1p,-1e-17!==Math.log1p(-1e-17)),p(Math,"asinh",rn.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7)),p(Math,"asinh",rn.asinh,Math.asinh(1e300)===1/0),p(Math,"atanh",rn.atanh,0===Math.atanh(1e-300)),p(Math,"tanh",rn.tanh,-2e-17!==Math.tanh(-2e-17)),p(Math,"acosh",rn.acosh,Math.acosh(Number.MAX_VALUE)===1/0),p(Math,"acosh",rn.acosh,!on(Math.acosh(1+Number.EPSILON),Math.sqrt(2*Number.EPSILON))),p(Math,"cbrt",rn.cbrt,!on(Math.cbrt(1e-300),1e-100)),p(Math,"sinh",rn.sinh,-2e-17!==Math.sinh(-2e-17));var an=Math.expm1(10);p(Math,"expm1",rn.expm1,an>22025.465794806718||an<22025.465794806718);var sn=Math.round,ln=0===Math.round(.5-Number.EPSILON/4)&&1===Math.round(Number.EPSILON/3.99-.5),un=[Ye+1,2*Ye-1].every(function(t){return Math.round(t)===t});p(Math,"round",function(t){var e=j(t);return t-e<.5?e:-1===e?-0:e+1},!ln||!un),x(Math.round,sn);var cn=Math.imul;-5!==Math.imul(4294967295,5)&&(Math.imul=rn.imul,x(Math.imul,cn)),2!==Math.imul.length&&at(Math,"imul",function(t,e){return ht.Call(cn,Math,arguments)});var dn=function(){var t=S.setTimeout;if("function"==typeof t||"object"==typeof t){ht.IsPromise=function(t){return!!ht.TypeIsObject(t)&&void 0!==t._promise};var e,i=function(t){if(!ht.IsConstructor(t))throw new TypeError("Bad promise constructor");var e=this;if(e.resolve=void 0,e.reject=void 0,e.promise=new t(function(t,n){if(void 0!==e.resolve||void 0!==e.reject)throw new TypeError("Bad Promise implementation!");e.resolve=t,e.reject=n}),!ht.IsCallable(e.resolve)||!ht.IsCallable(e.reject))throw new TypeError("Bad promise constructor")};"undefined"!=typeof window&&ht.IsCallable(window.postMessage)&&(e=function(){var t=[],e="zero-timeout-message";return window.addEventListener("message",function(n){if(n.source===window&&n.data===e){if(n.stopPropagation(),0===t.length)return;L(t)()}},!0),function(n){N(t,n),window.postMessage(e,"*")}});var r,o,a=ht.IsCallable(S.setImmediate)?S.setImmediate:"object"==typeof process&&process.nextTick?process.nextTick:function(){var t=S.Promise,e=t&&t.resolve&&t.resolve();return e&&function(t){return e.then(t)}}()||(ht.IsCallable(e)?e():function(e){t(e,0)}),s=function(t){return t},l=function(t){throw t},u={},c=function(t,e,n){a(function(){d(t,e,n)})},d=function(t,e,n){var i,r;if(e===u)return t(n);try{i=t(n),r=e.resolve}catch(t){i=t,r=e.reject}r(i)},f=function(t,e){var n=t._promise,i=n.reactionLength;if(i>0&&(c(n.fulfillReactionHandler0,n.reactionCapability0,e),n.fulfillReactionHandler0=void 0,n.rejectReactions0=void 0,n.reactionCapability0=void 0,i>1))for(var r=1,o=0;r<i;r++,o+=3)c(n[o+0],n[o+2],e),t[o+0]=void 0,t[o+1]=void 0,t[o+2]=void 0;n.result=e,n.state=1,n.reactionLength=0},h=function(t,e){var n=t._promise,i=n.reactionLength;if(i>0&&(c(n.rejectReactionHandler0,n.reactionCapability0,e),n.fulfillReactionHandler0=void 0,n.rejectReactions0=void 0,n.reactionCapability0=void 0,i>1))for(var r=1,o=0;r<i;r++,o+=3)c(n[o+1],n[o+2],e),t[o+0]=void 0,t[o+1]=void 0,t[o+2]=void 0;n.result=e,n.state=2,n.reactionLength=0},p=function(t){var e=!1;return{resolve:function(n){var i;if(!e){if(e=!0,n===t)return h(t,new TypeError("Self resolution"));if(!ht.TypeIsObject(n))return f(t,n);try{i=n.then}catch(e){return h(t,e)}if(!ht.IsCallable(i))return f(t,n);a(function(){g(t,n,i)})}},reject:function(n){if(!e)return e=!0,h(t,n)}}},m=function(t,e,i,r){t===o?n(t,e,i,r,u):n(t,e,i,r)},g=function(t,e,n){var i=p(t),r=i.resolve,o=i.reject;try{m(n,e,r,o)}catch(t){o(t)}},y=function(){var t=function(e){if(!(this instanceof t))throw new TypeError('Constructor Promise requires "new"');if(this&&this._promise)throw new TypeError("Bad construction");if(!ht.IsCallable(e))throw new TypeError("not a valid resolver");var n=Pt(this,t,r,{_promise:{result:void 0,state:0,reactionLength:0,fulfillReactionHandler0:void 0,rejectReactionHandler0:void 0,reactionCapability0:void 0}}),i=p(n),o=i.reject;try{e(i.resolve,o)}catch(t){o(t)}return n};return t}();r=y.prototype;var b=function(t,e,n,i){var r=!1;return function(o){r||(r=!0,e[t]=o,0==--i.count&&(0,n.resolve)(e))}};return v(y,{all:function(t){var e=this;if(!ht.TypeIsObject(e))throw new TypeError("Promise is not object");var n,r,o=new i(e);try{return function(t,e,n){for(var i,r,o=t.iterator,a=[],s={count:1},l=0;;){try{if(!1===(i=ht.IteratorStep(o))){t.done=!0;break}r=i.value}catch(e){throw t.done=!0,e}a[l]=void 0;var u=e.resolve(r),c=b(l,a,n,s);s.count+=1,m(u.then,u,c,n.reject),l+=1}0==--s.count&&(0,n.resolve)(a);return n.promise}(r={iterator:n=ht.GetIterator(t),done:!1},e,o)}catch(t){var a=t;if(r&&!r.done)try{ht.IteratorClose(n,!0)}catch(t){a=t}return(0,o.reject)(a),o.promise}},race:function(t){var e=this;if(!ht.TypeIsObject(e))throw new TypeError("Promise is not object");var n,r,o=new i(e);try{return function(t,e,n){for(var i,r,o,a=t.iterator;;){try{if(!1===(i=ht.IteratorStep(a))){t.done=!0;break}r=i.value}catch(e){throw t.done=!0,e}o=e.resolve(r),m(o.then,o,n.resolve,n.reject)}return n.promise}(r={iterator:n=ht.GetIterator(t),done:!1},e,o)}catch(t){var a=t;if(r&&!r.done)try{ht.IteratorClose(n,!0)}catch(t){a=t}return(0,o.reject)(a),o.promise}},reject:function(t){if(!ht.TypeIsObject(this))throw new TypeError("Bad promise constructor");var e=new i(this);return(0,e.reject)(t),e.promise},resolve:function(t){var e=this;if(!ht.TypeIsObject(e))throw new TypeError("Bad promise constructor");if(ht.IsPromise(t)&&t.constructor===e)return t;var n=new i(e);return(0,n.resolve)(t),n.promise}}),v(r,{catch:function(t){return this.then(null,t)},then:function(t,e){var n=this;if(!ht.IsPromise(n))throw new TypeError("not a promise");var r,o=ht.SpeciesConstructor(n,y);r=arguments.length>2&&arguments[2]===u&&o===y?u:new i(o);var a,d=ht.IsCallable(t)?t:s,f=ht.IsCallable(e)?e:l,h=n._promise;if(0===h.state){if(0===h.reactionLength)h.fulfillReactionHandler0=d,h.rejectReactionHandler0=f,h.reactionCapability0=r;else{var p=3*(h.reactionLength-1);h[p+0]=d,h[p+1]=f,h[p+2]=r}h.reactionLength+=1}else if(1===h.state)a=h.result,c(d,r,a);else{if(2!==h.state)throw new TypeError("unexpected Promise state");a=h.result,c(f,r,a)}return r.promise}}),u=new i(y),o=r.then,y}}();if(S.Promise&&(delete S.Promise.accept,delete S.Promise.defer,delete S.Promise.prototype.chain),"function"==typeof dn){v(S,{Promise:dn});var fn=E(S.Promise,function(t){return t.resolve(42).then(function(){})instanceof t}),hn=!o(function(){return S.Promise.reject(42).then(null,5).then(null,q)}),pn=o(function(){return S.Promise.call(3,q)}),vn=function(t){var e=t.resolve(5);e.constructor={};var n=t.resolve(e);try{n.then(null,q).then(null,q)}catch(t){return!0}return e===n}(S.Promise),mn=l&&function(){var t=0,e=Object.defineProperty({},"then",{get:function(){t+=1}});return Promise.resolve(e),1===t}(),gn=function t(e){var n=new Promise(e);e(3,function(){}),this.then=n.then,this.constructor=t};gn.prototype=Promise.prototype,gn.all=Promise.all;var yn=a(function(){return!!gn.all([1,2])});if(fn&&hn&&pn&&!vn&&mn&&!yn||(Promise=dn,at(S,"Promise",dn)),1!==Promise.all.length){var bn=Promise.all;at(Promise,"all",function(t){return ht.Call(bn,this,arguments)})}if(1!==Promise.race.length){var kn=Promise.race;at(Promise,"race",function(t){return ht.Call(kn,this,arguments)})}if(1!==Promise.resolve.length){var wn=Promise.resolve;at(Promise,"resolve",function(t){return ht.Call(wn,this,arguments)})}if(1!==Promise.reject.length){var xn=Promise.reject;at(Promise,"reject",function(t){return ht.Call(xn,this,arguments)})}be(Promise,"all"),be(Promise,"race"),be(Promise,"resolve"),be(Promise,"reject"),At(Promise)}var _n=function(t){var e=r(d(t,function(t,e){return t[e]=!0,t},{}));return t.join(":")===e.join(":")},En=_n(["z","a","bb"]),Sn=_n(["z",1,"a","3",2]);if(l){var On=function(t,e){return e||En?ft(t)?"^"+ht.ToString(t):"string"==typeof t?"$"+t:"number"==typeof t?Sn?t:"n"+t:"boolean"==typeof t?"b"+t:null:null},An=function(){return Object.create?Object.create(null):{}},Cn=function(t,e,r){if(i(r)||it(r))c(r,function(t){if(!ht.TypeIsObject(t))throw new TypeError("Iterator value "+t+" is not an entry object");e.set(t[0],t[1])});else if(r instanceof t)n(t.prototype.forEach,r,function(t,n){e.set(n,t)});else{var o,a;if(!ft(r)){if(a=e.set,!ht.IsCallable(a))throw new TypeError("bad map");o=ht.GetIterator(r)}if(void 0!==o)for(;;){var s=ht.IteratorStep(o);if(!1===s)break;var l=s.value;try{if(!ht.TypeIsObject(l))throw new TypeError("Iterator value "+l+" is not an entry object");n(a,e,l[0],l[1])}catch(t){throw ht.IteratorClose(o,!0),t}}}},Tn=function(t,e,r){if(i(r)||it(r))c(r,function(t){e.add(t)});else if(r instanceof t)n(t.prototype.forEach,r,function(t){e.add(t)});else{var o,a;if(!ft(r)){if(a=e.add,!ht.IsCallable(a))throw new TypeError("bad set");o=ht.GetIterator(r)}if(void 0!==o)for(;;){var s=ht.IteratorStep(o);if(!1===s)break;var l=s.value;try{n(a,e,l)}catch(t){throw ht.IteratorClose(o,!0),t}}}},Pn={Map:function(){var t={},e=function(t,e){this.key=t,this.value=e,this.next=null,this.prev=null};e.prototype.isRemoved=function(){return this.key===t};var i,r=function(t,e){if(!ht.TypeIsObject(t)||!function(t){return!!t._es6map}(t))throw new TypeError("Method Map.prototype."+e+" called on incompatible receiver "+ht.ToString(t))},o=function(t,e){r(t,"[[MapIterator]]"),this.head=t._head,this.i=this.head,this.kind=e};Ct(o.prototype={isMapIterator:!0,next:function(){if(!this.isMapIterator)throw new TypeError("Not a MapIterator");var t,e=this.i,n=this.kind,i=this.head;if(void 0===this.i)return zt();for(;e.isRemoved()&&e!==i;)e=e.prev;for(;e.next!==i;)if(!(e=e.next).isRemoved())return t="key"===n?e.key:"value"===n?e.value:[e.key,e.value],this.i=e,zt(t);return this.i=void 0,zt()}});var a=function t(){if(!(this instanceof t))throw new TypeError('Constructor Map requires "new"');if(this&&this._es6map)throw new TypeError("Bad construction");var n=Pt(this,t,i,{_es6map:!0,_head:null,_map:z?new z:null,_size:0,_storage:An()}),r=new e(null,null);return r.next=r.prev=r,n._head=r,arguments.length>0&&Cn(t,n,arguments[0]),n};return y(i=a.prototype,"size",function(){if(void 0===this._size)throw new TypeError("size method called on incompatible Map");return this._size}),v(i,{get:function(t){var e;r(this,"get");var n=On(t,!0);if(null!==n)return(e=this._storage[n])?e.value:void 0;if(this._map)return(e=V.call(this._map,t))?e.value:void 0;for(var i=this._head,o=i;(o=o.next)!==i;)if(ht.SameValueZero(o.key,t))return o.value},has:function(t){r(this,"has");var e=On(t,!0);if(null!==e)return void 0!==this._storage[e];if(this._map)return K.call(this._map,t);for(var n=this._head,i=n;(i=i.next)!==n;)if(ht.SameValueZero(i.key,t))return!0;return!1},set:function(t,n){r(this,"set");var i,o=this._head,a=o,s=On(t,!0);if(null!==s){if(void 0!==this._storage[s])return this._storage[s].value=n,this;i=this._storage[s]=new e(t,n),a=o.prev}else this._map&&(K.call(this._map,t)?V.call(this._map,t).value=n:(i=new e(t,n),W.call(this._map,t,i),a=o.prev));for(;(a=a.next)!==o;)if(ht.SameValueZero(a.key,t))return a.value=n,this;return i=i||new e(t,n),ht.SameValue(-0,t)&&(i.key=0),i.next=this._head,i.prev=this._head.prev,i.prev.next=i,i.next.prev=i,this._size+=1,this},delete:function(e){r(this,"delete");var n=this._head,i=n,o=On(e,!0);if(null!==o){if(void 0===this._storage[o])return!1;i=this._storage[o].prev,delete this._storage[o]}else if(this._map){if(!K.call(this._map,e))return!1;i=V.call(this._map,e).prev,U.call(this._map,e)}for(;(i=i.next)!==n;)if(ht.SameValueZero(i.key,e))return i.key=t,i.value=t,i.prev.next=i.next,i.next.prev=i.prev,this._size-=1,!0;return!1},clear:function(){r(this,"clear"),this._map=z?new z:null,this._size=0,this._storage=An();for(var e=this._head,n=e,i=n.next;(n=i)!==e;)n.key=t,n.value=t,i=n.next,n.next=n.prev=e;e.next=e.prev=e},keys:function(){return r(this,"keys"),new o(this,"key")},values:function(){return r(this,"values"),new o(this,"value")},entries:function(){return r(this,"entries"),new o(this,"key+value")},forEach:function(t){r(this,"forEach");for(var e=arguments.length>1?arguments[1]:null,i=this.entries(),o=i.next();!o.done;o=i.next())e?n(t,e,o.value[1],o.value[0],this):t(o.value[1],o.value[0],this)}}),Ct(i,i.entries),a}(),Set:function(){var t,e=function(t,e){if(!ht.TypeIsObject(t)||!function(t){return t._es6set&&void 0!==t._storage}(t))throw new TypeError("Set.prototype."+e+" called on incompatible receiver "+ht.ToString(t))},i=function e(){if(!(this instanceof e))throw new TypeError('Constructor Set requires "new"');if(this&&this._es6set)throw new TypeError("Bad construction");var n=Pt(this,e,t,{_es6set:!0,"[[SetData]]":null,_storage:An()});if(!n._es6set)throw new TypeError("bad set");return arguments.length>0&&Tn(e,n,arguments[0]),n};t=i.prototype;var o=function(t){if(!t["[[SetData]]"]){var e=new Pn.Map;t["[[SetData]]"]=e,c(r(t._storage),function(t){var n=function(t){var e=t;if("^null"===e)return null;if("^undefined"!==e){var n=e.charAt(0);return"$"===n?P(e,1):"n"===n?+P(e,1):"b"===n?"btrue"===e:+e}}(t);e.set(n,n)}),t["[[SetData]]"]=e}t._storage=null};y(i.prototype,"size",function(){return e(this,"size"),this._storage?r(this._storage).length:(o(this),this["[[SetData]]"].size)}),v(i.prototype,{has:function(t){var n;return e(this,"has"),this._storage&&null!==(n=On(t))?!!this._storage[n]:(o(this),this["[[SetData]]"].has(t))},add:function(t){var n;return e(this,"add"),this._storage&&null!==(n=On(t))?(this._storage[n]=!0,this):(o(this),this["[[SetData]]"].set(t,t),this)},delete:function(t){var n;if(e(this,"delete"),this._storage&&null!==(n=On(t))){var i=B(this._storage,n);return delete this._storage[n]&&i}return o(this),this["[[SetData]]"].delete(t)},clear:function(){e(this,"clear"),this._storage&&(this._storage=An()),this["[[SetData]]"]&&this["[[SetData]]"].clear()},values:function(){return e(this,"values"),o(this),new a(this["[[SetData]]"].values())},entries:function(){return e(this,"entries"),o(this),new a(this["[[SetData]]"].entries())},forEach:function(t){e(this,"forEach");var i=arguments.length>1?arguments[1]:null,r=this;o(r),this["[[SetData]]"].forEach(function(e,o){i?n(t,i,o,o,r):t(o,o,r)})}}),p(i.prototype,"keys",i.prototype.values,!0),Ct(i.prototype,i.prototype.values);var a=function(t){this.it=t};return a.prototype={isSetIterator:!0,next:function(){if(!this.isSetIterator)throw new TypeError("Not a SetIterator");return this.it.next()}},Ct(a.prototype),i}()};if(S.Set&&!Set.prototype.delete&&Set.prototype.remove&&Set.prototype.items&&Set.prototype.map&&Array.isArray((new Set).keys)&&(S.Set=Pn.Set),S.Map||S.Set){a(function(){return 2===new Map([[1,2]]).get(1)})||(S.Map=function t(){if(!(this instanceof t))throw new TypeError('Constructor Map requires "new"');var e=new z;return arguments.length>0&&Cn(t,e,arguments[0]),delete e.constructor,Object.setPrototypeOf(e,S.Map.prototype),e},S.Map.prototype=_(z.prototype),p(S.Map.prototype,"constructor",S.Map,!0),x(S.Map,z));var Nn=new Map,In=function(){var t=new Map([[1,0],[2,0],[3,0],[4,0]]);return t.set(-0,t),t.get(0)===t&&t.get(-0)===t&&t.has(0)&&t.has(-0)}(),Ln=Nn.set(1,2)===Nn;In&&Ln||at(Map.prototype,"set",function(t,e){return n(W,this,0===t?0:t,e),this}),In||(v(Map.prototype,{get:function(t){return n(V,this,0===t?0:t)},has:function(t){return n(K,this,0===t?0:t)}},!0),x(Map.prototype.get,V),x(Map.prototype.has,K));var Mn=new Set,Dn=Set.prototype.delete&&Set.prototype.add&&Set.prototype.has&&function(t){return t.delete(0),t.add(-0),!t.has(0)}(Mn),jn=Mn.add(1)===Mn;if(!Dn||!jn){var Rn=Set.prototype.add;Set.prototype.add=function(t){return n(Rn,this,0===t?0:t),this},x(Set.prototype.add,Rn)}if(!Dn){var Fn=Set.prototype.has;Set.prototype.has=function(t){return n(Fn,this,0===t?0:t)},x(Set.prototype.has,Fn);var $n=Set.prototype.delete;Set.prototype.delete=function(t){return n($n,this,0===t?0:t)},x(Set.prototype.delete,$n)}var Hn=E(S.Map,function(t){var e=new t([]);return e.set(42,42),e instanceof t}),Bn=Object.setPrototypeOf&&!Hn,qn=function(){try{return!(S.Map()instanceof S.Map)}catch(t){return t instanceof TypeError}}();0===S.Map.length&&!Bn&&qn||(S.Map=function t(){if(!(this instanceof t))throw new TypeError('Constructor Map requires "new"');var e=new z;return arguments.length>0&&Cn(t,e,arguments[0]),delete e.constructor,Object.setPrototypeOf(e,t.prototype),e},S.Map.prototype=z.prototype,p(S.Map.prototype,"constructor",S.Map,!0),x(S.Map,z));var zn=E(S.Set,function(t){var e=new t([]);return e.add(42,42),e instanceof t}),Un=Object.setPrototypeOf&&!zn,Vn=function(){try{return!(S.Set()instanceof S.Set)}catch(t){return t instanceof TypeError}}();if(0!==S.Set.length||Un||!Vn){var Kn=S.Set;S.Set=function t(){if(!(this instanceof t))throw new TypeError('Constructor Set requires "new"');var e=new Kn;return arguments.length>0&&Tn(t,e,arguments[0]),delete e.constructor,Object.setPrototypeOf(e,t.prototype),e},S.Set.prototype=Kn.prototype,p(S.Set.prototype,"constructor",S.Set,!0),x(S.Set,Kn)}var Wn=new S.Map,Gn=!a(function(){return Wn.keys().next().done});if(("function"!=typeof S.Map.prototype.clear||0!==(new S.Set).size||0!==Wn.size||"function"!=typeof S.Map.prototype.keys||"function"!=typeof S.Set.prototype.keys||"function"!=typeof S.Map.prototype.forEach||"function"!=typeof S.Set.prototype.forEach||s(S.Map)||s(S.Set)||"function"!=typeof Wn.keys().next||Gn||!Hn)&&v(S,{Map:Pn.Map,Set:Pn.Set},!0),S.Set.prototype.keys!==S.Set.prototype.values&&p(S.Set.prototype,"keys",S.Set.prototype.values,!0),Ct(Object.getPrototypeOf((new S.Map).keys())),Ct(Object.getPrototypeOf((new S.Set).keys())),u&&"has"!==S.Set.prototype.has.name){var Yn=S.Set.prototype.has;at(S.Set.prototype,"has",function(t){return n(Yn,this,t)})}}v(S,Pn),At(S.Map),At(S.Set)}var Zn=function(t){if(!ht.TypeIsObject(t))throw new TypeError("target must be an object")},Xn={apply:function(){return ht.Call(ht.Call,null,arguments)},construct:function(t,e){if(!ht.IsConstructor(t))throw new TypeError("First argument must be a constructor.");var n=arguments.length>2?arguments[2]:t;if(!ht.IsConstructor(n))throw new TypeError("new.target must be a constructor.");return ht.Construct(t,e,n,"internal")},deleteProperty:function(t,e){if(Zn(t),l){var n=Object.getOwnPropertyDescriptor(t,e);if(n&&!n.configurable)return!1}return delete t[e]},has:function(t,e){return Zn(t),e in t}};Object.getOwnPropertyNames&&Object.assign(Xn,{ownKeys:function(t){Zn(t);var e=Object.getOwnPropertyNames(t);return ht.IsCallable(Object.getOwnPropertySymbols)&&I(e,Object.getOwnPropertySymbols(t)),e}});var Qn=function(t){return!o(t)};if(Object.preventExtensions&&Object.assign(Xn,{isExtensible:function(t){return Zn(t),Object.isExtensible(t)},preventExtensions:function(t){return Zn(t),Qn(function(){return Object.preventExtensions(t)})}}),l){var Jn=function(t,e,n){var i=Object.getOwnPropertyDescriptor(t,e);if(!i){var r=Object.getPrototypeOf(t);if(null===r)return;return Jn(r,e,n)}return"value"in i?i.value:i.get?ht.Call(i.get,n):void 0},ti=function(t,e,i,r){var o=Object.getOwnPropertyDescriptor(t,e);if(!o){var a=Object.getPrototypeOf(t);if(null!==a)return ti(a,e,i,r);o={value:void 0,writable:!0,enumerable:!0,configurable:!0}}return"value"in o?!!o.writable&&(!!ht.TypeIsObject(r)&&(Object.getOwnPropertyDescriptor(r,e)?ut.defineProperty(r,e,{value:i}):ut.defineProperty(r,e,{value:i,writable:!0,enumerable:!0,configurable:!0}))):!!o.set&&(n(o.set,r,i),!0)};Object.assign(Xn,{defineProperty:function(t,e,n){return Zn(t),Qn(function(){return Object.defineProperty(t,e,n)})},getOwnPropertyDescriptor:function(t,e){return Zn(t),Object.getOwnPropertyDescriptor(t,e)},get:function(t,e){Zn(t);var n=arguments.length>2?arguments[2]:t;return Jn(t,e,n)},set:function(t,e,n){Zn(t);var i=arguments.length>3?arguments[3]:t;return ti(t,e,n,i)}})}if(Object.getPrototypeOf){var ei=Object.getPrototypeOf;Xn.getPrototypeOf=function(t){return Zn(t),ei(t)}}if(Object.setPrototypeOf&&Xn.getPrototypeOf){Object.assign(Xn,{setPrototypeOf:function(t,e){if(Zn(t),null!==e&&!ht.TypeIsObject(e))throw new TypeError("proto must be an object or null");return e===ut.getPrototypeOf(t)||!(ut.isExtensible&&!ut.isExtensible(t))&&(!function(t,e){for(var n=e;n;){if(t===n)return!0;n=Xn.getPrototypeOf(n)}return!1}(t,e)&&(Object.setPrototypeOf(t,e),!0))}})}Object.keys(Xn).forEach(function(t){!function(t,e){ht.IsCallable(S.Reflect[t])?a(function(){return S.Reflect[t](1),S.Reflect[t](NaN),S.Reflect[t](!0),!0})&&at(S.Reflect,t,e):p(S.Reflect,t,e)}(t,Xn[t])});var ni=S.Reflect.getPrototypeOf;if(u&&ni&&"getPrototypeOf"!==ni.name&&at(S.Reflect,"getPrototypeOf",function(t){return n(ni,S.Reflect,t)}),S.Reflect.setPrototypeOf&&a(function(){return S.Reflect.setPrototypeOf(1,{}),!0})&&at(S.Reflect,"setPrototypeOf",Xn.setPrototypeOf),S.Reflect.defineProperty&&(a(function(){var t=!S.Reflect.defineProperty(1,"test",{value:1}),e="function"!=typeof Object.preventExtensions||!S.Reflect.defineProperty(Object.preventExtensions({}),"test",{});return t&&e})||at(S.Reflect,"defineProperty",Xn.defineProperty)),S.Reflect.construct&&(a(function(){var t=function(){};return S.Reflect.construct(function(){},[],t)instanceof t})||at(S.Reflect,"construct",Xn.construct)),"Invalid Date"!==String(new Date(NaN))){var ii=Date.prototype.toString;at(Date.prototype,"toString",function(){var t=+this;return t!=t?"Invalid Date":ht.Call(ii,this)})}var ri={anchor:function(t){return ht.CreateHTML(this,"a","name",t)},big:function(){return ht.CreateHTML(this,"big","","")},blink:function(){return ht.CreateHTML(this,"blink","","")},bold:function(){return ht.CreateHTML(this,"b","","")},fixed:function(){return ht.CreateHTML(this,"tt","","")},fontcolor:function(t){return ht.CreateHTML(this,"font","color",t)},fontsize:function(t){return ht.CreateHTML(this,"font","size",t)},italics:function(){return ht.CreateHTML(this,"i","","")},link:function(t){return ht.CreateHTML(this,"a","href",t)},small:function(){return ht.CreateHTML(this,"small","","")},strike:function(){return ht.CreateHTML(this,"strike","","")},sub:function(){return ht.CreateHTML(this,"sub","","")},sup:function(){return ht.CreateHTML(this,"sup","","")}};c(Object.keys(ri),function(t){var e=String.prototype[t],i=!1;if(ht.IsCallable(e)){var r=n(e,"",' " '),o=T([],r.match(/"/g)).length;i=r!==r.toLowerCase()||o>2}else i=!0;i&&at(String.prototype,t,ri[t])});var oi=function(){if(!st)return!1;var t="object"==typeof JSON&&"function"==typeof JSON.stringify?JSON.stringify:null;if(!t)return!1;if(void 0!==t(G()))return!0;if("[null]"!==t([G()]))return!0;var e={a:G()};return e[G()]=!0,"{}"!==t(e)}(),ai=a(function(){return!st||"{}"===JSON.stringify(Object(G()))&&"[{}]"===JSON.stringify([Object(G())])});if(oi||!ai){var si=JSON.stringify;at(JSON,"stringify",function(t){if("symbol"!=typeof t){var e;arguments.length>1&&(e=arguments[1]);var r=[t];if(i(e))r.push(e);else{var o=ht.IsCallable(e)?e:null;r.push(function(t,e){var i=o?n(o,this,t,e):e;if("symbol"!=typeof i)return ot(i)?we({})(i):i})}return arguments.length>2&&r.push(arguments[2]),si.apply(this,r)}})}return S}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).FormValidation={})}(this,function(t){"use strict";function e(t){for(var e=t.length,n=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],i=0,r=0;e--;)r+=n[i][parseInt(t.charAt(e),10)],i=1-i;return r%10==0&&r>0}function n(t){for(var e=t.length,n=5,i=0;i<e;i++)n=(2*(n||10)%11+parseInt(t.charAt(i),10))%10;return 1===n}function i(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=t.length,i=e.length,r=Math.floor(i/2),o=0;o<n;o++)r=(2*(r||i)%(i+1)+e.indexOf(t.charAt(o)))%i;return 1===r}function r(t){for(var e=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],n=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],i=t.reverse(),r=0,o=0;o<i.length;o++)r=e[r][n[o%8][i[o]]];return 0===r}var o={luhn:e,mod11And10:n,mod37And36:i,verhoeff:r};function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function l(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?h(t):e}function v(t,e,n,i){var r=(n.getAttribute("type")||"").toLowerCase();switch(n.tagName.toLowerCase()){case"textarea":return n.value;case"select":var o=n,a=o.selectedIndex;return a>=0?o.options.item(a).value:"";case"input":if("radio"===r||"checkbox"===r){var s=i.filter(function(t){return t.checked}).length;return 0===s?"":s+""}return n.value;default:return""}}function m(t,e){var n=Array.isArray(e)?e:[e],i=t;return n.forEach(function(t){i=i.replace("%s",t)}),i}function g(t,e){if("function"==typeof t)return t.apply(this,e);if("string"==typeof t){var n=t;"()"===n.substring(n.length-2)&&(n=n.substring(0,n.length-2));var i=n.split("."),r=i.pop(),o=window,a=!0,s=!1,l=void 0;try{for(var u,c=i[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){o=o[u.value]}}catch(t){s=!0,l=t}finally{try{!a&&null!=c.return&&c.return()}finally{if(s)throw l}}return void 0===o[r]?null:o[r].apply(this,e)}}var y={AMERICAN_EXPRESS:{length:[15],prefix:["34","37"]},DANKORT:{length:[16],prefix:["5019"]},DINERS_CLUB:{length:[14],prefix:["300","301","302","303","304","305","36"]},DINERS_CLUB_US:{length:[16],prefix:["54","55"]},DISCOVER:{length:[16],prefix:["6011","622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925","644","645","646","647","648","649","65"]},ELO:{length:[16],prefix:["4011","4312","4389","4514","4573","4576","5041","5066","5067","509","6277","6362","6363","650","6516","6550"]},FORBRUGSFORENINGEN:{length:[16],prefix:["600722"]},JCB:{length:[16],prefix:["3528","3529","353","354","355","356","357","358"]},LASER:{length:[16,17,18,19],prefix:["6304","6706","6771","6709"]},MAESTRO:{length:[12,13,14,15,16,17,18,19],prefix:["5018","5020","5038","5868","6304","6759","6761","6762","6763","6764","6765","6766"]},MASTERCARD:{length:[16],prefix:["51","52","53","54","55"]},SOLO:{length:[16,18,19],prefix:["6334","6767"]},UNIONPAY:{length:[16,17,18,19],prefix:["622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925"]},VISA:{length:[16],prefix:["4"]},VISA_ELECTRON:{length:[16],prefix:["4026","417500","4405","4508","4844","4913","4917"]}};function b(t,e,n,i){if(isNaN(t)||isNaN(e)||isNaN(n))return!1;if(t<1e3||t>9999||e<=0||e>12)return!1;if(n<=0||n>[31,t%400==0||t%100!=0&&t%4==0?29:28,31,30,31,30,31,31,30,31,30,31][e-1])return!1;if(!0===i){var r=new Date,o=r.getFullYear(),a=r.getMonth(),s=r.getDate();return t<o||t===o&&e-1<a||t===o&&e-1===a&&n<s}return!0}function k(t,e){return new Promise(function(n,i){var r=Object.assign({},{crossDomain:!1,headers:{},method:"GET",params:{}},e),o=Object.keys(r.params).map(function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(r.params[t]))}).join("&"),a=t.indexOf("?"),s="GET"===r.method?"".concat(t).concat(a?"?":"&").concat(o):t;if(r.crossDomain){var l=document.createElement("script"),u="___fetch".concat(Date.now(),"___");window[u]=function(t){delete window[u],n(t)},l.src="".concat(s).concat(a?"&":"?","callback=").concat(u),l.async=!0,l.addEventListener("load",function(){l.parentNode.removeChild(l)}),l.addEventListener("error",function(){return i}),document.head.appendChild(l)}else{var c=new XMLHttpRequest;c.open(r.method,s),c.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===r.method&&c.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),Object.keys(r.headers).forEach(function(t){return c.setRequestHeader(t,r.headers[t])}),c.addEventListener("load",function(){n(JSON.parse(this.responseText))}),c.addEventListener("error",function(){return i}),c.send(function(t){return Object.keys(t).map(function(e){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t[e]))}).join("&")}(r.params))}})}function w(t,e){if(!/^\d{13}$/.test(t))return!1;var n=parseInt(t.substr(0,2),10),i=parseInt(t.substr(2,2),10),r=parseInt(t.substr(7,2),10),o=parseInt(t.substr(12,1),10);if(n>31||i>12)return!1;for(var a=0,s=0;s<6;s++)a+=(7-s)*(parseInt(t.charAt(s),10)+parseInt(t.charAt(s+6),10));if((10===(a=11-a%11)||11===a)&&(a=0),a!==o)return!1;switch(e.toUpperCase()){case"BA":return 10<=r&&r<=19;case"MK":return 41<=r&&r<=49;case"ME":return 20<=r&&r<=29;case"RS":return 70<=r&&r<=99;case"SI":return 50<=r&&r<=59;default:return!0}}function x(t){if(!/^\d{9,10}$/.test(t))return{meta:{},valid:!1};var e=1900+parseInt(t.substr(0,2),10),n=parseInt(t.substr(2,2),10)%50%20,i=parseInt(t.substr(4,2),10);if(9===t.length){if(e>=1980&&(e-=100),e>1953)return{meta:{},valid:!1}}else e<1954&&(e+=100);if(!b(e,n,i))return{meta:{},valid:!1};if(10===t.length){var r=parseInt(t.substr(0,9),10)%11;return e<1985&&(r%=10),{meta:{},valid:"".concat(r)===t.substr(9,1)}}return{meta:{},valid:!0}}function _(t){return{meta:{},valid:/^[0-9]{11}$/.test(t)&&n(t)}}function E(t){return/^[2-9]\d{11}$/.test(t)?{meta:{},valid:r(t.split("").map(function(t){return parseInt(t,10)}))}:{meta:{},valid:!1}}function S(t){return/^\d{1,9}$/.test(t)?{meta:{},valid:e(t)}:{meta:{},valid:!1}}function O(t){if(!/^[0-9]{11}$/.test(t))return{meta:{},valid:!1};var e=parseInt(t.charAt(0),10),n=parseInt(t.substr(1,2),10);if(!b(n=100*(e%2==0?17+e/2:17+(e+1)/2)+n,parseInt(t.substr(3,2),10),parseInt(t.substr(5,2),10),!0))return{meta:{},valid:!1};var i,r=[1,2,3,4,5,6,7,8,9,1],o=0;for(i=0;i<10;i++)o+=parseInt(t.charAt(i),10)*r[i];if(10!==(o%=11))return{meta:{},valid:"".concat(o)===t.charAt(10)};for(o=0,r=[3,4,5,6,7,8,9,1,2,3],i=0;i<10;i++)o+=parseInt(t.charAt(i),10)*r[i];return 10===(o%=11)&&(o=0),{meta:{},valid:"".concat(o)===t.charAt(10)}}function A(t){if(!/^[0-9]{10}$/.test(t)&&!/^[0-9]{6}[-|+][0-9]{4}$/.test(t))return{meta:{},valid:!1};var n=t.replace(/[^0-9]/g,"");return b(parseInt(n.substr(0,2),10)+1900,parseInt(n.substr(2,2),10),parseInt(n.substr(4,2),10))?{meta:{},valid:e(n)}:{meta:{},valid:!1}}function C(t){if(!/^[0-9]{10}[0|1][8|9][0-9]$/.test(t))return{meta:{},valid:!1};var n=parseInt(t.substr(0,2),10);return b(n=n>=new Date.getFullYear%100?n+1900:n+2e3,parseInt(t.substr(2,2),10),parseInt(t.substr(4,2),10))?{meta:{},valid:e(t)}:{meta:{},valid:!1}}function T(t){var e=t;return/^DE[0-9]{9}$/.test(e)&&(e=e.substr(2)),/^[0-9]{9}$/.test(e)?{meta:{},valid:n(e)}:{meta:{},valid:!1}}function P(t){var n=t;if(/^FR[0-9A-Z]{2}[0-9]{9}$/.test(n)&&(n=n.substr(2)),!/^[0-9A-Z]{2}[0-9]{9}$/.test(n))return{meta:{},valid:!1};if(!e(n.substr(2)))return{meta:{},valid:!1};if(/^[0-9]{2}$/.test(n.substr(0,2)))return{meta:{},valid:n.substr(0,2)==="".concat(parseInt(n.substr(2)+"12",10)%97)};var i,r="0123456789ABCDEFGHJKLMNPQRSTUVWXYZ";return i=/^[0-9]$/.test(n.charAt(0))?24*r.indexOf(n.charAt(0))+r.indexOf(n.charAt(1))-10:34*r.indexOf(n.charAt(0))+r.indexOf(n.charAt(1))-100,{meta:{},valid:(parseInt(n.substr(2),10)+1+Math.floor(i/11))%11==i%11}}function N(t){var e=t;if(/^(GR|EL)[0-9]{9}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{9}$/.test(e))return{meta:{},valid:!1};8===e.length&&(e="0".concat(e));for(var n=[256,128,64,32,16,8,4,2],i=0,r=0;r<8;r++)i+=parseInt(e.charAt(r),10)*n[r];return{meta:{},valid:"".concat(i=i%11%10)===e.substr(8,1)}}function I(t){var e=t;return/^HR[0-9]{11}$/.test(e)&&(e=e.substr(2)),/^[0-9]{11}$/.test(e)?{meta:{},valid:n(e)}:{meta:{},valid:!1}}function L(t){var n=t;if(/^IT[0-9]{11}$/.test(n)&&(n=n.substr(2)),!/^[0-9]{11}$/.test(n))return{meta:{},valid:!1};if(0===parseInt(n.substr(0,7),10))return{meta:{},valid:!1};var i=parseInt(n.substr(7,3),10);return i<1||i>201&&999!==i&&888!==i?{meta:{},valid:!1}:{meta:{},valid:e(n)}}function M(t){var n=t;return/^SE[0-9]{10}01$/.test(n)&&(n=n.substr(2)),/^[0-9]{10}01$/.test(n)?{meta:{},valid:e(n=n.substr(0,10))}:{meta:{},valid:!1}}var D={between:function(){var t=function(t){return parseFloat("".concat(t).replace(",","."))};return{validate:function(e){var n=e.value;if(""===n)return{valid:!0};var i=Object.assign({},{inclusive:!0,message:""},e.options),r=t(i.min),o=t(i.max);return i.inclusive?{message:m(e.l10n?i.message||e.l10n.between.default:i.message,["".concat(r),"".concat(o)]),valid:parseFloat(n)>=r&&parseFloat(n)<=o}:{message:m(e.l10n?i.message||e.l10n.between.notInclusive:i.message,["".concat(r),"".concat(o)]),valid:parseFloat(n)>r&&parseFloat(n)<o}}}},blank:function(){return{validate:function(t){return{valid:!0}}}},callback:function(){return{validate:function(t){var e=g(t.options.callback,[t]);return"boolean"==typeof e?{valid:e}:e}}},choice:function(){return{validate:function(t){var e="select"===t.element.tagName.toLowerCase()?t.element.querySelectorAll("option:checked").length:t.elements.filter(function(t){return t.checked}).length,n=t.options.min?"".concat(t.options.min):"",i=t.options.max?"".concat(t.options.max):"",r=t.l10n?t.options.message||t.l10n.choice.default:t.options.message,o=!(n&&e<parseInt(n,10)||i&&e>parseInt(i,10));switch(!0){case!!n&&!!i:r=m(t.l10n?t.l10n.choice.between:t.options.message,[n,i]);break;case!!n:r=m(t.l10n?t.l10n.choice.more:t.options.message,n);break;case!!i:r=m(t.l10n?t.l10n.choice.less:t.options.message,i)}return{message:r,valid:o}}}},creditCard:function(){return{validate:function(t){if(""===t.value)return{meta:{type:null},valid:!0};if(/[^0-9-\s]+/.test(t.value))return{meta:{type:null},valid:!1};var n=t.value.replace(/\D/g,"");if(!e(n))return{meta:{type:null},valid:!1};for(var i=0,r=Object.keys(y);i<r.length;i++){var o=r[i];for(var a in y[o].prefix)if(t.value.substr(0,y[o].prefix[a].length)===y[o].prefix[a]&&-1!==y[o].length.indexOf(n.length))return{meta:{type:o},valid:!0}}return{meta:{type:null},valid:!1}}}},date:function(){var t=function(t,e,n){var i=e.indexOf("YYYY"),r=e.indexOf("MM"),o=e.indexOf("DD");if(-1===i||-1===r||-1===o)return null;var a=t.split(" "),s=a[0].split(n);if(s.length<3)return null;var l=new Date(parseInt(s[i],10),parseInt(s[r],10)-1,parseInt(s[o],10));if(a.length>1){var u=a[1].split(":");l.setHours(u.length>0?parseInt(u[0],10):0),l.setMinutes(u.length>1?parseInt(u[1],10):0),l.setSeconds(u.length>2?parseInt(u[2],10):0)}return l},e=function(t,e){var n=e.replace(/Y/g,"y").replace(/M/g,"m").replace(/D/g,"d").replace(/:m/g,":M").replace(/:mm/g,":MM").replace(/:S/,":s").replace(/:SS/,":ss"),i=t.getDate(),r=i<10?"0".concat(i):i,o=t.getMonth()+1,a=o<10?"0".concat(o):o,s="".concat(t.getFullYear()).substr(2),l=t.getFullYear(),u=t.getHours()%12||12,c=u<10?"0".concat(u):u,d=t.getHours(),f=d<10?"0".concat(d):d,h=t.getMinutes(),p=h<10?"0".concat(h):h,v=t.getSeconds(),m=v<10?"0".concat(v):v,g={H:"".concat(d),HH:"".concat(f),M:"".concat(h),MM:"".concat(p),d:"".concat(i),dd:"".concat(r),h:"".concat(u),hh:"".concat(c),m:"".concat(o),mm:"".concat(a),s:"".concat(v),ss:"".concat(m),yy:"".concat(s),yyyy:"".concat(l)};return n.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMs])\1?|"[^"]*"|'[^']*'/g,function(t){return g[t]?g[t]:t.slice(1,t.length-1)})};return{validate:function(n){if(""===n.value)return{meta:{date:null},valid:!0};var i=Object.assign({},{format:n.element&&"date"===n.element.getAttribute("type")?"YYYY-MM-DD":"MM/DD/YYYY",message:""},n.options),r=n.l10n?n.l10n.date.default:i.message,o={message:"".concat(r),meta:{date:null},valid:!1},a=i.format.split(" "),s=a.length>1?a[1]:null,l=a.length>2?a[2]:null,u=n.value.split(" "),c=u[0],d=u.length>1?u[1]:null;if(a.length!==u.length)return o;var f=i.separator||(-1!==c.indexOf("/")?"/":-1!==c.indexOf("-")?"-":-1!==c.indexOf(".")?".":"/");if(null===f||-1===c.indexOf(f))return o;var h=c.split(f),p=a[0].split(f);if(h.length!==p.length)return o;var v=h[p.indexOf("YYYY")],g=h[p.indexOf("MM")],y=h[p.indexOf("DD")];if(!/^\d+$/.test(v)||!/^\d+$/.test(g)||!/^\d+$/.test(y)||v.length>4||g.length>2||y.length>2)return o;var k=parseInt(v,10),w=parseInt(g,10),x=parseInt(y,10);if(!b(k,w,x))return o;var _=new Date(k,w-1,x);if(s){var E=d.split(":");if(s.split(":").length!==E.length)return o;var S=E.length>0?E[0].length<=2&&/^\d+$/.test(E[0])?parseInt(E[0],10):-1:0,O=E.length>1?E[1].length<=2&&/^\d+$/.test(E[1])?parseInt(E[1],10):-1:0,A=E.length>2?E[2].length<=2&&/^\d+$/.test(E[2])?parseInt(E[2],10):-1:0;if(-1===S||-1===O||-1===A)return o;if(A<0||A>60)return o;if(S<0||S>=24||l&&S>12)return o;if(O<0||O>59)return o;_.setHours(S),_.setMinutes(O),_.setSeconds(A)}var C="function"==typeof i.min?i.min():i.min,T=C instanceof Date?C:C?t(C,p,f):_,P="function"==typeof i.max?i.max():i.max,N=P instanceof Date?P:P?t(P,p,f):_,I=C instanceof Date?e(T,i.format):C,L=P instanceof Date?e(N,i.format):P;switch(!0){case!!I&&!L:return{message:m(n.l10n?n.l10n.date.min:r,I),meta:{date:_},valid:_.getTime()>=T.getTime()};case!!L&&!I:return{message:m(n.l10n?n.l10n.date.max:r,L),meta:{date:_},valid:_.getTime()<=N.getTime()};case!!L&&!!I:return{message:m(n.l10n?n.l10n.date.range:r,[I,L]),meta:{date:_},valid:_.getTime()<=N.getTime()&&_.getTime()>=T.getTime()};default:return{message:"".concat(r),meta:{date:_},valid:!0}}}}},different:function(){return{validate:function(t){var e="function"==typeof t.options.compare?t.options.compare.call(this):t.options.compare;return{valid:""===e||t.value!==e}}}},digits:function(){return{validate:function(t){return{valid:""===t.value||/^\d+$/.test(t.value)}}}},emailAddress:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=Object.assign({},{multiple:!1,separator:/[,;]/},t.options),n=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;if(!0===e.multiple||"true"==="".concat(e.multiple)){for(var i=e.separator||/[,;]/,r=function(t,e){for(var n=t.split(/"/),i=n.length,r=[],o="",a=0;a<i;a++)if(a%2==0){var s=n[a].split(e),l=s.length;if(1===l)o+=s[0];else{r.push(o+s[0]);for(var u=1;u<l-1;u++)r.push(s[u]);o=s[l-1]}}else o+='"'+n[a],a<i-1&&(o+='"');return r.push(o),r}(t.value,i),o=r.length,a=0;a<o;a++)if(!n.test(r[a]))return{valid:!1};return{valid:!0}}return{valid:n.test(t.value)}}}},file:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e,n=t.options.extension?t.options.extension.toLowerCase().split(","):null,i=t.options.type?t.options.type.toLowerCase().split(","):null;if(window.File&&window.FileList&&window.FileReader){var r=t.element.files,o=r.length,a=0;if(t.options.maxFiles&&o>parseInt("".concat(t.options.maxFiles),10))return{meta:{error:"INVALID_MAX_FILES"},valid:!1};if(t.options.minFiles&&o<parseInt("".concat(t.options.minFiles),10))return{meta:{error:"INVALID_MIN_FILES"},valid:!1};for(var s={},l=0;l<o;l++){if(a+=r[l].size,s={ext:e=r[l].name.substr(r[l].name.lastIndexOf(".")+1),file:r[l],size:r[l].size,type:r[l].type},t.options.minSize&&r[l].size<parseInt("".concat(t.options.minSize),10))return{meta:Object.assign({},{error:"INVALID_MIN_SIZE"},s),valid:!1};if(t.options.maxSize&&r[l].size>parseInt("".concat(t.options.maxSize),10))return{meta:Object.assign({},{error:"INVALID_MAX_SIZE"},s),valid:!1};if(n&&-1===n.indexOf(e.toLowerCase()))return{meta:Object.assign({},{error:"INVALID_EXTENSION"},s),valid:!1};if(r[l].type&&i&&-1===i.indexOf(r[l].type.toLowerCase()))return{meta:Object.assign({},{error:"INVALID_TYPE"},s),valid:!1}}if(t.options.maxTotalSize&&a>parseInt("".concat(t.options.maxTotalSize),10))return{meta:Object.assign({},{error:"INVALID_MAX_TOTAL_SIZE",totalSize:a},s),valid:!1};if(t.options.minTotalSize&&a<parseInt("".concat(t.options.minTotalSize),10))return{meta:Object.assign({},{error:"INVALID_MIN_TOTAL_SIZE",totalSize:a},s),valid:!1}}else if(e=t.value.substr(t.value.lastIndexOf(".")+1),n&&-1===n.indexOf(e.toLowerCase()))return{meta:{error:"INVALID_EXTENSION",ext:e},valid:!1};return{valid:!0}}}},greaterThan:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=Object.assign({},{inclusive:!0,message:""},t.options),n=parseFloat("".concat(e.min).replace(",","."));return e.inclusive?{message:m(t.l10n?e.message||t.l10n.greaterThan.default:e.message,"".concat(n)),valid:parseFloat(t.value)>=n}:{message:m(t.l10n?e.message||t.l10n.greaterThan.notInclusive:e.message,"".concat(n)),valid:parseFloat(t.value)>n}}}},identical:function(){return{validate:function(t){var e="function"==typeof t.options.compare?t.options.compare.call(this):t.options.compare;return{valid:""===e||t.value===e}}}},integer:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=Object.assign({},{decimalSeparator:".",thousandsSeparator:""},t.options),n="."===e.decimalSeparator?"\\.":e.decimalSeparator,i="."===e.thousandsSeparator?"\\.":e.thousandsSeparator,r=new RegExp("^-?[0-9]{1,3}(".concat(i,"[0-9]{3})*(").concat(n,"[0-9]+)?$")),o=new RegExp(i,"g"),a="".concat(t.value);if(!r.test(a))return{valid:!1};i&&(a=a.replace(o,"")),n&&(a=a.replace(n,"."));var s=parseFloat(a);return{valid:!isNaN(s)&&isFinite(s)&&Math.floor(s)===s}}}},ip:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=Object.assign({},{ipv4:!0,ipv6:!0},t.options),n=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[1-2][0-9]|3[0-2]))?$/,i=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*(\/(\d|\d\d|1[0-1]\d|12[0-8]))?$/;switch(!0){case e.ipv4&&!e.ipv6:return{message:t.l10n?e.message||t.l10n.ip.ipv4:e.message,valid:n.test(t.value)};case!e.ipv4&&e.ipv6:return{message:t.l10n?e.message||t.l10n.ip.ipv6:e.message,valid:i.test(t.value)};case e.ipv4&&e.ipv6:default:return{message:t.l10n?e.message||t.l10n.ip.default:e.message,valid:n.test(t.value)||i.test(t.value)}}}}},lessThan:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=Object.assign({},{inclusive:!0,message:""},t.options),n=parseFloat("".concat(e.max).replace(",","."));return e.inclusive?{message:m(t.l10n?e.message||t.l10n.lessThan.default:e.message,"".concat(n)),valid:parseFloat(t.value)<=n}:{message:m(t.l10n?e.message||t.l10n.lessThan.notInclusive:e.message,"".concat(n)),valid:parseFloat(t.value)<n}}}},notEmpty:function(){return{validate:function(t){return{valid:""!==t.value}}}},numeric:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=Object.assign({},{decimalSeparator:".",thousandsSeparator:""},t.options),n="".concat(t.value);n.substr(0,1)===e.decimalSeparator?n="0".concat(e.decimalSeparator).concat(n.substr(1)):n.substr(0,2)==="-".concat(e.decimalSeparator)&&(n="-0".concat(e.decimalSeparator).concat(n.substr(2)));var i="."===e.decimalSeparator?"\\.":e.decimalSeparator,r="."===e.thousandsSeparator?"\\.":e.thousandsSeparator,o=new RegExp("^-?[0-9]{1,3}(".concat(r,"[0-9]{3})*(").concat(i,"[0-9]+)?$")),a=new RegExp(r,"g");if(!o.test(n))return{valid:!1};r&&(n=n.replace(a,"")),i&&(n=n.replace(i,"."));var s=parseFloat(n);return{valid:!isNaN(s)&&isFinite(s)}}}},promise:function(){return{validate:function(t){return g(t.options.promise,[t])}}},regexp:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=t.options.regexp;if(e instanceof RegExp)return{valid:e.test(t.value)};var n=e.toString();return{valid:(t.options.flags?new RegExp(n,t.options.flags):new RegExp(n)).test(t.value)}}}},remote:function(){var t={crossDomain:!1,data:{},headers:{},method:"GET",validKey:"valid"};return{validate:function(e){if(""===e.value)return Promise.resolve({valid:!0});var n=Object.assign({},t,e.options),i=n.data;return"function"==typeof n.data&&(i=n.data.call(this,e)),"string"==typeof i&&(i=JSON.parse(i)),i[n.name||e.field]=e.value,k("function"==typeof n.url?n.url.call(this,e):n.url,{crossDomain:n.crossDomain,headers:n.headers,method:n.method,params:i}).then(function(t){return Promise.resolve({message:t.message,meta:t,valid:"true"==="".concat(t[n.validKey])})}).catch(function(t){return Promise.reject({valid:!1})})}}},stringCase:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=Object.assign({},{case:"lower"},t.options),n=(e.case||"lower").toLowerCase();return{message:e.message||(t.l10n?"upper"===n?t.l10n.stringCase.upper:t.l10n.stringCase.default:e.message),valid:"upper"===n?t.value===t.value.toUpperCase():t.value===t.value.toLowerCase()}}}},stringLength:function(){return{validate:function(t){var e=Object.assign({},{message:"",trim:!1,utf8Bytes:!1},t.options),n=!0===e.trim||"true"==="".concat(e.trim)?t.value.trim():t.value;if(""===n)return{valid:!0};var i=e.min?"".concat(e.min):"",r=e.max?"".concat(e.max):"",o=e.utf8Bytes?function(t){for(var e=t.length,n=t.length-1;n>=0;n--){var i=t.charCodeAt(n);i>127&&i<=2047?e++:i>2047&&i<=65535&&(e+=2),i>=56320&&i<=57343&&n--}return"".concat(e)}(n):n.length,a=!0,s=t.l10n?e.message||t.l10n.stringLength.default:e.message;switch((i&&o<parseInt(i,10)||r&&o>parseInt(r,10))&&(a=!1),!0){case!!i&&!!r:s=m(t.l10n?e.message||t.l10n.stringLength.between:e.message,[i,r]);break;case!!i:s=m(t.l10n?e.message||t.l10n.stringLength.more:e.message,"".concat(parseInt(i,10)-1));break;case!!r:s=m(t.l10n?e.message||t.l10n.stringLength.less:e.message,"".concat(parseInt(r,10)+1))}return{message:s,valid:a}}}},uri:function(){var t={allowEmptyProtocol:!1,allowLocal:!1,protocol:"http, https, ftp"};return{validate:function(e){if(""===e.value)return{valid:!0};var n=Object.assign({},t,e.options),i=!0===n.allowLocal||"true"==="".concat(n.allowLocal),r=!0===n.allowEmptyProtocol||"true"==="".concat(n.allowEmptyProtocol),o=n.protocol.split(",").join("|").replace(/\s/g,"");return{valid:new RegExp("^(?:(?:"+o+")://)"+(r?"?":"")+"(?:\\S+(?::\\S*)?@)?(?:"+(i?"":"(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})")+"(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-?)*[a-z\\u00a1-\\uffff0-9])*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))"+(i?"?":"")+")(?::\\d{2,5})?(?:/[^\\s]*)?$","i").test(e.value)}}}},base64:function(){return{validate:function(t){return{valid:""===t.value||/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$/.test(t.value)}}}},bic:function(){return{validate:function(t){return{valid:""===t.value||/^[a-zA-Z]{6}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?$/.test(t.value)}}}},color:function(){var t=["hex","rgb","rgba","hsl","hsla","keyword"],e=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","transparent","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],n=function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},i=function(t){return/^hsl\((\s*(-?\d+)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/.test(t)},r=function(t){return/^hsla\((\s*(-?\d+)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(t)},o=function(t){return e.indexOf(t)>=0},a=function(t){return/^rgb\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){2}(\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*)\)$/.test(t)||/^rgb\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/.test(t)},s=function(t){return/^rgba\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(t)||/^rgba\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(t)};return{validate:function(e){if(""===e.value)return{valid:!0};var l="string"==typeof e.options.type?e.options.type.toString().replace(/s/g,"").split(","):e.options.type||t,u=!0,c=!1,d=void 0;try{for(var f,h=l[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var p=f.value.toLowerCase();if(-1!==t.indexOf(p)){var v=!0;switch(p){case"hex":v=n(e.value);break;case"hsl":v=i(e.value);break;case"hsla":v=r(e.value);break;case"keyword":v=o(e.value);break;case"rgb":v=a(e.value);break;case"rgba":v=s(e.value)}if(v)return{valid:!0}}}}catch(t){c=!0,d=t}finally{try{!u&&null!=h.return&&h.return()}finally{if(c)throw d}}return{valid:!1}}}},cusip:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=t.value.toUpperCase();if(!/^[0-9A-Z]{9}$/.test(e))return{valid:!1};for(var n=e.split("").map(function(t){var e=t.charCodeAt(0);return e>=65&&e<=90?e-65+10+"":t}),i=n.length,r=0,o=0;o<i-1;o++){var a=parseInt(n[o],10);o%2!=0&&(a*=2),a>9&&(a-=9),r+=a}return{valid:(r=(10-r%10)%10)===parseInt(n[i-1],10)}}}},ean:function(){return{validate:function(t){if(""===t.value)return{valid:!0};if(!/^(\d{8}|\d{12}|\d{13}|\d{14})$/.test(t.value))return{valid:!1};for(var e=t.value.length,n=0,i=8===e?[3,1]:[1,3],r=0;r<e-1;r++)n+=parseInt(t.value.charAt(r),10)*i[r%2];return{valid:"".concat(n=(10-n%10)%10)===t.value.charAt(e-1)}}}},ein:function(){var t={ANDOVER:["10","12"],ATLANTA:["60","67"],AUSTIN:["50","53"],BROOKHAVEN:["01","02","03","04","05","06","11","13","14","16","21","22","23","25","34","51","52","54","55","56","57","58","59","65"],CINCINNATI:["30","32","35","36","37","38","61"],FRESNO:["15","24"],INTERNET:["20","26","27","45","46","47"],KANSAS_CITY:["40","44"],MEMPHIS:["94","95"],OGDEN:["80","90"],PHILADELPHIA:["33","39","41","42","43","48","62","63","64","66","68","71","72","73","74","75","76","77","81","82","83","84","85","86","87","88","91","92","93","98","99"],SMALL_BUSINESS_ADMINISTRATION:["31"]};return{validate:function(e){if(""===e.value)return{meta:null,valid:!0};if(!/^[0-9]{2}-?[0-9]{7}$/.test(e.value))return{meta:null,valid:!1};var n="".concat(e.value.substr(0,2));for(var i in t)if(-1!==t[i].indexOf(n))return{meta:{campus:i},valid:!0};return{meta:null,valid:!1}}}},grid:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=t.value.toUpperCase();return/^[GRID:]*([0-9A-Z]{2})[-\s]*([0-9A-Z]{5})[-\s]*([0-9A-Z]{10})[-\s]*([0-9A-Z]{1})$/g.test(e)?("GRID:"===(e=e.replace(/\s/g,"").replace(/-/g,"")).substr(0,5)&&(e=e.substr(5)),{valid:i(e)}):{valid:!1}}}},hex:function(){return{validate:function(t){return{valid:""===t.value||/^[0-9a-fA-F]+$/.test(t.value)}}}},iban:function(){var t={AD:"AD[0-9]{2}[0-9]{4}[0-9]{4}[A-Z0-9]{12}",AE:"AE[0-9]{2}[0-9]{3}[0-9]{16}",AL:"AL[0-9]{2}[0-9]{8}[A-Z0-9]{16}",AO:"AO[0-9]{2}[0-9]{21}",AT:"AT[0-9]{2}[0-9]{5}[0-9]{11}",AZ:"AZ[0-9]{2}[A-Z]{4}[A-Z0-9]{20}",BA:"BA[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{8}[0-9]{2}",BE:"BE[0-9]{2}[0-9]{3}[0-9]{7}[0-9]{2}",BF:"BF[0-9]{2}[0-9]{23}",BG:"BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}",BH:"BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}",BI:"BI[0-9]{2}[0-9]{12}",BJ:"BJ[0-9]{2}[A-Z]{1}[0-9]{23}",BR:"BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z][A-Z0-9]",CH:"CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}",CI:"CI[0-9]{2}[A-Z]{1}[0-9]{23}",CM:"CM[0-9]{2}[0-9]{23}",CR:"CR[0-9]{2}[0-9][0-9]{3}[0-9]{14}",CV:"CV[0-9]{2}[0-9]{21}",CY:"CY[0-9]{2}[0-9]{3}[0-9]{5}[A-Z0-9]{16}",CZ:"CZ[0-9]{2}[0-9]{20}",DE:"DE[0-9]{2}[0-9]{8}[0-9]{10}",DK:"DK[0-9]{2}[0-9]{14}",DO:"DO[0-9]{2}[A-Z0-9]{4}[0-9]{20}",DZ:"DZ[0-9]{2}[0-9]{20}",EE:"EE[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{11}[0-9]{1}",ES:"ES[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{1}[0-9]{1}[0-9]{10}",FI:"FI[0-9]{2}[0-9]{6}[0-9]{7}[0-9]{1}",FO:"FO[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}",FR:"FR[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}",GB:"GB[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}",GE:"GE[0-9]{2}[A-Z]{2}[0-9]{16}",GI:"GI[0-9]{2}[A-Z]{4}[A-Z0-9]{15}",GL:"GL[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}",GR:"GR[0-9]{2}[0-9]{3}[0-9]{4}[A-Z0-9]{16}",GT:"GT[0-9]{2}[A-Z0-9]{4}[A-Z0-9]{20}",HR:"HR[0-9]{2}[0-9]{7}[0-9]{10}",HU:"HU[0-9]{2}[0-9]{3}[0-9]{4}[0-9]{1}[0-9]{15}[0-9]{1}",IE:"IE[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}",IL:"IL[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{13}",IR:"IR[0-9]{2}[0-9]{22}",IS:"IS[0-9]{2}[0-9]{4}[0-9]{2}[0-9]{6}[0-9]{10}",IT:"IT[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}",JO:"JO[0-9]{2}[A-Z]{4}[0-9]{4}[0]{8}[A-Z0-9]{10}",KW:"KW[0-9]{2}[A-Z]{4}[0-9]{22}",KZ:"KZ[0-9]{2}[0-9]{3}[A-Z0-9]{13}",LB:"LB[0-9]{2}[0-9]{4}[A-Z0-9]{20}",LI:"LI[0-9]{2}[0-9]{5}[A-Z0-9]{12}",LT:"LT[0-9]{2}[0-9]{5}[0-9]{11}",LU:"LU[0-9]{2}[0-9]{3}[A-Z0-9]{13}",LV:"LV[0-9]{2}[A-Z]{4}[A-Z0-9]{13}",MC:"MC[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}",MD:"MD[0-9]{2}[A-Z0-9]{20}",ME:"ME[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",MG:"MG[0-9]{2}[0-9]{23}",MK:"MK[0-9]{2}[0-9]{3}[A-Z0-9]{10}[0-9]{2}",ML:"ML[0-9]{2}[A-Z]{1}[0-9]{23}",MR:"MR13[0-9]{5}[0-9]{5}[0-9]{11}[0-9]{2}",MT:"MT[0-9]{2}[A-Z]{4}[0-9]{5}[A-Z0-9]{18}",MU:"MU[0-9]{2}[A-Z]{4}[0-9]{2}[0-9]{2}[0-9]{12}[0-9]{3}[A-Z]{3}",MZ:"MZ[0-9]{2}[0-9]{21}",NL:"NL[0-9]{2}[A-Z]{4}[0-9]{10}",NO:"NO[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{1}",PK:"PK[0-9]{2}[A-Z]{4}[A-Z0-9]{16}",PL:"PL[0-9]{2}[0-9]{8}[0-9]{16}",PS:"PS[0-9]{2}[A-Z]{4}[A-Z0-9]{21}",PT:"PT[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{11}[0-9]{2}",QA:"QA[0-9]{2}[A-Z]{4}[A-Z0-9]{21}",RO:"RO[0-9]{2}[A-Z]{4}[A-Z0-9]{16}",RS:"RS[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",SA:"SA[0-9]{2}[0-9]{2}[A-Z0-9]{18}",SE:"SE[0-9]{2}[0-9]{3}[0-9]{16}[0-9]{1}",SI:"SI[0-9]{2}[0-9]{5}[0-9]{8}[0-9]{2}",SK:"SK[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{10}",SM:"SM[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}",SN:"SN[0-9]{2}[A-Z]{1}[0-9]{23}",TL:"TL38[0-9]{3}[0-9]{14}[0-9]{2}",TN:"TN59[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",TR:"TR[0-9]{2}[0-9]{5}[A-Z0-9]{1}[A-Z0-9]{16}",VG:"VG[0-9]{2}[A-Z]{4}[0-9]{16}",XK:"XK[0-9]{2}[0-9]{4}[0-9]{10}[0-9]{2}"},e=["AT","BE","BG","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GI","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MT","NL","NO","PL","PT","RO","SE","SI","SK","SM"];return{validate:function(n){if(""===n.value)return{valid:!0};var i=Object.assign({},{message:""},n.options),r=n.value.replace(/[^a-zA-Z0-9]/g,"").toUpperCase(),o=i.country||r.substr(0,2);if(!t[o])return{message:i.message,valid:!1};if(void 0!==i.sepa){var a=-1!==e.indexOf(o);if(("true"===i.sepa||!0===i.sepa)&&!a||("false"===i.sepa||!1===i.sepa)&&a)return{message:i.message,valid:!1}}var s=m(n.l10n?i.message||n.l10n.iban.country:i.message,n.l10n?n.l10n.iban.countries[o]:o);if(!new RegExp("^".concat(t[o],"$")).test(n.value))return{message:s,valid:!1};r=(r="".concat(r.substr(4)).concat(r.substr(0,4))).split("").map(function(t){var e=t.charCodeAt(0);return e>=65&&e<=90?e-65+10:t}).join("");for(var l=parseInt(r.substr(0,1),10),u=r.length,c=1;c<u;++c)l=(10*l+parseInt(r.substr(c,1),10))%97;return{message:s,valid:1===l}}}},id:function(){var t=["AR","BA","BG","BR","CH","CL","CN","CO","CZ","DK","EE","ES","FI","FR","HK","HR","ID","IE","IL","IS","KR","LT","LV","ME","MK","MX","MY","NL","NO","PE","PL","RO","RS","SE","SI","SK","SM","TH","TR","TW","UY","ZA"];return{validate:function(e){if(""===e.value)return{valid:!0};var n=Object.assign({},{message:""},e.options),i=e.value.substr(0,2);if(i="function"==typeof n.country?n.country.call(this):n.country,-1===t.indexOf(i))return{valid:!0};var r={meta:{},valid:!0};switch(i.toLowerCase()){case"ar":r=function(t){var e=t.replace(/\./g,"");return{meta:{},valid:/^\d{7,8}$/.test(e)}}(e.value);break;case"ba":r=function(t){return{meta:{},valid:w(t,"BA")}}(e.value);break;case"bg":r=function(t){if(!/^\d{10}$/.test(t)&&!/^\d{6}\s\d{3}\s\d{1}$/.test(t))return{meta:{},valid:!1};var e=t.replace(/\s/g,""),n=parseInt(e.substr(0,2),10)+1900,i=parseInt(e.substr(2,2),10);if(i>40?(n+=100,i-=40):i>20&&(n-=100,i-=20),!b(n,i,parseInt(e.substr(4,2),10)))return{meta:{},valid:!1};for(var r=0,o=[2,4,8,5,10,9,7,3,6],a=0;a<9;a++)r+=parseInt(e.charAt(a),10)*o[a];return{meta:{},valid:"".concat(r=r%11%10)===e.substr(9,1)}}(e.value);break;case"br":r=function(t){var e=t.replace(/\D/g,"");if(!/^\d{11}$/.test(e)||/^1{11}|2{11}|3{11}|4{11}|5{11}|6{11}|7{11}|8{11}|9{11}|0{11}$/.test(e))return{meta:{},valid:!1};var n,i=0;for(n=0;n<9;n++)i+=(10-n)*parseInt(e.charAt(n),10);if((10==(i=11-i%11)||11===i)&&(i=0),"".concat(i)!==e.charAt(9))return{meta:{},valid:!1};var r=0;for(n=0;n<10;n++)r+=(11-n)*parseInt(e.charAt(n),10);return(10==(r=11-r%11)||11===r)&&(r=0),{meta:{},valid:"".concat(r)===e.charAt(10)}}(e.value);break;case"ch":r=function(t){if(!/^756[\.]{0,1}[0-9]{4}[\.]{0,1}[0-9]{4}[\.]{0,1}[0-9]{2}$/.test(t))return{meta:{},valid:!1};for(var e=t.replace(/\D/g,"").substr(3),n=e.length,i=8===n?[3,1]:[1,3],r=0,o=0;o<n-1;o++)r+=parseInt(e.charAt(o),10)*i[o%2];return{meta:{},valid:"".concat(r=10-r%10)===e.charAt(n-1)}}(e.value);break;case"cl":r=function(t){if(!/^\d{7,8}[-]{0,1}[0-9K]$/i.test(t))return{meta:{},valid:!1};for(var e=t.replace(/\-/g,"");e.length<9;)e="0".concat(e);for(var n=[3,2,7,6,5,4,3,2],i=0,r=0;r<8;r++)i+=parseInt(e.charAt(r),10)*n[r];var o="".concat(i=11-i%11);return 11===i?o="0":10===i&&(o="K"),{meta:{},valid:o===e.charAt(8).toUpperCase()}}(e.value);break;case"cn":r=function(t){var e=t.trim();if(!/^\d{15}$/.test(e)&&!/^\d{17}[\dXx]{1}$/.test(e))return{meta:{},valid:!1};var n={11:{0:[0],1:[[0,9],[11,17]],2:[0,28,29]},12:{0:[0],1:[[0,16]],2:[0,21,23,25]},13:{0:[0],1:[[0,5],7,8,21,[23,33],[81,85]],2:[[0,5],[7,9],[23,25],27,29,30,81,83],3:[[0,4],[21,24]],4:[[0,4],6,21,[23,35],81],5:[[0,3],[21,35],81,82],6:[[0,4],[21,38],[81,84]],7:[[0,3],5,6,[21,33]],8:[[0,4],[21,28]],9:[[0,3],[21,30],[81,84]],10:[[0,3],[22,26],28,81,82],11:[[0,2],[21,28],81,82]},14:{0:[0],1:[0,1,[5,10],[21,23],81],2:[[0,3],11,12,[21,27]],3:[[0,3],11,21,22],4:[[0,2],11,21,[23,31],81],5:[[0,2],21,22,24,25,81],6:[[0,3],[21,24]],7:[[0,2],[21,29],81],8:[[0,2],[21,30],81,82],9:[[0,2],[21,32],81],10:[[0,2],[21,34],81,82],11:[[0,2],[21,30],81,82],23:[[0,3],22,23,[25,30],32,33]},15:{0:[0],1:[[0,5],[21,25]],2:[[0,7],[21,23]],3:[[0,4]],4:[[0,4],[21,26],[28,30]],5:[[0,2],[21,26],81],6:[[0,2],[21,27]],7:[[0,3],[21,27],[81,85]],8:[[0,2],[21,26]],9:[[0,2],[21,29],81],22:[[0,2],[21,24]],25:[[0,2],[22,31]],26:[[0,2],[24,27],[29,32],34],28:[0,1,[22,27]],29:[0,[21,23]]},21:{0:[0],1:[[0,6],[11,14],[22,24],81],2:[[0,4],[11,13],24,[81,83]],3:[[0,4],11,21,23,81],4:[[0,4],11,[21,23]],5:[[0,5],21,22],6:[[0,4],24,81,82],7:[[0,3],11,26,27,81,82],8:[[0,4],11,81,82],9:[[0,5],11,21,22],10:[[0,5],11,21,81],11:[[0,3],21,22],12:[[0,2],4,21,23,24,81,82],13:[[0,3],21,22,24,81,82],14:[[0,4],21,22,81]},22:{0:[0],1:[[0,6],12,22,[81,83]],2:[[0,4],11,21,[81,84]],3:[[0,3],22,23,81,82],4:[[0,3],21,22],5:[[0,3],21,23,24,81,82],6:[[0,2],4,5,[21,23],25,81],7:[[0,2],[21,24],81],8:[[0,2],21,22,81,82],24:[[0,6],24,26]},23:{0:[0],1:[[0,12],21,[23,29],[81,84]],2:[[0,8],21,[23,25],27,[29,31],81],3:[[0,7],21,81,82],4:[[0,7],21,22],5:[[0,3],5,6,[21,24]],6:[[0,6],[21,24]],7:[[0,16],22,81],8:[[0,5],11,22,26,28,33,81,82],9:[[0,4],21],10:[[0,5],24,25,81,[83,85]],11:[[0,2],21,23,24,81,82],12:[[0,2],[21,26],[81,83]],27:[[0,4],[21,23]]},31:{0:[0],1:[0,1,[3,10],[12,20]],2:[0,30]},32:{0:[0],1:[[0,7],11,[13,18],24,25],2:[[0,6],11,81,82],3:[[0,5],11,12,[21,24],81,82],4:[[0,2],4,5,11,12,81,82],5:[[0,9],[81,85]],6:[[0,2],11,12,21,23,[81,84]],7:[0,1,3,5,6,[21,24]],8:[[0,4],11,26,[29,31]],9:[[0,3],[21,25],28,81,82],10:[[0,3],11,12,23,81,84,88],11:[[0,2],11,12,[81,83]],12:[[0,4],[81,84]],13:[[0,2],11,[21,24]]},33:{0:[0],1:[[0,6],[8,10],22,27,82,83,85],2:[0,1,[3,6],11,12,25,26,[81,83]],3:[[0,4],22,24,[26,29],81,82],4:[[0,2],11,21,24,[81,83]],5:[[0,3],[21,23]],6:[[0,2],21,24,[81,83]],7:[[0,3],23,26,27,[81,84]],8:[[0,3],22,24,25,81],9:[[0,3],21,22],10:[[0,4],[21,24],81,82],11:[[0,2],[21,27],81]},34:{0:[0],1:[[0,4],11,[21,24],81],2:[[0,4],7,8,[21,23],25],3:[[0,4],11,[21,23]],4:[[0,6],21],5:[[0,4],6,[21,23]],6:[[0,4],21],7:[[0,3],11,21],8:[[0,3],11,[22,28],81],10:[[0,4],[21,24]],11:[[0,3],22,[24,26],81,82],12:[[0,4],21,22,25,26,82],13:[[0,2],[21,24]],14:[[0,2],[21,24]],15:[[0,3],[21,25]],16:[[0,2],[21,23]],17:[[0,2],[21,23]],18:[[0,2],[21,25],81]},35:{0:[0],1:[[0,5],11,[21,25],28,81,82],2:[[0,6],[11,13]],3:[[0,5],22],4:[[0,3],21,[23,30],81],5:[[0,5],21,[24,27],[81,83]],6:[[0,3],[22,29],81],7:[[0,2],[21,25],[81,84]],8:[[0,2],[21,25],81],9:[[0,2],[21,26],81,82]},36:{0:[0],1:[[0,5],11,[21,24]],2:[[0,3],22,81],3:[[0,2],13,[21,23]],4:[[0,3],21,[23,30],81,82],5:[[0,2],21],6:[[0,2],22,81],7:[[0,2],[21,35],81,82],8:[[0,3],[21,30],81],9:[[0,2],[21,26],[81,83]],10:[[0,2],[21,30]],11:[[0,2],[21,30],81]},37:{0:[0],1:[[0,5],12,13,[24,26],81],2:[[0,3],5,[11,14],[81,85]],3:[[0,6],[21,23]],4:[[0,6],81],5:[[0,3],[21,23]],6:[[0,2],[11,13],34,[81,87]],7:[[0,5],24,25,[81,86]],8:[[0,2],11,[26,32],[81,83]],9:[[0,3],11,21,23,82,83],10:[[0,2],[81,83]],11:[[0,3],21,22],12:[[0,3]],13:[[0,2],11,12,[21,29]],14:[[0,2],[21,28],81,82],15:[[0,2],[21,26],81],16:[[0,2],[21,26]],17:[[0,2],[21,28]]},41:{0:[0],1:[[0,6],8,22,[81,85]],2:[[0,5],11,[21,25]],3:[[0,7],11,[22,29],81],4:[[0,4],11,[21,23],25,81,82],5:[[0,3],5,6,22,23,26,27,81],6:[[0,3],11,21,22],7:[[0,4],11,21,[24,28],81,82],8:[[0,4],11,[21,23],25,[81,83]],9:[[0,2],22,23,[26,28]],10:[[0,2],[23,25],81,82],11:[[0,4],[21,23]],12:[[0,2],21,22,24,81,82],13:[[0,3],[21,30],81],14:[[0,3],[21,26],81],15:[[0,3],[21,28]],16:[[0,2],[21,28],81],17:[[0,2],[21,29]],90:[0,1]},42:{0:[0],1:[[0,7],[11,17]],2:[[0,5],22,81],3:[[0,3],[21,25],81],5:[[0,6],[25,29],[81,83]],6:[[0,2],6,7,[24,26],[82,84]],7:[[0,4]],8:[[0,2],4,21,22,81],9:[[0,2],[21,23],81,82,84],10:[[0,3],[22,24],81,83,87],11:[[0,2],[21,27],81,82],12:[[0,2],[21,24],81],13:[[0,3],21,81],28:[[0,2],22,23,[25,28]],90:[0,[4,6],21]},43:{0:[0],1:[[0,5],11,12,21,22,24,81],2:[[0,4],11,21,[23,25],81],3:[[0,2],4,21,81,82],4:[0,1,[5,8],12,[21,24],26,81,82],5:[[0,3],11,[21,25],[27,29],81],6:[[0,3],11,21,23,24,26,81,82],7:[[0,3],[21,26],81],8:[[0,2],11,21,22],9:[[0,3],[21,23],81],10:[[0,3],[21,28],81],11:[[0,3],[21,29]],12:[[0,2],[21,30],81],13:[[0,2],21,22,81,82],31:[0,1,[22,27],30]},44:{0:[0],1:[[0,7],[11,16],83,84],2:[[0,5],21,22,24,29,32,33,81,82],3:[0,1,[3,8]],4:[[0,4]],5:[0,1,[6,15],23,82,83],6:[0,1,[4,8]],7:[0,1,[3,5],81,[83,85]],8:[[0,4],11,23,25,[81,83]],9:[[0,3],23,[81,83]],12:[[0,3],[23,26],83,84],13:[[0,3],[22,24],81],14:[[0,2],[21,24],26,27,81],15:[[0,2],21,23,81],16:[[0,2],[21,25]],17:[[0,2],21,23,81],18:[[0,3],21,23,[25,27],81,82],19:[0],20:[0],51:[[0,3],21,22],52:[[0,3],21,22,24,81],53:[[0,2],[21,23],81]},45:{0:[0],1:[[0,9],[21,27]],2:[[0,5],[21,26]],3:[[0,5],11,12,[21,32]],4:[0,1,[3,6],11,[21,23],81],5:[[0,3],12,21],6:[[0,3],21,81],7:[[0,3],21,22],8:[[0,4],21,81],9:[[0,3],[21,24],81],10:[[0,2],[21,31]],11:[[0,2],[21,23]],12:[[0,2],[21,29],81],13:[[0,2],[21,24],81],14:[[0,2],[21,25],81]},46:{0:[0],1:[0,1,[5,8]],2:[0,1],3:[0,[21,23]],90:[[0,3],[5,7],[21,39]]},50:{0:[0],1:[[0,19]],2:[0,[22,38],[40,43]],3:[0,[81,84]]},51:{0:[0],1:[0,1,[4,8],[12,15],[21,24],29,31,32,[81,84]],3:[[0,4],11,21,22],4:[[0,3],11,21,22],5:[[0,4],21,22,24,25],6:[0,1,3,23,26,[81,83]],7:[0,1,3,4,[22,27],81],8:[[0,2],11,12,[21,24]],9:[[0,4],[21,23]],10:[[0,2],11,24,25,28],11:[[0,2],[11,13],23,24,26,29,32,33,81],13:[[0,4],[21,25],81],14:[[0,2],[21,25]],15:[[0,3],[21,29]],16:[[0,3],[21,23],81],17:[[0,3],[21,25],81],18:[[0,3],[21,27]],19:[[0,3],[21,23]],20:[[0,2],21,22,81],32:[0,[21,33]],33:[0,[21,38]],34:[0,1,[22,37]]},52:{0:[0],1:[[0,3],[11,15],[21,23],81],2:[0,1,3,21,22],3:[[0,3],[21,30],81,82],4:[[0,2],[21,25]],5:[[0,2],[21,27]],6:[[0,3],[21,28]],22:[0,1,[22,30]],23:[0,1,[22,28]],24:[0,1,[22,28]],26:[0,1,[22,36]],27:[[0,2],22,23,[25,32]]},53:{0:[0],1:[[0,3],[11,14],21,22,[24,29],81],3:[[0,2],[21,26],28,81],4:[[0,2],[21,28]],5:[[0,2],[21,24]],6:[[0,2],[21,30]],7:[[0,2],[21,24]],8:[[0,2],[21,29]],9:[[0,2],[21,27]],23:[0,1,[22,29],31],25:[[0,4],[22,32]],26:[0,1,[21,28]],27:[0,1,[22,30]],28:[0,1,22,23],29:[0,1,[22,32]],31:[0,2,3,[22,24]],34:[0,[21,23]],33:[0,21,[23,25]],35:[0,[21,28]]},54:{0:[0],1:[[0,2],[21,27]],21:[0,[21,29],32,33],22:[0,[21,29],[31,33]],23:[0,1,[22,38]],24:[0,[21,31]],25:[0,[21,27]],26:[0,[21,27]]},61:{0:[0],1:[[0,4],[11,16],22,[24,26]],2:[[0,4],22],3:[[0,4],[21,24],[26,31]],4:[[0,4],[22,31],81],5:[[0,2],[21,28],81,82],6:[[0,2],[21,32]],7:[[0,2],[21,30]],8:[[0,2],[21,31]],9:[[0,2],[21,29]],10:[[0,2],[21,26]]},62:{0:[0],1:[[0,5],11,[21,23]],2:[0,1],3:[[0,2],21],4:[[0,3],[21,23]],5:[[0,3],[21,25]],6:[[0,2],[21,23]],7:[[0,2],[21,25]],8:[[0,2],[21,26]],9:[[0,2],[21,24],81,82],10:[[0,2],[21,27]],11:[[0,2],[21,26]],12:[[0,2],[21,28]],24:[0,21,[24,29]],26:[0,21,[23,30]],29:[0,1,[21,27]],30:[0,1,[21,27]]},63:{0:[0],1:[[0,5],[21,23]],2:[0,2,[21,25]],21:[0,[21,23],[26,28]],22:[0,[21,24]],23:[0,[21,24]],25:[0,[21,25]],26:[0,[21,26]],27:[0,1,[21,26]],28:[[0,2],[21,23]]},64:{0:[0],1:[0,1,[4,6],21,22,81],2:[[0,3],5,[21,23]],3:[[0,3],[21,24],81],4:[[0,2],[21,25]],5:[[0,2],21,22]},65:{0:[0],1:[[0,9],21],2:[[0,5]],21:[0,1,22,23],22:[0,1,22,23],23:[[0,3],[23,25],27,28],28:[0,1,[22,29]],29:[0,1,[22,29]],30:[0,1,[22,24]],31:[0,1,[21,31]],32:[0,1,[21,27]],40:[0,2,3,[21,28]],42:[[0,2],21,[23,26]],43:[0,1,[21,26]],90:[[0,4]],27:[[0,2],22,23]},71:{0:[0]},81:{0:[0]},82:{0:[0]}},i=parseInt(e.substr(0,2),10),r=parseInt(e.substr(2,2),10),o=parseInt(e.substr(4,2),10);if(!n[i]||!n[i][r])return{meta:{},valid:!1};var a,s,l=!1,u=n[i][r];for(a=0;a<u.length;a++)if(Array.isArray(u[a])&&u[a][0]<=o&&o<=u[a][1]||!Array.isArray(u[a])&&o===u[a]){l=!0;break}if(!l)return{meta:{},valid:!1};if(s=18===e.length?e.substr(6,8):"19".concat(e.substr(6,6)),!b(parseInt(s.substr(0,4),10),parseInt(s.substr(4,2),10),parseInt(s.substr(6,2),10)))return{meta:{},valid:!1};if(18===e.length){var c=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],d=0;for(a=0;a<17;a++)d+=parseInt(e.charAt(a),10)*c[a];return d=(12-d%11)%11,{meta:{},valid:("X"!==e.charAt(17).toUpperCase()?parseInt(e.charAt(17),10):10)===d}}return{meta:{},valid:!0}}(e.value);break;case"co":r=function(t){var e=t.replace(/\./g,"").replace("-","");if(!/^\d{8,16}$/.test(e))return{meta:{},valid:!1};for(var n=e.length,i=[3,7,13,17,19,23,29,37,41,43,47,53,59,67,71],r=0,o=n-2;o>=0;o--)r+=parseInt(e.charAt(o),10)*i[o];return(r%=11)>=2&&(r=11-r),{meta:{},valid:"".concat(r)===e.substr(n-1)}}(e.value);break;case"cz":r=x(e.value);break;case"dk":r=function(t){if(!/^[0-9]{6}[-]{0,1}[0-9]{4}$/.test(t))return{meta:{},valid:!1};var e=t.replace(/-/g,""),n=parseInt(e.substr(0,2),10),i=parseInt(e.substr(2,2),10),r=parseInt(e.substr(4,2),10);switch(!0){case-1!=="5678".indexOf(e.charAt(6))&&r>=58:r+=1800;break;case-1!=="0123".indexOf(e.charAt(6)):case-1!=="49".indexOf(e.charAt(6))&&r>=37:r+=1900;break;default:r+=2e3}return{meta:{},valid:b(r,i,n)}}(e.value);break;case"ee":r=O(e.value);break;case"es":r=function(t){var e=/^[0-9]{8}[-]{0,1}[A-HJ-NP-TV-Z]$/.test(t),n=/^[XYZ][-]{0,1}[0-9]{7}[-]{0,1}[A-HJ-NP-TV-Z]$/.test(t),i=/^[A-HNPQS][-]{0,1}[0-9]{7}[-]{0,1}[0-9A-J]$/.test(t);if(!e&&!n&&!i)return{meta:{},valid:!1};var r,o,a=t.replace(/-/g,"");if(e||n){o="DNI";var s="XYZ".indexOf(a.charAt(0));return-1!==s&&(a=s+a.substr(1)+"",o="NIE"),{meta:{type:o},valid:(r="TRWAGMYFPDXBNJZSQVHLCKE"[(r=parseInt(a.substr(0,8),10))%23])===a.substr(8,1)}}r=a.substr(1,7),o="CIF";for(var l=a[0],u=a.substr(-1),c=0,d=0;d<r.length;d++)if(d%2!=0)c+=parseInt(r[d],10);else{var f=""+2*parseInt(r[d],10);c+=parseInt(f[0],10),2===f.length&&(c+=parseInt(f[1],10))}var h=c-10*Math.floor(c/10);return 0!==h&&(h=10-h),{meta:{type:o},valid:-1!=="KQS".indexOf(l)?u==="JABCDEFGHI"[h]:-1!=="ABEH".indexOf(l)?u===""+h:u===""+h||u==="JABCDEFGHI"[h]}}(e.value);break;case"fi":r=function(t){if(!/^[0-9]{6}[-+A][0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/.test(t))return{meta:{},valid:!1};var e=parseInt(t.substr(0,2),10),n=parseInt(t.substr(2,2),10),i=parseInt(t.substr(4,2),10);if(!b(i={"+":1800,"-":1900,A:2e3}[t.charAt(6)]+i,n,e))return{meta:{},valid:!1};if(parseInt(t.substr(7,3),10)<2)return{meta:{},valid:!1};var r=parseInt(t.substr(0,6)+t.substr(7,3)+"",10);return{meta:{},valid:"0123456789ABCDEFHJKLMNPRSTUVWXY".charAt(r%31)===t.charAt(10)}}(e.value);break;case"fr":r=function(t){var e=t.toUpperCase();if(!/^(1|2)\d{2}\d{2}(\d{2}|\d[A-Z]|\d{3})\d{2,3}\d{3}\d{2}$/.test(e))return{meta:{},valid:!1};var n=e.substr(5,2);switch(!0){case/^\d{2}$/.test(n):e=t;break;case"2A"===n:e="".concat(t.substr(0,5),"19").concat(t.substr(7));break;case"2B"===n:e="".concat(t.substr(0,5),"18").concat(t.substr(7));break;default:return{meta:{},valid:!1}}var i=97-parseInt(e.substr(0,13),10)%97;return{meta:{},valid:(i<10?"0".concat(i):"".concat(i))===e.substr(13)}}(e.value);break;case"hk":r=function(t){var e=t.toUpperCase();if(!/^[A-MP-Z]{1,2}[0-9]{6}[0-9A]$/.test(e))return{meta:{},valid:!1};var n="ABCDEFGHIJKLMNOPQRSTUVWXYZ",i=e.charAt(0),r=e.charAt(1),o=0,a=e;/^[A-Z]$/.test(r)?(o+=9*(10+n.indexOf(i)),o+=8*(10+n.indexOf(r)),a=e.substr(2)):(o+=324,o+=8*(10+n.indexOf(i)),a=e.substr(1));for(var s=a.length,l=0;l<s-1;l++)o+=(7-l)*parseInt(a.charAt(l),10);var u=o%11;return{meta:{},valid:(0===u?"0":11-u==10?"A":"".concat(11-u))===a.charAt(s-1)}}(e.value);break;case"hr":r=_(e.value);break;case"id":r=E(e.value);break;case"ie":r=function(t){if(!/^\d{7}[A-W][AHWTX]?$/.test(t))return{meta:{},valid:!1};var e=function(t){for(var e=t;e.length<7;)e="0".concat(e);for(var n="WABCDEFGHIJKLMNOPQRSTUV",i=0,r=0;r<7;r++)i+=parseInt(e.charAt(r),10)*(8-r);return i+=9*n.indexOf(e.substr(7)),n[i%23]};return{meta:{},valid:9!==t.length||"A"!==t.charAt(8)&&"H"!==t.charAt(8)?t.charAt(7)===e(t.substr(0,7)):t.charAt(7)===e(t.substr(0,7)+t.substr(8)+"")}}(e.value);break;case"il":r=S(e.value);break;case"is":r=function(t){if(!/^[0-9]{6}[-]{0,1}[0-9]{4}$/.test(t))return{meta:{},valid:!1};var e=t.replace(/-/g,""),n=parseInt(e.substr(0,2),10),i=parseInt(e.substr(2,2),10),r=parseInt(e.substr(4,2),10),o=parseInt(e.charAt(9),10);if(!b(r=9===o?1900+r:100*(20+o)+r,i,n,!0))return{meta:{},valid:!1};for(var a=[3,2,7,6,5,4,3,2],s=0,l=0;l<8;l++)s+=parseInt(e.charAt(l),10)*a[l];return{meta:{},valid:"".concat(s=11-s%11)===e.charAt(8)}}(e.value);break;case"kr":r=function(t){var e=t.replace("-","");if(!/^\d{13}$/.test(e))return{meta:{},valid:!1};var n=e.charAt(6),i=parseInt(e.substr(0,2),10),r=parseInt(e.substr(2,2),10),o=parseInt(e.substr(4,2),10);switch(n){case"1":case"2":case"5":case"6":i+=1900;break;case"3":case"4":case"7":case"8":i+=2e3;break;default:i+=1800}if(!b(i,r,o))return{meta:{},valid:!1};for(var a=[2,3,4,5,6,7,8,9,2,3,4,5],s=e.length,l=0,u=0;u<s-1;u++)l+=a[u]*parseInt(e.charAt(u),10);return{meta:{},valid:"".concat((11-l%11)%10)===e.charAt(s-1)}}(e.value);break;case"lt":r=O(e.value);break;case"lv":r=function(t){if(!/^[0-9]{6}[-]{0,1}[0-9]{5}$/.test(t))return{meta:{},valid:!1};var e=t.replace(/\D/g,""),n=parseInt(e.substr(0,2),10),i=parseInt(e.substr(2,2),10),r=parseInt(e.substr(4,2),10);if(!b(r=r+1800+100*parseInt(e.charAt(6),10),i,n,!0))return{meta:{},valid:!1};for(var o=0,a=[10,5,8,4,2,1,6,3,7,9],s=0;s<10;s++)o+=parseInt(e.charAt(s),10)*a[s];return{meta:{},valid:"".concat(o=(o+1)%11%10)===e.charAt(10)}}(e.value);break;case"me":r=function(t){return{meta:{},valid:w(t,"ME")}}(e.value);break;case"mk":r=function(t){return{meta:{},valid:w(t,"MK")}}(e.value);break;case"mx":r=function(t){var e=t.toUpperCase();if(!/^[A-Z]{4}\d{6}[A-Z]{6}[0-9A-Z]\d$/.test(e))return{meta:{},valid:!1};var n=e.substr(0,4);if(["BACA","BAKA","BUEI","BUEY","CACA","CACO","CAGA","CAGO","CAKA","CAKO","COGE","COGI","COJA","COJE","COJI","COJO","COLA","CULO","FALO","FETO","GETA","GUEI","GUEY","JETA","JOTO","KACA","KACO","KAGA","KAGO","KAKA","KAKO","KOGE","KOGI","KOJA","KOJE","KOJI","KOJO","KOLA","KULO","LILO","LOCA","LOCO","LOKA","LOKO","MAME","MAMO","MEAR","MEAS","MEON","MIAR","MION","MOCO","MOKO","MULA","MULO","NACA","NACO","PEDA","PEDO","PENE","PIPI","PITO","POPO","PUTA","PUTO","QULO","RATA","ROBA","ROBE","ROBO","RUIN","SENO","TETA","VACA","VAGA","VAGO","VAKA","VUEI","VUEY","WUEI","WUEY"].indexOf(n)>=0)return{meta:{},valid:!1};var i=parseInt(e.substr(4,2),10),r=parseInt(e.substr(6,2),10),o=parseInt(e.substr(6,2),10);if(/^[0-9]$/.test(e.charAt(16))?i+=1900:i+=2e3,!b(i,r,o))return{meta:{},valid:!1};var a=e.charAt(10);if("H"!==a&&"M"!==a)return{meta:{},valid:!1};var s=e.substr(11,2);if(-1===["AS","BC","BS","CC","CH","CL","CM","CS","DF","DG","GR","GT","HG","JC","MC","MN","MS","NE","NL","NT","OC","PL","QR","QT","SL","SP","SR","TC","TL","TS","VZ","YN","ZS"].indexOf(s))return{meta:{},valid:!1};for(var l=0,u=e.length,c=0;c<u-1;c++)l+=(18-c)*"0123456789ABCDEFGHIJKLMN&OPQRSTUVWXYZ".indexOf(e.charAt(c));return{meta:{},valid:"".concat(l=(10-l%10)%10)===e.charAt(u-1)}}(e.value);break;case"my":r=function(t){if(!/^\d{12}$/.test(t))return{meta:{},valid:!1};var e=parseInt(t.substr(0,2),10),n=parseInt(t.substr(2,2),10),i=parseInt(t.substr(4,2),10);if(!b(e+1900,n,i)&&!b(e+2e3,n,i))return{meta:{},valid:!1};var r=t.substr(6,2);return{meta:{},valid:-1===["17","18","19","20","69","70","73","80","81","94","95","96","97"].indexOf(r)}}(e.value);break;case"nl":r=function(t){if(t.length<8)return{meta:{},valid:!1};var e=t;if(8===e.length&&(e="0".concat(e)),!/^[0-9]{4}[.]{0,1}[0-9]{2}[.]{0,1}[0-9]{3}$/.test(e))return{meta:{},valid:!1};if(e=e.replace(/\./g,""),0===parseInt(e,10))return{meta:{},valid:!1};for(var n=0,i=e.length,r=0;r<i-1;r++)n+=(9-r)*parseInt(e.charAt(r),10);return 10==(n%=11)&&(n=0),{meta:{},valid:"".concat(n)===e.charAt(i-1)}}(e.value);break;case"no":r=function(t){return/^\d{11}$/.test(t)?{meta:{},valid:"".concat(function(t){for(var e=[3,7,6,1,8,9,4,5,2],n=0,i=0;i<9;i++)n+=e[i]*parseInt(t.charAt(i),10);return 11-n%11}(t))===t.substr(-2,1)&&"".concat(function(t){for(var e=[5,4,3,2,7,6,5,4,3,2],n=0,i=0;i<10;i++)n+=e[i]*parseInt(t.charAt(i),10);return 11-n%11}(t))===t.substr(-1)}:{meta:{},valid:!1}}(e.value);break;case"pe":r=function(t){if(!/^\d{8}[0-9A-Z]*$/.test(t))return{meta:{},valid:!1};if(8===t.length)return{meta:{},valid:!0};for(var e=[3,2,7,6,5,4,3,2],n=0,i=0;i<8;i++)n+=e[i]*parseInt(t.charAt(i),10);var r=n%11,o=[6,5,4,3,2,1,1,0,9,8,7][r],a="KJIHGFEDCBA".charAt(r);return{meta:{},valid:t.charAt(8)==="".concat(o)||t.charAt(8)===a}}(e.value);break;case"pl":r=function(t){if(!/^[0-9]{11}$/.test(t))return{meta:{},valid:!1};for(var e=0,n=t.length,i=[1,3,7,9,1,3,7,9,1,3,7],r=0;r<n-1;r++)e+=i[r]*parseInt(t.charAt(r),10);return 0==(e%=10)&&(e=10),{meta:{},valid:"".concat(e=10-e)===t.charAt(n-1)}}(e.value);break;case"ro":r=function(t){if(!/^[0-9]{13}$/.test(t))return{meta:{},valid:!1};var e=parseInt(t.charAt(0),10);if(0===e||7===e||8===e)return{meta:{},valid:!1};var n=parseInt(t.substr(1,2),10),i=parseInt(t.substr(3,2),10),r=parseInt(t.substr(5,2),10);if(r>31&&i>12)return{meta:{},valid:!1};if(9!==e&&!b(n={1:1900,2:1900,3:1800,4:1800,5:2e3,6:2e3}[e+""]+n,i,r))return{meta:{},valid:!1};for(var o=0,a=[2,7,9,1,4,6,3,5,8,2,7,9],s=t.length,l=0;l<s-1;l++)o+=parseInt(t.charAt(l),10)*a[l];return 10==(o%=11)&&(o=1),{meta:{},valid:"".concat(o)===t.charAt(s-1)}}(e.value);break;case"rs":r=function(t){return{meta:{},valid:w(t,"RS")}}(e.value);break;case"se":r=A(e.value);break;case"si":r=function(t){return{meta:{},valid:w(t,"SI")}}(e.value);break;case"sk":r=x(e.value);break;case"sm":r=function(t){return{meta:{},valid:/^\d{5}$/.test(t)}}(e.value);break;case"th":r=function(t){if(13!==t.length)return{meta:{},valid:!1};for(var e=0,n=0;n<12;n++)e+=parseInt(t.charAt(n),10)*(13-n);return{meta:{},valid:(11-e%11)%10===parseInt(t.charAt(12),10)}}(e.value);break;case"tr":r=function(t){if(11!==t.length)return{meta:{},valid:!1};for(var e=0,n=0;n<10;n++)e+=parseInt(t.charAt(n),10);return{meta:{},valid:e%10===parseInt(t.charAt(10),10)}}(e.value);break;case"tw":r=function(t){var e=t.toUpperCase();if(!/^[A-Z][12][0-9]{8}$/.test(e))return{meta:{},valid:!1};for(var n=e.length,i="ABCDEFGHJKLMNPQRSTUVXYWZIO".indexOf(e.charAt(0))+10,r=Math.floor(i/10)+i%10*(n-1),o=0,a=1;a<n-1;a++)o+=parseInt(e.charAt(a),10)*(n-1-a);return{meta:{},valid:(r+o+parseInt(e.charAt(n-1),10))%10==0}}(e.value);break;case"uy":r=function(t){if(!/^\d{8}$/.test(t))return{meta:{},valid:!1};for(var e=[2,9,8,7,6,3,4],n=0,i=0;i<7;i++)n+=parseInt(t.charAt(i),10)*e[i];return(n%=10)>0&&(n=10-n),{meta:{},valid:"".concat(n)===t.charAt(7)}}(e.value);break;case"za":r=C(e.value)}var o=m(e.l10n?n.message||e.l10n.id.country:n.message,e.l10n?e.l10n.id.countries[i.toUpperCase()]:i.toUpperCase());return Object.assign({},{message:o},r)}}},imei:function(){return{validate:function(t){if(""===t.value)return{valid:!0};switch(!0){case/^\d{15}$/.test(t.value):case/^\d{2}-\d{6}-\d{6}-\d{1}$/.test(t.value):case/^\d{2}\s\d{6}\s\d{6}\s\d{1}$/.test(t.value):return{valid:e(t.value.replace(/[^0-9]/g,""))};case/^\d{14}$/.test(t.value):case/^\d{16}$/.test(t.value):case/^\d{2}-\d{6}-\d{6}(|-\d{2})$/.test(t.value):case/^\d{2}\s\d{6}\s\d{6}(|\s\d{2})$/.test(t.value):return{valid:!0};default:return{valid:!1}}}}},imo:function(){return{validate:function(t){if(""===t.value)return{valid:!0};if(!/^IMO \d{7}$/i.test(t.value))return{valid:!1};for(var e=t.value.replace(/^.*(\d{7})$/,"$1"),n=0,i=6;i>=1;i--)n+=parseInt(e.slice(6-i,-i),10)*(i+1);return{valid:n%10===parseInt(e.charAt(6),10)}}}},isbn:function(){return{validate:function(t){if(""===t.value)return{meta:{type:null},valid:!0};var e;switch(!0){case/^\d{9}[\dX]$/.test(t.value):case 13===t.value.length&&/^(\d+)-(\d+)-(\d+)-([\dX])$/.test(t.value):case 13===t.value.length&&/^(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(t.value):e="ISBN10";break;case/^(978|979)\d{9}[\dX]$/.test(t.value):case 17===t.value.length&&/^(978|979)-(\d+)-(\d+)-(\d+)-([\dX])$/.test(t.value):case 17===t.value.length&&/^(978|979)\s(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(t.value):e="ISBN13";break;default:return{meta:{type:null},valid:!1}}var n,i,r=t.value.replace(/[^0-9X]/gi,"").split(""),o=r.length,a=0;switch(e){case"ISBN10":for(a=0,n=0;n<o-1;n++)a+=parseInt(r[n],10)*(10-n);return 11==(i=11-a%11)?i=0:10===i&&(i="X"),{meta:{type:e},valid:"".concat(i)===r[o-1]};case"ISBN13":for(a=0,n=0;n<o-1;n++)a+=n%2==0?parseInt(r[n],10):3*parseInt(r[n],10);return 10==(i=10-a%10)&&(i="0"),{meta:{type:e},valid:"".concat(i)===r[o-1]}}}}},isin:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=t.value.toUpperCase();if(!new RegExp("^(AF|AX|AL|DZ|AS|AD|AO|AI|AQ|AG|AR|AM|AW|AU|AT|AZ|BS|BH|BD|BB|BY|BE|BZ|BJ|BM|BT|BO|BQ|BA|BW|BV|BR|IO|BN|BG|BF|BI|KH|CM|CA|CV|KY|CF|TD|CL|CN|CX|CC|CO|KM|CG|CD|CK|CR|CI|HR|CU|CW|CY|CZ|DK|DJ|DM|DO|EC|EG|SV|GQ|ER|EE|ET|FK|FO|FJ|FI|FR|GF|PF|TF|GA|GM|GE|DE|GH|GI|GR|GL|GD|GP|GU|GT|GG|GN|GW|GY|HT|HM|VA|HN|HK|HU|IS|IN|ID|IR|IQ|IE|IM|IL|IT|JM|JP|JE|JO|KZ|KE|KI|KP|KR|KW|KG|LA|LV|LB|LS|LR|LY|LI|LT|LU|MO|MK|MG|MW|MY|MV|ML|MT|MH|MQ|MR|MU|YT|MX|FM|MD|MC|MN|ME|MS|MA|MZ|MM|NA|NR|NP|NL|NC|NZ|NI|NE|NG|NU|NF|MP|NO|OM|PK|PW|PS|PA|PG|PY|PE|PH|PN|PL|PT|PR|QA|RE|RO|RU|RW|BL|SH|KN|LC|MF|PM|VC|WS|SM|ST|SA|SN|RS|SC|SL|SG|SX|SK|SI|SB|SO|ZA|GS|SS|ES|LK|SD|SR|SJ|SZ|SE|CH|SY|TW|TJ|TZ|TH|TL|TG|TK|TO|TT|TN|TR|TM|TC|TV|UG|UA|AE|GB|US|UM|UY|UZ|VU|VE|VN|VG|VI|WF|EH|YE|ZM|ZW)[0-9A-Z]{10}$").test(t.value))return{valid:!1};var n,i=e.length,r="";for(n=0;n<i-1;n++){var o=e.charCodeAt(n);r+=o>57?(o-55).toString():e.charAt(n)}var a="",s=r.length,l=s%2!=0?0:1;for(n=0;n<s;n++)a+=parseInt(r[n],10)*(n%2===l?2:1)+"";var u=0;for(n=0;n<a.length;n++)u+=parseInt(a.charAt(n),10);return{valid:"".concat(u=(10-u%10)%10)===e.charAt(i-1)}}}},ismn:function(){return{validate:function(t){if(""===t.value)return{meta:null,valid:!0};var e;switch(!0){case/^M\d{9}$/.test(t.value):case/^M-\d{4}-\d{4}-\d{1}$/.test(t.value):case/^M\s\d{4}\s\d{4}\s\d{1}$/.test(t.value):e="ISMN10";break;case/^9790\d{9}$/.test(t.value):case/^979-0-\d{4}-\d{4}-\d{1}$/.test(t.value):case/^979\s0\s\d{4}\s\d{4}\s\d{1}$/.test(t.value):e="ISMN13";break;default:return{meta:null,valid:!1}}var n=t.value;"ISMN10"===e&&(n="9790".concat(n.substr(1)));for(var i=0,r=(n=n.replace(/[^0-9]/gi,"")).length,o=[1,3],a=0;a<r-1;a++)i+=parseInt(n.charAt(a),10)*o[a%2];return{meta:{type:e},valid:"".concat(i=(10-i%10)%10)===n.charAt(r-1)}}}},issn:function(){return{validate:function(t){if(""===t.value)return{valid:!0};if(!/^\d{4}\-\d{3}[\dX]$/.test(t.value))return{valid:!1};var e=t.value.replace(/[^0-9X]/gi,"").split(""),n=e.length,i=0;"X"===e[7]&&(e[7]="10");for(var r=0;r<n;r++)i+=parseInt(e[r],10)*(8-r);return{valid:i%11==0}}}},mac:function(){return{validate:function(t){return{valid:""===t.value||/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(t.value)||/^([0-9A-Fa-f]{4}\.){2}([0-9A-Fa-f]{4})$/.test(t.value)}}}},meid:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var n=t.value;switch(!0){case/^[0-9A-F]{15}$/i.test(n):case/^[0-9A-F]{2}[- ][0-9A-F]{6}[- ][0-9A-F]{6}[- ][0-9A-F]$/i.test(n):case/^\d{19}$/.test(n):case/^\d{5}[- ]\d{5}[- ]\d{4}[- ]\d{4}[- ]\d$/.test(n):var i=n.charAt(n.length-1).toUpperCase();if((n=n.replace(/[- ]/g,"")).match(/^\d*$/i))return{valid:e(n)};n=n.slice(0,-1);var r,o="";for(r=1;r<=13;r+=2)o+=(2*parseInt(n.charAt(r),16)).toString(16);var a=0;for(r=0;r<o.length;r++)a+=parseInt(o.charAt(r),16);return{valid:a%10==0?"0"===i:i===(2*(10*Math.floor((a+10)/10)-a)).toString(16).toUpperCase()};case/^[0-9A-F]{14}$/i.test(n):case/^[0-9A-F]{2}[- ][0-9A-F]{6}[- ][0-9A-F]{6}$/i.test(n):case/^\d{18}$/.test(n):case/^\d{5}[- ]\d{5}[- ]\d{4}[- ]\d{4}$/.test(n):return{valid:!0};default:return{valid:!1}}}}},phone:function(){var t=["AE","BG","BR","CN","CZ","DE","DK","ES","FR","GB","IN","MA","NL","PK","RO","RU","SK","TH","US","VE"];return{validate:function(e){if(""===e.value)return{valid:!0};var n=Object.assign({},{message:""},e.options),i=e.value.trim(),r=i.substr(0,2);if(!(r="function"==typeof n.country?n.country.call(this):n.country)||-1===t.indexOf(r.toUpperCase()))return{valid:!0};var o=!0;switch(r.toUpperCase()){case"AE":o=/^(((\+|00)?971[\s\.-]?(\(0\)[\s\.-]?)?|0)(\(5(0|2|5|6)\)|5(0|2|5|6)|2|3|4|6|7|9)|60)([\s\.-]?[0-9]){7}$/.test(i);break;case"BG":o=/^(0|359|00)(((700|900)[0-9]{5}|((800)[0-9]{5}|(800)[0-9]{4}))|(87|88|89)([0-9]{7})|((2[0-9]{7})|(([3-9][0-9])(([0-9]{6})|([0-9]{5})))))$/.test(i.replace(/\+|\s|-|\/|\(|\)/gi,""));break;case"BR":o=/^(([\d]{4}[-.\s]{1}[\d]{2,3}[-.\s]{1}[\d]{2}[-.\s]{1}[\d]{2})|([\d]{4}[-.\s]{1}[\d]{3}[-.\s]{1}[\d]{4})|((\(?\+?[0-9]{2}\)?\s?)?(\(?\d{2}\)?\s?)?\d{4,5}[-.\s]?\d{4}))$/.test(i);break;case"CN":o=/^((00|\+)?(86(?:-| )))?((\d{11})|(\d{3}[- ]{1}\d{4}[- ]{1}\d{4})|((\d{2,4}[- ]){1}(\d{7,8}|(\d{3,4}[- ]{1}\d{4}))([- ]{1}\d{1,4})?))$/.test(i);break;case"CZ":o=/^(((00)([- ]?)|\+)(420)([- ]?))?((\d{3})([- ]?)){2}(\d{3})$/.test(i);break;case"DE":o=/^(((((((00|\+)49[ \-\/]?)|0)[1-9][0-9]{1,4})[ \-\/]?)|((((00|\+)49\()|\(0)[1-9][0-9]{1,4}\)[ \-\/]?))[0-9]{1,7}([ \-\/]?[0-9]{1,5})?)$/.test(i);break;case"DK":o=/^(\+45|0045|\(45\))?\s?[2-9](\s?\d){7}$/.test(i);break;case"ES":o=/^(?:(?:(?:\+|00)34\D?))?(?:5|6|7|8|9)(?:\d\D?){8}$/.test(i);break;case"FR":o=/^(?:(?:(?:\+|00)33[ ]?(?:\(0\)[ ]?)?)|0){1}[1-9]{1}([ .-]?)(?:\d{2}\1?){3}\d{2}$/.test(i);break;case"GB":o=/^\(?(?:(?:0(?:0|11)\)?[\s-]?\(?|\+)44\)?[\s-]?\(?(?:0\)?[\s-]?\(?)?|0)(?:\d{2}\)?[\s-]?\d{4}[\s-]?\d{4}|\d{3}\)?[\s-]?\d{3}[\s-]?\d{3,4}|\d{4}\)?[\s-]?(?:\d{5}|\d{3}[\s-]?\d{3})|\d{5}\)?[\s-]?\d{4,5}|8(?:00[\s-]?11[\s-]?11|45[\s-]?46[\s-]?4\d))(?:(?:[\s-]?(?:x|ext\.?\s?|\#)\d+)?)$/.test(i);break;case"IN":o=/((\+?)((0[ -]+)*|(91 )*)(\d{12}|\d{10}))|\d{5}([- ]*)\d{6}/.test(i);break;case"MA":o=/^(?:(?:(?:\+|00)212[\s]?(?:[\s]?\(0\)[\s]?)?)|0){1}(?:5[\s.-]?[2-3]|6[\s.-]?[13-9]){1}[0-9]{1}(?:[\s.-]?\d{2}){3}$/.test(i);break;case"NL":o=/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9])((\s|\s?-\s?)?[0-9])((\s|\s?-\s?)?[0-9])\s?[0-9]\s?[0-9]\s?[0-9]\s?[0-9]\s?[0-9]$/gm.test(i);break;case"PK":o=/^0?3[0-9]{2}[0-9]{7}$/.test(i);break;case"RO":o=/^(\+4|)?(07[0-8]{1}[0-9]{1}|02[0-9]{2}|03[0-9]{2}){1}?(\s|\.|\-)?([0-9]{3}(\s|\.|\-|)){2}$/g.test(i);break;case"RU":o=/^((8|\+7|007)[\-\.\/ ]?)?([\(\/\.]?\d{3}[\)\/\.]?[\-\.\/ ]?)?[\d\-\.\/ ]{7,10}$/g.test(i);break;case"SK":o=/^(((00)([- ]?)|\+)(421)([- ]?))?((\d{3})([- ]?)){2}(\d{3})$/.test(i);break;case"TH":o=/^0\(?([6|8-9]{2})*-([0-9]{3})*-([0-9]{4})$/.test(i);break;case"VE":o=/^0(?:2(?:12|4[0-9]|5[1-9]|6[0-9]|7[0-8]|8[1-35-8]|9[1-5]|3[45789])|4(?:1[246]|2[46]))\d{7}$/.test(i);break;case"US":default:o=/^(?:(1\-?)|(\+1 ?))?\(?\d{3}\)?[\-\.\s]?\d{3}[\-\.\s]?\d{4}$/.test(i)}return{message:m(e.l10n?n.message||e.l10n.phone.country:n.message,e.l10n?e.l10n.phone.countries[r]:r),valid:o}}}},rtn:function(){return{validate:function(t){if(""===t.value)return{valid:!0};if(!/^\d{9}$/.test(t.value))return{valid:!1};for(var e=0,n=0;n<t.value.length;n+=3)e+=3*parseInt(t.value.charAt(n),10)+7*parseInt(t.value.charAt(n+1),10)+parseInt(t.value.charAt(n+2),10);return{valid:0!==e&&e%10==0}}}},sedol:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=t.value.toUpperCase();if(!/^[0-9A-Z]{7}$/.test(e))return{valid:!1};for(var n=[1,3,1,7,3,9,1],i=e.length,r=0,o=0;o<i-1;o++)r+=n[o]*parseInt(e.charAt(o),36);return{valid:"".concat(r=(10-r%10)%10)===e.charAt(i-1)}}}},siren:function(){return{validate:function(t){return{valid:""===t.value||/^\d{9}$/.test(t.value)&&e(t.value)}}}},siret:function(){return{validate:function(t){if(""===t.value)return{valid:!0};for(var e,n=t.value.length,i=0,r=0;r<n;r++)e=parseInt(t.value.charAt(r),10),r%2==0&&(e*=2)>9&&(e-=9),i+=e;return{valid:i%10==0}}}},step:function(){var t=function(t,e){if(0===e)return 1;var n="".concat(t).split("."),i="".concat(e).split("."),r=(1===n.length?0:n[1].length)+(1===i.length?0:i[1].length);return function(t,e){var n,i=Math.pow(10,e),r=t*i;switch(!0){case 0===r:n=0;break;case r>0:n=1;break;case r<0:n=-1}return r%1==.5*n?(Math.floor(r)+(n>0?1:0))/i:Math.round(r)/i}(t-e*Math.floor(t/e),r)};return{validate:function(e){if(""===e.value)return{valid:!0};var n=parseFloat(e.value);if(isNaN(n)||!isFinite(n))return{valid:!1};var i=Object.assign({},{baseValue:0,message:"",step:1},e.options),r=t(n-i.baseValue,i.step);return{message:m(e.l10n?i.message||e.l10n.step.default:i.message,"".concat(i.step)),valid:0===r||r===i.step}}}},uuid:function(){return{validate:function(t){if(""===t.value)return{valid:!0};var e=Object.assign({},{message:""},t.options),n={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i},i=e.version?"".concat(e.version):"all";return{message:e.version?m(t.l10n?e.message||t.l10n.uuid.version:e.message,e.version):t.l10n?t.l10n.uuid.default:e.message,valid:null===n[i]||n[i].test(t.value)}}}},vat:function(){var t=["AR","AT","BE","BG","BR","CH","CY","CZ","DE","DK","EE","EL","ES","FI","FR","GB","GR","HR","HU","IE","IS","IT","LT","LU","LV","MT","NL","NO","PL","PT","RO","RU","RS","SE","SK","SI","VE","ZA"];return{validate:function(e){var n=e.value;if(""===n)return{valid:!0};var i=Object.assign({},{message:""},e.options),r=n.substr(0,2);if(r="function"==typeof i.country?i.country.call(this):i.country,-1===t.indexOf(r))return{valid:!0};var o={meta:{},valid:!0};switch(r.toLowerCase()){case"ar":o=function(t){var e=t.replace("-","");if(/^AR[0-9]{11}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{11}$/.test(e))return{meta:{},valid:!1};for(var n=[5,4,3,2,7,6,5,4,3,2],i=0,r=0;r<10;r++)i+=parseInt(e.charAt(r),10)*n[r];return 11==(i=11-i%11)&&(i=0),{meta:{},valid:"".concat(i)===e.substr(10)}}(n);break;case"at":o=function(t){var e=t;if(/^ATU[0-9]{8}$/.test(e)&&(e=e.substr(2)),!/^U[0-9]{8}$/.test(e))return{meta:{},valid:!1};e=e.substr(1);for(var n=[1,2,1,2,1,2,1],i=0,r=0,o=0;o<7;o++)(r=parseInt(e.charAt(o),10)*n[o])>9&&(r=Math.floor(r/10)+r%10),i+=r;return 10==(i=10-(i+4)%10)&&(i=0),{meta:{},valid:"".concat(i)===e.substr(7,1)}}(n);break;case"be":o=function(t){var e=t;return/^BE[0]?[0-9]{9}$/.test(e)&&(e=e.substr(2)),/^[0]?[0-9]{9}$/.test(e)?(9===e.length&&(e="0".concat(e)),"0"===e.substr(1,1)?{meta:{},valid:!1}:{meta:{},valid:(parseInt(e.substr(0,8),10)+parseInt(e.substr(8,2),10))%97==0}):{meta:{},valid:!1}}(n);break;case"bg":o=function(t){var e=t;if(/^BG[0-9]{9,10}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{9,10}$/.test(e))return{meta:{},valid:!1};var n=0,i=0;if(9===e.length){for(i=0;i<8;i++)n+=parseInt(e.charAt(i),10)*(i+1);if(10==(n%=11))for(n=0,i=0;i<8;i++)n+=parseInt(e.charAt(i),10)*(i+3);return{meta:{},valid:"".concat(n%=10)===e.substr(8)}}return{meta:{},valid:function(t){var e=parseInt(t.substr(0,2),10)+1900,n=parseInt(t.substr(2,2),10);if(n>40?(e+=100,n-=40):n>20&&(e-=100,n-=20),!b(e,n,parseInt(t.substr(4,2),10)))return!1;for(var i=[2,4,8,5,10,9,7,3,6],r=0,o=0;o<9;o++)r+=parseInt(t.charAt(o),10)*i[o];return"".concat(r=r%11%10)===t.substr(9,1)}(e)||function(t){for(var e=[21,19,17,13,11,9,7,3,1],n=0,i=0;i<9;i++)n+=parseInt(t.charAt(i),10)*e[i];return"".concat(n%=10)===t.substr(9,1)}(e)||function(t){for(var e=[4,3,2,7,6,5,4,3,2],n=0,i=0;i<9;i++)n+=parseInt(t.charAt(i),10)*e[i];return 10!=(n=11-n%11)&&(11===n&&(n=0),"".concat(n)===t.substr(9,1))}(e)}}(n);break;case"br":o=function(t){if(""===t)return{meta:{},valid:!0};var e=t.replace(/[^\d]+/g,"");if(""===e||14!==e.length)return{meta:{},valid:!1};if("00000000000000"===e||"11111111111111"===e||"22222222222222"===e||"33333333333333"===e||"44444444444444"===e||"55555555555555"===e||"66666666666666"===e||"77777777777777"===e||"88888888888888"===e||"99999999999999"===e)return{meta:{},valid:!1};var n,i=e.length-2,r=e.substring(0,i),o=e.substring(i),a=0,s=i-7;for(n=i;n>=1;n--)a+=parseInt(r.charAt(i-n),10)*s--,s<2&&(s=9);var l=a%11<2?0:11-a%11;if(l!==parseInt(o.charAt(0),10))return{meta:{},valid:!1};for(i+=1,r=e.substring(0,i),a=0,s=i-7,n=i;n>=1;n--)a+=parseInt(r.charAt(i-n),10)*s--,s<2&&(s=9);return{meta:{},valid:(l=a%11<2?0:11-a%11)===parseInt(o.charAt(1),10)}}(n);break;case"ch":o=function(t){var e=t;if(/^CHE[0-9]{9}(MWST|TVA|IVA|TPV)?$/.test(e)&&(e=e.substr(2)),!/^E[0-9]{9}(MWST|TVA|IVA|TPV)?$/.test(e))return{meta:{},valid:!1};e=e.substr(1);for(var n=[5,4,3,2,7,6,5,4],i=0,r=0;r<8;r++)i+=parseInt(e.charAt(r),10)*n[r];return 10==(i=11-i%11)?{meta:{},valid:!1}:(11===i&&(i=0),{meta:{},valid:"".concat(i)===e.substr(8,1)})}(n);break;case"cy":o=function(t){var e=t;if(/^CY[0-5|9][0-9]{7}[A-Z]$/.test(e)&&(e=e.substr(2)),!/^[0-5|9][0-9]{7}[A-Z]$/.test(e))return{meta:{},valid:!1};if("12"===e.substr(0,2))return{meta:{},valid:!1};for(var n=0,i={0:1,1:0,2:5,3:7,4:9,5:13,6:15,7:17,8:19,9:21},r=0;r<8;r++){var o=parseInt(e.charAt(r),10);r%2==0&&(o=i["".concat(o)]),n+=o}return{meta:{},valid:"".concat("ABCDEFGHIJKLMNOPQRSTUVWXYZ"[n%26])===e.substr(8,1)}}(n);break;case"cz":o=function(t){var e=t;if(/^CZ[0-9]{8,10}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{8,10}$/.test(e))return{meta:{},valid:!1};var n=0,i=0;if(8===e.length){if("9"==="".concat(e.charAt(0)))return{meta:{},valid:!1};for(n=0,i=0;i<7;i++)n+=parseInt(e.charAt(i),10)*(8-i);return 10==(n=11-n%11)&&(n=0),11===n&&(n=1),{meta:{},valid:"".concat(n)===e.substr(7,1)}}if(9===e.length&&"6"==="".concat(e.charAt(0))){for(n=0,i=0;i<7;i++)n+=parseInt(e.charAt(i+1),10)*(8-i);return 10==(n=11-n%11)&&(n=0),11===n&&(n=1),{meta:{},valid:"".concat(n=[8,7,6,5,4,3,2,1,0,9,10][n-1])===e.substr(8,1)}}if(9===e.length||10===e.length){var r=1900+parseInt(e.substr(0,2),10),o=parseInt(e.substr(2,2),10)%50%20,a=parseInt(e.substr(4,2),10);if(9===e.length){if(r>=1980&&(r-=100),r>1953)return{meta:{},valid:!1}}else r<1954&&(r+=100);if(!b(r,o,a))return{meta:{},valid:!1};if(10===e.length){var s=parseInt(e.substr(0,9),10)%11;return r<1985&&(s%=10),{meta:{},valid:"".concat(s)===e.substr(9,1)}}return{meta:{},valid:!0}}return{meta:{},valid:!1}}(n);break;case"de":o=T(n);break;case"dk":o=function(t){var e=t;if(/^DK[0-9]{8}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{8}$/.test(e))return{meta:{},valid:!1};for(var n=0,i=[2,7,6,5,4,3,2,1],r=0;r<8;r++)n+=parseInt(e.charAt(r),10)*i[r];return{meta:{},valid:n%11==0}}(n);break;case"ee":o=function(t){var e=t;if(/^EE[0-9]{9}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{9}$/.test(e))return{meta:{},valid:!1};for(var n=0,i=[3,7,1,3,7,1,3,7,1],r=0;r<9;r++)n+=parseInt(e.charAt(r),10)*i[r];return{meta:{},valid:n%10==0}}(n);break;case"el":o=N(n);break;case"es":o=function(t){var e=t;if(/^ES[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(e)&&(e=e.substr(2)),!/^[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(e))return{meta:{},valid:!1};var n=e.charAt(0);return/^[0-9]$/.test(n)?{meta:{type:"DNI"},valid:function(t){var e=parseInt(t.substr(0,8),10);return"".concat("TRWAGMYFPDXBNJZSQVHLCKE"[e%23])===t.substr(8,1)}(e)}:/^[XYZ]$/.test(n)?{meta:{type:"NIE"},valid:function(t){var e=["XYZ".indexOf(t.charAt(0)),t.substr(1)].join(""),n="TRWAGMYFPDXBNJZSQVHLCKE"[parseInt(e,10)%23];return"".concat(n)===t.substr(8,1)}(e)}:{meta:{type:"CIF"},valid:function(t){var e,n=t.charAt(0);if(-1!=="KLM".indexOf(n))return e=parseInt(t.substr(1,8),10),"".concat(e="TRWAGMYFPDXBNJZSQVHLCKE"[e%23])===t.substr(8,1);if(-1!=="ABCDEFGHJNPQRSUVW".indexOf(n)){for(var i=[2,1,2,1,2,1,2],r=0,o=0,a=0;a<7;a++)(o=parseInt(t.charAt(a+1),10)*i[a])>9&&(o=Math.floor(o/10)+o%10),r+=o;return 10==(r=10-r%10)&&(r=0),"".concat(r)===t.substr(8,1)||"JABCDEFGHI"[r]===t.substr(8,1)}return!1}(e)}}(n);break;case"fi":o=function(t){var e=t;if(/^FI[0-9]{8}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{8}$/.test(e))return{meta:{},valid:!1};for(var n=[7,9,10,5,8,4,2,1],i=0,r=0;r<8;r++)i+=parseInt(e.charAt(r),10)*n[r];return{meta:{},valid:i%11==0}}(n);break;case"fr":o=P(n);break;case"gb":o=function(t){var e=t;if((/^GB[0-9]{9}$/.test(e)||/^GB[0-9]{12}$/.test(e)||/^GBGD[0-9]{3}$/.test(e)||/^GBHA[0-9]{3}$/.test(e)||/^GB(GD|HA)8888[0-9]{5}$/.test(e))&&(e=e.substr(2)),!(/^[0-9]{9}$/.test(e)||/^[0-9]{12}$/.test(e)||/^GD[0-9]{3}$/.test(e)||/^HA[0-9]{3}$/.test(e)||/^(GD|HA)8888[0-9]{5}$/.test(e)))return{meta:{},valid:!1};var n=e.length;if(5===n){var i=e.substr(0,2),r=parseInt(e.substr(2),10);return{meta:{},valid:"GD"===i&&r<500||"HA"===i&&r>=500}}if(11===n&&("GD8888"===e.substr(0,6)||"HA8888"===e.substr(0,6)))return"GD"===e.substr(0,2)&&parseInt(e.substr(6,3),10)>=500||"HA"===e.substr(0,2)&&parseInt(e.substr(6,3),10)<500?{meta:{},valid:!1}:{meta:{},valid:parseInt(e.substr(6,3),10)%97===parseInt(e.substr(9,2),10)};if(9===n||12===n){for(var o=[8,7,6,5,4,3,2,10,1],a=0,s=0;s<9;s++)a+=parseInt(e.charAt(s),10)*o[s];return a%=97,{meta:{},valid:parseInt(e.substr(0,3),10)>=100?0===a||42===a||55===a:0===a}}return{meta:{},valid:!0}}(n);break;case"gr":o=N(n);break;case"hr":o=I(n);break;case"hu":o=function(t){var e=t;if(/^HU[0-9]{8}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{8}$/.test(e))return{meta:{},valid:!1};for(var n=[9,7,3,1,9,7,3,1],i=0,r=0;r<8;r++)i+=parseInt(e.charAt(r),10)*n[r];return{meta:{},valid:i%10==0}}(n);break;case"ie":o=function(t){var e=t;if(/^IE[0-9][0-9A-Z\*\+][0-9]{5}[A-Z]{1,2}$/.test(e)&&(e=e.substr(2)),!/^[0-9][0-9A-Z\*\+][0-9]{5}[A-Z]{1,2}$/.test(e))return{meta:{},valid:!1};var n=function(t){for(var e=t;e.length<7;)e="0".concat(e);for(var n="WABCDEFGHIJKLMNOPQRSTUV",i=0,r=0;r<7;r++)i+=parseInt(e.charAt(r),10)*(8-r);return i+=9*n.indexOf(e.substr(7)),n[i%23]};return/^[0-9]+$/.test(e.substr(0,7))?{meta:{},valid:e.charAt(7)===n("".concat(e.substr(0,7)).concat(e.substr(8)))}:-1!=="ABCDEFGHIJKLMNOPQRSTUVWXYZ+*".indexOf(e.charAt(1))?{meta:{},valid:e.charAt(7)===n("".concat(e.substr(2,5)).concat(e.substr(0,1)))}:{meta:{},valid:!0}}(n);break;case"is":o=function(t){var e=t;return/^IS[0-9]{5,6}$/.test(e)&&(e=e.substr(2)),{meta:{},valid:/^[0-9]{5,6}$/.test(e)}}(n);break;case"it":o=L(n);break;case"lt":o=function(t){var e=t;if(/^LT([0-9]{7}1[0-9]|[0-9]{10}1[0-9])$/.test(e)&&(e=e.substr(2)),!/^([0-9]{7}1[0-9]|[0-9]{10}1[0-9])$/.test(e))return{meta:{},valid:!1};var n,i=e.length,r=0;for(n=0;n<i-1;n++)r+=parseInt(e.charAt(n),10)*(1+n%9);var o=r%11;if(10===o)for(r=0,n=0;n<i-1;n++)r+=parseInt(e.charAt(n),10)*(1+(n+2)%9);return{meta:{},valid:"".concat(o=o%11%10)===e.charAt(i-1)}}(n);break;case"lu":o=function(t){var e=t;return/^LU[0-9]{8}$/.test(e)&&(e=e.substr(2)),/^[0-9]{8}$/.test(e)?{meta:{},valid:"".concat(parseInt(e.substr(0,6),10)%89)===e.substr(6,2)}:{meta:{},valid:!1}}(n);break;case"lv":o=function(t){var e=t;if(/^LV[0-9]{11}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{11}$/.test(e))return{meta:{},valid:!1};var n,i=parseInt(e.charAt(0),10),r=e.length,o=0,a=[];if(i>3){for(o=0,a=[9,1,4,8,3,10,2,5,7,6,1],n=0;n<r;n++)o+=parseInt(e.charAt(n),10)*a[n];return{meta:{},valid:3==(o%=11)}}var s=parseInt(e.substr(0,2),10),l=parseInt(e.substr(2,2),10),u=parseInt(e.substr(4,2),10);if(!b(u=u+1800+100*parseInt(e.charAt(6),10),l,s))return{meta:{},valid:!1};for(o=0,a=[10,5,8,4,2,1,6,3,7,9],n=0;n<r-1;n++)o+=parseInt(e.charAt(n),10)*a[n];return{meta:{},valid:"".concat(o=(o+1)%11%10)===e.charAt(r-1)}}(n);break;case"mt":o=function(t){var e=t;if(/^MT[0-9]{8}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{8}$/.test(e))return{meta:{},valid:!1};for(var n=[3,4,6,7,8,9,10,1],i=0,r=0;r<8;r++)i+=parseInt(e.charAt(r),10)*n[r];return{meta:{},valid:i%37==0}}(n);break;case"nl":o=function(t){var e=t;if(/^NL[0-9]{9}B[0-9]{2}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{9}B[0-9]{2}$/.test(e))return{meta:{},valid:!1};for(var n=[9,8,7,6,5,4,3,2],i=0,r=0;r<8;r++)i+=parseInt(e.charAt(r),10)*n[r];return(i%=11)>9&&(i=0),{meta:{},valid:"".concat(i)===e.substr(8,1)}}(n);break;case"no":o=function(t){var e=t;if(/^NO[0-9]{9}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{9}$/.test(e))return{meta:{},valid:!1};for(var n=[3,2,7,6,5,4,3,2],i=0,r=0;r<8;r++)i+=parseInt(e.charAt(r),10)*n[r];return 11==(i=11-i%11)&&(i=0),{meta:{},valid:"".concat(i)===e.substr(8,1)}}(n);break;case"pl":o=function(t){var e=t;if(/^PL[0-9]{10}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{10}$/.test(e))return{meta:{},valid:!1};for(var n=[6,5,7,2,3,4,5,6,7,-1],i=0,r=0;r<10;r++)i+=parseInt(e.charAt(r),10)*n[r];return{meta:{},valid:i%11==0}}(n);break;case"pt":o=function(t){var e=t;if(/^PT[0-9]{9}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{9}$/.test(e))return{meta:{},valid:!1};for(var n=[9,8,7,6,5,4,3,2],i=0,r=0;r<8;r++)i+=parseInt(e.charAt(r),10)*n[r];return(i=11-i%11)>9&&(i=0),{meta:{},valid:"".concat(i)===e.substr(8,1)}}(n);break;case"ro":o=function(t){var e=t;if(/^RO[1-9][0-9]{1,9}$/.test(e)&&(e=e.substr(2)),!/^[1-9][0-9]{1,9}$/.test(e))return{meta:{},valid:!1};for(var n=e.length,i=[7,5,3,2,1,7,5,3,2].slice(10-n),r=0,o=0;o<n-1;o++)r+=parseInt(e.charAt(o),10)*i[o];return{meta:{},valid:"".concat(r=10*r%11%10)===e.substr(n-1,1)}}(n);break;case"rs":o=function(t){var e=t;if(/^RS[0-9]{9}$/.test(e)&&(e=e.substr(2)),!/^[0-9]{9}$/.test(e))return{meta:{},valid:!1};for(var n=10,i=0,r=0;r<8;r++)0==(i=(parseInt(e.charAt(r),10)+n)%10)&&(i=10),n=2*i%11;return{meta:{},valid:(n+parseInt(e.substr(8,1),10))%10==1}}(n);break;case"ru":o=function(t){var e=t;if(/^RU([0-9]{10}|[0-9]{12})$/.test(e)&&(e=e.substr(2)),!/^([0-9]{10}|[0-9]{12})$/.test(e))return{meta:{},valid:!1};var n=0;if(10===e.length){var i=[2,4,10,3,5,9,4,6,8,0],r=0;for(n=0;n<10;n++)r+=parseInt(e.charAt(n),10)*i[n];return(r%=11)>9&&(r%=10),{meta:{},valid:"".concat(r)===e.substr(9,1)}}if(12===e.length){var o=[7,2,4,10,3,5,9,4,6,8,0],a=[3,7,2,4,10,3,5,9,4,6,8,0],s=0,l=0;for(n=0;n<11;n++)s+=parseInt(e.charAt(n),10)*o[n],l+=parseInt(e.charAt(n),10)*a[n];return(s%=11)>9&&(s%=10),(l%=11)>9&&(l%=10),{meta:{},valid:"".concat(s)===e.substr(10,1)&&"".concat(l)===e.substr(11,1)}}return{meta:{},valid:!0}}(n);break;case"se":o=M(n);break;case"si":o=function(t){var e=t.match(/^(SI)?([1-9][0-9]{7})$/);if(!e)return{meta:{},valid:!1};for(var n=e[1]?t.substr(2):t,i=[8,7,6,5,4,3,2],r=0,o=0;o<7;o++)r+=parseInt(n.charAt(o),10)*i[o];return 10==(r=11-r%11)&&(r=0),{meta:{},valid:"".concat(r)===n.substr(7,1)}}(n);break;case"sk":o=function(t){var e=t;return/^SK[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(e)&&(e=e.substr(2)),/^[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(e)?{meta:{},valid:parseInt(e,10)%11==0}:{meta:{},valid:!1}}(n);break;case"ve":o=function(t){var e=t;if(/^VE[VEJPG][0-9]{9}$/.test(e)&&(e=e.substr(2)),!/^[VEJPG][0-9]{9}$/.test(e))return{meta:{},valid:!1};for(var n=[3,2,7,6,5,4,3,2],i={E:8,G:20,J:12,P:16,V:4}[e.charAt(0)],r=0;r<8;r++)i+=parseInt(e.charAt(r+1),10)*n[r];return(11==(i=11-i%11)||10===i)&&(i=0),{meta:{},valid:"".concat(i)===e.substr(9,1)}}(n);break;case"za":o=function(t){var e=t;return/^ZA4[0-9]{9}$/.test(e)&&(e=e.substr(2)),{meta:{},valid:/^4[0-9]{9}$/.test(e)}}(n)}var a=m(e.l10n?i.message||e.l10n.vat.country:i.message,e.l10n?e.l10n.vat.countries[r.toUpperCase()]:r.toUpperCase());return Object.assign({},{message:a},o)}}},vin:function(){return{validate:function(t){if(""===t.value)return{valid:!0};if(!/^[a-hj-npr-z0-9]{8}[0-9xX][a-hj-npr-z0-9]{8}$/i.test(t.value))return{valid:!1};for(var e=t.value.toUpperCase(),n={A:1,B:2,C:3,D:4,E:5,F:6,G:7,H:8,J:1,K:2,L:3,M:4,N:5,P:7,R:9,S:2,T:3,U:4,V:5,W:6,X:7,Y:8,Z:9,0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9},i=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],r=e.length,o=0,a=0;a<r;a++)o+=n["".concat(e.charAt(a))]*i[a];var s="".concat(o%11);return"10"===s&&(s="X"),{valid:s===e.charAt(8)}}}},zipCode:function(){var t=["AT","BG","BR","CA","CH","CZ","DE","DK","ES","FR","GB","IE","IN","IT","MA","NL","PL","PT","RO","RU","SE","SG","SK","US"];return{validate:function(e){var n=Object.assign({},e.options);if(""===e.value||!n.country)return{valid:!0};var i=e.value.substr(0,2);if(!(i="function"==typeof n.country?n.country.call(this):n.country)||-1===t.indexOf(i.toUpperCase()))return{valid:!0};var r=!1;switch(i=i.toUpperCase()){case"AT":r=/^([1-9]{1})(\d{3})$/.test(e.value);break;case"BG":r=/^([1-9]{1}[0-9]{3})$/.test(e.value);break;case"BR":r=/^(\d{2})([\.]?)(\d{3})([\-]?)(\d{3})$/.test(e.value);break;case"CA":r=/^(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|X|Y){1}[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}\s?[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}[0-9]{1}$/i.test(e.value);break;case"CH":r=/^([1-9]{1})(\d{3})$/.test(e.value);break;case"CZ":r=/^(\d{3})([ ]?)(\d{2})$/.test(e.value);break;case"DE":r=/^(?!01000|99999)(0[1-9]\d{3}|[1-9]\d{4})$/.test(e.value);break;case"DK":r=/^(DK(-|\s)?)?\d{4}$/i.test(e.value);break;case"ES":r=/^(?:0[1-9]|[1-4][0-9]|5[0-2])\d{3}$/.test(e.value);break;case"FR":r=/^[0-9]{5}$/i.test(e.value);break;case"GB":r=function(t){for(var e="[ABCDEFGHIJKLMNOPRSTUWYZ]",n="[ABCDEFGHKLMNOPQRSTUVWXY]",i="[ABDEFGHJLNPQRSTUWXYZ]",r=0,o=[new RegExp("^(".concat(e,"{1}").concat(n,"?[0-9]{1,2})(\\s*)([0-9]{1}").concat(i,"{2})$"),"i"),new RegExp("^(".concat(e,"{1}[0-9]{1}").concat("[ABCDEFGHJKPMNRSTUVWXY]","{1})(\\s*)([0-9]{1}").concat(i,"{2})$"),"i"),new RegExp("^(".concat(e,"{1}").concat(n,"{1}?[0-9]{1}").concat("[ABEHMNPRVWXY]","{1})(\\s*)([0-9]{1}").concat(i,"{2})$"),"i"),new RegExp("^(BF1)(\\s*)([0-6]{1}[ABDEFGHJLNPQRST]{1}[ABDEFGHJLNPQRSTUWZYZ]{1})$","i"),/^(GIR)(\s*)(0AA)$/i,/^(BFPO)(\s*)([0-9]{1,4})$/i,/^(BFPO)(\s*)(c\/o\s*[0-9]{1,3})$/i,/^([A-Z]{4})(\s*)(1ZZ)$/i,/^(AI-2640)$/i];r<o.length;r++)if(o[r].test(t))return!0;return!1}(e.value);break;case"IN":r=/^\d{3}\s?\d{3}$/.test(e.value);break;case"IE":r=/^(D6W|[ACDEFHKNPRTVWXY]\d{2})\s[0-9ACDEFHKNPRTVWXY]{4}$/.test(e.value);break;case"IT":r=/^(I-|IT-)?\d{5}$/i.test(e.value);break;case"MA":r=/^[1-9][0-9]{4}$/i.test(e.value);break;case"NL":r=/^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(e.value);break;case"PL":r=/^[0-9]{2}\-[0-9]{3}$/.test(e.value);break;case"PT":r=/^[1-9]\d{3}-\d{3}$/.test(e.value);break;case"RO":r=/^(0[1-8]{1}|[1-9]{1}[0-5]{1})?[0-9]{4}$/i.test(e.value);break;case"RU":r=/^[0-9]{6}$/i.test(e.value);break;case"SE":r=/^(S-)?\d{3}\s?\d{2}$/i.test(e.value);break;case"SG":r=/^([0][1-9]|[1-6][0-9]|[7]([0-3]|[5-9])|[8][0-2])(\d{4})$/i.test(e.value);break;case"SK":r=/^(\d{3})([ ]?)(\d{2})$/.test(e.value);break;case"US":default:r=/^\d{4,5}([\-]?\d{4})?$/.test(e.value)}return{message:m(e.l10n?n.message||e.l10n.zipCode.country:n.message,e.l10n?e.l10n.zipCode.countries[i]:i),valid:r}}}}},j=function(){function t(e,n){a(this,t),this.elements={},this.ee={fns:{},clear:function(){this.fns={}},emit:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];(this.fns[t]||[]).map(function(t){return t.apply(t,n)})},off:function(t,e){if(this.fns[t]){var n=this.fns[t].indexOf(e);n>=0&&this.fns[t].splice(n,1)}},on:function(t,e){(this.fns[t]=this.fns[t]||[]).push(e)}},this.filter={filters:{},add:function(t,e){(this.filters[t]=this.filters[t]||[]).push(e)},clear:function(){this.filters={}},execute:function(t,e,n){if(!this.filters[t]||!this.filters[t].length)return e;for(var i=e,r=this.filters[t],o=r.length,a=0;a<o;a++)i=r[a].apply(i,n);return i},remove:function(t,e){this.filters[t]&&(this.filters[t]=this.filters[t].filter(function(t){return t!==e}))}},this.plugins={},this.results=new Map,this.validators={},this.form=e,this.fields=n}return l(t,[{key:"on",value:function(t,e){return this.ee.on(t,e),this}},{key:"off",value:function(t,e){return this.ee.off(t,e),this}},{key:"emit",value:function(t){for(var e,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return(e=this.ee).emit.apply(e,[t].concat(i)),this}},{key:"registerPlugin",value:function(t,e){if(this.plugins[t])throw new Error("The plguin ".concat(t," is registered"));return e.setCore(this),e.install(),this.plugins[t]=e,this}},{key:"deregisterPlugin",value:function(t){var e=this.plugins[t];return e&&e.uninstall(),delete this.plugins[t],this}},{key:"registerValidator",value:function(t,e){if(this.validators[t])throw new Error("The validator ".concat(t," is registered"));return this.validators[t]=e,this}},{key:"registerFilter",value:function(t,e){return this.filter.add(t,e),this}},{key:"deregisterFilter",value:function(t,e){return this.filter.remove(t,e),this}},{key:"executeFilter",value:function(t,e,n){return this.filter.execute(t,e,n)}},{key:"addField",value:function(t,e){var n=Object.assign({},{selector:"",validators:{}},e);return this.fields[t]=this.fields[t]?{selector:n.selector||this.fields[t].selector,validators:Object.assign({},this.fields[t].validators,n.validators)}:n,this.elements[t]=this.queryElements(t),this.emit("core.field.added",{elements:this.elements[t],field:t,options:this.fields[t]}),this}},{key:"removeField",value:function(t){if(!this.fields[t])throw new Error("The field ".concat(t," validators are not defined. Please ensure the field is added first"));var e=this.elements[t],n=this.fields[t];return delete this.elements[t],delete this.fields[t],this.emit("core.field.removed",{elements:e,field:t,options:n}),this}},{key:"validate",value:function(){var t=this;return this.emit("core.form.validating"),this.filter.execute("validate-pre",Promise.resolve(),[]).then(function(){return Promise.all(Object.keys(t.fields).map(function(e){return t.validateField(e)})).then(function(e){switch(!0){case-1!==e.indexOf("Invalid"):return t.emit("core.form.invalid"),Promise.resolve("Invalid");case-1!==e.indexOf("NotValidated"):return t.emit("core.form.notvalidated"),Promise.resolve("NotValidated");default:return t.emit("core.form.valid"),Promise.resolve("Valid")}})})}},{key:"validateField",value:function(t){var e=this,n=this.results.get(t);if("Valid"===n||"Invalid"===n)return Promise.resolve(n);this.emit("core.field.validating",t);var i=this.elements[t];if(0===i.length)return this.emit("core.field.valid",t),Promise.resolve("Valid");var r=i[0].getAttribute("type");return"radio"===r||"checkbox"===r||1===i.length?this.validateElement(t,i[0]):Promise.all(i.map(function(n){return e.validateElement(t,n)})).then(function(n){switch(!0){case-1!==n.indexOf("Invalid"):return e.emit("core.field.invalid",t),e.results.set(t,"Invalid"),Promise.resolve("Invalid");case-1!==n.indexOf("NotValidated"):return e.emit("core.field.notvalidated",t),e.results.delete(t),Promise.resolve("NotValidated");default:return e.emit("core.field.valid",t),e.results.set(t,"Valid"),Promise.resolve("Valid")}})}},{key:"validateElement",value:function(t,e){var n=this;this.results.delete(t);var i=this.elements[t];if(this.filter.execute("element-ignored",!1,[t,e,i]))return this.emit("core.element.ignored",{element:e,elements:i,field:t}),Promise.resolve("Ignored");var r=this.fields[t].validators;this.emit("core.element.validating",{element:e,elements:i,field:t});var o=Object.keys(r).map(function(i){return function(){return n.executeValidator(t,e,i,r[i])}});return this.waterfall(o).then(function(r){var o=-1===r.indexOf("Invalid");n.emit("core.element.validated",{element:e,elements:i,field:t,valid:o});var a=e.getAttribute("type");return("radio"===a||"checkbox"===a||1===i.length)&&n.emit(o?"core.field.valid":"core.field.invalid",t),Promise.resolve(o?"Valid":"Invalid")}).catch(function(r){return n.emit("core.element.notvalidated",{element:e,elements:i,field:t}),Promise.resolve(r)})}},{key:"executeValidator",value:function(t,e,n,i){var r=this,o=this.elements[t],a=this.filter.execute("validator-name",n,[n,t]);if(i.message=this.filter.execute("validator-message",i.message,[this.locale,t,a]),!this.validators[a]||!1===i.enabled)return this.emit("core.validator.validated",{element:e,elements:o,field:t,result:this.normalizeResult(t,a,{valid:!0}),validator:a}),Promise.resolve("Valid");var s=this.validators[a],l=this.getElementValue(t,e,a);if(!this.filter.execute("field-should-validate",!0,[t,e,l,n]))return this.emit("core.validator.notvalidated",{element:e,elements:o,field:t,validator:n}),Promise.resolve("NotValidated");this.emit("core.validator.validating",{element:e,elements:o,field:t,validator:n});var u=s().validate({element:e,elements:o,field:t,l10n:this.localization,options:i,value:l});if("function"==typeof u.then)return u.then(function(i){var a=r.normalizeResult(t,n,i);return r.emit("core.validator.validated",{element:e,elements:o,field:t,result:a,validator:n}),a.valid?"Valid":"Invalid"});var c=this.normalizeResult(t,n,u);return this.emit("core.validator.validated",{element:e,elements:o,field:t,result:c,validator:n}),Promise.resolve(c.valid?"Valid":"Invalid")}},{key:"getElementValue",value:function(t,e,n){var i=v(this.form,0,e,this.elements[t]);return this.filter.execute("field-value",i,[i,t,e,n])}},{key:"getElements",value:function(t){return this.elements[t]}},{key:"getFields",value:function(){return this.fields}},{key:"getFormElement",value:function(){return this.form}},{key:"getLocale",value:function(){return this.locale}},{key:"getPlugin",value:function(t){return this.plugins[t]}},{key:"updateFieldStatus",value:function(t,e,n){var i=this,r=this.elements[t],o=r[0].getAttribute("type");if(("radio"===o||"checkbox"===o?[r[0]]:r).forEach(function(r){return i.updateElementStatus(t,r,e,n)}),!n)switch(e){case"NotValidated":this.emit("core.field.notvalidated",t),this.results.delete(t);break;case"Validating":this.emit("core.field.validating",t),this.results.delete(t);break;case"Valid":this.emit("core.field.valid",t),this.results.set(t,"Valid");break;case"Invalid":this.emit("core.field.invalid",t),this.results.set(t,"Invalid")}return this}},{key:"updateElementStatus",value:function(t,e,n,i){var r=this,o=this.elements[t],a=this.fields[t].validators,s=i?[i]:Object.keys(a);switch(n){case"NotValidated":s.forEach(function(n){return r.emit("core.validator.notvalidated",{element:e,elements:o,field:t,validator:n})}),this.emit("core.element.notvalidated",{element:e,elements:o,field:t});break;case"Validating":s.forEach(function(n){return r.emit("core.validator.validating",{element:e,elements:o,field:t,validator:n})}),this.emit("core.element.validating",{element:e,elements:o,field:t});break;case"Valid":s.forEach(function(n){return r.emit("core.validator.validated",{element:e,field:t,result:{message:a[n].message,valid:!0},validator:n})}),this.emit("core.element.validated",{element:e,elements:o,field:t,valid:!0});break;case"Invalid":s.forEach(function(n){return r.emit("core.validator.validated",{element:e,field:t,result:{message:a[n].message,valid:!1},validator:n})}),this.emit("core.element.validated",{element:e,elements:o,field:t,valid:!1})}return this}},{key:"resetForm",value:function(t){var e=this;return Object.keys(this.fields).forEach(function(n){return e.resetField(n,t)}),this.emit("core.form.reset",{reset:t}),this}},{key:"resetField",value:function(t,e){if(e){var n=this.elements[t],i=n[0].getAttribute("type");n.forEach(function(t){"radio"===i||"checkbox"===i?(t.removeAttribute("selected"),t.removeAttribute("checked"),t.checked=!1):(t.setAttribute("value",""),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(t.value=""))})}return this.updateFieldStatus(t,"NotValidated"),this.emit("core.field.reset",{field:t,reset:e}),this}},{key:"revalidateField",value:function(t){return this.updateFieldStatus(t,"NotValidated"),this.validateField(t)}},{key:"disableValidator",value:function(t,e){return this.toggleValidator(!1,t,e)}},{key:"enableValidator",value:function(t,e){return this.toggleValidator(!0,t,e)}},{key:"updateValidatorOption",value:function(t,e,n,i){return this.fields[t]&&this.fields[t].validators&&this.fields[t].validators[e]&&(this.fields[t].validators[e][n]=i),this}},{key:"destroy",value:function(){var t=this;return Object.keys(this.plugins).forEach(function(e){return t.plugins[e].uninstall()}),this.ee.clear(),this.filter.clear(),this.results.clear(),this.plugins={},this}},{key:"setLocale",value:function(t,e){return this.locale=t,this.localization=e,this}},{key:"waterfall",value:function(t){return t.reduce(function(t,e,n,i){return t.then(function(t){return e().then(function(e){return t.push(e),t})})},Promise.resolve([]))}},{key:"queryElements",value:function(t){var e=this.fields[t].selector?"#"===this.fields[t].selector.charAt(0)?'[id="'.concat(this.fields[t].selector.substring(1),'"]'):this.fields[t].selector:'[name="'.concat(t,'"]');return[].slice.call(this.form.querySelectorAll(e))}},{key:"normalizeResult",value:function(t,e,n){var i=this.fields[t].validators[e];return Object.assign({},n,{message:n.message||(i?i.message:"")||(this.localization&&this.localization[e]&&this.localization[e].default?this.localization[e].default:"")||"The field ".concat(t," is not valid")})}},{key:"toggleValidator",value:function(t,e,n){var i=this,r=this.fields[e].validators;return n&&r&&r[n]?this.fields[e].validators[n].enabled=t:n||Object.keys(r).forEach(function(n){return i.fields[e].validators[n].enabled=t}),this.updateFieldStatus(e,"NotValidated",n)}}]),t}();var R=function(){function t(e){a(this,t),this.opts=e}return l(t,[{key:"setCore",value:function(t){return this.core=t,this}},{key:"install",value:function(){}},{key:"uninstall",value:function(){}}]),t}(),F={getFieldValue:v},$=function(t){function e(t){var n;return a(this,e),(n=p(this,d(e).call(this,t))).opts=t||{},n.validatorNameFilter=n.getValidatorName.bind(h(n)),n}return c(e,R),l(e,[{key:"install",value:function(){this.core.registerFilter("validator-name",this.validatorNameFilter)}},{key:"uninstall",value:function(){this.core.deregisterFilter("validator-name",this.validatorNameFilter)}},{key:"getValidatorName",value:function(t,e){return this.opts[t]||t}}]),e}(),H=function(t){function e(){var t;return a(this,e),(t=p(this,d(e).call(this,{}))).elementValidatedHandler=t.onElementValidated.bind(h(t)),t.fieldValidHandler=t.onFieldValid.bind(h(t)),t.fieldInvalidHandler=t.onFieldInvalid.bind(h(t)),t.messageDisplayedHandler=t.onMessageDisplayed.bind(h(t)),t}return c(e,R),l(e,[{key:"install",value:function(){this.core.on("core.field.valid",this.fieldValidHandler).on("core.field.invalid",this.fieldInvalidHandler).on("core.element.validated",this.elementValidatedHandler).on("plugins.message.displayed",this.messageDisplayedHandler)}},{key:"uninstall",value:function(){this.core.off("core.field.valid",this.fieldValidHandler).off("core.field.invalid",this.fieldInvalidHandler).off("core.element.validated",this.elementValidatedHandler).off("plugins.message.displayed",this.messageDisplayedHandler)}},{key:"onElementValidated",value:function(t){t.valid&&(t.element.setAttribute("aria-invalid","false"),t.element.removeAttribute("aria-describedby"))}},{key:"onFieldValid",value:function(t){var e=this.core.getElements(t);e&&e.forEach(function(t){t.setAttribute("aria-invalid","false"),t.removeAttribute("aria-describedby")})}},{key:"onFieldInvalid",value:function(t){var e=this.core.getElements(t);e&&e.forEach(function(t){return t.setAttribute("aria-invalid","true")})}},{key:"onMessageDisplayed",value:function(t){t.messageElement.setAttribute("role","alert"),t.messageElement.setAttribute("aria-hidden","false");var e=this.core.getElements(t.field),n=e.indexOf(t.element),i="js-fv-".concat(t.field,"-").concat(n,"-").concat(Date.now(),"-message");t.messageElement.setAttribute("id",i),t.element.setAttribute("aria-describedby",i);var r=t.element.getAttribute("type");("radio"===r||"checkbox"===r)&&e.forEach(function(t){return t.setAttribute("aria-describedby",i)})}}]),e}(),B=function(t){function e(t){var n;return a(this,e),(n=p(this,d(e).call(this,t))).opts=Object.assign({},{html5Input:!1,pluginPrefix:"data-fvp-",prefix:"data-fv-"},t),n}return c(e,R),l(e,[{key:"install",value:function(){var t=this;this.parsePlugins();var e=this.parseOptions();Object.keys(e).forEach(function(n){return t.core.addField(n,e[n])})}},{key:"parseOptions",value:function(){var t=this,e=this.opts.prefix,n={},i=this.core.getFields(),r=this.core.getFormElement();return[].slice.call(r.querySelectorAll("[name], [".concat(e,"field]"))).forEach(function(i){var r=t.parseElement(i);if(!t.isEmptyOption(r)){var o=i.getAttribute("name")||i.getAttribute("".concat(e,"field"));n[o]=Object.assign({},n[o],r)}}),Object.keys(n).forEach(function(t){Object.keys(n[t].validators).forEach(function(e){n[t].validators[e].enabled=n[t].validators[e].enabled||!1,i[t]&&i[t].validators&&i[t].validators[e]&&Object.assign(n[t].validators[e],i[t].validators[e])})}),Object.assign({},i,n)}},{key:"createPluginInstance",value:function(t,e){for(var n=t.split("."),i=window||this,r=0,o=n.length;r<o;r++)i=i[n[r]];if("function"!=typeof i)throw new Error("the plugin ".concat(t," doesn't exist"));return new i(e)}},{key:"parsePlugins",value:function(){for(var t=this,e=this.core.getFormElement(),n=new RegExp("^".concat(this.opts.pluginPrefix,"([a-z0-9-]+)(___)*([a-z0-9-]+)*$")),i=e.attributes.length,r={},o=0;o<i;o++){var a=e.attributes[o].name,s=e.attributes[o].value,l=n.exec(a);if(l&&4===l.length){var c=this.toCamelCase(l[1]);r[c]=Object.assign({},l[3]?u({},this.toCamelCase(l[3]),s):{enabled:""===s||"true"===s},r[c])}}Object.keys(r).forEach(function(e){var n=r[e],i=n.enabled,o=n.class;if(i&&o){delete n.enabled,delete n.clazz;var a=t.createPluginInstance(o,n);t.core.registerPlugin(e,a)}})}},{key:"isEmptyOption",value:function(t){var e=t.validators;return 0===Object.keys(e).length&&e.constructor===Object}},{key:"parseElement",value:function(t){for(var e=new RegExp("^".concat(this.opts.prefix,"([a-z0-9-]+)(___)*([a-z0-9-]+)*$")),n=t.attributes.length,i={},r=t.getAttribute("type"),o=0;o<n;o++){var a=t.attributes[o].name,s=t.attributes[o].value;if(this.opts.html5Input)switch(!0){case"minlength"===a:i.stringLength=Object.assign({},{enabled:!0,min:parseInt(s,10)},i.stringLength);break;case"maxlength"===a:i.stringLength=Object.assign({},{enabled:!0,max:parseInt(s,10)},i.stringLength);break;case"pattern"===a:i.regexp=Object.assign({},{enabled:!0,regexp:s},i.regexp);break;case"required"===a:i.notEmpty=Object.assign({},{enabled:!0},i.notEmpty);break;case"type"===a&&"color"===s:i.color=Object.assign({},{enabled:!0,type:"hex"},i.color);break;case"type"===a&&"email"===s:i.emailAddress=Object.assign({},{enabled:!0},i.emailAddress);break;case"type"===a&&"url"===s:i.uri=Object.assign({},{enabled:!0},i.uri);break;case"type"===a&&"range"===s:i.between=Object.assign({},{enabled:!0,max:parseFloat(t.getAttribute("max")),min:parseFloat(t.getAttribute("min"))},i.between);break;case"min"===a&&"date"!==r&&"range"!==r:i.greaterThan=Object.assign({},{enabled:!0,min:parseFloat(s)},i.greaterThan);break;case"max"===a&&"date"!==r&&"range"!==r:i.lessThan=Object.assign({},{enabled:!0,max:parseFloat(s)},i.lessThan)}var l=e.exec(a);if(l&&4===l.length){var c=this.toCamelCase(l[1]);i[c]=Object.assign({},l[3]?u({},this.toCamelCase(l[3]),s):{enabled:""===s||"true"===s},i[c])}}return{validators:i}}},{key:"toUpperCase",value:function(t){return t.charAt(1).toUpperCase()}},{key:"toCamelCase",value:function(t){return t.replace(/-./g,this.toUpperCase)}}]),e}(),q=function(t){function e(){var t;return a(this,e),(t=p(this,d(e).call(this,{}))).onValidHandler=t.onFormValid.bind(h(t)),t}return c(e,R),l(e,[{key:"install",value:function(){if(this.core.getFormElement().querySelectorAll('[type="submit"][name="submit"]').length)throw new Error("Do not use `submit` for the name attribute of submit button");this.core.on("core.form.valid",this.onValidHandler)}},{key:"uninstall",value:function(){this.core.off("core.form.valid",this.onValidHandler)}},{key:"onFormValid",value:function(){var t=this.core.getFormElement();t instanceof HTMLFormElement&&t.submit()}}]),e}(),z=function(t){function e(t){var n;return a(this,e),(n=p(this,d(e).call(this,t))).opts=t||{},n.triggerExecutedHandler=n.onTriggerExecuted.bind(h(n)),n}return c(e,R),l(e,[{key:"install",value:function(){this.core.on("plugins.trigger.executed",this.triggerExecutedHandler)}},{key:"uninstall",value:function(){this.core.off("plugins.trigger.executed",this.triggerExecutedHandler)}},{key:"onTriggerExecuted",value:function(t){if(this.opts[t.field]){var e=this.opts[t.field].split(" "),n=!0,i=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value.trim();this.opts[s]&&this.core.revalidateField(s)}}catch(t){i=!0,r=t}finally{try{!n&&null!=a.return&&a.return()}finally{if(i)throw r}}}}}]),e}(),U=function(t){function e(t){var n;return a(this,e),(n=p(this,d(e).call(this,t))).opts=Object.assign({},{excluded:e.defaultIgnore},t),n.ignoreValidationFilter=n.ignoreValidation.bind(h(n)),n}return c(e,R),l(e,[{key:"install",value:function(){this.core.registerFilter("element-ignored",this.ignoreValidationFilter)}},{key:"uninstall",value:function(){this.core.deregisterFilter("element-ignored",this.ignoreValidationFilter)}},{key:"ignoreValidation",value:function(t,e,n){return this.opts.excluded.apply(this,[t,e,n])}}],[{key:"defaultIgnore",value:function(t,e,n){var i=!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length),r=e.getAttribute("disabled");return""===r||"disabled"===r||"hidden"===e.getAttribute("type")||!i}}]),e}(),V=function(t){function e(t){var n;return a(this,e),(n=p(this,d(e).call(this,t))).statuses=new Map,n.opts=Object.assign({},{onStatusChanged:function(){}},t),n.elementValidatingHandler=n.onElementValidating.bind(h(n)),n.elementValidatedHandler=n.onElementValidated.bind(h(n)),n.elementNotValidatedHandler=n.onElementNotValidated.bind(h(n)),n.elementIgnoredHandler=n.onElementIgnored.bind(h(n)),n.fieldAddedHandler=n.onFieldAdded.bind(h(n)),n.fieldRemovedHandler=n.onFieldRemoved.bind(h(n)),n}return c(e,R),l(e,[{key:"install",value:function(){this.core.on("core.element.validating",this.elementValidatingHandler).on("core.element.validated",this.elementValidatedHandler).on("core.element.notvalidated",this.elementNotValidatedHandler).on("core.element.ignored",this.elementIgnoredHandler).on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler)}},{key:"uninstall",value:function(){this.statuses.clear(),this.core.off("core.element.validating",this.elementValidatingHandler).off("core.element.validated",this.elementValidatedHandler).off("core.element.notvalidated",this.elementNotValidatedHandler).off("core.element.ignored",this.elementIgnoredHandler).off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler)}},{key:"areFieldsValid",value:function(){return Array.from(this.statuses.values()).every(function(t){return"Valid"===t||"NotValidated"===t||"Ignored"===t})}},{key:"getStatuses",value:function(){return this.statuses}},{key:"onFieldAdded",value:function(t){this.statuses.set(t.field,"NotValidated")}},{key:"onFieldRemoved",value:function(t){this.statuses.has(t.field)&&this.statuses.delete(t.field),this.opts.onStatusChanged(this.areFieldsValid())}},{key:"onElementValidating",value:function(t){this.statuses.set(t.field,"Validating"),this.opts.onStatusChanged(!1)}},{key:"onElementValidated",value:function(t){this.statuses.set(t.field,t.valid?"Valid":"Invalid"),t.valid?this.opts.onStatusChanged(this.areFieldsValid()):this.opts.onStatusChanged(!1)}},{key:"onElementNotValidated",value:function(t){this.statuses.set(t.field,"NotValidated"),this.opts.onStatusChanged(!1)}},{key:"onElementIgnored",value:function(t){this.statuses.set(t.field,"Ignored"),this.opts.onStatusChanged(this.areFieldsValid())}}]),e}();function K(t,e){var n=[],i=[];Object.keys(e).forEach(function(t){t&&(e[t]?n.push(t):i.push(t))}),i.forEach(function(e){return function(t,e){e.split(" ").forEach(function(e){t.classList?t.classList.remove(e):t.className=t.className.replace(e,"")})}(t,e)}),n.forEach(function(e){return function(t,e){e.split(" ").forEach(function(e){t.classList?t.classList.add(e):" ".concat(t.className," ").indexOf(" ".concat(e," "))&&(t.className+=" ".concat(e))})}(t,e)})}function W(t,e){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return n?n.call(t,e):[].slice.call(t.parentElement.querySelectorAll(e)).indexOf(t)>=0}function G(t,e){for(var n=t;n&&!W(n,e);)n=n.parentElement;return n}var Y=function(t){function e(t){var n;return a(this,e),(n=p(this,d(e).call(this,t))).messages=new Map,n.defaultContainer=document.createElement("div"),n.opts=Object.assign({},{container:function(t,e){return n.defaultContainer}},t),n.elementIgnoredHandler=n.onElementIgnored.bind(h(n)),n.fieldAddedHandler=n.onFieldAdded.bind(h(n)),n.fieldRemovedHandler=n.onFieldRemoved.bind(h(n)),n.validatorValidatedHandler=n.onValidatorValidated.bind(h(n)),n.validatorNotValidatedHandler=n.onValidatorNotValidated.bind(h(n)),n}return c(e,R),l(e,[{key:"install",value:function(){this.core.getFormElement().appendChild(this.defaultContainer),this.core.on("core.element.ignored",this.elementIgnoredHandler).on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler).on("core.validator.validated",this.validatorValidatedHandler).on("core.validator.notvalidated",this.validatorNotValidatedHandler)}},{key:"uninstall",value:function(){this.core.getFormElement().removeChild(this.defaultContainer),this.messages.forEach(function(t){return t.parentNode.removeChild(t)}),this.messages.clear(),this.core.off("core.element.ignored",this.elementIgnoredHandler).off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler).off("core.validator.validated",this.validatorValidatedHandler).off("core.validator.notvalidated",this.validatorNotValidatedHandler)}},{key:"onFieldAdded",value:function(t){var e=this,n=t.elements;n&&(n.forEach(function(t){var n=e.messages.get(t);n&&(n.parentNode.removeChild(n),e.messages.delete(t))}),this.prepareFieldContainer(t.field,n))}},{key:"onFieldRemoved",value:function(t){var e=this;if(t.elements.length&&t.field){var n=t.elements[0].getAttribute("type");("radio"===n||"checkbox"===n?[t.elements[0]]:t.elements).forEach(function(t){if(e.messages.has(t)){var n=e.messages.get(t);n.parentNode.removeChild(n),e.messages.delete(t)}})}}},{key:"prepareFieldContainer",value:function(t,e){var n=this;if(e.length){var i=e[0].getAttribute("type");"radio"===i||"checkbox"===i?this.prepareElementContainer(t,e[0],e):e.forEach(function(i){return n.prepareElementContainer(t,i,e)})}}},{key:"prepareElementContainer",value:function(t,e,n){var i;switch(!0){case"string"==typeof this.opts.container:var r=this.opts.container;r="#"===r.charAt(0)?'[id="'.concat(r.substring(1),'"]'):r,i=this.core.getFormElement().querySelector(r);break;default:i=this.opts.container(t,e)}var o=document.createElement("div");i.appendChild(o),K(o,{"fv-plugins-message-container":!0}),this.core.emit("plugins.message.placed",{element:e,elements:n,field:t,messageElement:o}),this.messages.set(e,o)}},{key:"getMessage",value:function(t){return"string"==typeof t.message?t.message:t.message[this.core.getLocale()]}},{key:"onValidatorValidated",value:function(t){var e=t.elements,n=t.element.getAttribute("type"),i="radio"===n||"checkbox"===n?e[0]:t.element;if(this.messages.has(i)){var r=this.messages.get(i),o=r.querySelector('[data-field="'.concat(t.field,'"][data-validator="').concat(t.validator,'"]'));if(o||t.result.valid)o&&!t.result.valid?(o.innerHTML=this.getMessage(t.result),this.core.emit("plugins.message.displayed",{element:t.element,field:t.field,message:t.result.message,messageElement:o,meta:t.result.meta,validator:t.validator})):o&&t.result.valid&&r.removeChild(o);else{var a=document.createElement("div");a.innerHTML=this.getMessage(t.result),a.setAttribute("data-field",t.field),a.setAttribute("data-validator",t.validator),this.opts.clazz&&K(a,u({},this.opts.clazz,!0)),r.appendChild(a),this.core.emit("plugins.message.displayed",{element:t.element,field:t.field,message:t.result.message,messageElement:a,meta:t.result.meta,validator:t.validator})}}}},{key:"onValidatorNotValidated",value:function(t){var e=t.elements,n=t.element.getAttribute("type"),i="radio"===n||"checkbox"===n?e[0]:t.element;if(this.messages.has(i)){var r=this.messages.get(i),o=r.querySelector('[data-field="'.concat(t.field,'"][data-validator="').concat(t.validator,'"]'));o&&r.removeChild(o)}}},{key:"onElementIgnored",value:function(t){var e=t.elements,n=t.element.getAttribute("type"),i="radio"===n||"checkbox"===n?e[0]:t.element;if(this.messages.has(i)){var r=this.messages.get(i);[].slice.call(r.querySelectorAll('[data-field="'.concat(t.field,'"]'))).forEach(function(t){r.removeChild(t)})}}}],[{key:"getClosestContainer",value:function(t,e,n){for(var i=t;i&&i!==e&&(i=i.parentElement,!n.test(i.className)););return i}}]),e}(),Z=function(t){function e(t){var n;return a(this,e),(n=p(this,d(e).call(this,t))).results=new Map,n.containers=new Map,n.opts=Object.assign({},{defaultMessageContainer:!0,eleInvalidClass:"",eleValidClass:"",rowClasses:"",rowValidatingClass:""},t),n.elementIgnoredHandler=n.onElementIgnored.bind(h(n)),n.elementValidatingHandler=n.onElementValidating.bind(h(n)),n.elementValidatedHandler=n.onElementValidated.bind(h(n)),n.elementNotValidatedHandler=n.onElementNotValidated.bind(h(n)),n.iconPlacedHandler=n.onIconPlaced.bind(h(n)),n.fieldAddedHandler=n.onFieldAdded.bind(h(n)),n.fieldRemovedHandler=n.onFieldRemoved.bind(h(n)),n}return c(e,R),l(e,[{key:"install",value:function(){var t,e=this;K(this.core.getFormElement(),(u(t={},this.opts.formClass,!0),u(t,"fv-plugins-framework",!0),t)),this.core.on("core.element.ignored",this.elementIgnoredHandler).on("core.element.validating",this.elementValidatingHandler).on("core.element.validated",this.elementValidatedHandler).on("core.element.notvalidated",this.elementNotValidatedHandler).on("plugins.icon.placed",this.iconPlacedHandler).on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler),this.opts.defaultMessageContainer&&this.core.registerPlugin("___frameworkMessage",new Y({clazz:this.opts.messageClass,container:function(t,n){var i=G(n,"string"==typeof e.opts.rowSelector?e.opts.rowSelector:e.opts.rowSelector(t,n));return Y.getClosestContainer(n,i,e.opts.rowPattern)}}))}},{key:"uninstall",value:function(){var t;this.results.clear(),this.containers.clear(),K(this.core.getFormElement(),(u(t={},this.opts.formClass,!1),u(t,"fv-plugins-framework",!1),t)),this.core.off("core.element.ignored",this.elementIgnoredHandler).off("core.element.validating",this.elementValidatingHandler).off("core.element.validated",this.elementValidatedHandler).off("core.element.notvalidated",this.elementNotValidatedHandler).off("plugins.icon.placed",this.iconPlacedHandler).off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler)}},{key:"onIconPlaced",value:function(t){}},{key:"onFieldAdded",value:function(t){var e=this,n=t.elements;n&&(n.forEach(function(t){var n,i=e.containers.get(t);i&&(K(i,(u(n={},e.opts.rowInvalidClass,!1),u(n,e.opts.rowValidatingClass,!1),u(n,e.opts.rowValidClass,!1),u(n,"fv-plugins-icon-container",!1),n)),e.containers.delete(t))}),this.prepareFieldContainer(t.field,n))}},{key:"onFieldRemoved",value:function(t){var e=this;t.elements.forEach(function(t){var n,i=e.containers.get(t);i&&K(i,(u(n={},e.opts.rowInvalidClass,!1),u(n,e.opts.rowValidatingClass,!1),u(n,e.opts.rowValidClass,!1),n))})}},{key:"prepareFieldContainer",value:function(t,e){var n=this;if(e.length){var i=e[0].getAttribute("type");"radio"===i||"checkbox"===i?this.prepareElementContainer(t,e[0]):e.forEach(function(e){return n.prepareElementContainer(t,e)})}}},{key:"prepareElementContainer",value:function(t,e){var n,i=G(e,"string"==typeof this.opts.rowSelector?this.opts.rowSelector:this.opts.rowSelector(t,e));i!==e&&(K(i,(u(n={},this.opts.rowClasses,!0),u(n,"fv-plugins-icon-container",!0),n)),this.containers.set(e,i))}},{key:"onElementValidating",value:function(t){var e,n=t.elements,i=t.element.getAttribute("type"),r="radio"===i||"checkbox"===i?n[0]:t.element,o=this.containers.get(r);o&&K(o,(u(e={},this.opts.rowInvalidClass,!1),u(e,this.opts.rowValidatingClass,!0),u(e,this.opts.rowValidClass,!1),e))}},{key:"onElementNotValidated",value:function(t){this.removeClasses(t.element,t.elements)}},{key:"onElementIgnored",value:function(t){this.removeClasses(t.element,t.elements)}},{key:"removeClasses",value:function(t,e){var n,i=t.getAttribute("type"),r="radio"===i||"checkbox"===i?e[0]:t;K(r,(u(n={},this.opts.eleValidClass,!1),u(n,this.opts.eleInvalidClass,!1),n));var o,a=this.containers.get(r);a&&K(a,(u(o={},this.opts.rowInvalidClass,!1),u(o,this.opts.rowValidatingClass,!1),u(o,this.opts.rowValidClass,!1),o))}},{key:"onElementValidated",value:function(t){var e,n=this,i=t.elements,r=t.element.getAttribute("type"),o="radio"===r||"checkbox"===r?i[0]:t.element;K(o,(u(e={},this.opts.eleValidClass,t.valid),u(e,this.opts.eleInvalidClass,!t.valid),e));var a=this.containers.get(o);if(a)if(t.valid){this.results.delete(o);var s,l=!0;if(this.containers.forEach(function(t,e){t===a&&!1===n.results.get(e)&&(l=!1)}),l)K(a,(u(s={},this.opts.rowInvalidClass,!1),u(s,this.opts.rowValidatingClass,!1),u(s,this.opts.rowValidClass,!0),s))}else{var c;this.results.set(o,!1),K(a,(u(c={},this.opts.rowInvalidClass,!0),u(c,this.opts.rowValidatingClass,!1),u(c,this.opts.rowValidClass,!1),c))}}}]),e}(),X=function(t){function e(t){var n;return a(this,e),(n=p(this,d(e).call(this,t))).icons=new Map,n.opts=Object.assign({},{invalid:"fv-plugins-icon--invalid",onPlaced:function(){},onSet:function(){},valid:"fv-plugins-icon--valid",validating:"fv-plugins-icon--validating"},t),n.elementValidatingHandler=n.onElementValidating.bind(h(n)),n.elementValidatedHandler=n.onElementValidated.bind(h(n)),n.elementNotValidatedHandler=n.onElementNotValidated.bind(h(n)),n.elementIgnoredHandler=n.onElementIgnored.bind(h(n)),n.fieldAddedHandler=n.onFieldAdded.bind(h(n)),n}return c(e,R),l(e,[{key:"install",value:function(){this.core.on("core.element.validating",this.elementValidatingHandler).on("core.element.validated",this.elementValidatedHandler).on("core.element.notvalidated",this.elementNotValidatedHandler).on("core.element.ignored",this.elementIgnoredHandler).on("core.field.added",this.fieldAddedHandler)}},{key:"uninstall",value:function(){this.icons.forEach(function(t){return t.parentNode.removeChild(t)}),this.icons.clear(),this.core.off("core.element.validating",this.elementValidatingHandler).off("core.element.validated",this.elementValidatedHandler).off("core.element.notvalidated",this.elementNotValidatedHandler).off("core.element.ignored",this.elementIgnoredHandler).off("core.field.added",this.fieldAddedHandler)}},{key:"onFieldAdded",value:function(t){var e=this,n=t.elements;n&&(n.forEach(function(t){var n=e.icons.get(t);n&&(n.parentNode.removeChild(n),e.icons.delete(t))}),this.prepareFieldIcon(t.field,n))}},{key:"prepareFieldIcon",value:function(t,e){var n=this;if(e.length){var i=e[0].getAttribute("type");"radio"===i||"checkbox"===i?this.prepareElementIcon(t,e[0]):e.forEach(function(e){return n.prepareElementIcon(t,e)})}}},{key:"prepareElementIcon",value:function(t,e){var n=document.createElement("i");n.setAttribute("data-field",t),e.parentNode.insertBefore(n,e.nextSibling),K(n,{"fv-plugins-icon":!0});var i={classes:{invalid:this.opts.invalid,valid:this.opts.valid,validating:this.opts.validating},element:e,field:t,iconElement:n};this.core.emit("plugins.icon.placed",i),this.opts.onPlaced(i),this.icons.set(e,n)}},{key:"onElementValidating",value:function(t){var e,n=this.setClasses(t.field,t.element,t.elements,(u(e={},this.opts.invalid,!1),u(e,this.opts.valid,!1),u(e,this.opts.validating,!0),e)),i={element:t.element,field:t.field,iconElement:n,status:"Validating"};this.core.emit("plugins.icon.set",i),this.opts.onSet(i)}},{key:"onElementValidated",value:function(t){var e,n=this.setClasses(t.field,t.element,t.elements,(u(e={},this.opts.invalid,!t.valid),u(e,this.opts.valid,t.valid),u(e,this.opts.validating,!1),e)),i={element:t.element,field:t.field,iconElement:n,status:t.valid?"Valid":"Invalid"};this.core.emit("plugins.icon.set",i),this.opts.onSet(i)}},{key:"onElementNotValidated",value:function(t){var e,n=this.setClasses(t.field,t.element,t.elements,(u(e={},this.opts.invalid,!1),u(e,this.opts.valid,!1),u(e,this.opts.validating,!1),e)),i={element:t.element,field:t.field,iconElement:n,status:"NotValidated"};this.core.emit("plugins.icon.set",i),this.opts.onSet(i)}},{key:"onElementIgnored",value:function(t){var e,n=this.setClasses(t.field,t.element,t.elements,(u(e={},this.opts.invalid,!1),u(e,this.opts.valid,!1),u(e,this.opts.validating,!1),e)),i={element:t.element,field:t.field,iconElement:n,status:"Ignored"};this.core.emit("plugins.icon.set",i),this.opts.onSet(i)}},{key:"setClasses",value:function(t,e,n,i){var r=e.getAttribute("type"),o="radio"===r||"checkbox"===r?n[0]:e;if(this.icons.has(o)){var a=this.icons.get(o);return K(a,i),a}return null}}]),e}(),Q=function(t){function e(t){var n;return a(this,e),(n=p(this,d(e).call(this,t))).invalidFields=new Map,n.opts=Object.assign({},{enabled:!0},t),n.validatorHandler=n.onValidatorValidated.bind(h(n)),n.shouldValidateFilter=n.shouldValidate.bind(h(n)),n.fieldAddedHandler=n.onFieldAdded.bind(h(n)),n.elementNotValidatedHandler=n.onElementNotValidated.bind(h(n)),n.elementValidatingHandler=n.onElementValidating.bind(h(n)),n}return c(e,R),l(e,[{key:"install",value:function(){this.core.on("core.validator.validated",this.validatorHandler).on("core.field.added",this.fieldAddedHandler).on("core.element.notvalidated",this.elementNotValidatedHandler).on("core.element.validating",this.elementValidatingHandler).registerFilter("field-should-validate",this.shouldValidateFilter)}},{key:"uninstall",value:function(){this.invalidFields.clear(),this.core.off("core.validator.validated",this.validatorHandler).off("core.field.added",this.fieldAddedHandler).off("core.element.notvalidated",this.elementNotValidatedHandler).off("core.element.validating",this.elementValidatingHandler).deregisterFilter("field-should-validate",this.shouldValidateFilter)}},{key:"shouldValidate",value:function(t,e,n,i){return!((!0===this.opts.enabled||!0===this.opts.enabled[t])&&this.invalidFields.has(e)&&!!this.invalidFields.get(e).length&&-1===this.invalidFields.get(e).indexOf(i))}},{key:"onValidatorValidated",value:function(t){var e=this.invalidFields.has(t.element)?this.invalidFields.get(t.element):[],n=e.indexOf(t.validator);t.result.valid&&n>=0?e.splice(n,1):!t.result.valid&&-1===n&&e.push(t.validator),this.invalidFields.set(t.element,e)}},{key:"onFieldAdded",value:function(t){t.elements&&this.clearInvalidFields(t.elements)}},{key:"onElementNotValidated",value:function(t){this.clearInvalidFields(t.elements)}},{key:"onElementValidating",value:function(t){this.clearInvalidFields(t.elements)}},{key:"clearInvalidFields",value:function(t){var e=this;t.forEach(function(t){return e.invalidFields.delete(t)})}}]),e}(),J=function(t){function e(t){var n;return a(this,e),(n=p(this,d(e).call(this,t))).isFormValid=!1,n.opts=Object.assign({},{aspNetButton:!1,selector:'[type="submit"]:not([formnovalidate])'},t),n.submitHandler=n.handleSubmitEvent.bind(h(n)),n.buttonClickHandler=n.handleClickEvent.bind(h(n)),n}return c(e,R),l(e,[{key:"install",value:function(){var t=this;if(this.core.getFormElement()instanceof HTMLFormElement){var e=this.core.getFormElement();this.selectorButtons=[].slice.call(e.querySelectorAll(this.opts.selector)),this.submitButtons=[].slice.call(e.querySelectorAll('[type="submit"]')),e.setAttribute("novalidate","novalidate"),e.addEventListener("submit",this.submitHandler),this.hiddenClickedEle=document.createElement("input"),this.hiddenClickedEle.setAttribute("type","hidden"),e.appendChild(this.hiddenClickedEle),this.submitButtons.forEach(function(e){e.addEventListener("click",t.buttonClickHandler)})}}},{key:"uninstall",value:function(){var t=this,e=this.core.getFormElement();e instanceof HTMLFormElement&&e.removeEventListener("submit",this.submitHandler),this.submitButtons.forEach(function(e){e.removeEventListener("click",t.buttonClickHandler)}),this.hiddenClickedEle.parentElement.removeChild(this.hiddenClickedEle)}},{key:"handleSubmitEvent",value:function(t){this.validateForm(t)}},{key:"handleClickEvent",value:function(t){var e=t.currentTarget;if(e instanceof HTMLElement&&-1!==this.selectorButtons.indexOf(e)&&(!this.opts.aspNetButton||!0!==this.isFormValid)){this.core.getFormElement().removeEventListener("submit",this.submitHandler),this.clickedButton=t.target;var n=this.clickedButton.getAttribute("name"),i=this.clickedButton.getAttribute("value");n&&i&&(this.hiddenClickedEle.setAttribute("name",n),this.hiddenClickedEle.setAttribute("value",i)),this.validateForm(t)}}},{key:"validateForm",value:function(t){var e=this;t.preventDefault(),this.core.validate().then(function(t){"Valid"===t&&e.opts.aspNetButton&&!e.isFormValid&&e.clickedButton&&(e.isFormValid=!0,e.clickedButton.removeEventListener("click",e.buttonClickHandler),e.clickedButton.click())})}}]),e}(),tt=function(t){function e(t){var n;return a(this,e),(n=p(this,d(e).call(this,t))).messages=new Map,n.opts=Object.assign({},{placement:"top",trigger:"click"},t),n.iconPlacedHandler=n.onIconPlaced.bind(h(n)),n.validatorValidatedHandler=n.onValidatorValidated.bind(h(n)),n.elementValidatedHandler=n.onElementValidated.bind(h(n)),n.documentClickHandler=n.onDocumentClicked.bind(h(n)),n}return c(e,R),l(e,[{key:"install",value:function(){this.tip=document.createElement("div"),K(this.tip,u({"fv-plugins-tooltip":!0},"fv-plugins-tooltip--".concat(this.opts.placement),!0)),document.body.appendChild(this.tip),this.core.on("plugins.icon.placed",this.iconPlacedHandler).on("core.validator.validated",this.validatorValidatedHandler).on("core.element.validated",this.elementValidatedHandler),"click"===this.opts.trigger&&document.addEventListener("click",this.documentClickHandler)}},{key:"uninstall",value:function(){this.messages.clear(),document.body.removeChild(this.tip),this.core.off("plugins.icon.placed",this.iconPlacedHandler).off("core.validator.validated",this.validatorValidatedHandler).off("core.element.validated",this.elementValidatedHandler),"click"===this.opts.trigger&&document.removeEventListener("click",this.documentClickHandler)}},{key:"onIconPlaced",value:function(t){var e=this;switch(K(t.iconElement,{"fv-plugins-tooltip-icon":!0}),this.opts.trigger){case"hover":t.iconElement.addEventListener("mouseenter",function(n){return e.show(t.element,n)}),t.iconElement.addEventListener("mouseleave",function(t){return e.hide()});break;case"click":default:t.iconElement.addEventListener("click",function(n){return e.show(t.element,n)})}}},{key:"onValidatorValidated",value:function(t){if(!t.result.valid){var e=t.elements,n=t.element.getAttribute("type"),i="radio"===n||"checkbox"===n?e[0]:t.element,r="string"==typeof t.result.message?t.result.message:t.result.message[this.core.getLocale()];this.messages.set(i,r)}}},{key:"onElementValidated",value:function(t){if(t.valid){var e=t.elements,n=t.element.getAttribute("type"),i="radio"===n||"checkbox"===n?e[0]:t.element;this.messages.delete(i)}}},{key:"onDocumentClicked",value:function(t){this.hide()}},{key:"show",value:function(t,e){if(e.preventDefault(),e.stopPropagation(),this.messages.has(t)){K(this.tip,{"fv-plugins-tooltip--hide":!1}),this.tip.innerHTML='<span class="fv-plugins-tooltip__content">'.concat(this.messages.get(t),"</span>");var n=e.target.getBoundingClientRect(),i=0,r=0;switch(this.opts.placement){case"top":default:i=n.top-n.height,r=n.left+n.width/2-this.tip.clientWidth/2;break;case"top-left":i=n.top-n.height,r=n.left;break;case"top-right":i=n.top-n.height,r=n.left+n.width-this.tip.clientWidth;break;case"bottom":i=n.top+n.height,r=n.left+n.width/2-this.tip.clientWidth/2;break;case"bottom-left":i=n.top+n.height,r=n.left;break;case"bottom-right":i=n.top+n.height,r=n.left+n.width-this.tip.clientWidth;break;case"left":i=n.top+n.height/2-this.tip.clientHeight/2,r=n.left-this.tip.clientWidth;break;case"right":i=n.top+n.height/2-this.tip.clientHeight/2,r=n.left+n.width}i+=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,r+=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0,this.tip.setAttribute("style","top: ".concat(i,"px; left: ").concat(r,"px"))}}},{key:"hide",value:function(){K(this.tip,{"fv-plugins-tooltip--hide":!0})}}]),e}(),et=function(t){function e(t){var n;a(this,e),(n=p(this,d(e).call(this,t))).handlers=[],n.timers=new Map,n.ieVersion=function(){for(var t=3,e=document.createElement("div"),n=e.all||[];e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><br><![endif]--\x3e",n[0];);return t>4?t:document.documentMode}();var i=document.createElement("div");return n.defaultEvent=9!==n.ieVersion&&"oninput"in i?"input":"keyup",n.opts=Object.assign({},{delay:0,event:n.defaultEvent,threshold:0},t),n.fieldAddedHandler=n.onFieldAdded.bind(h(n)),n.fieldRemovedHandler=n.onFieldRemoved.bind(h(n)),n}return c(e,R),l(e,[{key:"install",value:function(){this.core.on("core.field.added",this.fieldAddedHandler).on("core.field.removed",this.fieldRemovedHandler)}},{key:"uninstall",value:function(){this.handlers.forEach(function(t){return t.element.removeEventListener(t.event,t.handler)}),this.handlers=[],this.timers.forEach(function(t){return window.clearTimeout(t)}),this.timers.clear(),this.core.off("core.field.added",this.fieldAddedHandler).off("core.field.removed",this.fieldRemovedHandler)}},{key:"prepareHandler",value:function(t,e){var n=this;e.forEach(function(e){var i=[];switch(!0){case!!n.opts.event&&!1===n.opts.event[t]:i=[];break;case!!n.opts.event&&!!n.opts.event[t]:i=n.opts.event[t].split(" ");break;case"string"==typeof n.opts.event&&n.opts.event!==n.defaultEvent:i=n.opts.event.split(" ");break;default:var r=e.getAttribute("type"),o=e.tagName.toLowerCase();i=["radio"===r||"checkbox"===r||"file"===r||"select"===o?"change":n.ieVersion>=10&&e.getAttribute("placeholder")?"keyup":n.defaultEvent]}i.forEach(function(i){var r=function(i){return n.handleEvent(i,t,e)};n.handlers.push({element:e,event:i,field:t,handler:r}),e.addEventListener(i,r)})})}},{key:"handleEvent",value:function(t,e,n){var i=this;if(this.exceedThreshold(e,n)&&this.core.executeFilter("plugins-trigger-should-validate",!0,[e,n])){var r=function(){return i.core.validateElement(e,n).then(function(r){i.core.emit("plugins.trigger.executed",{element:n,event:t,field:e})})},o=this.opts.delay[e]||this.opts.delay;if(0===o)r();else{var a=this.timers.get(n);a&&window.clearTimeout(a),this.timers.set(n,window.setTimeout(r,1e3*o))}}}},{key:"onFieldAdded",value:function(t){this.handlers.filter(function(e){return e.field===t.field}).forEach(function(t){return t.element.removeEventListener(t.event,t.handler)}),this.prepareHandler(t.field,t.elements)}},{key:"onFieldRemoved",value:function(t){this.handlers.filter(function(e){return e.field===t.field&&t.elements.indexOf(e.element)>=0}).forEach(function(t){return t.element.removeEventListener(t.event,t.handler)})}},{key:"exceedThreshold",value:function(t,e){var n=0!==this.opts.threshold[t]&&0!==this.opts.threshold&&(this.opts.threshold[t]||this.opts.threshold);if(!n)return!0;var i=e.getAttribute("type");return-1!==["button","checkbox","file","hidden","image","radio","reset","submit"].indexOf(i)||this.core.getElementValue(t,e).length>=n}}]),e}(),nt={Alias:$,Aria:H,Declarative:B,DefaultSubmit:q,Dependency:z,Excluded:U,FieldStatus:V,Framework:Z,Icon:X,Message:Y,Sequence:Q,SubmitButton:J,Tooltip:tt,Trigger:et};var it={call:g,classSet:K,closest:G,fetch:k,format:m,hasClass:function(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )".concat(e,"( |$)"),"gi").test(t.className)},isValidDate:b};t.Plugin=R,t.algorithms=o,t.filters=F,t.formValidation=function(t,e){var n=Object.assign({},{fields:{},locale:"en_US",plugins:{}},e),i=new j(t,n.fields);return i.setLocale(n.locale,n.localization),Object.keys(n.plugins).forEach(function(t){return i.registerPlugin(t,n.plugins[t])}),Object.keys(D).forEach(function(t){return i.registerValidator(t,D[t])}),Object.keys(n.fields).forEach(function(t){return i.addField(t,n.fields[t])}),i},t.locales={},t.plugins=nt,t.utils=it,t.validators=D,Object.defineProperty(t,"__esModule",{value:!0})}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((t=t||self).FormValidation=t.FormValidation||{},t.FormValidation.plugins=t.FormValidation.plugins||{},t.FormValidation.plugins.Bootstrap=e())}(this,function(){"use strict";function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function e(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}var a=FormValidation.utils.classSet,s=FormValidation.utils.hasClass,l=FormValidation.plugins.Framework;return function(t){function r(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),o(this,i(r).call(this,Object.assign({},{eleInvalidClass:"is-invalid",eleValidClass:"is-valid",formClass:"fv-plugins-bootstrap",messageClass:"fv-help-block",rowInvalidClass:"has-danger",rowPattern:/^(.*)(col|offset)(-(sm|md|lg|xl))*-[0-9]+(.*)$/,rowSelector:".form-group",rowValidClass:"has-success"},t)))}return n(r,l),e(r,[{key:"onIconPlaced",value:function(t){var e=t.element.parentElement;s(e,"input-group")&&e.parentElement.insertBefore(t.iconElement,e.nextSibling);var n=t.element.getAttribute("type");if("checkbox"===n||"radio"===n){var i=e.parentElement;s(e,"form-check")?(a(t.iconElement,{"fv-plugins-icon-check":!0}),e.parentElement.insertBefore(t.iconElement,e.nextSibling)):s(e.parentElement,"form-check")&&(a(t.iconElement,{"fv-plugins-icon-check":!0}),i.parentElement.insertBefore(t.iconElement,i.nextSibling))}}}]),r}()}),function(){"use strict"}(),"function"==typeof define&&define.amd||"object"==typeof module&&module.exports&&(module.exports=function(t,e){return function(t){var e=function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)var e=t.fn.select2.amd;var n,i,r,o;return e&&e.requirejs||(e?i=e:e={},function(t){var e,o,a,s,l={},u={},c={},d={},f=Object.prototype.hasOwnProperty,h=[].slice,p=/\.js$/;function v(t,e){return f.call(t,e)}function m(t,e){var n,i,r,o,a,s,l,u,d,f,h,v,m=e&&e.split("/"),g=c.map,y=g&&g["*"]||{};if(t){for(t=t.split("/"),a=t.length-1,c.nodeIdCompat&&p.test(t[a])&&(t[a]=t[a].replace(p,"")),"."===t[0].charAt(0)&&m&&(v=m.slice(0,m.length-1),t=v.concat(t)),d=0;d<t.length;d++)if("."===(h=t[d]))t.splice(d,1),d-=1;else if(".."===h){if(0===d||1===d&&".."===t[2]||".."===t[d-1])continue;d>0&&(t.splice(d-1,2),d-=2)}t=t.join("/")}if((m||y)&&g){for(n=t.split("/"),d=n.length;d>0;d-=1){if(i=n.slice(0,d).join("/"),m)for(f=m.length;f>0;f-=1)if((r=g[m.slice(0,f).join("/")])&&(r=r[i])){o=r,s=d;break}if(o)break;!l&&y&&y[i]&&(l=y[i],u=d)}!o&&l&&(o=l,s=u),o&&(n.splice(0,s,o),t=n.join("/"))}return t}function g(e,n){return function(){var i=h.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),o.apply(t,i.concat([e,n]))}}function y(t){return function(e){l[t]=e}}function b(n){if(v(u,n)){var i=u[n];delete u[n],d[n]=!0,e.apply(t,i)}if(!v(l,n)&&!v(d,n))throw new Error("No "+n);return l[n]}function k(t){var e,n=t?t.indexOf("!"):-1;return n>-1&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function w(t){return t?k(t):[]}function x(t){return function(){return c&&c.config&&c.config[t]||{}}}a=function(t,e){var n,i,r=k(t),o=r[0],a=e[1];return t=r[1],o&&(o=m(o,a),n=b(o)),o?t=n&&n.normalize?n.normalize(t,(i=a,function(t){return m(t,i)})):m(t,a):(t=m(t,a),r=k(t),o=r[0],t=r[1],o&&(n=b(o))),{f:o?o+"!"+t:t,n:t,pr:o,p:n}},s={require:function(t){return g(t)},exports:function(t){var e=l[t];return void 0!==e?e:l[t]={}},module:function(t){return{id:t,uri:"",exports:l[t],config:x(t)}}},e=function(e,n,i,r){var o,c,f,h,p,m,k,x=[],_=typeof i;if(m=w(r=r||e),"undefined"===_||"function"===_){for(n=!n.length&&i.length?["require","exports","module"]:n,p=0;p<n.length;p+=1)if(h=a(n[p],m),"require"===(c=h.f))x[p]=s.require(e);else if("exports"===c)x[p]=s.exports(e),k=!0;else if("module"===c)o=x[p]=s.module(e);else if(v(l,c)||v(u,c)||v(d,c))x[p]=b(c);else{if(!h.p)throw new Error(e+" missing "+c);h.p.load(h.n,g(r,!0),y(c),{}),x[p]=l[c]}f=i?i.apply(l[e],x):void 0,e&&(o&&o.exports!==t&&o.exports!==l[e]?l[e]=o.exports:f===t&&k||(l[e]=f))}else e&&(l[e]=i)},n=i=o=function(n,i,r,l,u){if("string"==typeof n)return s[n]?s[n](i):b(a(n,w(i)).f);if(!n.splice){if((c=n).deps&&o(c.deps,c.callback),!i)return;i.splice?(n=i,i=r,r=null):n=t}return i=i||function(){},"function"==typeof r&&(r=l,l=u),l?e(t,n,i,r):setTimeout(function(){e(t,n,i,r)},4),o},o.config=function(t){return o(t)},n._defined=l,(r=function(t,e,n){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(n=e,e=[]),v(l,t)||v(u,t)||(u[t]=[t,e,n])}).amd={jQuery:!0}}(),e.requirejs=n,e.require=i,e.define=r),e.define("almond",function(){}),e.define("select2/utils",function(t){var e={};function n(t){var e=t.prototype,n=[];for(var i in e){var r=e[i];"function"==typeof r&&"constructor"!==i&&n.push(i)}return n}e.Extend=function(t,e){var n={}.hasOwnProperty;function i(){this.constructor=t}for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},e.Decorate=function(t,e){var i=n(e),r=n(t);function o(){var n=Array.prototype.unshift,i=e.prototype.constructor.length,r=t.prototype.constructor;i>0&&(n.call(arguments,t.prototype.constructor),r=e.prototype.constructor),r.apply(this,arguments)}e.displayName=t.displayName,o.prototype=new function(){this.constructor=o};for(var a=0;a<r.length;a++){var s=r[a];o.prototype[s]=t.prototype[s]}for(var l=function(t){var n=function(){};t in o.prototype&&(n=o.prototype[t]);var i=e.prototype[t];return function(){var t=Array.prototype.unshift;return t.call(arguments,n),i.apply(this,arguments)}},u=0;u<i.length;u++){var c=i[u];o.prototype[c]=l(c)}return o};var i=function(){this.listeners={}};i.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},i.prototype.trigger=function(t){var e=Array.prototype.slice,n=e.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=t,t in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(t,e){for(var n=0,i=t.length;n<i;n++)t[n].apply(this,e)},e.Observable=i,e.generateChars=function(t){for(var e="",n=0;n<t;n++){var i=Math.floor(36*Math.random());e+=i.toString(36)}return e},e.bind=function(t,e){return function(){t.apply(e,arguments)}},e._convertData=function(t){for(var e in t){var n=e.split("-"),i=t;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in i||(i[o]={}),r==n.length-1&&(i[o]=t[e]),i=i[o]}delete t[e]}}return t},e.hasScroll=function(e,n){var i=t(n),r=n.style.overflowX,o=n.style.overflowY;return(r!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===r||"scroll"===o||i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth)},e.escapeMarkup=function(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})},e.__cache={};var r=0;return e.GetUniqueElementId=function(t){var e=t.getAttribute("data-select2-id");return null==e&&(t.id?(e=t.id,t.setAttribute("data-select2-id",e)):(t.setAttribute("data-select2-id",++r),e=r.toString())),e},e.StoreData=function(t,n,i){var r=e.GetUniqueElementId(t);e.__cache[r]||(e.__cache[r]={}),e.__cache[r][n]=i},e.GetData=function(n,i){var r=e.GetUniqueElementId(n);return i?e.__cache[r]&&null!=e.__cache[r][i]?e.__cache[r][i]:t(n).data(i):e.__cache[r]},e.RemoveData=function(t){var n=e.GetUniqueElementId(t);null!=e.__cache[n]&&delete e.__cache[n],t.removeAttribute("data-select2-id")},e}),e.define("select2/results",function(t,e){function n(t,e,i){this.$element=t,this.data=i,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(e){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=t('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(e.message);i.append(n(r(e.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var n=0;n<t.results.length;n++){var i=t.results[n],r=this.option(i);e.push(r)}this.$results.append(e)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(t,e){var n=e.find(".select2-results");n.append(t)},n.prototype.sort=function(t){var e=this.options.get("sorter");return e(t)},n.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2-results__option[aria-selected]"),e=t.filter("[aria-selected=true]");e.length>0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current(function(i){var r=t.map(i,function(t){return t.id.toString()}),o=n.$results.find(".select2-results__option[aria-selected]");o.each(function(){var n=t(this),i=e.GetData(this,"data"),o=""+i.id;null!=i.element&&i.element.selected||null==i.element&&t.inArray(o,r)>-1?n.attr("aria-selected","true"):n.attr("aria-selected","false")})})},n.prototype.showLoading=function(t){this.hideLoading();var e=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:e(t)},i=this.option(n);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var i=document.createElement("li");i.className="select2-results__option";var r={role:"option","aria-selected":"false"},o=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var a in(null!=n.element&&o.call(n.element,":disabled")||null==n.element&&n.disabled)&&(delete r["aria-selected"],r["aria-disabled"]="true"),null==n.id&&delete r["aria-selected"],null!=n._resultId&&(i.id=n._resultId),n.title&&(i.title=n.title),n.children&&(r.role="group",r["aria-label"]=n.text,delete r["aria-selected"]),r){var s=r[a];i.setAttribute(a,s)}if(n.children){var l=t(i),u=document.createElement("strong");u.className="select2-results__group",t(u),this.template(n,u);for(var c=[],d=0;d<n.children.length;d++){var f=n.children[d],h=this.option(f);c.push(h)}var p=t("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(c),l.append(u),l.append(p)}else this.template(n,i);return e.StoreData(i,"data",n),i},n.prototype.bind=function(n,i){var r=this,o=n.id+"-results";this.$results.attr("id",o),n.on("results:all",function(t){r.clear(),r.append(t.data),n.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),n.on("results:append",function(t){r.append(t.data),n.isOpen()&&r.setClasses()}),n.on("query",function(t){r.hideMessages(),r.showLoading(t)}),n.on("select",function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())}),n.on("unselect",function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())}),n.on("open",function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()}),n.on("close",function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")}),n.on("results:toggle",function(){var t=r.getHighlightedResults();0!==t.length&&t.trigger("mouseup")}),n.on("results:select",function(){var t=r.getHighlightedResults();if(0!==t.length){var n=e.GetData(t[0],"data");"true"==t.attr("aria-selected")?r.trigger("close",{}):r.trigger("select",{data:n})}}),n.on("results:previous",function(){var t=r.getHighlightedResults(),e=r.$results.find("[aria-selected]"),n=e.index(t);if(!(n<=0)){var i=n-1;0===t.length&&(i=0);var o=e.eq(i);o.trigger("mouseenter");var a=r.$results.offset().top,s=o.offset().top,l=r.$results.scrollTop()+(s-a);0===i?r.$results.scrollTop(0):s-a<0&&r.$results.scrollTop(l)}}),n.on("results:next",function(){var t=r.getHighlightedResults(),e=r.$results.find("[aria-selected]"),n=e.index(t),i=n+1;if(!(i>=e.length)){var o=e.eq(i);o.trigger("mouseenter");var a=r.$results.offset().top+r.$results.outerHeight(!1),s=o.offset().top+o.outerHeight(!1),l=r.$results.scrollTop()+s-a;0===i?r.$results.scrollTop(0):s>a&&r.$results.scrollTop(l)}}),n.on("results:focus",function(t){t.element.addClass("select2-results__option--highlighted")}),n.on("results:message",function(t){r.displayMessage(t)}),t.fn.mousewheel&&this.$results.on("mousewheel",function(t){var e=r.$results.scrollTop(),n=r.$results.get(0).scrollHeight-e+t.deltaY,i=t.deltaY>0&&e-t.deltaY<=0,o=t.deltaY<0&&n<=r.$results.height();i?(r.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):o&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),t.preventDefault(),t.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(n){var i=t(this),o=e.GetData(this,"data");"true"!==i.attr("aria-selected")?r.trigger("select",{originalEvent:n,data:o}):r.options.get("multiple")?r.trigger("unselect",{originalEvent:n,data:o}):r.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(n){var i=e.GetData(this,"data");r.getHighlightedResults().removeClass("select2-results__option--highlighted"),r.trigger("results:focus",{data:i,element:t(this)})})},n.prototype.getHighlightedResults=function(){var t=this.$results.find(".select2-results__option--highlighted");return t},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]"),n=e.index(t),i=this.$results.offset().top,r=t.offset().top,o=this.$results.scrollTop()+(r-i),a=r-i;o-=2*t.outerHeight(!1),n<=2?this.$results.scrollTop(0):(a>this.$results.outerHeight()||a<0)&&this.$results.scrollTop(o)}},n.prototype.template=function(e,n){var i=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),o=i(e,n);null==o?n.style.display="none":"string"==typeof o?n.innerHTML=r(o):t(n).append(o)},n}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",function(t,e,n){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var n=t('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=e.GetData(this.$element[0],"old-tabindex")?this._tabindex=e.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),n.attr("aria-disabled","false"),this.$selection=n,n},i.prototype.bind=function(t,e){var i=this,r=t.id+"-results";this.container=t,this.$selection.on("focus",function(t){i.trigger("focus",t)}),this.$selection.on("blur",function(t){i._handleBlur(t)}),this.$selection.on("keydown",function(t){i.trigger("keypress",t),t.which===n.SPACE&&t.preventDefault()}),t.on("results:focus",function(t){i.$selection.attr("aria-activedescendant",t.data._resultId)}),t.on("selection:update",function(t){i.update(t.data)}),t.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",r),i._attachCloseHandler(t)}),t.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.trigger("focus"),i._detachCloseHandler(t)}),t.on("enable",function(){i.$selection.attr("tabindex",i._tabindex),i.$selection.attr("aria-disabled","false")}),t.on("disable",function(){i.$selection.attr("tabindex","-1"),i.$selection.attr("aria-disabled","true")})},i.prototype._handleBlur=function(e){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||t.contains(n.$selection[0],document.activeElement)||n.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(n){t(document.body).on("mousedown.select2."+n.id,function(n){var i=t(n.target),r=i.closest(".select2"),o=t(".select2.select2-container--open");o.each(function(){if(this!=r[0]){var t=e.GetData(this,"element");t.select2("close")}})})},i.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2."+e.id)},i.prototype.position=function(t,e){var n=e.find(".selection");n.append(t)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},i.prototype.isEnabled=function(){return!this.isDisabled()},i.prototype.isDisabled=function(){return this.options.get("disabled")},i}),e.define("select2/selection/single",function(t,e,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,e),r.prototype.render=function(){var t=r.__super__.render.call(this);return t.addClass("select2-selection--single"),t.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(t){1===t.which&&n.trigger("toggle",{originalEvent:t})}),this.$selection.on("focus",function(t){}),this.$selection.on("blur",function(t){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},r.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},r.prototype.display=function(t,e){var n=this.options.get("templateSelection"),i=this.options.get("escapeMarkup");return i(n(t,e))},r.prototype.selectionContainer=function(){return t("<span></span>")},r.prototype.update=function(t){if(0!==t.length){var e=t[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(e,n);n.empty().append(i);var r=e.title||e.text;r?n.attr("title",r):n.removeAttr("title")}else this.clear()},r}),e.define("select2/selection/multiple",function(t,e,n){function i(t,e){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,e),i.prototype.render=function(){var t=i.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},i.prototype.bind=function(e,r){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(t){o.trigger("toggle",{originalEvent:t})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!o.isDisabled()){var i=t(this),r=i.parent(),a=n.GetData(r[0],"data");o.trigger("unselect",{originalEvent:e,data:a})}})},i.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},i.prototype.display=function(t,e){var n=this.options.get("templateSelection"),i=this.options.get("escapeMarkup");return i(n(t,e))},i.prototype.selectionContainer=function(){var e=t('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return e},i.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],i=0;i<t.length;i++){var r=t[i],o=this.selectionContainer(),a=this.display(r,o);o.append(a);var s=r.title||r.text;s&&o.attr("title",s),n.StoreData(o[0],"data",r),e.push(o)}var l=this.$selection.find(".select2-selection__rendered");n.appendMany(l,e)}},i}),e.define("select2/selection/placeholder",["../utils"],function(t){function e(t,e,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n)}return e.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},e.prototype.createPlaceholder=function(t,e){var n=this.selectionContainer();return n.html(this.display(e)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},e.prototype.update=function(t,e){var n=1==e.length&&e[0].id!=this.placeholder.id,i=e.length>1;if(i||n)return t.call(this,e);this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(r)},e}),e.define("select2/selection/allowClear",function(t,e,n){function i(){}return i.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(t){i._handleClear(t)}),e.on("keypress",function(t){i._handleKeyboardClear(t,e)})},i.prototype._handleClear=function(t,e){if(!this.isDisabled()){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){e.stopPropagation();var r=n.GetData(i[0],"data"),o=this.$element.val();this.$element.val(this.placeholder.id);var a={data:r};if(this.trigger("clear",a),a.prevented)this.$element.val(o);else{for(var s=0;s<r.length;s++)if(a={data:r[s]},this.trigger("unselect",a),a.prevented)return void this.$element.val(o);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},i.prototype._handleKeyboardClear=function(t,n,i){i.isOpen()||n.which!=e.DELETE&&n.which!=e.BACKSPACE||this._handleClear(n)},i.prototype.update=function(e,i){if(e.call(this,i),!(this.$selection.find(".select2-selection__placeholder").length>0||0===i.length)){var r=this.options.get("translations").get("removeAllItems"),o=t('<span class="select2-selection__clear" title="'+r()+'">&times;</span>');n.StoreData(o[0],"data",i),this.$selection.find(".select2-selection__rendered").prepend(o)}},i}),e.define("select2/selection/search",function(t,e,n){function i(t,e,n){t.call(this,e,n)}return i.prototype.render=function(e){var n=t('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=e.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(t,i,r){var o=this,a=i.id+"-results";t.call(this,i,r),i.on("open",function(){o.$search.attr("aria-controls",a),o.$search.trigger("focus")}),i.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),i.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),i.on("disable",function(){o.$search.prop("disabled",!0)}),i.on("focus",function(t){o.$search.trigger("focus")}),i.on("results:focus",function(t){t.data._resultId?o.$search.attr("aria-activedescendant",t.data._resultId):o.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(t){o.trigger("focus",t)}),this.$selection.on("focusout",".select2-search--inline",function(t){o._handleBlur(t)}),this.$selection.on("keydown",".select2-search--inline",function(t){t.stopPropagation(),o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented();var i=t.which;if(i===n.BACKSPACE&&""===o.$search.val()){var r=o.$searchContainer.prev(".select2-selection__choice");if(r.length>0){var a=e.GetData(r[0],"data");o.searchRemoveChoice(a),t.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(t){o.$search.val()&&t.stopPropagation()});var s=document.documentMode,l=s&&s<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(t){l?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(t){if(l&&"input"===t.type)o.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=n.SHIFT&&e!=n.CTRL&&e!=n.ALT&&e!=n.TAB&&o.handleSearch(t)}})},i.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},i.prototype.update=function(t,e){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";if(""!==this.$search.attr("placeholder"))t=this.$selection.find(".select2-selection__rendered").width();else{var e=this.$search.val().length+1;t=.75*e+"em"}this.$search.css("width",t)},i}),e.define("select2/selection/eventRelay",function(t){function e(){}return e.prototype.bind=function(e,n,i){var r=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],a=["opening","closing","selecting","unselecting","clearing"];e.call(this,n,i),n.on("*",function(e,n){if(-1!==t.inArray(e,o)){n=n||{};var i=t.Event("select2:"+e,{params:n});r.$element.trigger(i),-1!==t.inArray(e,a)&&(n.prevented=i.isDefaultPrevented())}})},e}),e.define("select2/translation",function(t,e){function n(t){this.dict=t||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(t){return this.dict[t]},n.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},n._cache={},n.loadPath=function(t){if(!(t in n._cache)){var i=e(t);n._cache[t]=i}return new n(n._cache[t])},n}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),e.define("select2/data/base",["../utils"],function(t){function e(t,n){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(t,e){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,n){var i=e.id+"-result-";return i+=t.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+t.generateChars(4),i},e}),e.define("select2/data/select",function(t,e,n){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,t),i.prototype.current=function(t){var e=[],i=this;this.$element.find(":selected").each(function(){var t=n(this),r=i.item(t);e.push(r)}),t(e)},i.prototype.select=function(t){var e=this;if(t.selected=!0,n(t.element).is("option"))return t.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var r=[];(t=[t]).push.apply(t,i);for(var o=0;o<t.length;o++){var a=t[o].id;-1===n.inArray(a,r)&&r.push(a)}e.$element.val(r),e.$element.trigger("input").trigger("change")});else{var i=t.id;this.$element.val(i),this.$element.trigger("input").trigger("change")}},i.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple")){if(t.selected=!1,n(t.element).is("option"))return t.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(i){for(var r=[],o=0;o<i.length;o++){var a=i[o].id;a!==t.id&&-1===n.inArray(a,r)&&r.push(a)}e.$element.val(r),e.$element.trigger("input").trigger("change")})}},i.prototype.bind=function(t,e){var n=this;this.container=t,t.on("select",function(t){n.select(t.data)}),t.on("unselect",function(t){n.unselect(t.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){e.RemoveData(this)})},i.prototype.query=function(t,e){var i=[],r=this,o=this.$element.children();o.each(function(){var e=n(this);if(e.is("option")||e.is("optgroup")){var o=r.item(e),a=r.matches(t,o);null!==a&&i.push(a)}}),e({results:i})},i.prototype.addOptions=function(t){e.appendMany(this.$element,t)},i.prototype.option=function(t){var i;t.children?(i=document.createElement("optgroup")).label=t.text:void 0!==(i=document.createElement("option")).textContent?i.textContent=t.text:i.innerText=t.text,void 0!==t.id&&(i.value=t.id),t.disabled&&(i.disabled=!0),t.selected&&(i.selected=!0),t.title&&(i.title=t.title);var r=n(i),o=this._normalizeItem(t);return o.element=i,e.StoreData(i,"data",o),r},i.prototype.item=function(t){var i={};if(null!=(i=e.GetData(t[0],"data")))return i;if(t.is("option"))i={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){i={text:t.prop("label"),children:[],title:t.prop("title")};for(var r=t.children("option"),o=[],a=0;a<r.length;a++){var s=n(r[a]),l=this.item(s);o.push(l)}i.children=o}return(i=this._normalizeItem(i)).element=t[0],e.StoreData(t[0],"data",i),i},i.prototype._normalizeItem=function(t){return t!==Object(t)&&(t={id:t,text:t}),null!=(t=n.extend({},{text:""},t)).id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),n.extend({},{selected:!1,disabled:!1},t)},i.prototype.matches=function(t,e){var n=this.options.get("matcher");return n(t,e)},i}),e.define("select2/data/array",function(t,e,n){function i(t,e){this._dataToConvert=e.get("data")||[],i.__super__.constructor.call(this,t,e)}return e.Extend(i,t),i.prototype.bind=function(t,e){i.__super__.bind.call(this,t,e),this.addOptions(this.convertToOptions(this._dataToConvert))},i.prototype.select=function(t){var e=this.$element.find("option").filter(function(e,n){return n.value==t.id.toString()});0===e.length&&(e=this.option(t),this.addOptions(e)),i.__super__.select.call(this,t)},i.prototype.convertToOptions=function(t){var i=this,r=this.$element.find("option"),o=r.map(function(){return i.item(n(this)).id}).get(),a=[];function s(t){return function(){return n(this).val()==t.id}}for(var l=0;l<t.length;l++){var u=this._normalizeItem(t[l]);if(n.inArray(u.id,o)>=0){var c=r.filter(s(u)),d=this.item(c),f=n.extend(!0,{},u,d),h=this.option(f);c.replaceWith(h)}else{var p=this.option(u);if(u.children){var v=this.convertToOptions(u.children);e.appendMany(p,v)}a.push(p)}}return a},i}),e.define("select2/data/ajax",function(t,e,n){function i(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,t,e)}return e.Extend(i,t),i.prototype._applyDefaults=function(t){var e={data:function(t){return n.extend({},t,{q:t.term})},transport:function(t,e,i){var r=n.ajax(t);return r.then(e),r.fail(i),r}};return n.extend({},e,t,!0)},i.prototype.processResults=function(t){return t},i.prototype.query=function(t,e){var i=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);function o(){var o=r.transport(r,function(r){var o=i.processResults(r,t);i.options.get("debug")&&window.console&&console.error&&(o&&o.results&&n.isArray(o.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),e(o)},function(){"status"in o&&(0===o.status||"0"===o.status)||i.trigger("results:message",{message:"errorLoading"})});i._request=o}"function"==typeof r.url&&(r.url=r.url.call(this.$element,t)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)):o()},i}),e.define("select2/data/tags",function(t){function e(e,n,i){var r=i.get("tags"),o=i.get("createTag");void 0!==o&&(this.createTag=o);var a=i.get("insertTag");if(void 0!==a&&(this.insertTag=a),e.call(this,n,i),t.isArray(r))for(var s=0;s<r.length;s++){var l=r[s],u=this._normalizeItem(l),c=this.option(u);this.$element.append(c)}}return e.prototype.query=function(t,e,n){var i=this;this._removeOldTags(),null!=e.term&&null==e.page?t.call(this,e,function t(r,o){for(var a=r.results,s=0;s<a.length;s++){var l=a[s],u=null!=l.children&&!t({results:l.children},!0),c=(l.text||"").toUpperCase(),d=(e.term||"").toUpperCase(),f=c===d;if(f||u)return!o&&(r.data=a,void n(r))}if(o)return!0;var h=i.createTag(e);if(null!=h){var p=i.option(h);p.attr("data-select2-tag",!0),i.addOptions([p]),i.insertTag(a,h)}r.results=a,n(r)}):t.call(this,e,n)},e.prototype.createTag=function(e,n){var i=t.trim(n.term);return""===i?null:{id:i,text:i}},e.prototype.insertTag=function(t,e,n){e.unshift(n)},e.prototype._removeOldTags=function(e){var n=this.$element.find("option[data-select2-tag]");n.each(function(){this.selected||t(this).remove()})},e}),e.define("select2/data/tokenizer",function(t){function e(t,e,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),t.call(this,e,n)}return e.prototype.bind=function(t,e,n){t.call(this,e,n),this.$search=e.dropdown.$search||e.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,n,i){var r=this;n.term=n.term||"";var o=this.tokenizer(n,this.options,function(e){var n=r._normalizeItem(e);if(!r.$element.find("option").filter(function(){return t(this).val()===n.id}).length){var i=r.option(n);i.attr("data-select2-tag",!0),r._removeOldTags(),r.addOptions([i])}!function(t){r.trigger("select",{data:t})}(n)});o.term!==n.term&&(this.$search.length&&(this.$search.val(o.term),this.$search.trigger("focus")),n.term=o.term),e.call(this,n,i)},e.prototype.tokenizer=function(e,n,i,r){for(var o=i.get("tokenSeparators")||[],a=n.term,s=0,l=this.createTag||function(t){return{id:t.term,text:t.term}};s<a.length;){var u=a[s];if(-1!==t.inArray(u,o)){var c=a.substr(0,s),d=t.extend({},n,{term:c}),f=l(d);null!=f?(r(f),a=a.substr(s+1)||"",s=0):s++}else s++}return{term:a}},e}),e.define("select2/data/minimumInputLength",[],function(){function t(t,e,n){this.minimumInputLength=n.get("minimumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){e.term=e.term||"",e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):t.call(this,e,n)},t}),e.define("select2/data/maximumInputLength",[],function(){function t(t,e,n){this.maximumInputLength=n.get("maximumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){e.term=e.term||"",this.maximumInputLength>0&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,n)},t}),e.define("select2/data/maximumSelectionLength",[],function(){function t(t,e,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),t.call(this,e,n)}return t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("select",function(){i._checkIfMaximumSelected()})},t.prototype.query=function(t,e,n){var i=this;this._checkIfMaximumSelected(function(){t.call(i,e,n)})},t.prototype._checkIfMaximumSelected=function(t,e){var n=this;this.current(function(t){var i=null!=t?t.length:0;n.maximumSelectionLength>0&&i>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):e&&e()})},t}),e.define("select2/dropdown",function(t,e){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},n.prototype.bind=function(){},n.prototype.position=function(t,e){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",function(t,e){function n(){}return n.prototype.render=function(e){var n=e.call(this),i=t('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(e,n,i){var r=this,o=n.id+"-results";e.call(this,n,i),this.$search.on("keydown",function(t){r.trigger("keypress",t),r._keyUpPrevented=t.isDefaultPrevented()}),this.$search.on("input",function(e){t(this).off("keyup")}),this.$search.on("keyup input",function(t){r.handleSearch(t)}),n.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",o),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),n.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),n.on("focus",function(){n.isOpen()||r.$search.trigger("focus")}),n.on("results:all",function(t){if(null==t.query.term||""===t.query.term){var e=r.showSearch(t);e?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide")}}),n.on("results:focus",function(t){t.data._resultId?r.$search.attr("aria-activedescendant",t.data._resultId):r.$search.removeAttr("aria-activedescendant")})},n.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},n.prototype.showSearch=function(t,e){return!0},n}),e.define("select2/dropdown/hidePlaceholder",[],function(){function t(t,e,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n,i)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var n=e.slice(0),i=e.length-1;i>=0;i--){var r=e[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},t}),e.define("select2/dropdown/infiniteScroll",function(t){function e(t,e,n,i){this.lastParams={},t.call(this,e,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("query",function(t){i.lastParams=t,i.loading=!0}),e.on("query:append",function(t){i.lastParams=t,i.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=t.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var n=this.$results.offset().top+this.$results.outerHeight(!1),i=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1);n+50>=i&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return e.html(n(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",function(t,e){function n(e,n,i){this.$dropdownParent=t(i.get("dropdownParent")||document.body),e.call(this,n,i)}return n.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("open",function(){i._showDropdown(),i._attachPositioningHandler(e),i._bindContainerResultHandlers(e)}),e.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(e)}),this.$dropdownContainer.on("mousedown",function(t){t.stopPropagation()})},n.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(t,e,n){e.attr("class",n.attr("class")),e.removeClass("select2"),e.addClass("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(e){var n=t("<span></span>"),i=e.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(t,e){if(!this._containerResultsHandlersBound){var n=this;e.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),e.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),e.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),e.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),e.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},n.prototype._attachPositioningHandler=function(n,i){var r=this,o="scroll.select2."+i.id,a="resize.select2."+i.id,s="orientationchange.select2."+i.id,l=this.$container.parents().filter(e.hasScroll);l.each(function(){e.StoreData(this,"select2-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})}),l.on(o,function(n){var i=e.GetData(this,"select2-scroll-position");t(this).scrollTop(i.y)}),t(window).on(o+" "+a+" "+s,function(t){r._positionDropdown(),r._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id,o="resize.select2."+i.id,a="orientationchange.select2."+i.id,s=this.$container.parents().filter(e.hasScroll);s.off(r),t(window).off(r+" "+o+" "+a)},n.prototype._positionDropdown=function(){var e=t(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),r=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var a={height:this.$container.outerHeight(!1)};a.top=o.top,a.bottom=o.top+a.height;var s={height:this.$dropdown.outerHeight(!1)},l={top:e.scrollTop(),bottom:e.scrollTop()+e.height()},u=l.top<o.top-s.height,c=l.bottom>o.bottom+s.height,d={left:o.left,top:a.bottom},f=this.$dropdownParent;"static"===f.css("position")&&(f=f.offsetParent());var h={top:0,left:0};(t.contains(document.body,f[0])||f[0].isConnected)&&(h=f.offset()),d.top-=h.top,d.left-=h.left,n||i||(r="below"),c||!u||n?!u&&c&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(d.top=a.top-h.top-s.height),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},n.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},n.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function t(t,e,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,n,i)}return t.prototype.showSearch=function(t,e){return!(function t(e){for(var n=0,i=0;i<e.length;i++){var r=e[i];r.children?n+=t(r.children):n++}return n}(e.data.results)<this.minimumResultsForSearch)&&t.call(this,e)},t}),e.define("select2/dropdown/selectOnClose",["../utils"],function(t){function e(){}return e.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("close",function(t){i._handleSelectOnClose(t)})},e.prototype._handleSelectOnClose=function(e,n){if(n&&null!=n.originalSelect2Event){var i=n.originalSelect2Event;if("select"===i._type||"unselect"===i._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var o=t.GetData(r[0],"data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function t(){}return t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("select",function(t){i._selectTriggered(t)}),e.on("unselect",function(t){i._selectTriggered(t)})},t.prototype._selectTriggered=function(t,e){var n=e.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:e})},t}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,n="Please delete "+e+" character";return 1!=e&&(n+="s"),n},inputTooShort:function(t){var e=t.minimum-t.input.length,n="Please enter "+e+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define("select2/defaults",function(t,e,n,i,r,o,a,s,l,u,c,d,f,h,p,v,m,g,y,b,k,w,x,_,E,S,O,A,C){function T(){this.reset()}T.prototype.apply=function(c){if(null==(c=t.extend(!0,{},this.defaults,c)).dataAdapter){if(null!=c.ajax?c.dataAdapter=p:null!=c.data?c.dataAdapter=h:c.dataAdapter=f,c.minimumInputLength>0&&(c.dataAdapter=u.Decorate(c.dataAdapter,g)),c.maximumInputLength>0&&(c.dataAdapter=u.Decorate(c.dataAdapter,y)),c.maximumSelectionLength>0&&(c.dataAdapter=u.Decorate(c.dataAdapter,b)),c.tags&&(c.dataAdapter=u.Decorate(c.dataAdapter,v)),null==c.tokenSeparators&&null==c.tokenizer||(c.dataAdapter=u.Decorate(c.dataAdapter,m)),null!=c.query){var d=e(c.amdBase+"compat/query");c.dataAdapter=u.Decorate(c.dataAdapter,d)}if(null!=c.initSelection){var C=e(c.amdBase+"compat/initSelection");c.dataAdapter=u.Decorate(c.dataAdapter,C)}}if(null==c.resultsAdapter&&(c.resultsAdapter=n,null!=c.ajax&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,_)),null!=c.placeholder&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,x)),c.selectOnClose&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,O))),null==c.dropdownAdapter){if(c.multiple)c.dropdownAdapter=k;else{var T=u.Decorate(k,w);c.dropdownAdapter=T}if(0!==c.minimumResultsForSearch&&(c.dropdownAdapter=u.Decorate(c.dropdownAdapter,S)),c.closeOnSelect&&(c.dropdownAdapter=u.Decorate(c.dropdownAdapter,A)),null!=c.dropdownCssClass||null!=c.dropdownCss||null!=c.adaptDropdownCssClass){var P=e(c.amdBase+"compat/dropdownCss");c.dropdownAdapter=u.Decorate(c.dropdownAdapter,P)}c.dropdownAdapter=u.Decorate(c.dropdownAdapter,E)}if(null==c.selectionAdapter){if(c.multiple?c.selectionAdapter=r:c.selectionAdapter=i,null!=c.placeholder&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,o)),c.allowClear&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,a)),c.multiple&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,s)),null!=c.containerCssClass||null!=c.containerCss||null!=c.adaptContainerCssClass){var N=e(c.amdBase+"compat/containerCss");c.selectionAdapter=u.Decorate(c.selectionAdapter,N)}c.selectionAdapter=u.Decorate(c.selectionAdapter,l)}c.language=this._resolveLanguage(c.language),c.language.push("en");for(var I=[],L=0;L<c.language.length;L++){var M=c.language[L];-1===I.indexOf(M)&&I.push(M)}return c.language=I,c.translations=this._processTranslations(c.language,c.debug),c},T.prototype.reset=function(){function e(t){return t.replace(/[^\u0000-\u007E]/g,function(t){return d[t]||t})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:u.escapeMarkup,language:{},matcher:function n(i,r){if(""===t.trim(i.term))return r;if(r.children&&r.children.length>0){for(var o=t.extend(!0,{},r),a=r.children.length-1;a>=0;a--){var s=r.children[a],l=n(i,s);null==l&&o.children.splice(a,1)}return o.children.length>0?o:n(i,o)}var u=e(r.text).toUpperCase(),c=e(i.term).toUpperCase();return u.indexOf(c)>-1?r:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},T.prototype.applyFromElement=function(t,e){var n=t.language,i=this.defaults.language,r=e.prop("lang"),o=e.closest("[lang]").prop("lang"),a=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(n),this._resolveLanguage(i),this._resolveLanguage(o));return t.language=a,t},T.prototype._resolveLanguage=function(e){if(!e)return[];if(t.isEmptyObject(e))return[];if(t.isPlainObject(e))return[e];var n;n=t.isArray(e)?e:[e];for(var i=[],r=0;r<n.length;r++)if(i.push(n[r]),"string"==typeof n[r]&&n[r].indexOf("-")>0){var o=n[r].split("-"),a=o[0];i.push(a)}return i},T.prototype._processTranslations=function(e,n){for(var i=new c,r=0;r<e.length;r++){var o=new c,a=e[r];if("string"==typeof a)try{o=c.loadPath(a)}catch(t){try{a=this.defaults.amdLanguageBase+a,o=c.loadPath(a)}catch(t){n&&window.console&&console.warn&&console.warn('Select2: The language file for "'+a+'" could not be automatically loaded. A fallback will be used instead.')}}else o=t.isPlainObject(a)?new c(a):a;i.extend(o)}return i},T.prototype.set=function(e,n){var i=t.camelCase(e),r={};r[i]=n;var o=u._convertData(r);t.extend(!0,this.defaults,o)};var P=new T;return P}),e.define("select2/options",function(t,e,n,i){function r(e,r){if(this.options=e,null!=r&&this.fromElement(r),null!=r&&(this.options=n.applyFromElement(this.options,r)),this.options=n.apply(this.options),r&&r.is("input")){var o=t(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,o)}}return r.prototype.fromElement=function(t){var n=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),i.GetData(t[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),i.StoreData(t[0],"data",i.GetData(t[0],"select2Tags")),i.StoreData(t[0],"tags",!0)),i.GetData(t[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",i.GetData(t[0],"ajaxUrl")),i.StoreData(t[0],"ajax-Url",i.GetData(t[0],"ajaxUrl")));var r={};function o(t,e){return e.toUpperCase()}for(var a=0;a<t[0].attributes.length;a++){var s=t[0].attributes[a].name;if("data-"==s.substr(0,"data-".length)){var l=s.substring("data-".length),u=i.GetData(t[0],l),c=l.replace(/-([a-z])/g,o);r[c]=u}}var d=e.extend(!0,{},i.GetData(t[0]),r);for(var f in d=i._convertData(d))e.inArray(f,n)>-1||(e.isPlainObject(this.options[f])?e.extend(this.options[f],d[f]):this.options[f]=d[f]);return this},r.prototype.get=function(t){return this.options[t]},r.prototype.set=function(t,e){this.options[t]=e},r}),e.define("select2/core",function(t,e,n,i){var r=function(t,i){null!=n.GetData(t[0],"select2")&&n.GetData(t[0],"select2").destroy(),this.$element=t,this.id=this._generateId(t),i=i||{},this.options=new e(i,t),r.__super__.constructor.call(this);var o=t.attr("tabindex")||0;n.StoreData(t[0],"old-tabindex",o),t.attr("tabindex","-1");var a=this.options.get("dataAdapter");this.dataAdapter=new a(t,this.options);var s=this.render();this._placeContainer(s);var l=this.options.get("selectionAdapter");this.selection=new l(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,s);var u=this.options.get("dropdownAdapter");this.dropdown=new u(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,s);var c=this.options.get("resultsAdapter");this.results=new c(t,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var d=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(t){d.trigger("selection:update",{data:t})}),t.addClass("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(t[0],"select2",this),t.data("select2",this)};return n.Extend(r,n.Observable),r.prototype._generateId=function(t){return"select2-"+(null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},r.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},r.prototype._resolveWidth=function(t,e){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var i=this._resolveWidth(t,"style");return null!=i?i:this._resolveWidth(t,"element")}if("element"==e){var r=t.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==e){var o=t.attr("style");if("string"!=typeof o)return null;for(var a=o.split(";"),s=0,l=a.length;s<l;s+=1){var u=a[s].replace(/\s/g,""),c=u.match(n);if(null!==c&&c.length>=1)return c[1]}return null}if("computedstyle"==e){var d=window.getComputedStyle(t[0]);return d.width}return e},r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},r.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},r.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",function(e,n){t.trigger(e,n)})},r.prototype._registerSelectionEvents=function(){var e=this,n=["toggle","focus"];this.selection.on("toggle",function(){e.toggleDropdown()}),this.selection.on("focus",function(t){e.focus(t)}),this.selection.on("*",function(i,r){-1===t.inArray(i,n)&&e.trigger(i,r)})},r.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",function(e,n){t.trigger(e,n)})},r.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",function(e,n){t.trigger(e,n)})},r.prototype._registerEvents=function(){var t=this;this.on("open",function(){t.$container.addClass("select2-container--open")}),this.on("close",function(){t.$container.removeClass("select2-container--open")}),this.on("enable",function(){t.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){t.$container.addClass("select2-container--disabled")}),this.on("blur",function(){t.$container.removeClass("select2-container--focus")}),this.on("query",function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,function(n){t.trigger("results:all",{data:n,query:e})})}),this.on("query:append",function(e){this.dataAdapter.query(e,function(n){t.trigger("results:append",{data:n,query:e})})}),this.on("keypress",function(e){var n=e.which;t.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&e.altKey?(t.close(e),e.preventDefault()):n===i.ENTER?(t.trigger("results:select",{}),e.preventDefault()):n===i.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):n===i.UP?(t.trigger("results:previous",{}),e.preventDefault()):n===i.DOWN&&(t.trigger("results:next",{}),e.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&e.altKey)&&(t.open(),e.preventDefault())})},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._isChangeMutation=function(e,n){var i=!1,r=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(n)if(n.addedNodes&&n.addedNodes.length>0)for(var o=0;o<n.addedNodes.length;o++){var a=n.addedNodes[o];a.selected&&(i=!0)}else n.removedNodes&&n.removedNodes.length>0?i=!0:t.isArray(n)&&t.each(n,function(t,e){if(r._isChangeMutation(t,e))return i=!0,!1});else i=!0;return i}},r.prototype._syncSubtree=function(t,e){var n=this._isChangeMutation(t,e),i=this;n&&this.dataAdapter.current(function(t){i.trigger("selection:update",{data:t})})},r.prototype.trigger=function(t,e){var n=r.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===e&&(e={}),t in i){var o=i[t],a={prevented:!1,name:t,args:e};if(n.call(this,o,a),a.prevented)return void(e.prevented=!0)}n.call(this,t,e)},r.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},r.prototype.close=function(t){this.isOpen()&&this.trigger("close",{originalEvent:t})},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},r.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},r.prototype.focus=function(t){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},r.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},r.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var n=e[0];t.isArray(n)&&(n=t.map(n,function(t){return t.toString()})),this.$element.val(n).trigger("input").trigger("change")},r.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},r.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),n.StoreData(e[0],"element",this.$element),e},r}),e.define("select2/compat/utils",function(t){return{syncCssClasses:function(e,n,i){var r,o,a=[];(r=t.trim(e.attr("class")))&&t((r=""+r).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&a.push(this)}),(r=t.trim(n.attr("class")))&&t((r=""+r).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(o=i(this))&&a.push(o)}),e.attr("class",a.join(" "))}}}),e.define("select2/compat/containerCss",function(t,e){function n(t){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),o=this.options.get("containerCssClass")||"";t.isFunction(o)&&(o=o(this.$element));var a=this.options.get("adaptContainerCssClass");if(a=a||n,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var s=a;a=function(t){var e=s(t);return null!=e?e+" "+t:t}}var l=this.options.get("containerCss")||{};return t.isFunction(l)&&(l=l(this.$element)),e.syncCssClasses(r,this.$element,a),r.css(l),r.addClass(o),r},i}),e.define("select2/compat/dropdownCss",function(t,e){function n(t){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),o=this.options.get("dropdownCssClass")||"";t.isFunction(o)&&(o=o(this.$element));var a=this.options.get("adaptDropdownCssClass");if(a=a||n,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var s=a;a=function(t){var e=s(t);return null!=e?e+" "+t:t}}var l=this.options.get("dropdownCss")||{};return t.isFunction(l)&&(l=l(this.$element)),e.syncCssClasses(r,this.$element,a),r.css(l),r.addClass(o),r},i}),e.define("select2/compat/initSelection",function(t){function e(t,e,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,t.call(this,e,n)}return e.prototype.current=function(e,n){var i=this;this._isInitialized?e.call(this,n):this.initSelection.call(null,this.$element,function(e){i._isInitialized=!0,t.isArray(e)||(e=[e]),n(e)})},e}),e.define("select2/compat/inputData",function(t,e){function n(t,e,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===e.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),t.call(this,e,n)}return n.prototype.current=function(e,n){function i(e,n){var r=[];return e.selected||-1!==t.inArray(e.id,n)?(e.selected=!0,r.push(e)):e.selected=!1,e.children&&r.push.apply(r,i(e.children,n)),r}for(var r=[],o=0;o<this._currentData.length;o++){var a=this._currentData[o];r.push.apply(r,i(a,this.$element.val().split(this._valueSeparator)))}n(r)},n.prototype.select=function(e,n){if(this.options.get("multiple")){var i=this.$element.val();i+=this._valueSeparator+n.id,this.$element.val(i),this.$element.trigger("input").trigger("change")}else this.current(function(e){t.map(e,function(t){t.selected=!1})}),this.$element.val(n.id),this.$element.trigger("input").trigger("change")},n.prototype.unselect=function(t,e){var n=this;e.selected=!1,this.current(function(t){for(var i=[],r=0;r<t.length;r++){var o=t[r];e.id!=o.id&&i.push(o.id)}n.$element.val(i.join(n._valueSeparator)),n.$element.trigger("input").trigger("change")})},n.prototype.query=function(t,e,n){for(var i=[],r=0;r<this._currentData.length;r++){var o=this._currentData[r],a=this.matches(e,o);null!==a&&i.push(a)}n({results:i})},n.prototype.addOptions=function(n,i){var r=t.map(i,function(t){return e.GetData(t[0],"data")});this._currentData.push.apply(this._currentData,r)},n}),e.define("select2/compat/matcher",function(t){return function(e){return function(n,i){var r=t.extend(!0,{},i);if(null==n.term||""===t.trim(n.term))return r;if(i.children){for(var o=i.children.length-1;o>=0;o--){var a=i.children[o],s=e(n.term,a.text,a);s||r.children.splice(o,1)}if(r.children.length>0)return r}return e(n.term,i.text,i)?r:null}}}),e.define("select2/compat/query",[],function(){function t(t,e,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),t.call(this,e,n)}return t.prototype.query=function(t,e,n){e.callback=n;var i=this.options.get("query");i.call(null,e)},t}),e.define("select2/dropdown/attachContainer",[],function(){function t(t,e,n){t.call(this,e,n)}return t.prototype.position=function(t,e,n){var i=n.find(".dropdown-wrapper");i.append(e),e.addClass("select2-dropdown--below"),n.addClass("select2-container--below")},t}),e.define("select2/dropdown/stopPropagation",[],function(){function t(){}return t.prototype.bind=function(t,e,n){t.call(this,e,n),this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(t){t.stopPropagation()})},t}),e.define("select2/selection/stopPropagation",[],function(){function t(){}return t.prototype.bind=function(t,e,n){t.call(this,e,n),this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(t){t.stopPropagation()})},t}),o=function(t){var e,n,i=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],o=Array.prototype.slice;if(t.event.fixHooks)for(var a=i.length;a;)t.event.fixHooks[i[--a]]=t.event.mouseHooks;var s=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=r.length;e;)this.addEventListener(r[--e],l,!1);else this.onmousewheel=l;t.data(this,"mousewheel-line-height",s.getLineHeight(this)),t.data(this,"mousewheel-page-height",s.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=r.length;e;)this.removeEventListener(r[--e],l,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var n=t(e),i=n["offsetParent"in t.fn?"offsetParent":"parent"]();return i.length||(i=t("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(i){var r=i||window.event,a=o.call(arguments,1),l=0,d=0,f=0,h=0,p=0,v=0;if((i=t.event.fix(r)).type="mousewheel","detail"in r&&(f=-1*r.detail),"wheelDelta"in r&&(f=r.wheelDelta),"wheelDeltaY"in r&&(f=r.wheelDeltaY),"wheelDeltaX"in r&&(d=-1*r.wheelDeltaX),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(d=-1*f,f=0),l=0===f?d:f,"deltaY"in r&&(f=-1*r.deltaY,l=f),"deltaX"in r&&(d=r.deltaX,0===f&&(l=-1*d)),0!==f||0!==d){if(1===r.deltaMode){var m=t.data(this,"mousewheel-line-height");l*=m,f*=m,d*=m}else if(2===r.deltaMode){var g=t.data(this,"mousewheel-page-height");l*=g,f*=g,d*=g}if(h=Math.max(Math.abs(f),Math.abs(d)),(!n||h<n)&&(n=h,c(r,h)&&(n/=40)),c(r,h)&&(l/=40,d/=40,f/=40),l=Math[l>=1?"floor":"ceil"](l/n),d=Math[d>=1?"floor":"ceil"](d/n),f=Math[f>=1?"floor":"ceil"](f/n),s.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();p=i.clientX-y.left,v=i.clientY-y.top}return i.deltaX=d,i.deltaY=f,i.deltaFactor=n,i.offsetX=p,i.offsetY=v,i.deltaMode=0,a.unshift(i,l,d,f),e&&clearTimeout(e),e=setTimeout(u,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function u(){n=null}function c(t,e){return s.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})},"function"==typeof e.define&&e.define.amd||("object"==typeof exports?module.exports=o:o(t)),{define:e.define,require:e.require}}();t.fn.select2.amd=e,select2}(e),e}),function(t,e){"function"==typeof define&&define.amd?define("bloodhound",["jquery"],function(n){return t.Bloodhound=e(n)}):"object"==typeof exports&&(module.exports=e(require("jquery")))}(this,function(t){var e=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return void 0===t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(e){return e instanceof t},toStr:function(t){return e.isUndefined(t)||null===t?"":t+""},bind:t.proxy,each:function(e,n){t.each(e,function(t,e){return n(e,t)})},map:t.map,filter:t.grep,every:function(e,n){var i=!0;return e?(t.each(e,function(t,r){if(!(i=n.call(null,r,t,e)))return!1}),!!i):i},some:function(e,n){var i=!1;return e?(t.each(e,function(t,r){if(i=n.call(null,r,t,e))return!1}),!!i):i},mixin:t.extend,identity:function(t){return t},clone:function(e){return t.extend(!0,{},e)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function(e){return t.isFunction(e)?e:function(){return String(e)}},defer:function(t){setTimeout(t,0)},debounce:function(t,e,n){var i,r;return function(){var o,a,s=this,l=arguments;return o=function(){i=null,n||(r=t.apply(s,l))},a=n&&!i,clearTimeout(i),i=setTimeout(o,e),a&&(r=t.apply(s,l)),r}},throttle:function(t,e){var n,i,r,o,a,s;return a=0,s=function(){a=new Date,r=null,o=t.apply(n,i)},function(){var l=new Date,u=e-(l-a);return n=this,i=arguments,u<=0?(clearTimeout(r),r=null,a=l,o=t.apply(n,i)):r||(r=setTimeout(s,u)),o}},stringify:function(t){return e.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),n="0.11.1",i=function(){"use strict";return{nonword:n,whitespace:t,obj:{nonword:i(n),whitespace:i(t)}};function t(t){return(t=e.toStr(t))?t.split(/\s+/):[]}function n(t){return(t=e.toStr(t))?t.split(/\W+/):[]}function i(t){return function(n){return n=e.isArray(n)?n:[].slice.call(arguments,0),function(i){var r=[];return e.each(n,function(n){r=r.concat(t(e.toStr(i[n])))}),r}}}}(),r=function(){"use strict";function n(n){this.maxSize=e.isNumber(n)?n:100,this.reset(),this.maxSize<=0&&(this.set=this.get=t.noop)}function i(){this.head=this.tail=null}function r(t,e){this.key=t,this.val=e,this.prev=this.next=null}return e.mixin(n.prototype,{set:function(t,e){var n,i=this.list.tail;this.size>=this.maxSize&&(this.list.remove(i),delete this.hash[i.key],this.size--),(n=this.hash[t])?(n.val=e,this.list.moveToFront(n)):(n=new r(t,e),this.list.add(n),this.hash[t]=n,this.size++)},get:function(t){var e=this.hash[t];if(e)return this.list.moveToFront(e),e.val},reset:function(){this.size=0,this.hash={},this.list=new i}}),e.mixin(i.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(t){this.remove(t),this.add(t)}}),n}(),o=function(){"use strict";var n;try{(n=window.localStorage).setItem("~~~","!"),n.removeItem("~~~")}catch(t){n=null}function i(t,i){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+e.escapeRegExChars(this.prefix)),this.ls=i||n,!this.ls&&this._noop()}return e.mixin(i.prototype,{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=e.noop},_safeSet:function(t,e){try{this.ls.setItem(t,e)}catch(t){"QuotaExceededError"===t.name&&(this.clear(),this._noop())}},get:function(t){return this.isExpired(t)&&this.remove(t),a(this.ls.getItem(this._prefix(t)))},set:function(t,n,i){return e.isNumber(i)?this._safeSet(this._ttlKey(t),o(r()+i)):this.ls.removeItem(this._ttlKey(t)),this._safeSet(this._prefix(t),o(n))},remove:function(t){return this.ls.removeItem(this._ttlKey(t)),this.ls.removeItem(this._prefix(t)),this},clear:function(){var t,e=function(t){var e,i,r=[],o=n.length;for(e=0;e<o;e++)(i=n.key(e)).match(t)&&r.push(i.replace(t,""));return r}(this.keyMatcher);for(t=e.length;t--;)this.remove(e[t]);return this},isExpired:function(t){var n=a(this.ls.getItem(this._ttlKey(t)));return!!(e.isNumber(n)&&r()>n)}}),i;function r(){return(new Date).getTime()}function o(t){return JSON.stringify(e.isUndefined(t)?null:t)}function a(e){return t.parseJSON(e)}}(),a=function(){"use strict";var n=0,i={},o=6,a=new r(10);function s(t){t=t||{},this.cancelled=!1,this.lastReq=null,this._send=t.transport,this._get=t.limiter?t.limiter(this._get):this._get,this._cache=!1===t.cache?new r(0):a}return s.setMaxPendingRequests=function(t){o=t},s.resetCache=function(){a.reset()},e.mixin(s.prototype,{_fingerprint:function(e){return(e=e||{}).url+e.type+t.param(e.data||{})},_get:function(t,e){var r,a,s=this;function l(t){e(null,t),s._cache.set(r,t)}function u(){e(!0)}r=this._fingerprint(t),this.cancelled||r!==this.lastReq||((a=i[r])?a.done(l).fail(u):n<o?(n++,i[r]=this._send(t).done(l).fail(u).always(function(){n--,delete i[r],s.onDeckRequestArgs&&(s._get.apply(s,s.onDeckRequestArgs),s.onDeckRequestArgs=null)})):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(n,i){var r,o;i=i||t.noop,n=e.isString(n)?{url:n}:n||{},o=this._fingerprint(n),this.cancelled=!1,this.lastReq=o,(r=this._cache.get(o))?i(null,r):this._get(n,i)},cancel:function(){this.cancelled=!0}}),s}(),s=window.SearchIndex=function(){"use strict";var n="c",i="i";function r(n){(n=n||{}).datumTokenizer&&n.queryTokenizer||t.error("datumTokenizer and queryTokenizer are both required"),this.identify=n.identify||e.stringify,this.datumTokenizer=n.datumTokenizer,this.queryTokenizer=n.queryTokenizer,this.reset()}return e.mixin(r.prototype,{bootstrap:function(t){this.datums=t.datums,this.trie=t.trie},add:function(t){var r=this;t=e.isArray(t)?t:[t],e.each(t,function(t){var s,l;r.datums[s=r.identify(t)]=t,l=o(r.datumTokenizer(t)),e.each(l,function(t){var e,o,l;for(e=r.trie,o=t.split("");l=o.shift();)(e=e[n][l]||(e[n][l]=a()))[i].push(s)})})},get:function(t){var n=this;return e.map(t,function(t){return n.datums[t]})},search:function(t){var r,a,s=this;return r=o(this.queryTokenizer(t)),e.each(r,function(t){var e,r,o,l;if(a&&0===a.length)return!1;for(e=s.trie,r=t.split("");e&&(o=r.shift());)e=e[n][o];if(!e||0!==r.length)return a=[],!1;l=e[i].slice(0),a=a?function(t,e){var n=0,i=0,r=[];t=t.sort(),e=e.sort();var o=t.length,a=e.length;for(;n<o&&i<a;)t[n]<e[i]?n++:t[n]>e[i]?i++:(r.push(t[n]),n++,i++);return r}(a,l):l}),a?e.map(function(t){for(var e={},n=[],i=0,r=t.length;i<r;i++)e[t[i]]||(e[t[i]]=!0,n.push(t[i]));return n}(a),function(t){return s.datums[t]}):[]},all:function(){var t=[];for(var e in this.datums)t.push(this.datums[e]);return t},reset:function(){this.datums={},this.trie=a()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),r;function o(t){return t=e.filter(t,function(t){return!!t}),t=e.map(t,function(t){return t.toLowerCase()})}function a(){var t={};return t[i]=[],t[n]={},t}}(),l=function(){"use strict";var t;function n(t){this.url=t.url,this.ttl=t.ttl,this.cache=t.cache,this.prepare=t.prepare,this.transform=t.transform,this.transport=t.transport,this.thumbprint=t.thumbprint,this.storage=new o(t.cacheKey)}return t={data:"data",protocol:"protocol",thumbprint:"thumbprint"},e.mixin(n.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(e){this.cache&&(this.storage.set(t.data,e,this.ttl),this.storage.set(t.protocol,location.protocol,this.ttl),this.storage.set(t.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var e,n={};return this.cache?(n.data=this.storage.get(t.data),n.protocol=this.storage.get(t.protocol),n.thumbprint=this.storage.get(t.thumbprint),e=n.thumbprint!==this.thumbprint||n.protocol!==location.protocol,n.data&&!e?n.data:null):null},fromNetwork:function(t){var e,n=this;t&&(e=this.prepare(this._settings()),this.transport(e).fail(function(){t(!0)}).done(function(e){t(null,n.transform(e))}))},clear:function(){return this.storage.clear(),this}}),n}(),u=function(){"use strict";function t(t){this.url=t.url,this.prepare=t.prepare,this.transform=t.transform,this.transport=new a({cache:t.cache,limiter:t.limiter,transport:t.transport})}return e.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(t,e){var n,i=this;if(e)return t=t||"",n=this.prepare(t,this._settings()),this.transport.get(n,function(t,n){e(t?[]:i.transform(n))})},cancelLastRequest:function(){this.transport.cancel()}}),t}(),c=function(){"use strict";return function(r){var o,a;return o={initialize:!0,identify:e.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null},!(r=e.mixin(o,r||{})).datumTokenizer&&t.error("datumTokenizer is required"),!r.queryTokenizer&&t.error("queryTokenizer is required"),a=r.sorter,r.sorter=a?function(t){return t.sort(a)}:e.identity,r.local=e.isFunction(r.local)?r.local():r.local,r.prefetch=function(r){var o;if(!r)return null;return o={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:e.identity,transform:e.identity,transport:null},r=e.isString(r)?{url:r}:r,!(r=e.mixin(o,r)).url&&t.error("prefetch requires url to be set"),r.transform=r.filter||r.transform,r.cacheKey=r.cacheKey||r.url,r.thumbprint=n+r.thumbprint,r.transport=r.transport?i(r.transport):t.ajax,r}(r.prefetch),r.remote=function(n){var r;if(!n)return;return r={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:e.identity,transport:null},n=e.isString(n)?{url:n}:n,!(n=e.mixin(r,n)).url&&t.error("remote requires url to be set"),n.transform=n.filter||n.transform,n.prepare=function(t){var e,n,i;return e=t.prepare,n=t.replace,i=t.wildcard,e||(e=n?function(t,e){return e.url=n(e.url,t),e}:t.wildcard?function(t,e){return e.url=e.url.replace(i,encodeURIComponent(t)),e}:function(t,e){return e})}(n),n.limiter=function(t){var n,i,r;return n=t.limiter,i=t.rateLimitBy,r=t.rateLimitWait,n||(n=/^throttle$/i.test(i)?function(t){return function(n){return e.throttle(n,t)}}(r):function(t){return function(n){return e.debounce(n,t)}}(r)),n}(n),n.transport=n.transport?i(n.transport):t.ajax,delete n.replace,delete n.wildcard,delete n.rateLimitBy,delete n.rateLimitWait,n}(r.remote),r};function i(n){return function(i){var r=t.Deferred();return n(i,function(t){e.defer(function(){r.resolve(t)})},function(t){e.defer(function(){r.reject(t)})}),r}}}();return function(){"use strict";var n;function r(t){t=c(t),this.sorter=t.sorter,this.identify=t.identify,this.sufficient=t.sufficient,this.local=t.local,this.remote=t.remote?new u(t.remote):null,this.prefetch=t.prefetch?new l(t.prefetch):null,this.index=new s({identify:this.identify,datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer}),!1!==t.initialize&&this.initialize()}return n=window&&window.Bloodhound,r.noConflict=function(){return window&&(window.Bloodhound=n),r},r.tokenizers=i,e.mixin(r.prototype,{__ttAdapter:function(){var t=this;return this.remote?function(e,n,i){return t.search(e,n,i)}:function(e,n){return t.search(e,n)}},_loadPrefetch:function(){var e,n,i=this;return e=t.Deferred(),this.prefetch?(n=this.prefetch.fromCache())?(this.index.bootstrap(n),e.resolve()):this.prefetch.fromNetwork(function(t,n){if(t)return e.reject();i.add(n),i.prefetch.store(i.index.serialize()),e.resolve()}):e.resolve(),e.promise()},_initialize:function(){var t=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(function(){t.add(t.local)}),this.initPromise},initialize:function(t){return!this.initPromise||t?this._initialize():this.initPromise},add:function(t){return this.index.add(t),this},get:function(t){return t=e.isArray(t)?t:[].slice.call(arguments),this.index.get(t)},search:function(t,n,i){var r,o=this;return r=this.sorter(this.index.search(t)),n(this.remote?r.slice():r),this.remote&&r.length<this.sufficient?this.remote.get(t,function(t){var n=[];e.each(t,function(t){!e.some(r,function(e){return o.identify(t)===o.identify(e)})&&n.push(t)}),i&&i(n)}):this.remote&&this.remote.cancelLastRequest(),this},all:function(){return this.index.all()},clear:function(){return this.index.reset(),this},clearPrefetchCache:function(){return this.prefetch&&this.prefetch.clear(),this},clearRemoteCache:function(){return a.resetCache(),this},ttAdapter:function(){return this.__ttAdapter()}}),r}()}),function(t,e){"function"==typeof define&&define.amd?define("typeahead.js",["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(0,function(t){var e=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return void 0===t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(e){return e instanceof t},toStr:function(t){return e.isUndefined(t)||null===t?"":t+""},bind:t.proxy,each:function(e,n){t.each(e,function(t,e){return n(e,t)})},map:t.map,filter:t.grep,every:function(e,n){var i=!0;return e?(t.each(e,function(t,r){if(!(i=n.call(null,r,t,e)))return!1}),!!i):i},some:function(e,n){var i=!1;return e?(t.each(e,function(t,r){if(i=n.call(null,r,t,e))return!1}),!!i):i},mixin:t.extend,identity:function(t){return t},clone:function(e){return t.extend(!0,{},e)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function(e){return t.isFunction(e)?e:function(){return String(e)}},defer:function(t){setTimeout(t,0)},debounce:function(t,e,n){var i,r;return function(){var o,a,s=this,l=arguments;return o=function(){i=null,n||(r=t.apply(s,l))},a=n&&!i,clearTimeout(i),i=setTimeout(o,e),a&&(r=t.apply(s,l)),r}},throttle:function(t,e){var n,i,r,o,a,s;return a=0,s=function(){a=new Date,r=null,o=t.apply(n,i)},function(){var l=new Date,u=e-(l-a);return n=this,i=arguments,u<=0?(clearTimeout(r),r=null,a=l,o=t.apply(n,i)):r||(r=setTimeout(s,u)),o}},stringify:function(t){return e.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),n=function(){"use strict";var t={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return function(r){var o,a;return a=e.mixin({},t,r),{css:(o={css:i(),classes:a,html:(s=a,{wrapper:'<span class="'+s.wrapper+'"></span>',menu:'<div class="'+s.menu+'"></div>'}),selectors:n(a)}).css,html:o.html,classes:o.classes,selectors:o.selectors,mixin:function(t){e.mixin(t,o)}};var s};function n(t){var n={};return e.each(t,function(t,e){n[e]="."+t}),n}function i(){var t={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return e.isMsie()&&e.mixin(t.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t}}(),i=function(){"use strict";var n;function i(e){e&&e.el||t.error("EventBus initialized without el"),this.$el=t(e.el)}return"typeahead:",n={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},e.mixin(i.prototype,{_trigger:function(e,n){var i;return i=t.Event("typeahead:"+e),(n=n||[]).unshift(i),this.$el.trigger.apply(this.$el,n),i},before:function(t){var e;return e=[].slice.call(arguments,1),this._trigger("before"+t,e).isDefaultPrevented()},trigger:function(t){var e;this._trigger(t,[].slice.call(arguments,1)),(e=n[t])&&this._trigger(e,[].slice.call(arguments,1))}}),i}(),r=function(){"use strict";var t=/\s+/,e=function(){var t;t=window.setImmediate?function(t){setImmediate(function(){t()})}:function(t){setTimeout(function(){t()},0)};return t}();return{onSync:function(t,e,i){return n.call(this,"sync",t,e,i)},onAsync:function(t,e,i){return n.call(this,"async",t,e,i)},off:function(e){var n;if(!this._callbacks)return this;e=e.split(t);for(;n=e.shift();)delete this._callbacks[n];return this},trigger:function(n){var r,o,a,s,l;if(!this._callbacks)return this;n=n.split(t),a=[].slice.call(arguments,1);for(;(r=n.shift())&&(o=this._callbacks[r]);)s=i(o.sync,this,[r].concat(a)),l=i(o.async,this,[r].concat(a)),s()&&e(l);return this}};function n(e,n,i,r){var o;if(!i)return this;for(n=n.split(t),i=r?function(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}(i,r):i,this._callbacks=this._callbacks||{};o=n.shift();)this._callbacks[o]=this._callbacks[o]||{sync:[],async:[]},this._callbacks[o][e].push(i);return this}function i(t,e,n){return function(){for(var i,r=0,o=t.length;!i&&r<o;r+=1)i=!1===t[r].apply(e,n);return!i}}}(),o=function(t){"use strict";var n={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(i){var r;(i=e.mixin({},n,i)).node&&i.pattern&&(i.pattern=e.isArray(i.pattern)?i.pattern:[i.pattern],r=function(t,n,i){for(var r,o=[],a=0,s=t.length;a<s;a++)o.push(e.escapeRegExChars(t[a]));return r=i?"\\b("+o.join("|")+")\\b":"("+o.join("|")+")",n?new RegExp(r):new RegExp(r,"i")}(i.pattern,i.caseSensitive,i.wordsOnly),function t(e,n){var i;for(var r=0;r<e.childNodes.length;r++)3===(i=e.childNodes[r]).nodeType?r+=n(i)?1:0:t(i,n)}(i.node,function(e){var n,o,a;(n=r.exec(e.data))&&(a=t.createElement(i.tagName),i.className&&(a.className=i.className),(o=e.splitText(n.index)).splitText(n[0].length),a.appendChild(o.cloneNode(!0)),e.parentNode.replaceChild(a,o));return!!n}))}}(window.document),a=function(){"use strict";var n;function i(n,i){var r;(n=n||{}).input||t.error("input is missing"),i.mixin(this),this.$hint=t(n.hint),this.$input=t(n.input),this.query=this.$input.val(),this.queryWhenFocused=this.hasFocus()?this.query:null,this.$overflowHelper=(r=this.$input,t('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:r.css("font-family"),fontSize:r.css("font-size"),fontStyle:r.css("font-style"),fontVariant:r.css("font-variant"),fontWeight:r.css("font-weight"),wordSpacing:r.css("word-spacing"),letterSpacing:r.css("letter-spacing"),textIndent:r.css("text-indent"),textRendering:r.css("text-rendering"),textTransform:r.css("text-transform")}).insertAfter(r)),this._checkLanguageDirection(),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=e.noop)}return n={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},i.normalizeQuery=function(t){return e.toStr(t).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},e.mixin(i.prototype,r,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query,this.trigger("focused")},_onKeydown:function(t){var e=n[t.which||t.keyCode];this._managePreventDefault(e,t),e&&this._shouldTrigger(e,t)&&this.trigger(e+"Keyed",t)},_onInput:function(){this._setQuery(this.getInputValue()),this.clearHintIfInvalid(),this._checkLanguageDirection()},_managePreventDefault:function(t,e){var n;switch(t){case"up":case"down":n=!o(e);break;default:n=!1}n&&e.preventDefault()},_shouldTrigger:function(t,e){var n;switch(t){case"tab":n=!o(e);break;default:n=!0}return n},_checkLanguageDirection:function(){var t=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==t&&(this.dir=t,this.$hint.attr("dir",t),this.trigger("langDirChanged",t))},_setQuery:function(t,e){var n,r,o,a;o=t,a=this.query,r=!!(n=i.normalizeQuery(o)===i.normalizeQuery(a))&&this.query.length!==t.length,this.query=t,e||n?!e&&r&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},bind:function(){var t,i,r,o,a=this;return t=e.bind(this._onBlur,this),i=e.bind(this._onFocus,this),r=e.bind(this._onKeydown,this),o=e.bind(this._onInput,this),this.$input.on("blur.tt",t).on("focus.tt",i).on("keydown.tt",r),!e.isMsie()||e.isMsie()>9?this.$input.on("input.tt",o):this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(t){n[t.which||t.keyCode]||e.defer(e.bind(a._onInput,a,t))}),this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(t,e){this.setInputValue(t),this._setQuery(t,e)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(t){this.$input.val(t),this.clearHintIfInvalid(),this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,e,n;n=(t=this.getInputValue())!==(e=this.getHint())&&0===e.indexOf(t),!(""!==t&&n&&!this.hasOverflow())&&this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var t,n,i;return t=this.$input.val().length,n=this.$input[0].selectionStart,e.isNumber(n)?n===t:!document.selection||((i=document.selection.createRange()).moveStart("character",-t),t===i.text.length)},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$overflowHelper.remove(),this.$hint=this.$input=this.$overflowHelper=t("<div>")}}),i;function o(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}}(),s=function(){"use strict";var n,i;function a(n,r){var o;(n=n||{}).templates=n.templates||{},n.templates.notFound=n.templates.notFound||n.templates.empty,n.source||t.error("missing source"),n.node||t.error("missing node"),n.name&&(o=n.name,!/^[_a-zA-Z0-9-]+$/.test(o))&&t.error("invalid dataset name: "+n.name),r.mixin(this),this.highlight=!!n.highlight,this.name=n.name||i(),this.limit=n.limit||5,this.displayFn=function(t){return t=t||e.stringify,e.isFunction(t)?t:function(e){return e[t]}}(n.display||n.displayKey),this.templates=function(n,i){return{notFound:n.notFound&&e.templatify(n.notFound),pending:n.pending&&e.templatify(n.pending),header:n.header&&e.templatify(n.header),footer:n.footer&&e.templatify(n.footer),suggestion:n.suggestion||function(e){return t("<div>").text(i(e))}}}(n.templates,this.displayFn),this.source=n.source.__ttAdapter?n.source.__ttAdapter():n.source,this.async=e.isUndefined(n.async)?this.source.length>2:!!n.async,this._resetLastSuggestion(),this.$el=t(n.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}return n={val:"tt-selectable-display",obj:"tt-selectable-object"},i=e.getIdGenerator(),a.extractData=function(e){var i=t(e);return i.data(n.obj)?{val:i.data(n.val)||"",obj:i.data(n.obj)||null}:null},e.mixin(a.prototype,r,{_overwrite:function(t,e){(e=e||[]).length?this._renderSuggestions(t,e):this.async&&this.templates.pending?this._renderPending(t):!this.async&&this.templates.notFound?this._renderNotFound(t):this._empty(),this.trigger("rendered",this.name,e,!1)},_append:function(t,e){(e=e||[]).length&&this.$lastSuggestion.length?this._appendSuggestions(t,e):e.length?this._renderSuggestions(t,e):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(t),this.trigger("rendered",this.name,e,!0)},_renderSuggestions:function(t,e){var n;n=this._getSuggestionsFragment(t,e),this.$lastSuggestion=n.children().last(),this.$el.html(n).prepend(this._getHeader(t,e)).append(this._getFooter(t,e))},_appendSuggestions:function(t,e){var n,i;i=(n=this._getSuggestionsFragment(t,e)).children().last(),this.$lastSuggestion.after(n),this.$lastSuggestion=i},_renderPending:function(t){var e=this.templates.pending;this._resetLastSuggestion(),e&&this.$el.html(e({query:t,dataset:this.name}))},_renderNotFound:function(t){var e=this.templates.notFound;this._resetLastSuggestion(),e&&this.$el.html(e({query:t,dataset:this.name}))},_empty:function(){this.$el.empty(),this._resetLastSuggestion()},_getSuggestionsFragment:function(i,r){var a,s=this;return a=document.createDocumentFragment(),e.each(r,function(e){var r,o;o=s._injectQuery(i,e),r=t(s.templates.suggestion(o)).data(n.obj,e).data(n.val,s.displayFn(e)).addClass(s.classes.suggestion+" "+s.classes.selectable),a.appendChild(r[0])}),this.highlight&&o({className:this.classes.highlight,node:a,pattern:i}),t(a)},_getFooter:function(t,e){return this.templates.footer?this.templates.footer({query:t,suggestions:e,dataset:this.name}):null},_getHeader:function(t,e){return this.templates.header?this.templates.header({query:t,suggestions:e,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=t()},_injectQuery:function(t,n){return e.isObject(n)?e.mixin({_query:t},n):n},update:function(e){var n=this,i=!1,r=!1,o=0;function a(t){r||(r=!0,t=(t||[]).slice(0,n.limit),o=t.length,n._overwrite(e,t),o<n.limit&&n.async&&n.trigger("asyncRequested",e))}this.cancel(),this.cancel=function(){i=!0,n.cancel=t.noop,n.async&&n.trigger("asyncCanceled",e)},this.source(e,a,function(r){r=r||[],!i&&o<n.limit&&(n.cancel=t.noop,o+=r.length,n._append(e,r.slice(0,n.limit-o)),n.async&&n.trigger("asyncReceived",e))}),!r&&a([])},cancel:t.noop,clear:function(){this._empty(),this.cancel(),this.trigger("cleared")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=t("<div>")}}),a}(),l=function(){"use strict";function n(n,i){var r=this;(n=n||{}).node||t.error("node is required"),i.mixin(this),this.$node=t(n.node),this.query=null,this.datasets=e.map(n.datasets,function(e){var n=r.$node.find(e.node).first();return e.node=n.length?n:t("<div>").appendTo(r.$node),new s(e,i)})}return e.mixin(n.prototype,r,{_onSelectableClick:function(e){this.trigger("selectableClicked",t(e.currentTarget))},_onRendered:function(t,e,n,i){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetRendered",e,n,i)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){return e.every(this.datasets,function(t){return t.isEmpty()})},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var t=this.getActiveSelectable();t&&t.removeClass(this.classes.cursor)},_ensureVisible:function(t){var e,n,i,r;n=(e=t.position().top)+t.outerHeight(!0),i=this.$node.scrollTop(),r=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10),e<0?this.$node.scrollTop(i+e):r<n&&this.$node.scrollTop(i+(n-r))},bind:function(){var t,n=this;return t=e.bind(this._onSelectableClick,this),this.$node.on("click.tt",this.selectors.selectable,t),e.each(this.datasets,function(t){t.onSync("asyncRequested",n._propagate,n).onSync("asyncCanceled",n._propagate,n).onSync("asyncReceived",n._propagate,n).onSync("rendered",n._onRendered,n).onSync("cleared",n._onCleared,n)}),this},isOpen:function(){return this.$node.hasClass(this.classes.open)},open:function(){this.$node.addClass(this.classes.open)},close:function(){this.$node.removeClass(this.classes.open),this._removeCursor()},setLanguageDirection:function(t){this.$node.attr("dir",t)},selectableRelativeToCursor:function(t){var e,n,i;return n=this.getActiveSelectable(),e=this._getSelectables(),-1===(i=(i=((i=(n?e.index(n):-1)+t)+1)%(e.length+1)-1)<-1?e.length-1:i)?null:e.eq(i)},setCursor:function(t){this._removeCursor(),(t=t&&t.first())&&(t.addClass(this.classes.cursor),this._ensureVisible(t))},getSelectableData:function(t){return t&&t.length?s.extractData(t):null},getActiveSelectable:function(){var t=this._getSelectables().filter(this.selectors.cursor).first();return t.length?t:null},getTopSelectable:function(){var t=this._getSelectables().first();return t.length?t:null},update:function(t){var n=t!==this.query;return n&&(this.query=t,e.each(this.datasets,function(e){e.update(t)})),n},empty:function(){e.each(this.datasets,function(t){t.clear()}),this.query=null,this.$node.addClass(this.classes.empty)},destroy:function(){this.$node.off(".tt"),this.$node=t("<div>"),e.each(this.datasets,function(t){t.destroy()})}}),n}(),u=function(){"use strict";var t=l.prototype;function n(){l.apply(this,[].slice.call(arguments,0))}return e.mixin(n.prototype,l.prototype,{open:function(){return!this._allDatasetsEmpty()&&this._show(),t.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),t.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),t._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),t._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function(e){return this.$node.css("ltr"===e?this.css.ltr:this.css.rtl),t.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),n}(),c=function(){"use strict";function n(n,r){var o,a,s,l,u,c,d,f,h,p,v;(n=n||{}).input||t.error("missing input"),n.menu||t.error("missing menu"),n.eventBus||t.error("missing event bus"),r.mixin(this),this.eventBus=n.eventBus,this.minLength=e.isNumber(n.minLength)?n.minLength:1,this.input=n.input,this.menu=n.menu,this.enabled=!0,this.active=!1,this.input.hasFocus()&&this.activate(),this.dir=this.input.getLangDir(),this._hacks(),this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this),o=i(this,"activate","open","_onFocused"),a=i(this,"deactivate","_onBlurred"),s=i(this,"isActive","isOpen","_onEnterKeyed"),l=i(this,"isActive","isOpen","_onTabKeyed"),u=i(this,"isActive","_onEscKeyed"),c=i(this,"isActive","open","_onUpKeyed"),d=i(this,"isActive","open","_onDownKeyed"),f=i(this,"isActive","isOpen","_onLeftKeyed"),h=i(this,"isActive","isOpen","_onRightKeyed"),p=i(this,"_openIfActive","_onQueryChanged"),v=i(this,"_openIfActive","_onWhitespaceChanged"),this.input.bind().onSync("focused",o,this).onSync("blurred",a,this).onSync("enterKeyed",s,this).onSync("tabKeyed",l,this).onSync("escKeyed",u,this).onSync("upKeyed",c,this).onSync("downKeyed",d,this).onSync("leftKeyed",f,this).onSync("rightKeyed",h,this).onSync("queryChanged",p,this).onSync("whitespaceChanged",v,this).onSync("langDirChanged",this._onLangDirChanged,this)}return e.mixin(n.prototype,{_hacks:function(){var n,i;n=this.input.$input||t("<div>"),i=this.menu.$node||t("<div>"),n.on("blur.tt",function(t){var r,o,a;r=document.activeElement,o=i.is(r),a=i.has(r).length>0,e.isMsie()&&(o||a)&&(t.preventDefault(),t.stopImmediatePropagation(),e.defer(function(){n.focus()}))}),i.on("mousedown.tt",function(t){t.preventDefault()})},_onSelectableClicked:function(t,e){this.select(e)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(t,e,n,i){this._updateHint(),this.eventBus.trigger("render",n,i,e)},_onAsyncRequested:function(t,e,n){this.eventBus.trigger("asyncrequest",n,e)},_onAsyncCanceled:function(t,e,n){this.eventBus.trigger("asynccancel",n,e)},_onAsyncReceived:function(t,e,n){this.eventBus.trigger("asyncreceive",n,e)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(t,e){var n;(n=this.menu.getActiveSelectable())&&this.select(n)&&e.preventDefault()},_onTabKeyed:function(t,e){var n;(n=this.menu.getActiveSelectable())?this.select(n)&&e.preventDefault():(n=this.menu.getTopSelectable())&&this.autocomplete(n)&&e.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){"rtl"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onRightKeyed:function(){"ltr"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onQueryChanged:function(t,e){this._minLengthMet(e)?this.menu.update(e):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(t,e){this.dir!==e&&(this.dir=e,this.menu.setLanguageDirection(e))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(t){return(t=e.isString(t)?t:this.input.getQuery()||"").length>=this.minLength},_updateHint:function(){var t,n,i,r,o,s;t=this.menu.getTopSelectable(),n=this.menu.getSelectableData(t),i=this.input.getInputValue(),!n||e.isBlankString(i)||this.input.hasOverflow()?this.input.clearHint():(r=a.normalizeQuery(i),o=e.escapeRegExChars(r),(s=new RegExp("^(?:"+o+")(.+$)","i").exec(n.val))&&this.input.setHint(i+s[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return!!this.isActive()||!(!this.isEnabled()||this.eventBus.before("active"))&&(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return!this.isActive()||!this.eventBus.before("idle")&&(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0)},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(t){this.input.setQuery(e.toStr(t))},getVal:function(){return this.input.getQuery()},select:function(t){var e=this.menu.getSelectableData(t);return!(!e||this.eventBus.before("select",e.obj))&&(this.input.setQuery(e.val,!0),this.eventBus.trigger("select",e.obj),this.close(),!0)},autocomplete:function(t){var e,n;return e=this.input.getQuery(),!(!((n=this.menu.getSelectableData(t))&&e!==n.val)||this.eventBus.before("autocomplete",n.obj))&&(this.input.setQuery(n.val),this.eventBus.trigger("autocomplete",n.obj),!0)},moveCursor:function(t){var e,n,i,r;return e=this.input.getQuery(),n=this.menu.selectableRelativeToCursor(t),r=(i=this.menu.getSelectableData(n))?i.obj:null,!(this._minLengthMet()&&this.menu.update(e))&&!this.eventBus.before("cursorchange",r)&&(this.menu.setCursor(n),i?this.input.setInputValue(i.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",r),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),n;function i(t){var n=[].slice.call(arguments,1);return function(){var i=[].slice.call(arguments);e.each(n,function(e){return t[e].apply(t,i)})}}}();!function(){"use strict";var r,o,s;function d(e,n){e.each(function(){var e,i=t(this);(e=i.data(o.typeahead))&&n(e,i)})}function f(n){var i;return(i=e.isJQuery(n)||e.isElement(n)?t(n).first():[]).length?i:null}r=t.fn.typeahead,o={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},s={initialize:function(r,s){var d;return s=e.isArray(s)?s:[].slice.call(arguments,1),d=n((r=r||{}).classNames),this.each(function(){var n,h,p,v,m,g,y,b,k,w,x;e.each(s,function(t){t.highlight=!!r.highlight}),n=t(this),h=t(d.html.wrapper),p=f(r.hint),v=f(r.menu),m=!1!==r.hint&&!p,g=!1!==r.menu&&!v,m&&(p=function(t,e){return t.clone().addClass(e.classes.hint).removeData().css(e.css.hint).css((n=t,{backgroundAttachment:n.css("background-attachment"),backgroundClip:n.css("background-clip"),backgroundColor:n.css("background-color"),backgroundImage:n.css("background-image"),backgroundOrigin:n.css("background-origin"),backgroundPosition:n.css("background-position"),backgroundRepeat:n.css("background-repeat"),backgroundSize:n.css("background-size")})).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1});var n}(n,d)),g&&(v=t(d.html.menu).css(d.css.menu)),p&&p.val(""),n=function(t,e){t.data(o.attrs,{dir:t.attr("dir"),autocomplete:t.attr("autocomplete"),spellcheck:t.attr("spellcheck"),style:t.attr("style")}),t.addClass(e.classes.input).attr({autocomplete:"off",spellcheck:!1});try{!t.attr("dir")&&t.attr("dir","auto")}catch(t){}return t}(n,d),(m||g)&&(h.css(d.css.wrapper),n.css(m?d.css.input:d.css.inputWithNoHint),n.wrap(h).parent().prepend(m?p:null).append(g?v:null));x=g?u:l,y=new i({el:n}),b=new a({hint:p,input:n},d),k=new x({node:v,datasets:s},d),w=new c({input:b,menu:k,eventBus:y,minLength:r.minLength},d),n.data(o.www,d),n.data(o.typeahead,w)})},isEnabled:function(){var t;return d(this.first(),function(e){t=e.isEnabled()}),t},enable:function(){return d(this,function(t){t.enable()}),this},disable:function(){return d(this,function(t){t.disable()}),this},isActive:function(){var t;return d(this.first(),function(e){t=e.isActive()}),t},activate:function(){return d(this,function(t){t.activate()}),this},deactivate:function(){return d(this,function(t){t.deactivate()}),this},isOpen:function(){var t;return d(this.first(),function(e){t=e.isOpen()}),t},open:function(){return d(this,function(t){t.open()}),this},close:function(){return d(this,function(t){t.close()}),this},select:function(e){var n=!1,i=t(e);return d(this.first(),function(t){n=t.select(i)}),n},autocomplete:function(e){var n=!1,i=t(e);return d(this.first(),function(t){n=t.autocomplete(i)}),n},moveCursor:function(t){var e=!1;return d(this.first(),function(n){e=n.moveCursor(t)}),e},val:function(t){var e;return arguments.length?(d(this,function(e){e.setVal(t)}),this):(d(this.first(),function(t){e=t.getVal()}),e)},destroy:function(){return d(this,function(t,n){!function(t){var n,i;n=t.data(o.www),i=t.parent().filter(n.selectors.wrapper),e.each(t.data(o.attrs),function(n,i){e.isUndefined(n)?t.removeAttr(i):t.attr(i,n)}),t.removeData(o.typeahead).removeData(o.www).removeData(o.attr).removeClass(n.classes.input),i.length&&(t.detach().insertAfter(i),i.remove())}(n),t.destroy()}),this}},t.fn.typeahead=function(t){return s[t]?s[t].apply(this,[].slice.call(arguments,1)):s.initialize.apply(this,arguments)},t.fn.typeahead.noConflict=function(){return t.fn.typeahead=r,this}}()}),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Handlebars=e():t.Handlebars=e()}(this,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e,n){"use strict";var i=n(1).default;e.__esModule=!0;var r=i(n(2)),o=i(n(35)),a=n(36),s=n(41),l=i(n(42)),u=i(n(39)),c=i(n(34)),d=r.default.create;function f(){var t=d();return t.compile=function(e,n){return s.compile(e,n,t)},t.precompile=function(e,n){return s.precompile(e,n,t)},t.AST=o.default,t.Compiler=s.Compiler,t.JavaScriptCompiler=l.default,t.Parser=a.parser,t.parse=a.parse,t}var h=f();h.create=f,c.default(h),h.Visitor=u.default,h.default=h,e.default=h,t.exports=e.default},function(t,e){"use strict";e.default=function(t){return t&&t.__esModule?t:{default:t}},e.__esModule=!0},function(t,e,n){"use strict";var i=n(3).default,r=n(1).default;e.__esModule=!0;var o=i(n(4)),a=r(n(21)),s=r(n(6)),l=i(n(5)),u=i(n(22)),c=r(n(34));function d(){var t=new o.HandlebarsEnvironment;return l.extend(t,o),t.SafeString=a.default,t.Exception=s.default,t.Utils=l,t.escapeExpression=l.escapeExpression,t.VM=u,t.template=function(e){return u.template(e,t)},t}var f=d();f.create=d,c.default(f),f.default=f,e.default=f,t.exports=e.default},function(t,e){"use strict";e.default=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},e.__esModule=!0},function(t,e,n){"use strict";var i=n(1).default;e.__esModule=!0,e.HandlebarsEnvironment=u;var r=n(5),o=i(n(6)),a=n(10),s=n(18),l=i(n(20));e.VERSION="4.1.0";e.COMPILER_REVISION=7;e.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};function u(t,e,n){this.helpers=t||{},this.partials=e||{},this.decorators=n||{},a.registerDefaultHelpers(this),s.registerDefaultDecorators(this)}u.prototype={constructor:u,logger:l.default,log:l.default.log,registerHelper:function(t,e){if("[object Object]"===r.toString.call(t)){if(e)throw new o.default("Arg not supported with multiple helpers");r.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if("[object Object]"===r.toString.call(t))r.extend(this.partials,t);else{if(void 0===e)throw new o.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if("[object Object]"===r.toString.call(t)){if(e)throw new o.default("Arg not supported with multiple decorators");r.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var c=l.default.log;e.log=c,e.createFrame=r.createFrame,e.logger=l.default},function(t,e){"use strict";e.__esModule=!0,e.extend=a,e.indexOf=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},e.escapeExpression=function(t){if("string"!=typeof t){if(t&&t.toHTML)return t.toHTML();if(null==t)return"";if(!t)return t+"";t=""+t}if(!r.test(t))return t;return t.replace(i,o)},e.isEmpty=function(t){return!t&&0!==t||!(!u(t)||0!==t.length)},e.createFrame=function(t){var e=a({},t);return e._parent=t,e},e.blockParams=function(t,e){return t.path=e,t},e.appendContextPath=function(t,e){return(t?t+".":"")+e};var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},i=/[&<>"'`=]/g,r=/[&<>"'`=]/;function o(t){return n[t]}function a(t){for(var e=1;e<arguments.length;e++)for(var n in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],n)&&(t[n]=arguments[e][n]);return t}var s=Object.prototype.toString;e.toString=s;var l=function(t){return"function"==typeof t};l(/x/)&&(e.isFunction=l=function(t){return"function"==typeof t&&"[object Function]"===s.call(t)}),e.isFunction=l;var u=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===s.call(t)};e.isArray=u},function(t,e,n){"use strict";var i=n(7).default;e.__esModule=!0;var r=["description","fileName","lineNumber","message","name","number","stack"];function o(t,e){var n=e&&e.loc,a=void 0,s=void 0;n&&(t+=" - "+(a=n.start.line)+":"+(s=n.start.column));for(var l=Error.prototype.constructor.call(this,t),u=0;u<r.length;u++)this[r[u]]=l[r[u]];Error.captureStackTrace&&Error.captureStackTrace(this,o);try{n&&(this.lineNumber=a,i?Object.defineProperty(this,"column",{value:s,enumerable:!0}):this.column=s)}catch(t){}}o.prototype=new Error,e.default=o,t.exports=e.default},function(t,e,n){t.exports={default:n(8),__esModule:!0}},function(t,e,n){var i=n(9);t.exports=function(t,e,n){return i.setDesc(t,e,n)}},function(t,e){var n=Object;t.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(t,e,n){"use strict";var i=n(1).default;e.__esModule=!0,e.registerDefaultHelpers=function(t){r.default(t),o.default(t),a.default(t),s.default(t),l.default(t),u.default(t),c.default(t)};var r=i(n(11)),o=i(n(12)),a=i(n(13)),s=i(n(14)),l=i(n(15)),u=i(n(16)),c=i(n(17))},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5);e.default=function(t){t.registerHelper("blockHelperMissing",function(e,n){var r=n.inverse,o=n.fn;if(!0===e)return o(this);if(!1===e||null==e)return r(this);if(i.isArray(e))return e.length>0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):r(this);if(n.data&&n.ids){var a=i.createFrame(n.data);a.contextPath=i.appendContextPath(n.data.contextPath,n.name),n={data:a}}return o(e,n)})},t.exports=e.default},function(t,e,n){"use strict";var i=n(1).default;e.__esModule=!0;var r=n(5),o=i(n(6));e.default=function(t){t.registerHelper("each",function(t,e){if(!e)throw new o.default("Must pass iterator to #each");var n=e.fn,i=e.inverse,a=0,s="",l=void 0,u=void 0;function c(e,i,o){l&&(l.key=e,l.index=i,l.first=0===i,l.last=!!o,u&&(l.contextPath=u+e)),s+=n(t[e],{data:l,blockParams:r.blockParams([t[e],e],[u+e,null])})}if(e.data&&e.ids&&(u=r.appendContextPath(e.data.contextPath,e.ids[0])+"."),r.isFunction(t)&&(t=t.call(this)),e.data&&(l=r.createFrame(e.data)),t&&"object"==typeof t)if(r.isArray(t))for(var d=t.length;a<d;a++)a in t&&c(a,a,a===t.length-1);else{var f=void 0;for(var h in t)t.hasOwnProperty(h)&&(void 0!==f&&c(f,a-1),f=h,a++);void 0!==f&&c(f,a-1,!0)}return 0===a&&(s=i(this)),s})},t.exports=e.default},function(t,e,n){"use strict";var i=n(1).default;e.__esModule=!0;var r=i(n(6));e.default=function(t){t.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5);e.default=function(t){t.registerHelper("if",function(t,e){return i.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||i.isEmpty(t)?e.inverse(this):e.fn(this)}),t.registerHelper("unless",function(e,n){return t.helpers.if.call(this,e,{fn:n.inverse,inverse:n.fn,hash:n.hash})})},t.exports=e.default},function(t,e){"use strict";e.__esModule=!0,e.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],n=arguments[arguments.length-1],i=0;i<arguments.length-1;i++)e.push(arguments[i]);var r=1;null!=n.hash.level?r=n.hash.level:n.data&&null!=n.data.level&&(r=n.data.level),e[0]=r,t.log.apply(t,e)})},t.exports=e.default},function(t,e){"use strict";e.__esModule=!0,e.default=function(t){t.registerHelper("lookup",function(t,e){return t&&t[e]})},t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5);e.default=function(t){t.registerHelper("with",function(t,e){i.isFunction(t)&&(t=t.call(this));var n=e.fn;if(i.isEmpty(t))return e.inverse(this);var r=e.data;return e.data&&e.ids&&((r=i.createFrame(e.data)).contextPath=i.appendContextPath(e.data.contextPath,e.ids[0])),n(t,{data:r,blockParams:i.blockParams([t],[r&&r.contextPath])})})},t.exports=e.default},function(t,e,n){"use strict";var i=n(1).default;e.__esModule=!0,e.registerDefaultDecorators=function(t){r.default(t)};var r=i(n(19))},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5);e.default=function(t){t.registerDecorator("inline",function(t,e,n,r){var o=t;return e.partials||(e.partials={},o=function(r,o){var a=n.partials;n.partials=i.extend({},a,e.partials);var s=t(r,o);return n.partials=a,s}),e.partials[r.args[0]]=r.fn,o})},t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5),r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if("string"==typeof t){var e=i.indexOf(r.methodMap,t.toLowerCase());t=e>=0?e:parseInt(t,10)}return t},log:function(t){if(t=r.lookupLevel(t),"undefined"!=typeof console&&r.lookupLevel(r.level)<=t){var e=r.methodMap[t];console[e]||(e="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];console[e].apply(console,i)}}};e.default=r,t.exports=e.default},function(t,e){"use strict";function n(t){this.string=t}e.__esModule=!0,n.prototype.toString=n.prototype.toHTML=function(){return""+this.string},e.default=n,t.exports=e.default},function(t,e,n){"use strict";var i=n(23).default,r=n(3).default,o=n(1).default;e.__esModule=!0,e.checkRevision=function(t){var e=t&&t[0]||1,n=l.COMPILER_REVISION;if(e!==n){if(e<n){var i=l.REVISION_CHANGES[n],r=l.REVISION_CHANGES[e];throw new s.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+r+").")}throw new s.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}},e.template=function(t,e){if(!e)throw new s.default("No environment passed to template");if(!t||!t.main)throw new s.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var n={strict:function(t,e){if(!(e in t))throw new s.default('"'+e+'" not defined in '+t);return t[e]},lookup:function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i]&&null!=t[i][e])return t[i][e]},lambda:function(t,e){return"function"==typeof t?t.call(e):t},escapeExpression:a.escapeExpression,invokePartial:function(n,i,r){r.hash&&(i=a.extend({},i,r.hash),r.ids&&(r.ids[0]=!0));n=e.VM.resolvePartial.call(this,n,i,r);var o=e.VM.invokePartial.call(this,n,i,r);null==o&&e.compile&&(r.partials[r.name]=e.compile(n,t.compilerOptions,e),o=r.partials[r.name](i,r));if(null!=o){if(r.indent){for(var l=o.split("\n"),u=0,c=l.length;u<c&&(l[u]||u+1!==c);u++)l[u]=r.indent+l[u];o=l.join("\n")}return o}throw new s.default("The partial "+r.name+" could not be compiled when running in runtime-only mode")},fn:function(e){var n=t[e];return n.decorator=t[e+"_d"],n},programs:[],program:function(t,e,n,i,r){var o=this.programs[t],a=this.fn(t);return e||r||i||n?o=u(this,t,a,e,n,i,r):o||(o=this.programs[t]=u(this,t,a)),o},data:function(t,e){for(;t&&e--;)t=t._parent;return t},merge:function(t,e){var n=t||e;return t&&e&&t!==e&&(n=a.extend({},e,t)),n},nullContext:i({}),noop:e.VM.noop,compilerInfo:t.compiler};function r(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=i.data;r._setup(i),!i.partial&&t.useData&&(o=function(t,e){e&&"root"in e||((e=e?l.createFrame(e):{}).root=t);return e}(e,o));var a=void 0,s=t.useBlockParams?[]:void 0;function u(e){return""+t.main(n,e,n.helpers,n.partials,o,s,a)}return t.useDepths&&(a=i.depths?e!=i.depths[0]?[e].concat(i.depths):i.depths:[e]),(u=d(t.main,u,n,i.depths||[],o,s))(e,i)}return r.isTop=!0,r._setup=function(i){i.partial?(n.helpers=i.helpers,n.partials=i.partials,n.decorators=i.decorators):(n.helpers=n.merge(i.helpers,e.helpers),t.usePartial&&(n.partials=n.merge(i.partials,e.partials)),(t.usePartial||t.useDecorators)&&(n.decorators=n.merge(i.decorators,e.decorators)))},r._child=function(e,i,r,o){if(t.useBlockParams&&!r)throw new s.default("must pass block params");if(t.useDepths&&!o)throw new s.default("must pass parent depths");return u(n,e,t[e],i,0,r,o)},r},e.wrapProgram=u,e.resolvePartial=function(t,e,n){t?t.call||n.name||(n.name=t,t=n.partials[t]):t="@partial-block"===n.name?n.data["partial-block"]:n.partials[n.name];return t},e.invokePartial=function(t,e,n){var i=n.data&&n.data["partial-block"];n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var r=void 0;n.fn&&n.fn!==c&&function(){n.data=l.createFrame(n.data);var t=n.fn;r=n.data["partial-block"]=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return n.data=l.createFrame(n.data),n.data["partial-block"]=i,t(e,n)},t.partials&&(n.partials=a.extend({},n.partials,t.partials))}();void 0===t&&r&&(t=r);if(void 0===t)throw new s.default("The partial "+n.name+" could not be found");if(t instanceof Function)return t(e,n)},e.noop=c;var a=r(n(5)),s=o(n(6)),l=n(4);function u(t,e,n,i,r,o,a){function s(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=a;return!a||e==a[0]||e===t.nullContext&&null===a[0]||(s=[e].concat(a)),n(t,e,t.helpers,t.partials,r.data||i,o&&[r.blockParams].concat(o),s)}return(s=d(n,s,t,a,i,o)).program=e,s.depth=a?a.length:0,s.blockParams=r||0,s}function c(){return""}function d(t,e,n,i,r,o){if(t.decorator){var s={};e=t.decorator(e,s,n,i&&i[0],r,o,i),a.extend(e,s)}return e}},function(t,e,n){t.exports={default:n(24),__esModule:!0}},function(t,e,n){n(25),t.exports=n(30).Object.seal},function(t,e,n){var i=n(26);n(27)("seal",function(t){return function(e){return t&&i(e)?t(e):e}})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var i=n(28),r=n(30),o=n(33);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],a={};a[t]=e(n),i(i.S+i.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){var i=n(29),r=n(30),o=n(31),a=function(t,e,n){var s,l,u,c=t&a.F,d=t&a.G,f=t&a.S,h=t&a.P,p=t&a.B,v=t&a.W,m=d?r:r[e]||(r[e]={}),g=d?i:f?i[e]:(i[e]||{}).prototype;for(s in d&&(n=e),n)(l=!c&&g&&s in g)&&s in m||(u=l?g[s]:n[s],m[s]=d&&"function"!=typeof g[s]?n[s]:p&&l?o(u,i):v&&g[s]==u?function(t){var e=function(e){return this instanceof t?new t(e):t(e)};return e.prototype=t.prototype,e}(u):h&&"function"==typeof u?o(Function.call,u):u,h&&((m.prototype||(m.prototype={}))[s]=u))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,t.exports=a},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(32);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){(function(n){"use strict";e.__esModule=!0,e.default=function(t){var e=void 0!==n?n:window,i=e.Handlebars;t.noConflict=function(){return e.Handlebars===t&&(e.Handlebars=i),t}},t.exports=e.default}).call(e,function(){return this}())},function(t,e){"use strict";e.__esModule=!0;var n={helpers:{helperExpression:function(t){return"SubExpression"===t.type||("MustacheStatement"===t.type||"BlockStatement"===t.type)&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return 1===t.parts.length&&!n.helpers.scopedId(t)&&!t.depth}}};e.default=n,t.exports=e.default},function(t,e,n){"use strict";var i=n(1).default,r=n(3).default;e.__esModule=!0,e.parse=function(t,e){if("Program"===t.type)return t;return o.default.yy=u,u.locInfo=function(t){return new u.SourceLocation(e&&e.srcName,t)},new a.default(e).accept(o.default.parse(t))};var o=i(n(37)),a=i(n(38)),s=r(n(40)),l=n(5);e.parser=o.default;var u={};l.extend(u,s)},function(t,e){"use strict";e.__esModule=!0;var n=function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(t,e,n,i,r,o,a){var s=o.length-1;switch(r){case 1:return o[s-1];case 2:this.$=i.prepareProgram(o[s]);break;case 3:case 4:case 5:case 6:case 7:case 8:this.$=o[s];break;case 9:this.$={type:"CommentStatement",value:i.stripComment(o[s]),strip:i.stripFlags(o[s],o[s]),loc:i.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:o[s],value:o[s],loc:i.locInfo(this._$)};break;case 11:this.$=i.prepareRawBlock(o[s-2],o[s-1],o[s],this._$);break;case 12:this.$={path:o[s-3],params:o[s-2],hash:o[s-1]};break;case 13:this.$=i.prepareBlock(o[s-3],o[s-2],o[s-1],o[s],!1,this._$);break;case 14:this.$=i.prepareBlock(o[s-3],o[s-2],o[s-1],o[s],!0,this._$);break;case 15:this.$={open:o[s-5],path:o[s-4],params:o[s-3],hash:o[s-2],blockParams:o[s-1],strip:i.stripFlags(o[s-5],o[s])};break;case 16:case 17:this.$={path:o[s-4],params:o[s-3],hash:o[s-2],blockParams:o[s-1],strip:i.stripFlags(o[s-5],o[s])};break;case 18:this.$={strip:i.stripFlags(o[s-1],o[s-1]),program:o[s]};break;case 19:var l=i.prepareBlock(o[s-2],o[s-1],o[s],o[s],!1,this._$),u=i.prepareProgram([l],o[s-1].loc);u.chained=!0,this.$={strip:o[s-2].strip,program:u,chain:!0};break;case 20:this.$=o[s];break;case 21:this.$={path:o[s-1],strip:i.stripFlags(o[s-2],o[s])};break;case 22:case 23:this.$=i.prepareMustache(o[s-3],o[s-2],o[s-1],o[s-4],i.stripFlags(o[s-4],o[s]),this._$);break;case 24:this.$={type:"PartialStatement",name:o[s-3],params:o[s-2],hash:o[s-1],indent:"",strip:i.stripFlags(o[s-4],o[s]),loc:i.locInfo(this._$)};break;case 25:this.$=i.preparePartialBlock(o[s-2],o[s-1],o[s],this._$);break;case 26:this.$={path:o[s-3],params:o[s-2],hash:o[s-1],strip:i.stripFlags(o[s-4],o[s])};break;case 27:case 28:this.$=o[s];break;case 29:this.$={type:"SubExpression",path:o[s-3],params:o[s-2],hash:o[s-1],loc:i.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:o[s],loc:i.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:i.id(o[s-2]),value:o[s],loc:i.locInfo(this._$)};break;case 32:this.$=i.id(o[s-1]);break;case 33:case 34:this.$=o[s];break;case 35:this.$={type:"StringLiteral",value:o[s],original:o[s],loc:i.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(o[s]),original:Number(o[s]),loc:i.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===o[s],original:"true"===o[s],loc:i.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:i.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:i.locInfo(this._$)};break;case 40:case 41:this.$=o[s];break;case 42:this.$=i.preparePath(!0,o[s],this._$);break;case 43:this.$=i.preparePath(!1,o[s],this._$);break;case 44:o[s-2].push({part:i.id(o[s]),original:o[s],separator:o[s-1]}),this.$=o[s-2];break;case 45:this.$=[{part:i.id(o[s]),original:o[s]}];break;case 46:this.$=[];break;case 47:o[s-1].push(o[s]);break;case 48:this.$=[o[s]];break;case 49:o[s-1].push(o[s]);break;case 50:this.$=[];break;case 51:o[s-1].push(o[s]);break;case 58:this.$=[];break;case 59:o[s-1].push(o[s]);break;case 64:this.$=[];break;case 65:o[s-1].push(o[s]);break;case 70:this.$=[];break;case 71:o[s-1].push(o[s]);break;case 78:this.$=[];break;case 79:o[s-1].push(o[s]);break;case 82:this.$=[];break;case 83:o[s-1].push(o[s]);break;case 86:this.$=[];break;case 87:o[s-1].push(o[s]);break;case 90:this.$=[];break;case 91:o[s-1].push(o[s]);break;case 94:this.$=[];break;case 95:o[s-1].push(o[s]);break;case 98:this.$=[o[s]];break;case 99:o[s-1].push(o[s]);break;case 100:this.$=[o[s]];break;case 101:o[s-1].push(o[s])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(t,e){throw new Error(t)},parse:function(t){var e=this,n=[0],i=[null],r=[],o=this.table,a="",s=0,l=0,u=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var c=this.lexer.yylloc;r.push(c);var d=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var f,h,p,v,m,g,y,b,k,w,x={};;){if(p=n[n.length-1],this.defaultActions[p]?v=this.defaultActions[p]:(null==f&&(w=void 0,"number"!=typeof(w=e.lexer.lex()||1)&&(w=e.symbols_[w]||w),f=w),v=o[p]&&o[p][f]),void 0===v||!v.length||!v[0]){var _="";if(!u){for(g in k=[],o[p])this.terminals_[g]&&g>2&&k.push("'"+this.terminals_[g]+"'");_=this.lexer.showPosition?"Parse error on line "+(s+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:c,expected:k})}}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+f);switch(v[0]){case 1:n.push(f),i.push(this.lexer.yytext),r.push(this.lexer.yylloc),n.push(v[1]),f=null,h?(f=h,h=null):(l=this.lexer.yyleng,a=this.lexer.yytext,s=this.lexer.yylineno,c=this.lexer.yylloc,u>0&&u--);break;case 2:if(y=this.productions_[v[1]][1],x.$=i[i.length-y],x._$={first_line:r[r.length-(y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(y||1)].first_column,last_column:r[r.length-1].last_column},d&&(x._$.range=[r[r.length-(y||1)].range[0],r[r.length-1].range[1]]),void 0!==(m=this.performAction.call(x,a,l,s,this.yy,v[1],i,r)))return m;y&&(n=n.slice(0,-1*y*2),i=i.slice(0,-1*y),r=r.slice(0,-1*y)),n.push(this.productions_[v[1]][0]),i.push(x.$),r.push(x._$),b=o[n[n.length-2]][n[n.length-1]],n.push(b);break;case 3:return!0}}return!0}},e=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;var t,e,n,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),a=0;a<o.length&&(!(n=this._input.match(this.rules[o[a]]))||e&&!(n[0].length>e[0].length)||(e=n,i=a,this.options.flex));a++);return e?((r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,o[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)},options:{},performAction:function(t,e,n,i){function r(t,n){return e.yytext=e.yytext.substr(t,e.yyleng-n)}switch(n){case 0:if("\\\\"===e.yytext.slice(-2)?(r(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(r(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e.yytext=e.yytext.substr(5,e.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=r(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=r(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return e.yytext=e.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return t}();function n(){this.yy={}}return t.lexer=e,n.prototype=t,t.Parser=n,new n}();e.default=n,t.exports=e.default},function(t,e,n){"use strict";var i=n(1).default;e.__esModule=!0;var r=i(n(39));function o(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function a(t,e,n){void 0===e&&(e=t.length);var i=t[e-1],r=t[e-2];return i?"ContentStatement"===i.type?(r||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(i.original):void 0:n}function s(t,e,n){void 0===e&&(e=-1);var i=t[e+1],r=t[e+2];return i?"ContentStatement"===i.type?(r||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(i.original):void 0:n}function l(t,e,n){var i=t[null==e?0:e+1];if(i&&"ContentStatement"===i.type&&(n||!i.rightStripped)){var r=i.value;i.value=i.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),i.rightStripped=i.value!==r}}function u(t,e,n){var i=t[null==e?t.length-1:e-1];if(i&&"ContentStatement"===i.type&&(n||!i.leftStripped)){var r=i.value;return i.value=i.value.replace(n?/\s+$/:/[ \t]+$/,""),i.leftStripped=i.value!==r,i.leftStripped}}o.prototype=new r.default,o.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var i=t.body,r=0,o=i.length;r<o;r++){var c=i[r],d=this.accept(c);if(d){var f=a(i,r,n),h=s(i,r,n),p=d.openStandalone&&f,v=d.closeStandalone&&h,m=d.inlineStandalone&&f&&h;d.close&&l(i,r,!0),d.open&&u(i,r,!0),e&&m&&(l(i,r),u(i,r)&&"PartialStatement"===c.type&&(c.indent=/([ \t]+$)/.exec(i[r-1].original)[1])),e&&p&&(l((c.program||c.inverse).body),u(i,r)),e&&v&&(l(i,r),u((c.inverse||c.program).body))}}return t},o.prototype.BlockStatement=o.prototype.DecoratorBlock=o.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,n=t.program&&t.inverse,i=n,r=n;if(n&&n.chained)for(i=n.body[0].program;r.chained;)r=r.body[r.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:s(e.body),closeStandalone:a((i||e).body)};if(t.openStrip.close&&l(e.body,null,!0),n){var c=t.inverseStrip;c.open&&u(e.body,null,!0),c.close&&l(i.body,null,!0),t.closeStrip.open&&u(r.body,null,!0),!this.options.ignoreStandalone&&a(e.body)&&s(i.body)&&(u(e.body),l(i.body))}else t.closeStrip.open&&u(e.body,null,!0);return o},o.prototype.Decorator=o.prototype.MustacheStatement=function(t){return t.strip},o.prototype.PartialStatement=o.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}},e.default=o,t.exports=e.default},function(t,e,n){"use strict";var i=n(1).default;e.__esModule=!0;var r=i(n(6));function o(){this.parents=[]}function a(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function s(t){a.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function l(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}o.prototype={constructor:o,mutating:!1,acceptKey:function(t,e){var n=this.accept(t[e]);if(this.mutating){if(n&&!o.prototype[n.type])throw new r.default('Unexpected node type "'+n.type+'" found when accepting '+e+" on "+t.type);t[e]=n}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new r.default(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,n=t.length;e<n;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,n--)},accept:function(t){if(t){if(!this[t.type])throw new r.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);return this.current=this.parents.shift(),!this.mutating||e?e:!1!==e?t:void 0}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:a,Decorator:a,BlockStatement:s,DecoratorBlock:s,PartialStatement:l,PartialBlockStatement:function(t){l.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:a,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}},e.default=o,t.exports=e.default},function(t,e,n){"use strict";var i=n(1).default;e.__esModule=!0,e.SourceLocation=function(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}},e.id=function(t){return/^\[.*\]$/.test(t)?t.substr(1,t.length-2):t},e.stripFlags=function(t,e){return{open:"~"===t.charAt(2),close:"~"===e.charAt(e.length-3)}},e.stripComment=function(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")},e.preparePath=function(t,e,n){n=this.locInfo(n);for(var i=t?"@":"",o=[],a=0,s=0,l=e.length;s<l;s++){var u=e[s].part,c=e[s].original!==u;if(i+=(e[s].separator||"")+u,c||".."!==u&&"."!==u&&"this"!==u)o.push(u);else{if(o.length>0)throw new r.default("Invalid path: "+i,{loc:n});".."===u&&a++}}return{type:"PathExpression",data:t,depth:a,parts:o,original:i,loc:n}},e.prepareMustache=function(t,e,n,i,r,o){var a=i.charAt(3)||i.charAt(2),s="{"!==a&&"&"!==a;return{type:/\*/.test(i)?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:s,strip:r,loc:this.locInfo(o)}},e.prepareRawBlock=function(t,e,n,i){o(t,n),i=this.locInfo(i);var r={type:"Program",body:e,strip:{},loc:i};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:r,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}},e.prepareBlock=function(t,e,n,i,a,s){i&&i.path&&o(t,i);var l=/\*/.test(t.open);e.blockParams=t.blockParams;var u=void 0,c=void 0;if(n){if(l)throw new r.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=i.strip),c=n.strip,u=n.program}a&&(a=u,u=e,e=a);return{type:l?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:u,openStrip:t.strip,inverseStrip:c,closeStrip:i&&i.strip,loc:this.locInfo(s)}},e.prepareProgram=function(t,e){if(!e&&t.length){var n=t[0].loc,i=t[t.length-1].loc;n&&i&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:i.end.line,column:i.end.column}})}return{type:"Program",body:t,strip:{},loc:e}},e.preparePartialBlock=function(t,e,n,i){return o(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(i)}};var r=i(n(6));function o(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new r.default(t.path.original+" doesn't match "+e,n)}}},function(t,e,n){"use strict";var i=n(1).default;e.__esModule=!0,e.Compiler=l,e.precompile=function(t,e,n){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);"data"in(e=e||{})||(e.data=!0);e.compat&&(e.useDepths=!0);var i=n.parse(t,e),o=(new n.Compiler).compile(i,e);return(new n.JavaScriptCompiler).compile(o,e)},e.compile=function(t,e,n){void 0===e&&(e={});if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in(e=o.extend({},e))||(e.data=!0);e.compat&&(e.useDepths=!0);var i=void 0;function a(){var i=n.parse(t,e),r=(new n.Compiler).compile(i,e),o=(new n.JavaScriptCompiler).compile(r,e,void 0,!0);return n.template(o)}function s(t,e){return i||(i=a()),i.call(this,t,e)}return s._setup=function(t){return i||(i=a()),i._setup(t)},s._child=function(t,e,n,r){return i||(i=a()),i._child(t,e,n,r)},s};var r=i(n(6)),o=n(5),a=i(n(35)),s=[].slice;function l(){}function u(t,e){if(t===e)return!0;if(o.isArray(t)&&o.isArray(e)&&t.length===e.length){for(var n=0;n<t.length;n++)if(!u(t[n],e[n]))return!1;return!0}}function c(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}l.prototype={compiler:l,equals:function(t){var e=this.opcodes.length;if(t.opcodes.length!==e)return!1;for(var n=0;n<e;n++){var i=this.opcodes[n],r=t.opcodes[n];if(i.opcode!==r.opcode||!u(i.args,r.args))return!1}e=this.children.length;for(n=0;n<e;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},guid:0,compile:function(t,e){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=e,this.stringParams=e.stringParams,this.trackIds=e.trackIds,e.blockParams=e.blockParams||[];var n=e.knownHelpers;if(e.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},n)for(var i in n)this.options.knownHelpers[i]=n[i];return this.accept(t)},compileProgram:function(t){var e=(new this.compiler).compile(t,this.options),n=this.guid++;return this.usePartial=this.usePartial||e.usePartial,this.children[n]=e,this.useDepths=this.useDepths||e.useDepths,n},accept:function(t){if(!this[t.type])throw new r.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var e=this[t.type](t);return this.sourceNode.shift(),e},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var e=t.body,n=e.length,i=0;i<n;i++)this.accept(e[i]);return this.options.blockParams.shift(),this.isSimple=1===n,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){c(t);var e=t.program,n=t.inverse;e=e&&this.compileProgram(e),n=n&&this.compileProgram(n);var i=this.classifySexpr(t);"helper"===i?this.helperSexpr(t,e,n):"simple"===i?(this.simpleSexpr(t),this.opcode("pushProgram",e),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,e,n),this.opcode("pushProgram",e),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var e=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,e,void 0),i=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(t){this.usePartial=!0;var e=t.program;e&&(e=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new r.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=t.name.original,o="SubExpression"===t.name.type;o&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var a=t.indent||"";this.options.preventIndent&&a&&(this.opcode("appendContent",a),a=""),this.opcode("invokePartial",o,i,a),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){c(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,n){var i=t.path,r=i.parts[0],o=null!=e||null!=n;this.opcode("getContext",i.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",r,o)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,n){var i=this.setupFullMustacheParams(t,e,n),o=t.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new r.default("You specified knownHelpersOnly, but used the unknown helper "+s,t);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,a.default.helpers.simpleId(o))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],n=a.default.helpers.scopedId(t),i=!t.depth&&!n&&this.blockParamIndex(e);i?this.opcode("lookupBlockParam",i,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,n=0,i=e.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(e[n].value);for(;n--;)this.opcode("assignToHash",e[n].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:s.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var e=a.default.helpers.simpleId(t.path),n=e&&!!this.blockParamIndex(t.path.parts[0]),i=!n&&a.default.helpers.helperExpression(t),r=!n&&(i||e);if(r&&!i){var o=t.path.parts[0],s=this.options;s.knownHelpers[o]?i=!0:s.knownHelpersOnly&&(r=!1)}return i?"helper":r?"ambiguous":"simple"},pushParams:function(t){for(var e=0,n=t.length;e<n;e++)this.pushParam(t[e])},pushParam:function(t){var e=null!=t.value?t.value:t.original||"";if(this.stringParams)e.replace&&(e=e.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",e,t.type),"SubExpression"===t.type&&this.accept(t);else{if(this.trackIds){var n=void 0;if(!t.parts||a.default.helpers.scopedId(t)||t.depth||(n=this.blockParamIndex(t.parts[0])),n){var i=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else(e=t.original||e).replace&&(e=e.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,e)}this.accept(t)}},setupFullMustacheParams:function(t,e,n,i){var r=t.params;return this.pushParams(r),this.opcode("pushProgram",e),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",i),r},blockParamIndex:function(t){for(var e=0,n=this.options.blockParams.length;e<n;e++){var i=this.options.blockParams[e],r=i&&o.indexOf(i,t);if(i&&r>=0)return[e,r]}}}},function(t,e,n){"use strict";var i=n(1).default;e.__esModule=!0;var r=n(4),o=i(n(6)),a=n(5),s=i(n(43));function l(t){this.value=t}function u(){}u.prototype={nameLookup:function(t,e){return"constructor"===e?["(",t,".propertyIsEnumerable('constructor') ? ",t,".constructor : undefined",")"]:u.isValidJavaScriptVariableName(e)?[t,".",e]:[t,"[",JSON.stringify(e),"]"]},depthedLookup:function(t){return[this.aliasable("container.lookup"),'(depths, "',t,'")']},compilerInfo:function(){var t=r.COMPILER_REVISION;return[t,r.REVISION_CHANGES[t]]},appendToBuffer:function(t,e,n){return a.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},compile:function(t,e,n,i){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var r=t.opcodes,a=void 0,s=void 0,l=void 0,u=void 0;for(l=0,u=r.length;l<u;l++)a=r[l],this.source.currentLocation=a.loc,s=s||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=s,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new o.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),i?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var c=this.createFunctionContext(i);if(this.isChild)return c;var d={compiler:this.compilerInfo(),main:c};this.decorators&&(d.main_d=this.decorators,d.useDecorators=!0);var f=this.context,h=f.programs,p=f.decorators;for(l=0,u=h.length;l<u;l++)h[l]&&(d[l]=h[l],p[l]&&(d[l+"_d"]=p[l],d.useDecorators=!0));return this.environment.usePartial&&(d.usePartial=!0),this.options.data&&(d.useData=!0),this.useDepths&&(d.useDepths=!0),this.useBlockParams&&(d.useBlockParams=!0),this.options.compat&&(d.compat=!0),i?d.compilerOptions=this.options:(d.compiler=JSON.stringify(d.compiler),this.source.currentLocation={start:{line:1,column:0}},d=this.objectLiteral(d),e.srcName?(d=d.toStringWithSourceMap({file:e.destName})).map=d.map&&d.map.toString():d=d.toString()),d},preamble:function(){this.lastContext=0,this.source=new s.default(this.options.srcName),this.decorators=new s.default(this.options.srcName)},createFunctionContext:function(t){var e="",n=this.stackVars.concat(this.registers.list);n.length>0&&(e+=", "+n.join(", "));var i=0;for(var r in this.aliases){var o=this.aliases[r];this.aliases.hasOwnProperty(r)&&o.children&&o.referenceCount>1&&(e+=", alias"+ ++i+"="+r,o.children[0]="alias"+i)}var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var s=this.mergeSource(e);return t?(a.push(s),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),") {\n  ",s,"}"])},mergeSource:function(t){var e=this.environment.isSimple,n=!this.forceBuffer,i=void 0,r=void 0,o=void 0,a=void 0;return this.source.each(function(t){t.appendToBuffer?(o?t.prepend("  + "):o=t,a=t):(o&&(r?o.prepend("buffer += "):i=!0,a.add(";"),o=a=void 0),r=!0,e||(n=!1))}),n?o?(o.prepend("return "),a.add(";")):r||this.source.push('return "";'):(t+=", buffer = "+(i?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(i?"":";\n")),this.source.merge()},blockValue:function(t){var e=this.aliasable("helpers.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(e,"call",n))},ambiguousBlockValue:function(){var t=this.aliasable("helpers.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var n=this.topStack();e.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,n,i){var r=0;i||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[r++])),this.resolvePath("context",t,r,e,n)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,n)},resolvePath:function(t,e,n,i,r){var o=this;if(this.options.strict||this.options.assumeObjects)this.push(function(t,e,n,i){var r=e.popStack(),o=0,a=n.length;t&&a--;for(;o<a;o++)r=e.nameLookup(r,n[o],i);return t?[e.aliasable("container.strict"),"(",r,", ",e.quotedString(n[o]),")"]:r}(this.options.strict&&r,this,e,t));else for(var a=e.length;n<a;n++)this.replaceStack(function(r){var a=o.nameLookup(r,e[n],t);return i?[" && ",a]:[" != null ? ",a," : ",r]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,e){this.pushContext(),this.pushString(e),"SubExpression"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){null!=t?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,e){var n=this.nameLookup("decorators",e,"decorator"),i=this.setupHelperArgs(e,t);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",i])," || fn;"])},invokeHelper:function(t,e,n){var i=this.popStack(),r=this.setupHelper(t,e),o=n?[r.name," || "]:"",a=["("].concat(o,i);this.options.strict||a.push(" || ",this.aliasable("helpers.helperMissing")),a.push(")"),this.push(this.source.functionCall(a,"call",r.callParams))},invokeKnownHelper:function(t,e){var n=this.setupHelper(t,e);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(t,e){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,t,e),r=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",t,"helper")," || ",n,")"];this.options.strict||(r[0]="(helper = ",r.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",r,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(t,e,n){var i=[],r=this.setupParams(e,1,i);t&&(e=this.popStack(),delete r.name),n&&(r.indent=JSON.stringify(n)),r.helpers="helpers",r.partials="partials",r.decorators="container.decorators",t?i.unshift(e):i.unshift(this.nameLookup("partials",e,"partial")),this.options.compat&&(r.depths="depths"),r=this.objectLiteral(r),i.push(r),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(t){var e=this.popStack(),n=void 0,i=void 0,r=void 0;this.trackIds&&(r=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var o=this.hash;n&&(o.contexts[t]=n),i&&(o.types[t]=i),r&&(o.ids[t]=r),o.values[t]=e},pushId:function(t,e,n){"BlockParam"===t?this.pushStackLiteral("blockParams["+e[0]+"].path["+e[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):"PathExpression"===t?this.pushString(e):"SubExpression"===t?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:u,compileChildren:function(t,e){for(var n=t.children,i=void 0,r=void 0,o=0,a=n.length;o<a;o++){i=n[o],r=new this.compiler;var s=this.matchExistingProgram(i);if(null==s){this.context.programs.push("");var l=this.context.programs.length;i.index=l,i.name="program"+l,this.context.programs[l]=r.compile(i,e,this.context,!this.precompile),this.context.decorators[l]=r.decorators,this.context.environments[l]=i,this.useDepths=this.useDepths||r.useDepths,this.useBlockParams=this.useBlockParams||r.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=s.index,i.name="program"+s.index,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams}},matchExistingProgram:function(t){for(var e=0,n=this.context.environments.length;e<n;e++){var i=this.context.environments[e];if(i&&i.equals(t))return i}},programExpression:function(t){var e=this.environment.children[t],n=[e.index,"data",e.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof l||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new l(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var e=["("],n=void 0,i=void 0,r=void 0;if(!this.isInline())throw new o.default("replaceStack on non-inline");var a=this.popStack(!0);if(a instanceof l)e=["(",n=[a.value]],r=!0;else{i=!0;var s=this.incrStack();e=["((",this.push(s)," = ",a,")"],n=this.topStack()}var u=t.call(this,n);r||this.popStack(),i&&this.stackSlot--,this.push(e.concat(u,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,n=t.length;e<n;e++){var i=t[e];if(i instanceof l)this.compileStack.push(i);else{var r=this.incrStack();this.pushSource([r," = ",i,";"]),this.compileStack.push(r)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),n=(e?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof l)return n.value;if(!e){if(!this.stackSlot)throw new o.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,e=t[t.length-1];return e instanceof l?e.value:e},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var e=this.aliases[t];return e?(e.referenceCount++,e):((e=this.aliases[t]=this.source.wrap(t)).aliasable=!0,e.referenceCount=1,e)},setupHelper:function(t,e,n){var i=[];return{params:i,paramsInit:this.setupHelperArgs(e,t,i,n),name:this.nameLookup("helpers",e,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})")].concat(i)}},setupParams:function(t,e,n){var i={},r=[],o=[],a=[],s=!n,l=void 0;s&&(n=[]),i.name=this.quotedString(t),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var u=this.popStack(),c=this.popStack();(c||u)&&(i.fn=c||"container.noop",i.inverse=u||"container.noop");for(var d=e;d--;)l=this.popStack(),n[d]=l,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(o[d]=this.popStack(),r[d]=this.popStack());return s&&(i.args=this.source.generateArray(n)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(o),i.contexts=this.source.generateArray(r)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(t,e,n,i){var r=this.setupParams(t,e,n);return r=this.objectLiteral(r),i?(this.useRegister("options"),n.push("options"),["options=",r]):n?(n.push(r),""):r}},function(){for(var t="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=u.RESERVED_WORDS={},n=0,i=t.length;n<i;n++)e[t[n]]=!0}(),u.isValidJavaScriptVariableName=function(t){return!u.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)},e.default=u,t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5),r=void 0;try{}catch(t){}function o(t,e,n){if(i.isArray(t)){for(var r=[],o=0,a=t.length;o<a;o++)r.push(e.wrap(t[o],n));return r}return"boolean"==typeof t||"number"==typeof t?t+"":t}function a(t){this.srcFile=t,this.source=[]}r||((r=function(t,e,n,i){this.src="",i&&this.add(i)}).prototype={add:function(t){i.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){i.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),a.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,e){this.source.unshift(this.wrap(t,e))},push:function(t,e){this.source.push(this.wrap(t,e))},merge:function(){var t=this.empty();return this.each(function(e){t.add(["  ",e,"\n"])}),t},each:function(t){for(var e=0,n=this.source.length;e<n;e++)t(this.source[e])},empty:function(){var t=this.currentLocation||{start:{}};return new r(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var e=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return t instanceof r?t:(t=o(t,this,e),new r(e.start.line,e.start.column,this.srcFile,t))},functionCall:function(t,e,n){return n=this.generateList(n),this.wrap([t,e?"."+e+"(":"(",n,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var e=[];for(var n in t)if(t.hasOwnProperty(n)){var i=o(t[n],this);"undefined"!==i&&e.push([this.quotedString(n),":",i])}var r=this.generateList(e);return r.prepend("{"),r.add("}"),r},generateList:function(t){for(var e=this.empty(),n=0,i=t.length;n<i;n++)n&&e.add(","),e.add(o(t[n],this));return e},generateArray:function(t){var e=this.generateList(t);return e.prepend("["),e.add("]"),e}},e.default=a,t.exports=e.default}])}),function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n(1),n(6),n(7);var i=a(n(2)),r=a(n(3)),o=a(n(4));function a(t){return t&&t.__esModule?t:{default:t}}r.default===o.default&&n(8),window.Inputmask=i.default},function(t,e,n){"use strict";var i,r,o;"function"==typeof Symbol&&Symbol.iterator;r=[n(2)],void 0===(o="function"==typeof(i=function(t){return t.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}}),t.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)//.*",autoUnmask:!1},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(t,e,n,i,r){return n-1>-1&&"."!==e.buffer[n-1]?(t=e.buffer[n-1]+t,t=n-2>-1&&"."!==e.buffer[n-2]?e.buffer[n-2]+t:"0"+t):t="00"+t,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(t)}}},onUnMask:function(t,e,n){return t},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,casing:"lower",onBeforePaste:function(t,e){return(t=t.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(t,e,n){return t},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),t})?i.apply(e,r):i)||(t.exports=o)},function(t,e,n){"use strict";var i,r,o,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r=[n(3),n(5)],void 0===(o="function"==typeof(i=function(t,e,n){var i=e.document,r=navigator.userAgent,o=r.indexOf("MSIE ")>0||r.indexOf("Trident/")>0,s=h("touchstart"),l=/iemobile/i.test(r),u=/iphone/i.test(r)&&!l;function c(e,i,r){if(!(this instanceof c))return new c(e,i,r);this.el=n,this.events={},this.maskset=n,this.refreshValue=!1,!0!==r&&(t.isPlainObject(e)?i=e:(i=i||{},e&&(i.alias=e)),this.opts=t.extend(!0,{},this.defaults,i),this.noMasksCache=i&&i.definitions!==n,this.userOptions=i||{},this.isRTL=this.opts.numericInput,d(this.opts.alias,i,this.opts))}function d(e,i,r){var o=c.prototype.aliases[e];return o?(o.alias&&d(o.alias,n,r),t.extend(!0,r,o),t.extend(!0,r,i),!0):(null===r.mask&&(r.mask=e),!1)}function f(e,i){function r(e,r,o){var a=!1;if(null!==e&&""!==e||((a=null!==o.regex)?e=(e=o.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(a=!0,e=".*")),1===e.length&&!1===o.greedy&&0!==o.repeat&&(o.placeholder=""),o.repeat>0||"*"===o.repeat||"+"===o.repeat){var s="*"===o.repeat?0:"+"===o.repeat?1:o.repeat;e=o.groupmarker[0]+e+o.groupmarker[1]+o.quantifiermarker[0]+s+","+o.repeat+o.quantifiermarker[1]}var l,u=a?"regex_"+o.regex:o.numericInput?e.split("").reverse().join(""):e;return c.prototype.masksCache[u]===n||!0===i?(l={mask:e,maskToken:c.prototype.analyseMask(e,a,o),validPositions:{},_buffer:n,buffer:n,tests:{},excludes:{},metadata:r,maskLength:n,jitOffset:{}},!0!==i&&(c.prototype.masksCache[u]=l,l=t.extend(!0,{},c.prototype.masksCache[u]))):l=t.extend(!0,{},c.prototype.masksCache[u]),l}if(t.isFunction(e.mask)&&(e.mask=e.mask(e)),t.isArray(e.mask)){if(e.mask.length>1){if(null===e.keepStatic){e.keepStatic="auto";for(var o=0;o<e.mask.length;o++)if(e.mask[o].charAt(0)!==e.mask[0].charAt(0)){e.keepStatic=!0;break}}var a=e.groupmarker[0];return t.each(e.isRTL?e.mask.reverse():e.mask,function(i,r){a.length>1&&(a+=e.groupmarker[1]+e.alternatormarker+e.groupmarker[0]),r.mask===n||t.isFunction(r.mask)?a+=r:a+=r.mask}),r(a+=e.groupmarker[1],e.mask,e)}e.mask=e.mask.pop()}return e.mask&&e.mask.mask!==n&&!t.isFunction(e.mask.mask)?r(e.mask.mask,e.mask,e):r(e.mask,e.mask,e)}function h(t){var e=i.createElement("input"),n="on"+t,r=n in e;return r||(e.setAttribute(n,"return;"),r="function"==typeof e[n]),e=null,r}function p(r,d,f){d=d||this.maskset,f=f||this.opts;var v,m,g,y,b,k=this,w=this.el,x=this.isRTL,_=!1,E=!1,S=!1,O=!1,A=function(t,e,i,r,o){var a=f.greedy;o&&(f.greedy=!1),e=e||0;var s,l,u,c=[],d=0;P();do{if(!0===t&&C().validPositions[d])u=o&&!0===C().validPositions[d].match.optionality&&C().validPositions[d+1]===n&&(!0===C().validPositions[d].generatedInput||C().validPositions[d].input==f.skipOptionalPartCharacter&&d>0)?L(d,R(d,s,d-1)):C().validPositions[d],l=u.match,s=u.locator.slice(),c.push(!0===i?u.input:!1===i?l.nativeDef:X(d,l));else{u=M(d,s,d-1),l=u.match,s=u.locator.slice();var h=!0!==r&&(!1!==f.jitMasking?f.jitMasking:l.jit);(!1===h||h===n||"number"==typeof h&&isFinite(h)&&h>d)&&c.push(!1===i?l.nativeDef:X(d,l))}"auto"===f.keepStatic&&l.newBlockMarker&&null!==l.fn&&(f.keepStatic=d-1),d++}while((g===n||d<g)&&(null!==l.fn||""!==l.def)||e>d);return""===c[c.length-1]&&c.pop(),!1===i&&C().maskLength!==n||(C().maskLength=d-1),f.greedy=a,c};function C(){return d}function T(t){var e=C();e.buffer=n,!0!==t&&(e.validPositions={},e.p=0)}function P(t,e,i){var r=-1,o=-1,a=i||C().validPositions;for(var s in t===n&&(t=-1),a){var l=parseInt(s);a[l]&&(e||!0!==a[l].generatedInput)&&(l<=t&&(r=l),l>=t&&(o=l))}return-1===r||r==t?o:-1==o?r:t-r<o-t?r:o}function N(t){var e=t.locator[t.alternation];return"string"==typeof e&&e.length>0&&(e=e.split(",")[0]),e!==n?e.toString():""}function I(t,e){var i=(t.alternation!=n?t.mloc[N(t)]:t.locator).join("");if(""!==i)for(;i.length<e;)i+="0";return i}function L(t,e){for(var i,r,o,a=D(t=t>0?t-1:0),s=I(a),l=0;l<e.length;l++){var u=e[l];i=I(u,s.length);var c=Math.abs(i-s);(r===n||""!==i&&c<r||o&&!f.greedy&&o.match.optionality&&"master"===o.match.newBlockMarker&&(!u.match.optionality||!u.match.newBlockMarker)||o&&o.match.optionalQuantifier&&!u.match.optionalQuantifier)&&(r=c,o=u)}return o}function M(t,e,n){return C().validPositions[t]||L(t,R(t,e?e.slice():e,n))}function D(t,e){return C().validPositions[t]?C().validPositions[t]:(e||R(t))[0]}function j(t,e){for(var n=!1,i=R(t),r=0;r<i.length;r++)if(i[r].match&&i[r].match.def===e){n=!0;break}return n}function R(e,i,r){var o,a=C().maskToken,s=i?r:0,l=i?i.slice():[0],u=[],c=!1,d=i?i.join(""):"";function h(i,r,a,l){function p(a,l,v){function m(e,n){var i=0===t.inArray(e,n.matches);return i||t.each(n.matches,function(t,r){if(!0===r.isQuantifier?i=m(e,n.matches[t-1]):r.hasOwnProperty("matches")&&(i=m(e,r)),i)return!1}),i}function g(e,i,r){var o,a;if((C().tests[e]||C().validPositions[e])&&t.each(C().tests[e]||[C().validPositions[e]],function(t,e){if(e.mloc[i])return o=e,!1;var s=r!==n?r:e.alternation,l=e.locator[s]!==n?e.locator[s].toString().indexOf(i):-1;(a===n||l<a)&&-1!==l&&(o=e,a=l)}),o){var s=o.locator[o.alternation],l=o.mloc[i]||o.mloc[s]||o.locator;return l.slice((r!==n?r:o.alternation)+1)}return r!==n?g(e,i):n}function y(t,e){function n(t){for(var e,n,i=[],r=0,o=t.length;r<o;r++)if("-"===t.charAt(r))for(n=t.charCodeAt(r+1);++e<n;)i.push(String.fromCharCode(e));else e=t.charCodeAt(r),i.push(t.charAt(r));return i.join("")}return f.regex&&null!==t.match.fn&&null!==e.match.fn?-1!==n(e.match.def.replace(/[\[\]]/g,"")).indexOf(n(t.match.def.replace(/[\[\]]/g,""))):t.match.def===e.match.nativeDef}function b(t,e){if(e===n||t.alternation===e.alternation&&-1===t.locator[t.alternation].toString().indexOf(e.locator[e.alternation])){t.mloc=t.mloc||{};var i=t.locator[t.alternation];if(i!==n){if("string"==typeof i&&(i=i.split(",")[0]),t.mloc[i]===n&&(t.mloc[i]=t.locator.slice()),e!==n){for(var r in e.mloc)"string"==typeof r&&(r=r.split(",")[0]),t.mloc[r]===n&&(t.mloc[r]=e.mloc[r]);t.locator[t.alternation]=Object.keys(t.mloc).join(",")}return!0}t.alternation=n}return!1}if(s>500&&v!==n)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+C().mask;if(s===e&&a.matches===n)return u.push({match:a,locator:l.reverse(),cd:d,mloc:{}}),!0;if(a.matches!==n){if(a.isGroup&&v!==a){if(a=p(i.matches[t.inArray(a,i.matches)+1],l,v))return!0}else if(a.isOptional){var k=a;if(a=h(a,r,l,v)){if(t.each(u,function(t,e){e.match.optionality=!0}),o=u[u.length-1].match,v!==n||!m(o,k))return!0;c=!0,s=e}}else if(a.isAlternator){var w,x=a,_=[],E=u.slice(),S=l.length,O=r.length>0?r.shift():-1;if(-1===O||"string"==typeof O){var A,T=s,P=r.slice(),N=[];if("string"==typeof O)N=O.split(",");else for(A=0;A<x.matches.length;A++)N.push(A.toString());if(C().excludes[e]){for(var I=N.slice(),L=0,M=C().excludes[e].length;L<M;L++)N.splice(N.indexOf(C().excludes[e][L].toString()),1);0===N.length&&(C().excludes[e]=n,N=I)}(!0===f.keepStatic||isFinite(parseInt(f.keepStatic))&&T>=f.keepStatic)&&(N=N.slice(0,1));for(var D=!1,j=0;j<N.length;j++){A=parseInt(N[j]),u=[],r="string"==typeof O&&g(s,A,S)||P.slice(),x.matches[A]&&p(x.matches[A],[A].concat(l),v)?a=!0:0===j&&(D=!0),w=u.slice(),s=T,u=[];for(var R=0;R<w.length;R++){var F=w[R],$=!1;F.match.jit=F.match.jit||D,F.alternation=F.alternation||S,b(F);for(var H=0;H<_.length;H++){var B=_[H];if("string"!=typeof O||F.alternation!==n&&-1!==t.inArray(F.locator[F.alternation].toString(),N)){if(F.match.nativeDef===B.match.nativeDef){$=!0,b(B,F);break}if(y(F,B)){b(F,B)&&($=!0,_.splice(_.indexOf(B),0,F));break}if(y(B,F)){b(B,F);break}if(V=F,K=B,void 0,!(!((V=F).locator.slice(V.alternation).join("")==K.locator.slice(K.alternation).join(""))||null!==V.match.fn||null===K.match.fn)&&K.match.fn.test(V.match.def,C(),e,!1,f,!1)){b(F,B)&&($=!0,_.splice(_.indexOf(B),0,F));break}}}$||_.push(F)}}u=E.concat(_),s=e,c=u.length>0,a=_.length>0,r=P.slice()}else a=p(x.matches[O]||i.matches[O],[O].concat(l),v);if(a)return!0}else if(a.isQuantifier&&v!==i.matches[t.inArray(a,i.matches)-1])for(var q=a,z=r.length>0?r.shift():0;z<(isNaN(q.quantifier.max)?z+1:q.quantifier.max)&&s<=e;z++){var U=i.matches[t.inArray(q,i.matches)-1];if(a=p(U,[z].concat(l),U)){if((o=u[u.length-1].match).optionalQuantifier=z>=q.quantifier.min,o.jit=(z||1)*U.matches.indexOf(o)>=q.quantifier.jit,o.optionalQuantifier&&m(o,U)){c=!0,s=e;break}return o.jit&&(C().jitOffset[e]=U.matches.indexOf(o)),!0}}else if(a=h(a,r,l,v))return!0}else s++;var V,K}for(var v=r.length>0?r.shift():0;v<i.matches.length;v++)if(!0!==i.matches[v].isQuantifier){var m=p(i.matches[v],[v].concat(a),l);if(m&&s===e)return m;if(s>e)break}}if(e>-1){if(i===n){for(var p,v=e-1;(p=C().validPositions[v]||C().tests[v])===n&&v>-1;)v--;p!==n&&v>-1&&(l=function(e,i){var r=[];return t.isArray(i)||(i=[i]),i.length>0&&(i[0].alternation===n?0===(r=L(e,i.slice()).locator.slice()).length&&(r=i[0].locator.slice()):t.each(i,function(t,e){if(""!==e.def)if(0===r.length)r=e.locator.slice();else for(var n=0;n<r.length;n++)e.locator[n]&&-1===r[n].toString().indexOf(e.locator[n])&&(r[n]+=","+e.locator[n])})),r}(v,p),d=l.join(""),s=v)}if(C().tests[e]&&C().tests[e][0].cd===d)return C().tests[e];for(var m=l.shift();m<a.length;m++){var g=h(a[m],l,[m]);if(g&&s===e||s>e)break}}return(0===u.length||c)&&u.push({match:{fn:null,optionality:!1,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:d}),i!==n&&C().tests[e]?t.extend(!0,[],u):(C().tests[e]=t.extend(!0,[],u),C().tests[e])}function F(){return C()._buffer===n&&(C()._buffer=A(!1,1),C().buffer===n&&(C().buffer=C()._buffer.slice())),C()._buffer}function $(t){return C().buffer!==n&&!0!==t||(C().buffer=A(!0,P(),!0),C()._buffer===n&&(C()._buffer=C().buffer.slice())),C().buffer}function H(t,e,i){var r,o;if(!0===t)T(),t=0,e=i.length;else for(r=t;r<e;r++)delete C().validPositions[r];for(o=t,r=t;r<e;r++)if(T(!0),i[r]!==f.skipOptionalPartCharacter){var a=U(o,i[r],!0,!0);!1!==a&&(T(!0),o=a.caret!==n?a.caret:a.pos+1)}}function B(e,n,i){switch(f.casing||n.casing){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase();break;case"title":var r=C().validPositions[i-1];e=0===i||r&&r.input===String.fromCharCode(c.keyCode.SPACE)?e.toUpperCase():e.toLowerCase();break;default:if(t.isFunction(f.casing)){var o=Array.prototype.slice.call(arguments);o.push(C().validPositions),e=f.casing.apply(this,o)}}return e}function q(e,i,r){for(var o,a=f.greedy?i:i.slice(0,1),s=!1,l=r!==n?r.split(","):[],u=0;u<l.length;u++)-1!==(o=e.indexOf(l[u]))&&e.splice(o,1);for(var c=0;c<e.length;c++)if(-1!==t.inArray(e[c],a)){s=!0;break}return s}function z(e,i,r,o,a){var s,l,u,c,d,f,h,p=t.extend(!0,{},C().validPositions),v=!1,m=a!==n?a:P();if(-1===m&&a===n)c=D(s=0),l=c.alternation;else for(;m>=0;m--)if((u=C().validPositions[m])&&u.alternation!==n){if(c&&c.locator[u.alternation]!==u.locator[u.alternation])break;s=m,l=C().validPositions[s].alternation,c=u}if(l!==n){h=parseInt(s),C().excludes[h]=C().excludes[h]||[],!0!==e&&C().excludes[h].push(N(c));var g=[],y=0;for(d=h;d<P(n,!0)+1;d++)(f=C().validPositions[d])&&!0!==f.generatedInput?g.push(f.input):d<e&&y++,delete C().validPositions[d];for(;C().excludes[h]&&C().excludes[h].length<10;){var b=-1*y,k=g.slice();for(C().tests[h]=n,T(!0),v=!0;k.length>0;){var w=k.shift();if(!(v=U(P(n,!0)+1,w,!1,o,!0)))break}if(v&&i!==n){var x=P(e)+1;for(d=h;d<P()+1;d++)((f=C().validPositions[d])===n||null==f.match.fn)&&d<e+b&&b++;v=U((e+=b)>x?x:e,i,r,o,!0)}if(v)break;if(T(),c=D(h),C().validPositions=t.extend(!0,{},p),!C().excludes[h]){v=z(e,i,r,o,h-1);break}var _=N(c);if(-1!==C().excludes[h].indexOf(_)){v=z(e,i,r,o,h-1);break}for(C().excludes[h].push(_),d=h;d<P(n,!0)+1;d++)delete C().validPositions[d]}}return C().excludes[h]=n,v}function U(e,i,r,o,a,s){function l(t){return x?t.begin-t.end>1||t.begin-t.end==1:t.end-t.begin>1||t.end-t.begin==1}r=!0===r;var u=e;function c(i,r,a){var s=!1;return t.each(R(i),function(u,c){var d=c.match;if($(!0),!1!==(s=null!=d.fn?d.fn.test(r,C(),i,a,f,l(e)):(r===d.def||r===f.skipOptionalPartCharacter)&&""!==d.def&&{c:X(i,d,!0)||d.def,pos:i})){var h=s.c!==n?s.c:r,p=i;return h=h===f.skipOptionalPartCharacter&&null===d.fn?X(i,d,!0)||d.def:h,s.remove!==n&&(t.isArray(s.remove)||(s.remove=[s.remove]),t.each(s.remove.sort(function(t,e){return e-t}),function(t,e){K({begin:e,end:e+1})})),s.insert!==n&&(t.isArray(s.insert)||(s.insert=[s.insert]),t.each(s.insert.sort(function(t,e){return t-e}),function(t,e){U(e.pos,e.c,!0,o)})),!0!==s&&s.pos!==n&&s.pos!==i&&(p=s.pos),(!0===s||s.pos!==n||s.c!==n)&&(K(e,t.extend({},c,{input:B(h,d,p)}),o,p)||(s=!1),!1)}}),s}e.begin!==n&&(u=x?e.end:e.begin);var d=!0,h=t.extend(!0,{},C().validPositions);if(t.isFunction(f.preValidation)&&!r&&!0!==o&&!0!==s&&(d=f.preValidation($(),u,i,l(e),f,C())),!0===d){if(V(n,u,!0),(g===n||u<g)&&(d=c(u,i,r),(!r||!0===o)&&!1===d&&!0!==s)){var p=C().validPositions[u];if(!p||null!==p.match.fn||p.match.def!==i&&i!==f.skipOptionalPartCharacter){if((f.insertMode||C().validPositions[G(u)]===n)&&(!W(u,!0)||C().jitOffset[u]))if(C().jitOffset[u]&&C().validPositions[G(u)]===n)!1!==(d=U(u+C().jitOffset[u],i,r))&&(d.caret=u);else for(var v=u+1,m=G(u);v<=m;v++)if(!1!==(d=c(v,i,r))){d=V(u,d.pos!==n?d.pos:v)||d,u=v;break}}else d={caret:G(u)}}!1!==d||!1===f.keepStatic||null!=f.regex&&!st($())||r||!0===a||(d=z(u,i,r,o)),!0===d&&(d={pos:u})}if(t.isFunction(f.postValidation)&&!1!==d&&!r&&!0!==o&&!0!==s){var y=f.postValidation($(!0),e.begin!==n?x?e.end:e.begin:e,d,f);if(y!==n){if(y.refreshFromBuffer&&y.buffer){var b=y.refreshFromBuffer;H(!0===b?b:b.start,b.end,y.buffer)}d=!0===y?d:y}}return d&&d.pos===n&&(d.pos=u),!1!==d&&!0!==s||(T(!0),C().validPositions=t.extend(!0,{},h)),d}function V(e,i,r){var o;if(e===n)for(e=i-1;e>0&&!C().validPositions[e];e--);for(var a=e;a<i;a++)if(C().validPositions[a]===n&&!W(a,!0)){var s=0==a?D(a):C().validPositions[a-1];if(s){var l=R(a).slice();""===l[l.length-1].match.def&&l.pop();var u=L(a,l);if((u=t.extend({},u,{input:X(a,u.match,!0)||u.match.def})).generatedInput=!0,K(a,u,!0),!0!==r){var c=C().validPositions[i].input;C().validPositions[i]=n,o=U(i,c,!0,!0)}}}return o}function K(e,i,r,o){function a(t,e,i){var r=e[t];if(r!==n&&(null===r.match.fn&&!0!==r.match.optionality||r.input===f.radixPoint)){var o=i.begin<=t-1?e[t-1]&&null===e[t-1].match.fn&&e[t-1]:e[t-1],a=i.end>t+1?e[t+1]&&null===e[t+1].match.fn&&e[t+1]:e[t+1];return o&&a}return!1}var s=e.begin!==n?e.begin:e,l=e.end!==n?e.end:e;if(e.begin>e.end&&(s=e.end,l=e.begin),o=o!==n?o:s,s!==l||f.insertMode&&C().validPositions[o]!==n&&r===n){var u=t.extend(!0,{},C().validPositions),c=P(n,!0);for(C().p=s,m=c;m>=s;m--)C().validPositions[m]&&"+"===C().validPositions[m].match.nativeDef&&(f.isNegative=!1),delete C().validPositions[m];var d=!0,h=o,p=(C().validPositions,!1),v=h,m=h;for(i&&(C().validPositions[o]=t.extend(!0,{},i),v++,h++,s<l&&m++);m<=c;m++){var g=u[m];if(g!==n&&(m>=l||m>=s&&!0!==g.generatedInput&&a(m,u,{begin:s,end:l}))){for(;""!==D(v).match.def;){if(!1===p&&u[v]&&u[v].match.nativeDef===g.match.nativeDef)C().validPositions[v]=t.extend(!0,{},u[v]),C().validPositions[v].input=g.input,V(n,v,!0),h=v+1,d=!0;else if(f.shiftPositions&&j(v,g.match.def)){var y=U(v,g.input,!0,!0);d=!1!==y,h=y.caret||y.insert?P():v+1,p=!0}else d=!0===g.generatedInput||g.input===f.radixPoint&&!0===f.numericInput;if(d)break;if(!d&&v>l&&W(v,!0)&&(null!==g.match.fn||v>C().maskLength))break;v++}""==D(v).match.def&&(d=!1),v=h}if(!d)break}if(!d)return C().validPositions=t.extend(!0,{},u),T(!0),!1}else i&&(C().validPositions[o]=t.extend(!0,{},i));return T(!0),!0}function W(t,e){var n=M(t).match;if(""===n.def&&(n=D(t).match),null!=n.fn)return n.fn;if(!0!==e&&t>-1){var i=R(t);return i.length>1+(""===i[i.length-1].match.def?1:0)}return!1}function G(t,e){for(var n=t+1;""!==D(n).match.def&&(!0===e&&(!0!==D(n).match.newBlockMarker||!W(n))||!0!==e&&!W(n));)n++;return n}function Y(t,e){var n,i=t;if(i<=0)return 0;for(;--i>0&&(!0===e&&!0!==D(i).match.newBlockMarker||!0!==e&&!W(i)&&((n=R(i)).length<2||2===n.length&&""===n[1].match.def)););return i}function Z(e,i,r,o,a){if(o&&t.isFunction(f.onBeforeWrite)){var s=f.onBeforeWrite.call(k,o,i,r,f);if(s){if(s.refreshFromBuffer){var l=s.refreshFromBuffer;H(!0===l?l:l.start,l.end,s.buffer||i),i=$(!0)}r!==n&&(r=s.caret!==n?s.caret:r)}}if(e!==n&&(e.inputmask._valueSet(i.join("")),r===n||o!==n&&"blur"===o.type?ct(e,r,0===i.length):rt(e,r),!0===a)){var u=t(e),c=e.inputmask._valueGet();E=!0,u.trigger("input"),setTimeout(function(){c===F().join("")?u.trigger("cleared"):!0===st(i)&&u.trigger("complete")},0)}}function X(e,i,r){if((i=i||D(e).match).placeholder!==n||!0===r)return t.isFunction(i.placeholder)?i.placeholder(f):i.placeholder;if(null===i.fn){if(e>-1&&C().validPositions[e]===n){var o,a=R(e),s=[];if(a.length>1+(""===a[a.length-1].match.def?1:0))for(var l=0;l<a.length;l++)if(!0!==a[l].match.optionality&&!0!==a[l].match.optionalQuantifier&&(null===a[l].match.fn||o===n||!1!==a[l].match.fn.test(o.match.def,C(),e,!0,f))&&(s.push(a[l]),null===a[l].match.fn&&(o=a[l]),s.length>1&&/[0-9a-bA-Z]/.test(s[0].match.def)))return f.placeholder.charAt(e%f.placeholder.length)}return i.def}return f.placeholder.charAt(e%f.placeholder.length)}function Q(t,e){if(o){if(t.inputmask._valueGet()!==e&&(t.placeholder!==e||""===t.placeholder)){var n=$().slice(),i=t.inputmask._valueGet();if(i!==e){var r=P();-1===r&&i===F().join("")?n=[]:-1!==r&&at(n),Z(t,n)}}}else t.placeholder!==e&&(t.placeholder=e,""===t.placeholder&&t.removeAttribute("placeholder"))}var J,tt={on:function(e,i,r){var o=function(e){var i=this;if(i.inputmask===n&&"FORM"!==this.nodeName){var o=t.data(i,"_inputmask_opts");o?new c(o).mask(i):tt.off(i)}else{if("setvalue"===e.type||"FORM"===this.nodeName||!(i.disabled||i.readOnly&&!("keydown"===e.type&&e.ctrlKey&&67===e.keyCode||!1===f.tabThrough&&e.keyCode===c.keyCode.TAB))){switch(e.type){case"input":if(!0===E)return E=!1,e.preventDefault();if(s){var a=arguments;return setTimeout(function(){r.apply(i,a),rt(i,i.inputmask.caretPos,n,!0)},0),!1}break;case"keydown":_=!1,E=!1;break;case"keypress":if(!0===_)return e.preventDefault();_=!0;break;case"click":if(l||u){var a=arguments;return setTimeout(function(){r.apply(i,a)},0),!1}}var d=r.apply(i,arguments);return!1===d&&(e.preventDefault(),e.stopPropagation()),d}e.preventDefault()}};e.inputmask.events[i]=e.inputmask.events[i]||[],e.inputmask.events[i].push(o),-1!==t.inArray(i,["submit","reset"])?null!==e.form&&t(e.form).on(i,o):t(e).on(i,o)},off:function(e,n){var i;e.inputmask&&e.inputmask.events&&(n?(i=[])[n]=e.inputmask.events[n]:i=e.inputmask.events,t.each(i,function(n,i){for(;i.length>0;){var r=i.pop();-1!==t.inArray(n,["submit","reset"])?null!==e.form&&t(e.form).off(n,r):t(e).off(n,r)}delete e.inputmask.events[n]}))}},et={keydownEvent:function(e){var n=t(this),i=e.keyCode,r=rt(this);if(i===c.keyCode.BACKSPACE||i===c.keyCode.DELETE||u&&i===c.keyCode.BACKSPACE_SAFARI||e.ctrlKey&&i===c.keyCode.X&&!h("cut"))e.preventDefault(),lt(0,i,r),Z(this,$(!0),C().p,e,this.inputmask._valueGet()!==$().join(""));else if(i===c.keyCode.END||i===c.keyCode.PAGE_DOWN){e.preventDefault();var o=G(P());rt(this,e.shiftKey?r.begin:o,o,!0)}else i===c.keyCode.HOME&&!e.shiftKey||i===c.keyCode.PAGE_UP?(e.preventDefault(),rt(this,0,e.shiftKey?r.begin:0,!0)):(f.undoOnEscape&&i===c.keyCode.ESCAPE||90===i&&e.ctrlKey)&&!0!==e.altKey?(nt(this,!0,!1,v.split("")),n.trigger("click")):i!==c.keyCode.INSERT||e.shiftKey||e.ctrlKey?!0===f.tabThrough&&i===c.keyCode.TAB&&(!0===e.shiftKey?(null===D(r.begin).match.fn&&(r.begin=G(r.begin)),r.end=Y(r.begin,!0),r.begin=Y(r.end,!0)):(r.begin=G(r.begin,!0),r.end=G(r.begin,!0),r.end<C().maskLength&&r.end--),r.begin<C().maskLength&&(e.preventDefault(),rt(this,r.begin,r.end))):(f.insertMode=!f.insertMode,this.setAttribute("im-insert",f.insertMode));f.onKeyDown.call(this,e,$(),rt(this).begin,f),S=-1!==t.inArray(i,f.ignorables)},keypressEvent:function(e,i,r,o,a){var s=this,l=t(s),u=e.which||e.charCode||e.keyCode;if(!(!0===i||e.ctrlKey&&e.altKey)&&(e.ctrlKey||e.metaKey||S))return u===c.keyCode.ENTER&&v!==$().join("")&&(v=$().join(""),setTimeout(function(){l.trigger("change")},0)),!0;if(u){46===u&&!1===e.shiftKey&&""!==f.radixPoint&&(u=f.radixPoint.charCodeAt(0));var d,h=i?{begin:a,end:a}:rt(s),p=String.fromCharCode(u),m=0;if(f._radixDance&&f.numericInput){var g=$().indexOf(f.radixPoint.charAt(0))+1;h.begin<=g&&(u===f.radixPoint.charCodeAt(0)&&(m=1),h.begin-=1,h.end-=1)}C().writeOutBuffer=!0;var y=U(h,p,o);if(!1!==y&&(T(!0),d=y.caret!==n?y.caret:G(y.pos.begin?y.pos.begin:y.pos),C().p=d),d=(f.numericInput&&y.caret===n?Y(d):d)+m,!1!==r&&(setTimeout(function(){f.onKeyValidation.call(s,u,y,f)},0),C().writeOutBuffer&&!1!==y)){var b=$();Z(s,b,d,e,!0!==i)}if(e.preventDefault(),i)return!1!==y&&(y.forwardPosition=d),y}},pasteEvent:function(n){var i,r=n.originalEvent||n,o=(t(this),this.inputmask._valueGet(!0)),a=rt(this);x&&(i=a.end,a.end=a.begin,a.begin=i);var s=o.substr(0,a.begin),l=o.substr(a.end,o.length);if(s===(x?F().reverse():F()).slice(0,a.begin).join("")&&(s=""),l===(x?F().reverse():F()).slice(a.end).join("")&&(l=""),e.clipboardData&&e.clipboardData.getData)o=s+e.clipboardData.getData("Text")+l;else{if(!r.clipboardData||!r.clipboardData.getData)return!0;o=s+r.clipboardData.getData("text/plain")+l}var u=o;if(t.isFunction(f.onBeforePaste)){if(!1===(u=f.onBeforePaste.call(k,o,f)))return n.preventDefault();u||(u=o)}return nt(this,!1,!1,u.toString().split("")),Z(this,$(),G(P()),n,v!==$().join("")),n.preventDefault()},inputFallBackEvent:function(e){var n=this,i=n.inputmask._valueGet();if($().join("")!==i){var r=rt(n);if(i=function(t,e,n){if(l){var i=e.replace($().join(""),"");if(1===i.length){var r=e.split("");r.splice(n.begin,0,i),e=r.join("")}}return e}(0,i=function(t,e,n){return"."===e.charAt(n.begin-1)&&""!==f.radixPoint&&((e=e.split(""))[n.begin-1]=f.radixPoint.charAt(0),e=e.join("")),e}(0,i,r),r),$().join("")!==i){var o=$().join(""),a=!f.numericInput&&i.length>o.length?-1:0,s=i.substr(0,r.begin),u=i.substr(r.begin),d=o.substr(0,r.begin+a),h=o.substr(r.begin+a),p=r,v="",m=!1;if(s!==d){var g,y=(m=s.length>=d.length)?s.length:d.length;for(g=0;s.charAt(g)===d.charAt(g)&&g<y;g++);m&&(p.begin=g-a,v+=s.slice(g,p.end))}if(u!==h&&(u.length>h.length?v+=u.slice(0,1):u.length<h.length&&(p.end+=h.length-u.length,m||""===f.radixPoint||""!==u||s.charAt(p.begin+a-1)!==f.radixPoint||(p.begin--,v=f.radixPoint))),Z(n,$(),{begin:p.begin+a,end:p.end+a}),v.length>0)t.each(v.split(""),function(e,i){var r=new t.Event("keypress");r.which=i.charCodeAt(0),S=!1,et.keypressEvent.call(n,r)});else{p.begin===p.end-1&&(p.begin=Y(p.begin+1),p.begin===p.end-1?rt(n,p.begin):rt(n,p.begin,p.end));var b=new t.Event("keydown");b.keyCode=f.numericInput?c.keyCode.BACKSPACE:c.keyCode.DELETE,et.keydownEvent.call(n,b)}e.preventDefault()}}},beforeInputEvent:function(e){if(e.cancelable){var n=this;switch(e.inputType){case"insertText":return t.each(e.data.split(""),function(e,i){var r=new t.Event("keypress");r.which=i.charCodeAt(0),S=!1,et.keypressEvent.call(n,r)}),e.preventDefault();case"deleteContentBackward":var i=new t.Event("keydown");return i.keyCode=c.keyCode.BACKSPACE,et.keydownEvent.call(n,i),e.preventDefault();case"deleteContentForward":var i=new t.Event("keydown");return i.keyCode=c.keyCode.DELETE,et.keydownEvent.call(n,i),e.preventDefault()}}},setValueEvent:function(e){this.inputmask.refreshValue=!1;var n=e&&e.detail?e.detail[0]:arguments[1],n=n||this.inputmask._valueGet(!0);t.isFunction(f.onBeforeMask)&&(n=f.onBeforeMask.call(k,n,f)||n),nt(this,!0,!1,n=n.toString().split("")),v=$().join(""),(f.clearMaskOnLostFocus||f.clearIncomplete)&&this.inputmask._valueGet()===F().join("")&&this.inputmask._valueSet("")},focusEvent:function(t){var e=this.inputmask._valueGet();f.showMaskOnFocus&&(e!==$().join("")?Z(this,$(),G(P())):!1===O&&rt(this,G(P()))),!0===f.positionCaretOnTab&&!1===O&&et.clickEvent.apply(this,[t,!0]),v=$().join("")},mouseleaveEvent:function(t){O=!1,f.clearMaskOnLostFocus&&i.activeElement!==this&&Q(this,b)},clickEvent:function(e,r){var o=this;setTimeout(function(){if(i.activeElement===o){var e=rt(o);if(r&&(x?e.end=e.begin:e.begin=e.end),e.begin===e.end)switch(f.positionCaretOnClick){case"none":break;case"select":rt(o,0,$().length);break;case"ignore":rt(o,G(P()));break;case"radixFocus":if(function(e){if(""!==f.radixPoint){var i=C().validPositions;if(i[e]===n||i[e].input===X(e)){if(e<G(-1))return!0;var r=t.inArray(f.radixPoint,$());if(-1!==r){for(var o in i)if(r<o&&i[o].input!==X(o))return!1;return!0}}}return!1}(e.begin)){var a=$().join("").indexOf(f.radixPoint);rt(o,f.numericInput?G(a):a);break}default:var s=e.begin,l=P(s,!0),u=G(l);if(s<u)rt(o,W(s,!0)||W(s-1,!0)?s:G(s));else{var c=C().validPositions[l],d=M(u,c?c.match.locator:n,c),h=X(u,d.match);if(""!==h&&$()[u]!==h&&!0!==d.match.optionalQuantifier&&!0!==d.match.newBlockMarker||!W(u,f.keepStatic)&&d.match.def===h){var p=G(u);(s>=p||s===u)&&(u=p)}rt(o,u)}}}},0)},cutEvent:function(n){t(this);var r=rt(this),o=n.originalEvent||n,a=e.clipboardData||o.clipboardData,s=x?$().slice(r.end,r.begin):$().slice(r.begin,r.end);a.setData("text",x?s.reverse().join(""):s.join("")),i.execCommand&&i.execCommand("copy"),lt(0,c.keyCode.DELETE,r),Z(this,$(),C().p,n,v!==$().join(""))},blurEvent:function(e){var i=t(this);if(this.inputmask){Q(this,b);var r=this.inputmask._valueGet(),o=$().slice();""===r&&y===n||(f.clearMaskOnLostFocus&&(-1===P()&&r===F().join("")?o=[]:at(o)),!1===st(o)&&(setTimeout(function(){i.trigger("incomplete")},0),f.clearIncomplete&&(T(),o=f.clearMaskOnLostFocus?[]:F().slice())),Z(this,o,n,e)),v!==$().join("")&&(v=o.join(""),i.trigger("change"))}},mouseenterEvent:function(t){O=!0,i.activeElement!==this&&f.showMaskOnHover&&Q(this,(x?$().slice().reverse():$()).join(""))},submitEvent:function(t){v!==$().join("")&&m.trigger("change"),f.clearMaskOnLostFocus&&-1===P()&&w.inputmask._valueGet&&w.inputmask._valueGet()===F().join("")&&w.inputmask._valueSet(""),f.clearIncomplete&&!1===st($())&&w.inputmask._valueSet(""),f.removeMaskOnSubmit&&(w.inputmask._valueSet(w.inputmask.unmaskedvalue(),!0),setTimeout(function(){Z(w,$())},0))},resetEvent:function(t){w.inputmask.refreshValue=!0,setTimeout(function(){m.trigger("setvalue")},0)}};function nt(e,i,r,o,a){var s=this||e.inputmask,l=o.slice(),u="",d=-1,h=n;if(T(),r||!0===f.autoUnmask)d=G(d);else{var p=F().slice(0,G(-1)).join(""),v=l.join("").match(new RegExp("^"+c.escapeRegex(p),"g"));v&&v.length>0&&(l.splice(0,v.length*p.length),d=G(d))}-1===d?(C().p=G(d),d=0):C().p=d,s.caretPos={begin:d},t.each(l,function(i,o){if(o!==n)if(C().validPositions[i]===n&&l[i]===X(i)&&W(i,!0)&&!1===U(i,l[i],!0,n,n,!0))C().p++;else{var a=new t.Event("_checkval");a.which=o.charCodeAt(0),u+=o;var c=P(n,!0);!function(t,e){return-1!==A(!0,0,!1).slice(t,G(t)).join("").replace(/'/g,"").indexOf(e)&&!W(t)&&(D(t).match.nativeDef===e.charAt(0)||null===D(t).match.fn&&D(t).match.nativeDef==="'"+e.charAt(0)||" "===D(t).match.nativeDef&&(D(t+1).match.nativeDef===e.charAt(0)||null===D(t+1).match.fn&&D(t+1).match.nativeDef==="'"+e.charAt(0)))}(d,u)?(h=et.keypressEvent.call(e,a,!0,!1,r,s.caretPos.begin))&&(d=s.caretPos.begin+1,u=""):h=et.keypressEvent.call(e,a,!0,!1,r,c+1),h&&(Z(n,$(),h.forwardPosition,a,!1),s.caretPos={begin:h.forwardPosition,end:h.forwardPosition})}}),i&&Z(e,$(),h?h.forwardPosition:n,a||new t.Event("checkval"),a&&"input"===a.type)}function it(e){if(e){if(e.inputmask===n)return e.value;e.inputmask&&e.inputmask.refreshValue&&et.setValueEvent.call(e)}var i=[],r=C().validPositions;for(var o in r)r[o].match&&null!=r[o].match.fn&&i.push(r[o].input);var a=0===i.length?"":(x?i.reverse():i).join("");if(t.isFunction(f.onUnMask)){var s=(x?$().slice().reverse():$()).join("");a=f.onUnMask.call(k,s,a,f)}return a}function rt(r,o,a,s){function l(t){return!x||"number"!=typeof t||f.greedy&&""===f.placeholder||!w||(t=w.inputmask._valueGet().length-t),t}var u;if(o===n)return"selectionStart"in r?(o=r.selectionStart,a=r.selectionEnd):e.getSelection?(u=e.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==r&&u.commonAncestorContainer!==r||(o=u.startOffset,a=u.endOffset):i.selection&&i.selection.createRange&&(u=i.selection.createRange(),o=0-u.duplicate().moveStart("character",-r.inputmask._valueGet().length),a=o+u.text.length),{begin:s?o:l(o),end:s?a:l(a)};if(t.isArray(o)&&(a=x?o[0]:o[1],o=x?o[1]:o[0]),o.begin!==n&&(a=x?o.begin:o.end,o=x?o.end:o.begin),"number"==typeof o){o=s?o:l(o),a="number"==typeof(a=s?a:l(a))?a:o;var c=parseInt(((r.ownerDocument.defaultView||e).getComputedStyle?(r.ownerDocument.defaultView||e).getComputedStyle(r,null):r.currentStyle).fontSize)*a;if(r.scrollLeft=c>r.scrollWidth?c:0,r.inputmask.caretPos={begin:o,end:a},r===i.activeElement){if("selectionStart"in r)r.selectionStart=o,r.selectionEnd=a;else if(e.getSelection){if(u=i.createRange(),r.firstChild===n||null===r.firstChild){var d=i.createTextNode("");r.appendChild(d)}u.setStart(r.firstChild,o<r.inputmask._valueGet().length?o:r.inputmask._valueGet().length),u.setEnd(r.firstChild,a<r.inputmask._valueGet().length?a:r.inputmask._valueGet().length),u.collapse(!0);var h=e.getSelection();h.removeAllRanges(),h.addRange(u)}else r.createTextRange&&((u=r.createTextRange()).collapse(!0),u.moveEnd("character",a),u.moveStart("character",o),u.select());ct(r,{begin:o,end:a})}}}function ot(e){var i,r,o=A(!0,P(),!0,!0),a=o.length,s=P(),l={},u=C().validPositions[s],c=u!==n?u.locator.slice():n;for(i=s+1;i<o.length;i++)r=M(i,c,i-1),c=r.locator.slice(),l[i]=t.extend(!0,{},r);var d=u&&u.alternation!==n?u.locator[u.alternation]:n;for(i=a-1;i>s&&((r=l[i]).match.optionality||r.match.optionalQuantifier&&r.match.newBlockMarker||d&&(d!==l[i].locator[u.alternation]&&null!=r.match.fn||null===r.match.fn&&r.locator[u.alternation]&&q(r.locator[u.alternation].toString().split(","),d.toString().split(","))&&""!==R(i)[0].def))&&o[i]===X(i,r.match);i--)a--;return e?{l:a,def:l[a]?l[a].match:n}:a}function at(t){t.length=0;for(var e,i=A(!0,0,!0,n,!0);(e=i.shift())!==n;)t.push(e);return t}function st(e){if(t.isFunction(f.isComplete))return f.isComplete(e,f);if("*"===f.repeat)return n;var i=!1,r=ot(!0),o=Y(r.l);if(r.def===n||r.def.newBlockMarker||r.def.optionality||r.def.optionalQuantifier){i=!0;for(var a=0;a<=o;a++){var s=M(a).match;if(null!==s.fn&&C().validPositions[a]===n&&!0!==s.optionality&&!0!==s.optionalQuantifier||null===s.fn&&e[a]!==X(a,s)){i=!1;break}}}return i}function lt(t,e,i,r,o){if((f.numericInput||x)&&(e===c.keyCode.BACKSPACE?e=c.keyCode.DELETE:e===c.keyCode.DELETE&&(e=c.keyCode.BACKSPACE),x)){var a=i.end;i.end=i.begin,i.begin=a}if(e===c.keyCode.BACKSPACE&&i.end-i.begin<1?(i.begin=Y(i.begin),C().validPositions[i.begin]!==n&&C().validPositions[i.begin].input===f.groupSeparator&&i.begin--):e===c.keyCode.DELETE&&i.begin===i.end&&(i.end=W(i.end,!0)&&C().validPositions[i.end]&&C().validPositions[i.end].input!==f.radixPoint?i.end+1:G(i.end)+1,C().validPositions[i.begin]!==n&&C().validPositions[i.begin].input===f.groupSeparator&&i.end++),K(i),!0!==r&&!1!==f.keepStatic||null!==f.regex){var s=z(!0);if(s){var l=s.caret!==n?s.caret:s.pos?G(s.pos.begin?s.pos.begin:s.pos):P(-1,!0);(e!==c.keyCode.DELETE||i.begin>l)&&i.begin}}var u=P(i.begin,!0);if(u<i.begin||-1===i.begin)C().p=G(u);else if(!0!==r&&(C().p=i.begin,!0!==o))for(;C().p<u&&C().validPositions[C().p]===n;)C().p++}function ut(n){var r=(n.ownerDocument.defaultView||e).getComputedStyle(n,null),o=i.createElement("div");o.style.width=r.width,o.style.textAlign=r.textAlign,y=i.createElement("div"),n.inputmask.colorMask=y,y.className="im-colormask",n.parentNode.insertBefore(y,n),n.parentNode.removeChild(n),y.appendChild(n),y.appendChild(o),n.style.left=o.offsetLeft+"px",t(y).on("mouseleave",function(t){return et.mouseleaveEvent.call(n,[t])}),t(y).on("mouseenter",function(t){return et.mouseenterEvent.call(n,[t])}),t(y).on("click",function(t){return rt(n,function(t){var e,o=i.createElement("span");for(var a in r)isNaN(a)&&-1!==a.indexOf("font")&&(o.style[a]=r[a]);o.style.textTransform=r.textTransform,o.style.letterSpacing=r.letterSpacing,o.style.position="absolute",o.style.height="auto",o.style.width="auto",o.style.visibility="hidden",o.style.whiteSpace="nowrap",i.body.appendChild(o);var s,l=n.inputmask._valueGet(),u=0;for(e=0,s=l.length;e<=s;e++){if(o.innerHTML+=l.charAt(e)||"_",o.offsetWidth>=t){var c=t-u,d=o.offsetWidth-t;o.innerHTML=l.charAt(e),c-=o.offsetWidth/3,e=c<d?e-1:e;break}u=o.offsetWidth}return i.body.removeChild(o),e}(t.clientX)),et.clickEvent.call(n,[t])})}function ct(t,e,r){var o,a,s,l=[],u=!1,c=0;function d(t){if(t===n&&(t=""),u||null!==o.fn&&a.input!==n)if(u&&(null!==o.fn&&a.input!==n||""===o.def)){u=!1;var e=l.length;l[e-1]=l[e-1]+"</span>",l.push(t)}else l.push(t);else u=!0,l.push("<span class='im-static'>"+t)}if(y!==n){var h=$();if(e===n?e=rt(t):e.begin===n&&(e={begin:e,end:e}),!0!==r){var p=P();do{C().validPositions[c]?(a=C().validPositions[c],o=a.match,s=a.locator.slice(),d(h[c])):(a=M(c,s,c-1),o=a.match,s=a.locator.slice(),!1===f.jitMasking||c<p||"number"==typeof f.jitMasking&&isFinite(f.jitMasking)&&f.jitMasking>c?d(X(c,o)):u=!1),c++}while((g===n||c<g)&&(null!==o.fn||""!==o.def)||p>c||u);u&&d(),i.activeElement===t&&(l.splice(e.begin,0,e.begin===e.end||e.end>C().maskLength?'<mark class="im-caret" style="border-right-width: 1px;border-right-style: solid;">':'<mark class="im-caret-select">'),l.splice(e.end+1,0,"</mark>"))}var v=y.getElementsByTagName("div")[0];v.innerHTML=l.join(""),t.inputmask.positionColorMask(t,v)}}if(r!==n)switch(r.action){case"isComplete":return w=r.el,st($());case"unmaskedvalue":return w!==n&&r.value===n||(J=r.value,J=(t.isFunction(f.onBeforeMask)&&f.onBeforeMask.call(k,J,f)||J).split(""),nt.call(this,n,!1,!1,J),t.isFunction(f.onBeforeWrite)&&f.onBeforeWrite.call(k,n,$(),0,f)),it(w);case"mask":!function(e){tt.off(e);var r=function(e,r){var o=e.getAttribute("type"),s="INPUT"===e.tagName&&-1!==t.inArray(o,r.supportsInputType)||e.isContentEditable||"TEXTAREA"===e.tagName;if(!s)if("INPUT"===e.tagName){var l=i.createElement("input");l.setAttribute("type",o),s="text"===l.type,l=null}else s="partial";return!1!==s?function(e){var o,s;function l(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==P()||!0!==r.nullable?i.activeElement===this&&r.clearMaskOnLostFocus?(x?at($().slice()).reverse():at($().slice())).join(""):o.call(this):"":o.call(this)}function u(e){s.call(this,e),this.inputmask&&t(this).trigger("setvalue",[e])}if(!e.inputmask.__valueGet){if(!0!==r.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===a("test".__proto__)?function(t){return t.__proto__}:function(t){return t.constructor.prototype});var c=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value"):n;c&&c.get&&c.set?(o=c.get,s=c.set,Object.defineProperty(e,"value",{get:l,set:u,configurable:!0})):"INPUT"!==e.tagName&&(o=function(){return this.textContent},s=function(t){this.textContent=t},Object.defineProperty(e,"value",{get:l,set:u,configurable:!0}))}else i.__lookupGetter__&&e.__lookupGetter__("value")&&(o=e.__lookupGetter__("value"),s=e.__lookupSetter__("value"),e.__defineGetter__("value",l),e.__defineSetter__("value",u));e.inputmask.__valueGet=o,e.inputmask.__valueSet=s}e.inputmask._valueGet=function(t){return x&&!0!==t?o.call(this.el).split("").reverse().join(""):o.call(this.el)},e.inputmask._valueSet=function(t,e){s.call(this.el,null===t||t===n?"":!0!==e&&x?t.split("").reverse().join(""):t)},o===n&&(o=function(){return this.value},s=function(t){this.value=t},function(e){if(t.valHooks&&(t.valHooks[e]===n||!0!==t.valHooks[e].inputmaskpatch)){var i=t.valHooks[e]&&t.valHooks[e].get?t.valHooks[e].get:function(t){return t.value},o=t.valHooks[e]&&t.valHooks[e].set?t.valHooks[e].set:function(t,e){return t.value=e,t};t.valHooks[e]={get:function(t){if(t.inputmask){if(t.inputmask.opts.autoUnmask)return t.inputmask.unmaskedvalue();var e=i(t);return-1!==P(n,n,t.inputmask.maskset.validPositions)||!0!==r.nullable?e:""}return i(t)},set:function(e,n){var i,r=t(e);return i=o(e,n),e.inputmask&&r.trigger("setvalue",[n]),i},inputmaskpatch:!0}}}(e.type),function(e){tt.on(e,"mouseenter",function(e){var n=t(this),i=this.inputmask._valueGet();i!==$().join("")&&n.trigger("setvalue")})}(e))}}(e):e.inputmask=n,s}(e,f);if(!1!==r&&(m=t(w=e),b=w.placeholder,-1===(g=w!==n?w.maxLength:n)&&(g=n),!0===f.colorMask&&ut(w),s&&("inputMode"in w&&(w.inputmode=f.inputmode,w.setAttribute("inputmode",f.inputmode)),!0===f.disablePredictiveText&&("autocorrect"in w?w.autocorrect=!1:(!0!==f.colorMask&&ut(w),w.type="password"))),!0===r&&(w.setAttribute("im-insert",f.insertMode),tt.on(w,"submit",et.submitEvent),tt.on(w,"reset",et.resetEvent),tt.on(w,"blur",et.blurEvent),tt.on(w,"focus",et.focusEvent),!0!==f.colorMask&&(tt.on(w,"click",et.clickEvent),tt.on(w,"mouseleave",et.mouseleaveEvent),tt.on(w,"mouseenter",et.mouseenterEvent)),tt.on(w,"paste",et.pasteEvent),tt.on(w,"cut",et.cutEvent),tt.on(w,"complete",f.oncomplete),tt.on(w,"incomplete",f.onincomplete),tt.on(w,"cleared",f.oncleared),s||!0===f.inputEventOnly?w.removeAttribute("maxLength"):(tt.on(w,"keydown",et.keydownEvent),tt.on(w,"keypress",et.keypressEvent)),tt.on(w,"input",et.inputFallBackEvent),tt.on(w,"beforeinput",et.beforeInputEvent)),tt.on(w,"setvalue",et.setValueEvent),v=F().join(""),""!==w.inputmask._valueGet(!0)||!1===f.clearMaskOnLostFocus||i.activeElement===w)){var o=t.isFunction(f.onBeforeMask)&&f.onBeforeMask.call(k,w.inputmask._valueGet(!0),f)||w.inputmask._valueGet(!0);""!==o&&nt(w,!0,!1,o.split(""));var l=$().slice();v=l.join(""),!1===st(l)&&f.clearIncomplete&&T(),f.clearMaskOnLostFocus&&i.activeElement!==w&&(-1===P()?l=[]:at(l)),(!1===f.clearMaskOnLostFocus||f.showMaskOnFocus&&i.activeElement===w||""!==w.inputmask._valueGet(!0))&&Z(w,l),i.activeElement===w&&rt(w,G(P()))}}(w);break;case"format":return J=(t.isFunction(f.onBeforeMask)&&f.onBeforeMask.call(k,r.value,f)||r.value).split(""),nt.call(this,n,!0,!1,J),r.metadata?{value:x?$().slice().reverse().join(""):$().join(""),metadata:p.call(this,{action:"getmetadata"},d,f)}:x?$().slice().reverse().join(""):$().join("");case"isValid":r.value?(J=r.value.split(""),nt.call(this,n,!0,!0,J)):r.value=$().join("");for(var dt=$(),ft=ot(),ht=dt.length-1;ht>ft&&!W(ht);ht--);return dt.splice(ft,ht+1-ft),st(dt)&&r.value===$().join("");case"getemptymask":return F().join("");case"remove":return w&&w.inputmask&&(t.data(w,"_inputmask_opts",null),m=t(w),w.inputmask._valueSet(f.autoUnmask?it(w):w.inputmask._valueGet(!0)),tt.off(w),w.inputmask.colorMask&&((y=w.inputmask.colorMask).removeChild(w),y.parentNode.insertBefore(w,y),y.parentNode.removeChild(y)),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(w),"value")&&w.inputmask.__valueGet&&Object.defineProperty(w,"value",{get:w.inputmask.__valueGet,set:w.inputmask.__valueSet,configurable:!0}):i.__lookupGetter__&&w.__lookupGetter__("value")&&w.inputmask.__valueGet&&(w.__defineGetter__("value",w.inputmask.__valueGet),w.__defineSetter__("value",w.inputmask.__valueSet)),w.inputmask=n),w;case"getmetadata":if(t.isArray(d.metadata)){var pt=A(!0,0,!1).join("");return t.each(d.metadata,function(t,e){if(e.mask===pt)return pt=e,!1}),pt}return d.metadata}}return c.prototype={dataAttribute:"data-inputmask",defaults:{placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:t.noop,onincomplete:t.noop,oncleared:t.noop,repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,alias:null,onKeyDown:t.noop,onBeforeMask:null,onBeforePaste:function(e,n){return t.isFunction(n.onBeforeMask)?n.onBeforeMask.call(this,e,n):e},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:t.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","url","password","search"],ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123,0,229],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:n,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,disablePredictiveText:!1,importDataAttributes:!0,shiftPositions:!0},definitions:{9:{validator:"[0-91-9]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ]"}},aliases:{},masksCache:{},mask:function(r){var o=this;return"string"==typeof r&&(r=i.getElementById(r)||i.querySelectorAll(r)),r=r.nodeName?[r]:r,t.each(r,function(i,r){var a=t.extend(!0,{},o.opts);if(function(i,r,o,a){if(!0===r.importDataAttributes){var s,l,u,c,f=i.getAttribute(a),h=function(t,r){null!==(r=r!==n?r:i.getAttribute(a+"-"+t))&&("string"==typeof r&&(0===t.indexOf("on")?r=e[r]:"false"===r?r=!1:"true"===r&&(r=!0)),o[t]=r)};if(f&&""!==f&&(f=f.replace(/'/g,'"'),l=JSON.parse("{"+f+"}")),l)for(c in u=n,l)if("alias"===c.toLowerCase()){u=l[c];break}for(s in h("alias",u),o.alias&&d(o.alias,o,r),r){if(l)for(c in u=n,l)if(c.toLowerCase()===s.toLowerCase()){u=l[c];break}h(s,u)}}return t.extend(!0,r,o),("rtl"===i.dir||r.rightAlign)&&(i.style.textAlign="right"),("rtl"===i.dir||r.numericInput)&&(i.dir="ltr",i.removeAttribute("dir"),r.isRTL=!0),Object.keys(o).length}(r,a,t.extend(!0,{},o.userOptions),o.dataAttribute)){var s=f(a,o.noMasksCache);s!==n&&(r.inputmask!==n&&(r.inputmask.opts.autoUnmask=!0,r.inputmask.remove()),r.inputmask=new c(n,n,!0),r.inputmask.opts=a,r.inputmask.noMasksCache=o.noMasksCache,r.inputmask.userOptions=t.extend(!0,{},o.userOptions),r.inputmask.isRTL=a.isRTL||a.numericInput,r.inputmask.el=r,r.inputmask.maskset=s,t.data(r,"_inputmask_opts",a),p.call(r.inputmask,{action:"mask"}))}}),r&&r[0]&&r[0].inputmask||this},option:function(e,n){return"string"==typeof e?this.opts[e]:"object"===(void 0===e?"undefined":a(e))?(t.extend(this.userOptions,e),this.el&&!0!==n&&this.mask(this.el),this):void 0},unmaskedvalue:function(t){return this.maskset=this.maskset||f(this.opts,this.noMasksCache),p.call(this,{action:"unmaskedvalue",value:t})},remove:function(){return p.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||f(this.opts,this.noMasksCache),p.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||f(this.opts,this.noMasksCache),p.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||f(this.opts,this.noMasksCache),p.call(this,{action:"getmetadata"})},isValid:function(t){return this.maskset=this.maskset||f(this.opts,this.noMasksCache),p.call(this,{action:"isValid",value:t})},format:function(t,e){return this.maskset=this.maskset||f(this.opts,this.noMasksCache),p.call(this,{action:"format",value:t,metadata:e})},setValue:function(e){this.el&&t(this.el).trigger("setvalue",[e])},analyseMask:function(e,i,r){var o,a,s,l,u,d,f=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?(?:\|[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,h=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,p=!1,v=new y,m=[],g=[];function y(t,e,n,i){this.matches=[],this.openGroup=t||!1,this.alternatorGroup=!1,this.isGroup=t||!1,this.isOptional=e||!1,this.isQuantifier=n||!1,this.isAlternator=i||!1,this.quantifier={min:1,max:1}}function b(e,o,a){a=a!==n?a:e.matches.length;var s=e.matches[a-1];if(i)0===o.indexOf("[")||p&&/\\d|\\s|\\w]/i.test(o)||"."===o?e.matches.splice(a++,0,{fn:new RegExp(o,r.casing?"i":""),optionality:!1,newBlockMarker:s===n?"master":s.def!==o,casing:null,def:o,placeholder:n,nativeDef:o}):(p&&(o=o[o.length-1]),t.each(o.split(""),function(t,i){s=e.matches[a-1],e.matches.splice(a++,0,{fn:null,optionality:!1,newBlockMarker:s===n?"master":s.def!==i&&null!==s.fn,casing:null,def:r.staticDefinitionSymbol||i,placeholder:r.staticDefinitionSymbol!==n?i:n,nativeDef:(p?"'":"")+i})})),p=!1;else{var l=(r.definitions?r.definitions[o]:n)||c.prototype.definitions[o];l&&!p?e.matches.splice(a++,0,{fn:l.validator?"string"==typeof l.validator?new RegExp(l.validator,r.casing?"i":""):new function(){this.test=l.validator}:new RegExp("."),optionality:!1,newBlockMarker:s===n?"master":s.def!==(l.definitionSymbol||o),casing:l.casing,def:l.definitionSymbol||o,placeholder:l.placeholder,nativeDef:o}):(e.matches.splice(a++,0,{fn:null,optionality:!1,newBlockMarker:s===n?"master":s.def!==o&&null!==s.fn,casing:null,def:r.staticDefinitionSymbol||o,placeholder:r.staticDefinitionSymbol!==n?o:n,nativeDef:(p?"'":"")+o}),p=!1)}}function k(){if(m.length>0){if(b(l=m[m.length-1],a),l.isAlternator){u=m.pop();for(var t=0;t<u.matches.length;t++)u.matches[t].isGroup&&(u.matches[t].isGroup=!1);m.length>0?(l=m[m.length-1]).matches.push(u):v.matches.push(u)}}else b(v,a)}function w(t){var e=new y(!0);return e.openGroup=!1,e.matches=t,e}for(i&&(r.optionalmarker[0]=n,r.optionalmarker[1]=n);o=i?h.exec(e):f.exec(e);){if(a=o[0],i)switch(a.charAt(0)){case"?":a="{0,1}";break;case"+":case"*":a="{"+a+"}"}if(p)k();else switch(a.charAt(0)){case"(?=":case"(?!":case"(?<=":case"(?<!":break;case r.escapeChar:p=!0,i&&k();break;case r.optionalmarker[1]:case r.groupmarker[1]:if((s=m.pop()).openGroup=!1,s!==n)if(m.length>0){if((l=m[m.length-1]).matches.push(s),l.isAlternator){u=m.pop();for(var x=0;x<u.matches.length;x++)u.matches[x].isGroup=!1,u.matches[x].alternatorGroup=!1;m.length>0?(l=m[m.length-1]).matches.push(u):v.matches.push(u)}}else v.matches.push(s);else k();break;case r.optionalmarker[0]:m.push(new y(!1,!0));break;case r.groupmarker[0]:m.push(new y(!0));break;case r.quantifiermarker[0]:var _=new y(!1,!1,!0),E=(a=a.replace(/[{}]/g,"")).split("|"),S=E[0].split(","),O=isNaN(S[0])?S[0]:parseInt(S[0]),A=1===S.length?O:isNaN(S[1])?S[1]:parseInt(S[1]);"*"!==O&&"+"!==O||(O="*"===A?0:1),_.quantifier={min:O,max:A,jit:E[1]};var C=m.length>0?m[m.length-1].matches:v.matches;if((o=C.pop()).isAlternator){C.push(o),C=o.matches;var T=new y(!0),P=C.pop();C.push(T),C=T.matches,o=P}o.isGroup||(o=w([o])),C.push(o),C.push(_);break;case r.alternatormarker:var N=function(t){var e=t.pop();return e.isQuantifier&&(e=w([t.pop(),e])),e};if(m.length>0){var I=(l=m[m.length-1]).matches[l.matches.length-1];d=l.openGroup&&(I.matches===n||!1===I.isGroup&&!1===I.isAlternator)?m.pop():N(l.matches)}else d=N(v.matches);if(d.isAlternator)m.push(d);else if(d.alternatorGroup?(u=m.pop(),d.alternatorGroup=!1):u=new y(!1,!1,!1,!0),u.matches.push(d),m.push(u),d.openGroup){d.openGroup=!1;var L=new y(!0);L.alternatorGroup=!0,m.push(L)}break;default:k()}}for(;m.length>0;)s=m.pop(),v.matches.push(s);return v.matches.length>0&&(function e(o){o&&o.matches&&t.each(o.matches,function(t,a){var s=o.matches[t+1];(s===n||s.matches===n||!1===s.isQuantifier)&&a&&a.isGroup&&(a.isGroup=!1,i||(b(a,r.groupmarker[0],0),!0!==a.openGroup&&b(a,r.groupmarker[1]))),e(a)})}(v),g.push(v)),(r.numericInput||r.isRTL)&&function t(e){for(var i in e.matches=e.matches.reverse(),e.matches)if(e.matches.hasOwnProperty(i)){var o=parseInt(i);if(e.matches[i].isQuantifier&&e.matches[o+1]&&e.matches[o+1].isGroup){var a=e.matches[i];e.matches.splice(i,1),e.matches.splice(o+1,0,a)}e.matches[i].matches!==n?e.matches[i]=t(e.matches[i]):e.matches[i]=((s=e.matches[i])===r.optionalmarker[0]?s=r.optionalmarker[1]:s===r.optionalmarker[1]?s=r.optionalmarker[0]:s===r.groupmarker[0]?s=r.groupmarker[1]:s===r.groupmarker[1]&&(s=r.groupmarker[0]),s)}var s;return e}(g[0]),g},positionColorMask:function(t,e){t.style.left=e.offsetLeft+"px"}},c.extendDefaults=function(e){t.extend(!0,c.prototype.defaults,e)},c.extendDefinitions=function(e){t.extend(!0,c.prototype.definitions,e)},c.extendAliases=function(e){t.extend(!0,c.prototype.aliases,e)},c.format=function(t,e,n){return c(e).format(t,n)},c.unmask=function(t,e){return c(e).unmaskedvalue(t)},c.isValid=function(t,e){return c(e).isValid(t)},c.remove=function(e){"string"==typeof e&&(e=i.getElementById(e)||i.querySelectorAll(e)),e=e.nodeName?[e]:e,t.each(e,function(t,e){e.inputmask&&e.inputmask.remove()})},c.setValue=function(e,n){"string"==typeof e&&(e=i.getElementById(e)||i.querySelectorAll(e)),e=e.nodeName?[e]:e,t.each(e,function(e,i){i.inputmask?i.inputmask.setValue(n):t(i).trigger("setvalue",[n])})},c.escapeRegex=function(t){return t.replace(new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim"),"\\$1")},c.keyCode={BACKSPACE:8,BACKSPACE_SAFARI:127,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,SPACE:32,TAB:9,UP:38,X:88,CONTROL:17},c.dependencyLib=t,c})?i.apply(e,r):i)||(t.exports=o)},function(t,e,n){"use strict";var i,r,o;"function"==typeof Symbol&&Symbol.iterator;r=[n(4)],void 0===(o="function"==typeof(i=function(t){return t})?i.apply(e,r):i)||(t.exports=o)},function(t,e){t.exports=jQuery},function(module,exports,__webpack_require__){"use strict";var __WEBPACK_AMD_DEFINE_RESULT__,_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};__WEBPACK_AMD_DEFINE_RESULT__=function(){return"undefined"!=typeof window?window:new(eval("require('jsdom').JSDOM"))("").window}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(t,e,n){"use strict";var i,r,o,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r=[n(2)],void 0===(o="function"==typeof(i=function(t){var e=t.dependencyLib,n={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return s(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return s(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return s(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return s(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return s(Date.prototype.getHours.call(this),2)}],hhh:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return s(Date.prototype.getHours.call(this),2)}],HHH:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return s(Date.prototype.getMinutes.call(this),2)}],ss:["[0-5][0-9]",Date.prototype.setSeconds,"seconds",function(){return s(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return s(Date.prototype.getMilliseconds.call(this),3)}],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return s(Date.prototype.getMilliseconds.call(this),2)}],t:["[ap]"],tt:["[ap]m"],T:["[AP]"],TT:["[AP]M"],Z:[""],o:[""],S:[""]},i={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function r(t){if(!t.tokenizer){var e=[];for(var i in n)-1===e.indexOf(i[0])&&e.push(i[0]);t.tokenizer="("+e.join("+|")+")+?|.",t.tokenizer=new RegExp(t.tokenizer,"g")}return t.tokenizer}function o(e,i,o,a){for(var s,l="";s=r(o).exec(e);)if(void 0===i)if(n[s[0]])l+="("+n[s[0]][0]+")";else switch(s[0]){case"[":l+="(";break;case"]":l+=")?";break;default:l+=t.escapeRegex(s[0])}else if(n[s[0]])if(!0!==a&&n[s[0]][3]){var u=n[s[0]][3];l+=u.call(i.date)}else n[s[0]][2]?l+=i["raw"+n[s[0]][2]]:l+=s[0];else l+=s[0];return l}function s(t,e){for(t=String(t),e=e||2;t.length<e;)t="0"+t;return t}function l(t,e,i){var o,s,l,u={date:new Date(1,0,1)},c=t;function d(t){var e=t.replace(/[^0-9]/g,"0");if(e!=t){var n=t.replace(/[^0-9]/g,""),r=(i.min&&i.min[o]||t).toString(),a=(i.max&&i.max[o]||t).toString();e=n+(n<r.slice(0,n.length)?r.slice(n.length):n>a.slice(0,n.length)?a.slice(n.length):e.toString().slice(n.length))}return e}function f(t,e,n){t[o]=d(e),t["raw"+o]=e,void 0!==l&&l.call(t.date,"month"==o?parseInt(t[o])-1:t[o])}if("string"==typeof c){for(;s=r(i).exec(e);){var h=c.slice(0,s[0].length);n.hasOwnProperty(s[0])&&(n[s[0]][0],o=n[s[0]][2],l=n[s[0]][1],f(u,h)),c=c.slice(h.length)}return u}if(c&&"object"===(void 0===c?"undefined":a(c))&&c.hasOwnProperty("date"))return c}return t.extendAliases({datetime:{mask:function(t){return n.S=t.i18n.ordinalSuffix.join("|"),t.inputFormat=i[t.inputFormat]||t.inputFormat,t.displayFormat=i[t.displayFormat]||t.displayFormat||t.inputFormat,t.outputFormat=i[t.outputFormat]||t.outputFormat||t.inputFormat,t.placeholder=""!==t.placeholder?t.placeholder:t.inputFormat.replace(/[\[\]]/,""),t.regex=o(t.inputFormat,void 0,t),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:void 0,outputFormat:void 0,min:null,max:null,i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]},postValidation:function(t,e,n,i){i.min=l(i.min,i.inputFormat,i),i.max=l(i.max,i.inputFormat,i);var r=n,a=l(t.join(""),i.inputFormat,i);return r&&a.date.getTime()==a.date.getTime()&&(r=(r=function(t,e){return(!isFinite(t.rawday)||"29"==t.day&&!isFinite(t.rawyear)||new Date(t.date.getFullYear(),isFinite(t.rawmonth)?t.month:t.date.getMonth()+1,0).getDate()>=t.day)&&e}(a,r))&&function(t,e){var n=!0;if(e.min){if(t.rawyear){var i=t.rawyear.replace(/[^0-9]/g,""),r=e.min.year.substr(0,i.length);n=r<=i}t.year===t.rawyear&&e.min.date.getTime()==e.min.date.getTime()&&(n=e.min.date.getTime()<=t.date.getTime())}return n&&e.max&&e.max.date.getTime()==e.max.date.getTime()&&(n=e.max.date.getTime()>=t.date.getTime()),n}(a,i)),e&&r&&n.pos!==e?{buffer:o(i.inputFormat,a,i),refreshFromBuffer:{start:e,end:n.pos}}:r},onKeyDown:function(n,i,o,a){if(n.ctrlKey&&n.keyCode===t.keyCode.RIGHT){for(var l,u=new Date,c="";l=r(a).exec(a.inputFormat);)"d"===l[0].charAt(0)?c+=s(u.getDate(),l[0].length):"m"===l[0].charAt(0)?c+=s(u.getMonth()+1,l[0].length):"yyyy"===l[0]?c+=u.getFullYear().toString():"y"===l[0].charAt(0)&&(c+=s(u.getYear(),l[0].length));this.inputmask._valueSet(c),e(this).trigger("setvalue")}},onUnMask:function(t,e,n){return o(n.outputFormat,l(t,n.inputFormat,n),n,!0)},casing:function(t,e,n,i){return 0==e.nativeDef.indexOf("[ap]")?t.toLowerCase():0==e.nativeDef.indexOf("[AP]")?t.toUpperCase():t},insertMode:!1,shiftPositions:!1}}),t})?i.apply(e,r):i)||(t.exports=o)},function(t,e,n){"use strict";var i,r,o;"function"==typeof Symbol&&Symbol.iterator;r=[n(2)],void 0===(o="function"==typeof(i=function(t){var e=t.dependencyLib;function n(e,n){for(var i="",r=0;r<e.length;r++)t.prototype.definitions[e.charAt(r)]||n.definitions[e.charAt(r)]||n.optionalmarker.start===e.charAt(r)||n.optionalmarker.end===e.charAt(r)||n.quantifiermarker.start===e.charAt(r)||n.quantifiermarker.end===e.charAt(r)||n.groupmarker.start===e.charAt(r)||n.groupmarker.end===e.charAt(r)||n.alternatormarker===e.charAt(r)?i+="\\"+e.charAt(r):i+=e.charAt(r);return i}return t.extendAliases({numeric:{mask:function(t){if(0!==t.repeat&&isNaN(t.integerDigits)&&(t.integerDigits=t.repeat),t.repeat=0,t.groupSeparator===t.radixPoint&&t.digits&&"0"!==t.digits&&("."===t.radixPoint?t.groupSeparator=",":","===t.radixPoint?t.groupSeparator=".":t.groupSeparator="")," "===t.groupSeparator&&(t.skipOptionalPartCharacter=void 0),t.autoGroup=t.autoGroup&&""!==t.groupSeparator,t.autoGroup&&("string"==typeof t.groupSize&&isFinite(t.groupSize)&&(t.groupSize=parseInt(t.groupSize)),isFinite(t.integerDigits))){var e=Math.floor(t.integerDigits/t.groupSize),i=t.integerDigits%t.groupSize;t.integerDigits=parseInt(t.integerDigits)+(0===i?e-1:e),t.integerDigits<1&&(t.integerDigits="*")}t.placeholder.length>1&&(t.placeholder=t.placeholder.charAt(0)),"radixFocus"===t.positionCaretOnClick&&""===t.placeholder&&!1===t.integerOptional&&(t.positionCaretOnClick="lvp"),t.definitions[";"]=t.definitions["~"],t.definitions[";"].definitionSymbol="~",!0===t.numericInput&&(t.positionCaretOnClick="radixFocus"===t.positionCaretOnClick?"lvp":t.positionCaretOnClick,t.digitsOptional=!1,isNaN(t.digits)&&(t.digits=2),t.decimalProtect=!1);var r="[+]";if(r+=n(t.prefix,t),!0===t.integerOptional?r+="~{1,"+t.integerDigits+"}":r+="~{"+t.integerDigits+"}",void 0!==t.digits){var o=t.decimalProtect?":":t.radixPoint,a=t.digits.toString().split(",");isFinite(a[0])&&a[1]&&isFinite(a[1])?r+=o+";{"+t.digits+"}":(isNaN(t.digits)||parseInt(t.digits)>0)&&(t.digitsOptional?r+="["+o+";{1,"+t.digits+"}]":r+=o+";{"+t.digits+"}")}return r+=n(t.suffix,t),r+="[-]",t.greedy=!1,r},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputType:"text",inputmode:"numeric",preValidation:function(t,n,i,r,o,a){if("-"===i||i===o.negationSymbol.front)return!0===o.allowMinus&&(o.isNegative=void 0===o.isNegative||!o.isNegative,""===t.join("")||{caret:a.validPositions[n]?n:void 0,dopost:!0});if(!1===r&&i===o.radixPoint&&void 0!==o.digits&&(isNaN(o.digits)||parseInt(o.digits)>0)){var s=e.inArray(o.radixPoint,t);if(-1!==s&&void 0!==a.validPositions[s])return!0===o.numericInput?n===s:{caret:s+1}}return!0},postValidation:function(n,i,r,o){var a=o.suffix.split(""),s=o.prefix.split("");if(void 0===r.pos&&void 0!==r.caret&&!0!==r.dopost)return r;var l=void 0!==r.caret?r.caret:r.pos,u=n.slice();o.numericInput&&(l=u.length-l-1,u=u.reverse());var c=u[l];if(c===o.groupSeparator&&(c=u[l+=1]),l===u.length-o.suffix.length-1&&c===o.radixPoint)return r;void 0!==c&&c!==o.radixPoint&&c!==o.negationSymbol.front&&c!==o.negationSymbol.back&&(u[l]="?",o.prefix.length>0&&l>=(!1===o.isNegative?1:0)&&l<o.prefix.length-1+(!1===o.isNegative?1:0)?s[l-(!1===o.isNegative?1:0)]="?":o.suffix.length>0&&l>=u.length-o.suffix.length-(!1===o.isNegative?1:0)&&(a[l-(u.length-o.suffix.length-(!1===o.isNegative?1:0))]="?")),s=s.join(""),a=a.join("");var d=u.join("").replace(s,"");if(d=(d=(d=(d=d.replace(a,"")).replace(new RegExp(t.escapeRegex(o.groupSeparator),"g"),"")).replace(new RegExp("[-"+t.escapeRegex(o.negationSymbol.front)+"]","g"),"")).replace(new RegExp(t.escapeRegex(o.negationSymbol.back)+"$"),""),isNaN(o.placeholder)&&(d=d.replace(new RegExp(t.escapeRegex(o.placeholder),"g"),"")),d.length>1&&1!==d.indexOf(o.radixPoint)&&("0"===c&&(d=d.replace(/^\?/g,"")),d=d.replace(/^0/g,"")),d.charAt(0)===o.radixPoint&&""!==o.radixPoint&&!0!==o.numericInput&&(d="0"+d),""!==d){if(d=d.split(""),(!o.digitsOptional||o.enforceDigitsOnBlur&&"blur"===r.event)&&isFinite(o.digits)){var f=e.inArray(o.radixPoint,d),h=e.inArray(o.radixPoint,u);-1===f&&(d.push(o.radixPoint),f=d.length-1);for(var p=1;p<=o.digits;p++)o.digitsOptional&&(!o.enforceDigitsOnBlur||"blur"!==r.event)||void 0!==d[f+p]&&d[f+p]!==o.placeholder.charAt(0)?-1!==h&&void 0!==u[h+p]&&(d[f+p]=d[f+p]||u[h+p]):d[f+p]=r.placeholder||o.placeholder.charAt(0)}if(!0!==o.autoGroup||""===o.groupSeparator||c===o.radixPoint&&void 0===r.pos&&!r.dopost)d=d.join("");else{var v=d[d.length-1]===o.radixPoint&&r.c===o.radixPoint;d=t(function(t,e){var n="";if(n+="("+e.groupSeparator+"*{"+e.groupSize+"}){*}",""!==e.radixPoint){var i=t.join("").split(e.radixPoint);i[1]&&(n+=e.radixPoint+"*{"+i[1].match(/^\d*\??\d*/)[0].length+"}")}return n}(d,o),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(d.join("")),v&&(d+=o.radixPoint),d.charAt(0)===o.groupSeparator&&d.substr(1)}}if(o.isNegative&&"blur"===r.event&&(o.isNegative="0"!==d),d=s+d,d+=a,o.isNegative&&(d=o.negationSymbol.front+d,d+=o.negationSymbol.back),d=d.split(""),void 0!==c)if(c!==o.radixPoint&&c!==o.negationSymbol.front&&c!==o.negationSymbol.back)(l=e.inArray("?",d))>-1?d[l]=c:l=r.caret||0;else if(c===o.radixPoint||c===o.negationSymbol.front||c===o.negationSymbol.back){var m=e.inArray(c,d);-1!==m&&(l=m)}o.numericInput&&(l=d.length-l-1,d=d.reverse());var g={caret:void 0!==c&&void 0===r.pos||void 0===l?l:l+(o.numericInput?-1:1),buffer:d,refreshFromBuffer:r.dopost||n.join("")!==d.join("")};return g.refreshFromBuffer?g:r},onBeforeWrite:function(n,i,r,o){if(n)switch(n.type){case"keydown":return o.postValidation(i,r,{caret:r,dopost:!0},o);case"blur":case"checkval":var a;if(function(e){void 0===e.parseMinMaxOptions&&(null!==e.min&&(e.min=e.min.toString().replace(new RegExp(t.escapeRegex(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.min=e.min.replace(e.radixPoint,".")),e.min=isFinite(e.min)?parseFloat(e.min):NaN,isNaN(e.min)&&(e.min=Number.MIN_VALUE)),null!==e.max&&(e.max=e.max.toString().replace(new RegExp(t.escapeRegex(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.max=e.max.replace(e.radixPoint,".")),e.max=isFinite(e.max)?parseFloat(e.max):NaN,isNaN(e.max)&&(e.max=Number.MAX_VALUE)),e.parseMinMaxOptions="done")}(o),null!==o.min||null!==o.max){if(a=o.onUnMask(i.join(""),void 0,e.extend({},o,{unmaskAsNumber:!0})),null!==o.min&&a<o.min)return o.isNegative=o.min<0,o.postValidation(o.min.toString().replace(".",o.radixPoint).split(""),r,{caret:r,dopost:!0,placeholder:"0"},o);if(null!==o.max&&a>o.max)return o.isNegative=o.max<0,o.postValidation(o.max.toString().replace(".",o.radixPoint).split(""),r,{caret:r,dopost:!0,placeholder:"0"},o)}return o.postValidation(i,r,{caret:r,placeholder:"0",event:"blur"},o);case"_checkval":return{caret:r}}},regex:{integerPart:function(e,n){return n?new RegExp("["+t.escapeRegex(e.negationSymbol.front)+"+]?"):new RegExp("["+t.escapeRegex(e.negationSymbol.front)+"+]?\\d+")},integerNPart:function(e){return new RegExp("[\\d"+t.escapeRegex(e.groupSeparator)+t.escapeRegex(e.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(e,n,i,r,o,a){var s;if("k"===e||"m"===e){s={insert:[],c:0};for(var l=0,u="k"===e?2:5;l<u;l++)s.insert.push({pos:i+l,c:0});return s.pos=i+u,s}if(!0===(s=r?new RegExp("[0-9"+t.escapeRegex(o.groupSeparator)+"]").test(e):new RegExp("[0-9]").test(e))){if(!0!==o.numericInput&&void 0!==n.validPositions[i]&&"~"===n.validPositions[i].match.def&&!a){var c=n.buffer.join(""),d=(c=(c=c.replace(new RegExp("[-"+t.escapeRegex(o.negationSymbol.front)+"]","g"),"")).replace(new RegExp(t.escapeRegex(o.negationSymbol.back)+"$"),"")).split(o.radixPoint);d.length>1&&(d[1]=d[1].replace(/0/g,o.placeholder.charAt(0))),"0"===d[0]&&(d[0]=d[0].replace(/0/g,o.placeholder.charAt(0))),c=d[0]+o.radixPoint+d[1]||"";var f=n._buffer.join("");for(c===o.radixPoint&&(c=f);null===c.match(t.escapeRegex(f)+"$");)f=f.slice(1);s=void 0===(c=(c=c.replace(f,"")).split(""))[i]?{pos:i,remove:i}:{pos:i}}}else r||e!==o.radixPoint||void 0!==n.validPositions[i-1]||(s={insert:{pos:i,c:0},pos:i+1});return s},cardinality:1},"+":{validator:function(t,e,n,i,r){return r.allowMinus&&("-"===t||t===r.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(t,e,n,i,r){return r.allowMinus&&t===r.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(e,n,i,r,o){var a="["+t.escapeRegex(o.radixPoint)+"]",s=new RegExp(a).test(e);return s&&n.validPositions[i]&&n.validPositions[i].match.placeholder===o.radixPoint&&(s={caret:i+1}),s},cardinality:1,placeholder:function(t){return t.radixPoint}}},onUnMask:function(e,n,i){if(""===n&&!0===i.nullable)return n;var r=e.replace(i.prefix,"");return r=(r=r.replace(i.suffix,"")).replace(new RegExp(t.escapeRegex(i.groupSeparator),"g"),""),""!==i.placeholder.charAt(0)&&(r=r.replace(new RegExp(i.placeholder.charAt(0),"g"),"0")),i.unmaskAsNumber?(""!==i.radixPoint&&-1!==r.indexOf(i.radixPoint)&&(r=r.replace(t.escapeRegex.call(this,i.radixPoint),".")),r=(r=r.replace(new RegExp("^"+t.escapeRegex(i.negationSymbol.front)),"-")).replace(new RegExp(t.escapeRegex(i.negationSymbol.back)+"$"),""),Number(r)):r},isComplete:function(e,n){var i=(n.numericInput?e.slice().reverse():e).join("");return i=(i=(i=(i=(i=i.replace(new RegExp("^"+t.escapeRegex(n.negationSymbol.front)),"-")).replace(new RegExp(t.escapeRegex(n.negationSymbol.back)+"$"),"")).replace(n.prefix,"")).replace(n.suffix,"")).replace(new RegExp(t.escapeRegex(n.groupSeparator)+"([0-9]{3})","g"),"$1"),","===n.radixPoint&&(i=i.replace(t.escapeRegex(n.radixPoint),".")),isFinite(i)},onBeforeMask:function(n,i){i.isNegative=void 0;var r=i.radixPoint||",";"number"!=typeof n&&"number"!==i.inputType||""===r||(n=n.toString().replace(".",r));var o=n.split(r),a=o[0].replace(/[^\-0-9]/g,""),s=o.length>1?o[1].replace(/[^0-9]/g,""):"";n=a+(""!==s?r+s:s);var l=0;if(""!==r&&(l=s.length,""!==s)){var u=Math.pow(10,l||1);isFinite(i.digits)&&(l=parseInt(i.digits),u=Math.pow(10,l)),n=n.replace(t.escapeRegex(r),"."),isFinite(n)&&(n=Math.round(parseFloat(n)*u)/u),n=n.toString().replace(".",r)}return 0===i.digits&&-1!==n.indexOf(t.escapeRegex(r))&&(n=n.substring(0,n.indexOf(t.escapeRegex(r)))),function(t,n,i){if(n>0){var r=e.inArray(i.radixPoint,t);-1===r&&(t.push(i.radixPoint),r=t.length-1);for(var o=1;o<=n;o++)t[r+o]=t[r+o]||"0"}return t}(n.toString().split(""),l,i).join("")},onKeyDown:function(n,i,r,o){var a=e(this);if(n.ctrlKey)switch(n.keyCode){case t.keyCode.UP:a.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(o.step)),a.trigger("setvalue");break;case t.keyCode.DOWN:a.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(o.step)),a.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),t})?i.apply(e,r):i)||(t.exports=o)},function(t,e,n){"use strict";var i,r,o,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r=[n(4),n(2)],void 0===(o="function"==typeof(i=function(t,e){return void 0===t.fn.inputmask&&(t.fn.inputmask=function(n,i){var r,o=this[0];if(void 0===i&&(i={}),"string"==typeof n)switch(n){case"unmaskedvalue":return o&&o.inputmask?o.inputmask.unmaskedvalue():t(o).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return o&&o.inputmask?o.inputmask.getemptymask():"";case"hasMaskedValue":return!(!o||!o.inputmask)&&o.inputmask.hasMaskedValue();case"isComplete":return!o||!o.inputmask||o.inputmask.isComplete();case"getmetadata":return o&&o.inputmask?o.inputmask.getmetadata():void 0;case"setvalue":e.setValue(o,i);break;case"option":if("string"!=typeof i)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(i)});if(o&&void 0!==o.inputmask)return o.inputmask.option(i);break;default:return i.alias=n,r=new e(i),this.each(function(){r.mask(this)})}else{if(Array.isArray(n))return i.alias=n,r=new e(i),this.each(function(){r.mask(this)});if("object"==(void 0===n?"undefined":a(n)))return r=new e(n),void 0===n.mask&&void 0===n.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(n);r.mask(this)}):this.each(function(){r.mask(this)});if(void 0===n)return this.each(function(){(r=new e(i)).mask(this)})}}),t.fn.inputmask})?i.apply(e,r):i)||(t.exports=o)}]),function(t){"function"==typeof define&&define.amd?define(["./inputmask"],t):"object"==typeof exports?module.exports=t(require("./inputmask")):t(window.Inputmask)}(function(t){var e=t.dependencyLib,n={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return a(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return a(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return a(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return a(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return a(Date.prototype.getHours.call(this),2)}],hhh:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return a(Date.prototype.getHours.call(this),2)}],HHH:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return a(Date.prototype.getMinutes.call(this),2)}],ss:["[0-5][0-9]",Date.prototype.setSeconds,"seconds",function(){return a(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return a(Date.prototype.getMilliseconds.call(this),3)}],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return a(Date.prototype.getMilliseconds.call(this),2)}],t:["[ap]"],tt:["[ap]m"],T:["[AP]"],TT:["[AP]M"],Z:[""],o:[""],S:[""]},i={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function r(t){if(!t.tokenizer){var e=[];for(var i in n)-1===e.indexOf(i[0])&&e.push(i[0]);t.tokenizer="("+e.join("+|")+")+?|.",t.tokenizer=new RegExp(t.tokenizer,"g")}return t.tokenizer}function o(e,i,o,a){for(var s,l="";s=r(o).exec(e);){if(void 0===i)if(n[s[0]])l+="("+n[s[0]][0]+")";else switch(s[0]){case"[":l+="(";break;case"]":l+=")?";break;default:l+=t.escapeRegex(s[0])}else if(n[s[0]])if(!0!==a&&n[s[0]][3])l+=n[s[0]][3].call(i.date);else n[s[0]][2]?l+=i["raw"+n[s[0]][2]]:l+=s[0];else l+=s[0]}return l}function a(t,e){for(t=String(t),e=e||2;t.length<e;)t="0"+t;return t}function s(t,e,i){var o,a,s,l={date:new Date(1,0,1)},u=t;function c(t){var e=t.replace(/[^0-9]/g,"0");if(e!=t){var n=t.replace(/[^0-9]/g,""),r=(i.min&&i.min[o]||t).toString(),a=(i.max&&i.max[o]||t).toString();e=n+(n<r.slice(0,n.length)?r.slice(n.length):n>a.slice(0,n.length)?a.slice(n.length):e.toString().slice(n.length))}return e}function d(t,e,n){t[o]=c(e),t["raw"+o]=e,void 0!==s&&s.call(t.date,"month"==o?parseInt(t[o])-1:t[o])}if("string"==typeof u){for(;a=r(i).exec(e);){var f=u.slice(0,a[0].length);n.hasOwnProperty(a[0])&&(n[a[0]][0],o=n[a[0]][2],s=n[a[0]][1],d(l,f)),u=u.slice(f.length)}return l}if(u&&"object"==typeof u&&u.hasOwnProperty("date"))return u}return t.extendAliases({datetime:{mask:function(t){return n.S=t.i18n.ordinalSuffix.join("|"),t.inputFormat=i[t.inputFormat]||t.inputFormat,t.displayFormat=i[t.displayFormat]||t.displayFormat||t.inputFormat,t.outputFormat=i[t.outputFormat]||t.outputFormat||t.inputFormat,t.placeholder=""!==t.placeholder?t.placeholder:t.inputFormat.replace(/[\[\]]/,""),t.regex=o(t.inputFormat,void 0,t),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:void 0,outputFormat:void 0,min:null,max:null,i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]},postValidation:function(t,e,n,i){i.min=s(i.min,i.inputFormat,i),i.max=s(i.max,i.inputFormat,i);var r=n,a=s(t.join(""),i.inputFormat,i);return r&&a.date.getTime()==a.date.getTime()&&(r=(r=function(t,e){return(!isFinite(t.rawday)||"29"==t.day&&!isFinite(t.rawyear)||new Date(t.date.getFullYear(),isFinite(t.rawmonth)?t.month:t.date.getMonth()+1,0).getDate()>=t.day)&&e}(a,r))&&function(t,e){var n=!0;if(e.min){if(t.rawyear){var i=t.rawyear.replace(/[^0-9]/g,"");n=e.min.year.substr(0,i.length)<=i}t.year===t.rawyear&&e.min.date.getTime()==e.min.date.getTime()&&(n=e.min.date.getTime()<=t.date.getTime())}return n&&e.max&&e.max.date.getTime()==e.max.date.getTime()&&(n=e.max.date.getTime()>=t.date.getTime()),n}(a,i)),e&&r&&n.pos!==e?{buffer:o(i.inputFormat,a,i),refreshFromBuffer:{start:e,end:n.pos}}:r},onKeyDown:function(n,i,o,s){if(n.ctrlKey&&n.keyCode===t.keyCode.RIGHT){for(var l,u=new Date,c="";l=r(s).exec(s.inputFormat);)"d"===l[0].charAt(0)?c+=a(u.getDate(),l[0].length):"m"===l[0].charAt(0)?c+=a(u.getMonth()+1,l[0].length):"yyyy"===l[0]?c+=u.getFullYear().toString():"y"===l[0].charAt(0)&&(c+=a(u.getYear(),l[0].length));this.inputmask._valueSet(c),e(this).trigger("setvalue")}},onUnMask:function(t,e,n){return o(n.outputFormat,s(t,n.inputFormat,n),n,!0)},casing:function(t,e,n,i){return 0==e.nativeDef.indexOf("[ap]")?t.toLowerCase():0==e.nativeDef.indexOf("[AP]")?t.toUpperCase():t},insertMode:!1,shiftPositions:!1}}),t}),function(t){"function"==typeof define&&define.amd?define(["./inputmask"],t):"object"==typeof exports?module.exports=t(require("./inputmask")):t(window.Inputmask)}(function(t){var e=t.dependencyLib;function n(e,n){for(var i="",r=0;r<e.length;r++)t.prototype.definitions[e.charAt(r)]||n.definitions[e.charAt(r)]||n.optionalmarker.start===e.charAt(r)||n.optionalmarker.end===e.charAt(r)||n.quantifiermarker.start===e.charAt(r)||n.quantifiermarker.end===e.charAt(r)||n.groupmarker.start===e.charAt(r)||n.groupmarker.end===e.charAt(r)||n.alternatormarker===e.charAt(r)?i+="\\"+e.charAt(r):i+=e.charAt(r);return i}return t.extendAliases({numeric:{mask:function(t){if(0!==t.repeat&&isNaN(t.integerDigits)&&(t.integerDigits=t.repeat),t.repeat=0,t.groupSeparator===t.radixPoint&&t.digits&&"0"!==t.digits&&("."===t.radixPoint?t.groupSeparator=",":","===t.radixPoint?t.groupSeparator=".":t.groupSeparator="")," "===t.groupSeparator&&(t.skipOptionalPartCharacter=void 0),t.autoGroup=t.autoGroup&&""!==t.groupSeparator,t.autoGroup&&("string"==typeof t.groupSize&&isFinite(t.groupSize)&&(t.groupSize=parseInt(t.groupSize)),isFinite(t.integerDigits))){var e=Math.floor(t.integerDigits/t.groupSize),i=t.integerDigits%t.groupSize;t.integerDigits=parseInt(t.integerDigits)+(0===i?e-1:e),t.integerDigits<1&&(t.integerDigits="*")}t.placeholder.length>1&&(t.placeholder=t.placeholder.charAt(0)),"radixFocus"===t.positionCaretOnClick&&""===t.placeholder&&!1===t.integerOptional&&(t.positionCaretOnClick="lvp"),t.definitions[";"]=t.definitions["~"],t.definitions[";"].definitionSymbol="~",!0===t.numericInput&&(t.positionCaretOnClick="radixFocus"===t.positionCaretOnClick?"lvp":t.positionCaretOnClick,t.digitsOptional=!1,isNaN(t.digits)&&(t.digits=2),t.decimalProtect=!1);var r="[+]";if(r+=n(t.prefix,t),!0===t.integerOptional?r+="~{1,"+t.integerDigits+"}":r+="~{"+t.integerDigits+"}",void 0!==t.digits){var o=t.decimalProtect?":":t.radixPoint,a=t.digits.toString().split(",");isFinite(a[0])&&a[1]&&isFinite(a[1])?r+=o+";{"+t.digits+"}":(isNaN(t.digits)||parseInt(t.digits)>0)&&(t.digitsOptional?r+="["+o+";{1,"+t.digits+"}]":r+=o+";{"+t.digits+"}")}return r+=n(t.suffix,t),r+="[-]",t.greedy=!1,r},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputType:"text",inputmode:"numeric",preValidation:function(t,n,i,r,o,a){if("-"===i||i===o.negationSymbol.front)return!0===o.allowMinus&&(o.isNegative=void 0===o.isNegative||!o.isNegative,""===t.join("")||{caret:a.validPositions[n]?n:void 0,dopost:!0});if(!1===r&&i===o.radixPoint&&void 0!==o.digits&&(isNaN(o.digits)||parseInt(o.digits)>0)){var s=e.inArray(o.radixPoint,t);if(-1!==s&&void 0!==a.validPositions[s])return!0===o.numericInput?n===s:{caret:s+1}}return!0},postValidation:function(n,i,r,o){var a=o.suffix.split(""),s=o.prefix.split("");if(void 0===r.pos&&void 0!==r.caret&&!0!==r.dopost)return r;var l=void 0!==r.caret?r.caret:r.pos,u=n.slice();o.numericInput&&(l=u.length-l-1,u=u.reverse());var c=u[l];if(c===o.groupSeparator&&(c=u[l+=1]),l===u.length-o.suffix.length-1&&c===o.radixPoint)return r;void 0!==c&&c!==o.radixPoint&&c!==o.negationSymbol.front&&c!==o.negationSymbol.back&&(u[l]="?",o.prefix.length>0&&l>=(!1===o.isNegative?1:0)&&l<o.prefix.length-1+(!1===o.isNegative?1:0)?s[l-(!1===o.isNegative?1:0)]="?":o.suffix.length>0&&l>=u.length-o.suffix.length-(!1===o.isNegative?1:0)&&(a[l-(u.length-o.suffix.length-(!1===o.isNegative?1:0))]="?")),s=s.join(""),a=a.join("");var d=u.join("").replace(s,"");if(d=(d=(d=(d=d.replace(a,"")).replace(new RegExp(t.escapeRegex(o.groupSeparator),"g"),"")).replace(new RegExp("[-"+t.escapeRegex(o.negationSymbol.front)+"]","g"),"")).replace(new RegExp(t.escapeRegex(o.negationSymbol.back)+"$"),""),isNaN(o.placeholder)&&(d=d.replace(new RegExp(t.escapeRegex(o.placeholder),"g"),"")),d.length>1&&1!==d.indexOf(o.radixPoint)&&("0"===c&&(d=d.replace(/^\?/g,"")),d=d.replace(/^0/g,"")),d.charAt(0)===o.radixPoint&&""!==o.radixPoint&&!0!==o.numericInput&&(d="0"+d),""!==d){if(d=d.split(""),(!o.digitsOptional||o.enforceDigitsOnBlur&&"blur"===r.event)&&isFinite(o.digits)){var f=e.inArray(o.radixPoint,d),h=e.inArray(o.radixPoint,u);-1===f&&(d.push(o.radixPoint),f=d.length-1);for(var p=1;p<=o.digits;p++)o.digitsOptional&&(!o.enforceDigitsOnBlur||"blur"!==r.event)||void 0!==d[f+p]&&d[f+p]!==o.placeholder.charAt(0)?-1!==h&&void 0!==u[h+p]&&(d[f+p]=d[f+p]||u[h+p]):d[f+p]=r.placeholder||o.placeholder.charAt(0)}if(!0!==o.autoGroup||""===o.groupSeparator||c===o.radixPoint&&void 0===r.pos&&!r.dopost)d=d.join("");else{var v=d[d.length-1]===o.radixPoint&&r.c===o.radixPoint;d=t(function(t,e){var n="";if(n+="("+e.groupSeparator+"*{"+e.groupSize+"}){*}",""!==e.radixPoint){var i=t.join("").split(e.radixPoint);i[1]&&(n+=e.radixPoint+"*{"+i[1].match(/^\d*\??\d*/)[0].length+"}")}return n}(d,o),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(d.join("")),v&&(d+=o.radixPoint),d.charAt(0)===o.groupSeparator&&d.substr(1)}}if(o.isNegative&&"blur"===r.event&&(o.isNegative="0"!==d),d=s+d,d+=a,o.isNegative&&(d=o.negationSymbol.front+d,d+=o.negationSymbol.back),d=d.split(""),void 0!==c)if(c!==o.radixPoint&&c!==o.negationSymbol.front&&c!==o.negationSymbol.back)(l=e.inArray("?",d))>-1?d[l]=c:l=r.caret||0;else if(c===o.radixPoint||c===o.negationSymbol.front||c===o.negationSymbol.back){var m=e.inArray(c,d);-1!==m&&(l=m)}o.numericInput&&(l=d.length-l-1,d=d.reverse());var g={caret:void 0!==c&&void 0===r.pos||void 0===l?l:l+(o.numericInput?-1:1),buffer:d,refreshFromBuffer:r.dopost||n.join("")!==d.join("")};return g.refreshFromBuffer?g:r},onBeforeWrite:function(n,i,r,o){if(n)switch(n.type){case"keydown":return o.postValidation(i,r,{caret:r,dopost:!0},o);case"blur":case"checkval":var a;if(function(e){void 0===e.parseMinMaxOptions&&(null!==e.min&&(e.min=e.min.toString().replace(new RegExp(t.escapeRegex(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.min=e.min.replace(e.radixPoint,".")),e.min=isFinite(e.min)?parseFloat(e.min):NaN,isNaN(e.min)&&(e.min=Number.MIN_VALUE)),null!==e.max&&(e.max=e.max.toString().replace(new RegExp(t.escapeRegex(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.max=e.max.replace(e.radixPoint,".")),e.max=isFinite(e.max)?parseFloat(e.max):NaN,isNaN(e.max)&&(e.max=Number.MAX_VALUE)),e.parseMinMaxOptions="done")}(o),null!==o.min||null!==o.max){if(a=o.onUnMask(i.join(""),void 0,e.extend({},o,{unmaskAsNumber:!0})),null!==o.min&&a<o.min)return o.isNegative=o.min<0,o.postValidation(o.min.toString().replace(".",o.radixPoint).split(""),r,{caret:r,dopost:!0,placeholder:"0"},o);if(null!==o.max&&a>o.max)return o.isNegative=o.max<0,o.postValidation(o.max.toString().replace(".",o.radixPoint).split(""),r,{caret:r,dopost:!0,placeholder:"0"},o)}return o.postValidation(i,r,{caret:r,placeholder:"0",event:"blur"},o);case"_checkval":return{caret:r}}},regex:{integerPart:function(e,n){return n?new RegExp("["+t.escapeRegex(e.negationSymbol.front)+"+]?"):new RegExp("["+t.escapeRegex(e.negationSymbol.front)+"+]?\\d+")},integerNPart:function(e){return new RegExp("[\\d"+t.escapeRegex(e.groupSeparator)+t.escapeRegex(e.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(e,n,i,r,o,a){var s;if("k"===e||"m"===e){s={insert:[],c:0};for(var l=0,u="k"===e?2:5;l<u;l++)s.insert.push({pos:i+l,c:0});return s.pos=i+u,s}if(!0===(s=r?new RegExp("[0-9"+t.escapeRegex(o.groupSeparator)+"]").test(e):new RegExp("[0-9]").test(e))){if(!0!==o.numericInput&&void 0!==n.validPositions[i]&&"~"===n.validPositions[i].match.def&&!a){var c=n.buffer.join(""),d=(c=(c=c.replace(new RegExp("[-"+t.escapeRegex(o.negationSymbol.front)+"]","g"),"")).replace(new RegExp(t.escapeRegex(o.negationSymbol.back)+"$"),"")).split(o.radixPoint);d.length>1&&(d[1]=d[1].replace(/0/g,o.placeholder.charAt(0))),"0"===d[0]&&(d[0]=d[0].replace(/0/g,o.placeholder.charAt(0))),c=d[0]+o.radixPoint+d[1]||"";var f=n._buffer.join("");for(c===o.radixPoint&&(c=f);null===c.match(t.escapeRegex(f)+"$");)f=f.slice(1);s=void 0===(c=(c=c.replace(f,"")).split(""))[i]?{pos:i,remove:i}:{pos:i}}}else r||e!==o.radixPoint||void 0!==n.validPositions[i-1]||(s={insert:{pos:i,c:0},pos:i+1});return s},cardinality:1},"+":{validator:function(t,e,n,i,r){return r.allowMinus&&("-"===t||t===r.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(t,e,n,i,r){return r.allowMinus&&t===r.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(e,n,i,r,o){var a="["+t.escapeRegex(o.radixPoint)+"]",s=new RegExp(a).test(e);return s&&n.validPositions[i]&&n.validPositions[i].match.placeholder===o.radixPoint&&(s={caret:i+1}),s},cardinality:1,placeholder:function(t){return t.radixPoint}}},onUnMask:function(e,n,i){if(""===n&&!0===i.nullable)return n;var r=e.replace(i.prefix,"");return r=(r=r.replace(i.suffix,"")).replace(new RegExp(t.escapeRegex(i.groupSeparator),"g"),""),""!==i.placeholder.charAt(0)&&(r=r.replace(new RegExp(i.placeholder.charAt(0),"g"),"0")),i.unmaskAsNumber?(""!==i.radixPoint&&-1!==r.indexOf(i.radixPoint)&&(r=r.replace(t.escapeRegex.call(this,i.radixPoint),".")),r=(r=r.replace(new RegExp("^"+t.escapeRegex(i.negationSymbol.front)),"-")).replace(new RegExp(t.escapeRegex(i.negationSymbol.back)+"$"),""),Number(r)):r},isComplete:function(e,n){var i=(n.numericInput?e.slice().reverse():e).join("");return i=(i=(i=(i=(i=i.replace(new RegExp("^"+t.escapeRegex(n.negationSymbol.front)),"-")).replace(new RegExp(t.escapeRegex(n.negationSymbol.back)+"$"),"")).replace(n.prefix,"")).replace(n.suffix,"")).replace(new RegExp(t.escapeRegex(n.groupSeparator)+"([0-9]{3})","g"),"$1"),","===n.radixPoint&&(i=i.replace(t.escapeRegex(n.radixPoint),".")),isFinite(i)},onBeforeMask:function(n,i){i.isNegative=void 0;var r=i.radixPoint||",";"number"!=typeof n&&"number"!==i.inputType||""===r||(n=n.toString().replace(".",r));var o=n.split(r),a=o[0].replace(/[^\-0-9]/g,""),s=o.length>1?o[1].replace(/[^0-9]/g,""):"";n=a+(""!==s?r+s:s);var l=0;if(""!==r&&(l=s.length,""!==s)){var u=Math.pow(10,l||1);isFinite(i.digits)&&(l=parseInt(i.digits),u=Math.pow(10,l)),n=n.replace(t.escapeRegex(r),"."),isFinite(n)&&(n=Math.round(parseFloat(n)*u)/u),n=n.toString().replace(".",r)}return 0===i.digits&&-1!==n.indexOf(t.escapeRegex(r))&&(n=n.substring(0,n.indexOf(t.escapeRegex(r)))),function(t,n,i){if(n>0){var r=e.inArray(i.radixPoint,t);-1===r&&(t.push(i.radixPoint),r=t.length-1);for(var o=1;o<=n;o++)t[r+o]=t[r+o]||"0"}return t}(n.toString().split(""),l,i).join("")},onKeyDown:function(n,i,r,o){var a=e(this);if(n.ctrlKey)switch(n.keyCode){case t.keyCode.UP:a.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(o.step)),a.trigger("setvalue");break;case t.keyCode.DOWN:a.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(o.step)),a.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),t}),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";var t="14.6.2";function e(t){t.parentElement.removeChild(t)}function n(t){return null!=t}function i(t){t.preventDefault()}function r(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function o(t,e,n){n>0&&(u(t,e),setTimeout(function(){c(t,e)},n))}function a(t){return Math.max(Math.min(t,100),0)}function s(t){return Array.isArray(t)?t:[t]}function l(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function u(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function c(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function d(t){var e=void 0!==window.pageXOffset,n="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:n?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:n?t.documentElement.scrollTop:t.body.scrollTop}}function f(t,e){return 100/(e-t)}function h(t,e,n){return 100*e/(t[n+1]-t[n])}function p(t,e){for(var n=1;t>=e[n];)n+=1;return n}function v(t,e,n){if(n>=t.slice(-1)[0])return 100;var i=p(n,t),r=t[i-1],o=t[i],a=e[i-1],s=e[i];return a+function(t,e){return h(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}([r,o],n)/f(a,s)}function m(t,e,n,i){if(100===i)return i;var r=p(i,t),o=t[r-1],a=t[r];return n?i-o>(a-o)/2?a:o:e[r-1]?t[r-1]+function(t,e){return Math.round(t/e)*e}(i-t[r-1],e[r-1]):i}function g(e,n,i){var o;if("number"==typeof n&&(n=[n]),!Array.isArray(n))throw new Error("noUiSlider ("+t+"): 'range' contains invalid value.");if(!r(o="min"===e?0:"max"===e?100:parseFloat(e))||!r(n[0]))throw new Error("noUiSlider ("+t+"): 'range' value isn't numeric.");i.xPct.push(o),i.xVal.push(n[0]),o?i.xSteps.push(!isNaN(n[1])&&n[1]):isNaN(n[1])||(i.xSteps[0]=n[1]),i.xHighestCompleteStep.push(0)}function y(t,e,n){if(e)if(n.xVal[t]!==n.xVal[t+1]){n.xSteps[t]=h([n.xVal[t],n.xVal[t+1]],e,0)/f(n.xPct[t],n.xPct[t+1]);var i=(n.xVal[t+1]-n.xVal[t])/n.xNumSteps[t],r=Math.ceil(Number(i.toFixed(3))-1),o=n.xVal[t]+n.xNumSteps[t]*r;n.xHighestCompleteStep[t]=o}else n.xSteps[t]=n.xHighestCompleteStep[t]=n.xVal[t]}function b(t,e,n){var i;this.xPct=[],this.xVal=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var r=[];for(i in t)t.hasOwnProperty(i)&&r.push([t[i],i]);for(r.length&&"object"==typeof r[0][0]?r.sort(function(t,e){return t[0][0]-e[0][0]}):r.sort(function(t,e){return t[0]-e[0]}),i=0;i<r.length;i++)g(r[i][1],r[i][0],this);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)y(i,this.xNumSteps[i],this)}b.prototype.getDistance=function(e){var n,i=[];for(n=0;n<this.xNumSteps.length-1;n++){var r=this.xNumSteps[n];if(r&&e/r%1!=0)throw new Error("noUiSlider ("+t+"): 'limit', 'margin' and 'padding' of "+this.xPct[n]+"% range must be divisible by step.");i[n]=h(this.xVal,e,n)}return i},b.prototype.getAbsoluteDistance=function(t,e,n){var i,r=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[r+1];)r++;else t===this.xPct[this.xPct.length-1]&&(r=this.xPct.length-2);n||t!==this.xPct[r+1]||r++;var o=1,a=e[r],s=0,l=0,u=0,c=0;for(i=n?(t-this.xPct[r])/(this.xPct[r+1]-this.xPct[r]):(this.xPct[r+1]-t)/(this.xPct[r+1]-this.xPct[r]);a>0;)s=this.xPct[r+1+c]-this.xPct[r+c],e[r+c]*o+100-100*i>100?(l=s*i,o=(a-100*i)/e[r+c],i=1):(l=e[r+c]*s/100*o,o=0),n?(u-=l,this.xPct.length+c>=1&&c--):(u+=l,this.xPct.length-c>=1&&c++),a=e[r+c]*o;return t+u},b.prototype.toStepping=function(t){return t=v(this.xVal,this.xPct,t)},b.prototype.fromStepping=function(t){return function(t,e,n){if(n>=100)return t.slice(-1)[0];var i=p(n,e),r=t[i-1],o=t[i],a=e[i-1];return function(t,e){return e*(t[1]-t[0])/100+t[0]}([r,o],(n-a)*f(a,e[i]))}(this.xVal,this.xPct,t)},b.prototype.getStep=function(t){return t=m(this.xPct,this.xSteps,this.snap,t)},b.prototype.getDefaultStep=function(t,e,n){var i=p(t,this.xPct);return(100===t||e&&t===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/n},b.prototype.getNearbySteps=function(t){var e=p(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e],step:this.xNumSteps[e],highestStep:this.xHighestCompleteStep[e]}}},b.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(l);return Math.max.apply(null,t)},b.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var k={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number},w={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"};function x(e){if(function(t){return"object"==typeof t&&"function"==typeof t.to&&"function"==typeof t.from}(e))return!0;throw new Error("noUiSlider ("+t+"): 'format' requires 'to' and 'from' methods.")}function _(e,n){if(!r(n))throw new Error("noUiSlider ("+t+"): 'step' is not numeric.");e.singleStep=n}function E(e,n){if(!r(n))throw new Error("noUiSlider ("+t+"): 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=n}function S(e,n){if(!r(n))throw new Error("noUiSlider ("+t+"): 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=n}function O(e,n){if("object"!=typeof n||Array.isArray(n))throw new Error("noUiSlider ("+t+"): 'range' is not an object.");if(void 0===n.min||void 0===n.max)throw new Error("noUiSlider ("+t+"): Missing 'min' or 'max' in 'range'.");if(n.min===n.max)throw new Error("noUiSlider ("+t+"): 'range' 'min' and 'max' cannot be equal.");e.spectrum=new b(n,e.snap,e.singleStep)}function A(e,n){if(n=s(n),!Array.isArray(n)||!n.length)throw new Error("noUiSlider ("+t+"): 'start' option is incorrect.");e.handles=n.length,e.start=n}function C(e,n){if(e.snap=n,"boolean"!=typeof n)throw new Error("noUiSlider ("+t+"): 'snap' option must be a boolean.")}function T(e,n){if(e.animate=n,"boolean"!=typeof n)throw new Error("noUiSlider ("+t+"): 'animate' option must be a boolean.")}function P(e,n){if(e.animationDuration=n,"number"!=typeof n)throw new Error("noUiSlider ("+t+"): 'animationDuration' option must be a number.")}function N(e,n){var i,r=[!1];if("lower"===n?n=[!0,!1]:"upper"===n&&(n=[!1,!0]),!0===n||!1===n){for(i=1;i<e.handles;i++)r.push(n);r.push(!1)}else{if(!Array.isArray(n)||!n.length||n.length!==e.handles+1)throw new Error("noUiSlider ("+t+"): 'connect' option doesn't match handle count.");r=n}e.connect=r}function I(e,n){switch(n){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider ("+t+"): 'orientation' option is invalid.")}}function L(e,n){if(!r(n))throw new Error("noUiSlider ("+t+"): 'margin' option must be numeric.");0!==n&&(e.margin=e.spectrum.getDistance(n))}function M(e,n){if(!r(n))throw new Error("noUiSlider ("+t+"): 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(n),!e.limit||e.handles<2)throw new Error("noUiSlider ("+t+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function D(e,n){var i;if(!r(n)&&!Array.isArray(n))throw new Error("noUiSlider ("+t+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(n)&&2!==n.length&&!r(n[0])&&!r(n[1]))throw new Error("noUiSlider ("+t+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==n){for(Array.isArray(n)||(n=[n,n]),e.padding=[e.spectrum.getDistance(n[0]),e.spectrum.getDistance(n[1])],i=0;i<e.spectrum.xNumSteps.length-1;i++)if(e.padding[0][i]<0||e.padding[1][i]<0)throw new Error("noUiSlider ("+t+"): 'padding' option must be a positive number(s).");var o=n[0]+n[1],a=e.spectrum.xVal[0];if(o/(e.spectrum.xVal[e.spectrum.xVal.length-1]-a)>1)throw new Error("noUiSlider ("+t+"): 'padding' option must not exceed 100% of the range.")}}function j(e,n){switch(n){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider ("+t+"): 'direction' option was not recognized.")}}function R(e,n){if("string"!=typeof n)throw new Error("noUiSlider ("+t+"): 'behaviour' must be a string containing options.");var i=n.indexOf("tap")>=0,r=n.indexOf("drag")>=0,o=n.indexOf("fixed")>=0,a=n.indexOf("snap")>=0,s=n.indexOf("hover")>=0,l=n.indexOf("unconstrained")>=0;if(o){if(2!==e.handles)throw new Error("noUiSlider ("+t+"): 'fixed' behaviour must be used with 2 handles");L(e,e.start[1]-e.start[0])}if(l&&(e.margin||e.limit))throw new Error("noUiSlider ("+t+"): 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:i||a,drag:r,fixed:o,snap:a,hover:s,unconstrained:l}}function F(e,n){if(!1!==n)if(!0===n){e.tooltips=[];for(var i=0;i<e.handles;i++)e.tooltips.push(!0)}else{if(e.tooltips=s(n),e.tooltips.length!==e.handles)throw new Error("noUiSlider ("+t+"): 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 ("+t+"): 'tooltips' must be passed a formatter or 'false'.")})}}function $(t,e){t.ariaFormat=e,x(e)}function H(t,e){t.format=e,x(e)}function B(e,n){if(e.keyboardSupport=n,"boolean"!=typeof n)throw new Error("noUiSlider ("+t+"): 'keyboardSupport' option must be a boolean.")}function q(t,e){t.documentElement=e}function z(e,n){if("string"!=typeof n&&!1!==n)throw new Error("noUiSlider ("+t+"): 'cssPrefix' must be a string or `false`.");e.cssPrefix=n}function U(e,n){if("object"!=typeof n)throw new Error("noUiSlider ("+t+"): 'cssClasses' must be an object.");if("string"==typeof e.cssPrefix)for(var i in e.cssClasses={},n)n.hasOwnProperty(i)&&(e.cssClasses[i]=e.cssPrefix+n[i]);else e.cssClasses=n}function V(e){var i={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:k,format:k},r={step:{r:!1,t:_},keyboardPageMultiplier:{r:!1,t:E},keyboardDefaultStep:{r:!1,t:S},start:{r:!0,t:A},connect:{r:!0,t:N},direction:{r:!0,t:j},snap:{r:!1,t:C},animate:{r:!1,t:T},animationDuration:{r:!1,t:P},range:{r:!0,t:O},orientation:{r:!1,t:I},margin:{r:!1,t:L},limit:{r:!1,t:M},padding:{r:!1,t:D},behaviour:{r:!0,t:R},ariaFormat:{r:!1,t:$},format:{r:!1,t:H},tooltips:{r:!1,t:F},keyboardSupport:{r:!0,t:B},documentElement:{r:!1,t:q},cssPrefix:{r:!0,t:z},cssClasses:{r:!0,t:U}},o={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:w,keyboardPageMultiplier:5,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(r).forEach(function(a){if(!n(e[a])&&void 0===o[a]){if(r[a].r)throw new Error("noUiSlider ("+t+"): '"+a+"' is required.");return!0}r[a].t(i,n(e[a])?e[a]:o[a])}),i.pips=e.pips;var a=document.createElement("div"),s=void 0!==a.style.msTransform,l=void 0!==a.style.transform;i.transformRule=l?"transform":s?"msTransform":"webkitTransform";return i.style=[["left","top"],["right","bottom"]][i.dir][i.ort],i}function K(n,r,l){var f,h,p,v,m,g,y,b,k=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"},w=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}(),x=n,_=r.spectrum,E=[],S=[],O=[],A=0,C={},T=n.ownerDocument,P=r.documentElement||T.documentElement,N=T.body,I=-1,L=0,M=1,D=2,j="rtl"===T.dir||1===r.ort?0:100;function R(t,e){var n=T.createElement("div");return e&&u(n,e),t.appendChild(n),n}function F(t,e){var n=R(t,r.cssClasses.origin),i=R(n,r.cssClasses.handle);return R(i,r.cssClasses.touchArea),i.setAttribute("data-handle",e),r.keyboardSupport&&(i.setAttribute("tabindex","0"),i.addEventListener("keydown",function(t){return function(t,e){if(B()||q(e))return!1;var n=["Left","Right"],i=["Down","Up"],o=["PageDown","PageUp"],a=["Home","End"];r.dir&&!r.ort?n.reverse():r.ort&&!r.dir&&(i.reverse(),o.reverse());var s,l=t.key.replace("Arrow",""),u=l===o[0],c=l===o[1],d=l===i[0]||l===n[0]||u,f=l===i[1]||l===n[1]||c,h=l===a[0],p=l===a[1];if(!(d||f||h||p))return!0;if(t.preventDefault(),f||d){var v=r.keyboardPageMultiplier,m=d?0:1,g=gt(e),y=g[m];if(null===y)return!1;!1===y&&(y=_.getDefaultStep(S[e],d,r.keyboardDefaultStep)),(c||u)&&(y*=v),y=Math.max(y,1e-7),y*=d?-1:1,s=E[e]+y}else s=p?r.spectrum.xVal[r.spectrum.xVal.length-1]:r.spectrum.xVal[0];return ft(e,_.toStepping(s),!0,!0),at("slide",e),at("update",e),at("change",e),at("set",e),!1}(t,e)})),i.setAttribute("role","slider"),i.setAttribute("aria-orientation",r.ort?"vertical":"horizontal"),0===e?u(i,r.cssClasses.handleLower):e===r.handles-1&&u(i,r.cssClasses.handleUpper),n}function $(t,e){return!!e&&R(t,r.cssClasses.connect)}function H(t,e){return!!r.tooltips[e]&&R(t.firstChild,r.cssClasses.tooltip)}function B(){return x.hasAttribute("disabled")}function q(t){return h[t].hasAttribute("disabled")}function z(){m&&(ot("update.tooltips"),m.forEach(function(t){t&&e(t)}),m=null)}function U(){z(),m=h.map(H),rt("update.tooltips",function(t,e,n){if(m[e]){var i=t[e];!0!==r.tooltips[e]&&(i=r.tooltips[e].to(n[e])),m[e].innerHTML=i}})}function K(t,e,n){var i=T.createElement("div"),o=[];o[L]=r.cssClasses.valueNormal,o[M]=r.cssClasses.valueLarge,o[D]=r.cssClasses.valueSub;var a=[];a[L]=r.cssClasses.markerNormal,a[M]=r.cssClasses.markerLarge,a[D]=r.cssClasses.markerSub;var s=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],l=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];function c(t,e){var n=e===r.cssClasses.value,i=n?o:a;return e+" "+(n?s:l)[r.ort]+" "+i[t]}return u(i,r.cssClasses.pips),u(i,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(t).forEach(function(o){!function(t,o,a){if((a=e?e(o,a):a)!==I){var s=R(i,!1);s.className=c(a,r.cssClasses.marker),s.style[r.style]=t+"%",a>L&&((s=R(i,!1)).className=c(a,r.cssClasses.value),s.setAttribute("data-value",o),s.style[r.style]=t+"%",s.innerHTML=n.to(o))}}(o,t[o][0],t[o][1])}),i}function W(){v&&(e(v),v=null)}function G(e){W();var n=e.mode,i=e.density||1,r=e.filter||!1,o=function(e,n,i){if("range"===e||"steps"===e)return _.xVal;if("count"===e){if(n<2)throw new Error("noUiSlider ("+t+"): 'values' (>= 2) required for mode 'count'.");var r=n-1,o=100/r;for(n=[];r--;)n[r]=r*o;n.push(100),e="positions"}return"positions"===e?n.map(function(t){return _.fromStepping(i?_.getStep(t):t)}):"values"===e?i?n.map(function(t){return _.fromStepping(_.getStep(_.toStepping(t)))}):n:void 0}(n,e.values||!1,e.stepped||!1),a=function(t,e,n){var i,r={},o=_.xVal[0],a=_.xVal[_.xVal.length-1],s=!1,l=!1,u=0;return i=n.slice().sort(function(t,e){return t-e}),(n=i.filter(function(t){return!this[t]&&(this[t]=!0)},{}))[0]!==o&&(n.unshift(o),s=!0),n[n.length-1]!==a&&(n.push(a),l=!0),n.forEach(function(i,o){var a,c,d,f,h,p,v,m,g,y,b=i,k=n[o+1],w="steps"===e;if(w&&(a=_.xNumSteps[o]),a||(a=k-b),!1!==b)for(void 0===k&&(k=b),a=Math.max(a,1e-7),c=b;c<=k;c=(c+a).toFixed(7)/1){for(m=(h=(f=_.toStepping(c))-u)/t,y=h/(g=Math.round(m)),d=1;d<=g;d+=1)r[(p=u+d*y).toFixed(5)]=[_.fromStepping(p),0];v=n.indexOf(c)>-1?M:w?D:L,!o&&s&&c!==k&&(v=0),c===k&&l||(r[f.toFixed(5)]=[c,v]),u=f}}),r}(i,n,o),s=e.format||{to:Math.round};return v=x.appendChild(K(a,r,s))}function Y(){var t=f.getBoundingClientRect(),e="offset"+["Width","Height"][r.ort];return 0===r.ort?t.width||f[e]:t.height||f[e]}function Z(t,e,n,i){var o=function(o){return!!(o=function(t,e,n){var i,r,o=0===t.type.indexOf("touch"),a=0===t.type.indexOf("mouse"),s=0===t.type.indexOf("pointer");0===t.type.indexOf("MSPointer")&&(s=!0);if("mousedown"===t.type&&!t.buttons&&!t.touches)return!1;if(o){var l=function(t){return t.target===n||n.contains(t.target)||t.target.shadowRoot&&t.target.shadowRoot.contains(n)};if("touchstart"===t.type){var u=Array.prototype.filter.call(t.touches,l);if(u.length>1)return!1;i=u[0].pageX,r=u[0].pageY}else{var c=Array.prototype.find.call(t.changedTouches,l);if(!c)return!1;i=c.pageX,r=c.pageY}}e=e||d(T),(a||s)&&(i=t.clientX+e.x,r=t.clientY+e.y);return t.pageOffset=e,t.points=[i,r],t.cursor=a||s,t}(o,i.pageOffset,i.target||e))&&(!(B()&&!i.doNotReject)&&(a=x,s=r.cssClasses.tap,!((a.classList?a.classList.contains(s):new RegExp("\\b"+s+"\\b").test(a.className))&&!i.doNotReject)&&(!(t===k.start&&void 0!==o.buttons&&o.buttons>1)&&((!i.hover||!o.buttons)&&(w||o.preventDefault(),o.calcPoint=o.points[r.ort],void n(o,i))))));var a,s},a=[];return t.split(" ").forEach(function(t){e.addEventListener(t,o,!!w&&{passive:!0}),a.push([t,o])}),a}function X(t){var e,n,i,o,s,l,u=100*(t-(e=f,n=r.ort,i=e.getBoundingClientRect(),o=e.ownerDocument,s=o.documentElement,l=d(o),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(l.x=0),n?i.top+l.y-s.clientTop:i.left+l.x-s.clientLeft))/Y();return u=a(u),r.dir?100-u:u}function Q(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&tt(t,e)}function J(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return tt(t,e);var n=(r.dir?-1:1)*(t.calcPoint-e.startCalcPoint);ut(n>0,100*n/e.baseSize,e.locations,e.handleNumbers)}function tt(t,e){e.handle&&(c(e.handle,r.cssClasses.active),A-=1),e.listeners.forEach(function(t){P.removeEventListener(t[0],t[1])}),0===A&&(c(x,r.cssClasses.drag),dt(),t.cursor&&(N.style.cursor="",N.removeEventListener("selectstart",i))),e.handleNumbers.forEach(function(t){at("change",t),at("set",t),at("end",t)})}function et(t,e){if(e.handleNumbers.some(q))return!1;var n;1===e.handleNumbers.length&&(n=h[e.handleNumbers[0]].children[0],A+=1,u(n,r.cssClasses.active));t.stopPropagation();var o=[],a=Z(k.move,P,J,{target:t.target,handle:n,listeners:o,startCalcPoint:t.calcPoint,baseSize:Y(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:S.slice()}),s=Z(k.end,P,tt,{target:t.target,handle:n,listeners:o,doNotReject:!0,handleNumbers:e.handleNumbers}),l=Z("mouseout",P,Q,{target:t.target,handle:n,listeners:o,doNotReject:!0,handleNumbers:e.handleNumbers});o.push.apply(o,a.concat(s,l)),t.cursor&&(N.style.cursor=getComputedStyle(t.target).cursor,h.length>1&&u(x,r.cssClasses.drag),N.addEventListener("selectstart",i,!1)),e.handleNumbers.forEach(function(t){at("start",t)})}function nt(t){t.stopPropagation();var e=X(t.calcPoint),n=function(t){var e=100,n=!1;return h.forEach(function(i,r){if(!q(r)){var o=S[r],a=Math.abs(o-t);(a<e||a<=e&&t>o||100===a&&100===e)&&(n=r,e=a)}}),n}(e);if(!1===n)return!1;r.events.snap||o(x,r.cssClasses.tap,r.animationDuration),ft(n,e,!0,!0),dt(),at("slide",n,!0),at("update",n,!0),at("change",n,!0),at("set",n,!0),r.events.snap&&et(t,{handleNumbers:[n]})}function it(t){var e=X(t.calcPoint),n=_.getStep(e),i=_.fromStepping(n);Object.keys(C).forEach(function(t){"hover"===t.split(".")[0]&&C[t].forEach(function(t){t.call(g,i)})})}function rt(t,e){C[t]=C[t]||[],C[t].push(e),"update"===t.split(".")[0]&&h.forEach(function(t,e){at("update",e)})}function ot(t){var e=t&&t.split(".")[0],n=e&&t.substring(e.length);Object.keys(C).forEach(function(t){var i=t.split(".")[0],r=t.substring(i.length);e&&e!==i||n&&n!==r||delete C[t]})}function at(t,e,n){Object.keys(C).forEach(function(i){var o=i.split(".")[0];t===o&&C[i].forEach(function(t){t.call(g,E.map(r.format.to),e,E.slice(),n||!1,S.slice(),g)})})}function st(t,e,n,i,o,s){var l;return h.length>1&&!r.events.unconstrained&&(i&&e>0&&(l=_.getAbsoluteDistance(t[e-1],r.margin,0),n=Math.max(n,l)),o&&e<h.length-1&&(l=_.getAbsoluteDistance(t[e+1],r.margin,1),n=Math.min(n,l))),h.length>1&&r.limit&&(i&&e>0&&(l=_.getAbsoluteDistance(t[e-1],r.limit,0),n=Math.min(n,l)),o&&e<h.length-1&&(l=_.getAbsoluteDistance(t[e+1],r.limit,1),n=Math.max(n,l))),r.padding&&(0===e&&(l=_.getAbsoluteDistance(0,r.padding[0],0),n=Math.max(n,l)),e===h.length-1&&(l=_.getAbsoluteDistance(100,r.padding[1],1),n=Math.min(n,l))),!((n=a(n=_.getStep(n)))===t[e]&&!s)&&n}function lt(t,e){var n=r.ort;return(n?e:t)+", "+(n?t:e)}function ut(t,e,n,i){var r=n.slice(),o=[!t,t],a=[t,!t];i=i.slice(),t&&i.reverse(),i.length>1?i.forEach(function(t,n){var i=st(r,t,r[t]+e,o[n],a[n],!1);!1===i?e=0:(e=i-r[t],r[t]=i)}):o=a=[!0];var s=!1;i.forEach(function(t,i){s=ft(t,n[t]+e,o[i],a[i])||s}),s&&i.forEach(function(t){at("update",t),at("slide",t)})}function ct(t,e){return r.dir?100-t-e:t}function dt(){O.forEach(function(t){var e=S[t]>50?-1:1,n=3+(h.length+e*t);h[t].style.zIndex=n})}function ft(t,e,n,i,o){return o||(e=st(S,t,e,n,i,!1)),!1!==e&&(function(t,e){S[t]=e,E[t]=_.fromStepping(e);var n="translate("+lt(10*(ct(e,0)-j)+"%","0")+")";h[t].style[r.transformRule]=n,ht(t),ht(t+1)}(t,e),!0)}function ht(t){if(p[t]){var e=0,n=100;0!==t&&(e=S[t-1]),t!==p.length-1&&(n=S[t]);var i=n-e,o="translate("+lt(ct(e,i)+"%","0")+")",a="scale("+lt(i/100,"1")+")";p[t].style[r.transformRule]=o+" "+a}}function pt(t,e){return null===t||!1===t||void 0===t?S[e]:("number"==typeof t&&(t=String(t)),t=r.format.from(t),!1===(t=_.toStepping(t))||isNaN(t)?S[e]:t)}function vt(t,e,n){var i=s(t),a=void 0===S[0];e=void 0===e||!!e,r.animate&&!a&&o(x,r.cssClasses.tap,r.animationDuration),O.forEach(function(t){ft(t,pt(i[t],t),!0,!1,n)});for(var l=1===O.length?0:1;l<O.length;++l)O.forEach(function(t){ft(t,S[t],!0,!0,n)});dt(),O.forEach(function(t){at("update",t),null!==i[t]&&e&&at("set",t)})}function mt(){var t=E.map(r.format.to);return 1===t.length?t[0]:t}function gt(t){var e=S[t],n=_.getNearbySteps(e),i=E[t],o=n.thisStep.step,a=null;if(r.snap)return[i-n.stepBefore.startValue||null,n.stepAfter.startValue-i||null];!1!==o&&i+o>n.stepAfter.startValue&&(o=n.stepAfter.startValue-i),a=i>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&i-n.stepBefore.highestStep,100===e?o=null:0===e&&(a=null);var s=_.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,o]}return u(y=x,r.cssClasses.target),0===r.dir?u(y,r.cssClasses.ltr):u(y,r.cssClasses.rtl),0===r.ort?u(y,r.cssClasses.horizontal):u(y,r.cssClasses.vertical),u(y,"rtl"===getComputedStyle(y).direction?r.cssClasses.textDirectionRtl:r.cssClasses.textDirectionLtr),f=R(y,r.cssClasses.base),function(t,e){var n=R(e,r.cssClasses.connects);h=[],(p=[]).push($(n,t[0]));for(var i=0;i<r.handles;i++)h.push(F(e,i)),O[i]=i,p.push($(n,t[i+1]))}(r.connect,f),(b=r.events).fixed||h.forEach(function(t,e){Z(k.start,t.children[0],et,{handleNumbers:[e]})}),b.tap&&Z(k.start,f,nt,{}),b.hover&&Z(k.move,f,it,{hover:!0}),b.drag&&p.forEach(function(t,e){if(!1!==t&&0!==e&&e!==p.length-1){var n=h[e-1],i=h[e],o=[t];u(t,r.cssClasses.draggable),b.fixed&&(o.push(n.children[0]),o.push(i.children[0])),o.forEach(function(t){Z(k.start,t,et,{handles:[n,i],handleNumbers:[e-1,e]})})}}),vt(r.start),r.pips&&G(r.pips),r.tooltips&&U(),rt("update",function(t,e,n,i,o){O.forEach(function(t){var e=h[t],i=st(S,t,0,!0,!0,!0),a=st(S,t,100,!0,!0,!0),s=o[t],l=r.ariaFormat.to(n[t]);i=_.fromStepping(i).toFixed(1),a=_.fromStepping(a).toFixed(1),s=_.fromStepping(s).toFixed(1),e.children[0].setAttribute("aria-valuemin",i),e.children[0].setAttribute("aria-valuemax",a),e.children[0].setAttribute("aria-valuenow",s),e.children[0].setAttribute("aria-valuetext",l)})}),g={destroy:function(){for(var t in r.cssClasses)r.cssClasses.hasOwnProperty(t)&&c(x,r.cssClasses[t]);for(;x.firstChild;)x.removeChild(x.firstChild);delete x.noUiSlider},steps:function(){return O.map(gt)},on:rt,off:ot,get:mt,set:vt,setHandle:function(e,n,i,r){if(!((e=Number(e))>=0&&e<O.length))throw new Error("noUiSlider ("+t+"): invalid handle number, got: "+e);ft(e,pt(n,e),!0,!0,r),at("update",e),i&&at("set",e)},reset:function(t){vt(r.start,t)},__moveHandles:function(t,e,n){ut(t,e,S,n)},options:l,updateOptions:function(t,e){var n=mt(),i=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];i.forEach(function(e){void 0!==t[e]&&(l[e]=t[e])});var o=V(l);i.forEach(function(e){void 0!==t[e]&&(r[e]=o[e])}),_=o.spectrum,r.margin=o.margin,r.limit=o.limit,r.padding=o.padding,r.pips?G(r.pips):W(),r.tooltips?U():z(),S=[],vt(t.start||n,e)},target:x,removePips:W,removeTooltips:z,getTooltips:function(){return m},getOrigins:function(){return h},pips:G}}return{__spectrum:b,version:t,cssClasses:w,create:function(e,n){if(!e||!e.nodeName)throw new Error("noUiSlider ("+t+"): create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider ("+t+"): Slider was already initialized.");var i=K(e,V(n),n);return e.noUiSlider=i,i}}}),function(t,e){if("function"==typeof define&&define.amd)define(["module","exports"],e);else if("undefined"!=typeof exports)e(module,exports);else{var n={exports:{}};e(n,n.exports),t.autosize=n.exports}}(this,function(t,e){"use strict";var n,i,r="function"==typeof Map?new Map:(n=[],i=[],{has:function(t){return n.indexOf(t)>-1},get:function(t){return i[n.indexOf(t)]},set:function(t,e){-1===n.indexOf(t)&&(n.push(t),i.push(e))},delete:function(t){var e=n.indexOf(t);e>-1&&(n.splice(e,1),i.splice(e,1))}}),o=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(t){o=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}function a(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!r.has(t)){var e,n=null,i=null,a=null,s=function(){t.clientWidth!==i&&d()},l=function(e){window.removeEventListener("resize",s,!1),t.removeEventListener("input",d,!1),t.removeEventListener("keyup",d,!1),t.removeEventListener("autosize:destroy",l,!1),t.removeEventListener("autosize:update",d,!1),Object.keys(e).forEach(function(n){t.style[n]=e[n]}),r.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",l,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",d,!1),window.addEventListener("resize",s,!1),t.addEventListener("input",d,!1),t.addEventListener("autosize:update",d,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",r.set(t,{destroy:l,update:d}),"vertical"===(e=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),d()}function u(e){var n=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=n,t.style.overflowY=e}function c(){if(0!==t.scrollHeight){var e=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}(t),r=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+n+"px",i=t.clientWidth,e.forEach(function(t){t.node.scrollTop=t.scrollTop}),r&&(document.documentElement.scrollTop=r)}}function d(){c();var e=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),i="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):t.offsetHeight;if(i<e?"hidden"===n.overflowY&&(u("scroll"),c(),i="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==n.overflowY&&(u("hidden"),c(),i="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),a!==i){a=i;var r=o("autosize:resized");try{t.dispatchEvent(r)}catch(t){}}}}function s(t){var e=r.get(t);e&&e.destroy()}function l(t){var e=r.get(t);e&&e.update()}var u=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((u=function(t){return t}).destroy=function(t){return t},u.update=function(t){return t}):((u=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return a(t)}),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],s),t},u.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],l),t}),e.default=u,t.exports=e.default}),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={},t.m=e=[function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var i=window.getSelection(),r=document.createRange();r.selectNodeContents(t),i.removeAllRanges(),i.addRange(r),e=i.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var i=this.e||(this.e={});return(i[t]||(i[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var i=this;function r(){i.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),i=0,r=n.length;i<r;i++)n[i].fn.apply(n[i].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),i=n[t],r=[];if(i&&e)for(var o=0,a=i.length;o<a;o++)i[o].fn!==e&&i[o].fn._!==e&&r.push(i[o]);return r.length?n[t]=r:delete n[t],this}},t.exports=n,t.exports.TinyEmitter=n},function(t,e,n){var i=n(3),r=n(4);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!i.string(e))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(t))return f=e,h=n,(d=t).addEventListener(f,h),{destroy:function(){d.removeEventListener(f,h)}};if(i.nodeList(t))return l=t,u=e,c=n,Array.prototype.forEach.call(l,function(t){t.addEventListener(u,c)}),{destroy:function(){Array.prototype.forEach.call(l,function(t){t.removeEventListener(u,c)})}};if(i.string(t))return o=t,a=e,s=n,r(document.body,o,a,s);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,a,s,l,u,c,d,f,h}},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var i=n(5);function r(t,e,n,r,o){var a=function(t,e,n,r){return function(n){n.delegateTarget=i(n.target,e),n.delegateTarget&&r.call(t,n)}}.apply(this,arguments);return t.addEventListener(n,a,o),{destroy:function(){t.removeEventListener(n,a,o)}}}t.exports=function(t,e,n,i,o){return"function"==typeof t.addEventListener?r.apply(null,arguments):"function"==typeof n?r.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return r(t,e,n,i,o)}))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},function(t,e,n){"use strict";n.r(e);var i=n(0),r=n.n(i),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function a(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t){!function(t,e){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")}(this),this.resolveOptions(t),this.initSelection()}var l=(function(t,e,n){e&&a(t.prototype,e)}(s,[{key:"resolveOptions",value:function(t){var e=0<arguments.length&&void 0!==t?t:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=r()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=r()(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(t){var e=0<arguments.length&&void 0!==t?t:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":o(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),s),u=n(1),c=n.n(u),d=n(2),f=n.n(d),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function p(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var v=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(m,c.a),function(t,e,n){e&&p(t.prototype,e),n&&p(t,n)}(m,[{key:"resolveOptions",value:function(t){var e=0<arguments.length&&void 0!==t?t:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===h(e.container)?e.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=f()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return g("action",t)}},{key:"defaultTarget",value:function(t){var e=g("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return g("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(t){var e=0<arguments.length&&void 0!==t?t:["copy","cut"],n="string"==typeof e?[e]:e,i=!!document.queryCommandSupported;return n.forEach(function(t){i=i&&!!document.queryCommandSupported(t)}),i}}]),m);function m(t,e){!function(t,e){if(!(t instanceof m))throw new TypeError("Cannot call a class as a function")}(this);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(m.__proto__||Object.getPrototypeOf(m)).call(this));return n.resolveOptions(e),n.listenClick(t),n}function g(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}e.default=v}],t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__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 r in e)t.d(i,r,function(t){return e[t]}.bind(null,r));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(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=6).default;function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e,n});var Emitter=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"on",value:function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this}},{key:"emit",value:function(t){this._callbacks=this._callbacks||{};var e=this._callbacks[t];if(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];var o,a=_createForOfIteratorHelper(e);try{for(a.s();!(o=a.n()).done;){o.value.apply(this,i)}}catch(t){a.e(t)}finally{a.f()}}return this}},{key:"off",value:function(t,e){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1===arguments.length)return delete this._callbacks[t],this;for(var i=0;i<n.length;i++){if(n[i]===e){n.splice(i,1);break}}return this}}]),t}(),Dropzone=function(t){_inherits(n,Emitter);var e=_createSuper(n);function n(t,i){var r,o,a;if(_classCallCheck(this,n),(r=e.call(this)).element=t,r.version=n.version,r.defaultOptions.previewTemplate=r.defaultOptions.previewTemplate.replace(/\n*/g,""),r.clickableElements=[],r.listeners=[],r.files=[],"string"==typeof r.element&&(r.element=document.querySelector(r.element)),!r.element||null==r.element.nodeType)throw new Error("Invalid dropzone element.");if(r.element.dropzone)throw new Error("Dropzone already attached.");n.instances.push(_assertThisInitialized(r)),r.element.dropzone=_assertThisInitialized(r);var s=null!=(a=n.optionsForElement(r.element))?a:{};if(r.options=n.extend({},r.defaultOptions,s,null!=i?i:{}),r.options.forceFallback||!n.isBrowserSupported())return _possibleConstructorReturn(r,r.options.fallback.call(_assertThisInitialized(r)));if(null==r.options.url&&(r.options.url=r.element.getAttribute("action")),!r.options.url)throw new Error("No URL provided.");if(r.options.acceptedFiles&&r.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(r.options.uploadMultiple&&r.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return r.options.acceptedMimeTypes&&(r.options.acceptedFiles=r.options.acceptedMimeTypes,delete r.options.acceptedMimeTypes),null!=r.options.renameFilename&&(r.options.renameFile=function(t){return r.options.renameFilename.call(_assertThisInitialized(r),t.name,t)}),"string"==typeof r.options.method&&(r.options.method=r.options.method.toUpperCase()),(o=r.getExistingFallback())&&o.parentNode&&o.parentNode.removeChild(o),!1!==r.options.previewsContainer&&(r.options.previewsContainer?r.previewsContainer=n.getElement(r.options.previewsContainer,"previewsContainer"):r.previewsContainer=r.element),r.options.clickable&&(!0===r.options.clickable?r.clickableElements=[r.element]:r.clickableElements=n.getElements(r.options.clickable,"clickable")),r.init(),r}return _createClass(n,null,[{key:"initClass",value:function(){this.prototype.Emitter=Emitter,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,timeout:3e4,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(t,e,n){if(n)return{dzuuid:n.file.upload.uuid,dzchunkindex:n.index,dztotalfilesize:n.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:n.file.upload.totalChunkCount,dzchunkbyteoffset:n.index*this.options.chunkSize}},accept:function(t,e){return e()},chunksUploaded:function(t,e){e()},fallback:function(){var t;this.element.className="".concat(this.element.className," dz-browser-not-supported");var e,i=_createForOfIteratorHelper(this.element.getElementsByTagName("div"));try{for(i.s();!(e=i.n()).done;){var r=e.value;if(/(^| )dz-message($| )/.test(r.className)){t=r,r.className="dz-message";break}}}catch(t){i.e(t)}finally{i.f()}t||(t=n.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(t));var o=t.getElementsByTagName("span")[0];return o&&(null!=o.textContent?o.textContent=this.options.dictFallbackMessage:null!=o.innerText&&(o.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t,e,n,i){var r={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},o=t.width/t.height;null==e&&null==n?(e=r.srcWidth,n=r.srcHeight):null==e?e=n*o:null==n&&(n=e/o);var a=(e=Math.min(e,r.srcWidth))/(n=Math.min(n,r.srcHeight));if(r.srcWidth>e||r.srcHeight>n)if("crop"===i)o>a?(r.srcHeight=t.height,r.srcWidth=r.srcHeight*a):(r.srcWidth=t.width,r.srcHeight=r.srcWidth/a);else{if("contain"!==i)throw new Error("Unknown resizeMethod '".concat(i,"'"));o>a?n=e/o:e=n*o}return r.srcX=(t.width-r.srcWidth)/2,r.srcY=(t.height-r.srcHeight)/2,r.trgWidth=e,r.trgHeight=n,r},transformFile:function(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:'<div class="dz-preview dz-file-preview">\n  <div class="dz-image"><img data-dz-thumbnail /></div>\n  <div class="dz-details">\n    <div class="dz-size"><span data-dz-size></span></div>\n    <div class="dz-filename"><span data-dz-name></span></div>\n  </div>\n  <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n  <div class="dz-error-message"><span data-dz-errormessage></span></div>\n  <div class="dz-success-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n      <title>Check</title>\n      <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n        <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path>\n      </g>\n    </svg>\n  </div>\n  <div class="dz-error-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n      <title>Error</title>\n      <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n        <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">\n          <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path>\n        </g>\n      </g>\n    </svg>\n  </div>\n</div>',drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:function(t){},dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:function(t){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var e=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){t.previewElement=n.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement);var i,r=_createForOfIteratorHelper(t.previewElement.querySelectorAll("[data-dz-name]"));try{for(r.s();!(i=r.n()).done;){var o=i.value;o.textContent=t.name}}catch(t){r.e(t)}finally{r.f()}var a,s=_createForOfIteratorHelper(t.previewElement.querySelectorAll("[data-dz-size]"));try{for(s.s();!(a=s.n()).done;)(o=a.value).innerHTML=this.filesize(t.size)}catch(t){s.e(t)}finally{s.f()}this.options.addRemoveLinks&&(t._removeLink=n.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),t.previewElement.appendChild(t._removeLink));var l,u=function(i){return i.preventDefault(),i.stopPropagation(),t.status===n.UPLOADING?n.confirm(e.options.dictCancelUploadConfirmation,function(){return e.removeFile(t)}):e.options.dictRemoveFileConfirmation?n.confirm(e.options.dictRemoveFileConfirmation,function(){return e.removeFile(t)}):e.removeFile(t)},c=_createForOfIteratorHelper(t.previewElement.querySelectorAll("[data-dz-remove]"));try{for(c.s();!(l=c.n()).done;){l.value.addEventListener("click",u)}}catch(t){c.e(t)}finally{c.f()}}},removedfile:function(t){return null!=t.previewElement&&null!=t.previewElement.parentNode&&t.previewElement.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){if(t.previewElement){t.previewElement.classList.remove("dz-file-preview");var n,i=_createForOfIteratorHelper(t.previewElement.querySelectorAll("[data-dz-thumbnail]"));try{for(i.s();!(n=i.n()).done;){var r=n.value;r.alt=t.name,r.src=e}}catch(t){i.e(t)}finally{i.f()}return setTimeout(function(){return t.previewElement.classList.add("dz-image-preview")},1)}},error:function(t,e){if(t.previewElement){t.previewElement.classList.add("dz-error"),"string"!=typeof e&&e.error&&(e=e.error);var n,i=_createForOfIteratorHelper(t.previewElement.querySelectorAll("[data-dz-errormessage]"));try{for(i.s();!(n=i.n()).done;){n.value.textContent=e}}catch(t){i.e(t)}finally{i.f()}}},errormultiple:function(){},processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(t,e,n){if(t.previewElement){var i,r=_createForOfIteratorHelper(t.previewElement.querySelectorAll("[data-dz-uploadprogress]"));try{for(r.s();!(i=r.n()).done;){var o=i.value;"PROGRESS"===o.nodeName?o.value=e:o.style.width="".concat(e,"%")}}catch(t){r.e(t)}finally{r.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(t){return this.emit("error",t,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(t){if(t._removeLink&&(t._removeLink.innerHTML=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];for(var r=0,o=n;r<o.length;r++){var a=o[r];for(var s in a){var l=a[s];t[s]=l}}return t}}]),_createClass(n,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(t){return t.accepted}).map(function(t){return t})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(t){return!t.accepted}).map(function(t){return t})}},{key:"getFilesWithStatus",value:function(t){return this.files.filter(function(e){return e.status===t}).map(function(t){return t})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(n.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(n.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(n.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(t){return t.status===n.UPLOADING||t.status===n.QUEUED}).map(function(t){return t})}},{key:"init",value:function(){var t=this;if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(n.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){!function e(){return t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null===t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!==t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!==t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",n.getElement(t.options.hiddenInputContainer,"hiddenInputContainer").appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",function(){var n=t.hiddenFileInput.files;if(n.length){var i,r=_createForOfIteratorHelper(n);try{for(r.s();!(i=r.n()).done;){var o=i.value;t.addFile(o)}}catch(t){r.e(t)}finally{r.f()}}return t.emit("addedfiles",n),e()})}()}this.URL=null!==window.URL?window.URL:window.webkitURL;var e,i=_createForOfIteratorHelper(this.events);try{for(i.s();!(e=i.n()).done;){var r=e.value;this.on(r,this.options[r])}}catch(t){i.e(t)}finally{i.f()}this.on("uploadprogress",function(){return t.updateTotalUploadProgress()}),this.on("removedfile",function(){return t.updateTotalUploadProgress()}),this.on("canceled",function(e){return t.emit("complete",e)}),this.on("complete",function(e){if(0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout(function(){return t.emit("queuecomplete")},0)});var o=function(t){if(function(t){if(t.dataTransfer.types)for(var e=0;e<t.dataTransfer.types.length;e++)if("Files"===t.dataTransfer.types[e])return!0;return!1}(t))return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(e){return t.emit("dragstart",e)},dragenter:function(e){return o(e),t.emit("dragenter",e)},dragover:function(e){var n;try{n=e.dataTransfer.effectAllowed}catch(t){}return e.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",o(e),t.emit("dragover",e)},dragleave:function(e){return t.emit("dragleave",e)},drop:function(e){return o(e),t.drop(e)},dragend:function(e){return t.emit("dragend",e)}}}],this.clickableElements.forEach(function(e){return t.listeners.push({element:e,events:{click:function(i){return(e!==t.element||i.target===t.element||n.elementInside(i.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,n.instances.splice(n.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var t,e=0,n=0;if(this.getActiveFiles().length){var i,r=_createForOfIteratorHelper(this.getActiveFiles());try{for(r.s();!(i=r.n()).done;){var o=i.value;e+=o.upload.bytesSent,n+=o.upload.total}}catch(t){r.e(t)}finally{r.f()}t=100*e/n}else t=100;return this.emit("totaluploadprogress",t,n,e)}},{key:"_getParamName",value:function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(t,"]"):"")}},{key:"_renameFile",value:function(t){return"function"!=typeof this.options.renameFile?t.name:this.options.renameFile(t)}},{key:"getFallbackForm",value:function(){var t,e;if(t=this.getExistingFallback())return t;var i='<div class="dz-fallback">';this.options.dictFallbackText&&(i+="<p>".concat(this.options.dictFallbackText,"</p>")),i+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var r=n.createElement(i);return"FORM"!==this.element.tagName?(e=n.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>'))).appendChild(r):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:r}},{key:"getExistingFallback",value:function(){for(var t=function(t){var e,n=_createForOfIteratorHelper(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(/(^| )fallback($| )/.test(i.className))return i}}catch(t){n.e(t)}finally{n.f()}},e=0,n=["div","form"];e<n.length;e++){var i,r=n[e];if(i=t(this.element.getElementsByTagName(r)))return i}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(t){return function(){var e=[];for(var n in t.events){var i=t.events[n];e.push(t.element.addEventListener(n,i,!1))}return e}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(t){return function(){var e=[];for(var n in t.events){var i=t.events[n];e.push(t.element.removeEventListener(n,i,!1))}return e}()})}},{key:"disable",value:function(){var t=this;return this.clickableElements.forEach(function(t){return t.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(e){return t.cancelUpload(e)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(t){return t.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(t){var e=0,n="b";if(t>0){for(var i=["tb","gb","mb","kb","b"],r=0;r<i.length;r++){var o=i[r];if(t>=Math.pow(this.options.filesizeBase,4-r)/10){e=t/Math.pow(this.options.filesizeBase,4-r),n=o;break}}e=Math.round(10*e)/10}return"<strong>".concat(e,"</strong> ").concat(this.options.dictFileSizeUnits[n])}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(t){if(t.dataTransfer){this.emit("drop",t);for(var e=[],n=0;n<t.dataTransfer.files.length;n++)e[n]=t.dataTransfer.files[n];if(e.length){var i=t.dataTransfer.items;i&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(e)}this.emit("addedfiles",e)}}},{key:"paste",value:function(t){if(null!=__guard__(null!=t?t.clipboardData:void 0,function(t){return t.items})){this.emit("paste",t);var e=t.clipboardData.items;return e.length?this._addFilesFromItems(e):void 0}}},{key:"handleFiles",value:function(t){var e,n=_createForOfIteratorHelper(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;this.addFile(i)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_addFilesFromItems",value:function(t){var e=this;return function(){var n,i=[],r=_createForOfIteratorHelper(t);try{for(r.s();!(n=r.n()).done;){var o,a=n.value;null!=a.webkitGetAsEntry&&(o=a.webkitGetAsEntry())?o.isFile?i.push(e.addFile(a.getAsFile())):o.isDirectory?i.push(e._addFilesFromDirectory(o,o.name)):i.push(void 0):null!=a.getAsFile&&(null==a.kind||"file"===a.kind)?i.push(e.addFile(a.getAsFile())):i.push(void 0)}}catch(t){r.e(t)}finally{r.f()}return i}()}},{key:"_addFilesFromDirectory",value:function(t,e){var n=this,i=t.createReader(),r=function(t){return __guardMethod__(console,"log",function(e){return e.log(t)})};return function t(){return i.readEntries(function(i){if(i.length>0){var r,o=_createForOfIteratorHelper(i);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.isFile?a.file(function(t){if(!n.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath="".concat(e,"/").concat(t.name),n.addFile(t)}):a.isDirectory&&n._addFilesFromDirectory(a,"".concat(e,"/").concat(a.name))}}catch(t){o.e(t)}finally{o.f()}t()}return null},r)}()}},{key:"accept",value:function(t,e){this.options.maxFilesize&&t.size>1024*this.options.maxFilesize*1024?e(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):n.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,e):e(this.options.dictInvalidFileType)}},{key:"addFile",value:function(t){var e=this;t.upload={uuid:n.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=n.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,function(n){n?(t.accepted=!1,e._errorProcessing([t],n)):(t.accepted=!0,e.options.autoQueue&&e.enqueueFile(t)),e._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(t){var e,n=_createForOfIteratorHelper(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;this.enqueueFile(i)}}catch(t){n.e(t)}finally{n.f()}return null}},{key:"enqueueFile",value:function(t){var e=this;if(t.status!==n.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=n.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return e.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(t){var e=this;if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout(function(){return e._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var t=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(n){return t.emit("thumbnail",e,n),t._processingThumbnail=!1,t._processThumbnailQueue()})}}},{key:"removeFile",value:function(t){if(t.status===n.UPLOADING&&this.cancelUpload(t),this.files=without(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(t){null==t&&(t=!1);var e,i=_createForOfIteratorHelper(this.files.slice());try{for(i.s();!(e=i.n()).done;){var r=e.value;(r.status!==n.UPLOADING||t)&&this.removeFile(r)}}catch(t){i.e(t)}finally{i.f()}return null}},{key:"resizeImage",value:function(t,e,i,r,o){var a=this;return this.createThumbnail(t,e,i,r,!0,function(e,i){if(null==i)return o(t);var r=a.options.resizeMimeType;null==r&&(r=t.type);var s=i.toDataURL(r,a.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(s=ExifRestore.restore(t.dataURL,s)),o(n.dataURItoBlob(s))})}},{key:"createThumbnail",value:function(t,e,n,i,r,o){var a=this,s=new FileReader;s.onload=function(){t.dataURL=s.result,"image/svg+xml"!==t.type?a.createThumbnailFromUrl(t,e,n,i,r,o):null!=o&&o(s.result)},s.readAsDataURL(t)}},{key:"displayExistingFile",value:function(t,e,n,i){var r=this,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this.emit("addedfile",t),this.emit("complete",t),o){t.dataURL=e,this.createThumbnailFromUrl(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,function(e){r.emit("thumbnail",t,e),n&&n()},i)}else this.emit("thumbnail",t,e),n&&n()}},{key:"createThumbnailFromUrl",value:function(t,e,n,i,r,o,a){var s=this,l=document.createElement("img");return a&&(l.crossOrigin=a),r="from-image"!=getComputedStyle(document.body).imageOrientation&&r,l.onload=function(){var a=function(t){return t(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(a=function(t){return EXIF.getData(l,function(){return t(EXIF.getTag(this,"Orientation"))})}),a(function(r){t.width=l.width,t.height=l.height;var a=s.options.resize.call(s,t,e,n,i),u=document.createElement("canvas"),c=u.getContext("2d");switch(u.width=a.trgWidth,u.height=a.trgHeight,r>4&&(u.width=a.trgHeight,u.height=a.trgWidth),r){case 2:c.translate(u.width,0),c.scale(-1,1);break;case 3:c.translate(u.width,u.height),c.rotate(Math.PI);break;case 4:c.translate(0,u.height),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-u.width);break;case 7:c.rotate(.5*Math.PI),c.translate(u.height,-u.width),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-u.height,0)}drawImageIOSFix(c,l,null!=a.srcX?a.srcX:0,null!=a.srcY?a.srcY:0,a.srcWidth,a.srcHeight,null!=a.trgX?a.trgX:0,null!=a.trgY?a.trgY:0,a.trgWidth,a.trgHeight);var d=u.toDataURL("image/png");if(null!=o)return o(d,u)})},null!=o&&(l.onerror=o),l.src=t.dataURL}},{key:"processQueue",value:function(){var t=this.options.parallelUploads,e=this.getUploadingFiles().length,n=e;if(!(e>=t)){var i=this.getQueuedFiles();if(i.length>0){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,t-e));for(;n<t;){if(!i.length)return;this.processFile(i.shift()),n++}}}}},{key:"processFile",value:function(t){return this.processFiles([t])}},{key:"processFiles",value:function(t){var e,i=_createForOfIteratorHelper(t);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.processing=!0,r.status=n.UPLOADING,this.emit("processing",r)}}catch(t){i.e(t)}finally{i.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)}},{key:"_getFilesWithXhr",value:function(t){return this.files.filter(function(e){return e.xhr===t}).map(function(t){return t})}},{key:"cancelUpload",value:function(t){if(t.status===n.UPLOADING){var e,i=this._getFilesWithXhr(t.xhr),r=_createForOfIteratorHelper(i);try{for(r.s();!(e=r.n()).done;){e.value.status=n.CANCELED}}catch(t){r.e(t)}finally{r.f()}void 0!==t.xhr&&t.xhr.abort();var o,a=_createForOfIteratorHelper(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;this.emit("canceled",s)}}catch(t){a.e(t)}finally{a.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else t.status!==n.ADDED&&t.status!==n.QUEUED||(t.status=n.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(t){if("function"==typeof t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return t.apply(this,n)}return t}},{key:"uploadFile",value:function(t){return this.uploadFiles([t])}},{key:"uploadFiles",value:function(t){var e=this;this._transformFiles(t,function(i){if(e.options.chunking){var r=i[0];t[0].upload.chunked=e.options.chunking&&(e.options.forceChunking||r.size>e.options.chunkSize),t[0].upload.totalChunkCount=Math.ceil(r.size/e.options.chunkSize)}if(t[0].upload.chunked){var o=t[0],a=i[0];o.upload.chunks=[];var s=function(){for(var i=0;void 0!==o.upload.chunks[i];)i++;if(!(i>=o.upload.totalChunkCount)){0;var r=i*e.options.chunkSize,s=Math.min(r+e.options.chunkSize,a.size),l={name:e._getParamName(0),data:a.webkitSlice?a.webkitSlice(r,s):a.slice(r,s),filename:o.upload.filename,chunkIndex:i};o.upload.chunks[i]={file:o,index:i,dataBlock:l,status:n.UPLOADING,progress:0,retries:0},e._uploadData(t,[l])}};if(o.upload.finishedChunkUpload=function(i){var r=!0;i.status=n.SUCCESS,i.dataBlock=null,i.xhr=null;for(var a=0;a<o.upload.totalChunkCount;a++){if(void 0===o.upload.chunks[a])return s();o.upload.chunks[a].status!==n.SUCCESS&&(r=!1)}r&&e.options.chunksUploaded(o,function(){e._finished(t,"",null)})},e.options.parallelChunkUploads)for(var l=0;l<o.upload.totalChunkCount;l++)s();else s()}else{for(var u=[],c=0;c<t.length;c++)u[c]={name:e._getParamName(c),data:i[c],filename:t[c].upload.filename};e._uploadData(t,u)}})}},{key:"_getChunk",value:function(t,e){for(var n=0;n<t.upload.totalChunkCount;n++)if(void 0!==t.upload.chunks[n]&&t.upload.chunks[n].xhr===e)return t.upload.chunks[n]}},{key:"_uploadData",value:function(t,e){var i,r=this,o=new XMLHttpRequest,a=_createForOfIteratorHelper(t);try{for(a.s();!(i=a.n()).done;){i.value.xhr=o}}catch(t){a.e(t)}finally{a.f()}t[0].upload.chunked&&(t[0].upload.chunks[e[0].chunkIndex].xhr=o);var s=this.resolveOption(this.options.method,t),l=this.resolveOption(this.options.url,t);o.open(s,l,!0),o.timeout=this.resolveOption(this.options.timeout,t),o.withCredentials=!!this.options.withCredentials,o.onload=function(e){r._finishedUploading(t,o,e)},o.ontimeout=function(){r._handleUploadError(t,o,"Request timedout after ".concat(r.options.timeout/1e3," seconds"))},o.onerror=function(){r._handleUploadError(t,o)},(null!=o.upload?o.upload:o).onprogress=function(e){return r._updateFilesUploadProgress(t,o,e)};var u={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var c in this.options.headers&&n.extend(u,this.options.headers),u){var d=u[c];d&&o.setRequestHeader(c,d)}var f=new FormData;if(this.options.params){var h=this.options.params;for(var p in"function"==typeof h&&(h=h.call(this,t,o,t[0].upload.chunked?this._getChunk(t[0],o):null)),h){var v=h[p];if(Array.isArray(v))for(var m=0;m<v.length;m++)f.append(p,v[m]);else f.append(p,v)}}var g,y=_createForOfIteratorHelper(t);try{for(y.s();!(g=y.n()).done;){var b=g.value;this.emit("sending",b,o,f)}}catch(t){y.e(t)}finally{y.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",t,o,f),this._addFormElementData(f);for(var k=0;k<e.length;k++){var w=e[k];f.append(w.name,w.data,w.filename)}this.submitRequest(o,f,t)}},{key:"_transformFiles",value:function(t,e){for(var n=this,i=[],r=0,o=function(o){n.options.transformFile.call(n,t[o],function(n){i[o]=n,++r===t.length&&e(i)})},a=0;a<t.length;a++)o(a)}},{key:"_addFormElementData",value:function(t){if("FORM"===this.element.tagName){var e,n=_createForOfIteratorHelper(this.element.querySelectorAll("input, textarea, select, button"));try{for(n.s();!(e=n.n()).done;){var i=e.value,r=i.getAttribute("name"),o=i.getAttribute("type");if(o&&(o=o.toLowerCase()),null!=r)if("SELECT"===i.tagName&&i.hasAttribute("multiple")){var a,s=_createForOfIteratorHelper(i.options);try{for(s.s();!(a=s.n()).done;){var l=a.value;l.selected&&t.append(r,l.value)}}catch(t){s.e(t)}finally{s.f()}}else(!o||"checkbox"!==o&&"radio"!==o||i.checked)&&t.append(r,i.value)}}catch(t){n.e(t)}finally{n.f()}}}},{key:"_updateFilesUploadProgress",value:function(t,e,n){var i;if(void 0!==n){if(i=100*n.loaded/n.total,t[0].upload.chunked){var r=t[0],o=this._getChunk(r,e);o.progress=i,o.total=n.total,o.bytesSent=n.loaded;r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var a=0;a<r.upload.totalChunkCount;a++)void 0!==r.upload.chunks[a]&&void 0!==r.upload.chunks[a].progress&&(r.upload.progress+=r.upload.chunks[a].progress,r.upload.total+=r.upload.chunks[a].total,r.upload.bytesSent+=r.upload.chunks[a].bytesSent);r.upload.progress=r.upload.progress/r.upload.totalChunkCount}else{var s,l=_createForOfIteratorHelper(t);try{for(l.s();!(s=l.n()).done;){var u=s.value;u.upload.progress=i,u.upload.total=n.total,u.upload.bytesSent=n.loaded}}catch(t){l.e(t)}finally{l.f()}}var c,d=_createForOfIteratorHelper(t);try{for(d.s();!(c=d.n()).done;){var f=c.value;this.emit("uploadprogress",f,f.upload.progress,f.upload.bytesSent)}}catch(t){d.e(t)}finally{d.f()}}else{var h=!0;i=100;var p,v=_createForOfIteratorHelper(t);try{for(v.s();!(p=v.n()).done;){var m=p.value;100===m.upload.progress&&m.upload.bytesSent===m.upload.total||(h=!1),m.upload.progress=i,m.upload.bytesSent=m.upload.total}}catch(t){v.e(t)}finally{v.f()}if(h)return;var g,y=_createForOfIteratorHelper(t);try{for(y.s();!(g=y.n()).done;){var b=g.value;this.emit("uploadprogress",b,i,b.upload.bytesSent)}}catch(t){y.e(t)}finally{y.f()}}}},{key:"_finishedUploading",value:function(t,e,i){var r;if(t[0].status!==n.CANCELED&&4===e.readyState){if("arraybuffer"!==e.responseType&&"blob"!==e.responseType&&(r=e.responseText,e.getResponseHeader("content-type")&&~e.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(t){i=t,r="Invalid JSON response from server."}this._updateFilesUploadProgress(t),200<=e.status&&e.status<300?t[0].upload.chunked?t[0].upload.finishedChunkUpload(this._getChunk(t[0],e)):this._finished(t,r,i):this._handleUploadError(t,e,r)}}},{key:"_handleUploadError",value:function(t,e,i){if(t[0].status!==n.CANCELED){if(t[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(t[0],e);if(r.retries++<this.options.retryChunksLimit)return void this._uploadData(t,[r.dataBlock]);console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(t,i||this.options.dictResponseError.replace("{{statusCode}}",e.status),e)}}},{key:"submitRequest",value:function(t,e,n){t.send(e)}},{key:"_finished",value:function(t,e,i){var r,o=_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.status=n.SUCCESS,this.emit("success",a,e,i),this.emit("complete",a)}}catch(t){o.e(t)}finally{o.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(t,e,i){var r,o=_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.status=n.ERROR,this.emit("error",a,e,i),this.emit("complete",a)}}catch(t){o.e(t)}finally{o.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}}]),n}();Dropzone.initClass(),Dropzone.version="5.7.2",Dropzone.options={},Dropzone.optionsForElement=function(t){return t.getAttribute("id")?Dropzone.options[camelize(t.getAttribute("id"))]:void 0},Dropzone.instances=[],Dropzone.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},Dropzone.autoDiscover=!0,Dropzone.discover=function(){var t;if(document.querySelectorAll)t=document.querySelectorAll(".dropzone");else{t=[];var e=function(e){return function(){var n,i=[],r=_createForOfIteratorHelper(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;/(^| )dropzone($| )/.test(o.className)?i.push(t.push(o)):i.push(void 0)}}catch(t){r.e(t)}finally{r.f()}return i}()};e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))}return function(){var e,n=[],i=_createForOfIteratorHelper(t);try{for(i.s();!(e=i.n()).done;){var r=e.value;!1!==Dropzone.optionsForElement(r)?n.push(new Dropzone(r)):n.push(void 0)}}catch(t){i.e(t)}finally{i.f()}return n}()},Dropzone.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],Dropzone.isBrowserSupported=function(){var t=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a")){var e,n=_createForOfIteratorHelper(Dropzone.blacklistedBrowsers);try{for(n.s();!(e=n.n()).done;){e.value.test(navigator.userAgent)&&(t=!1)}}catch(t){n.e(t)}finally{n.f()}}else t=!1;else t=!1;return t},Dropzone.dataURItoBlob=function(t){for(var e=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(e.length),r=new Uint8Array(i),o=0,a=e.length,s=0<=a;s?o<=a:o>=a;s?o++:o--)r[o]=e.charCodeAt(o);return new Blob([i],{type:n})};var without=function(t,e){return t.filter(function(t){return t!==e}).map(function(t){return t})},camelize=function(t){return t.replace(/[\-_](\w)/g,function(t){return t.charAt(1).toUpperCase()})};Dropzone.createElement=function(t){var e=document.createElement("div");return e.innerHTML=t,e.childNodes[0]},Dropzone.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},Dropzone.getElement=function(t,e){var n;if("string"==typeof t?n=document.querySelector(t):null!=t.nodeType&&(n=t),null==n)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector or a plain HTML element."));return n},Dropzone.getElements=function(t,e){var n,i;if(t instanceof Array){i=[];try{var r,o=_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;)n=r.value,i.push(this.getElement(n,e))}catch(t){o.e(t)}finally{o.f()}}catch(t){i=null}}else if("string"==typeof t){i=[];var a,s=_createForOfIteratorHelper(document.querySelectorAll(t));try{for(s.s();!(a=s.n()).done;)n=a.value,i.push(n)}catch(t){s.e(t)}finally{s.f()}}else null!=t.nodeType&&(i=[t]);if(null==i||!i.length)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return i},Dropzone.confirm=function(t,e,n){return window.confirm(t)?e():null!=n?n():void 0},Dropzone.isValidFile=function(t,e){if(!e)return!0;e=e.split(",");var n,i=t.type,r=i.replace(/\/.*$/,""),o=_createForOfIteratorHelper(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;if("."===(a=a.trim()).charAt(0)){if(-1!==t.name.toLowerCase().indexOf(a.toLowerCase(),t.name.length-a.length))return!0}else if(/\/\*$/.test(a)){if(r===a.replace(/\/.*$/,""))return!0}else if(i===a)return!0}}catch(t){o.e(t)}finally{o.f()}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(t){return this.each(function(){return new Dropzone(this,t)})}),"undefined"!=typeof module&&null!==module?module.exports=Dropzone:window.Dropzone=Dropzone,Dropzone.ADDED="added",Dropzone.QUEUED="queued",Dropzone.ACCEPTED=Dropzone.QUEUED,Dropzone.UPLOADING="uploading",Dropzone.PROCESSING=Dropzone.UPLOADING,Dropzone.CANCELED="canceled",Dropzone.ERROR="error",Dropzone.SUCCESS="success";var detectVerticalSquash=function(t){t.naturalWidth;var e=t.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=e;var i=n.getContext("2d");i.drawImage(t,0,0);for(var r=i.getImageData(1,0,1,e).data,o=0,a=e,s=e;s>o;){0===r[4*(s-1)+3]?a=s:o=s,s=a+o>>1}var l=s/e;return 0===l?1:l},drawImageIOSFix=function(t,e,n,i,r,o,a,s,l,u){var c=detectVerticalSquash(e);return t.drawImage(e,n,i,r,o,a,s,l,u/c)},ExifRestore=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(t){for(var e="",n=void 0,i=void 0,r="",o=void 0,a=void 0,s=void 0,l="",u=0;o=(n=t[u++])>>2,a=(3&n)<<4|(i=t[u++])>>4,s=(15&i)<<2|(r=t[u++])>>6,l=63&r,isNaN(i)?s=l=64:isNaN(r)&&(l=64),e=e+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(l),n=i=r="",o=a=s=l="",u<t.length;);return e}},{key:"restore",value:function(t,e){if(!t.match("data:image/jpeg;base64,"))return e;var n=this.decode64(t.replace("data:image/jpeg;base64,","")),i=this.slice2Segments(n),r=this.exifManipulation(e,i);return"data:image/jpeg;base64,".concat(this.encode64(r))}},{key:"exifManipulation",value:function(t,e){var n=this.getExifArray(e),i=this.insertExif(t,n);return new Uint8Array(i)}},{key:"getExifArray",value:function(t){for(var e=void 0,n=0;n<t.length;){if(255===(e=t[n])[0]&225===e[1])return e;n++}return[]}},{key:"insertExif",value:function(t,e){var n=t.replace("data:image/jpeg;base64,",""),i=this.decode64(n),r=i.indexOf(255,3),o=i.slice(0,r),a=i.slice(r),s=o;return s=(s=s.concat(e)).concat(a)}},{key:"slice2Segments",value:function(t){for(var e=0,n=[];;){if(255===t[e]&218===t[e+1])break;if(255===t[e]&216===t[e+1])e+=2;else{var i=e+(256*t[e+2]+t[e+3])+2,r=t.slice(e,i);n.push(r),e=i}if(e>t.length)break}return n}},{key:"decode64",value:function(t){var e=void 0,n=void 0,i="",r=void 0,o=void 0,a="",s=0,l=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(t)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");e=this.KEY_STR.indexOf(t.charAt(s++))<<2|(r=this.KEY_STR.indexOf(t.charAt(s++)))>>4,n=(15&r)<<4|(o=this.KEY_STR.indexOf(t.charAt(s++)))>>2,i=(3&o)<<6|(a=this.KEY_STR.indexOf(t.charAt(s++))),l.push(e),64!==o&&l.push(n),64!==a&&l.push(i),e=n=i="",r=o=a="",s<t.length;);return l}}]),t}();ExifRestore.initClass();var contentLoaded=function(t,e){var n=!1,i=!0,r=t.document,o=r.documentElement,a=r.addEventListener?"addEventListener":"attachEvent",s=r.addEventListener?"removeEventListener":"detachEvent",l=r.addEventListener?"":"on",u=function i(o){if("readystatechange"!==o.type||"complete"===r.readyState)return("load"===o.type?t:r)[s](l+o.type,i,!1),!n&&(n=!0)?e.call(t,o.type||o):void 0};if("complete"!==r.readyState){if(r.createEventObject&&o.doScroll){try{i=!t.frameElement}catch(t){}i&&function t(){try{o.doScroll("left")}catch(e){return void setTimeout(t,50)}return u("poll")}()}return r[a](l+"DOMContentLoaded",u,!1),r[a](l+"readystatechange",u,!1),t[a](l+"load",u,!1)}};function __guard__(t,e){return null!=t?e(t):void 0}function __guardMethod__(t,e,n){return null!=t&&"function"==typeof t[e]?n(t,e):void 0}Dropzone._autoDiscoverFunction=function(){if(Dropzone.autoDiscover)return Dropzone.discover()},contentLoaded(window,Dropzone._autoDiscoverFunction),Dropzone.autoDiscover=!1,function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Quill=e():t.Quill=e()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),r=n(18),o=n(19),a=n(45),s=n(46),l=n(47),u=n(48),c=n(49),d=n(12),f=n(32),h=n(33),p=n(31),v=n(1),m={Scope:v.Scope,create:v.create,find:v.find,query:v.query,register:v.register,Container:i.default,Format:r.default,Leaf:o.default,Embed:u.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:c.default,Attributor:{Attribute:d.default,Class:f.default,Style:h.default,Store:p.default}};e.default=m},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return r(e,t),e}(Error);e.ParchmentError=o;var a,s={},l={},u={},c={};function d(t,e){var n;if(void 0===e&&(e=a.ANY),"string"==typeof t)n=c[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&a.LEVEL&a.BLOCK?n=c.block:t&a.LEVEL&a.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var i=(t.getAttribute("class")||"").split(/\s+/);for(var r in i)if(n=l[i[r]])break;n=n||u[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=d(t);if(null==n)throw new o("Unable to create "+t+" blot");var i=n,r=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(e);return new i(r,e)},e.find=function t(n,i){return void 0===i&&(i=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:i?t(n.parentNode,i):null},e.query=d,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map(function(e){return t(e)});var i=e[0];if("string"!=typeof i.blotName&&"string"!=typeof i.attrName)throw new o("Invalid definition");if("abstract"===i.blotName)throw new o("Cannot register abstract class");c[i.blotName||i.attrName]=i,"string"==typeof i.keyName?s[i.keyName]=i:(null!=i.className&&(l[i.className]=i),null!=i.tagName&&(Array.isArray(i.tagName)?i.tagName=i.tagName.map(function(t){return t.toUpperCase()}):i.tagName=i.tagName.toUpperCase(),(Array.isArray(i.tagName)?i.tagName:[i.tagName]).forEach(function(t){null!=u[t]&&null!=i.className||(u[t]=i)})));return i}},function(t,e,n){var i=n(51),r=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),l=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(r(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach(function(i){(t(i)?e:n).push(i)}),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce(function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t},0)},l.prototype.length=function(){return this.reduce(function(t,e){return t+a.length(e)},0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],i=a.iterator(this.ops),r=0;r<e&&i.hasNext();){var o;r<t?o=i.next(t-r):(o=i.next(e-r),n.push(o)),r+=a.length(o)}return new l(n)},l.prototype.compose=function(t){var e=a.iterator(this.ops),n=a.iterator(t.ops),i=[],o=n.peek();if(null!=o&&"number"==typeof o.retain&&null==o.attributes){for(var s=o.retain;"insert"===e.peekType()&&e.peekLength()<=s;)s-=e.peekLength(),i.push(e.next());o.retain-s>0&&n.next(o.retain-s)}for(var u=new l(i);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),d=e.next(c),f=n.next(c);if("number"==typeof f.retain){var h={};"number"==typeof d.retain?h.retain=c:h.insert=d.insert;var p=a.attributes.compose(d.attributes,f.attributes,"number"==typeof d.retain);if(p&&(h.attributes=p),u.push(h),!n.hasNext()&&r(u.ops[u.ops.length-1],h)){var v=new l(e.rest());return u.concat(v).chop()}}else"number"==typeof f.delete&&"number"==typeof d.retain&&u.push(f)}return u.chop()},l.prototype.concat=function(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map(function(e){return e.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")}).join("")}),o=new l,u=i(n[0],n[1],e),c=a.iterator(this.ops),d=a.iterator(t.ops);return u.forEach(function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case i.INSERT:n=Math.min(d.peekLength(),e),o.push(d.next(n));break;case i.DELETE:n=Math.min(e,c.peekLength()),c.next(n),o.delete(n);break;case i.EQUAL:n=Math.min(c.peekLength(),d.peekLength(),e);var s=c.next(n),l=d.next(n);r(s.insert,l.insert)?o.retain(n,a.attributes.diff(s.attributes,l.attributes)):o.push(l).delete(n)}e-=n}}),o.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),i=new l,r=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(e,s)-s:-1;if(u<0)i.push(n.next());else if(u>0)i.push(n.next(u));else{if(!1===t(i,n.next(1).attributes||{},r))return;r+=1,i=new l}}i.length()>0&&t(i,{},r)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),i=a.iterator(t.ops),r=new l;n.hasNext()||i.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===i.peekType())if("insert"===i.peekType())r.push(i.next());else{var o=Math.min(n.peekLength(),i.peekLength()),s=n.next(o),u=i.next(o);if(s.delete)continue;u.delete?r.push(u):r.retain(o,a.attributes.transform(s.attributes,u.attributes,e))}else r.retain(a.length(n.next()));return r.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),i=0;n.hasNext()&&i<=t;){var r=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(i<t||!e)&&(t+=r),i+=r):t-=Math.min(r,t-i)}return t},t.exports=l},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===i.call(t)},s=function(t){if(!t||"[object Object]"!==i.call(t))return!1;var e,r=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!o)return!1;for(e in t);return void 0===e||n.call(t,e)},l=function(t,e){r&&"__proto__"===e.name?r(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},u=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(o)return o(t,e).value}return t[e]};t.exports=function t(){var e,n,i,r,o,c,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(e=arguments[f]))for(n in e)i=u(d,n),d!==(r=u(e,n))&&(p&&r&&(s(r)||(o=a(r)))?(o?(o=!1,c=i&&a(i)?i:[]):c=i&&s(i)?i:{},l(d,{name:n,newValue:t(p,c,r)})):void 0!==r&&l(d,{name:n,newValue:r}));return d}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=d(n(3)),a=d(n(2)),s=d(n(0)),l=d(n(16)),u=d(n(6)),c=d(n(7));function d(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var v=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,s.default.Embed),i(e,[{key:"attach",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new s.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new a.default).insert(this.value(),(0,o.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=s.default.query(t,s.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,i){this.format(n,i)}},{key:"insertAt",value:function(t,n,i){if("string"==typeof n&&n.endsWith("\n")){var o=s.default.create(m.blotName);this.parent.insertBefore(o,0===t?this:this.next),o.insertAt(0,n.slice(0,-1))}else r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i)}}]),e}();v.scope=s.default.Scope.BLOCK_BLOT;var m=function(t){function e(t){f(this,e);var n=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return p(e,s.default.Block),i(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(s.default.Leaf).reduce(function(t,e){return 0===e.length()?t:t.insert(e.value(),g(e))},new a.default).insert("\n",g(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,i,o){n<=0||(s.default.query(i,s.default.Scope.BLOCK)?t+n===this.length()&&this.format(i,o):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),i,o),this.cache={})}},{key:"insertAt",value:function(t,n,i){if(null!=i)return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);if(0!==n.length){var o=n.split("\n"),a=o.shift();a.length>0&&(t<this.length()-1||null==this.children.tail?r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var s=this;o.reduce(function(t,e){return(s=s.split(t,!0)).insertAt(0,e),e.length},t+a.length)}}},{key:"insertBefore",value:function(t,n){var i=this.children.head;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),i instanceof l.default&&i.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var i=this.clone();return 0===t?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}var o=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}();function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:g(t.parent,e))}m.blotName="block",m.tagName="P",m.defaultChild="break",m.allowedChildren=[u.default,s.default.Embed,c.default],e.bubbleFormats=g,e.BlockEmbed=v,e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();n(50);var a=m(n(2)),s=m(n(14)),l=m(n(8)),u=m(n(9)),c=m(n(0)),d=n(15),f=m(d),h=m(n(3)),p=m(n(10)),v=m(n(34));function m(t){return t&&t.__esModule?t:{default:t}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=(0,p.default)("quill"),b=function(){function t(e){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=k(e,i),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new f.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,function(t){t===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(l.default.events.SCROLL_UPDATE,function(t,e){var i=n.selection.lastRange,r=i&&0===i.length?i.index:void 0;w.call(n,function(){return n.editor.update(null,e,r)},t)});var o=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+r+"<p><br></p></div>");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),p.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&y.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var r=t.attrName||t.blotName;"string"==typeof r?this.register("formats/"+r,t,e):Object.keys(t).forEach(function(i){n.register(i,t[i],e)})}else null==this.imports[t]||i||y.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),o(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var i=this,o=x(t,e,n),a=r(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,function(){return i.editor.deleteText(t,e)},n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return w.call(this,function(){var i=n.getSelection(!0),r=new a.default;if(null==i)return r;if(c.default.query(t,c.default.Scope.BLOCK))r=n.editor.formatLine(i.index,i.length,g({},t,e));else{if(0===i.length)return n.selection.format(t,e),r;r=n.editor.formatText(i.index,i.length,g({},t,e))}return n.setSelection(i,l.default.sources.SILENT),r},i)}},{key:"formatLine",value:function(t,e,n,i,o){var a,s=this,l=x(t,e,n,i,o),u=r(l,4);return t=u[0],e=u[1],a=u[2],o=u[3],w.call(this,function(){return s.editor.formatLine(t,e,a)},o,t,0)}},{key:"formatText",value:function(t,e,n,i,o){var a,s=this,l=x(t,e,n,i,o),u=r(l,4);return t=u[0],e=u[1],a=u[2],o=u[3],w.call(this,function(){return s.editor.formatText(t,e,a)},o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var i=this.container.getBoundingClientRect();return{bottom:n.bottom-i.top,height:n.height,left:n.left-i.left,right:n.right-i.left,top:n.top-i.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=x(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=x(t,e),i=r(n,2);return t=i[0],e=i[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return w.call(this,function(){return r.editor.insertEmbed(e,n,i)},o,e)}},{key:"insertText",value:function(t,e,n,i,o){var a,s=this,l=x(t,0,n,i,o),u=r(l,4);return t=u[0],a=u[2],o=u[3],w.call(this,function(){return s.editor.insertText(t,e,a)},o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var i=this,o=x(t,e,n),a=r(o,4);return t=a[0],e=a[1],n=a[3],w.call(this,function(){return i.editor.removeFormat(t,e)},n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,function(){t=new a.default(t);var n=e.getLength(),i=e.editor.deleteText(0,n),r=e.editor.applyDelta(t),o=r.ops[r.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),r.delete(1)),i.compose(r)},n)}},{key:"setSelection",value:function(e,n,i){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=x(e,n,i),a=r(o,4);e=a[0],n=a[1],i=a[3],this.selection.setRange(new d.Range(e,n),i),i!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return w.call(this,function(){return t=new a.default(t),e.editor.applyDelta(t,n)},n,!0)}}]),t}();function k(t,e){if((e=(0,h.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==b.DEFAULTS.theme){if(e.theme=b.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=v.default;var n=(0,h.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach(function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach(function(e){!0===t.modules[e]&&(t.modules[e]={})})});var i=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce(function(t,e){var n=b.import("modules/"+e);return null==n?y.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t},{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,h.default)(!0,{},b.DEFAULTS,{modules:i},n,e),["bounds","container","scrollingContainer"].forEach(function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),e.modules=Object.keys(e.modules).reduce(function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t},{}),e}function w(t,e,n,i){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new a.default;var r=null==n?null:this.getSelection(),o=this.editor.delta,s=t();if(null!=r&&(!0===n&&(n=r.index),null==i?r=_(r,s,e):0!==i&&(r=_(r,n,i,e)),this.setSelection(r,l.default.sources.SILENT)),s.length()>0){var u,c,d=[l.default.events.TEXT_CHANGE,s,o,e];if((u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(d)),e!==l.default.sources.SILENT)(c=this.emitter).emit.apply(c,d)}return s}function x(t,e,n,r,o){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":i(n))?(a=n,o=r):"string"==typeof n&&(null!=r?a[n]=r:o=n),[t,e,a,o=o||l.default.sources.API]}function _(t,e,n,i){if(null==t)return null;var o=void 0,s=void 0;if(e instanceof a.default){var u=[t.index,t.index+t.length].map(function(t){return e.transformPosition(t,i!==l.default.sources.USER)}),c=r(u,2);o=c[0],s=c[1]}else{var f=[t.index,t.index+t.length].map(function(t){return t<e||t===e&&i===l.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)}),h=r(f,2);o=h[0],s=h[1]}return new d.Range(o,s-o)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=l.default.events,b.sources=l.default.sources,b.version="1.3.7",b.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":v.default},e.expandConfig=k,e.overload=x,e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=s(n(7)),a=s(n(0));function s(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Inline),i(e,[{key:"formatAt",value:function(t,n,i,o){if(e.compare(this.statics.blotName,i)<0&&a.default.query(i,a.default.Scope.BLOT)){var s=this.isolate(t,n);o&&s.wrap(i,o)}else r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,o)}},{key:"optimize",value:function(t){if(r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var i=e.order.indexOf(t),r=e.order.indexOf(n);return i>=0||r>=0?i-r:t===n?0:t<n?-1:1}}]),e}();l.allowedChildren=[l,a.default.Embed,o.default],l.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default.Text),e}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=o(n(54));function o(t){return t&&t.__esModule?t:{default:t}}var a=(0,o(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(t){document.addEventListener(t,function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)})})});var s=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.listeners={},t.on("error",a.error),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default),i(e,[{key:"emit",value:function(){a.log.apply(a,arguments),function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];(this.listeners[t.type]||[]).forEach(function(e){var i=e.node,r=e.handler;(t.target===i||i.contains(t.target))&&r.apply(void 0,[t].concat(n))})}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}();s.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},s.sources={API:"api",SILENT:"silent",USER:"user"},e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n};i.DEFAULTS={},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=["error","warn","log","info"],r="warn";function o(t){if(i.indexOf(t)<=i.indexOf(r)){for(var e,n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];(e=console)[t].apply(e,o)}}function a(t){return i.reduce(function(e,n){return e[n]=o.bind(console,n,t),e},{})}o.level=a.level=function(t){r=t},e.default=a},function(t,e,n){var i=Array.prototype.slice,r=n(52),o=n(53),a=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var u,c;if(s(t)||s(e))return!1;if(t.prototype!==e.prototype)return!1;if(o(t))return!!o(e)&&(t=i.call(t),e=i.call(e),a(t,e,n));if(l(t)){if(!l(e))return!1;if(t.length!==e.length)return!1;for(u=0;u<t.length;u++)if(t[u]!==e[u])return!1;return!0}try{var d=r(t),f=r(e)}catch(t){return!1}if(d.length!=f.length)return!1;for(d.sort(),f.sort(),u=d.length-1;u>=0;u--)if(d[u]!=f[u])return!1;for(u=d.length-1;u>=0;u--)if(c=d[u],!a(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null==t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var r=i.Scope.TYPE&i.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&i.Scope.LEVEL|r:this.scope=i.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,function(t){return t.name})},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=i.query(t,i.Scope.BLOT&(this.scope|i.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=d(n(2)),s=d(n(0)),l=d(n(4)),u=d(n(6)),c=d(n(7));function d(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var v=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,u.default),e}();v.blotName="code",v.tagName="CODE";var m=function(t){function e(){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return p(e,l.default),r(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce(function(e,n){return e.insert(n).insert("\n",t.formats())},new a.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var r=this.descendant(c.default,this.length()-1),a=i(r,1)[0];null!=a&&a.deleteAt(a.length()-1,1),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,i,r){if(0!==n&&null!=s.default.query(i,s.default.Scope.BLOCK)&&(i!==this.statics.blotName||r!==this.statics.formats(this.domNode))){var o=this.newlineIndex(t);if(!(o<0||o>=t+n)){var a=this.newlineIndex(t,!0)+1,l=o-a+1,u=this.isolate(a,l),c=u.next;u.format(i,r),c instanceof e&&c.formatAt(0,t-a+n-l,i,r)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(c.default,t),o=i(r,2),a=o[0],s=o[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()})}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}();m.blotName="code-block",m.tagName="PRE",m.TAB="  ",e.Code=v,e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=g(n(2)),s=g(n(20)),l=g(n(0)),u=g(n(13)),c=g(n(24)),d=n(4),f=g(d),h=g(n(16)),p=g(n(21)),v=g(n(11)),m=g(n(3));function g(t){return t&&t.__esModule?t:{default:t}}var y=/^[ -~]*$/,b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroll=e,this.delta=this.getDelta()}return o(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce(function(t,e){if(1===e.insert){var n=(0,p.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,p.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var i=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(i,e.attributes)}return t.push(e)},new a.default)}(t)).reduce(function(t,a){var u=a.retain||a.delete||a.insert.length||1,c=a.attributes||{};if(null!=a.insert){if("string"==typeof a.insert){var h=a.insert;h.endsWith("\n")&&n&&(n=!1,h=h.slice(0,-1)),t>=o&&!h.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,h);var p=e.scroll.line(t),v=r(p,2),g=v[0],y=v[1],b=(0,m.default)({},(0,d.bubbleFormats)(g));if(g instanceof f.default){var k=g.descendant(l.default.Leaf,y),w=r(k,1)[0];b=(0,m.default)(b,(0,d.bubbleFormats)(w))}c=s.default.attributes.diff(b,c)||{}}else if("object"===i(a.insert)){var x=Object.keys(a.insert)[0];if(null==x)return t;e.scroll.insertAt(t,x,a.insert[x])}o+=u}return Object.keys(c).forEach(function(n){e.scroll.formatAt(t,u,n,c[n])}),t+u},0),t.reduce(function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(i).forEach(function(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var o=n.scroll.lines(t,Math.max(e,1)),a=e;o.forEach(function(e){var o=e.length();if(e instanceof u.default){var s=t-e.offset(n.scroll),l=e.newlineIndex(s+a)-s+1;e.formatAt(s,l,r,i[r])}else e.format(r,i[r]);a-=o})}}),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"formatText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(i).forEach(function(r){n.scroll.formatAt(t,e,r,i[r])}),this.update((new a.default).retain(t).retain(e,(0,p.default)(i)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(t,e){return t.concat(e.delta())},new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],i=[];0===e?this.scroll.path(t).forEach(function(t){var e=r(t,1)[0];e instanceof f.default?n.push(e):e instanceof l.default.Leaf&&i.push(e)}):(n=this.scroll.lines(t,e),i=this.scroll.descendants(l.default.Leaf,t,e));var o=[n,i].map(function(t){if(0===t.length)return{};for(var e=(0,d.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=k((0,d.bubbleFormats)(n),e)}return e});return m.default.apply(m.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter(function(t){return"string"==typeof t.insert}).map(function(t){return t.insert}).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(i).forEach(function(r){n.scroll.formatAt(t,e.length,r,i[r])}),this.update((new a.default).retain(t).insert(e,(0,p.default)(i)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===f.default.blotName&&(!(t.children.length>1)&&t.children.head instanceof h.default)}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),i=this.scroll.line(t+e),o=r(i,2),s=o[0],l=o[1],c=0,d=new a.default;null!=s&&(c=s instanceof u.default?s.newlineIndex(l)-l+1:s.length()-l,d=s.delta().slice(l,l+c-1).insert("\n"));var f=this.getContents(t,e+c).diff((new a.default).insert(n).concat(d)),h=(new a.default).retain(t).concat(f);return this.applyDelta(h)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(y)&&l.default.find(e[0].target)){var r=l.default.find(e[0].target),o=(0,d.bubbleFormats)(r),s=r.offset(this.scroll),u=e[0].oldValue.replace(c.default.CONTENTS,""),f=(new a.default).insert(u),h=(new a.default).insert(r.value());t=(new a.default).retain(s).concat(f.diff(h,n)).reduce(function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)},new a.default),this.delta=i.compose(t)}else this.delta=this.getDelta(),t&&(0,v.default)(i.compose(t),this.delta)||(t=i.diff(this.delta,n));return t}}]),t}();function k(t,e){return Object.keys(e).reduce(function(n,i){return null==t[i]?n:(e[i]===t[i]?n[i]=e[i]:Array.isArray(e[i])?e[i].indexOf(t[i])<0&&(n[i]=e[i].concat([t[i]])):n[i]=[e[i],t[i]],n)},{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=u(n(0)),a=u(n(21)),s=u(n(11)),l=u(n(8));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var f=(0,u(n(10)).default)("quill:selection"),h=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,t),this.index=e,this.length=n},p=function(){function t(e,n){var i=this;d(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new h(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){i.mouseDown||setTimeout(i.update.bind(i,l.default.sources.USER),1)}),this.emitter.on(l.default.events.EDITOR_CHANGE,function(t,e){t===l.default.events.TEXT_CHANGE&&e.length()>0&&i.update(l.default.sources.SILENT)}),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,function(){if(i.hasFocus()){var t=i.getNativeRange();null!=t&&t.start.node!==i.cursor.textNode&&i.emitter.once(l.default.events.SCROLL_UPDATE,function(){try{i.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}})}}),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,function(t,e){if(e.range){var n=e.range,r=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;i.setNativeRange(r,o,a,s)}}),this.update(l.default.sources.SILENT)}return r(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",function(){t.composing=!0}),this.root.addEventListener("compositionend",function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout(function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,function(){t.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){t.mouseDown=!1,t.update(l.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var i=o.default.find(n.start.node,!1);if(null==i)return;if(i instanceof o.default.Leaf){var r=i.split(n.start.offset);i.parent.insertBefore(this.cursor,r)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,o=this.scroll.leaf(t),a=i(o,2),s=a[0],l=a[1];if(null==s)return null;var u=s.position(l,!0),c=i(u,2);r=c[0],l=c[1];var d=document.createRange();if(e>0){d.setStart(r,l);var f=this.scroll.leaf(t+e),h=i(f,2);if(s=h[0],l=h[1],null==s)return null;var p=s.position(l,!0),v=i(p,2);return r=v[0],l=v[1],d.setEnd(r,l),d.getBoundingClientRect()}var m="left",g=void 0;return r instanceof Text?(l<r.data.length?(d.setStart(r,l),d.setEnd(r,l+1)):(d.setStart(r,l-1),d.setEnd(r,l),m="right"),g=d.getBoundingClientRect()):(g=s.domNode.getBoundingClientRect(),l>0&&(m="right")),{bottom:g.top+g.height,height:g.height,left:g[m],right:g[m],top:g.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return f.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var r=n.map(function(t){var n=i(t,2),r=n[0],a=n[1],s=o.default.find(r,!0),l=s.offset(e.scroll);return 0===a?l:s instanceof o.default.Container?l+s.length():l+s.index(r,a)}),a=Math.min(Math.max.apply(Math,c(r)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(r)));return new h(s,a-s)}},{key:"normalizeNative",value:function(t){if(!v(this.root,t.startContainer)||!t.collapsed&&!v(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach(function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n}),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],o=this.scroll.length();return n.forEach(function(t,n){t=Math.min(o-1,t);var a,s=e.scroll.leaf(t),l=i(s,2),u=l[0],c=l[1],d=u.position(c,0!==n),f=i(d,2);a=f[0],c=f[1],r.push(a,c)}),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,r)),a=i(o,1)[0],s=a;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,r));s=i(l,1)[0]}if(null!=a&&null!=s){var u=t.getBoundingClientRect();n.top<u.top?t.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(f.info("setNativeRange",t,e,n,i),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||r||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||i!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(i=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,i),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof e&&(n=e,e=!1),f.info("setRange",t),null!=t){var i=this.rangeToNative(t);this.setNativeRange.apply(this,c(i).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.lastRange,n=this.getRange(),r=i(n,2),o=r[0],u=r[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var d,f=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];if((c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(f)),t!==l.default.sources.SILENT)(d=this.emitter).emit.apply(d,f)}}}]),t}();function v(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=h,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=(i=o)&&i.__esModule?i:{default:i};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Embed),r(e,[{key:"insertInto",value:function(t,n){0===t.children.length?function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}();s.blotName="break",s.tagName="BR",e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(44),a=n(30),s=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return r(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach(function(t){t.attach()})},e.prototype.build=function(){var t=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(e){try{var n=u(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof s.ParchmentError)return;throw t}})},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,function(t,e,n){t.deleteAt(e,n)})},e.prototype.descendant=function(t,n){var i=this.children.find(n),r=i[0],o=i[1];return null==t.blotName&&t(r)||null!=t.blotName&&r instanceof t?[r,o]:r instanceof e?r.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=Number.MAX_VALUE);var r=[],o=i;return this.children.forEachAt(n,i,function(n,i,a){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&r.push(n),n instanceof e&&(r=r.concat(n.descendants(t,i,o))),o-=a}),r},e.prototype.detach=function(){this.children.forEach(function(t){t.detach()}),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,i){this.children.forEachAt(t,e,function(t,e,r){t.formatAt(e,r,n,i)})},e.prototype.insertAt=function(t,e,n){var i=this.children.find(t),r=i[0],o=i[1];if(r)r.insertAt(o,e,n);else{var a=null==n?s.create("text",e):s.create(e,n);this.appendChild(a)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(e){return t instanceof e}))throw new s.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce(function(t,e){return t+e.length()},0)},e.prototype.moveChildren=function(t,e){this.children.forEach(function(n){t.insertBefore(n,e)})},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=s.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var i=this.children.find(t,n),r=i[0],o=i[1],a=[[this,t]];return r instanceof e?a.concat(r.path(o,n)):(null!=r&&a.push([r,o]),a)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),function(t,i,r){t=t.split(i,e),n.appendChild(t)}),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,i=[],r=[];t.forEach(function(t){t.target===n.domNode&&"childList"===t.type&&(i.push.apply(i,t.addedNodes),r.push.apply(r,t.removedNodes))}),r.forEach(function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=s.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}}),i.filter(function(t){return t.parentNode==n.domNode}).sort(function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(t){var e=null;null!=t.nextSibling&&(e=s.find(t.nextSibling));var i=u(t);i.next==e&&null!=i.next||(null!=i.parent&&i.parent.removeChild(n),n.insertBefore(i,e||void 0))})},e}(a.default);function u(t){var e=s.find(t);if(null==e)try{e=s.create(t)}catch(n){e=s.create(s.Scope.INLINE),[].slice.call(t.childNodes).forEach(function(t){e.domNode.appendChild(t)}),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=l},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),a=n(31),s=n(17),l=n(1),u=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new a.default(n.domNode),n}return r(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=l.query(t);n instanceof o.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var i=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(i),i},e.prototype.update=function(e,n){var i=this;t.prototype.update.call(this,e,n),e.some(function(t){return t.target===i.domNode&&"attributes"===t.type})&&this.attributes.build()},e.prototype.wrap=function(n,i){var r=t.prototype.wrap.call(this,n,i);return r instanceof e&&r.statics.scope===this.statics.scope&&this.attributes.move(r),r},e}(s.default);e.default=u},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(30),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){var i=n(11),r=n(3),o={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var i=r(!0,{},e);for(var o in n||(i=Object.keys(i).reduce(function(t,e){return null!=i[e]&&(t[e]=i[e]),t},{})),t)void 0!==t[o]&&void 0===e[o]&&(i[o]=t[o]);return Object.keys(i).length>0?i:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,r){return i(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var i=Object.keys(e).reduce(function(n,i){return void 0===t[i]&&(n[i]=e[i]),n},{});return Object.keys(i).length>0?i:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,i=o.length(e);if(t>=i-n?(t=i-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var r={};return e.attributes&&(r.attributes=e.attributes),"number"==typeof e.retain?r.retain=t:"string"==typeof e.insert?r.insert=e.insert.substr(n,t):r.insert=e.insert,r}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),i=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(i)}return[]},t.exports=o},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,i;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{i=Promise}catch(t){i=function(){}}function r(o,s,l,u,c){"object"==typeof s&&(l=s.depth,u=s.prototype,c=s.includeNonEnumerable,s=s.circular);var d=[],f=[],h="undefined"!=typeof Buffer;return void 0===s&&(s=!0),void 0===l&&(l=1/0),function o(l,p){if(null===l)return null;if(0===p)return l;var v,m;if("object"!=typeof l)return l;if(t(l,e))v=new e;else if(t(l,n))v=new n;else if(t(l,i))v=new i(function(t,e){l.then(function(e){t(o(e,p-1))},function(t){e(o(t,p-1))})});else if(r.__isArray(l))v=[];else if(r.__isRegExp(l))v=new RegExp(l.source,a(l)),l.lastIndex&&(v.lastIndex=l.lastIndex);else if(r.__isDate(l))v=new Date(l.getTime());else{if(h&&Buffer.isBuffer(l))return v=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(v),v;t(l,Error)?v=Object.create(l):void 0===u?(m=Object.getPrototypeOf(l),v=Object.create(m)):(v=Object.create(u),m=u)}if(s){var g=d.indexOf(l);if(-1!=g)return f[g];d.push(l),f.push(v)}for(var y in t(l,e)&&l.forEach(function(t,e){var n=o(e,p-1),i=o(t,p-1);v.set(n,i)}),t(l,n)&&l.forEach(function(t){var e=o(t,p-1);v.add(e)}),l){var b;m&&(b=Object.getOwnPropertyDescriptor(m,y)),b&&null==b.set||(v[y]=o(l[y],p-1))}if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(l);for(y=0;y<k.length;y++){var w=k[y];(!(_=Object.getOwnPropertyDescriptor(l,w))||_.enumerable||c)&&(v[w]=o(l[w],p-1),_.enumerable||Object.defineProperty(v,w,{enumerable:!1}))}}if(c){var x=Object.getOwnPropertyNames(l);for(y=0;y<x.length;y++){var _,E=x[y];(_=Object.getOwnPropertyDescriptor(l,E))&&_.enumerable||(v[E]=o(l[E],p-1),Object.defineProperty(v,E,{enumerable:!1}))}}return v}(o,l)}function o(t){return Object.prototype.toString.call(t)}function a(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return r.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},r.__objToStr=o,r.__isDate=function(t){return"object"==typeof t&&"[object Date]"===o(t)},r.__isArray=function(t){return"object"==typeof t&&"[object Array]"===o(t)},r.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===o(t)},r.__getRegExpFlags=a,r}();"object"==typeof t&&t.exports&&(t.exports=n)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=h(n(0)),s=h(n(8)),l=n(4),u=h(l),c=h(n(16)),d=h(n(13)),f=h(n(25));function h(t){return t&&t.__esModule?t:{default:t}}function p(t){return t instanceof u.default||t instanceof l.BlockEmbed}var v=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.emitter=n.emitter,Array.isArray(n.whitelist)&&(i.whitelist=n.whitelist.reduce(function(t,e){return t[e]=!0,t},{})),i.domNode.addEventListener("DOMNodeInserted",function(){}),i.optimize(),i.enable(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Scroll),r(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var r=this.line(t),a=i(r,2),s=a[0],u=a[1],f=this.line(t+n),h=i(f,1)[0];if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=h&&s!==h&&u>0){if(s instanceof l.BlockEmbed||h instanceof l.BlockEmbed)return void this.optimize();if(s instanceof d.default){var p=s.newlineIndex(s.length(),!0);if(p>-1&&(s=s.split(p+1))===h)return void this.optimize()}else if(h instanceof d.default){var v=h.newlineIndex(0);v>-1&&h.split(v+1)}var m=h.children.head instanceof c.default?null:h.children.head;s.moveChildren(h,m),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,i,r){(null==this.whitelist||this.whitelist[i])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,i,r),this.optimize())}},{key:"insertAt",value:function(t,n,i){if(null==i||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==i||null==a.default.query(n,a.default.Scope.BLOCK)){var r=a.default.create(this.statics.defaultChild);this.appendChild(r),null==i&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,i)}else{var s=a.default.create(n,i);this.appendChild(s)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,i);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var i=a.default.create(this.statics.defaultChild);i.appendChild(t),t=i}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(p,t)}},{key:"lines",value:function(){return function t(e,n,i){var r=[],o=i;return e.children.forEachAt(n,i,function(e,n,i){p(e)?r.push(e):e instanceof a.default.Container&&(r=r.concat(t(e,n,o))),o-=i}),r}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}();v.blotName="scroll",v.className="ql-editor",v.tagName="DIV",v.defaultChild="block",v.allowedChildren=[u.default,l.BlockEmbed,f.default],e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=v(n(21)),s=v(n(11)),l=v(n(3)),u=v(n(2)),c=v(n(20)),d=v(n(0)),f=v(n(5)),h=v(n(10)),p=v(n(9));function v(t){return t&&t.__esModule?t:{default:t}}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=(0,h.default)("quill:keyboard"),y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.bindings={},Object.keys(i.options.bindings).forEach(function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&i.options.bindings[e]&&i.addBinding(i.options.bindings[e])}),i.addBinding({key:e.keys.ENTER,shiftKey:null},E),i.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(i.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},w),i.addBinding({key:e.keys.DELETE},{collapsed:!0},x)):(i.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},w),i.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},x)),i.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},_),i.addBinding({key:e.keys.DELETE},{collapsed:!1},_),i.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},w),i.listen(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,p.default),o(e,null,[{key:"match",value:function(t,e){return e=A(e),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!e[n]!==t[n]&&null!==e[n]})&&e.key===(t.which||t.keyCode)}}]),o(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=A(t);if(null==i||null==i.key)return g.warn("Attempted to add invalid keyboard binding",i);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),i=(0,l.default)(i,e,n),this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(t.bindings[o]||[]).filter(function(t){return e.match(n,t)});if(0!==a.length){var l=t.quill.getSelection();if(null!=l&&t.quill.hasFocus()){var u=t.quill.getLine(l.index),c=r(u,2),f=c[0],h=c[1],p=t.quill.getLeaf(l.index),v=r(p,2),m=v[0],g=v[1],y=0===l.length?[m,g]:t.quill.getLeaf(l.index+l.length),b=r(y,2),k=b[0],w=b[1],x=m instanceof d.default.Text?m.value().slice(0,g):"",_=k instanceof d.default.Text?k.value().slice(w):"",E={collapsed:0===l.length,empty:0===l.length&&f.length()<=1,format:t.quill.getFormat(l),offset:h,prefix:x,suffix:_};a.some(function(e){if(null!=e.collapsed&&e.collapsed!==E.collapsed)return!1;if(null!=e.empty&&e.empty!==E.empty)return!1;if(null!=e.offset&&e.offset!==E.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==E.format[t]}))return!1}else if("object"===i(e.format)&&!Object.keys(e.format).every(function(t){return!0===e.format[t]?null!=E.format[t]:!1===e.format[t]?null==E.format[t]:(0,s.default)(e.format[t],E.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(E.prefix))&&(!(null!=e.suffix&&!e.suffix.test(E.suffix))&&!0!==e.handler.call(t,l,E))})&&n.preventDefault()}}}})}}]),e}();function k(t,e){var n,i=t===b.keys.LEFT?"prefix":"suffix";return m(n={key:t,shiftKey:e,altKey:null},i,/^$/),m(n,"handler",function(n){var i=n.index;t===b.keys.RIGHT&&(i+=n.length+1);var o=this.quill.getLeaf(i);return!(r(o,1)[0]instanceof d.default.Embed)||(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index-1,f.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index+n.length+1,f.default.sources.USER),!1)}),n}function w(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),i=r(n,1)[0],o={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=r(a,1)[0];if(null!=s&&s.length()>1){var l=i.formats(),u=this.quill.getFormat(t.index-1,1);o=c.default.attributes.diff(l,u)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-d,d,f.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index-d,d,o,f.default.sources.USER),this.quill.focus()}}function x(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var i={},o=0,a=this.quill.getLine(t.index),s=r(a,1)[0];if(e.offset>=s.length()-1){var l=this.quill.getLine(t.index+1),u=r(l,1)[0];if(u){var d=s.formats(),h=this.quill.getFormat(t.index,1);i=c.default.attributes.diff(d,h)||{},o=u.length()}}this.quill.deleteText(t.index,n,f.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index+o-1,n,i,f.default.sources.USER)}}function _(t){var e=this.quill.getLines(t),n={};if(e.length>1){var i=e[0].formats(),r=e[e.length-1].formats();n=c.default.attributes.diff(r,i)||{}}this.quill.deleteText(t,f.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,f.default.sources.USER),this.quill.setSelection(t.index,f.default.sources.SILENT),this.quill.focus()}function E(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var i=Object.keys(e.format).reduce(function(t,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t},{});this.quill.insertText(t.index,"\n",i,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach(function(t){null==i[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],f.default.sources.USER))})}function S(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=d.default.query("code-block"),i=e.index,o=e.length,a=this.quill.scroll.descendant(n,i),s=r(a,2),l=s[0],u=s[1];if(null!=l){var c=this.quill.getIndex(l),h=l.newlineIndex(u,!0)+1,p=l.newlineIndex(c+u+o),v=l.domNode.textContent.slice(h,p).split("\n");u=0,v.forEach(function(e,r){t?(l.insertAt(h+u,n.TAB),u+=n.TAB.length,0===r?i+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(h+u,n.TAB.length),u-=n.TAB.length,0===r?i-=n.TAB.length:o-=n.TAB.length),u+=e.length+1}),this.quill.update(f.default.sources.USER),this.quill.setSelection(i,o,f.default.sources.SILENT)}}}}function O(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],f.default.sources.USER)}}}function A(t){if("string"==typeof t||"number"==typeof t)return A({key:t});if("object"===(void 0===t?"undefined":i(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[y]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:O("bold"),italic:O("italic"),underline:O("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",f.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",f.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",f.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,f.default.sources.USER)}},"indent code-block":S(!0),"outdent code-block":S(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,f.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new u.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,f.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,f.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,f.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),i=n[0],o=n[1],a=(0,l.default)({},i.formats(),{list:"checked"}),s=(new u.default).retain(t.index).insert("\n",a).retain(i.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),i=r(n,2),o=i[0],a=i[1],s=(new u.default).retain(t.index).insert("\n",e.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,f.default.sources.USER),this.quill.setSelection(t.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,i=this.quill.getLine(t.index),o=r(i,2),a=o[0],s=o[1];if(s>n)return!0;var l=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",f.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(c,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,f.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),i=n[0],o=n[1],a=(new u.default).retain(t.index+i.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,f.default.sources.USER)}},"embed left":k(b.keys.LEFT,!1),"embed left shift":k(b.keys.LEFT,!0),"embed right":k(b.keys.RIGHT,!1),"embed right shift":k(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=l(n(0)),s=l(n(7));function l(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.selection=n,i.textNode=document.createTextNode(e.CONTENTS),i.domNode.appendChild(i.textNode),i._length=0,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Embed),o(e,null,[{key:"value",value:function(){}}]),o(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var i=this,o=0;null!=i&&i.statics.scope!==a.default.Scope.BLOCK_BLOT;)o+=i.offset(i.parent),i=i.parent;null!=i&&(this._length=e.CONTENTS.length,i.optimize(),i.formatAt(o,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),r=void 0,o=void 0,l=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var u=[t,n.start.offset,n.end.offset];r=u[0],o=u[1],l=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var c=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof s.default?(r=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=e.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var d=[o,l].map(function(t){return Math.max(0,Math.min(r.data.length,t-1))}),f=i(d,2);return o=f[0],l=f[1],{startNode:r,startOffset:o,endNode:r,endOffset:l}}}}},{key:"update",value:function(t,e){var n=this;if(t.some(function(t){return"characterData"===t.type&&t.target===n.textNode})){var i=this.restore();i&&(e.range=i)}}},{key:"value",value:function(){return""}}]),e}();u.blotName="cursor",u.className="ql-cursor",u.tagName="span",u.CONTENTS="\ufeff",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(n(0)),r=n(4),o=a(r);function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default.Container),e}();s.allowedChildren=[o.default,r.BlockEmbed,s],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=(i=o)&&i.__esModule?i:{default:i};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Attributor.Style),r(e,[{key:"value",value:function(t){var n=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map(function(t){return("00"+parseInt(t).toString(16)).slice(-2)}).join("")):n}}]),e}(),l=new a.default.Attributor.Class("color","ql-color",{scope:a.default.Scope.INLINE}),u=new s("color","color",{scope:a.default.Scope.INLINE});e.ColorAttributor=s,e.ColorClass=l,e.ColorStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(6),s=(i=a)&&i.__esModule?i:{default:i};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default),r(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return u(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}();function u(t,e){var n=document.createElement("a");n.href=t;var i=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(i)>-1}l.blotName="link",l.tagName="A",l.SANITIZED_URL="about:blank",l.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=l,e.sanitize=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=s(n(23)),a=s(n(107));function s(t){return t&&t.__esModule?t:{default:t}}var l=0;function u(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var c=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.togglePicker()}),this.label.addEventListener("keydown",function(t){switch(t.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),t.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return r(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",function(){e.selectItem(n,!0)}),n.addEventListener("keydown",function(t){switch(t.keyCode){case o.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case o.default.keys.ESCAPE:e.escape(),t.preventDefault()}}),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=a.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach(function(n){var i=t.buildItem(n);e.appendChild(i),!0===n.selected&&t.selectItem(i)}),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach(function(e){t.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout(function(){return t.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":i(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=g(n(0)),r=g(n(5)),o=n(4),a=g(o),s=g(n(16)),l=g(n(25)),u=g(n(24)),c=g(n(35)),d=g(n(6)),f=g(n(22)),h=g(n(7)),p=g(n(55)),v=g(n(42)),m=g(n(23));function g(t){return t&&t.__esModule?t:{default:t}}r.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":d.default,"blots/scroll":f.default,"blots/text":h.default,"modules/clipboard":p.default,"modules/history":v.default,"modules/keyboard":m.default}),i.default.register(a.default,s.default,u.default,d.default,f.default,h.default),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t){this.domNode=t,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new i.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return i.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,r){var o=this.isolate(t,e);if(null!=i.query(n,i.Scope.BLOT)&&r)o.wrap(n,r);else if(null!=i.query(n,i.Scope.ATTRIBUTE)){var a=i.create(this.statics.scope);o.wrap(a),a.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?i.create("text",e):i.create(e,n),o=this.split(t);this.parent.insertBefore(r,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[i.DATA_KEY]&&delete this.domNode[i.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?i.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?i.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),r=n(32),o=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=i.default.keys(this.domNode),n=r.default.keys(this.domNode),s=o.default.keys(this.domNode);e.concat(n).concat(s).forEach(function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof i.default&&(t.attributes[n.attrName]=n)})},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach(function(n){var i=e.attributes[n].value(e.domNode);t.format(n,i)})},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(e,n){return e[n]=t.attributes[n].value(t.domNode),e},{})},t}();e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){var e=t.split("-"),n=e.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(t){return t.split(":")[0].trim()})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();var r=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n,this.modules={}}return i(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach(function(e){null==t.modules[e]&&t.addModule(e)})}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();r.DEFAULTS={modules:{}},r.themes={default:r},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=a(n(0)),o=a(n(7));function a(t){return t&&t.__esModule?t:{default:t}}var s="\ufeff",l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(t){n.contentNode.appendChild(t)}),n.leftGuard=document.createTextNode(s),n.rightGuard=document.createTextNode(s),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default.Embed),i(e,[{key:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,i=t.data.split(s).join("");if(t===this.leftGuard)if(this.prev instanceof o.default){var a=this.prev.length();this.prev.insertAt(a,i),e={startNode:this.prev.domNode,startOffset:a+i.length}}else n=document.createTextNode(i),this.parent.insertBefore(r.default.create(n),this),e={startNode:n,startOffset:i.length};else t===this.rightGuard&&(this.next instanceof o.default?(this.next.insertAt(0,i),e={startNode:this.next.domNode,startOffset:i.length}):(n=document.createTextNode(i),this.parent.insertBefore(r.default.create(n),this.next),e={startNode:n,startOffset:i.length}));return t.data=s,e}},{key:"update",value:function(t,e){var n=this;t.forEach(function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var i=n.restore(t.target);i&&(e.range=i)}})}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i};var a={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},s=new o.default.Attributor.Attribute("align","align",a),l=new o.default.Attributor.Class("align","ql-align",a),u=new o.default.Attributor.Style("align","text-align",a);e.AlignAttribute=s,e.AlignClass=l,e.AlignStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i},a=n(26);var s=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),l=new a.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});e.BackgroundClass=s,e.BackgroundStyle=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i};var a={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},s=new o.default.Attributor.Attribute("direction","dir",a),l=new o.default.Attributor.Class("direction","ql-direction",a),u=new o.default.Attributor.Style("direction","direction",a);e.DirectionAttribute=s,e.DirectionClass=l,e.DirectionStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=(i=o)&&i.__esModule?i:{default:i};var s={scope:a.default.Scope.INLINE,whitelist:["serif","monospace"]},l=new a.default.Attributor.Class("font","ql-font",s),u=new(function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Attributor.Style),r(e,[{key:"value",value:function(t){return function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}())("font","font-family",s);e.FontStyle=u,e.FontClass=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{default:i};var a=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),s=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=a,e.SizeStyle=s},function(t,e,n){"use strict";t.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=s(n(0)),o=s(n(5)),a=s(n(9));function s(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.lastRecorded=0,i.ignoreChange=!1,i.clear(),i.quill.on(o.default.events.EDITOR_CHANGE,function(t,e,n,r){t!==o.default.events.TEXT_CHANGE||i.ignoreChange||(i.options.userOnly&&r!==o.default.sources.USER?i.transform(e):i.record(e,n))}),i.quill.keyboard.addBinding({key:"Z",shortKey:!0},i.undo.bind(i)),i.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},i.redo.bind(i)),/Win/i.test(navigator.platform)&&i.quill.keyboard.addBinding({key:"Y",shortKey:!0},i.redo.bind(i)),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),i(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],o.default.sources.USER),this.ignoreChange=!1;var i=u(n[t]);this.quill.setSelection(i)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),t=r.redo.compose(t)}else this.lastRecorded=i;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}),this.stack.redo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}();function u(t){var e=t.reduce(function(t,e){return t+=e.delete||0},0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some(function(t){return null!=r.default.query(t,r.default.Scope.BLOCK)}))}(t)&&(n-=1),n}l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=l,e.getLastChangeIndex=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=h(n(3)),o=h(n(2)),a=h(n(8)),s=h(n(23)),l=h(n(34)),u=h(n(59)),c=h(n(60)),d=h(n(28)),f=h(n(61));function h(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var g=[!1,"center","right","justify"],y=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],b=[!1,"serif","monospace"],k=["1","2","3",!1],w=["small",!1,"large","huge"],x=function(t){function e(t,n){p(this,e);var i=v(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==i.tooltip||i.tooltip.root.contains(n.target)||document.activeElement===i.tooltip.textbox||i.quill.hasFocus()||i.tooltip.hide(),null!=i.pickers&&i.pickers.forEach(function(t){t.container.contains(n.target)||t.close()})}),i}return m(e,l.default),i(e,[{key:"addModule",value:function(t){var n=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach(function(t){(t.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var i=t.value||"";null!=i&&e[n][i]&&(t.innerHTML=e[n][i])}})})}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map(function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&E(t,g),new c.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&E(t,y,"background"===n?"#ffffff":"#000000"),new u.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?E(t,b):t.classList.contains("ql-header")?E(t,k):t.classList.contains("ql-size")&&E(t,w)),new d.default(t)});this.quill.on(a.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(t){t.update()})})}}]),e}();x.DEFAULTS=(0,r.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var i=t.quill.getSelection(!0);t.quill.updateContents((new o.default).retain(i.index).delete(i.length).insert({image:n.target.result}),a.default.sources.USER),t.quill.setSelection(i.index+1,a.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}}),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var _=function(t){function e(t,n){p(this,e);var i=v(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.textbox=i.root.querySelector('input[type="text"]'),i.listen(),i}return m(e,f.default),i(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",function(e){s.default.match(e,"enter")?(t.save(),e.preventDefault()):s.default.match(e,"escape")&&(t.cancel(),e.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,a.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":t=function(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(e)return(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0";if(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/";return t}(t);case"formula":if(!t)break;var n=this.quill.getSelection(!0);if(null!=n){var i=n.index+n.length;this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),t,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(i+1," ",a.default.sources.USER),this.quill.setSelection(i+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}();function E(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach(function(e){var i=document.createElement("option");e===n?i.setAttribute("selected","selected"):i.setAttribute("value",e),t.appendChild(i)})}e.BaseTooltip=_,e.default=x},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,i=this.iterator();n=i();){var r=n.length();if(t<r||e&&t===r&&(null==n.next||0!==n.next.length()))return[n,t];t-=r}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var i,r=this.find(t),o=r[0],a=t-r[1],s=this.iterator(o);(i=s())&&a<t+e;){var l=i.length();t>a?n(i,t-a,Math.min(e,a+l-t)):n(i,0,Math.min(l,t+e-a)),a+=l}},t.prototype.map=function(t){return this.reduce(function(e,n){return e.push(t(n)),e},[])},t.prototype.reduce=function(t,e){for(var n,i=this.iterator();n=i();)e=t(e,n);return e},t}();e.default=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver(function(t){n.update(t)}),n.observer.observe(n.domNode,s),n.attach(),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach(function(t){t.remove()}):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,i,r){this.update(),t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){this.update(),t.prototype.insertAt.call(this,e,n,i)},e.prototype.optimize=function(e,n){var i=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)e.push(r.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==i&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},l=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(l),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=a.find(t,!1);s(e,!1),e instanceof o.default&&e.children.forEach(function(t){s(t,!1)})})):"attributes"===t.type&&s(e.prev)),s(e))}),this.children.forEach(l),r=(u=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)e.push(r.pop())}},e.prototype.update=function(e,n){var i=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map(function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==i&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)}),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=l},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1);var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,i){var r=this;n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):(this.children.forEach(function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,i,r){null!=this.formats()[i]||a.query(i,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var i=this.formats();if(0===Object.keys(i).length)return this.unwrap();var r=this.next;r instanceof e&&r.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(i,r.formats())&&(r.moveChildren(this),r.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var i=a.query(e.blotName).tagName;if(n.tagName!==i)return t.formats.call(this,n)},e.prototype.format=function(n,i){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||i?t.prototype.format.call(this,n,i):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,i,r){null!=a.query(i,a.Scope.BLOCK)?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.insertAt=function(e,n,i){if(null==i||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,i);else{var r=this.split(e),o=a.create(n,i);r.parent.insertBefore(o,r)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=s},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,i,r){0===e&&n===this.length()?this.format(i,r):t.prototype.formatAt.call(this,e,n,i,r)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=o},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,i){null==i?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,i)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some(function(t){return"characterData"===t.type&&t.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){"use strict";var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:r.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),i=n.length>>>0,r=arguments[1],o=0;o<i;o++)if(e=n[o],t.call(r,e,o,n))return e}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,e){var n=-1,i=1,r=0;function o(t,e,u){if(t==e)return t?[[r,t]]:[];(u<0||t.length<u)&&(u=null);var d=s(t,e),f=t.substring(0,d);d=l(t=t.substring(d),e=e.substring(d));var h=t.substring(t.length-d),p=function(t,e){var u;if(!t)return[[i,e]];if(!e)return[[n,t]];var c=t.length>e.length?t:e,d=t.length>e.length?e:t,f=c.indexOf(d);if(-1!=f)return u=[[i,c.substring(0,f)],[r,d],[i,c.substring(f+d.length)]],t.length>e.length&&(u[0][0]=u[2][0]=n),u;if(1==d.length)return[[n,t],[i,e]];var h=function(t,e){var n=t.length>e.length?t:e,i=t.length>e.length?e:t;if(n.length<4||2*i.length<n.length)return null;function r(t,e,n){for(var i,r,o,a,u=t.substring(n,n+Math.floor(t.length/4)),c=-1,d="";-1!=(c=e.indexOf(u,c+1));){var f=s(t.substring(n),e.substring(c)),h=l(t.substring(0,n),e.substring(0,c));d.length<h+f&&(d=e.substring(c-h,c)+e.substring(c,c+f),i=t.substring(0,n-h),r=t.substring(n+f),o=e.substring(0,c-h),a=e.substring(c+f))}return 2*d.length>=t.length?[i,r,o,a,d]:null}var o,a,u,c,d,f=r(n,i,Math.ceil(n.length/4)),h=r(n,i,Math.ceil(n.length/2));if(!f&&!h)return null;o=h?f&&f[4].length>h[4].length?f:h:f;t.length>e.length?(a=o[0],u=o[1],c=o[2],d=o[3]):(c=o[0],d=o[1],a=o[2],u=o[3]);var p=o[4];return[a,u,c,d,p]}(t,e);if(h){var p=h[0],v=h[1],m=h[2],g=h[3],y=h[4],b=o(p,m),k=o(v,g);return b.concat([[r,y]],k)}return function(t,e){for(var r=t.length,o=e.length,s=Math.ceil((r+o)/2),l=s,u=2*s,c=new Array(u),d=new Array(u),f=0;f<u;f++)c[f]=-1,d[f]=-1;c[l+1]=0,d[l+1]=0;for(var h=r-o,p=h%2!=0,v=0,m=0,g=0,y=0,b=0;b<s;b++){for(var k=-b+v;k<=b-m;k+=2){for(var w=l+k,x=(A=k==-b||k!=b&&c[w-1]<c[w+1]?c[w+1]:c[w-1]+1)-k;A<r&&x<o&&t.charAt(A)==e.charAt(x);)A++,x++;if(c[w]=A,A>r)m+=2;else if(x>o)v+=2;else if(p){var _=l+h-k;if(_>=0&&_<u&&-1!=d[_]){var E=r-d[_];if(A>=E)return a(t,e,A,x)}}}for(var S=-b+g;S<=b-y;S+=2){for(var _=l+S,O=(E=S==-b||S!=b&&d[_-1]<d[_+1]?d[_+1]:d[_-1]+1)-S;E<r&&O<o&&t.charAt(r-E-1)==e.charAt(o-O-1);)E++,O++;if(d[_]=E,E>r)y+=2;else if(O>o)g+=2;else if(!p){var w=l+h-S;if(w>=0&&w<u&&-1!=c[w]){var A=c[w],x=l+A-w;if(A>=(E=r-E))return a(t,e,A,x)}}}}return[[n,t],[i,e]]}(t,e)}(t=t.substring(0,t.length-d),e=e.substring(0,e.length-d));return f&&p.unshift([r,f]),h&&p.push([r,h]),function t(e){e.push([r,""]);var o=0;var a=0;var u=0;var c="";var d="";var f;for(;o<e.length;)switch(e[o][0]){case i:u++,d+=e[o][1],o++;break;case n:a++,c+=e[o][1],o++;break;case r:a+u>1?(0!==a&&0!==u&&(0!==(f=s(d,c))&&(o-a-u>0&&e[o-a-u-1][0]==r?e[o-a-u-1][1]+=d.substring(0,f):(e.splice(0,0,[r,d.substring(0,f)]),o++),d=d.substring(f),c=c.substring(f)),0!==(f=l(d,c))&&(e[o][1]=d.substring(d.length-f)+e[o][1],d=d.substring(0,d.length-f),c=c.substring(0,c.length-f))),0===a?e.splice(o-u,a+u,[i,d]):0===u?e.splice(o-a,a+u,[n,c]):e.splice(o-a-u,a+u,[n,c],[i,d]),o=o-a-u+(a?1:0)+(u?1:0)+1):0!==o&&e[o-1][0]==r?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,u=0,a=0,c="",d=""}""===e[e.length-1][1]&&e.pop();var h=!1;o=1;for(;o<e.length-1;)e[o-1][0]==r&&e[o+1][0]==r&&(e[o][1].substring(e[o][1].length-e[o-1][1].length)==e[o-1][1]?(e[o][1]=e[o-1][1]+e[o][1].substring(0,e[o][1].length-e[o-1][1].length),e[o+1][1]=e[o-1][1]+e[o+1][1],e.splice(o-1,1),h=!0):e[o][1].substring(0,e[o+1][1].length)==e[o+1][1]&&(e[o-1][1]+=e[o+1][1],e[o][1]=e[o][1].substring(e[o+1][1].length)+e[o+1][1],e.splice(o+1,1),h=!0)),o++;h&&t(e)}(p),null!=u&&(p=function(t,e){var i=function(t,e){if(0===e)return[r,t];for(var i=0,o=0;o<t.length;o++){var a=t[o];if(a[0]===n||a[0]===r){var s=i+a[1].length;if(e===s)return[o+1,t];if(e<s){t=t.slice();var l=e-i,u=[a[0],a[1].slice(0,l)],c=[a[0],a[1].slice(l)];return t.splice(o,1,u,c),[o+1,t]}i=s}}throw new Error("cursor_pos is out of bounds!")}(t,e),o=i[1],a=i[0],s=o[a],l=o[a+1];if(null==s)return t;if(s[0]!==r)return t;if(null!=l&&s[1]+l[1]===l[1]+s[1])return o.splice(a,2,l,s),c(o,a,2);if(null!=l&&0===l[1].indexOf(s[1])){o.splice(a,2,[l[0],s[1]],[0,s[1]]);var u=l[1].slice(s[1].length);return u.length>0&&o.splice(a+2,0,[l[0],u]),c(o,a,3)}return t}(p,u)),p=function(t){for(var e=!1,o=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},a=2;a<t.length;a+=1)t[a-2][0]===r&&((s=t[a-2][1]).charCodeAt(s.length-1)>=55296&&s.charCodeAt(s.length-1)<=56319)&&t[a-1][0]===n&&o(t[a-1][1])&&t[a][0]===i&&o(t[a][1])&&(e=!0,t[a-1][1]=t[a-2][1].slice(-1)+t[a-1][1],t[a][1]=t[a-2][1].slice(-1)+t[a][1],t[a-2][1]=t[a-2][1].slice(0,-1));var s;if(!e)return t;for(var l=[],a=0;a<t.length;a+=1)t[a][1].length>0&&l.push(t[a]);return l}(p)}function a(t,e,n,i){var r=t.substring(0,n),a=e.substring(0,i),s=t.substring(n),l=e.substring(i),u=o(r,a),c=o(s,l);return u.concat(c)}function s(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,i=Math.min(t.length,e.length),r=i,o=0;n<r;)t.substring(o,r)==e.substring(o,r)?o=n=r:i=r,r=Math.floor((i-n)/2+n);return r}function l(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,i=Math.min(t.length,e.length),r=i,o=0;n<r;)t.substring(t.length-r,t.length-o)==e.substring(e.length-r,e.length-o)?o=n=r:i=r,r=Math.floor((i-n)/2+n);return r}var u=o;function c(t,e,n){for(var i=e+n-1;i>=0&&i>=e-1;i--)if(i+1<t.length){var r=t[i],o=t[i+1];r[0]===o[1]&&t.splice(i,2,[r[0],r[1]+o[1]])}return t}u.INSERT=i,u.DELETE=n,u.EQUAL=r,t.exports=u},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function i(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function r(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?i:r).supported=i,e.unsupported=r},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},a.prototype.listeners=function(t,e){var n=i?i+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var o=0,a=r.length,s=new Array(a);o<a;o++)s[o]=r[o].fn;return s},a.prototype.emit=function(t,e,n,r,o,a){var s=i?i+t:t;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,o),!0;case 6:return c.fn.call(c.context,e,n,r,o,a),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var f,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,n);break;case 4:c[u].fn.call(c[u].context,e,n,r);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];c[u].fn.apply(c[u].context,l)}}return!0},a.prototype.on=function(t,e,n){var r=new o(e,n||this),a=i?i+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):(this._events[a]=r,this._eventsCount++),this},a.prototype.once=function(t,e,n){var r=new o(e,n||this,!0),a=i?i+t:t;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):(this._events[a]=r,this._eventsCount++),this},a.prototype.removeListener=function(t,e,n,o){var a=i?i+t:t;if(!this._events[a])return this;if(!e)return 0==--this._eventsCount?this._events=new r:delete this._events[a],this;var s=this._events[a];if(s.fn)s.fn!==e||o&&!s.once||n&&s.context!==n||(0==--this._eventsCount?this._events=new r:delete this._events[a]);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==e||o&&!s[l].once||n&&s[l].context!==n)&&u.push(s[l]);u.length?this._events[a]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new r:delete this._events[a]}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new r:delete this._events[e])):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=i,a.EventEmitter=a,void 0!==t&&(t.exports=a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=b(n(3)),s=b(n(2)),l=b(n(0)),u=b(n(5)),c=b(n(10)),d=b(n(9)),f=n(36),h=n(37),p=b(n(13)),v=n(26),m=n(38),g=n(39),y=n(40);function b(t){return t&&t.__esModule?t:{default:t}}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w=(0,c.default)("quill:clipboard"),x="__ql-matcher",_=[[Node.TEXT_NODE,j],[Node.TEXT_NODE,M],["br",function(t,e){T(e,"\n")||e.insert("\n");return e}],[Node.ELEMENT_NODE,M],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,D],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,function(t,e){var n={},i=t.style||{};i.fontStyle&&"italic"===C(t).fontStyle&&(n.italic=!0);i.fontWeight&&(C(t).fontWeight.startsWith("bold")||parseInt(C(t).fontWeight)>=700)&&(n.bold=!0);Object.keys(n).length>0&&(e=A(e,n));parseFloat(i.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e));return e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!T(e,"\n"))return e;var i=-1,r=t.parentNode;for(;!r.classList.contains("ql-clipboard");)"list"===(l.default.query(r)||{}).blotName&&(i+=1),r=r.parentNode;return i<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:i}))}],["b",N.bind(N,"bold")],["i",N.bind(N,"italic")],["style",function(){return new s.default}]],E=[f.AlignAttribute,m.DirectionAttribute].reduce(function(t,e){return t[e.keyName]=e,t},{}),S=[f.AlignStyle,h.BackgroundStyle,v.ColorStyle,m.DirectionStyle,g.FontStyle,y.SizeStyle].reduce(function(t,e){return t[e.keyName]=e,t},{}),O=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.root.addEventListener("paste",i.onPaste.bind(i)),i.container=i.quill.addContainer("ql-clipboard"),i.container.setAttribute("contenteditable",!0),i.container.setAttribute("tabindex",-1),i.matchers=[],_.concat(i.options.matchers).forEach(function(t){var e=r(t,2),o=e[0],a=e[1];(n.matchVisual||a!==D)&&i.addMatcher(o,a)}),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,d.default),o(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,k({},p.default.blotName,e[p.default.blotName]))}var i=this.prepareMatching(),o=r(i,2),a=o[0],l=o[1],u=function t(e,n,i){return e.nodeType===e.TEXT_NODE?i.reduce(function(t,n){return n(e,t)},new s.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(r,o){var a=t(o,n,i);return o.nodeType===e.ELEMENT_NODE&&(a=n.reduce(function(t,e){return e(o,t)},a),a=(o[x]||[]).reduce(function(t,e){return e(o,t)},a)),r.concat(a)},new s.default):new s.default}(this.container,a,l);return T(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new s.default).retain(u.length()-1).delete(1))),w.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,u.default.sources.SILENT);else{var i=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(i),n),this.quill.setSelection(t+i.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),i=(new s.default).retain(n.index),r=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout(function(){i=i.concat(e.convert()).delete(n.length),e.quill.updateContents(i,u.default.sources.USER),e.quill.setSelection(i.length()-n.length,u.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=r,e.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach(function(i){var o=r(i,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),function(t){t[x]=t[x]||[],t[x].push(s)})}}),[e,n]}}]),e}();function A(t,e,n){return"object"===(void 0===e?"undefined":i(e))?Object.keys(e).reduce(function(t,n){return A(t,n,e[n])},t):t.reduce(function(t,i){return i.attributes&&i.attributes[e]?t.push(i):t.insert(i.insert,(0,a.default)({},k({},e,n),i.attributes))},new s.default)}function C(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};return t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function T(t,e){for(var n="",i=t.ops.length-1;i>=0&&n.length<e.length;--i){var r=t.ops[i];if("string"!=typeof r.insert)break;n=r.insert+n}return n.slice(-1*e.length)===e}function P(t){if(0===t.childNodes.length)return!1;var e=C(t);return["block","list-item"].indexOf(e.display)>-1}function N(t,e,n){return A(n,t,!0)}function I(t,e){var n=l.default.Attributor.Attribute.keys(t),i=l.default.Attributor.Class.keys(t),r=l.default.Attributor.Style.keys(t),o={};return n.concat(i).concat(r).forEach(function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(t),o[n.attrName])||(null==(n=E[e])||n.attrName!==e&&n.keyName!==e||(o[n.attrName]=n.value(t)||void 0),null==(n=S[e])||n.attrName!==e&&n.keyName!==e||(n=S[e],o[n.attrName]=n.value(t)||void 0))}),Object.keys(o).length>0&&(e=A(e,o)),e}function L(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var i={},r=n.value(t);null!=r&&(i[n.blotName]=r,e=(new s.default).insert(i,n.formats(t)))}else"function"==typeof n.formats&&(e=A(e,n.blotName,n.formats(t)));return e}function M(t,e){return T(e,"\n")||(P(t)||e.length()>0&&t.nextSibling&&P(t.nextSibling))&&e.insert("\n"),e}function D(t,e){if(P(t)&&null!=t.nextElementSibling&&!T(e,"\n\n")){var n=t.offsetHeight+parseFloat(C(t).marginTop)+parseFloat(C(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function j(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!C(t.parentNode).whiteSpace.startsWith("pre")){var i=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,i.bind(i,!0)),(null==t.previousSibling&&P(t.parentNode)||null!=t.previousSibling&&P(t.previousSibling))&&(n=n.replace(/^\s+/,i.bind(i,!1))),(null==t.nextSibling&&P(t.parentNode)||null!=t.nextSibling&&P(t.nextSibling))&&(n=n.replace(/\s+$/,i.bind(i,!1)))}return e.insert(n)}O.DEFAULTS={matchers:[],matchVisual:!0},e.default=O,e.matchAttributor=I,e.matchBlot=L,e.matchNewline=M,e.matchSpacing=D,e.matchText=j},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(6),s=(i=a)&&i.__esModule?i:{default:i};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default),r(e,[{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}();l.blotName="bold",l.tagName=["STRONG","B"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=c(n(2)),a=c(n(0)),s=c(n(5)),l=c(n(10)),u=c(n(9));function c(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var f=(0,l.default)("quill:toolbar"),h=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r,o=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(o.options.container)){var a=document.createElement("div");v(a,o.options.container),t.container.parentNode.insertBefore(a,t.container),o.container=a}else"string"==typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach(function(t){o.addHandler(t,o.options.handlers[t])}),[].forEach.call(o.container.querySelectorAll("button, select"),function(t){o.attach(t)}),o.quill.on(s.default.events.EDITOR_CHANGE,function(t,e){t===s.default.events.SELECTION_CHANGE&&o.update(e)}),o.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){var t=o.quill.selection.getRange(),e=i(t,1)[0];o.update(e)}),o):(r=f.error("Container required for toolbar",o.options),d(o,r))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,u.default),r(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,function(t){return 0===t.indexOf("ql-")});if(n){if(n=n.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void f.warn("ignoring attaching to disabled format",n,t);if(null==a.default.query(n))return void f.warn("ignoring attaching to nonexistent format",n,t)}var r="SELECT"===t.tagName?"change":"click";t.addEventListener(r,function(r){var l=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var u=t.options[t.selectedIndex];l=!u.hasAttribute("selected")&&(u.value||!1)}else l=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),r.preventDefault();e.quill.focus();var c=e.quill.selection.getRange(),d=i(c,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,l);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(l=prompt("Enter "+n)))return;e.quill.updateContents((new o.default).retain(d.index).delete(d.length).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,l)),s.default.sources.USER)}else e.quill.format(n,l,s.default.sources.USER);e.update(d)}),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach(function(n){var r=i(n,2),o=r[0],a=r[1];if("SELECT"===a.tagName){var s=void 0;if(null==t)s=null;else if(null==e[o])s=a.querySelector("option[selected]");else if(!Array.isArray(e[o])){var l=e[o];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),s=a.querySelector('option[value="'+l+'"]')}null==s?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(null==t)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var u=e[o]===a.getAttribute("value")||null!=e[o]&&e[o].toString()===a.getAttribute("value")||null==e[o]&&!a.getAttribute("value");a.classList.toggle("ql-active",u)}else a.classList.toggle("ql-active",null!=e[o])})}}]),e}();function p(t,e,n){var i=document.createElement("button");i.setAttribute("type","button"),i.classList.add("ql-"+e),null!=n&&(i.value=n),t.appendChild(i)}function v(t,e){Array.isArray(e[0])||(e=[e]),e.forEach(function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach(function(t){if("string"==typeof t)p(n,t);else{var e=Object.keys(t)[0],i=t[e];Array.isArray(i)?function(t,e,n){var i=document.createElement("select");i.classList.add("ql-"+e),n.forEach(function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),i.appendChild(e)}),t.appendChild(i)}(n,e,i):p(n,e,i)}}),t.appendChild(n)})}h.DEFAULTS={},h.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach(function(e){null!=a.default.query(e,a.default.Scope.INLINE)&&t.quill.format(e,!1)})}else this.quill.removeFormat(e,s.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",s.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,s.default.sources.USER),this.quill.format("direction",t,s.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),i=parseInt(n.indent||0);if("+1"===t||"-1"===t){var r="+1"===t?1:-1;"rtl"===n.direction&&(r*=-1),this.quill.format("indent",i+r,s.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,s.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,s.default.sources.USER):this.quill.format("list","unchecked",s.default.sources.USER):this.quill.format("list",t,s.default.sources.USER)}}},e.default=h,e.addControls=v},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(28),s=(i=a)&&i.__esModule?i:{default:i};var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.label.innerHTML=n,i.container.classList.add("ql-color-picker"),[].slice.call(i.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(t){t.classList.add("ql-primary")}),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default),r(e,[{key:"buildItem",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var i=this.label.querySelector(".ql-color-label"),r=t&&t.getAttribute("data-value")||"";i&&("line"===i.tagName?i.style.stroke=r:i.style.fill=r)}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(28),a=(i=o)&&i.__esModule?i:{default:i};var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.container.classList.add("ql-icon-picker"),[].forEach.call(i.container.querySelectorAll(".ql-picker-item"),function(t){t.innerHTML=n[t.getAttribute("data-value")||""]}),i.defaultItem=i.container.querySelector(".ql-selected"),i.selectItem(i.defaultItem),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),r(e,[{key:"selectItem",value:function(t,n){(function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();var r=function(){function t(e,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){i.root.style.marginTop=-1*i.quill.root.scrollTop+"px"}),this.hide()}return i(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var i=this.boundsContainer.getBoundingClientRect(),r=this.root.getBoundingClientRect(),o=0;if(r.right>i.right&&(o=i.right-r.right,this.root.style.left=e+o+"px"),r.left<i.left&&(o=i.left-r.left,this.root.style.left=e+o+"px"),r.bottom>i.bottom){var a=r.bottom-r.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=h(n(3)),s=h(n(8)),l=n(43),u=h(l),c=h(n(27)),d=n(15),f=h(n(41));function h(t){return t&&t.__esModule?t:{default:t}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var g=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],y=function(t){function e(t,n){p(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var i=v(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.container.classList.add("ql-snow"),i}return m(e,u.default),o(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),f.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),f.default),this.tooltip=new b(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(e,n){t.handlers.link.call(t,!n.format.link)})}}]),e}();y.DEFAULTS=(0,a.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var b=function(t){function e(t,n){p(this,e);var i=v(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.preview=i.root.querySelector("a.ql-preview"),i}return m(e,l.BaseTooltip),o(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,s.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()}),this.quill.on(s.default.events.SELECTION_CHANGE,function(e,n,r){if(null!=e){if(0===e.length&&r===s.default.sources.USER){var o=t.quill.scroll.descendant(c.default,e.index),a=i(o,2),l=a[0],u=a[1];if(null!=l){t.linkRange=new d.Range(e.index-u,l.length());var f=c.default.formats(l.domNode);return t.preview.textContent=f,t.preview.setAttribute("href",f),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}})}},{key:"show",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}();b.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=D(n(29)),r=n(36),o=n(38),a=n(64),s=D(n(65)),l=D(n(66)),u=n(67),c=D(u),d=n(37),f=n(26),h=n(39),p=n(40),v=D(n(56)),m=D(n(68)),g=D(n(27)),y=D(n(69)),b=D(n(70)),k=D(n(71)),w=D(n(72)),x=D(n(73)),_=n(13),E=D(_),S=D(n(74)),O=D(n(75)),A=D(n(57)),C=D(n(41)),T=D(n(28)),P=D(n(59)),N=D(n(60)),I=D(n(61)),L=D(n(108)),M=D(n(62));function D(t){return t&&t.__esModule?t:{default:t}}i.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":r.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":p.SizeStyle},!0),i.default.register({"formats/align":r.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":h.FontClass,"formats/size":p.SizeClass,"formats/blockquote":s.default,"formats/code-block":E.default,"formats/header":l.default,"formats/list":c.default,"formats/bold":v.default,"formats/code":_.Code,"formats/italic":m.default,"formats/link":g.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":k.default,"formats/image":w.default,"formats/video":x.default,"formats/list/item":u.ListItem,"modules/formula":S.default,"modules/syntax":O.default,"modules/toolbar":A.default,"themes/bubble":L.default,"themes/snow":M.default,"ui/icons":C.default,"ui/picker":T.default,"ui/icon-picker":N.default,"ui/color-picker":P.default,"ui/tooltip":I.default},!0),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(0),s=(i=a)&&i.__esModule?i:{default:i};var l=new(function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default.Attributor.Class),r(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var i=this.value(t)||0;n="+1"===n?i+1:i-1}return 0===n?(this.remove(t),!0):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}())("indent","ql-indent",{scope:s.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(4),o=(i=r)&&i.__esModule?i:{default:i};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),e}();a.blotName="blockquote",a.tagName="blockquote",e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(4),a=(i=o)&&i.__esModule?i:{default:i};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),r(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}();s.blotName="header",s.tagName=["H1","H2","H3","H4","H5","H6"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=l(n(0)),a=l(n(4)),s=l(n(25));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,a.default),i(e,[{key:"format",value:function(t,n){t!==h.blotName||n?r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:r(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}();f.blotName="list-item",f.tagName="LI";var h=function(t){function e(t){u(this,e);var n=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),i=function(e){if(e.target.parentNode===t){var i=n.statics.formats(t),r=o.default.find(e.target);"checked"===i?r.format("list","unchecked"):"unchecked"===i&&r.format("list","checked")}};return t.addEventListener("touchstart",i),t.addEventListener("mousedown",i),n}return d(e,s.default),i(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",i=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||i.setAttribute("data-checked","checked"===t),i}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),i(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof f)r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var i=null==n?this.length():n.offset(this),o=this.split(i);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}();h.blotName="list",h.scope=o.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[f],e.ListItem=f,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(56),o=(i=r)&&i.__esModule?i:{default:i};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),e}();a.blotName="italic",a.tagName=["EM","I"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(6),a=(i=o)&&i.__esModule?i:{default:i};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),r(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}();s.blotName="script",s.tagName=["SUB","SUP"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(6),o=(i=r)&&i.__esModule?i:{default:i};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),e}();a.blotName="strike",a.tagName="S",e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(6),o=(i=r)&&i.__esModule?i:{default:i};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),e}();a.blotName="underline",a.tagName="U",e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(0),s=(i=a)&&i.__esModule?i:{default:i},l=n(27);var u=["alt","height","width"],c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default.Embed),r(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,l.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}();c.blotName="image",c.tagName="IMG",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(4),s=n(27),l=(i=s)&&i.__esModule?i:{default:i};var u=["height","width"],c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.BlockEmbed),r(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"sanitize",value:function(t){return l.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}();c.blotName="video",c.className="ql-video",c.tagName="IFRAME",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=s(n(35)),o=s(n(5)),a=s(n(9));function s(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var d=function(t){function e(){return l(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return c(e,r.default),i(e,null,[{key:"create",value:function(t){var n=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}();d.blotName="formula",d.className="ql-formula",d.tagName="SPAN";var f=function(t){function e(){l(this,e);var t=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return c(e,a.default),i(e,null,[{key:"register",value:function(){o.default.register(d,!0)}}]),e}();e.FormulaBlot=d,e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=l(n(0)),o=l(n(5)),a=l(n(9)),s=l(n(13));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,s.default),i(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}();f.className="ql-syntax";var h=new r.default.Attributor.Class("token","hljs",{scope:r.default.Scope.INLINE}),p=function(t){function e(t,n){u(this,e);var i=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof i.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var r=null;return i.quill.on(o.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(r),r=setTimeout(function(){i.highlight(),r=null},i.options.interval)}),i.highlight(),i}return d(e,a.default),i(e,null,[{key:"register",value:function(){o.default.register(h,!0),o.default.register(f,!0)}}]),i(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(o.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(f).forEach(function(e){e.highlight(t.options.highlight)}),this.quill.update(o.default.sources.SILENT),null!=e&&this.quill.setSelection(e,o.default.sources.SILENT)}}}]),e}();p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=f,e.CodeToken=h,e.default=p},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var i=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=d(n(3)),a=d(n(8)),s=n(43),l=d(s),u=n(15),c=d(n(41));function d(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var v=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],m=function(t){function e(t,n){f(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var i=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.container.classList.add("ql-bubble"),i}return p(e,l.default),r(e,[{key:"extendToolbar",value:function(t){this.tooltip=new g(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),c.default)}}]),e}();m.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var g=function(t){function e(t,n){f(this,e);var i=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i.quill.on(a.default.events.EDITOR_CHANGE,function(t,e,n,r){if(t===a.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&r===a.default.sources.USER){i.show(),i.root.style.left="0px",i.root.style.width="",i.root.style.width=i.root.offsetWidth+"px";var o=i.quill.getLines(e.index,e.length);if(1===o.length)i.position(i.quill.getBounds(e));else{var s=o[o.length-1],l=i.quill.getIndex(s),c=Math.min(s.length()-1,e.index+e.length-l),d=i.quill.getBounds(new u.Range(l,c));i.position(d)}}else document.activeElement!==i.textbox&&i.quill.hasFocus()&&i.hide()}),i}return p(e,s.BaseTooltip),r(e,[{key:"listen",value:function(){var t=this;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){t.root.classList.remove("ql-editing")}),this.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}();g.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=g,e.default=m},function(t,e,n){t.exports=n(63)}]).default}),function(){"use strict";function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}"".trim||(String.prototype.trim=function(){return this.replace(/^[\s]+|[\s]+$/g,"")}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],r=0;r<n;){var o=e[r];if(t.call(i,o,r,e))return r;r++}return-1},configurable:!0,writable:!0}),String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),i=1;i<arguments.length;i++){var r=arguments[i];if(null!=r)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n},writable:!0,configurable:!0}),t.prototype=window.Event.prototype,"function"!=typeof window.CustomEvent&&(window.CustomEvent=t),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}),document.execCommand("AutoUrlDetect",!1,!1),"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(t){if("Element"in t){var e="classList",n="prototype",i=t.Element[n],r=Object,o=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},a=Array[n].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},s=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},l=function(t,e){if(""===e)throw new s("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(e))throw new s("INVALID_CHARACTER_ERR","The token must not contain space characters.");return a.call(t,e)},u=function(t){for(var e=o.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,r=n.length;i<r;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},c=u[n]=[],d=function(){return new u(this)};if(s[n]=Error[n],c.item=function(t){return this[t]||null},c.contains=function(t){return~l(this,t+"")},c.add=function(){for(var t,e=arguments,n=0,i=e.length,r=!1;~l(this,t=e[n]+"")||(this.push(t),r=!0),++n<i;);r&&this._updateClassName()},c.remove=function(){var t,e,n=arguments,i=0,r=n.length,o=!1;do{for(e=l(this,t=n[i]+"");~e;)this.splice(e,1),o=!0,e=l(this,t)}while(++i<r);o&&this._updateClassName()},c.toggle=function(t,e){var n=this.contains(t),i=n?!0!==e&&"remove":!1!==e&&"add";return i&&this[i](t),!0===e||!1===e?e:!n},c.replace=function(t,e){var n=l(t+"");~n&&(this.splice(n,1,e),this._updateClassName())},c.toString=function(){return this.join(" ")},r.defineProperty){var f={get:d,enumerable:!0,configurable:!0};try{r.defineProperty(i,e,f)}catch(t){void 0!==t.number&&-2146823252!==t.number||(f.enumerable=!1,r.defineProperty(i,e,f))}}else r[n].__defineGetter__&&i.__defineGetter__(e,d)}}(self),function(){var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;n<i;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(t,e){var n=this.toString().split(" "),i=n.indexOf(t+"");~i&&(n=n.slice(i),this.remove.apply(this,n),this.add(e),this.add.apply(this,n.slice(1)))}),t=null}()),window.Promise=function(){function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},n=0,i=void 0,r=void 0,o=function(t,e){f[n]=t,f[n+1]=e,2===(n+=2)&&(r?r(h):p())};var a="undefined"!=typeof window?window:void 0,s=a||{},l=s.MutationObserver||s.WebKitMutationObserver,u="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),c="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(h,1)}}var f=new Array(1e3);function h(){for(var t=0;t<n;t+=2){(0,f[t])(f[t+1]),f[t]=void 0,f[t+1]=void 0}n=0}var p=void 0;function v(t,e){var n=this,i=new this.constructor(y);void 0===i[g]&&N(i);var r=n._state;if(r){var a=arguments[r-1];o(function(){return T(r,i,a,n._result)})}else A(n,i,t,e);return i}function m(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(y);return _(e,t),e}p=u?function(){return process.nextTick(h)}:l?function(){var t=0,e=new l(h),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():c?function(){var t=new MessageChannel;return t.port1.onmessage=h,function(){return t.port2.postMessage(0)}}():void 0===a&&"function"==typeof require?function(){try{var t=Function("return this")().require("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(h)}:d()}catch(t){return d()}}():d();var g=Math.random().toString(36).substring(2);function y(){}var b=void 0,k=1,w=2;function x(e,n,i){n.constructor===e.constructor&&i===v&&n.constructor.resolve===m?function(t,e){e._state===k?S(t,e._result):e._state===w?O(t,e._result):A(e,void 0,function(e){return _(t,e)},function(e){return O(t,e)})}(e,n):void 0===i?S(e,n):t(i)?function(t,e,n){o(function(t){var i=!1,r=function(t,e,n,i){try{t.call(e,n,i)}catch(t){return t}}(n,e,function(n){i||(i=!0,e!==n?_(t,n):S(t,n))},function(e){i||(i=!0,O(t,e))},t._label);!i&&r&&(i=!0,O(t,r))},t)}(e,n,i):S(e,n)}function _(t,e){if(t===e)O(t,new TypeError("You cannot resolve a promise with itself"));else if(function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}(e)){var n=void 0;try{n=e.then}catch(e){return void O(t,e)}x(t,e,n)}else S(t,e)}function E(t){t._onerror&&t._onerror(t._result),C(t)}function S(t,e){t._state===b&&(t._result=e,t._state=k,0!==t._subscribers.length&&o(C,t))}function O(t,e){t._state===b&&(t._state=w,t._result=e,o(E,t))}function A(t,e,n,i){var r=t._subscribers,a=r.length;t._onerror=null,r[a]=e,r[a+k]=n,r[a+w]=i,0===a&&t._state&&o(C,t)}function C(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var i=void 0,r=void 0,o=t._result,a=0;a<e.length;a+=3)i=e[a],r=e[a+n],i?T(n,i,r,o):r(o);t._subscribers.length=0}}function T(e,n,i,r){var o=t(i),a=void 0,s=void 0,l=!0;if(o){try{a=i(r)}catch(e){l=!1,s=e}if(n===a)return void O(n,new TypeError("A promises callback cannot return that same promise."))}else a=r;n._state!==b||(o&&l?_(n,a):!1===l?O(n,s):e===k?S(n,a):e===w&&O(n,a))}var P=0;function N(t){t[g]=P++,t._state=void 0,t._result=void 0,t._subscribers=[]}var I=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(y),this.promise[g]||N(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&S(this.promise,this._result))):O(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===b&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function t(e,n){var i=this._instanceConstructor,r=i.resolve;if(r===m){var o=void 0,a=void 0,s=!1;try{o=e.then}catch(t){s=!0,a=t}if(o===v&&e._state!==b)this._settledAt(e._state,n,e._result);else if("function"!=typeof o)this._remaining--,this._result[n]=e;else if(i===L){var l=new i(y);s?O(l,a):x(l,e,o),this._willSettleAt(l,n)}else this._willSettleAt(new i(function(t){return t(e)}),n)}else this._willSettleAt(r(e),n)},t.prototype._settledAt=function(t,e,n){var i=this.promise;i._state===b&&(this._remaining--,t===w?O(i,n):this._result[e]=n),0===this._remaining&&S(i,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;A(t,void 0,function(t){return n._settledAt(k,e,t)},function(t){return n._settledAt(w,e,t)})},t}();var L=function(){function e(t){this[g]=P++,this._result=this._state=void 0,this._subscribers=[],y!==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(t,e){try{e(function(e){_(t,e)},function(e){O(t,e)})}catch(e){O(t,e)}}(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(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this,i=n.constructor;return t(e)?n.then(function(t){return i.resolve(e()).then(function(){return t})},function(t){return i.resolve(e()).then(function(){throw t})}):n.then(e,e)},e}();return L.prototype.then=v,L.all=function(t){return new I(this,t).promise},L.race=function(t){var n=this;return e(t)?new n(function(e,i){for(var r=t.length,o=0;o<r;o++)n.resolve(t[o]).then(e,i)}):new n(function(t,e){return e(new TypeError("You must pass an array to race."))})},L.resolve=m,L.reject=function(t){var e=new this(y);return O(e,t),e},L._setScheduler=function(t){r=t},L._setAsap=function(t){o=t},L._asap=o,L.polyfill=function(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=L},L.Promise=L}()}(),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.Tagify=e()}(this,function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function e(e){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?t(r,!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var r="undefined"!=typeof InstallTrigger;function o(t){var e=Object.prototype.toString.call(t).split(" ")[1].slice(0,-1);return t===Object(t)&&"Array"!=e&&"Function"!=e&&"RegExp"!=e&&"HTMLUnknownElement"!=e}function a(t){var e=document.createElement("div");return t.replace(/\&#?[0-9a-z]+;/gi,function(t){return e.innerHTML=t,e.innerText})}function s(t){return(new DOMParser).parseFromString(t.trim(),"text/html").body.firstElementChild}function l(t){return t?t.replace(/\>[\r\n ]+\</g,"><").replace(/(<.*?>)|\s+/g,function(t,e){return e||" "}):""}function u(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/`|'/g,"&#039;")}function c(t,e,n){function i(t,e){for(var n in e)e.hasOwnProperty(n)&&(o(e[n])?o(t[n])?i(t[n],e[n]):t[n]=Object.assign({},e[n]):t[n]=e[n])}return t instanceof Object||(t={}),i(t,e),n&&i(t,n),t}function d(t){return String.prototype.normalize?"string"==typeof t?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}function f(t,e){if(!t)return console.warn("Tagify: ","invalid input element ",t),this;this.applySettings(t,e||{}),this.state={editing:!1,actions:{},mixMode:{},dropdown:{},flaggedTags:{}},this.value=[],this.listeners={},this.DOM={},c(this,new this.EventDispatcher(this)),this.build(t),this.getCSSVars(),this.loadOriginalValues(),this.events.customBinding.call(this),this.events.binding.call(this),t.autofocus&&this.DOM.input.focus()}return(f.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,accentedSearch:!0,highlightFirst:!1,closeOnSelect:!0,position:"all"},hooks:{beforeRemoveTag:function(){return Promise.resolve()}}},templates:{wrapper:function(t,e){return'<tags class="tagify '.concat(e.mode?"tagify--"+e.mode:""," ").concat(t.className,'"\n                        ').concat(e.readonly?"readonly":"",'\n                        tabIndex="-1">\n                <span contenteditable data-placeholder="').concat(e.placeholder||"&#8203;",'" aria-placeholder="').concat(e.placeholder||"",'"\n                    class="tagify__input"\n                    role="textbox"\n                    aria-autocomplete="both"\n                    aria-multiline="').concat("mix"==e.mode,'"></span>\n            </tags>')},tag:function(t,e){return'<tag title="'.concat(e.title||t,"\"\n                        contenteditable='false'\n                        spellcheck='false'\n                        tabIndex=\"-1\"\n                        class=\"tagify__tag ").concat(e.class?e.class:"",'"\n                        ').concat(this.getAttributes(e),">\n                <x title='' class='tagify__tag__removeBtn' role='button' aria-label='remove tag'></x>\n                <div>\n                    <span class='tagify__tag-text'>").concat(t,"</span>\n                </div>\n            </tag>")},dropdown:function(t){var e=t.dropdown,n="".concat("manual"==e.position?"":"tagify__dropdown tagify__dropdown--".concat(e.position)," ").concat(e.classname).trim();return'<div class="'.concat(n,'" role="listbox" aria-labelledby="dropdown">\n                        <div class="tagify__dropdown__wrapper"></div>\n                    </div>')},dropdownItem:function(t){return"<div ".concat(this.getAttributes(t),"\n                        class='tagify__dropdown__item ").concat(t.class?t.class:"",'\'\n                        tabindex="0"\n                        role="option">').concat(t.value,"</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(t,e){var n=this;if(this.DEFAULTS.templates=this.templates,this.settings=c({},this.DEFAULTS,e),this.settings.readonly=t.hasAttribute("readonly"),this.settings.placeholder=t.getAttribute("placeholder")||this.settings.placeholder||"",this.isIE&&(this.settings.autoComplete=!1),["whitelist","blacklist"].forEach(function(e){var i=t.getAttribute("data-"+e);i&&(i=i.split(n.settings.delimiters))instanceof Array&&(n.settings[e]=i)}),"autoComplete"in e&&!o(e.autoComplete)&&(this.settings.autoComplete=this.DEFAULTS.autoComplete,this.settings.autoComplete.enabled=e.autoComplete),t.pattern)try{this.settings.pattern=new RegExp(t.pattern)}catch(e){}if(this.settings.delimiters)try{this.settings.delimiters=new RegExp(this.settings.delimiters,"g")}catch(e){}"select"==this.settings.mode&&(this.settings.dropdown.enabled=0),"mix"==this.settings.mode&&(this.settings.autoComplete.rightKey=!0)},getAttributes:function(t){if("[object Object]"!=Object.prototype.toString.call(t))return"";var e,n,i=Object.keys(t),r="";for(n=i.length;n--;)"class"!=(e=i[n])&&t.hasOwnProperty(e)&&t[e]&&(r+=" "+e+(t[e]?'="'.concat(t[e],'"'):""));return r},getCaretGlobalPosition:function(){var t=document.getSelection();if(t.rangeCount){var e,n,i=t.getRangeAt(0),r=i.startContainer,o=i.startOffset;return 0<o?((n=document.createRange()).setStart(r,o-1),n.setEnd(r,o),{left:(e=n.getBoundingClientRect()).right,top:e.top,bottom:e.bottom}):r.getBoundingClientRect()}return{left:-9999,top:-9999}},getCSSVars:function(){var t,e,n=getComputedStyle(this.DOM.scope,null);this.CSSVars={tagHideTransition:(t=function(t){if(!t)return{};var e=(t=t.trim().split(" ")[0]).split(/\d+/g).filter(function(t){return t}).pop().trim();return{value:+t.split(e).filter(function(t){return t})[0].trim(),unit:e}}(("tag-hide-transition",n.getPropertyValue("--tag-hide-transition"))),e=t.value,"s"==t.unit?1e3*e:e)}},build:function(t){var e=this.DOM,n=this.settings.templates.wrapper(t,this.settings);e.originalInput=t,e.scope=s(n),e.input=e.scope.querySelector("[contenteditable]"),t.parentNode.insertBefore(e.scope,t),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),clearTimeout(this.dropdownHide__bindEventsTimeout)},loadOriginalValues:function(t){if(t=t||this.DOM.originalInput.value)if(this.removeAllTags(),"mix"==this.settings.mode)this.parseMixTags(t.trim());else{try{"string"!=typeof JSON.parse(t)&&(t=JSON.parse(t))}catch(t){}this.addTags(t).forEach(function(t){return t&&t.classList.add("tagify--noAnim")})}},cloneEvent:function(t){var e={};for(var n in t)e[n]=t[n];return e},EventDispatcher:function(t){var e=document.createTextNode("");function n(t,n,i){i&&n.split(/\s+/g).forEach(function(n){return e[t+"EventListener"].call(e,n,i)})}this.off=function(t,e){return n("remove",t,e),this},this.on=function(t,e){return e&&"function"==typeof e&&n("add",t,e),this},this.trigger=function(n,i){var r;if(n)if(t.settings.isJQueryPlugin)"remove"==n&&(n="removeTag"),jQuery(t.DOM.originalInput).triggerHandler(n,[i]);else{try{var o=c({},i);o.tagify=this,r=new CustomEvent(n,{detail:o})}catch(n){console.warn(n)}e.dispatchEvent(r)}}},loading:function(t){return this.state.isLoading=t,this.DOM.scope.classList[t?"add":"remove"]("tagify--loading"),this},toggleFocusClass:function(t){this.DOM.scope.classList.toggle("tagify--focus",!!t)},events:{customBinding:function(){var t=this;this.customEventsList.forEach(function(e){t.on(e,t.settings.callbacks[e])})},binding:function(t){var e,n=!(0<arguments.length&&void 0!==t)||t,i=this.events.callbacks,r=n?"addEventListener":"removeEventListener";if(!this.state.mainEvents||!n)for(var o 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))),e=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)],paste:["input",i.onPaste.bind(this)]})"blur"==o&&!n||this.DOM[e[o][0]][r](o,e[o][1])},callbacks:{onFocusBlur:function(t){var e=t.target?t.target.textContent.trim():"",n=this.settings,i=t.type,r=0<=n.dropdown.enabled,o={relatedTarget:t.relatedTarget},a=t.relatedTarget&&t.relatedTarget.classList.contains("tagify__tag")&&this.DOM.scope.contains(t.relatedTarget),s=this.state.actions.selectOption&&(r||!n.dropdown.closeOnSelect),l=this.state.actions.addNew&&r;if(!a){if("blur"==i&&t.relatedTarget===this.DOM.scope)return this.dropdown.hide.call(this),void this.DOM.input.focus();if(!s&&!l)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",o),void(0===n.dropdown.enabled&&this.dropdown.show.call(this));"blur"==i&&(this.trigger("blur",o),this.loading(!1),("select"==this.settings.mode?!this.value.length||this.value[0].value!=e:e&&!this.state.actions.selectOption&&n.addTagOnBlur)&&this.addTags(e,!0)),this.DOM.input.removeAttribute("style"),this.dropdown.hide.call(this)}else if("focus"==i){if(this.fixFirefoxLastTagNoCaret())return;this.trigger("focus",o)}else"blur"==t.type&&(this.trigger("blur",o),this.loading(!1),this.dropdown.hide.call(this),this.state.dropdown.visible=void 0)}},onKeydown:function(t){var e=this,n=t.target.textContent.trim();if(this.trigger("keydown",{originalEvent:this.cloneEvent(t)}),"mix"==this.settings.mode){switch(t.key){case"Left":case"ArrowLeft":this.state.actions.ArrowLeft=!0;break;case"Delete":case"Backspace":if(this.state.editing)return;var i=document.getSelection(),r="Delete"==t.key&&i.anchorOffset==i.anchorNode.length,o=1==i.anchorNode.nodeType||!i.anchorOffset&&i.anchorNode.previousElementSibling,s=a(this.DOM.input.innerHTML),l=this.getTagElms();if(3==i.anchorNode.nodeType&&!i.anchorNode.nodeValue&&i.anchorNode.previousElementSibling&&t.preventDefault(),(o||r)&&!this.settings.backspace)return void t.preventDefault();setTimeout(function(){var t=a(e.DOM.input.innerHTML);if((i.anchorNode==e.DOM.input&&t.length==s.length||!i.anchorOffset&&t.length>=s.length)&&(e.removeTags(i.anchorNode.previousElementSibling),e.fixFirefoxLastTagNoCaret(),2==e.DOM.input.children.length&&"BR"==e.DOM.input.children[1].tagName))return e.DOM.input.innerHTML="",!(e.value.length=0);e.value=[].map.call(l,function(t,n){var i=t.__tagifyTagData;if(t.parentNode)return i;e.trigger("remove",{tag:t,index:n,data:i})}).filter(function(t){return t})},50)}return!0}switch(t.key){case"Backspace":this.state.dropdown.visible||""!=n&&8203!=n.charCodeAt(0)||(!0===this.settings.backspace?this.removeTags():"edit"==this.settings.backspace&&setTimeout(this.editTag.bind(this),0));break;case"Esc":case"Escape":if(this.state.dropdown.visible)return;t.target.blur();break;case"Down":case"ArrowDown":this.state.dropdown.visible||this.dropdown.show.call(this);break;case"ArrowRight":var u=this.state.inputSuggestion||this.state.ddItemData;if(u&&this.settings.autoComplete.rightKey)return void this.addTags([u],!0);break;case"Tab":if(!n||"select"==this.settings.mode)return!0;case"Enter":t.preventDefault(),setTimeout(function(){e.state.actions.selectOption||e.addTags(n,!0)})}},onInput:function(t){var e=this.input.normalize.call(this),n=e.length>=this.settings.dropdown.enabled,i={value:e,inputElm:this.DOM.input};if("mix"==this.settings.mode)return this.events.callbacks.onMixTagsInput.call(this,t);i.isValid=this.validateTag({value:e}),this.trigger("input",i),e?this.input.value!=e&&(this.input.set.call(this,e,!1),-1!=e.search(this.settings.delimiters)?this.addTags(e)&&this.input.set.call(this):0<=this.settings.dropdown.enabled&&this.dropdown[n?"show":"hide"].call(this,e)):this.input.set.call(this,"")},onMixTagsInput:function(){var t,e,n,i,r,o,a,s,l=this,u=this.settings;if(this.value.length<this.getTagElms().length)return this.value=[].map.call(this.getTagElms(),function(t){return t.__tagifyTagData}),void this.update();if(this.hasMaxTags())return!0;if(window.getSelection&&0<(a=window.getSelection()).rangeCount&&3==a.anchorNode.nodeType){if((t=a.getRangeAt(0).cloneRange()).collapse(!0),t.setStart(a.focusNode,0),i=(e=t.toString().slice(0,t.endOffset)).split(u.pattern).length-1,(n=e.match(u.pattern))&&(r=e.slice(e.lastIndexOf(n[n.length-1]))),r){this.state.actions.ArrowLeft=!1,this.state.tag={prefix:r.match(u.pattern)[0],value:r.replace(u.pattern,"")},this.state.tag.baseOffset=a.baseOffset-this.state.tag.value.length,o=this.state.tag.value.length>=u.dropdown.enabled;try{s=(s=this.state.flaggedTags[this.state.tag.baseOffset]).prefix==this.state.tag.prefix&&s.value[0]==this.state.tag.value[0],this.state.flaggedTags[this.state.tag.baseOffset]&&!this.state.tag.value&&delete this.state.flaggedTags[this.state.tag.baseOffset]}catch(t){}(s||i<this.state.mixMode.matchedPatternCount)&&(o=!1)}else this.state.flaggedTags={};this.state.mixMode.matchedPatternCount=i}setTimeout(function(){l.update(),l.trigger("input",c({},l.state.tag,{textContent:l.DOM.input.textContent})),l.state.tag&&l.dropdown[o?"show":"hide"].call(l,l.state.tag.value)},10)},onInputIE:function(t){var e=this;setTimeout(function(){e.events.callbacks.onInput.call(e,t)})},onClickScope:function(t){var e=t.target.closest(".tagify__tag"),n=this.settings,i=new Date-this.state.hasFocus;if(t.target!=this.DOM.scope){if(!t.target.classList.contains("tagify__tag__removeBtn"))return e?(this.trigger("click",{tag:e,index:this.getNodeIndex(e),data:this.tagData(e),originalEvent:this.cloneEvent(t)}),void(1==this.settings.editTags&&this.events.callbacks.onDoubleClickScope.call(this,t))):void(t.target==this.DOM.input&&500<i?this.state.dropdown.visible?this.dropdown.hide.call(this):0===n.dropdown.enabled&&"mix"!=n.mode&&this.dropdown.show.call(this):"select"==n.mode&&(this.state.dropdown.visible||this.dropdown.show.call(this)));this.removeTags(t.target.parentNode)}else this.DOM.input.focus()},onPaste:function(t){var e;"mix"!=this.settings.mode&&(t.preventDefault(),e=(t.clipboardData||window.clipboardData).getData("Text"),this.input.set.call(this,e))},onEditTagInput:function(t,e){var n=t.closest(".tagify__tag"),i=this.getNodeIndex(n),r=this.input.normalize.call(this,t),o=r!=t.originalValue,a=this.validateTag({value:r});o||!0!==t.originalIsValid||(a=!0),n.classList.toggle("tagify--invalid",!0!==a),n.__tagifyTagData.__isValid=a,r.length>=this.settings.dropdown.enabled&&(this.state.editing.value=r,this.dropdown.show.call(this,r)),this.trigger("edit:input",{tag:n,index:i,data:c({},this.value[i],{newValue:r}),originalEvent:this.cloneEvent(e)})},onEditTagFocus:function(t){this.state.editing={scope:t,input:t.querySelector("[contenteditable]")}},onEditTagBlur:function(t){if(this.state.editing=!1,this.state.hasFocus||this.toggleFocusClass(),this.DOM.scope.contains(t)){var e=t.closest(".tagify__tag"),n=this.input.normalize.call(this,t),i=n,r=i!=t.originalValue,o=c({},e.__tagifyTagData,{value:i}),a=this.validateTag(o);if(!n)return this.removeTags(e),void this.onEditTagDone(null,o);r?(this.settings.transformTag.call(this,o),!0===(a=this.validateTag(o))?this.onEditTagDone(e,o):this.trigger("invalid",{data:o,tag:e,message:a})):this.onEditTagDone(e,o)}},onEditTagkeydown:function(t,e){switch(this.trigger("edit:keydown",{originalEvent:this.cloneEvent(t)}),t.key){case"Esc":case"Escape":t.target.textContent=t.target.originalValue,e.__tagifyTagData=e.__tagifyTagData.__originalData;case"Enter":case"Tab":t.preventDefault(),t.target.blur()}},onDoubleClickScope:function(t){var e,n,i=t.target.closest("tag"),r=this.settings;i&&(e=i.classList.contains("tagify__tag--editable"),n=i.hasAttribute("readonly"),"select"==r.mode||r.readonly||e||n||!this.settings.editTags||this.editTag(i),this.toggleFocusClass(!0),this.trigger("dblclick",{tag:i,index:this.getNodeIndex(i),data:this.tagData(i)}))}}},fixFirefoxLastTagNoCaret:function(){var t=this.DOM.input;if(r&&t.childNodes.length&&1==t.lastChild.nodeType)return t.appendChild(document.createTextNode("")),this.setRangeAtStartEnd(!0),!0},editTag:function(t,e){var n=this;e=e||{};var i=(t=t||this.getLastTag()).querySelector(".tagify__tag-text"),r=this.getNodeIndex(t),o=t.__tagifyTagData,a=this.events.callbacks,s=this,l=!0;if(i){if(!(o instanceof Object&&"editable"in o)||o.editable)return t.__tagifyTagData.__originalData=c({},o),t.classList.add("tagify__tag--editable"),i.originalValue=i.textContent,i.setAttribute("contenteditable",!0),i.addEventListener("focus",a.onEditTagFocus.bind(this,t)),i.addEventListener("blur",function(){setTimeout(a.onEditTagBlur.bind(s),0,i)}),i.addEventListener("input",a.onEditTagInput.bind(this,i)),i.addEventListener("keydown",function(e){return a.onEditTagkeydown.call(n,e,t)}),i.focus(),this.setRangeAtStartEnd(!1,i),e.skipValidation||(l=this.editTagToggleValidity(t,o.value)),i.originalIsValid=l,this.trigger("edit:start",{tag:t,index:r,data:o,isValid:l}),this}else console.warn("Cannot find element in Tag template: ",".tagify__tag-text")},editTagToggleValidity:function(t){var e,n=t.__tagifyTagData;if(n)return e=!(!n.__isValid||1==n.__isValid),t.classList.toggle("tagify--invalid",e),n.__isValid;console.warn("tag has no data: ",t,n)},onEditTagDone:function(t,e){var n=this;e=e||{};var i={tag:t,index:this.getNodeIndex(t),data:e};this.trigger("edit:beforeUpdate",i),delete e.__originalData,t&&(this.editTagToggleValidity(t),this.replaceTag(t,e)),this.trigger("edit:updated",i),this.dropdown.hide.call(this),!0===e.__isValid&&this.getTagElms("tagify--notAllowed").forEach(function(t){var e=n.validateTag(t.__tagifyTagData);!0===e&&(t.__tagifyTagData.__isValid=e,n.replaceTag(t))})},replaceTag:function(t,e){e&&e.value||(e=t.__tagifyTagData),e.__isValid&&1!=e.__isValid&&c(e,this.getInvaildTagParams(e,e.__isValid));var n=this.createTagElem(e);t.parentNode.replaceChild(n,t),this.updateValueByDOMTags()},updateValueByDOMTags:function(){var t=this;this.value.length=0,[].forEach.call(this.getTagElms(),function(e){e.classList.contains("tagify--notAllowed")||t.value.push(e.__tagifyTagData)}),this.update()},setRangeAtStartEnd:function(t,e){e=(e=e||this.DOM.input).lastChild||e;var n=document.getSelection();n.rangeCount&&["Start","End"].forEach(function(i){return n.getRangeAt(0)["set"+i](e,t?0:e.length)})},input:{value:"",set:function(t,e){var n=0<arguments.length&&void 0!==t?t:"",i=!(1<arguments.length&&void 0!==e)||e,r=this.settings.dropdown.closeOnSelect;this.input.value=n,i&&(this.DOM.input.innerHTML=n),!n&&r&&setTimeout(this.dropdown.hide.bind(this),20),this.input.autocomplete.suggest.call(this),this.input.validate.call(this),this.setRangeAtStartEnd()},validate:function(){var t=!this.input.value||this.validateTag({value:this.input.value});"select"==this.settings.mode?this.DOM.scope.classList.toggle("tagify--invalid",!0!==t):this.DOM.input.classList.toggle("tagify__input--invalid",!0!==t)},normalize:function(t){var e=t||this.DOM.input,n=[];e.childNodes.forEach(function(t){return 3==t.nodeType&&n.push(t.nodeValue)}),n=n.join("\n");try{n=n.replace(/(?:\r\n|\r|\n)/g,this.settings.delimiters.source.charAt(0))}catch(t){}return n=n.replace(/\s/g," ").replace(/^\s+/,"")},autocomplete:{suggest:function(t){if(this.settings.autoComplete.enabled){"string"==typeof(t=t||{})&&(t={value:t});var e=t.value||"",n=e.substr(0,this.input.value.length).toLowerCase(),i=e.substring(this.input.value.length);e&&this.input.value&&n==this.input.value.toLowerCase()?(this.DOM.input.setAttribute("data-suggest",i),this.state.inputSuggestion=t):(this.DOM.input.removeAttribute("data-suggest"),delete this.state.inputSuggestion)}},set:function(t){var e=this.DOM.input.getAttribute("data-suggest"),n=t||(e?this.input.value+e: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)}}},getTagIdx:function(t){return this.value.findIndex(function(e){return JSON.stringify(e)==JSON.stringify(t)})},getNodeIndex:function(t){var e=0;if(t)for(;t=t.previousElementSibling;)e++;return e},getTagElms:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=[".tagify__tag"].concat(e).join(".");return this.DOM.scope.querySelectorAll(i)},getLastTag:function(){var t=this.DOM.scope.querySelectorAll("tag:not(.tagify--hide):not([readonly])");return t[t.length-1]},tagData:function(t,e){return e&&(t.__tagifyTagData=c({},t.__tagifyTagData||{},e)),t.__tagifyTagData},isTagDuplicate:function(t){return"select"!=this.settings.mode&&this.value.reduce(function(e,n){return t.trim().toLowerCase()===n.value.toLowerCase()?e+1:e},0)},getTagIndexByValue:function(t){var e=[];return this.getTagElms().forEach(function(n,i){n.textContent.trim().toLowerCase()==t.toLowerCase()&&e.push(i)}),e},getTagElmByValue:function(t){var e=this.getTagIndexByValue(t)[0];return this.getTagElms()[e]},markTagByValue:function(t,e){return!!(e=e||this.getTagElmByValue(t))&&(e.classList.add("tagify--mark"),setTimeout(function(){e.classList.remove("tagify--mark")},100),e)},isTagBlacklisted:function(t){return t=t.toLowerCase().trim(),this.settings.blacklist.filter(function(e){return t==e.toLowerCase()}).length},isTagWhitelisted:function(t){return this.settings.whitelist.some(function(e){return"string"==typeof t?t.trim().toLowerCase()===(e.value||e).toLowerCase():JSON.stringify(e).toLowerCase()===JSON.stringify(t).toLowerCase()})},validateTag:function(t){var e=t.value.trim(),n=this.settings,i=!0;return e?n.pattern&&n.pattern instanceof RegExp&&!n.pattern.test(e)?i=this.TEXTS.pattern:!n.duplicates&&this.isTagDuplicate(e)?i=this.TEXTS.duplicate:(this.isTagBlacklisted(e)||n.enforceWhitelist&&!this.isTagWhitelisted(e))&&(i=this.TEXTS.notAllowed):i=this.TEXTS.empty,i},getInvaildTagParams:function(t,e){return{"aria-invalid":!0,class:(t.class||"")+" tagify--notAllowed",title:e}},hasMaxTags:function(){return this.value.length>=this.settings.maxTags&&this.TEXTS.exceed},normalizeTags:function(t){function n(t){return(t+"").split(s).filter(function(t){return t}).map(function(t){return{value:t.trim()}})}var r,o=this.settings,a=o.whitelist,s=o.delimiters,l=o.mode,u=!!a&&a[0]instanceof Object,c=t instanceof Array,d=c&&t[0]instanceof Object&&"value"in t[0],f=[];if(d)return(r=[]).concat.apply(r,i(t.map(function(t){return n(t.value).map(function(n){return e(e({},t),n)})})));if("number"==typeof t&&(t=t.toString()),"string"==typeof t){if(!t.trim())return[];t=n(t)}else if(c){var h;t=(h=[]).concat.apply(h,i(t.map(function(t){return n(t)})))}return u&&(t.forEach(function(t){var e=a.filter(function(e){return e.value.toLowerCase()==t.value.toLowerCase()});e[0]?f.push(e[0]):"mix"!=l&&f.push(t)}),f.length&&(t=f)),t},parseMixTags:function(t){var e=this,n=this.settings,i=n.mixTagsInterpolator,r=n.duplicates,o=n.transformTag,a=n.enforceWhitelist,s=[];return t=t.split(i[0]).map(function(t,n){var l,u,c=t.split(i[1]),d=c[0];try{l=JSON.parse(d)}catch(t){l=e.normalizeTags(d)[0]}if(!(1<c.length)||a&&!e.isTagWhitelisted(l.value)||!r&&e.isTagDuplicate(l.value)){if(t)return n?i[0]+t:t}else o.call(e,l),u=e.createTagElem(l),s.push(l),u.classList.add("tagify--noAnim"),c[0]=u.outerHTML,e.value.push(l);return c.join("")}).join(""),this.DOM.input.innerHTML=t,this.DOM.input.appendChild(document.createTextNode("")),this.DOM.input.normalize(),this.getTagElms().forEach(function(t,e){return t.__tagifyTagData=s[e]}),this.update(),t},replaceTextWithNode:function(t,e){if(this.state.tag||e){e=e||this.state.tag.prefix+this.state.tag.value;var n,i,r=this.state.selection||window.getSelection(),o=r.anchorNode;return o.splitText(r.anchorOffset),n=o.nodeValue.lastIndexOf(e),(i=o.splitText(n)).nodeValue=i.nodeValue.replace(e,""),o.parentNode.insertBefore(t,i),this.DOM.input.normalize(),i}},selectTag:function(t,e){if(!this.settings.enforceWhitelist||this.isTagWhitelisted(e.value))return this.input.set.call(this,e.value,!0),this.state.actions.selectOption&&setTimeout(this.setRangeAtStartEnd.bind(this)),this.getLastTag()?this.replaceTag(this.getLastTag(),e):this.appendTag(t),this.value[0]=e,this.trigger("add",{tag:t,data:e}),this.update(),[t]},addEmptyTag:function(){var t={value:""},e=this.createTagElem(t);e.__tagifyTagData=t,this.appendTag(e),this.editTag(e,{skipValidation:!0})},addTags:function(t,e,n){var i,r=this,o=2<arguments.length&&void 0!==n?n:this.settings.skipInvalid,a=[],s=this.settings;return t&&0!=t.length?(t=this.normalizeTags(t),"mix"==s.mode?(s.transformTag.call(this,t[0]),i=this.createTagElem(t[0]),this.replaceTextWithNode(i)||this.DOM.input.appendChild(i),setTimeout(function(){return i.classList.add("tagify--noAnim")},300),t[0].prefix=t[0].prefix||this.state.tag?this.state.tag.prefix:(s.pattern.source||s.pattern)[0],this.value.push(t[0]),this.update(),this.state.tag=null,this.trigger("add",c({},{tag:i},{data:t[0]})),this.fixFirefoxLastTagNoCaret(),i):("select"==s.mode&&(e=!1),this.DOM.input.removeAttribute("style"),t.forEach(function(t){var e,n={};if(t=Object.assign({},t),s.transformTag.call(r,t),t.__isValid=r.hasMaxTags()||r.validateTag(t),!0!==t.__isValid){if(o)return;c(n,r.getInvaildTagParams(t,t.__isValid)),t.__isValid==r.TEXTS.duplicate&&r.markTagByValue(t.value)}if(n.role="tag",t.readonly&&(n["aria-readonly"]=!0),(e=r.createTagElem(c({},t,n))).__tagifyTagData=t,a.push(e),"select"==s.mode)return r.selectTag(e,t);r.appendTag(e),t.__isValid&&!0===t.__isValid?(r.value.push(t),r.update(),r.trigger("add",{tag:e,index:r.value.length-1,data:t})):(r.trigger("invalid",{data:t,index:r.value.length,tag:e,message:t.__isValid}),s.keepInvalidTags||setTimeout(function(){return r.removeTags(e,!0)},1e3)),r.dropdown.position.call(r)}),t.length&&e&&this.input.set.call(this),this.dropdown.refilter.call(this),a)):("select"==s.mode&&this.removeAllTags(),a)},appendTag:function(t){var e=this.DOM.scope.lastElementChild;e===this.DOM.input?this.DOM.scope.insertBefore(t,e):this.DOM.scope.appendChild(t)},createTagElem:function(t){var e,n=u(t.value),i=this.settings.templates.tag.call(this,n,t);return this.settings.readonly&&(t.readonly=!0),(e=s(i=l(i))).__tagifyTagData=t,e},reCheckInvalidTags:function(){var t=this,e=this.DOM.scope.querySelectorAll(".tagify__tag.tagify--notAllowed");[].forEach.call(e,function(e){var n=e.__tagifyTagData,i=e.getAttribute("title")==t.TEXTS.duplicate,r=!0===t.validateTag(n);i&&r&&(n.__isValid=!0,t.replaceTag(e,n))})},removeTags:function(t,e,n){var i,r=this;t=t&&t instanceof HTMLElement?[t]:t instanceof Array?t:t?[t]:[this.getLastTag()],i=t.reduce(function(t,e){return e&&("string"==typeof e&&(e=r.getTagElmByValue(e)),e&&t.push({node:e,data:e.__tagifyTagData})),t},[]),n="number"==typeof n?n:this.CSSVars.tagHideTransition,"select"==this.settings.mode&&(n=0,this.input.set.call(this)),1==i.length&&i[0].node.classList.contains("tagify--notAllowed")&&(e=!0),this.settings.hooks.beforeRemoveTag(i).then(function(){function t(t){if(t.node.parentNode){var n=this.getTagIdx(t.data);t.node.parentNode.removeChild(t.node),e?this.settings.keepInvalidTags&&this.trigger("remove",{tag:t.node,index:n}):(this.trigger("remove",{tag:t.node,index:n,data:t.data}),this.dropdown.refilter.call(this),this.dropdown.position.call(this),this.DOM.input.normalize(),this.settings.keepInvalidTags&&this.reCheckInvalidTags())}}n&&10<n&&1==i.length?function(e){e.node.style.width=parseFloat(window.getComputedStyle(e.node).width)+"px",document.body.clientTop,e.node.classList.add("tagify--hide"),setTimeout(t.bind(this),n,e)}.call(r,i[0]):i.forEach(t.bind(r)),e||(i.forEach(function(t){var e=r.getTagIdx(t.data);-1<e&&r.value.splice(e,1)}),r.update())}).catch(function(t){})},removeAllTags:function(){this.value=[],"mix"==this.settings.mode?this.DOM.input.innerHTML="":Array.prototype.slice.call(this.getTagElms()).forEach(function(t){return t.parentNode.removeChild(t)}),this.dropdown.position.call(this),"select"==this.settings.mode&&this.input.set.call(this),this.update()},removeValueById:function(){},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 t=this.DOM.originalInput,e=t.value,n=function(t,e){return t.map(function(t){var e={};for(var n in t)"__isValid"!=n&&(e[n]=t[n]);return e})}(this.value),i=new CustomEvent("change",{bubbles:!0});t.value="mix"==this.settings.mode?this.getMixedTagsAsString(n):n.length?this.settings.originalInputValueFormat?this.settings.originalInputValueFormat(n):JSON.stringify(n):"",i.simulated=!0,t._valueTracker&&t._valueTracker.setValue(e),t.dispatchEvent(i)},getMixedTagsAsString:function(){var t="",e=this,n=this.settings.mixTagsInterpolator;return function i(r){r.childNodes.forEach(function(r){if(1==r.nodeType){if(r.classList.contains("tagify__tag")&&r.__tagifyTagData)return void(t+=n[0]+JSON.stringify(r.__tagifyTagData)+n[1]);"BR"!=r.tagName||r.parentNode!=e.DOM.input&&1!=r.parentNode.childNodes.length?"DIV"!=r.tagName&&"P"!=r.tagName||(t+="\r\n",i(r)):t+="\r\n"}else t+=r.textContent})}(this.DOM.input),t},getNodeHeight:function(t){var e,n=t.cloneNode(!0);return n.style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(n),e=n.clientHeight,n.parentNode.removeChild(n),e},dropdown:{init:function(){this.DOM.dropdown=s(this.settings.templates.dropdown(this.settings)),this.DOM.dropdown.content=this.DOM.dropdown.querySelector(".tagify__dropdown__wrapper")},show:function(t){var e,n,i,r,a=this,s=this.settings,u=window.getSelection(),c="mix"==s.mode&&!s.enforceWhitelist,d=!s.whitelist||!s.whitelist.length,f="manual"==s.dropdown.position;if(!(d&&!c||!1===s.dropdown.enable||this.state.isLoading)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems.call(this,t),this.suggestedListItems.length)t&&c&&!this.state.editing.scope&&!function(t,e){return t.toLowerCase()==e.toLowerCase()}(this.suggestedListItems[0].value,t)&&this.suggestedListItems.unshift({value:t});else{if(!t||!c||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),this.dropdown.hide.call(this),void this.events.binding.call(this);this.suggestedListItems=[{value:t}]}i=o(n=this.suggestedListItems[0])?n.value:n,s.autoComplete&&i&&0==i.indexOf(t)&&this.input.autocomplete.suggest.call(this,n),e=this.dropdown.createListHTML.call(this,this.suggestedListItems),this.DOM.dropdown.content.innerHTML=l(e),(s.enforceWhitelist&&!f||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=t||!0,this.state.selection={anchorOffset:u.anchorOffset,anchorNode:u.anchorNode},this.dropdown.position.call(this),document.body.contains(this.DOM.dropdown)||(f||(this.events.binding.call(this,!1),r=this.getNodeHeight(this.DOM.dropdown),this.DOM.dropdown.classList.add("tagify__dropdown--initial"),this.dropdown.position.call(this,r),document.body.appendChild(this.DOM.dropdown),setTimeout(function(){return a.DOM.dropdown.classList.remove("tagify__dropdown--initial")})),setTimeout(this.dropdown.events.binding.bind(this)))}},hide:function(t){var e=this.DOM,n=e.scope,i=e.dropdown,r="manual"==this.settings.dropdown.position&&!t;i&&document.body.contains(i)&&!r&&(window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),clearTimeout(this.dropdownHide__bindEventsTimeout),this.dropdownHide__bindEventsTimeout=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.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",i))},refilter:function(){this.suggestedListItems=this.dropdown.filterListItems.call(this,"");var t=this.dropdown.createListHTML.call(this,this.suggestedListItems);this.DOM.dropdown.content.innerHTML=l(t),this.trigger("dropdown:updated",this.DOM.dropdown)},position:function(t){var e,n,i,r,o,a,s=this.DOM.dropdown,l=this.DOM["input"==this.settings.dropdown.position?"input":"scope"];this.state.dropdown.visible&&(a="text"==this.settings.dropdown.position?(r=(n=this.getCaretGlobalPosition()).bottom,i=n.top,o=n.left,"auto"):(i=(n=l.getBoundingClientRect()).top,r=n.bottom-1,o=n.left,n.width+"px"),i=Math.floor(i),r=Math.ceil(r),e=document.documentElement.clientHeight-r<(t||s.clientHeight),s.style.cssText="left:"+(o+window.pageXOffset)+"px; width:"+a+";"+(e?"bottom:"+(document.documentElement.clientHeight-i-window.pageYOffset-2)+"px;":"top: "+(r+window.pageYOffset)+"px"),s.setAttribute("placement",e?"top":"bottom"))},events:{binding:function(t){var e=!(0<arguments.length&&void 0!==t)||t,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)},r=e?"addEventListener":"removeEventListener";"manual"!=this.settings.dropdown.position&&(window[r]("resize",i.position),window[r]("keydown",i.onKeyDown)),this.DOM.dropdown[r]("mouseover",i.onMouseOver),this.DOM.dropdown[r]("mouseleave",i.onMouseLeave),this.DOM.dropdown[r]("mousedown",i.onClick),this.DOM.dropdown.content[r]("scroll",i.onScroll),this.DOM[this.listeners.main.click[0]][r]("click",this.listeners.main.click[1])},callbacks:{onKeyDown:function(t){var e=this.DOM.dropdown.querySelector("[class$='--active']"),n=e;switch(t.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":var i;t.preventDefault(),n=(n=n&&n[("ArrowUp"==t.key||"Up"==t.key?"previous":"next")+"ElementSibling"])||(i=this.DOM.dropdown.content.children)["ArrowUp"==t.key||"Up"==t.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 r=n?n.textContent:this.suggestedListItems[0].value;this.input.autocomplete.set.call(this,r)}catch(t){}return!1}case"Enter":t.preventDefault(),this.dropdown.selectOption.call(this,e);break;case"Backspace":if("mix"==this.settings.mode||this.state.editing.scope)return;var o=this.input.value.trim();""!=o&&8203!=o.charCodeAt(0)||(!0===this.settings.backspace?this.removeTags():"edit"==this.settings.backspace&&setTimeout(this.editTag.bind(this),0))}},onMouseOver:function(t){var e=t.target.closest(".tagify__dropdown__item");e&&this.dropdown.highlightOption.call(this,e)},onMouseLeave:function(){this.dropdown.highlightOption.call(this)},onClick:function(t){if(0==t.button&&t.target!=this.DOM.dropdown){var e=t.target.closest(".tagify__dropdown__item");t.target.closest(".tagify__dropdown__addNewBtn"),e&&this.dropdown.selectOption.call(this,e)}},onScroll:function(t){var e=t.target,n=e.scrollTop/(e.scrollHeight-e.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(n)})}}},highlightOption:function(t,e){var n,i="tagify__dropdown__item--active";if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(i),this.state.ddItemElm.removeAttribute("aria-selected")),!t)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);n=this.suggestedListItems[this.getNodeIndex(t)],this.state.ddItemData=n,(this.state.ddItemElm=t).classList.add(i),t.setAttribute("aria-selected",!0),e&&(t.parentNode.scrollTop=t.clientHeight+t.offsetTop-t.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,n),"manual"!=this.settings.dropdown.position&&this.dropdown.position.call(this))},selectOption:function(t){var n=this;if(t){this.state.actions.selectOption=!0,setTimeout(function(){return n.state.actions.selectOption=!1},50);var i=this.settings.dropdown.closeOnSelect,r=this.suggestedListItems[this.getNodeIndex(t)].value||this.input.value;this.trigger("dropdown:select",r),this.state.editing?this.onEditTagDone(this.state.editing.scope,e(e({},this.state.editing.scope.__tagifyTagData),{},{value:r,__isValid:!0})):this.addTags([r],!0),setTimeout(function(){n.DOM.input.focus(),n.toggleFocusClass(!0)}),i&&this.dropdown.hide.call(this)}},filterListItems:function(t){var e,n,i,r,a,s=this,l=this.settings,u=[],c=l.whitelist,f=l.dropdown.maxItems||1/0,h=l.dropdown.searchKeys.concat(["searchBy","value"]),p=0;if(!t)return(l.duplicates?c:c.filter(function(t){return!s.isTagDuplicate(o(t)?t.value:t)})).slice(0,f);for(;p<c.length&&(e=c[p]instanceof Object?c[p]:{value:c[p]},r=h.reduce(function(t,n){return t+" "+(e[n]||"")},"").toLowerCase(),i=l.dropdown.accentedSearch?d(r).indexOf(d(t.toLowerCase())):r.indexOf(t.toLowerCase()),n=l.dropdown.fuzzySearch?0<=i:0==i,a=!l.duplicates&&this.isTagDuplicate(o(e)?e.value:e),n&&!a&&f--&&u.push(e),0!=f);p++);return u},createListHTML:function(t){var e=this;return t.map(function(t){"string"==typeof t&&(t={value:t});var n=e.settings.dropdown.mapValueTo,i=c({},t,{value:u((n?"function"==typeof n?n(t):t[n]:t.value)||"")});return e.settings.templates.dropdownItem.call(e,i)}).join("")}}}).removeTag=f.prototype.removeTags,f}),function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("jquery"));else if("function"==typeof define&&define.amd)define(["jquery"],e);else{var n="object"==typeof exports?e(require("jquery")):e(t.jQuery);for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(window,function(t){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=53)}({0:function(e,n){e.exports=t},1:function(t,e,n){"use strict";var i=n(0),r=n.n(i);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var s=function(){function t(e,n,i,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.markup=e,this.children=n,this.options=i,this.callback=r}var e,n,i;return e=t,(n=[{key:"render",value:function(t){var e=r()(this.markup);if(this.options&&this.options.contents&&e.html(this.options.contents),this.options&&this.options.className&&e.addClass(this.options.className),this.options&&this.options.data&&r.a.each(this.options.data,function(t,n){e.attr("data-"+t,n)}),this.options&&this.options.click&&e.on("click",this.options.click),this.children){var n=e.find(".note-children-container");this.children.forEach(function(t){t.render(n.length?n:e)})}return this.callback&&this.callback(e,this.options),this.options&&this.options.callback&&this.options.callback(e),t&&t.append(e),e}}])&&a(e.prototype,n),i&&a(e,i),t}();e.a={create:function(t,e){return function(){var n="object"===o(arguments[1])?arguments[1]:arguments[0],i=Array.isArray(arguments[0])?arguments[0]:[];return n&&n.children&&(i=n.children),new s(t,i,n,e)}}}},2:function(t,e){(function(e){t.exports=e}).call(this,{})},3:function(t,e,n){"use strict";var i=n(0),r=n.n(i);r.a.summernote=r.a.summernote||{lang:{}},r.a.extend(r.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:{escape:"Escape",insertParagraph:"Insert Paragraph",undo:"Undo the last command",redo:"Redo 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 o="function"==typeof define&&n(2),a=["sans-serif","serif","monospace","cursive","fantasy"];function s(t){return-1===r.a.inArray(t.toLowerCase(),a)?"'".concat(t,"'"):t}var l,u=navigator.userAgent,c=/MSIE|Trident/i.test(u);if(c){var d=/MSIE (\d+[.]\d+)/.exec(u);d&&(l=parseFloat(d[1])),(d=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(u))&&(l=parseFloat(d[1]))}var f=/Edge\/\d+/.test(u),h="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,p=c?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input",v={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:c,isEdge:f,isFF:!f&&/firefox/i.test(u),isPhantom:/PhantomJS/i.test(u),isWebkit:!f&&/webkit/i.test(u),isChrome:!f&&/chrome/i.test(u),isSafari:!f&&/safari/i.test(u)&&!/chrome/i.test(u),browserVersion:l,jqueryVersion:parseFloat(r.a.fn.jquery),isSupportAmd:o,isSupportTouch:h,isFontInstalled:function(t){var e="Comic Sans MS"===t?"Courier New":"Comic Sans MS",n=document.createElement("canvas").getContext("2d");n.font="200px '"+e+"'";var i=n.measureText("mmmmmmmmmmwwwww").width;return n.font="200px "+s(t)+', "'+e+'"',i!==n.measureText("mmmmmmmmmmwwwww").width},isW3CRangeSupport:!!document.createRange,inputEventName:p,genericFontFamilies:a,validFontName:s};var m=0;var g={eq:function(t){return function(e){return t===e}},eq2:function(t,e){return t===e},peq2:function(t){return function(e,n){return e[t]===n[t]}},ok:function(){return!0},fail:function(){return!1},self:function(t){return t},not:function(t){return function(){return!t.apply(t,arguments)}},and:function(t,e){return function(n){return t(n)&&e(n)}},invoke:function(t,e){return function(){return t[e].apply(t,arguments)}},resetUniqueId:function(){m=0},uniqueId:function(t){var e=++m+"";return t?t+e:e},rect2bnd:function(t){var e=r()(document);return{top:t.top+e.scrollTop(),left:t.left+e.scrollLeft(),width:t.right-t.left,height:t.bottom-t.top}},invertObject:function(t){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[t[n]]=n);return e},namespaceToCamel:function(t,e){return(e=e||"")+t.split(".").map(function(t){return t.substring(0,1).toUpperCase()+t.substring(1)}).join("")},debounce:function(t,e,n){var i;return function(){var r=this,o=arguments,a=n&&!i;clearTimeout(i),i=setTimeout(function(){i=null,n||t.apply(r,o)},e),a&&t.apply(r,o)}},isValidUrl:function(t){return/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/gi.test(t)}};function y(t){return t[0]}function b(t){return t[t.length-1]}function k(t){return t.slice(1)}function w(t,e){if(t&&t.length&&e){if(t.indexOf)return-1!==t.indexOf(e);if(t.contains)return t.contains(e)}return!1}var x={head:y,last:b,initial:function(t){return t.slice(0,t.length-1)},tail:k,prev:function(t,e){if(t&&t.length&&e){var n=t.indexOf(e);return-1===n?null:t[n-1]}return null},next:function(t,e){if(t&&t.length&&e){var n=t.indexOf(e);return-1===n?null:t[n+1]}return null},find:function(t,e){for(var n=0,i=t.length;n<i;n++){var r=t[n];if(e(r))return r}},contains:w,all:function(t,e){for(var n=0,i=t.length;n<i;n++)if(!e(t[n]))return!1;return!0},sum:function(t,e){return e=e||g.self,t.reduce(function(t,n){return t+e(n)},0)},from:function(t){for(var e=[],n=t.length,i=-1;++i<n;)e[i]=t[i];return e},isEmpty:function(t){return!t||!t.length},clusterBy:function(t,e){return t.length?k(t).reduce(function(t,n){var i=b(t);return e(b(i),n)?i[i.length]=n:t[t.length]=[n],t},[[y(t)]]):[]},compact:function(t){for(var e=[],n=0,i=t.length;n<i;n++)t[n]&&e.push(t[n]);return e},unique:function(t){for(var e=[],n=0,i=t.length;n<i;n++)w(e,t[n])||e.push(t[n]);return e}},_=String.fromCharCode(160);function E(t){return t&&r()(t).hasClass("note-editable")}function S(t){return t=t.toUpperCase(),function(e){return e&&e.nodeName.toUpperCase()===t}}function O(t){return t&&3===t.nodeType}function A(t){return t&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(t.nodeName.toUpperCase())}function C(t){return!E(t)&&(t&&/^DIV|^P|^LI|^H[1-7]/.test(t.nodeName.toUpperCase()))}var T=S("PRE"),P=S("LI");var N=S("TABLE"),I=S("DATA");function L(t){return!(F(t)||M(t)||D(t)||C(t)||N(t)||R(t)||I(t))}function M(t){return t&&/^UL|^OL/.test(t.nodeName.toUpperCase())}var D=S("HR");function j(t){return t&&/^TD|^TH/.test(t.nodeName.toUpperCase())}var R=S("BLOCKQUOTE");function F(t){return j(t)||R(t)||E(t)}var $=S("A");var H=S("BODY");var B=v.isMSIE&&v.browserVersion<11?"&nbsp;":"<br>";function q(t){return O(t)?t.nodeValue.length:t?t.childNodes.length:0}function z(t){var e=q(t);return 0===e||(!O(t)&&1===e&&t.innerHTML===B||!(!x.all(t.childNodes,O)||""!==t.innerHTML))}function U(t){A(t)||q(t)||(t.innerHTML=B)}function V(t,e){for(;t;){if(e(t))return t;if(E(t))break;t=t.parentNode}return null}function K(t,e){e=e||g.fail;var n=[];return V(t,function(t){return E(t)||n.push(t),e(t)}),n}function W(t,e){e=e||g.fail;for(var n=[];t&&!e(t);)n.push(t),t=t.nextSibling;return n}function G(t,e){var n=e.nextSibling,i=e.parentNode;return n?i.insertBefore(t,n):i.appendChild(t),t}function Y(t,e){return r.a.each(e,function(e,n){t.appendChild(n)}),t}function Z(t){return 0===t.offset}function X(t){return t.offset===q(t.node)}function Q(t){return Z(t)||X(t)}function J(t,e){for(;t&&t!==e;){if(0!==et(t))return!1;t=t.parentNode}return!0}function tt(t,e){if(!e)return!1;for(;t&&t!==e;){if(et(t)!==q(t.parentNode)-1)return!1;t=t.parentNode}return!0}function et(t){for(var e=0;t=t.previousSibling;)e+=1;return e}function nt(t){return!!(t&&t.childNodes&&t.childNodes.length)}function it(t,e){var n,i;if(0===t.offset){if(E(t.node))return null;n=t.node.parentNode,i=et(t.node)}else nt(t.node)?i=q(n=t.node.childNodes[t.offset-1]):(n=t.node,i=e?0:t.offset-1);return{node:n,offset:i}}function rt(t,e){var n,i;if(q(t.node)===t.offset){if(E(t.node))return null;var r=at(t.node);r?(n=r,i=0):(n=t.node.parentNode,i=et(t.node)+1)}else nt(t.node)?(n=t.node.childNodes[t.offset],i=0):(n=t.node,i=e?q(t.node):t.offset+1);return{node:n,offset:i}}function ot(t,e){var n,i;if(z(t.node))return{node:n=t.node.nextSibling,offset:i=0};if(q(t.node)===t.offset){if(E(t.node))return null;var r=at(t.node);r?(n=r,i=0):(n=t.node.parentNode,i=et(t.node)+1),E(n)&&(n=t.node.nextSibling,i=0)}else if(nt(t.node)){if(i=0,z(n=t.node.childNodes[t.offset]))return null}else if(n=t.node,i=e?q(t.node):t.offset+1,z(n))return null;return{node:n,offset:i}}function at(t){if(t.nextSibling&&t.parent===t.nextSibling.parent)return O(t.nextSibling)?t.nextSibling:at(t.nextSibling)}function st(t,e){return t.node===e.node&&t.offset===e.offset}function lt(t,e){var n=e&&e.isSkipPaddingBlankHTML,i=e&&e.isNotSplitEdgePoint,r=e&&e.isDiscardEmptySplits;if(r&&(n=!0),Q(t)&&(O(t.node)||i)){if(Z(t))return t.node;if(X(t))return t.node.nextSibling}if(O(t.node))return t.node.splitText(t.offset);var o=t.node.childNodes[t.offset],a=G(t.node.cloneNode(!1),t.node);return Y(a,W(o)),n||(U(t.node),U(a)),r&&(z(t.node)&&dt(t.node),z(a))?(dt(a),t.node.nextSibling):a}function ut(t,e,n){var i=K(e.node,g.eq(t));return i.length?1===i.length?lt(e,n):i.reduce(function(t,i){return t===e.node&&(t=lt(e,n)),lt({node:i,offset:t?et(t):q(i)},n)}):null}function ct(t){return document.createElement(t)}function dt(t,e){if(t&&t.parentNode){if(t.removeNode)return t.removeNode(e);var n=t.parentNode;if(!e){for(var i=[],r=0,o=t.childNodes.length;r<o;r++)i.push(t.childNodes[r]);for(var a=0,s=i.length;a<s;a++)n.insertBefore(i[a],t)}n.removeChild(t)}}var ft=S("TEXTAREA");function ht(t,e){var n=ft(t[0])?t.val():t.html();return e?n.replace(/[\n\r]/g,""):n}var pt={NBSP_CHAR:_,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:B,emptyPara:"<p>".concat(B,"</p>"),makePredByNodeName:S,isEditable:E,isControlSizing:function(t){return t&&r()(t).hasClass("note-control-sizing")},isText:O,isElement:function(t){return t&&1===t.nodeType},isVoid:A,isPara:C,isPurePara:function(t){return C(t)&&!P(t)},isHeading:function(t){return t&&/^H[1-7]/.test(t.nodeName.toUpperCase())},isInline:L,isBlock:g.not(L),isBodyInline:function(t){return L(t)&&!V(t,C)},isBody:H,isParaInline:function(t){return L(t)&&!!V(t,C)},isPre:T,isList:M,isTable:N,isData:I,isCell:j,isBlockquote:R,isBodyContainer:F,isAnchor:$,isDiv:S("DIV"),isLi:P,isBR:S("BR"),isSpan:S("SPAN"),isB:S("B"),isU:S("U"),isS:S("S"),isI:S("I"),isImg:S("IMG"),isTextarea:ft,deepestChildIsEmpty:function(t){do{if(null===t.firstElementChild||""===t.firstElementChild.innerHTML)break}while(t=t.firstElementChild);return z(t)},isEmpty:z,isEmptyAnchor:g.and($,z),isClosestSibling:function(t,e){return t.nextSibling===e||t.previousSibling===e},withClosestSiblings:function(t,e){e=e||g.ok;var n=[];return t.previousSibling&&e(t.previousSibling)&&n.push(t.previousSibling),n.push(t),t.nextSibling&&e(t.nextSibling)&&n.push(t.nextSibling),n},nodeLength:q,isLeftEdgePoint:Z,isRightEdgePoint:X,isEdgePoint:Q,isLeftEdgeOf:J,isRightEdgeOf:tt,isLeftEdgePointOf:function(t,e){return Z(t)&&J(t.node,e)},isRightEdgePointOf:function(t,e){return X(t)&&tt(t.node,e)},prevPoint:it,nextPoint:rt,nextPointWithEmptyNode:ot,isSamePoint:st,isVisiblePoint:function(t){if(O(t.node)||!nt(t.node)||z(t.node))return!0;var e=t.node.childNodes[t.offset-1],n=t.node.childNodes[t.offset];return!(e&&!A(e)||n&&!A(n))},prevPointUntil:function(t,e){for(;t;){if(e(t))return t;t=it(t)}return null},nextPointUntil:function(t,e){for(;t;){if(e(t))return t;t=rt(t)}return null},isCharPoint:function(t){if(!O(t.node))return!1;var e=t.node.nodeValue.charAt(t.offset-1);return e&&" "!==e&&e!==_},isSpacePoint:function(t){if(!O(t.node))return!1;var e=t.node.nodeValue.charAt(t.offset-1);return" "===e||e===_},walkPoint:function(t,e,n,i){for(var r=t;r&&(n(r),!st(r,e));)r=ot(r,i&&t.node!==r.node&&e.node!==r.node)},ancestor:V,singleChildAncestor:function(t,e){for(t=t.parentNode;t&&1===q(t);){if(e(t))return t;if(E(t))break;t=t.parentNode}return null},listAncestor:K,lastAncestor:function(t,e){var n=K(t);return x.last(n.filter(e))},listNext:W,listPrev:function(t,e){e=e||g.fail;for(var n=[];t&&!e(t);)n.push(t),t=t.previousSibling;return n},listDescendant:function(t,e){var n=[];return e=e||g.ok,function i(r){t!==r&&e(r)&&n.push(r);for(var o=0,a=r.childNodes.length;o<a;o++)i(r.childNodes[o])}(t),n},commonAncestor:function(t,e){for(var n=K(t),i=e;i;i=i.parentNode)if(n.indexOf(i)>-1)return i;return null},wrap:function(t,e){var n=t.parentNode,i=r()("<"+e+">")[0];return n.insertBefore(i,t),i.appendChild(t),i},insertAfter:G,appendChildNodes:Y,position:et,hasChildren:nt,makeOffsetPath:function(t,e){return K(e,g.eq(t)).map(et).reverse()},fromOffsetPath:function(t,e){for(var n=t,i=0,r=e.length;i<r;i++)n=n.childNodes.length<=e[i]?n.childNodes[n.childNodes.length-1]:n.childNodes[e[i]];return n},splitTree:ut,splitPoint:function(t,e){var n,i,r=e?C:F,o=K(t.node,r),a=x.last(o)||t.node;r(a)?(n=o[o.length-2],i=a):i=(n=a).parentNode;var s=n&&ut(n,t,{isSkipPaddingBlankHTML:e,isNotSplitEdgePoint:e});return s||i!==t.node||(s=t.node.childNodes[t.offset]),{rightNode:s,container:i}},create:ct,createText:function(t){return document.createTextNode(t)},remove:dt,removeWhile:function(t,e){for(;t&&!E(t)&&e(t);){var n=t.parentNode;dt(t),t=n}},replace:function(t,e){if(t.nodeName.toUpperCase()===e.toUpperCase())return t;var n=ct(e);return t.style.cssText&&(n.style.cssText=t.style.cssText),Y(n,x.from(t.childNodes)),G(n,t),dt(t),n},html:function(t,e){var n=ht(t);e&&(n=(n=n.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,function(t,e,n){n=n.toUpperCase();var i=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!e,r=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return t+(i||r?"\n":"")})).trim());return n},value:ht,posFromPlaceholder:function(t){var e=r()(t),n=e.offset(),i=e.outerHeight(!0);return{left:n.left,top:n.top+i}},attachEvents:function(t,e){Object.keys(e).forEach(function(n){t.on(n,e[n])})},detachEvents:function(t,e){Object.keys(e).forEach(function(n){t.off(n,e[n])})},isCustomStyleTag:function(t){return t&&!O(t)&&x.contains(t.classList,"note-styletag")}};function vt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var mt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$note=e,this.memos={},this.modules={},this.layoutInfo={},this.options=r.a.extend(!0,{},n),r.a.summernote.ui=r.a.summernote.ui_template(this.options),this.ui=r.a.summernote.ui,this.initialize()}var e,n,i;return e=t,(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 t=this.isDisabled();this.code(pt.emptyPara),this._destroy(),this._initialize(),t&&this.disable()}},{key:"_initialize",value:function(){var t=this;this.options.id=g.uniqueId(r.a.now()),this.options.container=this.options.container||this.layoutInfo.editor;var e=r.a.extend({},this.options.buttons);Object.keys(e).forEach(function(n){t.memo("button."+n,e[n])});var n=r.a.extend({},this.options.modules,r.a.summernote.plugins||{});Object.keys(n).forEach(function(e){t.module(e,n[e],!0)}),Object.keys(this.modules).forEach(function(e){t.initializeModule(e)})}},{key:"_destroy",value:function(){var t=this;Object.keys(this.modules).reverse().forEach(function(e){t.removeModule(e)}),Object.keys(this.memos).forEach(function(e){t.removeMemo(e)}),this.triggerEvent("destroy",this)}},{key:"code",value:function(t){var e=this.invoke("codeview.isActivated");if(void 0===t)return this.invoke("codeview.sync"),e?this.layoutInfo.codable.val():this.layoutInfo.editable.html();e?this.invoke("codeview.sync",t):this.layoutInfo.editable.html(t),this.$note.val(t),this.triggerEvent("change",t,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 t=x.head(arguments),e=x.tail(x.from(arguments)),n=this.options.callbacks[g.namespaceToCamel(t,"on")];n&&n.apply(this.$note[0],e),this.$note.trigger("summernote."+t,e)}},{key:"initializeModule",value:function(t){var e=this.modules[t];e.shouldInitialize=e.shouldInitialize||g.ok,e.shouldInitialize()&&(e.initialize&&e.initialize(),e.events&&pt.attachEvents(this.$note,e.events))}},{key:"module",value:function(t,e,n){if(1===arguments.length)return this.modules[t];this.modules[t]=new e(this),n||this.initializeModule(t)}},{key:"removeModule",value:function(t){var e=this.modules[t];e.shouldInitialize()&&(e.events&&pt.detachEvents(this.$note,e.events),e.destroy&&e.destroy()),delete this.modules[t]}},{key:"memo",value:function(t,e){if(1===arguments.length)return this.memos[t];this.memos[t]=e}},{key:"removeMemo",value:function(t){this.memos[t]&&this.memos[t].destroy&&this.memos[t].destroy(),delete this.memos[t]}},{key:"createInvokeHandlerAndUpdateState",value:function(t,e){var n=this;return function(i){n.createInvokeHandler(t,e)(i),n.invoke("buttons.updateCurrentStyle")}}},{key:"createInvokeHandler",value:function(t,e){var n=this;return function(i){i.preventDefault();var o=r()(i.target);n.invoke(t,e||o.closest("[data-value]").data("value"),o)}}},{key:"invoke",value:function(){var t=x.head(arguments),e=x.tail(x.from(arguments)),n=t.split("."),i=n.length>1,r=i&&x.head(n),o=i?x.last(n):x.head(n),a=this.modules[r||"editor"];return!r&&this[o]?this[o].apply(this,e):a&&a[o]&&a.shouldInitialize()?a[o].apply(a,e):void 0}}])&&vt(e.prototype,n),i&&vt(e,i),t}();function gt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function yt(t,e){var n,i,r=t.parentElement(),o=document.body.createTextRange(),a=x.from(r.childNodes);for(n=0;n<a.length;n++)if(!pt.isText(a[n])){if(o.moveToElementText(a[n]),o.compareEndPoints("StartToStart",t)>=0)break;i=a[n]}if(0!==n&&pt.isText(a[n-1])){var s=document.body.createTextRange(),l=null;s.moveToElementText(i||r),s.collapse(!i),l=i?i.nextSibling:r.firstChild;var u=t.duplicate();u.setEndPoint("StartToStart",s);for(var c=u.text.replace(/[\r\n]/g,"").length;c>l.nodeValue.length&&l.nextSibling;)c-=l.nodeValue.length,l=l.nextSibling;l.nodeValue;e&&l.nextSibling&&pt.isText(l.nextSibling)&&c===l.nodeValue.length&&(c-=l.nodeValue.length,l=l.nextSibling),r=l,n=c}return{cont:r,offset:n}}function bt(t){var e=document.body.createTextRange(),n=function t(e,n){var i,r;if(pt.isText(e)){var o=pt.listPrev(e,g.not(pt.isText)),a=x.last(o).previousSibling;i=a||e.parentNode,n+=x.sum(x.tail(o),pt.nodeLength),r=!a}else{if(i=e.childNodes[n]||e,pt.isText(i))return t(i,0);n=0,r=!1}return{node:i,collapseToStart:r,offset:n}}(t.node,t.offset);return e.moveToElementText(n.node),e.collapse(n.collapseToStart),e.moveStart("character",n.offset),e}r.a.fn.extend({summernote:function(){var t=r.a.type(x.head(arguments)),e="string"===t,n="object"===t,i=r.a.extend({},r.a.summernote.options,n?x.head(arguments):{});i.langInfo=r.a.extend(!0,{},r.a.summernote.lang["en-US"],r.a.summernote.lang[i.lang]),i.icons=r.a.extend(!0,{},r.a.summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!v.isSupportTouch:i.tooltip,this.each(function(t,e){var n=r()(e);if(!n.data("summernote")){var o=new mt(n,i);n.data("summernote",o),n.data("summernote").triggerEvent("init",o.layoutInfo)}});var o=this.first();if(o.length){var a=o.data("summernote");if(e)return a.invoke.apply(a,x.from(arguments));i.focus&&a.invoke("editor.focus")}return this}});var kt=function(){function t(e,n,i,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sc=e,this.so=n,this.ec=i,this.eo=r,this.isOnEditable=this.makeIsOn(pt.isEditable),this.isOnList=this.makeIsOn(pt.isList),this.isOnAnchor=this.makeIsOn(pt.isAnchor),this.isOnCell=this.makeIsOn(pt.isCell),this.isOnData=this.makeIsOn(pt.isData)}var e,n,i;return e=t,(n=[{key:"nativeRange",value:function(){if(v.isW3CRangeSupport){var t=document.createRange();return t.setStart(this.sc,this.so),t.setEnd(this.ec,this.eo),t}var e=bt({node:this.sc,offset:this.so});return e.setEndPoint("EndToEnd",bt({node:this.ec,offset:this.eo})),e}},{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 t=this.nativeRange();if(v.isW3CRangeSupport){var e=document.getSelection();e.rangeCount>0&&e.removeAllRanges(),e.addRange(t)}else t.select();return this}},{key:"scrollIntoView",value:function(t){var e=r()(t).height();return t.scrollTop+e<this.sc.offsetTop&&(t.scrollTop+=Math.abs(t.scrollTop+e-this.sc.offsetTop)),this}},{key:"normalize",value:function(){var e=function(t,e){if(!t)return t;if(pt.isVisiblePoint(t)&&(!pt.isEdgePoint(t)||pt.isRightEdgePoint(t)&&!e||pt.isLeftEdgePoint(t)&&e||pt.isRightEdgePoint(t)&&e&&pt.isVoid(t.node.nextSibling)||pt.isLeftEdgePoint(t)&&!e&&pt.isVoid(t.node.previousSibling)||pt.isBlock(t.node)&&pt.isEmpty(t.node)))return t;var n=pt.ancestor(t.node,pt.isBlock),i=!1;if(!i){var r=pt.prevPoint(t)||{node:null};i=(pt.isLeftEdgePointOf(t,n)||pt.isVoid(r.node))&&!e}var o=!1;if(!o){var a=pt.nextPoint(t)||{node:null};o=(pt.isRightEdgePointOf(t,n)||pt.isVoid(a.node))&&e}if(i||o){if(pt.isVisiblePoint(t))return t;e=!e}return(e?pt.nextPointUntil(pt.nextPoint(t),pt.isVisiblePoint):pt.prevPointUntil(pt.prevPoint(t),pt.isVisiblePoint))||t},n=e(this.getEndPoint(),!1),i=this.isCollapsed()?n:e(this.getStartPoint(),!0);return new t(i.node,i.offset,n.node,n.offset)}},{key:"nodes",value:function(t,e){t=t||g.ok;var n=e&&e.includeAncestor,i=e&&e.fullyContains,r=this.getStartPoint(),o=this.getEndPoint(),a=[],s=[];return pt.walkPoint(r,o,function(e){var r;pt.isEditable(e.node)||(i?(pt.isLeftEdgePoint(e)&&s.push(e.node),pt.isRightEdgePoint(e)&&x.contains(s,e.node)&&(r=e.node)):r=n?pt.ancestor(e.node,t):e.node,r&&t(r)&&a.push(r))},!0),x.unique(a)}},{key:"commonAncestor",value:function(){return pt.commonAncestor(this.sc,this.ec)}},{key:"expand",value:function(e){var n=pt.ancestor(this.sc,e),i=pt.ancestor(this.ec,e);if(!n&&!i)return new t(this.sc,this.so,this.ec,this.eo);var r=this.getPoints();return n&&(r.sc=n,r.so=0),i&&(r.ec=i,r.eo=pt.nodeLength(i)),new t(r.sc,r.so,r.ec,r.eo)}},{key:"collapse",value:function(e){return e?new t(this.sc,this.so,this.sc,this.so):new t(this.ec,this.eo,this.ec,this.eo)}},{key:"splitText",value:function(){var e=this.sc===this.ec,n=this.getPoints();return pt.isText(this.ec)&&!pt.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),pt.isText(this.sc)&&!pt.isEdgePoint(this.getStartPoint())&&(n.sc=this.sc.splitText(this.so),n.so=0,e&&(n.ec=n.sc,n.eo=this.eo-this.so)),new t(n.sc,n.so,n.ec,n.eo)}},{key:"deleteContents",value:function(){if(this.isCollapsed())return this;var e=this.splitText(),n=e.nodes(null,{fullyContains:!0}),i=pt.prevPointUntil(e.getStartPoint(),function(t){return!x.contains(n,t.node)}),o=[];return r.a.each(n,function(t,e){var n=e.parentNode;i.node!==n&&1===pt.nodeLength(n)&&o.push(n),pt.remove(e,!1)}),r.a.each(o,function(t,e){pt.remove(e,!1)}),new t(i.node,i.offset,i.node,i.offset).normalize()}},{key:"makeIsOn",value:function(t){return function(){var e=pt.ancestor(this.sc,t);return!!e&&e===pt.ancestor(this.ec,t)}}},{key:"isLeftEdgeOf",value:function(t){if(!pt.isLeftEdgePoint(this.getStartPoint()))return!1;var e=pt.ancestor(this.sc,t);return e&&pt.isLeftEdgeOf(this.sc,e)}},{key:"isCollapsed",value:function(){return this.sc===this.ec&&this.so===this.eo}},{key:"wrapBodyInlineWithPara",value:function(){if(pt.isBodyContainer(this.sc)&&pt.isEmpty(this.sc))return this.sc.innerHTML=pt.emptyPara,new t(this.sc.firstChild,0,this.sc.firstChild,0);var e,n=this.normalize();if(pt.isParaInline(this.sc)||pt.isPara(this.sc))return n;if(pt.isInline(n.sc)){var i=pt.listAncestor(n.sc,g.not(pt.isInline));e=x.last(i),pt.isInline(e)||(e=i[i.length-2]||n.sc.childNodes[n.so])}else e=n.sc.childNodes[n.so>0?n.so-1:0];if(e){var r=pt.listPrev(e,pt.isParaInline).reverse();if((r=r.concat(pt.listNext(e.nextSibling,pt.isParaInline))).length){var o=pt.wrap(x.head(r),"p");pt.appendChildNodes(o,x.tail(r))}}return this.normalize()}},{key:"insertNode",value:function(t){var e=this;(pt.isText(t)||pt.isInline(t))&&(e=this.wrapBodyInlineWithPara().deleteContents());var n=pt.splitPoint(e.getStartPoint(),pt.isInline(t));return n.rightNode?(n.rightNode.parentNode.insertBefore(t,n.rightNode),pt.isEmpty(n.rightNode)&&pt.isPara(t)&&n.rightNode.parentNode.removeChild(n.rightNode)):n.container.appendChild(t),t}},{key:"pasteHTML",value:function(t){t=r.a.trim(t);var e=r()("<div></div>").html(t)[0],n=x.from(e.childNodes),i=this,o=!1;return i.so>=0&&(n=n.reverse(),o=!0),n=n.map(function(t){return i.insertNode(t)}),o&&(n=n.reverse()),n}},{key:"toString",value:function(){var t=this.nativeRange();return v.isW3CRangeSupport?t.toString():t.text}},{key:"getWordRange",value:function(e){var n=this.getEndPoint();if(!pt.isCharPoint(n))return this;var i=pt.prevPointUntil(n,function(t){return!pt.isCharPoint(t)});return e&&(n=pt.nextPointUntil(n,function(t){return!pt.isCharPoint(t)})),new t(i.node,i.offset,n.node,n.offset)}},{key:"getWordsRange",value:function(e){var n=this.getEndPoint(),i=function(t){return!pt.isCharPoint(t)&&!pt.isSpacePoint(t)};if(i(n))return this;var r=pt.prevPointUntil(n,i);return e&&(n=pt.nextPointUntil(n,i)),new t(r.node,r.offset,n.node,n.offset)}},{key:"getWordsMatchRange",value:function(e){var n=this.getEndPoint(),i=pt.prevPointUntil(n,function(i){if(!pt.isCharPoint(i)&&!pt.isSpacePoint(i))return!0;var r=new t(i.node,i.offset,n.node,n.offset),o=e.exec(r.toString());return o&&0===o.index}),r=new t(i.node,i.offset,n.node,n.offset),o=r.toString(),a=e.exec(o);return a&&a[0].length===o.length?r:null}},{key:"bookmark",value:function(t){return{s:{path:pt.makeOffsetPath(t,this.sc),offset:this.so},e:{path:pt.makeOffsetPath(t,this.ec),offset:this.eo}}}},{key:"paraBookmark",value:function(t){return{s:{path:x.tail(pt.makeOffsetPath(x.head(t),this.sc)),offset:this.so},e:{path:x.tail(pt.makeOffsetPath(x.last(t),this.ec)),offset:this.eo}}}},{key:"getClientRects",value:function(){return this.nativeRange().getClientRects()}}])&&gt(e.prototype,n),i&&gt(e,i),t}(),wt={create:function(t,e,n,i){if(4===arguments.length)return new kt(t,e,n,i);if(2===arguments.length)return new kt(t,e,n=t,i=e);var r=this.createFromSelection();if(!r&&1===arguments.length){var o=arguments[0];return pt.isEditable(o)&&(o=o.lastChild),this.createFromBodyElement(o,pt.emptyPara===arguments[0].innerHTML)}return r},createFromBodyElement:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.createFromNode(t).collapse(e)},createFromSelection:function(){var t,e,n,i;if(v.isW3CRangeSupport){var r=document.getSelection();if(!r||0===r.rangeCount)return null;if(pt.isBody(r.anchorNode))return null;var o=r.getRangeAt(0);t=o.startContainer,e=o.startOffset,n=o.endContainer,i=o.endOffset}else{var a=document.selection.createRange(),s=a.duplicate();s.collapse(!1);var l=a;l.collapse(!0);var u=yt(l,!0),c=yt(s,!1);pt.isText(u.node)&&pt.isLeftEdgePoint(u)&&pt.isTextNode(c.node)&&pt.isRightEdgePoint(c)&&c.node.nextSibling===u.node&&(u=c),t=u.cont,e=u.offset,n=c.cont,i=c.offset}return new kt(t,e,n,i)},createFromNode:function(t){var e=t,n=0,i=t,r=pt.nodeLength(i);return pt.isVoid(e)&&(n=pt.listPrev(e).length-1,e=e.parentNode),pt.isBR(i)?(r=pt.listPrev(i).length-1,i=i.parentNode):pt.isVoid(i)&&(r=pt.listPrev(i).length,i=i.parentNode),this.create(e,n,i,r)},createFromNodeBefore:function(t){return this.createFromNode(t).collapse(!0)},createFromNodeAfter:function(t){return this.createFromNode(t).collapse()},createFromBookmark:function(t,e){var n=pt.fromOffsetPath(t,e.s.path),i=e.s.offset,r=pt.fromOffsetPath(t,e.e.path),o=e.e.offset;return new kt(n,i,r,o)},createFromParaBookmark:function(t,e){var n=t.s.offset,i=t.e.offset,r=pt.fromOffsetPath(x.head(e),t.s.path),o=pt.fromOffsetPath(x.last(e),t.e.path);return new kt(r,n,o,i)}},xt={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,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},_t={isEdit:function(t){return x.contains([xt.BACKSPACE,xt.TAB,xt.ENTER,xt.SPACE,xt.DELETE],t)},isMove:function(t){return x.contains([xt.LEFT,xt.UP,xt.RIGHT,xt.DOWN],t)},isNavigation:function(t){return x.contains([xt.HOME,xt.END,xt.PAGEUP,xt.PAGEDOWN],t)},nameFromCode:g.invertObject(xt),code:xt};function Et(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var St=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.stack=[],this.stackOffset=-1,this.context=e,this.$editable=e.layoutInfo.editable,this.editable=this.$editable[0]}var e,n,i;return e=t,(n=[{key:"makeSnapshot",value:function(){var t=wt.create(this.editable);return{contents:this.$editable.html(),bookmark:t&&t.isOnEditable()?t.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}}},{key:"applySnapshot",value:function(t){null!==t.contents&&this.$editable.html(t.contents),null!==t.bookmark&&wt.createFromBookmark(this.editable,t.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)}}])&&Et(e.prototype,n),i&&Et(e,i),t}();function Ot(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var At=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,i;return e=t,(n=[{key:"jQueryCSS",value:function(t,e){if(v.jqueryVersion<1.9){var n={};return r.a.each(e,function(e,i){n[i]=t.css(i)}),n}return t.css(e)}},{key:"fromNode",value:function(t){var e=this.jQueryCSS(t,["font-family","font-size","text-align","list-style-type","line-height"])||{},n=t[0].style.fontSize||e["font-size"];return e["font-size"]=parseInt(n,10),e["font-size-unit"]=n.match(/[a-z%]+$/),e}},{key:"stylePara",value:function(t,e){r.a.each(t.nodes(pt.isPara,{includeAncestor:!0}),function(t,n){r()(n).css(e)})}},{key:"styleNodes",value:function(t,e){t=t.splitText();var n=e&&e.nodeName||"SPAN",i=!(!e||!e.expandClosestSibling),o=!(!e||!e.onlyPartialContains);if(t.isCollapsed())return[t.insertNode(pt.create(n))];var a=pt.makePredByNodeName(n),s=t.nodes(pt.isText,{fullyContains:!0}).map(function(t){return pt.singleChildAncestor(t,a)||pt.wrap(t,n)});if(i){if(o){var l=t.nodes();a=g.and(a,function(t){return x.contains(l,t)})}return s.map(function(t){var e=pt.withClosestSiblings(t,a),n=x.head(e),i=x.tail(e);return r.a.each(i,function(t,e){pt.appendChildNodes(n,e.childNodes),pt.remove(e)}),x.head(e)})}return s}},{key:"current",value:function(t){var e=r()(pt.isElement(t.sc)?t.sc:t.sc.parentNode),n=this.fromNode(e);try{n=r.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(t){}if(t.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=pt.ancestor(t.sc,pt.isPara);if(o&&o.style["line-height"])n["line-height"]=o.style.lineHeight;else{var a=parseInt(n["line-height"],10)/parseInt(n["font-size"],10);n["line-height"]=a.toFixed(1)}return n.anchor=t.isOnAnchor()&&pt.ancestor(t.sc,pt.isAnchor),n.ancestors=pt.listAncestor(t.sc,pt.isEditable),n.range=t,n}}])&&Ot(e.prototype,n),i&&Ot(e,i),t}();function Ct(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Tt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,i;return e=t,(n=[{key:"insertOrderedList",value:function(t){this.toggleList("OL",t)}},{key:"insertUnorderedList",value:function(t){this.toggleList("UL",t)}},{key:"indent",value:function(t){var e=this,n=wt.create(t).wrapBodyInlineWithPara(),i=n.nodes(pt.isPara,{includeAncestor:!0}),o=x.clusterBy(i,g.peq2("parentNode"));r.a.each(o,function(t,n){var i=x.head(n);if(pt.isLi(i)){var o=e.findList(i.previousSibling);o?n.map(function(t){return o.appendChild(t)}):(e.wrapList(n,i.parentNode.nodeName),n.map(function(t){return t.parentNode}).map(function(t){return e.appendToPrevious(t)}))}else r.a.each(n,function(t,e){r()(e).css("marginLeft",function(t,e){return(parseInt(e,10)||0)+25})})}),n.select()}},{key:"outdent",value:function(t){var e=this,n=wt.create(t).wrapBodyInlineWithPara(),i=n.nodes(pt.isPara,{includeAncestor:!0}),o=x.clusterBy(i,g.peq2("parentNode"));r.a.each(o,function(t,n){var i=x.head(n);pt.isLi(i)?e.releaseList([n]):r.a.each(n,function(t,e){r()(e).css("marginLeft",function(t,e){return(e=parseInt(e,10)||0)>25?e-25:""})})}),n.select()}},{key:"toggleList",value:function(t,e){var n=this,i=wt.create(e).wrapBodyInlineWithPara(),o=i.nodes(pt.isPara,{includeAncestor:!0}),a=i.paraBookmark(o),s=x.clusterBy(o,g.peq2("parentNode"));if(x.find(o,pt.isPurePara)){var l=[];r.a.each(s,function(e,i){l=l.concat(n.wrapList(i,t))}),o=l}else{var u=i.nodes(pt.isList,{includeAncestor:!0}).filter(function(e){return!r.a.nodeName(e,t)});u.length?r.a.each(u,function(e,n){pt.replace(n,t)}):o=this.releaseList(s,!0)}wt.createFromParaBookmark(a,o).select()}},{key:"wrapList",value:function(t,e){var n=x.head(t),i=x.last(t),r=pt.isList(n.previousSibling)&&n.previousSibling,o=pt.isList(i.nextSibling)&&i.nextSibling,a=r||pt.insertAfter(pt.create(e||"UL"),i);return t=t.map(function(t){return pt.isPurePara(t)?pt.replace(t,"LI"):t}),pt.appendChildNodes(a,t),o&&(pt.appendChildNodes(a,x.from(o.childNodes)),pt.remove(o)),t}},{key:"releaseList",value:function(t,e){var n=this,i=[];return r.a.each(t,function(t,o){var a=x.head(o),s=x.last(o),l=e?pt.lastAncestor(a,pt.isList):a.parentNode,u=l.parentNode;if("LI"===l.parentNode.nodeName)o.map(function(t){var e=n.findNextSiblings(t);u.nextSibling?u.parentNode.insertBefore(t,u.nextSibling):u.parentNode.appendChild(t),e.length&&(n.wrapList(e,l.nodeName),t.appendChild(e[0].parentNode))}),0===l.children.length&&u.removeChild(l),0===u.childNodes.length&&u.parentNode.removeChild(u);else{var c=l.childNodes.length>1?pt.splitTree(l,{node:s.parentNode,offset:pt.position(s)+1},{isSkipPaddingBlankHTML:!0}):null,d=pt.splitTree(l,{node:a.parentNode,offset:pt.position(a)},{isSkipPaddingBlankHTML:!0});o=e?pt.listDescendant(d,pt.isLi):x.from(d.childNodes).filter(pt.isLi),!e&&pt.isList(l.parentNode)||(o=o.map(function(t){return pt.replace(t,"P")})),r.a.each(x.from(o).reverse(),function(t,e){pt.insertAfter(e,l)});var f=x.compact([l,d,c]);r.a.each(f,function(t,e){var n=[e].concat(pt.listDescendant(e,pt.isList));r.a.each(n.reverse(),function(t,e){pt.nodeLength(e)||pt.remove(e,!0)})})}i=i.concat(o)}),i}},{key:"appendToPrevious",value:function(t){return t.previousSibling?pt.appendChildNodes(t.previousSibling,[t]):this.wrapList([t],"LI")}},{key:"findList",value:function(t){return t?x.find(t.children,function(t){return["OL","UL"].indexOf(t.nodeName)>-1}):null}},{key:"findNextSiblings",value:function(t){for(var e=[];t.nextSibling;)e.push(t.nextSibling),t=t.nextSibling;return e}}])&&Ct(e.prototype,n),i&&Ct(e,i),t}();function Pt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Nt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.bullet=new Tt,this.options=e.options}var e,n,i;return e=t,(n=[{key:"insertTab",value:function(t,e){var n=pt.createText(new Array(e+1).join(pt.NBSP_CHAR));(t=t.deleteContents()).insertNode(n,!0),(t=wt.create(n,e)).select()}},{key:"insertParagraph",value:function(t,e){e=(e=(e=e||wt.create(t)).deleteContents()).wrapBodyInlineWithPara();var n,i=pt.ancestor(e.sc,pt.isPara);if(i){if(pt.isLi(i)&&(pt.isEmpty(i)||pt.deepestChildIsEmpty(i)))return void this.bullet.toggleList(i.parentNode.nodeName);var o=null;if(1===this.options.blockquoteBreakingLevel?o=pt.ancestor(i,pt.isBlockquote):2===this.options.blockquoteBreakingLevel&&(o=pt.lastAncestor(i,pt.isBlockquote)),o){n=r()(pt.emptyPara)[0],pt.isRightEdgePoint(e.getStartPoint())&&pt.isBR(e.sc.nextSibling)&&r()(e.sc.nextSibling).remove();var a=pt.splitTree(o,e.getStartPoint(),{isDiscardEmptySplits:!0});a?a.parentNode.insertBefore(n,a):pt.insertAfter(n,o)}else{n=pt.splitTree(i,e.getStartPoint());var s=pt.listDescendant(i,pt.isEmptyAnchor);s=s.concat(pt.listDescendant(n,pt.isEmptyAnchor)),r.a.each(s,function(t,e){pt.remove(e)}),(pt.isHeading(n)||pt.isPre(n)||pt.isCustomStyleTag(n))&&pt.isEmpty(n)&&(n=pt.replace(n,"p"))}}else{var l=e.sc.childNodes[e.so];n=r()(pt.emptyPara)[0],l?e.sc.insertBefore(n,l):e.sc.appendChild(n)}wt.create(n,0).normalize().select().scrollIntoView(t)}}])&&Pt(e.prototype,n),i&&Pt(e,i),t}();function It(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Lt=function t(e,n,i,r){var o={colPos:0,rowPos:0},a=[],s=[];function l(t,e,n,i,r,o,s){var l={baseRow:n,baseCell:i,isRowSpan:r,isColSpan:o,isVirtual:s};a[t]||(a[t]=[]),a[t][e]=l}function u(t,e,n,i){return{baseCell:t.baseCell,action:e,virtualTable:{rowIndex:n,cellIndex:i}}}function c(t,e){if(!a[t])return e;if(!a[t][e])return e;for(var n=e;a[t][n];)if(n++,!a[t][n])return n}function d(t,e){var n=c(t.rowIndex,e.cellIndex),i=e.colSpan>1,r=e.rowSpan>1,a=t.rowIndex===o.rowPos&&e.cellIndex===o.colPos;l(t.rowIndex,n,t,e,r,i,!1);var s=e.attributes.rowSpan?parseInt(e.attributes.rowSpan.value,10):0;if(s>1)for(var u=1;u<s;u++){var d=t.rowIndex+u;f(d,n,e,a),l(d,n,t,e,!0,i,!0)}var h=e.attributes.colSpan?parseInt(e.attributes.colSpan.value,10):0;if(h>1)for(var p=1;p<h;p++){var v=c(t.rowIndex,n+p);f(t.rowIndex,v,e,a),l(t.rowIndex,v,t,e,r,!0,!0)}}function f(t,e,n,i){t===o.rowPos&&o.colPos>=n.cellIndex&&n.cellIndex<=e&&!i&&o.colPos++}function h(e){switch(n){case t.where.Column:if(e.isColSpan)return t.resultAction.SubtractSpanCount;break;case t.where.Row:if(!e.isVirtual&&e.isRowSpan)return t.resultAction.AddCell;if(e.isRowSpan)return t.resultAction.SubtractSpanCount}return t.resultAction.RemoveCell}function p(e){switch(n){case t.where.Column:if(e.isColSpan)return t.resultAction.SumSpanCount;if(e.isRowSpan&&e.isVirtual)return t.resultAction.Ignore;break;case t.where.Row:if(e.isRowSpan)return t.resultAction.SumSpanCount;if(e.isColSpan&&e.isVirtual)return t.resultAction.Ignore}return t.resultAction.AddCell}this.getActionList=function(){for(var e=n===t.where.Row?o.rowPos:-1,r=n===t.where.Column?o.colPos:-1,l=0,c=!0;c;){var d=e>=0?e:l,f=r>=0?r:l,v=a[d];if(!v)return c=!1,s;var m=v[f];if(!m)return c=!1,s;var g=t.resultAction.Ignore;switch(i){case t.requestAction.Add:g=p(m);break;case t.requestAction.Delete:g=h(m)}s.push(u(m,g,d,f)),l++}return s},e&&e.tagName&&("td"===e.tagName.toLowerCase()||"th"===e.tagName.toLowerCase())&&(o.colPos=e.cellIndex,e.parentElement&&e.parentElement.tagName&&"tr"===e.parentElement.tagName.toLowerCase()&&(o.rowPos=e.parentElement.rowIndex)),function(){for(var t=r.rows,e=0;e<t.length;e++)for(var n=t[e].cells,i=0;i<n.length;i++)d(t[e],n[i])}()};Lt.where={Row:0,Column:1},Lt.requestAction={Add:0,Delete:1},Lt.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Mt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,i;return e=t,(n=[{key:"tab",value:function(t,e){var n=pt.ancestor(t.commonAncestor(),pt.isCell),i=pt.ancestor(n,pt.isTable),r=pt.listDescendant(i,pt.isCell),o=x[e?"prev":"next"](r,n);o&&wt.create(o,0).select()}},{key:"addRow",value:function(t,e){for(var n=pt.ancestor(t.commonAncestor(),pt.isCell),i=r()(n).closest("tr"),o=this.recoverAttributes(i),a=r()("<tr"+o+"></tr>"),s=new Lt(n,Lt.where.Row,Lt.requestAction.Add,r()(i).closest("table")[0]).getActionList(),l=0;l<s.length;l++){var u=s[l],c=this.recoverAttributes(u.baseCell);switch(u.action){case Lt.resultAction.AddCell:a.append("<td"+c+">"+pt.blank+"</td>");break;case Lt.resultAction.SumSpanCount:if("top"===e)if((u.baseCell.parent?u.baseCell.closest("tr").rowIndex:0)<=i[0].rowIndex){var d=r()("<div></div>").append(r()("<td"+c+">"+pt.blank+"</td>").removeAttr("rowspan")).html();a.append(d);break}var f=parseInt(u.baseCell.rowSpan,10);f++,u.baseCell.setAttribute("rowSpan",f)}}if("top"===e)i.before(a);else{if(n.rowSpan>1){var h=i[0].rowIndex+(n.rowSpan-2);return void r()(r()(i).parent().find("tr")[h]).after(r()(a))}i.after(a)}}},{key:"addCol",value:function(t,e){var n=pt.ancestor(t.commonAncestor(),pt.isCell),i=r()(n).closest("tr");r()(i).siblings().push(i);for(var o=new Lt(n,Lt.where.Column,Lt.requestAction.Add,r()(i).closest("table")[0]).getActionList(),a=0;a<o.length;a++){var s=o[a],l=this.recoverAttributes(s.baseCell);switch(s.action){case Lt.resultAction.AddCell:"right"===e?r()(s.baseCell).after("<td"+l+">"+pt.blank+"</td>"):r()(s.baseCell).before("<td"+l+">"+pt.blank+"</td>");break;case Lt.resultAction.SumSpanCount:if("right"===e){var u=parseInt(s.baseCell.colSpan,10);u++,s.baseCell.setAttribute("colSpan",u)}else r()(s.baseCell).before("<td"+l+">"+pt.blank+"</td>")}}}},{key:"recoverAttributes",value:function(t){var e="";if(!t)return e;for(var n=t.attributes||[],i=0;i<n.length;i++)"id"!==n[i].name.toLowerCase()&&n[i].specified&&(e+=" "+n[i].name+"='"+n[i].value+"'");return e}},{key:"deleteRow",value:function(t){for(var e=pt.ancestor(t.commonAncestor(),pt.isCell),n=r()(e).closest("tr"),i=n.children("td, th").index(r()(e)),o=n[0].rowIndex,a=new Lt(e,Lt.where.Row,Lt.requestAction.Delete,r()(n).closest("table")[0]).getActionList(),s=0;s<a.length;s++)if(a[s]){var l=a[s].baseCell,u=a[s].virtualTable,c=l.rowSpan&&l.rowSpan>1,d=c?parseInt(l.rowSpan,10):0;switch(a[s].action){case Lt.resultAction.Ignore:continue;case Lt.resultAction.AddCell:var f=n.next("tr")[0];if(!f)continue;var h=n[0].cells[i];c&&(d>2?(d--,f.insertBefore(h,f.cells[i]),f.cells[i].setAttribute("rowSpan",d),f.cells[i].innerHTML=""):2===d&&(f.insertBefore(h,f.cells[i]),f.cells[i].removeAttribute("rowSpan"),f.cells[i].innerHTML=""));continue;case Lt.resultAction.SubtractSpanCount:c&&(d>2?(d--,l.setAttribute("rowSpan",d),u.rowIndex!==o&&l.cellIndex===i&&(l.innerHTML="")):2===d&&(l.removeAttribute("rowSpan"),u.rowIndex!==o&&l.cellIndex===i&&(l.innerHTML="")));continue;case Lt.resultAction.RemoveCell:continue}}n.remove()}},{key:"deleteCol",value:function(t){for(var e=pt.ancestor(t.commonAncestor(),pt.isCell),n=r()(e).closest("tr"),i=n.children("td, th").index(r()(e)),o=new Lt(e,Lt.where.Column,Lt.requestAction.Delete,r()(n).closest("table")[0]).getActionList(),a=0;a<o.length;a++)if(o[a])switch(o[a].action){case Lt.resultAction.Ignore:continue;case Lt.resultAction.SubtractSpanCount:var s=o[a].baseCell;if(s.colSpan&&s.colSpan>1){var l=s.colSpan?parseInt(s.colSpan,10):0;l>2?(l--,s.setAttribute("colSpan",l),s.cellIndex===i&&(s.innerHTML="")):2===l&&(s.removeAttribute("colSpan"),s.cellIndex===i&&(s.innerHTML=""))}continue;case Lt.resultAction.RemoveCell:pt.remove(o[a].baseCell,!0);continue}}},{key:"createTable",value:function(t,e,n){for(var i,o=[],a=0;a<t;a++)o.push("<td>"+pt.blank+"</td>");i=o.join("");for(var s,l=[],u=0;u<e;u++)l.push("<tr>"+i+"</tr>");s=l.join("");var c=r()("<table>"+s+"</table>");return n&&n.tableClassName&&c.addClass(n.tableClassName),c[0]}},{key:"deleteTable",value:function(t){var e=pt.ancestor(t.commonAncestor(),pt.isCell);r()(e).closest("table").remove()}}])&&It(e.prototype,n),i&&It(e,i),t}();function Dt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var jt=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.$note=e.layoutInfo.note,this.$editor=e.layoutInfo.editor,this.$editable=e.layoutInfo.editable,this.options=e.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.snapshot=null,this.style=new At,this.table=new Mt,this.typing=new Nt(e),this.bullet=new Tt,this.history=new St(e),this.context.memo("help.escape",this.lang.help.escape),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,a=i.length;o<a;o++)this[i[o]]=function(t){return function(e){n.beforeCommand(),document.execCommand(t,!1,e),n.afterCommand(!0)}}(i[o]),this.context.memo("help."+i[o],this.lang.help[i[o]]);this.fontName=this.wrapCommand(function(t){return n.fontStyling("font-family",v.validFontName(t))}),this.fontSize=this.wrapCommand(function(t){var e=n.currentStyle()["font-size-unit"];return n.fontStyling("font-size",t+e)}),this.fontSizeUnit=this.wrapCommand(function(t){var e=n.currentStyle()["font-size"];return n.fontStyling("font-size",e+t)});for(var s=1;s<=6;s++)this["formatH"+s]=function(t){return function(){n.formatBlock("H"+t)}}(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(t){n.isLimited(r()(t).text().length)||(n.getLastRange().insertNode(t),n.setLastRange(wt.createFromNodeAfter(t).select()))}),this.insertText=this.wrapCommand(function(t){if(!n.isLimited(t.length)){var e=n.getLastRange().insertNode(pt.createText(t));n.setLastRange(wt.create(e,pt.nodeLength(e)).select())}}),this.pasteHTML=this.wrapCommand(function(t){if(!n.isLimited(t.length)){t=n.context.invoke("codeview.purify",t);var e=n.getLastRange().pasteHTML(t);n.setLastRange(wt.createFromNodeAfter(x.last(e)).select())}}),this.formatBlock=this.wrapCommand(function(t,e){var i=n.options.callbacks.onApplyCustomStyle;i?i.call(n,e,n.context,n.onFormatBlock):n.onFormatBlock(t,e)}),this.insertHorizontalRule=this.wrapCommand(function(){var t=n.getLastRange().insertNode(pt.create("HR"));t.nextSibling&&n.setLastRange(wt.create(t.nextSibling,0).normalize().select())}),this.lineHeight=this.wrapCommand(function(t){n.style.stylePara(n.getLastRange(),{lineHeight:t})}),this.createLink=this.wrapCommand(function(t){var e=t.url,i=t.text,o=t.isNewWindow,a=t.checkProtocol,s=t.range||n.getLastRange(),l=i.length-s.toString().length;if(!(l>0&&n.isLimited(l))){var u=s.toString()!==i;"string"==typeof e&&(e=e.trim()),n.options.onCreateLink?e=n.options.onCreateLink(e):a&&(e=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/.test(e)?e:n.options.defaultProtocol+e);var c=[];if(u){var d=(s=s.deleteContents()).insertNode(r()("<A>"+i+"</A>")[0]);c.push(d)}else c=n.style.styleNodes(s,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});r.a.each(c,function(t,n){r()(n).attr("href",e),o?r()(n).attr("target","_blank"):r()(n).removeAttr("target")}),n.setLastRange(n.createRangeFromList(c).select())}}),this.color=this.wrapCommand(function(t){var e=t.foreColor,n=t.backColor;e&&document.execCommand("foreColor",!1,e),n&&document.execCommand("backColor",!1,n)}),this.foreColor=this.wrapCommand(function(t){document.execCommand("foreColor",!1,t)}),this.insertTable=this.wrapCommand(function(t){var e=t.split("x");n.getLastRange().deleteContents().insertNode(n.table.createTable(e[0],e[1],n.options))}),this.removeMedia=this.wrapCommand(function(){var t=r()(n.restoreTarget()).parent();t.closest("figure").length?t.closest("figure").remove():t=r()(n.restoreTarget()).detach(),n.context.triggerEvent("media.delete",t,n.$editable)}),this.floatMe=this.wrapCommand(function(t){var e=r()(n.restoreTarget());e.toggleClass("note-float-left","left"===t),e.toggleClass("note-float-right","right"===t),e.css("float","none"===t?"":t)}),this.resize=this.wrapCommand(function(t){var e=r()(n.restoreTarget());0===(t=parseFloat(t))?e.css("width",""):e.css({width:100*t+"%",height:""})})}var e,n,i;return e=t,(n=[{key:"initialize",value:function(){var t=this;this.$editable.on("keydown",function(e){if(e.keyCode===_t.code.ENTER&&t.context.triggerEvent("enter",e),t.context.triggerEvent("keydown",e),t.snapshot=t.history.makeSnapshot(),t.hasKeyShortCut=!1,e.isDefaultPrevented()||(t.options.shortcuts?t.hasKeyShortCut=t.handleKeyMap(e):t.preventDefaultEditableShortCuts(e)),t.isLimited(1,e)){var n=t.getLastRange();if(n.eo-n.so==0)return!1}t.setLastRange(),t.options.recordEveryKeystroke&&!1===t.hasKeyShortCut&&t.history.recordUndo()}).on("keyup",function(e){t.setLastRange(),t.context.triggerEvent("keyup",e)}).on("focus",function(e){t.setLastRange(),t.context.triggerEvent("focus",e)}).on("blur",function(e){t.context.triggerEvent("blur",e)}).on("mousedown",function(e){t.context.triggerEvent("mousedown",e)}).on("mouseup",function(e){t.setLastRange(),t.history.recordUndo(),t.context.triggerEvent("mouseup",e)}).on("scroll",function(e){t.context.triggerEvent("scroll",e)}).on("paste",function(e){t.setLastRange(),t.context.triggerEvent("paste",e)}).on("input",function(){t.isLimited(0)&&t.snapshot&&t.history.applySnapshot(t.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(pt.html(this.$note)||pt.emptyPara),this.$editable.on(v.inputEventName,g.debounce(function(){t.context.triggerEvent("change",t.$editable.html(),t.$editable)},10)),this.$editable.on("focusin",function(e){t.context.triggerEvent("focusin",e)}).on("focusout",function(e){t.context.triggerEvent("focusout",e)}),this.options.airMode?this.options.overrideContextMenu&&this.$editor.on("contextmenu",function(e){return t.context.triggerEvent("contextmenu",e),!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(t){var e=this.options.keyMap[v.isMac?"mac":"pc"],n=[];t.metaKey&&n.push("CMD"),t.ctrlKey&&!t.altKey&&n.push("CTRL"),t.shiftKey&&n.push("SHIFT");var i=_t.nameFromCode[t.keyCode];i&&n.push(i);var r=e[n.join("+")];if("TAB"!==i||this.options.tabDisable)if(r){if(!1!==this.context.invoke(r))return t.preventDefault(),!0}else _t.isEdit(t.keyCode)&&this.afterCommand();else this.afterCommand();return!1}},{key:"preventDefaultEditableShortCuts",value:function(t){(t.ctrlKey||t.metaKey)&&x.contains([66,73,85],t.keyCode)&&t.preventDefault()}},{key:"isLimited",value:function(t,e){return t=t||0,(void 0===e||!(_t.isMove(e.keyCode)||_t.isNavigation(e.keyCode)||e.ctrlKey||e.metaKey||x.contains([_t.code.BACKSPACE,_t.code.DELETE],e.keyCode)))&&(this.options.maxTextLength>0&&this.$editable.text().length+t>this.options.maxTextLength)}},{key:"createRange",value:function(){return this.focus(),this.setLastRange(),this.getLastRange()}},{key:"createRangeFromList",value:function(t){var e=wt.createFromNodeBefore(x.head(t)).getStartPoint(),n=wt.createFromNodeAfter(x.last(t)).getEndPoint();return wt.create(e.node,e.offset,n.node,n.offset)}},{key:"setLastRange",value:function(t){t?this.lastRange=t:(this.lastRange=wt.create(this.editable),0===r()(this.lastRange.sc).closest(".note-editable").length&&(this.lastRange=wt.createFromBodyElement(this.editable)))}},{key:"getLastRange",value:function(){return this.lastRange||this.setLastRange(),this.lastRange}},{key:"saveRange",value:function(t){t&&this.getLastRange().collapse().select()}},{key:"restoreRange",value:function(){this.lastRange&&(this.lastRange.select(),this.focus())}},{key:"saveTarget",value:function(t){this.$editable.data("target",t)}},{key:"clearTarget",value:function(){this.$editable.removeData("target")}},{key:"restoreTarget",value:function(){return this.$editable.data("target")}},{key:"currentStyle",value:function(){var t=wt.create();return t&&(t=t.normalize()),t?this.style.current(t):this.style.fromNode(this.$editable)}},{key:"styleFromNode",value:function(t){return this.style.fromNode(t)}},{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(t){this.normalizeContent(),this.history.recordUndo(),t||this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"tab",value:function(){var t=this.getLastRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(t,this.options.tabSize),this.afterCommand())}}},{key:"untab",value:function(){var t=this.getLastRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t,!0);else if(0===this.options.tabSize)return!1}},{key:"wrapCommand",value:function(t){return function(){this.beforeCommand(),t.apply(this,arguments),this.afterCommand()}}},{key:"insertImage",value:function(t,e){var n,i=this;return(n=t,r.a.Deferred(function(t){var e=r()("<img>");e.one("load",function(){e.off("error abort"),t.resolve(e)}).one("error abort",function(){e.off("load").detach(),t.reject(e)}).css({display:"none"}).appendTo(document.body).attr("src",n)}).promise()).then(function(t){i.beforeCommand(),"function"==typeof e?e(t):("string"==typeof e&&t.attr("data-filename",e),t.css("width",Math.min(i.$editable.width(),t.width()))),t.show(),i.getLastRange().insertNode(t[0]),i.setLastRange(wt.createFromNodeAfter(t[0]).select()),i.afterCommand()}).fail(function(t){i.context.triggerEvent("image.upload.error",t)})}},{key:"insertImagesAsDataURL",value:function(t){var e=this;r.a.each(t,function(t,n){var i=n.name;e.options.maximumImageFileSize&&e.options.maximumImageFileSize<n.size?e.context.triggerEvent("image.upload.error",e.lang.image.maximumFileSizeError):function(t){return r.a.Deferred(function(e){r.a.extend(new FileReader,{onload:function(t){var n=t.target.result;e.resolve(n)},onerror:function(t){e.reject(t)}}).readAsDataURL(t)}).promise()}(n).then(function(t){return e.insertImage(t,i)}).fail(function(){e.context.triggerEvent("image.upload.error")})})}},{key:"insertImagesOrCallback",value:function(t){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",t):this.insertImagesAsDataURL(t)}},{key:"getSelectedText",value:function(){var t=this.getLastRange();return t.isOnAnchor()&&(t=wt.createFromNode(pt.ancestor(t.sc,pt.isAnchor))),t.toString()}},{key:"onFormatBlock",value:function(t,e){if(document.execCommand("FormatBlock",!1,v.isMSIE?"<"+t+">":t),e&&e.length&&(e[0].tagName.toUpperCase()!==t.toUpperCase()&&(e=e.find(t)),e&&e.length)){var n=e[0].className||"";if(n){var i=this.createRange();r()([i.sc,i.ec]).closest(t).addClass(n)}}}},{key:"formatPara",value:function(){this.formatBlock("P")}},{key:"fontStyling",value:function(t,e){var n=this.getLastRange();if(""!==n){var i=this.style.styleNodes(n);if(this.$editor.find(".note-status-output").html(""),r()(i).css(t,e),n.isCollapsed()){var o=x.head(i);o&&!pt.nodeLength(o)&&(o.innerHTML=pt.ZERO_WIDTH_NBSP_CHAR,wt.createFromNode(o.firstChild).select(),this.setLastRange(),this.$editable.data("bogus",o))}else this.setLastRange(this.createRangeFromList(i).select())}else{var a=r.a.now();this.$editor.find(".note-status-output").html('<div id="note-status-output-'+a+'" class="alert alert-info">'+this.lang.output.noSelection+"</div>"),setTimeout(function(){r()("#note-status-output-"+a).remove()},5e3)}}},{key:"unlink",value:function(){var t=this.getLastRange();if(t.isOnAnchor()){var e=pt.ancestor(t.sc,pt.isAnchor);(t=wt.createFromNode(e)).select(),this.setLastRange(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}}},{key:"getLinkInfo",value:function(){var t=this.getLastRange().expand(pt.isAnchor),e=r()(x.head(t.nodes(pt.isAnchor))),n={range:t,text:t.toString(),url:e.length?e.attr("href"):""};return e.length&&(n.isNewWindow="_blank"===e.attr("target")),n}},{key:"addRow",value:function(t){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addRow(e,t),this.afterCommand())}},{key:"addCol",value:function(t){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addCol(e,t),this.afterCommand())}},{key:"deleteRow",value:function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(t),this.afterCommand())}},{key:"deleteCol",value:function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(t),this.afterCommand())}},{key:"deleteTable",value:function(){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(t),this.afterCommand())}},{key:"resizeTo",value:function(t,e,n){var i;if(n){var r=t.y/t.x,o=e.data("ratio");i={width:o>r?t.x:t.y/o,height:o>r?t.x*o:t.y}}else i={width:t.x,height:t.y};e.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 pt.isEmpty(this.$editable[0])||pt.emptyPara===this.$editable.html()}},{key:"empty",value:function(){this.context.invoke("code",pt.emptyPara)}},{key:"normalizeContent",value:function(){this.$editable[0].normalize()}}])&&Dt(e.prototype,n),i&&Dt(e,i),t}();function Rt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Ft=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.$editable=e.layoutInfo.editable}var e,n,i;return e=t,(n=[{key:"initialize",value:function(){this.$editable.on("paste",this.pasteByEvent.bind(this))}},{key:"pasteByEvent",value:function(t){var e=this,n=t.originalEvent.clipboardData;if(n&&n.items&&n.items.length){var i=n.items.length>1?n.items[1]:x.head(n.items);"file"===i.kind&&-1!==i.type.indexOf("image/")?(this.context.invoke("editor.insertImagesOrCallback",[i.getAsFile()]),t.preventDefault()):"string"===i.kind&&this.context.invoke("editor.isLimited",n.getData("Text").length)&&t.preventDefault()}else if(window.clipboardData){var r=window.clipboardData.getData("text");this.context.invoke("editor.isLimited",r.length)&&t.preventDefault()}setTimeout(function(){e.context.invoke("editor.afterCommand")},10)}}])&&Rt(e.prototype,n),i&&Rt(e,i),t}();function $t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Ht=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.$eventListener=r()(document),this.$editor=e.layoutInfo.editor,this.$editable=e.layoutInfo.editable,this.options=e.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=r()(['<div class="note-dropzone">','<div class="note-dropzone-message"></div>',"</div>"].join("")).prependTo(this.$editor)}var e,n,i;return e=t,(n=[{key:"initialize",value:function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(t){t.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()}},{key:"attachDragAndDropEvent",value:function(){var t=this,e=r()(),n=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(i){var r=t.context.invoke("codeview.isActivated"),o=t.$editor.width()>0&&t.$editor.height()>0;r||e.length||!o||(t.$editor.addClass("dragover"),t.$dropzone.width(t.$editor.width()),t.$dropzone.height(t.$editor.height()),n.text(t.lang.image.dragImageHere)),e=e.add(i.target)},this.documentEventHandlers.onDragleave=function(n){(e=e.not(n.target)).length&&"BODY"!==n.target.nodeName||(e=r()(),t.$editor.removeClass("dragover"))},this.documentEventHandlers.onDrop=function(){e=r()(),t.$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(){t.$dropzone.addClass("hover"),n.text(t.lang.image.dropImage)}).on("dragleave",function(){t.$dropzone.removeClass("hover"),n.text(t.lang.image.dragImageHere)}),this.$dropzone.on("drop",function(e){var n=e.originalEvent.dataTransfer;e.preventDefault(),n&&n.files&&n.files.length?(t.$editable.focus(),t.context.invoke("editor.insertImagesOrCallback",n.files)):r.a.each(n.types,function(e,i){if(!(i.toLowerCase().indexOf("_moz_")>-1)){var o=n.getData(i);i.toLowerCase().indexOf("text")>-1?t.context.invoke("editor.pasteHTML",o):r()(o).each(function(e,n){t.context.invoke("editor.insertNode",n)})}})}).on("dragover",!1)}},{key:"destroy",value:function(){var t=this;Object.keys(this.documentEventHandlers).forEach(function(e){t.$eventListener.off(e.substr(2).toLowerCase(),t.documentEventHandlers[e])}),this.documentEventHandlers={}}}])&&$t(e.prototype,n),i&&$t(e,i),t}();function Bt(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"==typeof t)return qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qt(t,e)}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r,o=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return o=t.done,t},e:function(t){a=!0,r=t},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function zt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Ut=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.$editor=e.layoutInfo.editor,this.$editable=e.layoutInfo.editable,this.$codable=e.layoutInfo.codable,this.options=e.options,this.CodeMirrorConstructor=window.CodeMirror,this.options.codemirror.CodeMirrorConstructor&&(this.CodeMirrorConstructor=this.options.codemirror.CodeMirrorConstructor)}var e,n,i;return e=t,(n=[{key:"sync",value:function(t){var e=this.isActivated(),n=this.CodeMirrorConstructor;e&&(t?n?this.$codable.data("cmEditor").getDoc().setValue(t):this.$codable.val(t):n&&this.$codable.data("cmEditor").save())}},{key:"initialize",value:function(){var t=this;this.$codable.on("keyup",function(e){e.keyCode===_t.code.ESCAPE&&t.deactivate()})}},{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(t){if(this.options.codeviewFilter&&(t=t.replace(this.options.codeviewFilterRegex,""),this.options.codeviewIframeFilter)){var e=this.options.codeviewIframeWhitelistSrc.concat(this.options.codeviewIframeWhitelistSrcBase);t=t.replace(/(<iframe.*?>.*?(?:<\/iframe>)?)/gi,function(t){if(/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(t))return"";var n,i=Bt(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(new RegExp('src="(https?:)?//'+r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+'/(.+)"').test(t))return t}}catch(t){i.e(t)}finally{i.f()}return""})}return t}},{key:"activate",value:function(){var t=this,e=this.CodeMirrorConstructor;if(this.$codable.val(pt.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.context.invoke("airPopover.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.focus(),e){var n=e.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var i=new e.TernServer(this.options.codemirror.tern);n.ternServer=i,n.on("cursorActivity",function(t){i.updateArgHints(t)})}n.on("blur",function(e){t.context.triggerEvent("blur.codeview",n.getValue(),e)}),n.on("change",function(){t.context.triggerEvent("change.codeview",n.getValue(),n)}),n.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",n)}else this.$codable.on("blur",function(e){t.context.triggerEvent("blur.codeview",t.$codable.val(),e)}),this.$codable.on("input",function(){t.context.triggerEvent("change.codeview",t.$codable.val(),t.$codable)})}},{key:"deactivate",value:function(){if(this.CodeMirrorConstructor){var t=this.$codable.data("cmEditor");this.$codable.val(t.getValue()),t.toTextArea()}var e=this.purify(pt.value(this.$codable,this.options.prettifyHtml)||pt.emptyPara),n=this.$editable.html()!==e;this.$editable.html(e),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),this.context.invoke("airPopover.updateCodeview",!1)}},{key:"destroy",value:function(){this.isActivated()&&this.deactivate()}}])&&zt(e.prototype,n),i&&zt(e,i),t}();function Vt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Kt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$document=r()(document),this.$statusbar=e.layoutInfo.statusbar,this.$editable=e.layoutInfo.editable,this.options=e.options}var e,n,i;return e=t,(n=[{key:"initialize",value:function(){var t=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",function(e){e.preventDefault(),e.stopPropagation();var n=t.$editable.offset().top-t.$document.scrollTop(),i=function(e){var i=e.clientY-(n+24);i=t.options.minheight>0?Math.max(i,t.options.minheight):i,i=t.options.maxHeight>0?Math.min(i,t.options.maxHeight):i,t.$editable.height(i)};t.$document.on("mousemove",i).one("mouseup",function(){t.$document.off("mousemove",i)})})}},{key:"destroy",value:function(){this.$statusbar.off(),this.$statusbar.addClass("locked")}}])&&Vt(e.prototype,n),i&&Vt(e,i),t}();function Wt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Gt=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.$editor=e.layoutInfo.editor,this.$toolbar=e.layoutInfo.toolbar,this.$editable=e.layoutInfo.editable,this.$codable=e.layoutInfo.codable,this.$window=r()(window),this.$scrollbar=r()("html, body"),this.onResize=function(){n.resizeTo({h:n.$window.height()-n.$toolbar.outerHeight()})}}var e,n,i;return e=t,(n=[{key:"resizeTo",value:function(t){this.$editable.css("height",t.h),this.$codable.css("height",t.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,t.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")}}])&&Wt(e.prototype,n),i&&Wt(e,i),t}();function Yt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Zt=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.$document=r()(document),this.$editingArea=e.layoutInfo.editingArea,this.options=e.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(t,e){n.update(e.target,e)&&e.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 e,n,i;return e=t,(n=[{key:"initialize",value:function(){var t=this;this.$handle=r()(['<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(e){if(pt.isControlSizing(e.target)){e.preventDefault(),e.stopPropagation();var n=t.$handle.find(".note-control-selection").data("target"),i=n.offset(),r=t.$document.scrollTop(),o=function(e){t.context.invoke("editor.resizeTo",{x:e.clientX-i.left,y:e.clientY-(i.top-r)},n,!e.shiftKey),t.update(n[0],e)};t.$document.on("mousemove",o).one("mouseup",function(e){e.preventDefault(),t.$document.off("mousemove",o),t.context.invoke("editor.afterCommand")}),n.data("ratio")||n.data("ratio",n.height()/n.width())}}),this.$handle.on("wheel",function(e){e.preventDefault(),t.update()})}},{key:"destroy",value:function(){this.$handle.remove()}},{key:"update",value:function(t,e){if(this.context.isDisabled())return!1;var n=pt.isImg(t),i=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",t,e),n){var o=r()(t),a=o.position(),s={left:a.left+parseInt(o.css("marginLeft"),10),top:a.top+parseInt(o.css("marginTop"),10)},l={w:o.outerWidth(!1),h:o.outerHeight(!1)};i.css({display:"block",left:s.left,top:s.top,width:l.w,height:l.h}).data("target",o);var u=new Image;u.src=o.attr("src");var c=l.w+"x"+l.h+" ("+this.lang.image.original+": "+u.width+"x"+u.height+")";i.find(".note-control-selection-info").text(c),this.context.invoke("editor.saveTarget",t)}else this.hide();return n}},{key:"hide",value:function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()}}])&&Yt(e.prototype,n),i&&Yt(e,i),t}();function Xt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Qt=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/]{2}|tel:|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,Jt=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.options=e.options,this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||n.handleKeyup(e)},"summernote.keydown":function(t,e){n.handleKeydown(e)}}}var e,n,i;return e=t,(n=[{key:"initialize",value:function(){this.lastWordRange=null}},{key:"destroy",value:function(){this.lastWordRange=null}},{key:"replace",value:function(){if(this.lastWordRange){var t=this.lastWordRange.toString(),e=t.match(Qt);if(e&&(e[1]||e[2])){var n=e[1]?t:"http://"+t,i=this.options.showDomainOnlyForAutolink?t.replace(/^(?:https?:\/\/)?(?:tel?:?)?(?:mailto?:?)?(?:www\.)?/i,"").split("/")[0]:t,o=r()("<a />").html(i).attr("href",n)[0];this.context.options.linkTargetBlank&&r()(o).attr("target","_blank"),this.lastWordRange.insertNode(o),this.lastWordRange=null,this.context.invoke("editor.focus")}}}},{key:"handleKeydown",value:function(t){if(x.contains([_t.code.ENTER,_t.code.SPACE],t.keyCode)){var e=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=e}}},{key:"handleKeyup",value:function(t){x.contains([_t.code.ENTER,_t.code.SPACE],t.keyCode)&&this.replace()}}])&&Xt(e.prototype,n),i&&Xt(e,i),t}();function te(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var ee=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$note=e.layoutInfo.note,this.events={"summernote.change":function(){n.$note.val(e.invoke("code"))}}}var e,n,i;return e=t,(n=[{key:"shouldInitialize",value:function(){return pt.isTextarea(this.$note[0])}}])&&te(e.prototype,n),i&&te(e,i),t}();function ne(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var ie=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.options=e.options.replace||{},this.keys=[_t.code.ENTER,_t.code.SPACE,_t.code.PERIOD,_t.code.COMMA,_t.code.SEMICOLON,_t.code.SLASH],this.previousKeydownCode=null,this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||n.handleKeyup(e)},"summernote.keydown":function(t,e){n.handleKeydown(e)}}}var e,n,i;return e=t,(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 t=this,e=this.lastWord.toString();this.options.match(e,function(e){if(e){var n="";if("string"==typeof e?n=pt.createText(e):e instanceof jQuery?n=e[0]:e instanceof Node&&(n=e),!n)return;t.lastWord.insertNode(n),t.lastWord=null,t.context.invoke("editor.focus")}})}}},{key:"handleKeydown",value:function(t){if(this.previousKeydownCode&&x.contains(this.keys,this.previousKeydownCode))this.previousKeydownCode=t.keyCode;else{if(x.contains(this.keys,t.keyCode)){var e=this.context.invoke("editor.createRange").getWordRange();this.lastWord=e}this.previousKeydownCode=t.keyCode}}},{key:"handleKeyup",value:function(t){x.contains(this.keys,t.keyCode)&&this.replace()}}])&&ne(e.prototype,n),i&&ne(e,i),t}();function re(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var oe=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.$editingArea=e.layoutInfo.editingArea,this.options=e.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 e,n,i;return e=t,(n=[{key:"shouldInitialize",value:function(){return!!this.options.placeholder}},{key:"initialize",value:function(){var t=this;this.$placeholder=r()('<div class="note-placeholder">'),this.$placeholder.on("click",function(){t.context.invoke("focus")}).html(this.options.placeholder).prependTo(this.$editingArea),this.update()}},{key:"destroy",value:function(){this.$placeholder.remove()}},{key:"update",value:function(){var t=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(t)}}])&&re(e.prototype,n),i&&re(e,i),t}();function ae(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var se=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ui=r.a.summernote.ui,this.context=e,this.$toolbar=e.layoutInfo.toolbar,this.options=e.options,this.lang=this.options.langInfo,this.invertedKeyMap=g.invertObject(this.options.keyMap[v.isMac?"mac":"pc"])}var e,n,i;return e=t,(n=[{key:"representShortcut",value:function(t){var e=this.invertedKeyMap[t];return this.options.shortcuts&&e?(v.isMac&&(e=e.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(e=e.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""}},{key:"button",value:function(t){return!this.options.tooltip&&t.tooltip&&delete t.tooltip,t.container=this.options.container,this.ui.button(t)}},{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(t){return Object.prototype.hasOwnProperty.call(this.fontInstalledMap,t)||(this.fontInstalledMap[t]=v.isFontInstalled(t)||x.contains(this.options.fontNamesIgnoreCheck,t)),this.fontInstalledMap[t]}},{key:"isFontDeservedToAdd",value:function(t){return""!==(t=t.toLowerCase())&&this.isFontInstalled(t)&&-1===v.genericFontFamilies.indexOf(t)}},{key:"colorPalette",value:function(t,e,n,i){var o=this;return this.ui.buttonGroup({className:"note-color "+t,children:[this.button({className:"note-current-color-button",contents:this.ui.icon(this.options.icons.font+" note-recent-color"),tooltip:e,click:function(t){var e=r()(t.currentTarget);n&&i?o.context.invoke("editor.color",{backColor:e.attr("data-backColor"),foreColor:e.attr("data-foreColor")}):n?o.context.invoke("editor.color",{backColor:e.attr("data-backColor")}):i&&o.context.invoke("editor.color",{foreColor:e.attr("data-foreColor")})},callback:function(t){var e=t.find(".note-recent-color");n&&(e.css("background-color",o.options.colorButton.backColor),t.attr("data-backColor",o.options.colorButton.backColor)),i?(e.css("color",o.options.colorButton.foreColor),t.attr("data-foreColor",o.options.colorButton.foreColor)):e.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 btn-default" data-event="backColor" data-value="transparent">',this.lang.color.transparent,"</button>","</div>",'<div class="note-holder" data-event="backColor">\x3c!-- back colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" 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>',"</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 btn-default" data-event="removeFormat" data-value="foreColor">',this.lang.color.resetToDefault,"</button>","</div>",'<div class="note-holder" data-event="foreColor">\x3c!-- fore colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" 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>',"</div>"].join(""):""),callback:function(t){t.find(".note-holder").each(function(t,e){var n=r()(e);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 e=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];t.find(".note-holder-custom").each(function(t,n){var i=r()(n);i.append(o.ui.palette({colors:e,colorsName:e,eventName:i.data("event"),container:o.options.container,tooltip:o.options.tooltip}).render())}),t.find("input[type=color]").each(function(e,n){r()(n).change(function(){var e=t.find("#"+r()(this).data("event")).find(".note-color-btn").first(),n=this.value.toUpperCase();e.css("background-color",n).attr("aria-label",n).attr("data-value",n).attr("data-original-title",n),e.click()})})},click:function(e){e.stopPropagation();var n=r()("."+t).find(".note-dropdown-menu"),i=r()(e.target),a=i.data("event"),s=i.attr("data-value");if("openPalette"===a){var l=n.find("#"+s),u=r()(n.find("#"+l.data("event")).find(".note-color-row")[0]),c=u.find(".note-color-btn").last().detach(),d=l.val();c.css("background-color",d).attr("aria-label",d).attr("data-value",d).attr("data-original-title",d),u.prepend(c),l.click()}else{if(x.contains(["backColor","foreColor"],a)){var f="backColor"===a?"background-color":"color",h=i.closest(".note-color").find(".note-recent-color"),p=i.closest(".note-color").find(".note-current-color-button");h.css(f,s),p.attr("data-"+a,s)}o.context.invoke("editor."+a,s)}}})]}).render()}},{key:"addToolbarButtons",value:function(){var t=this;this.context.memo("button.style",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.magic),t.options),tooltip:t.lang.style.style,data:{toggle:"dropdown"}}),t.ui.dropdown({className:"dropdown-style",items:t.options.styleTags,title:t.lang.style.style,template:function(e){"string"==typeof e&&(e={tag:e,title:Object.prototype.hasOwnProperty.call(t.lang.style,e)?t.lang.style[e]:e});var n=e.tag,i=e.title;return"<"+n+(e.style?' style="'+e.style+'" ':"")+(e.className?' class="'+e.className+'"':"")+">"+i+"</"+n+">"},click:t.context.createInvokeHandler("editor.formatBlock")})]).render()});for(var e=function(e,n){var i=t.options.styleTags[e];t.context.memo("button.style."+i,function(){return t.button({className:"note-btn-style-"+i,contents:'<div data-value="'+i+'">'+i.toUpperCase()+"</div>",tooltip:t.lang.style[i],click:t.context.createInvokeHandler("editor.formatBlock")}).render()})},n=0,i=this.options.styleTags.length;n<i;n++)e(n);this.context.memo("button.bold",function(){return t.button({className:"note-btn-bold",contents:t.ui.icon(t.options.icons.bold),tooltip:t.lang.font.bold+t.representShortcut("bold"),click:t.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()}),this.context.memo("button.italic",function(){return t.button({className:"note-btn-italic",contents:t.ui.icon(t.options.icons.italic),tooltip:t.lang.font.italic+t.representShortcut("italic"),click:t.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()}),this.context.memo("button.underline",function(){return t.button({className:"note-btn-underline",contents:t.ui.icon(t.options.icons.underline),tooltip:t.lang.font.underline+t.representShortcut("underline"),click:t.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()}),this.context.memo("button.clear",function(){return t.button({contents:t.ui.icon(t.options.icons.eraser),tooltip:t.lang.font.clear+t.representShortcut("removeFormat"),click:t.context.createInvokeHandler("editor.removeFormat")}).render()}),this.context.memo("button.strikethrough",function(){return t.button({className:"note-btn-strikethrough",contents:t.ui.icon(t.options.icons.strikethrough),tooltip:t.lang.font.strikethrough+t.representShortcut("strikethrough"),click:t.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()}),this.context.memo("button.superscript",function(){return t.button({className:"note-btn-superscript",contents:t.ui.icon(t.options.icons.superscript),tooltip:t.lang.font.superscript,click:t.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()}),this.context.memo("button.subscript",function(){return t.button({className:"note-btn-subscript",contents:t.ui.icon(t.options.icons.subscript),tooltip:t.lang.font.subscript,click:t.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()}),this.context.memo("button.fontname",function(){var e=t.context.invoke("editor.currentStyle");return t.options.addDefaultFonts&&r.a.each(e["font-family"].split(","),function(e,n){n=n.trim().replace(/['"]+/g,""),t.isFontDeservedToAdd(n)&&-1===t.options.fontNames.indexOf(n)&&t.options.fontNames.push(n)}),t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontname"></span>',t.options),tooltip:t.lang.font.name,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:t.options.icons.menuCheck,items:t.options.fontNames.filter(t.isFontInstalled.bind(t)),title:t.lang.font.name,template:function(t){return'<span style="font-family: '+v.validFontName(t)+'">'+t+"</span>"},click:t.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()}),this.context.memo("button.fontsize",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontsize"></span>',t.options),tooltip:t.lang.font.size,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:t.options.icons.menuCheck,items:t.options.fontSizes,title:t.lang.font.size,click:t.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()}),this.context.memo("button.fontsizeunit",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontsizeunit"></span>',t.options),tooltip:t.lang.font.sizeunit,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontsizeunit",checkClassName:t.options.icons.menuCheck,items:t.options.fontSizeUnits,title:t.lang.font.sizeunit,click:t.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit")})]).render()}),this.context.memo("button.color",function(){return t.colorPalette("note-color-all",t.lang.color.recent,!0,!0)}),this.context.memo("button.forecolor",function(){return t.colorPalette("note-color-fore",t.lang.color.foreground,!1,!0)}),this.context.memo("button.backcolor",function(){return t.colorPalette("note-color-back",t.lang.color.background,!0,!1)}),this.context.memo("button.ul",function(){return t.button({contents:t.ui.icon(t.options.icons.unorderedlist),tooltip:t.lang.lists.unordered+t.representShortcut("insertUnorderedList"),click:t.context.createInvokeHandler("editor.insertUnorderedList")}).render()}),this.context.memo("button.ol",function(){return t.button({contents:t.ui.icon(t.options.icons.orderedlist),tooltip:t.lang.lists.ordered+t.representShortcut("insertOrderedList"),click:t.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")}),a=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")}),l=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),u=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",g.invoke(o,"render")),this.context.memo("button.justifyCenter",g.invoke(a,"render")),this.context.memo("button.justifyRight",g.invoke(s,"render")),this.context.memo("button.justifyFull",g.invoke(l,"render")),this.context.memo("button.outdent",g.invoke(u,"render")),this.context.memo("button.indent",g.invoke(c,"render")),this.context.memo("button.paragraph",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.alignLeft),t.options),tooltip:t.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),t.ui.dropdown([t.ui.buttonGroup({className:"note-align",children:[o,a,s,l]}),t.ui.buttonGroup({className:"note-list",children:[u,c]})])]).render()}),this.context.memo("button.height",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.textHeight),t.options),tooltip:t.lang.font.height,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({items:t.options.lineHeights,checkClassName:t.options.icons.menuCheck,className:"dropdown-line-height",title:t.lang.font.height,click:t.context.createInvokeHandler("editor.lineHeight")})]).render()}),this.context.memo("button.table",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.table),t.options),tooltip:t.lang.table.table,data:{toggle:"dropdown"}}),t.ui.dropdown({title:t.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>','<div class="note-dimension-picker-highlighted"></div>','<div class="note-dimension-picker-unhighlighted"></div>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(e){e.find(".note-dimension-picker-mousecatcher").css({width:t.options.insertTableMaxSize.col+"em",height:t.options.insertTableMaxSize.row+"em"}).mousedown(t.context.createInvokeHandler("editor.insertTable")).on("mousemove",t.tableMoveHandler.bind(t))}}).render()}),this.context.memo("button.link",function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.link+t.representShortcut("linkDialog.show"),click:t.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.picture",function(){return t.button({contents:t.ui.icon(t.options.icons.picture),tooltip:t.lang.image.image,click:t.context.createInvokeHandler("imageDialog.show")}).render()}),this.context.memo("button.video",function(){return t.button({contents:t.ui.icon(t.options.icons.video),tooltip:t.lang.video.video,click:t.context.createInvokeHandler("videoDialog.show")}).render()}),this.context.memo("button.hr",function(){return t.button({contents:t.ui.icon(t.options.icons.minus),tooltip:t.lang.hr.insert+t.representShortcut("insertHorizontalRule"),click:t.context.createInvokeHandler("editor.insertHorizontalRule")}).render()}),this.context.memo("button.fullscreen",function(){return t.button({className:"btn-fullscreen note-codeview-keep",contents:t.ui.icon(t.options.icons.arrowsAlt),tooltip:t.lang.options.fullscreen,click:t.context.createInvokeHandler("fullscreen.toggle")}).render()}),this.context.memo("button.codeview",function(){return t.button({className:"btn-codeview note-codeview-keep",contents:t.ui.icon(t.options.icons.code),tooltip:t.lang.options.codeview,click:t.context.createInvokeHandler("codeview.toggle")}).render()}),this.context.memo("button.redo",function(){return t.button({contents:t.ui.icon(t.options.icons.redo),tooltip:t.lang.history.redo+t.representShortcut("redo"),click:t.context.createInvokeHandler("editor.redo")}).render()}),this.context.memo("button.undo",function(){return t.button({contents:t.ui.icon(t.options.icons.undo),tooltip:t.lang.history.undo+t.representShortcut("undo"),click:t.context.createInvokeHandler("editor.undo")}).render()}),this.context.memo("button.help",function(){return t.button({contents:t.ui.icon(t.options.icons.question),tooltip:t.lang.options.help,click:t.context.createInvokeHandler("helpDialog.show")}).render()})}},{key:"addImagePopoverButtons",value:function(){var t=this;this.context.memo("button.resizeFull",function(){return t.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:t.lang.image.resizeFull,click:t.context.createInvokeHandler("editor.resize","1")}).render()}),this.context.memo("button.resizeHalf",function(){return t.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:t.lang.image.resizeHalf,click:t.context.createInvokeHandler("editor.resize","0.5")}).render()}),this.context.memo("button.resizeQuarter",function(){return t.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:t.lang.image.resizeQuarter,click:t.context.createInvokeHandler("editor.resize","0.25")}).render()}),this.context.memo("button.resizeNone",function(){return t.button({contents:t.ui.icon(t.options.icons.rollback),tooltip:t.lang.image.resizeNone,click:t.context.createInvokeHandler("editor.resize","0")}).render()}),this.context.memo("button.floatLeft",function(){return t.button({contents:t.ui.icon(t.options.icons.floatLeft),tooltip:t.lang.image.floatLeft,click:t.context.createInvokeHandler("editor.floatMe","left")}).render()}),this.context.memo("button.floatRight",function(){return t.button({contents:t.ui.icon(t.options.icons.floatRight),tooltip:t.lang.image.floatRight,click:t.context.createInvokeHandler("editor.floatMe","right")}).render()}),this.context.memo("button.floatNone",function(){return t.button({contents:t.ui.icon(t.options.icons.rollback),tooltip:t.lang.image.floatNone,click:t.context.createInvokeHandler("editor.floatMe","none")}).render()}),this.context.memo("button.removeMedia",function(){return t.button({contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.image.remove,click:t.context.createInvokeHandler("editor.removeMedia")}).render()})}},{key:"addLinkPopoverButtons",value:function(){var t=this;this.context.memo("button.linkDialogShow",function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.edit,click:t.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.unlink",function(){return t.button({contents:t.ui.icon(t.options.icons.unlink),tooltip:t.lang.link.unlink,click:t.context.createInvokeHandler("editor.unlink")}).render()})}},{key:"addTablePopoverButtons",value:function(){var t=this;this.context.memo("button.addRowUp",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowAbove),tooltip:t.lang.table.addRowAbove,click:t.context.createInvokeHandler("editor.addRow","top")}).render()}),this.context.memo("button.addRowDown",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowBelow),tooltip:t.lang.table.addRowBelow,click:t.context.createInvokeHandler("editor.addRow","bottom")}).render()}),this.context.memo("button.addColLeft",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colBefore),tooltip:t.lang.table.addColLeft,click:t.context.createInvokeHandler("editor.addCol","left")}).render()}),this.context.memo("button.addColRight",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colAfter),tooltip:t.lang.table.addColRight,click:t.context.createInvokeHandler("editor.addCol","right")}).render()}),this.context.memo("button.deleteRow",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowRemove),tooltip:t.lang.table.delRow,click:t.context.createInvokeHandler("editor.deleteRow")}).render()}),this.context.memo("button.deleteCol",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colRemove),tooltip:t.lang.table.delCol,click:t.context.createInvokeHandler("editor.deleteCol")}).render()}),this.context.memo("button.deleteTable",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.table.delTable,click:t.context.createInvokeHandler("editor.deleteTable")}).render()})}},{key:"build",value:function(t,e){for(var n=0,i=e.length;n<i;n++){for(var r=e[n],o=Array.isArray(r)?r[0]:r,a=Array.isArray(r)?1===r.length?[r[0]]:r[1]:[r],s=this.ui.buttonGroup({className:"note-"+o}).render(),l=0,u=a.length;l<u;l++){var c=this.context.memo("button."+a[l]);c&&s.append("function"==typeof c?c(this.context):c)}s.appendTo(t)}}},{key:"updateCurrentStyle",value:function(t){var e=this,n=t||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(t){return t.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}),a=x.find(o,this.isFontInstalled.bind(this));n.find(".dropdown-fontname a").each(function(t,e){var n=r()(e),i=n.data("value")+""==a+"";n.toggleClass("checked",i)}),n.find(".note-current-fontname").text(a).css("font-family",a)}if(i["font-size"]){var s=i["font-size"];n.find(".dropdown-fontsize a").each(function(t,e){var n=r()(e),i=n.data("value")+""==s+"";n.toggleClass("checked",i)}),n.find(".note-current-fontsize").text(s);var l=i["font-size-unit"];n.find(".dropdown-fontsizeunit a").each(function(t,e){var n=r()(e),i=n.data("value")+""==l+"";n.toggleClass("checked",i)}),n.find(".note-current-fontsizeunit").text(l)}if(i["line-height"]){var u=i["line-height"];n.find(".dropdown-line-height li a").each(function(t,n){var i=r()(n).data("value")+""==u+"";e.className=i?"checked":""})}}},{key:"updateBtnStates",value:function(t,e){var n=this;r.a.each(e,function(e,i){n.ui.toggleBtnActive(t.find(e),i())})}},{key:"tableMoveHandler",value:function(t){var e,n=r()(t.target.parentNode),i=n.next(),o=n.find(".note-dimension-picker-mousecatcher"),a=n.find(".note-dimension-picker-highlighted"),s=n.find(".note-dimension-picker-unhighlighted");if(void 0===t.offsetX){var l=r()(t.target).offset();e={x:t.pageX-l.left,y:t.pageY-l.top}}else e={x:t.offsetX,y:t.offsetY};var u=Math.ceil(e.x/18)||1,c=Math.ceil(e.y/18)||1;a.css({width:u+"em",height:c+"em"}),o.data("value",u+"x"+c),u>3&&u<this.options.insertTableMaxSize.col&&s.css({width:u+1+"em"}),c>3&&c<this.options.insertTableMaxSize.row&&s.css({height:c+1+"em"}),i.html(u+" x "+c)}}])&&ae(e.prototype,n),i&&ae(e,i),t}();function le(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var ue=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.$window=r()(window),this.$document=r()(document),this.ui=r.a.summernote.ui,this.$note=e.layoutInfo.note,this.$editor=e.layoutInfo.editor,this.$toolbar=e.layoutInfo.toolbar,this.$editable=e.layoutInfo.editable,this.$statusbar=e.layoutInfo.statusbar,this.options=e.options,this.isFollowing=!1,this.followScroll=this.followScroll.bind(this)}var e,n,i;return e=t,(n=[{key:"shouldInitialize",value:function(){return!this.options.airMode}},{key:"initialize",value:function(){var t=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(){t.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 t=this.$editor.outerHeight(),e=this.$editor.width(),n=this.$toolbar.height(),i=this.$statusbar.height(),o=0;this.options.otherStaticBar&&(o=r()(this.options.otherStaticBar).outerHeight());var a=this.$document.scrollTop(),s=this.$editor.offset().top,l=s-o,u=s+t-o-n-i;!this.isFollowing&&a>l&&a<u-n?(this.isFollowing=!0,this.$editable.css({marginTop:this.$toolbar.outerHeight()}),this.$toolbar.css({position:"fixed",top:o,width:e,zIndex:1e3})):this.isFollowing&&(a<l||a>u)&&(this.isFollowing=!1,this.$toolbar.css({position:"relative",top:0,width:"100%",zIndex:"auto"}),this.$editable.css({marginTop:""}))}},{key:"changeContainer",value:function(t){t?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.options.followingToolbar&&this.followScroll()}},{key:"updateFullscreen",value:function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),t),this.changeContainer(t)}},{key:"updateCodeview",value:function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),t),t?this.deactivate():this.activate()}},{key:"activate",value:function(t){var e=this.$toolbar.find("button");t||(e=e.not(".note-codeview-keep")),this.ui.toggleBtn(e,!0)}},{key:"deactivate",value:function(t){var e=this.$toolbar.find("button");t||(e=e.not(".note-codeview-keep")),this.ui.toggleBtn(e,!1)}}])&&le(e.prototype,n),i&&le(e,i),t}();function ce(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var de=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.ui=r.a.summernote.ui,this.$body=r()(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo,e.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}var e,n,i;return e=t,(n=[{key:"initialize",value:function(){var t=this.options.dialogsInBody?this.$body:this.options.container,e=['<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?"":r()("<div/>").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html(),r()("<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:e,footer:n}).render().appendTo(t)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(t,e){t.on("keypress",function(t){t.keyCode===_t.code.ENTER&&(t.preventDefault(),e.trigger("click"))})}},{key:"toggleLinkBtn",value:function(t,e,n){this.ui.toggleBtn(t,e.val()&&n.val())}},{key:"showLinkDialog",value:function(t){var e=this;return r.a.Deferred(function(n){var i=e.$dialog.find(".note-link-text"),r=e.$dialog.find(".note-link-url"),o=e.$dialog.find(".note-link-btn"),a=e.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]"),s=e.$dialog.find(".sn-checkbox-use-protocol input[type=checkbox]");e.ui.onDialogShown(e.$dialog,function(){e.context.triggerEvent("dialog.shown"),!t.url&&g.isValidUrl(t.text)&&(t.url=t.text),i.on("input paste propertychange",function(){t.text=i.val(),e.toggleLinkBtn(o,i,r)}).val(t.text),r.on("input paste propertychange",function(){t.text||i.val(r.val()),e.toggleLinkBtn(o,i,r)}).val(t.url),v.isSupportTouch||r.trigger("focus"),e.toggleLinkBtn(o,i,r),e.bindEnterKey(r,o),e.bindEnterKey(i,o);var l=void 0!==t.isNewWindow?t.isNewWindow:e.context.options.linkTargetBlank;a.prop("checked",l);var u=!t.url&&e.context.options.useProtocol;s.prop("checked",u),o.one("click",function(o){o.preventDefault(),n.resolve({range:t.range,url:r.val(),text:i.val(),isNewWindow:a.is(":checked"),checkProtocol:s.is(":checked")}),e.ui.hideDialog(e.$dialog)})}),e.ui.onDialogHidden(e.$dialog,function(){i.off(),r.off(),o.off(),"pending"===n.state()&&n.reject()}),e.ui.showDialog(e.$dialog)}).promise()}},{key:"show",value:function(){var t=this,e=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(e).then(function(e){t.context.invoke("editor.restoreRange"),t.context.invoke("editor.createLink",e)}).fail(function(){t.context.invoke("editor.restoreRange")})}}])&&ce(e.prototype,n),i&&ce(e,i),t}();function fe(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var he=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.ui=r.a.summernote.ui,this.options=e.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 e,n,i;return e=t,(n=[{key:"shouldInitialize",value:function(){return!x.isEmpty(this.options.popover.link)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(t){t.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a>&nbsp;</span>')}}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.link),this.$popover.on("mousedown",function(t){t.preventDefault()})}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(){if(this.context.invoke("editor.hasFocus")){var t=this.context.invoke("editor.getLastRange");if(t.isCollapsed()&&t.isOnAnchor()){var e=pt.ancestor(t.sc,pt.isAnchor),n=r()(e).attr("href");this.$popover.find("a").attr("href",n).text(n);var i=pt.posFromPlaceholder(e),o=r()(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()}}])&&fe(e.prototype,n),i&&fe(e,i),t}();function pe(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var ve=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.ui=r.a.summernote.ui,this.$body=r()(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo}var e,n,i;return e=t,(n=[{key:"initialize",value:function(){var t="";if(this.options.maximumImageFileSize){var e=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),n=1*(this.options.maximumImageFileSize/Math.pow(1024,e)).toFixed(2)+" "+" KMGTP"[e]+"B";t="<small>".concat(this.lang.image.maximumFileSize+" : "+n,"</small>")}var i=this.options.dialogsInBody?this.$body:this.options.container,r=['<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"/>',t,"</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(""),o='<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:r,footer:o}).render().appendTo(i)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(t,e){t.on("keypress",function(t){t.keyCode===_t.code.ENTER&&(t.preventDefault(),e.trigger("click"))})}},{key:"show",value:function(){var t=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then(function(e){t.ui.hideDialog(t.$dialog),t.context.invoke("editor.restoreRange"),"string"==typeof e?t.options.callbacks.onImageLinkInsert?t.context.triggerEvent("image.link.insert",e):t.context.invoke("editor.insertImage",e):t.context.invoke("editor.insertImagesOrCallback",e)}).fail(function(){t.context.invoke("editor.restoreRange")})}},{key:"showImageDialog",value:function(){var t=this;return r.a.Deferred(function(e){var n=t.$dialog.find(".note-image-input"),i=t.$dialog.find(".note-image-url"),r=t.$dialog.find(".note-image-btn");t.ui.onDialogShown(t.$dialog,function(){t.context.triggerEvent("dialog.shown"),n.replaceWith(n.clone().on("change",function(t){e.resolve(t.target.files||t.target.value)}).val("")),i.on("input paste propertychange",function(){t.ui.toggleBtn(r,i.val())}).val(""),v.isSupportTouch||i.trigger("focus"),r.click(function(t){t.preventDefault(),e.resolve(i.val())}),t.bindEnterKey(i,r)}),t.ui.onDialogHidden(t.$dialog,function(){n.off(),i.off(),r.off(),"pending"===e.state()&&e.reject()}),t.ui.showDialog(t.$dialog)})}}])&&pe(e.prototype,n),i&&pe(e,i),t}();function me(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var ge=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.ui=r.a.summernote.ui,this.editable=e.layoutInfo.editable[0],this.options=e.options,this.events={"summernote.disable summernote.blur":function(){n.hide()}}}var e,n,i;return e=t,(n=[{key:"shouldInitialize",value:function(){return!x.isEmpty(this.options.popover.image)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.image),this.$popover.on("mousedown",function(t){t.preventDefault()})}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(t,e){if(pt.isImg(t)){var n=r()(t).offset(),i=r()(this.options.container).offset(),o={};this.options.popatmouse?(o.left=e.pageX-20,o.top=e.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()}}])&&me(e.prototype,n),i&&me(e,i),t}();function ye(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var be=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.ui=r.a.summernote.ui,this.options=e.options,this.events={"summernote.mousedown":function(t,e){n.update(e.target)},"summernote.keyup summernote.scroll summernote.change":function(){n.update()},"summernote.disable summernote.blur":function(){n.hide()}}}var e,n,i;return e=t,(n=[{key:"shouldInitialize",value:function(){return!x.isEmpty(this.options.popover.table)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.table),v.isFF&&document.execCommand("enableInlineTableEditing",!1,!1),this.$popover.on("mousedown",function(t){t.preventDefault()})}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(t){if(this.context.isDisabled())return!1;var e=pt.isCell(t);if(e){var n=pt.posFromPlaceholder(t),i=r()(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 e}},{key:"hide",value:function(){this.$popover.hide()}}])&&ye(e.prototype,n),i&&ye(e,i),t}();function ke(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var we=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.ui=r.a.summernote.ui,this.$body=r()(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo}var e,n,i;return e=t,(n=[{key:"initialize",value:function(){var t=this.options.dialogsInBody?this.$body:this.options.container,e=['<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:e,footer:n}).render().appendTo(t)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(t,e){t.on("keypress",function(t){t.keyCode===_t.code.ENTER&&(t.preventDefault(),e.trigger("click"))})}},{key:"createVideoNode",value:function(t){var e,n=t.match(/\/\/(?:(?:www|m)\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/),i=t.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),o=t.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),a=t.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),s=t.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),l=t.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),u=t.match(/\/\/v\.qq\.com.*?vid=(.+)/),c=t.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),d=t.match(/^.+.(mp4|m4v)$/),f=t.match(/^.+.(ogg|ogv)$/),h=t.match(/^.+.(webm)$/),p=t.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/);if(n&&11===n[1].length){var v=n[1],m=0;if(void 0!==n[2]){var g=n[2].match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);if(g)for(var y=[3600,60,1],b=0,k=y.length;b<k;b++)m+=void 0!==g[b+1]?y[b]*parseInt(g[b+1],10):0}e=r()("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+v+(m>0?"?start="+m:"")).attr("width","640").attr("height","360")}else if(i&&i[0].length)e=r()("<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)e=r()("<iframe>").attr("frameborder",0).attr("src",o[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(a&&a[3].length)e=r()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+a[3]).attr("width","640").attr("height","360");else if(s&&s[2].length)e=r()("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+s[2]).attr("width","640").attr("height","360");else if(l&&l[1].length)e=r()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+l[1]);else if(u&&u[1].length||c&&c[2].length){var w=u&&u[1].length?u[1]:c[2];e=r()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","https://v.qq.com/txp/iframe/player.html?vid="+w+"&amp;auto=0")}else if(d||f||h)e=r()("<video controls>").attr("src",t).attr("width","640").attr("height","360");else{if(!p||!p[0].length)return!1;e=r()("<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 e.addClass("note-video-clip"),e[0]}},{key:"show",value:function(){var t=this,e=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(e).then(function(e){t.ui.hideDialog(t.$dialog),t.context.invoke("editor.restoreRange");var n=t.createVideoNode(e);n&&t.context.invoke("editor.insertNode",n)}).fail(function(){t.context.invoke("editor.restoreRange")})}},{key:"showVideoDialog",value:function(){var t=this;return r.a.Deferred(function(e){var n=t.$dialog.find(".note-video-url"),i=t.$dialog.find(".note-video-btn");t.ui.onDialogShown(t.$dialog,function(){t.context.triggerEvent("dialog.shown"),n.on("input paste propertychange",function(){t.ui.toggleBtn(i,n.val())}),v.isSupportTouch||n.trigger("focus"),i.click(function(t){t.preventDefault(),e.resolve(n.val())}),t.bindEnterKey(n,i)}),t.ui.onDialogHidden(t.$dialog,function(){n.off(),i.off(),"pending"===e.state()&&e.reject()}),t.ui.showDialog(t.$dialog)})}}])&&ke(e.prototype,n),i&&ke(e,i),t}();function xe(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var _e=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.ui=r.a.summernote.ui,this.$body=r()(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo}var e,n,i;return e=t,(n=[{key:"initialize",value:function(){var t=this.options.dialogsInBody?this.$body:this.options.container,e=['<p class="text-center">','<a href="http://summernote.org/" target="_blank">Summernote 0.8.18</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:e,callback:function(t){t.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(t)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"createShortcutList",value:function(){var t=this,e=this.options.keyMap[v.isMac?"mac":"pc"];return Object.keys(e).map(function(n){var i=e[n],o=r()('<div><div class="help-list-item"></div></div>');return o.append(r()("<label><kbd>"+n+"</kdb></label>").css({width:180,"margin-right":10})).append(r()("<span/>").html(t.context.memo("help."+i)||i)),o.html()}).join("")}},{key:"showHelpDialog",value:function(){var t=this;return r.a.Deferred(function(e){t.ui.onDialogShown(t.$dialog,function(){t.context.triggerEvent("dialog.shown"),e.resolve()}),t.ui.showDialog(t.$dialog)}).promise()}},{key:"show",value:function(){var t=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then(function(){t.context.invoke("editor.restoreRange")})}}])&&xe(e.prototype,n),i&&xe(e,i),t}();function Ee(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Se=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.ui=r.a.summernote.ui,this.options=e.options,this.hidable=!0,this.onContextmenu=!1,this.pageX=null,this.pageY=null,this.events={"summernote.contextmenu":function(t){n.options.editing&&(t.preventDefault(),t.stopPropagation(),n.onContextmenu=!0,n.update(!0))},"summernote.mousedown":function(t,e){n.pageX=e.pageX,n.pageY=e.pageY},"summernote.keyup summernote.mouseup summernote.scroll":function(t,e){n.options.editing&&!n.onContextmenu&&(n.pageX=e.pageX,n.pageY=e.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 e,n,i;return e=t,(n=[{key:"shouldInitialize",value:function(){return this.options.airMode&&!x.isEmpty(this.options.popover.air)}},{key:"initialize",value:function(){var t=this;this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content");this.context.invoke("buttons.build",e,this.options.popover.air),this.$popover.on("mousedown",function(){t.hidable=!1}),this.$popover.on("mouseup",function(){t.hidable=!0})}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(t){var e=this.context.invoke("editor.currentStyle");if(!e.range||e.range.isCollapsed()&&!t)this.hide();else{var n={left:this.pageX,top:this.pageY},i=r()(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:"updateCodeview",value:function(t){this.ui.toggleBtnActive(this.$popover.find(".btn-codeview"),t),t&&this.hide()}},{key:"hide",value:function(){this.hidable&&this.$popover.hide()}}])&&Ee(e.prototype,n),i&&Ee(e,i),t}();function Oe(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var Ae=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.ui=r.a.summernote.ui,this.$editable=e.layoutInfo.editable,this.options=e.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(t,e){e.isDefaultPrevented()||n.handleKeyup(e)},"summernote.keydown":function(t,e){n.handleKeydown(e)},"summernote.disable summernote.dialog.shown summernote.blur":function(){n.hide()}}}var e,n,i;return e=t,(n=[{key:"shouldInitialize",value:function(){return this.hints.length>0}},{key:"initialize",value:function(){var t=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(e){t.$content.find(".active").removeClass("active"),r()(e.currentTarget).addClass("active"),t.replace()}),this.$popover.on("mousedown",function(t){t.preventDefault()})}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"selectItem",value:function(t){this.$content.find(".active").removeClass("active"),t.addClass("active"),this.$content[0].scrollTop=t[0].offsetTop-this.$content.innerHeight()/2}},{key:"moveDown",value:function(){var t=this.$content.find(".note-hint-item.active"),e=t.next();if(e.length)this.selectItem(e);else{var n=t.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 t=this.$content.find(".note-hint-item.active"),e=t.prev();if(e.length)this.selectItem(e);else{var n=t.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 t=this.$content.find(".note-hint-item.active");if(t.length){var e=this.nodeFromItem(t);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(e),"next"===this.options.hintSelect){var i=document.createTextNode("");r()(e).after(i),wt.createFromNodeBefore(i).select()}else wt.createFromNodeAfter(e).select();this.lastWordRange=null,this.hide(),this.context.invoke("editor.focus")}}},{key:"nodeFromItem",value:function(t){var e=this.hints[t.data("index")],n=t.data("item"),i=e.content?e.content(n):n;return"string"==typeof i&&(i=pt.createText(i)),i}},{key:"createItemTemplates",value:function(t,e){var n=this.hints[t];return e.map(function(e){var i=r()('<div class="note-hint-item"/>');return i.append(n.template?n.template(e):e+""),i.data({index:t,item:e}),i})}},{key:"handleKeydown",value:function(t){this.$popover.is(":visible")&&(t.keyCode===_t.code.ENTER?(t.preventDefault(),this.replace()):t.keyCode===_t.code.UP?(t.preventDefault(),this.moveUp()):t.keyCode===_t.code.DOWN&&(t.preventDefault(),this.moveDown()))}},{key:"searchKeyword",value:function(t,e,n){var i=this.hints[t];if(i&&i.match.test(e)&&i.search){var r=i.match.exec(e);this.matchingWord=r[0],i.search(r[1],n)}else n()}},{key:"createGroup",value:function(t,e){var n=this,i=r()('<div class="note-hint-group note-hint-group-'+t+'"></div>');return this.searchKeyword(t,e,function(e){(e=e||[]).length&&(i.html(n.createItemTemplates(t,e)),n.show())}),i}},{key:"handleKeyup",value:function(t){var e=this;if(!x.contains([_t.code.ENTER,_t.code.UP,_t.code.DOWN],t.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(t){if(t.match.test(i))return n=o.getWordsMatchRange(t.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 a=g.rect2bnd(x.last(n.getClientRects())),s=r()(this.options.container).offset();a&&(a.top-=s.top,a.left-=s.left,this.$popover.hide(),this.lastWordRange=n,this.hints.forEach(function(t,n){t.match.test(i)&&e.createGroup(n,i).appendTo(e.$content)}),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:a.left,top:a.top-this.$popover.outerHeight()-5}):this.$popover.css({left:a.left,top:a.top+a.height+5}))}else this.hide()}}},{key:"show",value:function(){this.$popover.show()}},{key:"hide",value:function(){this.$popover.hide()}}])&&Oe(e.prototype,n),i&&Oe(e,i),t}();r.a.summernote=r.a.extend(r.a.summernote,{version:"0.8.18",plugins:{},dom:pt,range:wt,lists:x,options:{langInfo:r.a.summernote.lang["en-US"],editing:!0,modules:{editor:jt,clipboard:Ft,dropzone:Ht,codeview:Ut,statusbar:Kt,fullscreen:Gt,handle:Zt,hintPopover:Ae,autoLink:Jt,autoSync:ee,autoReplace:ie,placeholder:oe,buttons:se,toolbar:ue,linkDialog:de,linkPopover:he,imageDialog:ve,imagePopover:ge,tablePopover:be,videoDialog:we,helpDialog:_e,airPopover:Se},buttons:{},lang:"en-US",followingToolbar:!1,toolbarPosition:"top",otherStaticBar:"",codeviewKeepButton:!1,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,showDomainOnlyForAutolink:!1,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:{ESC:"escape",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:{ESC:"escape",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(t,e,n){},53:function(t,e,n){"use strict";n.r(e);var i=n(0),r=n.n(i),o=n(1);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=o.a.create('<div class="note-editor note-frame card"/>'),l=o.a.create('<div class="note-toolbar card-header" role="toolbar"/>'),u=o.a.create('<div class="note-editing-area"/>'),c=o.a.create('<textarea class="note-codable" aria-multiline="true"/>'),d=o.a.create('<div class="note-editable card-block" contentEditable="true" role="textbox" aria-multiline="true"/>'),f=o.a.create(['<output class="note-status-output" role="status" aria-live="polite"></output>','<div class="note-statusbar" role="status">','<div class="note-resizebar" aria-label="Resize">','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>',"</div>","</div>"].join("")),h=o.a.create('<div class="note-editor note-airframe"/>'),p=o.a.create(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>','<output class="note-status-output" role="status" aria-live="polite"></output>'].join("")),v=o.a.create('<div class="note-btn-group btn-group">'),m=o.a.create('<div class="note-dropdown-menu dropdown-menu" role="list">',function(t,e){var n=Array.isArray(e.items)?e.items.map(function(t){var n="string"==typeof t?t:t.value||"",i=e.template?e.template(t):t,r="object"===a(t)?t.option:void 0;return'<a class="dropdown-item" href="#" '+('data-value="'+n+'"'+(void 0!==r?' data-option="'+r+'"':""))+' role="listitem" aria-label="'+n+'">'+i+"</a>"}).join(""):e.items;t.html(n).attr({"aria-label":e.title}),e&&e.codeviewKeepButton&&t.addClass("note-codeview-keep")}),g=function(t){return t},y=o.a.create('<div class="note-dropdown-menu dropdown-menu note-check" role="list">',function(t,e){var n=Array.isArray(e.items)?e.items.map(function(t){var n="string"==typeof t?t:t.value||"",i=e.template?e.template(t):t;return'<a class="dropdown-item" href="#" data-value="'+n+'" role="listitem" aria-label="'+t+'">'+x(e.checkClassName)+" "+i+"</a>"}).join(""):e.items;t.html(n).attr({"aria-label":e.title}),e&&e.codeviewKeepButton&&t.addClass("note-codeview-keep")}),b=o.a.create('<div class="modal note-modal" aria-hidden="false" tabindex="-1" role="dialog"/>',function(t,e){e.fade&&t.addClass("fade"),t.attr({"aria-label":e.title}),t.html(['<div class="modal-dialog">','<div class="modal-content">',e.title?'<div class="modal-header"><h4 class="modal-title">'+e.title+'</h4><button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">&times;</button></div>':"",'<div class="modal-body">'+e.body+"</div>",e.footer?'<div class="modal-footer">'+e.footer+"</div>":"","</div>","</div>"].join(""))}),k=o.a.create(['<div class="note-popover popover in">','<div class="arrow"></div>','<div class="popover-content note-children-container"></div>',"</div>"].join(""),function(t,e){var n=void 0!==e.direction?e.direction:"bottom";t.addClass(n),e.hideArrow&&t.find(".arrow").hide()}),w=o.a.create('<div class="form-check"></div>',function(t,e){t.html(['<label class="form-check-label"'+(e.id?' for="note-'+e.id+'"':"")+">",'<input type="checkbox" class="form-check-input"'+(e.id?' id="note-'+e.id+'"':""),e.checked?" checked":"",' aria-label="'+(e.text?e.text:"")+'"',' aria-checked="'+(e.checked?"true":"false")+'"/>'," "+(e.text?e.text:"")+"</label>"].join(""))}),x=function(t,e){return"<"+(e=e||"i")+' class="'+t+'"></'+e+">"},_=function(t){return{editor:s,toolbar:l,editingArea:u,codable:c,editable:d,statusbar:f,airEditor:h,airEditable:p,buttonGroup:v,dropdown:m,dropdownButtonContents:g,dropdownCheck:y,dialog:b,popover:k,icon:x,checkbox:w,options:t,palette:function(e,n){return o.a.create('<div class="note-color-palette"/>',function(e,n){for(var i=[],r=0,o=n.colors.length;r<o;r++){for(var a=n.eventName,s=n.colors[r],l=n.colorsName[r],u=[],c=0,d=s.length;c<d;c++){var f=s[c],h=l[c];u.push(['<button type="button" class="note-color-btn"','style="background-color:',f,'" ','data-event="',a,'" ','data-value="',f,'" ','title="',h,'" ','aria-label="',h,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}i.push('<div class="note-color-row">'+u.join("")+"</div>")}e.html(i.join("")),n.tooltip&&e.find(".note-color-btn").tooltip({container:n.container||t.container,trigger:"hover",placement:"bottom"})})(e,n)},button:function(e,n){return o.a.create('<button type="button" class="note-btn btn btn-light btn-sm" tabindex="-1">',function(e,n){n&&n.tooltip&&e.attr({title:n.tooltip,"aria-label":n.tooltip}).tooltip({container:n.container||t.container,trigger:"hover",placement:"bottom"}).on("click",function(t){r()(t.currentTarget).tooltip("hide")}),n&&n.codeviewButton&&e.addClass("note-codeview-keep")})(e,n)},toggleBtn:function(t,e){t.toggleClass("disabled",!e),t.attr("disabled",!e)},toggleBtnActive:function(t,e){t.toggleClass("active",e)},onDialogShown:function(t,e){t.one("shown.bs.modal",e)},onDialogHidden:function(t,e){t.one("hidden.bs.modal",e)},showDialog:function(t){t.modal("show")},hideDialog:function(t){t.modal("hide")},createLayout:function(e){var n=(t.airMode?h([u([c(),p()])]):"bottom"===t.toolbarPosition?s([u([c(),d()]),l(),f()]):s([l(),u([c(),d()]),f()])).render();return n.insertAfter(e),{note:e,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(t,e){t.html(e.editable.html()),e.editor.remove(),t.show()}}};n(3),n(5);r.a.summernote=r.a.extend(r.a.summernote,{ui_template:_,interface:"bs4"}),r.a.summernote.options.styleTags=["p",{title:"Blockquote",tag:"blockquote",className:"blockquote",value:"blockquote"},"pre","h1","h2","h3","h4","h5","h6"]}})}),function(t){var e=t.Markdown=function(t){switch(typeof t){case"undefined":this.dialect=e.dialects.Gruber;break;case"object":this.dialect=t;break;default:if(!(t in e.dialects))throw new Error("Unknown Markdown dialect '"+String(t)+"'");this.dialect=e.dialects[t]}this.em_state=[],this.strong_state=[],this.debug_indent=""};function n(){return"Markdown.mk_block( "+uneval(this.toString())+", "+uneval(this.trailing)+", "+uneval(this.lineNumber)+" )"}function i(){var t=require("util");return"Markdown.mk_block( "+t.inspect(this.toString())+", "+t.inspect(this.trailing)+", "+t.inspect(this.lineNumber)+" )"}t.parse=function(t,n){return new e(n).toTree(t)},t.toHTML=function(e,n,i){var r=t.toHTMLTree(e,n,i);return t.renderJsonML(r)},t.toHTMLTree=function(t,e,n){"string"==typeof t&&(t=this.parse(t,e));var i=d(t),r={};i&&i.references&&(r=i.references);var o=function t(e,n,i){var r;i=i||{};var o=e.slice(0);"function"==typeof i.preprocessTreeNode&&(o=i.preprocessTreeNode(o,n));var a=d(o);if(a){for(r in o[1]={},a)o[1][r]=a[r];a=o[1]}if("string"==typeof o)return o;switch(o[0]){case"header":o[0]="h"+o[1].level,delete o[1].level;break;case"bulletlist":o[0]="ul";break;case"numberlist":o[0]="ol";break;case"listitem":o[0]="li";break;case"para":o[0]="p";break;case"markdown":o[0]="html",a&&delete a.references;break;case"code_block":o[0]="pre",r=a?2:1;var s=["code"];s.push.apply(s,o.splice(r,o.length-r)),o[r]=s;break;case"inlinecode":o[0]="code";break;case"img":o[1].src=o[1].href,delete o[1].href;break;case"linebreak":o[0]="br";break;case"link":o[0]="a";break;case"link_ref":o[0]="a";var l=n[a.ref];if(!l)return a.original;delete a.ref,a.href=l.href,l.title&&(a.title=l.title),delete a.original;break;case"img_ref":o[0]="img";var l=n[a.ref];if(!l)return a.original;delete a.ref,a.src=l.href,l.title&&(a.title=l.title),delete a.original}r=1;if(a){for(var u in o[1]){r=2;break}1===r&&o.splice(r,1)}for(;r<o.length;++r)o[r]=t(o[r],n,i);return o}(t,r,n);return function t(e){var n=d(e)?2:1;for(;n<e.length;)"string"==typeof e[n]?n+1<e.length&&"string"==typeof e[n+1]?e[n]+=e.splice(n+1,1)[0]:++n:(t(e[n]),++n)}(o),o};var r=e.mk_block=function(t,e,r){1==arguments.length&&(e="\n\n");var o=new String(t);return o.trailing=e,o.inspect=i,o.toSource=n,null!=r&&(o.lineNumber=r),o};function o(t){for(var e=0,n=-1;-1!==(n=t.indexOf("\n",n+1));)e++;return e}function s(t,e){var n=t+"_state",i="strong"==t?"em_state":"strong_state";function r(t){this.len_after=t,this.name="close_"+e}return function(o,a){if(this[n][0]==e)return this[n].shift(),[o.length,new r(o.length-e.length)];var s=this[i].slice(),l=this[n].slice();this[n].unshift(e);var u=this.processInline(o.substr(e.length)),c=u[u.length-1];this[n].shift();return c instanceof r?(u.pop(),[o.length-c.len_after,[t].concat(u)]):(this[i]=s,this[n]=l,[e.length,e])}}e.prototype.split_blocks=function(t,e){t=t.replace(/(\r\n|\n|\r)/g,"\n");var n,i=/([\s\S]+?)($|\n#|\n(?:\s*\n|$)+)/g,a=[],s=1;for(null!=(n=/^(\s*\n)/.exec(t))&&(s+=o(n[0]),i.lastIndex=n[0].length);null!==(n=i.exec(t));)"\n#"==n[2]&&(n[2]="\n",i.lastIndex--),a.push(r(n[1],n[2],s)),s+=o(n[0]);return a},e.prototype.processBlock=function(t,e){var n=this.dialect.block,i=n.__order__;if("__call__"in n)return n.__call__.call(this,t,e);for(var r=0;r<i.length;r++){var o=n[i[r]].call(this,t,e);if(o)return(!u(o)||o.length>0&&!u(o[0]))&&this.debug(i[r],"didn't return a proper array"),o}return[]},e.prototype.processInline=function(t){return this.dialect.inline.__call__.call(this,String(t))},e.prototype.toTree=function(t,e){var n=t instanceof Array?t:this.split_blocks(t),i=this.tree;try{for(this.tree=e||this.tree||["markdown"];n.length;){var r=this.processBlock(n.shift(),n);r.length&&this.tree.push.apply(this.tree,r)}return this.tree}finally{e&&(this.tree=i)}},e.prototype.debug=function(){var t=Array.prototype.slice.call(arguments);t.unshift(this.debug_indent),"undefined"!=typeof print&&print.apply(print,t),"undefined"!=typeof console&&void 0!==console.log&&console.log.apply(null,t)},e.prototype.loop_re_over_block=function(t,e,n){for(var i,r=e.valueOf();r.length&&null!=(i=t.exec(r));)r=r.substr(i[0].length),n.call(this,i);return r},e.dialects={},e.dialects.Gruber={block:{atxHeader:function(t,e){var n=t.match(/^(#{1,6})\s*(.*?)\s*#*\s*(?:\n|$)/);if(n){var i=["header",{level:n[1].length}];return Array.prototype.push.apply(i,this.processInline(n[2])),n[0].length<t.length&&e.unshift(r(t.substr(n[0].length),t.trailing,t.lineNumber+2)),[i]}},setextHeader:function(t,e){var n=t.match(/^(.*)\n([-=])\2\2+(?:\n|$)/);if(n){var i=["header",{level:"="===n[2]?1:2},n[1]];return n[0].length<t.length&&e.unshift(r(t.substr(n[0].length),t.trailing,t.lineNumber+2)),[i]}},code:function(t,e){var n=[],i=/^(?: {0,3}\t| {4})(.*)\n?/;if(t.match(i)){t:for(;;){var o=this.loop_re_over_block(i,t.valueOf(),function(t){n.push(t[1])});if(o.length){e.unshift(r(o,t.trailing));break t}if(!e.length)break t;if(!e[0].match(i))break t;n.push(t.trailing.replace(/[^\n]/g,"").substring(2)),t=e.shift()}return[["code_block",n.join("\n")]]}},horizRule:function(t,e){var n=t.match(/^(?:([\s\S]*?)\n)?[ \t]*([-_*])(?:[ \t]*\2){2,}[ \t]*(?:\n([\s\S]*))?$/);if(n){var i=[["hr"]];return n[1]&&i.unshift.apply(i,this.processBlock(n[1],[])),n[3]&&e.unshift(r(n[3])),i}},lists:function(){var t="[*+-]|\\d+\\.",e=/[*+-]/,n=new RegExp("^( {0,3})("+t+")[ \t]+"),i="(?: {0,3}\\t| {4})";function o(t,e,n,i){if(e)t.push(["para"].concat(n));else{var r=t[t.length-1]instanceof Array&&"para"==t[t.length-1][0]?t[t.length-1]:t;i&&t.length>1&&n.unshift(i);for(var o=0;o<n.length;o++){var a=n[o];"string"==typeof a&&r.length>1&&"string"==typeof r[r.length-1]?r[r.length-1]+=a:r.push(a)}}}function a(t,e){for(var n=new RegExp("^("+i+"{"+t+"}.*?\\n?)*$"),o=new RegExp("^"+i+"{"+t+"}","gm"),a=[];e.length>0&&n.exec(e[0]);){var s=e.shift(),l=s.replace(o,"");a.push(r(l,s.trailing,s.lineNumber))}return a}function s(t,e,n){var i=t.list,r=i[i.length-1];if(!(r[1]instanceof Array&&"para"==r[1][0]))if(e+1==n.length)r.push(["para"].concat(r.splice(1,r.length-1)));else{var o=r.pop();r.push(["para"].concat(r.splice(1,r.length-1)),o)}}return function(r,u){var c=r.match(n);if(c){for(var d,f,h,p=[],v=T(c),m=!1,g=[p[0].list];;){for(var y=r.split(/(?=\n)/),b="",k=0;k<y.length;k++){var w="",x=y[k].replace(/^\n/,function(t){return w=t,""}),_=(h=p.length,new RegExp("(?:^("+i+"{0,"+h+"} {0,3})("+t+")\\s+)|(^"+i+"{0,"+(h-1)+"}[ ]{0,4})"));if(void 0!==(c=x.match(_))[1]){b.length&&(o(d,m,this.processInline(b),w),m=!1,b=""),c[1]=c[1].replace(/ {0,3}\t/g,"    ");var E=Math.floor(c[1].length/4)+1;if(E>p.length)v=T(c),d.push(v),d=v[1]=["listitem"];else{var S=!1;for(f=0;f<p.length;f++)if(p[f].indent==c[1]){v=p[f].list,p.splice(f+1,p.length-(f+1)),S=!0;break}S||(++E<=p.length?(p.splice(E,p.length-E),v=p[E-1].list):(v=T(c),d.push(v))),d=["listitem"],v.push(d)}w=""}x.length>c[0].length&&(b+=w+x.substr(c[0].length))}b.length&&(o(d,m,this.processInline(b),w),m=!1,b="");var O=a(p.length,u);O.length>0&&(l(p,s,this),d.push.apply(d,this.toTree(O,[])));var A=u[0]&&u[0].valueOf()||"";if(!A.match(n)&&!A.match(/^ /))break;r=u.shift();var C=this.dialect.block.horizRule(r,u);if(C){g.push.apply(g,C);break}l(p,s,this),m=!0}return g}function T(t){var n=e.exec(t[2])?["bulletlist"]:["numberlist"];return p.push({list:n,indent:t[1]}),n}}}(),blockquote:function(t,e){if(t.match(/^>/m)){var n=[];if(">"!=t[0]){for(var i=t.split(/\n/),o=[],a=t.lineNumber;i.length&&">"!=i[0][0];)o.push(i.shift()),a++;var s=r(o.join("\n"),"\n",t.lineNumber);n.push.apply(n,this.processBlock(s,[])),t=r(i.join("\n"),t.trailing,a)}for(;e.length&&">"==e[0][0];){var l=e.shift();t=r(t+t.trailing+l,l.trailing,t.lineNumber)}var u=t.replace(/^> ?/gm,""),f=(this.tree,this.toTree(u,["blockquote"])),h=d(f);return h&&h.references&&(delete h.references,c(h)&&f.splice(1,1)),n.push(f),n}},referenceDefn:function(t,e){var n=/^\s*\[(.*?)\]:\s*(\S+)(?:\s+(?:(['"])(.*?)\3|\((.*?)\)))?\n?/;if(t.match(n)){d(this.tree)||this.tree.splice(1,0,{});var i=d(this.tree);void 0===i.references&&(i.references={});var o=this.loop_re_over_block(n,t,function(t){t[2]&&"<"==t[2][0]&&">"==t[2][t[2].length-1]&&(t[2]=t[2].substring(1,t[2].length-1));var e=i.references[t[1].toLowerCase()]={href:t[2]};void 0!==t[4]?e.title=t[4]:void 0!==t[5]&&(e.title=t[5])});return o.length&&e.unshift(r(o,t.trailing)),[]}},para:function(t,e){return[["para"].concat(this.processInline(t))]}}},e.dialects.Gruber.inline={__oneElement__:function(t,e,n){var i,r;return e=e||this.dialect.inline.__patterns__,(i=new RegExp("([\\s\\S]*?)("+(e.source||e)+")").exec(t))?i[1]?[i[1].length,i[1]]:(i[2]in this.dialect.inline&&(r=this.dialect.inline[i[2]].call(this,t.substr(i.index),i,n||[])),r=r||[i[2].length,i[2]]):[t.length,t]},__call__:function(t,e){var n,i=[];function r(t){"string"==typeof t&&"string"==typeof i[i.length-1]?i[i.length-1]+=t:i.push(t)}for(;t.length>0;)n=this.dialect.inline.__oneElement__.call(this,t,e,i),t=t.substr(n.shift()),l(n,r);return i},"]":function(){},"}":function(){},__escape__:/^\\[\\`\*_{}\[\]()#\+.!\-]/,"\\":function(t){return this.dialect.inline.__escape__.exec(t)?[2,t.charAt(1)]:[1,"\\"]},"![":function(t){var e=t.match(/^!\[(.*?)\][ \t]*\([ \t]*([^")]*?)(?:[ \t]+(["'])(.*?)\3)?[ \t]*\)/);if(e){e[2]&&"<"==e[2][0]&&">"==e[2][e[2].length-1]&&(e[2]=e[2].substring(1,e[2].length-1)),e[2]=this.dialect.inline.__call__.call(this,e[2],/\\/)[0];var n={alt:e[1],href:e[2]||""};return void 0!==e[4]&&(n.title=e[4]),[e[0].length,["img",n]]}return(e=t.match(/^!\[(.*?)\][ \t]*\[(.*?)\]/))?[e[0].length,["img_ref",{alt:e[1],ref:e[2].toLowerCase(),original:e[0]}]]:[2,"!["]},"[":function(t){var n=String(t),i=e.DialectHelpers.inline_until_char.call(this,t.substr(1),"]");if(!i)return[1,"["];var r,o,a=1+i[0],s=i[1],l=(t=t.substr(a)).match(/^\s*\([ \t]*([^"']*)(?:[ \t]+(["'])(.*?)\2)?[ \t]*\)/);if(l){var u=l[1];if(a+=l[0].length,u&&"<"==u[0]&&">"==u[u.length-1]&&(u=u.substring(1,u.length-1)),!l[3])for(var c=1,d=0;d<u.length;d++)switch(u[d]){case"(":c++;break;case")":0==--c&&(a-=u.length-d,u=u.substring(0,d))}return o={href:(u=this.dialect.inline.__call__.call(this,u,/\\/)[0])||""},void 0!==l[3]&&(o.title=l[3]),r=["link",o].concat(s),[a,r]}return(l=t.match(/^\s*\[(.*?)\]/))?(a+=l[0].length,r=["link_ref",o={ref:(l[1]||String(s)).toLowerCase(),original:n.substr(0,a)}].concat(s),[a,r]):1==s.length&&"string"==typeof s[0]?(r=["link_ref",o={ref:s[0].toLowerCase(),original:n.substr(0,a)},s[0]],[a,r]):[1,"["]},"<":function(t){var e;return null!=(e=t.match(/^<(?:((https?|ftp|mailto):[^>]+)|(.*?@.*?\.[a-zA-Z]+))>/))?e[3]?[e[0].length,["link",{href:"mailto:"+e[3]},e[3]]]:"mailto"==e[2]?[e[0].length,["link",{href:e[1]},e[1].substr("mailto:".length)]]:[e[0].length,["link",{href:e[1]},e[1]]]:[1,"<"]},"`":function(t){var e=t.match(/(`+)(([\s\S]*?)\1)/);return e&&e[2]?[e[1].length+e[2].length,["inlinecode",e[3]]]:[1,"`"]},"  \n":function(t){return[3,["linebreak"]]}},e.dialects.Gruber.inline["**"]=s("strong","**"),e.dialects.Gruber.inline.__=s("strong","__"),e.dialects.Gruber.inline["*"]=s("em","*"),e.dialects.Gruber.inline._=s("em","_"),e.buildBlockOrder=function(t){var e=[];for(var n in t)"__order__"!=n&&"__call__"!=n&&e.push(n);t.__order__=e},e.buildInlinePatterns=function(t){var e=[];for(var n in t)if(!n.match(/^__.*__$/)){var i=n.replace(/([\\.*+?|()\[\]{}])/g,"\\$1").replace(/\n/,"\\n");e.push(1==n.length?i:"(?:"+i+")")}e=e.join("|"),t.__patterns__=e;var r=t.__call__;t.__call__=function(t,n){return null!=n?r.call(this,t,n):r.call(this,t,e)}},e.DialectHelpers={},e.DialectHelpers.inline_until_char=function(t,e){for(var n=0,i=[];;){if(t.charAt(n)==e)return[++n,i];if(n>=t.length)return null;var r=this.dialect.inline.__oneElement__.call(this,t.substr(n));n+=r[0],i.push.apply(i,r.slice(1))}},e.subclassDialect=function(t){function e(){}function n(){}return e.prototype=t.block,n.prototype=t.inline,{block:new e,inline:new n}},e.buildBlockOrder(e.dialects.Gruber.block),e.buildInlinePatterns(e.dialects.Gruber.inline),e.dialects.Maruku=e.subclassDialect(e.dialects.Gruber),e.dialects.Maruku.processMetaHash=function(t){for(var e=function(t){var e=t.split(""),n=[""],i=!1;for(;e.length;){var r=e.shift();switch(r){case" ":i?n[n.length-1]+=r:n.push("");break;case"'":case'"':i=!i;break;case"\\":r=e.shift();default:n[n.length-1]+=r}}return n}(t),n={},i=0;i<e.length;++i)if(/^#/.test(e[i]))n.id=e[i].substring(1);else if(/^\./.test(e[i]))n.class?n.class=n.class+e[i].replace(/./," "):n.class=e[i].substring(1);else if(/\=/.test(e[i])){var r=e[i].split(/\=/);n[r[0]]=r[1]}return n},e.dialects.Maruku.block.document_meta=function(t,e){if(!(t.lineNumber>1)&&t.match(/^(?:\w+:.*\n)*\w+:.*$/)){d(this.tree)||this.tree.splice(1,0,{});var n=t.split(/\n/);for(p in n){var i=n[p].match(/(\w+):\s*(.*)$/),r=i[1].toLowerCase(),o=i[2];this.tree[1][r]=o}return[]}},e.dialects.Maruku.block.block_meta=function(t,e){var n=t.match(/(^|\n) {0,3}\{:\s*((?:\\\}|[^\}])*)\s*\}$/);if(n){var i,r=this.dialect.processMetaHash(n[2]);if(""===n[1]){var o=this.tree[this.tree.length-1];if(i=d(o),"string"==typeof o)return;for(a in i||(i={},o.splice(1,0,i)),r)i[a]=r[a];return[]}var s=t.replace(/\n.*$/,""),l=this.processBlock(s,[]);for(a in(i=d(l[0]))||(i={},l[0].splice(1,0,i)),r)i[a]=r[a];return l}},e.dialects.Maruku.block.definition_list=function(t,e){var n,i=/^((?:[^\s:].*\n)+):\s+([\s\S]+)$/,r=["dl"];if(s=t.match(i)){for(var o=[t];e.length&&i.exec(e[0]);)o.push(e.shift());for(var a=0;a<o.length;++a){var s,l=(s=o[a].match(i))[1].replace(/\n$/,"").split(/\n/),u=s[2].split(/\n:\s+/);for(n=0;n<l.length;++n)r.push(["dt",l[n]]);for(n=0;n<u.length;++n)r.push(["dd"].concat(this.processInline(u[n].replace(/(\n)\s+/,"$1"))))}return[r]}},e.dialects.Maruku.block.table=function(t,e){var n,i,r=function(t,e){(e=e||"\\s").match(/^[\\|\[\]{}?*.+^$]$/)&&(e="\\"+e);for(var n,i=[],r=new RegExp("^((?:\\\\.|[^\\\\"+e+"])*)"+e+"(.*)");n=t.match(r);)i.push(n[1]),t=n[2];return i.push(t),i};if(i=t.match(/^ {0,3}\|(.+)\n {0,3}\|\s*([\-:]+[\-| :]*)\n((?:\s*\|.*(?:\n|$))*)(?=\n|$)/))i[3]=i[3].replace(/^\s*\|/gm,"");else if(!(i=t.match(/^ {0,3}(\S(?:\\.|[^\\|])*\|.*)\n {0,3}([\-:]+\s*\|[\-| :]*)\n((?:(?:\\.|[^\\|])*\|.*(?:\n|$))*)(?=\n|$)/)))return;var o=["table",["thead",["tr"]],["tbody"]];i[2]=i[2].replace(/\|\s*$/,"").split("|");var a=[];for(l(i[2],function(t){t.match(/^\s*-+:\s*$/)?a.push({align:"right"}):t.match(/^\s*:-+\s*$/)?a.push({align:"left"}):t.match(/^\s*:-+:\s*$/)?a.push({align:"center"}):a.push({})}),i[1]=r(i[1].replace(/\|\s*$/,""),"|"),n=0;n<i[1].length;n++)o[1][1].push(["th",a[n]||{}].concat(this.processInline(i[1][n].trim())));return l(i[3].replace(/\|\s*$/gm,"").split("\n"),function(t){var e=["tr"];for(t=r(t,"|"),n=0;n<t.length;n++)e.push(["td",a[n]||{}].concat(this.processInline(t[n].trim())));o[2].push(e)},this),[o]},e.dialects.Maruku.inline["{:"]=function(t,e,n){if(!n.length)return[2,"{:"];var i=n[n.length-1];if("string"==typeof i)return[2,"{:"];var r=t.match(/^\{:\s*((?:\\\}|[^\}])*)\s*\}/);if(!r)return[2,"{:"];var o=this.dialect.processMetaHash(r[1]),a=d(i);for(var s in a||(a={},i.splice(1,0,a)),o)a[s]=o[s];return[r[0].length,""]},e.dialects.Maruku.inline.__escape__=/^\\[\\`\*_{}\[\]()#\+.!\-|:]/,e.buildBlockOrder(e.dialects.Maruku.block),e.buildInlinePatterns(e.dialects.Maruku.inline);var l,u=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)};l=Array.prototype.forEach?function(t,e,n){return t.forEach(e,n)}:function(t,e,n){for(var i=0;i<t.length;i++)e.call(n||t,t[i],i,t)};var c=function(t){for(var e in t)if(hasOwnProperty.call(t,e))return!1;return!0};function d(t){return u(t)&&t.length>1&&"object"==typeof t[1]&&!u(t[1])?t[1]:void 0}function f(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function h(t){if("string"==typeof t)return f(t);var e=t.shift(),n={},i=[];for(!t.length||"object"!=typeof t[0]||t[0]instanceof Array||(n=t.shift());t.length;)i.push(h(t.shift()));var r="";for(var o in n)r+=" "+o+'="'+f(n[o])+'"';return"img"==e||"br"==e||"hr"==e?"<"+e+r+"/>":"<"+e+r+">"+i.join("")+"</"+e+">"}t.renderJsonML=function(t,e){(e=e||{}).root=e.root||!1;var n=[];if(e.root)n.push(h(t));else for(t.shift(),!t.length||"object"!=typeof t[0]||t[0]instanceof Array||t.shift();t.length;)n.push(h(t.shift()));return n.join("\n\n")}}("undefined"==typeof exports?(window.markdown={},window.markdown):exports);

Zerion Mini Shell 1.0