/* Minification failed. Returning unminified contents.
(21766,33-34): run-time error JS1014: Invalid character: `
(21766,36-37): run-time error JS1007: Expected ']': {
(21766,46-47): run-time error JS1195: Expected expression: ]
(21766,47-48): run-time error JS1014: Invalid character: `
(21767,10-11): run-time error JS1004: Expected ';': )
(22266,5-6): run-time error JS1002: Syntax error: }
(22268,65-66): run-time error JS1004: Expected ';': {
(22294,39-40): run-time error JS1195: Expected expression: >
(22294,127-128): run-time error JS1004: Expected ';': )
(22295,10-11): run-time error JS1004: Expected ';': )
(22295,26-27): run-time error JS1195: Expected expression: )
(22295,28-29): run-time error JS1004: Expected ';': {
(22299,10-11): run-time error JS1195: Expected expression: )
(22302,58-59): run-time error JS1004: Expected ';': {
(22304,14-15): run-time error JS1195: Expected expression: )
(22306,77-78): run-time error JS1004: Expected ';': {
(22308,14-15): run-time error JS1195: Expected expression: )
(22309,44-54): run-time error JS1197: Too many errors. The file might not be a JavaScript file: payMarkers
(22307,17-38): run-time error JS1018: 'return' statement outside of function: return marker.visible
(13269,29476-29481): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: value
 */
(function(d){d.Observe={}})(jQuery);
(function(d,q){var r=function(e,f){f||(f=e,e=window.document);var m=[];d(f).each(function(){for(var l=[],g=d(this),h=g.parent();h.length&&!g.is(e);h=h.parent()){var f=g.get(0).tagName.toLowerCase();l.push(f+":eq("+h.children(f).index(g)+")");g=h}(h.length||g.is(e))&&m.push("> "+l.reverse().join(" > "))});return m.join(", ")};q.path={get:r,capture:function(e,f){f||(f=e,e=window.document);var m=[];d(f).each(function(){var l=-1,g=this;if(this instanceof Text)for(var g=this.parentNode,h=g.childNodes,
f=0;f<h.length;f++)if(h[f]===this){l=f;break}var k=r(e,g),n=d(e).is(g);m.push(function(e){e=n?e:d(e).find(k);return-1===l?e:e.contents()[l]})});return function(e){e=e||window.document;return m.reduce(function(d,f){return d.add(f(e))},d([]))}}}})(jQuery,jQuery.Observe);(function(d,q){var r=function(e){this.original=d(e);this.root=this.original.clone(!1,!0)};r.prototype.find=function(d){return q.path.capture(this.original,d)(this.root)};q.Branch=r})(jQuery,jQuery.Observe);
(function(d,q){var r=function(a,b){var c={};a.forEach(function(a){(a=b(a))&&(c[a[0]]=a[1])});return c},e=r("childList attributes characterData subtree attributeOldValue characterDataOldValue attributeFilter".split(" "),function(a){return[a.toLowerCase(),a]}),f=r(Object.keys(e),function(a){if("attributefilter"!==a)return[e[a],!0]}),m=r(["added","removed"],function(a){return[a.toLowerCase(),a]}),l=d([]),g=function(a){if("object"===typeof a)return a;a=a.split(/\s+/);var b={};a.forEach(function(a){a=
a.toLowerCase();if(!e[a]&&!m[a])throw Error("Unknown option "+a);b[e[a]||m[a]]=!0});return b},h=function(a){return"["+Object.keys(a).sort().reduce(function(b,c){var d=a[c]&&"object"===typeof a[c]?h(a[c]):a[c];return b+"["+JSON.stringify(c)+":"+d+"]"},"")+"]"},t=window.MutationObserver||window.WebKitMutationObserver,k=function(a,b,c,s){this._originalOptions=d.extend({},b);b=d.extend({},b);this.attributeFilter=b.attributeFilter;delete b.attributeFilter;c&&(b.subtree=!0);b.childList&&(b.added=!0,b.removed=
!0);if(b.added||b.removed)b.childList=!0;this.target=d(a);this.options=b;this.selector=c;this.handler=s};k.prototype.is=function(a,b,c){return h(this._originalOptions)===h(a)&&this.selector===b&&this.handler===c};k.prototype.match=function(a){var b=this.options,c=a.type;if(!this.options[c])return l;if(this.selector)switch(c){case "attributes":if(!this._matchAttributeFilter(a))break;case "characterData":return this._matchAttributesAndCharacterData(a);case "childList":if(a.addedNodes&&a.addedNodes.length&&
b.added&&(c=this._matchAddedNodes(a),c.length))return c;if(a.removedNodes&&a.removedNodes.length&&b.removed)return this._matchRemovedNodes(a)}else{var s=a.target instanceof Text?d(a.target).parent():d(a.target);if(!b.subtree&&s.get(0)!==this.target.get(0))return l;switch(c){case "attributes":if(!this._matchAttributeFilter(a))break;case "characterData":return this.target;case "childList":if(a.addedNodes&&a.addedNodes.length&&b.added||a.removedNodes&&a.removedNodes.length&&b.removed)return this.target}}return l};
k.prototype._matchAttributesAndCharacterData=function(a){return this._matchSelector(this.target,[a.target])};k.prototype._matchAddedNodes=function(a){return this._matchSelector(this.target,a.addedNodes)};k.prototype._matchRemovedNodes=function(a){var b=new q.Branch(this.target),c=Array.prototype.slice.call(a.removedNodes).map(function(a){return a.cloneNode(!0)});a.previousSibling?b.find(a.previousSibling).after(c):a.nextSibling?b.find(a.nextSibling).before(c):(this.target===a.target?b.root:b.find(a.target)).empty().append(c);
return this._matchSelector(b.root,c).length?d(a.target):l};k.prototype._matchSelector=function(a,b){var c=a.find(this.selector);b=Array.prototype.slice.call(b);return c=c.filter(function(){var a=this;return b.some(function(b){return b instanceof Text?b.parentNode===a:b===a||d(b).has(a).length})})};k.prototype._matchAttributeFilter=function(a){return this.attributeFilter&&this.attributeFilter.length?0<=this.attributeFilter.indexOf(a.attributeName):!0};var n=function(a){this.patterns=[];this._target=
a;this._observer=null};n.prototype.observe=function(a,b,c){var d=this;this._observer?this._observer.disconnect():this._observer=new t(function(a){a.forEach(function(a){d.patterns.forEach(function(b){var c=b.match(a);c.length&&c.each(function(){b.handler.call(this,a)})})})});this.patterns.push(new k(this._target,a,b,c));this._observer.observe(this._target,this._collapseOptions())};n.prototype.disconnect=function(a,b,c){var d=this;this._observer&&(this.patterns.filter(function(d){return d.is(a,b,c)}).forEach(function(a){a=
d.patterns.indexOf(a);d.patterns.splice(a,1)}),this.patterns.length||this._observer.disconnect())};n.prototype.disconnectAll=function(){this._observer&&(this.patterns=[],this._observer.disconnect())};n.prototype.pause=function(){this._observer&&this._observer.disconnect()};n.prototype.resume=function(){this._observer&&this._observer.observe(this._target,this._collapseOptions())};n.prototype._collapseOptions=function(){var a={};this.patterns.forEach(function(b){var c=a.attributes&&a.attributeFilter;
if(!c&&a.attributes||!b.attributeFilter)c&&b.options.attributes&&!b.attributeFilter&&delete a.attributeFilter;else{var e={},f=[];(a.attributeFilter||[]).concat(b.attributeFilter).forEach(function(a){e[a]||(f.push(a),e[a]=1)});a.attributeFilter=f}d.extend(a,b.options)});Object.keys(m).forEach(function(b){delete a[m[b]]});return a};var p=function(a){this.patterns=[];this._paused=!1;this._target=a;this._events={};this._handler=this._handler.bind(this)};p.prototype.NS=".jQueryObserve";p.prototype.observe=
function(a,b,c){a=new k(this._target,a,b,c);d(this._target);a.options.childList&&(this._addEvent("DOMNodeInserted"),this._addEvent("DOMNodeRemoved"));a.options.attributes&&this._addEvent("DOMAttrModified");a.options.characterData&&this._addEvent("DOMCharacerDataModified");this.patterns.push(a)};p.prototype.disconnect=function(a,b,c){var e=d(this._target),f=this;this.patterns.filter(function(d){return d.is(a,b,c)}).forEach(function(a){a=f.patterns.indexOf(a);f.patterns.splice(a,1)});var g=this.patterns.reduce(function(a,
b){b.options.childList&&(a.DOMNodeInserted=!0,a.DOMNodeRemoved=!0);b.options.attributes&&(a.DOMAttrModified=!0);b.options.characterData&&(a.DOMCharacerDataModified=!0);return a},{});Object.keys(this._events).forEach(function(a){g[a]||(delete f._events[a],e.off(a+f.NS,f._handler))})};p.prototype.disconnectAll=function(){var a=d(this._target),b;for(b in this._events)a.off(b+this.NS,this._handler);this._events={};this.patterns=[]};p.prototype.pause=function(){this._paused=!0};p.prototype.resume=function(){this._paused=
!1};p.prototype._handler=function(a){if(!this._paused){var b={type:null,target:null,addedNodes:null,removedNodes:null,previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null};switch(a.type){case "DOMAttrModified":b.type="attributes";b.target=a.target;b.attributeName=a.attrName;b.oldValue=a.prevValue;break;case "DOMCharacerDataModified":b.type="characterData";b.target=d(a.target).parent().get(0);b.attributeName=a.attrName;b.oldValue=a.prevValue;break;case "DOMNodeInserted":b.type=
"childList";b.target=a.relatedNode;b.addedNodes=[a.target];b.removedNodes=[];break;case "DOMNodeRemoved":b.type="childList",b.target=a.relatedNode,b.addedNodes=[],b.removedNodes=[a.target]}for(a=0;a<this.patterns.length;a++){var c=this.patterns[a],e=c.match(b);e.length&&e.each(function(){c.handler.call(this,b)})}}};p.prototype._addEvent=function(a){this._events[a]||(d(this._target).on(a+this.NS,this._handler),this._events[a]=!0)};q.Pattern=k;q.MutationObserver=n;q.DOMEventObserver=p;d.fn.observe=
function(a,b,c){b?c||(c=b,b=null):(c=a,a=f);return this.each(function(){var e=d(this),f=e.data("observer");f||(f=t?new n(this):new p(this),e.data("observer",f));a=g(a);f.observe(a,b,c)})};d.fn.disconnect=function(a,b,c){a&&(b?c||(c=b,b=null):(c=a,a=f));return this.each(function(){var e=d(this),f=e.data("observer");f&&(a?(a=g(a),f.disconnect(a,b,c)):(f.disconnectAll(),e.removeData("observer")))})}})(jQuery,jQuery.Observe);
;
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){
//     Underscore.js 1.13.7
//     https://underscorejs.org
//     (c) 2009-2024 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
//     Underscore may be freely distributed under the MIT license.
var n="1.13.7",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,i=t.push,o=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var i=Array(r+1);for(u=0;u<r;u++)i[u]=arguments[u];return i[r]=e,n.apply(this,i)}}function w(n){var r=typeof n;return"function"===r||"object"===r&&!!n}function _(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),I=x("ArrayBuffer"),T=x("Function"),k=r.document&&r.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof k&&(T=function(n){return"function"==typeof n||!1});var D=T,R=x("Object"),V=l&&(!/\[native code\]/.test(String(DataView))||R(new DataView(new ArrayBuffer(8)))),F="undefined"!=typeof Map&&R(new Map),P=x("DataView");var q=V?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments");!function(){z(arguments)||(z=function(n){return W(n,"callee")})}();var L=z;function $(n){return O(n)&&y(n)}function C(n){return function(){return n}}function K(n){return function(r){var t=n(r);return"number"==typeof t&&t>=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return!0===r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,i=D(u)&&u.prototype||e,o="constructor";for(W(n,o)&&!r.contains(o)&&r.push(o);t--;)(o=b[t])in n&&n[o]!==i[o]&&!r.contains(o)&&r.push(o)}function nn(n){if(!w(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return g&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),i=0;i<e;i++){var o=t[i];if(r[o]!==u[o]||!(o in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var i=typeof n;return("function"===i||"object"===i||"object"==typeof r)&&function n(r,t,e,i){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var o=a.call(r);if(o!==a.call(t))return!1;if(V&&"[object Object]"==o&&q(r)){if(!q(t))return!1;o=un}switch(o){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return u.valueOf.call(r)===u.valueOf.call(t);case"[object ArrayBuffer]":case un:return n(en(r),en(t),e,i)}var f="[object Array]"===o;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if("object"!=typeof r||"object"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&"constructor"in r&&"constructor"in t)return!1}i=i||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return i[s]===t;if(e.push(r),i.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,i))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,i))return!1}return e.pop(),i.pop(),!0}(n,r,t,e)}function an(n){if(!w(n))return[];var r=[];for(var t in n)r.push(t);return g&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t);if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==hn||!D(t[cn])}}var cn="forEach",ln="has",sn=["clear","delete"],pn=["get",ln,"set"],vn=sn.concat(cn,pn),hn=sn.concat(pn),yn=["add"].concat(sn,cn,ln),dn=F?fn(vn):x("Map"),gn=F?fn(hn):x("WeakMap"),bn=F?fn(yn):x("Set"),mn=x("WeakSet");function jn(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e}function wn(n){for(var r={},t=nn(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r}function _n(n){var r=[];for(var t in n)D(n[t])&&r.push(t);return r.sort()}function An(n,r){return function(t){var e=arguments.length;if(r&&(t=Object(t)),e<2||null==t)return t;for(var u=1;u<e;u++)for(var i=arguments[u],o=n(i),a=o.length,f=0;f<a;f++){var c=o[f];r&&void 0!==t[c]||(t[c]=i[c])}return t}}var xn=An(an),Sn=An(nn),On=An(an,!0);function Mn(n){if(!w(n))return{};if(v)return v(n);var r=function(){};r.prototype=n;var t=new r;return r.prototype=null,t}function En(n){return U(n)?n:[n]}function Bn(n){return tn.toPath(n)}function Nn(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0}function In(n,r,t){var e=Nn(n,Bn(r));return _(e)?t:e}function Tn(n){return n}function kn(n){return n=Sn({},n),function(r){return rn(r,n)}}function Dn(n){return n=Bn(n),function(r){return Nn(r,n)}}function Rn(n,r,t){if(void 0===r)return n;switch(null==t?3:t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,i){return n.call(r,t,e,u,i)}}return function(){return n.apply(r,arguments)}}function Vn(n,r,t){return null==n?Tn:D(n)?Rn(n,r,t):w(n)&&!U(n)?kn(n):Dn(n)}function Fn(n,r){return Vn(n,r,1/0)}function Pn(n,r,t){return tn.iteratee!==Fn?tn.iteratee(n,r):Vn(n,r,t)}function qn(){}function Un(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))}tn.toPath=En,tn.iteratee=Fn;var Wn=Date.now||function(){return(new Date).getTime()};function zn(n){var r=function(r){return n[r]},t="(?:"+nn(n).join("|")+")",e=RegExp(t),u=RegExp(t,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,r):n}}var Ln={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},$n=zn(Ln),Cn=zn(wn(Ln)),Kn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Jn=/(.)^/,Gn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Hn=/\\|'|\r|\n|\u2028|\u2029/g;function Qn(n){return"\\"+Gn[n]}var Xn=/^\s*(\w|\$)+\s*$/;var Yn=0;function Zn(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var i=Mn(n.prototype),o=n.apply(i,u);return w(o)?o:i}var nr=j((function(n,r){var t=nr.placeholder,e=function(){for(var u=0,i=r.length,o=Array(i),a=0;a<i;a++)o[a]=r[a]===t?arguments[u++]:r[a];for(;u<arguments.length;)o.push(arguments[u++]);return Zn(n,e,this,this,o)};return e}));nr.placeholder=tn;var rr=j((function(n,r,t){if(!D(n))throw new TypeError("Bind must be called on a function");var e=j((function(u){return Zn(n,e,r,this,t.concat(u))}));return e})),tr=K(Y);function er(n,r,t,e){if(e=e||[],r||0===r){if(r<=0)return e.concat(n)}else r=1/0;for(var u=e.length,i=0,o=Y(n);i<o;i++){var a=n[i];if(tr(a)&&(U(a)||L(a)))if(r>1)er(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else t||(e[u++]=a)}return e}var ur=j((function(n,r){var t=(r=er(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=rr(n[e],n)}return n}));var ir=j((function(n,r,t){return setTimeout((function(){return n.apply(null,t)}),r)})),or=nr(ir,tn,1);function ar(n){return function(){return!n.apply(this,arguments)}}function fr(n,r){var t;return function(){return--n>0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var cr=nr(fr,2);function lr(n,r,t){r=Pn(r,t);for(var e,u=nn(n),i=0,o=u.length;i<o;i++)if(r(n[e=u[i]],e,n))return e}function sr(n){return function(r,t,e){t=Pn(t,e);for(var u=Y(r),i=n>0?0:u-1;i>=0&&i<u;i+=n)if(t(r[i],i,r))return i;return-1}}var pr=sr(1),vr=sr(-1);function hr(n,r,t,e){for(var u=(t=Pn(t,e,1))(r),i=0,o=Y(n);i<o;){var a=Math.floor((i+o)/2);t(n[a])<u?i=a+1:o=a}return i}function yr(n,r,t){return function(e,u,i){var a=0,f=Y(e);if("number"==typeof i)n>0?a=i>=0?i:Math.max(i+f,a):f=i>=0?Math.min(i+1,f):i+f+1;else if(t&&i&&f)return e[i=t(e,u)]===u?i:-1;if(u!=u)return(i=r(o.call(e,a,f),$))>=0?i+a:-1;for(i=n>0?a:f-1;i>=0&&i<f;i+=n)if(e[i]===u)return i;return-1}}var dr=yr(1,pr,hr),gr=yr(-1,vr);function br(n,r,t){var e=(tr(n)?pr:lr)(n,r,t);if(void 0!==e&&-1!==e)return n[e]}function mr(n,r,t){var e,u;if(r=Rn(r,t),tr(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var i=nn(n);for(e=0,u=i.length;e<u;e++)r(n[i[e]],i[e],n)}return n}function jr(n,r,t){r=Pn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,i=Array(u),o=0;o<u;o++){var a=e?e[o]:o;i[o]=r(n[a],a,n)}return i}function wr(n){var r=function(r,t,e,u){var i=!tr(r)&&nn(r),o=(i||r).length,a=n>0?0:o-1;for(u||(e=r[i?i[a]:a],a+=n);a>=0&&a<o;a+=n){var f=i?i[a]:a;e=t(e,r[f],f,r)}return e};return function(n,t,e,u){var i=arguments.length>=3;return r(n,Rn(t,u,4),e,i)}}var _r=wr(1),Ar=wr(-1);function xr(n,r,t){var e=[];return r=Pn(r,t),mr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Sr(n,r,t){r=Pn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(!r(n[o],o,n))return!1}return!0}function Or(n,r,t){r=Pn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(r(n[o],o,n))return!0}return!1}function Mr(n,r,t,e){return tr(n)||(n=jn(n)),("number"!=typeof t||e)&&(t=0),dr(n,r,t)>=0}var Er=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Bn(r),e=r.slice(0,-1),r=r[r.length-1]),jr(n,(function(n){var i=u;if(!i){if(e&&e.length&&(n=Nn(n,e)),null==n)return;i=n[r]}return null==i?i:i.apply(n,t)}))}));function Br(n,r){return jr(n,Dn(r))}function Nr(n,r,t){var e,u,i=-1/0,o=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e>i&&(i=e);else r=Pn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))>o||u===-1/0&&i===-1/0)&&(i=n,o=u)}));return i}var Ir=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Tr(n){return n?U(n)?o.call(n):S(n)?n.match(Ir):tr(n)?jr(n,Tn):jn(n):[]}function kr(n,r,t){if(null==r||t)return tr(n)||(n=jn(n)),n[Un(n.length-1)];var e=Tr(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var i=u-1,o=0;o<r;o++){var a=Un(o,i),f=e[o];e[o]=e[a],e[a]=f}return e.slice(0,r)}function Dr(n,r){return function(t,e,u){var i=r?[[],[]]:{};return e=Pn(e,u),mr(t,(function(r,u){var o=e(r,u,t);n(i,r,o)})),i}}var Rr=Dr((function(n,r,t){W(n,t)?n[t].push(r):n[t]=[r]})),Vr=Dr((function(n,r,t){n[t]=r})),Fr=Dr((function(n,r,t){W(n,t)?n[t]++:n[t]=1})),Pr=Dr((function(n,r,t){n[t?0:1].push(r)}),!0);function qr(n,r,t){return r in t}var Ur=j((function(n,r){var t={},e=r[0];if(null==n)return t;D(e)?(r.length>1&&(e=Rn(e,r[1])),r=an(n)):(e=qr,r=er(r,!1,!1),n=Object(n));for(var u=0,i=r.length;u<i;u++){var o=r[u],a=n[o];e(a,o,n)&&(t[o]=a)}return t})),Wr=j((function(n,r){var t,e=r[0];return D(e)?(e=ar(e),r.length>1&&(t=r[1])):(r=jr(er(r,!1,!1),String),e=function(n,t){return!Mr(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return o.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return o.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=er(r,!0,!0),xr(n,(function(n){return!Mr(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=Pn(t,e));for(var u=[],i=[],o=0,a=Y(n);o<a;o++){var f=n[o],c=t?t(f,o,n):f;r&&!t?(o&&i===c||u.push(f),i=c):t?Mr(i,c)||(i.push(c),u.push(f)):Mr(u,f)||u.push(f)}return u}var Gr=j((function(n){return Jr(er(n,!0,!0))}));function Hr(n){for(var r=n&&Nr(n,Y).length||0,t=Array(r),e=0;e<r;e++)t[e]=Br(n,e);return t}var Qr=j(Hr);function Xr(n,r){return n._chain?tn(r).chain():r}function Yr(n){return mr(_n(n),(function(r){var t=tn[r]=n[r];tn.prototype[r]=function(){var n=[this._wrapped];return i.apply(n,arguments),Xr(this,t.apply(tn,n))}})),tn}mr(["pop","push","reverse","shift","sort","splice","unshift"],(function(n){var r=t[n];tn.prototype[n]=function(){var t=this._wrapped;return null!=t&&(r.apply(t,arguments),"shift"!==n&&"splice"!==n||0!==t.length||delete t[0]),Xr(this,t)}})),mr(["concat","join","slice"],(function(n){var r=t[n];tn.prototype[n]=function(){var n=this._wrapped;return null!=n&&(n=r.apply(n,arguments)),Xr(this,n)}}));var Zr=Yr({__proto__:null,VERSION:n,restArguments:j,isObject:w,isNull:function(n){return null===n},isUndefined:_,isBoolean:A,isElement:function(n){return!(!n||1!==n.nodeType)},isString:S,isNumber:O,isDate:M,isRegExp:E,isError:B,isSymbol:N,isArrayBuffer:I,isDataView:q,isArray:U,isFunction:D,isArguments:L,isFinite:function(n){return!N(n)&&d(n)&&!isNaN(parseFloat(n))},isNaN:$,isTypedArray:X,isEmpty:function(n){if(null==n)return!0;var r=Y(n);return"number"==typeof r&&(U(n)||S(n)||L(n))?0===r:0===Y(nn(n))},isMatch:rn,isEqual:function(n,r){return on(n,r)},isMap:dn,isWeakMap:gn,isSet:bn,isWeakSet:mn,keys:nn,allKeys:an,values:jn,pairs:function(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},invert:wn,functions:_n,methods:_n,extend:xn,extendOwn:Sn,assign:Sn,defaults:On,create:function(n,r){var t=Mn(n);return r&&Sn(t,r),t},clone:function(n){return w(n)?U(n)?n.slice():xn({},n):n},tap:function(n,r){return r(n),n},get:In,has:function(n,r){for(var t=(r=Bn(r)).length,e=0;e<t;e++){var u=r[e];if(!W(n,u))return!1;n=n[u]}return!!t},mapObject:function(n,r,t){r=Pn(r,t);for(var e=nn(n),u=e.length,i={},o=0;o<u;o++){var a=e[o];i[a]=r(n[a],a,n)}return i},identity:Tn,constant:C,noop:qn,toPath:En,property:Dn,propertyOf:function(n){return null==n?qn:function(r){return In(n,r)}},matcher:kn,matches:kn,times:function(n,r,t){var e=Array(Math.max(0,n));r=Rn(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},random:Un,now:Wn,escape:$n,unescape:Cn,templateSettings:Kn,template:function(n,r,t){!r&&t&&(r=t),r=On({},r,tn.templateSettings);var e=RegExp([(r.escape||Jn).source,(r.interpolate||Jn).source,(r.evaluate||Jn).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,(function(r,t,e,o,a){return i+=n.slice(u,a).replace(Hn,Qn),u=a+r.length,t?i+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),r})),i+="';\n";var o,a=r.variable;if(a){if(!Xn.test(a))throw new Error("variable is not a bare identifier: "+a)}else i="with(obj||{}){\n"+i+"}\n",a="obj";i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{o=new Function(a,"_",i)}catch(n){throw n.source=i,n}var f=function(n){return o.call(this,n,tn)};return f.source="function("+a+"){\n"+i+"}",f},result:function(n,r,t){var e=(r=Bn(r)).length;if(!e)return D(t)?t.call(n):t;for(var u=0;u<e;u++){var i=null==n?void 0:n[r[u]];void 0===i&&(i=t,u=e),n=D(i)?i.call(n):i}return n},uniqueId:function(n){var r=++Yn+"";return n?n+r:r},chain:function(n){var r=tn(n);return r._chain=!0,r},iteratee:Fn,partial:nr,bind:rr,bindAll:ur,memoize:function(n,r){var t=function(e){var u=t.cache,i=""+(r?r.apply(this,arguments):e);return W(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return t.cache={},t},delay:ir,defer:or,throttle:function(n,r,t){var e,u,i,o,a=0;t||(t={});var f=function(){a=!1===t.leading?0:Wn(),e=null,o=n.apply(u,i),e||(u=i=null)},c=function(){var c=Wn();a||!1!==t.leading||(a=c);var l=r-(c-a);return u=this,i=arguments,l<=0||l>r?(e&&(clearTimeout(e),e=null),a=c,o=n.apply(u,i),e||(u=i=null)):e||!1===t.trailing||(e=setTimeout(f,l)),o};return c.cancel=function(){clearTimeout(e),a=0,e=u=i=null},c},debounce:function(n,r,t){var e,u,i,o,a,f=function(){var c=Wn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(o=n.apply(a,i)),e||(i=a=null))},c=j((function(c){return a=this,i=c,u=Wn(),e||(e=setTimeout(f,r),t&&(o=n.apply(a,i))),o}));return c.cancel=function(){clearTimeout(e),e=i=a=null},c},wrap:function(n,r){return nr(r,n)},negate:ar,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:fr,once:cr,findKey:lr,findIndex:pr,findLastIndex:vr,sortedIndex:hr,indexOf:dr,lastIndexOf:gr,find:br,detect:br,findWhere:function(n,r){return br(n,kn(r))},each:mr,forEach:mr,map:jr,collect:jr,reduce:_r,foldl:_r,inject:_r,reduceRight:Ar,foldr:Ar,filter:xr,select:xr,reject:function(n,r,t){return xr(n,ar(Pn(r)),t)},every:Sr,all:Sr,some:Or,any:Or,contains:Mr,includes:Mr,include:Mr,invoke:Er,pluck:Br,where:function(n,r){return xr(n,kn(r))},max:Nr,min:function(n,r,t){var e,u,i=1/0,o=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e<i&&(i=e);else r=Pn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))<o||u===1/0&&i===1/0)&&(i=n,o=u)}));return i},shuffle:function(n){return kr(n,1/0)},sample:kr,sortBy:function(n,r,t){var e=0;return r=Pn(r,t),Br(jr(n,(function(n,t,u){return{value:n,index:e++,criteria:r(n,t,u)}})).sort((function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(t>e||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index})),"value")},groupBy:Rr,indexBy:Vr,countBy:Fr,partition:Pr,toArray:Tr,size:function(n){return null==n?0:tr(n)?n.length:nn(n).length},pick:Ur,omit:Wr,first:Lr,head:Lr,take:Lr,initial:zr,last:function(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[n.length-1]:$r(n,Math.max(0,n.length-r))},rest:$r,tail:$r,drop:$r,compact:function(n){return xr(n,Boolean)},flatten:function(n,r){return er(n,r,!1)},without:Kr,uniq:Jr,unique:Jr,union:Gr,intersection:function(n){for(var r=[],t=arguments.length,e=0,u=Y(n);e<u;e++){var i=n[e];if(!Mr(r,i)){var o;for(o=1;o<t&&Mr(arguments[o],i);o++);o===t&&r.push(i)}}return r},difference:Cr,unzip:Hr,transpose:Hr,zip:Qr,object:function(n,r){for(var t={},e=0,u=Y(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t},range:function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),i=0;i<e;i++,n+=t)u[i]=n;return u},chunk:function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(o.call(n,e,e+=r));return t},mixin:Yr,default:tn});return Zr._=Zr,Zr}));;
/**!

 @license
 handlebars v4.7.7

Copyright (C) 2011-2019 by Yehuda Katz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

*/
!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a.parseWithoutProcessing=j.parseWithoutProcessing,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(45),i=e(h),j=c(46),k=c(51),l=c(52),m=e(l),n=c(49),o=e(n),p=c(44),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(37),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(38),p=e(o),q=c(44),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(10),j=c(30),k=c(32),l=e(k),m=c(33),n="4.7.7";b.VERSION=n;var o=8;b.COMPILER_REVISION=o;var p=7;b.LAST_COMPATIBLE_COMPILER_REVISION=p;var q={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 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function e(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return!a&&0!==a||!(!p(a)||0!==a.length)}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l<f.length;l++)this[f[l]]=k[f[l]];Error.captureStackTrace&&Error.captureStackTrace(this,d);try{c&&(this.lineNumber=g,this.endLineNumber=h,e?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0})):(this.column=i,this.endColumn=j))}catch(m){}}var e=c(7)["default"];b.__esModule=!0;var f=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];d.prototype=new Error,b["default"]=d,a.exports=b["default"]},function(a,b,c){a.exports={"default":c(8),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b,c){return d.setDesc(a,b,c)}},function(a,b){var c=Object;a.exports={create:c.create,getProto:c.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:c.getOwnPropertyDescriptor,setDesc:c.defineProperty,setDescs:c.defineProperties,getKeys:c.keys,getNames:c.getOwnPropertyNames,getSymbols:c.getOwnPropertySymbols,each:[].forEach}},function(a,b,c){"use strict";function d(a){h["default"](a),j["default"](a),l["default"](a),n["default"](a),p["default"](a),r["default"](a),t["default"](a)}function e(a,b,c){a.helpers[b]&&(a.hooks[b]=a.helpers[b],c||delete a.helpers[b])}var f=c(1)["default"];b.__esModule=!0,b.registerDefaultHelpers=d,b.moveHelperToHooks=e;var g=c(11),h=f(g),i=c(12),j=f(i),k=c(25),l=f(k),m=c(26),n=f(m),o=c(27),p=f(o),q=c(28),r=f(q),s=c(29),t=f(s)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(d.isArray(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){(function(d){"use strict";var e=c(13)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(5),h=c(6),i=f(h);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){l&&(l.key=b,l.index=c,l.first=0===c,l.last=!!d,m&&(l.contextPath=m+b)),k+=f(a[b],{data:l,blockParams:g.blockParams([a[b],b],[m+b,null])})}if(!b)throw new i["default"]("Must pass iterator to #each");var f=b.fn,h=b.inverse,j=0,k="",l=void 0,m=void 0;if(b.data&&b.ids&&(m=g.appendContextPath(b.data.contextPath,b.ids[0])+"."),g.isFunction(a)&&(a=a.call(this)),b.data&&(l=g.createFrame(b.data)),a&&"object"==typeof a)if(g.isArray(a))for(var n=a.length;j<n;j++)j in a&&c(j,j,j===a.length-1);else if(d.Symbol&&a[d.Symbol.iterator]){for(var o=[],p=a[d.Symbol.iterator](),q=p.next();!q.done;q=p.next())o.push(q.value);a=o;for(var n=a.length;j<n;j++)c(j,j,j===a.length-1)}else!function(){var b=void 0;e(a).forEach(function(a){void 0!==b&&c(b,j-1),b=a,j++}),void 0!==b&&c(b,j-1,!0)}();return 0===j&&(k=h(this)),k})},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b,c){a.exports={"default":c(14),__esModule:!0}},function(a,b,c){c(15),a.exports=c(21).Object.keys},function(a,b,c){var d=c(16);c(18)("keys",function(a){return function(b){return a(d(b))}})},function(a,b,c){var d=c(17);a.exports=function(a){return Object(d(a))}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on  "+a);return a}},function(a,b,c){var d=c(19),e=c(21),f=c(24);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(20),e=c(21),f=c(22),g="prototype",h=function(a,b,c){var i,j,k,l=a&h.F,m=a&h.G,n=a&h.S,o=a&h.P,p=a&h.B,q=a&h.W,r=m?e:e[b]||(e[b]={}),s=m?d:n?d[b]:(d[b]||{})[g];m&&(c=b);for(i in c)j=!l&&s&&i in s,j&&i in r||(k=j?s[i]:c[i],r[i]=m&&"function"!=typeof s[i]?c[i]:p&&j?f(k,d):q&&s[i]==k?function(a){var b=function(b){return this instanceof a?new a(b):a(b)};return b[g]=a[g],b}(k):o&&"function"==typeof k?f(Function.call,k):k,o&&((r[g]||(r[g]={}))[i]=k))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,a.exports=h},function(a,b){var c=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b){var c=a.exports={version:"1.2.6"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(23);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("if",function(a,b){if(2!=arguments.length)throw new g["default"]("#if requires exactly one argument");return e.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||e.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){if(2!=arguments.length)throw new g["default"]("#unless requires exactly one argument");return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("lookup",function(a,b,c){return a?c.lookupProperty(a,b):a})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("with",function(a,b){if(2!=arguments.length)throw new g["default"]("#with requires exactly one argument");e.isFunction(a)&&(a=a.call(this));var c=b.fn;if(e.isEmpty(a))return b.inverse(this);var d=b.data;return b.data&&b.ids&&(d=e.createFrame(b.data),d.contextPath=e.appendContextPath(b.data.contextPath,b.ids[0])),c(a,{data:d,blockParams:e.blockParams([a],[d&&d.contextPath])})})},a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultDecorators=d;var f=c(31),g=e(f)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerDecorator("inline",function(a,b,c,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=c.partials;c.partials=d.extend({},g,b.partials);var h=a(e,f);return c.partials=g,h}),b.partials[e.args[0]]=e.fn,f})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5),e={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=d.indexOf(e.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=i(null);b.constructor=!1,b.__defineGetter__=!1,b.__defineSetter__=!1,b.__lookupGetter__=!1;var c=i(null);return c.__proto__=!1,{properties:{whitelist:l.createNewLookupObject(c,a.allowedProtoProperties),defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:l.createNewLookupObject(b,a.allowedProtoMethods),defaultValue:a.allowProtoMethodsByDefault}}}function e(a,b,c){return"function"==typeof a?f(b.methods,c):f(b.properties,c)}function f(a,b){return void 0!==a.whitelist[b]?a.whitelist[b]===!0:void 0!==a.defaultValue?a.defaultValue:(g(b),!1)}function g(a){o[a]!==!0&&(o[a]=!0,n.log("error",'Handlebars: Access has been denied to resolve the property "'+a+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function h(){j(o).forEach(function(a){delete o[a]})}var i=c(34)["default"],j=c(13)["default"],k=c(3)["default"];b.__esModule=!0,b.createProtoAccessControl=d,b.resultIsAllowed=e,b.resetLoggedProperties=h;var l=c(36),m=c(32),n=k(m),o=i(null)},function(a,b,c){a.exports={"default":c(35),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b){return d.create(a,b)}},function(a,b,c){"use strict";function d(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return f.extend.apply(void 0,[e(null)].concat(b))}var e=c(34)["default"];b.__esModule=!0,b.createNewLookupObject=d;var f=c(5)},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=v.COMPILER_REVISION;if(!(b>=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b<v.LAST_COMPATIBLE_COMPILER_REVISION){var d=v.REVISION_CHANGES[c],e=v.REVISION_CHANGES[b];throw new u["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new u["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=s.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=s.extend({},e,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),g=b.VM.invokePartial.call(this,c,d,f);if(null==g&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),g=e.partials[e.name](d,f)),null!=g){if(e.indent){for(var h=g.split("\n"),i=0,j=h.length;i<j&&(h[i]||i+1!==j);i++)h[i]=e.indent+h[i];g=h.join("\n")}return g}throw new u["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(g,b,g.helpers,g.partials,f,i,h)}var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],f=e.data;d._setup(e),!e.partial&&a.useData&&(f=j(b,f));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=e.depths?b!=e.depths[0]?[b].concat(e.depths):e.depths:[b]),(c=k(a.main,c,g,e.depths||[],f,i))(b,e)}if(!b)throw new u["default"]("No environment passed to template");if(!a||!a.main)throw new u["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e=a.compiler&&7===a.compiler[0],g={strict:function(a,b,c){if(!(a&&b in a))throw new u["default"]('"'+b+'" not defined in '+a,{loc:c});return g.lookupProperty(a,b)},lookupProperty:function(a,b){var c=a[b];return null==c?c:Object.prototype.hasOwnProperty.call(a,b)?c:y.resultIsAllowed(c,g.protoAccessControl,b)?c:void 0},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++){var e=a[d]&&g.lookupProperty(a[d],b);if(null!=e)return a[d][b]}},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:s.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},mergeIfNeeded:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=s.extend({},b,a)),c},nullContext:n({}),noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){if(c.partial)g.protoAccessControl=c.protoAccessControl,g.helpers=c.helpers,g.partials=c.partials,g.decorators=c.decorators,g.hooks=c.hooks;else{var d=s.extend({},b.helpers,c.helpers);l(d,g),g.helpers=d,a.usePartial&&(g.partials=g.mergeIfNeeded(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(g.decorators=s.extend({},b.decorators,c.decorators)),g.hooks={},g.protoAccessControl=y.createProtoAccessControl(c);var f=c.allowCallsToHelperMissing||e;w.moveHelperToHooks(g,"helperMissing",f),w.moveHelperToHooks(g,"blockHelperMissing",f)}},d._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new u["default"]("must pass block params");if(a.useDepths&&!e)throw new u["default"]("must pass parent depths");return f(g,b,a[b],c,0,d,e)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){var d=c.data&&c.data["partial-block"];c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var e=void 0;if(c.fn&&c.fn!==i&&!function(){c.data=v.createFrame(c.data);var a=c.fn;e=c.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=v.createFrame(c.data),c.data["partial-block"]=d,a(b,c)},a.partials&&(c.partials=s.extend({},c.partials,a.partials))}(),void 0===a&&e&&(a=e),void 0===a)throw new u["default"]("The partial "+c.name+" could not be found");if(a instanceof Function)return a(b,c)}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?v.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),s.extend(b,g)}return b}function l(a,b){o(a).forEach(function(c){var d=a[c];a[c]=m(d,b)})}function m(a,b){var c=b.lookupProperty;return x.wrapHelper(a,function(a){return s.extend({lookupProperty:c},a)})}var n=c(39)["default"],o=c(13)["default"],p=c(3)["default"],q=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var r=c(5),s=p(r),t=c(6),u=q(t),v=c(4),w=c(10),x=c(43),y=c(33)},function(a,b,c){a.exports={"default":c(40),__esModule:!0}},function(a,b,c){c(41),a.exports=c(21).Object.seal},function(a,b,c){var d=c(42);c(18)("seal",function(a){return function(b){return a&&d(b)?a(b):b}})},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){"use strict";function c(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}b.__esModule=!0,b.wrapHelper=c},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;i["default"].yy=o,o.locInfo=function(a){return new o.SourceLocation(b&&b.srcName,a)};var c=i["default"].parse(a);return c}function e(a,b){var c=d(a,b),e=new k["default"](b);return e.accept(c)}var f=c(1)["default"],g=c(3)["default"];b.__esModule=!0,b.parseWithoutProcessing=d,b.parse=e;var h=c(47),i=f(h),j=c(48),k=f(j),l=c(50),m=g(l),n=c(5);b.parser=i["default"];var o={};n.extend(o,m)},function(a,b){"use strict";b.__esModule=!0;var c=function(){function a(){this.yy={}}var b={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_repetition0: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,0],[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(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},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]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],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:44,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:45,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: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:41,56:48,64:42,65:[1,43],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:49,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,50]},{72:[1,35],86:51},{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:52,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:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,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:64,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:65,47:[1,66]},{30:67,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:68,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:69,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:70,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:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],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,79]},{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,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],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:83,47:[1,66]},{47:[2,55]},{4:84,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:85,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:86,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:87,47:[1,66]},{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:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],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:91,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:92,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:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],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:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],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:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],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:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],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,105]},{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:106,72:[1,107],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,108],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,109]},{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:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,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,113]},{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:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],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,117]},{32:118,33:[2,62],74:119,75:[1,120]},{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:121,74:122,75:[1,120]},{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,123]},{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,124]},{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,108]},{20:74,63:125,64:75,65:[1,43],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:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],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,129]},{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,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[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:134,74:135,75:[1,120]},{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,137],77:[1,136]},{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,138]},{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],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null!==n&&"undefined"!=typeof n||(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,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 a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=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),c.length-1&&(this.yylineno-=c.length-1);var e=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:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,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(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a: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 a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},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(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.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(5,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:return this.popState(),44;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(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;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 b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;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 b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.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}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(49),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i<j;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b<c;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substring(1,a.length-1):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g=0,h=b.length;g<h;g++){var i=b[g].part,j=b[g].original!==i;if(d+=(b[g].separator||"")+i,j||".."!==i&&"."!==i&&"this"!==i)e.push(i);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=m.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(m.isArray(a)&&m.isArray(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!g(a[c],b[c]))return!1;return!0}}function h(a){if(!a.path.parts){var b=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[b.original+""],original:b.original+"",loc:b.loc}}}var i=c(34)["default"],j=c(1)["default"];b.__esModule=!0,b.Compiler=d,b.precompile=e,b.compile=f;var k=c(6),l=j(k),m=c(5),n=c(45),o=j(n),p=[].slice;d.prototype={compiler:d,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[],b.knownHelpers=m.extend(i(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},b.knownHelpers),this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new l["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;d<c;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new l["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,o["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=o["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c<d;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:p.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=o["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&o["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;b<c;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||o["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;b<c;b++){var d=this.options.blockParams[b],e=d&&m.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f<g;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),", ",JSON.stringify(b.source.currentLocation)," )"]:e}var g=c(13)["default"],h=c(1)["default"];b.__esModule=!0;var i=c(4),j=c(6),k=h(j),l=c(5),m=c(53),n=h(m);e.prototype={nameLookup:function(a,b){return this.internalNameLookup(a,b)},depthedLookup:function(a){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(a),")"]},compilerInfo:function(){var a=i.COMPILER_REVISION,b=i.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return l.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(a,b){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",a,",",JSON.stringify(b),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{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(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;h<i;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new k["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, ",this.lookupPropertyFunctionVarDeclaration(),";\n"]),
this.decorators.push("return fn;"),d?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 j=this.createFunctionContext(d);if(this.isChild)return j;var l={compiler:this.compilerInfo(),main:j};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;h<i;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new n["default"](this.options.srcName),this.decorators=new n["default"](this.options.srcName)},createFunctionContext:function(a){var b=this,c="",d=this.stackVars.concat(this.registers.list);d.length>0&&(c+=", "+d.join(", "));var e=0;g(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var h=this.mergeSource(c);return a?(f.push(h),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n  ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend("  + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n      lookupProperty = container.lookupProperty || function(parent, propertyName) {\n        if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n          return parent[propertyName];\n        }\n        return undefined\n    }\n    ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,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(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;c<h;c++)this.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=[];c&&f.push(e.name),f.push(d),this.options.strict||f.push(this.aliasable("container.hooks.helperMissing"));var g=["(",this.itemsSeparatedBy(f,"||"),")"],h=this.source.functionCall(g,"call",e.callParams);this.push(h)},itemsSeparatedBy:function(a,b){var c=[];c.push(a[0]);for(var d=1;d<a.length;d++)c.push(b,a[d]);return c},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;f<g;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);if(null==h){this.context.programs.push("");var i=this.context.programs.length;d.index=i,d.name="program"+i,this.context.programs[i]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[i]=e.decorators,this.context.environments[i]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams,d.useDepths=this.useDepths,d.useBlockParams=this.useBlockParams}else d.index=h.index,d.name="program"+h.index,this.useDepths=this.useDepths||h.useDepths,this.useBlockParams=this.useBlockParams||h.useBlockParams}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return d}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new k["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},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 a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new k["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e.loc=JSON.stringify(this.source.currentLocation),e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="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(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;c<d;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(g.isArray(a)){for(var d=[],e=0,f=a.length;e<f;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}var f=c(13)["default"];b.__esModule=!0;var g=c(5),h=void 0;try{}catch(i){}h||(h=function(a,b,c,d){this.src="",d&&this.add(d)},h.prototype={add:function(a){g.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){g.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add(["  ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;b<c;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new h(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof h?a:(a=d(a,this,b),new h(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=this,c=[];f(a).forEach(function(e){var f=d(a[e],b);"undefined"!==f&&c.push([b.quotedString(e),":",f])});var e=this.generateList(c);return e.prepend("{"),e.add("}"),e},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;c<e;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])});;
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var H;function _(){return H.apply(null,arguments)}function y(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function F(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function g(e){return void 0===e}function w(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i<s;++i)n.push(t(e[i],i));return n}function E(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return Wt(e,t,n,s,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function A(e){var t,n,s=e._d&&!isNaN(e._d.getTime());return s&&(t=p(e),n=j.call(t.parsedDateParts,function(e){return null!=e}),s=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict)&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e)?s:(e._isValid=s,e._isValid)}function I(e){var t=l(NaN);return null!=e?E(p(t),e):p(t).userInvalidated=!0,t}var j=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},Z=_.momentProperties=[],z=!1;function q(e,t){var n,s,i,r=Z.length;if(g(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),g(t._i)||(e._i=t._i),g(t._f)||(e._f=t._f),g(t._l)||(e._l=t._l),g(t._strict)||(e._strict=t._strict),g(t._tzm)||(e._tzm=t._tzm),g(t._isUTC)||(e._isUTC=t._isUTC),g(t._offset)||(e._offset=t._offset),g(t._pf)||(e._pf=p(t)),g(t._locale)||(e._locale=t._locale),0<r)for(n=0;n<r;n++)g(i=t[s=Z[n]])||(e[s]=i);return e}function $(e){q(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===z&&(z=!0,_.updateOffset(this),z=!1)}function k(e){return e instanceof $||null!=e&&null!=e._isAMomentObject}function B(e){!1===_.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function e(r,a){var o=!0;return E(function(){if(null!=_.deprecationHandler&&_.deprecationHandler(null,r),o){for(var e,t,n=[],s=arguments.length,i=0;i<s;i++){if(e="","object"==typeof arguments[i]){for(t in e+="\n["+i+"] ",arguments[0])c(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[i];n.push(e)}B(r+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),o=!1}return a.apply(this,arguments)},a)}var J={};function Q(e,t){null!=_.deprecationHandler&&_.deprecationHandler(e,t),J[e]||(B(t),J[e]=!0)}function a(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function X(e,t){var n,s=E({},e);for(n in t)c(t,n)&&(F(e[n])&&F(t[n])?(s[n]={},E(s[n],e[n]),E(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)c(e,n)&&!c(t,n)&&F(e[n])&&(s[n]=E({},s[n]));return s}function K(e){null!=e&&this.set(e)}_.suppressDeprecationWarnings=!1,_.deprecationHandler=null;var ee=Object.keys||function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};function r(e,t,n){var s=""+Math.abs(e);return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}var te=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,se={},ie={};function s(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(ie[e]=i),t&&(ie[t[0]]=function(){return r(i.apply(this,arguments),t[1],t[2])}),n&&(ie[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function re(e,t){return e.isValid()?(t=ae(t,e.localeData()),se[t]=se[t]||function(s){for(var e,i=s.match(te),t=0,r=i.length;t<r;t++)ie[i[t]]?i[t]=ie[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=a(i[n])?i[n].call(e,s):i[n];return t}}(t),se[t](e)):e.localeData().invalidDate()}function ae(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(ne.lastIndex=0;0<=n&&ne.test(e);)e=e.replace(ne,s),ne.lastIndex=0,--n;return e}var oe={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function o(e){return"string"==typeof e?oe[e]||oe[e.toLowerCase()]:void 0}function ue(e){var t,n,s={};for(n in e)c(e,n)&&(t=o(n))&&(s[t]=e[n]);return s}var le={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var de=/\d/,t=/\d\d/,he=/\d{3}/,ce=/\d{4}/,fe=/[+-]?\d{6}/,n=/\d\d?/,me=/\d\d\d\d?/,_e=/\d\d\d\d\d\d?/,ye=/\d{1,3}/,ge=/\d{1,4}/,we=/[+-]?\d{1,6}/,pe=/\d+/,ke=/[+-]?\d+/,Me=/Z|[+-]\d\d:?\d\d/gi,ve=/Z|[+-]\d\d(?::?\d\d)?/gi,i=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,u=/^[1-9]\d?/,d=/^([1-9]\d|\d)/;function h(e,n,s){Ye[e]=a(n)?n:function(e,t){return e&&s?s:n}}function De(e,t){return c(Ye,e)?Ye[e](t._strict,t._locale):new RegExp(f(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function f(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function m(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function M(e){var e=+e,t=0;return t=0!=e&&isFinite(e)?m(e):t}var Ye={},Se={};function v(e,n){var t,s,i=n;for("string"==typeof e&&(e=[e]),w(n)&&(i=function(e,t){t[n]=M(e)}),s=e.length,t=0;t<s;t++)Se[e[t]]=i}function Oe(e,i){v(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}function be(e){return e%4==0&&e%100!=0||e%400==0}var D=0,Y=1,S=2,O=3,b=4,T=5,Te=6,xe=7,Ne=8;function We(e){return be(e)?366:365}s("Y",0,0,function(){var e=this.year();return e<=9999?r(e,4):"+"+e}),s(0,["YY",2],0,function(){return this.year()%100}),s(0,["YYYY",4],0,"year"),s(0,["YYYYY",5],0,"year"),s(0,["YYYYYY",6,!0],0,"year"),h("Y",ke),h("YY",n,t),h("YYYY",ge,ce),h("YYYYY",we,fe),h("YYYYYY",we,fe),v(["YYYYY","YYYYYY"],D),v("YYYY",function(e,t){t[D]=2===e.length?_.parseTwoDigitYear(e):M(e)}),v("YY",function(e,t){t[D]=_.parseTwoDigitYear(e)}),v("Y",function(e,t){t[D]=parseInt(e,10)}),_.parseTwoDigitYear=function(e){return M(e)+(68<M(e)?1900:2e3)};var x,Pe=Re("FullYear",!0);function Re(t,n){return function(e){return null!=e?(Ue(this,t,e),_.updateOffset(this,n),this):Ce(this,t)}}function Ce(e,t){if(!e.isValid())return NaN;var n=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return s?n.getUTCSeconds():n.getSeconds();case"Minutes":return s?n.getUTCMinutes():n.getMinutes();case"Hours":return s?n.getUTCHours():n.getHours();case"Date":return s?n.getUTCDate():n.getDate();case"Day":return s?n.getUTCDay():n.getDay();case"Month":return s?n.getUTCMonth():n.getMonth();case"FullYear":return s?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ue(e,t,n){var s,i,r;if(e.isValid()&&!isNaN(n)){switch(s=e._d,i=e._isUTC,t){case"Milliseconds":return i?s.setUTCMilliseconds(n):s.setMilliseconds(n);case"Seconds":return i?s.setUTCSeconds(n):s.setSeconds(n);case"Minutes":return i?s.setUTCMinutes(n):s.setMinutes(n);case"Hours":return i?s.setUTCHours(n):s.setHours(n);case"Date":return i?s.setUTCDate(n):s.setDate(n);case"FullYear":break;default:return}t=n,r=e.month(),e=29!==(e=e.date())||1!==r||be(t)?e:28,i?s.setUTCFullYear(t,r,e):s.setFullYear(t,r,e)}}function He(e,t){var n;return isNaN(e)||isNaN(t)?NaN:(n=(t%(n=12)+n)%n,e+=(t-n)/12,1==n?be(e)?29:28:31-n%7%2)}x=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},s("M",["MM",2],"Mo",function(){return this.month()+1}),s("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),s("MMMM",0,0,function(e){return this.localeData().months(this,e)}),h("M",n,u),h("MM",n,t),h("MMM",function(e,t){return t.monthsShortRegex(e)}),h("MMMM",function(e,t){return t.monthsRegex(e)}),v(["M","MM"],function(e,t){t[Y]=M(e)-1}),v(["MMM","MMMM"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[Y]=s:p(n).invalidMonth=e});var Fe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Le="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ve=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ge=i,Ee=i;function Ae(e,t){if(e.isValid()){if("string"==typeof t)if(/^\d+$/.test(t))t=M(t);else if(!w(t=e.localeData().monthsParse(t)))return;var n=(n=e.date())<29?n:Math.min(n,He(e.year(),t));e._isUTC?e._d.setUTCMonth(t,n):e._d.setMonth(t,n)}}function Ie(e){return null!=e?(Ae(this,e),_.updateOffset(this,!0),this):Ce(this,"Month")}function je(){function e(e,t){return t.length-e.length}for(var t,n,s=[],i=[],r=[],a=0;a<12;a++)n=l([2e3,a]),t=f(this.monthsShort(n,"")),n=f(this.months(n,"")),s.push(t),i.push(n),r.push(n),r.push(t);s.sort(e),i.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ze(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}function ze(e){var t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,t)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function qe(e,t,n){n=7+t-n;return n-(7+ze(e,0,n).getUTCDay()-t)%7-1}function $e(e,t,n,s,i){var r,t=1+7*(t-1)+(7+n-s)%7+qe(e,s,i),n=t<=0?We(r=e-1)+t:t>We(e)?(r=e+1,t-We(e)):(r=e,t);return{year:r,dayOfYear:n}}function Be(e,t,n){var s,i,r=qe(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+N(i=e.year()-1,t,n):r>N(e.year(),t,n)?(s=r-N(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function N(e,t,n){var s=qe(e,t,n),t=qe(e+1,t,n);return(We(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),h("w",n,u),h("ww",n,t),h("W",n,u),h("WW",n,t),Oe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=M(e)});function Je(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),h("d",n),h("e",n),h("E",n),h("dd",function(e,t){return t.weekdaysMinRegex(e)}),h("ddd",function(e,t){return t.weekdaysShortRegex(e)}),h("dddd",function(e,t){return t.weekdaysRegex(e)}),Oe(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:p(n).invalidWeekday=e}),Oe(["d","e","E"],function(e,t,n,s){t[s]=M(e)});var Qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),et=i,tt=i,nt=i;function st(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=f(this.weekdaysMin(s,"")),n=f(this.weekdaysShort(s,"")),s=f(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function it(){return this.hours()%12||12}function rt(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function at(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,it),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),rt("a",!0),rt("A",!1),h("a",at),h("A",at),h("H",n,d),h("h",n,u),h("k",n,u),h("HH",n,t),h("hh",n,t),h("kk",n,t),h("hmm",me),h("hmmss",_e),h("Hmm",me),h("Hmmss",_e),v(["H","HH"],O),v(["k","kk"],function(e,t,n){e=M(e);t[O]=24===e?0:e}),v(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),v(["h","hh"],function(e,t,n){t[O]=M(e),p(n).bigHour=!0}),v("hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s)),p(n).bigHour=!0}),v("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i)),p(n).bigHour=!0}),v("Hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s))}),v("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i))});i=Re("Hours",!0);var ot,ut={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Fe,monthsShort:Le,week:{dow:0,doy:6},weekdays:Qe,weekdaysMin:Ke,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},W={},lt={};function dt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=dt(e[r]).split("-")).length,n=(n=dt(e[r+1]))?n.split("-"):null;0<t;){if(s=ct(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return ot}function ct(t){var e,n;if(void 0===W[t]&&"undefined"!=typeof module&&module&&module.exports&&(n=t)&&n.match("^[^/\\\\]*$"))try{e=ot._abbr,require("./locale/"+t),ft(e)}catch(e){W[t]=null}return W[t]}function ft(e,t){return e&&((t=g(t)?P(e):mt(e,t))?ot=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ot._abbr}function mt(e,t){if(null===t)return delete W[e],null;var n,s=ut;if(t.abbr=e,null!=W[e])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=W[e]._config;else if(null!=t.parentLocale)if(null!=W[t.parentLocale])s=W[t.parentLocale]._config;else{if(null==(n=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return W[e]=new K(X(s,t)),lt[e]&&lt[e].forEach(function(e){mt(e.name,e.config)}),ft(e),W[e]}function P(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return ot;if(!y(e)){if(t=ct(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===p(e).overflow&&(t=t[Y]<0||11<t[Y]?Y:t[S]<1||t[S]>He(t[D],t[Y])?S:t[O]<0||24<t[O]||24===t[O]&&(0!==t[b]||0!==t[T]||0!==t[Te])?O:t[b]<0||59<t[b]?b:t[T]<0||59<t[T]?T:t[Te]<0||999<t[Te]?Te:-1,p(e)._overflowDayOfYear&&(t<D||S<t)&&(t=S),p(e)._overflowWeeks&&-1===t&&(t=xe),p(e)._overflowWeekday&&-1===t&&(t=Ne),p(e).overflow=t),e}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mt=/^\/?Date\((-?\d+)/i,vt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yt(e){var t,n,s,i,r,a,o=e._i,u=yt.exec(o)||gt.exec(o),o=pt.length,l=kt.length;if(u){for(p(e).iso=!0,t=0,n=o;t<n;t++)if(pt[t][1].exec(u[1])){i=pt[t][0],s=!1!==pt[t][2];break}if(null==i)e._isValid=!1;else{if(u[3]){for(t=0,n=l;t<n;t++)if(kt[t][1].exec(u[3])){r=(u[2]||" ")+kt[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),xt(e)}else e._isValid=!1}}else e._isValid=!1}function St(e,t,n,s,i,r){e=[function(e){e=parseInt(e,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(e),Le.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&e.push(parseInt(r,10)),e}function Ot(e){var t,n,s=vt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));s?(t=St(s[4],s[3],s[2],s[5],s[6],s[7]),function(e,t,n){if(!e||Xe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay())return 1;p(n).weekdayMismatch=!0,n._isValid=!1}(s[1],t,e)&&(e._a=t,e._tzm=(t=s[8],n=s[9],s=s[10],t?Dt[t]:n?0:60*(((t=parseInt(s,10))-(n=t%100))/100)+n),e._d=ze.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0)):e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function Tt(e){var t,n,s,i,r,a,o,u,l,d,h,c=[];if(!e._d){for(s=e,i=new Date(_.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[S]&&null==e._a[Y]&&(null!=(i=(s=e)._w).GG||null!=i.W||null!=i.E?(u=1,l=4,r=bt(i.GG,s._a[D],Be(R(),1,4).year),a=bt(i.W,1),((o=bt(i.E,1))<1||7<o)&&(d=!0)):(u=s._locale._week.dow,l=s._locale._week.doy,h=Be(R(),u,l),r=bt(i.gg,s._a[D],h.year),a=bt(i.w,h.week),null!=i.d?((o=i.d)<0||6<o)&&(d=!0):null!=i.e?(o=i.e+u,(i.e<0||6<i.e)&&(d=!0)):o=u),a<1||a>N(r,u,l)?p(s)._overflowWeeks=!0:null!=d?p(s)._overflowWeekday=!0:(h=$e(r,a,o,u,l),s._a[D]=h.year,s._dayOfYear=h.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[D],n[D]),(e._dayOfYear>We(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),d=ze(i,0,e._dayOfYear),e._a[Y]=d.getUTCMonth(),e._a[S]=d.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[O]&&0===e._a[b]&&0===e._a[T]&&0===e._a[Te]&&(e._nextDay=!0,e._a[O]=0),e._d=(e._useUTC?ze:Ze).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[O]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(p(e).weekdayMismatch=!0)}}function xt(e){if(e._f===_.ISO_8601)Yt(e);else if(e._f===_.RFC_2822)Ot(e);else{e._a=[],p(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],d=l.length,h=0;h<d;h++)n=l[h],(t=(a.match(De(n,e))||[])[0])&&(0<(s=a.substr(0,a.indexOf(t))).length&&p(e).unusedInput.push(s),a=a.slice(a.indexOf(t)+t.length),u+=t.length),ie[n]?(t?p(e).empty=!1:p(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&c(Se,s)&&Se[s](i,r._a,r,s)):e._strict&&!t&&p(e).unusedTokens.push(n);p(e).charsLeftOver=o-u,0<a.length&&p(e).unusedInput.push(a),e._a[O]<=12&&!0===p(e).bigHour&&0<e._a[O]&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[O]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((e=e.isPM(n))&&t<12&&(t+=12),t=e||12!==t?t:0):t}(e._locale,e._a[O],e._meridiem),null!==(o=p(e).era)&&(e._a[D]=e._locale.erasConvertYear(o,e._a[D])),Tt(e),_t(e)}}function Nt(e){var t,n,s,i=e._i,r=e._f;if(e._locale=e._locale||P(e._l),null===i||void 0===r&&""===i)return I({nullInput:!0});if("string"==typeof i&&(e._i=i=e._locale.preparse(i)),k(i))return new $(_t(i));if(V(i))e._d=i;else if(y(r)){var a,o,u,l,d,h,c=e,f=!1,m=c._f.length;if(0===m)p(c).invalidFormat=!0,c._d=new Date(NaN);else{for(l=0;l<m;l++)d=0,h=!1,a=q({},c),null!=c._useUTC&&(a._useUTC=c._useUTC),a._f=c._f[l],xt(a),A(a)&&(h=!0),d=(d+=p(a).charsLeftOver)+10*p(a).unusedTokens.length,p(a).score=d,f?d<u&&(u=d,o=a):(null==u||d<u||h)&&(u=d,o=a,h)&&(f=!0);E(c,o||a)}}else if(r)xt(e);else if(g(r=(i=e)._i))i._d=new Date(_.now());else V(r)?i._d=new Date(r.valueOf()):"string"==typeof r?(n=i,null!==(t=Mt.exec(n._i))?n._d=new Date(+t[1]):(Yt(n),!1===n._isValid&&(delete n._isValid,Ot(n),!1===n._isValid)&&(delete n._isValid,n._strict?n._isValid=!1:_.createFromInputFallback(n)))):y(r)?(i._a=G(r.slice(0),function(e){return parseInt(e,10)}),Tt(i)):F(r)?(t=i)._d||(s=void 0===(n=ue(t._i)).day?n.date:n.day,t._a=G([n.year,n.month,s,n.hour,n.minute,n.second,n.millisecond],function(e){return e&&parseInt(e,10)}),Tt(t)):w(r)?i._d=new Date(r):_.createFromInputFallback(i);return A(e)||(e._d=null),e}function Wt(e,t,n,s,i){var r={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(F(e)&&L(e)||y(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(i=new $(_t(Nt(i=r))))._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function R(e,t,n,s){return Wt(e,t,n,s,!1)}_.createFromInputFallback=e("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),_.ISO_8601=function(){},_.RFC_2822=function(){};me=e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:I()}),_e=e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:I()});function Pt(e,t){var n,s;if(!(t=1===t.length&&y(t[0])?t[0]:t).length)return R();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Rt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var e=ue(e),t=e.year||0,n=e.quarter||0,s=e.month||0,i=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,o=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Rt.length;for(t in e)if(c(e,t)&&(-1===x.call(Rt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Rt[n]]){if(s)return!1;parseFloat(e[Rt[n]])!==M(e[Rt[n]])&&(s=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*o+1e3*a*60*60,this._days=+r+7*i,this._months=+s+3*n+12*t,this._data={},this._locale=P(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){s(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+r(~~(e/60),2)+n+r(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),h("Z",ve),h("ZZ",ve),v(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(ve,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var t=(t||"").match(e);return null===t?null:0===(t=60*(e=((t[t.length-1]||[])+"").match(Lt)||["-",0,0])[1]+M(e[2]))?0:"+"===e[0]?t:-t}function Gt(e,t){var n;return t._isUTC?(t=t.clone(),n=(k(e)||V(e)?e:R(e)).valueOf()-t.valueOf(),t._d.setTime(t._d.valueOf()+n),_.updateOffset(t,!1),t):R(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&this._isUTC&&0===this._offset}_.updateOffset=function(){};var It=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function C(e,t){var n,s=e;return Ut(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:w(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(t=It.exec(e))?(n="-"===t[1]?-1:1,s={y:0,d:M(t[S])*n,h:M(t[O])*n,m:M(t[b])*n,s:M(t[T])*n,ms:M(Ht(1e3*t[Te]))*n}):(t=jt.exec(e))?(n="-"===t[1]?-1:1,s={y:Zt(t[2],n),M:Zt(t[3],n),w:Zt(t[4],n),d:Zt(t[5],n),h:Zt(t[6],n),m:Zt(t[7],n),s:Zt(t[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(t=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(R(s.from),R(s.to)),(s={}).ms=t.milliseconds,s.M=t.months),n=new Ct(s),Ut(e)&&c(e,"_locale")&&(n._locale=e._locale),Ut(e)&&c(e,"_isValid")&&(n._isValid=e._isValid),n}function Zt(e,t){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function qt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Q(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),$t(this,C(e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),t=Ht(t._months);e.isValid()&&(s=null==s||s,t&&Ae(e,Ce(e,"Month")+t*n),r&&Ue(e,"Date",Ce(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s)&&_.updateOffset(e,r||t)}C.fn=Ct.prototype,C.invalid=function(){return C(NaN)};Fe=qt(1,"add"),Qe=qt(-1,"subtract");function Bt(e){return"string"==typeof e||e instanceof String}function Jt(e){return k(e)||V(e)||Bt(e)||w(e)||function(t){var e=y(t),n=!1;e&&(n=0===t.filter(function(e){return!w(e)&&Bt(t)}).length);return e&&n}(e)||function(e){var t,n,s=F(e)&&!L(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a=r.length;for(t=0;t<a;t+=1)n=r[t],i=i||c(e,n);return s&&i}(e)||null==e}function Qt(e,t){var n,s;return e.date()<t.date()?-Qt(t,e):-((n=12*(t.year()-e.year())+(t.month()-e.month()))+(t-(s=e.clone().add(n,"months"))<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s)))||0}function Xt(e){return void 0===e?this._locale._abbr:(null!=(e=P(e))&&(this._locale=e),this)}_.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";Ke=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}var en=126227808e5;function tn(e,t){return(e%t+t)%t}function nn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-en:new Date(e,t,n).valueOf()}function sn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-en:Date.UTC(e,t,n)}function rn(e,t){return t.erasAbbrRegex(e)}function an(){for(var e,t,n,s=[],i=[],r=[],a=[],o=this.eras(),u=0,l=o.length;u<l;++u)e=f(o[u].name),t=f(o[u].abbr),n=f(o[u].narrow),i.push(e),s.push(t),r.push(n),a.push(e),a.push(t),a.push(n);this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function on(e,t){s(0,[e,e.length],0,t)}function un(e,t,n,s,i){var r;return null==e?Be(this,s,i).year:(r=N(e,s,i),function(e,t,n,s,i){e=$e(e,t,n,s,i),t=ze(e.year,0,e.dayOfYear);return this.year(t.getUTCFullYear()),this.month(t.getUTCMonth()),this.date(t.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}s("N",0,0,"eraAbbr"),s("NN",0,0,"eraAbbr"),s("NNN",0,0,"eraAbbr"),s("NNNN",0,0,"eraName"),s("NNNNN",0,0,"eraNarrow"),s("y",["y",1],"yo","eraYear"),s("y",["yy",2],0,"eraYear"),s("y",["yyy",3],0,"eraYear"),s("y",["yyyy",4],0,"eraYear"),h("N",rn),h("NN",rn),h("NNN",rn),h("NNNN",function(e,t){return t.erasNameRegex(e)}),h("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),v(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){s=n._locale.erasParse(e,s,n._strict);s?p(n).era=s:p(n).invalidEra=e}),h("y",pe),h("yy",pe),h("yyy",pe),h("yyyy",pe),h("yo",function(e,t){return t._eraYearOrdinalRegex||pe}),v(["y","yy","yyy","yyyy"],D),v(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[D]=n._locale.eraYearOrdinalParse(e,i):t[D]=parseInt(e,10)}),s(0,["gg",2],0,function(){return this.weekYear()%100}),s(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),h("G",ke),h("g",ke),h("GG",n,t),h("gg",n,t),h("GGGG",ge,ce),h("gggg",ge,ce),h("GGGGG",we,fe),h("ggggg",we,fe),Oe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=M(e)}),Oe(["gg","GG"],function(e,t,n,s){t[s]=_.parseTwoDigitYear(e)}),s("Q",0,"Qo","quarter"),h("Q",de),v("Q",function(e,t){t[Y]=3*(M(e)-1)}),s("D",["DD",2],"Do","date"),h("D",n,u),h("DD",n,t),h("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),v(["D","DD"],S),v("Do",function(e,t){t[S]=M(e.match(n)[0])});ge=Re("Date",!0);s("DDD",["DDDD",3],"DDDo","dayOfYear"),h("DDD",ye),h("DDDD",he),v(["DDD","DDDD"],function(e,t,n){n._dayOfYear=M(e)}),s("m",["mm",2],0,"minute"),h("m",n,d),h("mm",n,t),v(["m","mm"],b);var ln,ce=Re("Minutes",!1),we=(s("s",["ss",2],0,"second"),h("s",n,d),h("ss",n,t),v(["s","ss"],T),Re("Seconds",!1));for(s("S",0,0,function(){return~~(this.millisecond()/100)}),s(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),s(0,["SSS",3],0,"millisecond"),s(0,["SSSS",4],0,function(){return 10*this.millisecond()}),s(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),s(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),s(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),s(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),s(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),h("S",ye,de),h("SS",ye,t),h("SSS",ye,he),ln="SSSS";ln.length<=9;ln+="S")h(ln,pe);function dn(e,t){t[Te]=M(1e3*("0."+e))}for(ln="S";ln.length<=9;ln+="S")v(ln,dn);fe=Re("Milliseconds",!1),s("z",0,0,"zoneAbbr"),s("zz",0,0,"zoneName");u=$.prototype;function hn(e){return e}u.add=Fe,u.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=F(e)&&!L(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||c(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var e=e||R(),n=Gt(e,this).startOf("day"),n=_.calendarFormat(this,n)||"sameElse",t=t&&(a(t[n])?t[n].call(this,e):t[n]);return this.format(t||this.localeData().calendar(n,this,R(e)))},u.clone=function(){return new $(this)},u.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=o(t)){case"year":r=Qt(this,s)/12;break;case"month":r=Qt(this,s);break;case"quarter":r=Qt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:m(r)},u.endOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1;break}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.format=function(e){return e=e||(this.isUtc()?_.defaultFormatUtc:_.defaultFormat),e=re(this,e),this.localeData().postformat(e)},u.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.fromNow=function(e){return this.from(R(),e)},u.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.toNow=function(e){return this.to(R(),e)},u.get=function(e){return a(this[e=o(e)])?this[e]():this},u.invalidAt=function(){return p(this).overflow},u.isAfter=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},u.isBefore=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},u.isBetween=function(e,t,n,s){return e=k(e)?e:R(e),t=k(t)?t:R(t),!!(this.isValid()&&e.isValid()&&t.isValid())&&("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},u.isSame=function(e,t){var e=k(e)?e:R(e);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},u.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},u.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},u.isValid=function(){return A(this)},u.lang=Ke,u.locale=Xt,u.localeData=Kt,u.max=_e,u.min=me,u.parsingFlags=function(){return E({},p(this))},u.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:le[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=ue(e)),s=n.length,i=0;i<s;i++)this[n[i].unit](e[n[i].unit]);else if(a(this[e=o(e)]))return this[e](t);return this},u.startOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=tn(t,6e4);break;case"second":t=this._d.valueOf(),t-=tn(t,1e3);break}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.subtract=Qe,u.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},u.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},u.toDate=function(){return new Date(this.valueOf())},u.toISOString=function(e){var t;return this.isValid()?(t=(e=!0!==e)?this.clone().utc():this).year()<0||9999<t.year()?re(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):a(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",re(t,"Z")):re(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ"):null},u.inspect=function(){var e,t,n;return this.isValid()?(t="moment",e="",this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z"),t="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+n+"-MM-DD[T]HH:mm:ss.SSS"+(e+'[")]'))):"moment.invalid(/* "+this._i+" */)"},"undefined"!=typeof Symbol&&null!=Symbol.for&&(u[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),u.toJSON=function(){return this.isValid()?this.toISOString():null},u.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},u.unix=function(){return Math.floor(this.valueOf()/1e3)},u.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},u.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},u.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},u.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},u.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},u.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-_(n[s].since).year())*e+n[s].offset;return this.year()},u.year=Pe,u.isLeapYear=function(){return be(this.year())},u.weekYear=function(e){return un.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},u.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},u.quarter=u.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},u.month=Ie,u.daysInMonth=function(){return He(this.year(),this.month())},u.week=u.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},u.isoWeek=u.isoWeeks=function(e){var t=Be(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},u.weeksInYear=function(){var e=this.localeData()._week;return N(this.year(),e.dow,e.doy)},u.weeksInWeekYear=function(){var e=this.localeData()._week;return N(this.weekYear(),e.dow,e.doy)},u.isoWeeksInYear=function(){return N(this.year(),1,4)},u.isoWeeksInISOWeekYear=function(){return N(this.isoWeekYear(),1,4)},u.date=ge,u.day=u.days=function(e){var t,n,s;return this.isValid()?(t=Ce(this,"Day"),null!=e?(n=e,s=this.localeData(),e="string"!=typeof n?n:isNaN(n)?"number"==typeof(n=s.weekdaysParse(n))?n:null:parseInt(n,10),this.add(e-t,"d")):t):null!=e?this:NaN},u.weekday=function(e){var t;return this.isValid()?(t=(this.day()+7-this.localeData()._week.dow)%7,null==e?t:this.add(e-t,"d")):null!=e?this:NaN},u.isoWeekday=function(e){var t,n;return this.isValid()?null!=e?(t=e,n=this.localeData(),n="string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t,this.day(this.day()%7?n:n-7)):this.day()||7:null!=e?this:NaN},u.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},u.hour=u.hours=i,u.minute=u.minutes=ce,u.second=u.seconds=we,u.millisecond=u.milliseconds=fe,u.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(ve,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?$t(this,C(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_.updateOffset(this,!0),this._changeInProgress=null)),this},u.utc=function(e){return this.utcOffset(0,e)},u.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e)&&this.subtract(Et(this),"m"),this},u.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(Me,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},u.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?R(e).utcOffset():0,(this.utcOffset()-e)%60==0)},u.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},u.isLocal=function(){return!!this.isValid()&&!this._isUTC},u.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},u.isUtc=At,u.isUTC=At,u.zoneAbbr=function(){return this._isUTC?"UTC":""},u.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},u.dates=e("dates accessor is deprecated. Use date instead.",ge),u.months=e("months accessor is deprecated. Use month instead",Ie),u.years=e("years accessor is deprecated. Use year instead",Pe),u.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),u.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){var e,t;return g(this._isDSTShifted)&&(q(e={},this),(e=Nt(e))._a?(t=(e._isUTC?l:R)(e._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&M(e[a])!==M(t[a]))&&r++;return r+i}(e._a,t.toArray())):this._isDSTShifted=!1),this._isDSTShifted});d=K.prototype;function cn(e,t,n,s){var i=P(),s=l().set(s,t);return i[n](s,e)}function fn(e,t,n){if(w(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=cn(e,i,n,"month");return s}function mn(e,t,n,s){t=("boolean"==typeof e?w(t)&&(n=t,t=void 0):(t=e,e=!1,w(n=t)&&(n=t,t=void 0)),t||"");var i,r=P(),a=e?r._week.dow:0,o=[];if(null!=n)return cn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}d.calendar=function(e,t,n){return a(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},d.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(te).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},d.invalidDate=function(){return this._invalidDate},d.ordinal=function(e){return this._ordinal.replace("%d",e)},d.preparse=hn,d.postformat=hn,d.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return a(i)?i(e,t,n,s):i.replace(/%d/i,e)},d.pastFuture=function(e,t){return a(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},d.set=function(e){var t,n;for(n in e)c(e,n)&&(a(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},d.eras=function(e,t){for(var n,s=this._eras||P("en")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case"string":n=_(s[i].since).startOf("day"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=_(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf();break}}return s},d.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s];break}else if(0<=[r,a,o].indexOf(e))return u[s]},d.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?_(e.since).year():_(e.since).year()+(t-e.offset)*n},d.erasAbbrRegex=function(e){return c(this,"_erasAbbrRegex")||an.call(this),e?this._erasAbbrRegex:this._erasRegex},d.erasNameRegex=function(e){return c(this,"_erasNameRegex")||an.call(this),e?this._erasNameRegex:this._erasRegex},d.erasNarrowRegex=function(e){return c(this,"_erasNarrowRegex")||an.call(this),e?this._erasNarrowRegex:this._erasRegex},d.months=function(e,t){return e?(y(this._months)?this._months:this._months[(this._months.isFormat||Ve).test(t)?"format":"standalone"])[e.month()]:y(this._months)?this._months:this._months.standalone},d.monthsShort=function(e,t){return e?(y(this._monthsShort)?this._monthsShort:this._monthsShort[Ve.test(t)?"format":"standalone"])[e.month()]:y(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},d.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=x.call(this._shortMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))?i:null:"MMM"===t?-1!==(i=x.call(this._shortMonthsParse,e))||-1!==(i=x.call(this._longMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))||-1!==(i=x.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},d.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Ee),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},d.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Ge),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},d.week=function(e){return Be(e,this._week.dow,this._week.doy).week},d.firstDayOfYear=function(){return this._week.doy},d.firstDayOfWeek=function(){return this._week.dow},d.weekdays=function(e,t){return t=y(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"],!0===e?Je(t,this._week.dow):e?t[e.day()]:t},d.weekdaysMin=function(e){return!0===e?Je(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},d.weekdaysShort=function(e){return!0===e?Je(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},d.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=x.call(this._weekdaysParse,e))?i:null:"ddd"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:"dddd"===t?-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:"ddd"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},d.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=et),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},d.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=tt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},d.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},d.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},d.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ft("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===M(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),_.lang=e("moment.lang is deprecated. Use moment.locale instead.",ft),_.langData=e("moment.langData is deprecated. Use moment.localeData instead.",P);var _n=Math.abs;function yn(e,t,n,s){t=C(t,n);return e._milliseconds+=s*t._milliseconds,e._days+=s*t._days,e._months+=s*t._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function pn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}de=kn("ms"),t=kn("s"),ye=kn("m"),he=kn("h"),Fe=kn("d"),_e=kn("w"),me=kn("M"),Qe=kn("Q"),i=kn("y"),ce=de;function Mn(e){return function(){return this.isValid()?this._data[e]:NaN}}var we=Mn("milliseconds"),fe=Mn("seconds"),ge=Mn("minutes"),Pe=Mn("hours"),d=Mn("days"),vn=Mn("months"),Dn=Mn("years");var Yn=Math.round,Sn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function On(e,t,n,s){var i=C(e).abs(),r=Yn(i.as("s")),a=Yn(i.as("m")),o=Yn(i.as("h")),u=Yn(i.as("d")),l=Yn(i.as("M")),d=Yn(i.as("w")),i=Yn(i.as("y")),r=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||(a<=1?["m"]:a<n.m&&["mm",a])||(o<=1?["h"]:o<n.h&&["hh",o])||(u<=1?["d"]:u<n.d&&["dd",u]);return(r=(r=null!=n.w?r||(d<=1?["w"]:d<n.w&&["ww",d]):r)||(l<=1?["M"]:l<n.M&&["MM",l])||(i<=1?["y"]:["yy",i]))[2]=t,r[3]=0<+e,r[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,r)}var bn=Math.abs;function Tn(e){return(0<e)-(e<0)||+e}function xn(){var e,t,n,s,i,r,a,o,u,l,d;return this.isValid()?(e=bn(this._milliseconds)/1e3,t=bn(this._days),n=bn(this._months),(o=this.asSeconds())?(s=m(e/60),i=m(s/60),e%=60,s%=60,r=m(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",u=Tn(this._months)!==Tn(o)?"-":"",l=Tn(this._days)!==Tn(o)?"-":"",d=Tn(this._milliseconds)!==Tn(o)?"-":"",(o<0?"-":"")+"P"+(r?u+r+"Y":"")+(n?u+n+"M":"")+(t?l+t+"D":"")+(i||s||e?"T":"")+(i?d+i+"H":"")+(s?d+s+"M":"")+(e?d+a+"S":"")):"P0D"):this.localeData().invalidDate()}var U=Ct.prototype;return U.isValid=function(){return this._isValid},U.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},U.add=function(e,t){return yn(this,e,t,1)},U.subtract=function(e,t){return yn(this,e,t,-1)},U.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=o(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+wn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(pn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},U.asMilliseconds=de,U.asSeconds=t,U.asMinutes=ye,U.asHours=he,U.asDays=Fe,U.asWeeks=_e,U.asMonths=me,U.asQuarters=Qe,U.asYears=i,U.valueOf=ce,U._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*gn(pn(n)+t),n=t=0),s.milliseconds=e%1e3,e=m(e/1e3),s.seconds=e%60,e=m(e/60),s.minutes=e%60,e=m(e/60),s.hours=e%24,t+=m(e/24),n+=e=m(wn(t)),t-=gn(pn(e)),e=m(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},U.clone=function(){return C(this)},U.get=function(e){return e=o(e),this.isValid()?this[e+"s"]():NaN},U.milliseconds=we,U.seconds=fe,U.minutes=ge,U.hours=Pe,U.days=d,U.weeks=function(){return m(this.days()/7)},U.months=vn,U.years=Dn,U.humanize=function(e,t){var n,s;return this.isValid()?(n=!1,s=Sn,"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof t&&(s=Object.assign({},Sn,t),null!=t.s)&&null==t.ss&&(s.ss=t.s-1),e=this.localeData(),t=On(this,!n,s,e),n&&(t=e.pastFuture(+this,t)),e.postformat(t)):this.localeData().invalidDate()},U.toISOString=xn,U.toString=xn,U.toJSON=xn,U.locale=Xt,U.localeData=Kt,U.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",xn),U.lang=Ke,s("X",0,0,"unix"),s("x",0,0,"valueOf"),h("x",ke),h("X",/[+-]?\d+(\.\d{1,3})?/),v("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),v("x",function(e,t,n){n._d=new Date(M(e))}),_.version="2.30.1",H=R,_.fn=u,_.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},_.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},_.now=function(){return Date.now?Date.now():+new Date},_.utc=l,_.unix=function(e){return R(1e3*e)},_.months=function(e,t){return fn(e,t,"months")},_.isDate=V,_.locale=ft,_.invalid=I,_.duration=C,_.isMoment=k,_.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},_.parseZone=function(){return R.apply(null,arguments).parseZone()},_.localeData=P,_.isDuration=Ut,_.monthsShort=function(e,t){return fn(e,t,"monthsShort")},_.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},_.defineLocale=mt,_.updateLocale=function(e,t){var n,s;return null!=t?(s=ut,null!=W[e]&&null!=W[e].parentLocale?W[e].set(X(W[e]._config,t)):(t=X(s=null!=(n=ct(e))?n._config:s,t),null==n&&(t.abbr=e),(s=new K(t)).parentLocale=W[e],W[e]=s),ft(e)):null!=W[e]&&(null!=W[e].parentLocale?(W[e]=W[e].parentLocale,e===ft()&&ft(e)):null!=W[e]&&delete W[e]),W[e]},_.locales=function(){return ee(W)},_.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},_.normalizeUnits=o,_.relativeTimeRounding=function(e){return void 0===e?Yn:"function"==typeof e&&(Yn=e,!0)},_.relativeTimeThreshold=function(e,t){return void 0!==Sn[e]&&(void 0===t?Sn[e]:(Sn[e]=t,"s"===e&&(Sn.ss=t-1),!0))},_.calendarFormat=function(e,t){return(e=e.diff(t,"days",!0))<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},_.prototype=u,_.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},_});
//# sourceMappingURL=moment.min.js.map;
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):e.moment=a()}(this,function(){"use strict";var E;function c(){return E.apply(null,arguments)}function F(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function z(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e,a){return Object.prototype.hasOwnProperty.call(e,a)}function N(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var a in e)if(l(e,a))return;return 1}function L(e){return void 0===e}function J(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function R(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function C(e,a){for(var t=[],s=e.length,n=0;n<s;++n)t.push(a(e[n],n));return t}function I(e,a){for(var t in a)l(a,t)&&(e[t]=a[t]);return l(a,"toString")&&(e.toString=a.toString),l(a,"valueOf")&&(e.valueOf=a.valueOf),e}function U(e,a,t,s){return Na(e,a,t,s,!0).utc()}function Y(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function G(e){var a,t,s=e._d&&!isNaN(e._d.getTime());return s&&(a=Y(e),t=q.call(a.parsedDateParts,function(e){return null!=e}),s=a.overflow<0&&!a.empty&&!a.invalidEra&&!a.invalidMonth&&!a.invalidWeekday&&!a.weekdayMismatch&&!a.nullInput&&!a.invalidFormat&&!a.userInvalidated&&(!a.meridiem||a.meridiem&&t),e._strict)&&(s=s&&0===a.charsLeftOver&&0===a.unusedTokens.length&&void 0===a.bigHour),null!=Object.isFrozen&&Object.isFrozen(e)?s:(e._isValid=s,e._isValid)}function V(e){var a=U(NaN);return null!=e?I(Y(a),e):Y(a).userInvalidated=!0,a}var q=Array.prototype.some||function(e){for(var a=Object(this),t=a.length>>>0,s=0;s<t;s++)if(s in a&&e.call(this,a[s],s,a))return!0;return!1},B=c.momentProperties=[],K=!1;function Z(e,a){var t,s,n,r=B.length;if(L(a._isAMomentObject)||(e._isAMomentObject=a._isAMomentObject),L(a._i)||(e._i=a._i),L(a._f)||(e._f=a._f),L(a._l)||(e._l=a._l),L(a._strict)||(e._strict=a._strict),L(a._tzm)||(e._tzm=a._tzm),L(a._isUTC)||(e._isUTC=a._isUTC),L(a._offset)||(e._offset=a._offset),L(a._pf)||(e._pf=Y(a)),L(a._locale)||(e._locale=a._locale),0<r)for(t=0;t<r;t++)L(n=a[s=B[t]])||(e[s]=n);return e}function $(e){Z(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===K&&(K=!0,c.updateOffset(this),K=!1)}function Q(e){return e instanceof $||null!=e&&null!=e._isAMomentObject}function X(e){!1===c.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function e(r,d){var _=!0;return I(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,r),_){for(var e,a,t=[],s=arguments.length,n=0;n<s;n++){if(e="","object"==typeof arguments[n]){for(a in e+="\n["+n+"] ",arguments[0])l(arguments[0],a)&&(e+=a+": "+arguments[0][a]+", ");e=e.slice(0,-2)}else e=arguments[n];t.push(e)}X(r+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),_=!1}return d.apply(this,arguments)},d)}var ee={};function ae(e,a){null!=c.deprecationHandler&&c.deprecationHandler(e,a),ee[e]||(X(a),ee[e]=!0)}function te(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function se(e,a){var t,s=I({},e);for(t in a)l(a,t)&&(z(e[t])&&z(a[t])?(s[t]={},I(s[t],e[t]),I(s[t],a[t])):null!=a[t]?s[t]=a[t]:delete s[t]);for(t in e)l(e,t)&&!l(a,t)&&z(e[t])&&(s[t]=I({},s[t]));return s}function ne(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null;var re=Object.keys||function(e){var a,t=[];for(a in e)l(e,a)&&t.push(a);return t};function de(e,a,t){var s=""+Math.abs(e);return(0<=e?t?"+":"":"-")+Math.pow(10,Math.max(0,a-s.length)).toString().substr(1)+s}var _e=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ie=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,oe={},me={};function s(e,a,t,s){var n="string"==typeof s?function(){return this[s]()}:s;e&&(me[e]=n),a&&(me[a[0]]=function(){return de(n.apply(this,arguments),a[1],a[2])}),t&&(me[t]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function ue(e,a){return e.isValid()?(a=le(a,e.localeData()),oe[a]=oe[a]||function(s){for(var e,n=s.match(_e),a=0,r=n.length;a<r;a++)me[n[a]]?n[a]=me[n[a]]:n[a]=(e=n[a]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var a="",t=0;t<r;t++)a+=te(n[t])?n[t].call(e,s):n[t];return a}}(a),oe[a](e)):e.localeData().invalidDate()}function le(e,a){var t=5;function s(e){return a.longDateFormat(e)||e}for(ie.lastIndex=0;0<=t&&ie.test(e);)e=e.replace(ie,s),ie.lastIndex=0,--t;return e}var Me={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function d(e){return"string"==typeof e?Me[e]||Me[e.toLowerCase()]:void 0}function he(e){var a,t,s={};for(t in e)l(e,t)&&(a=d(t))&&(s[a]=e[t]);return s}var ce={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var Le=/\d/,a=/\d\d/,Ye=/\d{3}/,t=/\d{4}/,n=/[+-]?\d{6}/,r=/\d\d?/,ye=/\d\d\d\d?/,_=/\d\d\d\d\d\d?/,fe=/\d{1,3}/,i=/\d{1,4}/,o=/[+-]?\d{1,6}/,ke=/\d+/,pe=/[+-]?\d+/,De=/Z|[+-]\d\d:?\d\d/gi,Te=/Z|[+-]\d\d(?::?\d\d)?/gi,m=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,u=/^[1-9]\d?/,M=/^([1-9]\d|\d)/;function h(e,t,s){be[e]=te(t)?t:function(e,a){return e&&s?s:t}}function ge(e,a){return l(be,e)?be[e](a._strict,a._locale):new RegExp(we(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,a,t,s,n){return a||t||s||n})))}function we(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function y(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function f(e){var e=+e,a=0;return a=0!=e&&isFinite(e)?y(e):a}var be={},He={};function k(e,t){var a,s,n=t;for("string"==typeof e&&(e=[e]),J(t)&&(n=function(e,a){a[t]=f(e)}),s=e.length,a=0;a<s;a++)He[e[a]]=n}function Se(e,n){k(e,function(e,a,t,s){t._w=t._w||{},n(e,t._w,t,s)})}function ve(e){return e%4==0&&e%100!=0||e%400==0}var p=0,je=1,xe=2,D=3,Pe=4,Oe=5,We=6,Ae=7,Ee=8;function Fe(e){return ve(e)?366:365}s("Y",0,0,function(){var e=this.year();return e<=9999?de(e,4):"+"+e}),s(0,["YY",2],0,function(){return this.year()%100}),s(0,["YYYY",4],0,"year"),s(0,["YYYYY",5],0,"year"),s(0,["YYYYYY",6,!0],0,"year"),h("Y",pe),h("YY",r,a),h("YYYY",i,t),h("YYYYY",o,n),h("YYYYYY",o,n),k(["YYYYY","YYYYYY"],p),k("YYYY",function(e,a){a[p]=2===e.length?c.parseTwoDigitYear(e):f(e)}),k("YY",function(e,a){a[p]=c.parseTwoDigitYear(e)}),k("Y",function(e,a){a[p]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return f(e)+(68<f(e)?1900:2e3)};var T,ze=Ne("FullYear",!0);function Ne(a,t){return function(e){return null!=e?(Re(this,a,e),c.updateOffset(this,t),this):Je(this,a)}}function Je(e,a){if(!e.isValid())return NaN;var t=e._d,s=e._isUTC;switch(a){case"Milliseconds":return s?t.getUTCMilliseconds():t.getMilliseconds();case"Seconds":return s?t.getUTCSeconds():t.getSeconds();case"Minutes":return s?t.getUTCMinutes():t.getMinutes();case"Hours":return s?t.getUTCHours():t.getHours();case"Date":return s?t.getUTCDate():t.getDate();case"Day":return s?t.getUTCDay():t.getDay();case"Month":return s?t.getUTCMonth():t.getMonth();case"FullYear":return s?t.getUTCFullYear():t.getFullYear();default:return NaN}}function Re(e,a,t){var s,n,r;if(e.isValid()&&!isNaN(t)){switch(s=e._d,n=e._isUTC,a){case"Milliseconds":return n?s.setUTCMilliseconds(t):s.setMilliseconds(t);case"Seconds":return n?s.setUTCSeconds(t):s.setSeconds(t);case"Minutes":return n?s.setUTCMinutes(t):s.setMinutes(t);case"Hours":return n?s.setUTCHours(t):s.setHours(t);case"Date":return n?s.setUTCDate(t):s.setDate(t);case"FullYear":break;default:return}a=t,r=e.month(),e=29!==(e=e.date())||1!==r||ve(a)?e:28,n?s.setUTCFullYear(a,r,e):s.setFullYear(a,r,e)}}function Ce(e,a){var t;return isNaN(e)||isNaN(a)?NaN:(t=(a%(t=12)+t)%t,e+=(a-t)/12,1==t?ve(e)?29:28:31-t%7%2)}T=Array.prototype.indexOf||function(e){for(var a=0;a<this.length;++a)if(this[a]===e)return a;return-1},s("M",["MM",2],"Mo",function(){return this.month()+1}),s("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),s("MMMM",0,0,function(e){return this.localeData().months(this,e)}),h("M",r,u),h("MM",r,a),h("MMM",function(e,a){return a.monthsShortRegex(e)}),h("MMMM",function(e,a){return a.monthsRegex(e)}),k(["M","MM"],function(e,a){a[je]=f(e)-1}),k(["MMM","MMMM"],function(e,a,t,s){s=t._locale.monthsParse(e,s,t._strict);null!=s?a[je]=s:Y(t).invalidMonth=e});var Ie="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ue="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ge=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ve=m,qe=m;function Be(e,a){if(e.isValid()){if("string"==typeof a)if(/^\d+$/.test(a))a=f(a);else if(!J(a=e.localeData().monthsParse(a)))return;var t=(t=e.date())<29?t:Math.min(t,Ce(e.year(),a));e._isUTC?e._d.setUTCMonth(a,t):e._d.setMonth(a,t)}}function Ke(e){return null!=e?(Be(this,e),c.updateOffset(this,!0),this):Je(this,"Month")}function Ze(){function e(e,a){return a.length-e.length}for(var a,t,s=[],n=[],r=[],d=0;d<12;d++)t=U([2e3,d]),a=we(this.monthsShort(t,"")),t=we(this.months(t,"")),s.push(a),n.push(t),r.push(t),r.push(a);s.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function $e(e,a,t,s,n,r,d){var _;return e<100&&0<=e?(_=new Date(e+400,a,t,s,n,r,d),isFinite(_.getFullYear())&&_.setFullYear(e)):_=new Date(e,a,t,s,n,r,d),_}function Qe(e){var a;return e<100&&0<=e?((a=Array.prototype.slice.call(arguments))[0]=e+400,a=new Date(Date.UTC.apply(null,a)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(e)):a=new Date(Date.UTC.apply(null,arguments)),a}function Xe(e,a,t){t=7+a-t;return t-(7+Qe(e,0,t).getUTCDay()-a)%7-1}function ea(e,a,t,s,n){var r,a=1+7*(a-1)+(7+t-s)%7+Xe(e,s,n),t=a<=0?Fe(r=e-1)+a:a>Fe(e)?(r=e+1,a-Fe(e)):(r=e,a);return{year:r,dayOfYear:t}}function aa(e,a,t){var s,n,r=Xe(e.year(),a,t),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+ta(n=e.year()-1,a,t):r>ta(e.year(),a,t)?(s=r-ta(e.year(),a,t),n=e.year()+1):(n=e.year(),s=r),{week:s,year:n}}function ta(e,a,t){var s=Xe(e,a,t),a=Xe(e+1,a,t);return(Fe(e)-s+a)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),h("w",r,u),h("ww",r,a),h("W",r,u),h("WW",r,a),Se(["w","ww","W","WW"],function(e,a,t,s){a[s.substr(0,1)]=f(e)});function sa(e,a){return e.slice(a,7).concat(e.slice(0,a))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),h("d",r),h("e",r),h("E",r),h("dd",function(e,a){return a.weekdaysMinRegex(e)}),h("ddd",function(e,a){return a.weekdaysShortRegex(e)}),h("dddd",function(e,a){return a.weekdaysRegex(e)}),Se(["dd","ddd","dddd"],function(e,a,t,s){s=t._locale.weekdaysParse(e,s,t._strict);null!=s?a.d=s:Y(t).invalidWeekday=e}),Se(["d","e","E"],function(e,a,t,s){a[s]=f(e)});var na="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ra="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),da="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),_a=m,ia=m,oa=m;function ma(){function e(e,a){return a.length-e.length}for(var a,t,s,n=[],r=[],d=[],_=[],i=0;i<7;i++)s=U([2e3,1]).day(i),a=we(this.weekdaysMin(s,"")),t=we(this.weekdaysShort(s,"")),s=we(this.weekdays(s,"")),n.push(a),r.push(t),d.push(s),_.push(a),_.push(t),_.push(s);n.sort(e),r.sort(e),d.sort(e),_.sort(e),this._weekdaysRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i")}function ua(){return this.hours()%12||12}function la(e,a){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)})}function Ma(e,a){return a._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,ua),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+ua.apply(this)+de(this.minutes(),2)}),s("hmmss",0,0,function(){return""+ua.apply(this)+de(this.minutes(),2)+de(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+de(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+de(this.minutes(),2)+de(this.seconds(),2)}),la("a",!0),la("A",!1),h("a",Ma),h("A",Ma),h("H",r,M),h("h",r,u),h("k",r,u),h("HH",r,a),h("hh",r,a),h("kk",r,a),h("hmm",ye),h("hmmss",_),h("Hmm",ye),h("Hmmss",_),k(["H","HH"],D),k(["k","kk"],function(e,a,t){e=f(e);a[D]=24===e?0:e}),k(["a","A"],function(e,a,t){t._isPm=t._locale.isPM(e),t._meridiem=e}),k(["h","hh"],function(e,a,t){a[D]=f(e),Y(t).bigHour=!0}),k("hmm",function(e,a,t){var s=e.length-2;a[D]=f(e.substr(0,s)),a[Pe]=f(e.substr(s)),Y(t).bigHour=!0}),k("hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[D]=f(e.substr(0,s)),a[Pe]=f(e.substr(s,2)),a[Oe]=f(e.substr(n)),Y(t).bigHour=!0}),k("Hmm",function(e,a,t){var s=e.length-2;a[D]=f(e.substr(0,s)),a[Pe]=f(e.substr(s))}),k("Hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[D]=f(e.substr(0,s)),a[Pe]=f(e.substr(s,2)),a[Oe]=f(e.substr(n))});m=Ne("Hours",!0);var ha,ca={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ie,monthsShort:Ue,week:{dow:0,doy:6},weekdays:na,weekdaysMin:da,weekdaysShort:ra,meridiemParse:/[ap]\.?m?\.?/i},g={},La={};function Ya(e){return e&&e.toLowerCase().replace("_","-")}function ya(e){for(var a,t,s,n,r=0;r<e.length;){for(a=(n=Ya(e[r]).split("-")).length,t=(t=Ya(e[r+1]))?t.split("-"):null;0<a;){if(s=fa(n.slice(0,a).join("-")))return s;if(t&&t.length>=a&&function(e,a){for(var t=Math.min(e.length,a.length),s=0;s<t;s+=1)if(e[s]!==a[s])return s;return t}(n,t)>=a-1)break;a--}r++}return ha}function fa(a){var e,t;if(void 0===g[a]&&"undefined"!=typeof module&&module&&module.exports&&(t=a)&&t.match("^[^/\\\\]*$"))try{e=ha._abbr,require("./locale/"+a),ka(e)}catch(e){g[a]=null}return g[a]}function ka(e,a){return e&&((a=L(a)?Da(e):pa(e,a))?ha=a:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ha._abbr}function pa(e,a){if(null===a)return delete g[e],null;var t,s=ca;if(a.abbr=e,null!=g[e])ae("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=g[e]._config;else if(null!=a.parentLocale)if(null!=g[a.parentLocale])s=g[a.parentLocale]._config;else{if(null==(t=fa(a.parentLocale)))return La[a.parentLocale]||(La[a.parentLocale]=[]),La[a.parentLocale].push({name:e,config:a}),null;s=t._config}return g[e]=new ne(se(s,a)),La[e]&&La[e].forEach(function(e){pa(e.name,e.config)}),ka(e),g[e]}function Da(e){var a;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return ha;if(!F(e)){if(a=fa(e))return a;e=[e]}return ya(e)}function Ta(e){var a=e._a;return a&&-2===Y(e).overflow&&(a=a[je]<0||11<a[je]?je:a[xe]<1||a[xe]>Ce(a[p],a[je])?xe:a[D]<0||24<a[D]||24===a[D]&&(0!==a[Pe]||0!==a[Oe]||0!==a[We])?D:a[Pe]<0||59<a[Pe]?Pe:a[Oe]<0||59<a[Oe]?Oe:a[We]<0||999<a[We]?We:-1,Y(e)._overflowDayOfYear&&(a<p||xe<a)&&(a=xe),Y(e)._overflowWeeks&&-1===a&&(a=Ae),Y(e)._overflowWeekday&&-1===a&&(a=Ee),Y(e).overflow=a),e}var ga=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wa=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ba=/Z|[+-]\d\d(?::?\d\d)?/,Ha=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Sa=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],va=/^\/?Date\((-?\d+)/i,ja=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,xa={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Pa(e){var a,t,s,n,r,d,_=e._i,i=ga.exec(_)||wa.exec(_),_=Ha.length,o=Sa.length;if(i){for(Y(e).iso=!0,a=0,t=_;a<t;a++)if(Ha[a][1].exec(i[1])){n=Ha[a][0],s=!1!==Ha[a][2];break}if(null==n)e._isValid=!1;else{if(i[3]){for(a=0,t=o;a<t;a++)if(Sa[a][1].exec(i[3])){r=(i[2]||" ")+Sa[a][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(i[4]){if(!ba.exec(i[4]))return void(e._isValid=!1);d="Z"}e._f=n+(r||"")+(d||""),Fa(e)}else e._isValid=!1}}else e._isValid=!1}function Oa(e,a,t,s,n,r){e=[function(e){e=parseInt(e,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(e),Ue.indexOf(a),parseInt(t,10),parseInt(s,10),parseInt(n,10)];return r&&e.push(parseInt(r,10)),e}function Wa(e){var a,t,s=ja.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));s?(a=Oa(s[4],s[3],s[2],s[5],s[6],s[7]),function(e,a,t){if(!e||ra.indexOf(e)===new Date(a[0],a[1],a[2]).getDay())return 1;Y(t).weekdayMismatch=!0,t._isValid=!1}(s[1],a,e)&&(e._a=a,e._tzm=(a=s[8],t=s[9],s=s[10],a?xa[a]:t?0:60*(((a=parseInt(s,10))-(t=a%100))/100)+t),e._d=Qe.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Y(e).rfc2822=!0)):e._isValid=!1}function Aa(e,a,t){return null!=e?e:null!=a?a:t}function Ea(e){var a,t,s,n,r,d,_,i,o,m,u,l=[];if(!e._d){for(s=e,n=new Date(c.now()),t=s._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()],e._w&&null==e._a[xe]&&null==e._a[je]&&(null!=(n=(s=e)._w).GG||null!=n.W||null!=n.E?(i=1,o=4,r=Aa(n.GG,s._a[p],aa(w(),1,4).year),d=Aa(n.W,1),((_=Aa(n.E,1))<1||7<_)&&(m=!0)):(i=s._locale._week.dow,o=s._locale._week.doy,u=aa(w(),i,o),r=Aa(n.gg,s._a[p],u.year),d=Aa(n.w,u.week),null!=n.d?((_=n.d)<0||6<_)&&(m=!0):null!=n.e?(_=n.e+i,(n.e<0||6<n.e)&&(m=!0)):_=i),d<1||d>ta(r,i,o)?Y(s)._overflowWeeks=!0:null!=m?Y(s)._overflowWeekday=!0:(u=ea(r,d,_,i,o),s._a[p]=u.year,s._dayOfYear=u.dayOfYear)),null!=e._dayOfYear&&(n=Aa(e._a[p],t[p]),(e._dayOfYear>Fe(n)||0===e._dayOfYear)&&(Y(e)._overflowDayOfYear=!0),m=Qe(n,0,e._dayOfYear),e._a[je]=m.getUTCMonth(),e._a[xe]=m.getUTCDate()),a=0;a<3&&null==e._a[a];++a)e._a[a]=l[a]=t[a];for(;a<7;a++)e._a[a]=l[a]=null==e._a[a]?2===a?1:0:e._a[a];24===e._a[D]&&0===e._a[Pe]&&0===e._a[Oe]&&0===e._a[We]&&(e._nextDay=!0,e._a[D]=0),e._d=(e._useUTC?Qe:$e).apply(null,l),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[D]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(Y(e).weekdayMismatch=!0)}}function Fa(e){if(e._f===c.ISO_8601)Pa(e);else if(e._f===c.RFC_2822)Wa(e);else{e._a=[],Y(e).empty=!0;for(var a,t,s,n,r,d=""+e._i,_=d.length,i=0,o=le(e._f,e._locale).match(_e)||[],m=o.length,u=0;u<m;u++)t=o[u],(a=(d.match(ge(t,e))||[])[0])&&(0<(s=d.substr(0,d.indexOf(a))).length&&Y(e).unusedInput.push(s),d=d.slice(d.indexOf(a)+a.length),i+=a.length),me[t]?(a?Y(e).empty=!1:Y(e).unusedTokens.push(t),s=t,r=e,null!=(n=a)&&l(He,s)&&He[s](n,r._a,r,s)):e._strict&&!a&&Y(e).unusedTokens.push(t);Y(e).charsLeftOver=_-i,0<d.length&&Y(e).unusedInput.push(d),e._a[D]<=12&&!0===Y(e).bigHour&&0<e._a[D]&&(Y(e).bigHour=void 0),Y(e).parsedDateParts=e._a.slice(0),Y(e).meridiem=e._meridiem,e._a[D]=function(e,a,t){if(null==t)return a;return null!=e.meridiemHour?e.meridiemHour(a,t):null!=e.isPM?((e=e.isPM(t))&&a<12&&(a+=12),a=e||12!==a?a:0):a}(e._locale,e._a[D],e._meridiem),null!==(_=Y(e).era)&&(e._a[p]=e._locale.erasConvertYear(_,e._a[p])),Ea(e),Ta(e)}}function za(e){var a,t,s,n=e._i,r=e._f;if(e._locale=e._locale||Da(e._l),null===n||void 0===r&&""===n)return V({nullInput:!0});if("string"==typeof n&&(e._i=n=e._locale.preparse(n)),Q(n))return new $(Ta(n));if(R(n))e._d=n;else if(F(r)){var d,_,i,o,m,u,l=e,M=!1,h=l._f.length;if(0===h)Y(l).invalidFormat=!0,l._d=new Date(NaN);else{for(o=0;o<h;o++)m=0,u=!1,d=Z({},l),null!=l._useUTC&&(d._useUTC=l._useUTC),d._f=l._f[o],Fa(d),G(d)&&(u=!0),m=(m+=Y(d).charsLeftOver)+10*Y(d).unusedTokens.length,Y(d).score=m,M?m<i&&(i=m,_=d):(null==i||m<i||u)&&(i=m,_=d,u)&&(M=!0);I(l,_||d)}}else if(r)Fa(e);else if(L(r=(n=e)._i))n._d=new Date(c.now());else R(r)?n._d=new Date(r.valueOf()):"string"==typeof r?(t=n,null!==(a=va.exec(t._i))?t._d=new Date(+a[1]):(Pa(t),!1===t._isValid&&(delete t._isValid,Wa(t),!1===t._isValid)&&(delete t._isValid,t._strict?t._isValid=!1:c.createFromInputFallback(t)))):F(r)?(n._a=C(r.slice(0),function(e){return parseInt(e,10)}),Ea(n)):z(r)?(a=n)._d||(s=void 0===(t=he(a._i)).day?t.date:t.day,a._a=C([t.year,t.month,s,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Ea(a)):J(r)?n._d=new Date(r):c.createFromInputFallback(n);return G(e)||(e._d=null),e}function Na(e,a,t,s,n){var r={};return!0!==a&&!1!==a||(s=a,a=void 0),!0!==t&&!1!==t||(s=t,t=void 0),(z(e)&&N(e)||F(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=n,r._l=t,r._i=e,r._f=a,r._strict=s,(n=new $(Ta(za(n=r))))._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function w(e,a,t,s){return Na(e,a,t,s,!1)}c.createFromInputFallback=e("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),c.ISO_8601=function(){},c.RFC_2822=function(){};ye=e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=w.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:V()}),_=e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=w.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:V()});function Ja(e,a){var t,s;if(!(a=1===a.length&&F(a[0])?a[0]:a).length)return w();for(t=a[0],s=1;s<a.length;++s)a[s].isValid()&&!a[s][e](t)||(t=a[s]);return t}var Ra=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ca(e){var e=he(e),a=e.year||0,t=e.quarter||0,s=e.month||0,n=e.week||e.isoWeek||0,r=e.day||0,d=e.hour||0,_=e.minute||0,i=e.second||0,o=e.millisecond||0;this._isValid=function(e){var a,t,s=!1,n=Ra.length;for(a in e)if(l(e,a)&&(-1===T.call(Ra,a)||null!=e[a]&&isNaN(e[a])))return!1;for(t=0;t<n;++t)if(e[Ra[t]]){if(s)return!1;parseFloat(e[Ra[t]])!==f(e[Ra[t]])&&(s=!0)}return!0}(e),this._milliseconds=+o+1e3*i+6e4*_+1e3*d*60*60,this._days=+r+7*n,this._months=+s+3*t+12*a,this._data={},this._locale=Da(),this._bubble()}function Ia(e){return e instanceof Ca}function Ua(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ga(e,t){s(e,0,0,function(){var e=this.utcOffset(),a="+";return e<0&&(e=-e,a="-"),a+de(~~(e/60),2)+t+de(~~e%60,2)})}Ga("Z",":"),Ga("ZZ",""),h("Z",Te),h("ZZ",Te),k(["Z","ZZ"],function(e,a,t){t._useUTC=!0,t._tzm=qa(Te,e)});var Va=/([\+\-]|\d\d)/gi;function qa(e,a){var a=(a||"").match(e);return null===a?null:0===(a=60*(e=((a[a.length-1]||[])+"").match(Va)||["-",0,0])[1]+f(e[2]))?0:"+"===e[0]?a:-a}function Ba(e,a){var t;return a._isUTC?(a=a.clone(),t=(Q(e)||R(e)?e:w(e)).valueOf()-a.valueOf(),a._d.setTime(a._d.valueOf()+t),c.updateOffset(a,!1),a):w(e).local()}function Ka(e){return-Math.round(e._d.getTimezoneOffset())}function Za(){return!!this.isValid()&&this._isUTC&&0===this._offset}c.updateOffset=function(){};var $a=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Qa=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Xa(e,a){var t,s=e;return Ia(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:J(e)||!isNaN(+e)?(s={},a?s[a]=+e:s.milliseconds=+e):(a=$a.exec(e))?(t="-"===a[1]?-1:1,s={y:0,d:f(a[xe])*t,h:f(a[D])*t,m:f(a[Pe])*t,s:f(a[Oe])*t,ms:f(Ua(1e3*a[We]))*t}):(a=Qa.exec(e))?(t="-"===a[1]?-1:1,s={y:et(a[2],t),M:et(a[3],t),w:et(a[4],t),d:et(a[5],t),h:et(a[6],t),m:et(a[7],t),s:et(a[8],t)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(a=function(e,a){var t;if(!e.isValid()||!a.isValid())return{milliseconds:0,months:0};a=Ba(a,e),e.isBefore(a)?t=at(e,a):((t=at(a,e)).milliseconds=-t.milliseconds,t.months=-t.months);return t}(w(s.from),w(s.to)),(s={}).ms=a.milliseconds,s.M=a.months),t=new Ca(s),Ia(e)&&l(e,"_locale")&&(t._locale=e._locale),Ia(e)&&l(e,"_isValid")&&(t._isValid=e._isValid),t}function et(e,a){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*a}function at(e,a){var t={};return t.months=a.month()-e.month()+12*(a.year()-e.year()),e.clone().add(t.months,"M").isAfter(a)&&--t.months,t.milliseconds=+a-+e.clone().add(t.months,"M"),t}function tt(s,n){return function(e,a){var t;return null===a||isNaN(+a)||(ae(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),t=e,e=a,a=t),st(this,Xa(e,a),s),this}}function st(e,a,t,s){var n=a._milliseconds,r=Ua(a._days),a=Ua(a._months);e.isValid()&&(s=null==s||s,a&&Be(e,Je(e,"Month")+a*t),r&&Re(e,"Date",Je(e,"Date")+r*t),n&&e._d.setTime(e._d.valueOf()+n*t),s)&&c.updateOffset(e,r||a)}Xa.fn=Ca.prototype,Xa.invalid=function(){return Xa(NaN)};Ie=tt(1,"add"),na=tt(-1,"subtract");function nt(e){return"string"==typeof e||e instanceof String}function rt(e){return Q(e)||R(e)||nt(e)||J(e)||function(a){var e=F(a),t=!1;e&&(t=0===a.filter(function(e){return!J(e)&&nt(a)}).length);return e&&t}(e)||function(e){var a,t,s=z(e)&&!N(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],d=r.length;for(a=0;a<d;a+=1)t=r[a],n=n||l(e,t);return s&&n}(e)||null==e}function dt(e,a){var t,s;return e.date()<a.date()?-dt(a,e):-((t=12*(a.year()-e.year())+(a.month()-e.month()))+(a-(s=e.clone().add(t,"months"))<0?(a-s)/(s-e.clone().add(t-1,"months")):(a-s)/(e.clone().add(1+t,"months")-s)))||0}function _t(e){return void 0===e?this._locale._abbr:(null!=(e=Da(e))&&(this._locale=e),this)}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";da=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function it(){return this._locale}var ot=126227808e5;function mt(e,a){return(e%a+a)%a}function ut(e,a,t){return e<100&&0<=e?new Date(e+400,a,t)-ot:new Date(e,a,t).valueOf()}function lt(e,a,t){return e<100&&0<=e?Date.UTC(e+400,a,t)-ot:Date.UTC(e,a,t)}function Mt(e,a){return a.erasAbbrRegex(e)}function ht(){for(var e,a,t,s=[],n=[],r=[],d=[],_=this.eras(),i=0,o=_.length;i<o;++i)e=we(_[i].name),a=we(_[i].abbr),t=we(_[i].narrow),n.push(e),s.push(a),r.push(t),d.push(e),d.push(a),d.push(t);this._erasRegex=new RegExp("^("+d.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function ct(e,a){s(0,[e,e.length],0,a)}function Lt(e,a,t,s,n){var r;return null==e?aa(this,s,n).year:(r=ta(e,s,n),function(e,a,t,s,n){e=ea(e,a,t,s,n),a=Qe(e.year,0,e.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,a=r<a?r:a,t,s,n))}s("N",0,0,"eraAbbr"),s("NN",0,0,"eraAbbr"),s("NNN",0,0,"eraAbbr"),s("NNNN",0,0,"eraName"),s("NNNNN",0,0,"eraNarrow"),s("y",["y",1],"yo","eraYear"),s("y",["yy",2],0,"eraYear"),s("y",["yyy",3],0,"eraYear"),s("y",["yyyy",4],0,"eraYear"),h("N",Mt),h("NN",Mt),h("NNN",Mt),h("NNNN",function(e,a){return a.erasNameRegex(e)}),h("NNNNN",function(e,a){return a.erasNarrowRegex(e)}),k(["N","NN","NNN","NNNN","NNNNN"],function(e,a,t,s){s=t._locale.erasParse(e,s,t._strict);s?Y(t).era=s:Y(t).invalidEra=e}),h("y",ke),h("yy",ke),h("yyy",ke),h("yyyy",ke),h("yo",function(e,a){return a._eraYearOrdinalRegex||ke}),k(["y","yy","yyy","yyyy"],p),k(["yo"],function(e,a,t,s){var n;t._locale._eraYearOrdinalRegex&&(n=e.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?a[p]=t._locale.eraYearOrdinalParse(e,n):a[p]=parseInt(e,10)}),s(0,["gg",2],0,function(){return this.weekYear()%100}),s(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ct("gggg","weekYear"),ct("ggggg","weekYear"),ct("GGGG","isoWeekYear"),ct("GGGGG","isoWeekYear"),h("G",pe),h("g",pe),h("GG",r,a),h("gg",r,a),h("GGGG",i,t),h("gggg",i,t),h("GGGGG",o,n),h("ggggg",o,n),Se(["gggg","ggggg","GGGG","GGGGG"],function(e,a,t,s){a[s.substr(0,2)]=f(e)}),Se(["gg","GG"],function(e,a,t,s){a[s]=c.parseTwoDigitYear(e)}),s("Q",0,"Qo","quarter"),h("Q",Le),k("Q",function(e,a){a[je]=3*(f(e)-1)}),s("D",["DD",2],"Do","date"),h("D",r,u),h("DD",r,a),h("Do",function(e,a){return e?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),k(["D","DD"],xe),k("Do",function(e,a){a[xe]=f(e.match(r)[0])});i=Ne("Date",!0);s("DDD",["DDDD",3],"DDDo","dayOfYear"),h("DDD",fe),h("DDDD",Ye),k(["DDD","DDDD"],function(e,a,t){t._dayOfYear=f(e)}),s("m",["mm",2],0,"minute"),h("m",r,M),h("mm",r,a),k(["m","mm"],Pe);var Yt,t=Ne("Minutes",!1),o=(s("s",["ss",2],0,"second"),h("s",r,M),h("ss",r,a),k(["s","ss"],Oe),Ne("Seconds",!1));for(s("S",0,0,function(){return~~(this.millisecond()/100)}),s(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),s(0,["SSS",3],0,"millisecond"),s(0,["SSSS",4],0,function(){return 10*this.millisecond()}),s(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),s(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),s(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),s(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),s(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),h("S",fe,Le),h("SS",fe,a),h("SSS",fe,Ye),Yt="SSSS";Yt.length<=9;Yt+="S")h(Yt,ke);function yt(e,a){a[We]=f(1e3*("0."+e))}for(Yt="S";Yt.length<=9;Yt+="S")k(Yt,yt);n=Ne("Milliseconds",!1),s("z",0,0,"zoneAbbr"),s("zz",0,0,"zoneName");u=$.prototype;function ft(e){return e}u.add=Ie,u.calendar=function(e,a){1===arguments.length&&(arguments[0]?rt(arguments[0])?(e=arguments[0],a=void 0):function(e){for(var a=z(e)&&!N(e),t=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],n=0;n<s.length;n+=1)t=t||l(e,s[n]);return a&&t}(arguments[0])&&(a=arguments[0],e=void 0):a=e=void 0);var e=e||w(),t=Ba(e,this).startOf("day"),t=c.calendarFormat(this,t)||"sameElse",a=a&&(te(a[t])?a[t].call(this,e):a[t]);return this.format(a||this.localeData().calendar(t,this,w(e)))},u.clone=function(){return new $(this)},u.diff=function(e,a,t){var s,n,r;if(!this.isValid())return NaN;if(!(s=Ba(e,this)).isValid())return NaN;switch(n=6e4*(s.utcOffset()-this.utcOffset()),a=d(a)){case"year":r=dt(this,s)/12;break;case"month":r=dt(this,s);break;case"quarter":r=dt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-n)/864e5;break;case"week":r=(this-s-n)/6048e5;break;default:r=this-s}return t?r:y(r)},u.endOf=function(e){var a,t;if(void 0!==(e=d(e))&&"millisecond"!==e&&this.isValid()){switch(t=this._isUTC?lt:ut,e){case"year":a=t(this.year()+1,0,1)-1;break;case"quarter":a=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=t(this.year(),this.month()+1,1)-1;break;case"week":a=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=36e5-mt(a+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":a=this._d.valueOf(),a+=6e4-mt(a,6e4)-1;break;case"second":a=this._d.valueOf(),a+=1e3-mt(a,1e3)-1;break}this._d.setTime(a),c.updateOffset(this,!0)}return this},u.format=function(e){return e=e||(this.isUtc()?c.defaultFormatUtc:c.defaultFormat),e=ue(this,e),this.localeData().postformat(e)},u.from=function(e,a){return this.isValid()&&(Q(e)&&e.isValid()||w(e).isValid())?Xa({to:this,from:e}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()},u.fromNow=function(e){return this.from(w(),e)},u.to=function(e,a){return this.isValid()&&(Q(e)&&e.isValid()||w(e).isValid())?Xa({from:this,to:e}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()},u.toNow=function(e){return this.to(w(),e)},u.get=function(e){return te(this[e=d(e)])?this[e]():this},u.invalidAt=function(){return Y(this).overflow},u.isAfter=function(e,a){return e=Q(e)?e:w(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(a=d(a)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(a).valueOf())},u.isBefore=function(e,a){return e=Q(e)?e:w(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(a=d(a)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(a).valueOf()<e.valueOf())},u.isBetween=function(e,a,t,s){return e=Q(e)?e:w(e),a=Q(a)?a:w(a),!!(this.isValid()&&e.isValid()&&a.isValid())&&("("===(s=s||"()")[0]?this.isAfter(e,t):!this.isBefore(e,t))&&(")"===s[1]?this.isBefore(a,t):!this.isAfter(a,t))},u.isSame=function(e,a){var e=Q(e)?e:w(e);return!(!this.isValid()||!e.isValid())&&("millisecond"===(a=d(a)||"millisecond")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(a).valueOf()<=e&&e<=this.clone().endOf(a).valueOf()))},u.isSameOrAfter=function(e,a){return this.isSame(e,a)||this.isAfter(e,a)},u.isSameOrBefore=function(e,a){return this.isSame(e,a)||this.isBefore(e,a)},u.isValid=function(){return G(this)},u.lang=da,u.locale=_t,u.localeData=it,u.max=_,u.min=ye,u.parsingFlags=function(){return I({},Y(this))},u.set=function(e,a){if("object"==typeof e)for(var t=function(e){var a,t=[];for(a in e)l(e,a)&&t.push({unit:a,priority:ce[a]});return t.sort(function(e,a){return e.priority-a.priority}),t}(e=he(e)),s=t.length,n=0;n<s;n++)this[t[n].unit](e[t[n].unit]);else if(te(this[e=d(e)]))return this[e](a);return this},u.startOf=function(e){var a,t;if(void 0!==(e=d(e))&&"millisecond"!==e&&this.isValid()){switch(t=this._isUTC?lt:ut,e){case"year":a=t(this.year(),0,1);break;case"quarter":a=t(this.year(),this.month()-this.month()%3,1);break;case"month":a=t(this.year(),this.month(),1);break;case"week":a=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=t(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=mt(a+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":a=this._d.valueOf(),a-=mt(a,6e4);break;case"second":a=this._d.valueOf(),a-=mt(a,1e3);break}this._d.setTime(a),c.updateOffset(this,!0)}return this},u.subtract=na,u.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},u.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},u.toDate=function(){return new Date(this.valueOf())},u.toISOString=function(e){var a;return this.isValid()?(a=(e=!0!==e)?this.clone().utc():this).year()<0||9999<a.year()?ue(a,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):te(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",ue(a,"Z")):ue(a,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ"):null},u.inspect=function(){var e,a,t;return this.isValid()?(a="moment",e="",this.isLocal()||(a=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z"),a="["+a+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(a+t+"-MM-DD[T]HH:mm:ss.SSS"+(e+'[")]'))):"moment.invalid(/* "+this._i+" */)"},"undefined"!=typeof Symbol&&null!=Symbol.for&&(u[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),u.toJSON=function(){return this.isValid()?this.toISOString():null},u.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},u.unix=function(){return Math.floor(this.valueOf()/1e3)},u.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},u.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},u.eraName=function(){for(var e,a=this.localeData().eras(),t=0,s=a.length;t<s;++t){if(e=this.clone().startOf("day").valueOf(),a[t].since<=e&&e<=a[t].until)return a[t].name;if(a[t].until<=e&&e<=a[t].since)return a[t].name}return""},u.eraNarrow=function(){for(var e,a=this.localeData().eras(),t=0,s=a.length;t<s;++t){if(e=this.clone().startOf("day").valueOf(),a[t].since<=e&&e<=a[t].until)return a[t].narrow;if(a[t].until<=e&&e<=a[t].since)return a[t].narrow}return""},u.eraAbbr=function(){for(var e,a=this.localeData().eras(),t=0,s=a.length;t<s;++t){if(e=this.clone().startOf("day").valueOf(),a[t].since<=e&&e<=a[t].until)return a[t].abbr;if(a[t].until<=e&&e<=a[t].since)return a[t].abbr}return""},u.eraYear=function(){for(var e,a,t=this.localeData().eras(),s=0,n=t.length;s<n;++s)if(e=t[s].since<=t[s].until?1:-1,a=this.clone().startOf("day").valueOf(),t[s].since<=a&&a<=t[s].until||t[s].until<=a&&a<=t[s].since)return(this.year()-c(t[s].since).year())*e+t[s].offset;return this.year()},u.year=ze,u.isLeapYear=function(){return ve(this.year())},u.weekYear=function(e){return Lt.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},u.isoWeekYear=function(e){return Lt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},u.quarter=u.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},u.month=Ke,u.daysInMonth=function(){return Ce(this.year(),this.month())},u.week=u.weeks=function(e){var a=this.localeData().week(this);return null==e?a:this.add(7*(e-a),"d")},u.isoWeek=u.isoWeeks=function(e){var a=aa(this,1,4).week;return null==e?a:this.add(7*(e-a),"d")},u.weeksInYear=function(){var e=this.localeData()._week;return ta(this.year(),e.dow,e.doy)},u.weeksInWeekYear=function(){var e=this.localeData()._week;return ta(this.weekYear(),e.dow,e.doy)},u.isoWeeksInYear=function(){return ta(this.year(),1,4)},u.isoWeeksInISOWeekYear=function(){return ta(this.isoWeekYear(),1,4)},u.date=i,u.day=u.days=function(e){var a,t,s;return this.isValid()?(a=Je(this,"Day"),null!=e?(t=e,s=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=s.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-a,"d")):a):null!=e?this:NaN},u.weekday=function(e){var a;return this.isValid()?(a=(this.day()+7-this.localeData()._week.dow)%7,null==e?a:this.add(e-a,"d")):null!=e?this:NaN},u.isoWeekday=function(e){var a,t;return this.isValid()?null!=e?(a=e,t=this.localeData(),t="string"==typeof a?t.weekdaysParse(a)%7||7:isNaN(a)?null:a,this.day(this.day()%7?t:t-7)):this.day()||7:null!=e?this:NaN},u.dayOfYear=function(e){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?a:this.add(e-a,"d")},u.hour=u.hours=m,u.minute=u.minutes=t,u.second=u.seconds=o,u.millisecond=u.milliseconds=n,u.utcOffset=function(e,a,t){var s,n=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?n:Ka(this);if("string"==typeof e){if(null===(e=qa(Te,e)))return this}else Math.abs(e)<16&&!t&&(e*=60);return!this._isUTC&&a&&(s=Ka(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),n!==e&&(!a||this._changeInProgress?st(this,Xa(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this},u.utc=function(e){return this.utcOffset(0,e)},u.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e)&&this.subtract(Ka(this),"m"),this},u.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=qa(De,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},u.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?w(e).utcOffset():0,(this.utcOffset()-e)%60==0)},u.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},u.isLocal=function(){return!!this.isValid()&&!this._isUTC},u.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},u.isUtc=Za,u.isUTC=Za,u.zoneAbbr=function(){return this._isUTC?"UTC":""},u.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},u.dates=e("dates accessor is deprecated. Use date instead.",i),u.months=e("months accessor is deprecated. Use month instead",Ke),u.years=e("years accessor is deprecated. Use year instead",ze),u.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,a){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,a),this):-this.utcOffset()}),u.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){var e,a;return L(this._isDSTShifted)&&(Z(e={},this),(e=za(e))._a?(a=(e._isUTC?U:w)(e._a),this._isDSTShifted=this.isValid()&&0<function(e,a,t){for(var s=Math.min(e.length,a.length),n=Math.abs(e.length-a.length),r=0,d=0;d<s;d++)(t&&e[d]!==a[d]||!t&&f(e[d])!==f(a[d]))&&r++;return r+n}(e._a,a.toArray())):this._isDSTShifted=!1),this._isDSTShifted});M=ne.prototype;function kt(e,a,t,s){var n=Da(),s=U().set(s,a);return n[t](s,e)}function pt(e,a,t){if(J(e)&&(a=e,e=void 0),e=e||"",null!=a)return kt(e,a,t,"month");for(var s=[],n=0;n<12;n++)s[n]=kt(e,n,t,"month");return s}function Dt(e,a,t,s){a=("boolean"==typeof e?J(a)&&(t=a,a=void 0):(a=e,e=!1,J(t=a)&&(t=a,a=void 0)),a||"");var n,r=Da(),d=e?r._week.dow:0,_=[];if(null!=t)return kt(a,(t+d)%7,s,"day");for(n=0;n<7;n++)_[n]=kt(a,(n+d)%7,s,"day");return _}M.calendar=function(e,a,t){return te(e=this._calendar[e]||this._calendar.sameElse)?e.call(a,t):e},M.longDateFormat=function(e){var a=this._longDateFormat[e],t=this._longDateFormat[e.toUpperCase()];return a||!t?a:(this._longDateFormat[e]=t.match(_e).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},M.invalidDate=function(){return this._invalidDate},M.ordinal=function(e){return this._ordinal.replace("%d",e)},M.preparse=ft,M.postformat=ft,M.relativeTime=function(e,a,t,s){var n=this._relativeTime[t];return te(n)?n(e,a,t,s):n.replace(/%d/i,e)},M.pastFuture=function(e,a){return te(e=this._relativeTime[0<e?"future":"past"])?e(a):e.replace(/%s/i,a)},M.set=function(e){var a,t;for(t in e)l(e,t)&&(te(a=e[t])?this[t]=a:this["_"+t]=a);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},M.eras=function(e,a){for(var t,s=this._eras||Da("en")._eras,n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":t=c(s[n].since).startOf("day"),s[n].since=t.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":t=c(s[n].until).startOf("day").valueOf(),s[n].until=t.valueOf();break}}return s},M.erasParse=function(e,a,t){var s,n,r,d,_,i=this.eras();for(e=e.toUpperCase(),s=0,n=i.length;s<n;++s)if(r=i[s].name.toUpperCase(),d=i[s].abbr.toUpperCase(),_=i[s].narrow.toUpperCase(),t)switch(a){case"N":case"NN":case"NNN":if(d===e)return i[s];break;case"NNNN":if(r===e)return i[s];break;case"NNNNN":if(_===e)return i[s];break}else if(0<=[r,d,_].indexOf(e))return i[s]},M.erasConvertYear=function(e,a){var t=e.since<=e.until?1:-1;return void 0===a?c(e.since).year():c(e.since).year()+(a-e.offset)*t},M.erasAbbrRegex=function(e){return l(this,"_erasAbbrRegex")||ht.call(this),e?this._erasAbbrRegex:this._erasRegex},M.erasNameRegex=function(e){return l(this,"_erasNameRegex")||ht.call(this),e?this._erasNameRegex:this._erasRegex},M.erasNarrowRegex=function(e){return l(this,"_erasNarrowRegex")||ht.call(this),e?this._erasNarrowRegex:this._erasRegex},M.months=function(e,a){return e?(F(this._months)?this._months:this._months[(this._months.isFormat||Ge).test(a)?"format":"standalone"])[e.month()]:F(this._months)?this._months:this._months.standalone},M.monthsShort=function(e,a){return e?(F(this._monthsShort)?this._monthsShort:this._monthsShort[Ge.test(a)?"format":"standalone"])[e.month()]:F(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},M.monthsParse=function(e,a,t){var s,n;if(this._monthsParseExact)return function(e,a,t){var s,n,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=U([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return t?"MMM"===a?-1!==(n=T.call(this._shortMonthsParse,e))?n:null:-1!==(n=T.call(this._longMonthsParse,e))?n:null:"MMM"===a?-1!==(n=T.call(this._shortMonthsParse,e))||-1!==(n=T.call(this._longMonthsParse,e))?n:null:-1!==(n=T.call(this._longMonthsParse,e))||-1!==(n=T.call(this._shortMonthsParse,e))?n:null}.call(this,e,a,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(n=U([2e3,s]),t&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),t||this._monthsParse[s]||(n="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[s]=new RegExp(n.replace(".",""),"i")),t&&"MMMM"===a&&this._longMonthsParse[s].test(e))return s;if(t&&"MMM"===a&&this._shortMonthsParse[s].test(e))return s;if(!t&&this._monthsParse[s].test(e))return s}},M.monthsRegex=function(e){return this._monthsParseExact?(l(this,"_monthsRegex")||Ze.call(this),e?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=qe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},M.monthsShortRegex=function(e){return this._monthsParseExact?(l(this,"_monthsRegex")||Ze.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=Ve),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},M.week=function(e){return aa(e,this._week.dow,this._week.doy).week},M.firstDayOfYear=function(){return this._week.doy},M.firstDayOfWeek=function(){return this._week.dow},M.weekdays=function(e,a){return a=F(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(a)?"format":"standalone"],!0===e?sa(a,this._week.dow):e?a[e.day()]:a},M.weekdaysMin=function(e){return!0===e?sa(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},M.weekdaysShort=function(e){return!0===e?sa(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},M.weekdaysParse=function(e,a,t){var s,n;if(this._weekdaysParseExact)return function(e,a,t){var s,n,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=U([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return t?"dddd"===a?-1!==(n=T.call(this._weekdaysParse,e))?n:null:"ddd"===a?-1!==(n=T.call(this._shortWeekdaysParse,e))?n:null:-1!==(n=T.call(this._minWeekdaysParse,e))?n:null:"dddd"===a?-1!==(n=T.call(this._weekdaysParse,e))||-1!==(n=T.call(this._shortWeekdaysParse,e))||-1!==(n=T.call(this._minWeekdaysParse,e))?n:null:"ddd"===a?-1!==(n=T.call(this._shortWeekdaysParse,e))||-1!==(n=T.call(this._weekdaysParse,e))||-1!==(n=T.call(this._minWeekdaysParse,e))?n:null:-1!==(n=T.call(this._minWeekdaysParse,e))||-1!==(n=T.call(this._weekdaysParse,e))||-1!==(n=T.call(this._shortWeekdaysParse,e))?n:null}.call(this,e,a,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(n=U([2e3,1]).day(s),t&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(n="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[s]=new RegExp(n.replace(".",""),"i")),t&&"dddd"===a&&this._fullWeekdaysParse[s].test(e))return s;if(t&&"ddd"===a&&this._shortWeekdaysParse[s].test(e))return s;if(t&&"dd"===a&&this._minWeekdaysParse[s].test(e))return s;if(!t&&this._weekdaysParse[s].test(e))return s}},M.weekdaysRegex=function(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||ma.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=_a),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},M.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||ma.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ia),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},M.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||ma.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=oa),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},M.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},M.meridiem=function(e,a,t){return 11<e?t?"pm":"PM":t?"am":"AM"},ka("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var a=e%10;return e+(1===f(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")}}),c.lang=e("moment.lang is deprecated. Use moment.locale instead.",ka),c.langData=e("moment.langData is deprecated. Use moment.localeData instead.",Da);var Tt=Math.abs;function gt(e,a,t,s){a=Xa(a,t);return e._milliseconds+=s*a._milliseconds,e._days+=s*a._days,e._months+=s*a._months,e._bubble()}function wt(e){return e<0?Math.floor(e):Math.ceil(e)}function bt(e){return 4800*e/146097}function Ht(e){return 146097*e/4800}function St(e){return function(){return this.as(e)}}Le=St("ms"),a=St("s"),fe=St("m"),Ye=St("h"),Ie=St("d"),_=St("w"),ye=St("M"),na=St("Q"),m=St("y"),t=Le;function vt(e){return function(){return this.isValid()?this._data[e]:NaN}}var o=vt("milliseconds"),n=vt("seconds"),i=vt("minutes"),ze=vt("hours"),M=vt("days"),jt=vt("months"),xt=vt("years");var Pt=Math.round,Ot={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Wt(e,a,t,s){var n=Xa(e).abs(),r=Pt(n.as("s")),d=Pt(n.as("m")),_=Pt(n.as("h")),i=Pt(n.as("d")),o=Pt(n.as("M")),m=Pt(n.as("w")),n=Pt(n.as("y")),r=(r<=t.ss?["s",r]:r<t.s&&["ss",r])||(d<=1?["m"]:d<t.m&&["mm",d])||(_<=1?["h"]:_<t.h&&["hh",_])||(i<=1?["d"]:i<t.d&&["dd",i]);return(r=(r=null!=t.w?r||(m<=1?["w"]:m<t.w&&["ww",m]):r)||(o<=1?["M"]:o<t.M&&["MM",o])||(n<=1?["y"]:["yy",n]))[2]=a,r[3]=0<+e,r[4]=s,function(e,a,t,s,n){return n.relativeTime(a||1,!!t,e,s)}.apply(null,r)}var At=Math.abs;function Et(e){return(0<e)-(e<0)||+e}function Ft(){var e,a,t,s,n,r,d,_,i,o,m;return this.isValid()?(e=At(this._milliseconds)/1e3,a=At(this._days),t=At(this._months),(_=this.asSeconds())?(s=y(e/60),n=y(s/60),e%=60,s%=60,r=y(t/12),t%=12,d=e?e.toFixed(3).replace(/\.?0+$/,""):"",i=Et(this._months)!==Et(_)?"-":"",o=Et(this._days)!==Et(_)?"-":"",m=Et(this._milliseconds)!==Et(_)?"-":"",(_<0?"-":"")+"P"+(r?i+r+"Y":"")+(t?i+t+"M":"")+(a?o+a+"D":"")+(n||s||e?"T":"")+(n?m+n+"H":"")+(s?m+s+"M":"")+(e?m+d+"S":"")):"P0D"):this.localeData().invalidDate()}function zt(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function b(d){return function(e,a,t,s){var n=zt(e),r=Rt[d][zt(e)];return(r=2===n?r[a?0:1]:r).replace(/%d/i,e)}}function Nt(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function H(d){return function(e,a,t,s){var n=Nt(e),r=It[d][Nt(e)];return(r=2===n?r[a?0:1]:r).replace(/%d/i,e)}}function Jt(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function S(d){return function(e,a,t,s){var n=Jt(e),r=Zt[d][Jt(e)];return(r=2===n?r[a?0:1]:r).replace(/%d/i,e)}}var v=Ca.prototype,Rt=(v.isValid=function(){return this._isValid},v.abs=function(){var e=this._data;return this._milliseconds=Tt(this._milliseconds),this._days=Tt(this._days),this._months=Tt(this._months),e.milliseconds=Tt(e.milliseconds),e.seconds=Tt(e.seconds),e.minutes=Tt(e.minutes),e.hours=Tt(e.hours),e.months=Tt(e.months),e.years=Tt(e.years),this},v.add=function(e,a){return gt(this,e,a,1)},v.subtract=function(e,a){return gt(this,e,a,-1)},v.as=function(e){if(!this.isValid())return NaN;var a,t,s=this._milliseconds;if("month"===(e=d(e))||"quarter"===e||"year"===e)switch(a=this._days+s/864e5,t=this._months+bt(a),e){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(a=this._days+Math.round(Ht(this._months)),e){case"week":return a/7+s/6048e5;case"day":return a+s/864e5;case"hour":return 24*a+s/36e5;case"minute":return 1440*a+s/6e4;case"second":return 86400*a+s/1e3;case"millisecond":return Math.floor(864e5*a)+s;default:throw new Error("Unknown unit "+e)}},v.asMilliseconds=Le,v.asSeconds=a,v.asMinutes=fe,v.asHours=Ye,v.asDays=Ie,v.asWeeks=_,v.asMonths=ye,v.asQuarters=na,v.asYears=m,v.valueOf=t,v._bubble=function(){var e=this._milliseconds,a=this._days,t=this._months,s=this._data;return 0<=e&&0<=a&&0<=t||e<=0&&a<=0&&t<=0||(e+=864e5*wt(Ht(t)+a),t=a=0),s.milliseconds=e%1e3,e=y(e/1e3),s.seconds=e%60,e=y(e/60),s.minutes=e%60,e=y(e/60),s.hours=e%24,a+=y(e/24),t+=e=y(bt(a)),a-=wt(Ht(e)),e=y(t/12),t%=12,s.days=a,s.months=t,s.years=e,this},v.clone=function(){return Xa(this)},v.get=function(e){return e=d(e),this.isValid()?this[e+"s"]():NaN},v.milliseconds=o,v.seconds=n,v.minutes=i,v.hours=ze,v.days=M,v.weeks=function(){return y(this.days()/7)},v.months=jt,v.years=xt,v.humanize=function(e,a){var t,s;return this.isValid()?(t=!1,s=Ot,"object"==typeof e&&(a=e,e=!1),"boolean"==typeof e&&(t=e),"object"==typeof a&&(s=Object.assign({},Ot,a),null!=a.s)&&null==a.ss&&(s.ss=a.s-1),e=this.localeData(),a=Wt(this,!t,s,e),t&&(a=e.pastFuture(+this,a)),e.postformat(a)):this.localeData().invalidDate()},v.toISOString=Ft,v.toString=Ft,v.toJSON=Ft,v.locale=_t,v.localeData=it,v.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ft),v.lang=da,s("X",0,0,"unix"),s("x",0,0,"valueOf"),h("x",pe),h("X",/[+-]?\d+(\.\d{1,3})?/),k("X",function(e,a,t){t._d=new Date(1e3*parseFloat(e))}),k("x",function(e,a,t){t._d=new Date(f(e))}),c.version="2.30.1",E=w,c.fn=u,c.min=function(){return Ja("isBefore",[].slice.call(arguments,0))},c.max=function(){return Ja("isAfter",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=U,c.unix=function(e){return w(1e3*e)},c.months=function(e,a){return pt(e,a,"months")},c.isDate=R,c.locale=ka,c.invalid=V,c.duration=Xa,c.isMoment=Q,c.weekdays=function(e,a,t){return Dt(e,a,t,"weekdays")},c.parseZone=function(){return w.apply(null,arguments).parseZone()},c.localeData=Da,c.isDuration=Ia,c.monthsShort=function(e,a){return pt(e,a,"monthsShort")},c.weekdaysMin=function(e,a,t){return Dt(e,a,t,"weekdaysMin")},c.defineLocale=pa,c.updateLocale=function(e,a){var t,s;return null!=a?(s=ca,null!=g[e]&&null!=g[e].parentLocale?g[e].set(se(g[e]._config,a)):(a=se(s=null!=(t=fa(e))?t._config:s,a),null==t&&(a.abbr=e),(s=new ne(a)).parentLocale=g[e],g[e]=s),ka(e)):null!=g[e]&&(null!=g[e].parentLocale?(g[e]=g[e].parentLocale,e===ka()&&ka(e)):null!=g[e]&&delete g[e]),g[e]},c.locales=function(){return re(g)},c.weekdaysShort=function(e,a,t){return Dt(e,a,t,"weekdaysShort")},c.normalizeUnits=d,c.relativeTimeRounding=function(e){return void 0===e?Pt:"function"==typeof e&&(Pt=e,!0)},c.relativeTimeThreshold=function(e,a){return void 0!==Ot[e]&&(void 0===a?Ot[e]:(Ot[e]=a,"s"===e&&(Ot.ss=a-1),!0))},c.calendarFormat=function(e,a){return(e=e.diff(a,"days",!0))<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},c.prototype=u,c.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},c.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,a,t){return e<12?t?"vm":"VM":t?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[M\xf4re om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),{s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]}),Le=["\u062c\u0627\u0646\u0641\u064a","\u0641\u064a\u0641\u0631\u064a","\u0645\u0627\u0631\u0633","\u0623\u0641\u0631\u064a\u0644","\u0645\u0627\u064a","\u062c\u0648\u0627\u0646","\u062c\u0648\u064a\u0644\u064a\u0629","\u0623\u0648\u062a","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"],Ct=(c.defineLocale("ar-dz",{months:Le,monthsShort:Le,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:b("s"),ss:b("s"),m:b("m"),mm:b("m"),h:b("h"),hh:b("h"),d:b("d"),dd:b("d"),M:b("M"),MM:b("M"),y:b("y"),yy:b("y")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:0,doy:4}}),c.defineLocale("ar-kw",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:12}}),{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"}),It={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},a=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"],Ut=(c.defineLocale("ar-ly",{months:a,monthsShort:a,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:H("s"),ss:H("s"),m:H("m"),mm:H("m"),h:H("h"),hh:H("h"),d:H("d"),dd:H("d"),M:H("M"),MM:H("M"),y:H("y"),yy:H("y")},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Ct[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}}),c.defineLocale("ar-ma",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}}),{1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"}),Gt={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},Vt=(c.defineLocale("ar-ps",{months:"\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a_\u0634\u0628\u0627\u0637_\u0622\u0630\u0627\u0631_\u0646\u064a\u0633\u0627\u0646_\u0623\u064a\u0651\u0627\u0631_\u062d\u0632\u064a\u0631\u0627\u0646_\u062a\u0645\u0651\u0648\u0632_\u0622\u0628_\u0623\u064a\u0644\u0648\u0644_\u062a\u0634\u0631\u064a \u0627\u0644\u0623\u0648\u0651\u0644_\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a_\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0651\u0644".split("_"),monthsShort:"\u0643\u0662_\u0634\u0628\u0627\u0637_\u0622\u0630\u0627\u0631_\u0646\u064a\u0633\u0627\u0646_\u0623\u064a\u0651\u0627\u0631_\u062d\u0632\u064a\u0631\u0627\u0646_\u062a\u0645\u0651\u0648\u0632_\u0622\u0628_\u0623\u064a\u0644\u0648\u0644_\u062a\u0661_\u062a\u0662_\u0643\u0661".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(e){return e.replace(/[\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return Gt[e]}).split("").reverse().join("").replace(/[\u0661\u0662](?![\u062a\u0643])/g,function(e){return Gt[e]}).split("").reverse().join("").replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Ut[e]}).replace(/,/g,"\u060c")},week:{dow:0,doy:6}}),{1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"}),qt={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},Bt=(c.defineLocale("ar-sa",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return qt[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Vt[e]}).replace(/,/g,"\u060c")},week:{dow:0,doy:6}}),c.defineLocale("ar-tn",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}}),{1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"}),Kt={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},Zt={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},fe=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"],$t=(c.defineLocale("ar",{months:fe,monthsShort:fe,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:S("s"),ss:S("s"),m:S("m"),mm:S("m"),h:S("h"),hh:S("h"),d:S("d"),dd:S("d"),M:S("M"),MM:S("M"),y:S("y"),yy:S("y")},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return Kt[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Bt[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}}),{1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-\xfcnc\xfc",4:"-\xfcnc\xfc",100:"-\xfcnc\xfc",6:"-nc\u0131",9:"-uncu",10:"-uncu",30:"-uncu",60:"-\u0131nc\u0131",90:"-\u0131nc\u0131"});function Qt(e,a,t){return"m"===t?a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443":"h"===t?a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443":e+" "+(e=+e,a=(a={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d",hh:a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d",dd:"\u0434\u0437\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u0437\u0451\u043d",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u044b_\u043c\u0435\u0441\u044f\u0446\u0430\u045e",yy:"\u0433\u043e\u0434_\u0433\u0430\u0434\u044b_\u0433\u0430\u0434\u043e\u045e"}[t]).split("_"),e%10==1&&e%100!=11?a[0]:2<=e%10&&e%10<=4&&(e%100<10||20<=e%100)?a[1]:a[2])}c.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ert\u0259si_\xc7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131_\xc7\u0259r\u015f\u0259nb\u0259_C\xfcm\u0259 ax\u015fam\u0131_C\xfcm\u0259_\u015e\u0259nb\u0259".split("_"),weekdaysShort:"Baz_BzE_\xc7Ax_\xc7\u0259r_CAx_C\xfcm_\u015e\u0259n".split("_"),weekdaysMin:"Bz_BE_\xc7A_\xc7\u0259_CA_C\xfc_\u015e\u0259".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[g\u0259l\u0259n h\u0259ft\u0259] dddd [saat] LT",lastDay:"[d\xfcn\u0259n] LT",lastWeek:"[ke\xe7\u0259n h\u0259ft\u0259] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u0259vv\u0259l",s:"bir ne\xe7\u0259 saniy\u0259",ss:"%d saniy\u0259",m:"bir d\u0259qiq\u0259",mm:"%d d\u0259qiq\u0259",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(e){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(e)},meridiem:function(e,a,t){return e<4?"gec\u0259":e<12?"s\u0259h\u0259r":e<17?"g\xfcnd\xfcz":"ax\u015fam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(e){var a;return 0===e?e+"-\u0131nc\u0131":e+($t[a=e%10]||$t[e%100-a]||$t[100<=e?100:null])},week:{dow:1,doy:7}}),c.defineLocale("be",{months:{format:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f_\u043b\u044e\u0442\u0430\u0433\u0430_\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430_\u0442\u0440\u0430\u045e\u043d\u044f_\u0447\u044d\u0440\u0432\u0435\u043d\u044f_\u043b\u0456\u043f\u0435\u043d\u044f_\u0436\u043d\u0456\u045e\u043d\u044f_\u0432\u0435\u0440\u0430\u0441\u043d\u044f_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430_\u0441\u043d\u0435\u0436\u043d\u044f".split("_"),standalone:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c_\u043b\u044e\u0442\u044b_\u0441\u0430\u043a\u0430\u0432\u0456\u043a_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u044d\u0440\u0432\u0435\u043d\u044c_\u043b\u0456\u043f\u0435\u043d\u044c_\u0436\u043d\u0456\u0432\u0435\u043d\u044c_\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434_\u0441\u043d\u0435\u0436\u0430\u043d\u044c".split("_")},monthsShort:"\u0441\u0442\u0443\u0434_\u043b\u044e\u0442_\u0441\u0430\u043a_\u043a\u0440\u0430\u0441_\u0442\u0440\u0430\u0432_\u0447\u044d\u0440\u0432_\u043b\u0456\u043f_\u0436\u043d\u0456\u0432_\u0432\u0435\u0440_\u043a\u0430\u0441\u0442_\u043b\u0456\u0441\u0442_\u0441\u043d\u0435\u0436".split("_"),weekdays:{format:"\u043d\u044f\u0434\u0437\u0435\u043b\u044e_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0443_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0443_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),standalone:"\u043d\u044f\u0434\u0437\u0435\u043b\u044f_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0430_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0430_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),isFormat:/\[ ?[\u0423\u0443\u045e] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., HH:mm",LLLL:"dddd, D MMMM YYYY \u0433., HH:mm"},calendar:{sameDay:"[\u0421\u0451\u043d\u043d\u044f \u045e] LT",nextDay:"[\u0417\u0430\u045e\u0442\u0440\u0430 \u045e] LT",lastDay:"[\u0423\u0447\u043e\u0440\u0430 \u045e] LT",nextWeek:function(){return"[\u0423] dddd [\u045e] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u0443\u044e] dddd [\u045e] LT";case 1:case 2:case 4:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u044b] dddd [\u045e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u0440\u0430\u0437 %s",past:"%s \u0442\u0430\u043c\u0443",s:"\u043d\u0435\u043a\u0430\u043b\u044c\u043a\u0456 \u0441\u0435\u043a\u0443\u043d\u0434",m:Qt,mm:Qt,h:Qt,hh:Qt,d:"\u0434\u0437\u0435\u043d\u044c",dd:Qt,M:"\u043c\u0435\u0441\u044f\u0446",MM:Qt,y:"\u0433\u043e\u0434",yy:Qt},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u044b":e<12?"\u0440\u0430\u043d\u0456\u0446\u044b":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0430\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-\u044b":e+"-\u0456";case"D":return e+"-\u0433\u0430";default:return e}},week:{dow:1,doy:7}}),c.defineLocale("bg",{months:"\u044f\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u044f\u043d\u0443_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u044f\u0434\u0430_\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a_\u043f\u0435\u0442\u044a\u043a_\u0441\u044a\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u044f_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u044a\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u043d\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u041c\u0438\u043d\u0430\u043b\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u041c\u0438\u043d\u0430\u043b\u0438\u044f] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043b\u0435\u0434 %s",past:"\u043f\u0440\u0435\u0434\u0438 %s",s:"\u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",w:"\u0441\u0435\u0434\u043c\u0438\u0446\u0430",ww:"%d \u0441\u0435\u0434\u043c\u0438\u0446\u0438",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-\u0435\u0432":0==t?e+"-\u0435\u043d":10<t&&t<20?e+"-\u0442\u0438":1==a?e+"-\u0432\u0438":2==a?e+"-\u0440\u0438":7==a||8==a?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}}),c.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_M\u025bkalo_Zuw\u025bnkalo_Zuluyekalo_Utikalo_S\u025btanburukalo_\u0254kut\u0254burukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_M\u025b_Zuw_Zul_Uti_S\u025bt_\u0254ku_Now_Des".split("_"),weekdays:"Kari_Nt\u025bn\u025bn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Nt\u025b_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm"},calendar:{sameDay:"[Bi l\u025br\u025b] LT",nextDay:"[Sini l\u025br\u025b] LT",nextWeek:"dddd [don l\u025br\u025b] LT",lastDay:"[Kunu l\u025br\u025b] LT",lastWeek:"dddd [t\u025bm\u025bnen l\u025br\u025b] LT",sameElse:"L"},relativeTime:{future:"%s k\u0254n\u0254",past:"a b\u025b %s b\u0254",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"l\u025br\u025b kelen",hh:"l\u025br\u025b %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});var Xt={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},es={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"},as=(c.defineLocale("bn-bd",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(e){return es[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Xt[e]})},meridiemParse:/\u09b0\u09be\u09a4|\u09ad\u09cb\u09b0|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be|\u09b0\u09be\u09a4/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===a?e<4?e:e+12:"\u09ad\u09cb\u09b0"===a||"\u09b8\u0995\u09be\u09b2"===a?e:"\u09a6\u09c1\u09aa\u09c1\u09b0"===a?3<=e?e:e+12:"\u09ac\u09bf\u0995\u09be\u09b2"===a||"\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u09b0\u09be\u09a4":e<6?"\u09ad\u09cb\u09b0":e<12?"\u09b8\u0995\u09be\u09b2":e<15?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<18?"\u09ac\u09bf\u0995\u09be\u09b2":e<20?"\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}}),{1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"}),ts={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"},ss=(c.defineLocale("bn",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(e){return ts[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return as[e]})},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===a&&4<=e||"\u09a6\u09c1\u09aa\u09c1\u09b0"===a&&e<5||"\u09ac\u09bf\u0995\u09be\u09b2"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u09b0\u09be\u09a4":e<10?"\u09b8\u0995\u09be\u09b2":e<17?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<20?"\u09ac\u09bf\u0995\u09be\u09b2":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}}),{1:"\u0f21",2:"\u0f22",3:"\u0f23",4:"\u0f24",5:"\u0f25",6:"\u0f26",7:"\u0f27",8:"\u0f28",9:"\u0f29",0:"\u0f20"}),ns={"\u0f21":"1","\u0f22":"2","\u0f23":"3","\u0f24":"4","\u0f25":"5","\u0f26":"6","\u0f27":"7","\u0f28":"8","\u0f29":"9","\u0f20":"0"};function rs(e,a,t){return e+" "+(t={mm:"munutenn",MM:"miz",dd:"devezh"}[t],2!==(e=e)?t:void 0!==(e={m:"v",b:"v",d:"z"})[(t=t).charAt(0)]?e[t.charAt(0)]+t.substring(1):t)}c.defineLocale("bo",{months:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),monthsShort:"\u0f5f\u0fb3\u0f0b1_\u0f5f\u0fb3\u0f0b2_\u0f5f\u0fb3\u0f0b3_\u0f5f\u0fb3\u0f0b4_\u0f5f\u0fb3\u0f0b5_\u0f5f\u0fb3\u0f0b6_\u0f5f\u0fb3\u0f0b7_\u0f5f\u0fb3\u0f0b8_\u0f5f\u0fb3\u0f0b9_\u0f5f\u0fb3\u0f0b10_\u0f5f\u0fb3\u0f0b11_\u0f5f\u0fb3\u0f0b12".split("_"),monthsShortRegex:/^(\u0f5f\u0fb3\u0f0b\d{1,2})/,monthsParseExact:!0,weekdays:"\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysShort:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysMin:"\u0f49\u0f72_\u0f5f\u0fb3_\u0f58\u0f72\u0f42_\u0f63\u0fb7\u0f42_\u0f55\u0f74\u0f62_\u0f66\u0f44\u0f66_\u0f66\u0fa4\u0f7a\u0f53".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0f51\u0f72\u0f0b\u0f62\u0f72\u0f44] LT",nextDay:"[\u0f66\u0f44\u0f0b\u0f49\u0f72\u0f53] LT",nextWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f62\u0f97\u0f7a\u0f66\u0f0b\u0f58], LT",lastDay:"[\u0f41\u0f0b\u0f66\u0f44] LT",lastWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f58\u0f50\u0f60\u0f0b\u0f58] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0f63\u0f0b",past:"%s \u0f66\u0f94\u0f53\u0f0b\u0f63",s:"\u0f63\u0f58\u0f0b\u0f66\u0f44",ss:"%d \u0f66\u0f90\u0f62\u0f0b\u0f46\u0f0d",m:"\u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b\u0f42\u0f45\u0f72\u0f42",mm:"%d \u0f66\u0f90\u0f62\u0f0b\u0f58",h:"\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b\u0f42\u0f45\u0f72\u0f42",hh:"%d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51",d:"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f45\u0f72\u0f42",dd:"%d \u0f49\u0f72\u0f53\u0f0b",M:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f45\u0f72\u0f42",MM:"%d \u0f5f\u0fb3\u0f0b\u0f56",y:"\u0f63\u0f7c\u0f0b\u0f42\u0f45\u0f72\u0f42",yy:"%d \u0f63\u0f7c"},preparse:function(e){return e.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,function(e){return ns[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return ss[e]})},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"===a&&4<=e||"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44"===a&&e<5||"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c":e<10?"\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66":e<17?"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44":e<20?"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42":"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"},week:{dow:0,doy:6}});Ye=[/^gen/i,/^c[\u02bc\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],Ie=/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,_=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];function ds(e,a,t){var s=e+" ";switch(t){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"mm":return s+=1!==e&&(2===e||3===e||4===e)?"minute":"minuta";case"h":return"jedan sat";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1!==e&&(2===e||3===e||4===e)?"godine":"godina"}}c.defineLocale("br",{months:"Genver_C\u02bchwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C\u02bchwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc\u02bcher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:_,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[\u02bc\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:_,monthsRegex:Ie,monthsShortRegex:Ie,monthsStrictRegex:/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:Ye,longMonthsParse:Ye,shortMonthsParse:Ye,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc\u02bchoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec\u02bch da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s \u02bczo",s:"un nebeud segondenno\xf9",ss:"%d eilenn",m:"ur vunutenn",mm:rs,h:"un eur",hh:"%d eur",d:"un devezh",dd:rs,M:"ur miz",MM:rs,y:"ur bloaz",yy:function(e){switch(function e(a){if(9<a)return e(a%10);return a}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(a\xf1|vet)/,ordinal:function(e){return e+(1===e?"a\xf1":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,a,t){return e<12?"a.m.":"g.m."}}),c.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[pro\u0161lu] dddd [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:ds,m:function(e,a,t,s){switch(t){case"m":return a?"jedna minuta":s?"jednu minutu":"jedne minute"}},mm:ds,h:ds,hh:ds,d:"dan",dd:ds,M:"mjesec",MM:ds,y:"godinu",yy:ds},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),c.defineLocale("ca",{months:{standalone:"gener_febrer_mar\xe7_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de mar\xe7_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xe7_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[dem\xe0 a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aqu\xed %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(e,a){return e+("w"!==a&&"W"!==a?1===e?"r":2===e?"n":3===e?"r":4===e?"t":"\xe8":"a")},week:{dow:1,doy:4}});ye={standalone:"leden_\xfanor_b\u0159ezen_duben_kv\u011bten_\u010derven_\u010dervenec_srpen_z\xe1\u0159\xed_\u0159\xedjen_listopad_prosinec".split("_"),format:"ledna_\xfanora_b\u0159ezna_dubna_kv\u011btna_\u010dervna_\u010dervence_srpna_z\xe1\u0159\xed_\u0159\xedjna_listopadu_prosince".split("_"),isFormat:/DD?[o.]?(\[[^\[\]]*\]|\s)+MMMM/},na="led_\xfano_b\u0159e_dub_kv\u011b_\u010dvn_\u010dvc_srp_z\xe1\u0159_\u0159\xedj_lis_pro".split("_"),m=[/^led/i,/^\xfano/i,/^b\u0159e/i,/^dub/i,/^kv\u011b/i,/^(\u010dvn|\u010derven$|\u010dervna)/i,/^(\u010dvc|\u010dervenec|\u010dervence)/i,/^srp/i,/^z\xe1\u0159/i,/^\u0159\xedj/i,/^lis/i,/^pro/i],t=/^(leden|\xfanor|b\u0159ezen|duben|kv\u011bten|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|z\xe1\u0159\xed|\u0159\xedjen|listopad|prosinec|led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i;function _s(e){return 1<e&&e<5&&1!=~~(e/10)}function j(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"p\xe1r sekund":"p\xe1r sekundami";case"ss":return a||s?n+(_s(e)?"sekundy":"sekund"):n+"sekundami";case"m":return a?"minuta":s?"minutu":"minutou";case"mm":return a||s?n+(_s(e)?"minuty":"minut"):n+"minutami";case"h":return a?"hodina":s?"hodinu":"hodinou";case"hh":return a||s?n+(_s(e)?"hodiny":"hodin"):n+"hodinami";case"d":return a||s?"den":"dnem";case"dd":return a||s?n+(_s(e)?"dny":"dn\xed"):n+"dny";case"M":return a||s?"m\u011bs\xedc":"m\u011bs\xedcem";case"MM":return a||s?n+(_s(e)?"m\u011bs\xedce":"m\u011bs\xedc\u016f"):n+"m\u011bs\xedci";case"y":return a||s?"rok":"rokem";case"yy":return a||s?n+(_s(e)?"roky":"let"):n+"lety"}}function is(e,a,t,s){e={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?e[t][0]:e[t][1]}function os(e,a,t,s){e={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?e[t][0]:e[t][1]}function ms(e,a,t,s){e={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?e[t][0]:e[t][1]}c.defineLocale("cs",{months:ye,monthsShort:na,monthsRegex:t,monthsShortRegex:t,monthsStrictRegex:/^(leden|ledna|\xfanora|\xfanor|b\u0159ezen|b\u0159ezna|duben|dubna|kv\u011bten|kv\u011btna|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|srpna|z\xe1\u0159\xed|\u0159\xedjen|\u0159\xedjna|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i,monthsParse:m,longMonthsParse:m,shortMonthsParse:m,weekdays:"ned\u011ble_pond\u011bl\xed_\xfater\xfd_st\u0159eda_\u010dtvrtek_p\xe1tek_sobota".split("_"),weekdaysShort:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),weekdaysMin:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[z\xedtra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v ned\u011bli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve st\u0159edu v] LT";case 4:return"[ve \u010dtvrtek v] LT";case 5:return"[v p\xe1tek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[v\u010dera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou ned\u011bli v] LT";case 1:case 2:return"[minul\xe9] dddd [v] LT";case 3:return"[minulou st\u0159edu v] LT";case 4:case 5:return"[minul\xfd] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"p\u0159ed %s",s:j,ss:j,m:j,mm:j,h:j,hh:j,d:j,dd:j,M:j,MM:j,y:j,yy:j},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("cv",{months:"\u043a\u04d1\u0440\u043b\u0430\u0447_\u043d\u0430\u0440\u04d1\u0441_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440\u0442\u043c\u0435_\u0443\u0442\u04d1_\u04ab\u0443\u0440\u043b\u0430_\u0430\u0432\u04d1\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448\u0442\u0430\u0432".split("_"),monthsShort:"\u043a\u04d1\u0440_\u043d\u0430\u0440_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440_\u0443\u0442\u04d1_\u04ab\u0443\u0440_\u0430\u0432\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448".split("_"),weekdays:"\u0432\u044b\u0440\u0441\u0430\u0440\u043d\u0438\u043a\u0443\u043d_\u0442\u0443\u043d\u0442\u0438\u043a\u0443\u043d_\u044b\u0442\u043b\u0430\u0440\u0438\u043a\u0443\u043d_\u044e\u043d\u043a\u0443\u043d_\u043a\u04d7\u04ab\u043d\u0435\u0440\u043d\u0438\u043a\u0443\u043d_\u044d\u0440\u043d\u0435\u043a\u0443\u043d_\u0448\u04d1\u043c\u0430\u0442\u043a\u0443\u043d".split("_"),weekdaysShort:"\u0432\u044b\u0440_\u0442\u0443\u043d_\u044b\u0442\u043b_\u044e\u043d_\u043a\u04d7\u04ab_\u044d\u0440\u043d_\u0448\u04d1\u043c".split("_"),weekdaysMin:"\u0432\u0440_\u0442\u043d_\u044b\u0442_\u044e\u043d_\u043a\u04ab_\u044d\u0440_\u0448\u043c".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7]",LLL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm",LLLL:"dddd, YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm"},calendar:{sameDay:"[\u041f\u0430\u044f\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextDay:"[\u042b\u0440\u0430\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastDay:"[\u04d6\u043d\u0435\u0440] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextWeek:"[\u04aa\u0438\u0442\u0435\u0441] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastWeek:"[\u0418\u0440\u0442\u043d\u04d7] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",sameElse:"L"},relativeTime:{future:function(e){return e+(/\u0441\u0435\u0445\u0435\u0442$/i.exec(e)?"\u0440\u0435\u043d":/\u04ab\u0443\u043b$/i.exec(e)?"\u0442\u0430\u043d":"\u0440\u0430\u043d")},past:"%s \u043a\u0430\u044f\u043b\u043b\u0430",s:"\u043f\u04d7\u0440-\u0438\u043a \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",ss:"%d \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",m:"\u043f\u04d7\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u043f\u04d7\u0440 \u0441\u0435\u0445\u0435\u0442",hh:"%d \u0441\u0435\u0445\u0435\u0442",d:"\u043f\u04d7\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u043f\u04d7\u0440 \u0443\u0439\u04d1\u0445",MM:"%d \u0443\u0439\u04d1\u0445",y:"\u043f\u04d7\u0440 \u04ab\u0443\u043b",yy:"%d \u04ab\u0443\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-\u043c\u04d7\u0448/,ordinal:"%d-\u043c\u04d7\u0448",week:{dow:1,doy:7}}),c.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn \xf4l",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var a="";return 20<e?a=40===e||50===e||60===e||80===e||100===e?"fed":"ain":0<e&&(a=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+a},week:{dow:1,doy:4}}),c.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8n_man_tir_ons_tor_fre_l\xf8r".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"p\xe5 dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"f\xe5 sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"et \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("de-at",{months:"J\xe4nner_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"J\xe4n._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:is,mm:"%d Minuten",h:is,hh:"%d Stunden",d:is,dd:is,w:is,ww:"%d Wochen",M:is,MM:is,y:is,yy:is},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("de-ch",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:os,mm:"%d Minuten",h:os,hh:"%d Stunden",d:os,dd:os,w:os,ww:"%d Wochen",M:os,MM:os,y:os,yy:os},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("de",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:ms,mm:"%d Minuten",h:ms,hh:"%d Stunden",d:ms,dd:ms,w:ms,ww:"%d Wochen",M:ms,MM:ms,y:ms,yy:ms},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});o=["\u0796\u07ac\u0782\u07aa\u0787\u07a6\u0783\u07a9","\u078a\u07ac\u0784\u07b0\u0783\u07aa\u0787\u07a6\u0783\u07a9","\u0789\u07a7\u0783\u07a8\u0797\u07aa","\u0787\u07ad\u0795\u07b0\u0783\u07a9\u078d\u07aa","\u0789\u07ad","\u0796\u07ab\u0782\u07b0","\u0796\u07aa\u078d\u07a6\u0787\u07a8","\u0787\u07af\u078e\u07a6\u0790\u07b0\u0793\u07aa","\u0790\u07ac\u0795\u07b0\u0793\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0787\u07ae\u0786\u07b0\u0793\u07af\u0784\u07a6\u0783\u07aa","\u0782\u07ae\u0788\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0791\u07a8\u0790\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa"],n=["\u0787\u07a7\u078b\u07a8\u0787\u07b0\u078c\u07a6","\u0780\u07af\u0789\u07a6","\u0787\u07a6\u0782\u07b0\u078e\u07a7\u0783\u07a6","\u0784\u07aa\u078b\u07a6","\u0784\u07aa\u0783\u07a7\u0790\u07b0\u078a\u07a6\u078c\u07a8","\u0780\u07aa\u0786\u07aa\u0783\u07aa","\u0780\u07ae\u0782\u07a8\u0780\u07a8\u0783\u07aa"];c.defineLocale("dv",{months:o,monthsShort:o,weekdays:n,weekdaysShort:n,weekdaysMin:"\u0787\u07a7\u078b\u07a8_\u0780\u07af\u0789\u07a6_\u0787\u07a6\u0782\u07b0_\u0784\u07aa\u078b\u07a6_\u0784\u07aa\u0783\u07a7_\u0780\u07aa\u0786\u07aa_\u0780\u07ae\u0782\u07a8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0789\u0786|\u0789\u078a/,isPM:function(e){return"\u0789\u078a"===e},meridiem:function(e,a,t){return e<12?"\u0789\u0786":"\u0789\u078a"},calendar:{sameDay:"[\u0789\u07a8\u0787\u07a6\u078b\u07aa] LT",nextDay:"[\u0789\u07a7\u078b\u07a6\u0789\u07a7] LT",nextWeek:"dddd LT",lastDay:"[\u0787\u07a8\u0787\u07b0\u0794\u07ac] LT",lastWeek:"[\u078a\u07a7\u0787\u07a8\u078c\u07aa\u0788\u07a8] dddd LT",sameElse:"L"},relativeTime:{future:"\u078c\u07ac\u0783\u07ad\u078e\u07a6\u0787\u07a8 %s",past:"\u0786\u07aa\u0783\u07a8\u0782\u07b0 %s",s:"\u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa\u0786\u07ae\u0785\u07ac\u0787\u07b0",ss:"d% \u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa",m:"\u0789\u07a8\u0782\u07a8\u0793\u07ac\u0787\u07b0",mm:"\u0789\u07a8\u0782\u07a8\u0793\u07aa %d",h:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07ac\u0787\u07b0",hh:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07aa %d",d:"\u078b\u07aa\u0788\u07a6\u0780\u07ac\u0787\u07b0",dd:"\u078b\u07aa\u0788\u07a6\u0790\u07b0 %d",M:"\u0789\u07a6\u0780\u07ac\u0787\u07b0",MM:"\u0789\u07a6\u0790\u07b0 %d",y:"\u0787\u07a6\u0780\u07a6\u0783\u07ac\u0787\u07b0",yy:"\u0787\u07a6\u0780\u07a6\u0783\u07aa %d"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:7,doy:12}}),c.defineLocale("el",{monthsNominativeEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2_\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2_\u039c\u03ac\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2_\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2_\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2_\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2".split("_"),monthsGenitiveEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5_\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5_\u039c\u03b1\u0390\u03bf\u03c5_\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5_\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5_\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5_\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5_\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5".split("_"),months:function(e,a){return e?("string"==typeof a&&/D/.test(a.substring(0,a.indexOf("MMMM")))?this._monthsGenitiveEl:this._monthsNominativeEl)[e.month()]:this._monthsNominativeEl},monthsShort:"\u0399\u03b1\u03bd_\u03a6\u03b5\u03b2_\u039c\u03b1\u03c1_\u0391\u03c0\u03c1_\u039c\u03b1\u03ca_\u0399\u03bf\u03c5\u03bd_\u0399\u03bf\u03c5\u03bb_\u0391\u03c5\u03b3_\u03a3\u03b5\u03c0_\u039f\u03ba\u03c4_\u039d\u03bf\u03b5_\u0394\u03b5\u03ba".split("_"),weekdays:"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae_\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1_\u03a4\u03c1\u03af\u03c4\u03b7_\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7_\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7_\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae_\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf".split("_"),weekdaysShort:"\u039a\u03c5\u03c1_\u0394\u03b5\u03c5_\u03a4\u03c1\u03b9_\u03a4\u03b5\u03c4_\u03a0\u03b5\u03bc_\u03a0\u03b1\u03c1_\u03a3\u03b1\u03b2".split("_"),weekdaysMin:"\u039a\u03c5_\u0394\u03b5_\u03a4\u03c1_\u03a4\u03b5_\u03a0\u03b5_\u03a0\u03b1_\u03a3\u03b1".split("_"),meridiem:function(e,a,t){return 11<e?t?"\u03bc\u03bc":"\u039c\u039c":t?"\u03c0\u03bc":"\u03a0\u039c"},isPM:function(e){return"\u03bc"===(e+"").toLowerCase()[0]},meridiemParse:/[\u03a0\u039c]\.?\u039c?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[\u03a3\u03ae\u03bc\u03b5\u03c1\u03b1 {}] LT",nextDay:"[\u0391\u03cd\u03c1\u03b9\u03bf {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[\u03a7\u03b8\u03b5\u03c2 {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[\u03c4\u03bf \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf] dddd [{}] LT";default:return"[\u03c4\u03b7\u03bd \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,a){var t,e=this._calendarEl[e],s=a&&a.hours();return t=e,(e="undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)?e.apply(a):e).replace("{}",s%12==1?"\u03c3\u03c4\u03b7":"\u03c3\u03c4\u03b9\u03c2")},relativeTime:{future:"\u03c3\u03b5 %s",past:"%s \u03c0\u03c1\u03b9\u03bd",s:"\u03bb\u03af\u03b3\u03b1 \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",ss:"%d \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",m:"\u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",mm:"%d \u03bb\u03b5\u03c0\u03c4\u03ac",h:"\u03bc\u03af\u03b1 \u03ce\u03c1\u03b1",hh:"%d \u03ce\u03c1\u03b5\u03c2",d:"\u03bc\u03af\u03b1 \u03bc\u03ad\u03c1\u03b1",dd:"%d \u03bc\u03ad\u03c1\u03b5\u03c2",M:"\u03ad\u03bd\u03b1\u03c2 \u03bc\u03ae\u03bd\u03b1\u03c2",MM:"%d \u03bc\u03ae\u03bd\u03b5\u03c2",y:"\u03ad\u03bd\u03b1\u03c2 \u03c7\u03c1\u03cc\u03bd\u03bf\u03c2",yy:"%d \u03c7\u03c1\u03cc\u03bd\u03b9\u03b1"},dayOfMonthOrdinalParse:/\d{1,2}\u03b7/,ordinal:"%d\u03b7",week:{dow:1,doy:4}}),c.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:0,doy:4}}),c.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")}}),c.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}}),c.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}}),c.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")}}),c.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:0,doy:6}}),c.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}}),c.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}}),c.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_a\u016dgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_a\u016dg_sept_okt_nov_dec".split("_"),weekdays:"diman\u0109o_lundo_mardo_merkredo_\u0135a\u016ddo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_\u0135a\u016d_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_\u0135a_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,a,t){return 11<e?t?"p.t.m.":"P.T.M.":t?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodia\u016d je] LT",nextDay:"[Morga\u016d je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hiera\u016d je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"anta\u016d %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});var us="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),ls="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],ze=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,Ms=(c.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?(/-MMM-/.test(a)?ls:us)[e.month()]:us},monthsRegex:ze,monthsShortRegex:ze,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_")),hs="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),M=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],jt=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,cs=(c.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?(/-MMM-/.test(a)?hs:Ms)[e.month()]:Ms},monthsRegex:jt,monthsShortRegex:jt,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:M,longMonthsParse:M,shortMonthsParse:M,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:4},invalidDate:"Fecha inv\xe1lida"}),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_")),Ls="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),xt=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],v=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,Ys=(c.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?(/-MMM-/.test(a)?Ls:cs)[e.month()]:cs},monthsRegex:v,monthsShortRegex:v,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:xt,longMonthsParse:xt,shortMonthsParse:xt,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:6}}),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_")),ys="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),da=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],pe=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;function fs(e,a,t,s){e={s:["m\xf5ne sekundi","m\xf5ni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["\xfche minuti","\xfcks minut"],mm:[e+" minuti",e+" minutit"],h:["\xfche tunni","tund aega","\xfcks tund"],hh:[e+" tunni",e+" tundi"],d:["\xfche p\xe4eva","\xfcks p\xe4ev"],M:["kuu aja","kuu aega","\xfcks kuu"],MM:[e+" kuu",e+" kuud"],y:["\xfche aasta","aasta","\xfcks aasta"],yy:[e+" aasta",e+" aastat"]};return a?e[t][2]||e[t][1]:s?e[t][0]:e[t][1]}c.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,a){return e?(/-MMM-/.test(a)?ys:Ys)[e.month()]:Ys},monthsRegex:pe,monthsShortRegex:pe,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:da,longMonthsParse:da,shortMonthsParse:da,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4},invalidDate:"Fecha inv\xe1lida"}),c.defineLocale("et",{months:"jaanuar_veebruar_m\xe4rts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_m\xe4rts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"p\xfchap\xe4ev_esmasp\xe4ev_teisip\xe4ev_kolmap\xe4ev_neljap\xe4ev_reede_laup\xe4ev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[T\xe4na,] LT",nextDay:"[Homme,] LT",nextWeek:"[J\xe4rgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s p\xe4rast",past:"%s tagasi",s:fs,ss:fs,m:fs,mm:fs,h:fs,hh:fs,d:fs,dd:"%d p\xe4eva",M:fs,MM:fs,y:fs,yy:fs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var ks={1:"\u06f1",2:"\u06f2",3:"\u06f3",4:"\u06f4",5:"\u06f5",6:"\u06f6",7:"\u06f7",8:"\u06f8",9:"\u06f9",0:"\u06f0"},ps={"\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u06f0":"0"},Ds=(c.defineLocale("fa",{months:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),monthsShort:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),weekdays:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysShort:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u062c_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631|\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/,isPM:function(e){return/\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/.test(e)},meridiem:function(e,a,t){return e<12?"\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631":"\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631"},calendar:{sameDay:"[\u0627\u0645\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",nextDay:"[\u0641\u0631\u062f\u0627 \u0633\u0627\u0639\u062a] LT",nextWeek:"dddd [\u0633\u0627\u0639\u062a] LT",lastDay:"[\u062f\u06cc\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",lastWeek:"dddd [\u067e\u06cc\u0634] [\u0633\u0627\u0639\u062a] LT",sameElse:"L"},relativeTime:{future:"\u062f\u0631 %s",past:"%s \u067e\u06cc\u0634",s:"\u0686\u0646\u062f \u062b\u0627\u0646\u06cc\u0647",ss:"%d \u062b\u0627\u0646\u06cc\u0647",m:"\u06cc\u06a9 \u062f\u0642\u06cc\u0642\u0647",mm:"%d \u062f\u0642\u06cc\u0642\u0647",h:"\u06cc\u06a9 \u0633\u0627\u0639\u062a",hh:"%d \u0633\u0627\u0639\u062a",d:"\u06cc\u06a9 \u0631\u0648\u0632",dd:"%d \u0631\u0648\u0632",M:"\u06cc\u06a9 \u0645\u0627\u0647",MM:"%d \u0645\u0627\u0647",y:"\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/[\u06f0-\u06f9]/g,function(e){return ps[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return ks[e]}).replace(/,/g,"\u060c")},dayOfMonthOrdinalParse:/\d{1,2}\u0645/,ordinal:"%d\u0645",week:{dow:6,doy:12}}),"nolla yksi kaksi kolme nelj\xe4 viisi kuusi seitsem\xe4n kahdeksan yhdeks\xe4n".split(" ")),Ts=["nolla","yhden","kahden","kolmen","nelj\xe4n","viiden","kuuden",Ds[7],Ds[8],Ds[9]];function x(e,a,t,s){var n="";switch(t){case"s":return s?"muutaman sekunnin":"muutama sekunti";case"ss":n=s?"sekunnin":"sekuntia";break;case"m":return s?"minuutin":"minuutti";case"mm":n=s?"minuutin":"minuuttia";break;case"h":return s?"tunnin":"tunti";case"hh":n=s?"tunnin":"tuntia";break;case"d":return s?"p\xe4iv\xe4n":"p\xe4iv\xe4";case"dd":n=s?"p\xe4iv\xe4n":"p\xe4iv\xe4\xe4";break;case"M":return s?"kuukauden":"kuukausi";case"MM":n=s?"kuukauden":"kuukautta";break;case"y":return s?"vuoden":"vuosi";case"yy":n=s?"vuoden":"vuotta";break}return t=s,n=((e=e)<10?(t?Ts:Ds)[e]:e)+" "+n}c.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kes\xe4kuu_hein\xe4kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kes\xe4_hein\xe4_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[t\xe4n\xe4\xe4n] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s p\xe4\xe4st\xe4",past:"%s sitten",s:x,ss:x,m:x,mm:x,h:x,hh:x,d:x,dd:x,M:x,MM:x,y:x,yy:x},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}}),c.defineLocale("fo",{months:"januar_februar_mars_apr\xedl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_m\xe1nadagur_t\xfdsdagur_mikudagur_h\xf3sdagur_fr\xedggjadagur_leygardagur".split("_"),weekdaysShort:"sun_m\xe1n_t\xfds_mik_h\xf3s_fr\xed_ley".split("_"),weekdaysMin:"su_m\xe1_t\xfd_mi_h\xf3_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[\xcd dag kl.] LT",nextDay:"[\xcd morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xcd gj\xe1r kl.] LT",lastWeek:"[s\xed\xf0stu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s s\xed\xf0ani",s:"f\xe1 sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein t\xedmi",hh:"%d t\xedmar",d:"ein dagur",dd:"%d dagar",M:"ein m\xe1na\xf0ur",MM:"%d m\xe1na\xf0ir",y:"eitt \xe1r",yy:"%d \xe1r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("fr-ca",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,a){switch(a){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}}),c.defineLocale("fr-ch",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,a){switch(a){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});var u=/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?|janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,Le=[/^janv/i,/^f\xe9vr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^ao\xfbt/i,/^sept/i,/^oct/i,/^nov/i,/^d\xe9c/i],gs=(c.defineLocale("fr",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsRegex:u,monthsShortRegex:u,monthsStrictRegex:/^(janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,monthsShortStrictRegex:/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?)/i,monthsParse:Le,longMonthsParse:Le,shortMonthsParse:Le,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,a){switch(a){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}}),"jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_")),ws="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");c.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,a){return e?(/-MMM-/.test(a)?ws:gs)[e.month()]:gs},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[\xf4fr\xfbne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien min\xfat",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),c.defineLocale("ga",{months:["Ean\xe1ir","Feabhra","M\xe1rta","Aibre\xe1n","Bealtaine","Meitheamh","I\xfail","L\xfanasa","Me\xe1n F\xf3mhair","Deireadh F\xf3mhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","M\xe1rt","Aib","Beal","Meith","I\xfail","L\xfan","M.F.","D.F.","Samh","Noll"],monthsParseExact:!0,weekdays:["D\xe9 Domhnaigh","D\xe9 Luain","D\xe9 M\xe1irt","D\xe9 C\xe9adaoin","D\xe9ardaoin","D\xe9 hAoine","D\xe9 Sathairn"],weekdaysShort:["Domh","Luan","M\xe1irt","C\xe9ad","D\xe9ar","Aoine","Sath"],weekdaysMin:["Do","Lu","M\xe1","C\xe9","D\xe9","A","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Am\xe1rach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inn\xe9 ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s \xf3 shin",s:"c\xfapla soicind",ss:"%d soicind",m:"n\xf3im\xe9ad",mm:"%d n\xf3im\xe9ad",h:"uair an chloig",hh:"%d uair an chloig",d:"l\xe1",dd:"%d l\xe1",M:"m\xed",MM:"%d m\xedonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}});function P(e,a,t,s){e={s:["\u0925\u094b\u0921\u092f\u093e \u0938\u0945\u0915\u0902\u0921\u093e\u0902\u0928\u0940","\u0925\u094b\u0921\u0947 \u0938\u0945\u0915\u0902\u0921"],ss:[e+" \u0938\u0945\u0915\u0902\u0921\u093e\u0902\u0928\u0940",e+" \u0938\u0945\u0915\u0902\u0921"],m:["\u090f\u0915\u093e \u092e\u093f\u0923\u091f\u093e\u0928","\u090f\u0915 \u092e\u093f\u0928\u0942\u091f"],mm:[e+" \u092e\u093f\u0923\u091f\u093e\u0902\u0928\u0940",e+" \u092e\u093f\u0923\u091f\u093e\u0902"],h:["\u090f\u0915\u093e \u0935\u0930\u093e\u0928","\u090f\u0915 \u0935\u0930"],hh:[e+" \u0935\u0930\u093e\u0902\u0928\u0940",e+" \u0935\u0930\u093e\u0902"],d:["\u090f\u0915\u093e \u0926\u093f\u0938\u093e\u0928","\u090f\u0915 \u0926\u0940\u0938"],dd:[e+" \u0926\u093f\u0938\u093e\u0902\u0928\u0940",e+" \u0926\u0940\u0938"],M:["\u090f\u0915\u093e \u092e\u094d\u0939\u092f\u0928\u094d\u092f\u093e\u0928","\u090f\u0915 \u092e\u094d\u0939\u092f\u0928\u094b"],MM:[e+" \u092e\u094d\u0939\u092f\u0928\u094d\u092f\u093e\u0928\u0940",e+" \u092e\u094d\u0939\u092f\u0928\u0947"],y:["\u090f\u0915\u093e \u0935\u0930\u094d\u0938\u093e\u0928","\u090f\u0915 \u0935\u0930\u094d\u0938"],yy:[e+" \u0935\u0930\u094d\u0938\u093e\u0902\u0928\u0940",e+" \u0935\u0930\u094d\u0938\u093e\u0902"]};return s?e[t][0]:e[t][1]}function bs(e,a,t,s){e={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return s?e[t][0]:e[t][1]}c.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am M\xe0rt","An Giblean","An C\xe8itean","An t-\xd2gmhios","An t-Iuchar","An L\xf9nastal","An t-Sultain","An D\xe0mhair","An t-Samhain","An D\xf9bhlachd"],monthsShort:["Faoi","Gear","M\xe0rt","Gibl","C\xe8it","\xd2gmh","Iuch","L\xf9n","Sult","D\xe0mh","Samh","D\xf9bh"],monthsParseExact:!0,weekdays:["Did\xf2mhnaich","Diluain","Dim\xe0irt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["D\xf2","Lu","M\xe0","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-m\xe0ireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-d\xe8 aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"m\xecos",MM:"%d m\xecosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}}),c.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xu\xf1o_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xu\xf1._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_m\xe9rcores_xoves_venres_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._m\xe9r._xov._ven._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_m\xe9_xo_ve_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextDay:function(){return"[ma\xf1\xe1 "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"\xe1s":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"\xe1":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"\xe1s":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),c.defineLocale("gom-deva",{months:{standalone:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u0940\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u092f_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),format:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940\u091a\u094d\u092f\u093e_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940\u091a\u094d\u092f\u093e_\u092e\u093e\u0930\u094d\u091a\u093e\u091a\u094d\u092f\u093e_\u090f\u092a\u094d\u0930\u0940\u0932\u093e\u091a\u094d\u092f\u093e_\u092e\u0947\u092f\u093e\u091a\u094d\u092f\u093e_\u091c\u0942\u0928\u093e\u091a\u094d\u092f\u093e_\u091c\u0941\u0932\u092f\u093e\u091a\u094d\u092f\u093e_\u0911\u0917\u0938\u094d\u091f\u093e\u091a\u094d\u092f\u093e_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0911\u0915\u094d\u091f\u094b\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0921\u093f\u0938\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u0940._\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u092f\u0924\u093e\u0930_\u0938\u094b\u092e\u093e\u0930_\u092e\u0902\u0917\u0933\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u092c\u093f\u0930\u0947\u0938\u094d\u0924\u093e\u0930_\u0938\u0941\u0915\u094d\u0930\u093e\u0930_\u0936\u0947\u0928\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0906\u092f\u0924._\u0938\u094b\u092e._\u092e\u0902\u0917\u0933._\u092c\u0941\u0927._\u092c\u094d\u0930\u0947\u0938\u094d\u0924._\u0938\u0941\u0915\u094d\u0930._\u0936\u0947\u0928.".split("_"),weekdaysMin:"\u0906_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u092c\u094d\u0930\u0947_\u0938\u0941_\u0936\u0947".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",LTS:"A h:mm:ss [\u0935\u093e\u091c\u0924\u093e\u0902]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",llll:"ddd, D MMM YYYY, A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]"},calendar:{sameDay:"[\u0906\u092f\u091c] LT",nextDay:"[\u092b\u093e\u0932\u094d\u092f\u093e\u0902] LT",nextWeek:"[\u092b\u0941\u0921\u0932\u094b] dddd[,] LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092b\u093e\u091f\u0932\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s \u0906\u0926\u0940\u0902",s:P,ss:P,m:P,mm:P,h:P,hh:P,d:P,dd:P,M:P,MM:P,y:P,yy:P},dayOfMonthOrdinalParse:/\d{1,2}(\u0935\u0947\u0930)/,ordinal:function(e,a){switch(a){case"D":return e+"\u0935\u0947\u0930";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/\u0930\u093e\u0924\u0940|\u0938\u0915\u093e\u0933\u0940\u0902|\u0926\u0928\u092a\u093e\u0930\u093e\u0902|\u0938\u093e\u0902\u091c\u0947/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924\u0940"===a?e<4?e:e+12:"\u0938\u0915\u093e\u0933\u0940\u0902"===a?e:"\u0926\u0928\u092a\u093e\u0930\u093e\u0902"===a?12<e?e:e+12:"\u0938\u093e\u0902\u091c\u0947"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0930\u093e\u0924\u0940":e<12?"\u0938\u0915\u093e\u0933\u0940\u0902":e<16?"\u0926\u0928\u092a\u093e\u0930\u093e\u0902":e<20?"\u0938\u093e\u0902\u091c\u0947":"\u0930\u093e\u0924\u0940"}}),c.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:bs,ss:bs,m:bs,mm:bs,h:bs,hh:bs,d:bs,dd:bs,M:bs,MM:bs,y:bs,yy:bs},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,a){switch(a){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,a){return 12===e&&(e=0),"rati"===a?e<4?e:e+12:"sokallim"===a?e:"donparam"===a?12<e?e:e+12:"sanje"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}});var Hs={1:"\u0ae7",2:"\u0ae8",3:"\u0ae9",4:"\u0aea",5:"\u0aeb",6:"\u0aec",7:"\u0aed",8:"\u0aee",9:"\u0aef",0:"\u0ae6"},Ss={"\u0ae7":"1","\u0ae8":"2","\u0ae9":"3","\u0aea":"4","\u0aeb":"5","\u0aec":"6","\u0aed":"7","\u0aee":"8","\u0aef":"9","\u0ae6":"0"},vs=(c.defineLocale("gu",{months:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0_\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0_\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2_\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe\u0a88_\u0a91\u0a97\u0ab8\u0acd\u0a9f_\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0a91\u0a95\u0acd\u0a9f\u0acd\u0aac\u0ab0_\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0".split("_"),monthsShort:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1._\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1._\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf._\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe._\u0a91\u0a97._\u0ab8\u0aaa\u0acd\u0a9f\u0ac7._\u0a91\u0a95\u0acd\u0a9f\u0acd._\u0aa8\u0ab5\u0ac7._\u0aa1\u0abf\u0ab8\u0ac7.".split("_"),monthsParseExact:!0,weekdays:"\u0ab0\u0ab5\u0abf\u0ab5\u0abe\u0ab0_\u0ab8\u0acb\u0aae\u0ab5\u0abe\u0ab0_\u0aae\u0a82\u0a97\u0ab3\u0ab5\u0abe\u0ab0_\u0aac\u0ac1\u0aa7\u0acd\u0ab5\u0abe\u0ab0_\u0a97\u0ac1\u0ab0\u0ac1\u0ab5\u0abe\u0ab0_\u0ab6\u0ac1\u0a95\u0acd\u0ab0\u0ab5\u0abe\u0ab0_\u0ab6\u0aa8\u0abf\u0ab5\u0abe\u0ab0".split("_"),weekdaysShort:"\u0ab0\u0ab5\u0abf_\u0ab8\u0acb\u0aae_\u0aae\u0a82\u0a97\u0ab3_\u0aac\u0ac1\u0aa7\u0acd_\u0a97\u0ac1\u0ab0\u0ac1_\u0ab6\u0ac1\u0a95\u0acd\u0ab0_\u0ab6\u0aa8\u0abf".split("_"),weekdaysMin:"\u0ab0_\u0ab8\u0acb_\u0aae\u0a82_\u0aac\u0ac1_\u0a97\u0ac1_\u0ab6\u0ac1_\u0ab6".split("_"),longDateFormat:{LT:"A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LTS:"A h:mm:ss \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LLLL:"dddd, D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7"},calendar:{sameDay:"[\u0a86\u0a9c] LT",nextDay:"[\u0a95\u0abe\u0ab2\u0ac7] LT",nextWeek:"dddd, LT",lastDay:"[\u0a97\u0a87\u0a95\u0abe\u0ab2\u0ac7] LT",lastWeek:"[\u0aaa\u0abe\u0a9b\u0ab2\u0abe] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0aae\u0abe",past:"%s \u0aaa\u0ab9\u0ac7\u0ab2\u0abe",s:"\u0a85\u0aae\u0ac1\u0a95 \u0aaa\u0ab3\u0acb",ss:"%d \u0ab8\u0ac7\u0a95\u0a82\u0aa1",m:"\u0a8f\u0a95 \u0aae\u0abf\u0aa8\u0abf\u0a9f",mm:"%d \u0aae\u0abf\u0aa8\u0abf\u0a9f",h:"\u0a8f\u0a95 \u0a95\u0ab2\u0abe\u0a95",hh:"%d \u0a95\u0ab2\u0abe\u0a95",d:"\u0a8f\u0a95 \u0aa6\u0abf\u0ab5\u0ab8",dd:"%d \u0aa6\u0abf\u0ab5\u0ab8",M:"\u0a8f\u0a95 \u0aae\u0ab9\u0abf\u0aa8\u0acb",MM:"%d \u0aae\u0ab9\u0abf\u0aa8\u0acb",y:"\u0a8f\u0a95 \u0ab5\u0ab0\u0acd\u0ab7",yy:"%d \u0ab5\u0ab0\u0acd\u0ab7"},preparse:function(e){return e.replace(/[\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef\u0ae6]/g,function(e){return Ss[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Hs[e]})},meridiemParse:/\u0ab0\u0abe\u0aa4|\u0aac\u0aaa\u0acb\u0ab0|\u0ab8\u0ab5\u0abe\u0ab0|\u0ab8\u0abe\u0a82\u0a9c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0ab0\u0abe\u0aa4"===a?e<4?e:e+12:"\u0ab8\u0ab5\u0abe\u0ab0"===a?e:"\u0aac\u0aaa\u0acb\u0ab0"===a?10<=e?e:e+12:"\u0ab8\u0abe\u0a82\u0a9c"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0ab0\u0abe\u0aa4":e<10?"\u0ab8\u0ab5\u0abe\u0ab0":e<17?"\u0aac\u0aaa\u0acb\u0ab0":e<20?"\u0ab8\u0abe\u0a82\u0a9c":"\u0ab0\u0abe\u0aa4"},week:{dow:0,doy:6}}),c.defineLocale("he",{months:"\u05d9\u05e0\u05d5\u05d0\u05e8_\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05d9\u05dc_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8_\u05e1\u05e4\u05d8\u05de\u05d1\u05e8_\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8_\u05e0\u05d5\u05d1\u05de\u05d1\u05e8_\u05d3\u05e6\u05de\u05d1\u05e8".split("_"),monthsShort:"\u05d9\u05e0\u05d5\u05f3_\u05e4\u05d1\u05e8\u05f3_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05f3_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05f3_\u05e1\u05e4\u05d8\u05f3_\u05d0\u05d5\u05e7\u05f3_\u05e0\u05d5\u05d1\u05f3_\u05d3\u05e6\u05de\u05f3".split("_"),weekdays:"\u05e8\u05d0\u05e9\u05d5\u05df_\u05e9\u05e0\u05d9_\u05e9\u05dc\u05d9\u05e9\u05d9_\u05e8\u05d1\u05d9\u05e2\u05d9_\u05d7\u05de\u05d9\u05e9\u05d9_\u05e9\u05d9\u05e9\u05d9_\u05e9\u05d1\u05ea".split("_"),weekdaysShort:"\u05d0\u05f3_\u05d1\u05f3_\u05d2\u05f3_\u05d3\u05f3_\u05d4\u05f3_\u05d5\u05f3_\u05e9\u05f3".split("_"),weekdaysMin:"\u05d0_\u05d1_\u05d2_\u05d3_\u05d4_\u05d5_\u05e9".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [\u05d1]MMMM YYYY",LLL:"D [\u05d1]MMMM YYYY HH:mm",LLLL:"dddd, D [\u05d1]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[\u05d4\u05d9\u05d5\u05dd \u05d1\u05be]LT",nextDay:"[\u05de\u05d7\u05e8 \u05d1\u05be]LT",nextWeek:"dddd [\u05d1\u05e9\u05e2\u05d4] LT",lastDay:"[\u05d0\u05ea\u05de\u05d5\u05dc \u05d1\u05be]LT",lastWeek:"[\u05d1\u05d9\u05d5\u05dd] dddd [\u05d4\u05d0\u05d7\u05e8\u05d5\u05df \u05d1\u05e9\u05e2\u05d4] LT",sameElse:"L"},relativeTime:{future:"\u05d1\u05e2\u05d5\u05d3 %s",past:"\u05dc\u05e4\u05e0\u05d9 %s",s:"\u05de\u05e1\u05e4\u05e8 \u05e9\u05e0\u05d9\u05d5\u05ea",ss:"%d \u05e9\u05e0\u05d9\u05d5\u05ea",m:"\u05d3\u05e7\u05d4",mm:"%d \u05d3\u05e7\u05d5\u05ea",h:"\u05e9\u05e2\u05d4",hh:function(e){return 2===e?"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd":e+" \u05e9\u05e2\u05d5\u05ea"},d:"\u05d9\u05d5\u05dd",dd:function(e){return 2===e?"\u05d9\u05d5\u05de\u05d9\u05d9\u05dd":e+" \u05d9\u05de\u05d9\u05dd"},M:"\u05d7\u05d5\u05d3\u05e9",MM:function(e){return 2===e?"\u05d7\u05d5\u05d3\u05e9\u05d9\u05d9\u05dd":e+" \u05d7\u05d5\u05d3\u05e9\u05d9\u05dd"},y:"\u05e9\u05e0\u05d4",yy:function(e){return 2===e?"\u05e9\u05e0\u05ea\u05d9\u05d9\u05dd":e%10==0&&10!==e?e+" \u05e9\u05e0\u05d4":e+" \u05e9\u05e0\u05d9\u05dd"}},meridiemParse:/\u05d0\u05d7\u05d4"\u05e6|\u05dc\u05e4\u05e0\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8|\u05d1\u05d1\u05d5\u05e7\u05e8|\u05d1\u05e2\u05e8\u05d1/i,isPM:function(e){return/^(\u05d0\u05d7\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05d1\u05e2\u05e8\u05d1)$/.test(e)},meridiem:function(e,a,t){return e<5?"\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8":e<10?"\u05d1\u05d1\u05d5\u05e7\u05e8":e<12?t?'\u05dc\u05e4\u05e0\u05d4"\u05e6':"\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":e<18?t?'\u05d0\u05d7\u05d4"\u05e6':"\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":"\u05d1\u05e2\u05e8\u05d1"}}),{1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"}),js={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"},a=[/^\u091c\u0928/i,/^\u092b\u093c\u0930|\u092b\u0930/i,/^\u092e\u093e\u0930\u094d\u091a/i,/^\u0905\u092a\u094d\u0930\u0948/i,/^\u092e\u0908/i,/^\u091c\u0942\u0928/i,/^\u091c\u0941\u0932/i,/^\u0905\u0917/i,/^\u0938\u093f\u0924\u0902|\u0938\u093f\u0924/i,/^\u0905\u0915\u094d\u091f\u0942/i,/^\u0928\u0935|\u0928\u0935\u0902/i,/^\u0926\u093f\u0938\u0902|\u0926\u093f\u0938/i];function xs(e,a,t){var s=e+" ";switch(t){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return a?"jedna minuta":"jedne minute";case"mm":return s+=1!==e&&(2===e||3===e||4===e)?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1!==e&&(2===e||3===e||4===e)?"godine":"godina"}}c.defineLocale("hi",{months:{format:"\u091c\u0928\u0935\u0930\u0940_\u092b\u093c\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u0932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u092e\u094d\u092c\u0930_\u0926\u093f\u0938\u092e\u094d\u092c\u0930".split("_"),standalone:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u0932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u0902\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u0902\u092c\u0930_\u0926\u093f\u0938\u0902\u092c\u0930".split("_")},monthsShort:"\u091c\u0928._\u092b\u093c\u0930._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948._\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0905\u0917._\u0938\u093f\u0924._\u0905\u0915\u094d\u091f\u0942._\u0928\u0935._\u0926\u093f\u0938.".split("_"),weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0932\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0932_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u092c\u091c\u0947",LTS:"A h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A h:mm \u092c\u091c\u0947"},monthsParse:a,longMonthsParse:a,shortMonthsParse:[/^\u091c\u0928/i,/^\u092b\u093c\u0930/i,/^\u092e\u093e\u0930\u094d\u091a/i,/^\u0905\u092a\u094d\u0930\u0948/i,/^\u092e\u0908/i,/^\u091c\u0942\u0928/i,/^\u091c\u0941\u0932/i,/^\u0905\u0917/i,/^\u0938\u093f\u0924/i,/^\u0905\u0915\u094d\u091f\u0942/i,/^\u0928\u0935/i,/^\u0926\u093f\u0938/i],monthsRegex:/^(\u091c\u0928\u0935\u0930\u0940|\u091c\u0928\.?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908|\u091c\u0941\u0932\.?|\u0905\u0917\u0938\u094d\u0924|\u0905\u0917\.?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930|\u0928\u0935\.?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930|\u0926\u093f\u0938\.?)/i,monthsShortRegex:/^(\u091c\u0928\u0935\u0930\u0940|\u091c\u0928\.?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908|\u091c\u0941\u0932\.?|\u0905\u0917\u0938\u094d\u0924|\u0905\u0917\.?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930|\u0928\u0935\.?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930|\u0926\u093f\u0938\.?)/i,monthsStrictRegex:/^(\u091c\u0928\u0935\u0930\u0940?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908?|\u0905\u0917\u0938\u094d\u0924?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924?\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930?)/i,monthsShortStrictRegex:/^(\u091c\u0928\.?|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\.?|\u0905\u0917\.?|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\.?|\u0926\u093f\u0938\.?)/i,calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0915\u0932] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u0932] LT",lastWeek:"[\u092a\u093f\u091b\u0932\u0947] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u092e\u0947\u0902",past:"%s \u092a\u0939\u0932\u0947",s:"\u0915\u0941\u091b \u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0902\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u091f",mm:"%d \u092e\u093f\u0928\u091f",h:"\u090f\u0915 \u0918\u0902\u091f\u093e",hh:"%d \u0918\u0902\u091f\u0947",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u0940\u0928\u0947",MM:"%d \u092e\u0939\u0940\u0928\u0947",y:"\u090f\u0915 \u0935\u0930\u094d\u0937",yy:"%d \u0935\u0930\u094d\u0937"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return js[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return vs[e]})},meridiemParse:/\u0930\u093e\u0924|\u0938\u0941\u092c\u0939|\u0926\u094b\u092a\u0939\u0930|\u0936\u093e\u092e/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924"===a?e<4?e:e+12:"\u0938\u0941\u092c\u0939"===a?e:"\u0926\u094b\u092a\u0939\u0930"===a?10<=e?e:e+12:"\u0936\u093e\u092e"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0930\u093e\u0924":e<10?"\u0938\u0941\u092c\u0939":e<17?"\u0926\u094b\u092a\u0939\u0930":e<20?"\u0936\u093e\u092e":"\u0930\u093e\u0924"},week:{dow:0,doy:6}}),c.defineLocale("hr",{months:{format:"sije\u010dnja_velja\u010de_o\u017eujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"sije\u010danj_velja\u010da_o\u017eujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._o\u017eu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:return"[pro\u0161lu] [nedjelju] [u] LT";case 3:return"[pro\u0161lu] [srijedu] [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:xs,m:xs,mm:xs,h:xs,hh:xs,d:"dan",dd:xs,M:"mjesec",MM:xs,y:"godinu",yy:xs},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Ps="vas\xe1rnap h\xe9tf\u0151n kedden szerd\xe1n cs\xfct\xf6rt\xf6k\xf6n p\xe9nteken szombaton".split(" ");function Os(e,a,t,s){var n=e;switch(t){case"s":return s||a?"n\xe9h\xe1ny m\xe1sodperc":"n\xe9h\xe1ny m\xe1sodperce";case"ss":return n+(s||a)?" m\xe1sodperc":" m\xe1sodperce";case"m":return"egy"+(s||a?" perc":" perce");case"mm":return n+(s||a?" perc":" perce");case"h":return"egy"+(s||a?" \xf3ra":" \xf3r\xe1ja");case"hh":return n+(s||a?" \xf3ra":" \xf3r\xe1ja");case"d":return"egy"+(s||a?" nap":" napja");case"dd":return n+(s||a?" nap":" napja");case"M":return"egy"+(s||a?" h\xf3nap":" h\xf3napja");case"MM":return n+(s||a?" h\xf3nap":" h\xf3napja");case"y":return"egy"+(s||a?" \xe9v":" \xe9ve");case"yy":return n+(s||a?" \xe9v":" \xe9ve")}return""}function Ws(e){return(e?"":"[m\xfalt] ")+"["+Ps[this.day()]+"] LT[-kor]"}function As(e){return e%100==11||e%10!=1}function Es(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"nokkrar sek\xfandur":"nokkrum sek\xfandum";case"ss":return As(e)?n+(a||s?"sek\xfandur":"sek\xfandum"):n+"sek\xfanda";case"m":return a?"m\xedn\xfata":"m\xedn\xfatu";case"mm":return As(e)?n+(a||s?"m\xedn\xfatur":"m\xedn\xfatum"):a?n+"m\xedn\xfata":n+"m\xedn\xfatu";case"hh":return As(e)?n+(a||s?"klukkustundir":"klukkustundum"):n+"klukkustund";case"d":return a?"dagur":s?"dag":"degi";case"dd":return As(e)?a?n+"dagar":n+(s?"daga":"d\xf6gum"):a?n+"dagur":n+(s?"dag":"degi");case"M":return a?"m\xe1nu\xf0ur":s?"m\xe1nu\xf0":"m\xe1nu\xf0i";case"MM":return As(e)?a?n+"m\xe1nu\xf0ir":n+(s?"m\xe1nu\xf0i":"m\xe1nu\xf0um"):a?n+"m\xe1nu\xf0ur":n+(s?"m\xe1nu\xf0":"m\xe1nu\xf0i");case"y":return a||s?"\xe1r":"\xe1ri";case"yy":return As(e)?n+(a||s?"\xe1r":"\xe1rum"):n+(a||s?"\xe1r":"\xe1ri")}}c.defineLocale("hu",{months:"janu\xe1r_febru\xe1r_m\xe1rcius_\xe1prilis_m\xe1jus_j\xfanius_j\xfalius_augusztus_szeptember_okt\xf3ber_november_december".split("_"),monthsShort:"jan._feb._m\xe1rc._\xe1pr._m\xe1j._j\xfan._j\xfal._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vas\xe1rnap_h\xe9tf\u0151_kedd_szerda_cs\xfct\xf6rt\xf6k_p\xe9ntek_szombat".split("_"),weekdaysShort:"vas_h\xe9t_kedd_sze_cs\xfct_p\xe9n_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,a,t){return e<12?!0===t?"de":"DE":!0===t?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return Ws.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return Ws.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s m\xfalva",past:"%s",s:Os,ss:Os,m:Os,mm:Os,h:Os,hh:Os,d:Os,dd:Os,M:Os,MM:Os,y:Os,yy:Os},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("hy-am",{months:{format:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580\u056b_\u0583\u0565\u057f\u0580\u057e\u0561\u0580\u056b_\u0574\u0561\u0580\u057f\u056b_\u0561\u057a\u0580\u056b\u056c\u056b_\u0574\u0561\u0575\u056b\u057d\u056b_\u0570\u0578\u0582\u0576\u056b\u057d\u056b_\u0570\u0578\u0582\u056c\u056b\u057d\u056b_\u0585\u0563\u0578\u057d\u057f\u0578\u057d\u056b_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056b_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b".split("_"),standalone:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580_\u0583\u0565\u057f\u0580\u057e\u0561\u0580_\u0574\u0561\u0580\u057f_\u0561\u057a\u0580\u056b\u056c_\u0574\u0561\u0575\u056b\u057d_\u0570\u0578\u0582\u0576\u056b\u057d_\u0570\u0578\u0582\u056c\u056b\u057d_\u0585\u0563\u0578\u057d\u057f\u0578\u057d_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580".split("_")},monthsShort:"\u0570\u0576\u057e_\u0583\u057f\u0580_\u0574\u0580\u057f_\u0561\u057a\u0580_\u0574\u0575\u057d_\u0570\u0576\u057d_\u0570\u056c\u057d_\u0585\u0563\u057d_\u057d\u057a\u057f_\u0570\u056f\u057f_\u0576\u0574\u0562_\u0564\u056f\u057f".split("_"),weekdays:"\u056f\u056b\u0580\u0561\u056f\u056b_\u0565\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b_\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0570\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b_\u0578\u0582\u0580\u0562\u0561\u0569_\u0577\u0561\u0562\u0561\u0569".split("_"),weekdaysShort:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),weekdaysMin:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0569.",LLL:"D MMMM YYYY \u0569., HH:mm",LLLL:"dddd, D MMMM YYYY \u0569., HH:mm"},calendar:{sameDay:"[\u0561\u0575\u057d\u0585\u0580] LT",nextDay:"[\u057e\u0561\u0572\u0568] LT",lastDay:"[\u0565\u0580\u0565\u056f] LT",nextWeek:function(){return"dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},lastWeek:function(){return"[\u0561\u0576\u0581\u0561\u056e] dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},sameElse:"L"},relativeTime:{future:"%s \u0570\u0565\u057f\u0578",past:"%s \u0561\u057c\u0561\u057b",s:"\u0574\u056b \u0584\u0561\u0576\u056b \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",ss:"%d \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",m:"\u0580\u0578\u057a\u0565",mm:"%d \u0580\u0578\u057a\u0565",h:"\u056a\u0561\u0574",hh:"%d \u056a\u0561\u0574",d:"\u0585\u0580",dd:"%d \u0585\u0580",M:"\u0561\u0574\u056b\u057d",MM:"%d \u0561\u0574\u056b\u057d",y:"\u057f\u0561\u0580\u056b",yy:"%d \u057f\u0561\u0580\u056b"},meridiemParse:/\u0563\u056b\u0577\u0565\u0580\u057e\u0561|\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561|\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576/,isPM:function(e){return/^(\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576)$/.test(e)},meridiem:function(e){return e<4?"\u0563\u056b\u0577\u0565\u0580\u057e\u0561":e<12?"\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561":e<17?"\u0581\u0565\u0580\u0565\u056f\u057e\u0561":"\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(\u056b\u0576|\u0580\u0564)/,ordinal:function(e,a){switch(a){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-\u056b\u0576":e+"-\u0580\u0564";default:return e}},week:{dow:1,doy:7}}),c.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"siang"===a?11<=e?e:e+12:"sore"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}}),c.defineLocale("is",{months:"jan\xfaar_febr\xfaar_mars_apr\xedl_ma\xed_j\xfan\xed_j\xfal\xed_\xe1g\xfast_september_okt\xf3ber_n\xf3vember_desember".split("_"),monthsShort:"jan_feb_mar_apr_ma\xed_j\xfan_j\xfal_\xe1g\xfa_sep_okt_n\xf3v_des".split("_"),weekdays:"sunnudagur_m\xe1nudagur_\xferi\xf0judagur_mi\xf0vikudagur_fimmtudagur_f\xf6studagur_laugardagur".split("_"),weekdaysShort:"sun_m\xe1n_\xferi_mi\xf0_fim_f\xf6s_lau".split("_"),weekdaysMin:"Su_M\xe1_\xder_Mi_Fi_F\xf6_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[\xed dag kl.] LT",nextDay:"[\xe1 morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xed g\xe6r kl.] LT",lastWeek:"[s\xed\xf0asta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s s\xed\xf0an",s:Es,ss:Es,m:Es,mm:Es,h:"klukkustund",hh:Es,d:Es,dd:Es,M:Es,MM:Es,y:Es,yy:Es},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),c.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(1<this.hours()?"lle ":0===this.hours()?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),c.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"\u4ee4\u548c",narrow:"\u32ff",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"\u5e73\u6210",narrow:"\u337b",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"\u662d\u548c",narrow:"\u337c",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"\u5927\u6b63",narrow:"\u337d",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"\u660e\u6cbb",narrow:"\u337e",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"\u897f\u66a6",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"\u7d00\u5143\u524d",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(\u5143|\d+)\u5e74/,eraYearOrdinalParse:function(e,a){return"\u5143"===a[1]?1:parseInt(a[1]||e,10)},months:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u65e5\u66dc\u65e5_\u6708\u66dc\u65e5_\u706b\u66dc\u65e5_\u6c34\u66dc\u65e5_\u6728\u66dc\u65e5_\u91d1\u66dc\u65e5_\u571f\u66dc\u65e5".split("_"),weekdaysShort:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),weekdaysMin:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5(ddd) HH:mm"},meridiemParse:/\u5348\u524d|\u5348\u5f8c/i,isPM:function(e){return"\u5348\u5f8c"===e},meridiem:function(e,a,t){return e<12?"\u5348\u524d":"\u5348\u5f8c"},calendar:{sameDay:"[\u4eca\u65e5] LT",nextDay:"[\u660e\u65e5] LT",nextWeek:function(e){return e.week()!==this.week()?"[\u6765\u9031]dddd LT":"dddd LT"},lastDay:"[\u6628\u65e5] LT",lastWeek:function(e){return this.week()!==e.week()?"[\u5148\u9031]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}\u65e5/,ordinal:function(e,a){switch(a){case"y":return 1===e?"\u5143\u5e74":e+"\u5e74";case"d":case"D":case"DDD":return e+"\u65e5";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u6570\u79d2",ss:"%d\u79d2",m:"1\u5206",mm:"%d\u5206",h:"1\u6642\u9593",hh:"%d\u6642\u9593",d:"1\u65e5",dd:"%d\u65e5",M:"1\u30f6\u6708",MM:"%d\u30f6\u6708",y:"1\u5e74",yy:"%d\u5e74"}}),c.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,a){return 12===e&&(e=0),"enjing"===a?e:"siyang"===a?11<=e?e:e+12:"sonten"===a||"ndalu"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}}),c.defineLocale("ka",{months:"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8_\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8_\u10db\u10d0\u10e0\u10e2\u10d8_\u10d0\u10de\u10e0\u10d8\u10da\u10d8_\u10db\u10d0\u10d8\u10e1\u10d8_\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8_\u10d8\u10d5\u10da\u10d8\u10e1\u10d8_\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd_\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8_\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8".split("_"),monthsShort:"\u10d8\u10d0\u10dc_\u10d7\u10d4\u10d1_\u10db\u10d0\u10e0_\u10d0\u10de\u10e0_\u10db\u10d0\u10d8_\u10d8\u10d5\u10dc_\u10d8\u10d5\u10da_\u10d0\u10d2\u10d5_\u10e1\u10d4\u10e5_\u10dd\u10e5\u10e2_\u10dc\u10dd\u10d4_\u10d3\u10d4\u10d9".split("_"),weekdays:{standalone:"\u10d9\u10d5\u10d8\u10e0\u10d0_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8_\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8".split("_"),format:"\u10d9\u10d5\u10d8\u10e0\u10d0\u10e1_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10e1_\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1".split("_"),isFormat:/(\u10ec\u10d8\u10dc\u10d0|\u10e8\u10d4\u10db\u10d3\u10d4\u10d2)/},weekdaysShort:"\u10d9\u10d5\u10d8_\u10dd\u10e0\u10e8_\u10e1\u10d0\u10db_\u10dd\u10d7\u10ee_\u10ee\u10e3\u10d7_\u10de\u10d0\u10e0_\u10e8\u10d0\u10d1".split("_"),weekdaysMin:"\u10d9\u10d5_\u10dd\u10e0_\u10e1\u10d0_\u10dd\u10d7_\u10ee\u10e3_\u10de\u10d0_\u10e8\u10d0".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u10d3\u10e6\u10d4\u10e1] LT[-\u10d6\u10d4]",nextDay:"[\u10ee\u10d5\u10d0\u10da] LT[-\u10d6\u10d4]",lastDay:"[\u10d2\u10e3\u10e8\u10d8\u10dc] LT[-\u10d6\u10d4]",nextWeek:"[\u10e8\u10d4\u10db\u10d3\u10d4\u10d2] dddd LT[-\u10d6\u10d4]",lastWeek:"[\u10ec\u10d8\u10dc\u10d0] dddd LT-\u10d6\u10d4",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(\u10ec\u10d0\u10db|\u10ec\u10e3\u10d7|\u10e1\u10d0\u10d0\u10d7|\u10ec\u10d4\u10da|\u10d3\u10e6|\u10d7\u10d5)(\u10d8|\u10d4)/,function(e,a,t){return"\u10d8"===t?a+"\u10e8\u10d8":a+t+"\u10e8\u10d8"})},past:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10d3\u10e6\u10d4|\u10d7\u10d5\u10d4)/.test(e)?e.replace(/(\u10d8|\u10d4)$/,"\u10d8\u10e1 \u10ec\u10d8\u10dc"):/\u10ec\u10d4\u10da\u10d8/.test(e)?e.replace(/\u10ec\u10d4\u10da\u10d8$/,"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc"):e},s:"\u10e0\u10d0\u10db\u10d3\u10d4\u10dc\u10d8\u10db\u10d4 \u10ec\u10d0\u10db\u10d8",ss:"%d \u10ec\u10d0\u10db\u10d8",m:"\u10ec\u10e3\u10d7\u10d8",mm:"%d \u10ec\u10e3\u10d7\u10d8",h:"\u10e1\u10d0\u10d0\u10d7\u10d8",hh:"%d \u10e1\u10d0\u10d0\u10d7\u10d8",d:"\u10d3\u10e6\u10d4",dd:"%d \u10d3\u10e6\u10d4",M:"\u10d7\u10d5\u10d4",MM:"%d \u10d7\u10d5\u10d4",y:"\u10ec\u10d4\u10da\u10d8",yy:"%d \u10ec\u10d4\u10da\u10d8"},dayOfMonthOrdinalParse:/0|1-\u10da\u10d8|\u10db\u10d4-\d{1,2}|\d{1,2}-\u10d4/,ordinal:function(e){return 0===e?e:1===e?e+"-\u10da\u10d8":e<20||e<=100&&e%20==0||e%100==0?"\u10db\u10d4-"+e:e+"-\u10d4"},week:{dow:1,doy:7}});var Fs={0:"-\u0448\u0456",1:"-\u0448\u0456",2:"-\u0448\u0456",3:"-\u0448\u0456",4:"-\u0448\u0456",5:"-\u0448\u0456",6:"-\u0448\u044b",7:"-\u0448\u0456",8:"-\u0448\u0456",9:"-\u0448\u044b",10:"-\u0448\u044b",20:"-\u0448\u044b",30:"-\u0448\u044b",40:"-\u0448\u044b",50:"-\u0448\u0456",60:"-\u0448\u044b",70:"-\u0448\u0456",80:"-\u0448\u0456",90:"-\u0448\u044b",100:"-\u0448\u0456"},zs=(c.defineLocale("kk",{months:"\u049b\u0430\u04a3\u0442\u0430\u0440_\u0430\u049b\u043f\u0430\u043d_\u043d\u0430\u0443\u0440\u044b\u0437_\u0441\u04d9\u0443\u0456\u0440_\u043c\u0430\u043c\u044b\u0440_\u043c\u0430\u0443\u0441\u044b\u043c_\u0448\u0456\u043b\u0434\u0435_\u0442\u0430\u043c\u044b\u0437_\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a_\u049b\u0430\u0437\u0430\u043d_\u049b\u0430\u0440\u0430\u0448\u0430_\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d".split("_"),monthsShort:"\u049b\u0430\u04a3_\u0430\u049b\u043f_\u043d\u0430\u0443_\u0441\u04d9\u0443_\u043c\u0430\u043c_\u043c\u0430\u0443_\u0448\u0456\u043b_\u0442\u0430\u043c_\u049b\u044b\u0440_\u049b\u0430\u0437_\u049b\u0430\u0440_\u0436\u0435\u043b".split("_"),weekdays:"\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456_\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456_\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0436\u04b1\u043c\u0430_\u0441\u0435\u043d\u0431\u0456".split("_"),weekdaysShort:"\u0436\u0435\u043a_\u0434\u04af\u0439_\u0441\u0435\u0439_\u0441\u04d9\u0440_\u0431\u0435\u0439_\u0436\u04b1\u043c_\u0441\u0435\u043d".split("_"),weekdaysMin:"\u0436\u043a_\u0434\u0439_\u0441\u0439_\u0441\u0440_\u0431\u0439_\u0436\u043c_\u0441\u043d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u0456\u043d \u0441\u0430\u0493\u0430\u0442] LT",nextDay:"[\u0415\u0440\u0442\u0435\u04a3 \u0441\u0430\u0493\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0493\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0448\u0435 \u0441\u0430\u0493\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u0435\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u04a3] dddd [\u0441\u0430\u0493\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0456\u0448\u0456\u043d\u0434\u0435",past:"%s \u0431\u04b1\u0440\u044b\u043d",s:"\u0431\u0456\u0440\u043d\u0435\u0448\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u0431\u0456\u0440 \u0441\u0430\u0493\u0430\u0442",hh:"%d \u0441\u0430\u0493\u0430\u0442",d:"\u0431\u0456\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0456\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0456\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0448\u0456|\u0448\u044b)/,ordinal:function(e){return e+(Fs[e]||Fs[e%10]||Fs[100<=e?100:null])},week:{dow:1,doy:7}}),{1:"\u17e1",2:"\u17e2",3:"\u17e3",4:"\u17e4",5:"\u17e5",6:"\u17e6",7:"\u17e7",8:"\u17e8",9:"\u17e9",0:"\u17e0"}),Ns={"\u17e1":"1","\u17e2":"2","\u17e3":"3","\u17e4":"4","\u17e5":"5","\u17e6":"6","\u17e7":"7","\u17e8":"8","\u17e9":"9","\u17e0":"0"},Js=(c.defineLocale("km",{months:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),monthsShort:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),weekdays:"\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799_\u1785\u17d0\u1793\u17d2\u1791_\u17a2\u1784\u17d2\u1782\u17b6\u179a_\u1796\u17bb\u1792_\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd_\u179f\u17bb\u1780\u17d2\u179a_\u179f\u17c5\u179a\u17cd".split("_"),weekdaysShort:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysMin:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u1796\u17d2\u179a\u17b9\u1780|\u179b\u17d2\u1784\u17b6\u1785/,isPM:function(e){return"\u179b\u17d2\u1784\u17b6\u1785"===e},meridiem:function(e,a,t){return e<12?"\u1796\u17d2\u179a\u17b9\u1780":"\u179b\u17d2\u1784\u17b6\u1785"},calendar:{sameDay:"[\u1790\u17d2\u1784\u17c3\u1793\u17c1\u17c7 \u1798\u17c9\u17c4\u1784] LT",nextDay:"[\u179f\u17d2\u17a2\u17c2\u1780 \u1798\u17c9\u17c4\u1784] LT",nextWeek:"dddd [\u1798\u17c9\u17c4\u1784] LT",lastDay:"[\u1798\u17d2\u179f\u17b7\u179b\u1798\u17b7\u1789 \u1798\u17c9\u17c4\u1784] LT",lastWeek:"dddd [\u179f\u1794\u17d2\u178f\u17b6\u17a0\u17cd\u1798\u17bb\u1793] [\u1798\u17c9\u17c4\u1784] LT",sameElse:"L"},relativeTime:{future:"%s\u1791\u17c0\u178f",past:"%s\u1798\u17bb\u1793",s:"\u1794\u17c9\u17bb\u1793\u17d2\u1798\u17b6\u1793\u179c\u17b7\u1793\u17b6\u1791\u17b8",ss:"%d \u179c\u17b7\u1793\u17b6\u1791\u17b8",m:"\u1798\u17bd\u1799\u1793\u17b6\u1791\u17b8",mm:"%d \u1793\u17b6\u1791\u17b8",h:"\u1798\u17bd\u1799\u1798\u17c9\u17c4\u1784",hh:"%d \u1798\u17c9\u17c4\u1784",d:"\u1798\u17bd\u1799\u1790\u17d2\u1784\u17c3",dd:"%d \u1790\u17d2\u1784\u17c3",M:"\u1798\u17bd\u1799\u1781\u17c2",MM:"%d \u1781\u17c2",y:"\u1798\u17bd\u1799\u1786\u17d2\u1793\u17b6\u17c6",yy:"%d \u1786\u17d2\u1793\u17b6\u17c6"},dayOfMonthOrdinalParse:/\u1791\u17b8\d{1,2}/,ordinal:"\u1791\u17b8%d",preparse:function(e){return e.replace(/[\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9\u17e0]/g,function(e){return Ns[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return zs[e]})},week:{dow:1,doy:4}}),{1:"\u0ce7",2:"\u0ce8",3:"\u0ce9",4:"\u0cea",5:"\u0ceb",6:"\u0cec",7:"\u0ced",8:"\u0cee",9:"\u0cef",0:"\u0ce6"}),Rs={"\u0ce7":"1","\u0ce8":"2","\u0ce9":"3","\u0cea":"4","\u0ceb":"5","\u0cec":"6","\u0ced":"7","\u0cee":"8","\u0cef":"9","\u0ce6":"0"};function O(e,a,t,s){e={s:["\xe7end san\xeeye","\xe7end san\xeeyeyan"],ss:[e+" san\xeeye",e+" san\xeeyeyan"],m:["deq\xeeqeyek","deq\xeeqeyek\xea"],mm:[e+" deq\xeeqe",e+" deq\xeeqeyan"],h:["saetek","saetek\xea"],hh:[e+" saet",e+" saetan"],d:["rojek","rojek\xea"],dd:[e+" roj",e+" rojan"],w:["hefteyek","hefteyek\xea"],ww:[e+" hefte",e+" hefteyan"],M:["mehek","mehek\xea"],MM:[e+" meh",e+" mehan"],y:["salek","salek\xea"],yy:[e+" sal",e+" salan"]};return a?e[t][0]:e[t][1]}c.defineLocale("kn",{months:"\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf_\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5\u0cac\u0cb0\u0ccd_\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd".split("_"),monthsShort:"\u0c9c\u0ca8_\u0cab\u0cc6\u0cac\u0ccd\u0cb0_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5_\u0ca8\u0cb5\u0cc6\u0c82_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82".split("_"),monthsParseExact:!0,weekdays:"\u0cad\u0cbe\u0ca8\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae\u0cb5\u0cbe\u0cb0_\u0cae\u0c82\u0c97\u0cb3\u0cb5\u0cbe\u0cb0_\u0cac\u0cc1\u0ca7\u0cb5\u0cbe\u0cb0_\u0c97\u0cc1\u0cb0\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0\u0cb5\u0cbe\u0cb0_\u0cb6\u0ca8\u0cbf\u0cb5\u0cbe\u0cb0".split("_"),weekdaysShort:"\u0cad\u0cbe\u0ca8\u0cc1_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae_\u0cae\u0c82\u0c97\u0cb3_\u0cac\u0cc1\u0ca7_\u0c97\u0cc1\u0cb0\u0cc1_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0_\u0cb6\u0ca8\u0cbf".split("_"),weekdaysMin:"\u0cad\u0cbe_\u0cb8\u0cc6\u0cc2\u0cd5_\u0cae\u0c82_\u0cac\u0cc1_\u0c97\u0cc1_\u0cb6\u0cc1_\u0cb6".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c87\u0c82\u0ca6\u0cc1] LT",nextDay:"[\u0ca8\u0cbe\u0cb3\u0cc6] LT",nextWeek:"dddd, LT",lastDay:"[\u0ca8\u0cbf\u0ca8\u0ccd\u0ca8\u0cc6] LT",lastWeek:"[\u0c95\u0cc6\u0cc2\u0ca8\u0cc6\u0caf] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0ca8\u0c82\u0ca4\u0cb0",past:"%s \u0cb9\u0cbf\u0c82\u0ca6\u0cc6",s:"\u0c95\u0cc6\u0cb2\u0cb5\u0cc1 \u0c95\u0ccd\u0cb7\u0ca3\u0c97\u0cb3\u0cc1",ss:"%d \u0cb8\u0cc6\u0c95\u0cc6\u0c82\u0ca1\u0cc1\u0c97\u0cb3\u0cc1",m:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",mm:"%d \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",h:"\u0c92\u0c82\u0ca6\u0cc1 \u0c97\u0c82\u0c9f\u0cc6",hh:"%d \u0c97\u0c82\u0c9f\u0cc6",d:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca6\u0cbf\u0ca8",dd:"%d \u0ca6\u0cbf\u0ca8",M:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",MM:"%d \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",y:"\u0c92\u0c82\u0ca6\u0cc1 \u0cb5\u0cb0\u0ccd\u0cb7",yy:"%d \u0cb5\u0cb0\u0ccd\u0cb7"},preparse:function(e){return e.replace(/[\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef\u0ce6]/g,function(e){return Rs[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Js[e]})},meridiemParse:/\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf|\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6|\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8|\u0cb8\u0c82\u0c9c\u0cc6/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"===a?e<4?e:e+12:"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6"===a?e:"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8"===a?10<=e?e:e+12:"\u0cb8\u0c82\u0c9c\u0cc6"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf":e<10?"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6":e<17?"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8":e<20?"\u0cb8\u0c82\u0c9c\u0cc6":"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"},dayOfMonthOrdinalParse:/\d{1,2}(\u0ca8\u0cc6\u0cd5)/,ordinal:function(e){return e+"\u0ca8\u0cc6\u0cd5"},week:{dow:0,doy:6}}),c.defineLocale("ko",{months:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),monthsShort:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),weekdays:"\uc77c\uc694\uc77c_\uc6d4\uc694\uc77c_\ud654\uc694\uc77c_\uc218\uc694\uc77c_\ubaa9\uc694\uc77c_\uae08\uc694\uc77c_\ud1a0\uc694\uc77c".split("_"),weekdaysShort:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),weekdaysMin:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY\ub144 MMMM D\uc77c",LLL:"YYYY\ub144 MMMM D\uc77c A h:mm",LLLL:"YYYY\ub144 MMMM D\uc77c dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY\ub144 MMMM D\uc77c",lll:"YYYY\ub144 MMMM D\uc77c A h:mm",llll:"YYYY\ub144 MMMM D\uc77c dddd A h:mm"},calendar:{sameDay:"\uc624\ub298 LT",nextDay:"\ub0b4\uc77c LT",nextWeek:"dddd LT",lastDay:"\uc5b4\uc81c LT",lastWeek:"\uc9c0\ub09c\uc8fc dddd LT",sameElse:"L"},relativeTime:{future:"%s \ud6c4",past:"%s \uc804",s:"\uba87 \ucd08",ss:"%d\ucd08",m:"1\ubd84",mm:"%d\ubd84",h:"\ud55c \uc2dc\uac04",hh:"%d\uc2dc\uac04",d:"\ud558\ub8e8",dd:"%d\uc77c",M:"\ud55c \ub2ec",MM:"%d\ub2ec",y:"\uc77c \ub144",yy:"%d\ub144"},dayOfMonthOrdinalParse:/\d{1,2}(\uc77c|\uc6d4|\uc8fc)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\uc77c";case"M":return e+"\uc6d4";case"w":case"W":return e+"\uc8fc";default:return e}},meridiemParse:/\uc624\uc804|\uc624\ud6c4/,isPM:function(e){return"\uc624\ud6c4"===e},meridiem:function(e,a,t){return e<12?"\uc624\uc804":"\uc624\ud6c4"}}),c.defineLocale("ku-kmr",{months:"R\xeabendan_Sibat_Adar_N\xeesan_Gulan_Hez\xeeran_T\xeermeh_Tebax_\xcelon_Cotmeh_Mijdar_Berfanbar".split("_"),monthsShort:"R\xeab_Sib_Ada_N\xees_Gul_Hez_T\xeer_Teb_\xcelo_Cot_Mij_Ber".split("_"),monthsParseExact:!0,weekdays:"Yek\u015fem_Du\u015fem_S\xea\u015fem_\xc7ar\u015fem_P\xeanc\u015fem_\xcen_\u015eem\xee".split("_"),weekdaysShort:"Yek_Du_S\xea_\xc7ar_P\xean_\xcen_\u015eem".split("_"),weekdaysMin:"Ye_Du_S\xea_\xc7a_P\xea_\xcen_\u015ee".split("_"),meridiem:function(e,a,t){return e<12?t?"bn":"BN":t?"pn":"PN"},meridiemParse:/bn|BN|pn|PN/,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM[a] YYYY[an]",LLL:"Do MMMM[a] YYYY[an] HH:mm",LLLL:"dddd, Do MMMM[a] YYYY[an] HH:mm",ll:"Do MMM[.] YYYY[an]",lll:"Do MMM[.] YYYY[an] HH:mm",llll:"ddd[.], Do MMM[.] YYYY[an] HH:mm"},calendar:{sameDay:"[\xcero di saet] LT [de]",nextDay:"[Sib\xea di saet] LT [de]",nextWeek:"dddd [di saet] LT [de]",lastDay:"[Duh di saet] LT [de]",lastWeek:"dddd[a bor\xee di saet] LT [de]",sameElse:"L"},relativeTime:{future:"di %s de",past:"ber\xee %s",s:O,ss:O,m:O,mm:O,h:O,hh:O,d:O,dd:O,w:O,ww:O,M:O,MM:O,y:O,yy:O},dayOfMonthOrdinalParse:/\d{1,2}(?:y\xea|\xea|\.)/,ordinal:function(e,a){var a=a.toLowerCase();return a.includes("w")||a.includes("m")?e+".":e+(e=(a=""+(a=e)).substring(a.length-1),12==(a=1<a.length?a.substring(a.length-2):"")||13==a||"2"!=e&&"3"!=e&&"50"!=a&&"70"!=e&&"80"!=e?"\xea":"y\xea")},week:{dow:1,doy:4}});var Cs={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},Is={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},fe=["\u06a9\u0627\u0646\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0634\u0648\u0628\u0627\u062a","\u0626\u0627\u0632\u0627\u0631","\u0646\u06cc\u0633\u0627\u0646","\u0626\u0627\u06cc\u0627\u0631","\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646","\u062a\u06d5\u0645\u0645\u0648\u0632","\u0626\u0627\u0628","\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644","\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u0643\u06d5\u0645","\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0643\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"],Us=(c.defineLocale("ku",{months:fe,monthsShort:fe,weekdays:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u062f\u0648\u0648\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0633\u06ce\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysShort:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645_\u062f\u0648\u0648\u0634\u0647\u200c\u0645_\u0633\u06ce\u0634\u0647\u200c\u0645_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u0647_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c|\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc/,isPM:function(e){return/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c/.test(e)},meridiem:function(e,a,t){return e<12?"\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc":"\u0626\u06ce\u0648\u0627\u0631\u0647\u200c"},calendar:{sameDay:"[\u0626\u0647\u200c\u0645\u0631\u06c6 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextDay:"[\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastDay:"[\u062f\u0648\u06ce\u0646\u06ce \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",sameElse:"L"},relativeTime:{future:"\u0644\u0647\u200c %s",past:"%s",s:"\u0686\u0647\u200c\u0646\u062f \u0686\u0631\u0643\u0647\u200c\u06cc\u0647\u200c\u0643",ss:"\u0686\u0631\u0643\u0647\u200c %d",m:"\u06cc\u0647\u200c\u0643 \u062e\u0648\u0644\u0647\u200c\u0643",mm:"%d \u062e\u0648\u0644\u0647\u200c\u0643",h:"\u06cc\u0647\u200c\u0643 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",hh:"%d \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",d:"\u06cc\u0647\u200c\u0643 \u0695\u06c6\u0698",dd:"%d \u0695\u06c6\u0698",M:"\u06cc\u0647\u200c\u0643 \u0645\u0627\u0646\u06af",MM:"%d \u0645\u0627\u0646\u06af",y:"\u06cc\u0647\u200c\u0643 \u0633\u0627\u06b5",yy:"%d \u0633\u0627\u06b5"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return Is[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Cs[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}}),{0:"-\u0447\u04af",1:"-\u0447\u0438",2:"-\u0447\u0438",3:"-\u0447\u04af",4:"-\u0447\u04af",5:"-\u0447\u0438",6:"-\u0447\u044b",7:"-\u0447\u0438",8:"-\u0447\u0438",9:"-\u0447\u0443",10:"-\u0447\u0443",20:"-\u0447\u044b",30:"-\u0447\u0443",40:"-\u0447\u044b",50:"-\u0447\u04af",60:"-\u0447\u044b",70:"-\u0447\u0438",80:"-\u0447\u0438",90:"-\u0447\u0443",100:"-\u0447\u04af"});function Gs(e,a,t,s){var n={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return a?n[t][0]:n[t][1]}function Vs(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;var a;if(e<100)return Vs(0==(a=e%10)?e/10:a);if(e<1e4){for(;10<=e;)e/=10;return Vs(e)}return Vs(e/=1e3)}c.defineLocale("ky",{months:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u0416\u0435\u043a\u0448\u0435\u043c\u0431\u0438_\u0414\u04af\u0439\u0448\u04e9\u043c\u0431\u04af_\u0428\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0428\u0430\u0440\u0448\u0435\u043c\u0431\u0438_\u0411\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0416\u0443\u043c\u0430_\u0418\u0448\u0435\u043c\u0431\u0438".split("_"),weekdaysShort:"\u0416\u0435\u043a_\u0414\u04af\u0439_\u0428\u0435\u0439_\u0428\u0430\u0440_\u0411\u0435\u0439_\u0416\u0443\u043c_\u0418\u0448\u0435".split("_"),weekdaysMin:"\u0416\u043a_\u0414\u0439_\u0428\u0439_\u0428\u0440_\u0411\u0439_\u0416\u043c_\u0418\u0448".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u04af\u043d \u0441\u0430\u0430\u0442] LT",nextDay:"[\u042d\u0440\u0442\u0435\u04a3 \u0441\u0430\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0447\u044d\u044d \u0441\u0430\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u04e9\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u043d] dddd [\u043a\u04af\u043d\u04af] [\u0441\u0430\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0438\u0447\u0438\u043d\u0434\u0435",past:"%s \u043c\u0443\u0440\u0443\u043d",s:"\u0431\u0438\u0440\u043d\u0435\u0447\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0438\u0440 \u043c\u04af\u043d\u04e9\u0442",mm:"%d \u043c\u04af\u043d\u04e9\u0442",h:"\u0431\u0438\u0440 \u0441\u0430\u0430\u0442",hh:"%d \u0441\u0430\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0438\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0438\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0447\u0438|\u0447\u044b|\u0447\u04af|\u0447\u0443)/,ordinal:function(e){return e+(Us[e]||Us[e%10]||Us[100<=e?100:null])},week:{dow:1,doy:7}}),c.defineLocale("lb",{months:"Januar_Februar_M\xe4erz_Abr\xebll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_M\xe9indeg_D\xebnschdeg_M\xebttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._M\xe9._D\xeb._M\xeb._Do._Fr._Sa.".split("_"),weekdaysMin:"So_M\xe9_D\xeb_M\xeb_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[G\xebschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return Vs(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return Vs(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:Gs,mm:"%d Minutten",h:Gs,hh:"%d Stonnen",d:Gs,dd:"%d Deeg",M:Gs,MM:"%d M\xe9int",y:Gs,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("lo",{months:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),monthsShort:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),weekdays:"\u0ead\u0eb2\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysShort:"\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysMin:"\u0e97_\u0e88_\u0ead\u0e84_\u0e9e_\u0e9e\u0eab_\u0eaa\u0e81_\u0eaa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"\u0ea7\u0eb1\u0e99dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2|\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87/,isPM:function(e){return"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"===e},meridiem:function(e,a,t){return e<12?"\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2":"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"},calendar:{sameDay:"[\u0ea1\u0eb7\u0ec9\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextDay:"[\u0ea1\u0eb7\u0ec9\u0ead\u0eb7\u0ec8\u0e99\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0edc\u0ec9\u0eb2\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastDay:"[\u0ea1\u0eb7\u0ec9\u0ea7\u0eb2\u0e99\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0ec1\u0ea5\u0ec9\u0ea7\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",sameElse:"L"},relativeTime:{future:"\u0ead\u0eb5\u0e81 %s",past:"%s\u0e9c\u0ec8\u0eb2\u0e99\u0ea1\u0eb2",s:"\u0e9a\u0ecd\u0ec8\u0ec0\u0e97\u0ebb\u0ec8\u0eb2\u0ec3\u0e94\u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",ss:"%d \u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",m:"1 \u0e99\u0eb2\u0e97\u0eb5",mm:"%d \u0e99\u0eb2\u0e97\u0eb5",h:"1 \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",hh:"%d \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",d:"1 \u0ea1\u0eb7\u0ec9",dd:"%d \u0ea1\u0eb7\u0ec9",M:"1 \u0ec0\u0e94\u0eb7\u0ead\u0e99",MM:"%d \u0ec0\u0e94\u0eb7\u0ead\u0e99",y:"1 \u0e9b\u0eb5",yy:"%d \u0e9b\u0eb5"},dayOfMonthOrdinalParse:/(\u0e97\u0eb5\u0ec8)\d{1,2}/,ordinal:function(e){return"\u0e97\u0eb5\u0ec8"+e}});var qs={ss:"sekund\u0117_sekund\u017ei\u0173_sekundes",m:"minut\u0117_minut\u0117s_minut\u0119",mm:"minut\u0117s_minu\u010di\u0173_minutes",h:"valanda_valandos_valand\u0105",hh:"valandos_valand\u0173_valandas",d:"diena_dienos_dien\u0105",dd:"dienos_dien\u0173_dienas",M:"m\u0117nuo_m\u0117nesio_m\u0117nes\u012f",MM:"m\u0117nesiai_m\u0117nesi\u0173_m\u0117nesius",y:"metai_met\u0173_metus",yy:"metai_met\u0173_metus"};function Bs(e,a,t,s){return a?Zs(t)[0]:s?Zs(t)[1]:Zs(t)[2]}function Ks(e){return e%10==0||10<e&&e<20}function Zs(e){return qs[e].split("_")}function $s(e,a,t,s){var n=e+" ";return 1===e?n+Bs(0,a,t[0],s):a?n+(Ks(e)?Zs(t)[1]:Zs(t)[0]):s?n+Zs(t)[1]:n+(Ks(e)?Zs(t)[1]:Zs(t)[2])}c.defineLocale("lt",{months:{format:"sausio_vasario_kovo_baland\u017eio_gegu\u017e\u0117s_bir\u017eelio_liepos_rugpj\u016b\u010dio_rugs\u0117jo_spalio_lapkri\u010dio_gruod\u017eio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegu\u017e\u0117_bir\u017eelis_liepa_rugpj\u016btis_rugs\u0117jis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadien\u012f_pirmadien\u012f_antradien\u012f_tre\u010diadien\u012f_ketvirtadien\u012f_penktadien\u012f_\u0161e\u0161tadien\u012f".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_tre\u010diadienis_ketvirtadienis_penktadienis_\u0161e\u0161tadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_\u0160e\u0161".split("_"),weekdaysMin:"S_P_A_T_K_Pn_\u0160".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[\u0160iandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Pra\u0117jus\u012f] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prie\u0161 %s",s:function(e,a,t,s){return a?"kelios sekund\u0117s":s?"keli\u0173 sekund\u017ei\u0173":"kelias sekundes"},ss:$s,m:Bs,mm:$s,h:Bs,hh:$s,d:Bs,dd:$s,M:Bs,MM:$s,y:Bs,yy:$s},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});var Qs={ss:"sekundes_sekund\u0113m_sekunde_sekundes".split("_"),m:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),mm:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),h:"stundas_stund\u0101m_stunda_stundas".split("_"),hh:"stundas_stund\u0101m_stunda_stundas".split("_"),d:"dienas_dien\u0101m_diena_dienas".split("_"),dd:"dienas_dien\u0101m_diena_dienas".split("_"),M:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),MM:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function Xs(e,a,t){return t?a%10==1&&a%100!=11?e[2]:e[3]:a%10==1&&a%100!=11?e[0]:e[1]}function en(e,a,t){return e+" "+Xs(Qs[t],e,a)}function an(e,a,t){return Xs(Qs[t],e,a)}c.defineLocale("lv",{months:"janv\u0101ris_febru\u0101ris_marts_apr\u012blis_maijs_j\u016bnijs_j\u016blijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_j\u016bn_j\u016bl_aug_sep_okt_nov_dec".split("_"),weekdays:"sv\u0113tdiena_pirmdiena_otrdiena_tre\u0161diena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[\u0160odien pulksten] LT",nextDay:"[R\u012bt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pag\u0101ju\u0161\u0101] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"p\u0113c %s",past:"pirms %s",s:function(e,a){return a?"da\u017eas sekundes":"da\u017e\u0101m sekund\u0113m"},ss:en,m:an,mm:en,h:an,hh:en,d:an,dd:en,M:an,MM:en,y:an,yy:en},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var tn={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,a){return 1===e?a[0]:2<=e&&e<=4?a[1]:a[2]},translate:function(e,a,t){var s=tn.words[t];return 1===t.length?a?s[0]:s[1]:e+" "+tn.correctGrammaticalCase(e,s)}};function sn(e,a,t,s){switch(t){case"s":return a?"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434":"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d";case"ss":return e+(a?" \u0441\u0435\u043a\u0443\u043d\u0434":" \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d");case"m":case"mm":return e+(a?" \u043c\u0438\u043d\u0443\u0442":" \u043c\u0438\u043d\u0443\u0442\u044b\u043d");case"h":case"hh":return e+(a?" \u0446\u0430\u0433":" \u0446\u0430\u0433\u0438\u0439\u043d");case"d":case"dd":return e+(a?" \u04e9\u0434\u04e9\u0440":" \u04e9\u0434\u0440\u0438\u0439\u043d");case"M":case"MM":return e+(a?" \u0441\u0430\u0440":" \u0441\u0430\u0440\u044b\u043d");case"y":case"yy":return e+(a?" \u0436\u0438\u043b":" \u0436\u0438\u043b\u0438\u0439\u043d");default:return e}}c.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedjelje] [u] LT","[pro\u0161log] [ponedjeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srijede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:tn.translate,m:tn.translate,mm:tn.translate,h:tn.translate,hh:tn.translate,d:"dan",dd:tn.translate,M:"mjesec",MM:tn.translate,y:"godinu",yy:tn.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),c.defineLocale("mi",{months:"Kohi-t\u0101te_Hui-tanguru_Pout\u016b-te-rangi_Paenga-wh\u0101wh\u0101_Haratua_Pipiri_H\u014dngoingoi_Here-turi-k\u014dk\u0101_Mahuru_Whiringa-\u0101-nuku_Whiringa-\u0101-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_H\u014dngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"R\u0101tapu_Mane_T\u016brei_Wenerei_T\u0101ite_Paraire_H\u0101tarei".split("_"),weekdaysShort:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),weekdaysMin:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te h\u0113kona ruarua",ss:"%d h\u0113kona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),c.defineLocale("mk",{months:"\u0458\u0430\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d\u0438_\u0458\u0443\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u0458\u0430\u043d_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a_\u043f\u0435\u0442\u043e\u043a_\u0441\u0430\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u0435_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u0430\u0431".split("_"),weekdaysMin:"\u043de_\u043fo_\u0432\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441a".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u0435\u043d\u0435\u0441 \u0432\u043e] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432\u043e] LT",nextWeek:"[\u0412\u043e] dddd [\u0432\u043e] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432\u043e] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430] dddd [\u0432\u043e] LT";case 1:case 2:case 4:case 5:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442] dddd [\u0432\u043e] LT"}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435\u0434 %s",s:"\u043d\u0435\u043a\u043e\u043b\u043a\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u0435\u0434\u043d\u0430 \u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0435\u0434\u0435\u043d \u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0435\u0434\u0435\u043d \u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",M:"\u0435\u0434\u0435\u043d \u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0438",y:"\u0435\u0434\u043d\u0430 \u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var a=e%10,t=e%100;return 0===e?e+"-\u0435\u0432":0==t?e+"-\u0435\u043d":10<t&&t<20?e+"-\u0442\u0438":1==a?e+"-\u0432\u0438":2==a?e+"-\u0440\u0438":7==a||8==a?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}}),c.defineLocale("ml",{months:"\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f_\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f_\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d_\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d_\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48_\u0d13\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d_\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c_\u0d12\u0d15\u0d4d\u0d1f\u0d4b\u0d2c\u0d7c_\u0d28\u0d35\u0d02\u0d2c\u0d7c_\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c".split("_"),monthsShort:"\u0d1c\u0d28\u0d41._\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41._\u0d2e\u0d3e\u0d7c._\u0d0f\u0d2a\u0d4d\u0d30\u0d3f._\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48._\u0d13\u0d17._\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31._\u0d12\u0d15\u0d4d\u0d1f\u0d4b._\u0d28\u0d35\u0d02._\u0d21\u0d3f\u0d38\u0d02.".split("_"),monthsParseExact:!0,weekdays:"\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u0d1a_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u0d1a_\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a_\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a_\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a".split("_"),weekdaysShort:"\u0d1e\u0d3e\u0d2f\u0d7c_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d7e_\u0d1a\u0d4a\u0d35\u0d4d\u0d35_\u0d2c\u0d41\u0d27\u0d7b_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f_\u0d36\u0d28\u0d3f".split("_"),weekdaysMin:"\u0d1e\u0d3e_\u0d24\u0d3f_\u0d1a\u0d4a_\u0d2c\u0d41_\u0d35\u0d4d\u0d2f\u0d3e_\u0d35\u0d46_\u0d36".split("_"),longDateFormat:{LT:"A h:mm -\u0d28\u0d41",LTS:"A h:mm:ss -\u0d28\u0d41",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -\u0d28\u0d41",LLLL:"dddd, D MMMM YYYY, A h:mm -\u0d28\u0d41"},calendar:{sameDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d4d] LT",nextDay:"[\u0d28\u0d3e\u0d33\u0d46] LT",nextWeek:"dddd, LT",lastDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d32\u0d46] LT",lastWeek:"[\u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d",past:"%s \u0d2e\u0d41\u0d7b\u0d2a\u0d4d",s:"\u0d05\u0d7d\u0d2a \u0d28\u0d3f\u0d2e\u0d3f\u0d37\u0d19\u0d4d\u0d19\u0d7e",ss:"%d \u0d38\u0d46\u0d15\u0d4d\u0d15\u0d7b\u0d21\u0d4d",m:"\u0d12\u0d30\u0d41 \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",mm:"%d \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",h:"\u0d12\u0d30\u0d41 \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",hh:"%d \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",d:"\u0d12\u0d30\u0d41 \u0d26\u0d3f\u0d35\u0d38\u0d02",dd:"%d \u0d26\u0d3f\u0d35\u0d38\u0d02",M:"\u0d12\u0d30\u0d41 \u0d2e\u0d3e\u0d38\u0d02",MM:"%d \u0d2e\u0d3e\u0d38\u0d02",y:"\u0d12\u0d30\u0d41 \u0d35\u0d7c\u0d37\u0d02",yy:"%d \u0d35\u0d7c\u0d37\u0d02"},meridiemParse:/\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f|\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46|\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d|\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02|\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f/i,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"===a&&4<=e||"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d"===a||"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02"===a?e+12:e},meridiem:function(e,a,t){return e<4?"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f":e<12?"\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46":e<17?"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d":e<20?"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02":"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"}}),c.defineLocale("mn",{months:"\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440".split("_"),monthsShort:"1 \u0441\u0430\u0440_2 \u0441\u0430\u0440_3 \u0441\u0430\u0440_4 \u0441\u0430\u0440_5 \u0441\u0430\u0440_6 \u0441\u0430\u0440_7 \u0441\u0430\u0440_8 \u0441\u0430\u0440_9 \u0441\u0430\u0440_10 \u0441\u0430\u0440_11 \u0441\u0430\u0440_12 \u0441\u0430\u0440".split("_"),monthsParseExact:!0,weekdays:"\u041d\u044f\u043c_\u0414\u0430\u0432\u0430\u0430_\u041c\u044f\u0433\u043c\u0430\u0440_\u041b\u0445\u0430\u0433\u0432\u0430_\u041f\u04af\u0440\u044d\u0432_\u0411\u0430\u0430\u0441\u0430\u043d_\u0411\u044f\u043c\u0431\u0430".split("_"),weekdaysShort:"\u041d\u044f\u043c_\u0414\u0430\u0432_\u041c\u044f\u0433_\u041b\u0445\u0430_\u041f\u04af\u0440_\u0411\u0430\u0430_\u0411\u044f\u043c".split("_"),weekdaysMin:"\u041d\u044f_\u0414\u0430_\u041c\u044f_\u041b\u0445_\u041f\u04af_\u0411\u0430_\u0411\u044f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D",LLL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm",LLLL:"dddd, YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm"},meridiemParse:/\u04ae\u04e8|\u04ae\u0425/i,isPM:function(e){return"\u04ae\u0425"===e},meridiem:function(e,a,t){return e<12?"\u04ae\u04e8":"\u04ae\u0425"},calendar:{sameDay:"[\u04e8\u043d\u04e9\u04e9\u0434\u04e9\u0440] LT",nextDay:"[\u041c\u0430\u0440\u0433\u0430\u0430\u0448] LT",nextWeek:"[\u0418\u0440\u044d\u0445] dddd LT",lastDay:"[\u04e8\u0447\u0438\u0433\u0434\u04e9\u0440] LT",lastWeek:"[\u04e8\u043d\u0433\u04e9\u0440\u0441\u04e9\u043d] dddd LT",sameElse:"L"},relativeTime:{future:"%s \u0434\u0430\u0440\u0430\u0430",past:"%s \u04e9\u043c\u043d\u04e9",s:sn,ss:sn,m:sn,mm:sn,h:sn,hh:sn,d:sn,dd:sn,M:sn,MM:sn,y:sn,yy:sn},dayOfMonthOrdinalParse:/\d{1,2} \u04e9\u0434\u04e9\u0440/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+" \u04e9\u0434\u04e9\u0440";default:return e}}});var nn={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},rn={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};function dn(e,a,t,s){var n="";if(a)switch(t){case"s":n="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926";break;case"ss":n="%d \u0938\u0947\u0915\u0902\u0926";break;case"m":n="\u090f\u0915 \u092e\u093f\u0928\u093f\u091f";break;case"mm":n="%d \u092e\u093f\u0928\u093f\u091f\u0947";break;case"h":n="\u090f\u0915 \u0924\u093e\u0938";break;case"hh":n="%d \u0924\u093e\u0938";break;case"d":n="\u090f\u0915 \u0926\u093f\u0935\u0938";break;case"dd":n="%d \u0926\u093f\u0935\u0938";break;case"M":n="\u090f\u0915 \u092e\u0939\u093f\u0928\u093e";break;case"MM":n="%d \u092e\u0939\u093f\u0928\u0947";break;case"y":n="\u090f\u0915 \u0935\u0930\u094d\u0937";break;case"yy":n="%d \u0935\u0930\u094d\u0937\u0947";break}else switch(t){case"s":n="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"ss":n="%d \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"m":n="\u090f\u0915\u093e \u092e\u093f\u0928\u093f\u091f\u093e";break;case"mm":n="%d \u092e\u093f\u0928\u093f\u091f\u093e\u0902";break;case"h":n="\u090f\u0915\u093e \u0924\u093e\u0938\u093e";break;case"hh":n="%d \u0924\u093e\u0938\u093e\u0902";break;case"d":n="\u090f\u0915\u093e \u0926\u093f\u0935\u0938\u093e";break;case"dd":n="%d \u0926\u093f\u0935\u0938\u093e\u0902";break;case"M":n="\u090f\u0915\u093e \u092e\u0939\u093f\u0928\u094d\u092f\u093e";break;case"MM":n="%d \u092e\u0939\u093f\u0928\u094d\u092f\u093e\u0902";break;case"y":n="\u090f\u0915\u093e \u0935\u0930\u094d\u0937\u093e";break;case"yy":n="%d \u0935\u0930\u094d\u0937\u093e\u0902";break}return n.replace(/%d/i,e)}c.defineLocale("mr",{months:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u093f\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u0948_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a._\u090f\u092a\u094d\u0930\u093f._\u092e\u0947._\u091c\u0942\u0928._\u091c\u0941\u0932\u0948._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0933\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0933_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u0935\u093e\u091c\u0924\u093e",LTS:"A h:mm:ss \u0935\u093e\u091c\u0924\u093e",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e",LLLL:"dddd, D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0909\u0926\u094d\u092f\u093e] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092e\u093e\u0917\u0940\u0932] dddd, LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u0927\u094d\u092f\u0947",past:"%s\u092a\u0942\u0930\u094d\u0935\u0940",s:dn,ss:dn,m:dn,mm:dn,h:dn,hh:dn,d:dn,dd:dn,M:dn,MM:dn,y:dn,yy:dn},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return rn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return nn[e]})},meridiemParse:/\u092a\u0939\u093e\u091f\u0947|\u0938\u0915\u093e\u0933\u0940|\u0926\u0941\u092a\u093e\u0930\u0940|\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940|\u0930\u093e\u0924\u094d\u0930\u0940/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u092a\u0939\u093e\u091f\u0947"===a||"\u0938\u0915\u093e\u0933\u0940"===a?e:"\u0926\u0941\u092a\u093e\u0930\u0940"===a||"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940"===a||"\u0930\u093e\u0924\u094d\u0930\u0940"===a?12<=e?e:e+12:void 0},meridiem:function(e,a,t){return 0<=e&&e<6?"\u092a\u0939\u093e\u091f\u0947":e<12?"\u0938\u0915\u093e\u0933\u0940":e<17?"\u0926\u0941\u092a\u093e\u0930\u0940":e<20?"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940":"\u0930\u093e\u0924\u094d\u0930\u0940"},week:{dow:0,doy:6}}),c.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?11<=e?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),c.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,a){return 12===e&&(e=0),"pagi"===a?e:"tengahari"===a?11<=e?e:e+12:"petang"===a||"malam"===a?e+12:void 0},meridiem:function(e,a,t){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),c.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_\u0120unju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Di\u010bembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_\u0120un_Lul_Aww_Set_Ott_Nov_Di\u010b".split("_"),weekdays:"Il-\u0126add_It-Tnejn_It-Tlieta_L-Erbg\u0127a_Il-\u0126amis_Il-\u0120img\u0127a_Is-Sibt".split("_"),weekdaysShort:"\u0126ad_Tne_Tli_Erb_\u0126am_\u0120im_Sib".split("_"),weekdaysMin:"\u0126a_Tn_Tl_Er_\u0126a_\u0120i_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[G\u0127ada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-biera\u0127 fil-]LT",lastWeek:"dddd [li g\u0127adda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f\u2019 %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"sieg\u0127a",hh:"%d sieg\u0127at",d:"\u0121urnata",dd:"%d \u0121ranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}});var _n={1:"\u1041",2:"\u1042",3:"\u1043",4:"\u1044",5:"\u1045",6:"\u1046",7:"\u1047",8:"\u1048",9:"\u1049",0:"\u1040"},on={"\u1041":"1","\u1042":"2","\u1043":"3","\u1044":"4","\u1045":"5","\u1046":"6","\u1047":"7","\u1048":"8","\u1049":"9","\u1040":"0"},mn=(c.defineLocale("my",{months:"\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e_\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e_\u1019\u1010\u103a_\u1027\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u1007\u1030\u101c\u102d\u102f\u1004\u103a_\u101e\u103c\u1002\u102f\u1010\u103a_\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c_\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c_\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c_\u1012\u102e\u1007\u1004\u103a\u1018\u102c".split("_"),monthsShort:"\u1007\u1014\u103a_\u1016\u1031_\u1019\u1010\u103a_\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u101c\u102d\u102f\u1004\u103a_\u101e\u103c_\u1005\u1000\u103a_\u1021\u1031\u102c\u1000\u103a_\u1014\u102d\u102f_\u1012\u102e".split("_"),weekdays:"\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031_\u1010\u1014\u1004\u103a\u1039\u101c\u102c_\u1021\u1004\u103a\u1039\u1002\u102b_\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038_\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038_\u101e\u1031\u102c\u1000\u103c\u102c_\u1005\u1014\u1031".split("_"),weekdaysShort:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),weekdaysMin:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u101a\u1014\u1031.] LT [\u1019\u103e\u102c]",nextDay:"[\u1019\u1014\u1000\u103a\u1016\u103c\u1014\u103a] LT [\u1019\u103e\u102c]",nextWeek:"dddd LT [\u1019\u103e\u102c]",lastDay:"[\u1019\u1014\u1031.\u1000] LT [\u1019\u103e\u102c]",lastWeek:"[\u1015\u103c\u102e\u1038\u1001\u1032\u1037\u101e\u1031\u102c] dddd LT [\u1019\u103e\u102c]",sameElse:"L"},relativeTime:{future:"\u101c\u102c\u1019\u100a\u103a\u1037 %s \u1019\u103e\u102c",past:"\u101c\u103d\u1014\u103a\u1001\u1032\u1037\u101e\u1031\u102c %s \u1000",s:"\u1005\u1000\u1039\u1000\u1014\u103a.\u1021\u1014\u100a\u103a\u1038\u1004\u101a\u103a",ss:"%d \u1005\u1000\u1039\u1000\u1014\u1037\u103a",m:"\u1010\u1005\u103a\u1019\u102d\u1014\u1005\u103a",mm:"%d \u1019\u102d\u1014\u1005\u103a",h:"\u1010\u1005\u103a\u1014\u102c\u101b\u102e",hh:"%d \u1014\u102c\u101b\u102e",d:"\u1010\u1005\u103a\u101b\u1000\u103a",dd:"%d \u101b\u1000\u103a",M:"\u1010\u1005\u103a\u101c",MM:"%d \u101c",y:"\u1010\u1005\u103a\u1014\u103e\u1005\u103a",yy:"%d \u1014\u103e\u1005\u103a"},preparse:function(e){return e.replace(/[\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049\u1040]/g,function(e){return on[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return _n[e]})},week:{dow:1,doy:4}}),c.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8._ma._ti._on._to._fr._l\xf8.".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"\xe9n time",hh:"%d timer",d:"\xe9n dag",dd:"%d dager",w:"\xe9n uke",ww:"%d uker",M:"\xe9n m\xe5ned",MM:"%d m\xe5neder",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),{1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"}),un={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"},ln=(c.defineLocale("ne",{months:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f\u0932_\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0937\u094d\u091f_\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930_\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930".split("_"),monthsShort:"\u091c\u0928._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f._\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908._\u0905\u0917._\u0938\u0947\u092a\u094d\u091f._\u0905\u0915\u094d\u091f\u094b._\u0928\u094b\u092d\u0947._\u0921\u093f\u0938\u0947.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u0907\u0924\u092c\u093e\u0930_\u0938\u094b\u092e\u092c\u093e\u0930_\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930_\u092c\u0941\u0927\u092c\u093e\u0930_\u092c\u093f\u0939\u093f\u092c\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930_\u0936\u0928\u093f\u092c\u093e\u0930".split("_"),weekdaysShort:"\u0906\u0907\u0924._\u0938\u094b\u092e._\u092e\u0919\u094d\u0917\u0932._\u092c\u0941\u0927._\u092c\u093f\u0939\u093f._\u0936\u0941\u0915\u094d\u0930._\u0936\u0928\u093f.".split("_"),weekdaysMin:"\u0906._\u0938\u094b._\u092e\u0902._\u092c\u0941._\u092c\u093f._\u0936\u0941._\u0936.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A\u0915\u094b h:mm \u092c\u091c\u0947",LTS:"A\u0915\u094b h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return un[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return mn[e]})},meridiemParse:/\u0930\u093e\u0924\u093f|\u092c\u093f\u0939\u093e\u0928|\u0926\u093f\u0909\u0901\u0938\u094b|\u0938\u093e\u0901\u091d/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0930\u093e\u0924\u093f"===a?e<4?e:e+12:"\u092c\u093f\u0939\u093e\u0928"===a?e:"\u0926\u093f\u0909\u0901\u0938\u094b"===a?10<=e?e:e+12:"\u0938\u093e\u0901\u091d"===a?e+12:void 0},meridiem:function(e,a,t){return e<3?"\u0930\u093e\u0924\u093f":e<12?"\u092c\u093f\u0939\u093e\u0928":e<16?"\u0926\u093f\u0909\u0901\u0938\u094b":e<20?"\u0938\u093e\u0901\u091d":"\u0930\u093e\u0924\u093f"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u092d\u094b\u0932\u093f] LT",nextWeek:"[\u0906\u0909\u0901\u0926\u094b] dddd[,] LT",lastDay:"[\u0939\u093f\u091c\u094b] LT",lastWeek:"[\u0917\u090f\u0915\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u093e",past:"%s \u0905\u0917\u093e\u0921\u093f",s:"\u0915\u0947\u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0947\u0923\u094d\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u0947\u091f",mm:"%d \u092e\u093f\u0928\u0947\u091f",h:"\u090f\u0915 \u0918\u0923\u094d\u091f\u093e",hh:"%d \u0918\u0923\u094d\u091f\u093e",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u093f\u0928\u093e",MM:"%d \u092e\u0939\u093f\u0928\u093e",y:"\u090f\u0915 \u092c\u0930\u094d\u0937",yy:"%d \u092c\u0930\u094d\u0937"},week:{dow:0,doy:6}}),"jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_")),Mn="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),_=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],Ie=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,hn=(c.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,a){return e?(/-MMM-/.test(a)?Mn:ln)[e.month()]:ln},monthsRegex:Ie,monthsShortRegex:Ie,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:_,longMonthsParse:_,shortMonthsParse:_,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),"jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_")),cn="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),Ye=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],ye=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,Ln=(c.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,a){return e?(/-MMM-/.test(a)?cn:hn)[e.month()]:hn},monthsRegex:ye,monthsShortRegex:ye,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:Ye,longMonthsParse:Ye,shortMonthsParse:Ye,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",w:"\xe9\xe9n week",ww:"%d weken",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),c.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_m\xe5ndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._m\xe5._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_m\xe5_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I g\xe5r klokka] LT",lastWeek:"[F\xf8reg\xe5ande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein m\xe5nad",MM:"%d m\xe5nader",y:"eit \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("oc-lnc",{months:{standalone:"geni\xe8r_febri\xe8r_mar\xe7_abril_mai_junh_julhet_agost_setembre_oct\xf2bre_novembre_decembre".split("_"),format:"de geni\xe8r_de febri\xe8r_de mar\xe7_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'oct\xf2bre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xe7_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dim\xe8cres_dij\xf2us_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[u\xe8i a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[i\xe8r a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aqu\xed %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(e,a){return e+("w"!==a&&"W"!==a?1===e?"r":2===e?"n":3===e?"r":4===e?"t":"\xe8":"a")},week:{dow:1,doy:4}}),{1:"\u0a67",2:"\u0a68",3:"\u0a69",4:"\u0a6a",5:"\u0a6b",6:"\u0a6c",7:"\u0a6d",8:"\u0a6e",9:"\u0a6f",0:"\u0a66"}),Yn={"\u0a67":"1","\u0a68":"2","\u0a69":"3","\u0a6a":"4","\u0a6b":"5","\u0a6c":"6","\u0a6d":"7","\u0a6e":"8","\u0a6f":"9","\u0a66":"0"},yn=(c.defineLocale("pa-in",{months:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),monthsShort:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),weekdays:"\u0a10\u0a24\u0a35\u0a3e\u0a30_\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30_\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30_\u0a2c\u0a41\u0a27\u0a35\u0a3e\u0a30_\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a28\u0a40\u0a1a\u0a30\u0a35\u0a3e\u0a30".split("_"),weekdaysShort:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),weekdaysMin:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),longDateFormat:{LT:"A h:mm \u0a35\u0a1c\u0a47",LTS:"A h:mm:ss \u0a35\u0a1c\u0a47",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47",LLLL:"dddd, D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47"},calendar:{sameDay:"[\u0a05\u0a1c] LT",nextDay:"[\u0a15\u0a32] LT",nextWeek:"[\u0a05\u0a17\u0a32\u0a3e] dddd, LT",lastDay:"[\u0a15\u0a32] LT",lastWeek:"[\u0a2a\u0a3f\u0a1b\u0a32\u0a47] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0a35\u0a3f\u0a71\u0a1a",past:"%s \u0a2a\u0a3f\u0a1b\u0a32\u0a47",s:"\u0a15\u0a41\u0a1d \u0a38\u0a15\u0a3f\u0a70\u0a1f",ss:"%d \u0a38\u0a15\u0a3f\u0a70\u0a1f",m:"\u0a07\u0a15 \u0a2e\u0a3f\u0a70\u0a1f",mm:"%d \u0a2e\u0a3f\u0a70\u0a1f",h:"\u0a07\u0a71\u0a15 \u0a18\u0a70\u0a1f\u0a3e",hh:"%d \u0a18\u0a70\u0a1f\u0a47",d:"\u0a07\u0a71\u0a15 \u0a26\u0a3f\u0a28",dd:"%d \u0a26\u0a3f\u0a28",M:"\u0a07\u0a71\u0a15 \u0a2e\u0a39\u0a40\u0a28\u0a3e",MM:"%d \u0a2e\u0a39\u0a40\u0a28\u0a47",y:"\u0a07\u0a71\u0a15 \u0a38\u0a3e\u0a32",yy:"%d \u0a38\u0a3e\u0a32"},preparse:function(e){return e.replace(/[\u0a67\u0a68\u0a69\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f\u0a66]/g,function(e){return Yn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Ln[e]})},meridiemParse:/\u0a30\u0a3e\u0a24|\u0a38\u0a35\u0a47\u0a30|\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30|\u0a38\u0a3c\u0a3e\u0a2e/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0a30\u0a3e\u0a24"===a?e<4?e:e+12:"\u0a38\u0a35\u0a47\u0a30"===a?e:"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30"===a?10<=e?e:e+12:"\u0a38\u0a3c\u0a3e\u0a2e"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0a30\u0a3e\u0a24":e<10?"\u0a38\u0a35\u0a47\u0a30":e<17?"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30":e<20?"\u0a38\u0a3c\u0a3e\u0a2e":"\u0a30\u0a3e\u0a24"},week:{dow:0,doy:6}}),"stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017adziernik_listopad_grudzie\u0144".split("_")),fn="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze\u015bnia_pa\u017adziernika_listopada_grudnia".split("_"),na=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^pa\u017a/i,/^lis/i,/^gru/i];function kn(e){return e%10<5&&1<e%10&&~~(e/10)%10!=1}function pn(e,a,t){var s=e+" ";switch(t){case"ss":return s+(kn(e)?"sekundy":"sekund");case"m":return a?"minuta":"minut\u0119";case"mm":return s+(kn(e)?"minuty":"minut");case"h":return a?"godzina":"godzin\u0119";case"hh":return s+(kn(e)?"godziny":"godzin");case"ww":return s+(kn(e)?"tygodnie":"tygodni");case"MM":return s+(kn(e)?"miesi\u0105ce":"miesi\u0119cy");case"yy":return s+(kn(e)?"lata":"lat")}}function Dn(e,a,t){return e+(20<=e%100||100<=e&&e%100==0?" de ":" ")+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"s\u0103pt\u0103m\xe2ni",MM:"luni",yy:"ani"}[t]}function Tn(e,a,t){return"m"===t?a?"\u043c\u0438\u043d\u0443\u0442\u0430":"\u043c\u0438\u043d\u0443\u0442\u0443":e+" "+(e=+e,a=(a={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u043c\u0438\u043d\u0443\u0442\u0430_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442":"\u043c\u0438\u043d\u0443\u0442\u0443_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043e\u0432",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u044f_\u0434\u043d\u0435\u0439",ww:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043d\u0435\u0434\u0435\u043b\u0438_\u043d\u0435\u0434\u0435\u043b\u044c",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u0430_\u043c\u0435\u0441\u044f\u0446\u0435\u0432",yy:"\u0433\u043e\u0434_\u0433\u043e\u0434\u0430_\u043b\u0435\u0442"}[t]).split("_"),e%10==1&&e%100!=11?a[0]:2<=e%10&&e%10<=4&&(e%100<10||20<=e%100)?a[1]:a[2])}c.defineLocale("pl",{months:function(e,a){return e?(/D MMMM/.test(a)?fn:yn)[e.month()]:yn},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017a_lis_gru".split("_"),monthsParse:na,longMonthsParse:na,shortMonthsParse:na,weekdays:"niedziela_poniedzia\u0142ek_wtorek_\u015broda_czwartek_pi\u0105tek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_\u015br_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_\u015ar_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dzi\u015b o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedziel\u0119 o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W \u015brod\u0119 o] LT";case 6:return"[W sobot\u0119 o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zesz\u0142\u0105 niedziel\u0119 o] LT";case 3:return"[W zesz\u0142\u0105 \u015brod\u0119 o] LT";case 6:return"[W zesz\u0142\u0105 sobot\u0119 o] LT";default:return"[W zesz\u0142y] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:pn,m:pn,mm:pn,h:pn,hh:pn,d:"1 dzie\u0144",dd:"%d dni",w:"tydzie\u0144",ww:pn,M:"miesi\u0105c",MM:pn,y:"rok",yy:pn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("pt-br",{months:"janeiro_fevereiro_mar\xe7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_ter\xe7a-feira_quarta-feira_quinta-feira_sexta-feira_s\xe1bado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_s\xe1b".split("_"),weekdaysMin:"do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [\xe0s] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [\xe0s] HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",invalidDate:"Data inv\xe1lida"}),c.defineLocale("pt",{months:"janeiro_fevereiro_mar\xe7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Ter\xe7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\xe1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\xe1b".split("_"),weekdaysMin:"Do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}}),c.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminic\u0103_luni_mar\u021bi_miercuri_joi_vineri_s\xe2mb\u0103t\u0103".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_S\xe2m".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_S\xe2".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[m\xe2ine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s \xeen urm\u0103",s:"c\xe2teva secunde",ss:Dn,m:"un minut",mm:Dn,h:"o or\u0103",hh:Dn,d:"o zi",dd:Dn,w:"o s\u0103pt\u0103m\xe2n\u0103",ww:Dn,M:"o lun\u0103",MM:Dn,y:"un an",yy:Dn},week:{dow:1,doy:7}});t=[/^\u044f\u043d\u0432/i,/^\u0444\u0435\u0432/i,/^\u043c\u0430\u0440/i,/^\u0430\u043f\u0440/i,/^\u043c\u0430[\u0439\u044f]/i,/^\u0438\u044e\u043d/i,/^\u0438\u044e\u043b/i,/^\u0430\u0432\u0433/i,/^\u0441\u0435\u043d/i,/^\u043e\u043a\u0442/i,/^\u043d\u043e\u044f/i,/^\u0434\u0435\u043a/i],c.defineLocale("ru",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u044f_\u0444\u0435\u0432\u0440\u0430\u043b\u044f_\u043c\u0430\u0440\u0442\u0430_\u0430\u043f\u0440\u0435\u043b\u044f_\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f_\u043e\u043a\u0442\u044f\u0431\u0440\u044f_\u043d\u043e\u044f\u0431\u0440\u044f_\u0434\u0435\u043a\u0430\u0431\u0440\u044f".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_")},monthsShort:{format:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_"),standalone:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440\u0442_\u0430\u043f\u0440._\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_")},weekdays:{standalone:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043e\u0442\u0430".split("_"),format:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0443_\u0441\u0443\u0431\u0431\u043e\u0442\u0443".split("_"),isFormat:/\[ ?[\u0412\u0432] ?(?:\u043f\u0440\u043e\u0448\u043b\u0443\u044e|\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e|\u044d\u0442\u0443)? ?] ?dddd/},weekdaysShort:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),monthsParse:t,longMonthsParse:t,shortMonthsParse:t,monthsRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsShortRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsStrictRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044f\u044c]|\u0444\u0435\u0432\u0440\u0430\u043b[\u044f\u044c]|\u043c\u0430\u0440\u0442\u0430?|\u0430\u043f\u0440\u0435\u043b[\u044f\u044c]|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044f\u044c]|\u0438\u044e\u043b[\u044f\u044c]|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043e\u043a\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043d\u043e\u044f\u0431\u0440[\u044f\u044c]|\u0434\u0435\u043a\u0430\u0431\u0440[\u044f\u044c])/i,monthsShortStrictRegex:/^(\u044f\u043d\u0432\.|\u0444\u0435\u0432\u0440?\.|\u043c\u0430\u0440[\u0442.]|\u0430\u043f\u0440\.|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044c\u044f.]|\u0438\u044e\u043b[\u044c\u044f.]|\u0430\u0432\u0433\.|\u0441\u0435\u043d\u0442?\.|\u043e\u043a\u0442\.|\u043d\u043e\u044f\u0431?\.|\u0434\u0435\u043a\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., H:mm",LLLL:"dddd, D MMMM YYYY \u0433., H:mm"},calendar:{sameDay:"[\u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u0432] LT",nextDay:"[\u0417\u0430\u0432\u0442\u0440\u0430, \u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430, \u0432] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e] dddd, [\u0432] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u0443\u044e] dddd, [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043d\u0430\u0437\u0430\u0434",s:"\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434",ss:Tn,m:Tn,mm:Tn,h:"\u0447\u0430\u0441",hh:Tn,d:"\u0434\u0435\u043d\u044c",dd:Tn,w:"\u043d\u0435\u0434\u0435\u043b\u044f",ww:Tn,M:"\u043c\u0435\u0441\u044f\u0446",MM:Tn,y:"\u0433\u043e\u0434",yy:Tn},meridiemParse:/\u043d\u043e\u0447\u0438|\u0443\u0442\u0440\u0430|\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430/i,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u0438":e<12?"\u0443\u0442\u0440\u0430":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0435\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e|\u044f)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":return e+"-\u0439";case"D":return e+"-\u0433\u043e";case"w":case"W":return e+"-\u044f";default:return e}},week:{dow:1,doy:4}}),m=["\u062c\u0646\u0648\u0631\u064a","\u0641\u064a\u0628\u0631\u0648\u0631\u064a","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u064a\u0644","\u0645\u0626\u064a","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0621\u0650","\u0622\u06af\u0633\u067d","\u0633\u064a\u067e\u067d\u0645\u0628\u0631","\u0622\u06aa\u067d\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u068a\u0633\u0645\u0628\u0631"],o=["\u0622\u0686\u0631","\u0633\u0648\u0645\u0631","\u0627\u06b1\u0627\u0631\u0648","\u0627\u0631\u0628\u0639","\u062e\u0645\u064a\u0633","\u062c\u0645\u0639","\u0687\u0646\u0687\u0631"],c.defineLocale("sd",{months:m,monthsShort:m,weekdays:o,weekdaysShort:o,weekdaysMin:o,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0627\u0684] LT",nextDay:"[\u0633\u0680\u0627\u06bb\u064a] LT",nextWeek:"dddd [\u0627\u06b3\u064a\u0646 \u0647\u0641\u062a\u064a \u062a\u064a] LT",lastDay:"[\u06aa\u0627\u0644\u0647\u0647] LT",lastWeek:"[\u06af\u0632\u0631\u064a\u0644 \u0647\u0641\u062a\u064a] dddd [\u062a\u064a] LT",sameElse:"L"},relativeTime:{future:"%s \u067e\u0648\u0621",past:"%s \u0627\u06b3",s:"\u0686\u0646\u062f \u0633\u064a\u06aa\u0646\u068a",ss:"%d \u0633\u064a\u06aa\u0646\u068a",m:"\u0647\u06aa \u0645\u0646\u067d",mm:"%d \u0645\u0646\u067d",h:"\u0647\u06aa \u06aa\u0644\u0627\u06aa",hh:"%d \u06aa\u0644\u0627\u06aa",d:"\u0647\u06aa \u068f\u064a\u0646\u0647\u0646",dd:"%d \u068f\u064a\u0646\u0647\u0646",M:"\u0647\u06aa \u0645\u0647\u064a\u0646\u0648",MM:"%d \u0645\u0647\u064a\u0646\u0627",y:"\u0647\u06aa \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}}),c.defineLocale("se",{months:"o\u0111\u0111ajagem\xe1nnu_guovvam\xe1nnu_njuk\u010dam\xe1nnu_cuo\u014bom\xe1nnu_miessem\xe1nnu_geassem\xe1nnu_suoidnem\xe1nnu_borgem\xe1nnu_\u010dak\u010dam\xe1nnu_golggotm\xe1nnu_sk\xe1bmam\xe1nnu_juovlam\xe1nnu".split("_"),monthsShort:"o\u0111\u0111j_guov_njuk_cuo_mies_geas_suoi_borg_\u010dak\u010d_golg_sk\xe1b_juov".split("_"),weekdays:"sotnabeaivi_vuoss\xe1rga_ma\u014b\u014beb\xe1rga_gaskavahkku_duorastat_bearjadat_l\xe1vvardat".split("_"),weekdaysShort:"sotn_vuos_ma\u014b_gask_duor_bear_l\xe1v".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s gea\u017ees",past:"ma\u014bit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta m\xe1nnu",MM:"%d m\xe1nut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("si",{months:"\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2_\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2_\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4_\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4_\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca_\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca".split("_"),monthsShort:"\u0da2\u0db1_\u0db4\u0dd9\u0db6_\u0db8\u0dcf\u0dbb\u0dca_\u0d85\u0db4\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd_\u0dc3\u0dd0\u0db4\u0dca_\u0d94\u0d9a\u0dca_\u0db1\u0ddc\u0dc0\u0dd0_\u0daf\u0dd9\u0dc3\u0dd0".split("_"),weekdays:"\u0d89\u0dbb\u0dd2\u0daf\u0dcf_\u0dc3\u0db3\u0dd4\u0daf\u0dcf_\u0d85\u0d9f\u0dc4\u0dbb\u0dd4\u0dc0\u0dcf\u0daf\u0dcf_\u0db6\u0daf\u0dcf\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca\u0db4\u0dad\u0dd2\u0db1\u0dca\u0daf\u0dcf_\u0dc3\u0dd2\u0d9a\u0dd4\u0dbb\u0dcf\u0daf\u0dcf_\u0dc3\u0dd9\u0db1\u0dc3\u0dd4\u0dbb\u0dcf\u0daf\u0dcf".split("_"),weekdaysShort:"\u0d89\u0dbb\u0dd2_\u0dc3\u0db3\u0dd4_\u0d85\u0d9f_\u0db6\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4_\u0dc3\u0dd2\u0d9a\u0dd4_\u0dc3\u0dd9\u0db1".split("_"),weekdaysMin:"\u0d89_\u0dc3_\u0d85_\u0db6_\u0db6\u0dca\u200d\u0dbb_\u0dc3\u0dd2_\u0dc3\u0dd9".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [\u0dc0\u0dd0\u0db1\u0dd2] dddd, a h:mm:ss"},calendar:{sameDay:"[\u0d85\u0daf] LT[\u0da7]",nextDay:"[\u0dc4\u0dd9\u0da7] LT[\u0da7]",nextWeek:"dddd LT[\u0da7]",lastDay:"[\u0d8a\u0dba\u0dda] LT[\u0da7]",lastWeek:"[\u0db4\u0dc3\u0dd4\u0d9c\u0dd2\u0dba] dddd LT[\u0da7]",sameElse:"L"},relativeTime:{future:"%s\u0d9a\u0dd2\u0db1\u0dca",past:"%s\u0d9a\u0da7 \u0db4\u0dd9\u0dbb",s:"\u0dad\u0dad\u0dca\u0db4\u0dbb \u0d9a\u0dd2\u0dc4\u0dd2\u0db4\u0dba",ss:"\u0dad\u0dad\u0dca\u0db4\u0dbb %d",m:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4\u0dc0",mm:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4 %d",h:"\u0db4\u0dd0\u0dba",hh:"\u0db4\u0dd0\u0dba %d",d:"\u0daf\u0dd2\u0db1\u0dba",dd:"\u0daf\u0dd2\u0db1 %d",M:"\u0db8\u0dcf\u0dc3\u0dba",MM:"\u0db8\u0dcf\u0dc3 %d",y:"\u0dc0\u0dc3\u0dbb",yy:"\u0dc0\u0dc3\u0dbb %d"},dayOfMonthOrdinalParse:/\d{1,2} \u0dc0\u0dd0\u0db1\u0dd2/,ordinal:function(e){return e+" \u0dc0\u0dd0\u0db1\u0dd2"},meridiemParse:/\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4|\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4|\u0db4\u0dd9.\u0dc0|\u0db4.\u0dc0./,isPM:function(e){return"\u0db4.\u0dc0."===e||"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4"===e},meridiem:function(e,a,t){return 11<e?t?"\u0db4.\u0dc0.":"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4":t?"\u0db4\u0dd9.\u0dc0.":"\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4"}}),n="janu\xe1r_febru\xe1r_marec_apr\xedl_m\xe1j_j\xfan_j\xfal_august_september_okt\xf3ber_november_december".split("_"),ze="jan_feb_mar_apr_m\xe1j_j\xfan_j\xfal_aug_sep_okt_nov_dec".split("_");function gn(e){return 1<e&&e<5}function wn(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"p\xe1r sek\xfand":"p\xe1r sekundami";case"ss":return a||s?n+(gn(e)?"sekundy":"sek\xfand"):n+"sekundami";case"m":return a?"min\xfata":s?"min\xfatu":"min\xfatou";case"mm":return a||s?n+(gn(e)?"min\xfaty":"min\xfat"):n+"min\xfatami";case"h":return a?"hodina":s?"hodinu":"hodinou";case"hh":return a||s?n+(gn(e)?"hodiny":"hod\xedn"):n+"hodinami";case"d":return a||s?"de\u0148":"d\u0148om";case"dd":return a||s?n+(gn(e)?"dni":"dn\xed"):n+"d\u0148ami";case"M":return a||s?"mesiac":"mesiacom";case"MM":return a||s?n+(gn(e)?"mesiace":"mesiacov"):n+"mesiacmi";case"y":return a||s?"rok":"rokom";case"yy":return a||s?n+(gn(e)?"roky":"rokov"):n+"rokmi"}}function bn(e,a,t,s){var n=e+" ";switch(t){case"s":return a||s?"nekaj sekund":"nekaj sekundami";case"ss":return n+=1===e?a?"sekundo":"sekundi":2===e?a||s?"sekundi":"sekundah":e<5?a||s?"sekunde":"sekundah":"sekund";case"m":return a?"ena minuta":"eno minuto";case"mm":return n+=1===e?a?"minuta":"minuto":2===e?a||s?"minuti":"minutama":e<5?a||s?"minute":"minutami":a||s?"minut":"minutami";case"h":return a?"ena ura":"eno uro";case"hh":return n+=1===e?a?"ura":"uro":2===e?a||s?"uri":"urama":e<5?a||s?"ure":"urami":a||s?"ur":"urami";case"d":return a||s?"en dan":"enim dnem";case"dd":return n+=1===e?a||s?"dan":"dnem":2===e?a||s?"dni":"dnevoma":a||s?"dni":"dnevi";case"M":return a||s?"en mesec":"enim mesecem";case"MM":return n+=1===e?a||s?"mesec":"mesecem":2===e?a||s?"meseca":"mesecema":e<5?a||s?"mesece":"meseci":a||s?"mesecev":"meseci";case"y":return a||s?"eno leto":"enim letom";case"yy":return n+=1===e?a||s?"leto":"letom":2===e?a||s?"leti":"letoma":e<5?a||s?"leta":"leti":a||s?"let":"leti"}}c.defineLocale("sk",{months:n,monthsShort:ze,weekdays:"nede\u013ea_pondelok_utorok_streda_\u0161tvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_\u0161t_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_\u0161t_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nede\u013eu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo \u0161tvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[v\u010dera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minul\xfa nede\u013eu o] LT";case 1:case 2:return"[minul\xfd] dddd [o] LT";case 3:return"[minul\xfa stredu o] LT";case 4:case 5:return"[minul\xfd] dddd [o] LT";case 6:return"[minul\xfa sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:wn,ss:wn,m:wn,mm:wn,h:wn,hh:wn,d:wn,dd:wn,M:wn,MM:wn,y:wn,yy:wn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_\u010detrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._\u010det._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_\u010de_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[v\u010deraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prej\u0161njo] [nedeljo] [ob] LT";case 3:return"[prej\u0161njo] [sredo] [ob] LT";case 6:return"[prej\u0161njo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prej\u0161nji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"\u010dez %s",past:"pred %s",s:bn,ss:bn,m:bn,mm:bn,h:bn,hh:bn,d:bn,dd:bn,M:bn,MM:bn,y:bn,yy:bn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),c.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_N\xebntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_N\xebn_Dhj".split("_"),weekdays:"E Diel_E H\xebn\xeb_E Mart\xeb_E M\xebrkur\xeb_E Enjte_E Premte_E Shtun\xeb".split("_"),weekdaysShort:"Die_H\xebn_Mar_M\xebr_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_M\xeb_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,a,t){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot n\xeb] LT",nextDay:"[Nes\xebr n\xeb] LT",nextWeek:"dddd [n\xeb] LT",lastDay:"[Dje n\xeb] LT",lastWeek:"dddd [e kaluar n\xeb] LT",sameElse:"L"},relativeTime:{future:"n\xeb %s",past:"%s m\xeb par\xeb",s:"disa sekonda",ss:"%d sekonda",m:"nj\xeb minut\xeb",mm:"%d minuta",h:"nj\xeb or\xeb",hh:"%d or\xeb",d:"nj\xeb dit\xeb",dd:"%d dit\xeb",M:"nj\xeb muaj",MM:"%d muaj",y:"nj\xeb vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var W={words:{ss:["\u0441\u0435\u043a\u0443\u043d\u0434\u0430","\u0441\u0435\u043a\u0443\u043d\u0434\u0435","\u0441\u0435\u043a\u0443\u043d\u0434\u0438"],m:["\u0458\u0435\u0434\u0430\u043d \u043c\u0438\u043d\u0443\u0442","\u0458\u0435\u0434\u043d\u043e\u0433 \u043c\u0438\u043d\u0443\u0442\u0430"],mm:["\u043c\u0438\u043d\u0443\u0442","\u043c\u0438\u043d\u0443\u0442\u0430","\u043c\u0438\u043d\u0443\u0442\u0430"],h:["\u0458\u0435\u0434\u0430\u043d \u0441\u0430\u0442","\u0458\u0435\u0434\u043d\u043e\u0433 \u0441\u0430\u0442\u0430"],hh:["\u0441\u0430\u0442","\u0441\u0430\u0442\u0430","\u0441\u0430\u0442\u0438"],d:["\u0458\u0435\u0434\u0430\u043d \u0434\u0430\u043d","\u0458\u0435\u0434\u043d\u043e\u0433 \u0434\u0430\u043d\u0430"],dd:["\u0434\u0430\u043d","\u0434\u0430\u043d\u0430","\u0434\u0430\u043d\u0430"],M:["\u0458\u0435\u0434\u0430\u043d \u043c\u0435\u0441\u0435\u0446","\u0458\u0435\u0434\u043d\u043e\u0433 \u043c\u0435\u0441\u0435\u0446\u0430"],MM:["\u043c\u0435\u0441\u0435\u0446","\u043c\u0435\u0441\u0435\u0446\u0430","\u043c\u0435\u0441\u0435\u0446\u0438"],y:["\u0458\u0435\u0434\u043d\u0443 \u0433\u043e\u0434\u0438\u043d\u0443","\u0458\u0435\u0434\u043d\u0435 \u0433\u043e\u0434\u0438\u043d\u0435"],yy:["\u0433\u043e\u0434\u0438\u043d\u0443","\u0433\u043e\u0434\u0438\u043d\u0435","\u0433\u043e\u0434\u0438\u043d\u0430"]},correctGrammaticalCase:function(e,a){return 1<=e%10&&e%10<=4&&(e%100<10||20<=e%100)?e%10==1?a[0]:a[1]:a[2]},translate:function(e,a,t,s){var n=W.words[t];return 1===t.length?"y"===t&&a?"\u0458\u0435\u0434\u043d\u0430 \u0433\u043e\u0434\u0438\u043d\u0430":s||a?n[0]:n[1]:(s=W.correctGrammaticalCase(e,n),"yy"===t&&a&&"\u0433\u043e\u0434\u0438\u043d\u0443"===s?e+" \u0433\u043e\u0434\u0438\u043d\u0430":e+" "+s)}},A=(c.defineLocale("sr-cyrl",{months:"\u0458\u0430\u043d\u0443\u0430\u0440_\u0444\u0435\u0431\u0440\u0443\u0430\u0440_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440_\u043e\u043a\u0442\u043e\u0431\u0430\u0440_\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440_\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440".split("_"),monthsShort:"\u0458\u0430\u043d._\u0444\u0435\u0431._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433._\u0441\u0435\u043f._\u043e\u043a\u0442._\u043d\u043e\u0432._\u0434\u0435\u0446.".split("_"),monthsParseExact:!0,weekdays:"\u043d\u0435\u0434\u0435\u0459\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a_\u0443\u0442\u043e\u0440\u0430\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a_\u043f\u0435\u0442\u0430\u043a_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434._\u043f\u043e\u043d._\u0443\u0442\u043e._\u0441\u0440\u0435._\u0447\u0435\u0442._\u043f\u0435\u0442._\u0441\u0443\u0431.".split("_"),weekdaysMin:"\u043d\u0435_\u043f\u043e_\u0443\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441\u0443".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[\u0434\u0430\u043d\u0430\u0441 \u0443] LT",nextDay:"[\u0441\u0443\u0442\u0440\u0430 \u0443] LT",nextWeek:function(){switch(this.day()){case 0:return"[\u0443] [\u043d\u0435\u0434\u0435\u0459\u0443] [\u0443] LT";case 3:return"[\u0443] [\u0441\u0440\u0435\u0434\u0443] [\u0443] LT";case 6:return"[\u0443] [\u0441\u0443\u0431\u043e\u0442\u0443] [\u0443] LT";case 1:case 2:case 4:case 5:return"[\u0443] dddd [\u0443] LT"}},lastDay:"[\u0458\u0443\u0447\u0435 \u0443] LT",lastWeek:function(){return["[\u043f\u0440\u043e\u0448\u043b\u0435] [\u043d\u0435\u0434\u0435\u0459\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0443\u0442\u043e\u0440\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0440\u0435\u0434\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0447\u0435\u0442\u0432\u0440\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u0435\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0443\u0431\u043e\u0442\u0435] [\u0443] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435 %s",s:"\u043d\u0435\u043a\u043e\u043b\u0438\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:W.translate,m:W.translate,mm:W.translate,h:W.translate,hh:W.translate,d:W.translate,dd:W.translate,M:W.translate,MM:W.translate,y:W.translate,yy:W.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),{words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(e,a){return 1<=e%10&&e%10<=4&&(e%100<10||20<=e%100)?e%10==1?a[0]:a[1]:a[2]},translate:function(e,a,t,s){var n=A.words[t];return 1===t.length?"y"===t&&a?"jedna godina":s||a?n[0]:n[1]:(s=A.correctGrammaticalCase(e,n),"yy"===t&&a&&"godinu"===s?e+" godina":e+" "+s)}}),Hn=(c.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedelje] [u] LT","[pro\u0161log] [ponedeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:A.translate,m:A.translate,mm:A.translate,h:A.translate,hh:A.translate,d:A.translate,dd:A.translate,M:A.translate,MM:A.translate,y:A.translate,yy:A.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),c.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,a,t){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,a){return 12===e&&(e=0),"ekuseni"===a?e:"emini"===a?11<=e?e:e+12:"entsambama"===a||"ebusuku"===a?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}}),c.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf6ndag_m\xe5ndag_tisdag_onsdag_torsdag_fredag_l\xf6rdag".split("_"),weekdaysShort:"s\xf6n_m\xe5n_tis_ons_tor_fre_l\xf6r".split("_"),weekdaysMin:"s\xf6_m\xe5_ti_on_to_fr_l\xf6".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Ig\xe5r] LT",nextWeek:"[P\xe5] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"f\xf6r %s sedan",s:"n\xe5gra sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en m\xe5nad",MM:"%d m\xe5nader",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var a=e%10;return e+(1!=~~(e%100/10)&&(1==a||2==a)?":a":":e")},week:{dow:1,doy:4}}),c.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}}),{1:"\u0be7",2:"\u0be8",3:"\u0be9",4:"\u0bea",5:"\u0beb",6:"\u0bec",7:"\u0bed",8:"\u0bee",9:"\u0bef",0:"\u0be6"}),Sn={"\u0be7":"1","\u0be8":"2","\u0be9":"3","\u0bea":"4","\u0beb":"5","\u0bec":"6","\u0bed":"7","\u0bee":"8","\u0bef":"9","\u0be6":"0"},vn=(c.defineLocale("ta",{months:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),monthsShort:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),weekdays:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bcd\u0bb1\u0bc1\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0b9f\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0ba9\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8".split("_"),weekdaysShort:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf_\u0b9a\u0ba9\u0bbf".split("_"),weekdaysMin:"\u0b9e\u0bbe_\u0ba4\u0bbf_\u0b9a\u0bc6_\u0baa\u0bc1_\u0bb5\u0bbf_\u0bb5\u0bc6_\u0b9a".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[\u0b87\u0ba9\u0bcd\u0bb1\u0bc1] LT",nextDay:"[\u0ba8\u0bbe\u0bb3\u0bc8] LT",nextWeek:"dddd, LT",lastDay:"[\u0ba8\u0bc7\u0bb1\u0bcd\u0bb1\u0bc1] LT",lastWeek:"[\u0b95\u0b9f\u0ba8\u0bcd\u0ba4 \u0bb5\u0bbe\u0bb0\u0bae\u0bcd] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0b87\u0bb2\u0bcd",past:"%s \u0bae\u0bc1\u0ba9\u0bcd",s:"\u0b92\u0bb0\u0bc1 \u0b9a\u0bbf\u0bb2 \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",ss:"%d \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",m:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0bae\u0bcd",mm:"%d \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd",h:"\u0b92\u0bb0\u0bc1 \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",hh:"%d \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",d:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbe\u0bb3\u0bcd",dd:"%d \u0ba8\u0bbe\u0b9f\u0bcd\u0b95\u0bb3\u0bcd",M:"\u0b92\u0bb0\u0bc1 \u0bae\u0bbe\u0ba4\u0bae\u0bcd",MM:"%d \u0bae\u0bbe\u0ba4\u0b99\u0bcd\u0b95\u0bb3\u0bcd",y:"\u0b92\u0bb0\u0bc1 \u0bb5\u0bb0\u0bc1\u0b9f\u0bae\u0bcd",yy:"%d \u0b86\u0ba3\u0bcd\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"},dayOfMonthOrdinalParse:/\d{1,2}\u0bb5\u0ba4\u0bc1/,ordinal:function(e){return e+"\u0bb5\u0ba4\u0bc1"},preparse:function(e){return e.replace(/[\u0be7\u0be8\u0be9\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef\u0be6]/g,function(e){return Sn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Hn[e]})},meridiemParse:/\u0baf\u0bbe\u0bae\u0bae\u0bcd|\u0bb5\u0bc8\u0b95\u0bb1\u0bc8|\u0b95\u0bbe\u0bb2\u0bc8|\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd|\u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1|\u0bae\u0bbe\u0bb2\u0bc8/,meridiem:function(e,a,t){return e<2?" \u0baf\u0bbe\u0bae\u0bae\u0bcd":e<6?" \u0bb5\u0bc8\u0b95\u0bb1\u0bc8":e<10?" \u0b95\u0bbe\u0bb2\u0bc8":e<14?" \u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd":e<18?" \u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1":e<22?" \u0bae\u0bbe\u0bb2\u0bc8":" \u0baf\u0bbe\u0bae\u0bae\u0bcd"},meridiemHour:function(e,a){return 12===e&&(e=0),"\u0baf\u0bbe\u0bae\u0bae\u0bcd"===a?e<2?e:e+12:"\u0bb5\u0bc8\u0b95\u0bb1\u0bc8"===a||"\u0b95\u0bbe\u0bb2\u0bc8"===a||"\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd"===a&&10<=e?e:e+12},week:{dow:0,doy:6}}),c.defineLocale("te",{months:"\u0c1c\u0c28\u0c35\u0c30\u0c3f_\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f_\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d_\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41_\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d_\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d_\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d_\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d".split("_"),monthsShort:"\u0c1c\u0c28._\u0c2b\u0c3f\u0c2c\u0c4d\u0c30._\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f._\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17._\u0c38\u0c46\u0c2a\u0c4d._\u0c05\u0c15\u0c4d\u0c1f\u0c4b._\u0c28\u0c35._\u0c21\u0c3f\u0c38\u0c46.".split("_"),monthsParseExact:!0,weekdays:"\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02_\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02_\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02_\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02_\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02".split("_"),weekdaysShort:"\u0c06\u0c26\u0c3f_\u0c38\u0c4b\u0c2e_\u0c2e\u0c02\u0c17\u0c33_\u0c2c\u0c41\u0c27_\u0c17\u0c41\u0c30\u0c41_\u0c36\u0c41\u0c15\u0c4d\u0c30_\u0c36\u0c28\u0c3f".split("_"),weekdaysMin:"\u0c06_\u0c38\u0c4b_\u0c2e\u0c02_\u0c2c\u0c41_\u0c17\u0c41_\u0c36\u0c41_\u0c36".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c28\u0c47\u0c21\u0c41] LT",nextDay:"[\u0c30\u0c47\u0c2a\u0c41] LT",nextWeek:"dddd, LT",lastDay:"[\u0c28\u0c3f\u0c28\u0c4d\u0c28] LT",lastWeek:"[\u0c17\u0c24] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0c32\u0c4b",past:"%s \u0c15\u0c4d\u0c30\u0c3f\u0c24\u0c02",s:"\u0c15\u0c4a\u0c28\u0c4d\u0c28\u0c3f \u0c15\u0c4d\u0c37\u0c23\u0c3e\u0c32\u0c41",ss:"%d \u0c38\u0c46\u0c15\u0c28\u0c4d\u0c32\u0c41",m:"\u0c12\u0c15 \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c02",mm:"%d \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c3e\u0c32\u0c41",h:"\u0c12\u0c15 \u0c17\u0c02\u0c1f",hh:"%d \u0c17\u0c02\u0c1f\u0c32\u0c41",d:"\u0c12\u0c15 \u0c30\u0c4b\u0c1c\u0c41",dd:"%d \u0c30\u0c4b\u0c1c\u0c41\u0c32\u0c41",M:"\u0c12\u0c15 \u0c28\u0c46\u0c32",MM:"%d \u0c28\u0c46\u0c32\u0c32\u0c41",y:"\u0c12\u0c15 \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c02",yy:"%d \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c3e\u0c32\u0c41"},dayOfMonthOrdinalParse:/\d{1,2}\u0c35/,ordinal:"%d\u0c35",meridiemParse:/\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f|\u0c09\u0c26\u0c2f\u0c02|\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02|\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"===a?e<4?e:e+12:"\u0c09\u0c26\u0c2f\u0c02"===a?e:"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02"===a?10<=e?e:e+12:"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f":e<10?"\u0c09\u0c26\u0c2f\u0c02":e<17?"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02":e<20?"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02":"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"},week:{dow:0,doy:6}}),c.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Ju\xf1u_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}}),{0:"-\u0443\u043c",1:"-\u0443\u043c",2:"-\u044e\u043c",3:"-\u044e\u043c",4:"-\u0443\u043c",5:"-\u0443\u043c",6:"-\u0443\u043c",7:"-\u0443\u043c",8:"-\u0443\u043c",9:"-\u0443\u043c",10:"-\u0443\u043c",12:"-\u0443\u043c",13:"-\u0443\u043c",20:"-\u0443\u043c",30:"-\u044e\u043c",40:"-\u0443\u043c",50:"-\u0443\u043c",60:"-\u0443\u043c",70:"-\u0443\u043c",80:"-\u0443\u043c",90:"-\u0443\u043c",100:"-\u0443\u043c"}),jn=(c.defineLocale("tg",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0430\u043b\u0438_\u043c\u0430\u0440\u0442\u0438_\u0430\u043f\u0440\u0435\u043b\u0438_\u043c\u0430\u0439\u0438_\u0438\u044e\u043d\u0438_\u0438\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442\u0438_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0438_\u043e\u043a\u0442\u044f\u0431\u0440\u0438_\u043d\u043e\u044f\u0431\u0440\u0438_\u0434\u0435\u043a\u0430\u0431\u0440\u0438".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_")},monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u044f\u043a\u0448\u0430\u043d\u0431\u0435_\u0434\u0443\u0448\u0430\u043d\u0431\u0435_\u0441\u0435\u0448\u0430\u043d\u0431\u0435_\u0447\u043e\u0440\u0448\u0430\u043d\u0431\u0435_\u043f\u0430\u043d\u04b7\u0448\u0430\u043d\u0431\u0435_\u04b7\u0443\u043c\u044a\u0430_\u0448\u0430\u043d\u0431\u0435".split("_"),weekdaysShort:"\u044f\u0448\u0431_\u0434\u0448\u0431_\u0441\u0448\u0431_\u0447\u0448\u0431_\u043f\u0448\u0431_\u04b7\u0443\u043c_\u0448\u043d\u0431".split("_"),weekdaysMin:"\u044f\u0448_\u0434\u0448_\u0441\u0448_\u0447\u0448_\u043f\u0448_\u04b7\u043c_\u0448\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0418\u043c\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextDay:"[\u0424\u0430\u0440\u0434\u043e \u0441\u043e\u0430\u0442\u0438] LT",lastDay:"[\u0414\u0438\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u043e\u044f\u043d\u0434\u0430 \u0441\u043e\u0430\u0442\u0438] LT",lastWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u0433\u0443\u0437\u0430\u0448\u0442\u0430 \u0441\u043e\u0430\u0442\u0438] LT",sameElse:"L"},relativeTime:{future:"\u0431\u0430\u044a\u0434\u0438 %s",past:"%s \u043f\u0435\u0448",s:"\u044f\u043a\u0447\u0430\u043d\u0434 \u0441\u043e\u043d\u0438\u044f",m:"\u044f\u043a \u0434\u0430\u049b\u0438\u049b\u0430",mm:"%d \u0434\u0430\u049b\u0438\u049b\u0430",h:"\u044f\u043a \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u044f\u043a \u0440\u04ef\u0437",dd:"%d \u0440\u04ef\u0437",M:"\u044f\u043a \u043c\u043e\u04b3",MM:"%d \u043c\u043e\u04b3",y:"\u044f\u043a \u0441\u043e\u043b",yy:"%d \u0441\u043e\u043b"},meridiemParse:/\u0448\u0430\u0431|\u0441\u0443\u0431\u04b3|\u0440\u04ef\u0437|\u0431\u0435\u0433\u043e\u04b3/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0448\u0430\u0431"===a?e<4?e:e+12:"\u0441\u0443\u0431\u04b3"===a?e:"\u0440\u04ef\u0437"===a?11<=e?e:e+12:"\u0431\u0435\u0433\u043e\u04b3"===a?e+12:void 0},meridiem:function(e,a,t){return e<4?"\u0448\u0430\u0431":e<11?"\u0441\u0443\u0431\u04b3":e<16?"\u0440\u04ef\u0437":e<19?"\u0431\u0435\u0433\u043e\u04b3":"\u0448\u0430\u0431"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0443\u043c|\u044e\u043c)/,ordinal:function(e){return e+(vn[e]||vn[e%10]||vn[100<=e?100:null])},week:{dow:1,doy:7}}),c.defineLocale("th",{months:"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21_\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c_\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21_\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19_\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21_\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19_\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21_\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21_\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19_\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21_\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19_\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split("_"),monthsShort:"\u0e21.\u0e04._\u0e01.\u0e1e._\u0e21\u0e35.\u0e04._\u0e40\u0e21.\u0e22._\u0e1e.\u0e04._\u0e21\u0e34.\u0e22._\u0e01.\u0e04._\u0e2a.\u0e04._\u0e01.\u0e22._\u0e15.\u0e04._\u0e1e.\u0e22._\u0e18.\u0e04.".split("_"),monthsParseExact:!0,weekdays:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysShort:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysMin:"\u0e2d\u0e32._\u0e08._\u0e2d._\u0e1e._\u0e1e\u0e24._\u0e28._\u0e2a.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm",LLLL:"\u0e27\u0e31\u0e19dddd\u0e17\u0e35\u0e48 D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm"},meridiemParse:/\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07|\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07/,isPM:function(e){return"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"===e},meridiem:function(e,a,t){return e<12?"\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07":"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"},calendar:{sameDay:"[\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextDay:"[\u0e1e\u0e23\u0e38\u0e48\u0e07\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextWeek:"dddd[\u0e2b\u0e19\u0e49\u0e32 \u0e40\u0e27\u0e25\u0e32] LT",lastDay:"[\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",lastWeek:"[\u0e27\u0e31\u0e19]dddd[\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e27\u0e25\u0e32] LT",sameElse:"L"},relativeTime:{future:"\u0e2d\u0e35\u0e01 %s",past:"%s\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27",s:"\u0e44\u0e21\u0e48\u0e01\u0e35\u0e48\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",ss:"%d \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",m:"1 \u0e19\u0e32\u0e17\u0e35",mm:"%d \u0e19\u0e32\u0e17\u0e35",h:"1 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",hh:"%d \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",d:"1 \u0e27\u0e31\u0e19",dd:"%d \u0e27\u0e31\u0e19",w:"1 \u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c",ww:"%d \u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c",M:"1 \u0e40\u0e14\u0e37\u0e2d\u0e19",MM:"%d \u0e40\u0e14\u0e37\u0e2d\u0e19",y:"1 \u0e1b\u0e35",yy:"%d \u0e1b\u0e35"}}),{1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'\xfcnji",4:"'\xfcnji",100:"'\xfcnji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"}),xn=(c.defineLocale("tk",{months:"\xddanwar_Fewral_Mart_Aprel_Ma\xfd_I\xfdun_I\xfdul_Awgust_Sent\xfdabr_Okt\xfdabr_No\xfdabr_Dekabr".split("_"),monthsShort:"\xddan_Few_Mar_Apr_Ma\xfd_I\xfdn_I\xfdl_Awg_Sen_Okt_No\xfd_Dek".split("_"),weekdays:"\xddek\u015fenbe_Du\u015fenbe_Si\u015fenbe_\xc7ar\u015fenbe_Pen\u015fenbe_Anna_\u015eenbe".split("_"),weekdaysShort:"\xddek_Du\u015f_Si\u015f_\xc7ar_Pen_Ann_\u015een".split("_"),weekdaysMin:"\xddk_D\u015f_S\u015f_\xc7r_Pn_An_\u015en".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[d\xfc\xfdn] LT",lastWeek:"[ge\xe7en] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s so\u0148",past:"%s \xf6\u0148",s:"birn\xe4\xe7e sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir a\xfd",MM:"%d a\xfd",y:"bir \xfdyl",yy:"%d \xfdyl"},ordinal:function(e,a){switch(a){case"d":case"D":case"Do":case"DD":return e;default:var t;return 0===e?e+"'unjy":e+(jn[t=e%10]||jn[e%100-t]||jn[100<=e?100:null])}},week:{dow:1,doy:7}}),c.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}}),"pagh_wa\u2019_cha\u2019_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_"));function Pn(e,a,t,s){var n=function(e){var a=Math.floor(e%1e3/100),t=Math.floor(e%100/10),e=e%10,s="";0<a&&(s+=xn[a]+"vatlh");0<t&&(s+=(""!==s?" ":"")+xn[t]+"maH");0<e&&(s+=(""!==s?" ":"")+xn[e]);return""===s?"pagh":s}(e);switch(t){case"ss":return n+" lup";case"mm":return n+" tup";case"hh":return n+" rep";case"dd":return n+" jaj";case"MM":return n+" jar";case"yy":return n+" DIS"}}c.defineLocale("tlh",{months:"tera\u2019 jar wa\u2019_tera\u2019 jar cha\u2019_tera\u2019 jar wej_tera\u2019 jar loS_tera\u2019 jar vagh_tera\u2019 jar jav_tera\u2019 jar Soch_tera\u2019 jar chorgh_tera\u2019 jar Hut_tera\u2019 jar wa\u2019maH_tera\u2019 jar wa\u2019maH wa\u2019_tera\u2019 jar wa\u2019maH cha\u2019".split("_"),monthsShort:"jar wa\u2019_jar cha\u2019_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa\u2019maH_jar wa\u2019maH wa\u2019_jar wa\u2019maH cha\u2019".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa\u2019leS] LT",nextWeek:"LLL",lastDay:"[wa\u2019Hu\u2019] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var a=e;return a=-1!==e.indexOf("jaj")?a.slice(0,-3)+"leS":-1!==e.indexOf("jar")?a.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?a.slice(0,-3)+"nem":a+" pIq"},past:function(e){var a=e;return a=-1!==e.indexOf("jaj")?a.slice(0,-3)+"Hu\u2019":-1!==e.indexOf("jar")?a.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?a.slice(0,-3)+"ben":a+" ret"},s:"puS lup",ss:Pn,m:"wa\u2019 tup",mm:Pn,h:"wa\u2019 rep",hh:Pn,d:"wa\u2019 jaj",dd:Pn,M:"wa\u2019 jar",MM:Pn,y:"wa\u2019 DIS",yy:Pn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var On={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'\xfcnc\xfc",4:"'\xfcnc\xfc",100:"'\xfcnc\xfc",6:"'nc\u0131",9:"'uncu",10:"'uncu",30:"'uncu",60:"'\u0131nc\u0131",90:"'\u0131nc\u0131"};function Wn(e,a,t,s){e={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n m\xedut","'iens m\xedut"],mm:[e+" m\xeduts",e+" m\xeduts"],h:["'n \xfeora","'iensa \xfeora"],hh:[e+" \xfeoras",e+" \xfeoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return s||a?e[t][0]:e[t][1]}function An(e,a,t){return"m"===t?a?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443":"h"===t?a?"\u0433\u043e\u0434\u0438\u043d\u0430":"\u0433\u043e\u0434\u0438\u043d\u0443":e+" "+(e=+e,a=(a={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d",hh:a?"\u0433\u043e\u0434\u0438\u043d\u0430_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d":"\u0433\u043e\u0434\u0438\u043d\u0443_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u043d\u0456\u0432",MM:"\u043c\u0456\u0441\u044f\u0446\u044c_\u043c\u0456\u0441\u044f\u0446\u0456_\u043c\u0456\u0441\u044f\u0446\u0456\u0432",yy:"\u0440\u0456\u043a_\u0440\u043e\u043a\u0438_\u0440\u043e\u043a\u0456\u0432"}[t]).split("_"),e%10==1&&e%100!=11?a[0]:2<=e%10&&e%10<=4&&(e%100<10||20<=e%100)?a[1]:a[2])}function En(e){return function(){return e+"\u043e"+(11===this.hours()?"\u0431":"")+"] LT"}}c.defineLocale("tr",{months:"Ocak_\u015eubat_Mart_Nisan_May\u0131s_Haziran_Temmuz_A\u011fustos_Eyl\xfcl_Ekim_Kas\u0131m_Aral\u0131k".split("_"),monthsShort:"Oca_\u015eub_Mar_Nis_May_Haz_Tem_A\u011fu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Sal\u0131_\xc7ar\u015famba_Per\u015fembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_\xc7ar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_\xc7a_Pe_Cu_Ct".split("_"),meridiem:function(e,a,t){return e<12?t?"\xf6\xf6":"\xd6\xd6":t?"\xf6s":"\xd6S"},meridiemParse:/\xf6\xf6|\xd6\xd6|\xf6s|\xd6S/,isPM:function(e){return"\xf6s"===e||"\xd6S"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[yar\u0131n saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[d\xfcn] LT",lastWeek:"[ge\xe7en] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \xf6nce",s:"birka\xe7 saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir y\u0131l",yy:"%d y\u0131l"},ordinal:function(e,a){switch(a){case"d":case"D":case"Do":case"DD":return e;default:var t;return 0===e?e+"'\u0131nc\u0131":e+(On[t=e%10]||On[e%100-t]||On[100<=e?100:null])}},week:{dow:1,doy:7}}),c.defineLocale("tzl",{months:"Januar_Fevraglh_Mar\xe7_Avr\xefu_Mai_G\xfcn_Julia_Guscht_Setemvar_Listop\xe4ts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_G\xfcn_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"S\xfaladi_L\xfane\xe7i_Maitzi_M\xe1rcuri_Xh\xfaadi_Vi\xe9ner\xe7i_S\xe1turi".split("_"),weekdaysShort:"S\xfal_L\xfan_Mai_M\xe1r_Xh\xfa_Vi\xe9_S\xe1t".split("_"),weekdaysMin:"S\xfa_L\xfa_Ma_M\xe1_Xh_Vi_S\xe1".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,a,t){return 11<e?t?"d'o":"D'O":t?"d'a":"D'A"},calendar:{sameDay:"[oxhi \xe0] LT",nextDay:"[dem\xe0 \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[ieiri \xe0] LT",lastWeek:"[s\xfcr el] dddd [lasteu \xe0] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:Wn,ss:Wn,m:Wn,mm:Wn,h:Wn,hh:Wn,d:Wn,dd:Wn,M:Wn,MM:Wn,y:Wn,yy:Wn},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),c.defineLocale("tzm-latn",{months:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minu\u1e0d",mm:"%d minu\u1e0d",h:"sa\u025ba",hh:"%d tassa\u025bin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}}),c.defineLocale("tzm",{months:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),monthsShort:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),weekdays:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysShort:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysMin:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u2d30\u2d59\u2d37\u2d45 \u2d34] LT",nextDay:"[\u2d30\u2d59\u2d3d\u2d30 \u2d34] LT",nextWeek:"dddd [\u2d34] LT",lastDay:"[\u2d30\u2d5a\u2d30\u2d4f\u2d5c \u2d34] LT",lastWeek:"dddd [\u2d34] LT",sameElse:"L"},relativeTime:{future:"\u2d37\u2d30\u2d37\u2d45 \u2d59 \u2d62\u2d30\u2d4f %s",past:"\u2d62\u2d30\u2d4f %s",s:"\u2d49\u2d4e\u2d49\u2d3d",ss:"%d \u2d49\u2d4e\u2d49\u2d3d",m:"\u2d4e\u2d49\u2d4f\u2d53\u2d3a",mm:"%d \u2d4e\u2d49\u2d4f\u2d53\u2d3a",h:"\u2d59\u2d30\u2d44\u2d30",hh:"%d \u2d5c\u2d30\u2d59\u2d59\u2d30\u2d44\u2d49\u2d4f",d:"\u2d30\u2d59\u2d59",dd:"%d o\u2d59\u2d59\u2d30\u2d4f",M:"\u2d30\u2d62o\u2d53\u2d54",MM:"%d \u2d49\u2d62\u2d62\u2d49\u2d54\u2d4f",y:"\u2d30\u2d59\u2d33\u2d30\u2d59",yy:"%d \u2d49\u2d59\u2d33\u2d30\u2d59\u2d4f"},week:{dow:6,doy:12}}),c.defineLocale("ug-cn",{months:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),monthsShort:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),weekdays:"\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5_\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5_\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5_\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u062c\u06c8\u0645\u06d5_\u0634\u06d5\u0646\u0628\u06d5".split("_"),weekdaysShort:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),weekdaysMin:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649",LLL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm",LLLL:"dddd\u060c YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm"},meridiemParse:/\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5|\u0633\u06d5\u06be\u06d5\u0631|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646|\u0686\u06c8\u0634|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646|\u0643\u06d5\u0686/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5"===a||"\u0633\u06d5\u06be\u06d5\u0631"===a||"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646"===a||"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646"!==a&&"\u0643\u06d5\u0686"!==a&&11<=e?e:e+12},meridiem:function(e,a,t){e=100*e+a;return e<600?"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5":e<900?"\u0633\u06d5\u06be\u06d5\u0631":e<1130?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646":e<1230?"\u0686\u06c8\u0634":e<1800?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646":"\u0643\u06d5\u0686"},calendar:{sameDay:"[\u0628\u06c8\u06af\u06c8\u0646 \u0633\u0627\u0626\u06d5\u062a] LT",nextDay:"[\u0626\u06d5\u062a\u06d5 \u0633\u0627\u0626\u06d5\u062a] LT",nextWeek:"[\u0643\u06d0\u0644\u06d5\u0631\u0643\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",lastDay:"[\u062a\u06c6\u0646\u06c8\u06af\u06c8\u0646] LT",lastWeek:"[\u0626\u0627\u0644\u062f\u0649\u0646\u0642\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0643\u06d0\u064a\u0649\u0646",past:"%s \u0628\u06c7\u0631\u06c7\u0646",s:"\u0646\u06d5\u0686\u0686\u06d5 \u0633\u06d0\u0643\u0648\u0646\u062a",ss:"%d \u0633\u06d0\u0643\u0648\u0646\u062a",m:"\u0628\u0649\u0631 \u0645\u0649\u0646\u06c7\u062a",mm:"%d \u0645\u0649\u0646\u06c7\u062a",h:"\u0628\u0649\u0631 \u0633\u0627\u0626\u06d5\u062a",hh:"%d \u0633\u0627\u0626\u06d5\u062a",d:"\u0628\u0649\u0631 \u0643\u06c8\u0646",dd:"%d \u0643\u06c8\u0646",M:"\u0628\u0649\u0631 \u0626\u0627\u064a",MM:"%d \u0626\u0627\u064a",y:"\u0628\u0649\u0631 \u064a\u0649\u0644",yy:"%d \u064a\u0649\u0644"},dayOfMonthOrdinalParse:/\d{1,2}(-\u0643\u06c8\u0646\u0649|-\u0626\u0627\u064a|-\u06be\u06d5\u067e\u062a\u06d5)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"-\u0643\u06c8\u0646\u0649";case"w":case"W":return e+"-\u06be\u06d5\u067e\u062a\u06d5";default:return e}},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:7}}),c.defineLocale("uk",{months:{format:"\u0441\u0456\u0447\u043d\u044f_\u043b\u044e\u0442\u043e\u0433\u043e_\u0431\u0435\u0440\u0435\u0437\u043d\u044f_\u043a\u0432\u0456\u0442\u043d\u044f_\u0442\u0440\u0430\u0432\u043d\u044f_\u0447\u0435\u0440\u0432\u043d\u044f_\u043b\u0438\u043f\u043d\u044f_\u0441\u0435\u0440\u043f\u043d\u044f_\u0432\u0435\u0440\u0435\u0441\u043d\u044f_\u0436\u043e\u0432\u0442\u043d\u044f_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430_\u0433\u0440\u0443\u0434\u043d\u044f".split("_"),standalone:"\u0441\u0456\u0447\u0435\u043d\u044c_\u043b\u044e\u0442\u0438\u0439_\u0431\u0435\u0440\u0435\u0437\u0435\u043d\u044c_\u043a\u0432\u0456\u0442\u0435\u043d\u044c_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u0435\u0440\u0432\u0435\u043d\u044c_\u043b\u0438\u043f\u0435\u043d\u044c_\u0441\u0435\u0440\u043f\u0435\u043d\u044c_\u0432\u0435\u0440\u0435\u0441\u0435\u043d\u044c_\u0436\u043e\u0432\u0442\u0435\u043d\u044c_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434_\u0433\u0440\u0443\u0434\u0435\u043d\u044c".split("_")},monthsShort:"\u0441\u0456\u0447_\u043b\u044e\u0442_\u0431\u0435\u0440_\u043a\u0432\u0456\u0442_\u0442\u0440\u0430\u0432_\u0447\u0435\u0440\u0432_\u043b\u0438\u043f_\u0441\u0435\u0440\u043f_\u0432\u0435\u0440_\u0436\u043e\u0432\u0442_\u043b\u0438\u0441\u0442_\u0433\u0440\u0443\u0434".split("_"),weekdays:function(e,a){var t={nominative:"\u043d\u0435\u0434\u0456\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044f_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),accusative:"\u043d\u0435\u0434\u0456\u043b\u044e_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044e_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),genitive:"\u043d\u0435\u0434\u0456\u043b\u0456_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043a\u0430_\u0432\u0456\u0432\u0442\u043e\u0440\u043a\u0430_\u0441\u0435\u0440\u0435\u0434\u0438_\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u0456_\u0441\u0443\u0431\u043e\u0442\u0438".split("_")};return!0===e?t.nominative.slice(1,7).concat(t.nominative.slice(0,1)):e?t[/(\[[\u0412\u0432\u0423\u0443]\]) ?dddd/.test(a)?"accusative":/\[?(?:\u043c\u0438\u043d\u0443\u043b\u043e\u0457|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u0457)? ?\] ?dddd/.test(a)?"genitive":"nominative"][e.day()]:t.nominative},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0440.",LLL:"D MMMM YYYY \u0440., HH:mm",LLLL:"dddd, D MMMM YYYY \u0440., HH:mm"},calendar:{sameDay:En("[\u0421\u044c\u043e\u0433\u043e\u0434\u043d\u0456 "),nextDay:En("[\u0417\u0430\u0432\u0442\u0440\u0430 "),lastDay:En("[\u0412\u0447\u043e\u0440\u0430 "),nextWeek:En("[\u0423] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return En("[\u041c\u0438\u043d\u0443\u043b\u043e\u0457] dddd [").call(this);case 1:case 2:case 4:return En("[\u041c\u0438\u043d\u0443\u043b\u043e\u0433\u043e] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"%s \u0442\u043e\u043c\u0443",s:"\u0434\u0435\u043a\u0456\u043b\u044c\u043a\u0430 \u0441\u0435\u043a\u0443\u043d\u0434",ss:An,m:An,mm:An,h:"\u0433\u043e\u0434\u0438\u043d\u0443",hh:An,d:"\u0434\u0435\u043d\u044c",dd:An,M:"\u043c\u0456\u0441\u044f\u0446\u044c",MM:An,y:"\u0440\u0456\u043a",yy:An},meridiemParse:/\u043d\u043e\u0447\u0456|\u0440\u0430\u043d\u043a\u0443|\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430)$/.test(e)},meridiem:function(e,a,t){return e<4?"\u043d\u043e\u0447\u0456":e<12?"\u0440\u0430\u043d\u043a\u0443":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u043e\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e+"-\u0439";case"D":return e+"-\u0433\u043e";default:return e}},week:{dow:1,doy:7}});i=["\u062c\u0646\u0648\u0631\u06cc","\u0641\u0631\u0648\u0631\u06cc","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u06cc\u0644","\u0645\u0626\u06cc","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0626\u06cc","\u0627\u06af\u0633\u062a","\u0633\u062a\u0645\u0628\u0631","\u0627\u06a9\u062a\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u062f\u0633\u0645\u0628\u0631"],jt=["\u0627\u062a\u0648\u0627\u0631","\u067e\u06cc\u0631","\u0645\u0646\u06af\u0644","\u0628\u062f\u06be","\u062c\u0645\u0639\u0631\u0627\u062a","\u062c\u0645\u0639\u06c1","\u06c1\u0641\u062a\u06c1"];return c.defineLocale("ur",{months:i,monthsShort:i,weekdays:jt,weekdaysShort:jt,weekdaysMin:jt,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,a,t){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0622\u062c \u0628\u0648\u0642\u062a] LT",nextDay:"[\u06a9\u0644 \u0628\u0648\u0642\u062a] LT",nextWeek:"dddd [\u0628\u0648\u0642\u062a] LT",lastDay:"[\u06af\u0630\u0634\u062a\u06c1 \u0631\u0648\u0632 \u0628\u0648\u0642\u062a] LT",lastWeek:"[\u06af\u0630\u0634\u062a\u06c1] dddd [\u0628\u0648\u0642\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0628\u0639\u062f",past:"%s \u0642\u0628\u0644",s:"\u0686\u0646\u062f \u0633\u06cc\u06a9\u0646\u0688",ss:"%d \u0633\u06cc\u06a9\u0646\u0688",m:"\u0627\u06cc\u06a9 \u0645\u0646\u0679",mm:"%d \u0645\u0646\u0679",h:"\u0627\u06cc\u06a9 \u06af\u06be\u0646\u0679\u06c1",hh:"%d \u06af\u06be\u0646\u0679\u06d2",d:"\u0627\u06cc\u06a9 \u062f\u0646",dd:"%d \u062f\u0646",M:"\u0627\u06cc\u06a9 \u0645\u0627\u06c1",MM:"%d \u0645\u0627\u06c1",y:"\u0627\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}}),c.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}}),c.defineLocale("uz",{months:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u042f\u043a\u0448\u0430\u043d\u0431\u0430_\u0414\u0443\u0448\u0430\u043d\u0431\u0430_\u0421\u0435\u0448\u0430\u043d\u0431\u0430_\u0427\u043e\u0440\u0448\u0430\u043d\u0431\u0430_\u041f\u0430\u0439\u0448\u0430\u043d\u0431\u0430_\u0416\u0443\u043c\u0430_\u0428\u0430\u043d\u0431\u0430".split("_"),weekdaysShort:"\u042f\u043a\u0448_\u0414\u0443\u0448_\u0421\u0435\u0448_\u0427\u043e\u0440_\u041f\u0430\u0439_\u0416\u0443\u043c_\u0428\u0430\u043d".split("_"),weekdaysMin:"\u042f\u043a_\u0414\u0443_\u0421\u0435_\u0427\u043e_\u041f\u0430_\u0416\u0443_\u0428\u0430".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[\u0411\u0443\u0433\u0443\u043d \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",nextDay:"[\u042d\u0440\u0442\u0430\u0433\u0430] LT [\u0434\u0430]",nextWeek:"dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastDay:"[\u041a\u0435\u0447\u0430 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastWeek:"[\u0423\u0442\u0433\u0430\u043d] dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",sameElse:"L"},relativeTime:{future:"\u042f\u043a\u0438\u043d %s \u0438\u0447\u0438\u0434\u0430",past:"\u0411\u0438\u0440 \u043d\u0435\u0447\u0430 %s \u043e\u043b\u0434\u0438\u043d",s:"\u0444\u0443\u0440\u0441\u0430\u0442",ss:"%d \u0444\u0443\u0440\u0441\u0430\u0442",m:"\u0431\u0438\u0440 \u0434\u0430\u043a\u0438\u043a\u0430",mm:"%d \u0434\u0430\u043a\u0438\u043a\u0430",h:"\u0431\u0438\u0440 \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u0431\u0438\u0440 \u043e\u0439",MM:"%d \u043e\u0439",y:"\u0431\u0438\u0440 \u0439\u0438\u043b",yy:"%d \u0439\u0438\u043b"},week:{dow:1,doy:7}}),c.defineLocale("vi",{months:"th\xe1ng 1_th\xe1ng 2_th\xe1ng 3_th\xe1ng 4_th\xe1ng 5_th\xe1ng 6_th\xe1ng 7_th\xe1ng 8_th\xe1ng 9_th\xe1ng 10_th\xe1ng 11_th\xe1ng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"ch\u1ee7 nh\u1eadt_th\u1ee9 hai_th\u1ee9 ba_th\u1ee9 t\u01b0_th\u1ee9 n\u0103m_th\u1ee9 s\xe1u_th\u1ee9 b\u1ea3y".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,a,t){return e<12?t?"sa":"SA":t?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [n\u0103m] YYYY",LLL:"D MMMM [n\u0103m] YYYY HH:mm",LLLL:"dddd, D MMMM [n\u0103m] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[H\xf4m nay l\xfac] LT",nextDay:"[Ng\xe0y mai l\xfac] LT",nextWeek:"dddd [tu\u1ea7n t\u1edbi l\xfac] LT",lastDay:"[H\xf4m qua l\xfac] LT",lastWeek:"dddd [tu\u1ea7n tr\u01b0\u1edbc l\xfac] LT",sameElse:"L"},relativeTime:{future:"%s t\u1edbi",past:"%s tr\u01b0\u1edbc",s:"v\xe0i gi\xe2y",ss:"%d gi\xe2y",m:"m\u1ed9t ph\xfat",mm:"%d ph\xfat",h:"m\u1ed9t gi\u1edd",hh:"%d gi\u1edd",d:"m\u1ed9t ng\xe0y",dd:"%d ng\xe0y",w:"m\u1ed9t tu\u1ea7n",ww:"%d tu\u1ea7n",M:"m\u1ed9t th\xe1ng",MM:"%d th\xe1ng",y:"m\u1ed9t n\u0103m",yy:"%d n\u0103m"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}}),c.defineLocale("x-pseudo",{months:"J~\xe1\xf1\xfa\xe1~r\xfd_F~\xe9br\xfa~\xe1r\xfd_~M\xe1rc~h_\xc1p~r\xedl_~M\xe1\xfd_~J\xfa\xf1\xe9~_J\xfal~\xfd_\xc1\xfa~g\xfast~_S\xe9p~t\xe9mb~\xe9r_\xd3~ct\xf3b~\xe9r_\xd1~\xf3v\xe9m~b\xe9r_~D\xe9c\xe9~mb\xe9r".split("_"),monthsShort:"J~\xe1\xf1_~F\xe9b_~M\xe1r_~\xc1pr_~M\xe1\xfd_~J\xfa\xf1_~J\xfal_~\xc1\xfag_~S\xe9p_~\xd3ct_~\xd1\xf3v_~D\xe9c".split("_"),monthsParseExact:!0,weekdays:"S~\xfa\xf1d\xe1~\xfd_M\xf3~\xf1d\xe1\xfd~_T\xfa\xe9~sd\xe1\xfd~_W\xe9d~\xf1\xe9sd~\xe1\xfd_T~h\xfars~d\xe1\xfd_~Fr\xedd~\xe1\xfd_S~\xe1t\xfar~d\xe1\xfd".split("_"),weekdaysShort:"S~\xfa\xf1_~M\xf3\xf1_~T\xfa\xe9_~W\xe9d_~Th\xfa_~Fr\xed_~S\xe1t".split("_"),weekdaysMin:"S~\xfa_M\xf3~_T\xfa_~W\xe9_T~h_Fr~_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~\xf3d\xe1~\xfd \xe1t] LT",nextDay:"[T~\xf3m\xf3~rr\xf3~w \xe1t] LT",nextWeek:"dddd [\xe1t] LT",lastDay:"[\xdd~\xe9st~\xe9rd\xe1~\xfd \xe1t] LT",lastWeek:"[L~\xe1st] dddd [\xe1t] LT",sameElse:"L"},relativeTime:{future:"\xed~\xf1 %s",past:"%s \xe1~g\xf3",s:"\xe1 ~f\xe9w ~s\xe9c\xf3~\xf1ds",ss:"%d s~\xe9c\xf3\xf1~ds",m:"\xe1 ~m\xed\xf1~\xfat\xe9",mm:"%d m~\xed\xf1\xfa~t\xe9s",h:"\xe1~\xf1 h\xf3~\xfar",hh:"%d h~\xf3\xfars",d:"\xe1 ~d\xe1\xfd",dd:"%d d~\xe1\xfds",M:"\xe1 ~m\xf3\xf1~th",MM:"%d m~\xf3\xf1t~hs",y:"\xe1 ~\xfd\xe9\xe1r",yy:"%d \xfd~\xe9\xe1rs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?"th":1==a?"st":2==a?"nd":3==a?"rd":"th")},week:{dow:1,doy:4}}),c.defineLocale("yo",{months:"S\u1eb9\u0301r\u1eb9\u0301_E\u0300re\u0300le\u0300_\u1eb8r\u1eb9\u0300na\u0300_I\u0300gbe\u0301_E\u0300bibi_O\u0300ku\u0300du_Ag\u1eb9mo_O\u0300gu\u0301n_Owewe_\u1ecc\u0300wa\u0300ra\u0300_Be\u0301lu\u0301_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),monthsShort:"S\u1eb9\u0301r_E\u0300rl_\u1eb8rn_I\u0300gb_E\u0300bi_O\u0300ku\u0300_Ag\u1eb9_O\u0300gu\u0301_Owe_\u1ecc\u0300wa\u0300_Be\u0301l_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),weekdays:"A\u0300i\u0300ku\u0301_Aje\u0301_I\u0300s\u1eb9\u0301gun_\u1eccj\u1ecd\u0301ru\u0301_\u1eccj\u1ecd\u0301b\u1ecd_\u1eb8ti\u0300_A\u0300ba\u0301m\u1eb9\u0301ta".split("_"),weekdaysShort:"A\u0300i\u0300k_Aje\u0301_I\u0300s\u1eb9\u0301_\u1eccjr_\u1eccjb_\u1eb8ti\u0300_A\u0300ba\u0301".split("_"),weekdaysMin:"A\u0300i\u0300_Aj_I\u0300s_\u1eccr_\u1eccb_\u1eb8t_A\u0300b".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[O\u0300ni\u0300 ni] LT",nextDay:"[\u1ecc\u0300la ni] LT",nextWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301n'b\u1ecd] [ni] LT",lastDay:"[A\u0300na ni] LT",lastWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301l\u1ecd\u0301] [ni] LT",sameElse:"L"},relativeTime:{future:"ni\u0301 %s",past:"%s k\u1ecdja\u0301",s:"i\u0300s\u1eb9ju\u0301 aaya\u0301 die",ss:"aaya\u0301 %d",m:"i\u0300s\u1eb9ju\u0301 kan",mm:"i\u0300s\u1eb9ju\u0301 %d",h:"wa\u0301kati kan",hh:"wa\u0301kati %d",d:"\u1ecdj\u1ecd\u0301 kan",dd:"\u1ecdj\u1ecd\u0301 %d",M:"osu\u0300 kan",MM:"osu\u0300 %d",y:"\u1ecddu\u0301n kan",yy:"\u1ecddu\u0301n %d"},dayOfMonthOrdinalParse:/\u1ecdj\u1ecd\u0301\s\d{1,2}/,ordinal:"\u1ecdj\u1ecd\u0301 %d",week:{dow:1,doy:4}}),c.defineLocale("zh-cn",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5Ah\u70b9mm\u5206",LLLL:"YYYY\u5e74M\u6708D\u65e5ddddAh\u70b9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a||"\u4e0b\u5348"!==a&&"\u665a\u4e0a"!==a&&11<=e?e:e+12},meridiem:function(e,a,t){e=100*e+a;return e<600?"\u51cc\u6668":e<900?"\u65e9\u4e0a":e<1130?"\u4e0a\u5348":e<1230?"\u4e2d\u5348":e<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:function(e){return e.week()!==this.week()?"[\u4e0b]dddLT":"[\u672c]dddLT"},lastDay:"[\u6628\u5929]LT",lastWeek:function(e){return this.week()!==e.week()?"[\u4e0a]dddLT":"[\u672c]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u5468)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u5468";default:return e}},relativeTime:{future:"%s\u540e",past:"%s\u524d",s:"\u51e0\u79d2",ss:"%d \u79d2",m:"1 \u5206\u949f",mm:"%d \u5206\u949f",h:"1 \u5c0f\u65f6",hh:"%d \u5c0f\u65f6",d:"1 \u5929",dd:"%d \u5929",w:"1 \u5468",ww:"%d \u5468",M:"1 \u4e2a\u6708",MM:"%d \u4e2a\u6708",y:"1 \u5e74",yy:"%d \u5e74"},week:{dow:1,doy:4}}),c.defineLocale("zh-hk",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e2d\u5348"===a?11<=e?e:e+12:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:void 0},meridiem:function(e,a,t){e=100*e+a;return e<600?"\u51cc\u6668":e<900?"\u65e9\u4e0a":e<1200?"\u4e0a\u5348":1200===e?"\u4e2d\u5348":e<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:"[\u4e0b]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4e0a]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}}),c.defineLocale("zh-mo",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"D/M/YYYY",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e2d\u5348"===a?11<=e?e:e+12:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:void 0},meridiem:function(e,a,t){e=100*e+a;return e<600?"\u51cc\u6668":e<900?"\u65e9\u4e0a":e<1130?"\u4e0a\u5348":e<1230?"\u4e2d\u5348":e<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5167",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}}),c.defineLocale("zh-tw",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u51cc\u6668"===a||"\u65e9\u4e0a"===a||"\u4e0a\u5348"===a?e:"\u4e2d\u5348"===a?11<=e?e:e+12:"\u4e0b\u5348"===a||"\u665a\u4e0a"===a?e+12:void 0},meridiem:function(e,a,t){e=100*e+a;return e<600?"\u51cc\u6668":e<900?"\u65e9\u4e0a":e<1130?"\u4e0a\u5348":e<1230?"\u4e2d\u5348":e<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,a){switch(a){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}}),c.locale("en"),c});
//# sourceMappingURL=moment-with-locales.min.js.map;
!function(e,d){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?d(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],d):d(e.moment)}(this,function(e){"use strict";var d={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},t={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(d,t,i,o){var s=n(d),m=r[e][n(d)];return 2===s&&(m=m[t?0:1]),m.replace(/%d/i,d)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];return e.defineLocale("ar",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,d,t){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return t[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return d[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})});;
/*!
 * numeral.js
 * version : 1.5.3
 * author : Adam Draper
 * license : MIT
 * http://adamwdraper.github.com/Numeral-js/
 */
(function(){function a(a){this._value=a}function b(a,b,c,d){var e,f,g=Math.pow(10,b);return f=(c(a*g)/g).toFixed(b),d&&(e=new RegExp("0{1,"+d+"}$"),f=f.replace(e,"")),f}function c(a,b,c){var d;return d=b.indexOf("$")>-1?e(a,b,c):b.indexOf("%")>-1?f(a,b,c):b.indexOf(":")>-1?g(a,b):i(a._value,b,c)}function d(a,b){var c,d,e,f,g,i=b,j=["KB","MB","GB","TB","PB","EB","ZB","YB"],k=!1;if(b.indexOf(":")>-1)a._value=h(b);else if(b===q)a._value=0;else{for("."!==o[p].delimiters.decimal&&(b=b.replace(/\./g,"").replace(o[p].delimiters.decimal,".")),c=new RegExp("[^a-zA-Z]"+o[p].abbreviations.thousand+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),d=new RegExp("[^a-zA-Z]"+o[p].abbreviations.million+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),e=new RegExp("[^a-zA-Z]"+o[p].abbreviations.billion+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),f=new RegExp("[^a-zA-Z]"+o[p].abbreviations.trillion+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),g=0;g<=j.length&&!(k=b.indexOf(j[g])>-1?Math.pow(1024,g+1):!1);g++);a._value=(k?k:1)*(i.match(c)?Math.pow(10,3):1)*(i.match(d)?Math.pow(10,6):1)*(i.match(e)?Math.pow(10,9):1)*(i.match(f)?Math.pow(10,12):1)*(b.indexOf("%")>-1?.01:1)*((b.split("-").length+Math.min(b.split("(").length-1,b.split(")").length-1))%2?1:-1)*Number(b.replace(/[^0-9\.]+/g,"")),a._value=k?Math.ceil(a._value):a._value}return a._value}function e(a,b,c){var d,e,f=b.indexOf("$"),g=b.indexOf("("),h=b.indexOf("-"),j="";return b.indexOf(" $")>-1?(j=" ",b=b.replace(" $","")):b.indexOf("$ ")>-1?(j=" ",b=b.replace("$ ","")):b=b.replace("$",""),e=i(a._value,b,c),1>=f?e.indexOf("(")>-1||e.indexOf("-")>-1?(e=e.split(""),d=1,(g>f||h>f)&&(d=0),e.splice(d,0,o[p].currency.symbol+j),e=e.join("")):e=o[p].currency.symbol+j+e:e.indexOf(")")>-1?(e=e.split(""),e.splice(-1,0,j+o[p].currency.symbol),e=e.join("")):e=e+j+o[p].currency.symbol,e}function f(a,b,c){var d,e="",f=100*a._value;return b.indexOf(" %")>-1?(e=" ",b=b.replace(" %","")):b=b.replace("%",""),d=i(f,b,c),d.indexOf(")")>-1?(d=d.split(""),d.splice(-1,0,e+"%"),d=d.join("")):d=d+e+"%",d}function g(a){var b=Math.floor(a._value/60/60),c=Math.floor((a._value-60*b*60)/60),d=Math.round(a._value-60*b*60-60*c);return b+":"+(10>c?"0"+c:c)+":"+(10>d?"0"+d:d)}function h(a){var b=a.split(":"),c=0;return 3===b.length?(c+=60*Number(b[0])*60,c+=60*Number(b[1]),c+=Number(b[2])):2===b.length&&(c+=60*Number(b[0]),c+=Number(b[1])),Number(c)}function i(a,c,d){var e,f,g,h,i,j,k=!1,l=!1,m=!1,n="",r=!1,s=!1,t=!1,u=!1,v=!1,w="",x="",y=Math.abs(a),z=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],A="",B=!1;if(0===a&&null!==q)return q;if(c.indexOf("(")>-1?(k=!0,c=c.slice(1,-1)):c.indexOf("+")>-1&&(l=!0,c=c.replace(/\+/g,"")),c.indexOf("a")>-1&&(r=c.indexOf("aK")>=0,s=c.indexOf("aM")>=0,t=c.indexOf("aB")>=0,u=c.indexOf("aT")>=0,v=r||s||t||u,c.indexOf(" a")>-1?(n=" ",c=c.replace(" a","")):c=c.replace("a",""),y>=Math.pow(10,12)&&!v||u?(n+=o[p].abbreviations.trillion,a/=Math.pow(10,12)):y<Math.pow(10,12)&&y>=Math.pow(10,9)&&!v||t?(n+=o[p].abbreviations.billion,a/=Math.pow(10,9)):y<Math.pow(10,9)&&y>=Math.pow(10,6)&&!v||s?(n+=o[p].abbreviations.million,a/=Math.pow(10,6)):(y<Math.pow(10,6)&&y>=Math.pow(10,3)&&!v||r)&&(n+=o[p].abbreviations.thousand,a/=Math.pow(10,3))),c.indexOf("b")>-1)for(c.indexOf(" b")>-1?(w=" ",c=c.replace(" b","")):c=c.replace("b",""),g=0;g<=z.length;g++)if(e=Math.pow(1024,g),f=Math.pow(1024,g+1),a>=e&&f>a){w+=z[g],e>0&&(a/=e);break}return c.indexOf("o")>-1&&(c.indexOf(" o")>-1?(x=" ",c=c.replace(" o","")):c=c.replace("o",""),x+=o[p].ordinal(a)),c.indexOf("[.]")>-1&&(m=!0,c=c.replace("[.]",".")),h=a.toString().split(".")[0],i=c.split(".")[1],j=c.indexOf(","),i?(i.indexOf("[")>-1?(i=i.replace("]",""),i=i.split("["),A=b(a,i[0].length+i[1].length,d,i[1].length)):A=b(a,i.length,d),h=A.split(".")[0],A=A.split(".")[1].length?o[p].delimiters.decimal+A.split(".")[1]:"",m&&0===Number(A.slice(1))&&(A="")):h=b(a,null,d),h.indexOf("-")>-1&&(h=h.slice(1),B=!0),j>-1&&(h=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+o[p].delimiters.thousands)),0===c.indexOf(".")&&(h=""),(k&&B?"(":"")+(!k&&B?"-":"")+(!B&&l?"+":"")+h+A+(x?x:"")+(n?n:"")+(w?w:"")+(k&&B?")":"")}function j(a,b){o[a]=b}function k(a){var b=a.toString().split(".");return b.length<2?1:Math.pow(10,b[1].length)}function l(){var a=Array.prototype.slice.call(arguments);return a.reduce(function(a,b){var c=k(a),d=k(b);return c>d?c:d},-1/0)}var m,n="1.5.3",o={},p="en",q=null,r="0,0",s="undefined"!=typeof module&&module.exports;m=function(b){return m.isNumeral(b)?b=b.value():0===b||"undefined"==typeof b?b=0:Number(b)||(b=m.fn.unformat(b)),new a(Number(b))},m.version=n,m.isNumeral=function(b){return b instanceof a},m.language=function(a,b){if(!a)return p;if(a&&!b){if(!o[a])throw new Error("Unknown language : "+a);p=a}return(b||!o[a])&&j(a,b),m},m.languageData=function(a){if(!a)return o[p];if(!o[a])throw new Error("Unknown language : "+a);return o[a]},m.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"$"}}),m.zeroFormat=function(a){q="string"==typeof a?a:null},m.defaultFormat=function(a){r="string"==typeof a?a:"0.0"},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(a,b){"use strict";if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof a)throw new TypeError(a+" is not a function");var c,d,e=this.length>>>0,f=!1;for(1<arguments.length&&(d=b,f=!0),c=0;e>c;++c)this.hasOwnProperty(c)&&(f?d=a(d,this[c],c,this):(d=this[c],f=!0));if(!f)throw new TypeError("Reduce of empty array with no initial value");return d}),m.fn=a.prototype={clone:function(){return m(this)},format:function(a,b){return c(this,a?a:r,void 0!==b?b:Math.round)},unformat:function(a){return"[object Number]"===Object.prototype.toString.call(a)?a:d(this,a?a:r)},value:function(){return this._value},valueOf:function(){return this._value},set:function(a){return this._value=Number(a),this},add:function(a){function b(a,b){return a+c*b}var c=l.call(null,this._value,a);return this._value=[this._value,a].reduce(b,0)/c,this},subtract:function(a){function b(a,b){return a-c*b}var c=l.call(null,this._value,a);return this._value=[a].reduce(b,this._value*c)/c,this},multiply:function(a){function b(a,b){var c=l(a,b);return a*c*b*c/(c*c)}return this._value=[this._value,a].reduce(b,1),this},divide:function(a){function b(a,b){var c=l(a,b);return a*c/(b*c)}return this._value=[this._value,a].reduce(b),this},difference:function(a){return Math.abs(m(this._value).subtract(a).value())}},s&&(module.exports=m),"undefined"==typeof ender&&(this.numeral=m),"function"==typeof define&&define.amd&&define([],function(){return m})}).call(this);;
/* globalmodule */
/** vim: et:ts=4:sw=4:sts=4
 * @license RequireJS 2.1.15 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/requirejs for details
 */
//Not using strict: uneven strict support in browsers, #392, and causes
//problems with requirejs.exec()/transpiler plugins that may not be strict.
/*jslint regexp: true, nomen: true, sloppy: true */
/*global window, navigator, document, importScripts, setTimeout, opera */

var requirejs, require, define, dewaGlobal = {};
(function (global) {
    var req, s, head, baseElement, dataMain, src,
        interactiveScript, currentlyAddingScript, mainScript, subPath,
        version = '2.1.15',
        commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
        cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
        jsSuffixRegExp = /\.js$/,
        currDirRegExp = /^\.\//,
        op = Object.prototype,
        ostring = op.toString,
        hasOwn = op.hasOwnProperty,
        ap = Array.prototype,
        apsp = ap.splice,
        isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),
        isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
        //PS3 indicates loaded and complete, but need to wait for complete
        //specifically. Sequence is 'loading', 'loaded', execution,
        // then 'complete'. The UA check is unfortunate, but not sure how
        //to feature test w/o causing perf issues.
        readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?
                      /^complete$/ : /^(complete|loaded)$/,
        defContextName = '_',
        //Oh the tragedy, detecting opera. See the usage of isOpera for reason.
        isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',
        contexts = {},
        cfg = {},
        globalDefQueue = [],
        useInteractive = false;

    function isFunction(it) {
        return ostring.call(it) === '[object Function]';
    }

    function isArray(it) {
        return ostring.call(it) === '[object Array]';
    }

    /**
     * Helper function for iterating over an array. If the func returns
     * a true value, it will break out of the loop.
     */
    function each(ary, func) {
        if (ary) {
            var i;
            for (i = 0; i < ary.length; i += 1) {
                if (ary[i] && func(ary[i], i, ary)) {
                    break;
                }
            }
        }
    }

    /**
     * Helper function for iterating over an array backwards. If the func
     * returns a true value, it will break out of the loop.
     */
    function eachReverse(ary, func) {
        if (ary) {
            var i;
            for (i = ary.length - 1; i > -1; i -= 1) {
                if (ary[i] && func(ary[i], i, ary)) {
                    break;
                }
            }
        }
    }

    function hasProp(obj, prop) {
        return hasOwn.call(obj, prop);
    }

    function getOwn(obj, prop) {
        return hasProp(obj, prop) && obj[prop];
    }

    /**
     * Cycles over properties in an object and calls a function for each
     * property value. If the function returns a truthy value, then the
     * iteration is stopped.
     */
    function eachProp(obj, func) {
        var prop;
        for (prop in obj) {
            if (hasProp(obj, prop)) {
                if (func(obj[prop], prop)) {
                    break;
                }
            }
        }
    }

    /**
     * Simple function to mix in properties from source into target,
     * but only if target does not already have a property of the same name.
     */
    function mixin(target, source, force, deepStringMixin) {
        if (source) {
            eachProp(source, function (value, prop) {
                if (force || !hasProp(target, prop)) {
                    if (deepStringMixin && typeof value === 'object' && value &&
                        !isArray(value) && !isFunction(value) &&
                        !(value instanceof RegExp)) {

                        if (!target[prop]) {
                            target[prop] = {};
                        }
                        mixin(target[prop], value, force, deepStringMixin);
                    } else {
                        target[prop] = value;
                    }
                }
            });
        }
        return target;
    }

    //Similar to Function.prototype.bind, but the 'this' object is specified
    //first, since it is easier to read/figure out what 'this' will be.
    function bind(obj, fn) {
        return function () {
            return fn.apply(obj, arguments);
        };
    }

    function scripts() {
        return document.getElementsByTagName('script');
    }

    function defaultOnError(err) {
        throw err;
    }

    //Allow getting a global that is expressed in
    //dot notation, like 'a.b.c'.
    function getGlobal(value) {
        if (!value) {
            return value;
        }
        var g = global;
        each(value.split('.'), function (part) {
            g = g[part];
        });
        return g;
    }

    /**
     * Constructs an error with a pointer to an URL with more information.
     * @param {String} id the error ID that maps to an ID on a web page.
     * @param {String} message human readable error.
     * @param {Error} [err] the original error, if there is one.
     *
     * @returns {Error}
     */
    function makeError(id, msg, err, requireModules) {
        var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
        e.requireType = id;
        e.requireModules = requireModules;
        if (err) {
            e.originalError = err;
        }
        return e;
    }

    if (typeof define !== 'undefined') {
        //If a define is already in play via another AMD loader,
        //do not overwrite.
        return;
    }

    if (typeof requirejs !== 'undefined') {
        if (isFunction(requirejs)) {
            //Do not overwrite an existing requirejs instance.
            return;
        }
        cfg = requirejs;
        requirejs = undefined;
    }

    //Allow for a require config object
    if (typeof require !== 'undefined' && !isFunction(require)) {
        //assume it is a config object.
        cfg = require;
        require = undefined;
    }

    function newContext(contextName) {
        var inCheckLoaded, Module, context, handlers,
            checkLoadedTimeoutId,
            config = {
                //Defaults. Do not set a default for map
                //config to speed up normalize(), which
                //will run faster if there is no default.
                waitSeconds: 7,
                baseUrl: './',
                paths: {},
                bundles: {},
                pkgs: {},
                shim: {},
                config: {}
            },
            registry = {},
            //registry of just enabled modules, to speed
            //cycle breaking code when lots of modules
            //are registered, but not activated.
            enabledRegistry = {},
            undefEvents = {},
            defQueue = [],
            defined = {},
            urlFetched = {},
            bundlesMap = {},
            requireCounter = 1,
            unnormalizedCounter = 1;

        /**
         * Trims the . and .. from an array of path segments.
         * It will keep a leading path segment if a .. will become
         * the first path segment, to help with module name lookups,
         * which act like paths, but can be remapped. But the end result,
         * all paths that use this function should look normalized.
         * NOTE: this method MODIFIES the input array.
         * @param {Array} ary the array of path segments.
         */
        function trimDots(ary) {
            var i, part;
            for (i = 0; i < ary.length; i++) {
                part = ary[i];
                if (part === '.') {
                    ary.splice(i, 1);
                    i -= 1;
                } else if (part === '..') {
                    // If at the start, or previous value is still ..,
                    // keep them so that when converted to a path it may
                    // still work when converted to a path, even though
                    // as an ID it is less than ideal. In larger point
                    // releases, may be better to just kick out an error.
                    if (i === 0 || (i == 1 && ary[2] === '..') || ary[i - 1] === '..') {
                        continue;
                    } else if (i > 0) {
                        ary.splice(i - 1, 2);
                        i -= 2;
                    }
                }
            }
        }

        /**
         * Given a relative module name, like ./something, normalize it to
         * a real name that can be mapped to a path.
         * @param {String} name the relative name
         * @param {String} baseName a real name that the name arg is relative
         * to.
         * @param {Boolean} applyMap apply the map config to the value. Should
         * only be done if this normalization is for a dependency ID.
         * @returns {String} normalized name
         */
        function normalize(name, baseName, applyMap) {
            var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
                foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
                baseParts = (baseName && baseName.split('/')),
                map = config.map,
                starMap = map && map['*'];

            //Adjust any relative paths.
            if (name) {
                name = name.split('/');
                lastIndex = name.length - 1;

                // If wanting node ID compatibility, strip .js from end
                // of IDs. Have to do this here, and not in nameToUrl
                // because node allows either .js or non .js to map
                // to same file.
                if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
                    name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
                }

                // Starts with a '.' so need the baseName
                if (name[0].charAt(0) === '.' && baseParts) {
                    //Convert baseName to array, and lop off the last part,
                    //so that . matches that 'directory' and not name of the baseName's
                    //module. For instance, baseName of 'one/two/three', maps to
                    //'one/two/three.js', but we want the directory, 'one/two' for
                    //this normalization.
                    normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
                    name = normalizedBaseParts.concat(name);
                }

                trimDots(name);
                name = name.join('/');
            }

            //Apply map config if available.
            if (applyMap && map && (baseParts || starMap)) {
                nameParts = name.split('/');

                outerLoop: for (i = nameParts.length; i > 0; i -= 1) {
                    nameSegment = nameParts.slice(0, i).join('/');

                    if (baseParts) {
                        //Find the longest baseName segment match in the config.
                        //So, do joins on the biggest to smallest lengths of baseParts.
                        for (j = baseParts.length; j > 0; j -= 1) {
                            mapValue = getOwn(map, baseParts.slice(0, j).join('/'));

                            //baseName segment has config, find if it has one for
                            //this name.
                            if (mapValue) {
                                mapValue = getOwn(mapValue, nameSegment);
                                if (mapValue) {
                                    //Match, update name to the new value.
                                    foundMap = mapValue;
                                    foundI = i;
                                    break outerLoop;
                                }
                            }
                        }
                    }

                    //Check for a star map match, but just hold on to it,
                    //if there is a shorter segment match later in a matching
                    //config, then favor over this star map.
                    if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {
                        foundStarMap = getOwn(starMap, nameSegment);
                        starI = i;
                    }
                }

                if (!foundMap && foundStarMap) {
                    foundMap = foundStarMap;
                    foundI = starI;
                }

                if (foundMap) {
                    nameParts.splice(0, foundI, foundMap);
                    name = nameParts.join('/');
                }
            }

            // If the name points to a package's name, use
            // the package main instead.
            pkgMain = getOwn(config.pkgs, name);

            return pkgMain ? pkgMain : name;
        }

        function removeScript(name) {
            if (isBrowser) {
                each(scripts(), function (scriptNode) {
                    if (scriptNode.getAttribute('data-requiremodule') === name &&
                            scriptNode.getAttribute('data-requirecontext') === context.contextName) {
                        scriptNode.parentNode.removeChild(scriptNode);
                        return true;
                    }
                });
            }
        }

        function hasPathFallback(id) {
            var pathConfig = getOwn(config.paths, id);
            if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
                //Pop off the first array value, since it failed, and
                //retry
                pathConfig.shift();
                context.require.undef(id);

                //Custom require that does not do map translation, since
                //ID is "absolute", already mapped/resolved.
                context.makeRequire(null, {
                    skipMap: true
                })([id]);

                return true;
            }
        }

        //Turns a plugin!resource to [plugin, resource]
        //with the plugin being undefined if the name
        //did not have a plugin prefix.
        function splitPrefix(name) {
            var prefix,
                index = name ? name.indexOf('!') : -1;
            if (index > -1) {
                prefix = name.substring(0, index);
                name = name.substring(index + 1, name.length);
            }
            return [prefix, name];
        }

        /**
         * Creates a module mapping that includes plugin prefix, module
         * name, and path. If parentModuleMap is provided it will
         * also normalize the name via require.normalize()
         *
         * @param {String} name the module name
         * @param {String} [parentModuleMap] parent module map
         * for the module name, used to resolve relative names.
         * @param {Boolean} isNormalized: is the ID already normalized.
         * This is true if this call is done for a define() module ID.
         * @param {Boolean} applyMap: apply the map config to the ID.
         * Should only be true if this map is for a dependency.
         *
         * @returns {Object}
         */
        function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
            var url, pluginModule, suffix, nameParts,
                prefix = null,
                parentName = parentModuleMap ? parentModuleMap.name : null,
                originalName = name,
                isDefine = true,
                normalizedName = '';

            //If no name, then it means it is a require call, generate an
            //internal name.
            if (!name) {
                isDefine = false;
                name = '_@r' + (requireCounter += 1);
            }

            nameParts = splitPrefix(name);
            prefix = nameParts[0];
            name = nameParts[1];

            if (prefix) {
                prefix = normalize(prefix, parentName, applyMap);
                pluginModule = getOwn(defined, prefix);
            }

            //Account for relative paths if there is a base name.
            if (name) {
                if (prefix) {
                    if (pluginModule && pluginModule.normalize) {
                        //Plugin is loaded, use its normalize method.
                        normalizedName = pluginModule.normalize(name, function (name) {
                            return normalize(name, parentName, applyMap);
                        });
                    } else {
                        // If nested plugin references, then do not try to
                        // normalize, as it will not normalize correctly. This
                        // places a restriction on resourceIds, and the longer
                        // term solution is not to normalize until plugins are
                        // loaded and all normalizations to allow for async
                        // loading of a loader plugin. But for now, fixes the
                        // common uses. Details in #1131
                        normalizedName = name.indexOf('!') === -1 ?
                                         normalize(name, parentName, applyMap) :
                                         name;
                    }
                } else {
                    //A regular module.
                    normalizedName = normalize(name, parentName, applyMap);

                    //Normalized name may be a plugin ID due to map config
                    //application in normalize. The map config values must
                    //already be normalized, so do not need to redo that part.
                    nameParts = splitPrefix(normalizedName);
                    prefix = nameParts[0];
                    normalizedName = nameParts[1];
                    isNormalized = true;

                    url = context.nameToUrl(normalizedName);
                }
            }

            //If the id is a plugin id that cannot be determined if it needs
            //normalization, stamp it with a unique ID so two matching relative
            //ids that may conflict can be separate.
            suffix = prefix && !pluginModule && !isNormalized ?
                     '_unnormalized' + (unnormalizedCounter += 1) :
                     '';

            return {
                prefix: prefix,
                name: normalizedName,
                parentMap: parentModuleMap,
                unnormalized: !!suffix,
                url: url,
                originalName: originalName,
                isDefine: isDefine,
                id: (prefix ?
                        prefix + '!' + normalizedName :
                        normalizedName) + suffix
            };
        }

        function getModule(depMap) {
            var id = depMap.id,
                mod = getOwn(registry, id);

            if (!mod) {
                mod = registry[id] = new context.Module(depMap);
            }

            return mod;
        }

        function on(depMap, name, fn) {
            var id = depMap.id,
                mod = getOwn(registry, id);

            if (hasProp(defined, id) &&
                    (!mod || mod.defineEmitComplete)) {
                if (name === 'defined') {
                    fn(defined[id]);
                }
            } else {
                mod = getModule(depMap);
                if (mod.error && name === 'error') {
                    fn(mod.error);
                } else {
                    mod.on(name, fn);
                }
            }
        }

        function onError(err, errback) {
            var ids = err.requireModules,
                notified = false;

            if (errback) {
                errback(err);
            } else {
                each(ids, function (id) {
                    var mod = getOwn(registry, id);
                    if (mod) {
                        //Set error on module, so it skips timeout checks.
                        mod.error = err;
                        if (mod.events.error) {
                            notified = true;
                            mod.emit('error', err);
                        }
                    }
                });

                if (!notified) {
                    req.onError(err);
                }
            }
        }

        /**
         * Internal method to transfer globalQueue items to this context's
         * defQueue.
         */
        function takeGlobalQueue() {
            //Push all the globalDefQueue items into the context's defQueue
            if (globalDefQueue.length) {
                //Array splice in the values since the context code has a
                //local var ref to defQueue, so cannot just reassign the one
                //on context.
                apsp.apply(defQueue,
                           [defQueue.length, 0].concat(globalDefQueue));
                globalDefQueue = [];
            }
        }

        handlers = {
            'require': function (mod) {
                if (mod.require) {
                    return mod.require;
                } else {
                    return (mod.require = context.makeRequire(mod.map));
                }
            },
            'exports': function (mod) {
                mod.usingExports = true;
                if (mod.map.isDefine) {
                    if (mod.exports) {
                        return (defined[mod.map.id] = mod.exports);
                    } else {
                        return (mod.exports = defined[mod.map.id] = {});
                    }
                }
            },
            'module': function (mod) {
                if (mod.module) {
                    return mod.module;
                } else {
                    return (mod.module = {
                        id: mod.map.id,
                        uri: mod.map.url,
                        config: function () {
                            return  getOwn(config.config, mod.map.id) || {};
                        },
                        exports: mod.exports || (mod.exports = {})
                    });
                }
            }
        };

        function cleanRegistry(id) {
            //Clean up machinery used for waiting modules.
            delete registry[id];
            delete enabledRegistry[id];
        }

        function breakCycle(mod, traced, processed) {
            var id = mod.map.id;

            if (mod.error) {
                mod.emit('error', mod.error);
            } else {
                traced[id] = true;
                each(mod.depMaps, function (depMap, i) {
                    var depId = depMap.id,
                        dep = getOwn(registry, depId);

                    //Only force things that have not completed
                    //being defined, so still in the registry,
                    //and only if it has not been matched up
                    //in the module already.
                    if (dep && !mod.depMatched[i] && !processed[depId]) {
                        if (getOwn(traced, depId)) {
                            mod.defineDep(i, defined[depId]);
                            mod.check(); //pass false?
                        } else {
                            breakCycle(dep, traced, processed);
                        }
                    }
                });
                processed[id] = true;
            }
        }

        function checkLoaded() {
            var err, usingPathFallback,
                waitInterval = config.waitSeconds * 1000,
                //It is possible to disable the wait interval by using waitSeconds of 0.
                expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
                noLoads = [],
                reqCalls = [],
                stillLoading = false,
                needCycleCheck = true;

            //Do not bother if this call was a result of a cycle break.
            if (inCheckLoaded) {
                return;
            }

            inCheckLoaded = true;

            //Figure out the state of all the modules.
            eachProp(enabledRegistry, function (mod) {
                var map = mod.map,
                    modId = map.id;

                //Skip things that are not enabled or in error state.
                if (!mod.enabled) {
                    return;
                }

                if (!map.isDefine) {
                    reqCalls.push(mod);
                }

                if (!mod.error) {
                    //If the module should be executed, and it has not
                    //been inited and time is up, remember it.
                    if (!mod.inited && expired) {
                        if (hasPathFallback(modId)) {
                            usingPathFallback = true;
                            stillLoading = true;
                        } else {
                            noLoads.push(modId);
                            removeScript(modId);
                        }
                    } else if (!mod.inited && mod.fetched && map.isDefine) {
                        stillLoading = true;
                        if (!map.prefix) {
                            //No reason to keep looking for unfinished
                            //loading. If the only stillLoading is a
                            //plugin resource though, keep going,
                            //because it may be that a plugin resource
                            //is waiting on a non-plugin cycle.
                            return (needCycleCheck = false);
                        }
                    }
                }
            });

            if (expired && noLoads.length) {
                //If wait time expired, throw error of unloaded modules.
                err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);
                err.contextName = context.contextName;
                return onError(err);
            }

            //Not expired, check for a cycle.
            if (needCycleCheck) {
                each(reqCalls, function (mod) {
                    breakCycle(mod, {}, {});
                });
            }

            //If still waiting on loads, and the waiting load is something
            //other than a plugin resource, or there are still outstanding
            //scripts, then just try back later.
            if ((!expired || usingPathFallback) && stillLoading) {
                //Something is still waiting to load. Wait for it, but only
                //if a timeout is not already in effect.
                if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {
                    checkLoadedTimeoutId = setTimeout(function () {
                        checkLoadedTimeoutId = 0;
                        checkLoaded();
                    }, 50);
                }
            }

            inCheckLoaded = false;
        }

        Module = function (map) {
            this.events = getOwn(undefEvents, map.id) || {};
            this.map = map;
            this.shim = getOwn(config.shim, map.id);
            this.depExports = [];
            this.depMaps = [];
            this.depMatched = [];
            this.pluginMaps = {};
            this.depCount = 0;

            /* this.exports this.factory
               this.depMaps = [],
               this.enabled, this.fetched
            */
        };

        Module.prototype = {
            init: function (depMaps, factory, errback, options) {
                options = options || {};

                //Do not do more inits if already done. Can happen if there
                //are multiple define calls for the same module. That is not
                //a normal, common case, but it is also not unexpected.
                if (this.inited) {
                    return;
                }

                this.factory = factory;

                if (errback) {
                    //Register for errors on this module.
                    this.on('error', errback);
                } else if (this.events.error) {
                    //If no errback already, but there are error listeners
                    //on this module, set up an errback to pass to the deps.
                    errback = bind(this, function (err) {
                        this.emit('error', err);
                    });
                }

                //Do a copy of the dependency array, so that
                //source inputs are not modified. For example
                //"shim" deps are passed in here directly, and
                //doing a direct modification of the depMaps array
                //would affect that config.
                this.depMaps = depMaps && depMaps.slice(0);

                this.errback = errback;

                //Indicate this module has be initialized
                this.inited = true;

                this.ignore = options.ignore;

                //Could have option to init this module in enabled mode,
                //or could have been previously marked as enabled. However,
                //the dependencies are not known until init is called. So
                //if enabled previously, now trigger dependencies as enabled.
                if (options.enabled || this.enabled) {
                    //Enable this module and dependencies.
                    //Will call this.check()
                    this.enable();
                } else {
                    this.check();
                }
            },

            defineDep: function (i, depExports) {
                //Because of cycles, defined callback for a given
                //export can be called more than once.
                if (!this.depMatched[i]) {
                    this.depMatched[i] = true;
                    this.depCount -= 1;
                    this.depExports[i] = depExports;
                }
            },

            fetch: function () {
                if (this.fetched) {
                    return;
                }
                this.fetched = true;

                context.startTime = (new Date()).getTime();

                var map = this.map;

                //If the manager is for a plugin managed resource,
                //ask the plugin to load it now.
                if (this.shim) {
                    context.makeRequire(this.map, {
                        enableBuildCallback: true
                    })(this.shim.deps || [], bind(this, function () {
                        return map.prefix ? this.callPlugin() : this.load();
                    }));
                } else {
                    //Regular dependency.
                    return map.prefix ? this.callPlugin() : this.load();
                }
            },

            load: function () {
                var url = this.map.url;

                //Regular dependency.
                if (!urlFetched[url]) {
                    urlFetched[url] = true;
                    context.load(this.map.id, url);
                }
            },

            /**
             * Checks if the module is ready to define itself, and if so,
             * define it.
             */
            check: function () {
                if (!this.enabled || this.enabling) {
                    return;
                }

                var err, cjsModule,
                    id = this.map.id,
                    depExports = this.depExports,
                    exports = this.exports,
                    factory = this.factory;

                if (!this.inited) {
                    this.fetch();
                } else if (this.error) {
                    this.emit('error', this.error);
                } else if (!this.defining) {
                    //The factory could trigger another require call
                    //that would result in checking this module to
                    //define itself again. If already in the process
                    //of doing that, skip this work.
                    this.defining = true;

                    if (this.depCount < 1 && !this.defined) {
                        if (isFunction(factory)) {
                            //If there is an error listener, favor passing
                            //to that instead of throwing an error. However,
                            //only do it for define()'d  modules. require
                            //errbacks should not be called for failures in
                            //their callbacks (#699). However if a global
                            //onError is set, use that.
                            if ((this.events.error && this.map.isDefine) ||
                                req.onError !== defaultOnError) {
                                try {
                                    exports = context.execCb(id, factory, depExports, exports);
                                } catch (e) {
                                    err = e;
                                }
                            } else {
                                exports = context.execCb(id, factory, depExports, exports);
                            }

                            // Favor return value over exports. If node/cjs in play,
                            // then will not have a return value anyway. Favor
                            // module.exports assignment over exports object.
                            if (this.map.isDefine && exports === undefined) {
                                cjsModule = this.module;
                                if (cjsModule) {
                                    exports = cjsModule.exports;
                                } else if (this.usingExports) {
                                    //exports already set the defined value.
                                    exports = this.exports;
                                }
                            }

                            if (err) {
                                err.requireMap = this.map;
                                err.requireModules = this.map.isDefine ? [this.map.id] : null;
                                err.requireType = this.map.isDefine ? 'define' : 'require';
                                return onError((this.error = err));
                            }

                        } else {
                            //Just a literal value
                            exports = factory;
                        }

                        this.exports = exports;

                        if (this.map.isDefine && !this.ignore) {
                            defined[id] = exports;

                            if (req.onResourceLoad) {
                                req.onResourceLoad(context, this.map, this.depMaps);
                            }
                        }

                        //Clean up
                        cleanRegistry(id);

                        this.defined = true;
                    }

                    //Finished the define stage. Allow calling check again
                    //to allow define notifications below in the case of a
                    //cycle.
                    this.defining = false;

                    if (this.defined && !this.defineEmitted) {
                        this.defineEmitted = true;
                        this.emit('defined', this.exports);
                        this.defineEmitComplete = true;
                    }

                }
            },

            callPlugin: function () {
                var map = this.map,
                    id = map.id,
                    //Map already normalized the prefix.
                    pluginMap = makeModuleMap(map.prefix);

                //Mark this as a dependency for this plugin, so it
                //can be traced for cycles.
                this.depMaps.push(pluginMap);

                on(pluginMap, 'defined', bind(this, function (plugin) {
                    var load, normalizedMap, normalizedMod,
                        bundleId = getOwn(bundlesMap, this.map.id),
                        name = this.map.name,
                        parentName = this.map.parentMap ? this.map.parentMap.name : null,
                        localRequire = context.makeRequire(map.parentMap, {
                            enableBuildCallback: true
                        });

                    //If current map is not normalized, wait for that
                    //normalized name to load instead of continuing.
                    if (this.map.unnormalized) {
                        //Normalize the ID if the plugin allows it.
                        if (plugin.normalize) {
                            name = plugin.normalize(name, function (name) {
                                return normalize(name, parentName, true);
                            }) || '';
                        }

                        //prefix and name should already be normalized, no need
                        //for applying map config again either.
                        normalizedMap = makeModuleMap(map.prefix + '!' + name,
                                                      this.map.parentMap);
                        on(normalizedMap,
                            'defined', bind(this, function (value) {
                                this.init([], function () { return value; }, null, {
                                    enabled: true,
                                    ignore: true
                                });
                            }));

                        normalizedMod = getOwn(registry, normalizedMap.id);
                        if (normalizedMod) {
                            //Mark this as a dependency for this plugin, so it
                            //can be traced for cycles.
                            this.depMaps.push(normalizedMap);

                            if (this.events.error) {
                                normalizedMod.on('error', bind(this, function (err) {
                                    this.emit('error', err);
                                }));
                            }
                            normalizedMod.enable();
                        }

                        return;
                    }

                    //If a paths config, then just load that file instead to
                    //resolve the plugin, as it is built into that paths layer.
                    if (bundleId) {
                        this.map.url = context.nameToUrl(bundleId);
                        this.load();
                        return;
                    }

                    load = bind(this, function (value) {
                        this.init([], function () { return value; }, null, {
                            enabled: true
                        });
                    });

                    load.error = bind(this, function (err) {
                        this.inited = true;
                        this.error = err;
                        err.requireModules = [id];

                        //Remove temp unnormalized modules for this module,
                        //since they will never be resolved otherwise now.
                        eachProp(registry, function (mod) {
                            if (mod.map.id.indexOf(id + '_unnormalized') === 0) {
                                cleanRegistry(mod.map.id);
                            }
                        });

                        onError(err);
                    });

                    //Allow plugins to load other code without having to know the
                    //context or how to 'complete' the load.
                    load.fromText = bind(this, function (text, textAlt) {
                        /*jslint evil: true */
                        var moduleName = map.name,
                            moduleMap = makeModuleMap(moduleName),
                            hasInteractive = useInteractive;

                        //As of 2.1.0, support just passing the text, to reinforce
                        //fromText only being called once per resource. Still
                        //support old style of passing moduleName but discard
                        //that moduleName in favor of the internal ref.
                        if (textAlt) {
                            text = textAlt;
                        }

                        //Turn off interactive script matching for IE for any define
                        //calls in the text, then turn it back on at the end.
                        if (hasInteractive) {
                            useInteractive = false;
                        }

                        //Prime the system by creating a module instance for
                        //it.
                        getModule(moduleMap);

                        //Transfer any config to this other module.
                        if (hasProp(config.config, id)) {
                            config.config[moduleName] = config.config[id];
                        }

                        try {
                            req.exec(text);
                        } catch (e) {
                            return onError(makeError('fromtexteval',
                                             'fromText eval for ' + id +
                                            ' failed: ' + e,
                                             e,
                                             [id]));
                        }

                        if (hasInteractive) {
                            useInteractive = true;
                        }

                        //Mark this as a dependency for the plugin
                        //resource
                        this.depMaps.push(moduleMap);

                        //Support anonymous modules.
                        context.completeLoad(moduleName);

                        //Bind the value of that module to the value for this
                        //resource ID.
                        localRequire([moduleName], load);
                    });

                    //Use parentName here since the plugin's name is not reliable,
                    //could be some weird string with no path that actually wants to
                    //reference the parentName's path.
                    plugin.load(map.name, localRequire, load, config);
                }));

                context.enable(pluginMap, this);
                this.pluginMaps[pluginMap.id] = pluginMap;
            },

            enable: function () {
                enabledRegistry[this.map.id] = this;
                this.enabled = true;

                //Set flag mentioning that the module is enabling,
                //so that immediate calls to the defined callbacks
                //for dependencies do not trigger inadvertent load
                //with the depCount still being zero.
                this.enabling = true;

                //Enable each dependency
                each(this.depMaps, bind(this, function (depMap, i) {
                    var id, mod, handler;

                    if (typeof depMap === 'string') {
                        //Dependency needs to be converted to a depMap
                        //and wired up to this module.
                        depMap = makeModuleMap(depMap,
                                               (this.map.isDefine ? this.map : this.map.parentMap),
                                               false,
                                               !this.skipMap);
                        this.depMaps[i] = depMap;

                        handler = getOwn(handlers, depMap.id);

                        if (handler) {
                            this.depExports[i] = handler(this);
                            return;
                        }

                        this.depCount += 1;

                        on(depMap, 'defined', bind(this, function (depExports) {
                            this.defineDep(i, depExports);
                            this.check();
                        }));

                        if (this.errback) {
                            on(depMap, 'error', bind(this, this.errback));
                        }
                    }

                    id = depMap.id;
                    mod = registry[id];

                    //Skip special modules like 'require', 'exports', 'module'
                    //Also, don't call enable if it is already enabled,
                    //important in circular dependency cases.
                    if (!hasProp(handlers, id) && mod && !mod.enabled) {
                        context.enable(depMap, this);
                    }
                }));

                //Enable each plugin that is used in
                //a dependency
                eachProp(this.pluginMaps, bind(this, function (pluginMap) {
                    var mod = getOwn(registry, pluginMap.id);
                    if (mod && !mod.enabled) {
                        context.enable(pluginMap, this);
                    }
                }));

                this.enabling = false;

                this.check();
            },

            on: function (name, cb) {
                var cbs = this.events[name];
                if (!cbs) {
                    cbs = this.events[name] = [];
                }
                cbs.push(cb);
            },

            emit: function (name, evt) {
                each(this.events[name], function (cb) {
                    cb(evt);
                });
                if (name === 'error') {
                    //Now that the error handler was triggered, remove
                    //the listeners, since this broken Module instance
                    //can stay around for a while in the registry.
                    delete this.events[name];
                }
            }
        };

        function callGetModule(args) {
            //Skip modules already defined.
            if (!hasProp(defined, args[0])) {
                getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
            }
        }

        function removeListener(node, func, name, ieName) {
            //Favor detachEvent because of IE9
            //issue, see attachEvent/addEventListener comment elsewhere
            //in this file.
            if (node.detachEvent && !isOpera) {
                //Probably IE. If not it will throw an error, which will be
                //useful to know.
                if (ieName) {
                    node.detachEvent(ieName, func);
                }
            } else {
                node.removeEventListener(name, func, false);
            }
        }

        /**
         * Given an event from a script node, get the requirejs info from it,
         * and then removes the event listeners on the node.
         * @param {Event} evt
         * @returns {Object}
         */
        function getScriptData(evt) {
            //Using currentTarget instead of target for Firefox 2.0's sake. Not
            //all old browsers will be supported, but this one was easy enough
            //to support and still makes sense.
            var node = evt.currentTarget || evt.srcElement;

            //Remove the listeners once here.
            removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');
            removeListener(node, context.onScriptError, 'error');

            return {
                node: node,
                id: node && node.getAttribute('data-requiremodule')
            };
        }

        function intakeDefines() {
            var args;

            //Any defined modules in the global queue, intake them now.
            takeGlobalQueue();

            //Make sure any remaining defQueue items get properly processed.
            while (defQueue.length) {
                args = defQueue.shift();
                if (args[0] === null) {
                    return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));
                } else {
                    //args are id, deps, factory. Should be normalized by the
                    //define() function.
                    callGetModule(args);
                }
            }
        }

        context = {
            config: config,
            contextName: contextName,
            registry: registry,
            defined: defined,
            urlFetched: urlFetched,
            defQueue: defQueue,
            Module: Module,
            makeModuleMap: makeModuleMap,
            nextTick: req.nextTick,
            onError: onError,

            /**
             * Set a configuration for the context.
             * @param {Object} cfg config object to integrate.
             */
            configure: function (cfg) {
                //Make sure the baseUrl ends in a slash.
                if (cfg.baseUrl) {
                    if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
                        cfg.baseUrl += '/';
                    }
                }

                //Save off the paths since they require special processing,
                //they are additive.
                var shim = config.shim,
                    objs = {
                        paths: true,
                        bundles: true,
                        config: true,
                        map: true
                    };

                eachProp(cfg, function (value, prop) {
                    if (objs[prop]) {
                        if (!config[prop]) {
                            config[prop] = {};
                        }
                        mixin(config[prop], value, true, true);
                    } else {
                        config[prop] = value;
                    }
                });

                //Reverse map the bundles
                if (cfg.bundles) {
                    eachProp(cfg.bundles, function (value, prop) {
                        each(value, function (v) {
                            if (v !== prop) {
                                bundlesMap[v] = prop;
                            }
                        });
                    });
                }

                //Merge shim
                if (cfg.shim) {
                    eachProp(cfg.shim, function (value, id) {
                        //Normalize the structure
                        if (isArray(value)) {
                            value = {
                                deps: value
                            };
                        }
                        if ((value.exports || value.init) && !value.exportsFn) {
                            value.exportsFn = context.makeShimExports(value);
                        }
                        shim[id] = value;
                    });
                    config.shim = shim;
                }

                //Adjust packages if necessary.
                if (cfg.packages) {
                    each(cfg.packages, function (pkgObj) {
                        var location, name;

                        pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;

                        name = pkgObj.name;
                        location = pkgObj.location;
                        if (location) {
                            config.paths[name] = pkgObj.location;
                        }

                        //Save pointer to main module ID for pkg name.
                        //Remove leading dot in main, so main paths are normalized,
                        //and remove any trailing .js, since different package
                        //envs have different conventions: some use a module name,
                        //some use a file name.
                        config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')
                                     .replace(currDirRegExp, '')
                                     .replace(jsSuffixRegExp, '');
                    });
                }

                //If there are any "waiting to execute" modules in the registry,
                //update the maps for them, since their info, like URLs to load,
                //may have changed.
                eachProp(registry, function (mod, id) {
                    //If module already has init called, since it is too
                    //late to modify them, and ignore unnormalized ones
                    //since they are transient.
                    if (!mod.inited && !mod.map.unnormalized) {
                        mod.map = makeModuleMap(id);
                    }
                });

                //If a deps array or a config callback is specified, then call
                //require with those args. This is useful when require is defined as a
                //config object before require.js is loaded.
                if (cfg.deps || cfg.callback) {
                    context.require(cfg.deps || [], cfg.callback);
                }
            },

            makeShimExports: function (value) {
                function fn() {
                    var ret;
                    if (value.init) {
                        ret = value.init.apply(global, arguments);
                    }
                    return ret || (value.exports && getGlobal(value.exports));
                }
                return fn;
            },

            makeRequire: function (relMap, options) {
                options = options || {};

                function localRequire(deps, callback, errback) {
                    var id, map, requireMod;

                    if (options.enableBuildCallback && callback && isFunction(callback)) {
                        callback.__requireJsBuild = true;
                    }

                    if (typeof deps === 'string') {
                        if (isFunction(callback)) {
                            //Invalid call
                            return onError(makeError('requireargs', 'Invalid require call'), errback);
                        }

                        //If require|exports|module are requested, get the
                        //value for them from the special handlers. Caveat:
                        //this only works while module is being defined.
                        if (relMap && hasProp(handlers, deps)) {
                            return handlers[deps](registry[relMap.id]);
                        }

                        //Synchronous access to one module. If require.get is
                        //available (as in the Node adapter), prefer that.
                        if (req.get) {
                            return req.get(context, deps, relMap, localRequire);
                        }

                        //Normalize module name, if it contains . or ..
                        map = makeModuleMap(deps, relMap, false, true);
                        id = map.id;

                        if (!hasProp(defined, id)) {
                            return onError(makeError('notloaded', 'Module name "' +
                                        id +
                                        '" has not been loaded yet for context: ' +
                                        contextName +
                                        (relMap ? '' : '. Use require([])')));
                        }
                        return defined[id];
                    }

                    //Grab defines waiting in the global queue.
                    intakeDefines();

                    //Mark all the dependencies as needing to be loaded.
                    context.nextTick(function () {
                        //Some defines could have been added since the
                        //require call, collect them.
                        intakeDefines();

                        requireMod = getModule(makeModuleMap(null, relMap));

                        //Store if map config should be applied to this require
                        //call for dependencies.
                        requireMod.skipMap = options.skipMap;

                        requireMod.init(deps, callback, errback, {
                            enabled: true
                        });

                        checkLoaded();
                    });

                    return localRequire;
                }

                mixin(localRequire, {
                    isBrowser: isBrowser,

                    /**
                     * Converts a module name + .extension into an URL path.
                     * *Requires* the use of a module name. It does not support using
                     * plain URLs like nameToUrl.
                     */
                    toUrl: function (moduleNamePlusExt) {
                        var ext,
                            index = moduleNamePlusExt.lastIndexOf('.'),
                            segment = moduleNamePlusExt.split('/')[0],
                            isRelative = segment === '.' || segment === '..';

                        //Have a file extension alias, and it is not the
                        //dots from a relative path.
                        if (index !== -1 && (!isRelative || index > 1)) {
                            ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
                            moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
                        }

                        return context.nameToUrl(normalize(moduleNamePlusExt,
                                                relMap && relMap.id, true), ext,  true);
                    },

                    defined: function (id) {
                        return hasProp(defined, makeModuleMap(id, relMap, false, true).id);
                    },

                    specified: function (id) {
                        id = makeModuleMap(id, relMap, false, true).id;
                        return hasProp(defined, id) || hasProp(registry, id);
                    }
                });

                //Only allow undef on top level require calls
                if (!relMap) {
                    localRequire.undef = function (id) {
                        //Bind any waiting define() calls to this context,
                        //fix for #408
                        takeGlobalQueue();

                        var map = makeModuleMap(id, relMap, true),
                            mod = getOwn(registry, id);

                        removeScript(id);

                        delete defined[id];
                        delete urlFetched[map.url];
                        delete undefEvents[id];

                        //Clean queued defines too. Go backwards
                        //in array so that the splices do not
                        //mess up the iteration.
                        eachReverse(defQueue, function(args, i) {
                            if(args[0] === id) {
                                defQueue.splice(i, 1);
                            }
                        });

                        if (mod) {
                            //Hold on to listeners in case the
                            //module will be attempted to be reloaded
                            //using a different config.
                            if (mod.events.defined) {
                                undefEvents[id] = mod.events;
                            }

                            cleanRegistry(id);
                        }
                    };
                }

                return localRequire;
            },

            /**
             * Called to enable a module if it is still in the registry
             * awaiting enablement. A second arg, parent, the parent module,
             * is passed in for context, when this method is overridden by
             * the optimizer. Not shown here to keep code compact.
             */
            enable: function (depMap) {
                var mod = getOwn(registry, depMap.id);
                if (mod) {
                    getModule(depMap).enable();
                }
            },

            /**
             * Internal method used by environment adapters to complete a load event.
             * A load event could be a script load or just a load pass from a synchronous
             * load call.
             * @param {String} moduleName the name of the module to potentially complete.
             */
            completeLoad: function (moduleName) {
                var found, args, mod,
                    shim = getOwn(config.shim, moduleName) || {},
                    shExports = shim.exports;

                takeGlobalQueue();

                while (defQueue.length) {
                    args = defQueue.shift();
                    if (args[0] === null) {
                        args[0] = moduleName;
                        //If already found an anonymous module and bound it
                        //to this name, then this is some other anon module
                        //waiting for its completeLoad to fire.
                        if (found) {
                            break;
                        }
                        found = true;
                    } else if (args[0] === moduleName) {
                        //Found matching define call for this script!
                        found = true;
                    }

                    callGetModule(args);
                }

                //Do this after the cycle of callGetModule in case the result
                //of those calls/init calls changes the registry.
                mod = getOwn(registry, moduleName);

                if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {
                    if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {
                        if (hasPathFallback(moduleName)) {
                            return;
                        } else {
                            return onError(makeError('nodefine',
                                             'No define call for ' + moduleName,
                                             null,
                                             [moduleName]));
                        }
                    } else {
                        //A script that does not call define(), so just simulate
                        //the call for it.
                        callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);
                    }
                }

                checkLoaded();
            },

            /**
             * Converts a module name to a file path. Supports cases where
             * moduleName may actually be just an URL.
             * Note that it **does not** call normalize on the moduleName,
             * it is assumed to have already been normalized. This is an
             * internal API, not a public one. Use toUrl for the public API.
             */
            nameToUrl: function (moduleName, ext, skipExt) {
                var paths, syms, i, parentModule, url,
                    parentPath, bundleId,
                    pkgMain = getOwn(config.pkgs, moduleName);

                if (pkgMain) {
                    moduleName = pkgMain;
                }

                bundleId = getOwn(bundlesMap, moduleName);

                if (bundleId) {
                    return context.nameToUrl(bundleId, ext, skipExt);
                }

                //If a colon is in the URL, it indicates a protocol is used and it is just
                //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
                //or ends with .js, then assume the user meant to use an url and not a module id.
                //The slash is important for protocol-less URLs as well as full paths.
                if (req.jsExtRegExp.test(moduleName)) {
                    //Just a plain path, not module name lookup, so just return it.
                    //Add extension if it is included. This is a bit wonky, only non-.js things pass
                    //an extension, this method probably needs to be reworked.
                    url = moduleName + (ext || '');
                } else {
                    //A module that needs to be converted to a path.
                    paths = config.paths;

                    syms = moduleName.split('/');
                    //For each module name segment, see if there is a path
                    //registered for it. Start with most specific name
                    //and work up from it.
                    for (i = syms.length; i > 0; i -= 1) {
                        parentModule = syms.slice(0, i).join('/');

                        parentPath = getOwn(paths, parentModule);
                        if (parentPath) {
                            //If an array, it means there are a few choices,
                            //Choose the one that is desired
                            if (isArray(parentPath)) {
                                parentPath = parentPath[0];
                            }
                            syms.splice(0, i, parentPath);
                            break;
                        }
                    }

                    //Join the path parts together, then figure out if baseUrl is needed.
                    url = syms.join('/');
                    url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js'));
                    url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
                }

                return config.urlArgs ? url +
                                        ((url.indexOf('?') === -1 ? '?' : '&') +
                                         config.urlArgs) : url;
            },

            //Delegates to req.load. Broken out as a separate function to
            //allow overriding in the optimizer.
            load: function (id, url) {
                req.load(context, id, url);
            },

            /**
             * Executes a module callback function. Broken out as a separate function
             * solely to allow the build system to sequence the files in the built
             * layer in the right sequence.
             *
             * @private
             */
            execCb: function (name, callback, args, exports) {
                return callback.apply(exports, args);
            },

            /**
             * callback for script loads, used to check status of loading.
             *
             * @param {Event} evt the event from the browser for the script
             * that was loaded.
             */
            onScriptLoad: function (evt) {
                //Using currentTarget instead of target for Firefox 2.0's sake. Not
                //all old browsers will be supported, but this one was easy enough
                //to support and still makes sense.
                if (evt.type === 'load' ||
                        (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {
                    //Reset interactive script so a script node is not held onto for
                    //to long.
                    interactiveScript = null;

                    //Pull out the name of the module and the context.
                    var data = getScriptData(evt);
                    context.completeLoad(data.id);
                }
            },

            /**
             * Callback for script errors.
             */
            onScriptError: function (evt) {
                var data = getScriptData(evt);
                if (!hasPathFallback(data.id)) {
                    return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));
                }
            }
        };

        context.require = context.makeRequire();
        return context;
    }

    /**
     * Main entry point.
     *
     * If the only argument to require is a string, then the module that
     * is represented by that string is fetched for the appropriate context.
     *
     * If the first argument is an array, then it will be treated as an array
     * of dependency string names to fetch. An optional function callback can
     * be specified to execute when all of those dependencies are available.
     *
     * Make a local req variable to help Caja compliance (it assumes things
     * on a require that are not standardized), and to give a short
     * name for minification/local scope use.
     */
    req = requirejs = function (deps, callback, errback, optional) {

        //Find the right context, use default
        var context, config,
            contextName = defContextName;

        // Determine if have config object in the call.
        if (!isArray(deps) && typeof deps !== 'string') {
            // deps is a config object
            config = deps;
            if (isArray(callback)) {
                // Adjust args if there are dependencies
                deps = callback;
                callback = errback;
                errback = optional;
            } else {
                deps = [];
            }
        }

        if (config && config.context) {
            contextName = config.context;
        }

        context = getOwn(contexts, contextName);
        if (!context) {
            context = contexts[contextName] = req.s.newContext(contextName);
        }

        if (config) {
            context.configure(config);
        }

        return context.require(deps, callback, errback);
    };

    /**
     * Support require.config() to make it easier to cooperate with other
     * AMD loaders on globally agreed names.
     */
    req.config = function (config) {
        return req(config);
    };

    /**
     * Execute something after the current tick
     * of the event loop. Override for other envs
     * that have a better solution than setTimeout.
     * @param  {Function} fn function to execute later.
     */
    req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {
        setTimeout(fn, 4);
    } : function (fn) { fn(); };

    /**
     * Export require as a global, but only if it does not already exist.
     */
    if (!require) {
        require = req;
    }

    req.version = version;

    //Used to filter out dependencies that are already paths.
    req.jsExtRegExp = /^\/|:|\?|\.js$/;
    req.isBrowser = isBrowser;
    s = req.s = {
        contexts: contexts,
        newContext: newContext
    };

    //Create default context.
    req({});

    //Exports some context-sensitive methods on global require.
    each([
        'toUrl',
        'undef',
        'defined',
        'specified'
    ], function (prop) {
        //Reference from contexts instead of early binding to default context,
        //so that during builds, the latest instance of the default context
        //with its config gets used.
        req[prop] = function () {
            var ctx = contexts[defContextName];
            return ctx.require[prop].apply(ctx, arguments);
        };
    });

    if (isBrowser) {
        head = s.head = document.getElementsByTagName('head')[0];
        //If BASE tag is in play, using appendChild is a problem for IE6.
        //When that browser dies, this can be removed. Details in this jQuery bug:
        //http://dev.jquery.com/ticket/2709
        baseElement = document.getElementsByTagName('base')[0];
        if (baseElement) {
            head = s.head = baseElement.parentNode;
        }
    }

    /**
     * Any errors that require explicitly generates will be passed to this
     * function. Intercept/override it if you want custom error handling.
     * @param {Error} err the error object.
     */
    req.onError = defaultOnError;

    /**
     * Creates the node for the load command. Only used in browser envs.
     */
    req.createNode = function (config, moduleName, url) {
        var node = config.xhtml ?
                document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
                document.createElement('script');
        node.type = config.scriptType || 'text/javascript';
        node.charset = 'utf-8';
        node.async = true;
        return node;
    };

    /**
     * Does the request to load a module for the browser case.
     * Make this a separate function to allow other environments
     * to override it.
     *
     * @param {Object} context the require context to find state.
     * @param {String} moduleName the name of the module.
     * @param {Object} url the URL to the module.
     */
    req.load = function (context, moduleName, url) {
        var config = (context && context.config) || {},
            node;
        if (isBrowser) {
            //In the browser so use a script tag
            node = req.createNode(config, moduleName, url);

            node.setAttribute('data-requirecontext', context.contextName);
            node.setAttribute('data-requiremodule', moduleName);

            //Set up load listener. Test attachEvent first because IE9 has
            //a subtle issue in its addEventListener and script onload firings
            //that do not match the behavior of all other browsers with
            //addEventListener support, which fire the onload event for a
            //script right after the script execution. See:
            //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution
            //UNFORTUNATELY Opera implements attachEvent but does not follow the script
            //script execution mode.
            if (node.attachEvent &&
                    //Check if node.attachEvent is artificially added by custom script or
                    //natively supported by browser
                    //read https://github.com/jrburke/requirejs/issues/187
                    //if we can NOT find [native code] then it must NOT natively supported.
                    //in IE8, node.attachEvent does not have toString()
                    //Note the test for "[native code" with no closing brace, see:
                    //https://github.com/jrburke/requirejs/issues/273
                    !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&
                    !isOpera) {
                //Probably IE. IE (at least 6-8) do not fire
                //script onload right after executing the script, so
                //we cannot tie the anonymous define call to a name.
                //However, IE reports the script as being in 'interactive'
                //readyState at the time of the define call.
                useInteractive = true;

                node.attachEvent('onreadystatechange', context.onScriptLoad);
                //It would be great to add an error handler here to catch
                //404s in IE9+. However, onreadystatechange will fire before
                //the error handler, so that does not help. If addEventListener
                //is used, then IE will fire error before load, but we cannot
                //use that pathway given the connect.microsoft.com issue
                //mentioned above about not doing the 'script execute,
                //then fire the script load event listener before execute
                //next script' that other browsers do.
                //Best hope: IE10 fixes the issues,
                //and then destroys all installs of IE 6-9.
                //node.attachEvent('onerror', context.onScriptError);
            } else {
                node.addEventListener('load', context.onScriptLoad, false);
                node.addEventListener('error', context.onScriptError, false);
            }
            node.src = url;

            //For some cache cases in IE 6-8, the script executes before the end
            //of the appendChild execution, so to tie an anonymous define
            //call to the module name (which is stored on the node), hold on
            //to a reference to this node, but clear after the DOM insertion.
            currentlyAddingScript = node;
            if (baseElement) {
                head.insertBefore(node, baseElement);
            } else {
                head.appendChild(node);
            }
            currentlyAddingScript = null;

            return node;
        } else if (isWebWorker) {
            try {
                //In a web worker, use importScripts. This is not a very
                //efficient use of importScripts, importScripts will block until
                //its script is downloaded and evaluated. However, if web workers
                //are in play, the expectation that a build has been done so that
                //only one script needs to be loaded anyway. This may need to be
                //reevaluated if other use cases become common.
                importScripts(url);

                //Account for anonymous modules
                context.completeLoad(moduleName);
            } catch (e) {
                context.onError(makeError('importscripts',
                                'importScripts failed for ' +
                                    moduleName + ' at ' + url,
                                e,
                                [moduleName]));
            }
        }
    };

    function getInteractiveScript() {
        if (interactiveScript && interactiveScript.readyState === 'interactive') {
            return interactiveScript;
        }

        eachReverse(scripts(), function (script) {
            if (script.readyState === 'interactive') {
                return (interactiveScript = script);
            }
        });
        return interactiveScript;
    }

    //Look for a data-main script attribute, which could also adjust the baseUrl.
    if (isBrowser && !cfg.skipDataMain) {
        //Figure out baseUrl. Get it from the script tag with require.js in it.
        eachReverse(scripts(), function (script) {
            //Set the 'head' where we can append children by
            //using the script's parent.
            if (!head) {
                head = script.parentNode;
            }

            //Look for a data-main attribute to set main script for the page
            //to load. If it is there, the path to data main becomes the
            //baseUrl, if it is not already set.
            dataMain = script.getAttribute('data-main');
            if (dataMain) {
                //Preserve dataMain in case it is a path (i.e. contains '?')
                mainScript = dataMain;

                //Set final baseUrl if there is not already an explicit one.
                if (!cfg.baseUrl) {
                    //Pull off the directory of data-main for use as the
                    //baseUrl.
                    src = mainScript.split('/');
                    mainScript = src.pop();
                    subPath = src.length ? src.join('/')  + '/' : './';

                    cfg.baseUrl = subPath;
                }

                //Strip off any trailing .js since mainScript is now
                //like a module name.
                mainScript = mainScript.replace(jsSuffixRegExp, '');

                 //If mainScript is still a path, fall back to dataMain
                if (req.jsExtRegExp.test(mainScript)) {
                    mainScript = dataMain;
                }

                //Put the data-main script in the files to load.
                cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];

                return true;
            }
        });
    }

    /**
     * The function that handles definitions of modules. Differs from
     * require() in that a string for the module should be the first argument,
     * and the function to execute after dependencies are loaded should
     * return a value to define the module corresponding to the first argument's
     * name.
     */
    define = function (name, deps, callback) {
        var node, context;

        //Allow for anonymous modules
        if (typeof name !== 'string') {
            //Adjust args appropriately
            callback = deps;
            deps = name;
            name = null;
        }

        //This module may not have dependencies
        if (!isArray(deps)) {
            callback = deps;
            deps = null;
        }

        //If no name, and callback is a function, then figure out if it a
        //CommonJS thing with dependencies.
        if (!deps && isFunction(callback)) {
            deps = [];
            //Remove comments from the callback string,
            //look for require calls, and pull them into the dependencies,
            //but only if there are function args.
            if (callback.length) {
                callback
                    .toString()
                    .replace(commentRegExp, '')
                    .replace(cjsRequireRegExp, function (match, dep) {
                        deps.push(dep);
                    });

                //May be a CommonJS thing even without require calls, but still
                //could use exports, and module. Avoid doing exports and module
                //work though if it just needs require.
                //REQUIRES the function to expect the CommonJS variables in the
                //order listed below.
                deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);
            }
        }

        //If in IE 6-8 and hit an anonymous define() call, do the interactive
        //work.
        if (useInteractive) {
            node = currentlyAddingScript || getInteractiveScript();
            if (node) {
                if (!name) {
                    name = node.getAttribute('data-requiremodule');
                }
                context = contexts[node.getAttribute('data-requirecontext')];
            }
        }

        //Always save off evaluating the def call until the script onload handler.
        //This allows multiple modules to be in a file without prematurely
        //tracing dependencies, and allows for anonymous module support,
        //where the module name is not known until the script onload event
        //occurs. If no context, use the global queue, and get it processed
        //in the onscript load callback.
        (context ? context.defQueue : globalDefQueue).push([name, deps, callback]);
    };

    define.amd = {
        jQuery: true
    };


    /**
     * Executes the text. Normally just uses eval, but can be modified
     * to use a better, environment-specific call. Only used for transpiling
     * loader plugins, not for plain JS modules.
     * @param {String} text the text to execute/evaluate.
     */
    req.exec = function (text) {
        /*jslint evil: true */
        return eval(text);
    };

    //Set up with config info.
    req(cfg);
}(this));

define("vendor/require", function(){});

/*!
 * jQuery JavaScript Library v3.5.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2020-05-04T22:49Z
 */
( function( global, factory ) {

	"use strict";

	if ( typeof module === "object" && typeof module.exports === "object" ) {

		// For CommonJS and CommonJS-like environments where a proper `window`
		// is present, execute the factory and get jQuery.
		// For environments that do not have a `window` with a `document`
		// (such as Node.js), expose a factory as module.exports.
		// This accentuates the need for the creation of a real `window`.
		// e.g. var jQuery = require("jquery")(window);
		// See ticket #14549 for more info.
		module.exports = global.document ?
			factory( global, true ) :
			function( w ) {
				if ( !w.document ) {
					throw new Error( "jQuery requires a window with a document" );
				}
				return factory( w );
			};
	} else {
		factory( global );
	}

// Pass this if window is not defined yet
} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {

// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
// enough that all such attempts are guarded in a try block.


var arr = [];

var getProto = Object.getPrototypeOf;

var slice = arr.slice;

var flat = arr.flat ? function( array ) {
	return arr.flat.call( array );
} : function( array ) {
	return arr.concat.apply( [], array );
};


var push = arr.push;

var indexOf = arr.indexOf;

var class2type = {};

var toString = class2type.toString;

var hasOwn = class2type.hasOwnProperty;

var fnToString = hasOwn.toString;

var ObjectFunctionString = fnToString.call( Object );

var support = {};

var isFunction = function isFunction( obj ) {

      // Support: Chrome <=57, Firefox <=52
      // In some browsers, typeof returns "function" for HTML <object> elements
      // (i.e., `typeof document.createElement( "object" ) === "function"`).
      // We don't want to classify *any* DOM node as a function.
      return typeof obj === "function" && typeof obj.nodeType !== "number";
  };


var isWindow = function isWindow( obj ) {
		return obj != null && obj === obj.window;
	};


var document = window.document;



	var preservedScriptAttributes = {
		type: true,
		src: true,
		nonce: true,
		noModule: true
	};

	function DOMEval( code, node, doc ) {
		doc = doc || document;

		var i, val,
			script = doc.createElement( "script" );

		script.text = code;
		if ( node ) {
			for ( i in preservedScriptAttributes ) {

				// Support: Firefox 64+, Edge 18+
				// Some browsers don't support the "nonce" property on scripts.
				// On the other hand, just using `getAttribute` is not enough as
				// the `nonce` attribute is reset to an empty string whenever it
				// becomes browsing-context connected.
				// See https://github.com/whatwg/html/issues/2369
				// See https://html.spec.whatwg.org/#nonce-attributes
				// The `node.getAttribute` check was added for the sake of
				// `jQuery.globalEval` so that it can fake a nonce-containing node
				// via an object.
				val = node[ i ] || node.getAttribute && node.getAttribute( i );
				if ( val ) {
					script.setAttribute( i, val );
				}
			}
		}
		doc.head.appendChild( script ).parentNode.removeChild( script );
	}


function toType( obj ) {
	if ( obj == null ) {
		return obj + "";
	}

	// Support: Android <=2.3 only (functionish RegExp)
	return typeof obj === "object" || typeof obj === "function" ?
		class2type[ toString.call( obj ) ] || "object" :
		typeof obj;
}
/* global Symbol */
// Defining this global in .eslintrc.json would create a danger of using the global
// unguarded in another place, it seems safer to define global only for this module



var
	version = "3.5.1",

	// Define a local copy of jQuery
	jQuery = function( selector, context ) {

		// The jQuery object is actually just the init constructor 'enhanced'
		// Need init if jQuery is called (just allow error to be thrown if not included)
		return new jQuery.fn.init( selector, context );
	};

jQuery.fn = jQuery.prototype = {

	// The current version of jQuery being used
	jquery: version,

	constructor: jQuery,

	// The default length of a jQuery object is 0
	length: 0,

	toArray: function() {
		return slice.call( this );
	},

	// Get the Nth element in the matched element set OR
	// Get the whole matched element set as a clean array
	get: function( num ) {

		// Return all the elements in a clean array
		if ( num == null ) {
			return slice.call( this );
		}

		// Return just the one element from the set
		return num < 0 ? this[ num + this.length ] : this[ num ];
	},

	// Take an array of elements and push it onto the stack
	// (returning the new matched element set)
	pushStack: function( elems ) {

		// Build a new jQuery matched element set
		var ret = jQuery.merge( this.constructor(), elems );

		// Add the old object onto the stack (as a reference)
		ret.prevObject = this;

		// Return the newly-formed element set
		return ret;
	},

	// Execute a callback for every element in the matched set.
	each: function( callback ) {
		return jQuery.each( this, callback );
	},

	map: function( callback ) {
		return this.pushStack( jQuery.map( this, function( elem, i ) {
			return callback.call( elem, i, elem );
		} ) );
	},

	slice: function() {
		return this.pushStack( slice.apply( this, arguments ) );
	},

	first: function() {
		return this.eq( 0 );
	},

	last: function() {
		return this.eq( -1 );
	},

	even: function() {
		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
			return ( i + 1 ) % 2;
		} ) );
	},

	odd: function() {
		return this.pushStack( jQuery.grep( this, function( _elem, i ) {
			return i % 2;
		} ) );
	},

	eq: function( i ) {
		var len = this.length,
			j = +i + ( i < 0 ? len : 0 );
		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
	},

	end: function() {
		return this.prevObject || this.constructor();
	},

	// For internal use only.
	// Behaves like an Array's method, not like a jQuery method.
	push: push,
	sort: arr.sort,
	splice: arr.splice
};

jQuery.extend = jQuery.fn.extend = function() {
	var options, name, src, copy, copyIsArray, clone,
		target = arguments[ 0 ] || {},
		i = 1,
		length = arguments.length,
		deep = false;

	// Handle a deep copy situation
	if ( typeof target === "boolean" ) {
		deep = target;

		// Skip the boolean and the target
		target = arguments[ i ] || {};
		i++;
	}

	// Handle case when target is a string or something (possible in deep copy)
	if ( typeof target !== "object" && !isFunction( target ) ) {
		target = {};
	}

	// Extend jQuery itself if only one argument is passed
	if ( i === length ) {
		target = this;
		i--;
	}

	for ( ; i < length; i++ ) {

		// Only deal with non-null/undefined values
		if ( ( options = arguments[ i ] ) != null ) {

			// Extend the base object
			for ( name in options ) {
				copy = options[ name ];

				// Prevent Object.prototype pollution
				// Prevent never-ending loop
				if ( name === "__proto__" || target === copy ) {
					continue;
				}

				// Recurse if we're merging plain objects or arrays
				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
					( copyIsArray = Array.isArray( copy ) ) ) ) {
					src = target[ name ];

					// Ensure proper type for the source value
					if ( copyIsArray && !Array.isArray( src ) ) {
						clone = [];
					} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
						clone = {};
					} else {
						clone = src;
					}
					copyIsArray = false;

					// Never move original objects, clone them
					target[ name ] = jQuery.extend( deep, clone, copy );

				// Don't bring in undefined values
				} else if ( copy !== undefined ) {
					target[ name ] = copy;
				}
			}
		}
	}

	// Return the modified object
	return target;
};

jQuery.extend( {

	// Unique for each copy of jQuery on the page
	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),

	// Assume jQuery is ready without the ready module
	isReady: true,

	error: function( msg ) {
		throw new Error( msg );
	},

	noop: function() {},

	isPlainObject: function( obj ) {
		var proto, Ctor;

		// Detect obvious negatives
		// Use toString instead of jQuery.type to catch host objects
		if ( !obj || toString.call( obj ) !== "[object Object]" ) {
			return false;
		}

		proto = getProto( obj );

		// Objects with no prototype (e.g., `Object.create( null )`) are plain
		if ( !proto ) {
			return true;
		}

		// Objects with prototype are plain iff they were constructed by a global Object function
		Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
		return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
	},

	isEmptyObject: function( obj ) {
		var name;

		for ( name in obj ) {
			return false;
		}
		return true;
	},

	// Evaluates a script in a provided context; falls back to the global one
	// if not specified.
	globalEval: function( code, options, doc ) {
		DOMEval( code, { nonce: options && options.nonce }, doc );
	},

	each: function( obj, callback ) {
		var length, i = 0;

		if ( isArrayLike( obj ) ) {
			length = obj.length;
			for ( ; i < length; i++ ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		} else {
			for ( i in obj ) {
				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
					break;
				}
			}
		}

		return obj;
	},

	// results is for internal usage only
	makeArray: function( arr, results ) {
		var ret = results || [];

		if ( arr != null ) {
			if ( isArrayLike( Object( arr ) ) ) {
				jQuery.merge( ret,
					typeof arr === "string" ?
					[ arr ] : arr
				);
			} else {
				push.call( ret, arr );
			}
		}

		return ret;
	},

	inArray: function( elem, arr, i ) {
		return arr == null ? -1 : indexOf.call( arr, elem, i );
	},

	// Support: Android <=4.0 only, PhantomJS 1 only
	// push.apply(_, arraylike) throws on ancient WebKit
	merge: function( first, second ) {
		var len = +second.length,
			j = 0,
			i = first.length;

		for ( ; j < len; j++ ) {
			first[ i++ ] = second[ j ];
		}

		first.length = i;

		return first;
	},

	grep: function( elems, callback, invert ) {
		var callbackInverse,
			matches = [],
			i = 0,
			length = elems.length,
			callbackExpect = !invert;

		// Go through the array, only saving the items
		// that pass the validator function
		for ( ; i < length; i++ ) {
			callbackInverse = !callback( elems[ i ], i );
			if ( callbackInverse !== callbackExpect ) {
				matches.push( elems[ i ] );
			}
		}

		return matches;
	},

	// arg is for internal usage only
	map: function( elems, callback, arg ) {
		var length, value,
			i = 0,
			ret = [];

		// Go through the array, translating each of the items to their new values
		if ( isArrayLike( elems ) ) {
			length = elems.length;
			for ( ; i < length; i++ ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}

		// Go through every key on the object,
		} else {
			for ( i in elems ) {
				value = callback( elems[ i ], i, arg );

				if ( value != null ) {
					ret.push( value );
				}
			}
		}

		// Flatten any nested arrays
		return flat( ret );
	},

	// A global GUID counter for objects
	guid: 1,

	// jQuery.support is not used in Core but other projects attach their
	// properties to it so it needs to exist.
	support: support
} );

if ( typeof Symbol === "function" ) {
	jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
}

// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
function( _i, name ) {
	class2type[ "[object " + name + "]" ] = name.toLowerCase();
} );

function isArrayLike( obj ) {

	// Support: real iOS 8.2 only (not reproducible in simulator)
	// `in` check used to prevent JIT error (gh-2145)
	// hasOwn isn't used here due to false negatives
	// regarding Nodelist length in IE
	var length = !!obj && "length" in obj && obj.length,
		type = toType( obj );

	if ( isFunction( obj ) || isWindow( obj ) ) {
		return false;
	}

	return type === "array" || length === 0 ||
		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}
var Sizzle =
/*!
 * Sizzle CSS Selector Engine v2.3.5
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://js.foundation/
 *
 * Date: 2020-03-14
 */
( function( window ) {
var i,
	support,
	Expr,
	getText,
	isXML,
	tokenize,
	compile,
	select,
	outermostContext,
	sortInput,
	hasDuplicate,

	// Local document vars
	setDocument,
	document,
	docElem,
	documentIsHTML,
	rbuggyQSA,
	rbuggyMatches,
	matches,
	contains,

	// Instance-specific data
	expando = "sizzle" + 1 * new Date(),
	preferredDoc = window.document,
	dirruns = 0,
	done = 0,
	classCache = createCache(),
	tokenCache = createCache(),
	compilerCache = createCache(),
	nonnativeSelectorCache = createCache(),
	sortOrder = function( a, b ) {
		if ( a === b ) {
			hasDuplicate = true;
		}
		return 0;
	},

	// Instance methods
	hasOwn = ( {} ).hasOwnProperty,
	arr = [],
	pop = arr.pop,
	pushNative = arr.push,
	push = arr.push,
	slice = arr.slice,

	// Use a stripped-down indexOf as it's faster than native
	// https://jsperf.com/thor-indexof-vs-for/5
	indexOf = function( list, elem ) {
		var i = 0,
			len = list.length;
		for ( ; i < len; i++ ) {
			if ( list[ i ] === elem ) {
				return i;
			}
		}
		return -1;
	},

	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +
		"ismap|loop|multiple|open|readonly|required|scoped",

	// Regular expressions

	// http://www.w3.org/TR/css3-selectors/#whitespace
	whitespace = "[\\x20\\t\\r\\n\\f]",

	// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
	identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
		"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",

	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +

		// Operator (capture 2)
		"*([*^$|!~]?=)" + whitespace +

		// "Attribute values must be CSS identifiers [capture 5]
		// or strings [capture 3 or capture 4]"
		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
		whitespace + "*\\]",

	pseudos = ":(" + identifier + ")(?:\\((" +

		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
		// 1. quoted (capture 3; capture 4 or capture 5)
		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +

		// 2. simple (capture 6)
		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +

		// 3. anything else (capture 2)
		".*" +
		")\\)|)",

	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
	rwhitespace = new RegExp( whitespace + "+", "g" ),
	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
		whitespace + "+$", "g" ),

	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
		"*" ),
	rdescend = new RegExp( whitespace + "|>" ),

	rpseudo = new RegExp( pseudos ),
	ridentifier = new RegExp( "^" + identifier + "$" ),

	matchExpr = {
		"ID": new RegExp( "^#(" + identifier + ")" ),
		"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
		"TAG": new RegExp( "^(" + identifier + "|[*])" ),
		"ATTR": new RegExp( "^" + attributes ),
		"PSEUDO": new RegExp( "^" + pseudos ),
		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
			whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
			whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),

		// For use in libraries implementing .is()
		// We use this for POS matching in `select`
		"needsContext": new RegExp( "^" + whitespace +
			"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
			"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
	},

	rhtml = /HTML$/i,
	rinputs = /^(?:input|select|textarea|button)$/i,
	rheader = /^h\d$/i,

	rnative = /^[^{]+\{\s*\[native \w/,

	// Easily-parseable/retrievable ID or TAG or CLASS selectors
	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,

	rsibling = /[+~]/,

	// CSS escapes
	// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
	runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ),
	funescape = function( escape, nonHex ) {
		var high = "0x" + escape.slice( 1 ) - 0x10000;

		return nonHex ?

			// Strip the backslash prefix from a non-hex escape sequence
			nonHex :

			// Replace a hexadecimal escape sequence with the encoded Unicode code point
			// Support: IE <=11+
			// For values outside the Basic Multilingual Plane (BMP), manually construct a
			// surrogate pair
			high < 0 ?
				String.fromCharCode( high + 0x10000 ) :
				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
	},

	// CSS string/identifier serialization
	// https://drafts.csswg.org/cssom/#common-serializing-idioms
	rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
	fcssescape = function( ch, asCodePoint ) {
		if ( asCodePoint ) {

			// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
			if ( ch === "\0" ) {
				return "\uFFFD";
			}

			// Control characters and (dependent upon position) numbers get escaped as code points
			return ch.slice( 0, -1 ) + "\\" +
				ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
		}

		// Other potentially-special ASCII characters get backslash-escaped
		return "\\" + ch;
	},

	// Used for iframes
	// See setDocument()
	// Removing the function wrapper causes a "Permission Denied"
	// error in IE
	unloadHandler = function() {
		setDocument();
	},

	inDisabledFieldset = addCombinator(
		function( elem ) {
			return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
		},
		{ dir: "parentNode", next: "legend" }
	);

// Optimize for push.apply( _, NodeList )
try {
	push.apply(
		( arr = slice.call( preferredDoc.childNodes ) ),
		preferredDoc.childNodes
	);

	// Support: Android<4.0
	// Detect silently failing push.apply
	// eslint-disable-next-line no-unused-expressions
	arr[ preferredDoc.childNodes.length ].nodeType;
} catch ( e ) {
	push = { apply: arr.length ?

		// Leverage slice if possible
		function( target, els ) {
			pushNative.apply( target, slice.call( els ) );
		} :

		// Support: IE<9
		// Otherwise append directly
		function( target, els ) {
			var j = target.length,
				i = 0;

			// Can't trust NodeList.length
			while ( ( target[ j++ ] = els[ i++ ] ) ) {}
			target.length = j - 1;
		}
	};
}

function Sizzle( selector, context, results, seed ) {
	var m, i, elem, nid, match, groups, newSelector,
		newContext = context && context.ownerDocument,

		// nodeType defaults to 9, since context defaults to document
		nodeType = context ? context.nodeType : 9;

	results = results || [];

	// Return early from calls with invalid selector or context
	if ( typeof selector !== "string" || !selector ||
		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {

		return results;
	}

	// Try to shortcut find operations (as opposed to filters) in HTML documents
	if ( !seed ) {
		setDocument( context );
		context = context || document;

		if ( documentIsHTML ) {

			// If the selector is sufficiently simple, try using a "get*By*" DOM method
			// (excepting DocumentFragment context, where the methods don't exist)
			if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {

				// ID selector
				if ( ( m = match[ 1 ] ) ) {

					// Document context
					if ( nodeType === 9 ) {
						if ( ( elem = context.getElementById( m ) ) ) {

							// Support: IE, Opera, Webkit
							// TODO: identify versions
							// getElementById can match elements by name instead of ID
							if ( elem.id === m ) {
								results.push( elem );
								return results;
							}
						} else {
							return results;
						}

					// Element context
					} else {

						// Support: IE, Opera, Webkit
						// TODO: identify versions
						// getElementById can match elements by name instead of ID
						if ( newContext && ( elem = newContext.getElementById( m ) ) &&
							contains( context, elem ) &&
							elem.id === m ) {

							results.push( elem );
							return results;
						}
					}

				// Type selector
				} else if ( match[ 2 ] ) {
					push.apply( results, context.getElementsByTagName( selector ) );
					return results;

				// Class selector
				} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&
					context.getElementsByClassName ) {

					push.apply( results, context.getElementsByClassName( m ) );
					return results;
				}
			}

			// Take advantage of querySelectorAll
			if ( support.qsa &&
				!nonnativeSelectorCache[ selector + " " ] &&
				( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&

				// Support: IE 8 only
				// Exclude object elements
				( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) {

				newSelector = selector;
				newContext = context;

				// qSA considers elements outside a scoping root when evaluating child or
				// descendant combinators, which is not what we want.
				// In such cases, we work around the behavior by prefixing every selector in the
				// list with an ID selector referencing the scope context.
				// The technique has to be used as well when a leading combinator is used
				// as such selectors are not recognized by querySelectorAll.
				// Thanks to Andrew Dupont for this technique.
				if ( nodeType === 1 &&
					( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {

					// Expand context for sibling selectors
					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
						context;

					// We can use :scope instead of the ID hack if the browser
					// supports it & if we're not changing the context.
					if ( newContext !== context || !support.scope ) {

						// Capture the context ID, setting it first if necessary
						if ( ( nid = context.getAttribute( "id" ) ) ) {
							nid = nid.replace( rcssescape, fcssescape );
						} else {
							context.setAttribute( "id", ( nid = expando ) );
						}
					}

					// Prefix every selector in the list
					groups = tokenize( selector );
					i = groups.length;
					while ( i-- ) {
						groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
							toSelector( groups[ i ] );
					}
					newSelector = groups.join( "," );
				}

				try {
					push.apply( results,
						newContext.querySelectorAll( newSelector )
					);
					return results;
				} catch ( qsaError ) {
					nonnativeSelectorCache( selector, true );
				} finally {
					if ( nid === expando ) {
						context.removeAttribute( "id" );
					}
				}
			}
		}
	}

	// All others
	return select( selector.replace( rtrim, "$1" ), context, results, seed );
}

/**
 * Create key-value caches of limited size
 * @returns {function(string, object)} Returns the Object data after storing it on itself with
 *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
 *	deleting the oldest entry
 */
function createCache() {
	var keys = [];

	function cache( key, value ) {

		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
		if ( keys.push( key + " " ) > Expr.cacheLength ) {

			// Only keep the most recent entries
			delete cache[ keys.shift() ];
		}
		return ( cache[ key + " " ] = value );
	}
	return cache;
}

/**
 * Mark a function for special use by Sizzle
 * @param {Function} fn The function to mark
 */
function markFunction( fn ) {
	fn[ expando ] = true;
	return fn;
}

/**
 * Support testing using an element
 * @param {Function} fn Passed the created element and returns a boolean result
 */
function assert( fn ) {
	var el = document.createElement( "fieldset" );

	try {
		return !!fn( el );
	} catch ( e ) {
		return false;
	} finally {

		// Remove from its parent by default
		if ( el.parentNode ) {
			el.parentNode.removeChild( el );
		}

		// release memory in IE
		el = null;
	}
}

/**
 * Adds the same handler for all of the specified attrs
 * @param {String} attrs Pipe-separated list of attributes
 * @param {Function} handler The method that will be applied
 */
function addHandle( attrs, handler ) {
	var arr = attrs.split( "|" ),
		i = arr.length;

	while ( i-- ) {
		Expr.attrHandle[ arr[ i ] ] = handler;
	}
}

/**
 * Checks document order of two siblings
 * @param {Element} a
 * @param {Element} b
 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
 */
function siblingCheck( a, b ) {
	var cur = b && a,
		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
			a.sourceIndex - b.sourceIndex;

	// Use IE sourceIndex if available on both nodes
	if ( diff ) {
		return diff;
	}

	// Check if b follows a
	if ( cur ) {
		while ( ( cur = cur.nextSibling ) ) {
			if ( cur === b ) {
				return -1;
			}
		}
	}

	return a ? 1 : -1;
}

/**
 * Returns a function to use in pseudos for input types
 * @param {String} type
 */
function createInputPseudo( type ) {
	return function( elem ) {
		var name = elem.nodeName.toLowerCase();
		return name === "input" && elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for buttons
 * @param {String} type
 */
function createButtonPseudo( type ) {
	return function( elem ) {
		var name = elem.nodeName.toLowerCase();
		return ( name === "input" || name === "button" ) && elem.type === type;
	};
}

/**
 * Returns a function to use in pseudos for :enabled/:disabled
 * @param {Boolean} disabled true for :disabled; false for :enabled
 */
function createDisabledPseudo( disabled ) {

	// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
	return function( elem ) {

		// Only certain elements can match :enabled or :disabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
		// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
		if ( "form" in elem ) {

			// Check for inherited disabledness on relevant non-disabled elements:
			// * listed form-associated elements in a disabled fieldset
			//   https://html.spec.whatwg.org/multipage/forms.html#category-listed
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
			// * option elements in a disabled optgroup
			//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
			// All such elements have a "form" property.
			if ( elem.parentNode && elem.disabled === false ) {

				// Option elements defer to a parent optgroup if present
				if ( "label" in elem ) {
					if ( "label" in elem.parentNode ) {
						return elem.parentNode.disabled === disabled;
					} else {
						return elem.disabled === disabled;
					}
				}

				// Support: IE 6 - 11
				// Use the isDisabled shortcut property to check for disabled fieldset ancestors
				return elem.isDisabled === disabled ||

					// Where there is no isDisabled, check manually
					/* jshint -W018 */
					elem.isDisabled !== !disabled &&
					inDisabledFieldset( elem ) === disabled;
			}

			return elem.disabled === disabled;

		// Try to winnow out elements that can't be disabled before trusting the disabled property.
		// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
		// even exist on them, let alone have a boolean value.
		} else if ( "label" in elem ) {
			return elem.disabled === disabled;
		}

		// Remaining elements are neither :enabled nor :disabled
		return false;
	};
}

/**
 * Returns a function to use in pseudos for positionals
 * @param {Function} fn
 */
function createPositionalPseudo( fn ) {
	return markFunction( function( argument ) {
		argument = +argument;
		return markFunction( function( seed, matches ) {
			var j,
				matchIndexes = fn( [], seed.length, argument ),
				i = matchIndexes.length;

			// Match elements found at the specified indexes
			while ( i-- ) {
				if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
					seed[ j ] = !( matches[ j ] = seed[ j ] );
				}
			}
		} );
	} );
}

/**
 * Checks a node for validity as a Sizzle context
 * @param {Element|Object=} context
 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
 */
function testContext( context ) {
	return context && typeof context.getElementsByTagName !== "undefined" && context;
}

// Expose support vars for convenience
support = Sizzle.support = {};

/**
 * Detects XML nodes
 * @param {Element|Object} elem An element or a document
 * @returns {Boolean} True iff elem is a non-HTML XML node
 */
isXML = Sizzle.isXML = function( elem ) {
	var namespace = elem.namespaceURI,
		docElem = ( elem.ownerDocument || elem ).documentElement;

	// Support: IE <=8
	// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
	// https://bugs.jquery.com/ticket/4833
	return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
};

/**
 * Sets document-related variables once based on the current document
 * @param {Element|Object} [doc] An element or document object to use to set the document
 * @returns {Object} Returns the current document
 */
setDocument = Sizzle.setDocument = function( node ) {
	var hasCompare, subWindow,
		doc = node ? node.ownerDocument || node : preferredDoc;

	// Return early if doc is invalid or already selected
	// Support: IE 11+, Edge 17 - 18+
	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {
		return document;
	}

	// Update global variables
	document = doc;
	docElem = document.documentElement;
	documentIsHTML = !isXML( document );

	// Support: IE 9 - 11+, Edge 12 - 18+
	// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
	// Support: IE 11+, Edge 17 - 18+
	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( preferredDoc != document &&
		( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {

		// Support: IE 11, Edge
		if ( subWindow.addEventListener ) {
			subWindow.addEventListener( "unload", unloadHandler, false );

		// Support: IE 9 - 10 only
		} else if ( subWindow.attachEvent ) {
			subWindow.attachEvent( "onunload", unloadHandler );
		}
	}

	// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,
	// Safari 4 - 5 only, Opera <=11.6 - 12.x only
	// IE/Edge & older browsers don't support the :scope pseudo-class.
	// Support: Safari 6.0 only
	// Safari 6.0 supports :scope but it's an alias of :root there.
	support.scope = assert( function( el ) {
		docElem.appendChild( el ).appendChild( document.createElement( "div" ) );
		return typeof el.querySelectorAll !== "undefined" &&
			!el.querySelectorAll( ":scope fieldset div" ).length;
	} );

	/* Attributes
	---------------------------------------------------------------------- */

	// Support: IE<8
	// Verify that getAttribute really returns attributes and not properties
	// (excepting IE8 booleans)
	support.attributes = assert( function( el ) {
		el.className = "i";
		return !el.getAttribute( "className" );
	} );

	/* getElement(s)By*
	---------------------------------------------------------------------- */

	// Check if getElementsByTagName("*") returns only elements
	support.getElementsByTagName = assert( function( el ) {
		el.appendChild( document.createComment( "" ) );
		return !el.getElementsByTagName( "*" ).length;
	} );

	// Support: IE<9
	support.getElementsByClassName = rnative.test( document.getElementsByClassName );

	// Support: IE<10
	// Check if getElementById returns elements by name
	// The broken getElementById methods don't pick up programmatically-set names,
	// so use a roundabout getElementsByName test
	support.getById = assert( function( el ) {
		docElem.appendChild( el ).id = expando;
		return !document.getElementsByName || !document.getElementsByName( expando ).length;
	} );

	// ID filter and find
	if ( support.getById ) {
		Expr.filter[ "ID" ] = function( id ) {
			var attrId = id.replace( runescape, funescape );
			return function( elem ) {
				return elem.getAttribute( "id" ) === attrId;
			};
		};
		Expr.find[ "ID" ] = function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var elem = context.getElementById( id );
				return elem ? [ elem ] : [];
			}
		};
	} else {
		Expr.filter[ "ID" ] =  function( id ) {
			var attrId = id.replace( runescape, funescape );
			return function( elem ) {
				var node = typeof elem.getAttributeNode !== "undefined" &&
					elem.getAttributeNode( "id" );
				return node && node.value === attrId;
			};
		};

		// Support: IE 6 - 7 only
		// getElementById is not reliable as a find shortcut
		Expr.find[ "ID" ] = function( id, context ) {
			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
				var node, i, elems,
					elem = context.getElementById( id );

				if ( elem ) {

					// Verify the id attribute
					node = elem.getAttributeNode( "id" );
					if ( node && node.value === id ) {
						return [ elem ];
					}

					// Fall back on getElementsByName
					elems = context.getElementsByName( id );
					i = 0;
					while ( ( elem = elems[ i++ ] ) ) {
						node = elem.getAttributeNode( "id" );
						if ( node && node.value === id ) {
							return [ elem ];
						}
					}
				}

				return [];
			}
		};
	}

	// Tag
	Expr.find[ "TAG" ] = support.getElementsByTagName ?
		function( tag, context ) {
			if ( typeof context.getElementsByTagName !== "undefined" ) {
				return context.getElementsByTagName( tag );

			// DocumentFragment nodes don't have gEBTN
			} else if ( support.qsa ) {
				return context.querySelectorAll( tag );
			}
		} :

		function( tag, context ) {
			var elem,
				tmp = [],
				i = 0,

				// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
				results = context.getElementsByTagName( tag );

			// Filter out possible comments
			if ( tag === "*" ) {
				while ( ( elem = results[ i++ ] ) ) {
					if ( elem.nodeType === 1 ) {
						tmp.push( elem );
					}
				}

				return tmp;
			}
			return results;
		};

	// Class
	Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) {
		if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
			return context.getElementsByClassName( className );
		}
	};

	/* QSA/matchesSelector
	---------------------------------------------------------------------- */

	// QSA and matchesSelector support

	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
	rbuggyMatches = [];

	// qSa(:focus) reports false when true (Chrome 21)
	// We allow this because of a bug in IE8/9 that throws an error
	// whenever `document.activeElement` is accessed on an iframe
	// So, we allow :focus to pass through QSA all the time to avoid the IE error
	// See https://bugs.jquery.com/ticket/13378
	rbuggyQSA = [];

	if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {

		// Build QSA regex
		// Regex strategy adopted from Diego Perini
		assert( function( el ) {

			var input;

			// Select is set to empty string on purpose
			// This is to test IE's treatment of not explicitly
			// setting a boolean content attribute,
			// since its presence should be enough
			// https://bugs.jquery.com/ticket/12359
			docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
				"<select id='" + expando + "-\r\\' msallowcapture=''>" +
				"<option selected=''></option></select>";

			// Support: IE8, Opera 11-12.16
			// Nothing should be selected when empty strings follow ^= or $= or *=
			// The test attribute must be unknown in Opera but "safe" for WinRT
			// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
			if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) {
				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
			}

			// Support: IE8
			// Boolean attributes and "value" are not treated correctly
			if ( !el.querySelectorAll( "[selected]" ).length ) {
				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
			}

			// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
			if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
				rbuggyQSA.push( "~=" );
			}

			// Support: IE 11+, Edge 15 - 18+
			// IE 11/Edge don't find elements on a `[name='']` query in some cases.
			// Adding a temporary attribute to the document before the selection works
			// around the issue.
			// Interestingly, IE 10 & older don't seem to have the issue.
			input = document.createElement( "input" );
			input.setAttribute( "name", "" );
			el.appendChild( input );
			if ( !el.querySelectorAll( "[name='']" ).length ) {
				rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
					whitespace + "*(?:''|\"\")" );
			}

			// Webkit/Opera - :checked should return selected option elements
			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
			// IE8 throws error here and will not see later tests
			if ( !el.querySelectorAll( ":checked" ).length ) {
				rbuggyQSA.push( ":checked" );
			}

			// Support: Safari 8+, iOS 8+
			// https://bugs.webkit.org/show_bug.cgi?id=136851
			// In-page `selector#id sibling-combinator selector` fails
			if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
				rbuggyQSA.push( ".#.+[+~]" );
			}

			// Support: Firefox <=3.6 - 5 only
			// Old Firefox doesn't throw on a badly-escaped identifier.
			el.querySelectorAll( "\\\f" );
			rbuggyQSA.push( "[\\r\\n\\f]" );
		} );

		assert( function( el ) {
			el.innerHTML = "<a href='' disabled='disabled'></a>" +
				"<select disabled='disabled'><option/></select>";

			// Support: Windows 8 Native Apps
			// The type and name attributes are restricted during .innerHTML assignment
			var input = document.createElement( "input" );
			input.setAttribute( "type", "hidden" );
			el.appendChild( input ).setAttribute( "name", "D" );

			// Support: IE8
			// Enforce case-sensitivity of name attribute
			if ( el.querySelectorAll( "[name=d]" ).length ) {
				rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
			}

			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
			// IE8 throws error here and will not see later tests
			if ( el.querySelectorAll( ":enabled" ).length !== 2 ) {
				rbuggyQSA.push( ":enabled", ":disabled" );
			}

			// Support: IE9-11+
			// IE's :disabled selector does not pick up the children of disabled fieldsets
			docElem.appendChild( el ).disabled = true;
			if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
				rbuggyQSA.push( ":enabled", ":disabled" );
			}

			// Support: Opera 10 - 11 only
			// Opera 10-11 does not throw on post-comma invalid pseudos
			el.querySelectorAll( "*,:x" );
			rbuggyQSA.push( ",.*:" );
		} );
	}

	if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||
		docElem.webkitMatchesSelector ||
		docElem.mozMatchesSelector ||
		docElem.oMatchesSelector ||
		docElem.msMatchesSelector ) ) ) ) {

		assert( function( el ) {

			// Check to see if it's possible to do matchesSelector
			// on a disconnected node (IE 9)
			support.disconnectedMatch = matches.call( el, "*" );

			// This should fail with an exception
			// Gecko does not error, returns false instead
			matches.call( el, "[s!='']:x" );
			rbuggyMatches.push( "!=", pseudos );
		} );
	}

	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );

	/* Contains
	---------------------------------------------------------------------- */
	hasCompare = rnative.test( docElem.compareDocumentPosition );

	// Element contains another
	// Purposefully self-exclusive
	// As in, an element does not contain itself
	contains = hasCompare || rnative.test( docElem.contains ) ?
		function( a, b ) {
			var adown = a.nodeType === 9 ? a.documentElement : a,
				bup = b && b.parentNode;
			return a === bup || !!( bup && bup.nodeType === 1 && (
				adown.contains ?
					adown.contains( bup ) :
					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
			) );
		} :
		function( a, b ) {
			if ( b ) {
				while ( ( b = b.parentNode ) ) {
					if ( b === a ) {
						return true;
					}
				}
			}
			return false;
		};

	/* Sorting
	---------------------------------------------------------------------- */

	// Document order sorting
	sortOrder = hasCompare ?
	function( a, b ) {

		// Flag for duplicate removal
		if ( a === b ) {
			hasDuplicate = true;
			return 0;
		}

		// Sort on method existence if only one input has compareDocumentPosition
		var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
		if ( compare ) {
			return compare;
		}

		// Calculate position if both inputs belong to the same document
		// Support: IE 11+, Edge 17 - 18+
		// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
		// two documents; shallow comparisons work.
		// eslint-disable-next-line eqeqeq
		compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
			a.compareDocumentPosition( b ) :

			// Otherwise we know they are disconnected
			1;

		// Disconnected nodes
		if ( compare & 1 ||
			( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {

			// Choose the first element that is related to our preferred document
			// Support: IE 11+, Edge 17 - 18+
			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			// eslint-disable-next-line eqeqeq
			if ( a == document || a.ownerDocument == preferredDoc &&
				contains( preferredDoc, a ) ) {
				return -1;
			}

			// Support: IE 11+, Edge 17 - 18+
			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			// eslint-disable-next-line eqeqeq
			if ( b == document || b.ownerDocument == preferredDoc &&
				contains( preferredDoc, b ) ) {
				return 1;
			}

			// Maintain original order
			return sortInput ?
				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
				0;
		}

		return compare & 4 ? -1 : 1;
	} :
	function( a, b ) {

		// Exit early if the nodes are identical
		if ( a === b ) {
			hasDuplicate = true;
			return 0;
		}

		var cur,
			i = 0,
			aup = a.parentNode,
			bup = b.parentNode,
			ap = [ a ],
			bp = [ b ];

		// Parentless nodes are either documents or disconnected
		if ( !aup || !bup ) {

			// Support: IE 11+, Edge 17 - 18+
			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			/* eslint-disable eqeqeq */
			return a == document ? -1 :
				b == document ? 1 :
				/* eslint-enable eqeqeq */
				aup ? -1 :
				bup ? 1 :
				sortInput ?
				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
				0;

		// If the nodes are siblings, we can do a quick check
		} else if ( aup === bup ) {
			return siblingCheck( a, b );
		}

		// Otherwise we need full lists of their ancestors for comparison
		cur = a;
		while ( ( cur = cur.parentNode ) ) {
			ap.unshift( cur );
		}
		cur = b;
		while ( ( cur = cur.parentNode ) ) {
			bp.unshift( cur );
		}

		// Walk down the tree looking for a discrepancy
		while ( ap[ i ] === bp[ i ] ) {
			i++;
		}

		return i ?

			// Do a sibling check if the nodes have a common ancestor
			siblingCheck( ap[ i ], bp[ i ] ) :

			// Otherwise nodes in our document sort first
			// Support: IE 11+, Edge 17 - 18+
			// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
			// two documents; shallow comparisons work.
			/* eslint-disable eqeqeq */
			ap[ i ] == preferredDoc ? -1 :
			bp[ i ] == preferredDoc ? 1 :
			/* eslint-enable eqeqeq */
			0;
	};

	return document;
};

Sizzle.matches = function( expr, elements ) {
	return Sizzle( expr, null, null, elements );
};

Sizzle.matchesSelector = function( elem, expr ) {
	setDocument( elem );

	if ( support.matchesSelector && documentIsHTML &&
		!nonnativeSelectorCache[ expr + " " ] &&
		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {

		try {
			var ret = matches.call( elem, expr );

			// IE 9's matchesSelector returns false on disconnected nodes
			if ( ret || support.disconnectedMatch ||

				// As well, disconnected nodes are said to be in a document
				// fragment in IE 9
				elem.document && elem.document.nodeType !== 11 ) {
				return ret;
			}
		} catch ( e ) {
			nonnativeSelectorCache( expr, true );
		}
	}

	return Sizzle( expr, document, null, [ elem ] ).length > 0;
};

Sizzle.contains = function( context, elem ) {

	// Set document vars if needed
	// Support: IE 11+, Edge 17 - 18+
	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( ( context.ownerDocument || context ) != document ) {
		setDocument( context );
	}
	return contains( context, elem );
};

Sizzle.attr = function( elem, name ) {

	// Set document vars if needed
	// Support: IE 11+, Edge 17 - 18+
	// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
	// two documents; shallow comparisons work.
	// eslint-disable-next-line eqeqeq
	if ( ( elem.ownerDocument || elem ) != document ) {
		setDocument( elem );
	}

	var fn = Expr.attrHandle[ name.toLowerCase() ],

		// Don't get fooled by Object.prototype properties (jQuery #13807)
		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
			fn( elem, name, !documentIsHTML ) :
			undefined;

	return val !== undefined ?
		val :
		support.attributes || !documentIsHTML ?
			elem.getAttribute( name ) :
			( val = elem.getAttributeNode( name ) ) && val.specified ?
				val.value :
				null;
};

Sizzle.escape = function( sel ) {
	return ( sel + "" ).replace( rcssescape, fcssescape );
};

Sizzle.error = function( msg ) {
	throw new Error( "Syntax error, unrecognized expression: " + msg );
};

/**
 * Document sorting and removing duplicates
 * @param {ArrayLike} results
 */
Sizzle.uniqueSort = function( results ) {
	var elem,
		duplicates = [],
		j = 0,
		i = 0;

	// Unless we *know* we can detect duplicates, assume their presence
	hasDuplicate = !support.detectDuplicates;
	sortInput = !support.sortStable && results.slice( 0 );
	results.sort( sortOrder );

	if ( hasDuplicate ) {
		while ( ( elem = results[ i++ ] ) ) {
			if ( elem === results[ i ] ) {
				j = duplicates.push( i );
			}
		}
		while ( j-- ) {
			results.splice( duplicates[ j ], 1 );
		}
	}

	// Clear input after sorting to release objects
	// See https://github.com/jquery/sizzle/pull/225
	sortInput = null;

	return results;
};

/**
 * Utility function for retrieving the text value of an array of DOM nodes
 * @param {Array|Element} elem
 */
getText = Sizzle.getText = function( elem ) {
	var node,
		ret = "",
		i = 0,
		nodeType = elem.nodeType;

	if ( !nodeType ) {

		// If no nodeType, this is expected to be an array
		while ( ( node = elem[ i++ ] ) ) {

			// Do not traverse comment nodes
			ret += getText( node );
		}
	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {

		// Use textContent for elements
		// innerText usage removed for consistency of new lines (jQuery #11153)
		if ( typeof elem.textContent === "string" ) {
			return elem.textContent;
		} else {

			// Traverse its children
			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
				ret += getText( elem );
			}
		}
	} else if ( nodeType === 3 || nodeType === 4 ) {
		return elem.nodeValue;
	}

	// Do not include comment or processing instruction nodes

	return ret;
};

Expr = Sizzle.selectors = {

	// Can be adjusted by the user
	cacheLength: 50,

	createPseudo: markFunction,

	match: matchExpr,

	attrHandle: {},

	find: {},

	relative: {
		">": { dir: "parentNode", first: true },
		" ": { dir: "parentNode" },
		"+": { dir: "previousSibling", first: true },
		"~": { dir: "previousSibling" }
	},

	preFilter: {
		"ATTR": function( match ) {
			match[ 1 ] = match[ 1 ].replace( runescape, funescape );

			// Move the given value to match[3] whether quoted or unquoted
			match[ 3 ] = ( match[ 3 ] || match[ 4 ] ||
				match[ 5 ] || "" ).replace( runescape, funescape );

			if ( match[ 2 ] === "~=" ) {
				match[ 3 ] = " " + match[ 3 ] + " ";
			}

			return match.slice( 0, 4 );
		},

		"CHILD": function( match ) {

			/* matches from matchExpr["CHILD"]
				1 type (only|nth|...)
				2 what (child|of-type)
				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
				4 xn-component of xn+y argument ([+-]?\d*n|)
				5 sign of xn-component
				6 x of xn-component
				7 sign of y-component
				8 y of y-component
			*/
			match[ 1 ] = match[ 1 ].toLowerCase();

			if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {

				// nth-* requires argument
				if ( !match[ 3 ] ) {
					Sizzle.error( match[ 0 ] );
				}

				// numeric x and y parameters for Expr.filter.CHILD
				// remember that false/true cast respectively to 0/1
				match[ 4 ] = +( match[ 4 ] ?
					match[ 5 ] + ( match[ 6 ] || 1 ) :
					2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) );
				match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );

				// other types prohibit arguments
			} else if ( match[ 3 ] ) {
				Sizzle.error( match[ 0 ] );
			}

			return match;
		},

		"PSEUDO": function( match ) {
			var excess,
				unquoted = !match[ 6 ] && match[ 2 ];

			if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) {
				return null;
			}

			// Accept quoted arguments as-is
			if ( match[ 3 ] ) {
				match[ 2 ] = match[ 4 ] || match[ 5 ] || "";

			// Strip excess characters from unquoted arguments
			} else if ( unquoted && rpseudo.test( unquoted ) &&

				// Get excess from tokenize (recursively)
				( excess = tokenize( unquoted, true ) ) &&

				// advance to the next closing parenthesis
				( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) {

				// excess is a negative index
				match[ 0 ] = match[ 0 ].slice( 0, excess );
				match[ 2 ] = unquoted.slice( 0, excess );
			}

			// Return only captures needed by the pseudo filter method (type and argument)
			return match.slice( 0, 3 );
		}
	},

	filter: {

		"TAG": function( nodeNameSelector ) {
			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
			return nodeNameSelector === "*" ?
				function() {
					return true;
				} :
				function( elem ) {
					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
				};
		},

		"CLASS": function( className ) {
			var pattern = classCache[ className + " " ];

			return pattern ||
				( pattern = new RegExp( "(^|" + whitespace +
					")" + className + "(" + whitespace + "|$)" ) ) && classCache(
						className, function( elem ) {
							return pattern.test(
								typeof elem.className === "string" && elem.className ||
								typeof elem.getAttribute !== "undefined" &&
									elem.getAttribute( "class" ) ||
								""
							);
				} );
		},

		"ATTR": function( name, operator, check ) {
			return function( elem ) {
				var result = Sizzle.attr( elem, name );

				if ( result == null ) {
					return operator === "!=";
				}
				if ( !operator ) {
					return true;
				}

				result += "";

				/* eslint-disable max-len */

				return operator === "=" ? result === check :
					operator === "!=" ? result !== check :
					operator === "^=" ? check && result.indexOf( check ) === 0 :
					operator === "*=" ? check && result.indexOf( check ) > -1 :
					operator === "$=" ? check && result.slice( -check.length ) === check :
					operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
					false;
				/* eslint-enable max-len */

			};
		},

		"CHILD": function( type, what, _argument, first, last ) {
			var simple = type.slice( 0, 3 ) !== "nth",
				forward = type.slice( -4 ) !== "last",
				ofType = what === "of-type";

			return first === 1 && last === 0 ?

				// Shortcut for :nth-*(n)
				function( elem ) {
					return !!elem.parentNode;
				} :

				function( elem, _context, xml ) {
					var cache, uniqueCache, outerCache, node, nodeIndex, start,
						dir = simple !== forward ? "nextSibling" : "previousSibling",
						parent = elem.parentNode,
						name = ofType && elem.nodeName.toLowerCase(),
						useCache = !xml && !ofType,
						diff = false;

					if ( parent ) {

						// :(first|last|only)-(child|of-type)
						if ( simple ) {
							while ( dir ) {
								node = elem;
								while ( ( node = node[ dir ] ) ) {
									if ( ofType ?
										node.nodeName.toLowerCase() === name :
										node.nodeType === 1 ) {

										return false;
									}
								}

								// Reverse direction for :only-* (if we haven't yet done so)
								start = dir = type === "only" && !start && "nextSibling";
							}
							return true;
						}

						start = [ forward ? parent.firstChild : parent.lastChild ];

						// non-xml :nth-child(...) stores cache data on `parent`
						if ( forward && useCache ) {

							// Seek `elem` from a previously-cached index

							// ...in a gzip-friendly way
							node = parent;
							outerCache = node[ expando ] || ( node[ expando ] = {} );

							// Support: IE <9 only
							// Defend against cloned attroperties (jQuery gh-1709)
							uniqueCache = outerCache[ node.uniqueID ] ||
								( outerCache[ node.uniqueID ] = {} );

							cache = uniqueCache[ type ] || [];
							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
							diff = nodeIndex && cache[ 2 ];
							node = nodeIndex && parent.childNodes[ nodeIndex ];

							while ( ( node = ++nodeIndex && node && node[ dir ] ||

								// Fallback to seeking `elem` from the start
								( diff = nodeIndex = 0 ) || start.pop() ) ) {

								// When found, cache indexes on `parent` and break
								if ( node.nodeType === 1 && ++diff && node === elem ) {
									uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
									break;
								}
							}

						} else {

							// Use previously-cached element index if available
							if ( useCache ) {

								// ...in a gzip-friendly way
								node = elem;
								outerCache = node[ expando ] || ( node[ expando ] = {} );

								// Support: IE <9 only
								// Defend against cloned attroperties (jQuery gh-1709)
								uniqueCache = outerCache[ node.uniqueID ] ||
									( outerCache[ node.uniqueID ] = {} );

								cache = uniqueCache[ type ] || [];
								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
								diff = nodeIndex;
							}

							// xml :nth-child(...)
							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
							if ( diff === false ) {

								// Use the same loop as above to seek `elem` from the start
								while ( ( node = ++nodeIndex && node && node[ dir ] ||
									( diff = nodeIndex = 0 ) || start.pop() ) ) {

									if ( ( ofType ?
										node.nodeName.toLowerCase() === name :
										node.nodeType === 1 ) &&
										++diff ) {

										// Cache the index of each encountered element
										if ( useCache ) {
											outerCache = node[ expando ] ||
												( node[ expando ] = {} );

											// Support: IE <9 only
											// Defend against cloned attroperties (jQuery gh-1709)
											uniqueCache = outerCache[ node.uniqueID ] ||
												( outerCache[ node.uniqueID ] = {} );

											uniqueCache[ type ] = [ dirruns, diff ];
										}

										if ( node === elem ) {
											break;
										}
									}
								}
							}
						}

						// Incorporate the offset, then check against cycle size
						diff -= last;
						return diff === first || ( diff % first === 0 && diff / first >= 0 );
					}
				};
		},

		"PSEUDO": function( pseudo, argument ) {

			// pseudo-class names are case-insensitive
			// http://www.w3.org/TR/selectors/#pseudo-classes
			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
			// Remember that setFilters inherits from pseudos
			var args,
				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
					Sizzle.error( "unsupported pseudo: " + pseudo );

			// The user may use createPseudo to indicate that
			// arguments are needed to create the filter function
			// just as Sizzle does
			if ( fn[ expando ] ) {
				return fn( argument );
			}

			// But maintain support for old signatures
			if ( fn.length > 1 ) {
				args = [ pseudo, pseudo, "", argument ];
				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
					markFunction( function( seed, matches ) {
						var idx,
							matched = fn( seed, argument ),
							i = matched.length;
						while ( i-- ) {
							idx = indexOf( seed, matched[ i ] );
							seed[ idx ] = !( matches[ idx ] = matched[ i ] );
						}
					} ) :
					function( elem ) {
						return fn( elem, 0, args );
					};
			}

			return fn;
		}
	},

	pseudos: {

		// Potentially complex pseudos
		"not": markFunction( function( selector ) {

			// Trim the selector passed to compile
			// to avoid treating leading and trailing
			// spaces as combinators
			var input = [],
				results = [],
				matcher = compile( selector.replace( rtrim, "$1" ) );

			return matcher[ expando ] ?
				markFunction( function( seed, matches, _context, xml ) {
					var elem,
						unmatched = matcher( seed, null, xml, [] ),
						i = seed.length;

					// Match elements unmatched by `matcher`
					while ( i-- ) {
						if ( ( elem = unmatched[ i ] ) ) {
							seed[ i ] = !( matches[ i ] = elem );
						}
					}
				} ) :
				function( elem, _context, xml ) {
					input[ 0 ] = elem;
					matcher( input, null, xml, results );

					// Don't keep the element (issue #299)
					input[ 0 ] = null;
					return !results.pop();
				};
		} ),

		"has": markFunction( function( selector ) {
			return function( elem ) {
				return Sizzle( selector, elem ).length > 0;
			};
		} ),

		"contains": markFunction( function( text ) {
			text = text.replace( runescape, funescape );
			return function( elem ) {
				return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;
			};
		} ),

		// "Whether an element is represented by a :lang() selector
		// is based solely on the element's language value
		// being equal to the identifier C,
		// or beginning with the identifier C immediately followed by "-".
		// The matching of C against the element's language value is performed case-insensitively.
		// The identifier C does not have to be a valid language name."
		// http://www.w3.org/TR/selectors/#lang-pseudo
		"lang": markFunction( function( lang ) {

			// lang value must be a valid identifier
			if ( !ridentifier.test( lang || "" ) ) {
				Sizzle.error( "unsupported lang: " + lang );
			}
			lang = lang.replace( runescape, funescape ).toLowerCase();
			return function( elem ) {
				var elemLang;
				do {
					if ( ( elemLang = documentIsHTML ?
						elem.lang :
						elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {

						elemLang = elemLang.toLowerCase();
						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
					}
				} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
				return false;
			};
		} ),

		// Miscellaneous
		"target": function( elem ) {
			var hash = window.location && window.location.hash;
			return hash && hash.slice( 1 ) === elem.id;
		},

		"root": function( elem ) {
			return elem === docElem;
		},

		"focus": function( elem ) {
			return elem === document.activeElement &&
				( !document.hasFocus || document.hasFocus() ) &&
				!!( elem.type || elem.href || ~elem.tabIndex );
		},

		// Boolean properties
		"enabled": createDisabledPseudo( false ),
		"disabled": createDisabledPseudo( true ),

		"checked": function( elem ) {

			// In CSS3, :checked should return both checked and selected elements
			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
			var nodeName = elem.nodeName.toLowerCase();
			return ( nodeName === "input" && !!elem.checked ) ||
				( nodeName === "option" && !!elem.selected );
		},

		"selected": function( elem ) {

			// Accessing this property makes selected-by-default
			// options in Safari work properly
			if ( elem.parentNode ) {
				// eslint-disable-next-line no-unused-expressions
				elem.parentNode.selectedIndex;
			}

			return elem.selected === true;
		},

		// Contents
		"empty": function( elem ) {

			// http://www.w3.org/TR/selectors/#empty-pseudo
			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
			//   but not by others (comment: 8; processing instruction: 7; etc.)
			// nodeType < 6 works because attributes (2) do not appear as children
			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
				if ( elem.nodeType < 6 ) {
					return false;
				}
			}
			return true;
		},

		"parent": function( elem ) {
			return !Expr.pseudos[ "empty" ]( elem );
		},

		// Element/input types
		"header": function( elem ) {
			return rheader.test( elem.nodeName );
		},

		"input": function( elem ) {
			return rinputs.test( elem.nodeName );
		},

		"button": function( elem ) {
			var name = elem.nodeName.toLowerCase();
			return name === "input" && elem.type === "button" || name === "button";
		},

		"text": function( elem ) {
			var attr;
			return elem.nodeName.toLowerCase() === "input" &&
				elem.type === "text" &&

				// Support: IE<8
				// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
				( ( attr = elem.getAttribute( "type" ) ) == null ||
					attr.toLowerCase() === "text" );
		},

		// Position-in-collection
		"first": createPositionalPseudo( function() {
			return [ 0 ];
		} ),

		"last": createPositionalPseudo( function( _matchIndexes, length ) {
			return [ length - 1 ];
		} ),

		"eq": createPositionalPseudo( function( _matchIndexes, length, argument ) {
			return [ argument < 0 ? argument + length : argument ];
		} ),

		"even": createPositionalPseudo( function( matchIndexes, length ) {
			var i = 0;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		"odd": createPositionalPseudo( function( matchIndexes, length ) {
			var i = 1;
			for ( ; i < length; i += 2 ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		"lt": createPositionalPseudo( function( matchIndexes, length, argument ) {
			var i = argument < 0 ?
				argument + length :
				argument > length ?
					length :
					argument;
			for ( ; --i >= 0; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} ),

		"gt": createPositionalPseudo( function( matchIndexes, length, argument ) {
			var i = argument < 0 ? argument + length : argument;
			for ( ; ++i < length; ) {
				matchIndexes.push( i );
			}
			return matchIndexes;
		} )
	}
};

Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ];

// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
	Expr.pseudos[ i ] = createInputPseudo( i );
}
for ( i in { submit: true, reset: true } ) {
	Expr.pseudos[ i ] = createButtonPseudo( i );
}

// Easy API for creating new setFilters
function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();

tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
	var matched, match, tokens, type,
		soFar, groups, preFilters,
		cached = tokenCache[ selector + " " ];

	if ( cached ) {
		return parseOnly ? 0 : cached.slice( 0 );
	}

	soFar = selector;
	groups = [];
	preFilters = Expr.preFilter;

	while ( soFar ) {

		// Comma and first run
		if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
			if ( match ) {

				// Don't consume trailing commas as valid
				soFar = soFar.slice( match[ 0 ].length ) || soFar;
			}
			groups.push( ( tokens = [] ) );
		}

		matched = false;

		// Combinators
		if ( ( match = rcombinators.exec( soFar ) ) ) {
			matched = match.shift();
			tokens.push( {
				value: matched,

				// Cast descendant combinators to space
				type: match[ 0 ].replace( rtrim, " " )
			} );
			soFar = soFar.slice( matched.length );
		}

		// Filters
		for ( type in Expr.filter ) {
			if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
				( match = preFilters[ type ]( match ) ) ) ) {
				matched = match.shift();
				tokens.push( {
					value: matched,
					type: type,
					matches: match
				} );
				soFar = soFar.slice( matched.length );
			}
		}

		if ( !matched ) {
			break;
		}
	}

	// Return the length of the invalid excess
	// if we're just parsing
	// Otherwise, throw an error or return tokens
	return parseOnly ?
		soFar.length :
		soFar ?
			Sizzle.error( selector ) :

			// Cache the tokens
			tokenCache( selector, groups ).slice( 0 );
};

function toSelector( tokens ) {
	var i = 0,
		len = tokens.length,
		selector = "";
	for ( ; i < len; i++ ) {
		selector += tokens[ i ].value;
	}
	return selector;
}

function addCombinator( matcher, combinator, base ) {
	var dir = combinator.dir,
		skip = combinator.next,
		key = skip || dir,
		checkNonElements = base && key === "parentNode",
		doneName = done++;

	return combinator.first ?

		// Check against closest ancestor/preceding element
		function( elem, context, xml ) {
			while ( ( elem = elem[ dir ] ) ) {
				if ( elem.nodeType === 1 || checkNonElements ) {
					return matcher( elem, context, xml );
				}
			}
			return false;
		} :

		// Check against all ancestor/preceding elements
		function( elem, context, xml ) {
			var oldCache, uniqueCache, outerCache,
				newCache = [ dirruns, doneName ];

			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
			if ( xml ) {
				while ( ( elem = elem[ dir ] ) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						if ( matcher( elem, context, xml ) ) {
							return true;
						}
					}
				}
			} else {
				while ( ( elem = elem[ dir ] ) ) {
					if ( elem.nodeType === 1 || checkNonElements ) {
						outerCache = elem[ expando ] || ( elem[ expando ] = {} );

						// Support: IE <9 only
						// Defend against cloned attroperties (jQuery gh-1709)
						uniqueCache = outerCache[ elem.uniqueID ] ||
							( outerCache[ elem.uniqueID ] = {} );

						if ( skip && skip === elem.nodeName.toLowerCase() ) {
							elem = elem[ dir ] || elem;
						} else if ( ( oldCache = uniqueCache[ key ] ) &&
							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {

							// Assign to newCache so results back-propagate to previous elements
							return ( newCache[ 2 ] = oldCache[ 2 ] );
						} else {

							// Reuse newcache so results back-propagate to previous elements
							uniqueCache[ key ] = newCache;

							// A match means we're done; a fail means we have to keep checking
							if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
								return true;
							}
						}
					}
				}
			}
			return false;
		};
}

function elementMatcher( matchers ) {
	return matchers.length > 1 ?
		function( elem, context, xml ) {
			var i = matchers.length;
			while ( i-- ) {
				if ( !matchers[ i ]( elem, context, xml ) ) {
					return false;
				}
			}
			return true;
		} :
		matchers[ 0 ];
}

function multipleContexts( selector, contexts, results ) {
	var i = 0,
		len = contexts.length;
	for ( ; i < len; i++ ) {
		Sizzle( selector, contexts[ i ], results );
	}
	return results;
}

function condense( unmatched, map, filter, context, xml ) {
	var elem,
		newUnmatched = [],
		i = 0,
		len = unmatched.length,
		mapped = map != null;

	for ( ; i < len; i++ ) {
		if ( ( elem = unmatched[ i ] ) ) {
			if ( !filter || filter( elem, context, xml ) ) {
				newUnmatched.push( elem );
				if ( mapped ) {
					map.push( i );
				}
			}
		}
	}

	return newUnmatched;
}

function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
	if ( postFilter && !postFilter[ expando ] ) {
		postFilter = setMatcher( postFilter );
	}
	if ( postFinder && !postFinder[ expando ] ) {
		postFinder = setMatcher( postFinder, postSelector );
	}
	return markFunction( function( seed, results, context, xml ) {
		var temp, i, elem,
			preMap = [],
			postMap = [],
			preexisting = results.length,

			// Get initial elements from seed or context
			elems = seed || multipleContexts(
				selector || "*",
				context.nodeType ? [ context ] : context,
				[]
			),

			// Prefilter to get matcher input, preserving a map for seed-results synchronization
			matcherIn = preFilter && ( seed || !selector ) ?
				condense( elems, preMap, preFilter, context, xml ) :
				elems,

			matcherOut = matcher ?

				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?

					// ...intermediate processing is necessary
					[] :

					// ...otherwise use results directly
					results :
				matcherIn;

		// Find primary matches
		if ( matcher ) {
			matcher( matcherIn, matcherOut, context, xml );
		}

		// Apply postFilter
		if ( postFilter ) {
			temp = condense( matcherOut, postMap );
			postFilter( temp, [], context, xml );

			// Un-match failing elements by moving them back to matcherIn
			i = temp.length;
			while ( i-- ) {
				if ( ( elem = temp[ i ] ) ) {
					matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
				}
			}
		}

		if ( seed ) {
			if ( postFinder || preFilter ) {
				if ( postFinder ) {

					// Get the final matcherOut by condensing this intermediate into postFinder contexts
					temp = [];
					i = matcherOut.length;
					while ( i-- ) {
						if ( ( elem = matcherOut[ i ] ) ) {

							// Restore matcherIn since elem is not yet a final match
							temp.push( ( matcherIn[ i ] = elem ) );
						}
					}
					postFinder( null, ( matcherOut = [] ), temp, xml );
				}

				// Move matched elements from seed to results to keep them synchronized
				i = matcherOut.length;
				while ( i-- ) {
					if ( ( elem = matcherOut[ i ] ) &&
						( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {

						seed[ temp ] = !( results[ temp ] = elem );
					}
				}
			}

		// Add elements to results, through postFinder if defined
		} else {
			matcherOut = condense(
				matcherOut === results ?
					matcherOut.splice( preexisting, matcherOut.length ) :
					matcherOut
			);
			if ( postFinder ) {
				postFinder( null, results, matcherOut, xml );
			} else {
				push.apply( results, matcherOut );
			}
		}
	} );
}

function matcherFromTokens( tokens ) {
	var checkContext, matcher, j,
		len = tokens.length,
		leadingRelative = Expr.relative[ tokens[ 0 ].type ],
		implicitRelative = leadingRelative || Expr.relative[ " " ],
		i = leadingRelative ? 1 : 0,

		// The foundational matcher ensures that elements are reachable from top-level context(s)
		matchContext = addCombinator( function( elem ) {
			return elem === checkContext;
		}, implicitRelative, true ),
		matchAnyContext = addCombinator( function( elem ) {
			return indexOf( checkContext, elem ) > -1;
		}, implicitRelative, true ),
		matchers = [ function( elem, context, xml ) {
			var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
				( checkContext = context ).nodeType ?
					matchContext( elem, context, xml ) :
					matchAnyContext( elem, context, xml ) );

			// Avoid hanging onto element (issue #299)
			checkContext = null;
			return ret;
		} ];

	for ( ; i < len; i++ ) {
		if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {
			matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
		} else {
			matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );

			// Return special upon seeing a positional matcher
			if ( matcher[ expando ] ) {

				// Find the next relative operator (if any) for proper handling
				j = ++i;
				for ( ; j < len; j++ ) {
					if ( Expr.relative[ tokens[ j ].type ] ) {
						break;
					}
				}
				return setMatcher(
					i > 1 && elementMatcher( matchers ),
					i > 1 && toSelector(

					// If the preceding token was a descendant combinator, insert an implicit any-element `*`
					tokens
						.slice( 0, i - 1 )
						.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
					).replace( rtrim, "$1" ),
					matcher,
					i < j && matcherFromTokens( tokens.slice( i, j ) ),
					j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
					j < len && toSelector( tokens )
				);
			}
			matchers.push( matcher );
		}
	}

	return elementMatcher( matchers );
}

function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
	var bySet = setMatchers.length > 0,
		byElement = elementMatchers.length > 0,
		superMatcher = function( seed, context, xml, results, outermost ) {
			var elem, j, matcher,
				matchedCount = 0,
				i = "0",
				unmatched = seed && [],
				setMatched = [],
				contextBackup = outermostContext,

				// We must always have either seed elements or outermost context
				elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ),

				// Use integer dirruns iff this is the outermost matcher
				dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
				len = elems.length;

			if ( outermost ) {

				// Support: IE 11+, Edge 17 - 18+
				// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
				// two documents; shallow comparisons work.
				// eslint-disable-next-line eqeqeq
				outermostContext = context == document || context || outermost;
			}

			// Add elements passing elementMatchers directly to results
			// Support: IE<9, Safari
			// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
			for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
				if ( byElement && elem ) {
					j = 0;

					// Support: IE 11+, Edge 17 - 18+
					// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
					// two documents; shallow comparisons work.
					// eslint-disable-next-line eqeqeq
					if ( !context && elem.ownerDocument != document ) {
						setDocument( elem );
						xml = !documentIsHTML;
					}
					while ( ( matcher = elementMatchers[ j++ ] ) ) {
						if ( matcher( elem, context || document, xml ) ) {
							results.push( elem );
							break;
						}
					}
					if ( outermost ) {
						dirruns = dirrunsUnique;
					}
				}

				// Track unmatched elements for set filters
				if ( bySet ) {

					// They will have gone through all possible matchers
					if ( ( elem = !matcher && elem ) ) {
						matchedCount--;
					}

					// Lengthen the array for every element, matched or not
					if ( seed ) {
						unmatched.push( elem );
					}
				}
			}

			// `i` is now the count of elements visited above, and adding it to `matchedCount`
			// makes the latter nonnegative.
			matchedCount += i;

			// Apply set filters to unmatched elements
			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
			// no element matchers and no seed.
			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
			// numerically zero.
			if ( bySet && i !== matchedCount ) {
				j = 0;
				while ( ( matcher = setMatchers[ j++ ] ) ) {
					matcher( unmatched, setMatched, context, xml );
				}

				if ( seed ) {

					// Reintegrate element matches to eliminate the need for sorting
					if ( matchedCount > 0 ) {
						while ( i-- ) {
							if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
								setMatched[ i ] = pop.call( results );
							}
						}
					}

					// Discard index placeholder values to get only actual matches
					setMatched = condense( setMatched );
				}

				// Add matches to results
				push.apply( results, setMatched );

				// Seedless set matches succeeding multiple successful matchers stipulate sorting
				if ( outermost && !seed && setMatched.length > 0 &&
					( matchedCount + setMatchers.length ) > 1 ) {

					Sizzle.uniqueSort( results );
				}
			}

			// Override manipulation of globals by nested matchers
			if ( outermost ) {
				dirruns = dirrunsUnique;
				outermostContext = contextBackup;
			}

			return unmatched;
		};

	return bySet ?
		markFunction( superMatcher ) :
		superMatcher;
}

compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
	var i,
		setMatchers = [],
		elementMatchers = [],
		cached = compilerCache[ selector + " " ];

	if ( !cached ) {

		// Generate a function of recursive functions that can be used to check each element
		if ( !match ) {
			match = tokenize( selector );
		}
		i = match.length;
		while ( i-- ) {
			cached = matcherFromTokens( match[ i ] );
			if ( cached[ expando ] ) {
				setMatchers.push( cached );
			} else {
				elementMatchers.push( cached );
			}
		}

		// Cache the compiled function
		cached = compilerCache(
			selector,
			matcherFromGroupMatchers( elementMatchers, setMatchers )
		);

		// Save selector and tokenization
		cached.selector = selector;
	}
	return cached;
};

/**
 * A low-level selection function that works with Sizzle's compiled
 *  selector functions
 * @param {String|Function} selector A selector or a pre-compiled
 *  selector function built with Sizzle.compile
 * @param {Element} context
 * @param {Array} [results]
 * @param {Array} [seed] A set of elements to match against
 */
select = Sizzle.select = function( selector, context, results, seed ) {
	var i, tokens, token, type, find,
		compiled = typeof selector === "function" && selector,
		match = !seed && tokenize( ( selector = compiled.selector || selector ) );

	results = results || [];

	// Try to minimize operations if there is only one selector in the list and no seed
	// (the latter of which guarantees us context)
	if ( match.length === 1 ) {

		// Reduce context if the leading compound selector is an ID
		tokens = match[ 0 ] = match[ 0 ].slice( 0 );
		if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
			context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {

			context = ( Expr.find[ "ID" ]( token.matches[ 0 ]
				.replace( runescape, funescape ), context ) || [] )[ 0 ];
			if ( !context ) {
				return results;

			// Precompiled matchers will still verify ancestry, so step up a level
			} else if ( compiled ) {
				context = context.parentNode;
			}

			selector = selector.slice( tokens.shift().value.length );
		}

		// Fetch a seed set for right-to-left matching
		i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length;
		while ( i-- ) {
			token = tokens[ i ];

			// Abort if we hit a combinator
			if ( Expr.relative[ ( type = token.type ) ] ) {
				break;
			}
			if ( ( find = Expr.find[ type ] ) ) {

				// Search, expanding context for leading sibling combinators
				if ( ( seed = find(
					token.matches[ 0 ].replace( runescape, funescape ),
					rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||
						context
				) ) ) {

					// If seed is empty or no tokens remain, we can return early
					tokens.splice( i, 1 );
					selector = seed.length && toSelector( tokens );
					if ( !selector ) {
						push.apply( results, seed );
						return results;
					}

					break;
				}
			}
		}
	}

	// Compile and execute a filtering function if one is not provided
	// Provide `match` to avoid retokenization if we modified the selector above
	( compiled || compile( selector, match ) )(
		seed,
		context,
		!documentIsHTML,
		results,
		!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
	);
	return results;
};

// One-time assignments

// Sort stability
support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;

// Support: Chrome 14-35+
// Always assume duplicates if they aren't passed to the comparison function
support.detectDuplicates = !!hasDuplicate;

// Initialize against the default document
setDocument();

// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
// Detached nodes confoundingly follow *each other*
support.sortDetached = assert( function( el ) {

	// Should return 1, but returns 4 (following)
	return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
} );

// Support: IE<8
// Prevent attribute/property "interpolation"
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !assert( function( el ) {
	el.innerHTML = "<a href='#'></a>";
	return el.firstChild.getAttribute( "href" ) === "#";
} ) ) {
	addHandle( "type|href|height|width", function( elem, name, isXML ) {
		if ( !isXML ) {
			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
		}
	} );
}

// Support: IE<9
// Use defaultValue in place of getAttribute("value")
if ( !support.attributes || !assert( function( el ) {
	el.innerHTML = "<input/>";
	el.firstChild.setAttribute( "value", "" );
	return el.firstChild.getAttribute( "value" ) === "";
} ) ) {
	addHandle( "value", function( elem, _name, isXML ) {
		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
			return elem.defaultValue;
		}
	} );
}

// Support: IE<9
// Use getAttributeNode to fetch booleans when getAttribute lies
if ( !assert( function( el ) {
	return el.getAttribute( "disabled" ) == null;
} ) ) {
	addHandle( booleans, function( elem, name, isXML ) {
		var val;
		if ( !isXML ) {
			return elem[ name ] === true ? name.toLowerCase() :
				( val = elem.getAttributeNode( name ) ) && val.specified ?
					val.value :
					null;
		}
	} );
}

return Sizzle;

} )( window );



jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;

// Deprecated
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;
jQuery.escapeSelector = Sizzle.escape;




var dir = function( elem, dir, until ) {
	var matched = [],
		truncate = until !== undefined;

	while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
		if ( elem.nodeType === 1 ) {
			if ( truncate && jQuery( elem ).is( until ) ) {
				break;
			}
			matched.push( elem );
		}
	}
	return matched;
};


var siblings = function( n, elem ) {
	var matched = [];

	for ( ; n; n = n.nextSibling ) {
		if ( n.nodeType === 1 && n !== elem ) {
			matched.push( n );
		}
	}

	return matched;
};


var rneedsContext = jQuery.expr.match.needsContext;



function nodeName( elem, name ) {

  return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();

};
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );



// Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) {
	if ( isFunction( qualifier ) ) {
		return jQuery.grep( elements, function( elem, i ) {
			return !!qualifier.call( elem, i, elem ) !== not;
		} );
	}

	// Single element
	if ( qualifier.nodeType ) {
		return jQuery.grep( elements, function( elem ) {
			return ( elem === qualifier ) !== not;
		} );
	}

	// Arraylike of elements (jQuery, arguments, Array)
	if ( typeof qualifier !== "string" ) {
		return jQuery.grep( elements, function( elem ) {
			return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
		} );
	}

	// Filtered directly for both simple and complex selectors
	return jQuery.filter( qualifier, elements, not );
}

jQuery.filter = function( expr, elems, not ) {
	var elem = elems[ 0 ];

	if ( not ) {
		expr = ":not(" + expr + ")";
	}

	if ( elems.length === 1 && elem.nodeType === 1 ) {
		return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
	}

	return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
		return elem.nodeType === 1;
	} ) );
};

jQuery.fn.extend( {
	find: function( selector ) {
		var i, ret,
			len = this.length,
			self = this;

		if ( typeof selector !== "string" ) {
			return this.pushStack( jQuery( selector ).filter( function() {
				for ( i = 0; i < len; i++ ) {
					if ( jQuery.contains( self[ i ], this ) ) {
						return true;
					}
				}
			} ) );
		}

		ret = this.pushStack( [] );

		for ( i = 0; i < len; i++ ) {
			jQuery.find( selector, self[ i ], ret );
		}

		return len > 1 ? jQuery.uniqueSort( ret ) : ret;
	},
	filter: function( selector ) {
		return this.pushStack( winnow( this, selector || [], false ) );
	},
	not: function( selector ) {
		return this.pushStack( winnow( this, selector || [], true ) );
	},
	is: function( selector ) {
		return !!winnow(
			this,

			// If this is a positional/relative selector, check membership in the returned set
			// so $("p:first").is("p:last") won't return true for a doc with two "p".
			typeof selector === "string" && rneedsContext.test( selector ) ?
				jQuery( selector ) :
				selector || [],
			false
		).length;
	}
} );


// Initialize a jQuery object


// A central reference to the root jQuery(document)
var rootjQuery,

	// A simple way to check for HTML strings
	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
	// Strict HTML recognition (#11290: must start with <)
	// Shortcut simple #id case for speed
	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,

	init = jQuery.fn.init = function( selector, context, root ) {
		var match, elem;

		// HANDLE: $(""), $(null), $(undefined), $(false)
		if ( !selector ) {
			return this;
		}

		// Method init() accepts an alternate rootjQuery
		// so migrate can support jQuery.sub (gh-2101)
		root = root || rootjQuery;

		// Handle HTML strings
		if ( typeof selector === "string" ) {
			if ( selector[ 0 ] === "<" &&
				selector[ selector.length - 1 ] === ">" &&
				selector.length >= 3 ) {

				// Assume that strings that start and end with <> are HTML and skip the regex check
				match = [ null, selector, null ];

			} else {
				match = rquickExpr.exec( selector );
			}

			// Match html or make sure no context is specified for #id
			if ( match && ( match[ 1 ] || !context ) ) {

				// HANDLE: $(html) -> $(array)
				if ( match[ 1 ] ) {
					context = context instanceof jQuery ? context[ 0 ] : context;

					// Option to run scripts is true for back-compat
					// Intentionally let the error be thrown if parseHTML is not present
					jQuery.merge( this, jQuery.parseHTML(
						match[ 1 ],
						context && context.nodeType ? context.ownerDocument || context : document,
						true
					) );

					// HANDLE: $(html, props)
					if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
						for ( match in context ) {

							// Properties of context are called as methods if possible
							if ( isFunction( this[ match ] ) ) {
								this[ match ]( context[ match ] );

							// ...and otherwise set as attributes
							} else {
								this.attr( match, context[ match ] );
							}
						}
					}

					return this;

				// HANDLE: $(#id)
				} else {
					elem = document.getElementById( match[ 2 ] );

					if ( elem ) {

						// Inject the element directly into the jQuery object
						this[ 0 ] = elem;
						this.length = 1;
					}
					return this;
				}

			// HANDLE: $(expr, $(...))
			} else if ( !context || context.jquery ) {
				return ( context || root ).find( selector );

			// HANDLE: $(expr, context)
			// (which is just equivalent to: $(context).find(expr)
			} else {
				return this.constructor( context ).find( selector );
			}

		// HANDLE: $(DOMElement)
		} else if ( selector.nodeType ) {
			this[ 0 ] = selector;
			this.length = 1;
			return this;

		// HANDLE: $(function)
		// Shortcut for document ready
		} else if ( isFunction( selector ) ) {
			return root.ready !== undefined ?
				root.ready( selector ) :

				// Execute immediately if ready is not present
				selector( jQuery );
		}

		return jQuery.makeArray( selector, this );
	};

// Give the init function the jQuery prototype for later instantiation
init.prototype = jQuery.fn;

// Initialize central reference
rootjQuery = jQuery( document );


var rparentsprev = /^(?:parents|prev(?:Until|All))/,

	// Methods guaranteed to produce a unique set when starting from a unique set
	guaranteedUnique = {
		children: true,
		contents: true,
		next: true,
		prev: true
	};

jQuery.fn.extend( {
	has: function( target ) {
		var targets = jQuery( target, this ),
			l = targets.length;

		return this.filter( function() {
			var i = 0;
			for ( ; i < l; i++ ) {
				if ( jQuery.contains( this, targets[ i ] ) ) {
					return true;
				}
			}
		} );
	},

	closest: function( selectors, context ) {
		var cur,
			i = 0,
			l = this.length,
			matched = [],
			targets = typeof selectors !== "string" && jQuery( selectors );

		// Positional selectors never match, since there's no _selection_ context
		if ( !rneedsContext.test( selectors ) ) {
			for ( ; i < l; i++ ) {
				for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {

					// Always skip document fragments
					if ( cur.nodeType < 11 && ( targets ?
						targets.index( cur ) > -1 :

						// Don't pass non-elements to Sizzle
						cur.nodeType === 1 &&
							jQuery.find.matchesSelector( cur, selectors ) ) ) {

						matched.push( cur );
						break;
					}
				}
			}
		}

		return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
	},

	// Determine the position of an element within the set
	index: function( elem ) {

		// No argument, return index in parent
		if ( !elem ) {
			return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
		}

		// Index in selector
		if ( typeof elem === "string" ) {
			return indexOf.call( jQuery( elem ), this[ 0 ] );
		}

		// Locate the position of the desired element
		return indexOf.call( this,

			// If it receives a jQuery object, the first element is used
			elem.jquery ? elem[ 0 ] : elem
		);
	},

	add: function( selector, context ) {
		return this.pushStack(
			jQuery.uniqueSort(
				jQuery.merge( this.get(), jQuery( selector, context ) )
			)
		);
	},

	addBack: function( selector ) {
		return this.add( selector == null ?
			this.prevObject : this.prevObject.filter( selector )
		);
	}
} );

function sibling( cur, dir ) {
	while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
	return cur;
}

jQuery.each( {
	parent: function( elem ) {
		var parent = elem.parentNode;
		return parent && parent.nodeType !== 11 ? parent : null;
	},
	parents: function( elem ) {
		return dir( elem, "parentNode" );
	},
	parentsUntil: function( elem, _i, until ) {
		return dir( elem, "parentNode", until );
	},
	next: function( elem ) {
		return sibling( elem, "nextSibling" );
	},
	prev: function( elem ) {
		return sibling( elem, "previousSibling" );
	},
	nextAll: function( elem ) {
		return dir( elem, "nextSibling" );
	},
	prevAll: function( elem ) {
		return dir( elem, "previousSibling" );
	},
	nextUntil: function( elem, _i, until ) {
		return dir( elem, "nextSibling", until );
	},
	prevUntil: function( elem, _i, until ) {
		return dir( elem, "previousSibling", until );
	},
	siblings: function( elem ) {
		return siblings( ( elem.parentNode || {} ).firstChild, elem );
	},
	children: function( elem ) {
		return siblings( elem.firstChild );
	},
	contents: function( elem ) {
		if ( elem.contentDocument != null &&

			// Support: IE 11+
			// <object> elements with no `data` attribute has an object
			// `contentDocument` with a `null` prototype.
			getProto( elem.contentDocument ) ) {

			return elem.contentDocument;
		}

		// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
		// Treat the template element as a regular one in browsers that
		// don't support it.
		if ( nodeName( elem, "template" ) ) {
			elem = elem.content || elem;
		}

		return jQuery.merge( [], elem.childNodes );
	}
}, function( name, fn ) {
	jQuery.fn[ name ] = function( until, selector ) {
		var matched = jQuery.map( this, fn, until );

		if ( name.slice( -5 ) !== "Until" ) {
			selector = until;
		}

		if ( selector && typeof selector === "string" ) {
			matched = jQuery.filter( selector, matched );
		}

		if ( this.length > 1 ) {

			// Remove duplicates
			if ( !guaranteedUnique[ name ] ) {
				jQuery.uniqueSort( matched );
			}

			// Reverse order for parents* and prev-derivatives
			if ( rparentsprev.test( name ) ) {
				matched.reverse();
			}
		}

		return this.pushStack( matched );
	};
} );
var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );



// Convert String-formatted options into Object-formatted ones
function createOptions( options ) {
	var object = {};
	jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
		object[ flag ] = true;
	} );
	return object;
}

/*
 * Create a callback list using the following parameters:
 *
 *	options: an optional list of space-separated options that will change how
 *			the callback list behaves or a more traditional option object
 *
 * By default a callback list will act like an event callback list and can be
 * "fired" multiple times.
 *
 * Possible options:
 *
 *	once:			will ensure the callback list can only be fired once (like a Deferred)
 *
 *	memory:			will keep track of previous values and will call any callback added
 *					after the list has been fired right away with the latest "memorized"
 *					values (like a Deferred)
 *
 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
 *
 *	stopOnFalse:	interrupt callings when a callback returns false
 *
 */
jQuery.Callbacks = function( options ) {

	// Convert options from String-formatted to Object-formatted if needed
	// (we check in cache first)
	options = typeof options === "string" ?
		createOptions( options ) :
		jQuery.extend( {}, options );

	var // Flag to know if list is currently firing
		firing,

		// Last fire value for non-forgettable lists
		memory,

		// Flag to know if list was already fired
		fired,

		// Flag to prevent firing
		locked,

		// Actual callback list
		list = [],

		// Queue of execution data for repeatable lists
		queue = [],

		// Index of currently firing callback (modified by add/remove as needed)
		firingIndex = -1,

		// Fire callbacks
		fire = function() {

			// Enforce single-firing
			locked = locked || options.once;

			// Execute callbacks for all pending executions,
			// respecting firingIndex overrides and runtime changes
			fired = firing = true;
			for ( ; queue.length; firingIndex = -1 ) {
				memory = queue.shift();
				while ( ++firingIndex < list.length ) {

					// Run callback and check for early termination
					if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
						options.stopOnFalse ) {

						// Jump to end and forget the data so .add doesn't re-fire
						firingIndex = list.length;
						memory = false;
					}
				}
			}

			// Forget the data if we're done with it
			if ( !options.memory ) {
				memory = false;
			}

			firing = false;

			// Clean up if we're done firing for good
			if ( locked ) {

				// Keep an empty list if we have data for future add calls
				if ( memory ) {
					list = [];

				// Otherwise, this object is spent
				} else {
					list = "";
				}
			}
		},

		// Actual Callbacks object
		self = {

			// Add a callback or a collection of callbacks to the list
			add: function() {
				if ( list ) {

					// If we have memory from a past run, we should fire after adding
					if ( memory && !firing ) {
						firingIndex = list.length - 1;
						queue.push( memory );
					}

					( function add( args ) {
						jQuery.each( args, function( _, arg ) {
							if ( isFunction( arg ) ) {
								if ( !options.unique || !self.has( arg ) ) {
									list.push( arg );
								}
							} else if ( arg && arg.length && toType( arg ) !== "string" ) {

								// Inspect recursively
								add( arg );
							}
						} );
					} )( arguments );

					if ( memory && !firing ) {
						fire();
					}
				}
				return this;
			},

			// Remove a callback from the list
			remove: function() {
				jQuery.each( arguments, function( _, arg ) {
					var index;
					while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
						list.splice( index, 1 );

						// Handle firing indexes
						if ( index <= firingIndex ) {
							firingIndex--;
						}
					}
				} );
				return this;
			},

			// Check if a given callback is in the list.
			// If no argument is given, return whether or not list has callbacks attached.
			has: function( fn ) {
				return fn ?
					jQuery.inArray( fn, list ) > -1 :
					list.length > 0;
			},

			// Remove all callbacks from the list
			empty: function() {
				if ( list ) {
					list = [];
				}
				return this;
			},

			// Disable .fire and .add
			// Abort any current/pending executions
			// Clear all callbacks and values
			disable: function() {
				locked = queue = [];
				list = memory = "";
				return this;
			},
			disabled: function() {
				return !list;
			},

			// Disable .fire
			// Also disable .add unless we have memory (since it would have no effect)
			// Abort any pending executions
			lock: function() {
				locked = queue = [];
				if ( !memory && !firing ) {
					list = memory = "";
				}
				return this;
			},
			locked: function() {
				return !!locked;
			},

			// Call all callbacks with the given context and arguments
			fireWith: function( context, args ) {
				if ( !locked ) {
					args = args || [];
					args = [ context, args.slice ? args.slice() : args ];
					queue.push( args );
					if ( !firing ) {
						fire();
					}
				}
				return this;
			},

			// Call all the callbacks with the given arguments
			fire: function() {
				self.fireWith( this, arguments );
				return this;
			},

			// To know if the callbacks have already been called at least once
			fired: function() {
				return !!fired;
			}
		};

	return self;
};


function Identity( v ) {
	return v;
}
function Thrower( ex ) {
	throw ex;
}

function adoptValue( value, resolve, reject, noValue ) {
	var method;

	try {

		// Check for promise aspect first to privilege synchronous behavior
		if ( value && isFunction( ( method = value.promise ) ) ) {
			method.call( value ).done( resolve ).fail( reject );

		// Other thenables
		} else if ( value && isFunction( ( method = value.then ) ) ) {
			method.call( value, resolve, reject );

		// Other non-thenables
		} else {

			// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
			// * false: [ value ].slice( 0 ) => resolve( value )
			// * true: [ value ].slice( 1 ) => resolve()
			resolve.apply( undefined, [ value ].slice( noValue ) );
		}

	// For Promises/A+, convert exceptions into rejections
	// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
	// Deferred#then to conditionally suppress rejection.
	} catch ( value ) {

		// Support: Android 4.0 only
		// Strict mode functions invoked without .call/.apply get global-object context
		reject.apply( undefined, [ value ] );
	}
}

jQuery.extend( {

	Deferred: function( func ) {
		var tuples = [

				// action, add listener, callbacks,
				// ... .then handlers, argument index, [final state]
				[ "notify", "progress", jQuery.Callbacks( "memory" ),
					jQuery.Callbacks( "memory" ), 2 ],
				[ "resolve", "done", jQuery.Callbacks( "once memory" ),
					jQuery.Callbacks( "once memory" ), 0, "resolved" ],
				[ "reject", "fail", jQuery.Callbacks( "once memory" ),
					jQuery.Callbacks( "once memory" ), 1, "rejected" ]
			],
			state = "pending",
			promise = {
				state: function() {
					return state;
				},
				always: function() {
					deferred.done( arguments ).fail( arguments );
					return this;
				},
				"catch": function( fn ) {
					return promise.then( null, fn );
				},

				// Keep pipe for back-compat
				pipe: function( /* fnDone, fnFail, fnProgress */ ) {
					var fns = arguments;

					return jQuery.Deferred( function( newDefer ) {
						jQuery.each( tuples, function( _i, tuple ) {

							// Map tuples (progress, done, fail) to arguments (done, fail, progress)
							var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];

							// deferred.progress(function() { bind to newDefer or newDefer.notify })
							// deferred.done(function() { bind to newDefer or newDefer.resolve })
							// deferred.fail(function() { bind to newDefer or newDefer.reject })
							deferred[ tuple[ 1 ] ]( function() {
								var returned = fn && fn.apply( this, arguments );
								if ( returned && isFunction( returned.promise ) ) {
									returned.promise()
										.progress( newDefer.notify )
										.done( newDefer.resolve )
										.fail( newDefer.reject );
								} else {
									newDefer[ tuple[ 0 ] + "With" ](
										this,
										fn ? [ returned ] : arguments
									);
								}
							} );
						} );
						fns = null;
					} ).promise();
				},
				then: function( onFulfilled, onRejected, onProgress ) {
					var maxDepth = 0;
					function resolve( depth, deferred, handler, special ) {
						return function() {
							var that = this,
								args = arguments,
								mightThrow = function() {
									var returned, then;

									// Support: Promises/A+ section 2.3.3.3.3
									// https://promisesaplus.com/#point-59
									// Ignore double-resolution attempts
									if ( depth < maxDepth ) {
										return;
									}

									returned = handler.apply( that, args );

									// Support: Promises/A+ section 2.3.1
									// https://promisesaplus.com/#point-48
									if ( returned === deferred.promise() ) {
										throw new TypeError( "Thenable self-resolution" );
									}

									// Support: Promises/A+ sections 2.3.3.1, 3.5
									// https://promisesaplus.com/#point-54
									// https://promisesaplus.com/#point-75
									// Retrieve `then` only once
									then = returned &&

										// Support: Promises/A+ section 2.3.4
										// https://promisesaplus.com/#point-64
										// Only check objects and functions for thenability
										( typeof returned === "object" ||
											typeof returned === "function" ) &&
										returned.then;

									// Handle a returned thenable
									if ( isFunction( then ) ) {

										// Special processors (notify) just wait for resolution
										if ( special ) {
											then.call(
												returned,
												resolve( maxDepth, deferred, Identity, special ),
												resolve( maxDepth, deferred, Thrower, special )
											);

										// Normal processors (resolve) also hook into progress
										} else {

											// ...and disregard older resolution values
											maxDepth++;

											then.call(
												returned,
												resolve( maxDepth, deferred, Identity, special ),
												resolve( maxDepth, deferred, Thrower, special ),
												resolve( maxDepth, deferred, Identity,
													deferred.notifyWith )
											);
										}

									// Handle all other returned values
									} else {

										// Only substitute handlers pass on context
										// and multiple values (non-spec behavior)
										if ( handler !== Identity ) {
											that = undefined;
											args = [ returned ];
										}

										// Process the value(s)
										// Default process is resolve
										( special || deferred.resolveWith )( that, args );
									}
								},

								// Only normal processors (resolve) catch and reject exceptions
								process = special ?
									mightThrow :
									function() {
										try {
											mightThrow();
										} catch ( e ) {

											if ( jQuery.Deferred.exceptionHook ) {
												jQuery.Deferred.exceptionHook( e,
													process.stackTrace );
											}

											// Support: Promises/A+ section 2.3.3.3.4.1
											// https://promisesaplus.com/#point-61
											// Ignore post-resolution exceptions
											if ( depth + 1 >= maxDepth ) {

												// Only substitute handlers pass on context
												// and multiple values (non-spec behavior)
												if ( handler !== Thrower ) {
													that = undefined;
													args = [ e ];
												}

												deferred.rejectWith( that, args );
											}
										}
									};

							// Support: Promises/A+ section 2.3.3.3.1
							// https://promisesaplus.com/#point-57
							// Re-resolve promises immediately to dodge false rejection from
							// subsequent errors
							if ( depth ) {
								process();
							} else {

								// Call an optional hook to record the stack, in case of exception
								// since it's otherwise lost when execution goes async
								if ( jQuery.Deferred.getStackHook ) {
									process.stackTrace = jQuery.Deferred.getStackHook();
								}
								window.setTimeout( process );
							}
						};
					}

					return jQuery.Deferred( function( newDefer ) {

						// progress_handlers.add( ... )
						tuples[ 0 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onProgress ) ?
									onProgress :
									Identity,
								newDefer.notifyWith
							)
						);

						// fulfilled_handlers.add( ... )
						tuples[ 1 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onFulfilled ) ?
									onFulfilled :
									Identity
							)
						);

						// rejected_handlers.add( ... )
						tuples[ 2 ][ 3 ].add(
							resolve(
								0,
								newDefer,
								isFunction( onRejected ) ?
									onRejected :
									Thrower
							)
						);
					} ).promise();
				},

				// Get a promise for this deferred
				// If obj is provided, the promise aspect is added to the object
				promise: function( obj ) {
					return obj != null ? jQuery.extend( obj, promise ) : promise;
				}
			},
			deferred = {};

		// Add list-specific methods
		jQuery.each( tuples, function( i, tuple ) {
			var list = tuple[ 2 ],
				stateString = tuple[ 5 ];

			// promise.progress = list.add
			// promise.done = list.add
			// promise.fail = list.add
			promise[ tuple[ 1 ] ] = list.add;

			// Handle state
			if ( stateString ) {
				list.add(
					function() {

						// state = "resolved" (i.e., fulfilled)
						// state = "rejected"
						state = stateString;
					},

					// rejected_callbacks.disable
					// fulfilled_callbacks.disable
					tuples[ 3 - i ][ 2 ].disable,

					// rejected_handlers.disable
					// fulfilled_handlers.disable
					tuples[ 3 - i ][ 3 ].disable,

					// progress_callbacks.lock
					tuples[ 0 ][ 2 ].lock,

					// progress_handlers.lock
					tuples[ 0 ][ 3 ].lock
				);
			}

			// progress_handlers.fire
			// fulfilled_handlers.fire
			// rejected_handlers.fire
			list.add( tuple[ 3 ].fire );

			// deferred.notify = function() { deferred.notifyWith(...) }
			// deferred.resolve = function() { deferred.resolveWith(...) }
			// deferred.reject = function() { deferred.rejectWith(...) }
			deferred[ tuple[ 0 ] ] = function() {
				deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
				return this;
			};

			// deferred.notifyWith = list.fireWith
			// deferred.resolveWith = list.fireWith
			// deferred.rejectWith = list.fireWith
			deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
		} );

		// Make the deferred a promise
		promise.promise( deferred );

		// Call given func if any
		if ( func ) {
			func.call( deferred, deferred );
		}

		// All done!
		return deferred;
	},

	// Deferred helper
	when: function( singleValue ) {
		var

			// count of uncompleted subordinates
			remaining = arguments.length,

			// count of unprocessed arguments
			i = remaining,

			// subordinate fulfillment data
			resolveContexts = Array( i ),
			resolveValues = slice.call( arguments ),

			// the master Deferred
			master = jQuery.Deferred(),

			// subordinate callback factory
			updateFunc = function( i ) {
				return function( value ) {
					resolveContexts[ i ] = this;
					resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
					if ( !( --remaining ) ) {
						master.resolveWith( resolveContexts, resolveValues );
					}
				};
			};

		// Single- and empty arguments are adopted like Promise.resolve
		if ( remaining <= 1 ) {
			adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
				!remaining );

			// Use .then() to unwrap secondary thenables (cf. gh-3000)
			if ( master.state() === "pending" ||
				isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {

				return master.then();
			}
		}

		// Multiple arguments are aggregated like Promise.all array elements
		while ( i-- ) {
			adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
		}

		return master.promise();
	}
} );


// These usually indicate a programmer mistake during development,
// warn about them ASAP rather than swallowing them by default.
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;

jQuery.Deferred.exceptionHook = function( error, stack ) {

	// Support: IE 8 - 9 only
	// Console exists when dev tools are open, which can happen at any time
	if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
		window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
	}
};




jQuery.readyException = function( error ) {
	window.setTimeout( function() {
		throw error;
	} );
};




// The deferred used on DOM ready
var readyList = jQuery.Deferred();

jQuery.fn.ready = function( fn ) {

	readyList
		.then( fn )

		// Wrap jQuery.readyException in a function so that the lookup
		// happens at the time of error handling instead of callback
		// registration.
		.catch( function( error ) {
			jQuery.readyException( error );
		} );

	return this;
};

jQuery.extend( {

	// Is the DOM ready to be used? Set to true once it occurs.
	isReady: false,

	// A counter to track how many items to wait for before
	// the ready event fires. See #6781
	readyWait: 1,

	// Handle when the DOM is ready
	ready: function( wait ) {

		// Abort if there are pending holds or we're already ready
		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
			return;
		}

		// Remember that the DOM is ready
		jQuery.isReady = true;

		// If a normal DOM Ready event fired, decrement, and wait if need be
		if ( wait !== true && --jQuery.readyWait > 0 ) {
			return;
		}

		// If there are functions bound, to execute
		readyList.resolveWith( document, [ jQuery ] );
	}
} );

jQuery.ready.then = readyList.then;

// The ready event handler and self cleanup method
function completed() {
	document.removeEventListener( "DOMContentLoaded", completed );
	window.removeEventListener( "load", completed );
	jQuery.ready();
}

// Catch cases where $(document).ready() is called
// after the browser event has already occurred.
// Support: IE <=9 - 10 only
// Older IE sometimes signals "interactive" too soon
if ( document.readyState === "complete" ||
	( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {

	// Handle it asynchronously to allow scripts the opportunity to delay ready
	window.setTimeout( jQuery.ready );

} else {

	// Use the handy event callback
	document.addEventListener( "DOMContentLoaded", completed );

	// A fallback to window.onload, that will always work
	window.addEventListener( "load", completed );
}




// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
	var i = 0,
		len = elems.length,
		bulk = key == null;

	// Sets many values
	if ( toType( key ) === "object" ) {
		chainable = true;
		for ( i in key ) {
			access( elems, fn, i, key[ i ], true, emptyGet, raw );
		}

	// Sets one value
	} else if ( value !== undefined ) {
		chainable = true;

		if ( !isFunction( value ) ) {
			raw = true;
		}

		if ( bulk ) {

			// Bulk operations run against the entire set
			if ( raw ) {
				fn.call( elems, value );
				fn = null;

			// ...except when executing function values
			} else {
				bulk = fn;
				fn = function( elem, _key, value ) {
					return bulk.call( jQuery( elem ), value );
				};
			}
		}

		if ( fn ) {
			for ( ; i < len; i++ ) {
				fn(
					elems[ i ], key, raw ?
					value :
					value.call( elems[ i ], i, fn( elems[ i ], key ) )
				);
			}
		}
	}

	if ( chainable ) {
		return elems;
	}

	// Gets
	if ( bulk ) {
		return fn.call( elems );
	}

	return len ? fn( elems[ 0 ], key ) : emptyGet;
};


// Matches dashed string for camelizing
var rmsPrefix = /^-ms-/,
	rdashAlpha = /-([a-z])/g;

// Used by camelCase as callback to replace()
function fcamelCase( _all, letter ) {
	return letter.toUpperCase();
}

// Convert dashed to camelCase; used by the css and data modules
// Support: IE <=9 - 11, Edge 12 - 15
// Microsoft forgot to hump their vendor prefix (#9572)
function camelCase( string ) {
	return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
}
var acceptData = function( owner ) {

	// Accepts only:
	//  - Node
	//    - Node.ELEMENT_NODE
	//    - Node.DOCUMENT_NODE
	//  - Object
	//    - Any
	return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
};




function Data() {
	this.expando = jQuery.expando + Data.uid++;
}

Data.uid = 1;

Data.prototype = {

	cache: function( owner ) {

		// Check if the owner object already has a cache
		var value = owner[ this.expando ];

		// If not, create one
		if ( !value ) {
			value = {};

			// We can accept data for non-element nodes in modern browsers,
			// but we should not, see #8335.
			// Always return an empty object.
			if ( acceptData( owner ) ) {

				// If it is a node unlikely to be stringify-ed or looped over
				// use plain assignment
				if ( owner.nodeType ) {
					owner[ this.expando ] = value;

				// Otherwise secure it in a non-enumerable property
				// configurable must be true to allow the property to be
				// deleted when data is removed
				} else {
					Object.defineProperty( owner, this.expando, {
						value: value,
						configurable: true
					} );
				}
			}
		}

		return value;
	},
	set: function( owner, data, value ) {
		var prop,
			cache = this.cache( owner );

		// Handle: [ owner, key, value ] args
		// Always use camelCase key (gh-2257)
		if ( typeof data === "string" ) {
			cache[ camelCase( data ) ] = value;

		// Handle: [ owner, { properties } ] args
		} else {

			// Copy the properties one-by-one to the cache object
			for ( prop in data ) {
				cache[ camelCase( prop ) ] = data[ prop ];
			}
		}
		return cache;
	},
	get: function( owner, key ) {
		return key === undefined ?
			this.cache( owner ) :

			// Always use camelCase key (gh-2257)
			owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
	},
	access: function( owner, key, value ) {

		// In cases where either:
		//
		//   1. No key was specified
		//   2. A string key was specified, but no value provided
		//
		// Take the "read" path and allow the get method to determine
		// which value to return, respectively either:
		//
		//   1. The entire cache object
		//   2. The data stored at the key
		//
		if ( key === undefined ||
				( ( key && typeof key === "string" ) && value === undefined ) ) {

			return this.get( owner, key );
		}

		// When the key is not a string, or both a key and value
		// are specified, set or extend (existing objects) with either:
		//
		//   1. An object of properties
		//   2. A key and value
		//
		this.set( owner, key, value );

		// Since the "set" path can have two possible entry points
		// return the expected data based on which path was taken[*]
		return value !== undefined ? value : key;
	},
	remove: function( owner, key ) {
		var i,
			cache = owner[ this.expando ];

		if ( cache === undefined ) {
			return;
		}

		if ( key !== undefined ) {

			// Support array or space separated string of keys
			if ( Array.isArray( key ) ) {

				// If key is an array of keys...
				// We always set camelCase keys, so remove that.
				key = key.map( camelCase );
			} else {
				key = camelCase( key );

				// If a key with the spaces exists, use it.
				// Otherwise, create an array by matching non-whitespace
				key = key in cache ?
					[ key ] :
					( key.match( rnothtmlwhite ) || [] );
			}

			i = key.length;

			while ( i-- ) {
				delete cache[ key[ i ] ];
			}
		}

		// Remove the expando if there's no more data
		if ( key === undefined || jQuery.isEmptyObject( cache ) ) {

			// Support: Chrome <=35 - 45
			// Webkit & Blink performance suffers when deleting properties
			// from DOM nodes, so set to undefined instead
			// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
			if ( owner.nodeType ) {
				owner[ this.expando ] = undefined;
			} else {
				delete owner[ this.expando ];
			}
		}
	},
	hasData: function( owner ) {
		var cache = owner[ this.expando ];
		return cache !== undefined && !jQuery.isEmptyObject( cache );
	}
};
var dataPriv = new Data();

var dataUser = new Data();



//	Implementation Summary
//
//	1. Enforce API surface and semantic compatibility with 1.9.x branch
//	2. Improve the module's maintainability by reducing the storage
//		paths to a single mechanism.
//	3. Use the same single mechanism to support "private" and "user" data.
//	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
//	5. Avoid exposing implementation details on user objects (eg. expando properties)
//	6. Provide a clear path for implementation upgrade to WeakMap in 2014

var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
	rmultiDash = /[A-Z]/g;

function getData( data ) {
	if ( data === "true" ) {
		return true;
	}

	if ( data === "false" ) {
		return false;
	}

	if ( data === "null" ) {
		return null;
	}

	// Only convert to a number if it doesn't change the string
	if ( data === +data + "" ) {
		return +data;
	}

	if ( rbrace.test( data ) ) {
		return JSON.parse( data );
	}

	return data;
}

function dataAttr( elem, key, data ) {
	var name;

	// If nothing was found internally, try to fetch any
	// data from the HTML5 data-* attribute
	if ( data === undefined && elem.nodeType === 1 ) {
		name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
		data = elem.getAttribute( name );

		if ( typeof data === "string" ) {
			try {
				data = getData( data );
			} catch ( e ) {}

			// Make sure we set the data so it isn't changed later
			dataUser.set( elem, key, data );
		} else {
			data = undefined;
		}
	}
	return data;
}

jQuery.extend( {
	hasData: function( elem ) {
		return dataUser.hasData( elem ) || dataPriv.hasData( elem );
	},

	data: function( elem, name, data ) {
		return dataUser.access( elem, name, data );
	},

	removeData: function( elem, name ) {
		dataUser.remove( elem, name );
	},

	// TODO: Now that all calls to _data and _removeData have been replaced
	// with direct calls to dataPriv methods, these can be deprecated.
	_data: function( elem, name, data ) {
		return dataPriv.access( elem, name, data );
	},

	_removeData: function( elem, name ) {
		dataPriv.remove( elem, name );
	}
} );

jQuery.fn.extend( {
	data: function( key, value ) {
		var i, name, data,
			elem = this[ 0 ],
			attrs = elem && elem.attributes;

		// Gets all values
		if ( key === undefined ) {
			if ( this.length ) {
				data = dataUser.get( elem );

				if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
					i = attrs.length;
					while ( i-- ) {

						// Support: IE 11 only
						// The attrs elements can be null (#14894)
						if ( attrs[ i ] ) {
							name = attrs[ i ].name;
							if ( name.indexOf( "data-" ) === 0 ) {
								name = camelCase( name.slice( 5 ) );
								dataAttr( elem, name, data[ name ] );
							}
						}
					}
					dataPriv.set( elem, "hasDataAttrs", true );
				}
			}

			return data;
		}

		// Sets multiple values
		if ( typeof key === "object" ) {
			return this.each( function() {
				dataUser.set( this, key );
			} );
		}

		return access( this, function( value ) {
			var data;

			// The calling jQuery object (element matches) is not empty
			// (and therefore has an element appears at this[ 0 ]) and the
			// `value` parameter was not undefined. An empty jQuery object
			// will result in `undefined` for elem = this[ 0 ] which will
			// throw an exception if an attempt to read a data cache is made.
			if ( elem && value === undefined ) {

				// Attempt to get data from the cache
				// The key will always be camelCased in Data
				data = dataUser.get( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// Attempt to "discover" the data in
				// HTML5 custom data-* attrs
				data = dataAttr( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// We tried really hard, but the data doesn't exist.
				return;
			}

			// Set the data...
			this.each( function() {

				// We always store the camelCased key
				dataUser.set( this, key, value );
			} );
		}, null, value, arguments.length > 1, null, true );
	},

	removeData: function( key ) {
		return this.each( function() {
			dataUser.remove( this, key );
		} );
	}
} );


jQuery.extend( {
	queue: function( elem, type, data ) {
		var queue;

		if ( elem ) {
			type = ( type || "fx" ) + "queue";
			queue = dataPriv.get( elem, type );

			// Speed up dequeue by getting out quickly if this is just a lookup
			if ( data ) {
				if ( !queue || Array.isArray( data ) ) {
					queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
				} else {
					queue.push( data );
				}
			}
			return queue || [];
		}
	},

	dequeue: function( elem, type ) {
		type = type || "fx";

		var queue = jQuery.queue( elem, type ),
			startLength = queue.length,
			fn = queue.shift(),
			hooks = jQuery._queueHooks( elem, type ),
			next = function() {
				jQuery.dequeue( elem, type );
			};

		// If the fx queue is dequeued, always remove the progress sentinel
		if ( fn === "inprogress" ) {
			fn = queue.shift();
			startLength--;
		}

		if ( fn ) {

			// Add a progress sentinel to prevent the fx queue from being
			// automatically dequeued
			if ( type === "fx" ) {
				queue.unshift( "inprogress" );
			}

			// Clear up the last queue stop function
			delete hooks.stop;
			fn.call( elem, next, hooks );
		}

		if ( !startLength && hooks ) {
			hooks.empty.fire();
		}
	},

	// Not public - generate a queueHooks object, or return the current one
	_queueHooks: function( elem, type ) {
		var key = type + "queueHooks";
		return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
			empty: jQuery.Callbacks( "once memory" ).add( function() {
				dataPriv.remove( elem, [ type + "queue", key ] );
			} )
		} );
	}
} );

jQuery.fn.extend( {
	queue: function( type, data ) {
		var setter = 2;

		if ( typeof type !== "string" ) {
			data = type;
			type = "fx";
			setter--;
		}

		if ( arguments.length < setter ) {
			return jQuery.queue( this[ 0 ], type );
		}

		return data === undefined ?
			this :
			this.each( function() {
				var queue = jQuery.queue( this, type, data );

				// Ensure a hooks for this queue
				jQuery._queueHooks( this, type );

				if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
					jQuery.dequeue( this, type );
				}
			} );
	},
	dequeue: function( type ) {
		return this.each( function() {
			jQuery.dequeue( this, type );
		} );
	},
	clearQueue: function( type ) {
		return this.queue( type || "fx", [] );
	},

	// Get a promise resolved when queues of a certain type
	// are emptied (fx is the type by default)
	promise: function( type, obj ) {
		var tmp,
			count = 1,
			defer = jQuery.Deferred(),
			elements = this,
			i = this.length,
			resolve = function() {
				if ( !( --count ) ) {
					defer.resolveWith( elements, [ elements ] );
				}
			};

		if ( typeof type !== "string" ) {
			obj = type;
			type = undefined;
		}
		type = type || "fx";

		while ( i-- ) {
			tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
			if ( tmp && tmp.empty ) {
				count++;
				tmp.empty.add( resolve );
			}
		}
		resolve();
		return defer.promise( obj );
	}
} );
var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;

var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );


var cssExpand = [ "Top", "Right", "Bottom", "Left" ];

var documentElement = document.documentElement;



	var isAttached = function( elem ) {
			return jQuery.contains( elem.ownerDocument, elem );
		},
		composed = { composed: true };

	// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
	// Check attachment across shadow DOM boundaries when possible (gh-3504)
	// Support: iOS 10.0-10.2 only
	// Early iOS 10 versions support `attachShadow` but not `getRootNode`,
	// leading to errors. We need to check for `getRootNode`.
	if ( documentElement.getRootNode ) {
		isAttached = function( elem ) {
			return jQuery.contains( elem.ownerDocument, elem ) ||
				elem.getRootNode( composed ) === elem.ownerDocument;
		};
	}
var isHiddenWithinTree = function( elem, el ) {

		// isHiddenWithinTree might be called from jQuery#filter function;
		// in that case, element will be second argument
		elem = el || elem;

		// Inline style trumps all
		return elem.style.display === "none" ||
			elem.style.display === "" &&

			// Otherwise, check computed style
			// Support: Firefox <=43 - 45
			// Disconnected elements can have computed display: none, so first confirm that elem is
			// in the document.
			isAttached( elem ) &&

			jQuery.css( elem, "display" ) === "none";
	};



function adjustCSS( elem, prop, valueParts, tween ) {
	var adjusted, scale,
		maxIterations = 20,
		currentValue = tween ?
			function() {
				return tween.cur();
			} :
			function() {
				return jQuery.css( elem, prop, "" );
			},
		initial = currentValue(),
		unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),

		// Starting value computation is required for potential unit mismatches
		initialInUnit = elem.nodeType &&
			( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
			rcssNum.exec( jQuery.css( elem, prop ) );

	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {

		// Support: Firefox <=54
		// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
		initial = initial / 2;

		// Trust units reported by jQuery.css
		unit = unit || initialInUnit[ 3 ];

		// Iteratively approximate from a nonzero starting point
		initialInUnit = +initial || 1;

		while ( maxIterations-- ) {

			// Evaluate and update our best guess (doubling guesses that zero out).
			// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
			jQuery.style( elem, prop, initialInUnit + unit );
			if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
				maxIterations = 0;
			}
			initialInUnit = initialInUnit / scale;

		}

		initialInUnit = initialInUnit * 2;
		jQuery.style( elem, prop, initialInUnit + unit );

		// Make sure we update the tween properties later on
		valueParts = valueParts || [];
	}

	if ( valueParts ) {
		initialInUnit = +initialInUnit || +initial || 0;

		// Apply relative offset (+=/-=) if specified
		adjusted = valueParts[ 1 ] ?
			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
			+valueParts[ 2 ];
		if ( tween ) {
			tween.unit = unit;
			tween.start = initialInUnit;
			tween.end = adjusted;
		}
	}
	return adjusted;
}


var defaultDisplayMap = {};

function getDefaultDisplay( elem ) {
	var temp,
		doc = elem.ownerDocument,
		nodeName = elem.nodeName,
		display = defaultDisplayMap[ nodeName ];

	if ( display ) {
		return display;
	}

	temp = doc.body.appendChild( doc.createElement( nodeName ) );
	display = jQuery.css( temp, "display" );

	temp.parentNode.removeChild( temp );

	if ( display === "none" ) {
		display = "block";
	}
	defaultDisplayMap[ nodeName ] = display;

	return display;
}

function showHide( elements, show ) {
	var display, elem,
		values = [],
		index = 0,
		length = elements.length;

	// Determine new display value for elements that need to change
	for ( ; index < length; index++ ) {
		elem = elements[ index ];
		if ( !elem.style ) {
			continue;
		}

		display = elem.style.display;
		if ( show ) {

			// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
			// check is required in this first loop unless we have a nonempty display value (either
			// inline or about-to-be-restored)
			if ( display === "none" ) {
				values[ index ] = dataPriv.get( elem, "display" ) || null;
				if ( !values[ index ] ) {
					elem.style.display = "";
				}
			}
			if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
				values[ index ] = getDefaultDisplay( elem );
			}
		} else {
			if ( display !== "none" ) {
				values[ index ] = "none";

				// Remember what we're overwriting
				dataPriv.set( elem, "display", display );
			}
		}
	}

	// Set the display of the elements in a second loop to avoid constant reflow
	for ( index = 0; index < length; index++ ) {
		if ( values[ index ] != null ) {
			elements[ index ].style.display = values[ index ];
		}
	}

	return elements;
}

jQuery.fn.extend( {
	show: function() {
		return showHide( this, true );
	},
	hide: function() {
		return showHide( this );
	},
	toggle: function( state ) {
		if ( typeof state === "boolean" ) {
			return state ? this.show() : this.hide();
		}

		return this.each( function() {
			if ( isHiddenWithinTree( this ) ) {
				jQuery( this ).show();
			} else {
				jQuery( this ).hide();
			}
		} );
	}
} );
var rcheckableType = ( /^(?:checkbox|radio)$/i );

var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );

var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );



( function() {
	var fragment = document.createDocumentFragment(),
		div = fragment.appendChild( document.createElement( "div" ) ),
		input = document.createElement( "input" );

	// Support: Android 4.0 - 4.3 only
	// Check state lost if the name is set (#11217)
	// Support: Windows Web Apps (WWA)
	// `name` and `type` must use .setAttribute for WWA (#14901)
	input.setAttribute( "type", "radio" );
	input.setAttribute( "checked", "checked" );
	input.setAttribute( "name", "t" );

	div.appendChild( input );

	// Support: Android <=4.1 only
	// Older WebKit doesn't clone checked state correctly in fragments
	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;

	// Support: IE <=11 only
	// Make sure textarea (and checkbox) defaultValue is properly cloned
	div.innerHTML = "<textarea>x</textarea>";
	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;

	// Support: IE <=9 only
	// IE <=9 replaces <option> tags with their contents when inserted outside of
	// the select element.
	div.innerHTML = "<option></option>";
	support.option = !!div.lastChild;
} )();


// We have to close these tags to support XHTML (#13200)
var wrapMap = {

	// XHTML parsers do not magically insert elements in the
	// same way that tag soup parsers do. So we cannot shorten
	// this by omitting <tbody> or other required elements.
	thead: [ 1, "<table>", "</table>" ],
	col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
	tr: [ 2, "<table><tbody>", "</tbody></table>" ],
	td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],

	_default: [ 0, "", "" ]
};

wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;

// Support: IE <=9 only
if ( !support.option ) {
	wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
}


function getAll( context, tag ) {

	// Support: IE <=9 - 11 only
	// Use typeof to avoid zero-argument method invocation on host objects (#15151)
	var ret;

	if ( typeof context.getElementsByTagName !== "undefined" ) {
		ret = context.getElementsByTagName( tag || "*" );

	} else if ( typeof context.querySelectorAll !== "undefined" ) {
		ret = context.querySelectorAll( tag || "*" );

	} else {
		ret = [];
	}

	if ( tag === undefined || tag && nodeName( context, tag ) ) {
		return jQuery.merge( [ context ], ret );
	}

	return ret;
}


// Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) {
	var i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		dataPriv.set(
			elems[ i ],
			"globalEval",
			!refElements || dataPriv.get( refElements[ i ], "globalEval" )
		);
	}
}


var rhtml = /<|&#?\w+;/;

function buildFragment( elems, context, scripts, selection, ignored ) {
	var elem, tmp, tag, wrap, attached, j,
		fragment = context.createDocumentFragment(),
		nodes = [],
		i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		elem = elems[ i ];

		if ( elem || elem === 0 ) {

			// Add nodes directly
			if ( toType( elem ) === "object" ) {

				// Support: Android <=4.0 only, PhantomJS 1 only
				// push.apply(_, arraylike) throws on ancient WebKit
				jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );

			// Convert non-html into a text node
			} else if ( !rhtml.test( elem ) ) {
				nodes.push( context.createTextNode( elem ) );

			// Convert html into DOM nodes
			} else {
				tmp = tmp || fragment.appendChild( context.createElement( "div" ) );

				// Deserialize a standard representation
				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
				wrap = wrapMap[ tag ] || wrapMap._default;
				tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];

				// Descend through wrappers to the right content
				j = wrap[ 0 ];
				while ( j-- ) {
					tmp = tmp.lastChild;
				}

				// Support: Android <=4.0 only, PhantomJS 1 only
				// push.apply(_, arraylike) throws on ancient WebKit
				jQuery.merge( nodes, tmp.childNodes );

				// Remember the top-level container
				tmp = fragment.firstChild;

				// Ensure the created nodes are orphaned (#12392)
				tmp.textContent = "";
			}
		}
	}

	// Remove wrapper from fragment
	fragment.textContent = "";

	i = 0;
	while ( ( elem = nodes[ i++ ] ) ) {

		// Skip elements already in the context collection (trac-4087)
		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
			if ( ignored ) {
				ignored.push( elem );
			}
			continue;
		}

		attached = isAttached( elem );

		// Append to fragment
		tmp = getAll( fragment.appendChild( elem ), "script" );

		// Preserve script evaluation history
		if ( attached ) {
			setGlobalEval( tmp );
		}

		// Capture executables
		if ( scripts ) {
			j = 0;
			while ( ( elem = tmp[ j++ ] ) ) {
				if ( rscriptType.test( elem.type || "" ) ) {
					scripts.push( elem );
				}
			}
		}
	}

	return fragment;
}


var
	rkeyEvent = /^key/,
	rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
	rtypenamespace = /^([^.]*)(?:\.(.+)|)/;

function returnTrue() {
	return true;
}

function returnFalse() {
	return false;
}

// Support: IE <=9 - 11+
// focus() and blur() are asynchronous, except when they are no-op.
// So expect focus to be synchronous when the element is already active,
// and blur to be synchronous when the element is not already active.
// (focus and blur are always synchronous in other supported browsers,
// this just defines when we can count on it).
function expectSync( elem, type ) {
	return ( elem === safeActiveElement() ) === ( type === "focus" );
}

// Support: IE <=9 only
// Accessing document.activeElement can throw unexpectedly
// https://bugs.jquery.com/ticket/13393
function safeActiveElement() {
	try {
		return document.activeElement;
	} catch ( err ) { }
}

function on( elem, types, selector, data, fn, one ) {
	var origFn, type;

	// Types can be a map of types/handlers
	if ( typeof types === "object" ) {

		// ( types-Object, selector, data )
		if ( typeof selector !== "string" ) {

			// ( types-Object, data )
			data = data || selector;
			selector = undefined;
		}
		for ( type in types ) {
			on( elem, type, selector, data, types[ type ], one );
		}
		return elem;
	}

	if ( data == null && fn == null ) {

		// ( types, fn )
		fn = selector;
		data = selector = undefined;
	} else if ( fn == null ) {
		if ( typeof selector === "string" ) {

			// ( types, selector, fn )
			fn = data;
			data = undefined;
		} else {

			// ( types, data, fn )
			fn = data;
			data = selector;
			selector = undefined;
		}
	}
	if ( fn === false ) {
		fn = returnFalse;
	} else if ( !fn ) {
		return elem;
	}

	if ( one === 1 ) {
		origFn = fn;
		fn = function( event ) {

			// Can use an empty set, since event contains the info
			jQuery().off( event );
			return origFn.apply( this, arguments );
		};

		// Use same guid so caller can remove using origFn
		fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
	}
	return elem.each( function() {
		jQuery.event.add( this, types, fn, data, selector );
	} );
}

/*
 * Helper functions for managing events -- not part of the public interface.
 * Props to Dean Edwards' addEvent library for many of the ideas.
 */
jQuery.event = {

	global: {},

	add: function( elem, types, handler, data, selector ) {

		var handleObjIn, eventHandle, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.get( elem );

		// Only attach events to objects that accept data
		if ( !acceptData( elem ) ) {
			return;
		}

		// Caller can pass in an object of custom data in lieu of the handler
		if ( handler.handler ) {
			handleObjIn = handler;
			handler = handleObjIn.handler;
			selector = handleObjIn.selector;
		}

		// Ensure that invalid selectors throw exceptions at attach time
		// Evaluate against documentElement in case elem is a non-element node (e.g., document)
		if ( selector ) {
			jQuery.find.matchesSelector( documentElement, selector );
		}

		// Make sure that the handler has a unique ID, used to find/remove it later
		if ( !handler.guid ) {
			handler.guid = jQuery.guid++;
		}

		// Init the element's event structure and main handler, if this is the first
		if ( !( events = elemData.events ) ) {
			events = elemData.events = Object.create( null );
		}
		if ( !( eventHandle = elemData.handle ) ) {
			eventHandle = elemData.handle = function( e ) {

				// Discard the second event of a jQuery.event.trigger() and
				// when an event is called after a page has unloaded
				return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
					jQuery.event.dispatch.apply( elem, arguments ) : undefined;
			};
		}

		// Handle multiple events separated by a space
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// There *must* be a type, no attaching namespace-only handlers
			if ( !type ) {
				continue;
			}

			// If event changes its type, use the special event handlers for the changed type
			special = jQuery.event.special[ type ] || {};

			// If selector defined, determine special event api type, otherwise given type
			type = ( selector ? special.delegateType : special.bindType ) || type;

			// Update special based on newly reset type
			special = jQuery.event.special[ type ] || {};

			// handleObj is passed to all event handlers
			handleObj = jQuery.extend( {
				type: type,
				origType: origType,
				data: data,
				handler: handler,
				guid: handler.guid,
				selector: selector,
				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
				namespace: namespaces.join( "." )
			}, handleObjIn );

			// Init the event handler queue if we're the first
			if ( !( handlers = events[ type ] ) ) {
				handlers = events[ type ] = [];
				handlers.delegateCount = 0;

				// Only use addEventListener if the special events handler returns false
				if ( !special.setup ||
					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {

					if ( elem.addEventListener ) {
						elem.addEventListener( type, eventHandle );
					}
				}
			}

			if ( special.add ) {
				special.add.call( elem, handleObj );

				if ( !handleObj.handler.guid ) {
					handleObj.handler.guid = handler.guid;
				}
			}

			// Add to the element's handler list, delegates in front
			if ( selector ) {
				handlers.splice( handlers.delegateCount++, 0, handleObj );
			} else {
				handlers.push( handleObj );
			}

			// Keep track of which events have ever been used, for event optimization
			jQuery.event.global[ type ] = true;
		}

	},

	// Detach an event or set of events from an element
	remove: function( elem, types, handler, selector, mappedTypes ) {

		var j, origCount, tmp,
			events, t, handleObj,
			special, handlers, type, namespaces, origType,
			elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );

		if ( !elemData || !( events = elemData.events ) ) {
			return;
		}

		// Once for each type.namespace in types; type may be omitted
		types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
		t = types.length;
		while ( t-- ) {
			tmp = rtypenamespace.exec( types[ t ] ) || [];
			type = origType = tmp[ 1 ];
			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

			// Unbind all events (on this namespace, if provided) for the element
			if ( !type ) {
				for ( type in events ) {
					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
				}
				continue;
			}

			special = jQuery.event.special[ type ] || {};
			type = ( selector ? special.delegateType : special.bindType ) || type;
			handlers = events[ type ] || [];
			tmp = tmp[ 2 ] &&
				new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );

			// Remove matching events
			origCount = j = handlers.length;
			while ( j-- ) {
				handleObj = handlers[ j ];

				if ( ( mappedTypes || origType === handleObj.origType ) &&
					( !handler || handler.guid === handleObj.guid ) &&
					( !tmp || tmp.test( handleObj.namespace ) ) &&
					( !selector || selector === handleObj.selector ||
						selector === "**" && handleObj.selector ) ) {
					handlers.splice( j, 1 );

					if ( handleObj.selector ) {
						handlers.delegateCount--;
					}
					if ( special.remove ) {
						special.remove.call( elem, handleObj );
					}
				}
			}

			// Remove generic event handler if we removed something and no more handlers exist
			// (avoids potential for endless recursion during removal of special event handlers)
			if ( origCount && !handlers.length ) {
				if ( !special.teardown ||
					special.teardown.call( elem, namespaces, elemData.handle ) === false ) {

					jQuery.removeEvent( elem, type, elemData.handle );
				}

				delete events[ type ];
			}
		}

		// Remove data and the expando if it's no longer used
		if ( jQuery.isEmptyObject( events ) ) {
			dataPriv.remove( elem, "handle events" );
		}
	},

	dispatch: function( nativeEvent ) {

		var i, j, ret, matched, handleObj, handlerQueue,
			args = new Array( arguments.length ),

			// Make a writable jQuery.Event from the native event object
			event = jQuery.event.fix( nativeEvent ),

			handlers = (
					dataPriv.get( this, "events" ) || Object.create( null )
				)[ event.type ] || [],
			special = jQuery.event.special[ event.type ] || {};

		// Use the fix-ed jQuery.Event rather than the (read-only) native event
		args[ 0 ] = event;

		for ( i = 1; i < arguments.length; i++ ) {
			args[ i ] = arguments[ i ];
		}

		event.delegateTarget = this;

		// Call the preDispatch hook for the mapped type, and let it bail if desired
		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
			return;
		}

		// Determine handlers
		handlerQueue = jQuery.event.handlers.call( this, event, handlers );

		// Run delegates first; they may want to stop propagation beneath us
		i = 0;
		while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
			event.currentTarget = matched.elem;

			j = 0;
			while ( ( handleObj = matched.handlers[ j++ ] ) &&
				!event.isImmediatePropagationStopped() ) {

				// If the event is namespaced, then each handler is only invoked if it is
				// specially universal or its namespaces are a superset of the event's.
				if ( !event.rnamespace || handleObj.namespace === false ||
					event.rnamespace.test( handleObj.namespace ) ) {

					event.handleObj = handleObj;
					event.data = handleObj.data;

					ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
						handleObj.handler ).apply( matched.elem, args );

					if ( ret !== undefined ) {
						if ( ( event.result = ret ) === false ) {
							event.preventDefault();
							event.stopPropagation();
						}
					}
				}
			}
		}

		// Call the postDispatch hook for the mapped type
		if ( special.postDispatch ) {
			special.postDispatch.call( this, event );
		}

		return event.result;
	},

	handlers: function( event, handlers ) {
		var i, handleObj, sel, matchedHandlers, matchedSelectors,
			handlerQueue = [],
			delegateCount = handlers.delegateCount,
			cur = event.target;

		// Find delegate handlers
		if ( delegateCount &&

			// Support: IE <=9
			// Black-hole SVG <use> instance trees (trac-13180)
			cur.nodeType &&

			// Support: Firefox <=42
			// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
			// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
			// Support: IE 11 only
			// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
			!( event.type === "click" && event.button >= 1 ) ) {

			for ( ; cur !== this; cur = cur.parentNode || this ) {

				// Don't check non-elements (#13208)
				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
				if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
					matchedHandlers = [];
					matchedSelectors = {};
					for ( i = 0; i < delegateCount; i++ ) {
						handleObj = handlers[ i ];

						// Don't conflict with Object.prototype properties (#13203)
						sel = handleObj.selector + " ";

						if ( matchedSelectors[ sel ] === undefined ) {
							matchedSelectors[ sel ] = handleObj.needsContext ?
								jQuery( sel, this ).index( cur ) > -1 :
								jQuery.find( sel, this, null, [ cur ] ).length;
						}
						if ( matchedSelectors[ sel ] ) {
							matchedHandlers.push( handleObj );
						}
					}
					if ( matchedHandlers.length ) {
						handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
					}
				}
			}
		}

		// Add the remaining (directly-bound) handlers
		cur = this;
		if ( delegateCount < handlers.length ) {
			handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
		}

		return handlerQueue;
	},

	addProp: function( name, hook ) {
		Object.defineProperty( jQuery.Event.prototype, name, {
			enumerable: true,
			configurable: true,

			get: isFunction( hook ) ?
				function() {
					if ( this.originalEvent ) {
							return hook( this.originalEvent );
					}
				} :
				function() {
					if ( this.originalEvent ) {
							return this.originalEvent[ name ];
					}
				},

			set: function( value ) {
				Object.defineProperty( this, name, {
					enumerable: true,
					configurable: true,
					writable: true,
					value: value
				} );
			}
		} );
	},

	fix: function( originalEvent ) {
		return originalEvent[ jQuery.expando ] ?
			originalEvent :
			new jQuery.Event( originalEvent );
	},

	special: {
		load: {

			// Prevent triggered image.load events from bubbling to window.load
			noBubble: true
		},
		click: {

			// Utilize native event to ensure correct state for checkable inputs
			setup: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Claim the first handler
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					// dataPriv.set( el, "click", ... )
					leverageNative( el, "click", returnTrue );
				}

				// Return false to allow normal processing in the caller
				return false;
			},
			trigger: function( data ) {

				// For mutual compressibility with _default, replace `this` access with a local var.
				// `|| data` is dead code meant only to preserve the variable through minification.
				var el = this || data;

				// Force setup before triggering a click
				if ( rcheckableType.test( el.type ) &&
					el.click && nodeName( el, "input" ) ) {

					leverageNative( el, "click" );
				}

				// Return non-false to allow normal event-path propagation
				return true;
			},

			// For cross-browser consistency, suppress native .click() on links
			// Also prevent it if we're currently inside a leveraged native-event stack
			_default: function( event ) {
				var target = event.target;
				return rcheckableType.test( target.type ) &&
					target.click && nodeName( target, "input" ) &&
					dataPriv.get( target, "click" ) ||
					nodeName( target, "a" );
			}
		},

		beforeunload: {
			postDispatch: function( event ) {

				// Support: Firefox 20+
				// Firefox doesn't alert if the returnValue field is not set.
				if ( event.result !== undefined && event.originalEvent ) {
					event.originalEvent.returnValue = event.result;
				}
			}
		}
	}
};

// Ensure the presence of an event listener that handles manually-triggered
// synthetic events by interrupting progress until reinvoked in response to
// *native* events that it fires directly, ensuring that state changes have
// already occurred before other listeners are invoked.
function leverageNative( el, type, expectSync ) {

	// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
	if ( !expectSync ) {
		if ( dataPriv.get( el, type ) === undefined ) {
			jQuery.event.add( el, type, returnTrue );
		}
		return;
	}

	// Register the controller as a special universal handler for all event namespaces
	dataPriv.set( el, type, false );
	jQuery.event.add( el, type, {
		namespace: false,
		handler: function( event ) {
			var notAsync, result,
				saved = dataPriv.get( this, type );

			if ( ( event.isTrigger & 1 ) && this[ type ] ) {

				// Interrupt processing of the outer synthetic .trigger()ed event
				// Saved data should be false in such cases, but might be a leftover capture object
				// from an async native handler (gh-4350)
				if ( !saved.length ) {

					// Store arguments for use when handling the inner native event
					// There will always be at least one argument (an event object), so this array
					// will not be confused with a leftover capture object.
					saved = slice.call( arguments );
					dataPriv.set( this, type, saved );

					// Trigger the native event and capture its result
					// Support: IE <=9 - 11+
					// focus() and blur() are asynchronous
					notAsync = expectSync( this, type );
					this[ type ]();
					result = dataPriv.get( this, type );
					if ( saved !== result || notAsync ) {
						dataPriv.set( this, type, false );
					} else {
						result = {};
					}
					if ( saved !== result ) {

						// Cancel the outer synthetic event
						event.stopImmediatePropagation();
						event.preventDefault();
						return result.value;
					}

				// If this is an inner synthetic event for an event with a bubbling surrogate
				// (focus or blur), assume that the surrogate already propagated from triggering the
				// native event and prevent that from happening again here.
				// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
				// bubbling surrogate propagates *after* the non-bubbling base), but that seems
				// less bad than duplication.
				} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
					event.stopPropagation();
				}

			// If this is a native event triggered above, everything is now in order
			// Fire an inner synthetic event with the original arguments
			} else if ( saved.length ) {

				// ...and capture the result
				dataPriv.set( this, type, {
					value: jQuery.event.trigger(

						// Support: IE <=9 - 11+
						// Extend with the prototype to reset the above stopImmediatePropagation()
						jQuery.extend( saved[ 0 ], jQuery.Event.prototype ),
						saved.slice( 1 ),
						this
					)
				} );

				// Abort handling of the native event
				event.stopImmediatePropagation();
			}
		}
	} );
}

jQuery.removeEvent = function( elem, type, handle ) {

	// This "if" is needed for plain objects
	if ( elem.removeEventListener ) {
		elem.removeEventListener( type, handle );
	}
};

jQuery.Event = function( src, props ) {

	// Allow instantiation without the 'new' keyword
	if ( !( this instanceof jQuery.Event ) ) {
		return new jQuery.Event( src, props );
	}

	// Event object
	if ( src && src.type ) {
		this.originalEvent = src;
		this.type = src.type;

		// Events bubbling up the document may have been marked as prevented
		// by a handler lower down the tree; reflect the correct value.
		this.isDefaultPrevented = src.defaultPrevented ||
				src.defaultPrevented === undefined &&

				// Support: Android <=2.3 only
				src.returnValue === false ?
			returnTrue :
			returnFalse;

		// Create target properties
		// Support: Safari <=6 - 7 only
		// Target should not be a text node (#504, #13143)
		this.target = ( src.target && src.target.nodeType === 3 ) ?
			src.target.parentNode :
			src.target;

		this.currentTarget = src.currentTarget;
		this.relatedTarget = src.relatedTarget;

	// Event type
	} else {
		this.type = src;
	}

	// Put explicitly provided properties onto the event object
	if ( props ) {
		jQuery.extend( this, props );
	}

	// Create a timestamp if incoming event doesn't have one
	this.timeStamp = src && src.timeStamp || Date.now();

	// Mark it as fixed
	this[ jQuery.expando ] = true;
};

// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
	constructor: jQuery.Event,
	isDefaultPrevented: returnFalse,
	isPropagationStopped: returnFalse,
	isImmediatePropagationStopped: returnFalse,
	isSimulated: false,

	preventDefault: function() {
		var e = this.originalEvent;

		this.isDefaultPrevented = returnTrue;

		if ( e && !this.isSimulated ) {
			e.preventDefault();
		}
	},
	stopPropagation: function() {
		var e = this.originalEvent;

		this.isPropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopPropagation();
		}
	},
	stopImmediatePropagation: function() {
		var e = this.originalEvent;

		this.isImmediatePropagationStopped = returnTrue;

		if ( e && !this.isSimulated ) {
			e.stopImmediatePropagation();
		}

		this.stopPropagation();
	}
};

// Includes all common event props including KeyEvent and MouseEvent specific props
jQuery.each( {
	altKey: true,
	bubbles: true,
	cancelable: true,
	changedTouches: true,
	ctrlKey: true,
	detail: true,
	eventPhase: true,
	metaKey: true,
	pageX: true,
	pageY: true,
	shiftKey: true,
	view: true,
	"char": true,
	code: true,
	charCode: true,
	key: true,
	keyCode: true,
	button: true,
	buttons: true,
	clientX: true,
	clientY: true,
	offsetX: true,
	offsetY: true,
	pointerId: true,
	pointerType: true,
	screenX: true,
	screenY: true,
	targetTouches: true,
	toElement: true,
	touches: true,

	which: function( event ) {
		var button = event.button;

		// Add which for key events
		if ( event.which == null && rkeyEvent.test( event.type ) ) {
			return event.charCode != null ? event.charCode : event.keyCode;
		}

		// Add which for click: 1 === left; 2 === middle; 3 === right
		if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
			if ( button & 1 ) {
				return 1;
			}

			if ( button & 2 ) {
				return 3;
			}

			if ( button & 4 ) {
				return 2;
			}

			return 0;
		}

		return event.which;
	}
}, jQuery.event.addProp );

jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
	jQuery.event.special[ type ] = {

		// Utilize native event if possible so blur/focus sequence is correct
		setup: function() {

			// Claim the first handler
			// dataPriv.set( this, "focus", ... )
			// dataPriv.set( this, "blur", ... )
			leverageNative( this, type, expectSync );

			// Return false to allow normal processing in the caller
			return false;
		},
		trigger: function() {

			// Force setup before trigger
			leverageNative( this, type );

			// Return non-false to allow normal event-path propagation
			return true;
		},

		delegateType: delegateType
	};
} );

// Create mouseenter/leave events using mouseover/out and event-time checks
// so that event delegation works in jQuery.
// Do the same for pointerenter/pointerleave and pointerover/pointerout
//
// Support: Safari 7 only
// Safari sends mouseenter too often; see:
// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
// for the description of the bug (it existed in older Chrome versions as well).
jQuery.each( {
	mouseenter: "mouseover",
	mouseleave: "mouseout",
	pointerenter: "pointerover",
	pointerleave: "pointerout"
}, function( orig, fix ) {
	jQuery.event.special[ orig ] = {
		delegateType: fix,
		bindType: fix,

		handle: function( event ) {
			var ret,
				target = this,
				related = event.relatedTarget,
				handleObj = event.handleObj;

			// For mouseenter/leave call the handler if related is outside the target.
			// NB: No relatedTarget if the mouse left/entered the browser window
			if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
				event.type = handleObj.origType;
				ret = handleObj.handler.apply( this, arguments );
				event.type = fix;
			}
			return ret;
		}
	};
} );

jQuery.fn.extend( {

	on: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn );
	},
	one: function( types, selector, data, fn ) {
		return on( this, types, selector, data, fn, 1 );
	},
	off: function( types, selector, fn ) {
		var handleObj, type;
		if ( types && types.preventDefault && types.handleObj ) {

			// ( event )  dispatched jQuery.Event
			handleObj = types.handleObj;
			jQuery( types.delegateTarget ).off(
				handleObj.namespace ?
					handleObj.origType + "." + handleObj.namespace :
					handleObj.origType,
				handleObj.selector,
				handleObj.handler
			);
			return this;
		}
		if ( typeof types === "object" ) {

			// ( types-object [, selector] )
			for ( type in types ) {
				this.off( type, selector, types[ type ] );
			}
			return this;
		}
		if ( selector === false || typeof selector === "function" ) {

			// ( types [, fn] )
			fn = selector;
			selector = undefined;
		}
		if ( fn === false ) {
			fn = returnFalse;
		}
		return this.each( function() {
			jQuery.event.remove( this, types, fn, selector );
		} );
	}
} );


var

	// Support: IE <=10 - 11, Edge 12 - 13 only
	// In IE/Edge using regex groups here causes severe slowdowns.
	// See https://connect.microsoft.com/IE/feedback/details/1736512/
	rnoInnerhtml = /<script|<style|<link/i,

	// checked="checked" or checked
	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;

// Prefer a tbody over its parent table for containing new rows
function manipulationTarget( elem, content ) {
	if ( nodeName( elem, "table" ) &&
		nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {

		return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
	}

	return elem;
}

// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
	elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
	return elem;
}
function restoreScript( elem ) {
	if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
		elem.type = elem.type.slice( 5 );
	} else {
		elem.removeAttribute( "type" );
	}

	return elem;
}

function cloneCopyEvent( src, dest ) {
	var i, l, type, pdataOld, udataOld, udataCur, events;

	if ( dest.nodeType !== 1 ) {
		return;
	}

	// 1. Copy private data: events, handlers, etc.
	if ( dataPriv.hasData( src ) ) {
		pdataOld = dataPriv.get( src );
		events = pdataOld.events;

		if ( events ) {
			dataPriv.remove( dest, "handle events" );

			for ( type in events ) {
				for ( i = 0, l = events[ type ].length; i < l; i++ ) {
					jQuery.event.add( dest, type, events[ type ][ i ] );
				}
			}
		}
	}

	// 2. Copy user data
	if ( dataUser.hasData( src ) ) {
		udataOld = dataUser.access( src );
		udataCur = jQuery.extend( {}, udataOld );

		dataUser.set( dest, udataCur );
	}
}

// Fix IE bugs, see support tests
function fixInput( src, dest ) {
	var nodeName = dest.nodeName.toLowerCase();

	// Fails to persist the checked state of a cloned checkbox or radio button.
	if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
		dest.checked = src.checked;

	// Fails to return the selected option to the default selected state when cloning options
	} else if ( nodeName === "input" || nodeName === "textarea" ) {
		dest.defaultValue = src.defaultValue;
	}
}

function domManip( collection, args, callback, ignored ) {

	// Flatten any nested arrays
	args = flat( args );

	var fragment, first, scripts, hasScripts, node, doc,
		i = 0,
		l = collection.length,
		iNoClone = l - 1,
		value = args[ 0 ],
		valueIsFunction = isFunction( value );

	// We can't cloneNode fragments that contain checked, in WebKit
	if ( valueIsFunction ||
			( l > 1 && typeof value === "string" &&
				!support.checkClone && rchecked.test( value ) ) ) {
		return collection.each( function( index ) {
			var self = collection.eq( index );
			if ( valueIsFunction ) {
				args[ 0 ] = value.call( this, index, self.html() );
			}
			domManip( self, args, callback, ignored );
		} );
	}

	if ( l ) {
		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
		first = fragment.firstChild;

		if ( fragment.childNodes.length === 1 ) {
			fragment = first;
		}

		// Require either new content or an interest in ignored elements to invoke the callback
		if ( first || ignored ) {
			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
			hasScripts = scripts.length;

			// Use the original fragment for the last item
			// instead of the first because it can end up
			// being emptied incorrectly in certain situations (#8070).
			for ( ; i < l; i++ ) {
				node = fragment;

				if ( i !== iNoClone ) {
					node = jQuery.clone( node, true, true );

					// Keep references to cloned scripts for later restoration
					if ( hasScripts ) {

						// Support: Android <=4.0 only, PhantomJS 1 only
						// push.apply(_, arraylike) throws on ancient WebKit
						jQuery.merge( scripts, getAll( node, "script" ) );
					}
				}

				callback.call( collection[ i ], node, i );
			}

			if ( hasScripts ) {
				doc = scripts[ scripts.length - 1 ].ownerDocument;

				// Reenable scripts
				jQuery.map( scripts, restoreScript );

				// Evaluate executable scripts on first document insertion
				for ( i = 0; i < hasScripts; i++ ) {
					node = scripts[ i ];
					if ( rscriptType.test( node.type || "" ) &&
						!dataPriv.access( node, "globalEval" ) &&
						jQuery.contains( doc, node ) ) {

						if ( node.src && ( node.type || "" ).toLowerCase()  !== "module" ) {

							// Optional AJAX dependency, but won't run scripts if not present
							if ( jQuery._evalUrl && !node.noModule ) {
								jQuery._evalUrl( node.src, {
									nonce: node.nonce || node.getAttribute( "nonce" )
								}, doc );
							}
						} else {
							DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
						}
					}
				}
			}
		}
	}

	return collection;
}

function remove( elem, selector, keepData ) {
	var node,
		nodes = selector ? jQuery.filter( selector, elem ) : elem,
		i = 0;

	for ( ; ( node = nodes[ i ] ) != null; i++ ) {
		if ( !keepData && node.nodeType === 1 ) {
			jQuery.cleanData( getAll( node ) );
		}

		if ( node.parentNode ) {
			if ( keepData && isAttached( node ) ) {
				setGlobalEval( getAll( node, "script" ) );
			}
			node.parentNode.removeChild( node );
		}
	}

	return elem;
}

jQuery.extend( {
	htmlPrefilter: function( html ) {
		return html;
	},

	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
		var i, l, srcElements, destElements,
			clone = elem.cloneNode( true ),
			inPage = isAttached( elem );

		// Fix IE cloning issues
		if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
				!jQuery.isXMLDoc( elem ) ) {

			// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
			destElements = getAll( clone );
			srcElements = getAll( elem );

			for ( i = 0, l = srcElements.length; i < l; i++ ) {
				fixInput( srcElements[ i ], destElements[ i ] );
			}
		}

		// Copy the events from the original to the clone
		if ( dataAndEvents ) {
			if ( deepDataAndEvents ) {
				srcElements = srcElements || getAll( elem );
				destElements = destElements || getAll( clone );

				for ( i = 0, l = srcElements.length; i < l; i++ ) {
					cloneCopyEvent( srcElements[ i ], destElements[ i ] );
				}
			} else {
				cloneCopyEvent( elem, clone );
			}
		}

		// Preserve script evaluation history
		destElements = getAll( clone, "script" );
		if ( destElements.length > 0 ) {
			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
		}

		// Return the cloned set
		return clone;
	},

	cleanData: function( elems ) {
		var data, elem, type,
			special = jQuery.event.special,
			i = 0;

		for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
			if ( acceptData( elem ) ) {
				if ( ( data = elem[ dataPriv.expando ] ) ) {
					if ( data.events ) {
						for ( type in data.events ) {
							if ( special[ type ] ) {
								jQuery.event.remove( elem, type );

							// This is a shortcut to avoid jQuery.event.remove's overhead
							} else {
								jQuery.removeEvent( elem, type, data.handle );
							}
						}
					}

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataPriv.expando ] = undefined;
				}
				if ( elem[ dataUser.expando ] ) {

					// Support: Chrome <=35 - 45+
					// Assign undefined instead of using delete, see Data#remove
					elem[ dataUser.expando ] = undefined;
				}
			}
		}
	}
} );

jQuery.fn.extend( {
	detach: function( selector ) {
		return remove( this, selector, true );
	},

	remove: function( selector ) {
		return remove( this, selector );
	},

	text: function( value ) {
		return access( this, function( value ) {
			return value === undefined ?
				jQuery.text( this ) :
				this.empty().each( function() {
					if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
						this.textContent = value;
					}
				} );
		}, null, value, arguments.length );
	},

	append: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.appendChild( elem );
			}
		} );
	},

	prepend: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.insertBefore( elem, target.firstChild );
			}
		} );
	},

	before: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this );
			}
		} );
	},

	after: function() {
		return domManip( this, arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this.nextSibling );
			}
		} );
	},

	empty: function() {
		var elem,
			i = 0;

		for ( ; ( elem = this[ i ] ) != null; i++ ) {
			if ( elem.nodeType === 1 ) {

				// Prevent memory leaks
				jQuery.cleanData( getAll( elem, false ) );

				// Remove any remaining nodes
				elem.textContent = "";
			}
		}

		return this;
	},

	clone: function( dataAndEvents, deepDataAndEvents ) {
		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;

		return this.map( function() {
			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
		} );
	},

	html: function( value ) {
		return access( this, function( value ) {
			var elem = this[ 0 ] || {},
				i = 0,
				l = this.length;

			if ( value === undefined && elem.nodeType === 1 ) {
				return elem.innerHTML;
			}

			// See if we can take a shortcut and just use innerHTML
			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {

				value = jQuery.htmlPrefilter( value );

				try {
					for ( ; i < l; i++ ) {
						elem = this[ i ] || {};

						// Remove element nodes and prevent memory leaks
						if ( elem.nodeType === 1 ) {
							jQuery.cleanData( getAll( elem, false ) );
							elem.innerHTML = value;
						}
					}

					elem = 0;

				// If using innerHTML throws an exception, use the fallback method
				} catch ( e ) {}
			}

			if ( elem ) {
				this.empty().append( value );
			}
		}, null, value, arguments.length );
	},

	replaceWith: function() {
		var ignored = [];

		// Make the changes, replacing each non-ignored context element with the new content
		return domManip( this, arguments, function( elem ) {
			var parent = this.parentNode;

			if ( jQuery.inArray( this, ignored ) < 0 ) {
				jQuery.cleanData( getAll( this ) );
				if ( parent ) {
					parent.replaceChild( elem, this );
				}
			}

		// Force callback invocation
		}, ignored );
	}
} );

jQuery.each( {
	appendTo: "append",
	prependTo: "prepend",
	insertBefore: "before",
	insertAfter: "after",
	replaceAll: "replaceWith"
}, function( name, original ) {
	jQuery.fn[ name ] = function( selector ) {
		var elems,
			ret = [],
			insert = jQuery( selector ),
			last = insert.length - 1,
			i = 0;

		for ( ; i <= last; i++ ) {
			elems = i === last ? this : this.clone( true );
			jQuery( insert[ i ] )[ original ]( elems );

			// Support: Android <=4.0 only, PhantomJS 1 only
			// .get() because push.apply(_, arraylike) throws on ancient WebKit
			push.apply( ret, elems.get() );
		}

		return this.pushStack( ret );
	};
} );
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

var getStyles = function( elem ) {

		// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
		// IE throws on elements created in popups
		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
		var view = elem.ownerDocument.defaultView;

		if ( !view || !view.opener ) {
			view = window;
		}

		return view.getComputedStyle( elem );
	};

var swap = function( elem, options, callback ) {
	var ret, name,
		old = {};

	// Remember the old values, and insert the new ones
	for ( name in options ) {
		old[ name ] = elem.style[ name ];
		elem.style[ name ] = options[ name ];
	}

	ret = callback.call( elem );

	// Revert the old values
	for ( name in options ) {
		elem.style[ name ] = old[ name ];
	}

	return ret;
};


var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );



( function() {

	// Executing both pixelPosition & boxSizingReliable tests require only one layout
	// so they're executed at the same time to save the second computation.
	function computeStyleTests() {

		// This is a singleton, we need to execute it only once
		if ( !div ) {
			return;
		}

		container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
			"margin-top:1px;padding:0;border:0";
		div.style.cssText =
			"position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
			"margin:auto;border:1px;padding:1px;" +
			"width:60%;top:1%";
		documentElement.appendChild( container ).appendChild( div );

		var divStyle = window.getComputedStyle( div );
		pixelPositionVal = divStyle.top !== "1%";

		// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
		reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;

		// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
		// Some styles come back with percentage values, even though they shouldn't
		div.style.right = "60%";
		pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;

		// Support: IE 9 - 11 only
		// Detect misreporting of content dimensions for box-sizing:border-box elements
		boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;

		// Support: IE 9 only
		// Detect overflow:scroll screwiness (gh-3699)
		// Support: Chrome <=64
		// Don't get tricked when zoom affects offsetWidth (gh-4029)
		div.style.position = "absolute";
		scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;

		documentElement.removeChild( container );

		// Nullify the div so it wouldn't be stored in the memory and
		// it will also be a sign that checks already performed
		div = null;
	}

	function roundPixelMeasures( measure ) {
		return Math.round( parseFloat( measure ) );
	}

	var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
		reliableTrDimensionsVal, reliableMarginLeftVal,
		container = document.createElement( "div" ),
		div = document.createElement( "div" );

	// Finish early in limited (non-browser) environments
	if ( !div.style ) {
		return;
	}

	// Support: IE <=9 - 11 only
	// Style of cloned element affects source element cloned (#8908)
	div.style.backgroundClip = "content-box";
	div.cloneNode( true ).style.backgroundClip = "";
	support.clearCloneStyle = div.style.backgroundClip === "content-box";

	jQuery.extend( support, {
		boxSizingReliable: function() {
			computeStyleTests();
			return boxSizingReliableVal;
		},
		pixelBoxStyles: function() {
			computeStyleTests();
			return pixelBoxStylesVal;
		},
		pixelPosition: function() {
			computeStyleTests();
			return pixelPositionVal;
		},
		reliableMarginLeft: function() {
			computeStyleTests();
			return reliableMarginLeftVal;
		},
		scrollboxSize: function() {
			computeStyleTests();
			return scrollboxSizeVal;
		},

		// Support: IE 9 - 11+, Edge 15 - 18+
		// IE/Edge misreport `getComputedStyle` of table rows with width/height
		// set in CSS while `offset*` properties report correct values.
		// Behavior in IE 9 is more subtle than in newer versions & it passes
		// some versions of this test; make sure not to make it pass there!
		reliableTrDimensions: function() {
			var table, tr, trChild, trStyle;
			if ( reliableTrDimensionsVal == null ) {
				table = document.createElement( "table" );
				tr = document.createElement( "tr" );
				trChild = document.createElement( "div" );

				table.style.cssText = "position:absolute;left:-11111px";
				tr.style.height = "1px";
				trChild.style.height = "9px";

				documentElement
					.appendChild( table )
					.appendChild( tr )
					.appendChild( trChild );

				trStyle = window.getComputedStyle( tr );
				reliableTrDimensionsVal = parseInt( trStyle.height ) > 3;

				documentElement.removeChild( table );
			}
			return reliableTrDimensionsVal;
		}
	} );
} )();


function curCSS( elem, name, computed ) {
	var width, minWidth, maxWidth, ret,

		// Support: Firefox 51+
		// Retrieving style before computed somehow
		// fixes an issue with getting wrong values
		// on detached elements
		style = elem.style;

	computed = computed || getStyles( elem );

	// getPropertyValue is needed for:
	//   .css('filter') (IE 9 only, #12537)
	//   .css('--customProperty) (#3144)
	if ( computed ) {
		ret = computed.getPropertyValue( name ) || computed[ name ];

		if ( ret === "" && !isAttached( elem ) ) {
			ret = jQuery.style( elem, name );
		}

		// A tribute to the "awesome hack by Dean Edwards"
		// Android Browser returns percentage for some values,
		// but width seems to be reliably pixels.
		// This is against the CSSOM draft spec:
		// https://drafts.csswg.org/cssom/#resolved-values
		if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {

			// Remember the original values
			width = style.width;
			minWidth = style.minWidth;
			maxWidth = style.maxWidth;

			// Put in the new values to get a computed value out
			style.minWidth = style.maxWidth = style.width = ret;
			ret = computed.width;

			// Revert the changed values
			style.width = width;
			style.minWidth = minWidth;
			style.maxWidth = maxWidth;
		}
	}

	return ret !== undefined ?

		// Support: IE <=9 - 11 only
		// IE returns zIndex value as an integer.
		ret + "" :
		ret;
}


function addGetHookIf( conditionFn, hookFn ) {

	// Define the hook, we'll check on the first run if it's really needed.
	return {
		get: function() {
			if ( conditionFn() ) {

				// Hook not needed (or it's not possible to use it due
				// to missing dependency), remove it.
				delete this.get;
				return;
			}

			// Hook needed; redefine it so that the support test is not executed again.
			return ( this.get = hookFn ).apply( this, arguments );
		}
	};
}


var cssPrefixes = [ "Webkit", "Moz", "ms" ],
	emptyStyle = document.createElement( "div" ).style,
	vendorProps = {};

// Return a vendor-prefixed property or undefined
function vendorPropName( name ) {

	// Check for vendor prefixed names
	var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
		i = cssPrefixes.length;

	while ( i-- ) {
		name = cssPrefixes[ i ] + capName;
		if ( name in emptyStyle ) {
			return name;
		}
	}
}

// Return a potentially-mapped jQuery.cssProps or vendor prefixed property
function finalPropName( name ) {
	var final = jQuery.cssProps[ name ] || vendorProps[ name ];

	if ( final ) {
		return final;
	}
	if ( name in emptyStyle ) {
		return name;
	}
	return vendorProps[ name ] = vendorPropName( name ) || name;
}


var

	// Swappable if display is none or starts with table
	// except "table", "table-cell", or "table-caption"
	// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
	rcustomProp = /^--/,
	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
	cssNormalTransform = {
		letterSpacing: "0",
		fontWeight: "400"
	};

function setPositiveNumber( _elem, value, subtract ) {

	// Any relative (+/-) values have already been
	// normalized at this point
	var matches = rcssNum.exec( value );
	return matches ?

		// Guard against undefined "subtract", e.g., when used as in cssHooks
		Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
		value;
}

function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
	var i = dimension === "width" ? 1 : 0,
		extra = 0,
		delta = 0;

	// Adjustment may not be necessary
	if ( box === ( isBorderBox ? "border" : "content" ) ) {
		return 0;
	}

	for ( ; i < 4; i += 2 ) {

		// Both box models exclude margin
		if ( box === "margin" ) {
			delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
		}

		// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
		if ( !isBorderBox ) {

			// Add padding
			delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );

			// For "border" or "margin", add border
			if ( box !== "padding" ) {
				delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );

			// But still keep track of it otherwise
			} else {
				extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}

		// If we get here with a border-box (content + padding + border), we're seeking "content" or
		// "padding" or "margin"
		} else {

			// For "content", subtract padding
			if ( box === "content" ) {
				delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
			}

			// For "content" or "padding", subtract border
			if ( box !== "margin" ) {
				delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
			}
		}
	}

	// Account for positive content-box scroll gutter when requested by providing computedVal
	if ( !isBorderBox && computedVal >= 0 ) {

		// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
		// Assuming integer scroll gutter, subtract the rest and round down
		delta += Math.max( 0, Math.ceil(
			elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
			computedVal -
			delta -
			extra -
			0.5

		// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
		// Use an explicit zero to avoid NaN (gh-3964)
		) ) || 0;
	}

	return delta;
}

function getWidthOrHeight( elem, dimension, extra ) {

	// Start with computed style
	var styles = getStyles( elem ),

		// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
		// Fake content-box until we know it's needed to know the true value.
		boxSizingNeeded = !support.boxSizingReliable() || extra,
		isBorderBox = boxSizingNeeded &&
			jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
		valueIsBorderBox = isBorderBox,

		val = curCSS( elem, dimension, styles ),
		offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );

	// Support: Firefox <=54
	// Return a confounding non-pixel value or feign ignorance, as appropriate.
	if ( rnumnonpx.test( val ) ) {
		if ( !extra ) {
			return val;
		}
		val = "auto";
	}


	// Support: IE 9 - 11 only
	// Use offsetWidth/offsetHeight for when box sizing is unreliable.
	// In those cases, the computed value can be trusted to be border-box.
	if ( ( !support.boxSizingReliable() && isBorderBox ||

		// Support: IE 10 - 11+, Edge 15 - 18+
		// IE/Edge misreport `getComputedStyle` of table rows with width/height
		// set in CSS while `offset*` properties report correct values.
		// Interestingly, in some cases IE 9 doesn't suffer from this issue.
		!support.reliableTrDimensions() && nodeName( elem, "tr" ) ||

		// Fall back to offsetWidth/offsetHeight when value is "auto"
		// This happens for inline elements with no explicit setting (gh-3571)
		val === "auto" ||

		// Support: Android <=4.1 - 4.3 only
		// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
		!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&

		// Make sure the element is visible & connected
		elem.getClientRects().length ) {

		isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";

		// Where available, offsetWidth/offsetHeight approximate border box dimensions.
		// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
		// retrieved value as a content box dimension.
		valueIsBorderBox = offsetProp in elem;
		if ( valueIsBorderBox ) {
			val = elem[ offsetProp ];
		}
	}

	// Normalize "" and auto
	val = parseFloat( val ) || 0;

	// Adjust for the element's box model
	return ( val +
		boxModelAdjustment(
			elem,
			dimension,
			extra || ( isBorderBox ? "border" : "content" ),
			valueIsBorderBox,
			styles,

			// Provide the current computed size to request scroll gutter calculation (gh-3589)
			val
		)
	) + "px";
}

jQuery.extend( {

	// Add in style property hooks for overriding the default
	// behavior of getting and setting a style property
	cssHooks: {
		opacity: {
			get: function( elem, computed ) {
				if ( computed ) {

					// We should always get a number back from opacity
					var ret = curCSS( elem, "opacity" );
					return ret === "" ? "1" : ret;
				}
			}
		}
	},

	// Don't automatically add "px" to these possibly-unitless properties
	cssNumber: {
		"animationIterationCount": true,
		"columnCount": true,
		"fillOpacity": true,
		"flexGrow": true,
		"flexShrink": true,
		"fontWeight": true,
		"gridArea": true,
		"gridColumn": true,
		"gridColumnEnd": true,
		"gridColumnStart": true,
		"gridRow": true,
		"gridRowEnd": true,
		"gridRowStart": true,
		"lineHeight": true,
		"opacity": true,
		"order": true,
		"orphans": true,
		"widows": true,
		"zIndex": true,
		"zoom": true
	},

	// Add in properties whose names you wish to fix before
	// setting or getting the value
	cssProps: {},

	// Get and set the style property on a DOM Node
	style: function( elem, name, value, extra ) {

		// Don't set styles on text and comment nodes
		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
			return;
		}

		// Make sure that we're working with the right name
		var ret, type, hooks,
			origName = camelCase( name ),
			isCustomProp = rcustomProp.test( name ),
			style = elem.style;

		// Make sure that we're working with the right name. We don't
		// want to query the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Gets hook for the prefixed version, then unprefixed version
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// Check if we're setting a value
		if ( value !== undefined ) {
			type = typeof value;

			// Convert "+=" or "-=" to relative numbers (#7345)
			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
				value = adjustCSS( elem, name, ret );

				// Fixes bug #9237
				type = "number";
			}

			// Make sure that null and NaN values aren't set (#7116)
			if ( value == null || value !== value ) {
				return;
			}

			// If a number was passed in, add the unit (except for certain CSS properties)
			// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
			// "px" to a few hardcoded values.
			if ( type === "number" && !isCustomProp ) {
				value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
			}

			// background-* props affect original clone's values
			if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
				style[ name ] = "inherit";
			}

			// If a hook was provided, use that value, otherwise just set the specified value
			if ( !hooks || !( "set" in hooks ) ||
				( value = hooks.set( elem, value, extra ) ) !== undefined ) {

				if ( isCustomProp ) {
					style.setProperty( name, value );
				} else {
					style[ name ] = value;
				}
			}

		} else {

			// If a hook was provided get the non-computed value from there
			if ( hooks && "get" in hooks &&
				( ret = hooks.get( elem, false, extra ) ) !== undefined ) {

				return ret;
			}

			// Otherwise just get the value from the style object
			return style[ name ];
		}
	},

	css: function( elem, name, extra, styles ) {
		var val, num, hooks,
			origName = camelCase( name ),
			isCustomProp = rcustomProp.test( name );

		// Make sure that we're working with the right name. We don't
		// want to modify the value if it is a CSS custom property
		// since they are user-defined.
		if ( !isCustomProp ) {
			name = finalPropName( origName );
		}

		// Try prefixed name followed by the unprefixed name
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// If a hook was provided get the computed value from there
		if ( hooks && "get" in hooks ) {
			val = hooks.get( elem, true, extra );
		}

		// Otherwise, if a way to get the computed value exists, use that
		if ( val === undefined ) {
			val = curCSS( elem, name, styles );
		}

		// Convert "normal" to computed value
		if ( val === "normal" && name in cssNormalTransform ) {
			val = cssNormalTransform[ name ];
		}

		// Make numeric if forced or a qualifier was provided and val looks numeric
		if ( extra === "" || extra ) {
			num = parseFloat( val );
			return extra === true || isFinite( num ) ? num || 0 : val;
		}

		return val;
	}
} );

jQuery.each( [ "height", "width" ], function( _i, dimension ) {
	jQuery.cssHooks[ dimension ] = {
		get: function( elem, computed, extra ) {
			if ( computed ) {

				// Certain elements can have dimension info if we invisibly show them
				// but it must have a current display style that would benefit
				return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&

					// Support: Safari 8+
					// Table columns in Safari have non-zero offsetWidth & zero
					// getBoundingClientRect().width unless display is changed.
					// Support: IE <=11 only
					// Running getBoundingClientRect on a disconnected node
					// in IE throws an error.
					( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
						swap( elem, cssShow, function() {
							return getWidthOrHeight( elem, dimension, extra );
						} ) :
						getWidthOrHeight( elem, dimension, extra );
			}
		},

		set: function( elem, value, extra ) {
			var matches,
				styles = getStyles( elem ),

				// Only read styles.position if the test has a chance to fail
				// to avoid forcing a reflow.
				scrollboxSizeBuggy = !support.scrollboxSize() &&
					styles.position === "absolute",

				// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
				boxSizingNeeded = scrollboxSizeBuggy || extra,
				isBorderBox = boxSizingNeeded &&
					jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
				subtract = extra ?
					boxModelAdjustment(
						elem,
						dimension,
						extra,
						isBorderBox,
						styles
					) :
					0;

			// Account for unreliable border-box dimensions by comparing offset* to computed and
			// faking a content-box to get border and padding (gh-3699)
			if ( isBorderBox && scrollboxSizeBuggy ) {
				subtract -= Math.ceil(
					elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
					parseFloat( styles[ dimension ] ) -
					boxModelAdjustment( elem, dimension, "border", false, styles ) -
					0.5
				);
			}

			// Convert to pixels if value adjustment is needed
			if ( subtract && ( matches = rcssNum.exec( value ) ) &&
				( matches[ 3 ] || "px" ) !== "px" ) {

				elem.style[ dimension ] = value;
				value = jQuery.css( elem, dimension );
			}

			return setPositiveNumber( elem, value, subtract );
		}
	};
} );

jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
	function( elem, computed ) {
		if ( computed ) {
			return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
				elem.getBoundingClientRect().left -
					swap( elem, { marginLeft: 0 }, function() {
						return elem.getBoundingClientRect().left;
					} )
				) + "px";
		}
	}
);

// These hooks are used by animate to expand properties
jQuery.each( {
	margin: "",
	padding: "",
	border: "Width"
}, function( prefix, suffix ) {
	jQuery.cssHooks[ prefix + suffix ] = {
		expand: function( value ) {
			var i = 0,
				expanded = {},

				// Assumes a single number if not a string
				parts = typeof value === "string" ? value.split( " " ) : [ value ];

			for ( ; i < 4; i++ ) {
				expanded[ prefix + cssExpand[ i ] + suffix ] =
					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
			}

			return expanded;
		}
	};

	if ( prefix !== "margin" ) {
		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
	}
} );

jQuery.fn.extend( {
	css: function( name, value ) {
		return access( this, function( elem, name, value ) {
			var styles, len,
				map = {},
				i = 0;

			if ( Array.isArray( name ) ) {
				styles = getStyles( elem );
				len = name.length;

				for ( ; i < len; i++ ) {
					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
				}

				return map;
			}

			return value !== undefined ?
				jQuery.style( elem, name, value ) :
				jQuery.css( elem, name );
		}, name, value, arguments.length > 1 );
	}
} );


function Tween( elem, options, prop, end, easing ) {
	return new Tween.prototype.init( elem, options, prop, end, easing );
}
jQuery.Tween = Tween;

Tween.prototype = {
	constructor: Tween,
	init: function( elem, options, prop, end, easing, unit ) {
		this.elem = elem;
		this.prop = prop;
		this.easing = easing || jQuery.easing._default;
		this.options = options;
		this.start = this.now = this.cur();
		this.end = end;
		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
	},
	cur: function() {
		var hooks = Tween.propHooks[ this.prop ];

		return hooks && hooks.get ?
			hooks.get( this ) :
			Tween.propHooks._default.get( this );
	},
	run: function( percent ) {
		var eased,
			hooks = Tween.propHooks[ this.prop ];

		if ( this.options.duration ) {
			this.pos = eased = jQuery.easing[ this.easing ](
				percent, this.options.duration * percent, 0, 1, this.options.duration
			);
		} else {
			this.pos = eased = percent;
		}
		this.now = ( this.end - this.start ) * eased + this.start;

		if ( this.options.step ) {
			this.options.step.call( this.elem, this.now, this );
		}

		if ( hooks && hooks.set ) {
			hooks.set( this );
		} else {
			Tween.propHooks._default.set( this );
		}
		return this;
	}
};

Tween.prototype.init.prototype = Tween.prototype;

Tween.propHooks = {
	_default: {
		get: function( tween ) {
			var result;

			// Use a property on the element directly when it is not a DOM element,
			// or when there is no matching style property that exists.
			if ( tween.elem.nodeType !== 1 ||
				tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
				return tween.elem[ tween.prop ];
			}

			// Passing an empty string as a 3rd parameter to .css will automatically
			// attempt a parseFloat and fallback to a string if the parse fails.
			// Simple values such as "10px" are parsed to Float;
			// complex values such as "rotate(1rad)" are returned as-is.
			result = jQuery.css( tween.elem, tween.prop, "" );

			// Empty strings, null, undefined and "auto" are converted to 0.
			return !result || result === "auto" ? 0 : result;
		},
		set: function( tween ) {

			// Use step hook for back compat.
			// Use cssHook if its there.
			// Use .style if available and use plain properties where available.
			if ( jQuery.fx.step[ tween.prop ] ) {
				jQuery.fx.step[ tween.prop ]( tween );
			} else if ( tween.elem.nodeType === 1 && (
					jQuery.cssHooks[ tween.prop ] ||
					tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
			} else {
				tween.elem[ tween.prop ] = tween.now;
			}
		}
	}
};

// Support: IE <=9 only
// Panic based approach to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
	set: function( tween ) {
		if ( tween.elem.nodeType && tween.elem.parentNode ) {
			tween.elem[ tween.prop ] = tween.now;
		}
	}
};

jQuery.easing = {
	linear: function( p ) {
		return p;
	},
	swing: function( p ) {
		return 0.5 - Math.cos( p * Math.PI ) / 2;
	},
	_default: "swing"
};

jQuery.fx = Tween.prototype.init;

// Back compat <1.8 extension point
jQuery.fx.step = {};




var
	fxNow, inProgress,
	rfxtypes = /^(?:toggle|show|hide)$/,
	rrun = /queueHooks$/;

function schedule() {
	if ( inProgress ) {
		if ( document.hidden === false && window.requestAnimationFrame ) {
			window.requestAnimationFrame( schedule );
		} else {
			window.setTimeout( schedule, jQuery.fx.interval );
		}

		jQuery.fx.tick();
	}
}

// Animations created synchronously will run synchronously
function createFxNow() {
	window.setTimeout( function() {
		fxNow = undefined;
	} );
	return ( fxNow = Date.now() );
}

// Generate parameters to create a standard animation
function genFx( type, includeWidth ) {
	var which,
		i = 0,
		attrs = { height: type };

	// If we include width, step value is 1 to do all cssExpand values,
	// otherwise step value is 2 to skip over Left and Right
	includeWidth = includeWidth ? 1 : 0;
	for ( ; i < 4; i += 2 - includeWidth ) {
		which = cssExpand[ i ];
		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
	}

	if ( includeWidth ) {
		attrs.opacity = attrs.width = type;
	}

	return attrs;
}

function createTween( value, prop, animation ) {
	var tween,
		collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
		index = 0,
		length = collection.length;
	for ( ; index < length; index++ ) {
		if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {

			// We're done with this property
			return tween;
		}
	}
}

function defaultPrefilter( elem, props, opts ) {
	var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
		isBox = "width" in props || "height" in props,
		anim = this,
		orig = {},
		style = elem.style,
		hidden = elem.nodeType && isHiddenWithinTree( elem ),
		dataShow = dataPriv.get( elem, "fxshow" );

	// Queue-skipping animations hijack the fx hooks
	if ( !opts.queue ) {
		hooks = jQuery._queueHooks( elem, "fx" );
		if ( hooks.unqueued == null ) {
			hooks.unqueued = 0;
			oldfire = hooks.empty.fire;
			hooks.empty.fire = function() {
				if ( !hooks.unqueued ) {
					oldfire();
				}
			};
		}
		hooks.unqueued++;

		anim.always( function() {

			// Ensure the complete handler is called before this completes
			anim.always( function() {
				hooks.unqueued--;
				if ( !jQuery.queue( elem, "fx" ).length ) {
					hooks.empty.fire();
				}
			} );
		} );
	}

	// Detect show/hide animations
	for ( prop in props ) {
		value = props[ prop ];
		if ( rfxtypes.test( value ) ) {
			delete props[ prop ];
			toggle = toggle || value === "toggle";
			if ( value === ( hidden ? "hide" : "show" ) ) {

				// Pretend to be hidden if this is a "show" and
				// there is still data from a stopped show/hide
				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
					hidden = true;

				// Ignore all other no-op show/hide data
				} else {
					continue;
				}
			}
			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
		}
	}

	// Bail out if this is a no-op like .hide().hide()
	propTween = !jQuery.isEmptyObject( props );
	if ( !propTween && jQuery.isEmptyObject( orig ) ) {
		return;
	}

	// Restrict "overflow" and "display" styles during box animations
	if ( isBox && elem.nodeType === 1 ) {

		// Support: IE <=9 - 11, Edge 12 - 15
		// Record all 3 overflow attributes because IE does not infer the shorthand
		// from identically-valued overflowX and overflowY and Edge just mirrors
		// the overflowX value there.
		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];

		// Identify a display type, preferring old show/hide data over the CSS cascade
		restoreDisplay = dataShow && dataShow.display;
		if ( restoreDisplay == null ) {
			restoreDisplay = dataPriv.get( elem, "display" );
		}
		display = jQuery.css( elem, "display" );
		if ( display === "none" ) {
			if ( restoreDisplay ) {
				display = restoreDisplay;
			} else {

				// Get nonempty value(s) by temporarily forcing visibility
				showHide( [ elem ], true );
				restoreDisplay = elem.style.display || restoreDisplay;
				display = jQuery.css( elem, "display" );
				showHide( [ elem ] );
			}
		}

		// Animate inline elements as inline-block
		if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
			if ( jQuery.css( elem, "float" ) === "none" ) {

				// Restore the original display value at the end of pure show/hide animations
				if ( !propTween ) {
					anim.done( function() {
						style.display = restoreDisplay;
					} );
					if ( restoreDisplay == null ) {
						display = style.display;
						restoreDisplay = display === "none" ? "" : display;
					}
				}
				style.display = "inline-block";
			}
		}
	}

	if ( opts.overflow ) {
		style.overflow = "hidden";
		anim.always( function() {
			style.overflow = opts.overflow[ 0 ];
			style.overflowX = opts.overflow[ 1 ];
			style.overflowY = opts.overflow[ 2 ];
		} );
	}

	// Implement show/hide animations
	propTween = false;
	for ( prop in orig ) {

		// General show/hide setup for this element animation
		if ( !propTween ) {
			if ( dataShow ) {
				if ( "hidden" in dataShow ) {
					hidden = dataShow.hidden;
				}
			} else {
				dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
			}

			// Store hidden/visible for toggle so `.stop().toggle()` "reverses"
			if ( toggle ) {
				dataShow.hidden = !hidden;
			}

			// Show elements before animating them
			if ( hidden ) {
				showHide( [ elem ], true );
			}

			/* eslint-disable no-loop-func */

			anim.done( function() {

			/* eslint-enable no-loop-func */

				// The final step of a "hide" animation is actually hiding the element
				if ( !hidden ) {
					showHide( [ elem ] );
				}
				dataPriv.remove( elem, "fxshow" );
				for ( prop in orig ) {
					jQuery.style( elem, prop, orig[ prop ] );
				}
			} );
		}

		// Per-property setup
		propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
		if ( !( prop in dataShow ) ) {
			dataShow[ prop ] = propTween.start;
			if ( hidden ) {
				propTween.end = propTween.start;
				propTween.start = 0;
			}
		}
	}
}

function propFilter( props, specialEasing ) {
	var index, name, easing, value, hooks;

	// camelCase, specialEasing and expand cssHook pass
	for ( index in props ) {
		name = camelCase( index );
		easing = specialEasing[ name ];
		value = props[ index ];
		if ( Array.isArray( value ) ) {
			easing = value[ 1 ];
			value = props[ index ] = value[ 0 ];
		}

		if ( index !== name ) {
			props[ name ] = value;
			delete props[ index ];
		}

		hooks = jQuery.cssHooks[ name ];
		if ( hooks && "expand" in hooks ) {
			value = hooks.expand( value );
			delete props[ name ];

			// Not quite $.extend, this won't overwrite existing keys.
			// Reusing 'index' because we have the correct "name"
			for ( index in value ) {
				if ( !( index in props ) ) {
					props[ index ] = value[ index ];
					specialEasing[ index ] = easing;
				}
			}
		} else {
			specialEasing[ name ] = easing;
		}
	}
}

function Animation( elem, properties, options ) {
	var result,
		stopped,
		index = 0,
		length = Animation.prefilters.length,
		deferred = jQuery.Deferred().always( function() {

			// Don't match elem in the :animated selector
			delete tick.elem;
		} ),
		tick = function() {
			if ( stopped ) {
				return false;
			}
			var currentTime = fxNow || createFxNow(),
				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),

				// Support: Android 2.3 only
				// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
				temp = remaining / animation.duration || 0,
				percent = 1 - temp,
				index = 0,
				length = animation.tweens.length;

			for ( ; index < length; index++ ) {
				animation.tweens[ index ].run( percent );
			}

			deferred.notifyWith( elem, [ animation, percent, remaining ] );

			// If there's more to do, yield
			if ( percent < 1 && length ) {
				return remaining;
			}

			// If this was an empty animation, synthesize a final progress notification
			if ( !length ) {
				deferred.notifyWith( elem, [ animation, 1, 0 ] );
			}

			// Resolve the animation and report its conclusion
			deferred.resolveWith( elem, [ animation ] );
			return false;
		},
		animation = deferred.promise( {
			elem: elem,
			props: jQuery.extend( {}, properties ),
			opts: jQuery.extend( true, {
				specialEasing: {},
				easing: jQuery.easing._default
			}, options ),
			originalProperties: properties,
			originalOptions: options,
			startTime: fxNow || createFxNow(),
			duration: options.duration,
			tweens: [],
			createTween: function( prop, end ) {
				var tween = jQuery.Tween( elem, animation.opts, prop, end,
						animation.opts.specialEasing[ prop ] || animation.opts.easing );
				animation.tweens.push( tween );
				return tween;
			},
			stop: function( gotoEnd ) {
				var index = 0,

					// If we are going to the end, we want to run all the tweens
					// otherwise we skip this part
					length = gotoEnd ? animation.tweens.length : 0;
				if ( stopped ) {
					return this;
				}
				stopped = true;
				for ( ; index < length; index++ ) {
					animation.tweens[ index ].run( 1 );
				}

				// Resolve when we played the last frame; otherwise, reject
				if ( gotoEnd ) {
					deferred.notifyWith( elem, [ animation, 1, 0 ] );
					deferred.resolveWith( elem, [ animation, gotoEnd ] );
				} else {
					deferred.rejectWith( elem, [ animation, gotoEnd ] );
				}
				return this;
			}
		} ),
		props = animation.props;

	propFilter( props, animation.opts.specialEasing );

	for ( ; index < length; index++ ) {
		result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
		if ( result ) {
			if ( isFunction( result.stop ) ) {
				jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
					result.stop.bind( result );
			}
			return result;
		}
	}

	jQuery.map( props, createTween, animation );

	if ( isFunction( animation.opts.start ) ) {
		animation.opts.start.call( elem, animation );
	}

	// Attach callbacks from options
	animation
		.progress( animation.opts.progress )
		.done( animation.opts.done, animation.opts.complete )
		.fail( animation.opts.fail )
		.always( animation.opts.always );

	jQuery.fx.timer(
		jQuery.extend( tick, {
			elem: elem,
			anim: animation,
			queue: animation.opts.queue
		} )
	);

	return animation;
}

jQuery.Animation = jQuery.extend( Animation, {

	tweeners: {
		"*": [ function( prop, value ) {
			var tween = this.createTween( prop, value );
			adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
			return tween;
		} ]
	},

	tweener: function( props, callback ) {
		if ( isFunction( props ) ) {
			callback = props;
			props = [ "*" ];
		} else {
			props = props.match( rnothtmlwhite );
		}

		var prop,
			index = 0,
			length = props.length;

		for ( ; index < length; index++ ) {
			prop = props[ index ];
			Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
			Animation.tweeners[ prop ].unshift( callback );
		}
	},

	prefilters: [ defaultPrefilter ],

	prefilter: function( callback, prepend ) {
		if ( prepend ) {
			Animation.prefilters.unshift( callback );
		} else {
			Animation.prefilters.push( callback );
		}
	}
} );

jQuery.speed = function( speed, easing, fn ) {
	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
		complete: fn || !fn && easing ||
			isFunction( speed ) && speed,
		duration: speed,
		easing: fn && easing || easing && !isFunction( easing ) && easing
	};

	// Go to the end state if fx are off
	if ( jQuery.fx.off ) {
		opt.duration = 0;

	} else {
		if ( typeof opt.duration !== "number" ) {
			if ( opt.duration in jQuery.fx.speeds ) {
				opt.duration = jQuery.fx.speeds[ opt.duration ];

			} else {
				opt.duration = jQuery.fx.speeds._default;
			}
		}
	}

	// Normalize opt.queue - true/undefined/null -> "fx"
	if ( opt.queue == null || opt.queue === true ) {
		opt.queue = "fx";
	}

	// Queueing
	opt.old = opt.complete;

	opt.complete = function() {
		if ( isFunction( opt.old ) ) {
			opt.old.call( this );
		}

		if ( opt.queue ) {
			jQuery.dequeue( this, opt.queue );
		}
	};

	return opt;
};

jQuery.fn.extend( {
	fadeTo: function( speed, to, easing, callback ) {

		// Show any hidden elements after setting opacity to 0
		return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()

			// Animate to the value specified
			.end().animate( { opacity: to }, speed, easing, callback );
	},
	animate: function( prop, speed, easing, callback ) {
		var empty = jQuery.isEmptyObject( prop ),
			optall = jQuery.speed( speed, easing, callback ),
			doAnimation = function() {

				// Operate on a copy of prop so per-property easing won't be lost
				var anim = Animation( this, jQuery.extend( {}, prop ), optall );

				// Empty animations, or finishing resolves immediately
				if ( empty || dataPriv.get( this, "finish" ) ) {
					anim.stop( true );
				}
			};
			doAnimation.finish = doAnimation;

		return empty || optall.queue === false ?
			this.each( doAnimation ) :
			this.queue( optall.queue, doAnimation );
	},
	stop: function( type, clearQueue, gotoEnd ) {
		var stopQueue = function( hooks ) {
			var stop = hooks.stop;
			delete hooks.stop;
			stop( gotoEnd );
		};

		if ( typeof type !== "string" ) {
			gotoEnd = clearQueue;
			clearQueue = type;
			type = undefined;
		}
		if ( clearQueue ) {
			this.queue( type || "fx", [] );
		}

		return this.each( function() {
			var dequeue = true,
				index = type != null && type + "queueHooks",
				timers = jQuery.timers,
				data = dataPriv.get( this );

			if ( index ) {
				if ( data[ index ] && data[ index ].stop ) {
					stopQueue( data[ index ] );
				}
			} else {
				for ( index in data ) {
					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
						stopQueue( data[ index ] );
					}
				}
			}

			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this &&
					( type == null || timers[ index ].queue === type ) ) {

					timers[ index ].anim.stop( gotoEnd );
					dequeue = false;
					timers.splice( index, 1 );
				}
			}

			// Start the next in the queue if the last step wasn't forced.
			// Timers currently will call their complete callbacks, which
			// will dequeue but only if they were gotoEnd.
			if ( dequeue || !gotoEnd ) {
				jQuery.dequeue( this, type );
			}
		} );
	},
	finish: function( type ) {
		if ( type !== false ) {
			type = type || "fx";
		}
		return this.each( function() {
			var index,
				data = dataPriv.get( this ),
				queue = data[ type + "queue" ],
				hooks = data[ type + "queueHooks" ],
				timers = jQuery.timers,
				length = queue ? queue.length : 0;

			// Enable finishing flag on private data
			data.finish = true;

			// Empty the queue first
			jQuery.queue( this, type, [] );

			if ( hooks && hooks.stop ) {
				hooks.stop.call( this, true );
			}

			// Look for any active animations, and finish them
			for ( index = timers.length; index--; ) {
				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
					timers[ index ].anim.stop( true );
					timers.splice( index, 1 );
				}
			}

			// Look for any animations in the old queue and finish them
			for ( index = 0; index < length; index++ ) {
				if ( queue[ index ] && queue[ index ].finish ) {
					queue[ index ].finish.call( this );
				}
			}

			// Turn off finishing flag
			delete data.finish;
		} );
	}
} );

jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) {
	var cssFn = jQuery.fn[ name ];
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return speed == null || typeof speed === "boolean" ?
			cssFn.apply( this, arguments ) :
			this.animate( genFx( name, true ), speed, easing, callback );
	};
} );

// Generate shortcuts for custom animations
jQuery.each( {
	slideDown: genFx( "show" ),
	slideUp: genFx( "hide" ),
	slideToggle: genFx( "toggle" ),
	fadeIn: { opacity: "show" },
	fadeOut: { opacity: "hide" },
	fadeToggle: { opacity: "toggle" }
}, function( name, props ) {
	jQuery.fn[ name ] = function( speed, easing, callback ) {
		return this.animate( props, speed, easing, callback );
	};
} );

jQuery.timers = [];
jQuery.fx.tick = function() {
	var timer,
		i = 0,
		timers = jQuery.timers;

	fxNow = Date.now();

	for ( ; i < timers.length; i++ ) {
		timer = timers[ i ];

		// Run the timer and safely remove it when done (allowing for external removal)
		if ( !timer() && timers[ i ] === timer ) {
			timers.splice( i--, 1 );
		}
	}

	if ( !timers.length ) {
		jQuery.fx.stop();
	}
	fxNow = undefined;
};

jQuery.fx.timer = function( timer ) {
	jQuery.timers.push( timer );
	jQuery.fx.start();
};

jQuery.fx.interval = 13;
jQuery.fx.start = function() {
	if ( inProgress ) {
		return;
	}

	inProgress = true;
	schedule();
};

jQuery.fx.stop = function() {
	inProgress = null;
};

jQuery.fx.speeds = {
	slow: 600,
	fast: 200,

	// Default speed
	_default: 400
};


// Based off of the plugin by Clint Helfers, with permission.
// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
jQuery.fn.delay = function( time, type ) {
	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
	type = type || "fx";

	return this.queue( type, function( next, hooks ) {
		var timeout = window.setTimeout( next, time );
		hooks.stop = function() {
			window.clearTimeout( timeout );
		};
	} );
};


( function() {
	var input = document.createElement( "input" ),
		select = document.createElement( "select" ),
		opt = select.appendChild( document.createElement( "option" ) );

	input.type = "checkbox";

	// Support: Android <=4.3 only
	// Default value for a checkbox should be "on"
	support.checkOn = input.value !== "";

	// Support: IE <=11 only
	// Must access selectedIndex to make default options select
	support.optSelected = opt.selected;

	// Support: IE <=11 only
	// An input loses its value after becoming a radio
	input = document.createElement( "input" );
	input.value = "t";
	input.type = "radio";
	support.radioValue = input.value === "t";
} )();


var boolHook,
	attrHandle = jQuery.expr.attrHandle;

jQuery.fn.extend( {
	attr: function( name, value ) {
		return access( this, jQuery.attr, name, value, arguments.length > 1 );
	},

	removeAttr: function( name ) {
		return this.each( function() {
			jQuery.removeAttr( this, name );
		} );
	}
} );

jQuery.extend( {
	attr: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set attributes on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		// Fallback to prop when attributes are not supported
		if ( typeof elem.getAttribute === "undefined" ) {
			return jQuery.prop( elem, name, value );
		}

		// Attribute hooks are determined by the lowercase version
		// Grab necessary hook if one is defined
		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
			hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
				( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
		}

		if ( value !== undefined ) {
			if ( value === null ) {
				jQuery.removeAttr( elem, name );
				return;
			}

			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			elem.setAttribute( name, value + "" );
			return value;
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		ret = jQuery.find.attr( elem, name );

		// Non-existent attributes return null, we normalize to undefined
		return ret == null ? undefined : ret;
	},

	attrHooks: {
		type: {
			set: function( elem, value ) {
				if ( !support.radioValue && value === "radio" &&
					nodeName( elem, "input" ) ) {
					var val = elem.value;
					elem.setAttribute( "type", value );
					if ( val ) {
						elem.value = val;
					}
					return value;
				}
			}
		}
	},

	removeAttr: function( elem, value ) {
		var name,
			i = 0,

			// Attribute names can contain non-HTML whitespace characters
			// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
			attrNames = value && value.match( rnothtmlwhite );

		if ( attrNames && elem.nodeType === 1 ) {
			while ( ( name = attrNames[ i++ ] ) ) {
				elem.removeAttribute( name );
			}
		}
	}
} );

// Hooks for boolean attributes
boolHook = {
	set: function( elem, value, name ) {
		if ( value === false ) {

			// Remove boolean attributes when set to false
			jQuery.removeAttr( elem, name );
		} else {
			elem.setAttribute( name, name );
		}
		return name;
	}
};

jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) {
	var getter = attrHandle[ name ] || jQuery.find.attr;

	attrHandle[ name ] = function( elem, name, isXML ) {
		var ret, handle,
			lowercaseName = name.toLowerCase();

		if ( !isXML ) {

			// Avoid an infinite loop by temporarily removing this function from the getter
			handle = attrHandle[ lowercaseName ];
			attrHandle[ lowercaseName ] = ret;
			ret = getter( elem, name, isXML ) != null ?
				lowercaseName :
				null;
			attrHandle[ lowercaseName ] = handle;
		}
		return ret;
	};
} );




var rfocusable = /^(?:input|select|textarea|button)$/i,
	rclickable = /^(?:a|area)$/i;

jQuery.fn.extend( {
	prop: function( name, value ) {
		return access( this, jQuery.prop, name, value, arguments.length > 1 );
	},

	removeProp: function( name ) {
		return this.each( function() {
			delete this[ jQuery.propFix[ name ] || name ];
		} );
	}
} );

jQuery.extend( {
	prop: function( elem, name, value ) {
		var ret, hooks,
			nType = elem.nodeType;

		// Don't get/set properties on text, comment and attribute nodes
		if ( nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {

			// Fix name and attach hooks
			name = jQuery.propFix[ name ] || name;
			hooks = jQuery.propHooks[ name ];
		}

		if ( value !== undefined ) {
			if ( hooks && "set" in hooks &&
				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
				return ret;
			}

			return ( elem[ name ] = value );
		}

		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
			return ret;
		}

		return elem[ name ];
	},

	propHooks: {
		tabIndex: {
			get: function( elem ) {

				// Support: IE <=9 - 11 only
				// elem.tabIndex doesn't always return the
				// correct value when it hasn't been explicitly set
				// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
				// Use proper attribute retrieval(#12072)
				var tabindex = jQuery.find.attr( elem, "tabindex" );

				if ( tabindex ) {
					return parseInt( tabindex, 10 );
				}

				if (
					rfocusable.test( elem.nodeName ) ||
					rclickable.test( elem.nodeName ) &&
					elem.href
				) {
					return 0;
				}

				return -1;
			}
		}
	},

	propFix: {
		"for": "htmlFor",
		"class": "className"
	}
} );

// Support: IE <=11 only
// Accessing the selectedIndex property
// forces the browser to respect setting selected
// on the option
// The getter ensures a default option is selected
// when in an optgroup
// eslint rule "no-unused-expressions" is disabled for this code
// since it considers such accessions noop
if ( !support.optSelected ) {
	jQuery.propHooks.selected = {
		get: function( elem ) {

			/* eslint no-unused-expressions: "off" */

			var parent = elem.parentNode;
			if ( parent && parent.parentNode ) {
				parent.parentNode.selectedIndex;
			}
			return null;
		},
		set: function( elem ) {

			/* eslint no-unused-expressions: "off" */

			var parent = elem.parentNode;
			if ( parent ) {
				parent.selectedIndex;

				if ( parent.parentNode ) {
					parent.parentNode.selectedIndex;
				}
			}
		}
	};
}

jQuery.each( [
	"tabIndex",
	"readOnly",
	"maxLength",
	"cellSpacing",
	"cellPadding",
	"rowSpan",
	"colSpan",
	"useMap",
	"frameBorder",
	"contentEditable"
], function() {
	jQuery.propFix[ this.toLowerCase() ] = this;
} );




	// Strip and collapse whitespace according to HTML spec
	// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
	function stripAndCollapse( value ) {
		var tokens = value.match( rnothtmlwhite ) || [];
		return tokens.join( " " );
	}


function getClass( elem ) {
	return elem.getAttribute && elem.getAttribute( "class" ) || "";
}

function classesToArray( value ) {
	if ( Array.isArray( value ) ) {
		return value;
	}
	if ( typeof value === "string" ) {
		return value.match( rnothtmlwhite ) || [];
	}
	return [];
}

jQuery.fn.extend( {
	addClass: function( value ) {
		var classes, elem, cur, curValue, clazz, j, finalValue,
			i = 0;

		if ( isFunction( value ) ) {
			return this.each( function( j ) {
				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		classes = classesToArray( value );

		if ( classes.length ) {
			while ( ( elem = this[ i++ ] ) ) {
				curValue = getClass( elem );
				cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					j = 0;
					while ( ( clazz = classes[ j++ ] ) ) {
						if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
							cur += clazz + " ";
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						elem.setAttribute( "class", finalValue );
					}
				}
			}
		}

		return this;
	},

	removeClass: function( value ) {
		var classes, elem, cur, curValue, clazz, j, finalValue,
			i = 0;

		if ( isFunction( value ) ) {
			return this.each( function( j ) {
				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
			} );
		}

		if ( !arguments.length ) {
			return this.attr( "class", "" );
		}

		classes = classesToArray( value );

		if ( classes.length ) {
			while ( ( elem = this[ i++ ] ) ) {
				curValue = getClass( elem );

				// This expression is here for better compressibility (see addClass)
				cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );

				if ( cur ) {
					j = 0;
					while ( ( clazz = classes[ j++ ] ) ) {

						// Remove *all* instances
						while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
							cur = cur.replace( " " + clazz + " ", " " );
						}
					}

					// Only assign if different to avoid unneeded rendering.
					finalValue = stripAndCollapse( cur );
					if ( curValue !== finalValue ) {
						elem.setAttribute( "class", finalValue );
					}
				}
			}
		}

		return this;
	},

	toggleClass: function( value, stateVal ) {
		var type = typeof value,
			isValidValue = type === "string" || Array.isArray( value );

		if ( typeof stateVal === "boolean" && isValidValue ) {
			return stateVal ? this.addClass( value ) : this.removeClass( value );
		}

		if ( isFunction( value ) ) {
			return this.each( function( i ) {
				jQuery( this ).toggleClass(
					value.call( this, i, getClass( this ), stateVal ),
					stateVal
				);
			} );
		}

		return this.each( function() {
			var className, i, self, classNames;

			if ( isValidValue ) {

				// Toggle individual class names
				i = 0;
				self = jQuery( this );
				classNames = classesToArray( value );

				while ( ( className = classNames[ i++ ] ) ) {

					// Check each className given, space separated list
					if ( self.hasClass( className ) ) {
						self.removeClass( className );
					} else {
						self.addClass( className );
					}
				}

			// Toggle whole class name
			} else if ( value === undefined || type === "boolean" ) {
				className = getClass( this );
				if ( className ) {

					// Store className if set
					dataPriv.set( this, "__className__", className );
				}

				// If the element has a class name or if we're passed `false`,
				// then remove the whole classname (if there was one, the above saved it).
				// Otherwise bring back whatever was previously saved (if anything),
				// falling back to the empty string if nothing was stored.
				if ( this.setAttribute ) {
					this.setAttribute( "class",
						className || value === false ?
						"" :
						dataPriv.get( this, "__className__" ) || ""
					);
				}
			}
		} );
	},

	hasClass: function( selector ) {
		var className, elem,
			i = 0;

		className = " " + selector + " ";
		while ( ( elem = this[ i++ ] ) ) {
			if ( elem.nodeType === 1 &&
				( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
					return true;
			}
		}

		return false;
	}
} );




var rreturn = /\r/g;

jQuery.fn.extend( {
	val: function( value ) {
		var hooks, ret, valueIsFunction,
			elem = this[ 0 ];

		if ( !arguments.length ) {
			if ( elem ) {
				hooks = jQuery.valHooks[ elem.type ] ||
					jQuery.valHooks[ elem.nodeName.toLowerCase() ];

				if ( hooks &&
					"get" in hooks &&
					( ret = hooks.get( elem, "value" ) ) !== undefined
				) {
					return ret;
				}

				ret = elem.value;

				// Handle most common string cases
				if ( typeof ret === "string" ) {
					return ret.replace( rreturn, "" );
				}

				// Handle cases where value is null/undef or number
				return ret == null ? "" : ret;
			}

			return;
		}

		valueIsFunction = isFunction( value );

		return this.each( function( i ) {
			var val;

			if ( this.nodeType !== 1 ) {
				return;
			}

			if ( valueIsFunction ) {
				val = value.call( this, i, jQuery( this ).val() );
			} else {
				val = value;
			}

			// Treat null/undefined as ""; convert numbers to string
			if ( val == null ) {
				val = "";

			} else if ( typeof val === "number" ) {
				val += "";

			} else if ( Array.isArray( val ) ) {
				val = jQuery.map( val, function( value ) {
					return value == null ? "" : value + "";
				} );
			}

			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];

			// If set returns undefined, fall back to normal setting
			if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
				this.value = val;
			}
		} );
	}
} );

jQuery.extend( {
	valHooks: {
		option: {
			get: function( elem ) {

				var val = jQuery.find.attr( elem, "value" );
				return val != null ?
					val :

					// Support: IE <=10 - 11 only
					// option.text throws exceptions (#14686, #14858)
					// Strip and collapse whitespace
					// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
					stripAndCollapse( jQuery.text( elem ) );
			}
		},
		select: {
			get: function( elem ) {
				var value, option, i,
					options = elem.options,
					index = elem.selectedIndex,
					one = elem.type === "select-one",
					values = one ? null : [],
					max = one ? index + 1 : options.length;

				if ( index < 0 ) {
					i = max;

				} else {
					i = one ? index : 0;
				}

				// Loop through all the selected options
				for ( ; i < max; i++ ) {
					option = options[ i ];

					// Support: IE <=9 only
					// IE8-9 doesn't update selected after form reset (#2551)
					if ( ( option.selected || i === index ) &&

							// Don't return options that are disabled or in a disabled optgroup
							!option.disabled &&
							( !option.parentNode.disabled ||
								!nodeName( option.parentNode, "optgroup" ) ) ) {

						// Get the specific value for the option
						value = jQuery( option ).val();

						// We don't need an array for one selects
						if ( one ) {
							return value;
						}

						// Multi-Selects return an array
						values.push( value );
					}
				}

				return values;
			},

			set: function( elem, value ) {
				var optionSet, option,
					options = elem.options,
					values = jQuery.makeArray( value ),
					i = options.length;

				while ( i-- ) {
					option = options[ i ];

					/* eslint-disable no-cond-assign */

					if ( option.selected =
						jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
					) {
						optionSet = true;
					}

					/* eslint-enable no-cond-assign */
				}

				// Force browsers to behave consistently when non-matching value is set
				if ( !optionSet ) {
					elem.selectedIndex = -1;
				}
				return values;
			}
		}
	}
} );

// Radios and checkboxes getter/setter
jQuery.each( [ "radio", "checkbox" ], function() {
	jQuery.valHooks[ this ] = {
		set: function( elem, value ) {
			if ( Array.isArray( value ) ) {
				return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
			}
		}
	};
	if ( !support.checkOn ) {
		jQuery.valHooks[ this ].get = function( elem ) {
			return elem.getAttribute( "value" ) === null ? "on" : elem.value;
		};
	}
} );




// Return jQuery for attributes-only inclusion


support.focusin = "onfocusin" in window;


var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
	stopPropagationCallback = function( e ) {
		e.stopPropagation();
	};

jQuery.extend( jQuery.event, {

	trigger: function( event, data, elem, onlyHandlers ) {

		var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
			eventPath = [ elem || document ],
			type = hasOwn.call( event, "type" ) ? event.type : event,
			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];

		cur = lastElement = tmp = elem = elem || document;

		// Don't do events on text and comment nodes
		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
			return;
		}

		// focus/blur morphs to focusin/out; ensure we're not firing them right now
		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
			return;
		}

		if ( type.indexOf( "." ) > -1 ) {

			// Namespaced trigger; create a regexp to match event type in handle()
			namespaces = type.split( "." );
			type = namespaces.shift();
			namespaces.sort();
		}
		ontype = type.indexOf( ":" ) < 0 && "on" + type;

		// Caller can pass in a jQuery.Event object, Object, or just an event type string
		event = event[ jQuery.expando ] ?
			event :
			new jQuery.Event( type, typeof event === "object" && event );

		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
		event.isTrigger = onlyHandlers ? 2 : 3;
		event.namespace = namespaces.join( "." );
		event.rnamespace = event.namespace ?
			new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
			null;

		// Clean up the event in case it is being reused
		event.result = undefined;
		if ( !event.target ) {
			event.target = elem;
		}

		// Clone any incoming data and prepend the event, creating the handler arg list
		data = data == null ?
			[ event ] :
			jQuery.makeArray( data, [ event ] );

		// Allow special events to draw outside the lines
		special = jQuery.event.special[ type ] || {};
		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
			return;
		}

		// Determine event propagation path in advance, per W3C events spec (#9951)
		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
		if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {

			bubbleType = special.delegateType || type;
			if ( !rfocusMorph.test( bubbleType + type ) ) {
				cur = cur.parentNode;
			}
			for ( ; cur; cur = cur.parentNode ) {
				eventPath.push( cur );
				tmp = cur;
			}

			// Only add window if we got to document (e.g., not plain obj or detached DOM)
			if ( tmp === ( elem.ownerDocument || document ) ) {
				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
			}
		}

		// Fire handlers on the event path
		i = 0;
		while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
			lastElement = cur;
			event.type = i > 1 ?
				bubbleType :
				special.bindType || type;

			// jQuery handler
			handle = (
					dataPriv.get( cur, "events" ) || Object.create( null )
				)[ event.type ] &&
				dataPriv.get( cur, "handle" );
			if ( handle ) {
				handle.apply( cur, data );
			}

			// Native handler
			handle = ontype && cur[ ontype ];
			if ( handle && handle.apply && acceptData( cur ) ) {
				event.result = handle.apply( cur, data );
				if ( event.result === false ) {
					event.preventDefault();
				}
			}
		}
		event.type = type;

		// If nobody prevented the default action, do it now
		if ( !onlyHandlers && !event.isDefaultPrevented() ) {

			if ( ( !special._default ||
				special._default.apply( eventPath.pop(), data ) === false ) &&
				acceptData( elem ) ) {

				// Call a native DOM method on the target with the same name as the event.
				// Don't do default actions on window, that's where global variables be (#6170)
				if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {

					// Don't re-trigger an onFOO event when we call its FOO() method
					tmp = elem[ ontype ];

					if ( tmp ) {
						elem[ ontype ] = null;
					}

					// Prevent re-triggering of the same event, since we already bubbled it above
					jQuery.event.triggered = type;

					if ( event.isPropagationStopped() ) {
						lastElement.addEventListener( type, stopPropagationCallback );
					}

					elem[ type ]();

					if ( event.isPropagationStopped() ) {
						lastElement.removeEventListener( type, stopPropagationCallback );
					}

					jQuery.event.triggered = undefined;

					if ( tmp ) {
						elem[ ontype ] = tmp;
					}
				}
			}
		}

		return event.result;
	},

	// Piggyback on a donor event to simulate a different one
	// Used only for `focus(in | out)` events
	simulate: function( type, elem, event ) {
		var e = jQuery.extend(
			new jQuery.Event(),
			event,
			{
				type: type,
				isSimulated: true
			}
		);

		jQuery.event.trigger( e, null, elem );
	}

} );

jQuery.fn.extend( {

	trigger: function( type, data ) {
		return this.each( function() {
			jQuery.event.trigger( type, data, this );
		} );
	},
	triggerHandler: function( type, data ) {
		var elem = this[ 0 ];
		if ( elem ) {
			return jQuery.event.trigger( type, data, elem, true );
		}
	}
} );


// Support: Firefox <=44
// Firefox doesn't have focus(in | out) events
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
//
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
// focus(in | out) events fire after focus & blur events,
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
if ( !support.focusin ) {
	jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {

		// Attach a single capturing handler on the document while someone wants focusin/focusout
		var handler = function( event ) {
			jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
		};

		jQuery.event.special[ fix ] = {
			setup: function() {

				// Handle: regular nodes (via `this.ownerDocument`), window
				// (via `this.document`) & document (via `this`).
				var doc = this.ownerDocument || this.document || this,
					attaches = dataPriv.access( doc, fix );

				if ( !attaches ) {
					doc.addEventListener( orig, handler, true );
				}
				dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
			},
			teardown: function() {
				var doc = this.ownerDocument || this.document || this,
					attaches = dataPriv.access( doc, fix ) - 1;

				if ( !attaches ) {
					doc.removeEventListener( orig, handler, true );
					dataPriv.remove( doc, fix );

				} else {
					dataPriv.access( doc, fix, attaches );
				}
			}
		};
	} );
}
var location = window.location;

var nonce = { guid: Date.now() };

var rquery = ( /\?/ );



// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
	var xml;
	if ( !data || typeof data !== "string" ) {
		return null;
	}

	// Support: IE 9 - 11 only
	// IE throws on parseFromString with invalid input.
	try {
		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
	} catch ( e ) {
		xml = undefined;
	}

	if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
		jQuery.error( "Invalid XML: " + data );
	}
	return xml;
};


var
	rbracket = /\[\]$/,
	rCRLF = /\r?\n/g,
	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
	rsubmittable = /^(?:input|select|textarea|keygen)/i;

function buildParams( prefix, obj, traditional, add ) {
	var name;

	if ( Array.isArray( obj ) ) {

		// Serialize array item.
		jQuery.each( obj, function( i, v ) {
			if ( traditional || rbracket.test( prefix ) ) {

				// Treat each array item as a scalar.
				add( prefix, v );

			} else {

				// Item is non-scalar (array or object), encode its numeric index.
				buildParams(
					prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
					v,
					traditional,
					add
				);
			}
		} );

	} else if ( !traditional && toType( obj ) === "object" ) {

		// Serialize object item.
		for ( name in obj ) {
			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
		}

	} else {

		// Serialize scalar item.
		add( prefix, obj );
	}
}

// Serialize an array of form elements or a set of
// key/values into a query string
jQuery.param = function( a, traditional ) {
	var prefix,
		s = [],
		add = function( key, valueOrFunction ) {

			// If value is a function, invoke it and use its return value
			var value = isFunction( valueOrFunction ) ?
				valueOrFunction() :
				valueOrFunction;

			s[ s.length ] = encodeURIComponent( key ) + "=" +
				encodeURIComponent( value == null ? "" : value );
		};

	if ( a == null ) {
		return "";
	}

	// If an array was passed in, assume that it is an array of form elements.
	if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {

		// Serialize the form elements
		jQuery.each( a, function() {
			add( this.name, this.value );
		} );

	} else {

		// If traditional, encode the "old" way (the way 1.3.2 or older
		// did it), otherwise encode params recursively.
		for ( prefix in a ) {
			buildParams( prefix, a[ prefix ], traditional, add );
		}
	}

	// Return the resulting serialization
	return s.join( "&" );
};

jQuery.fn.extend( {
	serialize: function() {
		return jQuery.param( this.serializeArray() );
	},
	serializeArray: function() {
		return this.map( function() {

			// Can add propHook for "elements" to filter or add form elements
			var elements = jQuery.prop( this, "elements" );
			return elements ? jQuery.makeArray( elements ) : this;
		} )
		.filter( function() {
			var type = this.type;

			// Use .is( ":disabled" ) so that fieldset[disabled] works
			return this.name && !jQuery( this ).is( ":disabled" ) &&
				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
				( this.checked || !rcheckableType.test( type ) );
		} )
		.map( function( _i, elem ) {
			var val = jQuery( this ).val();

			if ( val == null ) {
				return null;
			}

			if ( Array.isArray( val ) ) {
				return jQuery.map( val, function( val ) {
					return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
				} );
			}

			return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
		} ).get();
	}
} );


var
	r20 = /%20/g,
	rhash = /#.*$/,
	rantiCache = /([?&])_=[^&]*/,
	rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,

	// #7653, #8125, #8152: local protocol detection
	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
	rnoContent = /^(?:GET|HEAD)$/,
	rprotocol = /^\/\//,

	/* Prefilters
	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
	 * 2) These are called:
	 *    - BEFORE asking for a transport
	 *    - AFTER param serialization (s.data is a string if s.processData is true)
	 * 3) key is the dataType
	 * 4) the catchall symbol "*" can be used
	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
	 */
	prefilters = {},

	/* Transports bindings
	 * 1) key is the dataType
	 * 2) the catchall symbol "*" can be used
	 * 3) selection will start with transport dataType and THEN go to "*" if needed
	 */
	transports = {},

	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
	allTypes = "*/".concat( "*" ),

	// Anchor tag for parsing the document origin
	originAnchor = document.createElement( "a" );
	originAnchor.href = location.href;

// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {

	// dataTypeExpression is optional and defaults to "*"
	return function( dataTypeExpression, func ) {

		if ( typeof dataTypeExpression !== "string" ) {
			func = dataTypeExpression;
			dataTypeExpression = "*";
		}

		var dataType,
			i = 0,
			dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];

		if ( isFunction( func ) ) {

			// For each dataType in the dataTypeExpression
			while ( ( dataType = dataTypes[ i++ ] ) ) {

				// Prepend if requested
				if ( dataType[ 0 ] === "+" ) {
					dataType = dataType.slice( 1 ) || "*";
					( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );

				// Otherwise append
				} else {
					( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
				}
			}
		}
	};
}

// Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {

	var inspected = {},
		seekingTransport = ( structure === transports );

	function inspect( dataType ) {
		var selected;
		inspected[ dataType ] = true;
		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
			if ( typeof dataTypeOrTransport === "string" &&
				!seekingTransport && !inspected[ dataTypeOrTransport ] ) {

				options.dataTypes.unshift( dataTypeOrTransport );
				inspect( dataTypeOrTransport );
				return false;
			} else if ( seekingTransport ) {
				return !( selected = dataTypeOrTransport );
			}
		} );
		return selected;
	}

	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
}

// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes #9887
function ajaxExtend( target, src ) {
	var key, deep,
		flatOptions = jQuery.ajaxSettings.flatOptions || {};

	for ( key in src ) {
		if ( src[ key ] !== undefined ) {
			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
		}
	}
	if ( deep ) {
		jQuery.extend( true, target, deep );
	}

	return target;
}

/* Handles responses to an ajax request:
 * - finds the right dataType (mediates between content-type and expected dataType)
 * - returns the corresponding response
 */
function ajaxHandleResponses( s, jqXHR, responses ) {

	var ct, type, finalDataType, firstDataType,
		contents = s.contents,
		dataTypes = s.dataTypes;

	// Remove auto dataType and get content-type in the process
	while ( dataTypes[ 0 ] === "*" ) {
		dataTypes.shift();
		if ( ct === undefined ) {
			ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
		}
	}

	// Check if we're dealing with a known content-type
	if ( ct ) {
		for ( type in contents ) {
			if ( contents[ type ] && contents[ type ].test( ct ) ) {
				dataTypes.unshift( type );
				break;
			}
		}
	}

	// Check to see if we have a response for the expected dataType
	if ( dataTypes[ 0 ] in responses ) {
		finalDataType = dataTypes[ 0 ];
	} else {

		// Try convertible dataTypes
		for ( type in responses ) {
			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
				finalDataType = type;
				break;
			}
			if ( !firstDataType ) {
				firstDataType = type;
			}
		}

		// Or just use first one
		finalDataType = finalDataType || firstDataType;
	}

	// If we found a dataType
	// We add the dataType to the list if needed
	// and return the corresponding response
	if ( finalDataType ) {
		if ( finalDataType !== dataTypes[ 0 ] ) {
			dataTypes.unshift( finalDataType );
		}
		return responses[ finalDataType ];
	}
}

/* Chain conversions given the request and the original response
 * Also sets the responseXXX fields on the jqXHR instance
 */
function ajaxConvert( s, response, jqXHR, isSuccess ) {
	var conv2, current, conv, tmp, prev,
		converters = {},

		// Work with a copy of dataTypes in case we need to modify it for conversion
		dataTypes = s.dataTypes.slice();

	// Create converters map with lowercased keys
	if ( dataTypes[ 1 ] ) {
		for ( conv in s.converters ) {
			converters[ conv.toLowerCase() ] = s.converters[ conv ];
		}
	}

	current = dataTypes.shift();

	// Convert to each sequential dataType
	while ( current ) {

		if ( s.responseFields[ current ] ) {
			jqXHR[ s.responseFields[ current ] ] = response;
		}

		// Apply the dataFilter if provided
		if ( !prev && isSuccess && s.dataFilter ) {
			response = s.dataFilter( response, s.dataType );
		}

		prev = current;
		current = dataTypes.shift();

		if ( current ) {

			// There's only work to do if current dataType is non-auto
			if ( current === "*" ) {

				current = prev;

			// Convert response if prev dataType is non-auto and differs from current
			} else if ( prev !== "*" && prev !== current ) {

				// Seek a direct converter
				conv = converters[ prev + " " + current ] || converters[ "* " + current ];

				// If none found, seek a pair
				if ( !conv ) {
					for ( conv2 in converters ) {

						// If conv2 outputs current
						tmp = conv2.split( " " );
						if ( tmp[ 1 ] === current ) {

							// If prev can be converted to accepted input
							conv = converters[ prev + " " + tmp[ 0 ] ] ||
								converters[ "* " + tmp[ 0 ] ];
							if ( conv ) {

								// Condense equivalence converters
								if ( conv === true ) {
									conv = converters[ conv2 ];

								// Otherwise, insert the intermediate dataType
								} else if ( converters[ conv2 ] !== true ) {
									current = tmp[ 0 ];
									dataTypes.unshift( tmp[ 1 ] );
								}
								break;
							}
						}
					}
				}

				// Apply converter (if not an equivalence)
				if ( conv !== true ) {

					// Unless errors are allowed to bubble, catch and return them
					if ( conv && s.throws ) {
						response = conv( response );
					} else {
						try {
							response = conv( response );
						} catch ( e ) {
							return {
								state: "parsererror",
								error: conv ? e : "No conversion from " + prev + " to " + current
							};
						}
					}
				}
			}
		}
	}

	return { state: "success", data: response };
}

jQuery.extend( {

	// Counter for holding the number of active queries
	active: 0,

	// Last-Modified header cache for next request
	lastModified: {},
	etag: {},

	ajaxSettings: {
		url: location.href,
		type: "GET",
		isLocal: rlocalProtocol.test( location.protocol ),
		global: true,
		processData: true,
		async: true,
		contentType: "application/x-www-form-urlencoded; charset=UTF-8",

		/*
		timeout: 0,
		data: null,
		dataType: null,
		username: null,
		password: null,
		cache: null,
		throws: false,
		traditional: false,
		headers: {},
		*/

		accepts: {
			"*": allTypes,
			text: "text/plain",
			html: "text/html",
			xml: "application/xml, text/xml",
			json: "application/json, text/javascript"
		},

		contents: {
			xml: /\bxml\b/,
			html: /\bhtml/,
			json: /\bjson\b/
		},

		responseFields: {
			xml: "responseXML",
			text: "responseText",
			json: "responseJSON"
		},

		// Data converters
		// Keys separate source (or catchall "*") and destination types with a single space
		converters: {

			// Convert anything to text
			"* text": String,

			// Text to html (true = no transformation)
			"text html": true,

			// Evaluate text as a json expression
			"text json": JSON.parse,

			// Parse text as xml
			"text xml": jQuery.parseXML
		},

		// For options that shouldn't be deep extended:
		// you can add your own custom options here if
		// and when you create one that shouldn't be
		// deep extended (see ajaxExtend)
		flatOptions: {
			url: true,
			context: true
		}
	},

	// Creates a full fledged settings object into target
	// with both ajaxSettings and settings fields.
	// If target is omitted, writes into ajaxSettings.
	ajaxSetup: function( target, settings ) {
		return settings ?

			// Building a settings object
			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :

			// Extending ajaxSettings
			ajaxExtend( jQuery.ajaxSettings, target );
	},

	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
	ajaxTransport: addToPrefiltersOrTransports( transports ),

	// Main method
	ajax: function( url, options ) {

		// If url is an object, simulate pre-1.5 signature
		if ( typeof url === "object" ) {
			options = url;
			url = undefined;
		}

		// Force options to be an object
		options = options || {};

		var transport,

			// URL without anti-cache param
			cacheURL,

			// Response headers
			responseHeadersString,
			responseHeaders,

			// timeout handle
			timeoutTimer,

			// Url cleanup var
			urlAnchor,

			// Request state (becomes false upon send and true upon completion)
			completed,

			// To know if global events are to be dispatched
			fireGlobals,

			// Loop variable
			i,

			// uncached part of the url
			uncached,

			// Create the final options object
			s = jQuery.ajaxSetup( {}, options ),

			// Callbacks context
			callbackContext = s.context || s,

			// Context for global events is callbackContext if it is a DOM node or jQuery collection
			globalEventContext = s.context &&
				( callbackContext.nodeType || callbackContext.jquery ) ?
					jQuery( callbackContext ) :
					jQuery.event,

			// Deferreds
			deferred = jQuery.Deferred(),
			completeDeferred = jQuery.Callbacks( "once memory" ),

			// Status-dependent callbacks
			statusCode = s.statusCode || {},

			// Headers (they are sent all at once)
			requestHeaders = {},
			requestHeadersNames = {},

			// Default abort message
			strAbort = "canceled",

			// Fake xhr
			jqXHR = {
				readyState: 0,

				// Builds headers hashtable if needed
				getResponseHeader: function( key ) {
					var match;
					if ( completed ) {
						if ( !responseHeaders ) {
							responseHeaders = {};
							while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
								responseHeaders[ match[ 1 ].toLowerCase() + " " ] =
									( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] )
										.concat( match[ 2 ] );
							}
						}
						match = responseHeaders[ key.toLowerCase() + " " ];
					}
					return match == null ? null : match.join( ", " );
				},

				// Raw string
				getAllResponseHeaders: function() {
					return completed ? responseHeadersString : null;
				},

				// Caches the header
				setRequestHeader: function( name, value ) {
					if ( completed == null ) {
						name = requestHeadersNames[ name.toLowerCase() ] =
							requestHeadersNames[ name.toLowerCase() ] || name;
						requestHeaders[ name ] = value;
					}
					return this;
				},

				// Overrides response content-type header
				overrideMimeType: function( type ) {
					if ( completed == null ) {
						s.mimeType = type;
					}
					return this;
				},

				// Status-dependent callbacks
				statusCode: function( map ) {
					var code;
					if ( map ) {
						if ( completed ) {

							// Execute the appropriate callbacks
							jqXHR.always( map[ jqXHR.status ] );
						} else {

							// Lazy-add the new callbacks in a way that preserves old ones
							for ( code in map ) {
								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
							}
						}
					}
					return this;
				},

				// Cancel the request
				abort: function( statusText ) {
					var finalText = statusText || strAbort;
					if ( transport ) {
						transport.abort( finalText );
					}
					done( 0, finalText );
					return this;
				}
			};

		// Attach deferreds
		deferred.promise( jqXHR );

		// Add protocol if not provided (prefilters might expect it)
		// Handle falsy url in the settings object (#10093: consistency with old signature)
		// We also use the url parameter if available
		s.url = ( ( url || s.url || location.href ) + "" )
			.replace( rprotocol, location.protocol + "//" );

		// Alias method option to type as per ticket #12004
		s.type = options.method || options.type || s.method || s.type;

		// Extract dataTypes list
		s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];

		// A cross-domain request is in order when the origin doesn't match the current origin.
		if ( s.crossDomain == null ) {
			urlAnchor = document.createElement( "a" );

			// Support: IE <=8 - 11, Edge 12 - 15
			// IE throws exception on accessing the href property if url is malformed,
			// e.g. http://example.com:80x/
			try {
				urlAnchor.href = s.url;

				// Support: IE <=8 - 11 only
				// Anchor's host property isn't correctly set when s.url is relative
				urlAnchor.href = urlAnchor.href;
				s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
					urlAnchor.protocol + "//" + urlAnchor.host;
			} catch ( e ) {

				// If there is an error parsing the URL, assume it is crossDomain,
				// it can be rejected by the transport if it is invalid
				s.crossDomain = true;
			}
		}

		// Convert data if not already a string
		if ( s.data && s.processData && typeof s.data !== "string" ) {
			s.data = jQuery.param( s.data, s.traditional );
		}

		// Apply prefilters
		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );

		// If request was aborted inside a prefilter, stop there
		if ( completed ) {
			return jqXHR;
		}

		// We can fire global events as of now if asked to
		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
		fireGlobals = jQuery.event && s.global;

		// Watch for a new set of requests
		if ( fireGlobals && jQuery.active++ === 0 ) {
			jQuery.event.trigger( "ajaxStart" );
		}

		// Uppercase the type
		s.type = s.type.toUpperCase();

		// Determine if request has content
		s.hasContent = !rnoContent.test( s.type );

		// Save the URL in case we're toying with the If-Modified-Since
		// and/or If-None-Match header later on
		// Remove hash to simplify url manipulation
		cacheURL = s.url.replace( rhash, "" );

		// More options handling for requests with no content
		if ( !s.hasContent ) {

			// Remember the hash so we can put it back
			uncached = s.url.slice( cacheURL.length );

			// If data is available and should be processed, append data to url
			if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
				cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;

				// #9682: remove data so that it's not used in an eventual retry
				delete s.data;
			}

			// Add or update anti-cache param if needed
			if ( s.cache === false ) {
				cacheURL = cacheURL.replace( rantiCache, "$1" );
				uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) +
					uncached;
			}

			// Put hash and anti-cache on the URL that will be requested (gh-1732)
			s.url = cacheURL + uncached;

		// Change '%20' to '+' if this is encoded form body content (gh-2658)
		} else if ( s.data && s.processData &&
			( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
			s.data = s.data.replace( r20, "+" );
		}

		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
		if ( s.ifModified ) {
			if ( jQuery.lastModified[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
			}
			if ( jQuery.etag[ cacheURL ] ) {
				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
			}
		}

		// Set the correct header, if data is being sent
		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
			jqXHR.setRequestHeader( "Content-Type", s.contentType );
		}

		// Set the Accepts header for the server, depending on the dataType
		jqXHR.setRequestHeader(
			"Accept",
			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
				s.accepts[ s.dataTypes[ 0 ] ] +
					( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
				s.accepts[ "*" ]
		);

		// Check for headers option
		for ( i in s.headers ) {
			jqXHR.setRequestHeader( i, s.headers[ i ] );
		}

		// Allow custom headers/mimetypes and early abort
		if ( s.beforeSend &&
			( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {

			// Abort if not done already and return
			return jqXHR.abort();
		}

		// Aborting is no longer a cancellation
		strAbort = "abort";

		// Install callbacks on deferreds
		completeDeferred.add( s.complete );
		jqXHR.done( s.success );
		jqXHR.fail( s.error );

		// Get transport
		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );

		// If no transport, we auto-abort
		if ( !transport ) {
			done( -1, "No Transport" );
		} else {
			jqXHR.readyState = 1;

			// Send global event
			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
			}

			// If request was aborted inside ajaxSend, stop there
			if ( completed ) {
				return jqXHR;
			}

			// Timeout
			if ( s.async && s.timeout > 0 ) {
				timeoutTimer = window.setTimeout( function() {
					jqXHR.abort( "timeout" );
				}, s.timeout );
			}

			try {
				completed = false;
				transport.send( requestHeaders, done );
			} catch ( e ) {

				// Rethrow post-completion exceptions
				if ( completed ) {
					throw e;
				}

				// Propagate others as results
				done( -1, e );
			}
		}

		// Callback for when everything is done
		function done( status, nativeStatusText, responses, headers ) {
			var isSuccess, success, error, response, modified,
				statusText = nativeStatusText;

			// Ignore repeat invocations
			if ( completed ) {
				return;
			}

			completed = true;

			// Clear timeout if it exists
			if ( timeoutTimer ) {
				window.clearTimeout( timeoutTimer );
			}

			// Dereference transport for early garbage collection
			// (no matter how long the jqXHR object will be used)
			transport = undefined;

			// Cache response headers
			responseHeadersString = headers || "";

			// Set readyState
			jqXHR.readyState = status > 0 ? 4 : 0;

			// Determine if successful
			isSuccess = status >= 200 && status < 300 || status === 304;

			// Get response data
			if ( responses ) {
				response = ajaxHandleResponses( s, jqXHR, responses );
			}

			// Use a noop converter for missing script
			if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) {
				s.converters[ "text script" ] = function() {};
			}

			// Convert no matter what (that way responseXXX fields are always set)
			response = ajaxConvert( s, response, jqXHR, isSuccess );

			// If successful, handle type chaining
			if ( isSuccess ) {

				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
				if ( s.ifModified ) {
					modified = jqXHR.getResponseHeader( "Last-Modified" );
					if ( modified ) {
						jQuery.lastModified[ cacheURL ] = modified;
					}
					modified = jqXHR.getResponseHeader( "etag" );
					if ( modified ) {
						jQuery.etag[ cacheURL ] = modified;
					}
				}

				// if no content
				if ( status === 204 || s.type === "HEAD" ) {
					statusText = "nocontent";

				// if not modified
				} else if ( status === 304 ) {
					statusText = "notmodified";

				// If we have data, let's convert it
				} else {
					statusText = response.state;
					success = response.data;
					error = response.error;
					isSuccess = !error;
				}
			} else {

				// Extract error from statusText and normalize for non-aborts
				error = statusText;
				if ( status || !statusText ) {
					statusText = "error";
					if ( status < 0 ) {
						status = 0;
					}
				}
			}

			// Set data for the fake xhr object
			jqXHR.status = status;
			jqXHR.statusText = ( nativeStatusText || statusText ) + "";

			// Success/Error
			if ( isSuccess ) {
				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
			} else {
				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
			}

			// Status-dependent callbacks
			jqXHR.statusCode( statusCode );
			statusCode = undefined;

			if ( fireGlobals ) {
				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
					[ jqXHR, s, isSuccess ? success : error ] );
			}

			// Complete
			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );

			if ( fireGlobals ) {
				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );

				// Handle the global AJAX counter
				if ( !( --jQuery.active ) ) {
					jQuery.event.trigger( "ajaxStop" );
				}
			}
		}

		return jqXHR;
	},

	getJSON: function( url, data, callback ) {
		return jQuery.get( url, data, callback, "json" );
	},

	getScript: function( url, callback ) {
		return jQuery.get( url, undefined, callback, "script" );
	}
} );

jQuery.each( [ "get", "post" ], function( _i, method ) {
	jQuery[ method ] = function( url, data, callback, type ) {

		// Shift arguments if data argument was omitted
		if ( isFunction( data ) ) {
			type = type || callback;
			callback = data;
			data = undefined;
		}

		// The url can be an options object (which then must have .url)
		return jQuery.ajax( jQuery.extend( {
			url: url,
			type: method,
			dataType: type,
			data: data,
			success: callback
		}, jQuery.isPlainObject( url ) && url ) );
	};
} );

jQuery.ajaxPrefilter( function( s ) {
	var i;
	for ( i in s.headers ) {
		if ( i.toLowerCase() === "content-type" ) {
			s.contentType = s.headers[ i ] || "";
		}
	}
} );


jQuery._evalUrl = function( url, options, doc ) {
	return jQuery.ajax( {
		url: url,

		// Make this explicit, since user can override this through ajaxSetup (#11264)
		type: "GET",
		dataType: "script",
		cache: true,
		async: false,
		global: false,

		// Only evaluate the response if it is successful (gh-4126)
		// dataFilter is not invoked for failure responses, so using it instead
		// of the default converter is kludgy but it works.
		converters: {
			"text script": function() {}
		},
		dataFilter: function( response ) {
			jQuery.globalEval( response, options, doc );
		}
	} );
};


jQuery.fn.extend( {
	wrapAll: function( html ) {
		var wrap;

		if ( this[ 0 ] ) {
			if ( isFunction( html ) ) {
				html = html.call( this[ 0 ] );
			}

			// The elements to wrap the target around
			wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );

			if ( this[ 0 ].parentNode ) {
				wrap.insertBefore( this[ 0 ] );
			}

			wrap.map( function() {
				var elem = this;

				while ( elem.firstElementChild ) {
					elem = elem.firstElementChild;
				}

				return elem;
			} ).append( this );
		}

		return this;
	},

	wrapInner: function( html ) {
		if ( isFunction( html ) ) {
			return this.each( function( i ) {
				jQuery( this ).wrapInner( html.call( this, i ) );
			} );
		}

		return this.each( function() {
			var self = jQuery( this ),
				contents = self.contents();

			if ( contents.length ) {
				contents.wrapAll( html );

			} else {
				self.append( html );
			}
		} );
	},

	wrap: function( html ) {
		var htmlIsFunction = isFunction( html );

		return this.each( function( i ) {
			jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
		} );
	},

	unwrap: function( selector ) {
		this.parent( selector ).not( "body" ).each( function() {
			jQuery( this ).replaceWith( this.childNodes );
		} );
		return this;
	}
} );


jQuery.expr.pseudos.hidden = function( elem ) {
	return !jQuery.expr.pseudos.visible( elem );
};
jQuery.expr.pseudos.visible = function( elem ) {
	return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
};




jQuery.ajaxSettings.xhr = function() {
	try {
		return new window.XMLHttpRequest();
	} catch ( e ) {}
};

var xhrSuccessStatus = {

		// File protocol always yields status code 0, assume 200
		0: 200,

		// Support: IE <=9 only
		// #1450: sometimes IE returns 1223 when it should be 204
		1223: 204
	},
	xhrSupported = jQuery.ajaxSettings.xhr();

support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
support.ajax = xhrSupported = !!xhrSupported;

jQuery.ajaxTransport( function( options ) {
	var callback, errorCallback;

	// Cross domain only allowed if supported through XMLHttpRequest
	if ( support.cors || xhrSupported && !options.crossDomain ) {
		return {
			send: function( headers, complete ) {
				var i,
					xhr = options.xhr();

				xhr.open(
					options.type,
					options.url,
					options.async,
					options.username,
					options.password
				);

				// Apply custom fields if provided
				if ( options.xhrFields ) {
					for ( i in options.xhrFields ) {
						xhr[ i ] = options.xhrFields[ i ];
					}
				}

				// Override mime type if needed
				if ( options.mimeType && xhr.overrideMimeType ) {
					xhr.overrideMimeType( options.mimeType );
				}

				// X-Requested-With header
				// For cross-domain requests, seeing as conditions for a preflight are
				// akin to a jigsaw puzzle, we simply never set it to be sure.
				// (it can always be set on a per-request basis or even using ajaxSetup)
				// For same-domain requests, won't change header if already provided.
				if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
					headers[ "X-Requested-With" ] = "XMLHttpRequest";
				}

				// Set headers
				for ( i in headers ) {
					xhr.setRequestHeader( i, headers[ i ] );
				}

				// Callback
				callback = function( type ) {
					return function() {
						if ( callback ) {
							callback = errorCallback = xhr.onload =
								xhr.onerror = xhr.onabort = xhr.ontimeout =
									xhr.onreadystatechange = null;

							if ( type === "abort" ) {
								xhr.abort();
							} else if ( type === "error" ) {

								// Support: IE <=9 only
								// On a manual native abort, IE9 throws
								// errors on any property access that is not readyState
								if ( typeof xhr.status !== "number" ) {
									complete( 0, "error" );
								} else {
									complete(

										// File: protocol always yields status 0; see #8605, #14207
										xhr.status,
										xhr.statusText
									);
								}
							} else {
								complete(
									xhrSuccessStatus[ xhr.status ] || xhr.status,
									xhr.statusText,

									// Support: IE <=9 only
									// IE9 has no XHR2 but throws on binary (trac-11426)
									// For XHR2 non-text, let the caller handle it (gh-2498)
									( xhr.responseType || "text" ) !== "text"  ||
									typeof xhr.responseText !== "string" ?
										{ binary: xhr.response } :
										{ text: xhr.responseText },
									xhr.getAllResponseHeaders()
								);
							}
						}
					};
				};

				// Listen to events
				xhr.onload = callback();
				errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );

				// Support: IE 9 only
				// Use onreadystatechange to replace onabort
				// to handle uncaught aborts
				if ( xhr.onabort !== undefined ) {
					xhr.onabort = errorCallback;
				} else {
					xhr.onreadystatechange = function() {

						// Check readyState before timeout as it changes
						if ( xhr.readyState === 4 ) {

							// Allow onerror to be called first,
							// but that will not handle a native abort
							// Also, save errorCallback to a variable
							// as xhr.onerror cannot be accessed
							window.setTimeout( function() {
								if ( callback ) {
									errorCallback();
								}
							} );
						}
					};
				}

				// Create the abort callback
				callback = callback( "abort" );

				try {

					// Do send the request (this may raise an exception)
					xhr.send( options.hasContent && options.data || null );
				} catch ( e ) {

					// #14683: Only rethrow if this hasn't been notified as an error yet
					if ( callback ) {
						throw e;
					}
				}
			},

			abort: function() {
				if ( callback ) {
					callback();
				}
			}
		};
	}
} );




// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
jQuery.ajaxPrefilter( function( s ) {
	if ( s.crossDomain ) {
		s.contents.script = false;
	}
} );

// Install script dataType
jQuery.ajaxSetup( {
	accepts: {
		script: "text/javascript, application/javascript, " +
			"application/ecmascript, application/x-ecmascript"
	},
	contents: {
		script: /\b(?:java|ecma)script\b/
	},
	converters: {
		"text script": function( text ) {
			jQuery.globalEval( text );
			return text;
		}
	}
} );

// Handle cache's special case and crossDomain
jQuery.ajaxPrefilter( "script", function( s ) {
	if ( s.cache === undefined ) {
		s.cache = false;
	}
	if ( s.crossDomain ) {
		s.type = "GET";
	}
} );

// Bind script tag hack transport
jQuery.ajaxTransport( "script", function( s ) {

	// This transport only deals with cross domain or forced-by-attrs requests
	if ( s.crossDomain || s.scriptAttrs ) {
		var script, callback;
		return {
			send: function( _, complete ) {
				script = jQuery( "<script>" )
					.attr( s.scriptAttrs || {} )
					.prop( { charset: s.scriptCharset, src: s.url } )
					.on( "load error", callback = function( evt ) {
						script.remove();
						callback = null;
						if ( evt ) {
							complete( evt.type === "error" ? 404 : 200, evt.type );
						}
					} );

				// Use native DOM manipulation to avoid our domManip AJAX trickery
				document.head.appendChild( script[ 0 ] );
			},
			abort: function() {
				if ( callback ) {
					callback();
				}
			}
		};
	}
} );




var oldCallbacks = [],
	rjsonp = /(=)\?(?=&|$)|\?\?/;

// Default jsonp settings
jQuery.ajaxSetup( {
	jsonp: "callback",
	jsonpCallback: function() {
		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) );
		this[ callback ] = true;
		return callback;
	}
} );

// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {

	var callbackName, overwritten, responseContainer,
		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
			"url" :
			typeof s.data === "string" &&
				( s.contentType || "" )
					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
				rjsonp.test( s.data ) && "data"
		);

	// Handle iff the expected data type is "jsonp" or we have a parameter to set
	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {

		// Get callback name, remembering preexisting value associated with it
		callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
			s.jsonpCallback() :
			s.jsonpCallback;

		// Insert callback into url or form data
		if ( jsonProp ) {
			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
		} else if ( s.jsonp !== false ) {
			s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
		}

		// Use data converter to retrieve json after script execution
		s.converters[ "script json" ] = function() {
			if ( !responseContainer ) {
				jQuery.error( callbackName + " was not called" );
			}
			return responseContainer[ 0 ];
		};

		// Force json dataType
		s.dataTypes[ 0 ] = "json";

		// Install callback
		overwritten = window[ callbackName ];
		window[ callbackName ] = function() {
			responseContainer = arguments;
		};

		// Clean-up function (fires after converters)
		jqXHR.always( function() {

			// If previous value didn't exist - remove it
			if ( overwritten === undefined ) {
				jQuery( window ).removeProp( callbackName );

			// Otherwise restore preexisting value
			} else {
				window[ callbackName ] = overwritten;
			}

			// Save back as free
			if ( s[ callbackName ] ) {

				// Make sure that re-using the options doesn't screw things around
				s.jsonpCallback = originalSettings.jsonpCallback;

				// Save the callback name for future use
				oldCallbacks.push( callbackName );
			}

			// Call if it was a function and we have a response
			if ( responseContainer && isFunction( overwritten ) ) {
				overwritten( responseContainer[ 0 ] );
			}

			responseContainer = overwritten = undefined;
		} );

		// Delegate to script
		return "script";
	}
} );




// Support: Safari 8 only
// In Safari 8 documents created via document.implementation.createHTMLDocument
// collapse sibling forms: the second one becomes a child of the first one.
// Because of that, this security measure has to be disabled in Safari 8.
// https://bugs.webkit.org/show_bug.cgi?id=137337
support.createHTMLDocument = ( function() {
	var body = document.implementation.createHTMLDocument( "" ).body;
	body.innerHTML = "<form></form><form></form>";
	return body.childNodes.length === 2;
} )();


// Argument "data" should be string of html
// context (optional): If specified, the fragment will be created in this context,
// defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
	if ( typeof data !== "string" ) {
		return [];
	}
	if ( typeof context === "boolean" ) {
		keepScripts = context;
		context = false;
	}

	var base, parsed, scripts;

	if ( !context ) {

		// Stop scripts or inline event handlers from being executed immediately
		// by using document.implementation
		if ( support.createHTMLDocument ) {
			context = document.implementation.createHTMLDocument( "" );

			// Set the base href for the created document
			// so any parsed elements with URLs
			// are based on the document's URL (gh-2965)
			base = context.createElement( "base" );
			base.href = document.location.href;
			context.head.appendChild( base );
		} else {
			context = document;
		}
	}

	parsed = rsingleTag.exec( data );
	scripts = !keepScripts && [];

	// Single tag
	if ( parsed ) {
		return [ context.createElement( parsed[ 1 ] ) ];
	}

	parsed = buildFragment( [ data ], context, scripts );

	if ( scripts && scripts.length ) {
		jQuery( scripts ).remove();
	}

	return jQuery.merge( [], parsed.childNodes );
};


/**
 * Load a url into a page
 */
jQuery.fn.load = function( url, params, callback ) {
	var selector, type, response,
		self = this,
		off = url.indexOf( " " );

	if ( off > -1 ) {
		selector = stripAndCollapse( url.slice( off ) );
		url = url.slice( 0, off );
	}

	// If it's a function
	if ( isFunction( params ) ) {

		// We assume that it's the callback
		callback = params;
		params = undefined;

	// Otherwise, build a param string
	} else if ( params && typeof params === "object" ) {
		type = "POST";
	}

	// If we have elements to modify, make the request
	if ( self.length > 0 ) {
		jQuery.ajax( {
			url: url,

			// If "type" variable is undefined, then "GET" method will be used.
			// Make value of this field explicit since
			// user can override it through ajaxSetup method
			type: type || "GET",
			dataType: "html",
			data: params
		} ).done( function( responseText ) {

			// Save response for use in complete callback
			response = arguments;

			self.html( selector ?

				// If a selector was specified, locate the right elements in a dummy div
				// Exclude scripts to avoid IE 'Permission Denied' errors
				jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :

				// Otherwise use the full result
				responseText );

		// If the request succeeds, this function gets "data", "status", "jqXHR"
		// but they are ignored because response was set above.
		// If it fails, this function gets "jqXHR", "status", "error"
		} ).always( callback && function( jqXHR, status ) {
			self.each( function() {
				callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
			} );
		} );
	}

	return this;
};




jQuery.expr.pseudos.animated = function( elem ) {
	return jQuery.grep( jQuery.timers, function( fn ) {
		return elem === fn.elem;
	} ).length;
};




jQuery.offset = {
	setOffset: function( elem, options, i ) {
		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
			position = jQuery.css( elem, "position" ),
			curElem = jQuery( elem ),
			props = {};

		// Set position first, in-case top/left are set even on static elem
		if ( position === "static" ) {
			elem.style.position = "relative";
		}

		curOffset = curElem.offset();
		curCSSTop = jQuery.css( elem, "top" );
		curCSSLeft = jQuery.css( elem, "left" );
		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
			( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;

		// Need to be able to calculate position if either
		// top or left is auto and position is either absolute or fixed
		if ( calculatePosition ) {
			curPosition = curElem.position();
			curTop = curPosition.top;
			curLeft = curPosition.left;

		} else {
			curTop = parseFloat( curCSSTop ) || 0;
			curLeft = parseFloat( curCSSLeft ) || 0;
		}

		if ( isFunction( options ) ) {

			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
			options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
		}

		if ( options.top != null ) {
			props.top = ( options.top - curOffset.top ) + curTop;
		}
		if ( options.left != null ) {
			props.left = ( options.left - curOffset.left ) + curLeft;
		}

		if ( "using" in options ) {
			options.using.call( elem, props );

		} else {
			if ( typeof props.top === "number" ) {
				props.top += "px";
			}
			if ( typeof props.left === "number" ) {
				props.left += "px";
			}
			curElem.css( props );
		}
	}
};

jQuery.fn.extend( {

	// offset() relates an element's border box to the document origin
	offset: function( options ) {

		// Preserve chaining for setter
		if ( arguments.length ) {
			return options === undefined ?
				this :
				this.each( function( i ) {
					jQuery.offset.setOffset( this, options, i );
				} );
		}

		var rect, win,
			elem = this[ 0 ];

		if ( !elem ) {
			return;
		}

		// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
		// Support: IE <=11 only
		// Running getBoundingClientRect on a
		// disconnected node in IE throws an error
		if ( !elem.getClientRects().length ) {
			return { top: 0, left: 0 };
		}

		// Get document-relative position by adding viewport scroll to viewport-relative gBCR
		rect = elem.getBoundingClientRect();
		win = elem.ownerDocument.defaultView;
		return {
			top: rect.top + win.pageYOffset,
			left: rect.left + win.pageXOffset
		};
	},

	// position() relates an element's margin box to its offset parent's padding box
	// This corresponds to the behavior of CSS absolute positioning
	position: function() {
		if ( !this[ 0 ] ) {
			return;
		}

		var offsetParent, offset, doc,
			elem = this[ 0 ],
			parentOffset = { top: 0, left: 0 };

		// position:fixed elements are offset from the viewport, which itself always has zero offset
		if ( jQuery.css( elem, "position" ) === "fixed" ) {

			// Assume position:fixed implies availability of getBoundingClientRect
			offset = elem.getBoundingClientRect();

		} else {
			offset = this.offset();

			// Account for the *real* offset parent, which can be the document or its root element
			// when a statically positioned element is identified
			doc = elem.ownerDocument;
			offsetParent = elem.offsetParent || doc.documentElement;
			while ( offsetParent &&
				( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
				jQuery.css( offsetParent, "position" ) === "static" ) {

				offsetParent = offsetParent.parentNode;
			}
			if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {

				// Incorporate borders into its offset, since they are outside its content origin
				parentOffset = jQuery( offsetParent ).offset();
				parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
				parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
			}
		}

		// Subtract parent offsets and element margins
		return {
			top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
		};
	},

	// This method will return documentElement in the following cases:
	// 1) For the element inside the iframe without offsetParent, this method will return
	//    documentElement of the parent window
	// 2) For the hidden or detached element
	// 3) For body or html element, i.e. in case of the html node - it will return itself
	//
	// but those exceptions were never presented as a real life use-cases
	// and might be considered as more preferable results.
	//
	// This logic, however, is not guaranteed and can change at any point in the future
	offsetParent: function() {
		return this.map( function() {
			var offsetParent = this.offsetParent;

			while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
				offsetParent = offsetParent.offsetParent;
			}

			return offsetParent || documentElement;
		} );
	}
} );

// Create scrollLeft and scrollTop methods
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
	var top = "pageYOffset" === prop;

	jQuery.fn[ method ] = function( val ) {
		return access( this, function( elem, method, val ) {

			// Coalesce documents and windows
			var win;
			if ( isWindow( elem ) ) {
				win = elem;
			} else if ( elem.nodeType === 9 ) {
				win = elem.defaultView;
			}

			if ( val === undefined ) {
				return win ? win[ prop ] : elem[ method ];
			}

			if ( win ) {
				win.scrollTo(
					!top ? val : win.pageXOffset,
					top ? val : win.pageYOffset
				);

			} else {
				elem[ method ] = val;
			}
		}, method, val, arguments.length );
	};
} );

// Support: Safari <=7 - 9.1, Chrome <=37 - 49
// Add the top/left cssHooks using jQuery.fn.position
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
// getComputedStyle returns percent when specified for top/left/bottom/right;
// rather than make the css module depend on the offset module, just check for it here
jQuery.each( [ "top", "left" ], function( _i, prop ) {
	jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
		function( elem, computed ) {
			if ( computed ) {
				computed = curCSS( elem, prop );

				// If curCSS returns percentage, fallback to offset
				return rnumnonpx.test( computed ) ?
					jQuery( elem ).position()[ prop ] + "px" :
					computed;
			}
		}
	);
} );


// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
	jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
		function( defaultExtra, funcName ) {

		// Margin is only for outerHeight, outerWidth
		jQuery.fn[ funcName ] = function( margin, value ) {
			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );

			return access( this, function( elem, type, value ) {
				var doc;

				if ( isWindow( elem ) ) {

					// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
					return funcName.indexOf( "outer" ) === 0 ?
						elem[ "inner" + name ] :
						elem.document.documentElement[ "client" + name ];
				}

				// Get document width or height
				if ( elem.nodeType === 9 ) {
					doc = elem.documentElement;

					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
					// whichever is greatest
					return Math.max(
						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
						elem.body[ "offset" + name ], doc[ "offset" + name ],
						doc[ "client" + name ]
					);
				}

				return value === undefined ?

					// Get width or height on the element, requesting but not forcing parseFloat
					jQuery.css( elem, type, extra ) :

					// Set width or height on the element
					jQuery.style( elem, type, value, extra );
			}, type, chainable ? margin : undefined, chainable );
		};
	} );
} );


jQuery.each( [
	"ajaxStart",
	"ajaxStop",
	"ajaxComplete",
	"ajaxError",
	"ajaxSuccess",
	"ajaxSend"
], function( _i, type ) {
	jQuery.fn[ type ] = function( fn ) {
		return this.on( type, fn );
	};
} );




jQuery.fn.extend( {

	bind: function( types, data, fn ) {
		return this.on( types, null, data, fn );
	},
	unbind: function( types, fn ) {
		return this.off( types, null, fn );
	},

	delegate: function( selector, types, data, fn ) {
		return this.on( types, selector, data, fn );
	},
	undelegate: function( selector, types, fn ) {

		// ( namespace ) or ( selector, types [, fn] )
		return arguments.length === 1 ?
			this.off( selector, "**" ) :
			this.off( types, selector || "**", fn );
	},

	hover: function( fnOver, fnOut ) {
		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
	}
} );

jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
	function( _i, name ) {

		// Handle event binding
		jQuery.fn[ name ] = function( data, fn ) {
			return arguments.length > 0 ?
				this.on( name, null, data, fn ) :
				this.trigger( name );
		};
	} );




// Support: Android <=4.0 only
// Make sure we trim BOM and NBSP
var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;

// Bind a function to a context, optionally partially applying any
// arguments.
// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
// However, it is not slated for removal any time soon
jQuery.proxy = function( fn, context ) {
	var tmp, args, proxy;

	if ( typeof context === "string" ) {
		tmp = fn[ context ];
		context = fn;
		fn = tmp;
	}

	// Quick check to determine if target is callable, in the spec
	// this throws a TypeError, but we will just return undefined.
	if ( !isFunction( fn ) ) {
		return undefined;
	}

	// Simulated bind
	args = slice.call( arguments, 2 );
	proxy = function() {
		return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
	};

	// Set the guid of unique handler to the same of original handler, so it can be removed
	proxy.guid = fn.guid = fn.guid || jQuery.guid++;

	return proxy;
};

jQuery.holdReady = function( hold ) {
	if ( hold ) {
		jQuery.readyWait++;
	} else {
		jQuery.ready( true );
	}
};
jQuery.isArray = Array.isArray;
jQuery.parseJSON = JSON.parse;
jQuery.nodeName = nodeName;
jQuery.isFunction = isFunction;
jQuery.isWindow = isWindow;
jQuery.camelCase = camelCase;
jQuery.type = toType;

jQuery.now = Date.now;

jQuery.isNumeric = function( obj ) {

	// As of jQuery 3.0, isNumeric is limited to
	// strings and numbers (primitives or objects)
	// that can be coerced to finite numbers (gh-2662)
	var type = jQuery.type( obj );
	return ( type === "number" || type === "string" ) &&

		// parseFloat NaNs numeric-cast false positives ("")
		// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
		// subtraction forces infinities to NaN
		!isNaN( obj - parseFloat( obj ) );
};

jQuery.trim = function( text ) {
	return text == null ?
		"" :
		( text + "" ).replace( rtrim, "" );
};



// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
// way to register. Lowercase jquery is used because AMD module names are
// derived from file names, and jQuery is normally delivered in a lowercase
// file name. Do this after creating the global so that if an AMD module wants
// to call noConflict to hide this version of jQuery, it will work.

// Note that for maximum portability, libraries that are not jQuery should
// declare themselves as anonymous modules, and avoid setting a global if an
// AMD loader is present. jQuery is a special case. For more information, see
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon

if ( typeof define === "function" && define.amd ) {
	define( "jquery", [], function() {
		return jQuery;
	} );
}




var

	// Map over jQuery in case of overwrite
	_jQuery = window.jQuery,

	// Map over the $ in case of overwrite
	_$ = window.$;

jQuery.noConflict = function( deep ) {
	if ( window.$ === jQuery ) {
		window.$ = _$;
	}

	if ( deep && window.jQuery === jQuery ) {
		window.jQuery = _jQuery;
	}

	return jQuery;
};

// Expose jQuery and $ identifiers, even in AMD
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
if ( typeof noGlobal === "undefined" ) {
	window.jQuery = window.$ = jQuery;
}




return jQuery;
} );
define( 'jquery-private',[ 'jquery' ], function ( jq ) {
	'use strict';

	return jq.noConflict();
});
/* globalmodule */
define( 'component',[ 'jquery' ],
function( $ ) {

	'use strict';

	/**
	 * Iterates over all $components and initiates component controller.
	 */

	return {

		init: function( $components ) {

			// if initComponent was invoked, use $components. otherwise it's the bootstrap init call
			if ( typeof( $components ) === 'undefined' ) {

				$components = $( '[ data-component ]' );

			}

			$components.each( function() {

				var $component = $( this ),
					id = $component.data( 'component' );

				//Retrieves the id of the module from the 'component' data attribute and calls the relevant controller.
				require( [ '../src/sublayouts/' + id + '/' + id ], function( Component ) {

					var component;

					if ( Component !== undefined ) {

						component = new Component( $component );
						component.init();
					}
				} );
			} );
		}
	};
} );

/* globalmodule */
define( 'helper',[ 'jquery' ],
	function ( $ ) {

		'use strict';

		/**
		 * Iterates over all $helpers and initiates helper controller.
		 */

		return {

			init: function ( $helpers ) {

				// if initComponent was invoked, use $helpers. otherwise it's the bootstrap init call
				if ( typeof( $helpers ) === 'undefined' ) {

					$helpers = $( '[ data-helper ]' );

				}

				$helpers.each( function () {

					var $helper = $( this ),
						id = $helper.data( 'helper' );

					//Retrieves the id of the module from the 'helper' data attribute and calls the relevant controller.
					require( [ '../src/sublayouts/_helpers/' + id + '/' + id ], function ( Helper ) {

						var helper;

						if ( Helper !== undefined ) {

							helper = new Helper( $helper );
							helper.init();
						}
					} );
				} );
			}
		};
	} );

/* globalmodule */
define( 'breakpoint',[ 'jquery' ],
function( $ ) {

	'use strict';

	var breakpoint = {};

	breakpoint.init = function() {

		this.set();
		$( window ).on( 'resize orientationchange', $.proxy( this.set, this ) );
	};

	breakpoint.set = function() {

		var html_node          = document.getElementsByTagName( 'html' )[0],
		breakpoint_class_name  = html_node.className.match( /breakpoint-([a-z]+)/ ),
		current_breakpoint     = breakpoint_class_name === null ? null : breakpoint_class_name[1],
		pv                     = window.getComputedStyle ? window.getComputedStyle( html_node, ':after' ).getPropertyValue( 'content' ) : undefined,
		bp                     = pv ? pv.replace( /"/g, '' ) : undefined,
		ob                     = current_breakpoint;

		if ( bp && bp !== current_breakpoint ) {

			html_node.className =  html_node.className.replace(/\s?breakpoint-[a-z]+/,'');
			html_node.className += ' breakpoint-' + bp;

			current_breakpoint = bp;

			$( breakpoint ).trigger( 'change', [bp, ob]);
		}
	};

	return breakpoint;
} );
/* globalmodule */
define( 'lib/utils',[ 'jquery' ],
	function ( $ ) {

		'use strict';

		var utils = {};

		utils.isRTL = function () {

			return $( 'html' ).attr( 'dir' ) === 'rtl';
		};

		utils.isWindowsPhone = function () {

			return navigator.userAgent.match( /IEMobile/i ) !== null;
		};

		utils.language = function () {

			return $( 'html' ).attr( 'lang' ) === undefined ? 'en' : $( 'html' ).attr( 'lang' );
		};

		utils.breakpoint = function () {

			return ( $( 'html' ).attr( 'class' ).match( /breakpoint-([a-z]+)/ ) || [ '', 'l' ] )[ 1 ];
		};

		utils.canTransition = function () {

			return document.body.style.transition !== undefined;
		};

		utils.headerBarHeight = function () {

			return $( '[ data-m12-bar="true"]' ).height();
		};

		utils.fixedHeader = function () {

			return $( '[ data-m12-bar="true"]' ).attr( 'data-m12-bar-fixed' ) === 'true';
		};

		utils.isTouchDevice = function () {

			return 'ontouchstart' in document.documentElement;
		};

		utils.isDevice = function () {
			return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
		};

		utils.parseFloatInput = function ( val ) {

			return parseFloat( val.replace( /[^0-9.]/g, '' ), 10 );
		};

		utils.uniqueID = function () {

			return '_' + Math.random().toString( 36 ).substr( 2, 9 );
		};

		utils.isNumber = function ( o ) {
			return typeof o === 'number' && isFinite( o );
		};

		utils.getParameterByName = function ( name ) {
			name = name.replace( /[\[]/, "\\[" ).replace( /[\]]/, "\\]" );
			var regex = new RegExp( "[\\?&]" + name + "=([^&#]*)" ),
				results = regex.exec( location.search );
			return results === null ? "" : decodeURIComponent( results[ 1 ].replace( /\+/g, " " ) );
		};

		utils.percentageRound = function ( val, precision ) {

			var rounded;

			precision = precision || 2;
			rounded = '' + Math.round( val * Math.pow( 10, precision ) ) / Math.pow( 10, precision );

			if ( !rounded.match( /\./ ) ) rounded = rounded + '.';

			while ( rounded.match( /\.([0-9]*)$/ )[ 1 ].length < precision ) rounded = rounded + '0';

			return rounded + '%';
		};

		utils.isMSIE = function () {

			var ua = window.navigator.userAgent;
			var msie = ua.indexOf( 'MSIE' );

			if ( msie > 0 || !!navigator.userAgent.match( /Trident.*rv\:11\./ ) ) {

				// If Internet Explorer
				return true;
			} else {

				// If another browser
				return false;
			}

			return false;
		};

		utils.isLessThanIE10 = function () {
			var out = this.isMSIE() && document.all && window.matchMedia === undefined;
			return out;
		};

		utils.isLessThanIE9 = function () {
			return this.isMSIE() && document.addEventListener === undefined;
		};

		return utils;
	} );

/*!
* Parsley.js
* Version 2.2.0 - built Mon, Jan 18th 2016, 5:46 pm
* http://parsleyjs.org
* Guillaume Potier - <guillaume@wisembly.com>
* Marc-Andre Lafortune - <petroselinum@marc-andre.ca>
* MIT Licensed
*/
function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var _slice=Array.prototype.slice;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define('parsley',["jquery"],t):e.parsley=t(e.jQuery)}(this,function(e){"use strict";function t(e,t){return e.parsleyAdaptedCallback||(e.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),e.apply(t||O,i)}),e.parsleyAdaptedCallback}function i(e){return 0===e.lastIndexOf(D,0)?e.substr(D.length):e}var n=1,r={},s={attr:function(e,t,i){var n,r,s,a=new RegExp("^"+t,"i");if("undefined"==typeof i)i={};else for(n in i)i.hasOwnProperty(n)&&delete i[n];if("undefined"==typeof e||"undefined"==typeof e[0])return i;for(s=e[0].attributes,n=s.length;n--;)r=s[n],r&&r.specified&&a.test(r.name)&&(i[this.camelize(r.name.slice(t.length))]=this.deserializeValue(r.value));return i},checkAttr:function(e,t,i){return e.is("["+t+i+"]")},setAttr:function(e,t,i,n){e[0].setAttribute(this.dasherize(t+i),String(n))},generateID:function(){return""+n++},deserializeValue:function(t){var i;try{return t?"true"==t||("false"==t?!1:"null"==t?null:isNaN(i=Number(t))?/^[\[\{]/.test(t)?e.parseJSON(t):t:i):t}catch(n){return t}},camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},dasherize:function(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function(e){r[e]||(r[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){r={}},trimString:function(e){return e.replace(/^\s+|\s+$/g,"")},objectCreate:Object.create||function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}()},a=s,o={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(e){},errorsContainer:function(e){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},l=function(){};l.prototype={asyncSupport:!0,actualizeOptions:function(){return a.attr(this.$element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){this.domOptions=a.objectCreate(this.parent.options),this.options=a.objectCreate(this.domOptions);for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){this._listeners=this._listeners||{};var i=this._listeners[e]=this._listeners[e]||[];return i.push(t),this},subscribe:function(t,i){e.listenTo(this,t.toLowerCase(),i)},off:function(e,t){var i=this._listeners&&this._listeners[e];if(i)if(t)for(var n=i.length;n--;)i[n]===t&&i.splice(n,1);else delete this._listeners[e];return this},unsubscribe:function(t,i){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,i){t=t||this;var n,r=this._listeners&&this._listeners[e];if(r)for(var s=r.length;s--;)if(n=r[s].call(t,t,i),n===!1)return n;return this.parent?this.parent.trigger(e,t,i):!0},reset:function(){if("ParsleyForm"!==this.__class__)return this._trigger("reset");for(var e=0;e<this.fields.length;e++)this.fields[e]._trigger("reset");this._trigger("reset")},destroy:function(){if("ParsleyForm"!==this.__class__)return this.$element.removeData("Parsley"),this.$element.removeData("ParsleyFieldMultiple"),void this._trigger("destroy");for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},asyncIsValid:function(e,t){return a.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?this.parent.$element.find("["+this.options.namespace+'multiple="'+this.options.multiple+'"]'):this.$element}};var u={string:function(e){return e},integer:function(e){if(isNaN(e))throw'Requirement is not an integer: "'+e+'"';return parseInt(e,10)},number:function(e){if(isNaN(e))throw'Requirement is not a number: "'+e+'"';return parseFloat(e)},reference:function(t){var i=e(t);if(0===i.length)throw'No such reference: "'+t+'"';return i},"boolean":function(e){return"false"!==e},object:function(e){return a.deserializeValue(e)},regexp:function(e){var t="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(t=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):e="^"+e+"$",new RegExp(e,t)}},d=function(e,t){var i=e.match(/^\s*\[(.*)\]\s*$/);if(!i)throw'Requirement is not an array: "'+e+'"';var n=i[1].split(",").map(a.trimString);if(n.length!==t)throw"Requirement has "+n.length+" values when "+t+" are needed";return n},h=function(e,t){var i=u[e||"string"];if(!i)throw'Unknown requirement specification: "'+e+'"';return i(t)},p=function(e,t,i){var n=null,r={};for(var s in e)if(s){var a=i(s);"string"==typeof a&&(a=h(e[s],a)),r[s]=a}else n=h(e[s],t);return[n,r]},f=function(t){e.extend(!0,this,t)};f.prototype={validate:function(t,i){if(this.fn)return arguments.length>3&&(i=[].slice.call(arguments,1,-1)),this.fn.call(this,t,i);if(e.isArray(t)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}if(this.validateNumber)return isNaN(t)?!1:(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,i){if("string"!=typeof t)return e.isArray(t)?t:[t];var n=this.requirementType;if(e.isArray(n)){for(var r=d(t,n.length),s=0;s<r.length;s++)r[s]=h(n[s],r[s]);return r}return e.isPlainObject(n)?p(n,t,i):[h(n,t)]},requirementType:"string",priority:2};var c=function(e,t){this.__class__="ParsleyValidatorRegistry",this.locale="en",this.init(e||{},t||{})},m={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[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,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};m.range=m.number;var g=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0};c.prototype={init:function(t,i){this.catalog=i,this.validators=e.extend({},this.validators);for(var n in t)this.addValidator(n,t[n].fn,t[n].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(e){if("undefined"==typeof this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function(e,t,i){return"object"==typeof t&&(this.catalog[e]=t),!0===i?this.setLocale(e):this},addMessage:function(e,t,i){return"undefined"==typeof this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][t]=i,this},addMessages:function(e,t){for(var i in t)this.addMessage(e,i,t[i]);return this},addValidator:function(e,t,i){if(this.validators[e])a.warn('Validator "'+e+'" is already defined.');else if(o.hasOwnProperty(e))return void a.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},updateValidator:function(e,t,i){return this.validators[e]?this._setValidator(this,arguments):(a.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(e){return this.validators[e]||a.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function(e,t,i){"object"!=typeof t&&(t={fn:t,priority:i}),t.validate||(t=new f(t)),this.validators[e]=t;for(var n in t.messages||{})this.addMessage(n,e,t.messages[n]);return this},getErrorMessage:function(e){var t;if("type"===e.name){var i=this.catalog[this.locale][e.name]||{};t=i[e.requirements]}else t=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(e,t){if("object"==typeof t){for(var i in t)e=this.formatMessage(e,t[i]);return e}return"string"==typeof e?e.replace(/%s/i,t):""},validators:{notblank:{validateString:function(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function(e){return e.length>0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=i.step,r=void 0===n?"1":n,s=i.base,a=void 0===s?0:s,o=m[t];if(!o)throw new Error("validator type `"+t+"` is not supported");if(!o.test(e))return!1;if("number"===t&&!/^any$/i.test(r||"")){var l=Number(e),u=Math.pow(10,Math.max(g(r),g(a)));if((l*u-a*u)%(r*u)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},min:{validateNumber:function(e,t){return e>=t},requirementType:"number",priority:30},max:{validateNumber:function(e,t){return t>=e},requirementType:"number",priority:30},range:{validateNumber:function(e,t,i){return e>=t&&i>=e},requirementType:["number","number"],priority:30},equalto:{validateString:function(t,i){var n=e(i);return n.length?t===n.val():t===i},priority:256}}};var y=function(e){this.__class__="ParsleyUI"};y.prototype={listen:function(){var e=this;return window.Parsley.on("form:init",function(t){e.setupForm(t)}).on("field:init",function(t){e.setupField(t)}).on("field:validated",function(t){e.reflow(t)}).on("form:validated",function(t){e.focus(t)}).on("field:reset",function(t){e.reset(t)}).on("form:destroy",function(t){e.destroy(t)}).on("field:destroy",function(t){e.destroy(t)}),this},reflow:function(e){if("undefined"!=typeof e._ui&&!1!==e._ui.active){var t=this._diff(e.validationResult,e._ui.lastValidationResult);e._ui.lastValidationResult=e.validationResult,this.manageStatusClass(e),this.manageErrorsMessages(e,t),this.actualizeTriggers(e),(t.kept.length||t.added.length)&&!0!==e._ui.failedOnce&&this.manageFailingFieldTrigger(e)}},getErrorsMessages:function(e){if(!0===e.validationResult)return[];for(var t=[],i=0;i<e.validationResult.length;i++)t.push(e.validationResult[i].errorMessage||this._getErrorMessage(e,e.validationResult[i].assert));return t},manageStatusClass:function(e){e.hasConstraints()&&e.needsValidation()&&!0===e.validationResult?this._successClass(e):e.validationResult.length>0?this._errorClass(e):this._resetClass(e)},manageErrorsMessages:function(t,i){if("undefined"==typeof t.options.errorsMessagesDisabled){if("undefined"!=typeof t.options.errorMessage)return i.added.length||i.kept.length?(this._insertErrorWrapper(t),0===t._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&t._ui.$errorsWrapper.append(e(t.options.errorTemplate).addClass("parsley-custom-error-message")),t._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(t.options.errorMessage)):t._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var n=0;n<i.removed.length;n++)this.removeError(t,i.removed[n].assert.name,!0);for(n=0;n<i.added.length;n++)this.addError(t,i.added[n].assert.name,i.added[n].errorMessage,i.added[n].assert,!0);for(n=0;n<i.kept.length;n++)this.updateError(t,i.kept[n].assert.name,i.kept[n].errorMessage,i.kept[n].assert,!0)}},addError:function(t,i,n,r,s){this._insertErrorWrapper(t),t._ui.$errorsWrapper.addClass("filled").append(e(t.options.errorTemplate).addClass("parsley-"+i).html(n||this._getErrorMessage(t,r))),!0!==s&&this._errorClass(t)},updateError:function(e,t,i,n,r){e._ui.$errorsWrapper.addClass("filled").find(".parsley-"+t).html(i||this._getErrorMessage(e,n)),!0!==r&&this._errorClass(e)},removeError:function(e,t,i){e._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+t).remove(),!0!==i&&this.manageStatusClass(e)},focus:function(e){if(e._focusedField=null,!0===e.validationResult||"none"===e.options.focus)return null;for(var t=0;t<e.fields.length;t++){var i=e.fields[t];if(!0!==i.validationResult&&i.validationResult.length>0&&"undefined"==typeof i.options.noFocus&&(e._focusedField=i.$element,"first"===e.options.focus))break}return null===e._focusedField?null:e._focusedField.focus()},_getErrorMessage:function(e,t){var i=t.name+"Message";return"undefined"!=typeof e.options[i]?window.Parsley.formatMessage(e.options[i],t.requirements):window.Parsley.getErrorMessage(t)},_diff:function(e,t,i){for(var n=[],r=[],s=0;s<e.length;s++){for(var a=!1,o=0;o<t.length;o++)if(e[s].assert.name===t[o].assert.name){a=!0;break}a?r.push(e[s]):n.push(e[s])}return{kept:r,added:n,removed:i?[]:this._diff(t,e,!0).added}},setupForm:function(e){e.$element.on("submit.Parsley",function(t){e.onSubmitValidate(t)}),e.$element.on("click.Parsley",'input[type="submit"], button[type="submit"]',function(t){e.onSubmitButton(t)}),!1!==e.options.uiEnabled&&e.$element.attr("novalidate","")},setupField:function(t){var i={active:!1};!1!==t.options.uiEnabled&&(i.active=!0,t.$element.attr(t.options.namespace+"id",t.__id__),i.$errorClassHandler=this._manageClassHandler(t),i.errorsWrapperId="parsley-id-"+(t.options.multiple?"multiple-"+t.options.multiple:t.__id__),i.$errorsWrapper=e(t.options.errorsWrapper).attr("id",i.errorsWrapperId),i.lastValidationResult=[],i.validationInformationVisible=!1,t._ui=i,this.actualizeTriggers(t))},_manageClassHandler:function(t){if("string"==typeof t.options.classHandler&&e(t.options.classHandler).length)return e(t.options.classHandler);var i=t.options.classHandler(t);return"undefined"!=typeof i&&i.length?i:!t.options.multiple||t.$element.is("select")?t.$element:t.$element.parent()},_insertErrorWrapper:function(t){var i;if(0!==t._ui.$errorsWrapper.parent().length)return t._ui.$errorsWrapper.parent();if("string"==typeof t.options.errorsContainer){if(e(t.options.errorsContainer).length)return e(t.options.errorsContainer).append(t._ui.$errorsWrapper);a.warn("The errors container `"+t.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof t.options.errorsContainer&&(i=t.options.errorsContainer(t));if("undefined"!=typeof i&&i.length)return i.append(t._ui.$errorsWrapper);var n=t.$element;return t.options.multiple&&(n=n.parent()),n.after(t._ui.$errorsWrapper)},actualizeTriggers:function(e){var t=this,i=e._findRelated();if(i.off(".Parsley"),!1!==e.options.trigger){var n=e.options.trigger.replace(/^\s+/g,"").replace(/\s+$/g,"");""!==n&&i.on(n.split(" ").join(".Parsley ")+".Parsley",function(i){t.eventValidate(e,i)})}},eventValidate:function(e,t){/key/.test(t.type)&&!e._ui.validationInformationVisible&&e.getValue().length<=e.options.validationThreshold||e.validate()},manageFailingFieldTrigger:function(t){return t._ui.failedOnce=!0,t.options.multiple&&t._findRelated().each(function(){/change/i.test(e(this).parsley().options.trigger||"")||e(this).on("change.ParsleyFailedOnce",function(){t.validate()})}),t.$element.is("select")&&!/change/i.test(t.options.trigger||"")?t.$element.on("change.ParsleyFailedOnce",function(){t.validate()}):/keyup/i.test(t.options.trigger||"")?void 0:t.$element.on("keyup.ParsleyFailedOnce",function(){t.validate()})},reset:function(e){this.actualizeTriggers(e),e.$element.off(".ParsleyFailedOnce"),"undefined"!=typeof e._ui&&"ParsleyForm"!==e.__class__&&(e._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(e),e._ui.lastValidationResult=[],e._ui.validationInformationVisible=!1,e._ui.failedOnce=!1)},destroy:function(e){this.reset(e),"ParsleyForm"!==e.__class__&&("undefined"!=typeof e._ui&&e._ui.$errorsWrapper.remove(),delete e._ui)},_successClass:function(e){e._ui.validationInformationVisible=!0,e._ui.$errorClassHandler.removeClass(e.options.errorClass).addClass(e.options.successClass)},_errorClass:function(e){e._ui.validationInformationVisible=!0,e._ui.$errorClassHandler.removeClass(e.options.successClass).addClass(e.options.errorClass)},_resetClass:function(e){e._ui.$errorClassHandler.removeClass(e.options.successClass).removeClass(e.options.errorClass)}};var v=function(t,i,n){this.__class__="ParsleyForm",this.__id__=a.generateID(),this.$element=e(t),this.domOptions=i,this.options=n,this.parent=window.Parsley,this.fields=[],this.validationResult=null},_={pending:null,resolved:!0,rejected:!1};v.prototype={onSubmitValidate:function(e){var t=this;if(!0!==e.parsley)return this._$submitSource=this._$submitSource||this.$element.find('input[type="submit"], button[type="submit"]').first(),this._$submitSource.is("[formnovalidate]")?void(this._$submitSource=null):(e.stopImmediatePropagation(),e.preventDefault(),this.whenValidate({event:e}).done(function(){t._submit()}).always(function(){t._$submitSource=null}),this)},onSubmitButton:function(t){this._$submitSource=e(t.target)},_submit:function(){!1!==this._trigger("submit")&&(this.$element.find(".parsley_synthetic_submit_button").remove(),this._$submitSource&&e('<input class="parsley_synthetic_submit_button" type="hidden">').attr("name",this._$submitSource.attr("name")).attr("value",this._$submitSource.attr("value")).appendTo(this.$element),this.$element.trigger(e.extend(e.Event("submit"),{parsley:!0})))},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1],s=i[2];t={group:n,force:r,event:s}}return _[this.whenValidate(t).state()]},whenValidate:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force,s=i.event;this.submitEvent=s,s&&(this.submitEvent.preventDefault=function(){a.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),t.validationResult=!1}),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var o=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValidate({force:r,group:n})})}),l=function(){var i=e.Deferred();return!1===t.validationResult&&i.reject(),i.resolve().promise()};return e.when.apply(e,_toConsumableArray(o)).done(function(){t._trigger("success")}).fail(function(){t.validationResult=!1,t._trigger("error")}).always(function(){t._trigger("validated")}).pipe(l,l)},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={group:n,force:r}}return _[this.whenValid(t).state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force;this._refreshFields();var s=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValid({group:n,force:r})})});return e.when.apply(e,_toConsumableArray(s))},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var t=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e,i){var n=new window.Parsley.Factory(i,{},t);"ParsleyField"!==n.__class__&&"ParsleyFieldMultiple"!==n.__class__||!0===n.options.excluded||"undefined"==typeof t.fieldsMappedById[n.__class__+"-"+n.__id__]&&(t.fieldsMappedById[n.__class__+"-"+n.__id__]=n,t.fields.push(n))}),e(i).not(t.fields).each(function(e,t){t._trigger("reset")})}),this},_withoutReactualizingFormOptions:function(e){var t=this.actualizeOptions;this.actualizeOptions=function(){return this};var i=e();return this.actualizeOptions=t,i},_trigger:function(e){return this.trigger("form:"+e)}};var w=function(t,i,n,r,s){if(!/ParsleyField/.test(t.__class__))throw new Error("ParsleyField or ParsleyFieldMultiple instance expected");var a=window.Parsley._validatorRegistry.validators[i],o=new f(a);e.extend(this,{validator:o,name:i,requirements:n,priority:r||t.options[i+"Priority"]||o.priority,isDomConstraint:!0===s}),this._parseRequirements(t.options)},b=function(e){var t=e[0].toUpperCase();return t+e.slice(1)};w.prototype={validate:function(e,t){var i=this.requirementList.slice(0);return i.unshift(e),i.push(t),this.validator.validate.apply(this.validator,i)},_parseRequirements:function(e){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(i){return e[t.name+b(i)]})}};var F=function(t,i,n,r){this.__class__="ParsleyField",this.__id__=a.generateID(),this.$element=e(t),"undefined"!=typeof r&&(this.parent=r),this.options=n,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=[],this._bindConstraints()},$={pending:null,resolved:!0,rejected:!1};F.prototype={validate:function(t){arguments.length>=1&&!e.isPlainObject(t)&&(a.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var i=this.whenValidate(t);if(!i)return!0;switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=t.force,n=t.group;return this.refreshConstraints(),!n||this._isInGroup(n)?(this.value=this.getValue(),this._trigger("validate"),this.whenValid({force:i,value:this.value,_refreshed:!0}).done(function(){e._trigger("success")}).fail(function(){e._trigger("error")}).always(function(){e._trigger("validated")})):void 0},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return"undefined"==typeof e&&(e=this.getValue()),e.length||this._isRequired()||"undefined"!=typeof this.options.validateIfEmpty?!0:!1},_isInGroup:function(t){return e.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={force:n,value:r}}var s=this.whenValid(t);return s?$[s.state()]:!0},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=void 0===n?!1:n,s=i.value,a=i.group,o=i._refreshed;if(o||this.refreshConstraints(),!a||this._isInGroup(a)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if(("undefined"==typeof s||null===s)&&(s=this.getValue()),!this.needsValidation(s)&&!0!==r)return e.when();var l=this._getGroupedConstraints(),u=[];return e.each(l,function(i,n){var r=e.when.apply(e,_toConsumableArray(e.map(n,function(e){return t._validateConstraint(s,e)})));return u.push(r),"rejected"===r.state()?!1:void 0}),e.when.apply(e,u)}},_validateConstraint:function(t,i){var n=this,r=i.validate(t,this);return!1===r&&(r=e.Deferred().reject()),e.when(r).fail(function(e){!0===n.validationResult&&(n.validationResult=[]),n.validationResult.push({assert:i,errorMessage:"string"==typeof e&&e})})},getValue:function(){var e;return e="function"==typeof this.options.value?this.options.value(this):"undefined"!=typeof this.options.value?this.options.value:this.$element.val(),"undefined"==typeof e||null===e?"":this._handleWhitespace(e)},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(e,t,i,n){if(window.Parsley._validatorRegistry.validators[e]){var r=new w(this,e,t,i,n);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(e){for(var t=0;t<this.constraints.length;t++)if(e===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[e],this},updateConstraint:function(e,t,i){return this.removeConstraint(e).addConstraint(e,t,i)},_bindConstraints:function(){for(var e=[],t={},i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&(e.push(this.constraints[i]),t[this.constraints[i].name]=this.constraints[i]);this.constraints=e,this.constraintsByName=t;for(var n in this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){(this.$element.hasClass("required")||this.$element.attr("required"))&&this.addConstraint("required",!0,void 0,!0),"string"==typeof this.$element.attr("pattern")&&this.addConstraint("pattern",this.$element.attr("pattern"),void 0,!0),"undefined"!=typeof this.$element.attr("min")&&"undefined"!=typeof this.$element.attr("max")?this.addConstraint("range",[this.$element.attr("min"),this.$element.attr("max")],void 0,!0):"undefined"!=typeof this.$element.attr("min")?this.addConstraint("min",this.$element.attr("min"),void 0,!0):"undefined"!=typeof this.$element.attr("max")&&this.addConstraint("max",this.$element.attr("max"),void 0,!0),"undefined"!=typeof this.$element.attr("minlength")&&"undefined"!=typeof this.$element.attr("maxlength")?this.addConstraint("length",[this.$element.attr("minlength"),this.$element.attr("maxlength")],void 0,!0):"undefined"!=typeof this.$element.attr("minlength")?this.addConstraint("minlength",this.$element.attr("minlength"),void 0,!0):"undefined"!=typeof this.$element.attr("maxlength")&&this.addConstraint("maxlength",this.$element.attr("maxlength"),void 0,!0);var e=this.$element.attr("type");return"undefined"==typeof e?this:"number"===e?this.addConstraint("type",["number",{step:this.$element.attr("step"),base:this.$element.attr("min")||this.$element.attr("value")}],void 0,!0):/^(email|url|range)$/i.test(e)?this.addConstraint("type",e,void 0,!0):this},_isRequired:function(){return"undefined"==typeof this.constraintsByName.required?!1:!1!==this.constraintsByName.required.requirements},_trigger:function(e){return this.trigger("field:"+e)},_handleWhitespace:function(e){return!0===this.options.trimValue&&a.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),("trim"===this.options.whitespace||"squish"===this.options.whitespace||!0===this.options.trimValue)&&(e=a.trimString(e)),e},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],t={},i=0;i<this.constraints.length;i++){var n=this.constraints[i].priority;t[n]||e.push(t[n]=[]),t[n].push(this.constraints[i])}return e.sort(function(e,t){return t[0].priority-e[0].priority}),e}};var C=F,P=function(){this.__class__="ParsleyFieldMultiple"};P.prototype={addElement:function(e){return this.$elements.push(e),this},refreshConstraints:function(){var t;if(this.constraints=[],this.$element.is("select"))return this.actualizeOptions()._bindConstraints(),this;for(var i=0;i<this.$elements.length;i++)if(e("html").has(this.$elements[i]).length){t=this.$elements[i].data("ParsleyFieldMultiple").refreshConstraints().constraints;for(var n=0;n<t.length;n++)this.addConstraint(t[n].name,t[n].requirements,t[n].priority,t[n].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function(){if("function"==typeof this.options.value)value=this.options.value(this);else if("undefined"!=typeof this.options.value)return this.options.value;if(this.$element.is("input[type=radio]"))return this._findRelated().filter(":checked").val()||"";if(this.$element.is("input[type=checkbox]")){var t=[];return this._findRelated().filter(":checked").each(function(){t.push(e(this).val())}),t}return this.$element.is("select")&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var x=function(t,i,n){this.$element=e(t);var r=this.$element.data("Parsley");if(r)return"undefined"!=typeof n&&r.parent===window.Parsley&&(r.parent=n,r._resetOptions(r.options)),r;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if("undefined"!=typeof n&&"ParsleyForm"!==n.__class__)throw new Error("Parent instance must be a ParsleyForm instance");return this.parent=n||window.Parsley,this.init(i)};x.prototype={init:function(e){return this.__class__="Parsley",this.__version__="@@version",this.__id__=a.generateID(),this._resetOptions(e),this.$element.is("form")||a.checkAttr(this.$element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return this.$element.is("input[type=radio], input[type=checkbox]")||this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple")},handleMultiple:function(){var t,i,n=this;if(this.options.multiple||("undefined"!=typeof this.$element.attr("name")&&this.$element.attr("name").length?this.options.multiple=t=this.$element.attr("name"):"undefined"!=typeof this.$element.attr("id")&&this.$element.attr("id").length&&(this.options.multiple=this.$element.attr("id"))),this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return a.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),"undefined"!=typeof t&&e('input[name="'+t+'"]').each(function(t,i){e(i).is("input[type=radio], input[type=checkbox]")&&e(i).attr(n.options.namespace+"multiple",n.options.multiple)});for(var r=this._findRelated(),s=0;s<r.length;s++)if(i=e(r.get(s)).data("Parsley"),"undefined"!=typeof i){this.$element.data("ParsleyFieldMultiple")||i.addElement(this.$element);
break}return this.bind("parsleyField",!0),i||this.bind("parsleyFieldMultiple")},bind:function(t,i){var n;switch(t){case"parsleyForm":n=e.extend(new v(this.$element,this.domOptions,this.options),window.ParsleyExtend)._bindFields();break;case"parsleyField":n=e.extend(new C(this.$element,this.domOptions,this.options,this.parent),window.ParsleyExtend);break;case"parsleyFieldMultiple":n=e.extend(new C(this.$element,this.domOptions,this.options,this.parent),new P,window.ParsleyExtend)._init();break;default:throw new Error(t+"is not a supported Parsley type")}return this.options.multiple&&a.setAttr(this.$element,this.options.namespace,"multiple",this.options.multiple),"undefined"!=typeof i?(this.$element.data("ParsleyFieldMultiple",n),n):(this.$element.data("Parsley",n),n._trigger("init"),n)}};var V=e.fn.jquery.split(".");if(parseInt(V[0])<=1&&parseInt(V[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";V.forEach||a.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var E=e.extend(new l,{$element:e(document),actualizeOptions:null,_resetOptions:null,Factory:x,version:"@@version"});e.extend(C.prototype,l.prototype),e.extend(v.prototype,l.prototype),e.extend(x.prototype,l.prototype),e.fn.parsley=e.fn.psly=function(t){if(this.length>1){var i=[];return this.each(function(){i.push(e(this).parsley(t))}),i}return e(this).length?new x(this,t):void a.warn("You must bind Parsley on an existing element.")},"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),E.options=e.extend(a.objectCreate(o),window.ParsleyConfig),window.ParsleyConfig=E.options,window.Parsley=window.psly=E,window.ParsleyUtils=a;var M=window.Parsley._validatorRegistry=new c(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(t,i){window.Parsley[i]=e.proxy(M,i),window.ParsleyValidator[i]=function(){var e;return a.warnOnce("Accessing the method '"+i+"' through ParsleyValidator is deprecated. Simply call 'window.Parsley."+i+"(...)'"),(e=window.Parsley)[i].apply(e,arguments)}}),window.ParsleyUI="function"==typeof window.ParsleyConfig.ParsleyUI?(new window.ParsleyConfig.ParsleyUI).listen():(new y).listen(),!1!==window.ParsleyConfig.autoBind&&e(function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()});var O=e({}),R=function(){a.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},D="parsley:";e.listen=function(e,n){var r;if(R(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(r=arguments[1],n=arguments[2]),"function"!=typeof n)throw new Error("Wrong parameters");window.Parsley.on(i(e),t(n,r))},e.listenTo=function(e,n,r){if(R(),!(e instanceof C||e instanceof v))throw new Error("Must give Parsley instance");if("string"!=typeof n||"function"!=typeof r)throw new Error("Wrong parameters");e.on(i(n),t(r))},e.unsubscribe=function(e,t){if(R(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(i(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(R(),!(e instanceof C||e instanceof v))throw new Error("Must give Parsley instance");e.off(i(t))},e.unsubscribeAll=function(t){R(),window.Parsley.off(i(t)),e("form,input,textarea,select").each(function(){var n=e(this).data("Parsley");n&&n.off(i(t))})},e.emit=function(e,t){var n;R();var r=t instanceof C||t instanceof v,s=Array.prototype.slice.call(arguments,r?2:1);s.unshift(i(e)),r||(t=window.Parsley),(n=t).trigger.apply(n,_toConsumableArray(s))};e.extend(!0,E,{asyncValidators:{"default":{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,i,n){return E.asyncValidators[e]={fn:t,url:i||!1,options:n||{}},this}}),E.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,i,n,r){var s,a,o={},l=n.validator||(!0===n.reverse?"reverse":"default");if("undefined"==typeof E.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");i=E.asyncValidators[l].url||i,i.indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(t)):o[r.$element.attr("name")||r.$element.attr("id")]=t;var u=e.extend(!0,n.options||{},E.asyncValidators[l].options);s=e.extend(!0,{},{url:i,data:o,type:"GET"},u),r.trigger("field:ajaxoptions",r,s),a=e.param(s),"undefined"==typeof E._remoteCache&&(E._remoteCache={});var d=E._remoteCache[a]=E._remoteCache[a]||e.ajax(s),h=function(){var t=E.asyncValidators[l].fn.call(r,d,i,n);return t||(t=e.Deferred().reject()),e.when(t)};return d.then(h,h)},priority:-1}),E.on("form:submit",function(){E._remoteCache={}}),window.ParsleyExtend.addAsyncValidator=function(){return ParsleyUtils.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),E.addAsyncValidator.apply(E,arguments)},E.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),E.setLocale("en");var q=E;return q});
//# sourceMappingURL=parsley.min.js.map
;
define('form-validation',['jquery', 'parsley'],

    function($) {

        'use strict';

        var pasteQueue = [],
            pasteRunner;

        // large number modulus function
        function modulo(divident, divisor) {
            var cDivident = '';
            var cRest = '';

            for (var i in divident) {
                if (i <= 24) {
                    var cChar = divident[i];
                    var cOperator = cRest + '' + cDivident + '' + cChar;

                    if (cOperator < parseInt(divisor)) {
                        cDivident += '' + cChar;
                    } else {
                        cRest = cOperator % divisor;
                        if (cRest == 0) {
                            cRest = '';
                        }
                        cDivident = '';
                    }
                }
            };

            cRest += '' + cDivident;
            if (cRest == '') {
                cRest = 0;
            }
            return cRest;
        }

        /**
         * Constrain the following fields to numbers
         *
         * business partner number
         * mobile
         * landline (phone, fax)
         * verification code
         * account number
         * premise number
         * PO box
         * contract value (move in)
         * iban
         */
        var numbersOnly = '[ data-parsley-bpn ], ' +
            '[ data-parsley-twonum ], ' +
            '[ data-parsley-mobile_number ], ' +
            '[ data-parsley-emiratesid ], ' +
            '[ data-parsley-mobilenumber ], ' +
            '[ data-parsley-telephone_number ], ' +
            '[ data-parsley-verification_code ], ' +
            '[ data-parsley-account_number ], ' +
            '[ data-parsley-max_number ], ' +
            '[ data-parsley-maxnumber ], ' +
            '[ data-parsley-account_premise_number ], ' +
            '[ data-parsley-premise_number ], ' +
            '[ data-parsley-pobox ], ' +
            '[ data-parsley-grossfloorarea ], ' +
            '[ data-parsley-iban ], [ data-iban_confirm ], ' +
            '[ data-parsley-selectediban ], [ data-iban_confirm ], ' +
            '[ data-parsley-notification_number ], ' +
            '[ data-input-numbers ]',

            currencyInput = '[ data-parsley-currency ], ' +
            '[ data-parsley-contract_value ], ' +
            '[ data-parsley-contract-value ]';

        /**
         * Prevent pasting into the following fields
         *
         * IBAN
         * IBAN confirmation
         */
        $('[ data-parsley-iban ], ' + '[ data-parsley-selectediban ], ' +
            '[ data-iban_confirm ]').on('paste', function(ev) {
            ev.preventDefault();
            ev.stopImmediatePropagation();
        });

        var FormValidation = function() {

                var formFieldErrorClassname = 'form-field__input--error',
                    formFieldWrapperClass = '.form-field__input-wrapper',
                    formFieldWrapperErrorClassname = 'form-field__input-wrapper--error',
                    formFieldWrapperSuccessClassname = 'form-field__input-wrapper--validated';


                /**
                 * Define parsley custom validators
                 */

                // DEWA Username
                window.Parsley.addValidator('username', {

                    requirementType: 'string',
                    validateString: function(value) {
                        var patt = new RegExp(/[^a-zA-Z0-9.@]/);
                        return (value.toString().length >= 6 && value.toString().length <= 75 && !patt.test(value));
                    }
                });

                // DEWA DewaUsername
                window.Parsley.addValidator('dewausername', {

                    requirementType: 'string',
                    validateString: function(value) {
                        var patt = new RegExp(/[^a-zA-Z0-9.]/);
                        return (value.toString().length >= 6 && value.toString().length <= 20 && !patt.test(value));
                    }
                });

                // BPN number
                window.Parsley.addValidator('bpn', {

                    requirementType: 'integer',
                    validateNumber: function(value) {
                        return value.toString().length === 8;

                    }
                });

                // BPN number
                window.Parsley.addValidator('twonum', {

                    requirementType: 'integer',
                    validateNumber: function(value) {

                        return value.toString().length === 10 || value.toString().length === 8;

                    }
                });

                // Account number
                window.Parsley.addValidator('estimate_number', {

                    requirementType: 'string',
                    validateString: function(value) {
                        return value.toString().length === 9;

                    }
                });

                // Account number
                window.Parsley.addValidator('doc_number', {

                    requirementType: 'string',
                    validateString: function(value) {
                        var patt = new RegExp(/[^a-zA-Z0-9]/);
                        return value.toString().length === 35 && !patt.test(value);
                    }
                });

                // Account number
                window.Parsley.addValidator('account_number', {

                    requirementType: 'string',
                    validateString: function(value) {
                        return value.toString().length === 10;

                    }
                });

                // Account number or premise number
                window.Parsley.addValidator('account_premise_number', {

                    requirementType: 'string',
                    validateString: function(value) {
                        return (value.toString().length >= 9 && value.toString().length <= 10);

                    }
                });

                // Account number
                window.Parsley.addValidator('premise_number', {

                    requirementType: 'string',
                    validateString: function(value) {
                        return value.toString().length === 9;
                    }

                });

                // Notication number
                window.Parsley.addValidator('notification_number', {

                    requirementType: 'string',
                    validateString: function(value) {
                        return value.toString().length === 9;

                    }
                });

                // Profanity filter 
                //window.Parsley.addValidator('profanity_filter', {
                //    requirementType: 'string',

                //    validateString: function(value) {

                //        var profanity = ['4r5e','5h1t','5hit','a55','anal','anus','ar5e','arrse','arse','ass','ass-fucker','asses','assfucker','assfukka','asshole','assholes','asswhole','a_s_s','b!tch','b00bs','b17ch','b1tch','ballbag','balls','ballsack','bastard','beastial','beastiality','bellend','bestial','bestiality','bi+ch','biatch','bitch','bitcher','bitchers','bitches','bitchin','bitching','bloody','blow job','blowjob','blowjobs','boiolas','bollock','bollok','boner','boob','boobs','booobs','boooobs','booooobs','booooooobs','breasts','buceta','bugger','bum','bunny fucker','butt','butthole','buttmuch','buttplug','c0ck','c0cksucker','carpet muncher','cawk','chink','cipa','cl1t','clit','clitoris','clits','cnut','cock','cock-sucker','cockface','cockhead','cockmunch','cockmuncher','cocks','cocksuck ','cocksucked ','cocksucker','cocksucking','cocksucks ','cocksuka','cocksukka','cok','cokmuncher','coksucka','coon','cox','crap','cum','cummer','cumming','cums','cumshot','cunilingus','cunillingus','cunnilingus','cunt','cuntlick ','cuntlicker ','cuntlicking ','cunts','cyalis','cyberfuc','cyberfuck ','cyberfucked ','cyberfucker','cyberfuckers','cyberfucking ','d1ck','damn','dick','dickhead','dildo','dildos','dink','dinks','dirsa','dlck','dog-fucker','doggin','dogging','donkeyribber','doosh','duche','dyke','ejaculate','ejaculated','ejaculates ','ejaculating ','ejaculatings','ejaculation','ejakulate','f u c k','f u c k e r','f4nny','fag','fagging','faggitt','faggot','faggs','fagot','fagots','fags','fanny','fannyflaps','fannyfucker','fanyy','fatass','fcuk','fcuker','fcuking','feck','fecker','felching','fellate','fellatio','fingerfuck ','fingerfucked ','fingerfucker ','fingerfuckers','fingerfucking ','fingerfucks ','fistfuck','fistfucked ','fistfucker ','fistfuckers ','fistfucking ','fistfuckings ','fistfucks ','flange','fook','fooker','fuck','fucka','fucked','fucker','fuckers','fuckhead','fuckheads','fuckin','fucking','fuckings','fuckingshitmotherfucker','fuckme ','fucks','fuckwhit','fuckwit','fudge packer','fudgepacker','fuk','fuker','fukker','fukkin','fuks','fukwhit','fukwit','fux','fux0r','f_u_c_k','gangbang','gangbanged ','gangbangs ','gaylord','gaysex','goatse','God','god-dam','god-damned','goddamn','goddamned','hardcoresex ','hell','heshe','hoar','hoare','hoer','homo','hore','horniest','horny','hotsex','jack-off ','jackoff','jap','jerk-off ','jism','jiz ','jizm ','jizz','kawk','knob','knobead','knobed','knobend','knobhead','knobjocky','knobjokey','kock','kondum','kondums','kum','kummer','kumming','kums','kunilingus','l3i+ch','l3itch','labia','lmfao','lust','lusting','m0f0','m0fo','m45terbate','ma5terb8','ma5terbate','masochist','master-bate','masterb8','masterbat*','masterbat3','masterbate','masterbation','masterbations','masturbate','mo-fo','mof0','mofo','mothafuck','mothafucka','mothafuckas','mothafuckaz','mothafucked ','mothafucker','mothafuckers','mothafuckin','mothafucking ','mothafuckings','mothafucks','mother fucker','motherfuck','motherfucked','motherfucker','motherfuckers','motherfuckin','motherfucking','motherfuckings','motherfuckka','motherfucks','muff','mutha','muthafecker','muthafuckker','muther','mutherfucker','n1gga','n1gger','nazi','nigg3r','nigg4h','nigga','niggah','niggas','niggaz','nigger','niggers ','nob','nob jokey','nobhead','nobjocky','nobjokey','numbnuts','nutsack','orgasim ','orgasims ','orgasm','orgasms ','p0rn','pawn','pecker','penis','penisfucker','phonesex','phuck','phuk','phuked','phuking','phukked','phukking','phuks','phuq','pigfucker','pimpis','piss','pissed','pisser','pissers','pisses ','pissflaps','pissin ','pissing','pissoff ','poop','porn','porno','pornography','pornos','prick','pricks ','pron','pube','pusse','pussi','pussies','pussy','pussys ','rectum','retard','rimjaw','rimming','s hit','s.o.b.','sadist','schlong','screwing','scroat','scrote','scrotum','semen','sex','sh!+','sh!t','sh1t','shag','shagger','shaggin','shagging','shemale','shi+','shit','shitdick','shite','shited','shitey','shitfuck','shitfull','shithead','shiting','shitings','shits','shitted','shitter','shitters ','shitting','shittings','shitty ','skank','slut','sluts','smegma','smut','snatch','son-of-a-bitch','spac','spunk','s_h_i_t','t1tt1e5','t1tties','teets','teez','testical','testicle','tit','titfuck','tits','titt','tittie5','tittiefucker','titties','tittyfuck','tittywank','titwank','tosser','turd','tw4t','twat','twathead','twatty','twunt','twunter','v14gra','v1gra','vagina','viagra','vulva','w00se','wang','wank','wanker','wanky','whoar','whore','willies','willy','xrated','xxx']
                //        var countwords = -1

                //        var words = value.split(" ");

                //        var foo = [];
                //            $.grep(profanity, function(el) {
                //                if ($.inArray(el, words) != -1) {
                //                    foo.push(el);
                //                }
                //            });

                //        if(foo.length > 0 ) {
                //            return false;
                //        }
                //        return true;
                //    }
                //});

                // Project generation subject
                window.Parsley.addValidator('project_generation_subject', {

                    requirementType: 'string',
                    validateString: function(value) {
                        return (value.toString().length > 0 && value.toString().length <= 125);
                    }
                });

                // Contract value
                window.Parsley.addValidator('contract_value', {

                    requirementType: 'integer',
                    validateString: function(value) {
                        return (value <= 999999999 && value > 0);

                    }
                });

                window.Parsley.addValidator('contract-value', {

                    requirementType: 'integer',
                    validateString: function(value) {
                        return (value <= 999999999 && value > 0);

                    }
                });

                // PO Box
                window.Parsley.addValidator('pobox', {
                    requirementType: 'integer',
                    validateString: function(value) {
                        var length = value.toString().length;
                        return length <= 6;
                    }
                });

                // PO Box
                window.Parsley.addValidator('grossfloorarea', {
                    requirementType: 'integer',
                    validateString: function(value) {
                        var length = value.toString().length;
                        return length <= 6;
                    }
                });


                // Verification code
                window.Parsley.addValidator('verification_code', {

                    requirementType: 'string',
                    validateString: function(value) {

                        var patt = new RegExp(/[^0-9]/);
                        return value.toString().length === 6 && !patt.test(value);

                    }
                });

                // Account number
                window.Parsley.addValidator('emiratesid', {

                    requirementType: 'integer',
                    validateNumber: function(value) {
                        var regex = value.toString().match(/^(?:784)\d{12}$/) !== null;
                        return value.toString().length === 15 && regex;

                    }
                });

                // Website
                window.Parsley.addValidator('website', {

                    requirementType: 'string',
                    validateString: function(value) {
                        var web = value.toString().match(/^https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|^www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|^https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]\.[^\s]{2,}|^www\.[a-zA-Z0-9]\.[^\s]{2,}/) !== null;
                        //var patt = new RegExp(/https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9]\.[^\s]{2,}/);


                        return web; //!patt.test(value);
                    }

                });

                // RERA user ID
                window.Parsley.addValidator('rera_id', {

                    requirementType: 'string',
                    validateString: function(value) {

                        return value.toString().length > 5;

                    }
                });

                // IBAN
                window.Parsley.addValidator('iban', {
                    requirementType: 'string',
                    validateString: function(value) {
                        var prefix = '1014',
                            ibanTrans;

                        if (value.toString().length === 21) {
                            prefix += value.slice(0, 2);
                            ibanTrans = value.substr(2) + prefix;

                            return modulo(ibanTrans, 97) === '1';
                        }

                        return false;
                    }
                });

                // SELECTED-IBAN
                window.Parsley.addValidator('selectediban', {
                    requirementType: 'string',
                    validateString: function(value) {
                        var prefix = '1014',
                            ibanTrans;

                        var check = false,
                            bankcodes_array;

                        if (!($('.selectediban').attr('bankcodes') == undefined)) {
                            bankcodes_array = $('.selectediban').attr('bankcodes').split(",");
                        };

                        $(bankcodes_array).each(function() {
                            if (value.slice(2, 5) == this) {
                                check = true;
                            }
                        });

                        var check2 = ($('.selectediban').attr('bankcodes') == undefined || $('.selectediban').attr('bankcodes') == "");


                        if (value.toString().length === 21 && ((check && ($('.selectediban').attr('bankcodes').length != 0)) || check2)) {
                            prefix += value.slice(0, 2);
                            ibanTrans = value.substr(2) + prefix;

                            return modulo(ibanTrans, 97) === '1';
                        };

                        return false;
                    }
                });

                // Year
                window.Parsley.addValidator('year', {
                    requirementType: 'integer',
                    validateNumber: function(value) {
                        var d = new Date();
                        return value.toString().length === 4 && value <= d.getFullYear();
                    }
                });

                // Year
                window.Parsley.addValidator('max_partial_payment', {
                    requirementType: 'number',
                    validateNumber: function(value, requirement) {
                        return ((value <= 200000 + requirement) && value >= 0);
                    }
                });

                // password
                window.Parsley.addValidator('password', {

                    requirementType: 'string',
                    validateString: function(value, requirement) {

                        var matched = true,
                            usernameField = $(requirement)[0];

                        if (usernameField !== undefined && (usernameField.value === value)) {

                            matched = false;
                        } else {

                            matched = value.match(value.match((/^(?=.*\d)(?=.*[\D])[0-9\D]{8,}$/))) !== null;
                        }

                        return matched;
                    }
                });

                // DEWA password
                window.Parsley.addValidator('dewapassword', {

                    requirementType: 'string',
                    validateString: function(value) {

                        var matched = value.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$&+,:;=?@#|'<>.^*()%!_-])[A-Za-z\d$&+,:;=?@#|'<>.^*()%!_-]{8,}$/) !== null;

                        return matched;
                    }
                });

                //telephone number
                window.Parsley.addValidator('telephone_number', {
                    requirementType: 'string',
                    validateString: function(value) {
                        return value.match(/^(?:2|3|4|6|7|9)\d{7}$/) !== null;
                    }
                });

                //mobile number
                window.Parsley.addValidator('mobile_number', {
                    requirementType: 'string',
                    validateString: function(value) {
                        //return value.match( /^(?:50|52|55|56)\d{7}$/ ) !== null; comment by bharat                      

                        return ((value.match(/^(?:50|51|52|53|54|55|56|57|58|59|52|54|55|56)\d{7}$/) !== null) && !(/\b(1|0|5|9)\1+\b/).test(value.substring(2)));
                    }
                });

                //mobile number
                window.Parsley.addValidator('mobilenumber', {
                    requirementType: 'string',
                    validateString: function(value) {
                        //return value.match( /^(?:50|52|55|56)\d{7}$/ ) !== null; comment by bharat                      

                        return ((value.match(/^(?:50|51|52|53|54|55|56|57|58|59|52|54|55|56)\d{7}$/) !== null) && !(/\b(1|0|5|9)\1+\b/).test(value.substring(2)));
                    }
                });

                //email
                window.Parsley.addValidator('email', {
                    requirementType: 'string',
                    validateString: function(value) {
                        //return value.match( /^(?:50|52|55|56)\d{7}$/ ) !== null; comment by bharat                      

                        return !(/(?:dummy)/i).test(value);
                    }
                });

                //plot number
                window.Parsley.addValidator('plotnumber', {
                    requirementType: 'string',
                    validateString: function(value) {
                        //return value.match( /^(?:50|52|55|56)\d{7}$/ ) !== null; comment by bharat                      

                        return ((/^(?:(?![a-zA-Z\s^.]).)*$/).test(value) && (/^(?!-)(?!.*--)[0-9-]+/).test(value) && (/[0-9]/).test(value.substr(value.length - 1)));
                        //return (/^(?!-)(?!.*--)[0-9-]+(?<!-)$/).test(value);
                        //return (value.match(/(?<=^|)\d+(\-\d+)?(?=$|)/) !== null)
                    }
                });

                // currency value
                window.Parsley.addValidator('currency', {
                    requirementType: 'string',
                    validateString: function(value) {
                        return value.match(/^\d*(\.\d{1,3})?$/) !== null;
                    }
                });

                // name value
                window.Parsley.addValidator('name', {
                    requirementType: 'string',
                    validateString: function(value) {
                        return value.match(/^[a-zA-Z\s'-.]*$/) !== null;
                    }
                });

                // fullname value
                window.Parsley.addValidator('fullname', {
                    requirementType: 'string',
                    validateString: function(value) {
                        return (value.match(/^[^:;{}\[\]<>?\/+*&^%$#!()_="'|\/~]*$/) !== null) && !(value.toString().match(/^https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|^www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|^https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]\.[^\s]{2,}|^www\.[a-zA-Z0-9]\.[^\s]{2,}/) !== null) && !(value.toString().match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/) !== null);
                    }
                });

                // min and max bill total
                window.Parsley.addValidator('billtotalmax', {
                    requirementType: 'string',
                    validateString: function(value, max) {
                        var valFloat = parseFloat(value);

                        return valFloat <= max;
                    }
                });
                window.Parsley.addValidator('billtotalmin', {
                    requirementType: 'string',
                    validateString: function(value, min) {
                        var valFloat = parseFloat(value);

                        return valFloat > min;
                    }
                });

                /**
                 * Listen to parsley events
                 */


                window.Parsley.on('form:validate', function(form) {
                    if (!form.isValid()) {
                        for (var n = 0; n < form.fields.length; n++) {
                            if (form.fields[n].validationResult !== true) {
                                if (window.navigator.userAgent.match(/iphone|ipad/i)) {
                                    window.setTimeout(function() {
                                        $("html,body").animate({
                                            scrollTop: $(form.fields[n].$element[0]).offset().top
                                        });
                                    }, 0);
                                }
                                break;
                            }
                        }
                    }
                });


                window.Parsley.on('field:success', function() {

                    var type = this.$element.attr('type'),
                        nosymbol = this.$element.attr('required') === undefined && this.$element.val().length === 0;

                    this.$element.attr('aria-invalid', false);

                    if (nosymbol) {

                        this.$element.removeClass(formFieldErrorClassname);
                        this.$element.parents(formFieldWrapperClass).removeClass(formFieldWrapperErrorClassname);
                    } else {

                        if (type !== 'file') {

                            this.$element.removeClass(formFieldErrorClassname);
                            this.$element.parents(formFieldWrapperClass).removeClass(formFieldWrapperErrorClassname).addClass(formFieldWrapperSuccessClassname);
                        }

                    }

                });

                window.Parsley.on('field:error', function() {

                    var type = this.$element.attr('type');

                    this.$element.attr('aria-invalid', true);

                    if (type !== 'file' && type !== 'checkbox' && type !== 'radio') {

                        this.$element.addClass(formFieldErrorClassname);
                        this.$element.parents(formFieldWrapperClass).removeClass(formFieldWrapperSuccessClassname).addClass(formFieldWrapperErrorClassname);

                    }

                });

            },
            _singleton;

        // field length limitations
        FormValidation.prototype.limit = function() {

            $('[ data-parsley-rera_id ]').on('keypress.truncate', function() {
                truncateVal($(this), 5);
            });
            $('[ data-parsley-rera_id ]').on('paste.truncate', function() {
                queuePasteEvent($(this), 'truncate', 5);
            });

            $('[ data-parsley-max_number ]').on('keypress.truncate', function() {
                truncateVal($(this), parseInt($(this).attr('data-max-length')));
            });
            $('[ data-parsley-max_number ]').on('paste.truncate', function() {
                queuePasteEvent($(this), 'truncate', parseInt($(this).attr('data-max-length')));
            });

            $('[ data-parsley-passportid ]').off('keypress.truncate');

            $('[ data-parsley-verification_code ], ' +
                '[ data-parsley-pobox ], ' +
                '[ data-parsley-grossfloorarea ]').on('keypress.truncate', function() {
                truncateVal($(this), 6);
            });
            $('[ data-parsley-verification_code ], ' +
                '[ data-parsley-pobox ], ' +
                '[ data-parsley-grossfloorarea ]').on('paste.truncate', function() {
                queuePasteEvent($(this), 'truncate', 6);
            });

            $('[ data-parsley-telephone_number ]').on('keypress.truncate', function() {
                truncateVal($(this), 8);
            });
            $('[ data-parsley-telephone_number ]').on('paste.truncate', function() {
                queuePasteEvent($(this), 'truncate', 8);
            });
            $('[ data-parsley-bpn ]').on('keypress.truncate', function() {
                truncateVal($(this), 8);
            });
            $('[ data-parsley-bpn ]').on('paste.truncate', function() {
                queuePasteEvent($(this), 'truncate', 8);
            });
            $('[ data-parsley-twonum ]').on('keypress.truncate', function() {
                truncateVal($(this), 10);
            });
            $('[ data-parsley-twonum ]').on('paste.truncate', function() {

                queuePasteEvent($(this), 'truncate', 10);
            });

            $('[ data-parsley-premise_number ], ' +
                '[ data-parsley-notification_number ], ' +
                '[ data-parsley-estimate_number ], ' +
                '[ data-parsley-mobilenumber ], ' +
                '[ data-parsley-mobile_number ]').on('keypress.truncate', function() {
                truncateVal($(this), 9);
            });
            $('[ data-parsley-premise_number ], ' +
                '[ data-parsley-notification_number ], ' +
                '[ data-parsley-estimate_number ], ' +
                '[ data-parsley-mobilenumber ], ' +
                '[ data-parsley-mobile_number ]').on('paste.truncate', function() {
                queuePasteEvent($(this), 'truncate', 9);
            });

            $('[ data-parsley-maxnumber ]').on('keypress.truncate', function() {
                truncateVal($(this), parseInt($(this).attr('data-parsley-maxnumber')));
            });
            $('[ data-parsley-maxnumber ]').on('paste.truncate', function() {
                queuePasteEvent($(this), 'truncate', parseInt($(this).attr('data-parsley-maxnumber')));
            });

            $('[ data-parsley-account_number ], ' +
                '[ data-parsley-account_premise_number ]').on('keypress.truncate', function() {
                truncateVal($(this), 10);
            });
            $('[ data-parsley-account_number ], ' +
                '[ data-parsley-account_premise_number ]').on('paste.truncate', function() {
                queuePasteEvent($(this), 'truncate', 10);
            });
            $('[ data-parsley-emiratesid ]').on('keypress.truncate', function() {

                var attr = $(this).attr("data-parsley-emiratesid");


                if (typeof attr !== typeof undefined && attr !== false) {
                    truncateVal($(this), 15);
                }
            });
            $('[ data-parsley-emiratesid ]').on('paste.truncate', function() {
                queuePasteEvent($(this), 'truncate', 15);
                //console.log('emirates')
            });
            $('[ data-parsley-passportid ]').on('keypress.truncate', function() {

                //console.log('password')
            });
            $('[ data-parsley-passportid ]').on('paste.truncate', function() {
                //console.log('password')
            });

            $('[ data-parsley-iban ], ' + '[ data-parsley-selectediban ], ' +
                '[ data-iban_confirm ]').on('keypress.truncate', function() {
                truncateVal($(this), 21);
            });

            $('[ data-parsley-doc_number ]').on('keypress.truncate', function() {
                truncateVal($(this), 35);
            });
            $('[ data-parsley-doc_number ]').on('paste.truncate', function() {
                queuePasteEvent($(this), 'truncate', 35);
            });

            // generic truncation
            $('[ data-input-truncate ]').on('keypress.truncate', function() {
                var truncateTo = parseInt($(this).data('input-truncate'), 10);
                truncateVal($(this), truncateTo);
            });
            $('[ data-input-truncate ]').on('paste.truncate', function() {
                var truncateTo = parseInt($(this).data('input-truncate'), 10);
                queuePasteEvent($(this), 'truncate', truncateTo);
            });

            // special max partial payment validation
            $('[ data-parsley-max_partial_payment ]').on('keyup', function() {
                try {
                    if ($(this).val().indexOf('.') && $(this).val().split('.')[1].length > 2) {
                        $(this).val(Math.floor(parseFloat($(this).val()) * 100) / 100);
                    }
                } catch (err) {}
            });
            $('[ data-parsley-max_partial_payment ]').on('paste.truncate', function() {
                try {
                    if ($(this).val().indexOf('.') && $(this).val().split('.')[1].length > 2) {
                        $(this).val(Math.floor(parseFloat($(this).val()) * 100) / 100);
                    }
                } catch (err) {}
            });

            // number only fields
            $(numbersOnly).on('keypress.numbers', constrainNumerals);
            $(numbersOnly).on('paste.numbers', function() {
                queuePasteEvent($(this), 'numbers');
            });

            $('[ data-parsley-passportid ]').off('keypress.numbers');
            $('[ data-parsley-passportid ]').off('paste.numbers');

            // currency input types
            $(currencyInput).on('keypress.currency', constrainCurrency);
            $(currencyInput).on('paste.currency', function() {
                queuePasteEvent($(this), 'currency');
            });

            // name input types
            $('[ data-parsley-name ]').on('keypress.name', constrainName);
            $('[ data-parsley-name ]').on('paste.name', function() {
                queuePasteEvent($(this), 'name');
            });


            // username input type
            $('[ data-parsley-username ]').on('keypress.username', constrainUsername);
            $('[ data-parsley-username ]').on('paste.username', function() {
                queuePasteEvent($(this), 'username');
            });

            // Dewa username input type
            $('[ data-parsley-dewausername ]').on('keypress.dewausername', constrainDewaUsername);
            $('[ data-parsley-dewausername ]').on('paste.dewausername', function() {
                queuePasteEvent($(this), 'dewausername');
            });

            // Dewa password input type
            $('[ data-parsley-dewapassword ]').on('paste.dewapassword', function() {
                queuePasteEvent($(this), 'dewapassword');
            });


            $()

            // paste event queue
            function queuePasteEvent(el, type, param) {

                pasteQueue[type] = param || true;

                if (!pasteRunner) {
                    pasteRunner = window.setTimeout(function() {
                        var value = el.val();

                        // run paste transforms
                        if (pasteQueue.numbers) {
                            value = pasteNumerals(value);
                        }

                        if (pasteQueue.currency) {
                            value = pasteCurrency(value);
                        }

                        if (pasteQueue.name) {
                            value = pasteName(value);
                        }

                        if (pasteQueue.username) {
                            value = pasteUsername(value);
                        }
                        if (pasteQueue.dewausername) {
                            value = pasteDewaUsername(value);
                        }

                        if (typeof pasteQueue.truncate === 'number') {
                            value = truncatePaste(value, param);
                        }

                        el.val(value);

                        resetPasteQueue();
                    }, 20);
                }
            }

            // reset queue
            function resetPasteQueue() {
                pasteQueue = [];
                pasteRunner = null;
            }

            // truncation and input rules
            function truncateVal(target, len) {
                if (target.val().length >= len) {
                    window.setTimeout(function() {
                        target.val(target.val().substring(0, (len)));
                    }, 50);
                }
            }

            function truncatePaste(value, len) {
                return value.length >= len ? value.substring(0, (len)) : value;
            }

            function constrainNumerals(ev) {
                var keyCode = ev.which,
                    character = String.fromCharCode(keyCode);

                // Allow: special keys and specifically backspace, delete, tab, escape, enter
                if (($.inArray(keyCode, [0, 8, 9, 13, 27, 190]) !== -1 && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+A
                    (character === 'a' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+C
                    (character === 'c' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+V
                    (character === 'v' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+X
                    (character === 'x' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: home, end, left, right
                    (keyCode >= 35 && keyCode <= 38 && !ev.shiftKey) ||
                    // if allowed character
                    /[0-9]/.test(character)) {
                    return;
                }

                // prevent all others
                ev.preventDefault();
            }

            function pasteNumerals(value) {
                return value.replace(/\D/g, '');
            }

            function constrainCurrency(ev) {
                var input = $(ev.target),
                    keyCode = ev.which,
                    allowDecimal = input.val().indexOf('.') < 0 ? true : false,
                    character = String.fromCharCode(keyCode);

                // Allow: backspace, delete, tab, escape, enter
                if (($.inArray(keyCode, [0, 8, 9, 13, 27, 190]) !== -1 && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+A
                    (character === 'a' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+C
                    (character === 'c' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+V
                    (character === 'v' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+X
                    (character === 'x' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: home, end, left, right
                    (keyCode >= 35 && keyCode <= 38 && !ev.shiftKey) ||
                    // Allowed characters
                    (allowDecimal && /[\.]/.test(character) || /[0-9]/.test(character))) {

                    // prevent exceeding 2dp
                    window.setTimeout(function() {
                        if (input.val().indexOf('.') >= 0 && input.val().split('.')[1] && input.val().split('.')[1].length > 2) {
                            input.val(Math.floor(parseFloat(input.val()) * 100) / 100);
                        }
                    }, 10);

                    // allow character
                    return;
                }

                // prevent all others
                ev.preventDefault();
            }

            function pasteCurrency(value) {
                var wVal = value.replace(/[^0-9\.]+/g, ''),
                    sVal, newVal;

                wVal = wVal[0] === '.' ? '0' + wVal : wVal;
                sVal = wVal.split('.');
                newVal = sVal.length > 1 ? sVal[0] + '.' + sVal[1] : sVal[0];

                return newVal;
            }

            function constrainName(ev) {
                var keyCode = ev.which,
                    character = String.fromCharCode(keyCode);

                // Allow: backspace, delete, tab, escape, enter
                if (($.inArray(keyCode, [0, 8, 9, 13, 27, 190]) !== -1 && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+A
                    (character === 'a' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+C
                    (character === 'c' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+V
                    (character === 'v' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+X
                    (character === 'x' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: home, end, left, right
                    (keyCode >= 35 && keyCode <= 38 && !ev.shiftKey) ||
                    // Allowed characters
                    /[a-zA-Z\s'-]/.test(character)) {
                    return;
                }

                // prevent all others
                ev.preventDefault();
            }

            function pasteName(value) {
                return value.replace(/[^a-zA-Z\s'-]+/g, '');
            }


            function constrainUsername() {
                var regex = new RegExp(/[a-zA-Z0-9.@]/),
                    key = String.fromCharCode(!event.charCode ? event.which : event.charCode);
                if (!regex.test(key)) {
                    event.preventDefault();
                    return false;
                }
            }

            function pasteUsername(value) {
                return value.replace(/[^a-zA-Z0-9.@\.]+/g, '');
            }

            function constrainDewaUsername() {
                var regex = new RegExp(/[a-zA-Z0-9.]/),
                    key = String.fromCharCode(!event.charCode ? event.which : event.charCode);
                if (!regex.test(key)) {
                    event.preventDefault();
                    return false;
                }
            }

            function pasteDewaUsername(value) {
                return value.replace(/[^a-zA-Z0-9.\.]+/g, '');
            }
        };

        FormValidation.prototype.apply = function($form) {

            // on parsley triggers
            $form.find('input[type=text], input[type=file], input[type=number], input[type=email], input[type=tel]').not('[data-el=datepicker]').attr('data-parsley-trigger', 'focusout');
            $form.find('select').attr('data-parsley-trigger', 'change');

            // global parsley options
            $form.parsley({

                excluded: 'input.form-field__input--readonly, input[type=button], input[type=submit], input[type=reset], input[type=hidden], [disabled], :hidden'
            });

            // accessibility fix for form submission on pressing enter (not happening on the forms with multiple buttons)
            $form.find('input[type=text], input[type=number], input[type=email], input[type=tel], select').on('keydown.submit', function(event) {

                var keycode = (event.keyCode ? event.keyCode : (event.which ? event.which : event.charCode));

                if (keycode === 13) {

                    var $submit = $form.find('[type=submit]');

                    if ($submit[0] !== undefined) {

                        $submit.last().trigger('click');
                        return false;
                    }
                }
            });

            // on special validation rules for Emirates ID
            $form.find('#form-field-user_id_type').on('change.emiratesid', function() {
                var idField = $('#form-field-user_id_no'),
                    select = $(this);

                if (select.val() === 'ED') {
                    truncateVal(idField, 15);

                    idField.attr('data-parsley-emiratesid', true);
                    idField.on('keypress.eid', function() {
                        truncateVal(idField, 15);
                    });
                    idField.on('paste.eid', function() {
                        queuePasteEvent(idField, 'truncate', 15);
                    });
                } else {

                    idField.removeAttr('data-parsley-emiratesid');
                    idField.off('.eid');
                }

                window.setTimeout(function() {
                    if (idField.parsley().validationResult === true || typeof idField.parsley().validationResult === 'object' && idField.parsley().validationResult.length) {
                        idField.parsley().validate();
                    }
                }, 10);

            });

            //for international numbers
            $('.form-field__input-wrapper--mobile-numberNEW').each(function() {
                $(this).find('select').off('change');
            });

            function truncateVal(target, len) {
                if (target.val().length >= len) {
                    window.setTimeout(function() {
                        target.val(target.val().substring(0, (len)));
                    }, 5);
                }
            }

            // paste event queue
            function queuePasteEvent(el, type, param) {

                pasteQueue[type] = param || true;

                if (!pasteRunner) {
                    pasteRunner = window.setTimeout(function() {
                        var value = el.val();

                        if (typeof pasteQueue.truncate === 'number') {
                            value = truncatePaste(value, param);
                        }

                        el.val(value);

                        resetPasteQueue();
                    }, 20);
                }
            }

            // reset queue
            function resetPasteQueue() {
                pasteQueue = [];
                pasteRunner = null;
            }

            function truncatePaste(value, len) {
                return value.length >= len ? value.substring(0, (len)) : value;
            }

            function constrainNumerals(ev) {
                var keyCode = ev.which,
                    character = String.fromCharCode(keyCode);

                // Allow: special keys and specifically backspace, delete, tab, escape, enter
                if (($.inArray(keyCode, [0, 8, 9, 13, 27, 190]) !== -1 && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+A
                    (character === 'a' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+C
                    (character === 'c' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+V
                    (character === 'v' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: Ctrl/Cmd+X
                    (character === 'x' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                    // Allow: home, end, left, right
                    (keyCode >= 35 && keyCode <= 38 && !ev.shiftKey) ||
                    // if allowed character
                    /[0-9]/.test(character)) {
                    return;
                }

                // prevent all others
                ev.preventDefault();
            }

            //international numbers
            $('.form-field__input-wrapper--mobile-numberNEW').each(function() {
                var $prefix = $(this).find('.form-field__input-prefix--mobile-number'),
                    $input = $(this).find('.form-field__input');

                //console.log($prefix.val())

                $input.off('keypress.const').on('keypress.const', constrainNumerals);

                if ($prefix.val() == '+971' || $prefix.val() == '00971' || $prefix.val() == '971') {
                    $input.attr('data-parsley-pattern', '/^(?:50|51|52|53|54|55|56|57|58|59|52|54|55|56)\u005Cd{7}$/');
                    $input.off('keypress.int').on('keypress.int', function() {
                        truncateVal($(this), 9)
                    });
                    $input.off('paste.int').on('paste.int', function() {
                        queuePasteEvent($(this), 'truncate', 9);
                    });
                } else {
                    $input.attr('data-parsley-pattern', '/\u005Cd/');
                    $input.off('keypress.int');
                    $input.off('paste.int');
                };

                $prefix.off('change.int').on('change.int', function() {
                    if ($prefix.val() == '+971' || $prefix.val() == '00971' || $prefix.val() == '971') {
                        $input.attr('data-parsley-pattern', '/^(?:50|51|52|53|54|55|56|57|58|59|52|54|55|56)\u005Cd{7}$/');
                        $input.off('keypress.int').on('keypress.int', function() {
                            truncateVal($(this), 9)
                        });
                        $input.off('paste.int').on('paste.int', function() {
                            queuePasteEvent($(this), 'truncate', 9);
                        });
                    } else {
                        $input.attr('data-parsley-pattern', '/\u005Cd/');
                        $input.off('keypress.int');
                        $input.off('paste.int');
                    };
                    $input.parsley().validate();
                });
            });

        };

        _singleton = new FormValidation();

        return _singleton;
    });

/*!
 * pickadate.js v3.5.6, 2015/04/20
 * By Amsul, http://amsul.ca
 * Hosted on http://amsul.github.io/pickadate.js
 * Licensed under MIT
 */

(function ( factory ) {

    // AMD.
    if ( typeof define == 'function' && define.amd )
        define( 'picker', ['jquery'], factory )

    // Node.js/browserify.
    else if ( typeof exports == 'object' )
        module.exports = factory( require('jquery') )

    // Browser globals.
    else this.Picker = factory( jQuery )

}(function( $ ) {

var $window = $( window )
var $document = $( document )
var $html = $( document.documentElement )
var supportsTransitions = document.documentElement.style.transition != null


/**
 * The picker constructor that creates a blank picker.
 */
function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {

    // If there’s no element, return the picker constructor.
    if ( !ELEMENT ) return PickerConstructor


    var
        IS_DEFAULT_THEME = false,


        // The state of the picker.
        STATE = {
            id: ELEMENT.id || 'P' + Math.abs( ~~(Math.random() * new Date()) )
        },


        // Merge the defaults and options passed.
        SETTINGS = COMPONENT ? $.extend( true, {}, COMPONENT.defaults, OPTIONS ) : OPTIONS || {},


        // Merge the default classes with the settings classes.
        CLASSES = $.extend( {}, PickerConstructor.klasses(), SETTINGS.klass ),


        // The element node wrapper into a jQuery object.
        $ELEMENT = $( ELEMENT ),


        // Pseudo picker constructor.
        PickerInstance = function() {
            return this.start()
        },


        // The picker prototype.
        P = PickerInstance.prototype = {

            constructor: PickerInstance,

            $node: $ELEMENT,


            /**
             * Initialize everything
             */
            start: function() {

                // If it’s already started, do nothing.
                if ( STATE && STATE.start ) return P


                // Update the picker states.
                STATE.methods = {}
                STATE.start = true
                STATE.open = false
                STATE.type = ELEMENT.type


                // Confirm focus state, convert into text input to remove UA stylings,
                // and set as readonly to prevent keyboard popup.
                ELEMENT.autofocus = ELEMENT == getActiveElement()
                ELEMENT.readOnly = !SETTINGS.editable
                ELEMENT.id = ELEMENT.id || STATE.id
                if ( ELEMENT.type != 'text' ) {
                    ELEMENT.type = 'text'
                }


                // Create a new picker component with the settings.
                P.component = new COMPONENT(P, SETTINGS)


                // Create the picker root and then prepare it.
                P.$root = $( '<div class="' + CLASSES.picker + '" id="' + ELEMENT.id + '_root" />' )
                prepareElementRoot()


                // Create the picker holder and then prepare it.
                P.$holder = $( createWrappedComponent() ).appendTo( P.$root )
                prepareElementHolder()


                // If there’s a format for the hidden input element, create the element.
                if ( SETTINGS.formatSubmit ) {
                    prepareElementHidden()
                }


                // Prepare the input element.
                prepareElement()


                // Insert the hidden input as specified in the settings.
                if ( SETTINGS.containerHidden ) $( SETTINGS.containerHidden ).append( P._hidden )
                else $ELEMENT.after( P._hidden )


                // Insert the root as specified in the settings.
                if ( SETTINGS.container ) $( SETTINGS.container ).append( P.$root )
                else $ELEMENT.after( P.$root )


                // Bind the default component and settings events.
                P.on({
                    start: P.component.onStart,
                    render: P.component.onRender,
                    stop: P.component.onStop,
                    open: P.component.onOpen,
                    close: P.component.onClose,
                    set: P.component.onSet
                }).on({
                    start: SETTINGS.onStart,
                    render: SETTINGS.onRender,
                    stop: SETTINGS.onStop,
                    open: SETTINGS.onOpen,
                    close: SETTINGS.onClose,
                    set: SETTINGS.onSet
                })


                // Once we’re all set, check the theme in use.
                IS_DEFAULT_THEME = isUsingDefaultTheme( P.$holder[0] )


                // If the element has autofocus, open the picker.
                if ( ELEMENT.autofocus ) {
                    P.open()
                }


                // Trigger queued the “start” and “render” events.
                return P.trigger( 'start' ).trigger( 'render' )
            }, //start


            /**
             * Render a new picker
             */
            render: function( entireComponent ) {

                // Insert a new component holder in the root or box.
                if ( entireComponent ) {
                    P.$holder = $( createWrappedComponent() )
                    prepareElementHolder()
                    P.$root.html( P.$holder )
                }
                else P.$root.find( '.' + CLASSES.box ).html( P.component.nodes( STATE.open ) )

                // Trigger the queued “render” events.
                return P.trigger( 'render' )
            }, //render


            /**
             * Destroy everything
             */
            stop: function() {

                // If it’s already stopped, do nothing.
                if ( !STATE.start ) return P

                // Then close the picker.
                P.close()

                // Remove the hidden field.
                if ( P._hidden ) {
                    P._hidden.parentNode.removeChild( P._hidden )
                }

                // Remove the root.
                P.$root.remove()

                // Remove the input class, remove the stored data, and unbind
                // the events (after a tick for IE - see `P.close`).
                $ELEMENT.removeClass( CLASSES.input ).removeData( NAME )
                setTimeout( function() {
                    $ELEMENT.off( '.' + STATE.id )
                }, 0)

                // Restore the element state
                ELEMENT.type = STATE.type
                ELEMENT.readOnly = false

                // Trigger the queued “stop” events.
                P.trigger( 'stop' )

                // Reset the picker states.
                STATE.methods = {}
                STATE.start = false

                return P
            }, //stop


            /**
             * Open up the picker
             */
            open: function( dontGiveFocus ) {

                // If it’s already open, do nothing.
                if ( STATE.open ) return P

                // Add the “active” class.
                $ELEMENT.addClass( CLASSES.active )
                aria( ELEMENT, 'expanded', true )

                // * A Firefox bug, when `html` has `overflow:hidden`, results in
                //   killing transitions :(. So add the “opened” state on the next tick.
                //   Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=625289
                setTimeout( function() {

                    // Add the “opened” class to the picker root.
                    P.$root.addClass( CLASSES.opened )
                    aria( P.$root[0], 'hidden', false )

                }, 0 )

                // If we have to give focus, bind the element and doc events.
                if ( dontGiveFocus !== false ) {

                    // Set it as open.
                    STATE.open = true

                    // Prevent the page from scrolling.
                    if ( IS_DEFAULT_THEME ) {
                        $html.
                            css( 'overflow', 'hidden' ).
                            css( 'padding-right', '+=' + getScrollbarWidth() )
                    }

                    // Pass focus to the root element’s jQuery object.
                    focusPickerOnceOpened()

                    // Bind the document events.
                    $document.on( 'click.' + STATE.id + ' focusin.' + STATE.id, function( event ) {

                        var target = event.target

                        // If the target of the event is not the element, close the picker picker.
                        // * Don’t worry about clicks or focusins on the root because those don’t bubble up.
                        //   Also, for Firefox, a click on an `option` element bubbles up directly
                        //   to the doc. So make sure the target wasn't the doc.
                        // * In Firefox stopPropagation() doesn’t prevent right-click events from bubbling,
                        //   which causes the picker to unexpectedly close when right-clicking it. So make
                        //   sure the event wasn’t a right-click.
                        if ( target != ELEMENT && target != document && event.which != 3 ) {

                            // If the target was the holder that covers the screen,
                            // keep the element focused to maintain tabindex.
                            P.close( target === P.$holder[0] )
                        }

                    }).on( 'keydown.' + STATE.id, function( event ) {

                        var
                            // Get the keycode.
                            keycode = event.keyCode,

                            // Translate that to a selection change.
                            keycodeToMove = P.component.key[ keycode ],

                            // Grab the target.
                            target = event.target


                        // On escape, close the picker and give focus.
                        if ( keycode == 27 ) {
                            P.close( true )
                        }


                        // Check if there is a key movement or “enter” keypress on the element.
                        else if ( target == P.$holder[0] && ( keycodeToMove || keycode == 13 ) ) {

                            // Prevent the default action to stop page movement.
                            event.preventDefault()

                            // Trigger the key movement action.
                            if ( keycodeToMove ) {
                                PickerConstructor._.trigger( P.component.key.go, P, [ PickerConstructor._.trigger( keycodeToMove ) ] )
                            }

                            // On “enter”, if the highlighted item isn’t disabled, set the value and close.
                            else if ( !P.$root.find( '.' + CLASSES.highlighted ).hasClass( CLASSES.disabled ) ) {
                                P.set( 'select', P.component.item.highlight )
                                if ( SETTINGS.closeOnSelect ) {
                                    P.close( true )
                                }
                            }
                        }


                        // If the target is within the root and “enter” is pressed,
                        // prevent the default action and trigger a click on the target instead.
                        else if ( $.contains( P.$root[0], target ) && keycode == 13 ) {
                            event.preventDefault()
                            target.click()
                        }
                    })
                }

                // Trigger the queued “open” events.
                return P.trigger( 'open' )
            }, //open


            /**
             * Close the picker
             */
            close: function( giveFocus ) {

                // If we need to give focus, do it before changing states.
                if ( giveFocus ) {
                    if ( SETTINGS.editable ) {
                        ELEMENT.focus()
                    }
                    else {
                        // ....ah yes! It would’ve been incomplete without a crazy workaround for IE :|
                        // The focus is triggered *after* the close has completed - causing it
                        // to open again. So unbind and rebind the event at the next tick.
                        P.$holder.off( 'focus.toOpen' ).focus()
                        setTimeout( function() {
                            P.$holder.on( 'focus.toOpen', handleFocusToOpenEvent )
                        }, 0 )
                    }
                }

                // Remove the “active” class.
                $ELEMENT.removeClass( CLASSES.active )
                aria( ELEMENT, 'expanded', false )

                // * A Firefox bug, when `html` has `overflow:hidden`, results in
                //   killing transitions :(. So remove the “opened” state on the next tick.
                //   Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=625289
                setTimeout( function() {

                    // Remove the “opened” and “focused” class from the picker root.
                    P.$root.removeClass( CLASSES.opened + ' ' + CLASSES.focused )
                    aria( P.$root[0], 'hidden', true )

                }, 0 )

                // If it’s already closed, do nothing more.
                if ( !STATE.open ) return P

                // Set it as closed.
                STATE.open = false

                // Allow the page to scroll.
                if ( IS_DEFAULT_THEME ) {
                    $html.
                        css( 'overflow', '' ).
                        css( 'padding-right', '-=' + getScrollbarWidth() )
                }

                // Unbind the document events.
                $document.off( '.' + STATE.id )

                // Trigger the queued “close” events.
                return P.trigger( 'close' )
            }, //close


            /**
             * Clear the values
             */
            clear: function( options ) {
                return P.set( 'clear', null, options )
            }, //clear


            /**
             * Set something
             */
            set: function( thing, value, options ) {

                var thingItem, thingValue,
                    thingIsObject = $.isPlainObject( thing ),
                    thingObject = thingIsObject ? thing : {}

                // Make sure we have usable options.
                options = thingIsObject && $.isPlainObject( value ) ? value : options || {}

                if ( thing ) {

                    // If the thing isn’t an object, make it one.
                    if ( !thingIsObject ) {
                        thingObject[ thing ] = value
                    }

                    // Go through the things of items to set.
                    for ( thingItem in thingObject ) {

                        // Grab the value of the thing.
                        thingValue = thingObject[ thingItem ]

                        // First, if the item exists and there’s a value, set it.
                        if ( thingItem in P.component.item ) {
                            if ( thingValue === undefined ) thingValue = null
                            P.component.set( thingItem, thingValue, options )
                        }

                        // Then, check to update the element value and broadcast a change.
                        if ( thingItem == 'select' || thingItem == 'clear' ) {
                            $ELEMENT.
                                val( thingItem == 'clear' ? '' : P.get( thingItem, SETTINGS.format ) ).
                                trigger( 'change' )
                        }
                    }

                    // Render a new picker.
                    P.render()
                }

                // When the method isn’t muted, trigger queued “set” events and pass the `thingObject`.
                return options.muted ? P : P.trigger( 'set', thingObject )
            }, //set


            /**
             * Get something
             */
            get: function( thing, format ) {

                // Make sure there’s something to get.
                thing = thing || 'value'

                // If a picker state exists, return that.
                if ( STATE[ thing ] != null ) {
                    return STATE[ thing ]
                }

                // Return the submission value, if that.
                if ( thing == 'valueSubmit' ) {
                    if ( P._hidden ) {
                        return P._hidden.value
                    }
                    thing = 'value'
                }

                // Return the value, if that.
                if ( thing == 'value' ) {
                    return ELEMENT.value
                }

                // Check if a component item exists, return that.
                if ( thing in P.component.item ) {
                    if ( typeof format == 'string' ) {
                        var thingValue = P.component.get( thing )
                        return thingValue ?
                            PickerConstructor._.trigger(
                                P.component.formats.toString,
                                P.component,
                                [ format, thingValue ]
                            ) : ''
                    }
                    return P.component.get( thing )
                }
            }, //get



            /**
             * Bind events on the things.
             */
            on: function( thing, method, internal ) {

                var thingName, thingMethod,
                    thingIsObject = $.isPlainObject( thing ),
                    thingObject = thingIsObject ? thing : {}

                if ( thing ) {

                    // If the thing isn’t an object, make it one.
                    if ( !thingIsObject ) {
                        thingObject[ thing ] = method
                    }

                    // Go through the things to bind to.
                    for ( thingName in thingObject ) {

                        // Grab the method of the thing.
                        thingMethod = thingObject[ thingName ]

                        // If it was an internal binding, prefix it.
                        if ( internal ) {
                            thingName = '_' + thingName
                        }

                        // Make sure the thing methods collection exists.
                        STATE.methods[ thingName ] = STATE.methods[ thingName ] || []

                        // Add the method to the relative method collection.
                        STATE.methods[ thingName ].push( thingMethod )
                    }
                }

                return P
            }, //on



            /**
             * Unbind events on the things.
             */
            off: function() {
                var i, thingName,
                    names = arguments;
                for ( i = 0, namesCount = names.length; i < namesCount; i += 1 ) {
                    thingName = names[i]
                    if ( thingName in STATE.methods ) {
                        delete STATE.methods[thingName]
                    }
                }
                return P
            },


            /**
             * Fire off method events.
             */
            trigger: function( name, data ) {
                var _trigger = function( name ) {
                    var methodList = STATE.methods[ name ]
                    if ( methodList ) {
                        methodList.map( function( method ) {
                            PickerConstructor._.trigger( method, P, [ data ] )
                        })
                    }
                }
                _trigger( '_' + name )
                _trigger( name )
                return P
            } //trigger
        } //PickerInstance.prototype


    /**
     * Wrap the picker holder components together.
     */
    function createWrappedComponent() {

        // Create a picker wrapper holder
        return PickerConstructor._.node( 'div',

            // Create a picker wrapper node
            PickerConstructor._.node( 'div',

                // Create a picker frame
                PickerConstructor._.node( 'div',

                    // Create a picker box node
                    PickerConstructor._.node( 'div',

                        // Create the components nodes.
                        P.component.nodes( STATE.open ),

                        // The picker box class
                        CLASSES.box
                    ),

                    // Picker wrap class
                    CLASSES.wrap
                ),

                // Picker frame class
                CLASSES.frame
            ),

            // Picker holder class
            CLASSES.holder,

            'tabindex="-1"'
        ) //endreturn
    } //createWrappedComponent



    /**
     * Prepare the input element with all bindings.
     */
    function prepareElement() {

        $ELEMENT.

            // Store the picker data by component name.
            data(NAME, P).

            // Add the “input” class name.
            addClass(CLASSES.input).

            // If there’s a `data-value`, update the value of the element.
            val( $ELEMENT.data('value') ?
                P.get('select', SETTINGS.format) :
                ELEMENT.value
            )


        // Only bind keydown events if the element isn’t editable.
        if ( !SETTINGS.editable ) {

            $ELEMENT.

                // On focus/click, open the picker.
                on( 'focus.' + STATE.id + ' click.' + STATE.id, function(event) {
                    event.preventDefault()
                    P.open()
                }).

                // Handle keyboard event based on the picker being opened or not.
                on( 'keydown.' + STATE.id, handleKeydownEvent )
        }


        // Update the aria attributes.
        aria(ELEMENT, {
            haspopup: true,
            expanded: false,
            readonly: false,
            owns: ELEMENT.id + '_root'
        })
    }


    /**
     * Prepare the root picker element with all bindings.
     */
    function prepareElementRoot() {
        aria( P.$root[0], 'hidden', true )
    }


     /**
      * Prepare the holder picker element with all bindings.
      */
    function prepareElementHolder() {

        P.$holder.

            on({

                // For iOS8.
                keydown: handleKeydownEvent,

                'focus.toOpen': handleFocusToOpenEvent,

                blur: function() {
                    // Remove the “target” class.
                    $ELEMENT.removeClass( CLASSES.target )
                },

                // When something within the holder is focused, stop from bubbling
                // to the doc and remove the “focused” state from the root.
                focusin: function( event ) {
                    P.$root.removeClass( CLASSES.focused )
                    event.stopPropagation()
                },

                // When something within the holder is clicked, stop it
                // from bubbling to the doc.
                'mousedown click': function( event ) {

                    var target = event.target

                    // Make sure the target isn’t the root holder so it can bubble up.
                    if ( target != P.$holder[0] ) {

                        event.stopPropagation()

                        // * For mousedown events, cancel the default action in order to
                        //   prevent cases where focus is shifted onto external elements
                        //   when using things like jQuery mobile or MagnificPopup (ref: #249 & #120).
                        //   Also, for Firefox, don’t prevent action on the `option` element.
                        if ( event.type == 'mousedown' && !$( target ).is( 'input, select, textarea, button, option' )) {

                            event.preventDefault()

                            // Re-focus onto the holder so that users can click away
                            // from elements focused within the picker.
                            P.$holder[0].focus()
                        }
                    }
                }

            }).

            // If there’s a click on an actionable element, carry out the actions.
            on( 'click', '[data-pick], [data-nav], [data-clear], [data-close]', function() {

                var $target = $( this ),
                    targetData = $target.data(),
                    targetDisabled = $target.hasClass( CLASSES.navDisabled ) || $target.hasClass( CLASSES.disabled ),

                    // * For IE, non-focusable elements can be active elements as well
                    //   (http://stackoverflow.com/a/2684561).
                    activeElement = getActiveElement()
                    activeElement = activeElement && ( activeElement.type || activeElement.href )

                // If it’s disabled or nothing inside is actively focused, re-focus the element.
                if ( targetDisabled || activeElement && !$.contains( P.$root[0], activeElement ) ) {
                    P.$holder[0].focus()
                }

                // If something is superficially changed, update the `highlight` based on the `nav`.
                if ( !targetDisabled && targetData.nav ) {
                    P.set( 'highlight', P.component.item.highlight, { nav: targetData.nav } )
                }

                // If something is picked, set `select` then close with focus.
                else if ( !targetDisabled && 'pick' in targetData ) {
                    P.set( 'select', targetData.pick )
                    if ( SETTINGS.closeOnSelect ) {
                        P.close( true )
                    }
                }

                // If a “clear” button is pressed, empty the values and close with focus.
                else if ( targetData.clear ) {
                    P.clear()
                    if ( SETTINGS.closeOnClear ) {
                        P.close( true )
                    }
                }

                else if ( targetData.close ) {
                    P.close( true )
                }

            }) //P.$holder

    }


     /**
      * Prepare the hidden input element along with all bindings.
      */
    function prepareElementHidden() {

        var name

        if ( SETTINGS.hiddenName === true ) {
            name = ELEMENT.name
            ELEMENT.name = ''
        }
        else {
            name = [
                typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '',
                typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'
            ]
            name = name[0] + ELEMENT.name + name[1]
        }

        P._hidden = $(
            '<input ' +
            'type=hidden ' +

            // Create the name using the original input’s with a prefix and suffix.
            'name="' + name + '"' +

            // If the element has a value, set the hidden value as well.
            (
                $ELEMENT.data('value') || ELEMENT.value ?
                    ' value="' + P.get('select', SETTINGS.formatSubmit) + '"' :
                    ''
            ) +
            '>'
        )[0]

        $ELEMENT.

            // If the value changes, update the hidden input with the correct format.
            on('change.' + STATE.id, function() {
                P._hidden.value = ELEMENT.value ?
                    P.get('select', SETTINGS.formatSubmit) :
                    ''
            })
    }


    // Wait for transitions to end before focusing the holder. Otherwise, while
    // using the `container` option, the view jumps to the container.
    function focusPickerOnceOpened() {

        if (IS_DEFAULT_THEME && supportsTransitions) {
            P.$holder.find('.' + CLASSES.frame).one('transitionend', function() {
                P.$holder[0].focus()
            })
        }
        else {
            P.$holder[0].focus()
        }
    }


    function handleFocusToOpenEvent(event) {

        // Stop the event from propagating to the doc.
        event.stopPropagation()

        // Add the “target” class.
        $ELEMENT.addClass( CLASSES.target )

        // Add the “focused” class to the root.
        P.$root.addClass( CLASSES.focused )

        // And then finally open the picker.
        P.open()
    }


    // For iOS8.
    function handleKeydownEvent( event ) {

        var keycode = event.keyCode,

            // Check if one of the delete keys was pressed.
            isKeycodeDelete = /^(8|46)$/.test(keycode)

        // For some reason IE clears the input value on “escape”.
        if ( keycode == 27 ) {
            P.close( true )
            return false
        }

        // Check if `space` or `delete` was pressed or the picker is closed with a key movement.
        if ( keycode == 32 || isKeycodeDelete || !STATE.open && P.component.key[keycode] ) {

            // Prevent it from moving the page and bubbling to doc.
            event.preventDefault()
            event.stopPropagation()

            // If `delete` was pressed, clear the values and close the picker.
            // Otherwise open the picker.
            if ( isKeycodeDelete ) { P.clear().close() }
            else { P.open() }
        }
    }


    // Return a new picker instance.
    return new PickerInstance()
} //PickerConstructor



/**
 * The default classes and prefix to use for the HTML classes.
 */
PickerConstructor.klasses = function( prefix ) {
    prefix = prefix || 'picker'
    return {

        picker: prefix,
        opened: prefix + '--opened',
        focused: prefix + '--focused',

        input: prefix + '__input',
        active: prefix + '__input--active',
        target: prefix + '__input--target',

        holder: prefix + '__holder',

        frame: prefix + '__frame',
        wrap: prefix + '__wrap',

        box: prefix + '__box'
    }
} //PickerConstructor.klasses



/**
 * Check if the default theme is being used.
 */
function isUsingDefaultTheme( element ) {

    var theme,
        prop = 'position'

    // For IE.
    if ( element.currentStyle ) {
        theme = element.currentStyle[prop]
    }

    // For normal browsers.
    else if ( window.getComputedStyle ) {
        theme = getComputedStyle( element )[prop]
    }

    return theme == 'fixed'
}



/**
 * Get the width of the browser’s scrollbar.
 * Taken from: https://github.com/VodkaBears/Remodal/blob/master/src/jquery.remodal.js
 */
function getScrollbarWidth() {

    if ( $html.height() <= $window.height() ) {
        return 0
    }

    var $outer = $( '<div style="visibility:hidden;width:100px" />' ).
        appendTo( 'body' )

    // Get the width without scrollbars.
    var widthWithoutScroll = $outer[0].offsetWidth

    // Force adding scrollbars.
    $outer.css( 'overflow', 'scroll' )

    // Add the inner div.
    var $inner = $( '<div style="width:100%" />' ).appendTo( $outer )

    // Get the width with scrollbars.
    var widthWithScroll = $inner[0].offsetWidth

    // Remove the divs.
    $outer.remove()

    // Return the difference between the widths.
    return widthWithoutScroll - widthWithScroll
}



/**
 * PickerConstructor helper methods.
 */
PickerConstructor._ = {

    /**
     * Create a group of nodes. Expects:
     * `
        {
            min:    {Integer},
            max:    {Integer},
            i:      {Integer},
            node:   {String},
            item:   {Function}
        }
     * `
     */
    group: function( groupObject ) {

        var
            // Scope for the looped object
            loopObjectScope,

            // Create the nodes list
            nodesList = '',

            // The counter starts from the `min`
            counter = PickerConstructor._.trigger( groupObject.min, groupObject )


        // Loop from the `min` to `max`, incrementing by `i`
        for ( ; counter <= PickerConstructor._.trigger( groupObject.max, groupObject, [ counter ] ); counter += groupObject.i ) {

            // Trigger the `item` function within scope of the object
            loopObjectScope = PickerConstructor._.trigger( groupObject.item, groupObject, [ counter ] )

            // Splice the subgroup and create nodes out of the sub nodes
            nodesList += PickerConstructor._.node(
                groupObject.node,
                loopObjectScope[ 0 ],   // the node
                loopObjectScope[ 1 ],   // the classes
                loopObjectScope[ 2 ]    // the attributes
            )
        }

        // Return the list of nodes
        return nodesList
    }, //group


    /**
     * Create a dom node string
     */
    node: function( wrapper, item, klass, attribute ) {

        // If the item is false-y, just return an empty string
        if ( !item ) return ''

        // If the item is an array, do a join
        item = $.isArray( item ) ? item.join( '' ) : item

        // Check for the class
        klass = klass ? ' class="' + klass + '"' : ''

        // Check for any attributes
        attribute = attribute ? ' ' + attribute : ''

        // Return the wrapped item
        return '<' + wrapper + klass + attribute + '>' + item + '</' + wrapper + '>'
    }, //node


    /**
     * Lead numbers below 10 with a zero.
     */
    lead: function( number ) {
        return ( number < 10 ? '0': '' ) + number
    },


    /**
     * Trigger a function otherwise return the value.
     */
    trigger: function( callback, scope, args ) {
        return typeof callback == 'function' ? callback.apply( scope, args || [] ) : callback
    },


    /**
     * If the second character is a digit, length is 2 otherwise 1.
     */
    digits: function( string ) {
        return ( /\d/ ).test( string[ 1 ] ) ? 2 : 1
    },


    /**
     * Tell if something is a date object.
     */
    isDate: function( value ) {
        return {}.toString.call( value ).indexOf( 'Date' ) > -1 && this.isInteger( value.getDate() )
    },


    /**
     * Tell if something is an integer.
     */
    isInteger: function( value ) {
        return {}.toString.call( value ).indexOf( 'Number' ) > -1 && value % 1 === 0
    },


    /**
     * Create ARIA attribute strings.
     */
    ariaAttr: ariaAttr
} //PickerConstructor._



/**
 * Extend the picker with a component and defaults.
 */
PickerConstructor.extend = function( name, Component ) {

    // Extend jQuery.
    $.fn[ name ] = function( options, action ) {

        // Grab the component data.
        var componentData = this.data( name )

        // If the picker is requested, return the data object.
        if ( options == 'picker' ) {
            return componentData
        }

        // If the component data exists and `options` is a string, carry out the action.
        if ( componentData && typeof options == 'string' ) {
            return PickerConstructor._.trigger( componentData[ options ], componentData, [ action ] )
        }

        // Otherwise go through each matched element and if the component
        // doesn’t exist, create a new picker using `this` element
        // and merging the defaults and options with a deep copy.
        return this.each( function() {
            var $this = $( this )
            if ( !$this.data( name ) ) {
                new PickerConstructor( this, name, Component, options )
            }
        })
    }

    // Set the defaults.
    $.fn[ name ].defaults = Component.defaults
} //PickerConstructor.extend



function aria(element, attribute, value) {
    if ( $.isPlainObject(attribute) ) {
        for ( var key in attribute ) {
            ariaSet(element, key, attribute[key])
        }
    }
    else {
        ariaSet(element, attribute, value)
    }
}
function ariaSet(element, attribute, value) {
    element.setAttribute(
        (attribute == 'role' ? '' : 'aria-') + attribute,
        value
    )
}
function ariaAttr(attribute, data) {
    if ( !$.isPlainObject(attribute) ) {
        attribute = { attribute: data }
    }
    data = ''
    for ( var key in attribute ) {
        var attr = (key == 'role' ? '' : 'aria-') + key,
            attrVal = attribute[key]
        data += attrVal == null ? '' : attr + '="' + attribute[key] + '"'
    }
    return data
}

// IE8 bug throws an error for activeElements within iframes.
function getActiveElement() {
    try {
        return document.activeElement
    } catch ( err ) { }
}



// Expose the picker constructor.
return PickerConstructor


}));




/*!
 * Date picker for pickadate.js v3.5.6
 * http://amsul.github.io/pickadate.js/date.htm
 */

(function ( factory ) {

    // AMD.
    if ( typeof define == 'function' && define.amd )
        define( 'pickerdate',['picker', 'jquery'], factory )

    // Node.js/browserify.
    else if ( typeof exports == 'object' )
        module.exports = factory( require('./picker.js'), require('jquery') )

    // Browser globals.
    else factory( Picker, jQuery )

}(function( Picker, $ ) {


/**
 * Globals and constants
 */
var DAYS_IN_WEEK = 7,
    WEEKS_IN_CALENDAR = 6,
    _ = Picker._



/**
 * The date picker constructor
 */
function DatePicker( picker, settings ) {

    var calendar = this,
        element = picker.$node[ 0 ],
        elementValue = element.value,
        elementDataValue = picker.$node.data( 'value' ),
        valueString = elementDataValue || elementValue,
        formatString = elementDataValue ? settings.formatSubmit : settings.format,
        isRTL = function() {

            return element.currentStyle ?

                // For IE.
                element.currentStyle.direction == 'rtl' :

                // For normal browsers.
                getComputedStyle( picker.$root[0] ).direction == 'rtl'
        }

    calendar.settings = settings
    calendar.$node = picker.$node

    // The queue of methods that will be used to build item objects.
    calendar.queue = {
        min: 'measure create',
        max: 'measure create',
        now: 'now create',
        select: 'parse create validate',
        highlight: 'parse navigate create validate',
        view: 'parse create validate viewset',
        disable: 'deactivate',
        enable: 'activate'
    }

    // The component's item object.
    calendar.item = {}

    calendar.item.clear = null
    calendar.item.disable = ( settings.disable || [] ).slice( 0 )
    calendar.item.enable = -(function( collectionDisabled ) {
        return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1
    })( calendar.item.disable )

    calendar.
        set( 'min', settings.min ).
        set( 'max', settings.max ).
        set( 'now' )

    // When there’s a value, set the `select`, which in turn
    // also sets the `highlight` and `view`.
    if ( valueString ) {
        calendar.set( 'select', valueString, {
            format: formatString,
            defaultValue: true
        })
    }

    // If there’s no value, default to highlighting “today”.
    else {
        calendar.
            set( 'select', null ).
            set( 'highlight', calendar.item.now )
    }


    // The keycode to movement mapping.
    calendar.key = {
        40: 7, // Down
        38: -7, // Up
        39: function() { return isRTL() ? -1 : 1 }, // Right
        37: function() { return isRTL() ? 1 : -1 }, // Left
        go: function( timeChange ) {
            var highlightedObject = calendar.item.highlight,
                targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )
            calendar.set(
                'highlight',
                targetDate,
                { interval: timeChange }
            )
            this.render()
        }
    }


    // Bind some picker events.
    picker.
        on( 'render', function() {
            picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {
                var value = this.value
                if ( value ) {
                    picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )
                    picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )
                }
            })
            picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {
                var value = this.value
                if ( value ) {
                    picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )
                    picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )
                }
            })
        }, 1 ).
        on( 'open', function() {
            var includeToday = ''
            if ( calendar.disabled( calendar.get('now') ) ) {
                includeToday = ':not(.' + settings.klass.buttonToday + ')'
            }
            picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )
        }, 1 ).
        on( 'close', function() {
            picker.$root.find( 'button, select' ).attr( 'disabled', true )
        }, 1 )

} //DatePicker


/**
 * Set a datepicker item object.
 */
DatePicker.prototype.set = function( type, value, options ) {

    var calendar = this,
        calendarItem = calendar.item

    // If the value is `null` just set it immediately.
    if ( value === null ) {
        if ( type == 'clear' ) type = 'select'
        calendarItem[ type ] = value
        return calendar
    }

    // Otherwise go through the queue of methods, and invoke the functions.
    // Update this as the time unit, and set the final value as this item.
    // * In the case of `enable`, keep the queue but set `disable` instead.
    //   And in the case of `flip`, keep the queue but set `enable` instead.
    calendarItem[ ( type == 'enable' ? 'disable' : type == 'flip' ? 'enable' : type ) ] = calendar.queue[ type ].split( ' ' ).map( function( method ) {
        value = calendar[ method ]( type, value, options )
        return value
    }).pop()

    // Check if we need to cascade through more updates.
    if ( type == 'select' ) {
        calendar.set( 'highlight', calendarItem.select, options )
    }
    else if ( type == 'highlight' ) {
        calendar.set( 'view', calendarItem.highlight, options )
    }
    else if ( type.match( /^(flip|min|max|disable|enable)$/ ) ) {
        if ( calendarItem.select && calendar.disabled( calendarItem.select ) ) {
            calendar.set( 'select', calendarItem.select, options )
        }
        if ( calendarItem.highlight && calendar.disabled( calendarItem.highlight ) ) {
            calendar.set( 'highlight', calendarItem.highlight, options )
        }
    }

    return calendar
} //DatePicker.prototype.set


/**
 * Get a datepicker item object.
 */
DatePicker.prototype.get = function( type ) {
    return this.item[ type ]
} //DatePicker.prototype.get


/**
 * Create a picker date object.
 */
DatePicker.prototype.create = function( type, value, options ) {

    var isInfiniteValue,
        calendar = this

    // If there’s no value, use the type as the value.
    value = value === undefined ? type : value


    // If it’s infinity, update the value.
    if ( value == -Infinity || value == Infinity ) {
        isInfiniteValue = value
    }

    // If it’s an object, use the native date object.
    else if ( $.isPlainObject( value ) && _.isInteger( value.pick ) ) {
        value = value.obj
    }

    // If it’s an array, convert it into a date and make sure
    // that it’s a valid date – otherwise default to today.
    else if ( $.isArray( value ) ) {
        value = new Date( value[ 0 ], value[ 1 ], value[ 2 ] )
        value = _.isDate( value ) ? value : calendar.create().obj
    }

    // If it’s a number or date object, make a normalized date.
    else if ( _.isInteger( value ) || _.isDate( value ) ) {
        value = calendar.normalize( new Date( value ), options )
    }

    // If it’s a literal true or any other case, set it to now.
    else /*if ( value === true )*/ {
        value = calendar.now( type, value, options )
    }

    // Return the compiled object.
    return {
        year: isInfiniteValue || value.getFullYear(),
        month: isInfiniteValue || value.getMonth(),
        date: isInfiniteValue || value.getDate(),
        day: isInfiniteValue || value.getDay(),
        obj: isInfiniteValue || value,
        pick: isInfiniteValue || value.getTime()
    }
} //DatePicker.prototype.create


/**
 * Create a range limit object using an array, date object,
 * literal “true”, or integer relative to another time.
 */
DatePicker.prototype.createRange = function( from, to ) {

    var calendar = this,
        createDate = function( date ) {
            if ( date === true || $.isArray( date ) || _.isDate( date ) ) {
                return calendar.create( date )
            }
            return date
        }

    // Create objects if possible.
    if ( !_.isInteger( from ) ) {
        from = createDate( from )
    }
    if ( !_.isInteger( to ) ) {
        to = createDate( to )
    }

    // Create relative dates.
    if ( _.isInteger( from ) && $.isPlainObject( to ) ) {
        from = [ to.year, to.month, to.date + from ];
    }
    else if ( _.isInteger( to ) && $.isPlainObject( from ) ) {
        to = [ from.year, from.month, from.date + to ];
    }

    return {
        from: createDate( from ),
        to: createDate( to )
    }
} //DatePicker.prototype.createRange


/**
 * Check if a date unit falls within a date range object.
 */
DatePicker.prototype.withinRange = function( range, dateUnit ) {
    range = this.createRange(range.from, range.to)
    return dateUnit.pick >= range.from.pick && dateUnit.pick <= range.to.pick
}


/**
 * Check if two date range objects overlap.
 */
DatePicker.prototype.overlapRanges = function( one, two ) {

    var calendar = this

    // Convert the ranges into comparable dates.
    one = calendar.createRange( one.from, one.to )
    two = calendar.createRange( two.from, two.to )

    return calendar.withinRange( one, two.from ) || calendar.withinRange( one, two.to ) ||
        calendar.withinRange( two, one.from ) || calendar.withinRange( two, one.to )
}


/**
 * Get the date today.
 */
DatePicker.prototype.now = function( type, value, options ) {
    value = new Date()
    if ( options && options.rel ) {
        value.setDate( value.getDate() + options.rel )
    }
    return this.normalize( value, options )
}


/**
 * Navigate to next/prev month.
 */
DatePicker.prototype.navigate = function( type, value, options ) {

    var targetDateObject,
        targetYear,
        targetMonth,
        targetDate,
        isTargetArray = $.isArray( value ),
        isTargetObject = $.isPlainObject( value ),
        viewsetObject = this.item.view/*,
        safety = 100*/


    if ( isTargetArray || isTargetObject ) {

        if ( isTargetObject ) {
            targetYear = value.year
            targetMonth = value.month
            targetDate = value.date
        }
        else {
            targetYear = +value[0]
            targetMonth = +value[1]
            targetDate = +value[2]
        }

        // If we’re navigating months but the view is in a different
        // month, navigate to the view’s year and month.
        if ( options && options.nav && viewsetObject && viewsetObject.month !== targetMonth ) {
            targetYear = viewsetObject.year
            targetMonth = viewsetObject.month
        }

        // Figure out the expected target year and month.
        targetDateObject = new Date( targetYear, targetMonth + ( options && options.nav ? options.nav : 0 ), 1 )
        targetYear = targetDateObject.getFullYear()
        targetMonth = targetDateObject.getMonth()

        // If the month we’re going to doesn’t have enough days,
        // keep decreasing the date until we reach the month’s last date.
        while ( /*safety &&*/ new Date( targetYear, targetMonth, targetDate ).getMonth() !== targetMonth ) {
            targetDate -= 1
            /*safety -= 1
            if ( !safety ) {
                throw 'Fell into an infinite loop while navigating to ' + new Date( targetYear, targetMonth, targetDate ) + '.'
            }*/
        }

        value = [ targetYear, targetMonth, targetDate ]
    }

    return value
} //DatePicker.prototype.navigate


/**
 * Normalize a date by setting the hours to midnight.
 */
DatePicker.prototype.normalize = function( value/*, options*/ ) {
    value.setHours( 0, 0, 0, 0 )
    return value
}


/**
 * Measure the range of dates.
 */
DatePicker.prototype.measure = function( type, value/*, options*/ ) {

    var calendar = this

    // If it’s anything false-y, remove the limits.
    if ( !value ) {
        value = type == 'min' ? -Infinity : Infinity
    }

    // If it’s a string, parse it.
    else if ( typeof value == 'string' ) {
        value = calendar.parse( type, value )
    }

    // If it's an integer, get a date relative to today.
    else if ( _.isInteger( value ) ) {
        value = calendar.now( type, value, { rel: value } )
    }

    return value
} ///DatePicker.prototype.measure


/**
 * Create a viewset object based on navigation.
 */
DatePicker.prototype.viewset = function( type, dateObject/*, options*/ ) {
    return this.create([ dateObject.year, dateObject.month, 1 ])
}


/**
 * Validate a date as enabled and shift if needed.
 */
DatePicker.prototype.validate = function( type, dateObject, options ) {

    var calendar = this,

        // Keep a reference to the original date.
        originalDateObject = dateObject,

        // Make sure we have an interval.
        interval = options && options.interval ? options.interval : 1,

        // Check if the calendar enabled dates are inverted.
        isFlippedBase = calendar.item.enable === -1,

        // Check if we have any enabled dates after/before now.
        hasEnabledBeforeTarget, hasEnabledAfterTarget,

        // The min & max limits.
        minLimitObject = calendar.item.min,
        maxLimitObject = calendar.item.max,

        // Check if we’ve reached the limit during shifting.
        reachedMin, reachedMax,

        // Check if the calendar is inverted and at least one weekday is enabled.
        hasEnabledWeekdays = isFlippedBase && calendar.item.disable.filter( function( value ) {

            // If there’s a date, check where it is relative to the target.
            if ( $.isArray( value ) ) {
                var dateTime = calendar.create( value ).pick
                if ( dateTime < dateObject.pick ) hasEnabledBeforeTarget = true
                else if ( dateTime > dateObject.pick ) hasEnabledAfterTarget = true
            }

            // Return only integers for enabled weekdays.
            return _.isInteger( value )
        }).length/*,

        safety = 100*/



    // Cases to validate for:
    // [1] Not inverted and date disabled.
    // [2] Inverted and some dates enabled.
    // [3] Not inverted and out of range.
    //
    // Cases to **not** validate for:
    // • Navigating months.
    // • Not inverted and date enabled.
    // • Inverted and all dates disabled.
    // • ..and anything else.
    if ( !options || (!options.nav && !options.defaultValue) ) if (
        /* 1 */ ( !isFlippedBase && calendar.disabled( dateObject ) ) ||
        /* 2 */ ( isFlippedBase && calendar.disabled( dateObject ) && ( hasEnabledWeekdays || hasEnabledBeforeTarget || hasEnabledAfterTarget ) ) ||
        /* 3 */ ( !isFlippedBase && (dateObject.pick <= minLimitObject.pick || dateObject.pick >= maxLimitObject.pick) )
    ) {


        // When inverted, flip the direction if there aren’t any enabled weekdays
        // and there are no enabled dates in the direction of the interval.
        if ( isFlippedBase && !hasEnabledWeekdays && ( ( !hasEnabledAfterTarget && interval > 0 ) || ( !hasEnabledBeforeTarget && interval < 0 ) ) ) {
            interval *= -1
        }


        // Keep looping until we reach an enabled date.
        while ( /*safety &&*/ calendar.disabled( dateObject ) ) {

            /*safety -= 1
            if ( !safety ) {
                throw 'Fell into an infinite loop while validating ' + dateObject.obj + '.'
            }*/


            // If we’ve looped into the next/prev month with a large interval, return to the original date and flatten the interval.
            if ( Math.abs( interval ) > 1 && ( dateObject.month < originalDateObject.month || dateObject.month > originalDateObject.month ) ) {
                dateObject = originalDateObject
                interval = interval > 0 ? 1 : -1
            }


            // If we’ve reached the min/max limit, reverse the direction, flatten the interval and set it to the limit.
            if ( dateObject.pick <= minLimitObject.pick ) {
                reachedMin = true
                interval = 1
                dateObject = calendar.create([
                    minLimitObject.year,
                    minLimitObject.month,
                    minLimitObject.date + (dateObject.pick === minLimitObject.pick ? 0 : -1)
                ])
            }
            else if ( dateObject.pick >= maxLimitObject.pick ) {
                reachedMax = true
                interval = -1
                dateObject = calendar.create([
                    maxLimitObject.year,
                    maxLimitObject.month,
                    maxLimitObject.date + (dateObject.pick === maxLimitObject.pick ? 0 : 1)
                ])
            }


            // If we’ve reached both limits, just break out of the loop.
            if ( reachedMin && reachedMax ) {
                break
            }


            // Finally, create the shifted date using the interval and keep looping.
            dateObject = calendar.create([ dateObject.year, dateObject.month, dateObject.date + interval ])
        }

    } //endif


    // Return the date object settled on.
    return dateObject
} //DatePicker.prototype.validate


/**
 * Check if a date is disabled.
 */
DatePicker.prototype.disabled = function( dateToVerify ) {

    var
        calendar = this,

        // Filter through the disabled dates to check if this is one.
        isDisabledMatch = calendar.item.disable.filter( function( dateToDisable ) {

            // If the date is a number, match the weekday with 0index and `firstDay` check.
            if ( _.isInteger( dateToDisable ) ) {
                return dateToVerify.day === ( calendar.settings.firstDay ? dateToDisable : dateToDisable - 1 ) % 7
            }

            // If it’s an array or a native JS date, create and match the exact date.
            if ( $.isArray( dateToDisable ) || _.isDate( dateToDisable ) ) {
                return dateToVerify.pick === calendar.create( dateToDisable ).pick
            }

            // If it’s an object, match a date within the “from” and “to” range.
            if ( $.isPlainObject( dateToDisable ) ) {
                return calendar.withinRange( dateToDisable, dateToVerify )
            }
        })

    // If this date matches a disabled date, confirm it’s not inverted.
    isDisabledMatch = isDisabledMatch.length && !isDisabledMatch.filter(function( dateToDisable ) {
        return $.isArray( dateToDisable ) && dateToDisable[3] == 'inverted' ||
            $.isPlainObject( dateToDisable ) && dateToDisable.inverted
    }).length

    // Check the calendar “enabled” flag and respectively flip the
    // disabled state. Then also check if it’s beyond the min/max limits.
    return calendar.item.enable === -1 ? !isDisabledMatch : isDisabledMatch ||
        dateToVerify.pick < calendar.item.min.pick ||
        dateToVerify.pick > calendar.item.max.pick

} //DatePicker.prototype.disabled


/**
 * Parse a string into a usable type.
 */
DatePicker.prototype.parse = function( type, value, options ) {

    var calendar = this,
        parsingObject = {}

    // If it’s already parsed, we’re good.
    if ( !value || typeof value != 'string' ) {
        return value
    }

    // We need a `.format` to parse the value with.
    if ( !( options && options.format ) ) {
        options = options || {}
        options.format = calendar.settings.format
    }

    // Convert the format into an array and then map through it.
    calendar.formats.toArray( options.format ).map( function( label ) {

        var
            // Grab the formatting label.
            formattingLabel = calendar.formats[ label ],

            // The format length is from the formatting label function or the
            // label length without the escaping exclamation (!) mark.
            formatLength = formattingLabel ? _.trigger( formattingLabel, calendar, [ value, parsingObject ] ) : label.replace( /^!/, '' ).length

        // If there's a format label, split the value up to the format length.
        // Then add it to the parsing object with appropriate label.
        if ( formattingLabel ) {
            parsingObject[ label ] = value.substr( 0, formatLength )
        }

        // Update the value as the substring from format length to end.
        value = value.substr( formatLength )
    })

    // Compensate for month 0index.
    return [
        parsingObject.yyyy || parsingObject.yy,
        +( parsingObject.mm || parsingObject.m ) - 1,
        parsingObject.dd || parsingObject.d
    ]
} //DatePicker.prototype.parse


/**
 * Various formats to display the object in.
 */
DatePicker.prototype.formats = (function() {

    // Return the length of the first word in a collection.
    function getWordLengthFromCollection( string, collection, dateObject ) {

        // Grab the first word from the string.
        // Regex pattern from http://stackoverflow.com/q/150033
        var word = string.match( /[^\x00-\x7F]+|\w+/ )[ 0 ]

        // If there's no month index, add it to the date object
        if ( !dateObject.mm && !dateObject.m ) {
            dateObject.m = collection.indexOf( word ) + 1
        }

        // Return the length of the word.
        return word.length
    }

    // Get the length of the first word in a string.
    function getFirstWordLength( string ) {
        return string.match( /\w+/ )[ 0 ].length
    }

    return {

        d: function( string, dateObject ) {

            // If there's string, then get the digits length.
            // Otherwise return the selected date.
            return string ? _.digits( string ) : dateObject.date
        },
        dd: function( string, dateObject ) {

            // If there's a string, then the length is always 2.
            // Otherwise return the selected date with a leading zero.
            return string ? 2 : _.lead( dateObject.date )
        },
        ddd: function( string, dateObject ) {

            // If there's a string, then get the length of the first word.
            // Otherwise return the short selected weekday.
            return string ? getFirstWordLength( string ) : this.settings.weekdaysShort[ dateObject.day ]
        },
        dddd: function( string, dateObject ) {

            // If there's a string, then get the length of the first word.
            // Otherwise return the full selected weekday.
            return string ? getFirstWordLength( string ) : this.settings.weekdaysFull[ dateObject.day ]
        },
        m: function( string, dateObject ) {

            // If there's a string, then get the length of the digits
            // Otherwise return the selected month with 0index compensation.
            return string ? _.digits( string ) : dateObject.month + 1
        },
        mm: function( string, dateObject ) {

            // If there's a string, then the length is always 2.
            // Otherwise return the selected month with 0index and leading zero.
            return string ? 2 : _.lead( dateObject.month + 1 )
        },
        mmm: function( string, dateObject ) {

            var collection = this.settings.monthsShort

            // If there's a string, get length of the relevant month from the short
            // months collection. Otherwise return the selected month from that collection.
            return string ? getWordLengthFromCollection( string, collection, dateObject ) : collection[ dateObject.month ]
        },
        mmmm: function( string, dateObject ) {

            var collection = this.settings.monthsFull

            // If there's a string, get length of the relevant month from the full
            // months collection. Otherwise return the selected month from that collection.
            return string ? getWordLengthFromCollection( string, collection, dateObject ) : collection[ dateObject.month ]
        },
        yy: function( string, dateObject ) {

            // If there's a string, then the length is always 2.
            // Otherwise return the selected year by slicing out the first 2 digits.
            return string ? 2 : ( '' + dateObject.year ).slice( 2 )
        },
        yyyy: function( string, dateObject ) {

            // If there's a string, then the length is always 4.
            // Otherwise return the selected year.
            return string ? 4 : dateObject.year
        },

        // Create an array by splitting the formatting string passed.
        toArray: function( formatString ) { return formatString.split( /(d{1,4}|m{1,4}|y{4}|yy|!.)/g ) },

        // Format an object into a string using the formatting options.
        toString: function ( formatString, itemObject ) {
            var calendar = this
            return calendar.formats.toArray( formatString ).map( function( label ) {
                return _.trigger( calendar.formats[ label ], calendar, [ 0, itemObject ] ) || label.replace( /^!/, '' )
            }).join( '' )
        }
    }
})() //DatePicker.prototype.formats




/**
 * Check if two date units are the exact.
 */
DatePicker.prototype.isDateExact = function( one, two ) {

    var calendar = this

    // When we’re working with weekdays, do a direct comparison.
    if (
        ( _.isInteger( one ) && _.isInteger( two ) ) ||
        ( typeof one == 'boolean' && typeof two == 'boolean' )
     ) {
        return one === two
    }

    // When we’re working with date representations, compare the “pick” value.
    if (
        ( _.isDate( one ) || $.isArray( one ) ) &&
        ( _.isDate( two ) || $.isArray( two ) )
    ) {
        return calendar.create( one ).pick === calendar.create( two ).pick
    }

    // When we’re working with range objects, compare the “from” and “to”.
    if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) {
        return calendar.isDateExact( one.from, two.from ) && calendar.isDateExact( one.to, two.to )
    }

    return false
}


/**
 * Check if two date units overlap.
 */
DatePicker.prototype.isDateOverlap = function( one, two ) {

    var calendar = this,
        firstDay = calendar.settings.firstDay ? 1 : 0

    // When we’re working with a weekday index, compare the days.
    if ( _.isInteger( one ) && ( _.isDate( two ) || $.isArray( two ) ) ) {
        one = one % 7 + firstDay
        return one === calendar.create( two ).day + 1
    }
    if ( _.isInteger( two ) && ( _.isDate( one ) || $.isArray( one ) ) ) {
        two = two % 7 + firstDay
        return two === calendar.create( one ).day + 1
    }

    // When we’re working with range objects, check if the ranges overlap.
    if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) {
        return calendar.overlapRanges( one, two )
    }

    return false
}


/**
 * Flip the “enabled” state.
 */
DatePicker.prototype.flipEnable = function(val) {
    var itemObject = this.item
    itemObject.enable = val || (itemObject.enable == -1 ? 1 : -1)
}


/**
 * Mark a collection of dates as “disabled”.
 */
DatePicker.prototype.deactivate = function( type, datesToDisable ) {

    var calendar = this,
        disabledItems = calendar.item.disable.slice(0)


    // If we’re flipping, that’s all we need to do.
    if ( datesToDisable == 'flip' ) {
        calendar.flipEnable()
    }

    else if ( datesToDisable === false ) {
        calendar.flipEnable(1)
        disabledItems = []
    }

    else if ( datesToDisable === true ) {
        calendar.flipEnable(-1)
        disabledItems = []
    }

    // Otherwise go through the dates to disable.
    else {

        datesToDisable.map(function( unitToDisable ) {

            var matchFound

            // When we have disabled items, check for matches.
            // If something is matched, immediately break out.
            for ( var index = 0; index < disabledItems.length; index += 1 ) {
                if ( calendar.isDateExact( unitToDisable, disabledItems[index] ) ) {
                    matchFound = true
                    break
                }
            }

            // If nothing was found, add the validated unit to the collection.
            if ( !matchFound ) {
                if (
                    _.isInteger( unitToDisable ) ||
                    _.isDate( unitToDisable ) ||
                    $.isArray( unitToDisable ) ||
                    ( $.isPlainObject( unitToDisable ) && unitToDisable.from && unitToDisable.to )
                ) {
                    disabledItems.push( unitToDisable )
                }
            }
        })
    }

    // Return the updated collection.
    return disabledItems
} //DatePicker.prototype.deactivate


/**
 * Mark a collection of dates as “enabled”.
 */
DatePicker.prototype.activate = function( type, datesToEnable ) {

    var calendar = this,
        disabledItems = calendar.item.disable,
        disabledItemsCount = disabledItems.length

    // If we’re flipping, that’s all we need to do.
    if ( datesToEnable == 'flip' ) {
        calendar.flipEnable()
    }

    else if ( datesToEnable === true ) {
        calendar.flipEnable(1)
        disabledItems = []
    }

    else if ( datesToEnable === false ) {
        calendar.flipEnable(-1)
        disabledItems = []
    }

    // Otherwise go through the disabled dates.
    else {

        datesToEnable.map(function( unitToEnable ) {

            var matchFound,
                disabledUnit,
                index,
                isExactRange

            // Go through the disabled items and try to find a match.
            for ( index = 0; index < disabledItemsCount; index += 1 ) {

                disabledUnit = disabledItems[index]

                // When an exact match is found, remove it from the collection.
                if ( calendar.isDateExact( disabledUnit, unitToEnable ) ) {
                    matchFound = disabledItems[index] = null
                    isExactRange = true
                    break
                }

                // When an overlapped match is found, add the “inverted” state to it.
                else if ( calendar.isDateOverlap( disabledUnit, unitToEnable ) ) {
                    if ( $.isPlainObject( unitToEnable ) ) {
                        unitToEnable.inverted = true
                        matchFound = unitToEnable
                    }
                    else if ( $.isArray( unitToEnable ) ) {
                        matchFound = unitToEnable
                        if ( !matchFound[3] ) matchFound.push( 'inverted' )
                    }
                    else if ( _.isDate( unitToEnable ) ) {
                        matchFound = [ unitToEnable.getFullYear(), unitToEnable.getMonth(), unitToEnable.getDate(), 'inverted' ]
                    }
                    break
                }
            }

            // If a match was found, remove a previous duplicate entry.
            if ( matchFound ) for ( index = 0; index < disabledItemsCount; index += 1 ) {
                if ( calendar.isDateExact( disabledItems[index], unitToEnable ) ) {
                    disabledItems[index] = null
                    break
                }
            }

            // In the event that we’re dealing with an exact range of dates,
            // make sure there are no “inverted” dates because of it.
            if ( isExactRange ) for ( index = 0; index < disabledItemsCount; index += 1 ) {
                if ( calendar.isDateOverlap( disabledItems[index], unitToEnable ) ) {
                    disabledItems[index] = null
                    break
                }
            }

            // If something is still matched, add it into the collection.
            if ( matchFound ) {
                disabledItems.push( matchFound )
            }
        })
    }

    // Return the updated collection.
    return disabledItems.filter(function( val ) { return val != null })
} //DatePicker.prototype.activate


/**
 * Create a string for the nodes in the picker.
 */
DatePicker.prototype.nodes = function( isOpen ) {

    var
        calendar = this,
        settings = calendar.settings,
        calendarItem = calendar.item,
        nowObject = calendarItem.now,
        selectedObject = calendarItem.select,
        highlightedObject = calendarItem.highlight,
        viewsetObject = calendarItem.view,
        disabledCollection = calendarItem.disable,
        minLimitObject = calendarItem.min,
        maxLimitObject = calendarItem.max,


        // Create the calendar table head using a copy of weekday labels collection.
        // * We do a copy so we don't mutate the original array.
        tableHead = (function( collection, fullCollection ) {

            // If the first day should be Monday, move Sunday to the end.
            if ( settings.firstDay ) {
                collection.push( collection.shift() )
                fullCollection.push( fullCollection.shift() )
            }

            // Create and return the table head group.
            return _.node(
                'thead',
                _.node(
                    'tr',
                    _.group({
                        min: 0,
                        max: DAYS_IN_WEEK - 1,
                        i: 1,
                        node: 'th',
                        item: function( counter ) {
                            return [
                                collection[ counter ],
                                settings.klass.weekdays,
                                'scope=col title="' + fullCollection[ counter ] + '"'
                            ]
                        }
                    })
                )
            ) //endreturn
        })( ( settings.showWeekdaysFull ? settings.weekdaysFull : settings.weekdaysShort ).slice( 0 ), settings.weekdaysFull.slice( 0 ) ), //tableHead


        // Create the nav for next/prev month.
        createMonthNav = function( next ) {

            // Otherwise, return the created month tag.
            return _.node(
                'div',
                ' ',
                settings.klass[ 'nav' + ( next ? 'Next' : 'Prev' ) ] + (

                    // If the focused month is outside the range, disabled the button.
                    ( next && viewsetObject.year >= maxLimitObject.year && viewsetObject.month >= maxLimitObject.month ) ||
                    ( !next && viewsetObject.year <= minLimitObject.year && viewsetObject.month <= minLimitObject.month ) ?
                    ' ' + settings.klass.navDisabled : ''
                ),
                'data-nav=' + ( next || -1 ) + ' ' +
                _.ariaAttr({
                    role: 'button',
                    controls: calendar.$node[0].id + '_table'
                }) + ' ' +
                'title="' + (next ? settings.labelMonthNext : settings.labelMonthPrev ) + '"'
            ) //endreturn
        }, //createMonthNav


        // Create the month label.
        createMonthLabel = function() {

            var monthsCollection = settings.showMonthsShort ? settings.monthsShort : settings.monthsFull

            // If there are months to select, add a dropdown menu.
            if ( settings.selectMonths ) {

                return _.node( 'select',
                    _.group({
                        min: 0,
                        max: 11,
                        i: 1,
                        node: 'option',
                        item: function( loopedMonth ) {

                            return [

                                // The looped month and no classes.
                                monthsCollection[ loopedMonth ], 0,

                                // Set the value and selected index.
                                'value=' + loopedMonth +
                                ( viewsetObject.month == loopedMonth ? ' selected' : '' ) +
                                (
                                    (
                                        ( viewsetObject.year == minLimitObject.year && loopedMonth < minLimitObject.month ) ||
                                        ( viewsetObject.year == maxLimitObject.year && loopedMonth > maxLimitObject.month )
                                    ) ?
                                    ' disabled' : ''
                                )
                            ]
                        }
                    }),
                    settings.klass.selectMonth,
                    ( isOpen ? '' : 'disabled' ) + ' ' +
                    _.ariaAttr({ controls: calendar.$node[0].id + '_table' }) + ' ' +
                    'title="' + settings.labelMonthSelect + '"'
                )
            }

            // If there's a need for a month selector
            return _.node( 'div', monthsCollection[ viewsetObject.month ], settings.klass.month )
        }, //createMonthLabel


        // Create the year label.
        createYearLabel = function() {

            var focusedYear = viewsetObject.year,

            // If years selector is set to a literal "true", set it to 5. Otherwise
            // divide in half to get half before and half after focused year.
            numberYears = settings.selectYears === true ? 5 : ~~( settings.selectYears / 2 )

            // If there are years to select, add a dropdown menu.
            if ( numberYears ) {

                var
                    minYear = minLimitObject.year,
                    maxYear = maxLimitObject.year,
                    lowestYear = focusedYear - numberYears,
                    highestYear = focusedYear + numberYears

                // If the min year is greater than the lowest year, increase the highest year
                // by the difference and set the lowest year to the min year.
                if ( minYear > lowestYear ) {
                    highestYear += minYear - lowestYear
                    lowestYear = minYear
                }

                // If the max year is less than the highest year, decrease the lowest year
                // by the lower of the two: available and needed years. Then set the
                // highest year to the max year.
                if ( maxYear < highestYear ) {

                    var availableYears = lowestYear - minYear,
                        neededYears = highestYear - maxYear

                    lowestYear -= availableYears > neededYears ? neededYears : availableYears
                    highestYear = maxYear
                }

                return _.node( 'select',
                    _.group({
                        min: lowestYear,
                        max: highestYear,
                        i: 1,
                        node: 'option',
                        item: function( loopedYear ) {
                            return [

                                // The looped year and no classes.
                                loopedYear, 0,

                                // Set the value and selected index.
                                'value=' + loopedYear + ( focusedYear == loopedYear ? ' selected' : '' )
                            ]
                        }
                    }),
                    settings.klass.selectYear,
                    ( isOpen ? '' : 'disabled' ) + ' ' + _.ariaAttr({ controls: calendar.$node[0].id + '_table' }) + ' ' +
                    'title="' + settings.labelYearSelect + '"'
                )
            }

            // Otherwise just return the year focused
            return _.node( 'div', focusedYear, settings.klass.year )
        } //createYearLabel


    // Create and return the entire calendar.
    return _.node(
        'div',
        ( settings.selectYears ? createYearLabel() + createMonthLabel() : createMonthLabel() + createYearLabel() ) +
        createMonthNav() + createMonthNav( 1 ),
        settings.klass.header
    ) + _.node(
        'table',
        tableHead +
        _.node(
            'tbody',
            _.group({
                min: 0,
                max: WEEKS_IN_CALENDAR - 1,
                i: 1,
                node: 'tr',
                item: function( rowCounter ) {

                    // If Monday is the first day and the month starts on Sunday, shift the date back a week.
                    var shiftDateBy = settings.firstDay && calendar.create([ viewsetObject.year, viewsetObject.month, 1 ]).day === 0 ? -7 : 0

                    return [
                        _.group({
                            min: DAYS_IN_WEEK * rowCounter - viewsetObject.day + shiftDateBy + 1, // Add 1 for weekday 0index
                            max: function() {
                                return this.min + DAYS_IN_WEEK - 1
                            },
                            i: 1,
                            node: 'td',
                            item: function( targetDate ) {

                                // Convert the time date from a relative date to a target date.
                                targetDate = calendar.create([ viewsetObject.year, viewsetObject.month, targetDate + ( settings.firstDay ? 1 : 0 ) ])

                                var isSelected = selectedObject && selectedObject.pick == targetDate.pick,
                                    isHighlighted = highlightedObject && highlightedObject.pick == targetDate.pick,
                                    isDisabled = disabledCollection && calendar.disabled( targetDate ) || targetDate.pick < minLimitObject.pick || targetDate.pick > maxLimitObject.pick,
                                    formattedDate = _.trigger( calendar.formats.toString, calendar, [ settings.format, targetDate ] )

                                return [
                                    _.node(
                                        'div',
                                        targetDate.date,
                                        (function( klasses ) {

                                            // Add the `infocus` or `outfocus` classes based on month in view.
                                            klasses.push( viewsetObject.month == targetDate.month ? settings.klass.infocus : settings.klass.outfocus )

                                            // Add the `today` class if needed.
                                            if ( nowObject.pick == targetDate.pick ) {
                                                klasses.push( settings.klass.now )
                                            }

                                            // Add the `selected` class if something's selected and the time matches.
                                            if ( isSelected ) {
                                                klasses.push( settings.klass.selected )
                                            }

                                            // Add the `highlighted` class if something's highlighted and the time matches.
                                            if ( isHighlighted ) {
                                                klasses.push( settings.klass.highlighted )
                                            }

                                            // Add the `disabled` class if something's disabled and the object matches.
                                            if ( isDisabled ) {
                                                klasses.push( settings.klass.disabled )
                                            }

                                            return klasses.join( ' ' )
                                        })([ settings.klass.day ]),
                                        'data-pick=' + targetDate.pick + ' ' + _.ariaAttr({
                                            role: 'gridcell',
                                            label: formattedDate,
                                            selected: isSelected && calendar.$node.val() === formattedDate ? true : null,
                                            activedescendant: isHighlighted ? true : null,
                                            disabled: isDisabled ? true : null
                                        })
                                    ),
                                    '',
                                    _.ariaAttr({ role: 'presentation' })
                                ] //endreturn
                            }
                        })
                    ] //endreturn
                }
            })
        ),
        settings.klass.table,
        'id="' + calendar.$node[0].id + '_table' + '" ' + _.ariaAttr({
            role: 'grid',
            controls: calendar.$node[0].id,
            readonly: true
        })
    ) +

    // * For Firefox forms to submit, make sure to set the buttons’ `type` attributes as “button”.
    _.node(
        'div',
        _.node( 'button', settings.today, settings.klass.buttonToday,
            'type=button data-pick=' + nowObject.pick +
            ( isOpen && !calendar.disabled(nowObject) ? '' : ' disabled' ) + ' ' +
            _.ariaAttr({ controls: calendar.$node[0].id }) ) +
        _.node( 'button', settings.clear, settings.klass.buttonClear,
            'type=button data-clear=1' +
            ( isOpen ? '' : ' disabled' ) + ' ' +
            _.ariaAttr({ controls: calendar.$node[0].id }) ) +
        _.node('button', settings.close, settings.klass.buttonClose,
            'type=button data-close=true ' +
            ( isOpen ? '' : ' disabled' ) + ' ' +
            _.ariaAttr({ controls: calendar.$node[0].id }) ),
        settings.klass.footer
    ) //endreturn
} //DatePicker.prototype.nodes




/**
 * The date picker defaults.
 */
DatePicker.defaults = (function( prefix ) {

    return {

        // The title label to use for the month nav buttons
        labelMonthNext: 'Next month',
        labelMonthPrev: 'Previous month',

        // The title label to use for the dropdown selectors
        labelMonthSelect: 'Select a month',
        labelYearSelect: 'Select a year',

        // Months and weekdays
        monthsFull: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ],
        monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ],
        weekdaysFull: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
        weekdaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ],

        // Today and clear
        today: 'Today',
        clear: 'Clear',
        close: 'Close',

        // Picker close behavior
        closeOnSelect: true,
        closeOnClear: true,

        // The format to show on the `input` element
        format: 'd mmmm, yyyy',

        // Classes
        klass: {

            table: prefix + 'table',

            header: prefix + 'header',

            navPrev: prefix + 'nav--prev',
            navNext: prefix + 'nav--next',
            navDisabled: prefix + 'nav--disabled',

            month: prefix + 'month',
            year: prefix + 'year',

            selectMonth: prefix + 'select--month',
            selectYear: prefix + 'select--year',

            weekdays: prefix + 'weekday',

            day: prefix + 'day',
            disabled: prefix + 'day--disabled',
            selected: prefix + 'day--selected',
            highlighted: prefix + 'day--highlighted',
            now: prefix + 'day--today',
            infocus: prefix + 'day--infocus',
            outfocus: prefix + 'day--outfocus',

            footer: prefix + 'footer',

            buttonClear: prefix + 'button--clear',
            buttonToday: prefix + 'button--today',
            buttonClose: prefix + 'button--close'
        }
    }
})( Picker.klasses().picker + '__' )





/**
 * Extend the picker to add the date picker.
 */
Picker.extend( 'pickadate', DatePicker )


}));




/*! Select2 4.1.0-beta.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(n){"function"==typeof define&&define.amd?define('select2',["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,i,h,s,o,f,g,m,v,y,_,r,a,b;function w(e,t){return r.call(e,t)}function l(e,t){var n,i,r,s,o,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(o=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[o])&&(e[o]=e[o].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),--u;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;--u){if(i=n.slice(0,u).join("/"),h)for(d=h.length;0<d;--d)if(r=(r=f[h.slice(0,d).join("/")])&&r[i]){s=r,a=u;break}if(s)break;!l&&g&&g[i]&&(l=g[i],c=u)}!s&&l&&(s=l,a=c),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function x(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),o.apply(h,e.concat([t,n]))}}function A(t){return function(e){m[t]=e}}function D(e){if(w(v,e)){var t=v[e];delete v[e],_[e]=!0,s.apply(h,t)}if(!w(m,e)&&!w(_,e))throw new Error("No "+e);return m[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?c(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},r=Object.prototype.hasOwnProperty,a=[].slice,b=/\.js$/,f=function(e,t){var n,i,r=c(e),s=r[0],o=t[1];return e=r[1],s&&(n=D(s=l(s,o))),s?e=n&&n.normalize?n.normalize(e,(i=o,function(e){return l(e,i)})):l(e,o):(s=(r=c(e=l(e,o)))[0],e=r[1],s&&(n=D(s))),{f:s?s+"!"+e:e,n:e,pr:s,p:n}},g={require:function(e){return x(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};var t}},s=function(e,t,n,i){var r,s,o,a,l,c,u,d=[],p=typeof n;if(c=S(i=i||e),"undefined"==p||"function"==p){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(s=(a=f(t[l],c)).f))d[l]=g.require(e);else if("exports"===s)d[l]=g.exports(e),u=!0;else if("module"===s)r=d[l]=g.module(e);else if(w(m,s)||w(v,s)||w(_,s))d[l]=D(s);else{if(!a.p)throw new Error(e+" missing "+s);a.p.load(a.n,x(i,!0),A(s),{}),d[l]=m[s]}o=n?n.apply(m[e],d):void 0,e&&(r&&r.exports!==h&&r.exports!==m[e]?m[e]=r.exports:o===h&&u||(m[e]=o))}else e&&(m[e]=n)},t=n=o=function(e,t,n,i,r){if("string"==typeof e)return g[e]?g[e](t):D(f(e,S(t)).f);if(!e.splice){if((y=e).deps&&o(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?s(h,e,t,n):setTimeout(function(){s(h,e,t,n)},4),o},o.config=function(e){return o(e)},t._defined=m,(i=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),w(m,e)||w(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=i),e.define("almond",function(){}),e.define("jquery",[],function(){var e=u||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(s){var r={};function u(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&"constructor"!==i&&n.push(i)}return n}r.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},r.Decorate=function(i,r){var e=u(r),t=u(i);function s(){var e=Array.prototype.unshift,t=r.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=r.prototype.constructor),n.apply(this,arguments)}r.displayName=i.displayName,s.prototype=new function(){this.constructor=s};for(var n=0;n<t.length;n++){var o=t[n];s.prototype[o]=i.prototype[o]}function a(e){var t=function(){};e in s.prototype&&(t=s.prototype[e]);var n=r.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(var l=0;l<e.length;l++){var c=e[l];s.prototype[c]=a(c)}return s};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},r.Observable=e,r.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},r.bind=function(e,t){return function(){e.apply(t,arguments)}},r._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var s=n[r];(s=s.substring(0,1).toLowerCase()+s.substring(1))in i||(i[s]={}),r==n.length-1&&(i[s]=e[t]),i=i[s]}delete e[t]}}return e},r.hasScroll=function(e,t){var n=s(t),i=t.style.overflowX,r=t.style.overflowY;return(i!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===i||"scroll"===r||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},r.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},r.__cache={};var n=0;return r.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null!=t||(t=e.id?"select2-data-"+e.id:"select2-data-"+(++n).toString()+"-"+r.generateChars(4),e.setAttribute("data-select2-id",t)),t},r.StoreData=function(e,t,n){var i=r.GetUniqueElementId(e);r.__cache[i]||(r.__cache[i]={}),r.__cache[i][t]=n},r.GetData=function(e,t){var n=r.GetUniqueElementId(e);return t?r.__cache[n]&&null!=r.__cache[n][t]?r.__cache[n][t]:s(e).data(t):r.__cache[n]},r.RemoveData=function(e){var t=r.GetUniqueElementId(e);null!=r.__cache[t]&&delete r.__cache[t],e.removeAttribute("data-select2-id")},r.copyNonInternalCssClasses=function(e,t){var n=e.getAttribute("class").trim().split(/\s+/);n=n.filter(function(e){return 0===e.indexOf("select2-")});var i=t.getAttribute("class").trim().split(/\s+/);i=i.filter(function(e){return 0!==e.indexOf("select2-")});var r=n.concat(i);e.setAttribute("class",r.join(" "))},r}),e.define("select2/results",["jquery","./utils"],function(h,f){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return f.Extend(i,f.Observable),i.prototype.render=function(){var e=h('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".select2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(e){var i=e.map(function(e){return e.id.toString()});t.$results.find(".select2-results__option--selectable").each(function(){var e=h(this),t=f.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<i.indexOf(n)?(this.classList.add("select2-results__option--selected"),e.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),e.attr("aria-selected","false"))})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.classList.add("select2-results__option"),t.classList.add("select2-results__option--selectable");var n={role:"option"},i=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var r in(null!=e.element&&i.call(e.element,":disabled")||null==e.element&&e.disabled)&&(n["aria-disabled"]="true",t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--disabled")),null==e.id&&t.classList.remove("select2-results__option--selectable"),null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--group")),n){var s=n[r];t.setAttribute(r,s)}if(e.children){var o=h(t),a=document.createElement("strong");a.className="select2-results__group",this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var p=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),o.append(a),o.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");e.hasClass("select2-results__option--selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find(".select2-results__option--selectable"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var s=l.$results.offset().top,o=r.offset().top,a=l.$results.scrollTop()+(o-s);0===i?l.$results.scrollTop(0):o-s<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find(".select2-results__option--selectable"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),s=i.offset().top+i.outerHeight(!1),o=l.$results.scrollTop()+s-r;0===n?l.$results.scrollTop(0):r<s&&l.$results.scrollTop(o)}}),t.on("results:focus",function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")}),t.on("results:message",function(e){l.displayMessage(e)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,r=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option--selectable",function(e){var t=h(this),n=f.GetData(this,"data");t.hasClass("select2-results__option--selected")?l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{}):l.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".select2-results__option--selectable",function(e){var t=f.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),l.trigger("results:focus",{data:t,element:h(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find(".select2-results__option--selectable").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),s=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):h(t).append(r)},i}),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",["jquery","../utils","../keys"],function(n,i,r){function s(e,t){this.$element=e,this.options=t,s.__super__.constructor.call(this)}return i.Extend(s,i.Observable),s.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=i.GetData(this.$element[0],"old-tabindex")?this._tabindex=i.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},s.prototype.bind=function(e,t){var n=this,i=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},s.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},s.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&i.GetData(this,"element").select2("close")})})},s.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},s.prototype.position=function(e,t){t.find(".selection").append(e)},s.prototype.destroy=function(){this._detachCloseHandler(this.container)},s.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},s.prototype.isEnabled=function(){return!this.isDisabled()},s.prototype.isDisabled=function(){return this.options.get("disabled")},s}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},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(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i);var r=t.title||t.text;r?n.attr("title",r):n.removeAttr("title")}else this.clear()},r}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(r,e,d){function s(e,t){s.__super__.constructor.apply(this,arguments)}return d.Extend(s,e),s.prototype.render=function(){var e=s.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},s.prototype.bind=function(e,t){var i=this;s.__super__.bind.apply(this,arguments);var n=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n),this.$selection.on("click",function(e){i.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!i.isDisabled()){var t=r(this).parent(),n=d.GetData(t[0],"data");i.trigger("unselect",{originalEvent:e,data:n})}}),this.$selection.on("keydown",".select2-selection__choice__remove",function(e){i.isDisabled()||e.stopPropagation()})},s.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},s.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},s.prototype.selectionContainer=function(){return r('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>')},s.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",i=0;i<e.length;i++){var r=e[i],s=this.selectionContainer(),o=this.display(r,s),a=n+d.generateChars(4)+"-";r.id?a+=r.id:a+=d.generateChars(4),s.find(".select2-selection__choice__display").append(o).attr("id",a);var l=r.title||r.text;l&&s.attr("title",l);var c=this.options.get("translations").get("removeItem"),u=s.find(".select2-selection__choice__remove");u.attr("title",c()),u.attr("aria-label",c()),u.attr("aria-describedby",a),d.StoreData(s[0],"data",r),t.push(s)}this.$selection.find(".select2-selection__rendered").append(t)}},s}),e.define("select2/selection/placeholder",[],function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice"),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},e}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(s,i,a){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,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(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var i=a.GetData(n[0],"data"),r=this.$element.val();this.$element.val(this.placeholder.id);var s={data:i};if(this.trigger("clear",s),s.prevented)this.$element.val(r);else{for(var o=0;o<i.length;o++)if(s={data:i[o]},this.trigger("unselect",s),s.prevented)return void this.$element.val(r);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=i.DELETE&&t.which!=i.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),this.$selection.find(".select2-selection__clear").remove(),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=this.$selection.find(".select2-selection__rendered").attr("id"),i=this.options.get("translations").get("removeAllItems"),r=s('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>');r.attr("title",i()),r.attr("aria-label",i()),r.attr("aria-describedby",n),a.StoreData(r[0],"data",t),this.$selection.prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,l,c){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=i('<span class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');this.$searchContainer=t,this.$search=t.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete"));var n=e.call(this);return this._transferTabIndex(),n.append(this.$searchContainer),n},e.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results",s=t.id+"-container";e.call(this,t,n),i.$search.attr("aria-describedby",s),t.on("open",function(){i.$search.attr("aria-controls",r),i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.resizeSearch(),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===c.BACKSPACE&&""===i.$search.val()){var t=i.$selection.find(".select2-selection__choice").last();if(0<t.length){var n=l.GetData(t[0],"data");i.searchRemoveChoice(n),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){i.$search.val()&&e.stopPropagation()});var o=document.documentMode,a=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){a?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(a&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=c.SHIFT&&t!=c.CTRL&&t!=c.ALT&&t!=c.TAB&&i.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&&(e=.75*(this.$search.val().length+1)+"em");this.$search.css("width",e)},e}),e.define("select2/selection/selectionCss",["../utils"],function(i){function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("selectionCssClass")||"";return-1!==n.indexOf(":all:")&&(n=n.replace(":all:",""),i.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(n),t},e}),e.define("select2/selection/eventRelay",["jquery"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var i=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],s=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==r.indexOf(e)){t=t||{};var n=o.Event("select2:"+e,{params:t});i.$element.trigger(n),-1!==s.indexOf(e)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),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","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","Ǳ":"DZ","Ǆ":"DZ","ǲ":"Dz","ǅ":"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","Ⓕ":"F","Ｆ":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"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","Ⓘ":"I","Ｉ":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","Ｊ":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"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","Ǉ":"LJ","ǈ":"Lj","Ⓜ":"M","Ｍ":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"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","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","Ｐ":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Ｑ":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"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","Ⓣ":"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","Ⓥ":"V","Ｖ":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","Ｗ":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","Ｘ":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"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","ⓐ":"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","ⓒ":"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","ǳ":"dz","ǆ":"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","ⓖ":"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","ƕ":"hv","ⓘ":"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","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"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","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"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","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),e.define("select2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=i.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+i.generateChars(4),n},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,l,c){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return l.Extend(n,e),n.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(e){return t.item(c(e))}))},n.prototype.select=function(r){var s=this;if(r.selected=!0,null!=r.element&&"option"===r.element.tagName.toLowerCase())return r.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(r=[r]).push.apply(r,e);for(var n=0;n<r.length;n++){var i=r[n].id;-1===t.indexOf(i)&&t.push(i)}s.$element.val(t),s.$element.trigger("input").trigger("change")});else{var e=r.id;this.$element.val(e),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(r){var s=this;if(this.$element.prop("multiple")){if(r.selected=!1,null!=r.element&&"option"===r.element.tagName.toLowerCase())return r.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==r.id&&-1===t.indexOf(i)&&t.push(i)}s.$element.val(t),s.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){l.RemoveData(this)})},n.prototype.query=function(i,e){var r=[],s=this;this.$element.children().each(function(){if("option"===this.tagName.toLowerCase()||"optgroup"===this.tagName.toLowerCase()){var e=c(this),t=s.item(e),n=s.matches(i,t);null!==n&&r.push(n)}}),e({results:r})},n.prototype.addOptions=function(e){this.$element.append(e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=this._normalizeItem(e);return n.element=t,l.StoreData(t,"data",n),c(t)},n.prototype.item=function(e){var t={};if(null!=(t=l.GetData(e[0],"data")))return t;var n=e[0];if("option"===n.tagName.toLowerCase())t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===n.tagName.toLowerCase()){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var i=e.children("option"),r=[],s=0;s<i.length;s++){var o=c(i[s]),a=this.item(o);r.push(a)}t.children=r}return(t=this._normalizeItem(t)).element=e[0],l.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=c.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),c.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,t,f){function i(e,t){this._dataToConvert=t.get("data")||[],i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype.bind=function(e,t){i.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),i=n.map(function(){return t.item(f(this)).id}).get(),r=[];function s(e){return function(){return f(this).val()==e.id}}for(var o=0;o<e.length;o++){var a=this._normalizeItem(e[o]);if(0<=i.indexOf(a.id)){var l=n.filter(s(a)),c=this.item(l),u=f.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);p.append(h)}r.push(p)}}return r},i}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,s){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return s.extend({},e,{q:e.term})},transport:function(e,t,n){var i=s.ajax(e);return i.then(t),i.fail(n),i}};return s.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){var r=this;null!=this._request&&(s.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=s.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=r.processResults(e,n);r.options.get("debug")&&window.console&&console.error&&(t&&t.results&&Array.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){"status"in e&&(0===e.status||"0"===e.status)||r.trigger("results:message",{message:"errorLoading"})});r._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(t){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var s=n.get("insertTag");if(void 0!==s&&(this.insertTag=s),e.call(this,t,n),Array.isArray(i))for(var o=0;o<i.length;o++){var a=i[o],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var i=t.results,r=0;r<i.length;r++){var s=i[r],o=null!=s.children&&!e({results:s.children},!0);if((s.text||"").toUpperCase()===(c.term||"").toUpperCase()||o)return!n&&(t.data=i,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(i,a)}t.results=i,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){if(null==t.term)return null;var n=t.term.trim();return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||t(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(d){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var r=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=r._normalizeItem(e);if(!r.$element.find("option").filter(function(){return d(this).val()===n.id}).length){var i=r.option(n);i.attr("data-select2-tag",!0),r._removeOldTags(),r.addOptions([i])}t=n,r.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.trigger("focus")),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var r=n.get("tokenSeparators")||[],s=t.term,o=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};o<s.length;){var l=s[o];if(-1!==r.indexOf(l)){var c=s.substr(0,o),u=a(d.extend({},t,{term:c}));null!=u?(i(u),s=s.substr(o+1)||"",o=0):o++}else o++}return{term:s}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(){i._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected(function(){e.call(i,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var i=this;this.current(function(e){var t=null!=e?e.length:0;0<i.maximumSelectionLength&&t>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,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},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery"],function(s){function e(){}return e.prototype.render=function(e){var t=e.call(this),n=s('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),t.prepend(n),t},e.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){s(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.attr("aria-controls",r),i.$search.trigger("focus"),window.setTimeout(function(){i.$search.trigger("focus")},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.val(""),i.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||i.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer[0].classList.remove("select2-search--hide"):i.$searchContainer[0].classList.add("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")})},e.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},e.prototype.showSearch=function(e,t){return!0},e}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,r="resize.select2."+t.id,s="orientationchange.select2."+t.id,o=this.$container.parents().filter(a.hasScroll);o.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),o.on(i,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(i+" "+r+" "+s,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown[0].classList.contains("select2-dropdown--above"),n=this.$dropdown[0].classList.contains("select2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=r.top,s.bottom=r.top+s.height;var o=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<r.top-o,u=l>r.bottom+o,d={left:r.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(i="below"),u||!c||t?!c&&u&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.top=s.top-h.top-o),null!=i&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+i),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+i)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",["../utils"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var r=s.GetData(i[0],"data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/dropdown/dropdownCss",["../utils"],function(i){function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";return-1!==n.indexOf(":all:")&&(n=n.replace(":all:",""),i.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(n),t},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return jQuery('html').attr('dir') == 'ltr' ? 'No results found' : 'لا توجد نتائج';},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"}}}),e.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./i18n/en"],function(l,s,o,a,c,u,d,p,h,f,g,t,m,v,y,_,b,$,w,x,A,D,S,E,O,C,L,T,q,e){function n(){this.reset()}return n.prototype.apply=function(e){if(null==(e=l.extend(!0,{},this.defaults,e)).dataAdapter&&(null!=e.ajax?e.dataAdapter=y:null!=e.data?e.dataAdapter=v:e.dataAdapter=m,0<e.minimumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,$)),0<e.maximumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,w)),0<e.maximumSelectionLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,x)),e.tags&&(e.dataAdapter=f.Decorate(e.dataAdapter,_)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=f.Decorate(e.dataAdapter,b))),null==e.resultsAdapter&&(e.resultsAdapter=s,null!=e.ajax&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,E)),null!=e.placeholder&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,S)),e.selectOnClose&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,L))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=A;else{var t=f.Decorate(A,D);e.dropdownAdapter=t}0!==e.minimumResultsForSearch&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,C)),e.closeOnSelect&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,T)),null!=e.dropdownCssClass&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,q)),e.dropdownAdapter=f.Decorate(e.dropdownAdapter,O)}null==e.selectionAdapter&&(e.multiple?e.selectionAdapter=a:e.selectionAdapter=o,null!=e.placeholder&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,c)),e.allowClear&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,u)),e.multiple&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,d)),null!=e.selectionCssClass&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,p)),e.selectionAdapter=f.Decorate(e.selectionAdapter,h)),e.language=this._resolveLanguage(e.language),e.language.push("en");for(var n=[],i=0;i<e.language.length;i++){var r=e.language[i];-1===n.indexOf(r)&&n.push(r)}return e.language=n,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:f.escapeMarkup,language:{},matcher:function e(t,n){if(null==t.term||""===t.term.trim())return n;if(n.children&&0<n.children.length){for(var i=l.extend(!0,{},n),r=n.children.length-1;0<=r;r--)null==e(t,n.children[r])&&i.children.splice(r,1);return 0<i.children.length?i:e(t,i)}var s=a(n.text).toUpperCase(),o=a(t.term).toUpperCase();return-1<s.indexOf(o)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,i=this.defaults.language,r=t.prop("lang"),s=t.closest("[lang]").prop("lang"),o=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(n),this._resolveLanguage(i),this._resolveLanguage(s));return e.language=o,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(l.isEmptyObject(e))return[];if(l.isPlainObject(e))return[e];var t;t=Array.isArray(e)?e:[e];for(var n=[],i=0;i<t.length;i++)if(n.push(t[i]),"string"==typeof t[i]&&0<t[i].indexOf("-")){var r=t[i].split("-")[0];n.push(r)}return n},n.prototype._processTranslations=function(e,t){for(var n=new g,i=0;i<e.length;i++){var r=new g,s=e[i];if("string"==typeof s)try{r=g.loadPath(s)}catch(e){try{s=this.defaults.amdLanguageBase+s,r=g.loadPath(s)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+s+'" could not be automatically loaded. A fallback will be used instead.')}}else r=l.isPlainObject(s)?new g(s):s;n.extend(r)}return n},n.prototype.set=function(e,t){var n={};n[l.camelCase(e)]=t;var i=f._convertData(n);l.extend(!0,this.defaults,i)},new n}),e.define("select2/options",["jquery","./defaults","./utils"],function(d,n,p){function e(e,t){this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=n.applyFromElement(this.options,t)),this.options=n.apply(this.options)}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.autocomplete&&e.prop("autocomplete")&&(this.options.autocomplete=e.prop("autocomplete")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),p.GetData(e[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.'),p.StoreData(e[0],"data",p.GetData(e[0],"select2Tags")),p.StoreData(e[0],"tags",!0)),p.GetData(e[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."),e.attr("ajax--url",p.GetData(e[0],"ajaxUrl")),p.StoreData(e[0],"ajax-Url",p.GetData(e[0],"ajaxUrl")));var n={};function i(e,t){return t.toUpperCase()}for(var r=0;r<e[0].attributes.length;r++){var s=e[0].attributes[r].name,o="data-";if(s.substr(0,o.length)==o){var a=s.substring(o.length),l=p.GetData(e[0],a);n[a.replace(/-([a-z])/g,i)]=l}}d.fn.jquery&&"1."==d.fn.jquery.substr(0,2)&&e[0].dataset&&(n=d.extend(!0,{},e[0].dataset,n));var c=d.extend(!0,{},p.GetData(e[0]),n);for(var u in c=p._convertData(c))-1<t.indexOf(u)||(d.isPlainObject(this.options[u])?d.extend(this.options[u],c[u]):this.options[u]=c[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(t,c,u,i){var d=function(e,t){null!=u.GetData(e[0],"select2")&&u.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;u.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var r=this.render();this._placeContainer(r);var s=this.options.get("selectionAdapter");this.selection=new s(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var o=this.options.get("dropdownAdapter");this.dropdown=new o(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),u.StoreData(e[0],"select2",this),e.data("select2",this)};return u.Extend(d,u.Observable),d.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+u.generateChars(2):u.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;var s=e.attr("style");if("string"!=typeof s)return null;for(var o=s.split(";"),a=0,l=o.length;a<l;a+=1){var c=o[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null},d.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)},d.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=u.bind(this._syncAttributes,this),this._syncS=u.bind(this._syncSubtree,this),this._observer=new window.MutationObserver(function(e){t._syncA(),t._syncS(e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===i.indexOf(e)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container[0].classList.add("select2-container--open")}),this.on("close",function(){n.$container[0].classList.remove("select2-container--open")}),this.on("enable",function(){n.$container[0].classList.remove("select2-container--disabled")}),this.on("disable",function(){n.$container[0].classList.add("select2-container--disabled")}),this.on("blur",function(){n.$container[0].classList.remove("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(e),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&0<e.addedNodes.length)for(var n=0;n<e.addedNodes.length;n++){if(e.addedNodes[n].selected)return!0}else{if(e.removedNodes&&0<e.removedNodes.length)return!0;if(Array.isArray(e))return e.some(function(e){return t._isChangeMutation(e)})}return!1},d.prototype._syncSubtree=function(e){var t=this._isChangeMutation(e),n=this;t&&this.dataAdapter.current(function(e){n.trigger("selection:update",{data:e})})},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in i){var r=i[e],s={prevented:!1,name:e,args:t};if(n.call(this,r,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},d.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},d.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){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!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&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},d.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 t=e[0];Array.isArray(t)&&(t=t.map(function(e){return e.toString()})),this.$element.val(t).trigger("input").trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",u.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),u.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},d.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[0].classList.add("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(r,e,s,t,o){if(null==r.fn.select2){var a=["open","close","destroy"];r.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=r.extend(!0,{},t);new s(r(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,i)}),-1<a.indexOf(t)?this:n}}return null==r.fn.select2.defaults&&(r.fn.select2.defaults=t),s}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return u.fn.select2.amd=e,t});
/*! tooltipster v4.2.6 */!function(a,b){"function"==typeof define&&define.amd?define('tooltipster',["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){function b(a){this.$container,this.constraints=null,this.__$tooltip,this.__init(a)}function c(b,c){var d=!0;return a.each(b,function(a,e){return void 0===c[a]||b[a]!==c[a]?(d=!1,!1):void 0}),d}function d(b){var c=b.attr("id"),d=c?h.window.document.getElementById(c):null;return d?d===b[0]:a.contains(h.window.document.body,b[0])}function e(){if(!g)return!1;var a=g.document.body||g.document.documentElement,b=a.style,c="transition",d=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof b[c])return!0;c=c.charAt(0).toUpperCase()+c.substr(1);for(var e=0;e<d.length;e++)if("string"==typeof b[d[e]+c])return!0;return!1}var f={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:99999999999},g="undefined"!=typeof window?window:null,h={hasTouchCapability:!(!g||!("ontouchstart"in g||g.DocumentTouch&&g.document instanceof g.DocumentTouch||g.navigator.maxTouchPoints)),hasTransitions:e(),IE:!1,semVer:"4.2.6",window:g},i=function(){this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__instancesLatestArr=[],this.__plugins={},this._env=h};i.prototype={__bridge:function(b,c,d){if(!c[d]){var e=function(){};e.prototype=b;var g=new e;g.__init&&g.__init(c),a.each(b,function(a,b){0!=a.indexOf("__")&&(c[a]?f.debug&&console.log("The "+a+" method of the "+d+" plugin conflicts with another plugin or native methods"):(c[a]=function(){return g[a].apply(g,Array.prototype.slice.apply(arguments))},c[a].bridged=g))}),c[d]=g}return this},__setWindow:function(a){return h.window=a,this},_getRuler:function(a){return new b(a)},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(b){var c=this;if("string"==typeof b){var d=b,e=null;return d.indexOf(".")>0?e=c.__plugins[d]:a.each(c.__plugins,function(a,b){return b.name.substring(b.name.length-d.length-1)=="."+d?(e=b,!1):void 0}),e}if(b.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return c.__plugins[b.name]=b,b.core&&c.__bridge(b.core,c,b.name),this},_trigger:function(){var a=Array.prototype.slice.apply(arguments);return"string"==typeof a[0]&&(a[0]={type:a[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,a),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,a),this},instances:function(b){var c=[],d=b||".tooltipstered";return a(d).each(function(){var b=a(this),d=b.data("tooltipster-ns");d&&a.each(d,function(a,d){c.push(b.data(d))})}),c},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(b){var c=b?b+" ":"";return a(c+".tooltipstered").toArray()},setDefaults:function(b){return a.extend(f,b),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.tooltipster=new i,a.Tooltipster=function(b,c){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="tooltipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(b,c)},a.Tooltipster.prototype={__init:function(b,c){var d=this;if(d._$origin=a(b),d.__options=a.extend(!0,{},f,c),d.__optionsFormat(),!h.IE||h.IE>=d.__options.IEmin){var e=null;if(void 0===d._$origin.data("tooltipster-initialTitle")&&(e=d._$origin.attr("title"),void 0===e&&(e=null),d._$origin.data("tooltipster-initialTitle",e)),null!==d.__options.content)d.__contentSet(d.__options.content);else{var g,i=d._$origin.attr("data-tooltip-content");i&&(g=a(i)),g&&g[0]?d.__contentSet(g.first()):d.__contentSet(e)}d._$origin.removeAttr("title").addClass("tooltipstered"),d.__prepareOrigin(),d.__prepareGC(),a.each(d.__options.plugins,function(a,b){d._plug(b)}),h.hasTouchCapability&&a(h.window.document.body).on("touchmove."+d.__namespace+"-triggerOpen",function(a){d._touchRecordEvent(a)}),d._on("created",function(){d.__prepareTooltip()})._on("repositioned",function(a){d.__lastPosition=a.position})}else d.__options.disabled=!0},__contentInsert:function(){var a=this,b=a._$tooltip.find(".tooltipster-content"),c=a.__Content,d=function(a){c=a};return a._trigger({type:"format",content:a.__Content,format:d}),a.__options.functionFormat&&(c=a.__options.functionFormat.call(a,a,{origin:a._$origin[0]},a.__Content)),"string"!=typeof c||a.__options.contentAsHTML?b.empty().append(c):b.text(c),a},__contentSet:function(b){return b instanceof a&&this.__options.contentCloning&&(b=b.clone(!0)),this.__Content=b,this._trigger({type:"updated",content:b}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.")},__geometry:function(){var b=this,c=b._$origin,d=b._$origin.is("area");if(d){var e=b._$origin.parent().attr("name");c=a('img[usemap="#'+e+'"]')}var f=c[0].getBoundingClientRect(),g=a(h.window.document),i=a(h.window),j=c,k={available:{document:null,window:null},document:{size:{height:g.height(),width:g.width()}},window:{scroll:{left:h.window.scrollX||h.window.document.documentElement.scrollLeft,top:h.window.scrollY||h.window.document.documentElement.scrollTop},size:{height:i.height(),width:i.width()}},origin:{fixedLineage:!1,offset:{},size:{height:f.bottom-f.top,width:f.right-f.left},usemapImage:d?c[0]:null,windowOffset:{bottom:f.bottom,left:f.left,right:f.right,top:f.top}}};if(d){var l=b._$origin.attr("shape"),m=b._$origin.attr("coords");if(m&&(m=m.split(","),a.map(m,function(a,b){m[b]=parseInt(a)})),"default"!=l)switch(l){case"circle":var n=m[0],o=m[1],p=m[2],q=o-p,r=n-p;k.origin.size.height=2*p,k.origin.size.width=k.origin.size.height,k.origin.windowOffset.left+=r,k.origin.windowOffset.top+=q;break;case"rect":var s=m[0],t=m[1],u=m[2],v=m[3];k.origin.size.height=v-t,k.origin.size.width=u-s,k.origin.windowOffset.left+=s,k.origin.windowOffset.top+=t;break;case"poly":for(var w=0,x=0,y=0,z=0,A="even",B=0;B<m.length;B++){var C=m[B];"even"==A?(C>y&&(y=C,0===B&&(w=y)),w>C&&(w=C),A="odd"):(C>z&&(z=C,1==B&&(x=z)),x>C&&(x=C),A="even")}k.origin.size.height=z-x,k.origin.size.width=y-w,k.origin.windowOffset.left+=w,k.origin.windowOffset.top+=x}}var D=function(a){k.origin.size.height=a.height,k.origin.windowOffset.left=a.left,k.origin.windowOffset.top=a.top,k.origin.size.width=a.width};for(b._trigger({type:"geometry",edit:D,geometry:{height:k.origin.size.height,left:k.origin.windowOffset.left,top:k.origin.windowOffset.top,width:k.origin.size.width}}),k.origin.windowOffset.right=k.origin.windowOffset.left+k.origin.size.width,k.origin.windowOffset.bottom=k.origin.windowOffset.top+k.origin.size.height,k.origin.offset.left=k.origin.windowOffset.left+k.window.scroll.left,k.origin.offset.top=k.origin.windowOffset.top+k.window.scroll.top,k.origin.offset.bottom=k.origin.offset.top+k.origin.size.height,k.origin.offset.right=k.origin.offset.left+k.origin.size.width,k.available.document={bottom:{height:k.document.size.height-k.origin.offset.bottom,width:k.document.size.width},left:{height:k.document.size.height,width:k.origin.offset.left},right:{height:k.document.size.height,width:k.document.size.width-k.origin.offset.right},top:{height:k.origin.offset.top,width:k.document.size.width}},k.available.window={bottom:{height:Math.max(k.window.size.height-Math.max(k.origin.windowOffset.bottom,0),0),width:k.window.size.width},left:{height:k.window.size.height,width:Math.max(k.origin.windowOffset.left,0)},right:{height:k.window.size.height,width:Math.max(k.window.size.width-Math.max(k.origin.windowOffset.right,0),0)},top:{height:Math.max(k.origin.windowOffset.top,0),width:k.window.size.width}};"html"!=j[0].tagName.toLowerCase();){if("fixed"==j.css("position")){k.origin.fixedLineage=!0;break}j=j.parent()}return k},__optionsFormat:function(){return"number"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=a(h.window.document.body):"string"==typeof this.__options.parent&&(this.__options.parent=a(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var b=this;return b.__options.selfDestruction?b.__garbageCollector=setInterval(function(){var c=(new Date).getTime();b.__touchEvents=a.grep(b.__touchEvents,function(a,b){return c-a.time>6e4}),d(b._$origin)||b.close(function(){b.destroy()})},2e4):clearInterval(b.__garbageCollector),b},__prepareOrigin:function(){var a=this;if(a._$origin.off("."+a.__namespace+"-triggerOpen"),h.hasTouchCapability&&a._$origin.on("touchstart."+a.__namespace+"-triggerOpen touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen",function(b){a._touchRecordEvent(b)}),a.__options.triggerOpen.click||a.__options.triggerOpen.tap&&h.hasTouchCapability){var b="";a.__options.triggerOpen.click&&(b+="click."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.tap&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&a._open(b)})}if(a.__options.triggerOpen.mouseenter||a.__options.triggerOpen.touchstart&&h.hasTouchCapability){var b="";a.__options.triggerOpen.mouseenter&&(b+="mouseenter."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.touchstart&&h.hasTouchCapability&&(b+="touchstart."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){!a._touchIsTouchEvent(b)&&a._touchIsEmulatedEvent(b)||(a.__pointerIsOverOrigin=!0,a._openShortly(b))})}if(a.__options.triggerClose.mouseleave||a.__options.triggerClose.touchleave&&h.hasTouchCapability){var b="";a.__options.triggerClose.mouseleave&&(b+="mouseleave."+a.__namespace+"-triggerOpen "),a.__options.triggerClose.touchleave&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&(a.__pointerIsOverOrigin=!1)})}return a},__prepareTooltip:function(){var b=this,c=b.__options.interactive?"auto":"";return b._$tooltip.attr("id",b.__namespace).css({"pointer-events":c,zIndex:b.__options.zIndex}),a.each(b.__previousThemes,function(a,c){b._$tooltip.removeClass(c)}),a.each(b.__options.theme,function(a,c){b._$tooltip.addClass(c)}),b.__previousThemes=a.merge([],b.__options.theme),b},__scrollHandler:function(b){var c=this;if(c.__options.triggerClose.scroll)c._close(b);else if(d(c._$origin)&&d(c._$tooltip)){var e=null;if(b.target===h.window.document)c.__Geometry.origin.fixedLineage||c.__options.repositionOnScroll&&c.reposition(b);else{e=c.__geometry();var f=!1;if("fixed"!=c._$origin.css("position")&&c.__$originParents.each(function(b,c){var d=a(c),g=d.css("overflow-x"),h=d.css("overflow-y");if("visible"!=g||"visible"!=h){var i=c.getBoundingClientRect();if("visible"!=g&&(e.origin.windowOffset.left<i.left||e.origin.windowOffset.right>i.right))return f=!0,!1;if("visible"!=h&&(e.origin.windowOffset.top<i.top||e.origin.windowOffset.bottom>i.bottom))return f=!0,!1}return"fixed"==d.css("position")?!1:void 0}),f)c._$tooltip.css("visibility","hidden");else if(c._$tooltip.css("visibility","visible"),c.__options.repositionOnScroll)c.reposition(b);else{var g=e.origin.offset.left-c.__Geometry.origin.offset.left,i=e.origin.offset.top-c.__Geometry.origin.offset.top;c._$tooltip.css({left:c.__lastPosition.coord.left+g,top:c.__lastPosition.coord.top+i})}}c._trigger({type:"scroll",event:b,geo:e})}return c},__stateSet:function(a){return this.__state=a,this._trigger({type:"state",state:a}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,a.each(this.__timeouts.close,function(a,b){clearTimeout(b)}),this.__timeouts.close=[],this},__trackerStart:function(){var a=this,b=a._$tooltip.find(".tooltipster-content");return a.__options.trackTooltip&&(a.__contentBcr=b[0].getBoundingClientRect()),a.__tracker=setInterval(function(){if(d(a._$origin)&&d(a._$tooltip)){if(a.__options.trackOrigin){var e=a.__geometry(),f=!1;c(e.origin.size,a.__Geometry.origin.size)&&(a.__Geometry.origin.fixedLineage?c(e.origin.windowOffset,a.__Geometry.origin.windowOffset)&&(f=!0):c(e.origin.offset,a.__Geometry.origin.offset)&&(f=!0)),f||(a.__options.triggerClose.mouseleave?a._close():a.reposition())}if(a.__options.trackTooltip){var g=b[0].getBoundingClientRect();g.height===a.__contentBcr.height&&g.width===a.__contentBcr.width||(a.reposition(),a.__contentBcr=g)}}else a._close()},a.__options.trackerInterval),a},_close:function(b,c,d){var e=this,f=!0;if(e._trigger({type:"close",event:b,stop:function(){f=!1}}),f||d){c&&e.__callbacks.close.push(c),e.__callbacks.open=[],e.__timeoutsClear();var g=function(){a.each(e.__callbacks.close,function(a,c){c.call(e,e,{event:b,origin:e._$origin[0]})}),e.__callbacks.close=[]};if("closed"!=e.__state){var i=!0,j=new Date,k=j.getTime(),l=k+e.__options.animationDuration[1];if("disappearing"==e.__state&&l>e.__closingTime&&e.__options.animationDuration[1]>0&&(i=!1),i){e.__closingTime=l,"disappearing"!=e.__state&&e.__stateSet("disappearing");var m=function(){clearInterval(e.__tracker),e._trigger({type:"closing",event:b}),e._$tooltip.off("."+e.__namespace+"-triggerClose").removeClass("tooltipster-dying"),a(h.window).off("."+e.__namespace+"-triggerClose"),e.__$originParents.each(function(b,c){a(c).off("scroll."+e.__namespace+"-triggerClose")}),e.__$originParents=null,a(h.window.document.body).off("."+e.__namespace+"-triggerClose"),e._$origin.off("."+e.__namespace+"-triggerClose"),e._off("dismissable"),e.__stateSet("closed"),e._trigger({type:"after",event:b}),e.__options.functionAfter&&e.__options.functionAfter.call(e,e,{event:b,origin:e._$origin[0]}),g()};h.hasTransitions?(e._$tooltip.css({"-moz-animation-duration":e.__options.animationDuration[1]+"ms","-ms-animation-duration":e.__options.animationDuration[1]+"ms","-o-animation-duration":e.__options.animationDuration[1]+"ms","-webkit-animation-duration":e.__options.animationDuration[1]+"ms","animation-duration":e.__options.animationDuration[1]+"ms","transition-duration":e.__options.animationDuration[1]+"ms"}),e._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),e.__options.animationDuration[1]>0&&e._$tooltip.delay(e.__options.animationDuration[1]),e._$tooltip.queue(m)):e._$tooltip.stop().fadeOut(e.__options.animationDuration[1],m)}}else g()}return e},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(b,c){var e=this;if(!e.__destroying&&d(e._$origin)&&e.__enabled){var f=!0;if("closed"==e.__state&&(e._trigger({type:"before",event:b,stop:function(){f=!1}}),f&&e.__options.functionBefore&&(f=e.__options.functionBefore.call(e,e,{event:b,origin:e._$origin[0]}))),f!==!1&&null!==e.__Content){c&&e.__callbacks.open.push(c),e.__callbacks.close=[],e.__timeoutsClear();var g,i=function(){"stable"!=e.__state&&e.__stateSet("stable"),a.each(e.__callbacks.open,function(a,b){b.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}),e.__callbacks.open=[]};if("closed"!==e.__state)g=0,"disappearing"===e.__state?(e.__stateSet("appearing"),h.hasTransitions?(e._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i)):e._$tooltip.stop().fadeIn(i)):"stable"==e.__state&&i();else{if(e.__stateSet("appearing"),g=e.__options.animationDuration[0],e.__contentInsert(),e.reposition(b,!0),h.hasTransitions?(e._$tooltip.addClass("tooltipster-"+e.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":e.__options.animationDuration[0]+"ms","-ms-animation-duration":e.__options.animationDuration[0]+"ms","-o-animation-duration":e.__options.animationDuration[0]+"ms","-webkit-animation-duration":e.__options.animationDuration[0]+"ms","animation-duration":e.__options.animationDuration[0]+"ms","transition-duration":e.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=e.__state&&(e._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i))},0)):e._$tooltip.css("display","none").fadeIn(e.__options.animationDuration[0],i),e.__trackerStart(),a(h.window).on("resize."+e.__namespace+"-triggerClose",function(b){var c=a(document.activeElement);(c.is("input")||c.is("textarea"))&&a.contains(e._$tooltip[0],c[0])||e.reposition(b)}).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)}),e.__$originParents=e._$origin.parents(),e.__$originParents.each(function(b,c){a(c).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)})}),e.__options.triggerClose.mouseleave||e.__options.triggerClose.touchleave&&h.hasTouchCapability){e._on("dismissable",function(a){a.dismissable?a.delay?(m=setTimeout(function(){e._close(a.event)},a.delay),e.__timeouts.close.push(m)):e._close(a):clearTimeout(m)});var j=e._$origin,k="",l="",m=null;e.__options.interactive&&(j=j.add(e._$tooltip)),e.__options.triggerClose.mouseleave&&(k+="mouseenter."+e.__namespace+"-triggerClose ",l+="mouseleave."+e.__namespace+"-triggerClose "),e.__options.triggerClose.touchleave&&h.hasTouchCapability&&(k+="touchstart."+e.__namespace+"-triggerClose",l+="touchend."+e.__namespace+"-triggerClose touchcancel."+e.__namespace+"-triggerClose"),j.on(l,function(a){if(e._touchIsTouchEvent(a)||!e._touchIsEmulatedEvent(a)){var b="mouseleave"==a.type?e.__options.delay:e.__options.delayTouch;e._trigger({delay:b[1],dismissable:!0,event:a,type:"dismissable"})}}).on(k,function(a){!e._touchIsTouchEvent(a)&&e._touchIsEmulatedEvent(a)||e._trigger({dismissable:!1,event:a,type:"dismissable"})})}e.__options.triggerClose.originClick&&e._$origin.on("click."+e.__namespace+"-triggerClose",function(a){e._touchIsTouchEvent(a)||e._touchIsEmulatedEvent(a)||e._close(a)}),(e.__options.triggerClose.click||e.__options.triggerClose.tap&&h.hasTouchCapability)&&setTimeout(function(){if("closed"!=e.__state){var b="",c=a(h.window.document.body);e.__options.triggerClose.click&&(b+="click."+e.__namespace+"-triggerClose "),e.__options.triggerClose.tap&&h.hasTouchCapability&&(b+="touchend."+e.__namespace+"-triggerClose"),c.on(b,function(b){e._touchIsMeaningfulEvent(b)&&(e._touchRecordEvent(b),e.__options.interactive&&a.contains(e._$tooltip[0],b.target)||e._close(b))}),e.__options.triggerClose.tap&&h.hasTouchCapability&&c.on("touchstart."+e.__namespace+"-triggerClose",function(a){e._touchRecordEvent(a)})}},0),e._trigger("ready"),e.__options.functionReady&&e.__options.functionReady.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}if(e.__options.timer>0){var m=setTimeout(function(){e._close()},e.__options.timer+g);e.__timeouts.close.push(m)}}}return e},_openShortly:function(a){var b=this,c=!0;if("stable"!=b.__state&&"appearing"!=b.__state&&!b.__timeouts.open&&(b._trigger({type:"start",event:a,stop:function(){c=!1}}),c)){var d=0==a.type.indexOf("touch")?b.__options.delayTouch:b.__options.delay;d[0]?b.__timeouts.open=setTimeout(function(){b.__timeouts.open=null,b.__pointerIsOverOrigin&&b._touchIsMeaningfulEvent(a)?(b._trigger("startend"),b._open(a)):b._trigger("startcancel")},d[0]):(b._trigger("startend"),b._open(a))}return b},_optionsExtract:function(b,c){var d=this,e=a.extend(!0,{},c),f=d.__options[b];return f||(f={},a.each(c,function(a,b){var c=d.__options[a];void 0!==c&&(f[a]=c)})),a.each(e,function(b,c){void 0!==f[b]&&("object"!=typeof c||c instanceof Array||null==c||"object"!=typeof f[b]||f[b]instanceof Array||null==f[b]?e[b]=f[b]:a.extend(e[b],f[b]))}),e},_plug:function(b){var c=a.tooltipster._plugin(b);if(!c)throw new Error('The "'+b+'" plugin is not defined');return c.instance&&a.tooltipster.__bridge(c.instance,this,c.name),this},_touchIsEmulatedEvent:function(a){for(var b=!1,c=(new Date).getTime(),d=this.__touchEvents.length-1;d>=0;d--){var e=this.__touchEvents[d];if(!(c-e.time<500))break;e.target===a.target&&(b=!0)}return b},_touchIsMeaningfulEvent:function(a){return this._touchIsTouchEvent(a)&&!this._touchSwiped(a.target)||!this._touchIsTouchEvent(a)&&!this._touchIsEmulatedEvent(a)},_touchIsTouchEvent:function(a){return 0==a.type.indexOf("touch")},_touchRecordEvent:function(a){return this._touchIsTouchEvent(a)&&(a.time=(new Date).getTime(),this.__touchEvents.push(a)),this},_touchSwiped:function(a){for(var b=!1,c=this.__touchEvents.length-1;c>=0;c--){var d=this.__touchEvents[c];if("touchmove"==d.type){b=!0;break}if("touchstart"==d.type&&a===d.target)break}return b},_trigger:function(){var b=Array.prototype.slice.apply(arguments);return"string"==typeof b[0]&&(b[0]={type:b[0]}),b[0].instance=this,b[0].origin=this._$origin?this._$origin[0]:null,b[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,b),a.tooltipster._trigger.apply(a.tooltipster,b),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,b),this},_unplug:function(b){var c=this;if(c[b]){var d=a.tooltipster._plugin(b);d.instance&&a.each(d.instance,function(a,d){c[a]&&c[a].bridged===c[b]&&delete c[a]}),c[b].__destroy&&c[b].__destroy(),delete c[b]}return c},close:function(a){return this.__destroyed?this.__destroyError():this._close(null,a),this},content:function(a){var b=this;if(void 0===a)return b.__Content;if(b.__destroyed)b.__destroyError();else if(b.__contentSet(a),null!==b.__Content){if("closed"!==b.__state&&(b.__contentInsert(),b.reposition(),b.__options.updateAnimation))if(h.hasTransitions){var c=b.__options.updateAnimation;b._$tooltip.addClass("tooltipster-update-"+c),setTimeout(function(){"closed"!=b.__state&&b._$tooltip.removeClass("tooltipster-update-"+c)},1e3)}else b._$tooltip.fadeTo(200,.5,function(){"closed"!=b.__state&&b._$tooltip.fadeTo(200,1)})}else b._close();return b},destroy:function(){var b=this;if(b.__destroyed)b.__destroyError();else{"closed"!=b.__state?b.option("animationDuration",0)._close(null,null,!0):b.__timeoutsClear(),b._trigger("destroy"),b.__destroyed=!0,b._$origin.removeData(b.__namespace).off("."+b.__namespace+"-triggerOpen"),a(h.window.document.body).off("."+b.__namespace+"-triggerOpen");var c=b._$origin.data("tooltipster-ns");if(c)if(1===c.length){var d=null;"previous"==b.__options.restoration?d=b._$origin.data("tooltipster-initialTitle"):"current"==b.__options.restoration&&(d="string"==typeof b.__Content?b.__Content:a("<div></div>").append(b.__Content).html()),d&&b._$origin.attr("title",d),b._$origin.removeClass("tooltipstered"),b._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else c=a.grep(c,function(a,c){return a!==b.__namespace}),b._$origin.data("tooltipster-ns",c);b._trigger("destroyed"),b._off(),b.off(),b.__Content=null,b.__$emitterPrivate=null,b.__$emitterPublic=null,b.__options.parent=null,b._$origin=null,b._$tooltip=null,a.tooltipster.__instancesLatestArr=a.grep(a.tooltipster.__instancesLatestArr,function(a,c){return b!==a}),clearInterval(b.__garbageCollector)}return b},disable:function(){return this.__destroyed?(this.__destroyError(),this):(this._close(),this.__enabled=!1,this)},elementOrigin:function(){return this.__destroyed?void this.__destroyError():this._$origin[0]},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(a){return this.close(a)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(a){return this.__destroyed?this.__destroyError():this._open(null,a),this},option:function(b,c){return void 0===c?this.__options[b]:(this.__destroyed?this.__destroyError():(this.__options[b]=c,this.__optionsFormat(),a.inArray(b,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),"selfDestruction"===b&&this.__prepareGC()),this)},reposition:function(a,b){var c=this;return c.__destroyed?c.__destroyError():"closed"!=c.__state&&d(c._$origin)&&(b||d(c._$tooltip))&&(b||c._$tooltip.detach(),c.__Geometry=c.__geometry(),c._trigger({type:"reposition",event:a,helper:{geo:c.__Geometry}})),c},show:function(a){return this.open(a)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.fn.tooltipster=function(){var b=Array.prototype.slice.apply(arguments),c="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";if(0===this.length)return this;if("string"==typeof b[0]){var d="#*$~&";return this.each(function(){var e=a(this).data("tooltipster-ns"),f=e?a(this).data(e[0]):null;if(!f)throw new Error("You called Tooltipster's \""+b[0]+'" method on an uninitialized element');if("function"!=typeof f[b[0]])throw new Error('Unknown method "'+b[0]+'"');this.length>1&&"content"==b[0]&&(b[1]instanceof a||"object"==typeof b[1]&&null!=b[1]&&b[1].tagName)&&!f.__options.contentCloning&&f.__options.debug&&console.log(c);var g=f[b[0]](b[1],b[2]);return g!==f||"instance"===b[0]?(d=g,!1):void 0}),"#*$~&"!==d?d:this}a.tooltipster.__instancesLatestArr=[];var e=b[0]&&void 0!==b[0].multiple,g=e&&b[0].multiple||!e&&f.multiple,h=b[0]&&void 0!==b[0].content,i=h&&b[0].content||!h&&f.content,j=b[0]&&void 0!==b[0].contentCloning,k=j&&b[0].contentCloning||!j&&f.contentCloning,l=b[0]&&void 0!==b[0].debug,m=l&&b[0].debug||!l&&f.debug;return this.length>1&&(i instanceof a||"object"==typeof i&&null!=i&&i.tagName)&&!k&&m&&console.log(c),this.each(function(){var c=!1,d=a(this),e=d.data("tooltipster-ns"),f=null;e?g?c=!0:m&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)):c=!0,c&&(f=new a.Tooltipster(this,b[0]),e||(e=[]),e.push(f.__namespace),d.data("tooltipster-ns",e),d.data(f.__namespace,f),f.__options.functionInit&&f.__options.functionInit.call(f,f,{origin:this}),f._trigger("init")),a.tooltipster.__instancesLatestArr.push(f)}),this},b.prototype={__init:function(b){this.__$tooltip=b,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto"),this.$container=a('<div class="tooltipster-ruler"></div>').append(this.__$tooltip).appendTo(h.window.document.body)},__forceRedraw:function(){var a=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(a)},constrain:function(a,b){return this.constraints={width:a,height:b},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:a}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var a=this.__$tooltip[0].getBoundingClientRect(),b={size:{height:a.height||a.bottom-a.top,width:a.width||a.right-a.left}};if(this.constraints){var c=this.__$tooltip.find(".tooltipster-content"),d=this.__$tooltip.outerHeight(),e=c[0].getBoundingClientRect(),f={height:d<=this.constraints.height,width:a.width<=this.constraints.width&&e.width>=c[0].scrollWidth-1};b.fits=f.height&&f.width}return h.IE&&h.IE<=11&&b.size.width!==h.window.document.documentElement.clientWidth&&(b.size.width=Math.ceil(b.size.width)+1),b}};var j=navigator.userAgent.toLowerCase();-1!=j.indexOf("msie")?h.IE=parseInt(j.split("msie")[1]):-1!==j.toLowerCase().indexOf("trident")&&-1!==j.indexOf(" rv:11")?h.IE=11:-1!=j.toLowerCase().indexOf("edge/")&&(h.IE=parseInt(j.toLowerCase().split("edge/")[1]));var k="tooltipster.sideTip";return a.tooltipster._plugin({name:k,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(a){var b=this;b.__instance=a,b.__namespace="tooltipster-sideTip-"+Math.round(1e6*Math.random()),b.__previousState="closed",b.__options,b.__optionsFormat(),b.__instance._on("state."+b.__namespace,function(a){"closed"==a.state?b.__close():"appearing"==a.state&&"closed"==b.__previousState&&b.__create(),b.__previousState=a.state}),b.__instance._on("options."+b.__namespace,function(){b.__optionsFormat()}),b.__instance._on("reposition."+b.__namespace,function(a){b.__reposition(a.event,a.helper)})},__close:function(){this.__instance.content()instanceof a&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var b=a('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"></div></div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"></div><div class="tooltipster-arrow-background"></div></div></div></div>');this.__options.arrow||b.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide(),this.__options.minWidth&&b.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&b.css("max-width",this.__options.maxWidth+"px"),
this.__instance._$tooltip=b,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var b=this;if(b.__options=b.__instance._optionsExtract(k,b.__defaults()),b.__options.position&&(b.__options.side=b.__options.position),"object"!=typeof b.__options.distance&&(b.__options.distance=[b.__options.distance]),b.__options.distance.length<4&&(void 0===b.__options.distance[1]&&(b.__options.distance[1]=b.__options.distance[0]),void 0===b.__options.distance[2]&&(b.__options.distance[2]=b.__options.distance[0]),void 0===b.__options.distance[3]&&(b.__options.distance[3]=b.__options.distance[1]),b.__options.distance={top:b.__options.distance[0],right:b.__options.distance[1],bottom:b.__options.distance[2],left:b.__options.distance[3]}),"string"==typeof b.__options.side){var c={top:"bottom",right:"left",bottom:"top",left:"right"};b.__options.side=[b.__options.side,c[b.__options.side]],"left"==b.__options.side[0]||"right"==b.__options.side[0]?b.__options.side.push("top","bottom"):b.__options.side.push("right","left")}6===a.tooltipster._env.IE&&b.__options.arrow!==!0&&(b.__options.arrow=!1)},__reposition:function(b,c){var d,e=this,f=e.__targetFind(c),g=[];e.__instance._$tooltip.detach();var h=e.__instance._$tooltip.clone(),i=a.tooltipster._getRuler(h),j=!1,k=e.__instance.option("animation");switch(k&&h.removeClass("tooltipster-"+k),a.each(["window","document"],function(d,k){var l=null;if(e.__instance._trigger({container:k,helper:c,satisfied:j,takeTest:function(a){l=a},results:g,type:"positionTest"}),1==l||0!=l&&0==j&&("window"!=k||e.__options.viewportAware))for(var d=0;d<e.__options.side.length;d++){var m={horizontal:0,vertical:0},n=e.__options.side[d];"top"==n||"bottom"==n?m.vertical=e.__options.distance[n]:m.horizontal=e.__options.distance[n],e.__sideChange(h,n),a.each(["natural","constrained"],function(a,d){if(l=null,e.__instance._trigger({container:k,event:b,helper:c,mode:d,results:g,satisfied:j,side:n,takeTest:function(a){l=a},type:"positionTest"}),1==l||0!=l&&0==j){var h={container:k,distance:m,fits:null,mode:d,outerSize:null,side:n,size:null,target:f[n],whole:null},o="natural"==d?i.free():i.constrain(c.geo.available[k][n].width-m.horizontal,c.geo.available[k][n].height-m.vertical),p=o.measure();if(h.size=p.size,h.outerSize={height:p.size.height+m.vertical,width:p.size.width+m.horizontal},"natural"==d?c.geo.available[k][n].width>=h.outerSize.width&&c.geo.available[k][n].height>=h.outerSize.height?h.fits=!0:h.fits=!1:h.fits=p.fits,"window"==k&&(h.fits?"top"==n||"bottom"==n?h.whole=c.geo.origin.windowOffset.right>=e.__options.minIntersection&&c.geo.window.size.width-c.geo.origin.windowOffset.left>=e.__options.minIntersection:h.whole=c.geo.origin.windowOffset.bottom>=e.__options.minIntersection&&c.geo.window.size.height-c.geo.origin.windowOffset.top>=e.__options.minIntersection:h.whole=!1),g.push(h),h.whole)j=!0;else if("natural"==h.mode&&(h.fits||h.size.width<=c.geo.available[k][n].width))return!1}})}}),e.__instance._trigger({edit:function(a){g=a},event:b,helper:c,results:g,type:"positionTested"}),g.sort(function(a,b){if(a.whole&&!b.whole)return-1;if(!a.whole&&b.whole)return 1;if(a.whole&&b.whole){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}if(a.fits&&!b.fits)return-1;if(!a.fits&&b.fits)return 1;if(a.fits&&b.fits){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}return"document"==a.container&&"bottom"==a.side&&"natural"==a.mode?-1:1}),d=g[0],d.coord={},d.side){case"left":case"right":d.coord.top=Math.floor(d.target-d.size.height/2);break;case"bottom":case"top":d.coord.left=Math.floor(d.target-d.size.width/2)}switch(d.side){case"left":d.coord.left=c.geo.origin.windowOffset.left-d.outerSize.width;break;case"right":d.coord.left=c.geo.origin.windowOffset.right+d.distance.horizontal;break;case"top":d.coord.top=c.geo.origin.windowOffset.top-d.outerSize.height;break;case"bottom":d.coord.top=c.geo.origin.windowOffset.bottom+d.distance.vertical}"window"==d.container?"top"==d.side||"bottom"==d.side?d.coord.left<0?c.geo.origin.windowOffset.right-this.__options.minIntersection>=0?d.coord.left=0:d.coord.left=c.geo.origin.windowOffset.right-this.__options.minIntersection-1:d.coord.left>c.geo.window.size.width-d.size.width&&(c.geo.origin.windowOffset.left+this.__options.minIntersection<=c.geo.window.size.width?d.coord.left=c.geo.window.size.width-d.size.width:d.coord.left=c.geo.origin.windowOffset.left+this.__options.minIntersection+1-d.size.width):d.coord.top<0?c.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?d.coord.top=0:d.coord.top=c.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:d.coord.top>c.geo.window.size.height-d.size.height&&(c.geo.origin.windowOffset.top+this.__options.minIntersection<=c.geo.window.size.height?d.coord.top=c.geo.window.size.height-d.size.height:d.coord.top=c.geo.origin.windowOffset.top+this.__options.minIntersection+1-d.size.height):(d.coord.left>c.geo.window.size.width-d.size.width&&(d.coord.left=c.geo.window.size.width-d.size.width),d.coord.left<0&&(d.coord.left=0)),e.__sideChange(h,d.side),c.tooltipClone=h[0],c.tooltipParent=e.__instance.option("parent").parent[0],c.mode=d.mode,c.whole=d.whole,c.origin=e.__instance._$origin[0],c.tooltip=e.__instance._$tooltip[0],delete d.container,delete d.fits,delete d.mode,delete d.outerSize,delete d.whole,d.distance=d.distance.horizontal||d.distance.vertical;var l=a.extend(!0,{},d);if(e.__instance._trigger({edit:function(a){d=a},event:b,helper:c,position:l,type:"position"}),e.__options.functionPosition){var m=e.__options.functionPosition.call(e,e.__instance,c,l);m&&(d=m)}i.destroy();var n,o;"top"==d.side||"bottom"==d.side?(n={prop:"left",val:d.target-d.coord.left},o=d.size.width-this.__options.minIntersection):(n={prop:"top",val:d.target-d.coord.top},o=d.size.height-this.__options.minIntersection),n.val<this.__options.minIntersection?n.val=this.__options.minIntersection:n.val>o&&(n.val=o);var p;p=c.geo.origin.fixedLineage?c.geo.origin.windowOffset:{left:c.geo.origin.windowOffset.left+c.geo.window.scroll.left,top:c.geo.origin.windowOffset.top+c.geo.window.scroll.top},d.coord={left:p.left+(d.coord.left-c.geo.origin.windowOffset.left),top:p.top+(d.coord.top-c.geo.origin.windowOffset.top)},e.__sideChange(e.__instance._$tooltip,d.side),c.geo.origin.fixedLineage?e.__instance._$tooltip.css("position","fixed"):e.__instance._$tooltip.css("position",""),e.__instance._$tooltip.css({left:d.coord.left,top:d.coord.top,height:d.size.height,width:d.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(n.prop,n.val),e.__instance._$tooltip.appendTo(e.__instance.option("parent")),e.__instance._trigger({type:"repositioned",event:b,position:d})},__sideChange:function(a,b){a.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+b)},__targetFind:function(a){var b={},c=this.__instance._$origin[0].getClientRects();if(c.length>1){var d=this.__instance._$origin.css("opacity");1==d&&(this.__instance._$origin.css("opacity",.99),c=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1))}if(c.length<2)b.top=Math.floor(a.geo.origin.windowOffset.left+a.geo.origin.size.width/2),b.bottom=b.top,b.left=Math.floor(a.geo.origin.windowOffset.top+a.geo.origin.size.height/2),b.right=b.left;else{var e=c[0];b.top=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil(c.length/2)-1]:c[0],b.right=Math.floor(e.top+(e.bottom-e.top)/2),e=c[c.length-1],b.bottom=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil((c.length+1)/2)-1]:c[c.length-1],b.left=Math.floor(e.top+(e.bottom-e.top)/2)}return b}}}),a});
/*!
 * numeral.js
 * version : 1.5.3
 * author : Adam Draper
 * license : MIT
 * http://adamwdraper.github.com/Numeral-js/
 */
(function(){function a(a){this._value=a}function b(a,b,c,d){var e,f,g=Math.pow(10,b);return f=(c(a*g)/g).toFixed(b),d&&(e=new RegExp("0{1,"+d+"}$"),f=f.replace(e,"")),f}function c(a,b,c){var d;return d=b.indexOf("$")>-1?e(a,b,c):b.indexOf("%")>-1?f(a,b,c):b.indexOf(":")>-1?g(a,b):i(a._value,b,c)}function d(a,b){var c,d,e,f,g,i=b,j=["KB","MB","GB","TB","PB","EB","ZB","YB"],k=!1;if(b.indexOf(":")>-1)a._value=h(b);else if(b===q)a._value=0;else{for("."!==o[p].delimiters.decimal&&(b=b.replace(/\./g,"").replace(o[p].delimiters.decimal,".")),c=new RegExp("[^a-zA-Z]"+o[p].abbreviations.thousand+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),d=new RegExp("[^a-zA-Z]"+o[p].abbreviations.million+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),e=new RegExp("[^a-zA-Z]"+o[p].abbreviations.billion+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),f=new RegExp("[^a-zA-Z]"+o[p].abbreviations.trillion+"(?:\\)|(\\"+o[p].currency.symbol+")?(?:\\))?)?$"),g=0;g<=j.length&&!(k=b.indexOf(j[g])>-1?Math.pow(1024,g+1):!1);g++);a._value=(k?k:1)*(i.match(c)?Math.pow(10,3):1)*(i.match(d)?Math.pow(10,6):1)*(i.match(e)?Math.pow(10,9):1)*(i.match(f)?Math.pow(10,12):1)*(b.indexOf("%")>-1?.01:1)*((b.split("-").length+Math.min(b.split("(").length-1,b.split(")").length-1))%2?1:-1)*Number(b.replace(/[^0-9\.]+/g,"")),a._value=k?Math.ceil(a._value):a._value}return a._value}function e(a,b,c){var d,e,f=b.indexOf("$"),g=b.indexOf("("),h=b.indexOf("-"),j="";return b.indexOf(" $")>-1?(j=" ",b=b.replace(" $","")):b.indexOf("$ ")>-1?(j=" ",b=b.replace("$ ","")):b=b.replace("$",""),e=i(a._value,b,c),1>=f?e.indexOf("(")>-1||e.indexOf("-")>-1?(e=e.split(""),d=1,(g>f||h>f)&&(d=0),e.splice(d,0,o[p].currency.symbol+j),e=e.join("")):e=o[p].currency.symbol+j+e:e.indexOf(")")>-1?(e=e.split(""),e.splice(-1,0,j+o[p].currency.symbol),e=e.join("")):e=e+j+o[p].currency.symbol,e}function f(a,b,c){var d,e="",f=100*a._value;return b.indexOf(" %")>-1?(e=" ",b=b.replace(" %","")):b=b.replace("%",""),d=i(f,b,c),d.indexOf(")")>-1?(d=d.split(""),d.splice(-1,0,e+"%"),d=d.join("")):d=d+e+"%",d}function g(a){var b=Math.floor(a._value/60/60),c=Math.floor((a._value-60*b*60)/60),d=Math.round(a._value-60*b*60-60*c);return b+":"+(10>c?"0"+c:c)+":"+(10>d?"0"+d:d)}function h(a){var b=a.split(":"),c=0;return 3===b.length?(c+=60*Number(b[0])*60,c+=60*Number(b[1]),c+=Number(b[2])):2===b.length&&(c+=60*Number(b[0]),c+=Number(b[1])),Number(c)}function i(a,c,d){var e,f,g,h,i,j,k=!1,l=!1,m=!1,n="",r=!1,s=!1,t=!1,u=!1,v=!1,w="",x="",y=Math.abs(a),z=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],A="",B=!1;if(0===a&&null!==q)return q;if(c.indexOf("(")>-1?(k=!0,c=c.slice(1,-1)):c.indexOf("+")>-1&&(l=!0,c=c.replace(/\+/g,"")),c.indexOf("a")>-1&&(r=c.indexOf("aK")>=0,s=c.indexOf("aM")>=0,t=c.indexOf("aB")>=0,u=c.indexOf("aT")>=0,v=r||s||t||u,c.indexOf(" a")>-1?(n=" ",c=c.replace(" a","")):c=c.replace("a",""),y>=Math.pow(10,12)&&!v||u?(n+=o[p].abbreviations.trillion,a/=Math.pow(10,12)):y<Math.pow(10,12)&&y>=Math.pow(10,9)&&!v||t?(n+=o[p].abbreviations.billion,a/=Math.pow(10,9)):y<Math.pow(10,9)&&y>=Math.pow(10,6)&&!v||s?(n+=o[p].abbreviations.million,a/=Math.pow(10,6)):(y<Math.pow(10,6)&&y>=Math.pow(10,3)&&!v||r)&&(n+=o[p].abbreviations.thousand,a/=Math.pow(10,3))),c.indexOf("b")>-1)for(c.indexOf(" b")>-1?(w=" ",c=c.replace(" b","")):c=c.replace("b",""),g=0;g<=z.length;g++)if(e=Math.pow(1024,g),f=Math.pow(1024,g+1),a>=e&&f>a){w+=z[g],e>0&&(a/=e);break}return c.indexOf("o")>-1&&(c.indexOf(" o")>-1?(x=" ",c=c.replace(" o","")):c=c.replace("o",""),x+=o[p].ordinal(a)),c.indexOf("[.]")>-1&&(m=!0,c=c.replace("[.]",".")),h=a.toString().split(".")[0],i=c.split(".")[1],j=c.indexOf(","),i?(i.indexOf("[")>-1?(i=i.replace("]",""),i=i.split("["),A=b(a,i[0].length+i[1].length,d,i[1].length)):A=b(a,i.length,d),h=A.split(".")[0],A=A.split(".")[1].length?o[p].delimiters.decimal+A.split(".")[1]:"",m&&0===Number(A.slice(1))&&(A="")):h=b(a,null,d),h.indexOf("-")>-1&&(h=h.slice(1),B=!0),j>-1&&(h=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+o[p].delimiters.thousands)),0===c.indexOf(".")&&(h=""),(k&&B?"(":"")+(!k&&B?"-":"")+(!B&&l?"+":"")+h+A+(x?x:"")+(n?n:"")+(w?w:"")+(k&&B?")":"")}function j(a,b){o[a]=b}function k(a){var b=a.toString().split(".");return b.length<2?1:Math.pow(10,b[1].length)}function l(){var a=Array.prototype.slice.call(arguments);return a.reduce(function(a,b){var c=k(a),d=k(b);return c>d?c:d},-1/0)}var m,n="1.5.3",o={},p="en",q=null,r="0,0",s="undefined"!=typeof module&&module.exports;m=function(b){return m.isNumeral(b)?b=b.value():0===b||"undefined"==typeof b?b=0:Number(b)||(b=m.fn.unformat(b)),new a(Number(b))},m.version=n,m.isNumeral=function(b){return b instanceof a},m.language=function(a,b){if(!a)return p;if(a&&!b){if(!o[a])throw new Error("Unknown language : "+a);p=a}return(b||!o[a])&&j(a,b),m},m.languageData=function(a){if(!a)return o[p];if(!o[a])throw new Error("Unknown language : "+a);return o[a]},m.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"$"}}),m.zeroFormat=function(a){q="string"==typeof a?a:null},m.defaultFormat=function(a){r="string"==typeof a?a:"0.0"},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(a,b){"use strict";if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof a)throw new TypeError(a+" is not a function");var c,d,e=this.length>>>0,f=!1;for(1<arguments.length&&(d=b,f=!0),c=0;e>c;++c)this.hasOwnProperty(c)&&(f?d=a(d,this[c],c,this):(d=this[c],f=!0));if(!f)throw new TypeError("Reduce of empty array with no initial value");return d}),m.fn=a.prototype={clone:function(){return m(this)},format:function(a,b){return c(this,a?a:r,void 0!==b?b:Math.round)},unformat:function(a){return"[object Number]"===Object.prototype.toString.call(a)?a:d(this,a?a:r)},value:function(){return this._value},valueOf:function(){return this._value},set:function(a){return this._value=Number(a),this},add:function(a){function b(a,b){return a+c*b}var c=l.call(null,this._value,a);return this._value=[this._value,a].reduce(b,0)/c,this},subtract:function(a){function b(a,b){return a-c*b}var c=l.call(null,this._value,a);return this._value=[a].reduce(b,this._value*c)/c,this},multiply:function(a){function b(a,b){var c=l(a,b);return a*c*b*c/(c*c)}return this._value=[this._value,a].reduce(b,1),this},divide:function(a){function b(a,b){var c=l(a,b);return a*c/(b*c)}return this._value=[this._value,a].reduce(b),this},difference:function(a){return Math.abs(m(this._value).subtract(a).value())}},s&&(module.exports=m),"undefined"==typeof ender&&(this.numeral=m),"function"==typeof define&&define.amd&&define('numeral',[],function(){return m})}).call(this);

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define('vendor/moment',t):e.moment=t()}(this,function(){"use strict";var H;function _(){return H.apply(null,arguments)}function y(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function F(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function g(e){return void 0===e}function w(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i<s;++i)n.push(t(e[i],i));return n}function E(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return Wt(e,t,n,s,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function A(e){var t,n,s=e._d&&!isNaN(e._d.getTime());return s&&(t=p(e),n=j.call(t.parsedDateParts,function(e){return null!=e}),s=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict)&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e)?s:(e._isValid=s,e._isValid)}function I(e){var t=l(NaN);return null!=e?E(p(t),e):p(t).userInvalidated=!0,t}var j=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},Z=_.momentProperties=[],z=!1;function q(e,t){var n,s,i,r=Z.length;if(g(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),g(t._i)||(e._i=t._i),g(t._f)||(e._f=t._f),g(t._l)||(e._l=t._l),g(t._strict)||(e._strict=t._strict),g(t._tzm)||(e._tzm=t._tzm),g(t._isUTC)||(e._isUTC=t._isUTC),g(t._offset)||(e._offset=t._offset),g(t._pf)||(e._pf=p(t)),g(t._locale)||(e._locale=t._locale),0<r)for(n=0;n<r;n++)g(i=t[s=Z[n]])||(e[s]=i);return e}function $(e){q(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===z&&(z=!0,_.updateOffset(this),z=!1)}function k(e){return e instanceof $||null!=e&&null!=e._isAMomentObject}function B(e){!1===_.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function e(r,a){var o=!0;return E(function(){if(null!=_.deprecationHandler&&_.deprecationHandler(null,r),o){for(var e,t,n=[],s=arguments.length,i=0;i<s;i++){if(e="","object"==typeof arguments[i]){for(t in e+="\n["+i+"] ",arguments[0])c(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[i];n.push(e)}B(r+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),o=!1}return a.apply(this,arguments)},a)}var J={};function Q(e,t){null!=_.deprecationHandler&&_.deprecationHandler(e,t),J[e]||(B(t),J[e]=!0)}function a(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function X(e,t){var n,s=E({},e);for(n in t)c(t,n)&&(F(e[n])&&F(t[n])?(s[n]={},E(s[n],e[n]),E(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)c(e,n)&&!c(t,n)&&F(e[n])&&(s[n]=E({},s[n]));return s}function K(e){null!=e&&this.set(e)}_.suppressDeprecationWarnings=!1,_.deprecationHandler=null;var ee=Object.keys||function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};function r(e,t,n){var s=""+Math.abs(e);return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}var te=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,se={},ie={};function s(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(ie[e]=i),t&&(ie[t[0]]=function(){return r(i.apply(this,arguments),t[1],t[2])}),n&&(ie[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function re(e,t){return e.isValid()?(t=ae(t,e.localeData()),se[t]=se[t]||function(s){for(var e,i=s.match(te),t=0,r=i.length;t<r;t++)ie[i[t]]?i[t]=ie[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=a(i[n])?i[n].call(e,s):i[n];return t}}(t),se[t](e)):e.localeData().invalidDate()}function ae(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(ne.lastIndex=0;0<=n&&ne.test(e);)e=e.replace(ne,s),ne.lastIndex=0,--n;return e}var oe={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function o(e){return"string"==typeof e?oe[e]||oe[e.toLowerCase()]:void 0}function ue(e){var t,n,s={};for(n in e)c(e,n)&&(t=o(n))&&(s[t]=e[n]);return s}var le={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var de=/\d/,t=/\d\d/,he=/\d{3}/,ce=/\d{4}/,fe=/[+-]?\d{6}/,n=/\d\d?/,me=/\d\d\d\d?/,_e=/\d\d\d\d\d\d?/,ye=/\d{1,3}/,ge=/\d{1,4}/,we=/[+-]?\d{1,6}/,pe=/\d+/,ke=/[+-]?\d+/,Me=/Z|[+-]\d\d:?\d\d/gi,ve=/Z|[+-]\d\d(?::?\d\d)?/gi,i=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,u=/^[1-9]\d?/,d=/^([1-9]\d|\d)/;function h(e,n,s){Ye[e]=a(n)?n:function(e,t){return e&&s?s:n}}function De(e,t){return c(Ye,e)?Ye[e](t._strict,t._locale):new RegExp(f(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function f(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function m(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function M(e){var e=+e,t=0;return t=0!=e&&isFinite(e)?m(e):t}var Ye={},Se={};function v(e,n){var t,s,i=n;for("string"==typeof e&&(e=[e]),w(n)&&(i=function(e,t){t[n]=M(e)}),s=e.length,t=0;t<s;t++)Se[e[t]]=i}function Oe(e,i){v(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}function be(e){return e%4==0&&e%100!=0||e%400==0}var D=0,Y=1,S=2,O=3,b=4,T=5,Te=6,xe=7,Ne=8;function We(e){return be(e)?366:365}s("Y",0,0,function(){var e=this.year();return e<=9999?r(e,4):"+"+e}),s(0,["YY",2],0,function(){return this.year()%100}),s(0,["YYYY",4],0,"year"),s(0,["YYYYY",5],0,"year"),s(0,["YYYYYY",6,!0],0,"year"),h("Y",ke),h("YY",n,t),h("YYYY",ge,ce),h("YYYYY",we,fe),h("YYYYYY",we,fe),v(["YYYYY","YYYYYY"],D),v("YYYY",function(e,t){t[D]=2===e.length?_.parseTwoDigitYear(e):M(e)}),v("YY",function(e,t){t[D]=_.parseTwoDigitYear(e)}),v("Y",function(e,t){t[D]=parseInt(e,10)}),_.parseTwoDigitYear=function(e){return M(e)+(68<M(e)?1900:2e3)};var x,Pe=Re("FullYear",!0);function Re(t,n){return function(e){return null!=e?(Ue(this,t,e),_.updateOffset(this,n),this):Ce(this,t)}}function Ce(e,t){if(!e.isValid())return NaN;var n=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return s?n.getUTCSeconds():n.getSeconds();case"Minutes":return s?n.getUTCMinutes():n.getMinutes();case"Hours":return s?n.getUTCHours():n.getHours();case"Date":return s?n.getUTCDate():n.getDate();case"Day":return s?n.getUTCDay():n.getDay();case"Month":return s?n.getUTCMonth():n.getMonth();case"FullYear":return s?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ue(e,t,n){var s,i,r;if(e.isValid()&&!isNaN(n)){switch(s=e._d,i=e._isUTC,t){case"Milliseconds":return i?s.setUTCMilliseconds(n):s.setMilliseconds(n);case"Seconds":return i?s.setUTCSeconds(n):s.setSeconds(n);case"Minutes":return i?s.setUTCMinutes(n):s.setMinutes(n);case"Hours":return i?s.setUTCHours(n):s.setHours(n);case"Date":return i?s.setUTCDate(n):s.setDate(n);case"FullYear":break;default:return}t=n,r=e.month(),e=29!==(e=e.date())||1!==r||be(t)?e:28,i?s.setUTCFullYear(t,r,e):s.setFullYear(t,r,e)}}function He(e,t){var n;return isNaN(e)||isNaN(t)?NaN:(n=(t%(n=12)+n)%n,e+=(t-n)/12,1==n?be(e)?29:28:31-n%7%2)}x=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},s("M",["MM",2],"Mo",function(){return this.month()+1}),s("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),s("MMMM",0,0,function(e){return this.localeData().months(this,e)}),h("M",n,u),h("MM",n,t),h("MMM",function(e,t){return t.monthsShortRegex(e)}),h("MMMM",function(e,t){return t.monthsRegex(e)}),v(["M","MM"],function(e,t){t[Y]=M(e)-1}),v(["MMM","MMMM"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[Y]=s:p(n).invalidMonth=e});var Fe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Le="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ve=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ge=i,Ee=i;function Ae(e,t){if(e.isValid()){if("string"==typeof t)if(/^\d+$/.test(t))t=M(t);else if(!w(t=e.localeData().monthsParse(t)))return;var n=(n=e.date())<29?n:Math.min(n,He(e.year(),t));e._isUTC?e._d.setUTCMonth(t,n):e._d.setMonth(t,n)}}function Ie(e){return null!=e?(Ae(this,e),_.updateOffset(this,!0),this):Ce(this,"Month")}function je(){function e(e,t){return t.length-e.length}for(var t,n,s=[],i=[],r=[],a=0;a<12;a++)n=l([2e3,a]),t=f(this.monthsShort(n,"")),n=f(this.months(n,"")),s.push(t),i.push(n),r.push(n),r.push(t);s.sort(e),i.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ze(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}function ze(e){var t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,t)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function qe(e,t,n){n=7+t-n;return n-(7+ze(e,0,n).getUTCDay()-t)%7-1}function $e(e,t,n,s,i){var r,t=1+7*(t-1)+(7+n-s)%7+qe(e,s,i),n=t<=0?We(r=e-1)+t:t>We(e)?(r=e+1,t-We(e)):(r=e,t);return{year:r,dayOfYear:n}}function Be(e,t,n){var s,i,r=qe(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+N(i=e.year()-1,t,n):r>N(e.year(),t,n)?(s=r-N(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function N(e,t,n){var s=qe(e,t,n),t=qe(e+1,t,n);return(We(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),h("w",n,u),h("ww",n,t),h("W",n,u),h("WW",n,t),Oe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=M(e)});function Je(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),h("d",n),h("e",n),h("E",n),h("dd",function(e,t){return t.weekdaysMinRegex(e)}),h("ddd",function(e,t){return t.weekdaysShortRegex(e)}),h("dddd",function(e,t){return t.weekdaysRegex(e)}),Oe(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:p(n).invalidWeekday=e}),Oe(["d","e","E"],function(e,t,n,s){t[s]=M(e)});var Qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),et=i,tt=i,nt=i;function st(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=f(this.weekdaysMin(s,"")),n=f(this.weekdaysShort(s,"")),s=f(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function it(){return this.hours()%12||12}function rt(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function at(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,it),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),rt("a",!0),rt("A",!1),h("a",at),h("A",at),h("H",n,d),h("h",n,u),h("k",n,u),h("HH",n,t),h("hh",n,t),h("kk",n,t),h("hmm",me),h("hmmss",_e),h("Hmm",me),h("Hmmss",_e),v(["H","HH"],O),v(["k","kk"],function(e,t,n){e=M(e);t[O]=24===e?0:e}),v(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),v(["h","hh"],function(e,t,n){t[O]=M(e),p(n).bigHour=!0}),v("hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s)),p(n).bigHour=!0}),v("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i)),p(n).bigHour=!0}),v("Hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s))}),v("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i))});i=Re("Hours",!0);var ot,ut={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Fe,monthsShort:Le,week:{dow:0,doy:6},weekdays:Qe,weekdaysMin:Ke,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},W={},lt={};function dt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=dt(e[r]).split("-")).length,n=(n=dt(e[r+1]))?n.split("-"):null;0<t;){if(s=ct(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return ot}function ct(t){var e,n;if(void 0===W[t]&&"undefined"!=typeof module&&module&&module.exports&&(n=t)&&n.match("^[^/\\\\]*$"))try{e=ot._abbr,require("./locale/"+t),ft(e)}catch(e){W[t]=null}return W[t]}function ft(e,t){return e&&((t=g(t)?P(e):mt(e,t))?ot=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ot._abbr}function mt(e,t){if(null===t)return delete W[e],null;var n,s=ut;if(t.abbr=e,null!=W[e])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=W[e]._config;else if(null!=t.parentLocale)if(null!=W[t.parentLocale])s=W[t.parentLocale]._config;else{if(null==(n=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return W[e]=new K(X(s,t)),lt[e]&&lt[e].forEach(function(e){mt(e.name,e.config)}),ft(e),W[e]}function P(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return ot;if(!y(e)){if(t=ct(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===p(e).overflow&&(t=t[Y]<0||11<t[Y]?Y:t[S]<1||t[S]>He(t[D],t[Y])?S:t[O]<0||24<t[O]||24===t[O]&&(0!==t[b]||0!==t[T]||0!==t[Te])?O:t[b]<0||59<t[b]?b:t[T]<0||59<t[T]?T:t[Te]<0||999<t[Te]?Te:-1,p(e)._overflowDayOfYear&&(t<D||S<t)&&(t=S),p(e)._overflowWeeks&&-1===t&&(t=xe),p(e)._overflowWeekday&&-1===t&&(t=Ne),p(e).overflow=t),e}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mt=/^\/?Date\((-?\d+)/i,vt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yt(e){var t,n,s,i,r,a,o=e._i,u=yt.exec(o)||gt.exec(o),o=pt.length,l=kt.length;if(u){for(p(e).iso=!0,t=0,n=o;t<n;t++)if(pt[t][1].exec(u[1])){i=pt[t][0],s=!1!==pt[t][2];break}if(null==i)e._isValid=!1;else{if(u[3]){for(t=0,n=l;t<n;t++)if(kt[t][1].exec(u[3])){r=(u[2]||" ")+kt[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),xt(e)}else e._isValid=!1}}else e._isValid=!1}function St(e,t,n,s,i,r){e=[function(e){e=parseInt(e,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(e),Le.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&e.push(parseInt(r,10)),e}function Ot(e){var t,n,s=vt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));s?(t=St(s[4],s[3],s[2],s[5],s[6],s[7]),function(e,t,n){if(!e||Xe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay())return 1;p(n).weekdayMismatch=!0,n._isValid=!1}(s[1],t,e)&&(e._a=t,e._tzm=(t=s[8],n=s[9],s=s[10],t?Dt[t]:n?0:60*(((t=parseInt(s,10))-(n=t%100))/100)+n),e._d=ze.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0)):e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function Tt(e){var t,n,s,i,r,a,o,u,l,d,h,c=[];if(!e._d){for(s=e,i=new Date(_.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[S]&&null==e._a[Y]&&(null!=(i=(s=e)._w).GG||null!=i.W||null!=i.E?(u=1,l=4,r=bt(i.GG,s._a[D],Be(R(),1,4).year),a=bt(i.W,1),((o=bt(i.E,1))<1||7<o)&&(d=!0)):(u=s._locale._week.dow,l=s._locale._week.doy,h=Be(R(),u,l),r=bt(i.gg,s._a[D],h.year),a=bt(i.w,h.week),null!=i.d?((o=i.d)<0||6<o)&&(d=!0):null!=i.e?(o=i.e+u,(i.e<0||6<i.e)&&(d=!0)):o=u),a<1||a>N(r,u,l)?p(s)._overflowWeeks=!0:null!=d?p(s)._overflowWeekday=!0:(h=$e(r,a,o,u,l),s._a[D]=h.year,s._dayOfYear=h.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[D],n[D]),(e._dayOfYear>We(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),d=ze(i,0,e._dayOfYear),e._a[Y]=d.getUTCMonth(),e._a[S]=d.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[O]&&0===e._a[b]&&0===e._a[T]&&0===e._a[Te]&&(e._nextDay=!0,e._a[O]=0),e._d=(e._useUTC?ze:Ze).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[O]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(p(e).weekdayMismatch=!0)}}function xt(e){if(e._f===_.ISO_8601)Yt(e);else if(e._f===_.RFC_2822)Ot(e);else{e._a=[],p(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],d=l.length,h=0;h<d;h++)n=l[h],(t=(a.match(De(n,e))||[])[0])&&(0<(s=a.substr(0,a.indexOf(t))).length&&p(e).unusedInput.push(s),a=a.slice(a.indexOf(t)+t.length),u+=t.length),ie[n]?(t?p(e).empty=!1:p(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&c(Se,s)&&Se[s](i,r._a,r,s)):e._strict&&!t&&p(e).unusedTokens.push(n);p(e).charsLeftOver=o-u,0<a.length&&p(e).unusedInput.push(a),e._a[O]<=12&&!0===p(e).bigHour&&0<e._a[O]&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[O]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((e=e.isPM(n))&&t<12&&(t+=12),t=e||12!==t?t:0):t}(e._locale,e._a[O],e._meridiem),null!==(o=p(e).era)&&(e._a[D]=e._locale.erasConvertYear(o,e._a[D])),Tt(e),_t(e)}}function Nt(e){var t,n,s,i=e._i,r=e._f;if(e._locale=e._locale||P(e._l),null===i||void 0===r&&""===i)return I({nullInput:!0});if("string"==typeof i&&(e._i=i=e._locale.preparse(i)),k(i))return new $(_t(i));if(V(i))e._d=i;else if(y(r)){var a,o,u,l,d,h,c=e,f=!1,m=c._f.length;if(0===m)p(c).invalidFormat=!0,c._d=new Date(NaN);else{for(l=0;l<m;l++)d=0,h=!1,a=q({},c),null!=c._useUTC&&(a._useUTC=c._useUTC),a._f=c._f[l],xt(a),A(a)&&(h=!0),d=(d+=p(a).charsLeftOver)+10*p(a).unusedTokens.length,p(a).score=d,f?d<u&&(u=d,o=a):(null==u||d<u||h)&&(u=d,o=a,h)&&(f=!0);E(c,o||a)}}else if(r)xt(e);else if(g(r=(i=e)._i))i._d=new Date(_.now());else V(r)?i._d=new Date(r.valueOf()):"string"==typeof r?(n=i,null!==(t=Mt.exec(n._i))?n._d=new Date(+t[1]):(Yt(n),!1===n._isValid&&(delete n._isValid,Ot(n),!1===n._isValid)&&(delete n._isValid,n._strict?n._isValid=!1:_.createFromInputFallback(n)))):y(r)?(i._a=G(r.slice(0),function(e){return parseInt(e,10)}),Tt(i)):F(r)?(t=i)._d||(s=void 0===(n=ue(t._i)).day?n.date:n.day,t._a=G([n.year,n.month,s,n.hour,n.minute,n.second,n.millisecond],function(e){return e&&parseInt(e,10)}),Tt(t)):w(r)?i._d=new Date(r):_.createFromInputFallback(i);return A(e)||(e._d=null),e}function Wt(e,t,n,s,i){var r={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(F(e)&&L(e)||y(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(i=new $(_t(Nt(i=r))))._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function R(e,t,n,s){return Wt(e,t,n,s,!1)}_.createFromInputFallback=e("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),_.ISO_8601=function(){},_.RFC_2822=function(){};me=e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:I()}),_e=e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:I()});function Pt(e,t){var n,s;if(!(t=1===t.length&&y(t[0])?t[0]:t).length)return R();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Rt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var e=ue(e),t=e.year||0,n=e.quarter||0,s=e.month||0,i=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,o=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Rt.length;for(t in e)if(c(e,t)&&(-1===x.call(Rt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Rt[n]]){if(s)return!1;parseFloat(e[Rt[n]])!==M(e[Rt[n]])&&(s=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*o+1e3*a*60*60,this._days=+r+7*i,this._months=+s+3*n+12*t,this._data={},this._locale=P(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){s(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+r(~~(e/60),2)+n+r(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),h("Z",ve),h("ZZ",ve),v(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(ve,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var t=(t||"").match(e);return null===t?null:0===(t=60*(e=((t[t.length-1]||[])+"").match(Lt)||["-",0,0])[1]+M(e[2]))?0:"+"===e[0]?t:-t}function Gt(e,t){var n;return t._isUTC?(t=t.clone(),n=(k(e)||V(e)?e:R(e)).valueOf()-t.valueOf(),t._d.setTime(t._d.valueOf()+n),_.updateOffset(t,!1),t):R(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&this._isUTC&&0===this._offset}_.updateOffset=function(){};var It=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function C(e,t){var n,s=e;return Ut(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:w(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(t=It.exec(e))?(n="-"===t[1]?-1:1,s={y:0,d:M(t[S])*n,h:M(t[O])*n,m:M(t[b])*n,s:M(t[T])*n,ms:M(Ht(1e3*t[Te]))*n}):(t=jt.exec(e))?(n="-"===t[1]?-1:1,s={y:Zt(t[2],n),M:Zt(t[3],n),w:Zt(t[4],n),d:Zt(t[5],n),h:Zt(t[6],n),m:Zt(t[7],n),s:Zt(t[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(t=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(R(s.from),R(s.to)),(s={}).ms=t.milliseconds,s.M=t.months),n=new Ct(s),Ut(e)&&c(e,"_locale")&&(n._locale=e._locale),Ut(e)&&c(e,"_isValid")&&(n._isValid=e._isValid),n}function Zt(e,t){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function qt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Q(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),$t(this,C(e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),t=Ht(t._months);e.isValid()&&(s=null==s||s,t&&Ae(e,Ce(e,"Month")+t*n),r&&Ue(e,"Date",Ce(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s)&&_.updateOffset(e,r||t)}C.fn=Ct.prototype,C.invalid=function(){return C(NaN)};Fe=qt(1,"add"),Qe=qt(-1,"subtract");function Bt(e){return"string"==typeof e||e instanceof String}function Jt(e){return k(e)||V(e)||Bt(e)||w(e)||function(t){var e=y(t),n=!1;e&&(n=0===t.filter(function(e){return!w(e)&&Bt(t)}).length);return e&&n}(e)||function(e){var t,n,s=F(e)&&!L(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a=r.length;for(t=0;t<a;t+=1)n=r[t],i=i||c(e,n);return s&&i}(e)||null==e}function Qt(e,t){var n,s;return e.date()<t.date()?-Qt(t,e):-((n=12*(t.year()-e.year())+(t.month()-e.month()))+(t-(s=e.clone().add(n,"months"))<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s)))||0}function Xt(e){return void 0===e?this._locale._abbr:(null!=(e=P(e))&&(this._locale=e),this)}_.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";Ke=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}var en=126227808e5;function tn(e,t){return(e%t+t)%t}function nn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-en:new Date(e,t,n).valueOf()}function sn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-en:Date.UTC(e,t,n)}function rn(e,t){return t.erasAbbrRegex(e)}function an(){for(var e,t,n,s=[],i=[],r=[],a=[],o=this.eras(),u=0,l=o.length;u<l;++u)e=f(o[u].name),t=f(o[u].abbr),n=f(o[u].narrow),i.push(e),s.push(t),r.push(n),a.push(e),a.push(t),a.push(n);this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function on(e,t){s(0,[e,e.length],0,t)}function un(e,t,n,s,i){var r;return null==e?Be(this,s,i).year:(r=N(e,s,i),function(e,t,n,s,i){e=$e(e,t,n,s,i),t=ze(e.year,0,e.dayOfYear);return this.year(t.getUTCFullYear()),this.month(t.getUTCMonth()),this.date(t.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}s("N",0,0,"eraAbbr"),s("NN",0,0,"eraAbbr"),s("NNN",0,0,"eraAbbr"),s("NNNN",0,0,"eraName"),s("NNNNN",0,0,"eraNarrow"),s("y",["y",1],"yo","eraYear"),s("y",["yy",2],0,"eraYear"),s("y",["yyy",3],0,"eraYear"),s("y",["yyyy",4],0,"eraYear"),h("N",rn),h("NN",rn),h("NNN",rn),h("NNNN",function(e,t){return t.erasNameRegex(e)}),h("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),v(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){s=n._locale.erasParse(e,s,n._strict);s?p(n).era=s:p(n).invalidEra=e}),h("y",pe),h("yy",pe),h("yyy",pe),h("yyyy",pe),h("yo",function(e,t){return t._eraYearOrdinalRegex||pe}),v(["y","yy","yyy","yyyy"],D),v(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[D]=n._locale.eraYearOrdinalParse(e,i):t[D]=parseInt(e,10)}),s(0,["gg",2],0,function(){return this.weekYear()%100}),s(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),h("G",ke),h("g",ke),h("GG",n,t),h("gg",n,t),h("GGGG",ge,ce),h("gggg",ge,ce),h("GGGGG",we,fe),h("ggggg",we,fe),Oe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=M(e)}),Oe(["gg","GG"],function(e,t,n,s){t[s]=_.parseTwoDigitYear(e)}),s("Q",0,"Qo","quarter"),h("Q",de),v("Q",function(e,t){t[Y]=3*(M(e)-1)}),s("D",["DD",2],"Do","date"),h("D",n,u),h("DD",n,t),h("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),v(["D","DD"],S),v("Do",function(e,t){t[S]=M(e.match(n)[0])});ge=Re("Date",!0);s("DDD",["DDDD",3],"DDDo","dayOfYear"),h("DDD",ye),h("DDDD",he),v(["DDD","DDDD"],function(e,t,n){n._dayOfYear=M(e)}),s("m",["mm",2],0,"minute"),h("m",n,d),h("mm",n,t),v(["m","mm"],b);var ln,ce=Re("Minutes",!1),we=(s("s",["ss",2],0,"second"),h("s",n,d),h("ss",n,t),v(["s","ss"],T),Re("Seconds",!1));for(s("S",0,0,function(){return~~(this.millisecond()/100)}),s(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),s(0,["SSS",3],0,"millisecond"),s(0,["SSSS",4],0,function(){return 10*this.millisecond()}),s(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),s(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),s(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),s(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),s(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),h("S",ye,de),h("SS",ye,t),h("SSS",ye,he),ln="SSSS";ln.length<=9;ln+="S")h(ln,pe);function dn(e,t){t[Te]=M(1e3*("0."+e))}for(ln="S";ln.length<=9;ln+="S")v(ln,dn);fe=Re("Milliseconds",!1),s("z",0,0,"zoneAbbr"),s("zz",0,0,"zoneName");u=$.prototype;function hn(e){return e}u.add=Fe,u.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=F(e)&&!L(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||c(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var e=e||R(),n=Gt(e,this).startOf("day"),n=_.calendarFormat(this,n)||"sameElse",t=t&&(a(t[n])?t[n].call(this,e):t[n]);return this.format(t||this.localeData().calendar(n,this,R(e)))},u.clone=function(){return new $(this)},u.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=o(t)){case"year":r=Qt(this,s)/12;break;case"month":r=Qt(this,s);break;case"quarter":r=Qt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:m(r)},u.endOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1;break}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.format=function(e){return e=e||(this.isUtc()?_.defaultFormatUtc:_.defaultFormat),e=re(this,e),this.localeData().postformat(e)},u.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.fromNow=function(e){return this.from(R(),e)},u.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.toNow=function(e){return this.to(R(),e)},u.get=function(e){return a(this[e=o(e)])?this[e]():this},u.invalidAt=function(){return p(this).overflow},u.isAfter=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},u.isBefore=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},u.isBetween=function(e,t,n,s){return e=k(e)?e:R(e),t=k(t)?t:R(t),!!(this.isValid()&&e.isValid()&&t.isValid())&&("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},u.isSame=function(e,t){var e=k(e)?e:R(e);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=o(t)||"millisecond")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},u.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},u.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},u.isValid=function(){return A(this)},u.lang=Ke,u.locale=Xt,u.localeData=Kt,u.max=_e,u.min=me,u.parsingFlags=function(){return E({},p(this))},u.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:le[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=ue(e)),s=n.length,i=0;i<s;i++)this[n[i].unit](e[n[i].unit]);else if(a(this[e=o(e)]))return this[e](t);return this},u.startOf=function(e){var t,n;if(void 0!==(e=o(e))&&"millisecond"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=tn(t,6e4);break;case"second":t=this._d.valueOf(),t-=tn(t,1e3);break}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.subtract=Qe,u.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},u.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},u.toDate=function(){return new Date(this.valueOf())},u.toISOString=function(e){var t;return this.isValid()?(t=(e=!0!==e)?this.clone().utc():this).year()<0||9999<t.year()?re(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):a(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",re(t,"Z")):re(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ"):null},u.inspect=function(){var e,t,n;return this.isValid()?(t="moment",e="",this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z"),t="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+n+"-MM-DD[T]HH:mm:ss.SSS"+(e+'[")]'))):"moment.invalid(/* "+this._i+" */)"},"undefined"!=typeof Symbol&&null!=Symbol.for&&(u[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),u.toJSON=function(){return this.isValid()?this.toISOString():null},u.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},u.unix=function(){return Math.floor(this.valueOf()/1e3)},u.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},u.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},u.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},u.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},u.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},u.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-_(n[s].since).year())*e+n[s].offset;return this.year()},u.year=Pe,u.isLeapYear=function(){return be(this.year())},u.weekYear=function(e){return un.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},u.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},u.quarter=u.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},u.month=Ie,u.daysInMonth=function(){return He(this.year(),this.month())},u.week=u.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},u.isoWeek=u.isoWeeks=function(e){var t=Be(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},u.weeksInYear=function(){var e=this.localeData()._week;return N(this.year(),e.dow,e.doy)},u.weeksInWeekYear=function(){var e=this.localeData()._week;return N(this.weekYear(),e.dow,e.doy)},u.isoWeeksInYear=function(){return N(this.year(),1,4)},u.isoWeeksInISOWeekYear=function(){return N(this.isoWeekYear(),1,4)},u.date=ge,u.day=u.days=function(e){var t,n,s;return this.isValid()?(t=Ce(this,"Day"),null!=e?(n=e,s=this.localeData(),e="string"!=typeof n?n:isNaN(n)?"number"==typeof(n=s.weekdaysParse(n))?n:null:parseInt(n,10),this.add(e-t,"d")):t):null!=e?this:NaN},u.weekday=function(e){var t;return this.isValid()?(t=(this.day()+7-this.localeData()._week.dow)%7,null==e?t:this.add(e-t,"d")):null!=e?this:NaN},u.isoWeekday=function(e){var t,n;return this.isValid()?null!=e?(t=e,n=this.localeData(),n="string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t,this.day(this.day()%7?n:n-7)):this.day()||7:null!=e?this:NaN},u.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},u.hour=u.hours=i,u.minute=u.minutes=ce,u.second=u.seconds=we,u.millisecond=u.milliseconds=fe,u.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(ve,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?$t(this,C(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_.updateOffset(this,!0),this._changeInProgress=null)),this},u.utc=function(e){return this.utcOffset(0,e)},u.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e)&&this.subtract(Et(this),"m"),this},u.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(Me,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},u.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?R(e).utcOffset():0,(this.utcOffset()-e)%60==0)},u.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},u.isLocal=function(){return!!this.isValid()&&!this._isUTC},u.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},u.isUtc=At,u.isUTC=At,u.zoneAbbr=function(){return this._isUTC?"UTC":""},u.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},u.dates=e("dates accessor is deprecated. Use date instead.",ge),u.months=e("months accessor is deprecated. Use month instead",Ie),u.years=e("years accessor is deprecated. Use year instead",Pe),u.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),u.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){var e,t;return g(this._isDSTShifted)&&(q(e={},this),(e=Nt(e))._a?(t=(e._isUTC?l:R)(e._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&M(e[a])!==M(t[a]))&&r++;return r+i}(e._a,t.toArray())):this._isDSTShifted=!1),this._isDSTShifted});d=K.prototype;function cn(e,t,n,s){var i=P(),s=l().set(s,t);return i[n](s,e)}function fn(e,t,n){if(w(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=cn(e,i,n,"month");return s}function mn(e,t,n,s){t=("boolean"==typeof e?w(t)&&(n=t,t=void 0):(t=e,e=!1,w(n=t)&&(n=t,t=void 0)),t||"");var i,r=P(),a=e?r._week.dow:0,o=[];if(null!=n)return cn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}d.calendar=function(e,t,n){return a(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},d.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(te).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},d.invalidDate=function(){return this._invalidDate},d.ordinal=function(e){return this._ordinal.replace("%d",e)},d.preparse=hn,d.postformat=hn,d.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return a(i)?i(e,t,n,s):i.replace(/%d/i,e)},d.pastFuture=function(e,t){return a(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},d.set=function(e){var t,n;for(n in e)c(e,n)&&(a(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},d.eras=function(e,t){for(var n,s=this._eras||P("en")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case"string":n=_(s[i].since).startOf("day"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=_(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf();break}}return s},d.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s];break}else if(0<=[r,a,o].indexOf(e))return u[s]},d.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?_(e.since).year():_(e.since).year()+(t-e.offset)*n},d.erasAbbrRegex=function(e){return c(this,"_erasAbbrRegex")||an.call(this),e?this._erasAbbrRegex:this._erasRegex},d.erasNameRegex=function(e){return c(this,"_erasNameRegex")||an.call(this),e?this._erasNameRegex:this._erasRegex},d.erasNarrowRegex=function(e){return c(this,"_erasNarrowRegex")||an.call(this),e?this._erasNarrowRegex:this._erasRegex},d.months=function(e,t){return e?(y(this._months)?this._months:this._months[(this._months.isFormat||Ve).test(t)?"format":"standalone"])[e.month()]:y(this._months)?this._months:this._months.standalone},d.monthsShort=function(e,t){return e?(y(this._monthsShort)?this._monthsShort:this._monthsShort[Ve.test(t)?"format":"standalone"])[e.month()]:y(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},d.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=x.call(this._shortMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))?i:null:"MMM"===t?-1!==(i=x.call(this._shortMonthsParse,e))||-1!==(i=x.call(this._longMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))||-1!==(i=x.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},d.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Ee),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},d.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Ge),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},d.week=function(e){return Be(e,this._week.dow,this._week.doy).week},d.firstDayOfYear=function(){return this._week.doy},d.firstDayOfWeek=function(){return this._week.dow},d.weekdays=function(e,t){return t=y(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"],!0===e?Je(t,this._week.dow):e?t[e.day()]:t},d.weekdaysMin=function(e){return!0===e?Je(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},d.weekdaysShort=function(e){return!0===e?Je(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},d.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=x.call(this._weekdaysParse,e))?i:null:"ddd"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:"dddd"===t?-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:"ddd"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},d.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=et),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},d.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=tt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},d.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},d.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},d.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ft("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===M(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),_.lang=e("moment.lang is deprecated. Use moment.locale instead.",ft),_.langData=e("moment.langData is deprecated. Use moment.localeData instead.",P);var _n=Math.abs;function yn(e,t,n,s){t=C(t,n);return e._milliseconds+=s*t._milliseconds,e._days+=s*t._days,e._months+=s*t._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function pn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}de=kn("ms"),t=kn("s"),ye=kn("m"),he=kn("h"),Fe=kn("d"),_e=kn("w"),me=kn("M"),Qe=kn("Q"),i=kn("y"),ce=de;function Mn(e){return function(){return this.isValid()?this._data[e]:NaN}}var we=Mn("milliseconds"),fe=Mn("seconds"),ge=Mn("minutes"),Pe=Mn("hours"),d=Mn("days"),vn=Mn("months"),Dn=Mn("years");var Yn=Math.round,Sn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function On(e,t,n,s){var i=C(e).abs(),r=Yn(i.as("s")),a=Yn(i.as("m")),o=Yn(i.as("h")),u=Yn(i.as("d")),l=Yn(i.as("M")),d=Yn(i.as("w")),i=Yn(i.as("y")),r=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||(a<=1?["m"]:a<n.m&&["mm",a])||(o<=1?["h"]:o<n.h&&["hh",o])||(u<=1?["d"]:u<n.d&&["dd",u]);return(r=(r=null!=n.w?r||(d<=1?["w"]:d<n.w&&["ww",d]):r)||(l<=1?["M"]:l<n.M&&["MM",l])||(i<=1?["y"]:["yy",i]))[2]=t,r[3]=0<+e,r[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,r)}var bn=Math.abs;function Tn(e){return(0<e)-(e<0)||+e}function xn(){var e,t,n,s,i,r,a,o,u,l,d;return this.isValid()?(e=bn(this._milliseconds)/1e3,t=bn(this._days),n=bn(this._months),(o=this.asSeconds())?(s=m(e/60),i=m(s/60),e%=60,s%=60,r=m(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",u=Tn(this._months)!==Tn(o)?"-":"",l=Tn(this._days)!==Tn(o)?"-":"",d=Tn(this._milliseconds)!==Tn(o)?"-":"",(o<0?"-":"")+"P"+(r?u+r+"Y":"")+(n?u+n+"M":"")+(t?l+t+"D":"")+(i||s||e?"T":"")+(i?d+i+"H":"")+(s?d+s+"M":"")+(e?d+a+"S":"")):"P0D"):this.localeData().invalidDate()}var U=Ct.prototype;return U.isValid=function(){return this._isValid},U.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},U.add=function(e,t){return yn(this,e,t,1)},U.subtract=function(e,t){return yn(this,e,t,-1)},U.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=o(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+wn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(pn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},U.asMilliseconds=de,U.asSeconds=t,U.asMinutes=ye,U.asHours=he,U.asDays=Fe,U.asWeeks=_e,U.asMonths=me,U.asQuarters=Qe,U.asYears=i,U.valueOf=ce,U._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*gn(pn(n)+t),n=t=0),s.milliseconds=e%1e3,e=m(e/1e3),s.seconds=e%60,e=m(e/60),s.minutes=e%60,e=m(e/60),s.hours=e%24,t+=m(e/24),n+=e=m(wn(t)),t-=gn(pn(e)),e=m(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},U.clone=function(){return C(this)},U.get=function(e){return e=o(e),this.isValid()?this[e+"s"]():NaN},U.milliseconds=we,U.seconds=fe,U.minutes=ge,U.hours=Pe,U.days=d,U.weeks=function(){return m(this.days()/7)},U.months=vn,U.years=Dn,U.humanize=function(e,t){var n,s;return this.isValid()?(n=!1,s=Sn,"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof t&&(s=Object.assign({},Sn,t),null!=t.s)&&null==t.ss&&(s.ss=t.s-1),e=this.localeData(),t=On(this,!n,s,e),n&&(t=e.pastFuture(+this,t)),e.postformat(t)):this.localeData().invalidDate()},U.toISOString=xn,U.toString=xn,U.toJSON=xn,U.locale=Xt,U.localeData=Kt,U.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",xn),U.lang=Ke,s("X",0,0,"unix"),s("x",0,0,"valueOf"),h("x",ke),h("X",/[+-]?\d+(\.\d{1,3})?/),v("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),v("x",function(e,t,n){n._d=new Date(M(e))}),_.version="2.30.1",H=R,_.fn=u,_.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},_.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},_.now=function(){return Date.now?Date.now():+new Date},_.utc=l,_.unix=function(e){return R(1e3*e)},_.months=function(e,t){return fn(e,t,"months")},_.isDate=V,_.locale=ft,_.invalid=I,_.duration=C,_.isMoment=k,_.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},_.parseZone=function(){return R.apply(null,arguments).parseZone()},_.localeData=P,_.isDuration=Ut,_.monthsShort=function(e,t){return fn(e,t,"monthsShort")},_.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},_.defineLocale=mt,_.updateLocale=function(e,t){var n,s;return null!=t?(s=ut,null!=W[e]&&null!=W[e].parentLocale?W[e].set(X(W[e]._config,t)):(t=X(s=null!=(n=ct(e))?n._config:s,t),null==n&&(t.abbr=e),(s=new K(t)).parentLocale=W[e],W[e]=s),ft(e)):null!=W[e]&&(null!=W[e].parentLocale?(W[e]=W[e].parentLocale,e===ft()&&ft(e)):null!=W[e]&&delete W[e]),W[e]},_.locales=function(){return ee(W)},_.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},_.normalizeUnits=o,_.relativeTimeRounding=function(e){return void 0===e?Yn:"function"==typeof e&&(Yn=e,!0)},_.relativeTimeThreshold=function(e,t){return void 0!==Sn[e]&&(void 0===t?Sn[e]:(Sn[e]=t,"s"===e&&(Sn.ss=t-1),!0))},_.calendarFormat=function(e,t){return(e=e.diff(t,"days",!0))<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},_.prototype=u,_.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},_});
//# sourceMappingURL=moment.min.js.map;
/*
 *  Vanilla Javascript timepicker that allows setting of minTime and maxTime
 *
 *        View below code for a list of available methods
 *
 *  Developer: Lance Jernigan
 *  Version: 1.0.4
 *
 */


/*
 *  Setup our arguments to pass to our timepicker
 *
 *  @args - format (boolean) - Whether to format the input value or leave in 24 hour
 *          minTime (string) - Minimum time the timepicker should reach (any valid time string Javascript's Date() will accept)
 *          maxTime (string) - Maximum time the timepicker should reach (any valid time string Javascript's Date() will accept)
 *          meridiem (boolean) - Whether the timepicker should display the meridiem (defaults to true if format is true and false if format is false)
 *          arrowColor (string) - Any valid color (Hex, RGB, RGBA, etc.) to use for the arrows
 *
 */

define('wickedpicker',['jquery', 'vendor/moment'],
    function($, moment) {

        'use strict';

        if (document.querySelector('input[data-el="timepicker"]') != null) {

            var args = {
                // format: true,
                //minTime: '02:00 am'
                    // maxTime: '1:00 pm',
                    // meridiem: false
            }

            /*
             *  Create a new timepicker for our input and pass it our args
             */

            $('input[data-el="timepicker"]').each(function() {

                if ($(this).attr('time-options') != null && $(this).attr('time-options') != '') {
                    new timepicker(this, JSON.parse($(this).attr('time-options')));    
                } else {
                    new timepicker(this, args);
                }

                
            });

            //var tpicker = new timepicker(document.querySelector('input[data-el="timepicker"]'), args)

            /*
             *  Starts our Timepicker Functionality
             */

            function timepicker(element, args) {

                this.initialized = false
                this.element = null
                this.elements = {}
                this.timepicker = null
                this.time = new Date()
                this.holdertime = new Date()
                this.settings = {
                    format: true,
                    meridiem: true,
                    minTime: new Date(new Date().toDateString() + ' 00:00'),
                    maxTime: new Date(new Date(new Date(this.holdertime.setDate(this.holdertime.getDate() + 1))).toDateString() + " 00:00"),
                    onChange: false
                }
                this.active = false

                this.updateSettings = function(args) {

                    args = args || {}

                    for (var a = 0; a < Object.keys(args).length; a++) {

                        var key = Object.keys(args)[a]
                        var val = args[Object.keys(args)[a]]

                        this.settings[key] = args[Object.keys(args)[a]]

                    }

                    if (!this.settings.format && typeof args.meridiem == 'undefined') {

                        this.settings.meridiem = false

                    }

                    this.settings.meridiem = this.settings.format ? true : this.settings.meridiem
                    this.settings.minTime = !(this.settings.minTime.getDate !== undefined || this.settings.minTime.getDate !== null) ? new Date(new Date().toDateString() + ' ' + this.settings.minTime) : new Date(new Date().toDateString() + ' 00:00')
                    this.settings.maxTime = !(this.settings.maxTime.getDate !== undefined || this.settings.maxTime.getDate !== null) ? new Date(new Date().toDateString() + ' ' + this.settings.maxTime) : this.settings.maxTime

                    if (this.settings.maxTime.toString() == this.settings.minTime.toString()) {

                        var maxTime = new Date(this.settings.minTime)

                        maxTime.setHours(maxTime.getHours() + 24)

                        this.settings.maxTime = maxTime

                    }

                    if (this.element.value) {

                        var newTime = new Date(new Date().toDateString() + ' ' + this.element.value)

                        this.time = !isNaN(newTime.getTime()) ? newTime : this.time

                    }

                    this.time.setMilliseconds(0)

                    if (Object.keys(this.elements).length) {

                        this.updateTime('minute', true, 0)

                        this.render()

                    }

                    if (!this.validateTime()) {

                        this.time = this.settings.minTime ? this.settings.minTime : this.settings.maxTime

                    }

                }

                this.buildTimepicker = function() {

                    var wrapper = document.createElement('div')
                    var elements = ['hour', 'minute', 'meridiem']

                    wrapper.className = 'timepicker__wrapper'
                    wrapper.setAttribute('id', 'tp_' + (Math.floor(Math.random() * 100) + 1))

                    if (!Object.keys(this.elements).length) {

                        for (var e = 0; e < elements.length; e++) {

                            this.elements[elements[e]] = document.createElement('div')
                            this.elements[elements[e]].className = 'timepicker__' + elements[e]

                            var up = document.createElement('div')
                            up.appendChild(document.createElement('div'))
                            var display = document.createElement('p')
                            var down = document.createElement('div')
                            down.appendChild(document.createElement('div'))

                            up.className = 'timepicker__button timepicker__button__up'
                            display.className = 'display'
                            down.className = 'timepicker__button timepicker__button__down'

                            if (this.settings.arrowColor) {

                                up.childNodes[0].style['border-bottom-color'] = this.settings.arrowColor
                                down.childNodes[0].style['border-top-color'] = this.settings.arrowColor

                            }

                            this.elements[elements[e]].appendChild(up)
                            this.elements[elements[e]].appendChild(display)
                            this.elements[elements[e]].appendChild(down)

                        }

                    }

                    this.timepicker = wrapper

                    this.element.parentNode.insertBefore(wrapper, this.element.nextSibling)

                    this.addListeners()

                    this.render()

                }

                this.render = function() {

                    var wrapper = this.cleanWrapper(this.timepicker)

                    if (this.settings.meridiem) {

                        wrapper.className = wrapper.className.indexOf(' timepicker__wrapper-full') >= 0 ? wrapper.className : wrapper.className + ' timepicker__wrapper-full'

                    }

                    for (var e = 0; e < Object.keys(this.elements).length; e++) {

                        var key = Object.keys(this.elements)[e]
                        var element = this.elements[key]
                        var func = 'get' + key.charAt(0).toUpperCase() + key.slice(1)

                        element.querySelector('.display').innerText = this[func]()

                        if (Object.keys(this.elements)[e] == 'meridiem' && !this.settings.meridiem) {

                            continue

                        }

                        wrapper.appendChild(element)

                    }

                    this.timepicker = wrapper

                    this.updateInput()

                    var $close = $('.timepicker__wrapper').closest('.form-field').find('.form-field__input').attr('data-close');

                    $('.timepicker__wrapper').append('<div class="timepicker--close" role="button">' + $close + '</div>');

                    $('.timepicker--close').each(function() {
                        $(this).off('click.time').on('click.time', function() {
                            var $wrapper = $(this).closest('.timepicker__wrapper');

                            setTimeout(function () {
                                $wrapper.removeClass('timepicker__wrapper-active');
                            }, 50);
                        });
                    });

                }

                this.cleanWrapper = function(wrapper) {

                    while (wrapper.hasChildNodes()) {

                        wrapper.removeChild(wrapper.lastChild)

                    }

                    return wrapper

                }

                this.handleClick = function(e) {

                    var element = e.currentTarget

                    var parent = element.parentNode.className.replace('timepicker__', '')
                    var add = element.className.indexOf('up') !== -1 ? true : false

                    this.updateTime(parent, add)

                }

                this.validateInput = function(e) {

                    var value = e.currentTarget.value
                    var date = value.length ? new Date(new Date().toDateString() + ' ' + value.replace('مساءً', 'pm').replace('صباحاً', 'am')) : false

                    if (date && !isNaN(date.getTime())) {

                        this.time = date

                    }

                    if (!this.validateTime()) {

                        var after = date.getTime() > this.settings.maxTime.getTime()
                        date = after ? new Date(this.settings.maxTime) : new Date(this.settings.minTime)
                        after ? date.setMinutes(date.getMinutes() - 1) : date.setMinutes(date.getMinutes() + 1)

                        this.time = date

                    }

                    this.render()

                }

                this.updateTime = function(method, add, amount) {

                    var amount = amount || 1

                    switch (method) {

                        case 'meridiem':

                            this.time.getHours() > 12 ? this.time.setHours(this.time.getHours() - 12) : this.time.setHours(this.time.getHours() + 12)

                            break

                        default:

                            if (add) {

                                this.add(method, amount)

                            } else {

                                this.subtract(method, amount)

                            }

                    }

                    if (!this.validateTime()) {

                        var date = add ? new Date(this.settings.minTime) : new Date(this.settings.maxTime)
                        add ? date.setMinutes(date.getMinutes() + 1) : date.setMinutes(date.getMinutes() - 1)

                        this.time = date

                    }

                    this.render()

                }

                this.add = function(method, amount) {

                    var amount = amount || 1

                    switch (method) {

                        case 'minute':

                            this.time.setMinutes(this.time.getMinutes() + amount)

                            break

                        case 'hour':

                            this.time.setHours(this.time.getHours() + amount)

                            break

                    }

                }

                this.subtract = function(method, amount) {

                    var amount = amount || 1

                    switch (method) {

                        case 'minute':

                            this.time.setMinutes(this.time.getMinutes() - amount)

                            break

                        case 'hour':

                            this.time.setHours(this.time.getHours() - amount)

                            break

                    }

                }

                this.validateTime = function() {

                    if (this.settings.minTime) {

                        this.settings.maxTime = this.settings.maxTime

                        this.time.setDate(new Date().getDate())

                        return this.time.getTime() < this.settings.maxTime.getTime() && this.time.getTime() > this.settings.minTime.getTime()

                    }

                    return true

                }

                this.updateInput = function(parent) {

                    if (this.initialized) {

                        this.element.value = this.buildString()

                    }

                }

                this.buildString = function() {

                    return (this.getHour() + ":" + this.getMinute() + ' ' + this.getMeridiem()).trim()

                }

                this.toggleActive = function(e) {

                    if (e.target == this.element) {

                        if (!this.initialized) {

                            this.initialized = true

                            this.updateInput()

                        }

                        this.updateBounds(this.timepicker, e.target)

                        this.active = true

                    } else if (e.target.className.indexOf('timepicker__') == -1 && e.target.parentElement.className.indexOf('timepicker__') == -1) {

                        this.active = false

                    }

                    this.timepicker.className = this.active ? this.timepicker.className.indexOf(' timepicker__wrapper-active') >= 0 ? this.timepicker.className : this.timepicker.className + ' timepicker__wrapper-active' : this.timepicker.className.replace(' timepicker__wrapper-active', '')

                }

                this.updateBounds = function() {

                    var bounds = this.element.getBoundingClientRect()

                    this.timepicker.style.top = this.element.offsetTop + this.element.innerHeight + 'px'
                    this.timepicker.style.width = bounds.width + 'px'

                }

                this.addListeners = function() {

                    var elements = Object.keys(this.elements)

                    for (var e = 0; e < elements.length; e++) {

                        var element = this.elements[elements[e]]
                        var buttons = [].slice.call(element.childNodes).filter(function(node) {

                            return node.className.indexOf('button') !== -1

                        })

                        for (var c = 0; c < buttons.length; c++) {

                            var button = buttons[c]

                            button.addEventListener('click', this.handleClick.bind(this))

                        }

                    }

                    this.element.addEventListener('change', this.validateInput.bind(this))
                    document.body.addEventListener('click', this.toggleActive.bind(this))
                    window.addEventListener('resize', this.updateBounds.bind(this))

                }

                this.getTime = function() {
                    return this.time
                }

                this.getHour = function() {

                    if (!this.settings.format) {

                        return this.time.getHours() < 10 ? '0' + this.time.getHours() : this.time.getHours()

                    } else {

                        return this.time.getHours() > 12 ? this.time.getHours() % 12 : this.time.getHours() == 0 ? 12 : this.time.getHours()

                    }

                }

                this.getMinute = function() {

                    var minutes = this.time.getMinutes()

                    return minutes < 10 ? '0' + minutes : minutes

                }

                this.getMeridiem = function() {

                    if (!this.settings.meridiem) {

                        return ''

                    } else {
                        if ($('html').attr('dir') == "rtl") {
                            return this.time.getHours() >= 12 ? 'مساءً' : 'صباحاً'
                        } else {
                            return this.time.getHours() >= 12 ? 'pm' : 'am'
                        };
                    }

                }

                this.init = function() {

                    if (element.length) {

                        console.warn('Timepicker selector must be for a specific element, not a list of elements.')

                        return

                    }

                    this.element = element

                    this.updateSettings(args)
                    this.buildTimepicker()

                }

                this.init()

            }

            /*
             *  Timepicker Methods
             *
             *  updateSettings()
             *
             *     Update the settings originally passed to your timepicker
             *
             *     @parameters - args (a list of available arguments is provided above the code)
             *
             *
             *  updateTime()
             *
             *     Update the time based on parameters passed
             *
             *     @parameters - method (string) - What method to affect ('hour', 'minute', 'meridiem')
             *                   add (boolean) - True to add amount, false to subtract amount
             *                   amount /optional/ (number) - Number to add or subtract from method (defaults to 1)
             *
             *
             *  add()
             *
             *     Add amount to selected method
             *
             *     @parameters - method (string) - What method to affect ('hour', 'minute')
             *                   amount /optional/ (number) - Number to add to method (defaults to 1)
             *
             *
             *  subtract()
             *
             *     subtract amount from selected method
             *
             *     @parameters - method (string) - What method to affect ('hour', 'minute')
             *                   amount /optional/ (number) - Number to subtract from method (defaults to 1)
             *
             *
             *  buildString()
             *
             *     Returns the string that will be sent to the input
             *
             *
             *  getTime()
             *
             *     Returns the date object for the current selected time
             *
             *
             *  getHour()
             *
             *     Returns the current hour for the timepicker
             *
             *
             *  getMinute()
             *
             *     Returns the current Minute for the timepicker
             *
             *
             *  getMeridiem()
             *
             *     Returns the current Meridiem for the timepicker
             *
             *
             *  get
             */
            //tpicker.updateSettings({ minTime: '2:00 am' })
        }

        // $('.timepicker__wrapper').append('<div class="timepicker--close" role="button"><span class="aria-only">close</span></div>');

        // $('.timepicker--close').each(function() {
        //     $(this).off('click.time').on('click.time', function() {
        //         var $wrapper = $(this).closest('.timepicker__wrapper');

        //         setTimeout(function () {
        //             $wrapper.removeClass('timepicker__wrapper-active');
        //         }, 50);
        //     });
        // });

    });

define('form',['jquery', 'lib/utils', 'form-validation', 'pickerdate', 'select2', 'tooltipster', 'numeral', 'picker', 'wickedpicker'],
    function($, utils, FormValidation, select2, tooltipster, wickedpicker) {

        'use strict';

        var Form = function($form) {

            this.$form = $form;
        };


        Form.prototype.init = function() {

            var _this = this,
                $textareas = this.$form.find('[ data-textarea ]'),
                $datepickersFuture = this.$form.find('[ data-el="datepicker-future" ]'),
                $datepickersPast = this.$form.find('[ data-el="datepicker-past" ]'),
                $datepickersBinded = this.$form.find('.form-field__input--datepicker-binded'),
                $datepickers = this.$form.find('[ data-el="datepicker" ]'),
                $monthpickers = this.$form.find('[ data-el="monthpicker" ]'),
                $monthpickersGeneral = this.$form.find('[ data-el="monthpicker-general" ]'),
                $months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
                $shortMonths = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
                $datepickersWffm = this.$form.find('[data-el="datepicker-wffm" ]'),
                $dp,
                dpOptions,
                dpMax,
                dpLabelId,
                $uploaders = $('[ data-uploader-field ]'),
                $previewRemovers = this.$form.find('[ data-uploader-remove ]'),
                $checkboxToggles = this.$form.find('[ data-checkbox-toggle ]'),
                $selectToggle = this.$form.find('[data-select-toggle]'),
                $legendToggleTarget = this.$form.find('[data-toggle-target]'),
                $termsCheckbox = this.$form.find('[ data-checkbox-terms ]'),
                $formDataTablePost = this.$form.find('[data-table-post]'),
                $formDataTable = this.$form.find('[data-table-form]'),
                $fakecbox2 = $('.form-field--fakecbox2_input'),
                $collapsable = $('.fieldset--collapsable'),
                $checkboxToggle = $('.form-field__input--checkbox--toggle'),
                $select_Toggle = $('.form-field__input--select--toggle'),
                $radioToggle = $('.form-field__radio--toggle'),
                $ratingstar = $('.form-field--ratingstar'),
                $inputBinding = $('.form-field__input--text-binded'),
                $tooltip = $('.form-field__label--tooltip'),
                $tooltip2 = $('.form-dynamic-tooltip'),
                $otp = $('.form-field__input--otp'),
                $hasLimits = $('[data-cbox-max]'),
                $password = $('.form-field__input--password'),
                $passShowHide = $('.form-field__label-password-visibility'),
                defaultOpts = {
                    closeOnSelect: true,
                    format: 'dd mmmm yyyy',
                    formatSubmit: 'dd mmmm yyyy',
                    onStart: function() {
                        // set default date
                        var $dp = this.$node,
                            date;

                        if ($dp.data('initial-date')) {
                            date = new Date($dp.data('initial-date'));
                            this.set('select', [date.getFullYear(), date.getMonth(), date.getDate()]);
                        }
                    },
                    onOpen: function() {
                        _this.scrollIntoView(this.$node);
                    },
                    onClose: function() {
                        this.component.$node.parsley().validate();
                    }
                };

            // arabic translations
            if (utils.isRTL()) {
                defaultOpts.monthsFull = ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'];
                $shortMonths = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
                defaultOpts.monthsShort = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
                defaultOpts.weekdaysShort = ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'];
                defaultOpts.today = 'اليوم';
                defaultOpts.clear = 'مسح';
                defaultOpts.close = 'مغلق';
                defaultOpts.labelMonthNext = 'الشهر القادم';
                defaultOpts.labelMonthPrev = 'الشهر السابق';
                defaultOpts.labelMonthSelect = 'اختر الشهر';
                defaultOpts.labelYearSelect = 'اختر السنة';
                defaultOpts.format = 'dd mmmm yyyy';
                defaultOpts.formatSubmit = 'dd mmm yyyy';
            };

            /////////////////////
            ///START DRAG&DROP///
            /////////////////////

            $('[data-dropupload]').each(function() {
                var $dropzone = $(this);

                $dropzone.off('drop.file').on('drop.file', function(event) {
                    dragupload($dropzone, event);
                });

                $dropzone.find('.form-field__input--upload').off('change.file').on('change.file', function(event) {
                    dragupload($dropzone, event);
                });

                $dropzone.off('dragover.file').on('dragover.file', function(event) {
                    event.preventDefault();

                    $(this).addClass('drag');
                });

                $dropzone.off('dragleave.file').on('dragleave.file', function(event) {
                    event.preventDefault();

                    $(this).removeClass('drag');
                });
            });

            var dragupload = function(uploader, event) {
                var $this = $(uploader),
                    $input = $(uploader).find('input'),
                    $fcont = $(uploader).closest('.form-field').find('.form-field--upload_dzfiles'),
                    // $fcont = $('[data-uploader-filecontainer="' + $input.attr('id') + '"]'),
                    types = JSON.parse('[' + $input.attr('data-accepts').toLowerCase() + ']'),
                    isMutiple = $input.prop('multiple'),
                    maxSize = parseInt($input.attr('data-size')),
                    previewPath = $input.attr('data-preview'),
                    word = ['doc', 'docx'],
                    excel = ['xls', 'xlsx'],
                    pdf = ['pdf'],
                    img = ['png', 'jpg', 'jpeg', 'gif', 'svg', 'webp', 'bmp'],
                    uploadicons = JSON.parse($input.attr('data-upload-icons')),
                    maxfilecount = ($input.attr('data-max-file') != undefined && $input.attr('data-max-file') != '') ? parseInt($input.attr('data-max-file')) : 99999,
                    fileError = 0,
                    fileSize = 0,
                    inputID = '',
                    fileList,
                    sizeError = false,
                    willRender = $this.hasClass('display-attachment-none') ? false : true,
                    countError = false;

                event.preventDefault();

                if ($input.data('fileList') == undefined) {
                    fileList = [];
                } else {
                    fileList = $input.data('fileList');
                }

                //console.log(previewPath)
                if (event.originalEvent != undefined) {
                    if (event.originalEvent.dataTransfer != undefined) {
                        for (var i = 0; i < event.originalEvent.dataTransfer.items.length; i++) {
                            if (event.originalEvent.dataTransfer.items[i].kind === 'file') {
                                var file = event.originalEvent.dataTransfer.items[i].getAsFile(),
                                    ext = file.name.replace(/^.*\./, '').toLowerCase(),
                                    extimg;

                                if (types.indexOf(ext) != -1) {
                                    if (file.size > maxSize) {
                                        sizeError = true
                                    }
                                } else {
                                    fileError++;
                                };
                            };
                        };

                        if (!isMutiple) {
                            countError = event.originalEvent.dataTransfer.items.length > 1;
                        } else {
                            countError = event.originalEvent.dataTransfer.items.length > (maxfilecount - $fcont.find('.form-field--upload--details').length);
                        };

                        // sizeError = fileSize > maxSize;

                        $this.closest('.form-field--upload').find('[data-uploader-format-error]').hide();
                        $this.closest('.form-field--upload').find('[data-uploader-size-error]').hide();
                        $this.closest('.form-field--upload').find('[data-uploader-count-error]').hide();

                        if (fileError == 0 && !countError && !sizeError && !$input.prop('disabled')) {
                            $input[0].files = event.originalEvent.dataTransfer.files;

                            //$fcont.html('')

                            //$fcont.append('<div class="button--upload_remove" data-dropupload-remove="true"></div>')

                            for (var j = 0; j < event.originalEvent.dataTransfer.items.length; j++) {
                                if (event.originalEvent.dataTransfer.items[j].kind === 'file') {
                                    var file = event.originalEvent.dataTransfer.items[j].getAsFile(),
                                        fileID = utils.uniqueID(),
                                        ext1 = file.name.split('.').pop();

                                    file.id = fileID;
                                    fileList.push(file);

                                    if (word.indexOf(ext1) != -1) {
                                        extimg = uploadicons.word
                                    } else if (pdf.indexOf(ext1) != -1) {
                                        extimg = uploadicons.pdf
                                    } else if (excel.indexOf(ext1) != -1) {
                                        extimg = uploadicons.excel
                                    } else if (img.indexOf(ext1) != -1) {
                                        extimg = uploadicons.img
                                    } else {
                                        extimg = uploadicons.misc
                                    }

                                    if (willRender) {
                                        $fcont.append('<div class="form-field--upload--details" data-uploader-item-id="' + $input.attr('id') + '"><div style="display: flex;align-items:center"><div class="form-field__input--upload-filetype" data-uploader-filetype="' + $input.attr('id') + '" style="display: flex;"><img src="' + extimg + '"></div><div><p class="form-field__input--upload-filename" data-uploader-filename="' + $input.attr('id') + '" style="">' + file.name + '</p><div class="form-field__input--upload-filesize hidden" data-uploader-filesize="' + $input.attr('id') + '" style="display: block;"><span data-totalsize="' + $input.attr('id') + '">' + numeral(file.size / 1000).format('00.') + '</span>kB</div></div></div><button class="button--upload_remove hidden" data-dropupload-remove="' + $input.attr('id') + '" style="display: inline-block;"><span class="aria-only">Remove</span></button><div class="form-field__input--upload-filesize_barouter"><div class="form-field__input--upload-filesize_bar"><div class="form-field__input--upload-filesize_green"></div></div><div class="form-field__input--upload-filesize_rate"><span>0</span>%</div></div></div>');

                                        $fcont.find('.form-field__input--upload-filesize').not('.uploaded').each(function() {
                                            var tick = (parseInt($(this).attr('data-uploader-size')) / 1000) / 75,
                                                $filesize = $(this),
                                                $filesizeRate = $filesize.closest('.form-field--upload--details').find('.form-field__input--upload-filesize_rate span'),
                                                $rate = 0;

                                            $(this).fadeIn();

                                            setTimeout(function() {
                                                $filesize.closest('.form-field--upload--details').find('.form-field__input--upload-filesize_green').css('width', '100%');

                                                var interval = setInterval(function() {
                                                    if ($rate <= 100) {
                                                        $filesizeRate.text($rate);
                                                        $rate++;
                                                    } else {
                                                        clearInterval(interval);
                                                    }
                                                }, 20);
                                            }, 400);
                                            setTimeout(function() {
                                                $filesize.closest('.form-field--upload--details').find('.form-field__input--upload-filesize_barouter').fadeOut();
                                            }, 2400)
                                            $(this).addClass('uploaded');
                                        });
                                    }
                                }
                            }
                            $input.trigger('change');
                            $input.trigger('focusout');
                            $input.trigger('uploadchange');
                            //$input.data('fileList', fileList);
                        } else {
                            if (fileError != 0) {
                                //console.log('file type error');
                                $this.closest('.form-field--upload').find('[data-uploader-format-error]').show();
                            }
                            if (sizeError) {
                                //console.log('file size error');
                                $this.closest('.form-field--upload').find('[data-uploader-size-error]').show();
                            }
                            if (countError) {
                                //console.log('file count error');
                                $this.closest('.form-field--upload').find('[data-uploader-count-error]').show();
                            }
                        };
                        if (sizeError) {
                            //console.log('file size error');
                            $this.closest('.form-field--upload').find('[data-uploader-size-error]').show();
                        }
                    } else {
                        for (var i = 0; i < $input[0].files.length; i++) {
                            //if (event.originalEvent.dataTransfer.items[i].kind === 'file') {
                            var file = $input[0].files[i],
                                ext = file.name.replace(/^.*\./, '').toLowerCase();

                            if (types.indexOf(ext) != -1) {
                                if (file.size > maxSize) {
                                    sizeError = true
                                }
                            } else {
                                fileError++;
                            };
                            //};
                        };

                        if (!isMutiple) {
                            countError = $input[0].files.length > 1;
                        } else {
                            countError = $input[0].files.length > (maxfilecount - $fcont.find('.form-field--upload--details').length);
                        };

                        // sizeError = fileSize > maxSize;

                        $this.closest('.form-field--upload').find('[data-uploader-format-error]').hide();
                        $this.closest('.form-field--upload').find('[data-uploader-size-error]').hide();
                        $this.closest('.form-field--upload').find('[data-uploader-count-error]').hide();

                        //console.log(fileError == 0 && !sizeError && !countError)

                        if (fileError == 0 && !countError && !sizeError && !$input.prop('disabled')) {
                            //$input[0].files = event.originalEvent.dataTransfer.files;

                            if (!isMutiple) {
                                $fcont.html('')
                            }

                            //$fcont.append('<div class="button--upload_remove" data-dropupload-remove="true"></div>')

                            for (var j = 0; j < $input[0].files.length; j++) {
                                //if ($input[0].files[j].kind === 'file') {
                                var file = $input[0].files[j],
                                    ext1 = file.name.split('.').pop();

                                if (word.indexOf(ext1) != -1) {
                                    extimg = uploadicons.word
                                } else if (pdf.indexOf(ext1) != -1) {
                                    extimg = uploadicons.pdf
                                } else if (excel.indexOf(ext1) != -1) {
                                    extimg = uploadicons.excel
                                } else if (img.indexOf(ext1) != -1) {
                                    extimg = uploadicons.img
                                } else {
                                    extimg = uploadicons.misc
                                }

                                if (willRender) {
                                    $fcont.append('<div class="form-field--upload--details" data-uploader-item-id="' + $input.attr('id') + '"><div style="display: flex;align-items:center"><div class="form-field__input--upload-filetype" data-uploader-filetype="' + $input.attr('id') + '" style="display: flex;"><img src="' + extimg + '"></div><div><p class="form-field__input--upload-filename" data-uploader-filename="' + $input.attr('id') + '" style="">' + file.name + '</p><div class="form-field__input--upload-filesize hidden" data-uploader-filesize="' + $input.attr('id') + '" style="display: block;"><span data-totalsize="' + $input.attr('id') + '">' + numeral(file.size / 1000).format('00.') + '</span>kB</div></div></div><button class="button--upload_remove hidden" data-dropupload-remove="' + $input.attr('id') + '" style="display: inline-block;"><span class="aria-only">Remove</span></button><div class="form-field__input--upload-filesize_bar"><div class="form-field__input--upload-filesize_green"></div></div></div>');

                                    $fcont.find('.form-field__input--upload-filesize').not('.uploaded').each(function() {
                                        var tick = (parseInt($(this).attr('data-uploader-size')) / 1000) / 75,
                                            $filesize = $(this),
                                            $filesizeRate = $filesize.closest('.form-field--upload--details').find('.form-field__input--upload-filesize_rate span'),
                                            $rate = 0;

                                        $(this).fadeIn();

                                        setTimeout(function() {
                                            $filesize.closest('.form-field--upload--details').find('.form-field__input--upload-filesize_green').css('width', '100%');

                                            var interval = setInterval(function() {
                                                if ($rate <= 100) {
                                                    $filesizeRate.text($rate);
                                                    $rate++;
                                                } else {
                                                    clearInterval(interval);
                                                }
                                            }, 20);
                                        }, 400);
                                        setTimeout(function() {
                                            $filesize.closest('.form-field--upload--details').find('.form-field__input--upload-filesize_barouter').fadeOut();
                                        }, 2400)
                                        $(this).addClass('uploaded');
                                    });
                                }

                                // $fcont.find('.form-field__input--upload-filesize').each(function() {
                                //     var tick = (parseInt($(this).attr('data-uploader-size')) / 1000) / 75,
                                //         $filesize = $(this),
                                //         $rate = 0;

                                //     $(this).fadeIn();
                                //     $(this).find('.form-field__input--upload-filesize_green').css('width', '100%');
                                //     setTimeout(function() {
                                //         $filesize.find('.form-field__input--upload-filesize_barouter').fadeOut();
                                //     }, 2000)
                                // });
                                //}
                            }
                            $input.trigger('uploadchange');
                            $input.trigger('focusout');
                        } else {
                            if (fileError != 0) {
                                //console.log('file type error');
                                $this.closest('.form-field--upload').find('[data-uploader-format-error]').show();
                            }
                            if (sizeError) {
                                //console.log('file size error');
                                $this.closest('.form-field--upload').find('[data-uploader-size-error]').show();
                            }
                            if (countError) {
                                //console.log('file count error');
                                $this.closest('.form-field--upload').find('[data-uploader-count-error]').show();
                            }
                        };
                        if (sizeError) {
                            //console.log('file size error');
                            $this.closest('.form-field--upload').find('[data-uploader-size-error]').show();
                        }
                    };
                    $(uploader).removeClass('drag');
                };

                //console.log($('[data-dropupload-remove="' + $input.attr('id') + '"]'))

                $('[data-dropupload-remove="' + $input.attr('id') + '"]').off('click.drag').on('click.drag', function(event) {
                    event.preventDefault();
                    var removeID = $(this).attr('data-dropupload-remove');

                    if (!$(this).closest('.form-field--upload_dzfiles').hasClass('nodelete')) {

                        $(this).closest('.form-field--upload--details[data-uploader-item-id="' + removeID + '"]').remove();

                    };

                    fileList = fileList.filter(function(file) {

                        //console.log(file.id + ': ' + removeID)

                        return file.id !== removeID;
                    });
                    //console.log(fileList)
                    $input.data('fileList', fileList);
                });
            };

            ///////////////////
            ///END DRAG&DROP///
            ///////////////////


            //for checkbox keyboard
            $('.form-field__input--checkbox').on('keypress', function(event) {
                if (event.keyCode == 13) {
                    $(this).click()
                }
            })

            //for dynamic form
            if (_this.$form.hasClass('form-dynamic')) {
                var $sections = _this.$form.find('.form-dynamic-section');

                $sections.each(function() {
                    var $inputs = $(this).find('input'),
                        $thisSection = $(this);

                    $inputs.each(function() {
                        $(this).off('change.dynamic, focusout.dynamic').on('change.dynamic, focusout.dynamic', function() {
                            var errors = 0,
                                incomplete = 0;

                            setTimeout(function() {
                                $inputs.each(function() {
                                    if (!$(this).parsley().isValid() && $(this).closest('.form-field').css('display') != 'none') {
                                        errors++;
                                    };
                                });

                                if (errors == 0 && $thisSection.hasClass('current')) {
                                    $thisSection.removeClass('current');
                                    $thisSection.next('.form-dynamic-section').addClass('active');
                                    $thisSection.next('.form-dynamic-section').addClass('current');
                                };

                                $sections.each(function() {
                                    if (!$(this).hasClass('active')) {
                                        incomplete++;
                                    };
                                });

                                if (incomplete == 0) {
                                    _this.$form.find('button.button.disabled').attr('disabled', false);
                                    _this.$form.find('button.button.disabled').removeClass('disabled');
                                };
                            }, 100);
                        })
                    })
                });
            };

            $monthpickersGeneral.each(function () {
                $(this).datepicker({
                    view: 'months',
                    minView: 'months',
                    dateFormat: 'MM yyyy',
                    autoClose: true,
                    language: utils.isRTL() ? 'ar' : 'en',       // Automatically close the picker after selection
                    onSelect: function (formattedDate, date) {
                        $(this).val(formattedDate); // Update the input field with the selected month
                    }
                })
            })

            //for cbox limiting
            $hasLimits.each(function() {
                var $parent = $(this),
                    limit = parseInt($(this).attr('data-cbox-max')),
                    $cboxs = $(this).find('.form-field__input--checkbox');

                $cboxs.each(function() {
                    $(this).off('click.limit').on('click.limit', function(event) {
                        if (!($parent.find('.form-field__input--checkbox:checked').length <= limit) && $(this).prop('checked')) {
                            event.preventDefault();
                        };
                    });
                })
            });

            //for tooltip
            $tooltip.each(function() {
                if (!$(this).hasClass('tooltipstered')) {
                    var text = $(this).attr('tooltip-text');

                    $(this).tooltipster({
                        content: text,
                        maxWidth: 250,
                        arrow: false,
                        contentAsHTML: true
                    });
                };
            });

            //for tooltip
            $tooltip2.each(function() {
                if (!$(this).hasClass('tooltipstered')) {
                    var text = $(this).attr('tooltip-text');

                    $(this).tooltipster({
                        content: text,
                        maxWidth: 250,
                        arrow: false,
                        contentAsHTML: true
                    });
                };
            });

            //for new fakecbox
            $fakecbox2.each(function() {
                $(this).off('click.fbox').on('click.fbox', function() {
                    var $input = $(this).find('input[type="checkbox"]');

                    $(this).toggleClass('form-field--fakecbox2_input--active');
                    $input.prop("checked", !($input.prop("checked")));
                })
            });

            //for collapsable fields
            setTimeout(function() {
                $collapsable.each(function() {
                    var $field = $(this),
                        $height = 0;

                    $field.children().each(function() {
                        if ($(this).css('display') != 'none') {
                            $height = $height + $(this).outerHeight(true);
                        }
                    });

                    if ($field.hasClass('fieldset--collapsable-closed')) {
                        $field.height($field.find('.legend').outerHeight(true));
                    } else {
                        $field.height($height);
                    };

                    $field.find('.legend').off('click.fcollapse').on('click.fcollapse', function() {
                        $height = 0;
                        $field.children().each(function() {
                            if ($(this).css('display') != 'none') {
                                $height = $height + $(this).outerHeight(true);
                            }
                        });
                        $field.toggleClass('fieldset--collapsable-closed');
                        if ($field.hasClass('fieldset--collapsable-closed')) {
                            $field.height($(this).outerHeight(true));
                        } else {
                            $field.height($height);
                        };
                    });
                });
            }, 500);

            $collapsable.each(function() {
                $(this).off('DOMSubtreeModified').on('DOMSubtreeModified', function() {
                    var $height = 0;
                    $(this).children().each(function() {
                        if ($(this).css('display') != 'none') {
                            $height = $height + $(this).outerHeight(true);
                        }
                    });
                    $(this).height($height);
                });
            });

            //for star rating
            $ratingstar.each(function() {
                var $parent = $(this),
                    $star = $(this).find('.form-field--ratingstar_icon'),
                    $input = $parent.find('.form-field__input--ratingstar');

                if (parseInt($input.val()) != NaN && parseInt($input.val()) != undefined) {
                    for (var i = 0; i < parseInt($input.val()); i++) {
                        if ($($star[i]).hasClass('active')) {
                            $($star[i]).removeClass('active');
                            $star.each(function() {
                                $($star[i]).removeClass('active');
                            });
                        } else {
                            $($star[i]).addClass('active');
                            $($star[i]).prevAll('.form-field--ratingstar_icon').addClass('active');
                        };
                    }
                }

                $star.each(function() {
                    $(this).off('mouseenter.form').on('mouseenter.form', function() {
                        $(this).prevAll('.form-field--ratingstar_icon').addClass('hover');
                    });
                    $(this).off('mouseout.form').on('mouseout.form', function() {
                        $(this).prevAll('.form-field--ratingstar_icon').removeClass('hover');
                    });
                    $(this).off('click.form').on('click.form', function() {
                        if ($(this).hasClass('active')) {
                            $(this).removeClass('active');
                            $star.each(function() {
                                $(this).removeClass('active');
                            });
                        } else {
                            $(this).addClass('active');
                            $(this).prevAll('.form-field--ratingstar_icon').addClass('active');
                        };
                        $parent.find('.form-field__input--ratingstar').val($parent.find('.form-field--ratingstar_icon.active').length);
                        $parent.find('.form-field__input--ratingstar').trigger('focusout');
                        //console.log($parent.find('.form-field__input--ratingstar').val());
                    });
                });
            });

            //for checkbox toggle
            setTimeout(function() {
                $checkboxToggle.each(function() {
                    var target = $(this).attr('toggle-target'),
                        clear = $(this).attr('is-clear');

                    if ($(this).prop('checked')) {
                        $(target).show()
                    } else {
                        $(target).hide()
                    };
                    $(this).closest('.fieldset--collapsable').trigger('DOMSubtreeModified');

                    $(this).off('click.ctoggle').on('click.ctoggle', function() {
                        if ($(this).prop('checked')) {
                            $(target).show()
                        } else {
                            $(target).hide()
                            if (clear == "true") {
                                $(target).find('.form-field__input--radio').prop('checked', false);
                                $(target).find('.form-field__input--checkbox').prop('checked', false);
                                $(target).find('.form-field__input--text').val('');
                            };
                        };
                        $(this).closest('.fieldset--collapsable').trigger('DOMSubtreeModified');
                    });
                });
            }, 250);

            //for radio toggle
            setTimeout(function() {
                $radioToggle.each(function() {
                    $(this).find('.form-field__input--radio').each(function() {
                        var target = $(this).attr('toggle-target'),
                            clear = $(this).attr('is-clear');

                        if ($(this).prop('checked')) {
                            $(target).show()
                        } else {
                            $(target).hide();
                            if (clear == "true") {
                                $(target).find('.form-field__input--radio').prop('checked', false);
                                $(target).find('.form-field__input--checkbox').prop('checked', false);
                                //$(target).find('input').val('');
                            };
                        };

                        $(this).closest('.fieldset--collapsable').trigger('DOMSubtreeModified');

                        $(this).off('click.rtoggle').on('click.rtoggle', function() {
                            $radioToggle.each(function() {
                                $(this).find('.form-field__input--radio').each(function() {
                                    var target = $(this).attr('toggle-target'),
                                        clear2 = $(this).attr('is-clear');

                                    if ($(this).prop('checked')) {
                                        $(target).show()
                                    } else {
                                        $(target).hide()
                                        if (clear2 == "true") {
                                            $(target).find('.form-field__input--radio').prop('checked', false);
                                            $(target).find('.form-field__input--checkbox').prop('checked', false);
                                            $(target).find('.form-field__input--text').val('');
                                        };
                                    };
                                });
                            });
                            $(this).closest('.fieldset--collapsable').trigger('DOMSubtreeModified');
                        });
                    });
                });
            }, 250);

            //for select toggle
            setTimeout(function() {
                $select_Toggle.each(function() {

                    $(this).find('option').each(function() {
                        var target = $(this).attr('toggle-target');

                        if ($(this).prop('selected')) {
                            $(target).show()
                        } else {
                            $(target).hide()
                        };
                    });

                    $(this).closest('.fieldset--collapsable').trigger('DOMSubtreeModified');

                    $(this).off('change.stoggle').on('change.stoggle', function() {
                        $(this).find('option').each(function() {
                            var target = $(this).attr('toggle-target');

                            if ($(this).prop('selected')) {
                                $(target).show()
                            } else {
                                $(target).hide()
                            };
                        });
                        $(this).closest('.fieldset--collapsable').trigger('DOMSubtreeModified');
                    });
                });
            }, 250);

            //for input binding
            $inputBinding.each(function() {
                var $binding_target = $(this).attr('binding-target');

                function binding_activate(elem, isKeyup) {

                    if (!isKeyup) {
                        if ($(elem).hasClass('form-field__input--select')) {
                            $($binding_target).html($(elem).find('option:selected').text());
                        } else {
                            if ($(elem).val().length == 0) {
                                $($binding_target).html($($binding_target).attr('binding-default'))
                            } else {
                                $($binding_target).html($(elem).val());
                            };
                        }
                    } else {
                        if ($(elem).val().length == 0) {
                            $($binding_target).html($($binding_target).attr('binding-default'))
                        } else {
                            $($binding_target).html($(elem).val());
                        }
                    };

                }

                $(this).off('change.binding').on('change.binding', function() {
                    binding_activate(this, false);
                });
                $(this).off('keyup.binding').on('keyup.binding', function() {
                    binding_activate(this, true);
                });

                if ($(this).hasClass('form-field__input--select')) {
                    $(this).trigger('change');
                }
            });

            //for OTP

            $otp.each(function() {
                var $i = $(this);

                $i.off('keyup.otp').on('keyup.otp', function() {
                    if (event.keyCode != 8) {
                        if ($i.val().length > 0) {
                            $i.focusout();
                            $i.closest('.form-field__input-wrapper_otp').next().find('.form-field__input--otp').focus();
                        };
                    } else {
                        $i.focusout();
                        $i.closest('.form-field__input-wrapper_otp').prev().find('.form-field__input--otp').focus();
                    };
                });
            });

            $otp.on('keyup blur', function() {
                var OTPValue = '';

                $.each($otp, function() {
                    OTPValue += $(this).val();
                });

                var otpMain = $(this).closest('.form-field--otp').find('.form-field__input--otp_main')
                otpMain.val(OTPValue);
            });


            $otp.on("paste", function() {
                var $this = $(this),
                    originalValue = $this.val(),
                    intRegex = /^\d+$/;

                $this.val("");

                $this.one("input.fromPaste", function() {
                    var $currentInputBox = $(this),
                        $currentParent = $currentInputBox.closest('.form-field--otp');

                    var pastedValue = $currentInputBox.val();

                    if (intRegex.test(pastedValue)) {
                        var values = pastedValue.split("");

                        $(values).each(function(index) {
                            var $inputBox = $currentParent.find('.form-field__input--otp[name="chars[' + (index + 1) + ']"]');
                            $inputBox.val(values[index])
                        });
                    } else {
                        $this.val(originalValue);
                    }
                });
            });

            //for Password


            $password.on('keyup blur paste', function() {
                var passwordValue = $(this).val();

                var conditionListItem = $(this).closest('.form-field--password').find('.form-field__messages-password-list');

                validatePassword(conditionListItem, passwordValue)

            });


            function validatePassword(list, val) {
                list.find('.form-field__messages-password-list-item').removeClass('valid');

                if (val.length >= 8) {
                    list.find('.message-minimum').addClass('valid');
                }
                if (val.search(/[a-z]/g) >= 0) {
                    list.find('.message-lowercase').addClass('valid');
                }
                if (val.search(/[A-Z]/g) >= 0) {
                    list.find('.message-uppercase').addClass('valid');
                }
                if (val.search(/[0-9]/g) >= 0) {
                    list.find('.message-number').addClass('valid');
                }
                if (val.search(/[!@#$%^&*]/g) >= 0) {
                    list.find('.message-special').addClass('valid');
                }
            }

            $passShowHide.off().on('click', function(e) {

                $(this).toggleClass('button--show button--hide');
                var thisInput = $(this).closest('.form-field--password').find('.form-field__input--password'),
                    visibile = $(this).hasClass('button--show') ? true : false;

                if (visibile) {
                    thisInput.attr('type', 'password')
                } else {
                    thisInput.attr('type', 'text')
                }

                e.preventDefault();

            });

            this.$form.find('.form-field__passwordtoggle').off('click.pw').on('click.pw', function() {
                var $input = $(this).closest('.form-field__input-passwordwrapper').find('.form-field__input');

                $(this).toggleClass('show');

                if ($(this).hasClass('show')) {
                    $input.attr('type', 'text');
                } else {
                    $input.attr('type', 'password');
                }
            });

            //for month pickers

            if (this.$form.parents('[ data-wffm ]').length > 0) {

                // init wffm datepickers
                $datepickersWffm.each(function(i, el) {
                    $dp = $(el).find('input');

                    if (true) {

                        dpLabelId = utils.uniqueID();
                        $dp.parents('.field-border').attr('id', dpLabelId);
                        dpLabelId = '#' + dpLabelId;

                        dpOptions = $dp.data('picker-options');

                        if (typeof dpOptions === 'string') {
                            dpOptions = JSON.parse(dpOptions);
                        } else if (typeof dpOptions !== 'object') {
                            dpOptions = {};
                        }

                        $dp.pickadate(
                            $.extend(
                                true, {
                                    container: dpLabelId
                                },
                                dpOptions,
                                defaultOpts
                            )
                        );
                        // if dp is has a ref dataset update based on this
                        if ($dp.data('ref')) {
                            $dp.on('change', _this.setConstraints);
                        }

                        // IE9clicker (1of2) - as IE9 doesn't have events on pseudoselectors (clicking on calendar icon does not trigger picker)
                        // and as it would be too much work before delivery to update markup of all date fields... go js ugly solution
                        $dp.after('<span data-clicker="' + dpLabelId + '" class="form-field__datepicker-icon-clicker"></span>');

                    } else {

                        $dp.attr('type', 'date');

                        // if dp is has a ref dataset update based on this
                        if ($dp.data('ref')) {
                            $dp.on('change', _this.setConstraintsMobile);
                        }

                    }

                });

            } else {

                // apply validation
                if (this.$form.attr('form-skipvalidation') != 'true') {
                    FormValidation.apply(this.$form);
                    FormValidation.limit();
                }


                // init textarea char count
                $textareas.each(function(i, el) {
                    _this.countTextChars(el);
                });

                $textareas.on('keyup', function() {
                    _this.countTextChars(this);
                });

                // init datepickers
                $datepickers.each(function(i, el) {
                    $dp = $(el);

                    if (true) {

                        dpOptions = $dp.data('picker-options');
                        dpLabelId = '#' + $dp.parents('.form-field').attr('id');

                        if (typeof dpOptions === 'string') {
                            dpOptions = JSON.parse(dpOptions);
                        } else if (typeof dpOptions !== 'object') {
                            dpOptions = {};
                        }

                        $dp.pickadate(
                            $.extend(
                                true,
                                dpOptions,
                                defaultOpts
                            )
                        );

                        // if dp is has a ref dataset update based on this
                        if ($dp.data('ref')) {
                            $dp.on('change', _this.setConstraints);
                        }

                        // IE9clicker (1of2) - as IE9 doesn't have events on pseudoselectors (clicking on calendar icon does not trigger picker)
                        // and as it would be too much work before delivery to update markup of all date fields... go js ugly solution
                        $dp.after('<span data-clicker="' + dpLabelId + '" class="form-field__datepicker-icon-clicker"></span>');

                    } else {

                        $dp.attr('type', 'date');

                        // if dp is has a ref dataset update based on this
                        if ($dp.data('ref')) {
                            $dp.on('change', _this.setConstraintsMobile);
                        }

                    }

                });

                $datepickersFuture.each(function(i, el) {
                    $dp = $(el);

                    if (true) {

                        dpMax = $dp.data('date-max');
                        dpOptions = $dp.data('picker-options');
                        dpLabelId = '#' + $dp.parents('.form-field').attr('id');

                        if (typeof dpOptions === 'string') {
                            dpOptions = JSON.parse(dpOptions);
                        } else if (typeof dpOptions !== 'object') {
                            dpOptions = {};
                        }

                        if (typeof dpMax === 'object') {
                            var maxDay = dpMax[0],
                                maxMonth = dpMax[1],
                                maxYear = dpMax[2],
                                day = new Date();

                            day.setDate(day.getDate() + maxDay);
                            day.setMonth(day.getMonth() + maxMonth);
                            day.setFullYear(day.getFullYear() + maxYear);

                            dpMax = {
                                max: day
                            };

                        } else if (typeof dpMax !== 'object') {
                            dpMax = {};
                        }

                        $dp.pickadate(
                            $.extend(
                                true, {
                                    container: dpLabelId,
                                    min: new Date()
                                },
                                dpOptions,
                                dpMax,
                                defaultOpts
                            )
                        );

                        // if dp is has a ref dataset update based on this
                        if ($dp.data('ref')) {
                            $dp.on('change', _this.setConstraints);
                        }


                        // IE9clicker (1of2) - as IE9 doesn't have events on pseudoselectors (clicking on calendar icon does not trigger picker)
                        // and as it would be too much work before delivery to update markup of all date fields... go js ugly solution
                        $dp.after('<span data-clicker="' + dpLabelId + '" class="form-field__datepicker-icon-clicker"></span>');

                    } else {

                        $dp.attr('type', 'date');

                        // if dp is has a ref dataset update based on this
                        if ($dp.data('ref')) {
                            $dp.on('change', _this.setConstraintsMobile);
                        }
                    }

                });

                $datepickersPast.each(function(i, el) {
                    $dp = $(el);

                    if (true) {

                        dpOptions = $dp.data('picker-options');
                        dpLabelId = '#' + $dp.parents('.form-field').attr('id');

                        if (typeof dpOptions === 'string') {
                            dpOptions = JSON.parse(dpOptions);
                        } else if (typeof dpOptions !== 'object') {
                            dpOptions = {};
                        }

                        $dp.pickadate(
                            $.extend(
                                true, {
                                    container: dpLabelId,
                                    max: new Date()
                                },
                                dpOptions,
                                defaultOpts
                            )
                        );

                        // if dp is has a ref dataset update based on this
                        if ($dp.data('ref')) {
                            $dp.on('change', _this.setConstraints);
                        }


                        // IE9clicker (1of2) - as IE9 doesn't have events on pseudoselectors (clicking on calendar icon does not trigger picker)
                        // and as it would be too much work before delivery to update markup of all date fields... go js ugly solution
                        $dp.after('<span data-clicker="' + dpLabelId + '" class="form-field__datepicker-icon-clicker"></span>');

                    } else {

                        $dp.attr('type', 'date');

                        // if dp is has a ref dataset update based on this
                        if ($dp.data('ref')) {
                            $dp.on('change', _this.setConstraintsMobile);
                        }
                    }

                });

                Date.prototype.addDays = function(days) {
                    var date = new Date(this.valueOf());

                    date.setDate(date.getDate() + days);

                    return date;
                };

                $datepickersBinded.each(function() {
                    var today = new Date(),
                        min = parseInt(jQuery(this).attr('data-el-to_min')),
                        max = jQuery(this).attr('data-el-to_max') != 'indefinite' ? parseInt(jQuery(this).attr('data-el-to_max')) : jQuery(this).attr('data-el-to_max');

                    var from_$input = jQuery(this).pickadate(),
                        from_picker = from_$input.pickadate('picker')

                    var to_$input = jQuery(jQuery(this).attr('data-el-to')).pickadate(),
                        to_picker = to_$input.pickadate('picker')


                    // Check if there’s a “from” or “to” date to start with.
                    if (typeof from_picker !== "undefined" && from_picker.get('value')) {
                        to_picker.set('min', from_picker.get('select').obj.addDays(min))
                    }

                    // When something is selected, update the “from” and “to” limits.
                    if (typeof from_picker !== "undefined") {
                        from_picker.on('set', function(event) {
                            if (event.select) {
                                if (typeof to_picker !== "undefined" && to_picker.get('select') !== null) {
                                    if (from_picker.get('select').obj > to_picker.get('select').obj.addDays(-min) || from_picker.get('select').obj < to_picker.get('select').obj.addDays(-max)) {
                                        to_picker.clear();
                                    };
                                }
                                to_picker.set('min', from_picker.get('select').obj.addDays(min));
                                if (max != 'indefinite') {
                                    to_picker.set('max', from_picker.get('select').obj.addDays(max));
                                }
                            } else if ('clear' in event) {
                                to_picker.set('min', today.addDays(min))
                                if (max != 'indefinite') {
                                    to_picker.set('max', today.addDays(max))
                                }
                            }
                        });
                    };
                    if (typeof to_picker !== "undefined") {
                        to_picker.on('set', function(event) {
                            if (event.select) {
                                //from_picker.set('max', to_picker.get('select').obj.addDays(15))
                                if (typeof from_picker !== "undefined" && from_picker.get('select') !== null) {
                                    if (to_picker.get('select').obj < from_picker.get('select').obj.addDays(min)) {
                                        from_picker.clear();
                                    };
                                }
                            } else if ('clear' in event) {
                                //from_picker.set('max', false)
                            }
                        });
                    }

                });

                // init upload image fields
                $uploaders.on('change', function(e) {
                    var size = $(this)[0].files[0].size;
                    var exeIndex = $(this)[0].files[0].name.indexOf('.exe');
                    // console.log($(this)[0].files[0].name.split('.').pop());
                    var extension = $(this).val().replace(/^.*\./, '').toLowerCase();
                    var contdd = $(this).closest('.form-field--upload');
                    var $j120 = $(this).closest('.j120-smart-response--button_wrapper');
                    var $j120errorFormat = $j120.find('.form-field__input--upload-format-error-message');
                    var $j120errorSize = $j120.find('.form-field__input--upload-size-error-message');
                    var errorFormat = contdd.find('.form-field__input--upload-format-error-message');
                    var errorSize = contdd.find('.form-field__input--upload-size-error-message');
                    var __this = $(this)

                    errorSize.hide()
                    errorFormat.hide()
                    $j120errorFormat.each(function() {
                        $(this).hide()
                    });
                    $j120errorSize.each(function() {
                        $(this).hide()
                    });

                    var formatList = $(this).data("accepts");

                    if (formatList) {
                        var formats = JSON.parse('[' + formatList.toLowerCase() + ']');
                    }
                    var thisSize = $(this).attr('data-size');




                    if (!formatList && !thisSize && (exeIndex == -1)) {
                        _this.previewUploadedImage(this);
                        //new upload//
                        if (__this.closest('.form-field').hasClass('form-field--upload_new')) {
                            var tick = (size / 1000) / 75,
                                $rate = 0;

                            __this.closest('.form-field').find('.form-field__input--upload-filesize').fadeIn();
                            __this.closest('.form-field').find('[data-totalsize]').html(numeral(size / 1000).format('00.'));
                            __this.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '100%');
                            for (var i = 0; i < 75; i++) {
                                setTimeout(function() {
                                    __this.closest('.form-field').find('[data-currentsize]').html(numeral($rate + tick).format('00.'));
                                    $rate = $rate + tick;
                                }, (2000 / 75) * i);
                            };
                        };
                        //new upload end//

                    } else if ((!formatList && thisSize) || (formatList && !thisSize) || (formatList && thisSize)) {
                        if (exeIndex != -1) {
                            //console.log('error');
                            errorFormat.show();
                            $j120errorFormat.each(function() {
                                $(this).show()
                            });
                            //new upload//
                            if (__this.closest('.form-field').hasClass('form-field--upload_new')) {
                                __this.closest('.form-field').find('.form-field__input--upload-filesize').fadeOut();
                                __this.closest('.form-field').find('[data-currentsize]').html('0');
                                __this.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '0%');
                            };
                            //new upload end//
                            $(this).val("")
                        } else {

                            if (!formatList && thisSize) {

                                if (thisSize >= size) {
                                    _this.previewUploadedImage(this);
                                    //new upload//
                                    if (__this.closest('.form-field').hasClass('form-field--upload_new')) {
                                        var tick = (size / 1000) / 75,
                                            $rate = 0;

                                        __this.closest('.form-field').find('.form-field__input--upload-filesize').fadeIn();
                                        __this.closest('.form-field').find('[data-totalsize]').html(numeral(size / 1000).format('00.'));
                                        __this.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '100%');
                                        for (var i = 0; i < 75; i++) {
                                            setTimeout(function() {
                                                __this.closest('.form-field').find('[data-currentsize]').html(numeral($rate + tick).format('00.'));
                                                $rate = $rate + tick;
                                            }, (2000 / 75) * i);
                                        };
                                    };
                                    //new upload end//
                                } else {
                                    errorSize.show();
                                    $j120errorSize.each(function() {
                                        $(this).show()
                                    });
                                    //new upload//
                                    if (__this.closest('.form-field').hasClass('form-field--upload_new')) {
                                        __this.closest('.form-field').find('.form-field__input--upload-filesize').fadeOut();
                                        __this.closest('.form-field').find('[data-currentsize]').html('0');
                                        __this.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '0%');
                                    };
                                    //new upload end//
                                    $(this).val("")
                                }
                            }
                            if (formatList && !thisSize) {

                                if (formats.indexOf(extension) > -1) {
                                    _this.previewUploadedImage(this);
                                    //new upload//
                                    if (__this.closest('.form-field').hasClass('form-field--upload_new')) {
                                        var tick = (size / 1000) / 75,
                                            $rate = 0;

                                        __this.closest('.form-field').find('.form-field__input--upload-filesize').fadeIn();
                                        __this.closest('.form-field').find('[data-totalsize]').html(numeral(size / 1000).format('00.'));
                                        __this.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '100%');
                                        for (var i = 0; i < 75; i++) {
                                            setTimeout(function() {
                                                __this.closest('.form-field').find('[data-currentsize]').html(numeral($rate + tick).format('00.'));
                                                $rate = $rate + tick;
                                            }, (2000 / 75) * i);
                                        };
                                    };
                                    //new upload end//
                                } else {
                                    errorFormat.show();
                                    $j120errorFormat.each(function() {
                                        $(this).show()
                                    });
                                    //new upload//
                                    if (__this.closest('.form-field').hasClass('form-field--upload_new')) {
                                        __this.closest('.form-field').find('.form-field__input--upload-filesize').fadeOut();
                                        __this.closest('.form-field').find('[data-currentsize]').html('0');
                                        __this.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '0%');
                                    };
                                    //new upload end//
                                    $(this).val("")
                                }
                            }
                            if (formatList && thisSize) {

                                if (formats.indexOf(extension) > -1) {
                                    if (thisSize >= size) {
                                        _this.previewUploadedImage(this);
                                        //new upload//
                                        if (__this.closest('.form-field').hasClass('form-field--upload_new')) {
                                            var tick = (size / 1000) / 75,
                                                $rate = 0;

                                            __this.closest('.form-field').find('.form-field__input--upload-filesize').fadeIn();
                                            __this.closest('.form-field').find('[data-totalsize]').html(numeral(size / 1000).format('00.'));
                                            __this.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '100%');
                                            for (var i = 0; i < 75; i++) {
                                                setTimeout(function() {
                                                    __this.closest('.form-field').find('[data-currentsize]').html(numeral($rate + tick).format('00.'));
                                                    $rate = $rate + tick;
                                                }, (2000 / 75) * i);
                                            };
                                        };
                                        //new upload end//
                                    } else {
                                        errorSize.show();
                                        $j120errorSize.each(function() {
                                            $(this).show()
                                        });
                                        //new upload//
                                        if (__this.closest('.form-field').hasClass('form-field--upload_new')) {

                                            __this.closest('.form-field').find('.form-field__input--upload-filesize').fadeOut();
                                            __this.closest('.form-field').find('[data-currentsize]').html('0');
                                            __this.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '0%');
                                        };
                                        //new upload end//
                                        $(this).val("")
                                    }
                                } else {
                                    errorFormat.show();
                                    $j120errorFormat.each(function() {
                                        $(this).show()
                                    });
                                    //new upload//
                                    if (__this.closest('.form-field').hasClass('form-field--upload_new')) {
                                        __this.closest('.form-field').find('.form-field__input--upload-filesize').fadeOut();
                                        __this.closest('.form-field').find('[data-currentsize]').html('0');
                                        __this.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '0%');
                                    };
                                    //new upload end//
                                    $(this).val("")
                                }
                            }
                        }


                    } else if (exeIndex != -1) {
                        //console.log('error');
                        errorFormat.show();
                        $j120errorFormat.each(function() {
                            $(this).show()
                        });
                        //new upload//
                        if (__this.closest('.form-field').hasClass('form-field--upload_new')) {
                            __this.closest('.form-field').find('.form-field__input--upload-filesize').fadeOut();
                            __this.closest('.form-field').find('[data-currentsize]').html('0');
                            __this.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '0%');
                        };
                        //new upload end//
                        $(this).val("")
                    } else {

                        _this.previewUploadedImage(this);
                        //new upload//
                        if (__this.closest('.form-field').hasClass('form-field--upload_new')) {
                            var tick = (size / 1000) / 75,
                                $rate = 0;

                            __this.closest('.form-field').find('.form-field__input--upload-filesize').fadeIn();
                            __this.closest('.form-field').find('[data-totalsize]').html(numeral(size / 1000).format('00.'));
                            __this.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '100%');
                            for (var i = 0; i < 75; i++) {
                                setTimeout(function() {
                                    __this.closest('.form-field').find('[data-currentsize]').html(numeral($rate + tick).format('00.'));
                                    $rate = $rate + tick;
                                }, (2000 / 75) * i);
                            };
                        };
                        //new upload end//
                    }




                    $(this).parsley().validate();
                });




                // show file if one is already selected, i.e. browser back
                $uploaders.each(function(i, el) {
                    var $el = $(el)[0];

                    if ($el.files && $el.files[0]) { _this.previewUploadedImage(el); }
                });

                // init remove preview upload image buttons
                $previewRemovers.on('click', function(e) {
                    e.preventDefault();
                    _this.removeUploadedImage(this);
                });

                // init checkbox toggles
                $checkboxToggles.on('click', function() {

                    _this.toggleFieldset($(this));

                });






                // init terms checkbox
                $.each($termsCheckbox, function() {
                    var $checkbox = $(this).find('input'),
                        $modalTrigger = $(this).find('a'),
                        $modalContent = $('[data-content=terms_checkbox]'),
                        $agreeButton = $modalContent.find('[data-modal-confirm]'),
                        $closeButton = $modalContent.find('[data-close]');

                    $modalTrigger.on('click', function(e) { e.preventDefault(); });

                    $agreeButton.on('click', function(e) {

                        e.preventDefault();

                        $checkbox.prop('checked', true);
                        $closeButton.trigger('click');


                    });

                });

            }

            // IE9clicker (2of2) - as IE9 doesn't have events on pseudoselectors (clicking on calendar icon does not trigger picker)
            // and as it would be too much work before delivery to update markup of all date fields... go js ugly solution
            $('[ data-clicker ]').on('click', function() {
                $(this).siblings('[ data-el="datepicker" ]').click();
            });

            this.initSelect2();
            $(window).off('form_reinit').on('form_reinit', function() {
                _this.init();
            })
        };

        Form.prototype.initSelect2 = function() {
            var _this = this;

            $('.form-field__input--select2').each(function() {
                var $parent = $(this).closest('.form-field'),
                    $placeholder = ($(this).attr('data-placeholder') == null || undefined) ? '' : $(this).attr('data-placeholder');

                $(this).select2({
                    width: '100%',
                    placeholder: $placeholder
                });
                $parent.find('.select2-selection__arrow').remove();
                $parent.find('.select2-selection').css('height', 'auto');
                if (($(this).hasClass('j120-location-form-field__input--select2') && !utils.isRTL()) || (!$(this).hasClass('j120-location-form-field__input--select2') && utils.isRTL())) {
                    $parent.find('.select2-selection__rendered').css({ 'padding': '5px 12px 8px', 'padding-left': '44px' });
                } else if (($(this).hasClass('j120-location-form-field__input--select2') && utils.isRTL()) || (!$(this).hasClass('j120-location-form-field__input--select2') && !utils.isRTL())) {
                    $parent.find('.select2-selection__rendered').css({ 'padding': '5px 12px 8px', 'padding-right': '44px' });
                }
            });
        };

        Form.prototype.setConstraints = function() {
            var $el = $(this),
                ref = $el.data('ref'),
                refDate = $el.pickadate('picker').get('select'),
                minPickers = $('[data-mindate="' + ref + '"]'),
                maxPickers = $('[data-maxdate="' + ref + '"]');

            refDate = refDate ? refDate.pick : false;

            // update min and max dates
            minPickers.each(function(i, picker) {
                var $picker = $(picker),
                    currentDate = $picker.pickadate('picker').get('select'),
                    minOffset = parseInt($picker.data('mindate-offset'), 10) * 86400000,
                    newMin = refDate ? refDate + minOffset : false,
                    updateObj = { 'min': new Date(newMin) };

                if (currentDate && newMin) {
                    updateObj.select = (currentDate && currentDate.pick < newMin) ? newMin : currentDate.pick;
                }

                $picker.pickadate('picker').set(updateObj);
            });

            maxPickers.each(function(i, picker) {
                var $picker = $(picker),
                    currentDate = $picker.pickadate('picker').get('select'),
                    maxOffset = parseInt($picker.data('maxdate-offset'), 10) * 86400000,
                    newMax = refDate ? refDate + maxOffset : false,
                    updateObj = { 'max': new Date(newMax) };

                if (currentDate && newMax) {
                    updateObj.select = (currentDate && currentDate.pick > newMax) ? newMax : currentDate.pick;
                }

                $picker.pickadate('picker').set(updateObj);
            });
        };

        Form.prototype.setConstraintsMobile = function() {
            var $el = $(this),
                ref = $el.data('ref'),
                refDate = $el.val(),
                minPickers = $('[data-mindate="' + ref + '"]'),
                maxPickers = $('[data-maxdate="' + ref + '"]');

            // update min and max dates
            minPickers.prop('min', refDate);
            maxPickers.prop('max', refDate);
        };


        Form.prototype.countTextChars = function(textarea) {

            var $textarea = $(textarea),
                $count = $('[ data-charcount="' + $textarea.data('textarea') + '" ]');

            $count.text($textarea.val().length);
        };


        Form.prototype.scrollIntoView = function($node) {

            $('html, body').animate({
                scrollTop: ~~$node.offset().top - 100
            }, 750);
        };


        Form.prototype.previewUploadedImage = function(input) {
            var $input = $(input),
                $container = $input.closest('.form-field--upload'),
                id = $input.data('uploader-field'),
                $remover = $container.find('[ data-uploader-remove="' + id + '" ]');

            if (input.files && input.files[0]) {

                var reader,
                    isImage = false,
                    filename = input.files[0].name,
                    filetype = input.files[0].name.split('.').pop(),
                    $details = $container.find('.form-field--upload_new-details'),
                    $previewer = $container.find('[ data-uploader-image="' + id + '" ]'),
                    $filetype = $container.find('[ data-uploader-filetype="' + id + '" ]'),
                    $filename = $container.find('[ data-uploader-filename="' + id + '" ]');


                if (window.FileReader && window.Blob && /image/i.test(input.files[0].type)) {

                    reader = new FileReader();

                    reader.onload = function(e) {
                        $previewer.attr('src', e.target.result);
                    };

                    reader.readAsDataURL(input.files[0]);

                    isImage = true;
                }

                if (isImage === false) { // not an image - use the 'success' placeholder image
                    $previewer.attr('src', $previewer.data('success'));
                }

                // console.log(input.val());
                $details.css('display', 'flex');
                $filename.text(filename).fadeIn();
                $filetype.text(filetype).fadeIn();
                $remover.fadeIn();
            } else {
                this.removeUploadedImage($remover[0]);
            }

        };


        Form.prototype.removeUploadedImage = function(button) {

            var $button = $(button),
                $container = $button.closest('.form-field--upload'),
                id = $button.data('uploader-remove'),
                $details = $container.find('.form-field--upload_new-details'),
                $previewer = $container.find('[ data-uploader-image="' + id + '" ]'),
                $uploader = $container.find('[ data-uploader-field="' + id + '" ]'),
                $filetype = $container.find('[ data-uploader-filetype="' + id + '" ]'),
                $filename = $container.find('[ data-uploader-filename="' + id + '" ]');

            //console.log($uploader.val())



            $previewer.attr('src', $previewer.data('src'));
            $uploader.val('').focus();
            if (/MSIE/.test(navigator.userAgent)) {
                $uploader.replaceWith($uploader = $uploader.clone(true));
            }
            $filename.text('').fadeOut();
            $filetype.text('').fadeOut();
            //console.log($uploader.val())
            $button.fadeOut();
            $details.fadeOut();

            //new upload//
            if ($filename = $container.closest('.form-field').hasClass('form-field--upload_new')) {

                $filename = $container.closest('.form-field').find('.form-field__input--upload-filesize').fadeOut();
                $filename = $container.closest('.form-field').find('[data-currentsize]').html('0');
                $filename = $container.closest('.form-field').find('.form-field__input--upload-filesize_green').css('width', '0%');
            };
            //new upload end//

        };

        Form.prototype.toggleFieldset = function($checkox) {

            var $fieldset = $('#' + $checkox.attr('aria-controls')),
                expanded = $fieldset.attr('aria-expanded') === 'true',
                pressed = $fieldset.attr('aria-pressed') === 'true',
                childrenFields = $fieldset.find('input[type=text], input[type=number], input[type=email]').not('[data-el=datepicker]');

            $checkox.attr('aria-pressed', pressed = !pressed);
            $fieldset.attr('aria-expanded', expanded = !expanded);
            $fieldset.toggleClass('fieldset--hidden');

            if (!$fieldset.hasClass('fieldset--hidden')) {
                // enable validation on child fields
                childrenFields.parsley({
                    excluded: 'input.form-field__input--readonly, input[type=button], input[type=submit], input[type=reset], input[type=hidden], [disabled], :hidden'
                });
            }
        };

        return Form;

    });
/* globalmodule */
define( 'journey',[ 'jquery' ],
	function ( $ ) {

		'use strict';

		/**
		 * Iterates over all $journeys and initiates journey controller.
		 */

		return {

			init: function ( $journeys ) {

				// if initComponent was invoked, use $journeys. otherwise it's the bootstrap init call
				if ( typeof( $journeys ) === 'undefined' ) {

					$journeys = $( '[ data-journey ]' );

				}

				$journeys.each( function () {

					var $journey = $( this ),
						id = $journey.data( 'journey' );

					//Retrieves the id of the module from the 'journey' data attribute and calls the relevant controller.
					require( [ '../src/journeys/' + id + '/' + id ], function ( Journey ) {

						var journey;

						if ( Journey !== undefined ) {

							journey = new Journey( $journey );
							journey.init();
						}
					} );
				} );
			}
		};
	} );

define( 'hayak-popup',[ 'jquery' ],
function( $ ) {

	'use strict';

	var hayakPopup = {};

	function open_unyco_popup(event){
		var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left,
				dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top,
				url = $(event.currentTarget).attr('href'),
				width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width,
				height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height,
				left = ((width / 2) - (350 / 2)) + dualScreenLeft,
				top = ((height / 2) - (500 / 2)) + dualScreenTop,
				unyco_popup_window = this.unyco_popup_window;

		event.preventDefault();

		if (unyco_popup_window==null || unyco_popup_window.closed){
			this.unyco_popup_window = window.open(url, 'hayakPopUp','width=400,height=600,scrollbar=no,location=no,toolbar=no,resizable=false,left='+left+',top='+top);
		}else{
			this.unyco_popup_window.focus();
		}
	}

	hayakPopup.init = function() {
		$( '.js-hayak-popup' ).on( 'click', $.proxy( open_unyco_popup, this )) ;
	};

	return hayakPopup;
} );

define( 'format-numbers',[ 'jquery', 'numeral' ],
function( $ ) {

	'use strict';

	var formatNumbers = {};

	function formatCurrencyValues(set) {
		set.each(function (i, el) {
			var $el = $(el),
					fmt = $el.data('numeric-format') || '0,0.00',
					currency = $el.data('currency'),
					val = $el.text() || $el.val(),
					num = parseFloat(val),
					text;

			if (!num) return;

			var text = numeral(num).format(fmt);
			if (currency) {
				text += (' ' + currency);
			}

			if ($el.is('input') || $el.is('textarea')) {
				$el.val(text);
				return;
			}

			$el.text(text);
		});
	}

	formatNumbers.init = function() {
		formatCurrencyValues( $( '[data-numeric-format]' ) );

		$(window).off('numericCurrencyTrigger').on('numericCurrencyTrigger', function () {
			formatCurrencyValues( $( '[data-numeric-format]' ) );
		});
	};

	return formatNumbers;
} );

/* globalmodule */
define( 'bootstrap',[ 'jquery', 'component', 'helper', 'breakpoint', 'form', 'journey', 'lib/utils', 'hayak-popup', 'format-numbers', 'vendor/moment' ],
	function ( $, component, helper, breakpoint, Form, journey, utils, hayakPopup, formatNumbers, moment ) {

		'use strict';

		/**
		 * Application entry point: Initialises all components and implements any other global behaviours.
		 * @module
		 */

		// add js classname to html tag
		document.getElementsByTagName( 'html' )[ 0 ].className = 'js';

		// initialise breakpoints
		breakpoint.init();

		// initialise components
		component.init();

		// initialise helpers
		helper.init();

		// initialise forms
		$( '[data-form]' ).each( function () {
			( new Form( $( this ) ) ).init();
		} );

		// initialise journeys
		journey.init();

		// init hayak popup click events
		hayakPopup.init();

		// init auto currency formatting
		formatNumbers.init();

		// disable tel links in IE
		if ( utils.isMSIE() ) {

			$( 'a[href^=tel]' ).each( function () {

				var $link = $( this );
				$link.addClass( 'link--inactive-tel' );
				$link.on( 'click', function ( e ) {
					e.preventDefault();
				} );
			} );
		}

		// init re-rendered components
		window.initComponents = function ( id ) {

			var $components,
				$helpers,
				$journeys,
				$newInitBlock;

			// prevent calling anything again if no id is passed
			if ( typeof ( id ) !== 'undefined' ) {

				$newInitBlock = $( '#' + id );

				$components = $newInitBlock.find( '[ data-component ]' );
				$helpers = $newInitBlock.find( '[ data-helper ]' );
				$journeys = $newInitBlock.find( '[ data-journey ]' );

				component.init( $components );
				helper.init( $helpers );
				journey.init( $journeys );

			}
		};
 
        function createCookie(name, value, days) {
            var expires;
 
            if (days) {
                var date = new Date();
                date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
                expires = "; expires=" + date.toGMTString();
            } else {
                expires = "";
            }
            document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/";
        }
 
        function readCookie(name) {
            var nameEQ = encodeURIComponent(name) + "=";
            var ca = document.cookie.split(';');
            for (var i = 0; i < ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0) === ' ')
                    c = c.substring(1, c.length);
                if (c.indexOf(nameEQ) === 0)
                    return decodeURIComponent(c.substring(nameEQ.length, c.length));
            }
            return null;
        }
 
        function eraseCookie(name) {
            createCookie(name, "", -1);
        }
 
        jQuery("input").on("keyup", function (e) {
            var value = $(this).val() || "";
            var regex = /<(\/?\w+[^\n>]*\/?)>/ig;
            if (regex.test(value)) {
                //jQuery(this).val(value.replace(regex, "&lt;$1&gt;"));
                jQuery(this).val('');
                e.preventDefault();
                return false;
            }
        });

		$('[button-more]').each(function () {
			$(this).off('click.buttonmore').on('click.buttonmore', function () {
				$('.button-more--container').removeClass('opened');
				$(this).find('.button-more--container').toggleClass('opened');
			});
		});

		$('[data-nav-target]').each(function () {
			$(this).off('click.navto').on('click.navto', function () {
				var $target = $($(this).attr('data-nav-target'));

				$('html, body').animate({
                    scrollTop: $target.offset().top - jQuery('.m12-masthead').outerHeight(true) - 110
                }, 400);
			});
		});

		$(document).off('click.ddclosemore').on('click.ddclosemore', function (event) {
			if (!$(event.target).is('[button-more]')) {
				$('.button-more--container').removeClass('opened');
			};
		});
	});

(function() {

	'use strict';

	/* jshint ignore:start */

	// Array.filter shim: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
	if ( !Array.prototype.filter ) {

		Array.prototype.filter = function( fun /*, thisArg*/ ) {
			'use strict';

			if ( this === void 0 || this === null ) {
				throw new TypeError();
			}

			var t = Object( this );
			var len = t.length >>> 0;
			if ( typeof fun !== 'function' ) {
				throw new TypeError();
			}

			var res = [];
			var thisArg = arguments.length >= 2 ? arguments[ 1 ] : void 0;
			for ( var i = 0; i < len; i++ ) {
				if ( i in t ) {
					var val = t[ i ];

					// NOTE: Technically this should Object.defineProperty at
					//       the next index, as push can be affected by
					//       properties on Object.prototype and Array.prototype.
					//       But that method's new, and collisions should be
					//       rare, so use the more-compatible alternative.
					if ( fun.call( thisArg, val, i, t ) ) {
						res.push( val );
					}
				}
			}

			return res;
		};
	}

	if ( typeof Object.create !== 'function' ) {

		Object.create = ( function() {

			var Object = function() {};

			return function ( prototype) {

				if ( arguments.length > 1 ) {

					throw Error( 'Second argument not supported' );
				}

				if ( typeof prototype !== 'object' ) {
					throw TypeError( 'Argument must be an object' );
				}

				Object.prototype = prototype;
				var result = new Object();
				Object.prototype = null;

				return result;
			};
		})();
	}

	if ( !Object.keys ) {

		Object.keys = (function() {

			var hasOwnProperty = Object.prototype.hasOwnProperty,
					hasDontEnumBug = !({ toString: null }).propertyIsEnumerable( 'toString' ),
					dontEnums = [
						'toString',
						'toLocaleString',
						'valueOf',
						'hasOwnProperty',
						'isPrototypeOf',
						'propertyIsEnumerable',
						'constructor'
					],
					dontEnumsLength = dontEnums.length;

			return function( obj ) {

				if ( typeof obj !== 'object' && ( typeof obj !== 'function' || obj === null ) ) {

					throw new TypeError( 'Object.keys called on non-object' );
				}

				var result = [], prop, i;

				for ( prop in obj ) {

					if ( hasOwnProperty.call( obj, prop ) ) {

						result.push(prop);
					}
				}

				if ( hasDontEnumBug ) {

					for ( i = 0; i < dontEnumsLength; i = i + 1 ) {

						if ( hasOwnProperty.call( obj, dontEnums[i] ) ) {

							result.push(dontEnums[i]);
						}
					}
				}
				return result;
			};
		}() );
	}
	/* jshint ignore:end */

} )();

define("lib/ieshims", function(){});

/*
 Highcharts JS v10.2.0 (2022-07-05)

 (c) 2009-2021 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(Y,K){"object"===typeof module&&module.exports?(K["default"]=K,module.exports=Y.document?K(Y):K):"function"===typeof define&&define.amd?define("highcharts/highcharts",[],function(){return K(Y)}):(Y.Highcharts&&Y.Highcharts.error(16,!0),Y.Highcharts=K(Y))})("undefined"!==typeof window?window:this,function(Y){function K(f,e,l,C){f.hasOwnProperty(e)||(f[e]=C.apply(null,l),"function"===typeof CustomEvent&&Y.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:f[e]}})))}
var l={};K(l,"Core/Globals.js",[],function(){var f;(function(e){e.SVG_NS="http://www.w3.org/2000/svg";e.product="Highcharts";e.version="10.2.0";e.win="undefined"!==typeof Y?Y:{};e.doc=e.win.document;e.svg=e.doc&&e.doc.createElementNS&&!!e.doc.createElementNS(e.SVG_NS,"svg").createSVGRect;e.userAgent=e.win.navigator&&e.win.navigator.userAgent||"";e.isChrome=-1!==e.userAgent.indexOf("Chrome");e.isFirefox=-1!==e.userAgent.indexOf("Firefox");e.isMS=/(edge|msie|trident)/i.test(e.userAgent)&&!e.win.opera;
e.isSafari=!e.isChrome&&-1!==e.userAgent.indexOf("Safari");e.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(e.userAgent);e.isWebKit=-1!==e.userAgent.indexOf("AppleWebKit");e.deg2rad=2*Math.PI/360;e.hasBidiBug=e.isFirefox&&4>parseInt(e.userAgent.split("Firefox/")[1],10);e.hasTouch=!!e.win.TouchEvent;e.marginNames=["plotTop","marginRight","marginBottom","plotLeft"];e.noop=function(){};e.supportsPassiveEvents=function(){var f=!1;if(!e.isMS){var l=Object.defineProperty({},"passive",{get:function(){f=
!0}});e.win.addEventListener&&e.win.removeEventListener&&(e.win.addEventListener("testPassive",e.noop,l),e.win.removeEventListener("testPassive",e.noop,l))}return f}();e.charts=[];e.dateFormats={};e.seriesTypes={};e.symbolSizes={};e.chartCount=0})(f||(f={}));"";return f});K(l,"Core/Utilities.js",[l["Core/Globals.js"]],function(f){function e(c,u,g,k){var A=u?"Highcharts error":"Highcharts warning";32===c&&(c=""+A+": Deprecated member");var m=t(c),n=m?""+A+" #"+c+": www.highcharts.com/errors/"+c+"/":
c.toString();if("undefined"!==typeof k){var b="";m&&(n+="?");w(k,function(a,c){b+="\n - ".concat(c,": ").concat(a);m&&(n+=encodeURI(c)+"="+encodeURI(a))});n+=b}x(f,"displayError",{chart:g,code:c,message:n,params:k},function(){if(u)throw Error(n);a.console&&-1===e.messages.indexOf(n)&&console.warn(n)});e.messages.push(n)}function l(a,c){var A={};w(a,function(u,g){if(G(a[g],!0)&&!a.nodeType&&c[g])u=l(a[g],c[g]),Object.keys(u).length&&(A[g]=u);else if(G(a[g])||a[g]!==c[g]||g in a&&!(g in c))A[g]=a[g]});
return A}function C(a,c){return parseInt(a,c||10)}function v(a){return"string"===typeof a}function E(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a}function G(a,c){return!!a&&"object"===typeof a&&(!c||!E(a))}function B(a){return G(a)&&"number"===typeof a.nodeType}function y(a){var c=a&&a.constructor;return!(!G(a,!0)||B(a)||!c||!c.name||"Object"===c.name)}function t(a){return"number"===typeof a&&!isNaN(a)&&Infinity>a&&-Infinity<a}function h(a){return"undefined"!==
typeof a&&null!==a}function d(a,c,g){var A=v(c)&&!h(g),u,k=function(c,g){h(c)?a.setAttribute(g,c):A?(u=a.getAttribute(g))||"class"!==g||(u=a.getAttribute(g+"Name")):a.removeAttribute(g)};v(c)?k(g,c):w(c,k);return u}function b(a,c){var A;a||(a={});for(A in c)a[A]=c[A];return a}function p(){for(var a=arguments,c=a.length,g=0;g<c;g++){var k=a[g];if("undefined"!==typeof k&&null!==k)return k}}function q(a,c){f.isMS&&!f.svg&&c&&h(c.opacity)&&(c.filter="alpha(opacity=".concat(100*c.opacity,")"));b(a.style,
c)}function r(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))}function n(a,c){return 1E14<a?a:parseFloat(a.toPrecision(c||14))}function J(c,u,g){var A=f.getStyle||J;if("width"===u)return u=Math.min(c.offsetWidth,c.scrollWidth),g=c.getBoundingClientRect&&c.getBoundingClientRect().width,g<u&&g>=u-1&&(u=Math.floor(g)),Math.max(0,u-(A(c,"padding-left",!0)||0)-(A(c,"padding-right",!0)||0));if("height"===u)return Math.max(0,Math.min(c.offsetHeight,c.scrollHeight)-(A(c,"padding-top",!0)||0)-(A(c,
"padding-bottom",!0)||0));a.getComputedStyle||e(27,!0);if(c=a.getComputedStyle(c,void 0)){var k=c.getPropertyValue(u);p(g,"opacity"!==u)&&(k=C(k))}return k}function w(a,c,g){for(var A in a)Object.hasOwnProperty.call(a,A)&&c.call(g||a[A],a[A],A,a)}function z(a,c,g){function A(c,I){var A=a.removeEventListener||f.removeEventListenerPolyfill;A&&A.call(a,c,I,!1)}function u(u){var I;if(a.nodeName){if(c){var H={};H[c]=!0}else H=u;w(H,function(a,c){if(u[c])for(I=u[c].length;I--;)A(c,u[c][I].fn)})}}var k=
"function"===typeof a&&a.prototype||a;if(Object.hasOwnProperty.call(k,"hcEvents")){var m=k.hcEvents;c?(k=m[c]||[],g?(m[c]=k.filter(function(a){return g!==a.fn}),A(c,g)):(u(m),m[c]=[])):(u(m),delete k.hcEvents)}}function x(a,c,g,m){g=g||{};if(k.createEvent&&(a.dispatchEvent||a.fireEvent&&a!==f)){var A=k.createEvent("Events");A.initEvent(c,!0,!0);g=b(A,g);a.dispatchEvent?a.dispatchEvent(g):a.fireEvent(c,g)}else if(a.hcEvents){g.target||b(g,{preventDefault:function(){g.defaultPrevented=!0},target:a,
type:c});A=[];for(var u=a,n=!1;u.hcEvents;)Object.hasOwnProperty.call(u,"hcEvents")&&u.hcEvents[c]&&(A.length&&(n=!0),A.unshift.apply(A,u.hcEvents[c])),u=Object.getPrototypeOf(u);n&&A.sort(function(a,c){return a.order-c.order});A.forEach(function(c){!1===c.fn.call(a,g)&&g.preventDefault()})}m&&!g.defaultPrevented&&m.call(a,g)}var m=f.charts,k=f.doc,a=f.win;(e||(e={})).messages=[];Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};var g=Array.prototype.find?function(a,c){return a.find(c)}:
function(a,c){var A,u=a.length;for(A=0;A<u;A++)if(c(a[A],A))return a[A]};w({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(a,c){f[c]=function(A){var u;e(32,!1,void 0,(u={},u["Highcharts.".concat(c)]="use Array.".concat(a),u));return Array.prototype[a].apply(A,[].slice.call(arguments,1))}});var c,D=function(){var a=Math.random().toString(36).substring(2,9)+"-",u=0;return function(){return"highcharts-"+(c?"":a)+u++}}();a.jQuery&&(a.jQuery.fn.highcharts=function(){var a=
[].slice.call(arguments);if(this[0])return a[0]?(new (f[v(a[0])?a.shift():"Chart"])(this[0],a[0],a[1]),this):m[d(this[0],"data-highcharts-chart")]});g={addEvent:function(a,c,g,k){void 0===k&&(k={});var u="function"===typeof a&&a.prototype||a;Object.hasOwnProperty.call(u,"hcEvents")||(u.hcEvents={});u=u.hcEvents;f.Point&&a instanceof f.Point&&a.series&&a.series.chart&&(a.series.chart.runTrackerClick=!0);var A=a.addEventListener||f.addEventListenerPolyfill;A&&A.call(a,c,g,f.supportsPassiveEvents?{passive:void 0===
k.passive?-1!==c.indexOf("touch"):k.passive,capture:!1}:!1);u[c]||(u[c]=[]);u[c].push({fn:g,order:"number"===typeof k.order?k.order:Infinity});u[c].sort(function(a,c){return a.order-c.order});return function(){z(a,c,g)}},arrayMax:function(a){for(var c=a.length,g=a[0];c--;)a[c]>g&&(g=a[c]);return g},arrayMin:function(a){for(var c=a.length,g=a[0];c--;)a[c]<g&&(g=a[c]);return g},attr:d,clamp:function(a,c,g){return a>c?a<g?a:g:c},cleanRecursively:l,clearTimeout:function(a){h(a)&&clearTimeout(a)},correctFloat:n,
createElement:function(a,c,g,m,n){a=k.createElement(a);c&&b(a,c);n&&q(a,{padding:"0",border:"none",margin:"0"});g&&q(a,g);m&&m.appendChild(a);return a},css:q,defined:h,destroyObjectProperties:function(a,c){w(a,function(g,u){g&&g!==c&&g.destroy&&g.destroy();delete a[u]})},discardElement:function(a){a&&a.parentElement&&a.parentElement.removeChild(a)},erase:function(a,c){for(var g=a.length;g--;)if(a[g]===c){a.splice(g,1);break}},error:e,extend:b,extendClass:function(a,c){var g=function(){};g.prototype=
new a;b(g.prototype,c);return g},find:g,fireEvent:x,getMagnitude:r,getNestedProperty:function(c,g){for(c=c.split(".");c.length&&h(g);){var u=c.shift();if("undefined"===typeof u||"__proto__"===u)return;g=g[u];if(!h(g)||"function"===typeof g||"number"===typeof g.nodeType||g===a)return}return g},getStyle:J,inArray:function(a,c,g){e(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"});return c.indexOf(a,g)},isArray:E,isClass:y,isDOMElement:B,isFunction:function(a){return"function"===typeof a},isNumber:t,
isObject:G,isString:v,keys:function(a){e(32,!1,void 0,{"Highcharts.keys":"use Object.keys"});return Object.keys(a)},merge:function(){var a,c=arguments,g={},k=function(a,c){"object"!==typeof a&&(a={});w(c,function(g,I){"__proto__"!==I&&"constructor"!==I&&(!G(g,!0)||y(g)||B(g)?a[I]=c[I]:a[I]=k(a[I]||{},g))});return a};!0===c[0]&&(g=c[1],c=Array.prototype.slice.call(c,2));var m=c.length;for(a=0;a<m;a++)g=k(g,c[a]);return g},normalizeTickInterval:function(a,c,g,k,m){var u=a;g=p(g,r(a));var A=a/g;c||(c=
m?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===k&&(1===g?c=c.filter(function(a){return 0===a%1}):.1>=g&&(c=[1/g])));for(k=0;k<c.length&&!(u=c[k],m&&u*g>=a||!m&&A<=(c[k]+(c[k+1]||c[k]))/2);k++);return u=n(u*g,-Math.round(Math.log(.001)/Math.LN10))},objectEach:w,offset:function(c){var g=k.documentElement;c=c.parentElement||c.parentNode?c.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:c.top+(a.pageYOffset||g.scrollTop)-(g.clientTop||0),left:c.left+(a.pageXOffset||g.scrollLeft)-
(g.clientLeft||0),width:c.width,height:c.height}},pad:function(a,c,g){return Array((c||2)+1-String(a).replace("-","").length).join(g||"0")+a},pick:p,pInt:C,relativeLength:function(a,c,g){return/%$/.test(a)?c*parseFloat(a)/100+(g||0):parseFloat(a)},removeEvent:z,splat:function(a){return E(a)?a:[a]},stableSort:function(a,c){var g=a.length,k,u;for(u=0;u<g;u++)a[u].safeI=u;a.sort(function(a,g){k=c(a,g);return 0===k?a.safeI-g.safeI:k});for(u=0;u<g;u++)delete a[u].safeI},syncTimeout:function(a,c,g){if(0<
c)return setTimeout(a,c,g);a.call(0,g);return-1},timeUnits:{millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5},uniqueKey:D,useSerialIds:function(a){return c=p(a,c)},wrap:function(a,c,g){var k=a[c];a[c]=function(){var a=Array.prototype.slice.call(arguments),c=arguments,u=this;u.proceed=function(){k.apply(u,arguments.length?arguments:c)};a.unshift(k);a=g.apply(this,a);u.proceed=null;return a}}};"";return g});K(l,"Core/Chart/ChartDefaults.js",[],function(){return{alignThresholds:!1,
panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},zoomBySingleTouch:!1,width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}});K(l,"Core/Color/Color.js",[l["Core/Globals.js"],l["Core/Utilities.js"]],function(f,e){var l=e.isNumber,C=e.merge,v=e.pInt;e=function(){function e(l){this.rgba=
[NaN,NaN,NaN,NaN];this.input=l;var B=f.Color;if(B&&B!==e)return new B(l);if(!(this instanceof e))return new e(l);this.init(l)}e.parse=function(f){return f?new e(f):e.None};e.prototype.init=function(f){var B;if("object"===typeof f&&"undefined"!==typeof f.stops)this.stops=f.stops.map(function(d){return new e(d[1])});else if("string"===typeof f){this.input=f=e.names[f.toLowerCase()]||f;if("#"===f.charAt(0)){var y=f.length;var t=parseInt(f.substr(1),16);7===y?B=[(t&16711680)>>16,(t&65280)>>8,t&255,1]:
4===y&&(B=[(t&3840)>>4|(t&3840)>>8,(t&240)>>4|t&240,(t&15)<<4|t&15,1])}if(!B)for(t=e.parsers.length;t--&&!B;){var h=e.parsers[t];(y=h.regex.exec(f))&&(B=h.parse(y))}}B&&(this.rgba=B)};e.prototype.get=function(e){var B=this.input,y=this.rgba;if("object"===typeof B&&"undefined"!==typeof this.stops){var t=C(B);t.stops=[].slice.call(t.stops);this.stops.forEach(function(h,d){t.stops[d]=[t.stops[d][0],h.get(e)]});return t}return y&&l(y[0])?"rgb"===e||!e&&1===y[3]?"rgb("+y[0]+","+y[1]+","+y[2]+")":"a"===
e?"".concat(y[3]):"rgba("+y.join(",")+")":B};e.prototype.brighten=function(e){var B=this.rgba;if(this.stops)this.stops.forEach(function(t){t.brighten(e)});else if(l(e)&&0!==e)for(var y=0;3>y;y++)B[y]+=v(255*e),0>B[y]&&(B[y]=0),255<B[y]&&(B[y]=255);return this};e.prototype.setOpacity=function(e){this.rgba[3]=e;return this};e.prototype.tweenTo=function(e,B){var y=this.rgba,t=e.rgba;if(!l(y[0])||!l(t[0]))return e.input||"none";e=1!==t[3]||1!==y[3];return(e?"rgba(":"rgb(")+Math.round(t[0]+(y[0]-t[0])*
(1-B))+","+Math.round(t[1]+(y[1]-t[1])*(1-B))+","+Math.round(t[2]+(y[2]-t[2])*(1-B))+(e?","+(t[3]+(y[3]-t[3])*(1-B)):"")+")"};e.names={white:"#ffffff",black:"#000000"};e.parsers=[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(e){return[v(e[1]),v(e[2]),v(e[3]),parseFloat(e[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(e){return[v(e[1]),v(e[2]),v(e[3]),1]}}];e.None=new e("");return e}();
"";return e});K(l,"Core/Color/Palettes.js",[],function(){return{colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ")}});K(l,"Core/Time.js",[l["Core/Globals.js"],l["Core/Utilities.js"]],function(f,e){var l=f.win,C=e.defined,v=e.error,E=e.extend,G=e.isObject,B=e.merge,y=e.objectEach,t=e.pad,h=e.pick,d=e.splat,b=e.timeUnits,p=f.isSafari&&l.Intl&&l.Intl.DateTimeFormat.prototype.formatRange,q=f.isSafari&&l.Intl&&!l.Intl.DateTimeFormat.prototype.formatRange;
e=function(){function r(n){this.options={};this.variableTimezone=this.useUTC=!1;this.Date=l.Date;this.getTimezoneOffset=this.timezoneOffsetFunction();this.update(n)}r.prototype.get=function(n,b){if(this.variableTimezone||this.timezoneOffset){var d=b.getTime(),r=d-this.getTimezoneOffset(b);b.setTime(r);n=b["getUTC"+n]();b.setTime(d);return n}return this.useUTC?b["getUTC"+n]():b["get"+n]()};r.prototype.set=function(n,b,d){if(this.variableTimezone||this.timezoneOffset){if("Milliseconds"===n||"Seconds"===
n||"Minutes"===n&&0===this.getTimezoneOffset(b)%36E5)return b["setUTC"+n](d);var r=this.getTimezoneOffset(b);r=b.getTime()-r;b.setTime(r);b["setUTC"+n](d);n=this.getTimezoneOffset(b);r=b.getTime()+n;return b.setTime(r)}return this.useUTC||p&&"FullYear"===n?b["setUTC"+n](d):b["set"+n](d)};r.prototype.update=function(b){var n=h(b&&b.useUTC,!0);this.options=b=B(!0,this.options||{},b);this.Date=b.Date||l.Date||Date;this.timezoneOffset=(this.useUTC=n)&&b.timezoneOffset||void 0;this.getTimezoneOffset=this.timezoneOffsetFunction();
this.variableTimezone=n&&!(!b.getTimezoneOffset&&!b.timezone)};r.prototype.makeTime=function(b,d,r,p,x,m){if(this.useUTC){var k=this.Date.UTC.apply(0,arguments);var a=this.getTimezoneOffset(k);k+=a;var g=this.getTimezoneOffset(k);a!==g?k+=g-a:a-36E5!==this.getTimezoneOffset(k-36E5)||q||(k-=36E5)}else k=(new this.Date(b,d,h(r,1),h(p,0),h(x,0),h(m,0))).getTime();return k};r.prototype.timezoneOffsetFunction=function(){var b=this,d=this.options,r=d.getTimezoneOffset,p=d.moment||l.moment;if(!this.useUTC)return function(b){return 6E4*
(new Date(b.toString())).getTimezoneOffset()};if(d.timezone){if(p)return function(b){return 6E4*-p.tz(b,d.timezone).utcOffset()};v(25)}return this.useUTC&&r?function(b){return 6E4*r(b.valueOf())}:function(){return 6E4*(b.timezoneOffset||0)}};r.prototype.dateFormat=function(b,d,r){if(!C(d)||isNaN(d))return f.defaultOptions.lang&&f.defaultOptions.lang.invalidDate||"";b=h(b,"%Y-%m-%d %H:%M:%S");var n=this,p=new this.Date(d),m=this.get("Hours",p),k=this.get("Day",p),a=this.get("Date",p),g=this.get("Month",
p),c=this.get("FullYear",p),D=f.defaultOptions.lang,A=D&&D.weekdays,u=D&&D.shortWeekdays;p=E({a:u?u[k]:A[k].substr(0,3),A:A[k],d:t(a),e:t(a,2," "),w:k,b:D.shortMonths[g],B:D.months[g],m:t(g+1),o:g+1,y:c.toString().substr(2,2),Y:c,H:t(m),k:m,I:t(m%12||12),l:m%12||12,M:t(this.get("Minutes",p)),p:12>m?"AM":"PM",P:12>m?"am":"pm",S:t(p.getSeconds()),L:t(Math.floor(d%1E3),3)},f.dateFormats);y(p,function(a,c){for(;-1!==b.indexOf("%"+c);)b=b.replace("%"+c,"function"===typeof a?a.call(n,d):a)});return r?b.substr(0,
1).toUpperCase()+b.substr(1):b};r.prototype.resolveDTLFormat=function(b){return G(b,!0)?b:(b=d(b),{main:b[0],from:b[1],to:b[2]})};r.prototype.getTimeTicks=function(d,r,p,q){var n=this,m=[],k={},a=new n.Date(r),g=d.unitRange,c=d.count||1,D;q=h(q,1);if(C(r)){n.set("Milliseconds",a,g>=b.second?0:c*Math.floor(n.get("Milliseconds",a)/c));g>=b.second&&n.set("Seconds",a,g>=b.minute?0:c*Math.floor(n.get("Seconds",a)/c));g>=b.minute&&n.set("Minutes",a,g>=b.hour?0:c*Math.floor(n.get("Minutes",a)/c));g>=b.hour&&
n.set("Hours",a,g>=b.day?0:c*Math.floor(n.get("Hours",a)/c));g>=b.day&&n.set("Date",a,g>=b.month?1:Math.max(1,c*Math.floor(n.get("Date",a)/c)));if(g>=b.month){n.set("Month",a,g>=b.year?0:c*Math.floor(n.get("Month",a)/c));var A=n.get("FullYear",a)}g>=b.year&&n.set("FullYear",a,A-A%c);g===b.week&&(A=n.get("Day",a),n.set("Date",a,n.get("Date",a)-A+q+(A<q?-7:0)));A=n.get("FullYear",a);q=n.get("Month",a);var u=n.get("Date",a),z=n.get("Hours",a);r=a.getTime();!n.variableTimezone&&n.useUTC||!C(p)||(D=p-
r>4*b.month||n.getTimezoneOffset(r)!==n.getTimezoneOffset(p));r=a.getTime();for(a=1;r<p;)m.push(r),r=g===b.year?n.makeTime(A+a*c,0):g===b.month?n.makeTime(A,q+a*c):!D||g!==b.day&&g!==b.week?D&&g===b.hour&&1<c?n.makeTime(A,q,u,z+a*c):r+g*c:n.makeTime(A,q,u+a*c*(g===b.day?1:7)),a++;m.push(r);g<=b.hour&&1E4>m.length&&m.forEach(function(a){0===a%18E5&&"000000000"===n.dateFormat("%H%M%S%L",a)&&(k[a]="day")})}m.info=E(d,{higherRanks:k,totalRange:g*c});return m};r.prototype.getDateFormat=function(n,d,r,
p){var q=this.dateFormat("%m-%d %H:%M:%S.%L",d),m={millisecond:15,second:12,minute:9,hour:6,day:3},k="millisecond";for(a in b){if(n===b.week&&+this.dateFormat("%w",d)===r&&"00:00:00.000"===q.substr(6)){var a="week";break}if(b[a]>n){a=k;break}if(m[a]&&q.substr(m[a])!=="01-01 00:00:00.000".substr(m[a]))break;"week"!==a&&(k=a)}return this.resolveDTLFormat(p[a]).main};return r}();"";return e});K(l,"Core/DefaultOptions.js",[l["Core/Chart/ChartDefaults.js"],l["Core/Color/Color.js"],l["Core/Globals.js"],
l["Core/Color/Palettes.js"],l["Core/Time.js"],l["Core/Utilities.js"]],function(f,e,l,C,v,E){e=e.parse;var P=E.merge,B={colors:C.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",
numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:f,title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",
alignColumns:!0,className:"highcharts-no-tooltip",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",
x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:l.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",
hideDelay:500,padding:8,shape:"callout",shared:!1,snap:l.isTouchDevice?25:10,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:e("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"12px",whiteSpace:"nowrap"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",
x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};B.chart.styledMode=!1;"";var y=new v(P(B.global,B.time));f={defaultOptions:B,defaultTime:y,getOptions:function(){return B},setOptions:function(t){P(!0,B,t);if(t.time||t.global)l.time?l.time.update(P(B.global,B.time,t.global,t.time)):l.time=y;return B}};"";return f});K(l,"Core/Animation/Fx.js",[l["Core/Color/Color.js"],l["Core/Globals.js"],l["Core/Utilities.js"]],function(f,e,l){var P=
f.parse,v=e.win,E=l.isNumber,G=l.objectEach;return function(){function e(e,t,h){this.pos=NaN;this.options=t;this.elem=e;this.prop=h}e.prototype.dSetter=function(){var e=this.paths,t=e&&e[0];e=e&&e[1];var h=this.now||0,d=[];if(1!==h&&t&&e)if(t.length===e.length&&1>h)for(var b=0;b<e.length;b++){for(var p=t[b],q=e[b],r=[],n=0;n<q.length;n++){var J=p[n],w=q[n];E(J)&&E(w)&&("A"!==q[0]||4!==n&&5!==n)?r[n]=J+h*(w-J):r[n]=w}d.push(r)}else d=e;else d=this.toD||[];this.elem.attr("d",d,void 0,!0)};e.prototype.update=
function(){var e=this.elem,t=this.prop,h=this.now,d=this.options.step;if(this[t+"Setter"])this[t+"Setter"]();else e.attr?e.element&&e.attr(t,h,null,!0):e.style[t]=h+this.unit;d&&d.call(e,h,this)};e.prototype.run=function(y,t,h){var d=this,b=d.options,p=function(b){return p.stopped?!1:d.step(b)},q=v.requestAnimationFrame||function(b){setTimeout(b,13)},r=function(){for(var b=0;b<e.timers.length;b++)e.timers[b]()||e.timers.splice(b--,1);e.timers.length&&q(r)};y!==t||this.elem["forceAnimate:"+this.prop]?
(this.startTime=+new Date,this.start=y,this.end=t,this.unit=h,this.now=this.start,this.pos=0,p.elem=this.elem,p.prop=this.prop,p()&&1===e.timers.push(p)&&q(r)):(delete b.curAnim[this.prop],b.complete&&0===Object.keys(b.curAnim).length&&b.complete.call(this.elem))};e.prototype.step=function(e){var t=+new Date,h=this.options,d=this.elem,b=h.complete,p=h.duration,q=h.curAnim;if(d.attr&&!d.element)e=!1;else if(e||t>=p+this.startTime){this.now=this.end;this.pos=1;this.update();var r=q[this.prop]=!0;G(q,
function(b){!0!==b&&(r=!1)});r&&b&&b.call(d);e=!1}else this.pos=h.easing((t-this.startTime)/p),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0;return e};e.prototype.initPath=function(e,t,h){function d(b,m){for(;b.length<z;){var k=b[0],a=m[z-b.length];a&&"M"===k[0]&&(b[0]="C"===a[0]?["C",k[1],k[2],k[1],k[2],k[1],k[2]]:["L",k[1],k[2]]);b.unshift(k);r&&(k=b.pop(),b.push(b[b.length-1],k))}}function b(b,m){for(;b.length<z;)if(m=b[Math.floor(b.length/n)-1].slice(),"C"===m[0]&&(m[1]=
m[5],m[2]=m[6]),r){var k=b[Math.floor(b.length/n)].slice();b.splice(b.length/2,0,m,k)}else b.push(m)}var p=e.startX,q=e.endX;h=h.slice();var r=e.isArea,n=r?2:1;t=t&&t.slice();if(!t)return[h,h];if(p&&q&&q.length){for(e=0;e<p.length;e++)if(p[e]===q[0]){var J=e;break}else if(p[0]===q[q.length-p.length+e]){J=e;var w=!0;break}else if(p[p.length-1]===q[q.length-p.length+e]){J=p.length-e;break}"undefined"===typeof J&&(t=[])}if(t.length&&E(J)){var z=h.length+J*n;w?(d(t,h),b(h,t)):(d(h,t),b(t,h))}return[t,
h]};e.prototype.fillSetter=function(){e.prototype.strokeSetter.apply(this,arguments)};e.prototype.strokeSetter=function(){this.elem.attr(this.prop,P(this.start).tweenTo(P(this.end),this.pos),void 0,!0)};e.timers=[];return e}()});K(l,"Core/Animation/AnimationUtilities.js",[l["Core/Animation/Fx.js"],l["Core/Utilities.js"]],function(f,e){function l(b){return y(b)?t({duration:500,defer:0},b):{duration:b?500:0,defer:0}}function C(b,d){for(var p=f.timers.length;p--;)f.timers[p].elem!==b||d&&d!==f.timers[p].prop||
(f.timers[p].stopped=!0)}var v=e.defined,E=e.getStyle,G=e.isArray,B=e.isNumber,y=e.isObject,t=e.merge,h=e.objectEach,d=e.pick;return{animate:function(b,d,q){var r,n="",p,w;if(!y(q)){var z=arguments;q={duration:z[2],easing:z[3],complete:z[4]}}B(q.duration)||(q.duration=400);q.easing="function"===typeof q.easing?q.easing:Math[q.easing]||Math.easeInOutSine;q.curAnim=t(d);h(d,function(h,m){C(b,m);w=new f(b,q,m);p=void 0;"d"===m&&G(d.d)?(w.paths=w.initPath(b,b.pathArray,d.d),w.toD=d.d,r=0,p=1):b.attr?
r=b.attr(m):(r=parseFloat(E(b,m))||0,"opacity"!==m&&(n="px"));p||(p=h);"string"===typeof p&&p.match("px")&&(p=p.replace(/px/g,""));w.run(r,p,n)})},animObject:l,getDeferredAnimation:function(b,d,q){var r=l(d),n=0,p=0;(q?[q]:b.series).forEach(function(b){b=l(b.options.animation);n=d&&v(d.defer)?r.defer:Math.max(n,b.duration+b.defer);p=Math.min(r.duration,b.duration)});b.renderer.forExport&&(n=0);return{defer:Math.max(0,n-p),duration:Math.min(n,p)}},setAnimation:function(b,p){p.renderer.globalAnimation=
d(b,p.options.chart.animation,!0)},stop:C}});K(l,"Core/Renderer/HTML/AST.js",[l["Core/Globals.js"],l["Core/Utilities.js"]],function(f,e){var l=f.SVG_NS,C=e.attr,v=e.createElement,E=e.css,G=e.error,B=e.isFunction,y=e.isString,t=e.objectEach,h=e.splat,d=(e=f.win.trustedTypes)&&B(e.createPolicy)&&e.createPolicy("highcharts",{createHTML:function(b){return b}}),b=d?d.createHTML(""):"";try{var p=!!(new DOMParser).parseFromString(b,"text/html")}catch(q){p=!1}B=function(){function q(b){this.nodes="string"===
typeof b?this.parseMarkup(b):b}q.filterUserAttributes=function(b){t(b,function(d,p){var n=!0;-1===q.allowedAttributes.indexOf(p)&&(n=!1);-1!==["background","dynsrc","href","lowsrc","src"].indexOf(p)&&(n=y(d)&&q.allowedReferences.some(function(b){return 0===d.indexOf(b)}));n||(G(33,!1,void 0,{"Invalid attribute in config":"".concat(p)}),delete b[p])});return b};q.parseStyle=function(b){return b.split(";").reduce(function(b,d){d=d.split(":").map(function(b){return b.trim()});var p=d.shift();p&&d.length&&
(b[p.replace(/-([a-z])/g,function(b){return b[1].toUpperCase()})]=d.join(":"));return b},{})};q.setElementHTML=function(b,d){b.innerHTML=q.emptyHTML;d&&(new q(d)).addToDOM(b)};q.prototype.addToDOM=function(b){function d(b,p){var n;h(b).forEach(function(b){var m=b.tagName,k=b.textContent?f.doc.createTextNode(b.textContent):void 0,a=q.bypassHTMLFiltering;if(m)if("#text"===m)var g=k;else if(-1!==q.allowedTags.indexOf(m)||a){m=f.doc.createElementNS("svg"===m?l:p.namespaceURI||l,m);var c=b.attributes||
{};t(b,function(a,g){"tagName"!==g&&"attributes"!==g&&"children"!==g&&"style"!==g&&"textContent"!==g&&(c[g]=a)});C(m,a?c:q.filterUserAttributes(c));b.style&&E(m,b.style);k&&m.appendChild(k);d(b.children||[],m);g=m}else G(33,!1,void 0,{"Invalid tagName in config":m});g&&p.appendChild(g);n=g});return n}return d(this.nodes,b)};q.prototype.parseMarkup=function(b){var n=[];b=b.trim().replace(/ style="/g,' data-style="');if(p)b=(new DOMParser).parseFromString(d?d.createHTML(b):b,"text/html");else{var r=
v("div");r.innerHTML=b;b={body:r}}var h=function(b,d){var m=b.nodeName.toLowerCase(),k={tagName:m};"#text"===m&&(k.textContent=b.textContent||"");if(m=b.attributes){var a={};[].forEach.call(m,function(c){"data-style"===c.name?k.style=q.parseStyle(c.value):a[c.name]=c.value});k.attributes=a}if(b.childNodes.length){var g=[];[].forEach.call(b.childNodes,function(a){h(a,g)});g.length&&(k.children=g)}d.push(k)};[].forEach.call(b.body.childNodes,function(b){return h(b,n)});return n};q.allowedAttributes=
"aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" ");
q.allowedReferences="https:// http:// mailto: / ../ ./ #".split(" ");q.allowedTags="a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" ");q.emptyHTML=b;q.bypassHTMLFiltering=!1;return q}();"";return B});
K(l,"Core/FormatUtilities.js",[l["Core/DefaultOptions.js"],l["Core/Utilities.js"]],function(f,e){function l(e,h,d,b){e=+e||0;h=+h;var p=C.lang,q=(e.toString().split(".")[1]||"").split("e")[0].length,r=e.toString().split("e"),n=h;if(-1===h)h=Math.min(q,20);else if(!G(h))h=2;else if(h&&r[1]&&0>r[1]){var J=h+ +r[1];0<=J?(r[0]=(+r[0]).toExponential(J).split("e")[0],h=J):(r[0]=r[0].split(".")[0]||0,e=20>h?(r[0]*Math.pow(10,r[1])).toFixed(h):0,r[1]=0)}J=(Math.abs(r[1]?r[0]:e)+Math.pow(10,-Math.max(h,q)-
1)).toFixed(h);q=String(y(J));var w=3<q.length?q.length%3:0;d=B(d,p.decimalPoint);b=B(b,p.thousandsSep);e=(0>e?"-":"")+(w?q.substr(0,w)+b:"");e=0>+r[1]&&!n?"0":e+q.substr(w).replace(/(\d{3})(?=\d)/g,"$1"+b);h&&(e+=d+J.slice(-h));r[1]&&0!==+e&&(e+="e"+r[1]);return e}var C=f.defaultOptions,v=f.defaultTime,E=e.getNestedProperty,G=e.isNumber,B=e.pick,y=e.pInt;return{dateFormat:function(e,h,d){return v.dateFormat(e,h,d)},format:function(e,h,d){var b="{",p=!1,q=/f$/,r=/\.([0-9])/,n=C.lang,J=d&&d.time||
v;d=d&&d.numberFormatter||l;for(var w=[];e;){var z=e.indexOf(b);if(-1===z)break;var x=e.slice(0,z);if(p){x=x.split(":");b=E(x.shift()||"",h);if(x.length&&"number"===typeof b)if(x=x.join(":"),q.test(x)){var m=parseInt((x.match(r)||["","-1"])[1],10);null!==b&&(b=d(b,m,n.decimalPoint,-1<x.indexOf(",")?n.thousandsSep:""))}else b=J.dateFormat(x,b);w.push(b)}else w.push(x);e=e.slice(z+1);b=(p=!p)?"}":"{"}w.push(e);return w.join("")},numberFormat:l}});K(l,"Core/Renderer/RendererUtilities.js",[l["Core/Utilities.js"]],
function(f){var e=f.clamp,l=f.pick,C=f.stableSort,v;(function(f){function v(f,y,t){var h=f,d=h.reducedLen||y,b=function(b,d){return(d.rank||0)-(b.rank||0)},p=function(b,d){return b.target-d.target},q,r=!0,n=[],J=0;for(q=f.length;q--;)J+=f[q].size;if(J>d){C(f,b);for(J=q=0;J<=d;)J+=f[q].size,q++;n=f.splice(q-1,f.length)}C(f,p);for(f=f.map(function(b){return{size:b.size,targets:[b.target],align:l(b.align,.5)}});r;){for(q=f.length;q--;)d=f[q],b=(Math.min.apply(0,d.targets)+Math.max.apply(0,d.targets))/
2,d.pos=e(b-d.size*d.align,0,y-d.size);q=f.length;for(r=!1;q--;)0<q&&f[q-1].pos+f[q-1].size>f[q].pos&&(f[q-1].size+=f[q].size,f[q-1].targets=f[q-1].targets.concat(f[q].targets),f[q-1].align=.5,f[q-1].pos+f[q-1].size>y&&(f[q-1].pos=y-f[q-1].size),f.splice(q,1),r=!0)}h.push.apply(h,n);q=0;f.some(function(b){var d=0;return(b.targets||[]).some(function(){h[q].pos=b.pos+d;if("undefined"!==typeof t&&Math.abs(h[q].pos-h[q].target)>t)return h.slice(0,q+1).forEach(function(b){return delete b.pos}),h.reducedLen=
(h.reducedLen||y)-.1*y,h.reducedLen>.1*y&&v(h,y,t),!0;d+=h[q].size;q++;return!1})});C(h,p);return h}f.distribute=v})(v||(v={}));return v});K(l,"Core/Renderer/SVG/SVGElement.js",[l["Core/Animation/AnimationUtilities.js"],l["Core/Renderer/HTML/AST.js"],l["Core/Color/Color.js"],l["Core/Globals.js"],l["Core/Utilities.js"]],function(f,e,l,C,v){var P=f.animate,G=f.animObject,B=f.stop,y=C.deg2rad,t=C.doc,h=C.noop,d=C.svg,b=C.SVG_NS,p=C.win,q=v.addEvent,r=v.attr,n=v.createElement,J=v.css,w=v.defined,z=v.erase,
x=v.extend,m=v.fireEvent,k=v.isArray,a=v.isFunction,g=v.isNumber,c=v.isString,D=v.merge,A=v.objectEach,u=v.pick,L=v.pInt,S=v.syncTimeout,R=v.uniqueKey;f=function(){function f(){this.element=void 0;this.onEvents={};this.opacity=1;this.renderer=void 0;this.SVG_NS=b;this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ")}f.prototype._defaultGetter=function(a){a=u(this[a+"Value"],this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&
(a=parseFloat(a));return a};f.prototype._defaultSetter=function(a,c,g){g.setAttribute(c,a)};f.prototype.add=function(a){var c=this.renderer,g=this.element;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;"undefined"!==typeof this.textStr&&"text"===this.element.nodeName&&c.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)var b=this.zIndexSetter();b||(a?a.element:c.box).appendChild(g);if(this.onAdd)this.onAdd();return this};f.prototype.addClass=function(a,c){var g=c?"":this.attr("class")||
"";a=(a||"").split(/ /g).reduce(function(a,c){-1===g.indexOf(c)&&a.push(c);return a},g?[g]:[]).join(" ");a!==g&&this.attr("class",a);return this};f.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)};f.prototype.align=function(a,g,I){var b={},k=this.renderer,m=k.alignedObjects,d,p,F;if(a){if(this.alignOptions=a,this.alignByTranslate=g,!I||c(I))this.alignTo=d=I||"renderer",z(m,this),m.push(this),I=void 0}else a=this.alignOptions,g=this.alignByTranslate,
d=this.alignTo;I=u(I,k[d],"scrollablePlotBox"===d?k.plotBox:void 0,k);d=a.align;var A=a.verticalAlign;k=(I.x||0)+(a.x||0);m=(I.y||0)+(a.y||0);"right"===d?p=1:"center"===d&&(p=2);p&&(k+=(I.width-(a.width||0))/p);b[g?"translateX":"x"]=Math.round(k);"bottom"===A?F=1:"middle"===A&&(F=2);F&&(m+=(I.height-(a.height||0))/F);b[g?"translateY":"y"]=Math.round(m);this[this.placed?"animate":"attr"](b);this.placed=!0;this.alignAttr=b;return this};f.prototype.alignSetter=function(a){var c={left:"start",center:"middle",
right:"end"};c[a]&&(this.alignValue=a,this.element.setAttribute("text-anchor",c[a]))};f.prototype.animate=function(a,c,g){var I=this,b=G(u(c,this.renderer.globalAnimation,!0));c=b.defer;u(t.hidden,t.msHidden,t.webkitHidden,!1)&&(b.duration=0);0!==b.duration?(g&&(b.complete=g),S(function(){I.element&&P(I,a,b)},c)):(this.attr(a,void 0,g||b.complete),A(a,function(a,c){b.step&&b.step.call(this,a,{prop:c,pos:1,elem:this})},this));return this};f.prototype.applyTextOutline=function(a){var c=this.element;
-1!==a.indexOf("contrast")&&(a=a.replace(/contrast/g,this.renderer.getContrast(c.style.fill)));var g=a.split(" ");a=g[g.length-1];if((g=g[0])&&"none"!==g&&C.svg){this.fakeTS=!0;this.ySetter=this.xSetter;g=g.replace(/(^[\d\.]+)(.*?)$/g,function(a,c,g){return 2*Number(c)+g});this.removeTextOutline();var k=t.createElementNS(b,"tspan");r(k,{"class":"highcharts-text-outline",fill:a,stroke:a,"stroke-width":g,"stroke-linejoin":"round"});[].forEach.call(c.childNodes,function(a){var c=a.cloneNode(!0);c.removeAttribute&&
["fill","stroke","stroke-width","stroke"].forEach(function(a){return c.removeAttribute(a)});k.appendChild(c)});var u=t.createElementNS(b,"tspan");u.textContent="\u200b";["x","y"].forEach(function(a){var g=c.getAttribute(a);g&&u.setAttribute(a,g)});k.appendChild(u);c.insertBefore(k,c.firstChild)}};f.prototype.attr=function(a,c,g,b){var I=this.element,k=this.symbolCustomAttribs,H,u=this,F,m;if("string"===typeof a&&"undefined"!==typeof c){var d=a;a={};a[d]=c}"string"===typeof a?u=(this[a+"Getter"]||
this._defaultGetter).call(this,a,I):(A(a,function(c,g){F=!1;b||B(this,g);this.symbolName&&-1!==k.indexOf(g)&&(H||(this.symbolAttr(a),H=!0),F=!0);!this.rotation||"x"!==g&&"y"!==g||(this.doTransform=!0);F||(m=this[g+"Setter"]||this._defaultSetter,m.call(this,c,g,I),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(g)&&this.updateShadows(g,c,m))},this),this.afterSetters());g&&g.call(this);return u};f.prototype.clip=function(a){return this.attr("clip-path",a?"url("+
this.renderer.url+"#"+a.id+")":"none")};f.prototype.crisp=function(a,c){c=c||a.strokeWidth||0;var g=Math.round(c)%2/2;a.x=Math.floor(a.x||this.x||0)+g;a.y=Math.floor(a.y||this.y||0)+g;a.width=Math.floor((a.width||this.width||0)-2*g);a.height=Math.floor((a.height||this.height||0)-2*g);w(a.strokeWidth)&&(a.strokeWidth=c);return a};f.prototype.complexColor=function(a,c,g){var b=this.renderer,I,u,d,p,F,n,r,q,h,z,e=[],x;m(this.renderer,"complexColor",{args:arguments},function(){a.radialGradient?u="radialGradient":
a.linearGradient&&(u="linearGradient");if(u){d=a[u];F=b.gradients;n=a.stops;h=g.radialReference;k(d)&&(a[u]=d={x1:d[0],y1:d[1],x2:d[2],y2:d[3],gradientUnits:"userSpaceOnUse"});"radialGradient"===u&&h&&!w(d.gradientUnits)&&(p=d,d=D(d,b.getRadialAttr(h,p),{gradientUnits:"userSpaceOnUse"}));A(d,function(a,c){"id"!==c&&e.push(c,a)});A(n,function(a){e.push(a)});e=e.join(",");if(F[e])z=F[e].attr("id");else{d.id=z=R();var H=F[e]=b.createElement(u).attr(d).add(b.defs);H.radAttr=p;H.stops=[];n.forEach(function(a){0===
a[1].indexOf("rgba")?(I=l.parse(a[1]),r=I.get("rgb"),q=I.get("a")):(r=a[1],q=1);a=b.createElement("stop").attr({offset:a[0],"stop-color":r,"stop-opacity":q}).add(H);H.stops.push(a)})}x="url("+b.url+"#"+z+")";g.setAttribute(c,x);g.gradient=e;a.toString=function(){return x}}})};f.prototype.css=function(a){var c=this.styles,g={},b=this.element,k=!c;a.color&&(a.fill=a.color);c&&A(a,function(a,b){c&&c[b]!==a&&(g[b]=a,k=!0)});if(k){c&&(a=x(c,g));if(null===a.width||"auto"===a.width)delete this.textWidth;
else if("text"===b.nodeName.toLowerCase()&&a.width)var u=this.textWidth=L(a.width);this.styles=a;u&&!d&&this.renderer.forExport&&delete a.width;var m=D(a);b.namespaceURI===this.SVG_NS&&["textOutline","textOverflow","width"].forEach(function(a){return m&&delete m[a]});J(b,m);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a.textOutline&&this.applyTextOutline(a.textOutline))}return this};f.prototype.dashstyleSetter=function(a){var c=this["stroke-width"];"inherit"===c&&(c=
1);if(a=a&&a.toLowerCase()){var g=a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(a=g.length;a--;)g[a]=""+L(g[a])*u(c,NaN);a=g.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}};f.prototype.destroy=function(){var a=this,c=a.element||{},g=a.renderer,b=c.ownerSVGElement,k=g.isSVG&&
"SPAN"===c.nodeName&&a.parentGroup||void 0;c.onclick=c.onmouseout=c.onmouseover=c.onmousemove=c.point=null;B(a);if(a.clipPath&&b){var u=a.clipPath;[].forEach.call(b.querySelectorAll("[clip-path],[CLIP-PATH]"),function(a){-1<a.getAttribute("clip-path").indexOf(u.element.id)&&a.removeAttribute("clip-path")});a.clipPath=u.destroy()}if(a.stops){for(b=0;b<a.stops.length;b++)a.stops[b].destroy();a.stops.length=0;a.stops=void 0}a.safeRemoveChild(c);for(g.styledMode||a.destroyShadows();k&&k.div&&0===k.div.childNodes.length;)c=
k.parentGroup,a.safeRemoveChild(k.div),delete k.div,k=c;a.alignTo&&z(g.alignedObjects,a);A(a,function(c,g){a[g]&&a[g].parentGroup===a&&a[g].destroy&&a[g].destroy();delete a[g]})};f.prototype.destroyShadows=function(){(this.shadows||[]).forEach(function(a){this.safeRemoveChild(a)},this);this.shadows=void 0};f.prototype.destroyTextPath=function(a,c){var g=a.getElementsByTagName("text")[0];if(g){if(g.removeAttribute("dx"),g.removeAttribute("dy"),c.element.setAttribute("id",""),this.textPathWrapper&&
g.getElementsByTagName("textPath").length){for(a=this.textPathWrapper.element.childNodes;a.length;)g.appendChild(a[0]);g.removeChild(this.textPathWrapper.element)}}else if(a.getAttribute("dx")||a.getAttribute("dy"))a.removeAttribute("dx"),a.removeAttribute("dy");this.textPathWrapper&&(this.textPathWrapper=this.textPathWrapper.destroy())};f.prototype.dSetter=function(a,c,g){k(a)&&("string"===typeof a[0]&&(a=this.renderer.pathToSegments(a)),this.pathArray=a,a=a.reduce(function(a,c,g){return c&&c.join?
(g?a+" ":"")+c.join(" "):(c||"").toString()},""));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[c]!==a&&(g.setAttribute(c,a),this[c]=a)};f.prototype.fadeOut=function(a){var c=this;c.animate({opacity:0},{duration:u(a,150),complete:function(){c.hide()}})};f.prototype.fillSetter=function(a,c,g){"string"===typeof a?g.setAttribute(c,a):a&&this.complexColor(a,c,g)};f.prototype.getBBox=function(c,g){var b=this.alignValue,k=this.element,d=this.renderer,m=this.styles,p=this.textStr,A=d.cache,F=d.cacheKeys,n=k.namespaceURI===
this.SVG_NS;g=u(g,this.rotation,0);var r=d.styledMode?k&&f.prototype.getStyle.call(k,"font-size"):m&&m.fontSize,D;if(w(p)){var q=p.toString();-1===q.indexOf("<")&&(q=q.replace(/[0-9]/g,"0"));q+=["",g,r,this.textWidth,b,m&&m.textOverflow,m&&m.fontWeight].join()}q&&!c&&(D=A[q]);if(!D){if(n||d.forExport){try{var h=this.fakeTS&&function(a){var c=k.querySelector(".highcharts-text-outline");c&&J(c,{display:a})};a(h)&&h("none");D=k.getBBox?x({},k.getBBox()):{width:k.offsetWidth,height:k.offsetHeight};a(h)&&
h("")}catch(Z){""}if(!D||0>D.width)D={x:0,y:0,width:0,height:0}}else D=this.htmlGetBBox();if(d.isSVG&&(d=D.width,c=D.height,n&&(D.height=c={"11px,17":14,"13px,20":16}[""+(r||"")+",".concat(Math.round(c))]||c),g)){n=Number(k.getAttribute("y")||0)-D.y;b={right:1,center:.5}[b||0]||0;m=g*y;r=(g-90)*y;var z=d*Math.cos(m);g=d*Math.sin(m);h=Math.cos(r);m=Math.sin(r);d=D.x+b*(d-z)+n*h;r=d+z;h=r-c*h;z=h-z;n=D.y+n-b*g+n*m;b=n+g;c=b-c*m;g=c-g;D.x=Math.min(d,r,h,z);D.y=Math.min(n,b,c,g);D.width=Math.max(d,r,
h,z)-D.x;D.height=Math.max(n,b,c,g)-D.y}if(q&&(""===p||0<D.height)){for(;250<F.length;)delete A[F.shift()];A[q]||F.push(q);A[q]=D}}return D};f.prototype.getStyle=function(a){return p.getComputedStyle(this.element||this,"").getPropertyValue(a)};f.prototype.hasClass=function(a){return-1!==(""+this.attr("class")).split(" ").indexOf(a)};f.prototype.hide=function(){return this.attr({visibility:"hidden"})};f.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}};f.prototype.init=function(a,
c){this.element="span"===c?n(c):t.createElementNS(this.SVG_NS,c);this.renderer=a;m(this,"afterInit")};f.prototype.invert=function(a){this.inverted=a;this.updateTransform();return this};f.prototype.on=function(a,c){var g=this.onEvents;if(g[a])g[a]();g[a]=q(this.element,a,c);return this};f.prototype.opacitySetter=function(a,c,g){this.opacity=a=Number(Number(a).toFixed(3));g.setAttribute(c,a)};f.prototype.removeClass=function(a){return this.attr("class",(""+this.attr("class")).replace(c(a)?new RegExp("(^| )".concat(a,
"( |$)")):a," ").replace(/ +/g," ").trim())};f.prototype.removeTextOutline=function(){var a=this.element.querySelector("tspan.highcharts-text-outline");a&&this.safeRemoveChild(a)};f.prototype.safeRemoveChild=function(a){var c=a.parentNode;c&&c.removeChild(a)};f.prototype.setRadialReference=function(a){var c=this.element.gradient&&this.renderer.gradients[this.element.gradient];this.element.radialReference=a;c&&c.radAttr&&c.animate(this.renderer.getRadialAttr(a,c.radAttr));return this};f.prototype.setTextPath=
function(a,c){var b=this.element,k=this.text?this.text.element:b,u={textAnchor:"text-anchor"},d=!1,m=this.textPathWrapper,n=!m;c=D(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},c);var F=e.filterUserAttributes(c.attributes);if(a&&c&&c.enabled){m&&null===m.element.parentNode?(n=!0,m=m.destroy()):m&&this.removeTextOutline.call(m.parentGroup);this.options&&this.options.padding&&(F.dx=-this.options.padding);m||(this.textPathWrapper=m=this.renderer.createElement("textPath"),d=
!0);var r=m.element;(c=a.element.getAttribute("id"))||a.element.setAttribute("id",c=R());if(n)for(k.setAttribute("y",0),g(F.dx)&&k.setAttribute("x",-F.dx),a=[].slice.call(k.childNodes),n=0;n<a.length;n++){var q=a[n];q.nodeType!==p.Node.TEXT_NODE&&"tspan"!==q.nodeName||r.appendChild(q)}d&&m&&m.add({element:k});r.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+c);w(F.dy)&&(r.parentNode.setAttribute("dy",F.dy),delete F.dy);w(F.dx)&&(r.parentNode.setAttribute("dx",F.dx),delete F.dx);
A(F,function(a,c){r.setAttribute(u[c]||c,a)});b.removeAttribute("transform");this.removeTextOutline.call(m);this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline=this.updateTransform=h}else m&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(b,a),this.updateTransform(),this.options&&this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this};f.prototype.shadow=function(a,c,g){var b=[],k=this.element,
I=this.oldShadowOptions,u={color:"#000000",offsetX:this.parentInverted?-1:1,offsetY:this.parentInverted?-1:1,opacity:.15,width:3},m=!1,F;!0===a?F=u:"object"===typeof a&&(F=x(u,a));F&&(F&&I&&A(F,function(a,c){a!==I[c]&&(m=!0)}),m&&this.destroyShadows(),this.oldShadowOptions=F);if(!F)this.destroyShadows();else if(!this.shadows){var d=F.opacity/F.width;var p=this.parentInverted?"translate(".concat(F.offsetY,", ").concat(F.offsetX,")"):"translate(".concat(F.offsetX,", ").concat(F.offsetY,")");for(u=1;u<=
F.width;u++){var n=k.cloneNode(!1);var D=2*F.width+1-2*u;r(n,{stroke:a.color||"#000000","stroke-opacity":d*u,"stroke-width":D,transform:p,fill:"none"});n.setAttribute("class",(n.getAttribute("class")||"")+" highcharts-shadow");g&&(r(n,"height",Math.max(r(n,"height")-D,0)),n.cutHeight=D);c?c.element.appendChild(n):k.parentNode&&k.parentNode.insertBefore(n,k);b.push(n)}this.shadows=b}return this};f.prototype.show=function(a){void 0===a&&(a=!0);return this.attr({visibility:a?"inherit":"visible"})};f.prototype.strokeSetter=
function(a,c,g){this[c]=a;this.stroke&&this["stroke-width"]?(f.prototype.fillSetter.call(this,this.stroke,"stroke",g),g.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===c&&0===a&&this.hasStroke?(g.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&(g.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};f.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var a=
this.getStyle("stroke-width"),c=0;if(a.indexOf("px")===a.length-2)c=L(a);else if(""!==a){var g=t.createElementNS(b,"rect");r(g,{width:a,"stroke-width":0});this.element.parentNode.appendChild(g);c=g.getBBox().width;g.parentNode.removeChild(g)}return c};f.prototype.symbolAttr=function(a){var c=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g){c[g]=u(a[g],c[g])});c.attr({d:c.renderer.symbols[c.symbolName](c.x,c.y,c.width,c.height,c)})};f.prototype.textSetter=
function(a){a!==this.textStr&&(delete this.textPxLength,this.textStr=a,this.added&&this.renderer.buildText(this))};f.prototype.titleSetter=function(a){var c=this.element,g=c.getElementsByTagName("title")[0]||t.createElementNS(this.SVG_NS,"title");c.insertBefore?c.insertBefore(g,c.firstChild):c.appendChild(g);g.textContent=String(u(a,"")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")};f.prototype.toFront=function(){var a=this.element;a.parentNode.appendChild(a);return this};f.prototype.translate=
function(a,c){return this.attr({translateX:a,translateY:c})};f.prototype.updateShadows=function(a,c,g){var b=this.shadows;if(b)for(var k=b.length;k--;)g.call(b[k],"height"===a?Math.max(c-(b[k].cutHeight||0),0):"d"===a?this.d:c,a,b[k])};f.prototype.updateTransform=function(){var a=this.scaleX,c=this.scaleY,g=this.inverted,b=this.rotation,k=this.matrix,m=this.element,d=this.translateX||0,n=this.translateY||0;g&&(d+=this.width,n+=this.height);d=["translate("+d+","+n+")"];w(k)&&d.push("matrix("+k.join(",")+
")");g?d.push("rotate(90) scale(-1,1)"):b&&d.push("rotate("+b+" "+u(this.rotationOriginX,m.getAttribute("x"),0)+" "+u(this.rotationOriginY,m.getAttribute("y")||0)+")");(w(a)||w(c))&&d.push("scale("+u(a,1)+" "+u(c,1)+")");d.length&&m.setAttribute("transform",d.join(" "))};f.prototype.visibilitySetter=function(a,c,g){"inherit"===a?g.removeAttribute(c):this[c]!==a&&g.setAttribute(c,a);this[c]=a};f.prototype.xGetter=function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)};
f.prototype.zIndexSetter=function(a,c){var g=this.renderer,b=this.parentGroup,k=(b||g).element||g.box,u=this.element;g=k===g.box;var d=!1;var m=this.added;var F;w(a)?(u.setAttribute("data-z-index",a),a=+a,this[c]===a&&(m=!1)):w(this[c])&&u.removeAttribute("data-z-index");this[c]=a;if(m){(a=this.zIndex)&&b&&(b.handleZ=!0);c=k.childNodes;for(F=c.length-1;0<=F&&!d;F--){b=c[F];m=b.getAttribute("data-z-index");var n=!w(m);if(b!==u)if(0>a&&n&&!g&&!F)k.insertBefore(u,c[F]),d=!0;else if(L(m)<=a||n&&(!w(a)||
0<=a))k.insertBefore(u,c[F+1]||null),d=!0}d||(k.insertBefore(u,c[g?3:0]||null),d=!0)}return d};return f}();f.prototype["stroke-widthSetter"]=f.prototype.strokeSetter;f.prototype.yGetter=f.prototype.xGetter;f.prototype.matrixSetter=f.prototype.rotationOriginXSetter=f.prototype.rotationOriginYSetter=f.prototype.rotationSetter=f.prototype.scaleXSetter=f.prototype.scaleYSetter=f.prototype.translateXSetter=f.prototype.translateYSetter=f.prototype.verticalAlignSetter=function(a,c){this[c]=a;this.doTransform=
!0};"";return f});K(l,"Core/Renderer/RendererRegistry.js",[l["Core/Globals.js"]],function(f){var e;(function(e){e.rendererTypes={};var l;e.getRendererType=function(f){void 0===f&&(f=l);return e.rendererTypes[f]||e.rendererTypes[l]};e.registerRendererType=function(v,P,G){e.rendererTypes[v]=P;if(!l||G)l=v,f.Renderer=P}})(e||(e={}));return e});K(l,"Core/Renderer/SVG/SVGLabel.js",[l["Core/Renderer/SVG/SVGElement.js"],l["Core/Utilities.js"]],function(f,e){var l=this&&this.__extends||function(){var e=function(h,
d){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,d){b.__proto__=d}||function(b,d){for(var p in d)d.hasOwnProperty(p)&&(b[p]=d[p])};return e(h,d)};return function(h,d){function b(){this.constructor=h}e(h,d);h.prototype=null===d?Object.create(d):(b.prototype=d.prototype,new b)}}(),C=e.defined,v=e.extend,E=e.isNumber,G=e.merge,B=e.pick,y=e.removeEvent;return function(e){function h(d,b,p,q,r,n,f,w,z,x){var m=e.call(this)||this;m.paddingLeftSetter=m.paddingSetter;m.paddingRightSetter=
m.paddingSetter;m.init(d,"g");m.textStr=b;m.x=p;m.y=q;m.anchorX=n;m.anchorY=f;m.baseline=z;m.className=x;m.addClass("button"===x?"highcharts-no-tooltip":"highcharts-label");x&&m.addClass("highcharts-"+x);m.text=d.text(void 0,0,0,w).attr({zIndex:1});var k;"string"===typeof r&&((k=/^url\((.*?)\)$/.test(r))||m.renderer.symbols[r])&&(m.symbolKey=r);m.bBox=h.emptyBBox;m.padding=3;m.baselineOffset=0;m.needsBox=d.styledMode||k;m.deferredAttr={};m.alignFactor=0;return m}l(h,e);h.prototype.alignSetter=function(d){d=
{left:0,center:.5,right:1}[d];d!==this.alignFactor&&(this.alignFactor=d,this.bBox&&E(this.xSetting)&&this.attr({x:this.xSetting}))};h.prototype.anchorXSetter=function(d,b){this.anchorX=d;this.boxAttr(b,Math.round(d)-this.getCrispAdjust()-this.xSetting)};h.prototype.anchorYSetter=function(d,b){this.anchorY=d;this.boxAttr(b,d-this.ySetting)};h.prototype.boxAttr=function(d,b){this.box?this.box.attr(d,b):this.deferredAttr[d]=b};h.prototype.css=function(d){if(d){var b={};d=G(d);h.textProps.forEach(function(p){"undefined"!==
typeof d[p]&&(b[p]=d[p],delete d[p])});this.text.css(b);var p="width"in b;"fontSize"in b||"fontWeight"in b?this.updateTextPadding():p&&this.updateBoxSize()}return f.prototype.css.call(this,d)};h.prototype.destroy=function(){y(this.element,"mouseenter");y(this.element,"mouseleave");this.text&&this.text.destroy();this.box&&(this.box=this.box.destroy());f.prototype.destroy.call(this)};h.prototype.fillSetter=function(d,b){d&&(this.needsBox=!0);this.fill=d;this.boxAttr(b,d)};h.prototype.getBBox=function(){this.textStr&&
0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();var d=this.padding,b=B(this.paddingLeft,d);return{width:this.width,height:this.height,x:this.bBox.x-b,y:this.bBox.y-d}};h.prototype.getCrispAdjust=function(){return this.renderer.styledMode&&this.box?this.box.strokeWidth()%2/2:(this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2};h.prototype.heightSetter=function(d){this.heightSetting=d};h.prototype.onAdd=function(){var d=this.textStr;this.text.add(this);this.attr({text:C(d)?
d:"",x:this.x,y:this.y});this.box&&C(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})};h.prototype.paddingSetter=function(d,b){E(d)?d!==this[b]&&(this[b]=d,this.updateTextPadding()):this[b]=void 0};h.prototype.rSetter=function(d,b){this.boxAttr(b,d)};h.prototype.shadow=function(d){d&&!this.renderer.styledMode&&(this.updateBoxSize(),this.box&&this.box.shadow(d));return this};h.prototype.strokeSetter=function(d,b){this.stroke=d;this.boxAttr(b,d)};h.prototype["stroke-widthSetter"]=
function(d,b){d&&(this.needsBox=!0);this["stroke-width"]=d;this.boxAttr(b,d)};h.prototype["text-alignSetter"]=function(d){this.textAlign=d};h.prototype.textSetter=function(d){"undefined"!==typeof d&&this.text.attr({text:d});this.updateTextPadding()};h.prototype.updateBoxSize=function(){var d=this.text.element.style,b={},p=this.padding,q=this.bBox=E(this.widthSetting)&&E(this.heightSetting)&&!this.textAlign||!C(this.text.textStr)?h.emptyBBox:this.text.getBBox();this.width=this.getPaddedWidth();this.height=
(this.heightSetting||q.height||0)+2*p;d=this.renderer.fontMetrics(d&&d.fontSize,this.text);this.baselineOffset=p+Math.min((this.text.firstLineMetrics||d).b,q.height||Infinity);this.heightSetting&&(this.baselineOffset+=(this.heightSetting-d.h)/2);this.needsBox&&(this.box||(p=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect(),p.addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),p.add(this)),p=this.getCrispAdjust(),
b.x=p,b.y=(this.baseline?-this.baselineOffset:0)+p,b.width=Math.round(this.width),b.height=Math.round(this.height),this.box.attr(v(b,this.deferredAttr)),this.deferredAttr={})};h.prototype.updateTextPadding=function(){var d=this.text;this.updateBoxSize();var b=this.baseline?0:this.baselineOffset,p=B(this.paddingLeft,this.padding);C(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(p+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width));if(p!==
d.x||b!==d.y)d.attr("x",p),d.hasBoxWidthChanged&&(this.bBox=d.getBBox(!0)),"undefined"!==typeof b&&d.attr("y",b);d.x=p;d.y=b};h.prototype.widthSetter=function(d){this.widthSetting=E(d)?d:void 0};h.prototype.getPaddedWidth=function(){var d=this.padding,b=B(this.paddingLeft,d);d=B(this.paddingRight,d);return(this.widthSetting||this.bBox.width||0)+b+d};h.prototype.xSetter=function(d){this.x=d;this.alignFactor&&(d-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0);this.xSetting=Math.round(d);
this.attr("translateX",this.xSetting)};h.prototype.ySetter=function(d){this.ySetting=this.y=Math.round(d);this.attr("translateY",this.ySetting)};h.emptyBBox={width:0,height:0,x:0,y:0};h.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" ");return h}(f)});K(l,"Core/Renderer/SVG/Symbols.js",[l["Core/Utilities.js"]],function(f){function e(e,f,t,h,d){var b=[];if(d){var p=d.start||0,q=G(d.r,t);t=G(d.r,h||t);var r=
(d.end||0)-.001;h=d.innerR;var n=G(d.open,.001>Math.abs((d.end||0)-p-2*Math.PI)),J=Math.cos(p),w=Math.sin(p),z=Math.cos(r),x=Math.sin(r);p=G(d.longArc,.001>r-p-Math.PI?0:1);b.push(["M",e+q*J,f+t*w],["A",q,t,0,p,G(d.clockwise,1),e+q*z,f+t*x]);v(h)&&b.push(n?["M",e+h*z,f+h*x]:["L",e+h*z,f+h*x],["A",h,h,0,p,v(d.clockwise)?1-d.clockwise:0,e+h*J,f+h*w]);n||b.push(["Z"])}return b}function l(e,f,t,h,d){return d&&d.r?C(e,f,t,h,d):[["M",e,f],["L",e+t,f],["L",e+t,f+h],["L",e,f+h],["Z"]]}function C(e,f,t,h,
d){d=d&&d.r||0;return[["M",e+d,f],["L",e+t-d,f],["C",e+t,f,e+t,f,e+t,f+d],["L",e+t,f+h-d],["C",e+t,f+h,e+t,f+h,e+t-d,f+h],["L",e+d,f+h],["C",e,f+h,e,f+h,e,f+h-d],["L",e,f+d],["C",e,f,e,f,e+d,f]]}var v=f.defined,E=f.isNumber,G=f.pick;return{arc:e,callout:function(e,f,t,h,d){var b=Math.min(d&&d.r||0,t,h),p=b+6,q=d&&d.anchorX;d=d&&d.anchorY||0;var r=C(e,f,t,h,{r:b});if(!E(q))return r;e+q>=t?d>f+p&&d<f+h-p?r.splice(3,1,["L",e+t,d-6],["L",e+t+6,d],["L",e+t,d+6],["L",e+t,f+h-b]):r.splice(3,1,["L",e+t,h/
2],["L",q,d],["L",e+t,h/2],["L",e+t,f+h-b]):0>=e+q?d>f+p&&d<f+h-p?r.splice(7,1,["L",e,d+6],["L",e-6,d],["L",e,d-6],["L",e,f+b]):r.splice(7,1,["L",e,h/2],["L",q,d],["L",e,h/2],["L",e,f+b]):d&&d>h&&q>e+p&&q<e+t-p?r.splice(5,1,["L",q+6,f+h],["L",q,f+h+6],["L",q-6,f+h],["L",e+b,f+h]):d&&0>d&&q>e+p&&q<e+t-p&&r.splice(1,1,["L",q-6,f],["L",q,f-6],["L",q+6,f],["L",t-b,f]);return r},circle:function(f,l,t,h){return e(f+t/2,l+h/2,t/2,h/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(e,f,t,h){return[["M",
e+t/2,f],["L",e+t,f+h/2],["L",e+t/2,f+h],["L",e,f+h/2],["Z"]]},rect:l,roundedRect:C,square:l,triangle:function(e,f,t,h){return[["M",e+t/2,f],["L",e+t,f+h],["L",e,f+h],["Z"]]},"triangle-down":function(e,f,t,h){return[["M",e,f],["L",e+t,f],["L",e+t/2,f+h],["Z"]]}}});K(l,"Core/Renderer/SVG/TextBuilder.js",[l["Core/Renderer/HTML/AST.js"],l["Core/Globals.js"],l["Core/Utilities.js"]],function(f,e,l){var P=e.doc,v=e.SVG_NS,E=e.win,G=l.attr,B=l.extend,y=l.isString,t=l.objectEach,h=l.pick;return function(){function d(b){var d=
b.styles;this.renderer=b.renderer;this.svgElement=b;this.width=b.textWidth;this.textLineHeight=d&&d.lineHeight;this.textOutline=d&&d.textOutline;this.ellipsis=!(!d||"ellipsis"!==d.textOverflow);this.noWrap=!(!d||"nowrap"!==d.whiteSpace);this.fontSize=d&&d.fontSize}d.prototype.buildSVG=function(){var b=this.svgElement,d=b.element,e=b.renderer,r=h(b.textStr,"").toString(),n=-1!==r.indexOf("<"),J=d.childNodes;e=this.width&&!b.added&&e.box;var w=/<br.*?>/g,z=[r,this.ellipsis,this.noWrap,this.textLineHeight,
this.textOutline,this.fontSize,this.width].join();if(z!==b.textCache){b.textCache=z;delete b.actualWidth;for(z=J.length;z--;)d.removeChild(J[z]);n||this.ellipsis||this.width||-1!==r.indexOf(" ")&&(!this.noWrap||w.test(r))?""!==r&&(e&&e.appendChild(d),r=new f(r),this.modifyTree(r.nodes),r.addToDOM(b.element),this.modifyDOM(),this.ellipsis&&-1!==(d.textContent||"").indexOf("\u2026")&&b.attr("title",this.unescapeEntities(b.textStr||"",["&lt;","&gt;"])),e&&e.removeChild(d)):d.appendChild(P.createTextNode(this.unescapeEntities(r)));
y(this.textOutline)&&b.applyTextOutline&&b.applyTextOutline(this.textOutline)}};d.prototype.modifyDOM=function(){var b=this,d=this.svgElement,e=G(d.element,"x");d.firstLineMetrics=void 0;for(var r;r=d.element.firstChild;)if(/^[\s\u200B]*$/.test(r.textContent||" "))d.element.removeChild(r);else break;[].forEach.call(d.element.querySelectorAll("tspan.highcharts-br"),function(n,r){n.nextSibling&&n.previousSibling&&(0===r&&1===n.previousSibling.nodeType&&(d.firstLineMetrics=d.renderer.fontMetrics(void 0,
n.previousSibling)),G(n,{dy:b.getLineHeight(n.nextSibling),x:e}))});var n=this.width||0;if(n){var h=function(r,p){var m=r.textContent||"",k=m.replace(/([^\^])-/g,"$1- ").split(" "),a=!b.noWrap&&(1<k.length||1<d.element.childNodes.length),g=b.getLineHeight(p),c=0,D=d.actualWidth;if(b.ellipsis)m&&b.truncate(r,m,void 0,0,Math.max(0,n-parseInt(b.fontSize||12,10)),function(a,c){return a.substring(0,c)+"\u2026"});else if(a){m=[];for(a=[];p.firstChild&&p.firstChild!==r;)a.push(p.firstChild),p.removeChild(p.firstChild);
for(;k.length;)k.length&&!b.noWrap&&0<c&&(m.push(r.textContent||""),r.textContent=k.join(" ").replace(/- /g,"-")),b.truncate(r,void 0,k,0===c?D||0:0,n,function(a,c){return k.slice(0,c).join(" ").replace(/- /g,"-")}),D=d.actualWidth,c++;a.forEach(function(a){p.insertBefore(a,r)});m.forEach(function(a){p.insertBefore(P.createTextNode(a),r);a=P.createElementNS(v,"tspan");a.textContent="\u200b";G(a,{dy:g,x:e});p.insertBefore(a,r)})}},f=function(b){[].slice.call(b.childNodes).forEach(function(n){n.nodeType===
E.Node.TEXT_NODE?h(n,b):(-1!==n.className.baseVal.indexOf("highcharts-br")&&(d.actualWidth=0),f(n))})};f(d.element)}};d.prototype.getLineHeight=function(b){var d;b=b.nodeType===E.Node.TEXT_NODE?b.parentElement:b;this.renderer.styledMode||(d=b&&/(px|em)$/.test(b.style.fontSize)?b.style.fontSize:this.fontSize||this.renderer.style.fontSize||12);return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(d,b||this.svgElement.element).h};d.prototype.modifyTree=function(b){var d=
this,e=function(r,n){var p=r.attributes;p=void 0===p?{}:p;var h=r.children,q=r.style;q=void 0===q?{}:q;var f=r.tagName,m=d.renderer.styledMode;if("b"===f||"strong"===f)m?p["class"]="highcharts-strong":q.fontWeight="bold";else if("i"===f||"em"===f)m?p["class"]="highcharts-emphasized":q.fontStyle="italic";q&&q.color&&(q.fill=q.color);"br"===f?(p["class"]="highcharts-br",r.textContent="\u200b",(n=b[n+1])&&n.textContent&&(n.textContent=n.textContent.replace(/^ +/gm,""))):"a"===f&&h&&h.some(function(b){return"#text"===
b.tagName})&&(r.children=[{children:h,tagName:"tspan"}]);"#text"!==f&&"a"!==f&&(r.tagName="tspan");B(r,{attributes:p,style:q});h&&h.filter(function(b){return"#text"!==b.tagName}).forEach(e)};b.forEach(e)};d.prototype.truncate=function(b,d,e,r,n,h){var p=this.svgElement,f=p.renderer,q=p.rotation,m=[],k=e?1:0,a=(d||e||"").length,g=a,c,D=function(a,c){c=c||a;var g=b.parentNode;if(g&&"undefined"===typeof m[c])if(g.getSubStringLength)try{m[c]=r+g.getSubStringLength(0,e?c+1:c)}catch(R){""}else f.getSpanWidth&&
(b.textContent=h(d||e,a),m[c]=r+f.getSpanWidth(p,b));return m[c]};p.rotation=0;var A=D(b.textContent.length);if(r+A>n){for(;k<=a;)g=Math.ceil((k+a)/2),e&&(c=h(e,g)),A=D(g,c&&c.length-1),k===a?k=a+1:A>n?a=g-1:k=g;0===a?b.textContent="":d&&a===d.length-1||(b.textContent=c||h(d||e,g))}e&&e.splice(0,g);p.actualWidth=A;p.rotation=q};d.prototype.unescapeEntities=function(b,d){t(this.renderer.escapes,function(e,r){d&&-1!==d.indexOf(e)||(b=b.toString().replace(new RegExp(e,"g"),r))});return b};return d}()});
K(l,"Core/Renderer/SVG/SVGRenderer.js",[l["Core/Renderer/HTML/AST.js"],l["Core/Color/Color.js"],l["Core/Globals.js"],l["Core/Renderer/RendererRegistry.js"],l["Core/Renderer/SVG/SVGElement.js"],l["Core/Renderer/SVG/SVGLabel.js"],l["Core/Renderer/SVG/Symbols.js"],l["Core/Renderer/SVG/TextBuilder.js"],l["Core/Utilities.js"]],function(f,e,l,C,v,E,G,B,y){var t=l.charts,h=l.deg2rad,d=l.doc,b=l.isFirefox,p=l.isMS,q=l.isWebKit,r=l.noop,n=l.SVG_NS,J=l.symbolSizes,w=l.win,z=y.addEvent,x=y.attr,m=y.createElement,
k=y.css,a=y.defined,g=y.destroyObjectProperties,c=y.extend,D=y.isArray,A=y.isNumber,u=y.isObject,L=y.isString,S=y.merge,R=y.pick,M=y.pInt,U=y.uniqueKey,aa;l=function(){function I(a,c,g,b,d,k,m){this.width=this.url=this.style=this.isSVG=this.imgCount=this.height=this.gradients=this.globalAnimation=this.defs=this.chartIndex=this.cacheKeys=this.cache=this.boxWrapper=this.box=this.alignedObjects=void 0;this.init(a,c,g,b,d,k,m)}I.prototype.init=function(a,c,g,m,u,F,I){var n=this.createElement("svg").attr({version:"1.1",
"class":"highcharts-root"}),H=n.element;I||n.css(this.getStyle(m));a.appendChild(H);x(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&x(H,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=H;this.boxWrapper=n;this.alignedObjects=[];this.url=this.getReferenceURL();this.createElement("desc").add().element.appendChild(d.createTextNode("Created with Highcharts 10.2.0"));this.defs=this.createElement("defs").add();this.allowHTML=F;this.forExport=u;this.styledMode=I;this.gradients={};this.cache={};this.cacheKeys=
[];this.imgCount=0;this.setSize(c,g,!1);var e;b&&a.getBoundingClientRect&&(c=function(){k(a,{left:0,top:0});e=a.getBoundingClientRect();k(a,{left:Math.ceil(e.left)-e.left+"px",top:Math.ceil(e.top)-e.top+"px"})},c(),this.unSubPixelFix=z(w,"resize",c))};I.prototype.definition=function(a){return(new f([a])).addToDOM(this.defs.element)};I.prototype.getReferenceURL=function(){if((b||q)&&d.getElementsByTagName("base").length){if(!a(aa)){var c=U();c=(new f([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",
children:[{tagName:"clipPath",attributes:{id:c},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":"url(#".concat(c,")"),fill:"rgba(0,0,0,0.001)"}}]}])).addToDOM(d.body);k(c,{position:"fixed",top:0,left:0,zIndex:9E5});var g=d.elementFromPoint(6,6);aa="hitme"===(g&&g.id);d.body.removeChild(c)}if(aa)return w.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20")}return""};I.prototype.getStyle=
function(a){return this.style=c({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)};I.prototype.setStyle=function(a){this.boxWrapper.css(this.getStyle(a))};I.prototype.isHidden=function(){return!this.boxWrapper.getBBox().width};I.prototype.destroy=function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();g(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=
null};I.prototype.createElement=function(a){var c=new this.Element;c.init(this,a);return c};I.prototype.getRadialAttr=function(a,c){return{cx:a[0]-a[2]/2+(c.cx||0)*a[2],cy:a[1]-a[2]/2+(c.cy||0)*a[2],r:(c.r||0)*a[2]}};I.prototype.buildText=function(a){(new B(a)).buildSVG()};I.prototype.getContrast=function(a){a=e.parse(a).rgba.map(function(a){a/=255;return.03928>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)});a=.2126*a[0]+.7152*a[1]+.0722*a[2];return 1.05/(a+.05)>(a+.05)/.05?"#FFFFFF":"#000000"};I.prototype.button=
function(a,g,b,d,k,m,I,n,e,r){void 0===k&&(k={});var F=this.label(a,g,b,e,void 0,void 0,r,void 0,"button"),D=this.styledMode;a=k.states||{};var A=0;k=S(k);delete k.states;var H=S({color:"#333333",cursor:"pointer",fontWeight:"normal"},k.style);delete k.style;var h=f.filterUserAttributes(k);F.attr(S({padding:8,r:2},h));if(!D){h=S({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1},h);m=S(h,{fill:"#e6e6e6"},f.filterUserAttributes(m||a.hover||{}));var q=m.style;delete m.style;I=S(h,{fill:"#e6ebf5",style:{color:"#000000",
fontWeight:"bold"}},f.filterUserAttributes(I||a.select||{}));var N=I.style;delete I.style;n=S(h,{style:{color:"#cccccc"}},f.filterUserAttributes(n||a.disabled||{}));var w=n.style;delete n.style}z(F.element,p?"mouseover":"mouseenter",function(){3!==A&&F.setState(1)});z(F.element,p?"mouseout":"mouseleave",function(){3!==A&&F.setState(A)});F.setState=function(a){1!==a&&(F.state=A=a);F.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed",
"disabled"][a||0]);D||(F.attr([h,m,I,n][a||0]),a=[H,q,N,w][a||0],u(a)&&F.css(a))};D||F.attr(h).css(c({cursor:"default"},H));return F.on("touchstart",function(a){return a.stopPropagation()}).on("click",function(a){3!==A&&d.call(F,a)})};I.prototype.crispLine=function(c,g,b){void 0===b&&(b="round");var d=c[0],k=c[1];a(d[1])&&d[1]===k[1]&&(d[1]=k[1]=Math[b](d[1])-g%2/2);a(d[2])&&d[2]===k[2]&&(d[2]=k[2]=Math[b](d[2])+g%2/2);return c};I.prototype.path=function(a){var g=this.styledMode?{}:{fill:"none"};
D(a)?g.d=a:u(a)&&c(g,a);return this.createElement("path").attr(g)};I.prototype.circle=function(a,c,g){a=u(a)?a:"undefined"===typeof a?{}:{x:a,y:c,r:g};c=this.createElement("circle");c.xSetter=c.ySetter=function(a,c,g){g.setAttribute("c"+c,a)};return c.attr(a)};I.prototype.arc=function(a,c,g,b,d,k){u(a)?(b=a,c=b.y,g=b.r,a=b.x):b={innerR:b,start:d,end:k};a=this.symbol("arc",a,c,g,g,b);a.r=g;return a};I.prototype.rect=function(a,c,g,b,d,k){d=u(a)?a.r:d;var m=this.createElement("rect");a=u(a)?a:"undefined"===
typeof a?{}:{x:a,y:c,width:Math.max(g,0),height:Math.max(b,0)};this.styledMode||("undefined"!==typeof k&&(a["stroke-width"]=k,a=m.crisp(a)),a.fill="none");d&&(a.r=d);m.rSetter=function(a,c,g){m.r=a;x(g,{rx:a,ry:a})};m.rGetter=function(){return m.r||0};return m.attr(a)};I.prototype.setSize=function(a,c,g){this.width=a;this.height=c;this.boxWrapper.animate({width:a,height:c},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:R(g,!0)?void 0:0});this.alignElements()};
I.prototype.g=function(a){var c=this.createElement("g");return a?c.attr({"class":"highcharts-"+a}):c};I.prototype.image=function(a,c,g,b,d,k){var m={preserveAspectRatio:"none"},u=function(a,c){a.setAttributeNS?a.setAttributeNS("http://www.w3.org/1999/xlink","href",c):a.setAttribute("hc-svg-href",c)};A(c)&&(m.x=c);A(g)&&(m.y=g);A(b)&&(m.width=b);A(d)&&(m.height=d);var F=this.createElement("image").attr(m);c=function(c){u(F.element,a);k.call(F,c)};k?(u(F.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),
g=new w.Image,z(g,"load",c),g.src=a,g.complete&&c({})):u(F.element,a);return F};I.prototype.symbol=function(g,b,u,I,n,F){var e=this,r=/^url\((.*?)\)$/,D=r.test(g),p=!D&&(this.symbols[g]?g:"circle"),A=p&&this.symbols[p],h;if(A){"number"===typeof b&&(h=A.call(this.symbols,Math.round(b||0),Math.round(u||0),I||0,n||0,F));var f=this.path(h);e.styledMode||f.attr("fill","none");c(f,{symbolName:p||void 0,x:b,y:u,width:I,height:n});F&&c(f,F)}else if(D){var q=g.match(r)[1];var H=f=this.image(q);H.imgwidth=
R(J[q]&&J[q].width,F&&F.width);H.imgheight=R(J[q]&&J[q].height,F&&F.height);var z=function(a){return a.attr({width:a.width,height:a.height})};["width","height"].forEach(function(c){H[c+"Setter"]=function(c,g){var b=this["img"+g];this[g]=c;a(b)&&(F&&"within"===F.backgroundSize&&this.width&&this.height&&(b=Math.round(b*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(g,b),this.alignByTranslate||(c=((this[g]||0)-b)/2,this.attr("width"===g?{translateX:c}:
{translateY:c})))}});a(b)&&H.attr({x:b,y:u});H.isImg=!0;a(H.imgwidth)&&a(H.imgheight)?z(H):(H.attr({width:0,height:0}),m("img",{onload:function(){var a=t[e.chartIndex];0===this.width&&(k(this,{position:"absolute",top:"-999em"}),d.body.appendChild(this));J[q]={width:this.width,height:this.height};H.imgwidth=this.width;H.imgheight=this.height;H.element&&z(H);this.parentNode&&this.parentNode.removeChild(this);e.imgCount--;if(!e.imgCount&&a&&!a.hasLoaded)a.onload()},src:q}),this.imgCount++)}return f};
I.prototype.clipRect=function(a,c,g,b){var d=U()+"-",k=this.createElement("clipPath").attr({id:d}).add(this.defs);a=this.rect(a,c,g,b,0).add(k);a.id=d;a.clipPath=k;a.count=0;return a};I.prototype.text=function(c,g,b,d){var k={};if(d&&(this.allowHTML||!this.forExport))return this.html(c,g,b);k.x=Math.round(g||0);b&&(k.y=Math.round(b));a(c)&&(k.text=c);c=this.createElement("text").attr(k);if(!d||this.forExport&&!this.allowHTML)c.xSetter=function(a,c,g){for(var b=g.getElementsByTagName("tspan"),d=g.getAttribute(c),
k=0,m;k<b.length;k++)m=b[k],m.getAttribute(c)===d&&m.setAttribute(c,a);g.setAttribute(c,a)};return c};I.prototype.fontMetrics=function(a,c){a=!this.styledMode&&/px/.test(a)||!w.getComputedStyle?a||c&&c.style&&c.style.fontSize||this.style&&this.style.fontSize:c&&v.prototype.getStyle.call(c,"font-size");a=/px/.test(a)?M(a):12;c=24>a?a+3:Math.round(1.2*a);return{h:c,b:Math.round(.8*c),f:a}};I.prototype.rotCorr=function(a,c,g){var b=a;c&&g&&(b=Math.max(b*Math.cos(c*h),4));return{x:-a/3*Math.sin(c*h),
y:b}};I.prototype.pathToSegments=function(a){for(var c=[],g=[],b={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2},d=0;d<a.length;d++)L(g[0])&&A(a[d])&&g.length===b[g[0].toUpperCase()]&&a.splice(d,0,g[0].replace("M","L").replace("m","l")),"string"===typeof a[d]&&(g.length&&c.push(g.slice(0)),g.length=0),g.push(a[d]);c.push(g.slice(0));return c};I.prototype.label=function(a,c,g,b,d,k,m,u,I){return new E(this,a,c,g,b,d,k,m,u,I)};I.prototype.alignElements=function(){this.alignedObjects.forEach(function(a){return a.align()})};
return I}();c(l.prototype,{Element:v,SVG_NS:n,escapes:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},symbols:G,draw:r});C.registerRendererType("svg",l,!0);"";return l});K(l,"Core/Renderer/HTML/HTMLElement.js",[l["Core/Globals.js"],l["Core/Renderer/SVG/SVGElement.js"],l["Core/Utilities.js"]],function(f,e,l){var C=this&&this.__extends||function(){var b=function(d,e){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,d){b.__proto__=d}||function(b,d){for(var n in d)d.hasOwnProperty(n)&&
(b[n]=d[n])};return b(d,e)};return function(d,e){function n(){this.constructor=d}b(d,e);d.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),v=f.isFirefox,E=f.isMS,G=f.isWebKit,B=f.win,y=l.css,t=l.defined,h=l.extend,d=l.pick,b=l.pInt;return function(e){function p(){return null!==e&&e.apply(this,arguments)||this}C(p,e);p.compose=function(b){if(-1===p.composedClasses.indexOf(b)){p.composedClasses.push(b);var d=p.prototype,e=b.prototype;e.getSpanCorrection=d.getSpanCorrection;e.htmlCss=
d.htmlCss;e.htmlGetBBox=d.htmlGetBBox;e.htmlUpdateTransform=d.htmlUpdateTransform;e.setSpanRotation=d.setSpanRotation}return b};p.prototype.getSpanCorrection=function(b,d,e){this.xCorr=-b*e;this.yCorr=-d};p.prototype.htmlCss=function(b){var n="SPAN"===this.element.tagName&&b&&"width"in b,e=d(n&&b.width,void 0);if(n){delete b.width;this.textWidth=e;var p=!0}b&&"ellipsis"===b.textOverflow&&(b.whiteSpace="nowrap",b.overflow="hidden");this.styles=h(this.styles,b);y(this.element,b);p&&this.htmlUpdateTransform();
return this};p.prototype.htmlGetBBox=function(){var b=this.element;return{x:b.offsetLeft,y:b.offsetTop,width:b.offsetWidth,height:b.offsetHeight}};p.prototype.htmlUpdateTransform=function(){if(this.added){var d=this.renderer,n=this.element,e=this.translateX||0,p=this.translateY||0,h=this.x||0,f=this.y||0,m=this.textAlign||"left",k={left:0,center:.5,right:1}[m],a=this.styles;a=a&&a.whiteSpace;y(n,{marginLeft:e,marginTop:p});!d.styledMode&&this.shadows&&this.shadows.forEach(function(a){y(a,{marginLeft:e+
1,marginTop:p+1})});this.inverted&&[].forEach.call(n.childNodes,function(a){d.invertChild(a,n)});if("SPAN"===n.tagName){var g=this.rotation,c=this.textWidth&&b(this.textWidth),D=[g,m,n.innerHTML,this.textWidth,this.textAlign].join(),A=void 0;A=!1;if(c!==this.oldTextWidth){if(this.textPxLength)var u=this.textPxLength;else y(n,{width:"",whiteSpace:a||"nowrap"}),u=n.offsetWidth;(c>this.oldTextWidth||u>c)&&(/[ \-]/.test(n.textContent||n.innerText)||"ellipsis"===n.style.textOverflow)&&(y(n,{width:u>c||
g?c+"px":"auto",display:"block",whiteSpace:a||"normal"}),this.oldTextWidth=c,A=!0)}this.hasBoxWidthChanged=A;D!==this.cTT&&(A=d.fontMetrics(n.style.fontSize,n).b,!t(g)||g===(this.oldRotation||0)&&m===this.oldAlign||this.setSpanRotation(g,k,A),this.getSpanCorrection(!t(g)&&this.textPxLength||n.offsetWidth,A,k,g,m));y(n,{left:h+(this.xCorr||0)+"px",top:f+(this.yCorr||0)+"px"});this.cTT=D;this.oldRotation=g;this.oldAlign=m}}else this.alignOnAdd=!0};p.prototype.setSpanRotation=function(b,d,e){var n={},
p=E&&!/Edge/.test(B.navigator.userAgent)?"-ms-transform":G?"-webkit-transform":v?"MozTransform":B.opera?"-o-transform":void 0;p&&(n[p]=n.transform="rotate("+b+"deg)",n[p+(v?"Origin":"-origin")]=n.transformOrigin=100*d+"% "+e+"px",y(this.element,n))};p.composedClasses=[];return p}(e)});K(l,"Core/Renderer/HTML/HTMLRenderer.js",[l["Core/Renderer/HTML/AST.js"],l["Core/Renderer/SVG/SVGElement.js"],l["Core/Renderer/SVG/SVGRenderer.js"],l["Core/Utilities.js"]],function(f,e,l,C){var v=this&&this.__extends||
function(){var e=function(h,d){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,d){b.__proto__=d}||function(b,d){for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])};return e(h,d)};return function(h,d){function b(){this.constructor=h}e(h,d);h.prototype=null===d?Object.create(d):(b.prototype=d.prototype,new b)}}(),E=C.attr,G=C.createElement,B=C.extend,y=C.pick;return function(t){function h(){return null!==t&&t.apply(this,arguments)||this}v(h,t);h.compose=function(d){-1===h.composedClasses.indexOf(d)&&
(h.composedClasses.push(d),d.prototype.html=h.prototype.html);return d};h.prototype.html=function(d,b,p){var h=this.createElement("span"),r=h.element,n=h.renderer,t=n.isSVG,w=function(b,d){["opacity","visibility"].forEach(function(m){b[m+"Setter"]=function(k,a,g){var c=b.div?b.div.style:d;e.prototype[m+"Setter"].call(this,k,a,g);c&&(c[a]=k)}});b.addedSetters=!0};h.textSetter=function(b){b!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,f.setElementHTML(this.element,y(b,"")),this.textStr=
b,h.doTransform=!0)};t&&w(h,h.element.style);h.xSetter=h.ySetter=h.alignSetter=h.rotationSetter=function(b,d){"align"===d?h.alignValue=h.textAlign=b:h[d]=b;h.doTransform=!0};h.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};h.attr({text:d,x:Math.round(b),y:Math.round(p)}).css({position:"absolute"});n.styledMode||h.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});r.style.whiteSpace="nowrap";h.css=h.htmlCss;t&&(h.add=function(b){var d=
n.box.parentNode,m=[];if(this.parentGroup=b){var k=b.div;if(!k){for(;b;)m.push(b),b=b.parentGroup;m.reverse().forEach(function(a){function g(c,g){a[g]=c;"translateX"===g?e.left=c+"px":e.top=c+"px";a.doTransform=!0}var c=E(a.element,"class"),b=a.styles||{};k=a.div=a.div||G("div",c?{className:c}:void 0,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,cursor:b.cursor,pointerEvents:b.pointerEvents,visibility:a.visibility},k||d);var e=k.style;
B(a,{classSetter:function(a){return function(c){this.element.setAttribute("class",c);a.className=c}}(k),on:function(){m[0].div&&h.on.apply({element:m[0].div,onEvents:a.onEvents},arguments);return a},translateXSetter:g,translateYSetter:g});a.addedSetters||w(a)})}}else k=d;k.appendChild(r);h.added=!0;h.alignOnAdd&&h.htmlUpdateTransform();return h});return h};h.composedClasses=[];return h}(l)});K(l,"Core/Axis/AxisDefaults.js",[],function(){var f;(function(e){e.defaultXAxisOptions={alignTicks:!0,allowDecimals:void 0,
panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotation:void 0,autoRotationLimit:80,distance:void 0,enabled:!0,indentation:10,overflow:"justify",padding:5,reserveSpace:void 0,rotation:void 0,staggerLines:0,
step:0,useHTML:!1,x:0,zIndex:7,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minPadding:.01,offset:void 0,opposite:!1,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",rotation:0,useHTML:!1,x:0,y:0,style:{color:"#666666"}},type:"linear",
uniqueNames:!0,visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#ccd6eb"};e.defaultYAxisOptions={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){var e=this.axis.chart.numberFormatter;
return e(this.total,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0};e.defaultLeftAxisOptions={labels:{x:-15},title:{rotation:270}};e.defaultRightAxisOptions={labels:{x:15},title:{rotation:90}};e.defaultBottomAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}};e.defaultTopAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}}})(f||(f={}));return f});K(l,"Core/Foundation.js",[l["Core/Utilities.js"]],
function(f){var e=f.addEvent,l=f.isFunction,C=f.objectEach,v=f.removeEvent,E;(function(f){f.registerEventOptions=function(f,y){f.eventOptions=f.eventOptions||{};C(y.events,function(t,h){f.eventOptions[h]!==t&&(f.eventOptions[h]&&(v(f,h,f.eventOptions[h]),delete f.eventOptions[h]),l(t)&&(f.eventOptions[h]=t,e(f,h,t)))})}})(E||(E={}));return E});K(l,"Core/Axis/Tick.js",[l["Core/FormatUtilities.js"],l["Core/Globals.js"],l["Core/Utilities.js"]],function(f,e,l){var C=e.deg2rad,v=l.clamp,E=l.correctFloat,
G=l.defined,B=l.destroyObjectProperties,y=l.extend,t=l.fireEvent,h=l.isNumber,d=l.merge,b=l.objectEach,p=l.pick;e=function(){function e(b,d,e,p,h){this.isNewLabel=this.isNew=!0;this.axis=b;this.pos=d;this.type=e||"";this.parameters=h||{};this.tickmarkOffset=this.parameters.tickmarkOffset;this.options=this.parameters.options;t(this,"init");e||p||this.addLabel()}e.prototype.addLabel=function(){var b=this,d=b.axis,e=d.options,q=d.chart,z=d.categories,x=d.logarithmic,m=d.names,k=b.pos,a=p(b.options&&
b.options.labels,e.labels),g=d.tickPositions,c=k===g[0],D=k===g[g.length-1],A=(!a.step||1===a.step)&&1===d.tickInterval;g=g.info;var u=b.label,l;z=this.parameters.category||(z?p(z[k],m[k],k):k);x&&h(z)&&(z=E(x.lin2log(z)));if(d.dateTime)if(g){var S=q.time.resolveDTLFormat(e.dateTimeLabelFormats[!e.grid&&g.higherRanks[k]||g.unitName]);var R=S.main}else h(z)&&(R=d.dateTime.getXDateFormat(z,e.dateTimeLabelFormats||{}));b.isFirst=c;b.isLast=D;var M={axis:d,chart:q,dateTimeLabelFormat:R,isFirst:c,isLast:D,
pos:k,tick:b,tickPositionInfo:g,value:z};t(this,"labelFormat",M);var B=function(c){return a.formatter?a.formatter.call(c,c):a.format?(c.text=d.defaultLabelFormatter.call(c),f.format(a.format,c,q)):d.defaultLabelFormatter.call(c,c)};e=B.call(M,M);var aa=S&&S.list;b.shortenLabel=aa?function(){for(l=0;l<aa.length;l++)if(y(M,{dateTimeLabelFormat:aa[l]}),u.attr({text:B.call(M,M)}),u.getBBox().width<d.getSlotWidth(b)-2*a.padding)return;u.attr({text:""})}:void 0;A&&d._addedPlotLB&&b.moveLabel(e,a);G(u)||
b.movedLabel?u&&u.textStr!==e&&!A&&(!u.textWidth||a.style.width||u.styles.width||u.css({width:null}),u.attr({text:e}),u.textPxLength=u.getBBox().width):(b.label=u=b.createLabel({x:0,y:0},e,a),b.rotation=0)};e.prototype.createLabel=function(b,e,p){var n=this.axis,h=n.chart;if(b=G(e)&&p.enabled?h.renderer.text(e,b.x,b.y,p.useHTML).add(n.labelGroup):null)h.styledMode||b.css(d(p.style)),b.textPxLength=b.getBBox().width;return b};e.prototype.destroy=function(){B(this,this.axis)};e.prototype.getPosition=
function(b,d,e,p){var n=this.axis,h=n.chart,m=p&&h.oldChartHeight||h.chartHeight;b={x:b?E(n.translate(d+e,void 0,void 0,p)+n.transB):n.left+n.offset+(n.opposite?(p&&h.oldChartWidth||h.chartWidth)-n.right-n.left:0),y:b?m-n.bottom+n.offset-(n.opposite?n.height:0):E(m-n.translate(d+e,void 0,void 0,p)-n.transB)};b.y=v(b.y,-1E5,1E5);t(this,"afterGetPosition",{pos:b});return b};e.prototype.getLabelPosition=function(b,d,e,p,h,f,m,k){var a=this.axis,g=a.transA,c=a.isLinked&&a.linkedParent?a.linkedParent.reversed:
a.reversed,n=a.staggerLines,A=a.tickRotCorr||{x:0,y:0},u=p||a.reserveSpaceDefault?0:-a.labelOffset*("center"===a.labelAlign?.5:1),r={};e=0===a.side?e.rotation?-8:-e.getBBox().height:2===a.side?A.y+8:Math.cos(e.rotation*C)*(A.y-e.getBBox(!1,0).height/2);G(h.y)&&(e=0===a.side&&a.horiz?h.y+e:h.y);b=b+h.x+u+A.x-(f&&p?f*g*(c?-1:1):0);d=d+e-(f&&!p?f*g*(c?1:-1):0);n&&(p=m/(k||1)%n,a.opposite&&(p=n-p-1),d+=a.labelOffset/n*p);r.x=b;r.y=Math.round(d);t(this,"afterGetLabelPosition",{pos:r,tickmarkOffset:f,index:m});
return r};e.prototype.getLabelSize=function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0};e.prototype.getMarkPath=function(b,d,e,p,h,f){return f.crispLine([["M",b,d],["L",b+(h?0:-e),d+(h?e:0)]],p)};e.prototype.handleOverflow=function(b){var d=this.axis,e=d.options.labels,h=b.x,f=d.chart.chartWidth,r=d.chart.spacing,m=p(d.labelLeft,Math.min(d.pos,r[3]));r=p(d.labelRight,Math.max(d.isRadial?0:d.pos+d.len,f-r[1]));var k=this.label,a=this.rotation,g={left:0,center:.5,right:1}[d.labelAlign||
k.attr("align")],c=k.getBBox().width,D=d.getSlotWidth(this),A={},u=D,q=1,l;if(a||"justify"!==e.overflow)0>a&&h-g*c<m?l=Math.round(h/Math.cos(a*C)-m):0<a&&h+g*c>r&&(l=Math.round((f-h)/Math.cos(a*C)));else if(f=h+(1-g)*c,h-g*c<m?u=b.x+u*(1-g)-m:f>r&&(u=r-b.x+u*g,q=-1),u=Math.min(D,u),u<D&&"center"===d.labelAlign&&(b.x+=q*(D-u-g*(D-Math.min(c,u)))),c>u||d.autoRotation&&(k.styles||{}).width)l=u;l&&(this.shortenLabel?this.shortenLabel():(A.width=Math.floor(l)+"px",(e.style||{}).textOverflow||(A.textOverflow=
"ellipsis"),k.css(A)))};e.prototype.moveLabel=function(d,e){var h=this,p=h.label,n=h.axis,f=n.reversed,m=!1;p&&p.textStr===d?(h.movedLabel=p,m=!0,delete h.label):b(n.ticks,function(a){m||a.isNew||a===h||!a.label||a.label.textStr!==d||(h.movedLabel=a.label,m=!0,a.labelPos=h.movedLabel.xy,delete a.label)});if(!m&&(h.labelPos||p)){var k=h.labelPos||p.xy;p=n.horiz?f?0:n.width+n.left:k.x;n=n.horiz?k.y:f?n.width+n.left:0;h.movedLabel=h.createLabel({x:p,y:n},d,e);h.movedLabel&&h.movedLabel.attr({opacity:0})}};
e.prototype.render=function(b,d,e){var h=this.axis,n=h.horiz,f=this.pos,m=p(this.tickmarkOffset,h.tickmarkOffset);f=this.getPosition(n,f,m,d);m=f.x;var k=f.y;h=n&&m===h.pos+h.len||!n&&k===h.pos?-1:1;n=p(e,this.label&&this.label.newOpacity,1);e=p(e,1);this.isActive=!0;this.renderGridLine(d,e,h);this.renderMark(f,e,h);this.renderLabel(f,d,n,b);this.isNew=!1;t(this,"afterRender")};e.prototype.renderGridLine=function(b,d,e){var h=this.axis,n=h.options,f={},m=this.pos,k=this.type,a=p(this.tickmarkOffset,
h.tickmarkOffset),g=h.chart.renderer,c=this.gridLine,D=n.gridLineWidth,A=n.gridLineColor,u=n.gridLineDashStyle;"minor"===this.type&&(D=n.minorGridLineWidth,A=n.minorGridLineColor,u=n.minorGridLineDashStyle);c||(h.chart.styledMode||(f.stroke=A,f["stroke-width"]=D||0,f.dashstyle=u),k||(f.zIndex=1),b&&(d=0),this.gridLine=c=g.path().attr(f).addClass("highcharts-"+(k?k+"-":"")+"grid-line").add(h.gridGroup));if(c&&(e=h.getPlotLinePath({value:m+a,lineWidth:c.strokeWidth()*e,force:"pass",old:b})))c[b||this.isNew?
"attr":"animate"]({d:e,opacity:d})};e.prototype.renderMark=function(b,d,e){var h=this.axis,n=h.options,f=h.chart.renderer,m=this.type,k=h.tickSize(m?m+"Tick":"tick"),a=b.x;b=b.y;var g=p(n["minor"!==m?"tickWidth":"minorTickWidth"],!m&&h.isXAxis?1:0);n=n["minor"!==m?"tickColor":"minorTickColor"];var c=this.mark,D=!c;k&&(h.opposite&&(k[0]=-k[0]),c||(this.mark=c=f.path().addClass("highcharts-"+(m?m+"-":"")+"tick").add(h.axisGroup),h.chart.styledMode||c.attr({stroke:n,"stroke-width":g})),c[D?"attr":"animate"]({d:this.getMarkPath(a,
b,k[0],c.strokeWidth()*e,h.horiz,f),opacity:d}))};e.prototype.renderLabel=function(b,d,e,f){var n=this.axis,r=n.horiz,m=n.options,k=this.label,a=m.labels,g=a.step;n=p(this.tickmarkOffset,n.tickmarkOffset);var c=b.x;b=b.y;var D=!0;k&&h(c)&&(k.xy=b=this.getLabelPosition(c,b,k,r,a,n,f,g),this.isFirst&&!this.isLast&&!m.showFirstLabel||this.isLast&&!this.isFirst&&!m.showLastLabel?D=!1:!r||a.step||a.rotation||d||0===e||this.handleOverflow(b),g&&f%g&&(D=!1),D&&h(b.y)?(b.opacity=e,k[this.isNewLabel?"attr":
"animate"](b).show(!0),this.isNewLabel=!1):(k.hide(),this.isNewLabel=!0))};e.prototype.replaceMovedLabel=function(){var b=this.label,d=this.axis,e=d.reversed;if(b&&!this.isNew){var h=d.horiz?e?d.left:d.width+d.left:b.xy.x;e=d.horiz?b.xy.y:e?d.width+d.top:d.top;b.animate({x:h,y:e,opacity:0},void 0,b.destroy);delete this.label}d.isDirty=!0;this.label=this.movedLabel;delete this.movedLabel};return e}();"";return e});K(l,"Core/Axis/Axis.js",[l["Core/Animation/AnimationUtilities.js"],l["Core/Axis/AxisDefaults.js"],
l["Core/Color/Color.js"],l["Core/DefaultOptions.js"],l["Core/Foundation.js"],l["Core/Globals.js"],l["Core/Axis/Tick.js"],l["Core/Utilities.js"]],function(f,e,l,C,v,E,G,B){var y=f.animObject,t=C.defaultOptions,h=v.registerEventOptions,d=E.deg2rad,b=B.arrayMax,p=B.arrayMin,q=B.clamp,r=B.correctFloat,n=B.defined,J=B.destroyObjectProperties,w=B.erase,z=B.error,x=B.extend,m=B.fireEvent,k=B.isArray,a=B.isNumber,g=B.isString,c=B.merge,D=B.normalizeTickInterval,A=B.objectEach,u=B.pick,L=B.relativeLength,
S=B.removeEvent,R=B.splat,M=B.syncTimeout,U=function(a,c){return D(c,void 0,void 0,u(a.options.allowDecimals,.5>c||void 0!==a.tickAmount),!!a.tickAmount)};f=function(){function f(a,c){this.zoomEnabled=this.width=this.visible=this.userOptions=this.translationSlope=this.transB=this.transA=this.top=this.ticks=this.tickRotCorr=this.tickPositions=this.tickmarkOffset=this.tickInterval=this.tickAmount=this.side=this.series=this.right=this.positiveValuesOnly=this.pos=this.pointRangePadding=this.pointRange=
this.plotLinesAndBandsGroups=this.plotLinesAndBands=this.paddedTicks=this.overlap=this.options=this.offset=this.names=this.minPixelPadding=this.minorTicks=this.minorTickInterval=this.min=this.maxLabelLength=this.max=this.len=this.left=this.labelFormatter=this.labelEdge=this.isLinked=this.height=this.hasVisibleSeries=this.hasNames=this.eventOptions=this.coll=this.closestPointRange=this.chart=this.bottom=this.alternateBands=void 0;this.init(a,c)}f.prototype.init=function(c,b){var g=b.isX;this.chart=
c;this.horiz=c.inverted&&!this.isZAxis?!g:g;this.isXAxis=g;this.coll=this.coll||(g?"xAxis":"yAxis");m(this,"init",{userOptions:b});this.opposite=u(b.opposite,this.opposite);this.side=u(b.side,this.side,this.horiz?this.opposite?0:2:this.opposite?1:3);this.setOptions(b);var d=this.options,k=d.labels,e=d.type;this.userOptions=b;this.minPixelPadding=0;this.reversed=u(d.reversed,this.reversed);this.visible=d.visible;this.zoomEnabled=d.zoomEnabled;this.hasNames="category"===e||!0===d.categories;this.categories=
d.categories||(this.hasNames?[]:void 0);this.names||(this.names=[],this.names.keys={});this.plotLinesAndBandsGroups={};this.positiveValuesOnly=!!this.logarithmic;this.isLinked=n(d.linkedTo);this.ticks={};this.labelEdge=[];this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom;this.range=d.range;this.offset=d.offset||0;this.min=this.max=null;b=u(d.crosshair,R(c.options.tooltip.crosshairs)[g?0:1]);this.crosshair=!0===b?{}:
b;-1===c.axes.indexOf(this)&&(g?c.axes.splice(c.xAxis.length,0,this):c.axes.push(this),c[this.coll].push(this));this.series=this.series||[];c.inverted&&!this.isZAxis&&g&&"undefined"===typeof this.reversed&&(this.reversed=!0);this.labelRotation=a(k.rotation)?k.rotation:void 0;h(this,d);m(this,"afterInit")};f.prototype.setOptions=function(a){this.options=c(e.defaultXAxisOptions,"yAxis"===this.coll&&e.defaultYAxisOptions,[e.defaultTopAxisOptions,e.defaultRightAxisOptions,e.defaultBottomAxisOptions,e.defaultLeftAxisOptions][this.side],
c(t[this.coll],a));m(this,"afterSetOptions",{userOptions:a})};f.prototype.defaultLabelFormatter=function(c){var b=this.axis;c=this.chart.numberFormatter;var g=a(this.value)?this.value:NaN,d=b.chart.time,k=this.dateTimeLabelFormat,e=t.lang,m=e.numericSymbols;e=e.numericSymbolMagnitude||1E3;var u=b.logarithmic?Math.abs(g):b.tickInterval,h=m&&m.length;if(b.categories)var f="".concat(this.value);else if(k)f=d.dateFormat(k,g);else if(h&&1E3<=u)for(;h--&&"undefined"===typeof f;)b=Math.pow(e,h+1),u>=b&&
0===10*g%b&&null!==m[h]&&0!==g&&(f=c(g/b,-1)+m[h]);"undefined"===typeof f&&(f=1E4<=Math.abs(g)?c(g,-1):c(g,-1,void 0,""));return f};f.prototype.getSeriesExtremes=function(){var c=this,b=c.chart,g;m(this,"getSeriesExtremes",null,function(){c.hasVisibleSeries=!1;c.dataMin=c.dataMax=c.threshold=null;c.softThreshold=!c.isXAxis;c.stacking&&c.stacking.buildStacks();c.series.forEach(function(d){if(d.visible||!b.options.chart.ignoreHiddenSeries){var k=d.options,e=k.threshold;c.hasVisibleSeries=!0;c.positiveValuesOnly&&
0>=e&&(e=null);if(c.isXAxis){if(k=d.xData,k.length){k=c.logarithmic?k.filter(c.validatePositiveValue):k;g=d.getXExtremes(k);var m=g.min;var h=g.max;a(m)||m instanceof Date||(k=k.filter(a),g=d.getXExtremes(k),m=g.min,h=g.max);k.length&&(c.dataMin=Math.min(u(c.dataMin,m),m),c.dataMax=Math.max(u(c.dataMax,h),h))}}else if(d=d.applyExtremes(),a(d.dataMin)&&(m=d.dataMin,c.dataMin=Math.min(u(c.dataMin,m),m)),a(d.dataMax)&&(h=d.dataMax,c.dataMax=Math.max(u(c.dataMax,h),h)),n(e)&&(c.threshold=e),!k.softThreshold||
c.positiveValuesOnly)c.softThreshold=!1}})});m(this,"afterGetSeriesExtremes")};f.prototype.translate=function(c,b,g,d,k,e){var m=this.linkedParent||this,u=d&&m.old?m.old.min:m.min;if(!a(u))return NaN;var h=m.minPixelPadding;k=(m.isOrdinal||m.brokenAxis&&m.brokenAxis.hasBreaks||m.logarithmic&&k)&&m.lin2val;var f=1,p=0;d=d&&m.old?m.old.transA:m.transA;d||(d=m.transA);g&&(f*=-1,p=m.len);m.reversed&&(f*=-1,p-=f*(m.sector||m.len));b?(e=(c*f+p-h)/d+u,k&&(e=m.lin2val(e))):(k&&(c=m.val2lin(c)),c=f*(c-u)*
d,e=(m.isRadial?c:r(c))+p+f*h+(a(e)?d*e:0));return e};f.prototype.toPixels=function(a,c){return this.translate(a,!1,!this.horiz,void 0,!0)+(c?0:this.pos)};f.prototype.toValue=function(a,c){return this.translate(a-(c?0:this.pos),!0,!this.horiz,void 0,!0)};f.prototype.getPlotLinePath=function(c){function b(a,c,g){if("pass"!==r&&a<c||a>g)r?a=q(a,c,g):L=!0;return a}var g=this,d=g.chart,k=g.left,e=g.top,h=c.old,f=c.value,p=c.lineWidth,n=h&&d.oldChartHeight||d.chartHeight,I=h&&d.oldChartWidth||d.chartWidth,
D=g.transB,A=c.translatedValue,r=c.force,l,t,x,z,L;c={value:f,lineWidth:p,old:h,force:r,acrossPanes:c.acrossPanes,translatedValue:A};m(this,"getPlotLinePath",c,function(c){A=u(A,g.translate(f,void 0,void 0,h));A=q(A,-1E5,1E5);l=x=Math.round(A+D);t=z=Math.round(n-A-D);a(A)?g.horiz?(t=e,z=n-g.bottom,l=x=b(l,k,k+g.width)):(l=k,x=I-g.right,t=z=b(t,e,e+g.height)):(L=!0,r=!1);c.path=L&&!r?null:d.renderer.crispLine([["M",l,t],["L",x,z]],p||1)});return c.path};f.prototype.getLinearTickPositions=function(a,
c,g){var b=r(Math.floor(c/a)*a);g=r(Math.ceil(g/a)*a);var d=[],k;r(b+a)===b&&(k=20);if(this.single)return[c];for(c=b;c<=g;){d.push(c);c=r(c+a,k);if(c===m)break;var m=c}return d};f.prototype.getMinorTickInterval=function(){var a=this.options;return!0===a.minorTicks?u(a.minorTickInterval,"auto"):!1===a.minorTicks?null:a.minorTickInterval};f.prototype.getMinorTickPositions=function(){var a=this.options,c=this.tickPositions,g=this.minorTickInterval,b=this.pointRangePadding||0,d=this.min-b;b=this.max+
b;var k=b-d,m=[];if(k&&k/g<this.len/3){var e=this.logarithmic;if(e)this.paddedTicks.forEach(function(a,c,b){c&&m.push.apply(m,e.getLogTickPositions(g,b[c-1],b[c],!0))});else if(this.dateTime&&"auto"===this.getMinorTickInterval())m=m.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(g),d,b,a.startOfWeek));else for(a=d+(c[0]-d)%g;a<=b&&a!==m[0];a+=g)m.push(a)}0!==m.length&&this.trimTicks(m);return m};f.prototype.adjustForMinRange=function(){var a=this.options,c=this.logarithmic,g=this.min,
d=this.max,k=0,m,e,h,f;this.isXAxis&&"undefined"===typeof this.minRange&&!c&&(n(a.min)||n(a.max)||n(a.floor)||n(a.ceiling)?this.minRange=null:(this.series.forEach(function(a){h=a.xData;f=a.xIncrement?1:h.length-1;if(1<h.length)for(m=f;0<m;m--)if(e=h[m]-h[m-1],!k||e<k)k=e}),this.minRange=Math.min(5*k,this.dataMax-this.dataMin)));if(d-g<this.minRange){var A=this.dataMax-this.dataMin>=this.minRange;var D=this.minRange;var r=(D-d+g)/2;r=[g-r,u(a.min,g-r)];A&&(r[2]=this.logarithmic?this.logarithmic.log2lin(this.dataMin):
this.dataMin);g=b(r);d=[g+D,u(a.max,g+D)];A&&(d[2]=c?c.log2lin(this.dataMax):this.dataMax);d=p(d);d-g<D&&(r[0]=d-D,r[1]=u(a.min,d-D),g=b(r))}this.min=g;this.max=d};f.prototype.getClosest=function(){var a;this.categories?a=1:this.series.forEach(function(c){var g=c.closestPointRange,b=c.visible||!c.chart.options.chart.ignoreHiddenSeries;!c.noSharedTooltip&&n(g)&&b&&(a=n(a)?Math.min(a,g):g)});return a};f.prototype.nameToX=function(a){var c=k(this.options.categories),g=c?this.categories:this.names,b=
a.options.x;a.series.requireSorting=!1;n(b)||(b=this.options.uniqueNames&&g?c?g.indexOf(a.name):u(g.keys[a.name],-1):a.series.autoIncrement());if(-1===b){if(!c&&g)var d=g.length}else d=b;"undefined"!==typeof d&&(this.names[d]=a.name,this.names.keys[a.name]=d);return d};f.prototype.updateNames=function(){var a=this,c=this.names;0<c.length&&(Object.keys(c.keys).forEach(function(a){delete c.keys[a]}),c.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(function(c){c.xIncrement=null;if(!c.points||
c.isDirtyData)a.max=Math.max(a.max,c.xData.length-1),c.processData(),c.generatePoints();c.data.forEach(function(g,b){if(g&&g.options&&"undefined"!==typeof g.name){var d=a.nameToX(g);"undefined"!==typeof d&&d!==g.x&&(g.x=d,c.xData[b]=d)}})}))};f.prototype.setAxisTranslation=function(){var a=this,c=a.max-a.min,b=a.linkedParent,d=!!a.categories,k=a.isXAxis,e=a.axisPointRange||0,h=0,f=0,p=a.transA;if(k||d||e){var n=a.getClosest();b?(h=b.minPointOffset,f=b.pointRangePadding):a.series.forEach(function(c){var b=
d?1:k?u(c.options.pointRange,n,0):a.axisPointRange||0,m=c.options.pointPlacement;e=Math.max(e,b);if(!a.single||d)c=c.is("xrange")?!k:k,h=Math.max(h,c&&g(m)?0:b/2),f=Math.max(f,c&&"on"===m?0:b)});b=a.ordinal&&a.ordinal.slope&&n?a.ordinal.slope/n:1;a.minPointOffset=h*=b;a.pointRangePadding=f*=b;a.pointRange=Math.min(e,a.single&&d?1:c);k&&(a.closestPointRange=n)}a.translationSlope=a.transA=p=a.staticScale||a.len/(c+f||1);a.transB=a.horiz?a.left:a.bottom;a.minPixelPadding=p*h;m(this,"afterSetAxisTranslation")};
f.prototype.minFromRange=function(){return this.max-this.range};f.prototype.setTickInterval=function(c){var g=this.chart,b=this.logarithmic,d=this.options,k=this.isXAxis,e=this.isLinked,h=d.tickPixelInterval,f=this.categories,p=this.softThreshold,A=d.maxPadding,D=d.minPadding,I=a(d.tickInterval)&&0<=d.tickInterval?d.tickInterval:void 0,q=a(this.threshold)?this.threshold:null;this.dateTime||f||e||this.getTickAmount();var l=u(this.userMin,d.min);var t=u(this.userMax,d.max);if(e){this.linkedParent=g[this.coll][d.linkedTo];
var x=this.linkedParent.getExtremes();this.min=u(x.min,x.dataMin);this.max=u(x.max,x.dataMax);d.type!==this.linkedParent.options.type&&z(11,1,g)}else{if(p&&n(q))if(this.dataMin>=q)x=q,D=0;else if(this.dataMax<=q){var L=q;A=0}this.min=u(l,x,this.dataMin);this.max=u(t,L,this.dataMax)}b&&(this.positiveValuesOnly&&!c&&0>=Math.min(this.min,u(this.dataMin,this.min))&&z(10,1,g),this.min=r(b.log2lin(this.min),16),this.max=r(b.log2lin(this.max),16));this.range&&n(this.max)&&(this.userMin=this.min=l=Math.max(this.dataMin,
this.minFromRange()),this.userMax=t=this.max,this.range=null);m(this,"foundExtremes");this.beforePadding&&this.beforePadding();this.adjustForMinRange();!(f||this.axisPointRange||this.stacking&&this.stacking.usePercentage||e)&&n(this.min)&&n(this.max)&&(g=this.max-this.min)&&(!n(l)&&D&&(this.min-=g*D),!n(t)&&A&&(this.max+=g*A));a(this.userMin)||(a(d.softMin)&&d.softMin<this.min&&(this.min=l=d.softMin),a(d.floor)&&(this.min=Math.max(this.min,d.floor)));a(this.userMax)||(a(d.softMax)&&d.softMax>this.max&&
(this.max=t=d.softMax),a(d.ceiling)&&(this.max=Math.min(this.max,d.ceiling)));p&&n(this.dataMin)&&(q=q||0,!n(l)&&this.min<q&&this.dataMin>=q?this.min=this.options.minRange?Math.min(q,this.max-this.minRange):q:!n(t)&&this.max>q&&this.dataMax<=q&&(this.max=this.options.minRange?Math.max(q,this.min+this.minRange):q));a(this.min)&&a(this.max)&&!this.chart.polar&&this.min>this.max&&(n(this.options.min)?this.max=this.min:n(this.options.max)&&(this.min=this.max));this.tickInterval=this.min===this.max||"undefined"===
typeof this.min||"undefined"===typeof this.max?1:e&&this.linkedParent&&!I&&h===this.linkedParent.options.tickPixelInterval?I=this.linkedParent.tickInterval:u(I,this.tickAmount?(this.max-this.min)/Math.max(this.tickAmount-1,1):void 0,f?1:(this.max-this.min)*h/Math.max(this.len,h));if(k&&!c){var w=this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max);this.series.forEach(function(a){a.forceCrop=a.forceCropping&&a.forceCropping();a.processData(w)});m(this,"postProcessData",{hasExtemesChanged:w})}this.setAxisTranslation();
m(this,"initialAxisTranslation");this.pointRange&&!I&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));c=u(d.minTickInterval,this.dateTime&&!this.series.some(function(a){return a.noSharedTooltip})?this.closestPointRange:0);!I&&this.tickInterval<c&&(this.tickInterval=c);this.dateTime||this.logarithmic||I||(this.tickInterval=U(this,this.tickInterval));this.tickAmount||(this.tickInterval=this.unsquish());this.setTickPositions()};f.prototype.setTickPositions=function(){var a=this.options,
c=a.tickPositions,g=this.getMinorTickInterval(),b=this.hasVerticalPanning(),d="colorAxis"===this.coll,k=(d||!b)&&a.startOnTick;b=(d||!b)&&a.endOnTick;d=a.tickPositioner;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===g&&this.tickInterval?this.tickInterval/5:g;this.single=this.min===this.max&&n(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=g=c&&c.slice();if(!g){if(this.ordinal&&
this.ordinal.positions||!((this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)))if(this.dateTime)g=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinal&&this.ordinal.positions,this.closestPointRange,!0);else if(this.logarithmic)g=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else for(var e=a=this.tickInterval;e<=2*a;)if(g=this.getLinearTickPositions(this.tickInterval,this.min,this.max),
this.tickAmount&&g.length>this.tickAmount)this.tickInterval=U(this,e*=1.1);else break;else g=[this.min,this.max],z(19,!1,this.chart);g.length>this.len&&(g=[g[0],g.pop()],g[0]===g[1]&&(g.length=1));this.tickPositions=g;d&&(d=d.apply(this,[this.min,this.max]))&&(this.tickPositions=g=d)}this.paddedTicks=g.slice(0);this.trimTicks(g,k,b);this.isLinked||(this.single&&2>g.length&&!this.categories&&!this.series.some(function(a){return a.is("heatmap")&&"between"===a.options.pointPlacement})&&(this.min-=.5,
this.max+=.5),c||d||this.adjustTickAmount());m(this,"afterSetTickPositions")};f.prototype.trimTicks=function(a,c,g){var b=a[0],d=a[a.length-1],k=!this.isOrdinal&&this.minPointOffset||0;m(this,"trimTicks");if(!this.isLinked){if(c&&-Infinity!==b)this.min=b;else for(;this.min-k>a[0];)a.shift();if(g)this.max=d;else for(;this.max+k<a[a.length-1];)a.pop();0===a.length&&n(b)&&!this.options.tickPositions&&a.push((d+b)/2)}};f.prototype.alignToOthers=function(){var c=this,g=[this],b=c.options,d="yAxis"===this.coll&&
this.chart.options.chart.alignThresholds,k=[],m;c.thresholdAlignment=void 0;if((!1!==this.chart.options.chart.alignTicks&&b.alignTicks||d)&&!1!==b.startOnTick&&!1!==b.endOnTick&&!c.logarithmic){var e=function(a){var c=a.options;return[a.horiz?c.left:c.top,c.width,c.height,c.pane].join()},h=e(this);this.chart[this.coll].forEach(function(a){var b=a.series;b.length&&b.some(function(a){return a.visible})&&a!==c&&e(a)===h&&(m=!0,g.push(a))})}if(m&&d){g.forEach(function(g){g=g.getThresholdAlignment(c);
a(g)&&k.push(g)});var u=1<k.length?k.reduce(function(a,c){return a+c},0)/k.length:void 0;g.forEach(function(a){a.thresholdAlignment=u})}return m};f.prototype.getThresholdAlignment=function(c){(!a(this.dataMin)||this!==c&&this.series.some(function(a){return a.isDirty||a.isDirtyData}))&&this.getSeriesExtremes();if(a(this.threshold))return c=q((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1),this.options.reversed&&(c=1-c),c};f.prototype.getTickAmount=function(){var a=this.options,
c=a.tickPixelInterval,g=a.tickAmount;!n(a.tickInterval)&&!g&&this.len<c&&!this.isRadial&&!this.logarithmic&&a.startOnTick&&a.endOnTick&&(g=2);!g&&this.alignToOthers()&&(g=Math.ceil(this.len/c)+1);4>g&&(this.finalTickAmt=g,g=5);this.tickAmount=g};f.prototype.adjustTickAmount=function(){var c=this,g=c.finalTickAmt,b=c.max,d=c.min,k=c.options,m=c.tickPositions,e=c.tickAmount,h=c.thresholdAlignment,f=m&&m.length,p=u(c.threshold,c.softThreshold?0:null);var A=c.tickInterval;if(a(h)){var D=.5>h?Math.ceil(h*
(e-1)):Math.floor(h*(e-1));k.reversed&&(D=e-1-D)}if(c.hasData()&&a(d)&&a(b)){h=function(){c.transA*=(f-1)/(e-1);c.min=k.startOnTick?m[0]:Math.min(d,m[0]);c.max=k.endOnTick?m[m.length-1]:Math.max(b,m[m.length-1])};if(a(D)&&a(c.threshold)){for(;m[D]!==p||m.length!==e||m[0]>d||m[m.length-1]<b;){m.length=0;for(m.push(c.threshold);m.length<e;)void 0===m[D]||m[D]>c.threshold?m.unshift(r(m[0]-A)):m.push(r(m[m.length-1]+A));if(A>8*c.tickInterval)break;A*=2}h()}else if(f<e){for(;m.length<e;)m.length%2||d===
p?m.push(r(m[m.length-1]+A)):m.unshift(r(m[0]-A));h()}if(n(g)){for(A=p=m.length;A--;)(3===g&&1===A%2||2>=g&&0<A&&A<p-1)&&m.splice(A,1);c.finalTickAmt=void 0}}};f.prototype.setScale=function(){var a=!1,c=!1;this.series.forEach(function(g){a=a||g.isDirtyData||g.isDirty;c=c||g.xAxis&&g.xAxis.isDirty||!1});this.setAxisSize();var g=this.len!==(this.old&&this.old.len);g||a||c||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?
(this.stacking&&this.stacking.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.isDirty||(this.isDirty=g||this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max))):this.stacking&&this.stacking.cleanStacks();a&&this.panningState&&(this.panningState.isDirty=!0);m(this,"afterSetScale")};f.prototype.setExtremes=function(a,c,g,b,d){var k=this,e=k.chart;g=u(g,!0);k.series.forEach(function(a){delete a.kdTree});d=x(d,{min:a,max:c});m(k,"setExtremes",d,
function(){k.userMin=a;k.userMax=c;k.eventArgs=d;g&&e.redraw(b)})};f.prototype.zoom=function(a,c){var g=this,b=this.dataMin,d=this.dataMax,k=this.options,e=Math.min(b,u(k.min,b)),h=Math.max(d,u(k.max,d));a={newMin:a,newMax:c};m(this,"zoom",a,function(a){var c=a.newMin,k=a.newMax;if(c!==g.min||k!==g.max)g.allowZoomOutside||(n(b)&&(c<e&&(c=e),c>h&&(c=h)),n(d)&&(k<e&&(k=e),k>h&&(k=h))),g.displayBtn="undefined"!==typeof c||"undefined"!==typeof k,g.setExtremes(c,k,!1,void 0,{trigger:"zoom"});a.zoomed=
!0});return a.zoomed};f.prototype.setAxisSize=function(){var a=this.chart,c=this.options,g=c.offsets||[0,0,0,0],b=this.horiz,d=this.width=Math.round(L(u(c.width,a.plotWidth-g[3]+g[1]),a.plotWidth)),k=this.height=Math.round(L(u(c.height,a.plotHeight-g[0]+g[2]),a.plotHeight)),m=this.top=Math.round(L(u(c.top,a.plotTop+g[0]),a.plotHeight,a.plotTop));c=this.left=Math.round(L(u(c.left,a.plotLeft+g[3]),a.plotWidth,a.plotLeft));this.bottom=a.chartHeight-k-m;this.right=a.chartWidth-d-c;this.len=Math.max(b?
d:k,0);this.pos=b?c:m};f.prototype.getExtremes=function(){var a=this.logarithmic;return{min:a?r(a.lin2log(this.min)):this.min,max:a?r(a.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}};f.prototype.getThreshold=function(a){var c=this.logarithmic,g=c?c.lin2log(this.min):this.min;c=c?c.lin2log(this.max):this.max;null===a||-Infinity===a?a=g:Infinity===a?a=c:g>a?a=g:c<a&&(a=c);return this.translate(a,0,1,0,1)};f.prototype.autoLabelAlign=
function(a){var c=(u(a,0)-90*this.side+720)%360;a={align:"center"};m(this,"autoLabelAlign",a,function(a){15<c&&165>c?a.align="right":195<c&&345>c&&(a.align="left")});return a.align};f.prototype.tickSize=function(a){var c=this.options,g=u(c["tick"===a?"tickWidth":"minorTickWidth"],"tick"===a&&this.isXAxis&&!this.categories?1:0),b=c["tick"===a?"tickLength":"minorTickLength"];if(g&&b){"inside"===c[a+"Position"]&&(b=-b);var d=[b,g]}a={tickSize:d};m(this,"afterTickSize",a);return a.tickSize};f.prototype.labelMetrics=
function(){var a=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style.fontSize,this.ticks[a]&&this.ticks[a].label)};f.prototype.unsquish=function(){var c=this.options.labels,g=this.horiz,b=this.tickInterval,k=this.len/(((this.categories?1:0)+this.max-this.min)/b),m=c.rotation,e=this.labelMetrics(),h=Math.max(this.max-this.min,0),f=function(a){var c=a/(k||1);c=1<c?Math.ceil(c):1;c*b>h&&Infinity!==a&&Infinity!==k&&h&&(c=Math.ceil(h/b));return r(c*
b)},p=b,n,A,D=Number.MAX_VALUE;if(g){if(!c.staggerLines&&!c.step)if(a(m))var q=[m];else k<c.autoRotationLimit&&(q=c.autoRotation);q&&q.forEach(function(a){if(a===m||a&&-90<=a&&90>=a){A=f(Math.abs(e.h/Math.sin(d*a)));var c=A+Math.abs(a/360);c<D&&(D=c,n=a,p=A)}})}else c.step||(p=f(e.h));this.autoRotation=q;this.labelRotation=u(n,a(m)?m:0);return p};f.prototype.getSlotWidth=function(c){var g=this.chart,b=this.horiz,d=this.options.labels,k=Math.max(this.tickPositions.length-(this.categories?0:1),1),m=
g.margin[3];if(c&&a(c.slotWidth))return c.slotWidth;if(b&&2>d.step)return d.rotation?0:(this.staggerLines||1)*this.len/k;if(!b){c=d.style.width;if(void 0!==c)return parseInt(String(c),10);if(m)return m-g.spacing[3]}return.33*g.chartWidth};f.prototype.renderUnsquish=function(){var a=this.chart,c=a.renderer,b=this.tickPositions,d=this.ticks,k=this.options.labels,m=k.style,e=this.horiz,h=this.getSlotWidth(),u=Math.max(1,Math.round(h-2*k.padding)),f={},p=this.labelMetrics(),n=m.textOverflow,A=0;g(k.rotation)||
(f.rotation=k.rotation||0);b.forEach(function(a){a=d[a];a.movedLabel&&a.replaceMovedLabel();a&&a.label&&a.label.textPxLength>A&&(A=a.label.textPxLength)});this.maxLabelLength=A;if(this.autoRotation)A>u&&A>p.h?f.rotation=this.labelRotation:this.labelRotation=0;else if(h){var D=u;if(!n){var r="clip";for(u=b.length;!e&&u--;){var q=b[u];if(q=d[q].label)q.styles&&"ellipsis"===q.styles.textOverflow?q.css({textOverflow:"clip"}):q.textPxLength>h&&q.css({width:h+"px"}),q.getBBox().height>this.len/b.length-
(p.h-p.f)&&(q.specificTextOverflow="ellipsis")}}}f.rotation&&(D=A>.5*a.chartHeight?.33*a.chartHeight:A,n||(r="ellipsis"));if(this.labelAlign=k.align||this.autoLabelAlign(this.labelRotation))f.align=this.labelAlign;b.forEach(function(a){var c=(a=d[a])&&a.label,g=m.width,b={};c&&(c.attr(f),a.shortenLabel?a.shortenLabel():D&&!g&&"nowrap"!==m.whiteSpace&&(D<c.textPxLength||"SPAN"===c.element.tagName)?(b.width=D+"px",n||(b.textOverflow=c.specificTextOverflow||r),c.css(b)):c.styles&&c.styles.width&&!b.width&&
!g&&c.css({width:null}),delete c.specificTextOverflow,a.rotation=f.rotation)},this);this.tickRotCorr=c.rotCorr(p.b,this.labelRotation||0,0!==this.side)};f.prototype.hasData=function(){return this.series.some(function(a){return a.hasData()})||this.options.showEmpty&&n(this.min)&&n(this.max)};f.prototype.addTitle=function(a){var g=this.chart.renderer,b=this.horiz,d=this.opposite,k=this.options.title,m=this.chart.styledMode,e;this.axisTitle||((e=k.textAlign)||(e=(b?{low:"left",middle:"center",high:"right"}:
{low:d?"right":"left",middle:"center",high:d?"left":"right"})[k.align]),this.axisTitle=g.text(k.text||"",0,0,k.useHTML).attr({zIndex:7,rotation:k.rotation,align:e}).addClass("highcharts-axis-title"),m||this.axisTitle.css(c(k.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0);m||k.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"});this.axisTitle[a?"show":"hide"](a)};f.prototype.generateTick=function(a){var c=this.ticks;c[a]?c[a].addLabel():c[a]=new G(this,a)};f.prototype.getOffset=
function(){var a=this,c=this,g=c.chart,b=c.horiz,d=c.options,k=c.side,e=c.ticks,h=c.tickPositions,f=c.coll,p=c.axisParent,D=g.renderer,q=g.inverted&&!c.isZAxis?[1,0,3,2][k]:k,r=c.hasData(),l=d.title,t=d.labels,x=g.axisOffset;g=g.clipOffset;var z=[-1,1,1,-1][k],L=d.className,w,S=0,ja=0,ca=0;c.showAxis=w=r||d.showEmpty;c.staggerLines=c.horiz&&t.staggerLines||void 0;if(!c.axisGroup){var J=function(c,g,b){return D.g(c).attr({zIndex:b}).addClass("highcharts-".concat(f.toLowerCase()).concat(g," ")+(a.isRadial?
"highcharts-radial-axis".concat(g," "):"")+(L||"")).add(p)};c.gridGroup=J("grid","-grid",d.gridZIndex);c.axisGroup=J("axis","",d.zIndex);c.labelGroup=J("axis-labels","-labels",t.zIndex)}r||c.isLinked?(h.forEach(function(a){c.generateTick(a)}),c.renderUnsquish(),c.reserveSpaceDefault=0===k||2===k||{1:"left",3:"right"}[k]===c.labelAlign,u(t.reserveSpace,"center"===c.labelAlign?!0:null,c.reserveSpaceDefault)&&h.forEach(function(a){ca=Math.max(e[a].getLabelSize(),ca)}),c.staggerLines&&(ca*=c.staggerLines),
c.labelOffset=ca*(c.opposite?-1:1)):A(e,function(a,c){a.destroy();delete e[c]});if(l&&l.text&&!1!==l.enabled&&(c.addTitle(w),w&&!1!==l.reserveSpace)){c.titleOffset=S=c.axisTitle.getBBox()[b?"height":"width"];var M=l.offset;ja=n(M)?0:u(l.margin,b?5:10)}c.renderLine();c.offset=z*u(d.offset,x[k]?x[k]+(d.margin||0):0);c.tickRotCorr=c.tickRotCorr||{x:0,y:0};l=0===k?-c.labelMetrics().h:2===k?c.tickRotCorr.y:0;r=Math.abs(ca)+ja;ca&&(r=r-l+z*(b?u(t.y,c.tickRotCorr.y+8*z):t.x));c.axisTitleMargin=u(M,r);c.getMaxLabelDimensions&&
(c.maxLabelDimensions=c.getMaxLabelDimensions(e,h));"colorAxis"!==f&&(b=this.tickSize("tick"),x[k]=Math.max(x[k],(c.axisTitleMargin||0)+S+z*c.offset,r,h&&h.length&&b?b[0]+z*c.offset:0),d=!c.axisLine||d.offset?0:2*Math.floor(c.axisLine.strokeWidth()/2),g[q]=Math.max(g[q],d));m(this,"afterGetOffset")};f.prototype.getLinePath=function(a){var c=this.chart,g=this.opposite,b=this.offset,d=this.horiz,k=this.left+(g?this.width:0)+b;b=c.chartHeight-this.bottom-(g?this.height:0)+b;g&&(a*=-1);return c.renderer.crispLine([["M",
d?this.left:k,d?b:this.top],["L",d?c.chartWidth-this.right:k,d?b:c.chartHeight-this.bottom]],a)};f.prototype.renderLine=function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))};f.prototype.getTitlePosition=function(){var a=this.horiz,c=this.left,g=this.top,b=this.len,d=this.options.title,k=a?c:g,e=this.opposite,
h=this.offset,f=d.x,u=d.y,p=this.axisTitle,n=this.chart.renderer.fontMetrics(d.style.fontSize,p);p=p?Math.max(p.getBBox(!1,0).height-n.h-1,0):0;b={low:k+(a?0:b),middle:k+b/2,high:k+(a?b:0)}[d.align];c=(a?g+this.height:c)+(a?1:-1)*(e?-1:1)*(this.axisTitleMargin||0)+[-p,p,n.f,-p][this.side];a={x:a?b+f:c+(e?this.width:0)+h+f,y:a?c+u-(e?this.height:0)+h:b+u};m(this,"afterGetTitlePosition",{titlePosition:a});return a};f.prototype.renderMinorTick=function(a,c){var g=this.minorTicks;g[a]||(g[a]=new G(this,
a,"minor"));c&&g[a].isNew&&g[a].render(null,!0);g[a].render(null,!1,1)};f.prototype.renderTick=function(a,c,g){var b=this.ticks;if(!this.isLinked||a>=this.min&&a<=this.max||this.grid&&this.grid.isColumn)b[a]||(b[a]=new G(this,a)),g&&b[a].isNew&&b[a].render(c,!0,-1),b[a].render(c)};f.prototype.render=function(){var c=this,g=c.chart,b=c.logarithmic,d=c.options,k=c.isLinked,e=c.tickPositions,h=c.axisTitle,f=c.ticks,u=c.minorTicks,p=c.alternateBands,n=d.stackLabels,D=d.alternateGridColor,r=c.tickmarkOffset,
q=c.axisLine,l=c.showAxis,t=y(g.renderer.globalAnimation),x,z;c.labelEdge.length=0;c.overlap=!1;[f,u,p].forEach(function(a){A(a,function(a){a.isActive=!1})});if(c.hasData()||k){var L=c.chart.hasRendered&&c.old&&a(c.old.min);c.minorTickInterval&&!c.categories&&c.getMinorTickPositions().forEach(function(a){c.renderMinorTick(a,L)});e.length&&(e.forEach(function(a,g){c.renderTick(a,g,L)}),r&&(0===c.min||c.single)&&(f[-1]||(f[-1]=new G(c,-1,null,!0)),f[-1].render(-1)));D&&e.forEach(function(a,d){z="undefined"!==
typeof e[d+1]?e[d+1]+r:c.max-r;0===d%2&&a<c.max&&z<=c.max+(g.polar?-r:r)&&(p[a]||(p[a]=new E.PlotLineOrBand(c)),x=a+r,p[a].options={from:b?b.lin2log(x):x,to:b?b.lin2log(z):z,color:D,className:"highcharts-alternate-grid"},p[a].render(),p[a].isActive=!0)});c._addedPlotLB||(c._addedPlotLB=!0,(d.plotLines||[]).concat(d.plotBands||[]).forEach(function(a){c.addPlotBandOrLine(a)}))}[f,u,p].forEach(function(a){var c=[],b=t.duration;A(a,function(a,g){a.isActive||(a.render(g,!1,0),a.isActive=!1,c.push(g))});
M(function(){for(var g=c.length;g--;)a[c[g]]&&!a[c[g]].isActive&&(a[c[g]].destroy(),delete a[c[g]])},a!==p&&g.hasRendered&&b?b:0)});q&&(q[q.isPlaced?"animate":"attr"]({d:this.getLinePath(q.strokeWidth())}),q.isPlaced=!0,q[l?"show":"hide"](l));h&&l&&(d=c.getTitlePosition(),h[h.isNew?"attr":"animate"](d),h.isNew=!1);n&&n.enabled&&c.stacking&&c.stacking.renderStackTotals();c.old={len:c.len,max:c.max,min:c.min,transA:c.transA,userMax:c.userMax,userMin:c.userMin};c.isDirty=!1;m(this,"afterRender")};f.prototype.redraw=
function(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(a){a.render()}));this.series.forEach(function(a){a.isDirty=!0})};f.prototype.getKeepProps=function(){return this.keepProps||f.keepProps};f.prototype.destroy=function(a){var c=this,g=c.plotLinesAndBands,b=this.eventOptions;m(this,"destroy",{keepEvents:a});a||S(c);[c.ticks,c.minorTicks,c.alternateBands].forEach(function(a){J(a)});if(g)for(a=g.length;a--;)g[a].destroy();"axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(a){c[a]&&
(c[a]=c[a].destroy())});for(var d in c.plotLinesAndBandsGroups)c.plotLinesAndBandsGroups[d]=c.plotLinesAndBandsGroups[d].destroy();A(c,function(a,g){-1===c.getKeepProps().indexOf(g)&&delete c[g]});this.eventOptions=b};f.prototype.drawCrosshair=function(a,c){var g=this.crosshair,b=u(g&&g.snap,!0),d=this.chart,k,e=this.cross;m(this,"drawCrosshair",{e:a,point:c});a||(a=this.cross&&this.cross.e);if(g&&!1!==(n(c)||!b)){b?n(c)&&(k=u("colorAxis"!==this.coll?c.crosshairPos:null,this.isXAxis?c.plotX:this.len-
c.plotY)):k=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos);if(n(k)){var h={value:c&&(this.isXAxis?c.x:u(c.stackY,c.y)),translatedValue:k};d.polar&&x(h,{isCrosshair:!0,chartX:a&&a.chartX,chartY:a&&a.chartY,point:c});h=this.getPlotLinePath(h)||null}if(!n(h)){this.hideCrosshair();return}b=this.categories&&!this.isRadial;e||(this.cross=e=d.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(b?"category ":"thin ")+(g.className||"")).attr({zIndex:u(g.zIndex,2)}).add(),d.styledMode||
(e.attr({stroke:g.color||(b?l.parse("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":u(g.width,1)}).css({"pointer-events":"none"}),g.dashStyle&&e.attr({dashstyle:g.dashStyle})));e.show().attr({d:h});b&&!g.width&&e.attr({"stroke-width":this.transA});this.cross.e=a}else this.hideCrosshair();m(this,"afterDrawCrosshair",{e:a,point:c})};f.prototype.hideCrosshair=function(){this.cross&&this.cross.hide();m(this,"afterHideCrosshair")};f.prototype.hasVerticalPanning=function(){var a=this.chart.options.chart.panning;
return!!(a&&a.enabled&&/y/.test(a.type))};f.prototype.validatePositiveValue=function(c){return a(c)&&0<c};f.prototype.update=function(a,g){var b=this.chart;a=c(this.userOptions,a);this.destroy(!0);this.init(b,a);b.isDirtyBox=!0;u(g,!0)&&b.redraw()};f.prototype.remove=function(a){for(var c=this.chart,g=this.coll,b=this.series,d=b.length;d--;)b[d]&&b[d].remove(!1);w(c.axes,this);w(c[g],this);c[g].forEach(function(a,c){a.options.index=a.userOptions.index=c});this.destroy();c.isDirtyBox=!0;u(a,!0)&&c.redraw()};
f.prototype.setTitle=function(a,c){this.update({title:a},c)};f.prototype.setCategories=function(a,c){this.update({categories:a},c)};f.defaultOptions=e.defaultXAxisOptions;f.keepProps="extKey hcEvents names series userMax userMin".split(" ");return f}();"";return f});K(l,"Core/Axis/DateTimeAxis.js",[l["Core/Utilities.js"]],function(f){var e=f.addEvent,l=f.getMagnitude,C=f.normalizeTickInterval,v=f.timeUnits,E;(function(f){function B(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)}
function y(d){"datetime"!==d.userOptions.type?this.dateTime=void 0:this.dateTime||(this.dateTime=new h(this))}var t=[];f.compose=function(d){-1===t.indexOf(d)&&(t.push(d),d.keepProps.push("dateTime"),d.prototype.getTimeTicks=B,e(d,"init",y));return d};var h=function(){function d(b){this.axis=b}d.prototype.normalizeTimeTickInterval=function(b,d){var e=d||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],
["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];d=e[e.length-1];var h=v[d[0]],f=d[1],p;for(p=0;p<e.length&&!(d=e[p],h=v[d[0]],f=d[1],e[p+1]&&b<=(h*f[f.length-1]+v[e[p+1][0]])/2);p++);h===v.year&&b<5*h&&(f=[1,2,5]);b=C(b/h,f,"year"===d[0]?Math.max(l(b/h),1):1);return{unitRange:h,count:b,unitName:d[0]}};d.prototype.getXDateFormat=function(b,d){var e=this.axis,h=e.chart.time;return e.closestPointRange?h.getDateFormat(e.closestPointRange,b,e.options.startOfWeek,d)||h.resolveDTLFormat(d.year).main:
h.resolveDTLFormat(d.day).main};return d}();f.Additions=h})(E||(E={}));return E});K(l,"Core/Axis/LogarithmicAxis.js",[l["Core/Utilities.js"]],function(f){var e=f.addEvent,l=f.normalizeTickInterval,C=f.pick,v;(function(f){function v(e){var d=this.logarithmic;"logarithmic"!==e.userOptions.type?this.logarithmic=void 0:d||(this.logarithmic=new t(this))}function B(){var e=this.logarithmic;e&&(this.lin2val=function(d){return e.lin2log(d)},this.val2lin=function(d){return e.log2lin(d)})}var y=[];f.compose=
function(h){-1===y.indexOf(h)&&(y.push(h),h.keepProps.push("logarithmic"),e(h,"init",v),e(h,"afterInit",B));return h};var t=function(){function e(d){this.axis=d}e.prototype.getLogTickPositions=function(d,b,e,h){var f=this.axis,p=f.len,q=f.options,t=[];h||(this.minorAutoInterval=void 0);if(.5<=d)d=Math.round(d),t=f.getLinearTickPositions(d,b,e);else if(.08<=d){var z=Math.floor(b),x,m=q=void 0;for(p=.3<d?[1,2,4]:.15<d?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];z<e+1&&!m;z++){var k=p.length;for(x=0;x<k&&!m;x++){var a=
this.log2lin(this.lin2log(z)*p[x]);a>b&&(!h||q<=e)&&"undefined"!==typeof q&&t.push(q);q>e&&(m=!0);q=a}}}else b=this.lin2log(b),e=this.lin2log(e),d=h?f.getMinorTickInterval():q.tickInterval,d=C("auto"===d?null:d,this.minorAutoInterval,q.tickPixelInterval/(h?5:1)*(e-b)/((h?p/f.tickPositions.length:p)||1)),d=l(d),t=f.getLinearTickPositions(d,b,e).map(this.log2lin),h||(this.minorAutoInterval=d/5);h||(f.tickInterval=d);return t};e.prototype.lin2log=function(d){return Math.pow(10,d)};e.prototype.log2lin=
function(d){return Math.log(d)/Math.LN10};return e}();f.Additions=t})(v||(v={}));return v});K(l,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[l["Core/Utilities.js"]],function(f){var e=f.erase,l=f.extend,C=f.isNumber,v;(function(f){var v=[],B;f.compose=function(e,h){B||(B=e);-1===v.indexOf(h)&&(v.push(h),l(h.prototype,y.prototype));return h};var y=function(){function f(){}f.prototype.getPlotBandPath=function(e,d,b){void 0===b&&(b=this.options);var h=this.getPlotLinePath({value:d,force:!0,acrossPanes:b.acrossPanes}),
f=[],r=this.horiz;d=!C(this.min)||!C(this.max)||e<this.min&&d<this.min||e>this.max&&d>this.max;e=this.getPlotLinePath({value:e,force:!0,acrossPanes:b.acrossPanes});b=1;if(e&&h){if(d){var n=e.toString()===h.toString();b=0}for(d=0;d<e.length;d+=2){var l=e[d],t=e[d+1],z=h[d],x=h[d+1];"M"!==l[0]&&"L"!==l[0]||"M"!==t[0]&&"L"!==t[0]||"M"!==z[0]&&"L"!==z[0]||"M"!==x[0]&&"L"!==x[0]||(r&&z[1]===l[1]?(z[1]+=b,x[1]+=b):r||z[2]!==l[2]||(z[2]+=b,x[2]+=b),f.push(["M",l[1],l[2]],["L",t[1],t[2]],["L",x[1],x[2]],
["L",z[1],z[2]],["Z"]));f.isFlat=n}}return f};f.prototype.addPlotBand=function(e){return this.addPlotBandOrLine(e,"plotBands")};f.prototype.addPlotLine=function(e){return this.addPlotBandOrLine(e,"plotLines")};f.prototype.addPlotBandOrLine=function(e,d){var b=this,f=this.userOptions,h=new B(this,e);this.visible&&(h=h.render());if(h){this._addedPlotLB||(this._addedPlotLB=!0,(f.plotLines||[]).concat(f.plotBands||[]).forEach(function(d){b.addPlotBandOrLine(d)}));if(d){var r=f[d]||[];r.push(e);f[d]=r}this.plotLinesAndBands.push(h)}return h};
f.prototype.removePlotBandOrLine=function(f){var d=this.plotLinesAndBands,b=this.options,h=this.userOptions;if(d){for(var q=d.length;q--;)d[q].id===f&&d[q].destroy();[b.plotLines||[],h.plotLines||[],b.plotBands||[],h.plotBands||[]].forEach(function(b){for(q=b.length;q--;)(b[q]||{}).id===f&&e(b,b[q])})}};f.prototype.removePlotBand=function(e){this.removePlotBandOrLine(e)};f.prototype.removePlotLine=function(e){this.removePlotBandOrLine(e)};return f}()})(v||(v={}));return v});K(l,"Core/Axis/PlotLineOrBand/PlotLineOrBand.js",
[l["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"],l["Core/Utilities.js"]],function(f,e){var l=e.arrayMax,C=e.arrayMin,v=e.defined,E=e.destroyObjectProperties,G=e.erase,B=e.fireEvent,y=e.merge,t=e.objectEach,h=e.pick;e=function(){function d(b,d){this.axis=b;d&&(this.options=d,this.id=d.id)}d.compose=function(b){return f.compose(d,b)};d.prototype.render=function(){B(this,"render");var b=this,d=b.axis,e=d.horiz,f=d.logarithmic,n=b.options,l=n.color,w=h(n.zIndex,0),z=n.events,x={},m=d.chart.renderer,
k=n.label,a=b.label,g=n.to,c=n.from,D=n.value,A=b.svgElem,u=[],L=v(c)&&v(g);u=v(D);var S=!A,R={"class":"highcharts-plot-"+(L?"band ":"line ")+(n.className||"")},M=L?"bands":"lines";f&&(c=f.log2lin(c),g=f.log2lin(g),D=f.log2lin(D));d.chart.styledMode||(u?(R.stroke=l||"#999999",R["stroke-width"]=h(n.width,1),n.dashStyle&&(R.dashstyle=n.dashStyle)):L&&(R.fill=l||"#e6ebf5",n.borderWidth&&(R.stroke=n.borderColor,R["stroke-width"]=n.borderWidth)));x.zIndex=w;M+="-"+w;(f=d.plotLinesAndBandsGroups[M])||(d.plotLinesAndBandsGroups[M]=
f=m.g("plot-"+M).attr(x).add());S&&(b.svgElem=A=m.path().attr(R).add(f));if(u)u=d.getPlotLinePath({value:D,lineWidth:A.strokeWidth(),acrossPanes:n.acrossPanes});else if(L)u=d.getPlotBandPath(c,g,n);else return;!b.eventsAdded&&z&&(t(z,function(a,c){A.on(c,function(a){z[c].apply(b,[a])})}),b.eventsAdded=!0);(S||!A.d)&&u&&u.length?A.attr({d:u}):A&&(u?(A.show(),A.animate({d:u})):A.d&&(A.hide(),a&&(b.label=a=a.destroy())));k&&(v(k.text)||v(k.formatter))&&u&&u.length&&0<d.width&&0<d.height&&!u.isFlat?(k=
y({align:e&&L&&"center",x:e?!L&&4:10,verticalAlign:!e&&L&&"middle",y:e?L?16:10:L?6:-4,rotation:e&&!L&&90},k),this.renderLabel(k,u,L,w)):a&&a.hide();return b};d.prototype.renderLabel=function(b,d,e,f){var h=this.axis,p=h.chart.renderer,r=this.label;r||(this.label=r=p.text(this.getLabelText(b),0,0,b.useHTML).attr({align:b.textAlign||b.align,rotation:b.rotation,"class":"highcharts-plot-"+(e?"band":"line")+"-label "+(b.className||""),zIndex:f}).add(),h.chart.styledMode||r.css(y({textOverflow:"ellipsis"},
b.style)));f=d.xBounds||[d[0][1],d[1][1],e?d[2][1]:d[0][1]];d=d.yBounds||[d[0][2],d[1][2],e?d[2][2]:d[0][2]];e=C(f);p=C(d);r.align(b,!1,{x:e,y:p,width:l(f)-e,height:l(d)-p});r.alignValue&&"left"!==r.alignValue||r.css({width:(90===r.rotation?h.height-(r.alignAttr.y-h.top):h.width-(r.alignAttr.x-h.left))+"px"});r.show(!0)};d.prototype.getLabelText=function(b){return v(b.formatter)?b.formatter.call(this):b.text};d.prototype.destroy=function(){G(this.axis.plotLinesAndBands,this);delete this.axis;E(this)};
return d}();"";"";return e});K(l,"Core/Tooltip.js",[l["Core/FormatUtilities.js"],l["Core/Globals.js"],l["Core/Renderer/RendererUtilities.js"],l["Core/Renderer/RendererRegistry.js"],l["Core/Utilities.js"]],function(f,e,l,C,v){var E=f.format,G=e.doc,B=l.distribute,y=v.addEvent,t=v.clamp,h=v.css,d=v.defined,b=v.discardElement,p=v.extend,q=v.fireEvent,r=v.isArray,n=v.isNumber,J=v.isString,w=v.merge,z=v.pick,x=v.splat,m=v.syncTimeout;f=function(){function k(a,g){this.allowShared=!0;this.container=void 0;
this.crosshairs=[];this.distance=0;this.isHidden=!0;this.isSticky=!1;this.now={};this.options={};this.outside=!1;this.chart=a;this.init(a,g)}k.prototype.applyFilter=function(){var a=this.chart;a.renderer.definition({tagName:"filter",attributes:{id:"drop-shadow-"+a.index,opacity:.5},children:[{tagName:"feGaussianBlur",attributes:{"in":"SourceAlpha",stdDeviation:1}},{tagName:"feOffset",attributes:{dx:1,dy:1}},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",attributes:{type:"linear",slope:.3}}]},
{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",attributes:{"in":"SourceGraphic"}}]}]})};k.prototype.bodyFormatter=function(a){return a.map(function(a){var c=a.series.tooltipOptions;return(c[(a.point.formatPrefix||"point")+"Formatter"]||a.point.tooltipFormatter).call(a.point,c[(a.point.formatPrefix||"point")+"Format"]||"")})};k.prototype.cleanSplit=function(a){this.chart.series.forEach(function(g){var c=g&&g.tt;c&&(!c.isActive||a?g.tt=c.destroy():c.isActive=!1)})};k.prototype.defaultFormatter=
function(a){var g=this.points||x(this);var c=[a.tooltipFooterHeaderFormatter(g[0])];c=c.concat(a.bodyFormatter(g));c.push(a.tooltipFooterHeaderFormatter(g[0],!0));return c};k.prototype.destroy=function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(!0),this.tt=this.tt.destroy());this.renderer&&(this.renderer=this.renderer.destroy(),b(this.container));v.clearTimeout(this.hideTimer);v.clearTimeout(this.tooltipTimeout)};k.prototype.getAnchor=function(a,g){var c=
this.chart,b=c.pointer,d=c.inverted,k=c.plotTop,e=c.plotLeft,m,f,h=0,p=0;a=x(a);this.followPointer&&g?("undefined"===typeof g.chartX&&(g=b.normalize(g)),b=[g.chartX-e,g.chartY-k]):a[0].tooltipPos?b=a[0].tooltipPos:(a.forEach(function(a){m=a.series.yAxis;f=a.series.xAxis;h+=a.plotX||0;p+=a.plotLow?(a.plotLow+(a.plotHigh||0))/2:a.plotY||0;f&&m&&(d?(h+=k+c.plotHeight-f.len-f.pos,p+=e+c.plotWidth-m.len-m.pos):(h+=f.pos-e,p+=m.pos-k))}),h/=a.length,p/=a.length,b=[d?c.plotWidth-p:h,d?c.plotHeight-h:p],
this.shared&&1<a.length&&g&&(d?b[0]=g.chartX-e:b[1]=g.chartY-k));return b.map(Math.round)};k.prototype.getLabel=function(){var a=this,g=this.chart.styledMode,c=this.options,b=this.split&&this.allowShared,k="tooltip"+(d(c.className)?" "+c.className:""),m=c.style.pointerEvents||(!this.followPointer&&c.stickOnContact?"auto":"none"),f=function(){a.inContact=!0},p=function(c){var g=a.chart.hoverSeries;a.inContact=a.shouldStickOnContact()&&a.chart.pointer.inClass(c.relatedTarget,"highcharts-tooltip");if(!a.inContact&&
g&&g.onMouseOut)g.onMouseOut()},n,r=this.chart.renderer;if(a.label){var q=!a.label.hasClass("highcharts-label");(b&&!q||!b&&q)&&a.destroy()}if(!this.label){if(this.outside){q=this.chart.options.chart.style;var l=C.getRendererType();this.container=n=e.doc.createElement("div");n.className="highcharts-tooltip-container";h(n,{position:"absolute",top:"1px",pointerEvents:m,zIndex:Math.max(this.options.style.zIndex||0,(q&&q.zIndex||0)+3)});y(n,"mouseenter",f);y(n,"mouseleave",p);e.doc.body.appendChild(n);
this.renderer=r=new l(n,0,0,q,void 0,void 0,r.styledMode)}b?this.label=r.g(k):(this.label=r.label("",0,0,c.shape,void 0,void 0,c.useHTML,void 0,k).attr({padding:c.padding,r:c.borderRadius}),g||this.label.attr({fill:c.backgroundColor,"stroke-width":c.borderWidth}).css(c.style).css({pointerEvents:m}).shadow(c.shadow));g&&c.shadow&&(this.applyFilter(),this.label.attr({filter:"url(#drop-shadow-"+this.chart.index+")"}));if(a.outside&&!a.split){var t=this.label,x=t.xSetter,z=t.ySetter;t.xSetter=function(c){x.call(t,
a.distance);n.style.left=c+"px"};t.ySetter=function(c){z.call(t,a.distance);n.style.top=c+"px"}}this.label.on("mouseenter",f).on("mouseleave",p).attr({zIndex:8}).add()}return this.label};k.prototype.getPosition=function(a,g,c){var b=this.chart,d=this.distance,k={},e=b.inverted&&c.h||0,m=this.outside,f=m?G.documentElement.clientWidth-2*d:b.chartWidth,h=m?Math.max(G.body.scrollHeight,G.documentElement.scrollHeight,G.body.offsetHeight,G.documentElement.offsetHeight,G.documentElement.clientHeight):b.chartHeight,
p=b.pointer.getChartPosition(),n=function(k){var e="x"===k;return[k,e?f:h,e?a:g].concat(m?[e?a*p.scaleX:g*p.scaleY,e?p.left-d+(c.plotX+b.plotLeft)*p.scaleX:p.top-d+(c.plotY+b.plotTop)*p.scaleY,0,e?f:h]:[e?a:g,e?c.plotX+b.plotLeft:c.plotY+b.plotTop,e?b.plotLeft:b.plotTop,e?b.plotLeft+b.plotWidth:b.plotTop+b.plotHeight])},r=n("y"),q=n("x"),l;n=!!c.negative;!b.polar&&b.hoverSeries&&b.hoverSeries.yAxis&&b.hoverSeries.yAxis.reversed&&(n=!n);var t=!this.followPointer&&z(c.ttBelow,!b.inverted===n),x=function(a,
c,g,b,f,h,u){var n=m?"y"===a?d*p.scaleY:d*p.scaleX:d,A=(g-b)/2,D=b<f-d,F=f+d+b<c,r=f-n-g+A;f=f+n-A;if(t&&F)k[a]=f;else if(!t&&D)k[a]=r;else if(D)k[a]=Math.min(u-b,0>r-e?r:r-e);else if(F)k[a]=Math.max(h,f+e+g>c?f:f+e);else return!1},w=function(a,c,g,b,e){var m;e<d||e>c-d?m=!1:k[a]=e<g/2?1:e>c-b/2?c-b-2:e-g/2;return m},F=function(a){var c=r;r=q;q=c;l=a},T=function(){!1!==x.apply(0,r)?!1!==w.apply(0,q)||l||(F(!0),T()):l?k.x=k.y=0:(F(!0),T())};(b.inverted||1<this.len)&&F();T();return k};k.prototype.hide=
function(a){var g=this;v.clearTimeout(this.hideTimer);a=z(a,this.options.hideDelay);this.isHidden||(this.hideTimer=m(function(){g.getLabel().fadeOut(a?void 0:a);g.isHidden=!0},a))};k.prototype.init=function(a,g){this.chart=a;this.options=g;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=g.split&&!a.inverted&&!a.polar;this.shared=g.shared||this.split;this.outside=z(g.outside,!(!a.scrollablePixelsX&&!a.scrollablePixelsY))};k.prototype.shouldStickOnContact=function(){return!(this.followPointer||
!this.options.stickOnContact)};k.prototype.isStickyOnContact=function(){return!(!this.shouldStickOnContact()||!this.inContact)};k.prototype.move=function(a,g,c,b){var d=this,k=d.now,e=!1!==d.options.animation&&!d.isHidden&&(1<Math.abs(a-k.x)||1<Math.abs(g-k.y)),m=d.followPointer||1<d.len;p(k,{x:e?(2*k.x+a)/3:a,y:e?(k.y+g)/2:g,anchorX:m?void 0:e?(2*k.anchorX+c)/3:c,anchorY:m?void 0:e?(k.anchorY+b)/2:b});d.getLabel().attr(k);d.drawTracker();e&&(v.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=
setTimeout(function(){d&&d.move(a,g,c,b)},32))};k.prototype.refresh=function(a,g){var c=this.chart,b=this.options,d=x(a),k=d[0],e=[],m=b.formatter||this.defaultFormatter,f=this.shared,h=c.styledMode,p={};if(b.enabled&&k.series){v.clearTimeout(this.hideTimer);this.allowShared=!(!r(a)&&a.series&&a.series.noSharedTooltip);this.followPointer=!this.split&&k.series.tooltipOptions.followPointer;a=this.getAnchor(a,g);var n=a[0],l=a[1];f&&this.allowShared?(c.pointer.applyInactiveState(d),d.forEach(function(a){a.setState("hover");
e.push(a.getLabelConfig())}),p={x:k.category,y:k.y},p.points=e):p=k.getLabelConfig();this.len=e.length;m=m.call(p,this);f=k.series;this.distance=z(f.tooltipOptions.distance,16);if(!1===m)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(m,d);else{var t=n,w=l;g&&c.pointer.isDirectTouch&&(t=g.chartX-c.plotLeft,w=g.chartY-c.plotTop);if(c.polar||!1===f.options.clip||d.some(function(a){return a.series.shouldShowTooltip(t,w)}))g=this.getLabel(),b.style.width&&!h||g.css({width:this.chart.spacingBox.width+
"px"}),g.attr({text:m&&m.join?m.join(""):m}),g.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+z(k.colorIndex,f.colorIndex)),h||g.attr({stroke:b.borderColor||k.color||f.color||"#666666"}),this.updatePosition({plotX:n,plotY:l,negative:k.negative,ttBelow:k.ttBelow,h:a[2]||0});else{this.hide();return}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show();this.isHidden=!1}q(this,"refresh")}};k.prototype.renderSplit=function(a,g){function c(a,c,g,d,k){void 0===k&&(k=!0);g?
(c=X?0:E,a=t(a-d/2,N.left,N.right-d-(b.outside?Q:0))):(c-=Z,a=k?a-d-v:a+v,a=t(a,k?a:N.left,N.right));return{x:a,y:c}}var b=this,d=b.chart,k=b.chart,e=k.chartWidth,m=k.chartHeight,f=k.plotHeight,h=k.plotLeft,n=k.plotTop,r=k.pointer,q=k.scrollablePixelsY;q=void 0===q?0:q;var l=k.scrollablePixelsX,x=k.scrollingContainer;x=void 0===x?{scrollLeft:0,scrollTop:0}:x;var w=x.scrollLeft;x=x.scrollTop;var y=k.styledMode,v=b.distance,F=b.options,T=b.options.positioner,N=b.outside&&"number"!==typeof l?G.documentElement.getBoundingClientRect():
{left:w,right:w+e,top:x,bottom:x+m},V=b.getLabel(),W=this.renderer||d.renderer,X=!(!d.xAxis[0]||!d.xAxis[0].opposite);d=r.getChartPosition();var Q=d.left;d=d.top;var Z=n+x,ba=0,E=f-q;J(a)&&(a=[!1,a]);a=a.slice(0,g.length+1).reduce(function(a,d,k){if(!1!==d&&""!==d){k=g[k-1]||{isHeader:!0,plotX:g[0].plotX,plotY:f,series:{}};var e=k.isHeader,m=e?b:k.series;d=d.toString();var u=m.tt,p=k.isHeader;var A=k.series;var D="highcharts-color-"+z(k.colorIndex,A.colorIndex,"none");u||(u={padding:F.padding,r:F.borderRadius},
y||(u.fill=F.backgroundColor,u["stroke-width"]=F.borderWidth),u=W.label("",0,0,F[p?"headerShape":"shape"],void 0,void 0,F.useHTML).addClass((p?"highcharts-tooltip-header ":"")+"highcharts-tooltip-box "+D).attr(u).add(V));u.isActive=!0;u.attr({text:d});y||u.css(F.style).shadow(F.shadow).attr({stroke:F.borderColor||k.color||A.color||"#333333"});m=m.tt=u;p=m.getBBox();d=p.width+m.strokeWidth();e&&(ba=p.height,E+=ba,X&&(Z-=ba));A=k.plotX;A=void 0===A?0:A;D=k.plotY;D=void 0===D?0:D;u=k.series;if(k.isHeader){A=
h+A;var r=n+f/2}else{var q=u.xAxis,l=u.yAxis;A=q.pos+t(A,-v,q.len+v);u.shouldShowTooltip(0,l.pos-n+D,{ignoreX:!0})&&(r=l.pos+D)}A=t(A,N.left-v,N.right+v);"number"===typeof r?(p=p.height+1,D=T?T.call(b,d,p,k):c(A,r,e,d),a.push({align:T?0:void 0,anchorX:A,anchorY:r,boxWidth:d,point:k,rank:z(D.rank,e?1:0),size:p,target:D.y,tt:m,x:D.x})):m.isActive=!1}return a},[]);!T&&a.some(function(a){var c=(b.outside?Q:0)+a.anchorX;return c<N.left&&c+a.boxWidth<N.right?!0:c<Q-N.left+a.boxWidth&&N.right-c>c})&&(a=
a.map(function(a){var b=c(a.anchorX,a.anchorY,a.point.isHeader,a.boxWidth,!1);return p(a,{target:b.y,x:b.x})}));b.cleanSplit();B(a,E);var C=Q,P=Q;a.forEach(function(a){var c=a.x,g=a.boxWidth;a=a.isHeader;a||(b.outside&&Q+c<C&&(C=Q+c),!a&&b.outside&&C+g>P&&(P=Q+c))});a.forEach(function(a){var c=a.x,g=a.anchorX,d=a.pos,k=a.point.isHeader;d={visibility:"undefined"===typeof d?"hidden":"inherit",x:c,y:d+Z,anchorX:g,anchorY:a.anchorY};if(b.outside&&c<g){var e=Q-C;0<e&&(k||(d.x=c+e,d.anchorX=g+e),k&&(d.x=
(P-C)/2,d.anchorX=g+e))}a.tt.attr(d)});a=b.container;q=b.renderer;b.outside&&a&&q&&(k=V.getBBox(),q.setSize(k.width+k.x,k.height+k.y,!1),a.style.left=C+"px",a.style.top=d+"px")};k.prototype.drawTracker=function(){if(this.followPointer||!this.options.stickOnContact)this.tracker&&this.tracker.destroy();else{var a=this.chart,b=this.label,c=this.shared?a.hoverPoints:a.hoverPoint;if(b&&c){var d={x:0,y:0,width:0,height:0};c=this.getAnchor(c);var k=b.getBBox();c[0]+=a.plotLeft-b.translateX;c[1]+=a.plotTop-
b.translateY;d.x=Math.min(0,c[0]);d.y=Math.min(0,c[1]);d.width=0>c[0]?Math.max(Math.abs(c[0]),k.width-c[0]):Math.max(Math.abs(c[0]),k.width);d.height=0>c[1]?Math.max(Math.abs(c[1]),k.height-Math.abs(c[1])):Math.max(Math.abs(c[1]),k.height);this.tracker?this.tracker.attr(d):(this.tracker=b.renderer.rect(d).addClass("highcharts-tracker").add(b),a.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}}};k.prototype.styledModeFormat=function(a){return a.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,
'class="highcharts-color-{$1.colorIndex}"')};k.prototype.tooltipFooterHeaderFormatter=function(a,b){var c=a.series,g=c.tooltipOptions,d=c.xAxis,k=d&&d.dateTime;d={isFooter:b,labelConfig:a};var e=g.xDateFormat,m=g[b?"footerFormat":"headerFormat"];q(this,"headerFormatter",d,function(b){k&&!e&&n(a.key)&&(e=k.getXDateFormat(a.key,g.dateTimeLabelFormats));k&&e&&(a.point&&a.point.tooltipDateKeys||["key"]).forEach(function(a){m=m.replace("{point."+a+"}","{point."+a+":"+e+"}")});c.chart.styledMode&&(m=this.styledModeFormat(m));
b.text=E(m,{point:a,series:c},this.chart)});return d.text};k.prototype.update=function(a){this.destroy();w(!0,this.chart.options.tooltip.userOptions,a);this.init(this.chart,w(!0,this.options,a))};k.prototype.updatePosition=function(a){var b=this.chart,c=this.options,d=b.pointer,k=this.getLabel();d=d.getChartPosition();var e=(c.positioner||this.getPosition).call(this,k.width,k.height,a),m=a.plotX+b.plotLeft;a=a.plotY+b.plotTop;if(this.outside){c=c.borderWidth+2*this.distance;this.renderer.setSize(k.width+
c,k.height+c,!1);if(1!==d.scaleX||1!==d.scaleY)h(this.container,{transform:"scale(".concat(d.scaleX,", ").concat(d.scaleY,")")}),m*=d.scaleX,a*=d.scaleY;m+=d.left-e.x;a+=d.top-e.y}this.move(Math.round(e.x),Math.round(e.y||0),m,a)};return k}();"";return f});K(l,"Core/Series/Point.js",[l["Core/Renderer/HTML/AST.js"],l["Core/Animation/AnimationUtilities.js"],l["Core/DefaultOptions.js"],l["Core/FormatUtilities.js"],l["Core/Utilities.js"]],function(f,e,l,C,v){var E=e.animObject,G=l.defaultOptions,B=C.format,
y=v.addEvent,t=v.defined,h=v.erase,d=v.extend,b=v.fireEvent,p=v.getNestedProperty,q=v.isArray,r=v.isFunction,n=v.isNumber,J=v.isObject,w=v.merge,z=v.objectEach,x=v.pick,m=v.syncTimeout,k=v.removeEvent,a=v.uniqueKey;e=function(){function g(){this.colorIndex=this.category=void 0;this.formatPrefix="point";this.id=void 0;this.isNull=!1;this.percentage=this.options=this.name=void 0;this.selected=!1;this.total=this.shapeArgs=this.series=void 0;this.visible=!0;this.x=void 0}g.prototype.animateBeforeDestroy=
function(){var a=this,b={x:a.startXPos,opacity:0},g=a.getGraphicalProps();g.singular.forEach(function(c){a[c]=a[c].animate("dataLabel"===c?{x:a[c].startXPos,y:a[c].startYPos,opacity:0}:b)});g.plural.forEach(function(c){a[c].forEach(function(c){c.element&&c.animate(d({x:a.startXPos},c.startYPos?{x:c.startXPos,y:c.startYPos}:{}))})})};g.prototype.applyOptions=function(a,b){var c=this.series,k=c.options.pointValKey||c.pointValKey;a=g.prototype.optionsToObject.call(this,a);d(this,a);this.options=this.options?
d(this.options,a):a;a.group&&delete this.group;a.dataLabels&&delete this.dataLabels;k&&(this.y=g.prototype.getNestedProperty.call(this,k));this.formatPrefix=(this.isNull=x(this.isValid&&!this.isValid(),null===this.x||!n(this.y)))?"null":"point";this.selected&&(this.state="select");"name"in this&&"undefined"===typeof b&&c.xAxis&&c.xAxis.hasNames&&(this.x=c.xAxis.nameToX(this));"undefined"===typeof this.x&&c?this.x="undefined"===typeof b?c.autoIncrement():b:n(a.x)&&c.options.relativeXValue&&(this.x=
c.autoIncrement(a.x));return this};g.prototype.destroy=function(){function a(){if(b.graphic||b.dataLabel||b.dataLabels)k(b),b.destroyElements();for(p in b)b[p]=null}var b=this,g=b.series,d=g.chart;g=g.options.dataSorting;var e=d.hoverPoints,f=E(b.series.chart.renderer.globalAnimation),p;b.legendItem&&d.legend.destroyItem(b);e&&(b.setState(),h(e,b),e.length||(d.hoverPoints=null));if(b===d.hoverPoint)b.onMouseOut();g&&g.enabled?(this.animateBeforeDestroy(),m(a,f.duration)):a();d.pointCount--};g.prototype.destroyElements=
function(a){var c=this;a=c.getGraphicalProps(a);a.singular.forEach(function(a){c[a]=c[a].destroy()});a.plural.forEach(function(a){c[a].forEach(function(a){a.element&&a.destroy()});delete c[a]})};g.prototype.firePointEvent=function(a,g,d){var c=this,k=this.series.options;(k.point.events[a]||c.options&&c.options.events&&c.options.events[a])&&c.importEvents();"click"===a&&k.allowPointSelect&&(d=function(a){c.select&&c.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});b(c,a,g,d)};g.prototype.getClassName=
function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+("undefined"!==typeof this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")};g.prototype.getGraphicalProps=function(a){var c=this,b=[],g={singular:[],plural:[]},d;a=a||{graphic:1,dataLabel:1};
a.graphic&&b.push("graphic","upperGraphic","shadowGroup");a.dataLabel&&b.push("dataLabel","dataLabelUpper","connector");for(d=b.length;d--;){var k=b[d];c[k]&&g.singular.push(k)}["dataLabel","connector"].forEach(function(b){var d=b+"s";a[b]&&c[d]&&g.plural.push(d)});return g};g.prototype.getLabelConfig=function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}};
g.prototype.getNestedProperty=function(a){if(a)return 0===a.indexOf("custom.")?p(a,this.options):this[a]};g.prototype.getZone=function(){var a=this.series,b=a.zones;a=a.zoneAxis||"y";var g,d=0;for(g=b[d];this[a]>=g.value;)g=b[++d];this.nonZonedColor||(this.nonZonedColor=this.color);this.color=g&&g.color&&!this.options.color?g.color:this.nonZonedColor;return g};g.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType};g.prototype.init=
function(c,g,d){this.series=c;this.applyOptions(g,d);this.id=t(this.id)?this.id:a();this.resolveColor();c.chart.pointCount++;b(this,"afterInit");return this};g.prototype.optionsToObject=function(a){var c=this.series,b=c.options.keys,d=b||c.pointArrayMap||["y"],k=d.length,e={},m=0,f=0;if(n(a)||null===a)e[d[0]]=a;else if(q(a))for(!b&&a.length>k&&(c=typeof a[0],"string"===c?e.name=a[0]:"number"===c&&(e.x=a[0]),m++);f<k;)b&&"undefined"===typeof a[m]||(0<d[f].indexOf(".")?g.prototype.setNestedProperty(e,
a[m],d[f]):e[d[f]]=a[m]),m++,f++;else"object"===typeof a&&(e=a,a.dataLabels&&(c._hasPointLabels=!0),a.marker&&(c._hasPointMarkers=!0));return e};g.prototype.resolveColor=function(){var a=this.series,b=a.chart.styledMode;var g=a.chart.options.chart.colorCount;delete this.nonZonedColor;if(a.options.colorByPoint){if(!b){g=a.options.colors||a.chart.options.colors;var d=g[a.colorCounter];g=g.length}b=a.colorCounter;a.colorCounter++;a.colorCounter===g&&(a.colorCounter=0)}else b||(d=a.color),b=a.colorIndex;
this.colorIndex=x(this.options.colorIndex,b);this.color=x(this.options.color,d)};g.prototype.setNestedProperty=function(a,b,g){g.split(".").reduce(function(a,c,g,d){a[c]=d.length-1===g?b:J(a[c],!0)?a[c]:{};return a[c]},a);return a};g.prototype.tooltipFormatter=function(a){var c=this.series,b=c.tooltipOptions,g=x(b.valueDecimals,""),d=b.valuePrefix||"",k=b.valueSuffix||"";c.chart.styledMode&&(a=c.chart.tooltip.styledModeFormat(a));(c.pointArrayMap||["y"]).forEach(function(c){c="{point."+c;if(d||k)a=
a.replace(RegExp(c+"}","g"),d+c+"}"+k);a=a.replace(RegExp(c+"}","g"),c+":,."+g+"f}")});return B(a,{point:this,series:this.series},c.chart)};g.prototype.update=function(a,b,g,d){function c(){k.applyOptions(a);var c=m&&k.hasDummyGraphic;c=null===k.y?!c:c;m&&c&&(k.graphic=m.destroy(),delete k.hasDummyGraphic);J(a,!0)&&(m&&m.element&&a&&a.marker&&"undefined"!==typeof a.marker.symbol&&(k.graphic=m.destroy()),a&&a.dataLabels&&k.dataLabel&&(k.dataLabel=k.dataLabel.destroy()),k.connector&&(k.connector=k.connector.destroy()));
p=k.index;e.updateParallelArrays(k,p);h.data[p]=J(h.data[p],!0)||J(a,!0)?k.options:x(a,h.data[p]);e.isDirty=e.isDirtyData=!0;!e.fixedBox&&e.hasCartesianSeries&&(f.isDirtyBox=!0);"point"===h.legendType&&(f.isDirtyLegend=!0);b&&f.redraw(g)}var k=this,e=k.series,m=k.graphic,f=e.chart,h=e.options,p;b=x(b,!0);!1===d?c():k.firePointEvent("update",{options:a},c)};g.prototype.remove=function(a,b){this.series.removePoint(this.series.data.indexOf(this),a,b)};g.prototype.select=function(a,b){var c=this,g=c.series,
d=g.chart;this.selectedStaging=a=x(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=c.options.selected=a;g.options.data[g.data.indexOf(c)]=c.options;c.setState(a&&"select");b||d.getSelectedPoints().forEach(function(a){var b=a.series;a.selected&&a!==c&&(a.selected=a.options.selected=!1,b.options.data[b.data.indexOf(a)]=a.options,a.setState(d.hoverPoints&&b.options.inactiveOtherPoints?"inactive":""),a.firePointEvent("unselect"))})});delete this.selectedStaging};
g.prototype.onMouseOver=function(a){var c=this.series.chart,b=c.pointer;a=a?b.normalize(a):b.getChartCoordinatesFromPoint(this,c.inverted);b.runPointActions(a,this)};g.prototype.onMouseOut=function(){var a=this.series.chart;this.firePointEvent("mouseOut");this.series.options.inactiveOtherPoints||(a.hoverPoints||[]).forEach(function(a){a.setState()});a.hoverPoints=a.hoverPoint=null};g.prototype.importEvents=function(){if(!this.hasImportedEvents){var a=this,b=w(a.series.options.point,a.options).events;
a.events=b;z(b,function(c,b){r(c)&&y(a,b,c)});this.hasImportedEvents=!0}};g.prototype.setState=function(a,g){var c=this.series,k=this.state,e=c.options.states[a||"normal"]||{},m=G.plotOptions[c.type].marker&&c.options.marker,h=m&&!1===m.enabled,p=m&&m.states&&m.states[a||"normal"]||{},r=!1===p.enabled,q=this.marker||{},l=c.chart,D=m&&c.markerAttribs,t=c.halo,z,w=c.stateMarkerGraphic;a=a||"";if(!(a===this.state&&!g||this.selected&&"select"!==a||!1===e.enabled||a&&(r||h&&!1===p.enabled)||a&&q.states&&
q.states[a]&&!1===q.states[a].enabled)){this.state=a;D&&(z=c.markerAttribs(this,a));if(this.graphic&&!this.hasDummyGraphic){k&&this.graphic.removeClass("highcharts-point-"+k);a&&this.graphic.addClass("highcharts-point-"+a);if(!l.styledMode){var y=c.pointAttribs(this,a);var F=x(l.options.chart.animation,e.animation);c.options.inactiveOtherPoints&&n(y.opacity)&&((this.dataLabels||[]).forEach(function(a){a&&a.animate({opacity:y.opacity},F)}),this.connector&&this.connector.animate({opacity:y.opacity},
F));this.graphic.animate(y,F)}z&&this.graphic.animate(z,x(l.options.chart.animation,p.animation,m.animation));w&&w.hide()}else{if(a&&p){k=q.symbol||c.symbol;w&&w.currentSymbol!==k&&(w=w.destroy());if(z)if(w)w[g?"animate":"attr"]({x:z.x,y:z.y});else k&&(c.stateMarkerGraphic=w=l.renderer.symbol(k,z.x,z.y,z.width,z.height).add(c.markerGroup),w.currentSymbol=k);!l.styledMode&&w&&"inactive"!==this.state&&w.attr(c.pointAttribs(this,a))}w&&(w[a&&this.isInside?"show":"hide"](),w.element.point=this,w.addClass(this.getClassName(),
!0))}e=e.halo;z=(w=this.graphic||w)&&w.visibility||"inherit";e&&e.size&&w&&"hidden"!==z&&!this.isCluster?(t||(c.halo=t=l.renderer.path().add(w.parentGroup)),t.show()[g?"animate":"attr"]({d:this.haloPath(e.size)}),t.attr({"class":"highcharts-halo highcharts-color-"+x(this.colorIndex,c.colorIndex)+(this.className?" "+this.className:""),visibility:z,zIndex:-1}),t.point=this,l.styledMode||t.attr(d({fill:this.color||c.color,"fill-opacity":e.opacity},f.filterUserAttributes(e.attributes||{})))):t&&t.point&&
t.point.haloPath&&t.animate({d:t.point.haloPath(0)},null,t.hide);b(this,"afterSetState",{state:a})}};g.prototype.haloPath=function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-a,this.plotY-a,2*a,2*a)};return g}();"";return e});K(l,"Core/Pointer.js",[l["Core/Color/Color.js"],l["Core/Globals.js"],l["Core/Tooltip.js"],l["Core/Utilities.js"]],function(f,e,l,C){var v=f.parse,E=e.charts,G=e.noop,B=C.addEvent,y=C.attr,t=C.css,h=C.defined,d=C.extend,b=C.find,p=C.fireEvent,q=
C.isNumber,r=C.isObject,n=C.objectEach,J=C.offset,w=C.pick,z=C.splat;f=function(){function f(b,d){this.lastValidTouch={};this.pinchDown=[];this.runChartClick=!1;this.eventsToUnbind=[];this.chart=b;this.hasDragged=!1;this.options=d;this.init(b,d)}f.prototype.applyInactiveState=function(b){var d=[],a;(b||[]).forEach(function(b){a=b.series;d.push(a);a.linkedParent&&d.push(a.linkedParent);a.linkedSeries&&(d=d.concat(a.linkedSeries));a.navigatorSeries&&d.push(a.navigatorSeries)});this.chart.series.forEach(function(a){-1===
d.indexOf(a)?a.setState("inactive",!0):a.options.inactiveOtherPoints&&a.setAllPointsToState("inactive")})};f.prototype.destroy=function(){var b=this;this.eventsToUnbind.forEach(function(b){return b()});this.eventsToUnbind=[];e.chartCount||(f.unbindDocumentMouseUp&&(f.unbindDocumentMouseUp=f.unbindDocumentMouseUp()),f.unbindDocumentTouchEnd&&(f.unbindDocumentTouchEnd=f.unbindDocumentTouchEnd()));clearInterval(b.tooltipTimeout);n(b,function(d,a){b[a]=void 0})};f.prototype.drag=function(b){var d=this.chart,
a=d.options.chart,g=this.zoomHor,c=this.zoomVert,e=d.plotLeft,m=d.plotTop,f=d.plotWidth,h=d.plotHeight,p=this.mouseDownX||0,n=this.mouseDownY||0,q=r(a.panning)?a.panning&&a.panning.enabled:a.panning,l=a.panKey&&b[a.panKey+"Key"],t=b.chartX,z=b.chartY,w=this.selectionMarker;if(!w||!w.touch)if(t<e?t=e:t>e+f&&(t=e+f),z<m?z=m:z>m+h&&(z=m+h),this.hasDragged=Math.sqrt(Math.pow(p-t,2)+Math.pow(n-z,2)),10<this.hasDragged){var x=d.isInsidePlot(p-e,n-m,{visiblePlotOnly:!0});!d.hasCartesianSeries&&!d.mapView||
!this.zoomX&&!this.zoomY||!x||l||w||(this.selectionMarker=w=d.renderer.rect(e,m,g?1:f,c?1:h,0).attr({"class":"highcharts-selection-marker",zIndex:7}).add(),d.styledMode||w.attr({fill:a.selectionMarkerFill||v("#335cad").setOpacity(.25).get()}));w&&g&&(g=t-p,w.attr({width:Math.abs(g),x:(0<g?0:g)+p}));w&&c&&(g=z-n,w.attr({height:Math.abs(g),y:(0<g?0:g)+n}));x&&!w&&q&&d.pan(b,a.panning)}};f.prototype.dragStart=function(b){var d=this.chart;d.mouseIsDown=b.type;d.cancelClick=!1;d.mouseDownX=this.mouseDownX=
b.chartX;d.mouseDownY=this.mouseDownY=b.chartY};f.prototype.drop=function(b){var k=this,a=this.chart,g=this.hasPinched;if(this.selectionMarker){var c=this.selectionMarker,e=c.attr?c.attr("x"):c.x,m=c.attr?c.attr("y"):c.y,f=c.attr?c.attr("width"):c.width,n=c.attr?c.attr("height"):c.height,r={originalEvent:b,xAxis:[],yAxis:[],x:e,y:m,width:f,height:n},l=!!a.mapView;if(this.hasDragged||g)a.axes.forEach(function(a){if(a.zoomEnabled&&h(a.min)&&(g||k[{xAxis:"zoomX",yAxis:"zoomY"}[a.coll]])&&q(e)&&q(m)){var c=
a.horiz,d="touchend"===b.type?a.minPixelPadding:0,p=a.toValue((c?e:m)+d);c=a.toValue((c?e+f:m+n)-d);r[a.coll].push({axis:a,min:Math.min(p,c),max:Math.max(p,c)});l=!0}}),l&&p(a,"selection",r,function(c){a.zoom(d(c,g?{animation:!1}:null))});q(a.index)&&(this.selectionMarker=this.selectionMarker.destroy());g&&this.scaleGroups()}a&&q(a.index)&&(t(a.container,{cursor:a._cursor}),a.cancelClick=10<this.hasDragged,a.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])};f.prototype.findNearestKDPoint=
function(b,d,a){var g=this.chart,c=g.hoverPoint;g=g.tooltip;if(c&&g&&g.isStickyOnContact())return c;var k;b.forEach(function(c){var b=!(c.noSharedTooltip&&d)&&0>c.options.findNearestPointBy.indexOf("y");c=c.searchPoint(a,b);if((b=r(c,!0)&&c.series)&&!(b=!r(k,!0))){b=k.distX-c.distX;var g=k.dist-c.dist,e=(c.series.group&&c.series.group.zIndex)-(k.series.group&&k.series.group.zIndex);b=0<(0!==b&&d?b:0!==g?g:0!==e?e:k.series.index>c.series.index?-1:1)}b&&(k=c)});return k};f.prototype.getChartCoordinatesFromPoint=
function(b,d){var a=b.series,g=a.xAxis;a=a.yAxis;var c=b.shapeArgs;if(g&&a){var k=w(b.clientX,b.plotX),e=b.plotY||0;b.isNode&&c&&q(c.x)&&q(c.y)&&(k=c.x,e=c.y);return d?{chartX:a.len+a.pos-e,chartY:g.len+g.pos-k}:{chartX:k+g.pos,chartY:e+a.pos}}if(c&&c.x&&c.y)return{chartX:c.x,chartY:c.y}};f.prototype.getChartPosition=function(){if(this.chartPosition)return this.chartPosition;var b=this.chart.container,d=J(b);this.chartPosition={left:d.left,top:d.top,scaleX:1,scaleY:1};var a=b.offsetWidth;b=b.offsetHeight;
2<a&&2<b&&(this.chartPosition.scaleX=d.width/a,this.chartPosition.scaleY=d.height/b);return this.chartPosition};f.prototype.getCoordinates=function(b){var d={xAxis:[],yAxis:[]};this.chart.axes.forEach(function(a){d[a.isXAxis?"xAxis":"yAxis"].push({axis:a,value:a.toValue(b[a.horiz?"chartX":"chartY"])})});return d};f.prototype.getHoverData=function(d,k,a,g,c,e){var f=[];g=!(!g||!d);var m={chartX:e?e.chartX:void 0,chartY:e?e.chartY:void 0,shared:c};p(this,"beforeGetHoverData",m);var h=k&&!k.stickyTracking?
[k]:a.filter(function(a){return m.filter?m.filter(a):a.visible&&!(!c&&a.directTouch)&&w(a.options.enableMouseTracking,!0)&&a.stickyTracking});var n=g||!e?d:this.findNearestKDPoint(h,c,e);k=n&&n.series;n&&(c&&!k.noSharedTooltip?(h=a.filter(function(a){return m.filter?m.filter(a):a.visible&&!(!c&&a.directTouch)&&w(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),h.forEach(function(a){var c=b(a.points,function(a){return a.x===n.x&&!a.isNull});r(c)&&(a.chart.isBoosting&&(c=a.getPoint(c)),f.push(c))})):
f.push(n));m={hoverPoint:n};p(this,"afterGetHoverData",m);return{hoverPoint:m.hoverPoint,hoverSeries:k,hoverPoints:f}};f.prototype.getPointFromEvent=function(b){b=b.target;for(var d;b&&!d;)d=b.point,b=b.parentNode;return d};f.prototype.onTrackerMouseOut=function(b){b=b.relatedTarget||b.toElement;var d=this.chart.hoverSeries;this.isDirectTouch=!1;if(!(!d||!b||d.stickyTracking||this.inClass(b,"highcharts-tooltip")||this.inClass(b,"highcharts-series-"+d.index)&&this.inClass(b,"highcharts-tracker")))d.onMouseOut()};
f.prototype.inClass=function(b,d){for(var a;b;){if(a=y(b,"class")){if(-1!==a.indexOf(d))return!0;if(-1!==a.indexOf("highcharts-container"))return!1}b=b.parentElement}};f.prototype.init=function(b,d){this.options=d;this.chart=b;this.runChartClick=!(!d.chart.events||!d.chart.events.click);this.pinchDown=[];this.lastValidTouch={};l&&(b.tooltip=new l(b,d.tooltip),this.followTouchMove=w(d.tooltip.followTouchMove,!0));this.setDOMEvents()};f.prototype.normalize=function(b,e){var a=b.touches,g=a?a.length?
a.item(0):w(a.changedTouches,b.changedTouches)[0]:b;e||(e=this.getChartPosition());a=g.pageX-e.left;g=g.pageY-e.top;a/=e.scaleX;g/=e.scaleY;return d(b,{chartX:Math.round(a),chartY:Math.round(g)})};f.prototype.onContainerClick=function(b){var e=this.chart,a=e.hoverPoint;b=this.normalize(b);var g=e.plotLeft,c=e.plotTop;e.cancelClick||(a&&this.inClass(b.target,"highcharts-tracker")?(p(a.series,"click",d(b,{point:a})),e.hoverPoint&&a.firePointEvent("click",b)):(d(b,this.getCoordinates(b)),e.isInsidePlot(b.chartX-
g,b.chartY-c,{visiblePlotOnly:!0})&&p(e,"click",b)))};f.prototype.onContainerMouseDown=function(b){var d=1===((b.buttons||b.button)&1);b=this.normalize(b);if(e.isFirefox&&0!==b.button)this.onContainerMouseMove(b);if("undefined"===typeof b.button||d)this.zoomOption(b),d&&b.preventDefault&&b.preventDefault(),this.dragStart(b)};f.prototype.onContainerMouseLeave=function(b){var d=E[w(f.hoverChartIndex,-1)],a=this.chart.tooltip;a&&a.shouldStickOnContact()&&this.inClass(b.relatedTarget,"highcharts-tooltip-container")||
(b=this.normalize(b),d&&(b.relatedTarget||b.toElement)&&(d.pointer.reset(),d.pointer.chartPosition=void 0),a&&!a.isHidden&&this.reset())};f.prototype.onContainerMouseEnter=function(b){delete this.chartPosition};f.prototype.onContainerMouseMove=function(b){var d=this.chart;b=this.normalize(b);this.setHoverChartIndex();b.preventDefault||(b.returnValue=!1);("mousedown"===d.mouseIsDown||this.touchSelect(b))&&this.drag(b);d.openMenu||!this.inClass(b.target,"highcharts-tracker")&&!d.isInsidePlot(b.chartX-
d.plotLeft,b.chartY-d.plotTop,{visiblePlotOnly:!0})||(this.inClass(b.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(b))};f.prototype.onDocumentTouchEnd=function(b){var d=E[w(f.hoverChartIndex,-1)];d&&d.pointer.drop(b)};f.prototype.onContainerTouchMove=function(b){if(this.touchSelect(b))this.onContainerMouseMove(b);else this.touch(b)};f.prototype.onContainerTouchStart=function(b){if(this.touchSelect(b))this.onContainerMouseDown(b);else this.zoomOption(b),this.touch(b,!0)};f.prototype.onDocumentMouseMove=
function(b){var d=this.chart,a=this.chartPosition;b=this.normalize(b,a);var g=d.tooltip;!a||g&&g.isStickyOnContact()||d.isInsidePlot(b.chartX-d.plotLeft,b.chartY-d.plotTop,{visiblePlotOnly:!0})||this.inClass(b.target,"highcharts-tracker")||this.reset()};f.prototype.onDocumentMouseUp=function(b){var d=E[w(f.hoverChartIndex,-1)];d&&d.pointer.drop(b)};f.prototype.pinch=function(b){var e=this,a=e.chart,g=e.pinchDown,c=b.touches||[],f=c.length,h=e.lastValidTouch,m=e.hasZoom,n={},r=1===f&&(e.inClass(b.target,
"highcharts-tracker")&&a.runTrackerClick||e.runChartClick),q={},l=e.selectionMarker;1<f?e.initiated=!0:1===f&&this.followTouchMove&&(e.initiated=!1);m&&e.initiated&&!r&&!1!==b.cancelable&&b.preventDefault();[].map.call(c,function(a){return e.normalize(a)});"touchstart"===b.type?([].forEach.call(c,function(a,c){g[c]={chartX:a.chartX,chartY:a.chartY}}),h.x=[g[0].chartX,g[1]&&g[1].chartX],h.y=[g[0].chartY,g[1]&&g[1].chartY],a.axes.forEach(function(c){if(c.zoomEnabled){var b=a.bounds[c.horiz?"h":"v"],
d=c.minPixelPadding,g=c.toPixels(Math.min(w(c.options.min,c.dataMin),c.dataMin)),e=c.toPixels(Math.max(w(c.options.max,c.dataMax),c.dataMax)),k=Math.max(g,e);b.min=Math.min(c.pos,Math.min(g,e)-d);b.max=Math.max(c.pos+c.len,k+d)}}),e.res=!0):e.followTouchMove&&1===f?this.runPointActions(e.normalize(b)):g.length&&(p(a,"touchpan",{originalEvent:b},function(){l||(e.selectionMarker=l=d({destroy:G,touch:!0},a.plotBox));e.pinchTranslate(g,c,n,l,q,h);e.hasPinched=m;e.scaleGroups(n,q)}),e.res&&(e.res=!1,this.reset(!1,
0)))};f.prototype.pinchTranslate=function(b,d,a,g,c,e){this.zoomHor&&this.pinchTranslateDirection(!0,b,d,a,g,c,e);this.zoomVert&&this.pinchTranslateDirection(!1,b,d,a,g,c,e)};f.prototype.pinchTranslateDirection=function(b,d,a,g,c,e,f,h){var k=this.chart,m=b?"x":"y",p=b?"X":"Y",n="chart"+p,u=b?"width":"height",r=k["plot"+(b?"Left":"Top")],q=k.inverted,l=k.bounds[b?"h":"v"],t=1===d.length,A=d[0][n],D=!t&&d[1][n];d=function(){"number"===typeof x&&20<Math.abs(A-D)&&(w=h||Math.abs(N-x)/Math.abs(A-D));
F=(r-N)/w+A;z=k["plot"+(b?"Width":"Height")]/w};var z,F,w=h||1,N=a[0][n],x=!t&&a[1][n];d();a=F;if(a<l.min){a=l.min;var y=!0}else a+z>l.max&&(a=l.max-z,y=!0);y?(N-=.8*(N-f[m][0]),"number"===typeof x&&(x-=.8*(x-f[m][1])),d()):f[m]=[N,x];q||(e[m]=F-r,e[u]=z);e=q?1/w:w;c[u]=z;c[m]=a;g[q?b?"scaleY":"scaleX":"scale"+p]=w;g["translate"+p]=e*r+(N-e*A)};f.prototype.reset=function(b,d){var a=this.chart,g=a.hoverSeries,c=a.hoverPoint,e=a.hoverPoints,k=a.tooltip,f=k&&k.shared?e:c;b&&f&&z(f).forEach(function(a){a.series.isCartesian&&
"undefined"===typeof a.plotX&&(b=!1)});if(b)k&&f&&z(f).length&&(k.refresh(f),k.shared&&e?e.forEach(function(a){a.setState(a.state,!0);a.series.isCartesian&&(a.series.xAxis.crosshair&&a.series.xAxis.drawCrosshair(null,a),a.series.yAxis.crosshair&&a.series.yAxis.drawCrosshair(null,a))}):c&&(c.setState(c.state,!0),a.axes.forEach(function(a){a.crosshair&&c.series[a.coll]===a&&a.drawCrosshair(null,c)})));else{if(c)c.onMouseOut();e&&e.forEach(function(a){a.setState()});if(g)g.onMouseOut();k&&k.hide(d);
this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());a.axes.forEach(function(a){a.hideCrosshair()});this.hoverX=a.hoverPoints=a.hoverPoint=null}};f.prototype.runPointActions=function(d,e){var a=this.chart,g=a.tooltip&&a.tooltip.options.enabled?a.tooltip:void 0,c=g?g.shared:!1,k=e||a.hoverPoint,h=k&&k.series||a.hoverSeries;e=this.getHoverData(k,h,a.series,(!d||"touchmove"!==d.type)&&(!!e||h&&h.directTouch&&this.isDirectTouch),c,d);k=e.hoverPoint;h=e.hoverSeries;var m=e.hoverPoints;e=h&&
h.tooltipOptions.followPointer&&!h.tooltipOptions.split;var p=c&&h&&!h.noSharedTooltip;if(k&&(k!==a.hoverPoint||g&&g.isHidden)){(a.hoverPoints||[]).forEach(function(a){-1===m.indexOf(a)&&a.setState()});if(a.hoverSeries!==h)h.onMouseOver();this.applyInactiveState(m);(m||[]).forEach(function(a){a.setState("hover")});a.hoverPoint&&a.hoverPoint.firePointEvent("mouseOut");if(!k.series)return;a.hoverPoints=m;a.hoverPoint=k;k.firePointEvent("mouseOver",void 0,function(){g&&k&&g.refresh(p?m:k,d)})}else e&&
g&&!g.isHidden&&(c=g.getAnchor([{}],d),a.isInsidePlot(c[0],c[1],{visiblePlotOnly:!0})&&g.updatePosition({plotX:c[0],plotY:c[1]}));this.unDocMouseMove||(this.unDocMouseMove=B(a.container.ownerDocument,"mousemove",function(a){var c=E[f.hoverChartIndex];if(c)c.pointer.onDocumentMouseMove(a)}),this.eventsToUnbind.push(this.unDocMouseMove));a.axes.forEach(function(c){var g=w((c.crosshair||{}).snap,!0),e;g&&((e=a.hoverPoint)&&e.series[c.coll]===c||(e=b(m,function(a){return a.series&&a.series[c.coll]===
c})));e||!g?c.drawCrosshair(d,e):c.hideCrosshair()})};f.prototype.scaleGroups=function(b,d){var a=this.chart;a.series.forEach(function(g){var c=b||g.getPlotBox();g.group&&(g.xAxis&&g.xAxis.zoomEnabled||a.mapView)&&(g.group.attr(c),g.markerGroup&&(g.markerGroup.attr(c),g.markerGroup.clip(d?a.clipRect:null)),g.dataLabelsGroup&&g.dataLabelsGroup.attr(c))});a.clipRect.attr(d||a.clipBox)};f.prototype.setDOMEvents=function(){var b=this,d=this.chart.container,a=d.ownerDocument;d.onmousedown=this.onContainerMouseDown.bind(this);
d.onmousemove=this.onContainerMouseMove.bind(this);d.onclick=this.onContainerClick.bind(this);this.eventsToUnbind.push(B(d,"mouseenter",this.onContainerMouseEnter.bind(this)));this.eventsToUnbind.push(B(d,"mouseleave",this.onContainerMouseLeave.bind(this)));f.unbindDocumentMouseUp||(f.unbindDocumentMouseUp=B(a,"mouseup",this.onDocumentMouseUp.bind(this)));for(var g=this.chart.renderTo.parentElement;g&&"BODY"!==g.tagName;)this.eventsToUnbind.push(B(g,"scroll",function(){delete b.chartPosition})),g=
g.parentElement;e.hasTouch&&(this.eventsToUnbind.push(B(d,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1})),this.eventsToUnbind.push(B(d,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),f.unbindDocumentTouchEnd||(f.unbindDocumentTouchEnd=B(a,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})))};f.prototype.setHoverChartIndex=function(){var b=this.chart,d=e.charts[w(f.hoverChartIndex,-1)];if(d&&d!==b)d.pointer.onContainerMouseLeave({relatedTarget:b.container});
d&&d.mouseIsDown||(f.hoverChartIndex=b.index)};f.prototype.touch=function(b,d){var a=this.chart,g;this.setHoverChartIndex();if(1===b.touches.length)if(b=this.normalize(b),(g=a.isInsidePlot(b.chartX-a.plotLeft,b.chartY-a.plotTop,{visiblePlotOnly:!0}))&&!a.openMenu){d&&this.runPointActions(b);if("touchmove"===b.type){d=this.pinchDown;var c=d[0]?4<=Math.sqrt(Math.pow(d[0].chartX-b.chartX,2)+Math.pow(d[0].chartY-b.chartY,2)):!1}w(c,!0)&&this.pinch(b)}else d&&this.reset();else 2===b.touches.length&&this.pinch(b)};
f.prototype.touchSelect=function(b){return!(!this.chart.options.chart.zoomBySingleTouch||!b.touches||1!==b.touches.length)};f.prototype.zoomOption=function(b){var d=this.chart,a=d.options.chart;d=d.inverted;var g=a.zoomType||"";/touch/.test(b.type)&&(g=w(a.pinchType,g));this.zoomX=b=/x/.test(g);this.zoomY=a=/y/.test(g);this.zoomHor=b&&!d||a&&d;this.zoomVert=a&&!d||b&&d;this.hasZoom=b||a};return f}();"";return f});K(l,"Core/MSPointer.js",[l["Core/Globals.js"],l["Core/Pointer.js"],l["Core/Utilities.js"]],
function(f,e,l){function C(){var d=[];d.item=function(b){return this[b]};b(q,function(b){d.push({pageX:b.pageX,pageY:b.pageY,target:b.target})});return d}function v(b,d,f,h){var p=G[e.hoverChartIndex||NaN];"touch"!==b.pointerType&&b.pointerType!==b.MSPOINTER_TYPE_TOUCH||!p||(p=p.pointer,h(b),p[d]({type:f,target:b.currentTarget,preventDefault:y,touches:C()}))}var E=this&&this.__extends||function(){var b=function(d,e){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,d){b.__proto__=
d}||function(b,d){for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])};return b(d,e)};return function(d,e){function f(){this.constructor=d}b(d,e);d.prototype=null===e?Object.create(e):(f.prototype=e.prototype,new f)}}(),G=f.charts,B=f.doc,y=f.noop,t=f.win,h=l.addEvent,d=l.css,b=l.objectEach,p=l.removeEvent,q={},r=!!t.PointerEvent;return function(b){function e(){return null!==b&&b.apply(this,arguments)||this}E(e,b);e.isRequired=function(){return!(f.hasTouch||!t.PointerEvent&&!t.MSPointerEvent)};e.prototype.batchMSEvents=
function(b){b(this.chart.container,r?"pointerdown":"MSPointerDown",this.onContainerPointerDown);b(this.chart.container,r?"pointermove":"MSPointerMove",this.onContainerPointerMove);b(B,r?"pointerup":"MSPointerUp",this.onDocumentPointerUp)};e.prototype.destroy=function(){this.batchMSEvents(p);b.prototype.destroy.call(this)};e.prototype.init=function(e,f){b.prototype.init.call(this,e,f);this.hasZoom&&d(e.container,{"-ms-touch-action":"none","touch-action":"none"})};e.prototype.onContainerPointerDown=
function(b){v(b,"onContainerTouchStart","touchstart",function(b){q[b.pointerId]={pageX:b.pageX,pageY:b.pageY,target:b.currentTarget}})};e.prototype.onContainerPointerMove=function(b){v(b,"onContainerTouchMove","touchmove",function(b){q[b.pointerId]={pageX:b.pageX,pageY:b.pageY};q[b.pointerId].target||(q[b.pointerId].target=b.currentTarget)})};e.prototype.onDocumentPointerUp=function(b){v(b,"onDocumentTouchEnd","touchend",function(b){delete q[b.pointerId]})};e.prototype.setDOMEvents=function(){b.prototype.setDOMEvents.call(this);
(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(h)};return e}(e)});K(l,"Core/Legend/Legend.js",[l["Core/Animation/AnimationUtilities.js"],l["Core/FormatUtilities.js"],l["Core/Globals.js"],l["Core/Series/Point.js"],l["Core/Renderer/RendererUtilities.js"],l["Core/Utilities.js"]],function(f,e,l,C,v,E){var G=f.animObject,B=f.setAnimation,y=e.format;f=l.isFirefox;var t=l.marginNames;l=l.win;var h=v.distribute,d=E.addEvent,b=E.createElement,p=E.css,q=E.defined,r=E.discardElement,n=E.find,J=E.fireEvent,
w=E.isNumber,z=E.merge,x=E.pick,m=E.relativeLength,k=E.stableSort,a=E.syncTimeout;v=E.wrap;E=function(){function g(a,b){this.allItems=[];this.contentGroup=this.box=void 0;this.display=!1;this.group=void 0;this.offsetWidth=this.maxLegendWidth=this.maxItemWidth=this.legendWidth=this.legendHeight=this.lastLineHeight=this.lastItemY=this.itemY=this.itemX=this.itemMarginTop=this.itemMarginBottom=this.itemHeight=this.initialItemY=0;this.options=void 0;this.padding=0;this.pages=[];this.proximate=!1;this.scrollGroup=
void 0;this.widthOption=this.totalItemWidth=this.titleHeight=this.symbolWidth=this.symbolHeight=0;this.chart=a;this.init(a,b)}g.prototype.init=function(a,b){this.chart=a;this.setOptions(b);b.enabled&&(this.render(),d(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=d(this.chart,"render",function(){this.legend.proximatePositions();this.legend.positionItems()}):this.unchartrender&&this.unchartrender())};g.prototype.setOptions=function(a){var c=x(a.padding,
8);this.options=a;this.chart.styledMode||(this.itemStyle=a.itemStyle,this.itemHiddenStyle=z(this.itemStyle,a.itemHiddenStyle));this.itemMarginTop=a.itemMarginTop||0;this.itemMarginBottom=a.itemMarginBottom||0;this.padding=c;this.initialItemY=c-5;this.symbolWidth=x(a.symbolWidth,16);this.pages=[];this.proximate="proximate"===a.layout&&!this.chart.inverted;this.baseline=void 0};g.prototype.update=function(a,b){var c=this.chart;this.setOptions(z(!0,this.options,a));this.destroy();c.isDirtyLegend=c.isDirtyBox=
!0;x(b,!0)&&c.redraw();J(this,"afterUpdate")};g.prototype.colorizeItem=function(a,b){a.legendGroup[b?"removeClass":"addClass"]("highcharts-legend-item-hidden");if(!this.chart.styledMode){var c=this.options,d=a.legendItem,g=a.legendLine,e=a.legendSymbol,f=this.itemHiddenStyle.color;c=b?c.itemStyle.color:f;var k=b?a.color||f:f,h=a.options&&a.options.marker,m={fill:k};d&&d.css({fill:c,color:c});g&&g.attr({stroke:k});e&&(h&&e.isMarker&&(m=a.pointAttribs(),b||(m.stroke=m.fill=f)),e.attr(m))}J(this,"afterColorizeItem",
{item:a,visible:b})};g.prototype.positionItems=function(){this.allItems.forEach(this.positionItem,this);this.chart.isResizing||this.positionCheckboxes()};g.prototype.positionItem=function(a){var c=this,b=this.options,d=b.symbolPadding,g=!b.rtl,e=a._legendItemPos;b=e[0];e=e[1];var f=a.checkbox,k=a.legendGroup;k&&k.element&&(d={translateX:g?b:this.legendWidth-b-2*d-4,translateY:e},g=function(){J(c,"afterPositionItem",{item:a})},q(k.translateY)?k.animate(d,void 0,g):(k.attr(d),g()));f&&(f.x=b,f.y=e)};
g.prototype.destroyItem=function(a){var c=a.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach(function(c){a[c]&&(a[c]=a[c].destroy())});c&&r(a.checkbox)};g.prototype.destroy=function(){function a(a){this[a]&&(this[a]=this[a].destroy())}this.getAllItems().forEach(function(c){["legendItem","legendGroup"].forEach(a,c)});"clipRect up down pager nav box title group".split(" ").forEach(a,this);this.display=null};g.prototype.positionCheckboxes=function(){var a=this.group&&this.group.alignAttr,
b=this.clipHeight||this.legendHeight,d=this.titleHeight;if(a){var g=a.translateY;this.allItems.forEach(function(c){var e=c.checkbox;if(e){var f=g+d+e.y+(this.scrollOffset||0)+3;p(e,{left:a.translateX+c.checkboxOffset+e.x-20+"px",top:f+"px",display:this.proximate||f>g-6&&f<g+b-6?"":"none"})}},this)}};g.prototype.renderTitle=function(){var a=this.options,b=this.padding,d=a.title,g=0;d.text&&(this.title||(this.title=this.chart.renderer.label(d.text,b-3,b-4,void 0,void 0,void 0,a.useHTML,void 0,"legend-title").attr({zIndex:1}),
this.chart.styledMode||this.title.css(d.style),this.title.add(this.group)),d.width||this.title.css({width:this.maxLegendWidth+"px"}),a=this.title.getBBox(),g=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:g}));this.titleHeight=g};g.prototype.setText=function(a){var c=this.options;a.legendItem.attr({text:c.labelFormat?y(c.labelFormat,a,this.chart):c.labelFormatter.call(a)})};g.prototype.renderItem=function(a){var c=this.chart,b=c.renderer,d=this.options,g=this.symbolWidth,e=d.symbolPadding||
0,f=this.itemStyle,k=this.itemHiddenStyle,h="horizontal"===d.layout?x(d.itemDistance,20):0,m=!d.rtl,p=!a.series,n=!p&&a.series.drawLegendSymbol?a.series:a,l=n.options,r=this.createCheckboxForItem&&l&&l.showCheckbox,q=d.useHTML,t=a.options.className,F=a.legendItem;l=g+e+h+(r?20:0);F||(a.legendGroup=b.g("legend-item").addClass("highcharts-"+n.type+"-series highcharts-color-"+a.colorIndex+(t?" "+t:"")+(p?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=F=b.text("",
m?g+e:-e,this.baseline||0,q),c.styledMode||F.css(z(a.visible?f:k)),F.attr({align:m?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(this.fontMetrics=b.fontMetrics(c.styledMode?12:f.fontSize,F),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,F.attr("y",this.baseline),this.symbolHeight=d.symbolHeight||this.fontMetrics.f,d.squareSymbol&&(this.symbolWidth=x(d.symbolWidth,Math.max(this.symbolHeight,16)),l=this.symbolWidth+e+h+(r?20:0),m&&F.attr("x",this.symbolWidth+e))),n.drawLegendSymbol(this,
a),this.setItemEvents&&this.setItemEvents(a,F,q));r&&!a.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem(a);this.colorizeItem(a,a.visible);!c.styledMode&&f.width||F.css({width:(d.itemWidth||this.widthOption||c.spacingBox.width)-l+"px"});this.setText(a);c=F.getBBox();b=this.fontMetrics&&this.fontMetrics.h||0;a.itemWidth=a.checkboxOffset=d.itemWidth||a.legendItemWidth||c.width+l;this.maxItemWidth=Math.max(this.maxItemWidth,a.itemWidth);this.totalItemWidth+=a.itemWidth;this.itemHeight=
a.itemHeight=Math.round(a.legendItemHeight||(c.height>1.5*b?c.height:b))};g.prototype.layoutItem=function(a){var c=this.options,b=this.padding,d="horizontal"===c.layout,g=a.itemHeight,e=this.itemMarginBottom,f=this.itemMarginTop,k=d?x(c.itemDistance,20):0,h=this.maxLegendWidth;c=c.alignColumns&&this.totalItemWidth>h?this.maxItemWidth:a.itemWidth;d&&this.itemX-b+c>h&&(this.itemX=b,this.lastLineHeight&&(this.itemY+=f+this.lastLineHeight+e),this.lastLineHeight=0);this.lastItemY=f+this.itemY+e;this.lastLineHeight=
Math.max(g,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];d?this.itemX+=c:(this.itemY+=f+g+e,this.lastLineHeight=g);this.offsetWidth=this.widthOption||Math.max((d?this.itemX-b-(a.checkbox?0:k):c)+b,this.offsetWidth)};g.prototype.getAllItems=function(){var a=[];this.chart.series.forEach(function(c){var b=c&&c.options;c&&x(b.showInLegend,q(b.linkedTo)?!1:void 0,!0)&&(a=a.concat(c.legendItems||("point"===b.legendType?c.data:c)))});J(this,"afterGetAllItems",{allItems:a});return a};g.prototype.getAlignment=
function(){var a=this.options;return this.proximate?a.align.charAt(0)+"tv":a.floating?"":a.align.charAt(0)+a.verticalAlign.charAt(0)+a.layout.charAt(0)};g.prototype.adjustMargins=function(a,b){var c=this.chart,d=this.options,g=this.getAlignment();g&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(e,f){e.test(g)&&!q(a[f])&&(c[t[f]]=Math.max(c[t[f]],c.legend[(f+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][f]*d[f%2?"x":"y"]+x(d.margin,12)+b[f]+(c.titleOffset[f]||0)))})};
g.prototype.proximatePositions=function(){var a=this.chart,b=[],d="left"===this.options.align;this.allItems.forEach(function(c){var g;var e=d;if(c.yAxis){c.xAxis.options.reversed&&(e=!e);c.points&&(g=n(e?c.points:c.points.slice(0).reverse(),function(a){return w(a.plotY)}));e=this.itemMarginTop+c.legendItem.getBBox().height+this.itemMarginBottom;var f=c.yAxis.top-a.plotTop;c.visible?(g=g?g.plotY:c.yAxis.height,g+=f-.3*e):g=f+c.yAxis.height;b.push({target:g,size:e,item:c})}},this);h(b,a.plotHeight).forEach(function(c){c.item._legendItemPos&&
c.pos&&(c.item._legendItemPos[1]=a.plotTop-a.spacing[0]+c.pos)})};g.prototype.render=function(){var a=this.chart,b=a.renderer,d=this.options,g=this.padding,e=this.getAllItems(),f=this.group,h=this.box;this.itemX=g;this.itemY=this.initialItemY;this.lastItemY=this.offsetWidth=0;this.widthOption=m(d.width,a.spacingBox.width-g);var p=a.spacingBox.width-2*g-d.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(p/=2);this.maxLegendWidth=this.widthOption||p;f||(this.group=f=b.g("legend").addClass(d.className||
"").attr({zIndex:7}).add(),this.contentGroup=b.g().attr({zIndex:1}).add(f),this.scrollGroup=b.g().add(this.contentGroup));this.renderTitle();k(e,function(a,c){return(a.options&&a.options.legendIndex||0)-(c.options&&c.options.legendIndex||0)});d.reversed&&e.reverse();this.allItems=e;this.display=p=!!e.length;this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0;e.forEach(this.renderItem,this);e.forEach(this.layoutItem,this);e=(this.widthOption||this.offsetWidth)+g;var n=this.lastItemY+
this.lastLineHeight+this.titleHeight;n=this.handleOverflow(n);n+=g;h||(this.box=h=b.rect().addClass("highcharts-legend-box").attr({r:d.borderRadius}).add(f));a.styledMode||h.attr({stroke:d.borderColor,"stroke-width":d.borderWidth||0,fill:d.backgroundColor||"none"}).shadow(d.shadow);if(0<e&&0<n)h[h.placed?"animate":"attr"](h.crisp.call({},{x:0,y:0,width:e,height:n},h.strokeWidth()));f[p?"show":"hide"]();a.styledMode&&"none"===f.getStyle("display")&&(e=n=0);this.legendWidth=e;this.legendHeight=n;p&&
this.align();this.proximate||this.positionItems();J(this,"afterRender")};g.prototype.align=function(a){void 0===a&&(a=this.chart.spacingBox);var c=this.chart,b=this.options,d=a.y;/(lth|ct|rth)/.test(this.getAlignment())&&0<c.titleOffset[0]?d+=c.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&0<c.titleOffset[2]&&(d-=c.titleOffset[2]);d!==a.y&&(a=z(a,{y:d}));c.hasRendered||(this.group.placed=!1);this.group.align(z(b,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?
"top":b.verticalAlign}),!0,a)};g.prototype.handleOverflow=function(a){var c=this,b=this.chart,d=b.renderer,g=this.options,e=g.y,f="top"===g.verticalAlign,k=this.padding,h=g.maxHeight,m=g.navigation,p=x(m.animation,!0),n=m.arrowSize||12,l=this.pages,r=this.allItems,q=function(a){"number"===typeof a?w.attr({height:a}):w&&(c.clipRect=w.destroy(),c.contentGroup.clip());c.contentGroup.div&&(c.contentGroup.div.style.clip=a?"rect("+k+"px,9999px,"+(k+a)+"px,0)":"auto")},t=function(a){c[a]=d.circle(0,0,1.3*
n).translate(n/2,n/2).add(N);b.styledMode||c[a].attr("fill","rgba(0,0,0,0.0001)");return c[a]},F,z;e=b.spacingBox.height+(f?-e:e)-k;var N=this.nav,w=this.clipRect;"horizontal"!==g.layout||"middle"===g.verticalAlign||g.floating||(e/=2);h&&(e=Math.min(e,h));l.length=0;a&&0<e&&a>e&&!1!==m.enabled?(this.clipHeight=F=Math.max(e-20-this.titleHeight-k,0),this.currentPage=x(this.currentPage,1),this.fullHeight=a,r.forEach(function(a,c){var b=a._legendItemPos[1],d=Math.round(a.legendItem.getBBox().height),
g=l.length;if(!g||b-l[g-1]>F&&(z||b)!==l[g-1])l.push(z||b),g++;a.pageIx=g-1;z&&(r[c-1].pageIx=g-1);c===r.length-1&&b+d-l[g-1]>F&&d<=F&&(l.push(b),a.pageIx=g);b!==z&&(z=b)}),w||(w=c.clipRect=d.clipRect(0,k,9999,0),c.contentGroup.clip(w)),q(F),N||(this.nav=N=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,n,n).add(N),t("upTracker").on("click",function(){c.scroll(-1,p)}),this.pager=d.text("",15,10).addClass("highcharts-legend-navigation"),!b.styledMode&&m.style&&this.pager.css(m.style),
this.pager.add(N),this.down=d.symbol("triangle-down",0,0,n,n).add(N),t("downTracker").on("click",function(){c.scroll(1,p)})),c.scroll(0),a=e):N&&(q(),this.nav=N.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a};g.prototype.scroll=function(c,b){var d=this,g=this.chart,e=this.pages,f=e.length,k=this.clipHeight,h=this.options.navigation,m=this.pager,p=this.padding,n=this.currentPage+c;n>f&&(n=f);0<n&&("undefined"!==typeof b&&B(b,g),this.nav.attr({translateX:p,translateY:k+
this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach(function(a){a.attr({"class":1===n?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),m.attr({text:n+"/"+f}),[this.down,this.downTracker].forEach(function(a){a.attr({x:18+this.pager.getBBox().width,"class":n===f?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),g.styledMode||(this.up.attr({fill:1===n?h.inactiveColor:h.activeColor}),this.upTracker.css({cursor:1===n?"default":
"pointer"}),this.down.attr({fill:n===f?h.inactiveColor:h.activeColor}),this.downTracker.css({cursor:n===f?"default":"pointer"})),this.scrollOffset=-e[n-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=n,this.positionCheckboxes(),c=G(x(b,g.renderer.globalAnimation,!0)),a(function(){J(d,"afterScroll",{currentPage:n})},c.duration))};g.prototype.setItemEvents=function(a,b,d){var c=this,g=c.chart.renderer.boxWrapper,e=a instanceof C,f="highcharts-legend-"+
(e?"point":"series")+"-active",k=c.chart.styledMode,h=function(b){c.allItems.forEach(function(c){a!==c&&[c].concat(c.linkedSeries||[]).forEach(function(a){a.setState(b,!e)})})};(d?[b,a.legendSymbol]:[a.legendGroup]).forEach(function(d){if(d)d.on("mouseover",function(){a.visible&&h("inactive");a.setState("hover");a.visible&&g.addClass(f);k||b.css(c.options.itemHoverStyle)}).on("mouseout",function(){c.chart.styledMode||b.css(z(a.visible?c.itemStyle:c.itemHiddenStyle));h("");g.removeClass(f);a.setState()}).on("click",
function(c){var b=function(){a.setVisible&&a.setVisible();h(a.visible?"inactive":"")};g.removeClass(f);c={browserEvent:c};a.firePointEvent?a.firePointEvent("legendItemClick",c,b):J(a,"legendItemClick",c,b)})})};g.prototype.createCheckboxForItem=function(a){a.checkbox=b("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);d(a.checkbox,"click",function(c){J(a.series||a,"checkboxClick",{checked:c.target.checked,
item:a},function(){a.select()})})};return g}();(/Trident\/7\.0/.test(l.navigator&&l.navigator.userAgent)||f)&&v(E.prototype,"positionItem",function(a,c){var b=this,d=function(){c._legendItemPos&&a.call(b,c)};d();b.bubbleLegend||setTimeout(d)});"";return E});K(l,"Core/Series/SeriesRegistry.js",[l["Core/Globals.js"],l["Core/DefaultOptions.js"],l["Core/Series/Point.js"],l["Core/Utilities.js"]],function(f,e,l,C){var v=e.defaultOptions,E=C.error,G=C.extendClass,B=C.merge,y;(function(e){function h(d,b){var f=
v.plotOptions||{},h=b.defaultOptions;b.prototype.pointClass||(b.prototype.pointClass=l);b.prototype.type=d;h&&(f[d]=h);e.seriesTypes[d]=b}e.seriesTypes=f.seriesTypes;e.getSeries=function(d,b){void 0===b&&(b={});var f=d.options.chart;f=b.type||f.type||f.defaultSeriesType||"";var h=e.seriesTypes[f];e||E(17,!0,d,{missingModuleFor:f});f=new h;"function"===typeof f.init&&f.init(d,b);return f};e.registerSeriesType=h;e.seriesType=function(d,b,f,q,r){var p=v.plotOptions||{};b=b||"";p[d]=B(p[b],f);h(d,G(e.seriesTypes[b]||
function(){},q));e.seriesTypes[d].prototype.type=d;r&&(e.seriesTypes[d].prototype.pointClass=G(l,r));return e.seriesTypes[d]}})(y||(y={}));return y});K(l,"Core/Chart/Chart.js",[l["Core/Animation/AnimationUtilities.js"],l["Core/Axis/Axis.js"],l["Core/FormatUtilities.js"],l["Core/Foundation.js"],l["Core/Globals.js"],l["Core/Legend/Legend.js"],l["Core/MSPointer.js"],l["Core/DefaultOptions.js"],l["Core/Pointer.js"],l["Core/Renderer/RendererRegistry.js"],l["Core/Series/SeriesRegistry.js"],l["Core/Renderer/SVG/SVGRenderer.js"],
l["Core/Time.js"],l["Core/Utilities.js"],l["Core/Renderer/HTML/AST.js"]],function(f,e,l,C,v,E,G,B,y,t,h,d,b,p,q){var r=f.animate,n=f.animObject,J=f.setAnimation,w=l.numberFormat,z=C.registerEventOptions,x=v.charts,m=v.doc,k=v.marginNames,a=v.svg,g=v.win,c=B.defaultOptions,D=B.defaultTime,A=h.seriesTypes,u=p.addEvent,L=p.attr,S=p.cleanRecursively,R=p.createElement,M=p.css,U=p.defined,P=p.discardElement,I=p.erase,H=p.error,K=p.extend,da=p.find,O=p.fireEvent,ea=p.getStyle,F=p.isArray,T=p.isNumber,N=
p.isObject,V=p.isString,W=p.merge,X=p.objectEach,Q=p.pick,Z=p.pInt,ba=p.relativeLength,ha=p.removeEvent,fa=p.splat,ia=p.syncTimeout,ka=p.uniqueKey;f=function(){function f(a,c,b){this.series=this.renderTo=this.renderer=this.pointer=this.pointCount=this.plotWidth=this.plotTop=this.plotLeft=this.plotHeight=this.plotBox=this.options=this.numberFormatter=this.margin=this.legend=this.labelCollectors=this.isResizing=this.index=this.eventOptions=this.container=this.colorCounter=this.clipBox=this.chartWidth=
this.chartHeight=this.bounds=this.axisOffset=this.axes=void 0;this.sharedClips={};this.yAxis=this.xAxis=this.userOptions=this.titleOffset=this.time=this.symbolCounter=this.spacingBox=this.spacing=void 0;this.getArgs(a,c,b)}f.chart=function(a,c,b){return new f(a,c,b)};f.prototype.getArgs=function(a,c,b){V(a)||a.nodeName?(this.renderTo=a,this.init(c,b)):this.init(a,c)};f.prototype.init=function(a,d){var g=a.plotOptions||{};O(this,"init",{args:arguments},function(){var e=W(c,a),f=e.chart;X(e.plotOptions,
function(a,c){N(a)&&(a.tooltip=g[c]&&W(g[c].tooltip)||void 0)});e.tooltip.userOptions=a.chart&&a.chart.forExport&&a.tooltip.userOptions||a.tooltip;this.userOptions=a;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.labelCollectors=[];this.callback=d;this.isResizing=0;this.options=e;this.axes=[];this.series=[];this.time=a.time&&Object.keys(a.time).length?new b(a.time):v.time;this.numberFormatter=f.numberFormatter||w;this.styledMode=f.styledMode;this.hasCartesianSeries=f.showAxes;this.index=
x.length;x.push(this);v.chartCount++;z(this,f);this.xAxis=[];this.yAxis=[];this.pointCount=this.colorCounter=this.symbolCounter=0;O(this,"afterInit");this.firstRender()})};f.prototype.initSeries=function(a){var c=this.options.chart;c=a.type||c.type||c.defaultSeriesType;var b=A[c];b||H(17,!0,this,{missingModuleFor:c});c=new b;"function"===typeof c.init&&c.init(this,a);return c};f.prototype.setSeriesData=function(){this.getSeriesOrderByLinks().forEach(function(a){a.points||a.data||!a.enabledDataSorting||
a.setData(a.options.data,!1)})};f.prototype.getSeriesOrderByLinks=function(){return this.series.concat().sort(function(a,c){return a.linkedSeries.length||c.linkedSeries.length?c.linkedSeries.length-a.linkedSeries.length:0})};f.prototype.orderSeries=function(a){var c=this.series;a=a||0;for(var b=c.length;a<b;++a)c[a]&&(c[a].index=a,c[a].name=c[a].getName())};f.prototype.isInsidePlot=function(a,c,b){void 0===b&&(b={});var d=this.inverted,g=this.plotBox,e=this.plotLeft,f=this.plotTop,k=this.scrollablePlotBox,
h=0;var m=0;b.visiblePlotOnly&&this.scrollingContainer&&(m=this.scrollingContainer,h=m.scrollLeft,m=m.scrollTop);var p=b.series;g=b.visiblePlotOnly&&k||g;k=b.inverted?c:a;c=b.inverted?a:c;a={x:k,y:c,isInsidePlot:!0};if(!b.ignoreX){var n=p&&(d?p.yAxis:p.xAxis)||{pos:e,len:Infinity};k=b.paneCoordinates?n.pos+k:e+k;k>=Math.max(h+e,n.pos)&&k<=Math.min(h+e+g.width,n.pos+n.len)||(a.isInsidePlot=!1)}!b.ignoreY&&a.isInsidePlot&&(d=p&&(d?p.xAxis:p.yAxis)||{pos:f,len:Infinity},b=b.paneCoordinates?d.pos+c:f+
c,b>=Math.max(m+f,d.pos)&&b<=Math.min(m+f+g.height,d.pos+d.len)||(a.isInsidePlot=!1));O(this,"afterIsInsidePlot",a);return a.isInsidePlot};f.prototype.redraw=function(a){O(this,"beforeRedraw");var c=this.hasCartesianSeries?this.axes:this.colorAxis||[],b=this.series,d=this.pointer,g=this.legend,e=this.userOptions.legend,f=this.renderer,k=f.isHidden(),h=[],m=this.isDirtyBox,p=this.isDirtyLegend;this.setResponsive&&this.setResponsive(!1);J(this.hasRendered?a:!1,this);k&&this.temporaryDisplay();this.layOutTitles();
for(a=b.length;a--;){var n=b[a];if(n.options.stacking||n.options.centerInCategory){var l=!0;if(n.isDirty){var F=!0;break}}}if(F)for(a=b.length;a--;)n=b[a],n.options.stacking&&(n.isDirty=!0);b.forEach(function(a){a.isDirty&&("point"===a.options.legendType?("function"===typeof a.updateTotals&&a.updateTotals(),p=!0):e&&(e.labelFormatter||e.labelFormat)&&(p=!0));a.isDirtyData&&O(a,"updatedData")});p&&g&&g.options.enabled&&(g.render(),this.isDirtyLegend=!1);l&&this.getStacks();c.forEach(function(a){a.updateNames();
a.setScale()});this.getMargins();c.forEach(function(a){a.isDirty&&(m=!0)});c.forEach(function(a){var c=a.min+","+a.max;a.extKey!==c&&(a.extKey=c,h.push(function(){O(a,"afterSetExtremes",K(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(m||l)&&a.redraw()});m&&this.drawChartBox();O(this,"predraw");b.forEach(function(a){(m||a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});d&&d.reset(!0);f.draw();O(this,"redraw");O(this,"render");k&&this.temporaryDisplay(!0);h.forEach(function(a){a.call()})};
f.prototype.get=function(a){function c(c){return c.id===a||c.options&&c.options.id===a}for(var b=this.series,d=da(this.axes,c)||da(this.series,c),g=0;!d&&g<b.length;g++)d=da(b[g].points||[],c);return d};f.prototype.getAxes=function(){var a=this,c=this.options,b=c.xAxis=fa(c.xAxis||{});c=c.yAxis=fa(c.yAxis||{});O(this,"getAxes");b.forEach(function(a,c){a.index=c;a.isX=!0});c.forEach(function(a,c){a.index=c});b.concat(c).forEach(function(c){new e(a,c)});O(this,"afterGetAxes")};f.prototype.getSelectedPoints=
function(){return this.series.reduce(function(a,c){c.getPointsCollection().forEach(function(c){Q(c.selectedStaging,c.selected)&&a.push(c)});return a},[])};f.prototype.getSelectedSeries=function(){return this.series.filter(function(a){return a.selected})};f.prototype.setTitle=function(a,c,b){this.applyDescription("title",a);this.applyDescription("subtitle",c);this.applyDescription("caption",void 0);this.layOutTitles(b)};f.prototype.applyDescription=function(a,c){var b=this,d="title"===a?{color:"#333333",
fontSize:this.options.isStock?"16px":"18px"}:{color:"#666666"};d=this.options[a]=W(!this.styledMode&&{style:d},this.options[a],c);var g=this[a];g&&c&&(this[a]=g=g.destroy());d&&!g&&(g=this.renderer.text(d.text,0,0,d.useHTML).attr({align:d.align,"class":"highcharts-"+a,zIndex:d.zIndex||4}).add(),g.update=function(c){b[{title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"}[a]](c)},this.styledMode||g.css(d.style),this[a]=g)};f.prototype.layOutTitles=function(a){var c=[0,0,0],b=this.renderer,
d=this.spacingBox;["title","subtitle","caption"].forEach(function(a){var g=this[a],e=this.options[a],f=e.verticalAlign||"top";a="title"===a?"top"===f?-3:0:"top"===f?c[0]+2:0;var k;if(g){this.styledMode||(k=e.style&&e.style.fontSize);k=b.fontMetrics(k,g).b;g.css({width:(e.width||d.width+(e.widthAdjust||0))+"px"});var h=Math.round(g.getBBox(e.useHTML).height);g.align(K({y:"bottom"===f?k:a+k,height:h},e),!1,"spacingBox");e.floating||("top"===f?c[0]=Math.ceil(c[0]+h):"bottom"===f&&(c[2]=Math.ceil(c[2]+
h)))}},this);c[0]&&"top"===(this.options.title.verticalAlign||"top")&&(c[0]+=this.options.title.margin);c[2]&&"bottom"===this.options.caption.verticalAlign&&(c[2]+=this.options.caption.margin);var g=!this.titleOffset||this.titleOffset.join(",")!==c.join(",");this.titleOffset=c;O(this,"afterLayOutTitles");!this.isDirtyBox&&g&&(this.isDirtyBox=this.isDirtyLegend=g,this.hasRendered&&Q(a,!0)&&this.isDirtyBox&&this.redraw())};f.prototype.getChartSize=function(){var a=this.options.chart,c=a.width;a=a.height;
var b=this.renderTo;U(c)||(this.containerWidth=ea(b,"width"));U(a)||(this.containerHeight=ea(b,"height"));this.chartWidth=Math.max(0,c||this.containerWidth||600);this.chartHeight=Math.max(0,ba(a,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))};f.prototype.temporaryDisplay=function(a){var c=this.renderTo;if(a)for(;c&&c.style;)c.hcOrigStyle&&(M(c,c.hcOrigStyle),delete c.hcOrigStyle),c.hcOrigDetached&&(m.body.removeChild(c),c.hcOrigDetached=!1),c=c.parentNode;else for(;c&&c.style;){m.body.contains(c)||
c.parentNode||(c.hcOrigDetached=!0,m.body.appendChild(c));if("none"===ea(c,"display",!1)||c.hcOricDetached)c.hcOrigStyle={display:c.style.display,height:c.style.height,overflow:c.style.overflow},a={display:"block",overflow:"hidden"},c!==this.renderTo&&(a.height=0),M(c,a),c.offsetWidth||c.style.setProperty("display","block","important");c=c.parentNode;if(c===m.body)break}};f.prototype.setClassName=function(a){this.container.className="highcharts-container "+(a||"")};f.prototype.getContainer=function(){var c=
this.options,b=c.chart,g=ka(),e,f=this.renderTo;f||(this.renderTo=f=b.renderTo);V(f)&&(this.renderTo=f=m.getElementById(f));f||H(13,!0,this);var k=Z(L(f,"data-highcharts-chart"));T(k)&&x[k]&&x[k].hasRendered&&x[k].destroy();L(f,"data-highcharts-chart",this.index);f.innerHTML=q.emptyHTML;b.skipClone||f.offsetWidth||this.temporaryDisplay();this.getChartSize();k=this.chartWidth;var h=this.chartHeight;M(f,{overflow:"hidden"});this.styledMode||(e=K({position:"relative",overflow:"hidden",width:k+"px",height:h+
"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none"},b.style||{}));this.container=g=R("div",{id:g},e,f);this._cursor=g.style.cursor;this.renderer=new (b.renderer||!a?t.getRendererType(b.renderer):d)(g,k,h,void 0,b.forExport,c.exporting&&c.exporting.allowHTML,this.styledMode);J(void 0,this);this.setClassName(b.className);if(this.styledMode)for(var p in c.defs)this.renderer.definition(c.defs[p]);
else this.renderer.setStyle(b.style);this.renderer.chartIndex=this.index;O(this,"afterGetContainer")};f.prototype.getMargins=function(a){var c=this.spacing,b=this.margin,d=this.titleOffset;this.resetMargins();d[0]&&!U(b[0])&&(this.plotTop=Math.max(this.plotTop,d[0]+c[0]));d[2]&&!U(b[2])&&(this.marginBottom=Math.max(this.marginBottom,d[2]+c[2]));this.legend&&this.legend.display&&this.legend.adjustMargins(b,c);O(this,"getMargins");a||this.getAxisMargins()};f.prototype.getAxisMargins=function(){var a=
this,c=a.axisOffset=[0,0,0,0],b=a.colorAxis,d=a.margin,g=function(a){a.forEach(function(a){a.visible&&a.getOffset()})};a.hasCartesianSeries?g(a.axes):b&&b.length&&g(b);k.forEach(function(b,g){U(d[g])||(a[b]+=c[g])});a.setChartSize()};f.prototype.reflow=function(a){var c=this,b=c.options.chart,d=c.renderTo,e=U(b.width)&&U(b.height),f=b.width||ea(d,"width");b=b.height||ea(d,"height");d=a?a.target:g;delete c.pointer.chartPosition;if(!e&&!c.isPrinting&&f&&b&&(d===g||d===m)){if(f!==c.containerWidth||b!==
c.containerHeight)p.clearTimeout(c.reflowTimeout),c.reflowTimeout=ia(function(){c.container&&c.setSize(void 0,void 0,!1)},a?100:0);c.containerWidth=f;c.containerHeight=b}};f.prototype.setReflow=function(a){var c=this;!1===a||this.unbindReflow?!1===a&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=u(g,"resize",function(a){c.options&&c.reflow(a)}),u(this,"destroy",this.unbindReflow))};f.prototype.setSize=function(a,c,b){var d=this,g=d.renderer;d.isResizing+=1;J(b,d);b=
g.globalAnimation;d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth;"undefined"!==typeof a&&(d.options.chart.width=a);"undefined"!==typeof c&&(d.options.chart.height=c);d.getChartSize();d.styledMode||(b?r:M)(d.container,{width:d.chartWidth+"px",height:d.chartHeight+"px"},b);d.setChartSize(!0);g.setSize(d.chartWidth,d.chartHeight,b);d.axes.forEach(function(a){a.isDirty=!0;a.setScale()});d.isDirtyLegend=!0;d.isDirtyBox=!0;d.layOutTitles();d.getMargins();d.redraw(b);d.oldChartHeight=null;O(d,
"resize");ia(function(){d&&O(d,"endResize",null,function(){--d.isResizing})},n(b).duration)};f.prototype.setChartSize=function(a){var c=this.inverted,b=this.renderer,d=this.chartWidth,g=this.chartHeight,e=this.options.chart,f=this.spacing,k=this.clipOffset,h,m,p,n;this.plotLeft=h=Math.round(this.plotLeft);this.plotTop=m=Math.round(this.plotTop);this.plotWidth=p=Math.max(0,Math.round(d-h-this.marginRight));this.plotHeight=n=Math.max(0,Math.round(g-m-this.marginBottom));this.plotSizeX=c?n:p;this.plotSizeY=
c?p:n;this.plotBorderWidth=e.plotBorderWidth||0;this.spacingBox=b.spacingBox={x:f[3],y:f[0],width:d-f[3]-f[1],height:g-f[0]-f[2]};this.plotBox=b.plotBox={x:h,y:m,width:p,height:n};c=2*Math.floor(this.plotBorderWidth/2);d=Math.ceil(Math.max(c,k[3])/2);g=Math.ceil(Math.max(c,k[0])/2);this.clipBox={x:d,y:g,width:Math.floor(this.plotSizeX-Math.max(c,k[1])/2-d),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(c,k[2])/2-g))};a||(this.axes.forEach(function(a){a.setAxisSize();a.setAxisTranslation()}),
b.alignElements());O(this,"afterSetChartSize",{skipAxes:a})};f.prototype.resetMargins=function(){O(this,"resetMargins");var a=this,c=a.options.chart;["margin","spacing"].forEach(function(b){var d=c[b],g=N(d)?d:[d,d,d,d];["Top","Right","Bottom","Left"].forEach(function(d,e){a[b][e]=Q(c[b+d],g[e])})});k.forEach(function(c,b){a[c]=Q(a.margin[b],a.spacing[b])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]};f.prototype.drawChartBox=function(){var a=this.options.chart,c=this.renderer,b=this.chartWidth,
d=this.chartHeight,g=this.styledMode,e=this.plotBGImage,f=a.backgroundColor,k=a.plotBackgroundColor,h=a.plotBackgroundImage,m=this.plotLeft,p=this.plotTop,n=this.plotWidth,l=this.plotHeight,F=this.plotBox,r=this.clipRect,q=this.clipBox,u=this.chartBackground,t=this.plotBackground,N=this.plotBorder,z,w="animate";u||(this.chartBackground=u=c.rect().addClass("highcharts-background").add(),w="attr");if(g)var x=z=u.strokeWidth();else{x=a.borderWidth||0;z=x+(a.shadow?8:0);f={fill:f||"none"};if(x||u["stroke-width"])f.stroke=
a.borderColor,f["stroke-width"]=x;u.attr(f).shadow(a.shadow)}u[w]({x:z/2,y:z/2,width:b-z-x%2,height:d-z-x%2,r:a.borderRadius});w="animate";t||(w="attr",this.plotBackground=t=c.rect().addClass("highcharts-plot-background").add());t[w](F);g||(t.attr({fill:k||"none"}).shadow(a.plotShadow),h&&(e?(h!==e.attr("href")&&e.attr("href",h),e.animate(F)):this.plotBGImage=c.image(h,m,p,n,l).add()));r?r.animate({width:q.width,height:q.height}):this.clipRect=c.clipRect(q);w="animate";N||(w="attr",this.plotBorder=
N=c.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());g||N.attr({stroke:a.plotBorderColor,"stroke-width":a.plotBorderWidth||0,fill:"none"});N[w](N.crisp({x:m,y:p,width:n,height:l},-N.strokeWidth()));this.isDirtyBox=!1;O(this,"afterDrawChartBox")};f.prototype.propFromSeries=function(){var a=this,c=a.options.chart,b=a.options.series,d,g,e;["inverted","angular","polar"].forEach(function(f){g=A[c.type||c.defaultSeriesType];e=c[f]||g&&g.prototype[f];for(d=b&&b.length;!e&&d--;)(g=A[b[d].type])&&
g.prototype[f]&&(e=!0);a[f]=e})};f.prototype.linkSeries=function(){var a=this,c=a.series;c.forEach(function(a){a.linkedSeries.length=0});c.forEach(function(c){var b=c.options.linkedTo;V(b)&&(b=":previous"===b?a.series[c.index-1]:a.get(b))&&b.linkedParent!==c&&(b.linkedSeries.push(c),c.linkedParent=b,b.enabledDataSorting&&c.setDataSortingOptions(),c.visible=Q(c.options.visible,b.options.visible,c.visible))});O(this,"afterLinkSeries")};f.prototype.renderSeries=function(){this.series.forEach(function(a){a.translate();
a.render()})};f.prototype.renderLabels=function(){var a=this,c=a.options.labels;c.items&&c.items.forEach(function(b){var d=K(c.style,b.style),g=Z(d.left)+a.plotLeft,e=Z(d.top)+a.plotTop+12;delete d.left;delete d.top;a.renderer.text(b.html,g,e).attr({zIndex:2}).css(d).add()})};f.prototype.render=function(){var a=this.axes,c=this.colorAxis,b=this.renderer,d=this.options,g=function(a){a.forEach(function(a){a.visible&&a.render()})},e=0;this.setTitle();this.legend=new E(this,d.legend);this.getStacks&&
this.getStacks();this.getMargins(!0);this.setChartSize();d=this.plotWidth;a.some(function(a){if(a.horiz&&a.visible&&a.options.labels.enabled&&a.series.length)return e=21,!0});var f=this.plotHeight=Math.max(this.plotHeight-e,0);a.forEach(function(a){a.setScale()});this.getAxisMargins();var k=1.1<d/this.plotWidth,h=1.05<f/this.plotHeight;if(k||h)a.forEach(function(a){(a.horiz&&k||!a.horiz&&h)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries?g(a):c&&c.length&&g(c);
this.seriesGroup||(this.seriesGroup=b.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.hasRendered=!0};f.prototype.addCredits=function(a){var c=this,b=W(!0,this.options.credits,a);b.enabled&&!this.credits&&(this.credits=this.renderer.text(b.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){b.href&&(g.location.href=b.href)}).attr({align:b.position.align,zIndex:8}),c.styledMode||
this.credits.css(b.style),this.credits.add().align(b.position),this.credits.update=function(a){c.credits=c.credits.destroy();c.addCredits(a)})};f.prototype.destroy=function(){var a=this,c=a.axes,b=a.series,d=a.container,g=d&&d.parentNode,e;O(a,"destroy");a.renderer.forExport?I(x,a):x[a.index]=void 0;v.chartCount--;a.renderTo.removeAttribute("data-highcharts-chart");ha(a);for(e=c.length;e--;)c[e]=c[e].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(e=b.length;e--;)b[e]=
b[e].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(c){var b=a[c];b&&b.destroy&&(a[c]=b.destroy())});d&&(d.innerHTML=q.emptyHTML,ha(d),g&&P(d));X(a,function(c,b){delete a[b]})};f.prototype.firstRender=function(){var a=this,c=a.options;if(!a.isReadyToRender||a.isReadyToRender()){a.getContainer();a.resetMargins();a.setChartSize();a.propFromSeries();
a.getAxes();(F(c.series)?c.series:[]).forEach(function(c){a.initSeries(c)});a.linkSeries();a.setSeriesData();O(a,"beforeRender");y&&(G.isRequired()?a.pointer=new G(a,c):a.pointer=new y(a,c));a.render();a.pointer.getChartPosition();if(!a.renderer.imgCount&&!a.hasLoaded)a.onload();a.temporaryDisplay(!0)}};f.prototype.onload=function(){this.callbacks.concat([this.callback]).forEach(function(a){a&&"undefined"!==typeof this.index&&a.apply(this,[this])},this);O(this,"load");O(this,"render");U(this.index)&&
this.setReflow(this.options.chart.reflow);this.warnIfA11yModuleNotLoaded();this.hasLoaded=!0};f.prototype.warnIfA11yModuleNotLoaded=function(){var a=this.options,c=this.title;a&&!this.accessibility&&(this.renderer.boxWrapper.attr({role:"img","aria-label":c&&c.element.textContent||""}),a.accessibility&&!1===a.accessibility.enabled||H('Highcharts warning: Consider including the "accessibility.js" module to make your chart more usable for people with disabilities. Set the "accessibility.enabled" option to false to remove this warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.',
!1,this))};f.prototype.addSeries=function(a,c,b){var d=this,g;a&&(c=Q(c,!0),O(d,"addSeries",{options:a},function(){g=d.initSeries(a);d.isDirtyLegend=!0;d.linkSeries();g.enabledDataSorting&&g.setData(a.data,!1);O(d,"afterAddSeries",{series:g});c&&d.redraw(b)}));return g};f.prototype.addAxis=function(a,c,b,d){return this.createAxis(c?"xAxis":"yAxis",{axis:a,redraw:b,animation:d})};f.prototype.addColorAxis=function(a,c,b){return this.createAxis("colorAxis",{axis:a,redraw:c,animation:b})};f.prototype.createAxis=
function(a,c){a=new e(this,W(c.axis,{index:this[a].length,isX:"xAxis"===a}));Q(c.redraw,!0)&&this.redraw(c.animation);return a};f.prototype.showLoading=function(a){var c=this,b=c.options,d=b.loading,g=function(){e&&M(e,{left:c.plotLeft+"px",top:c.plotTop+"px",width:c.plotWidth+"px",height:c.plotHeight+"px"})},e=c.loadingDiv,f=c.loadingSpan;e||(c.loadingDiv=e=R("div",{className:"highcharts-loading highcharts-loading-hidden"},null,c.container));f||(c.loadingSpan=f=R("span",{className:"highcharts-loading-inner"},
null,e),u(c,"redraw",g));e.className="highcharts-loading";q.setElementHTML(f,Q(a,b.lang.loading,""));c.styledMode||(M(e,K(d.style,{zIndex:10})),M(f,d.labelStyle),c.loadingShown||(M(e,{opacity:0,display:""}),r(e,{opacity:d.style.opacity||.5},{duration:d.showDuration||0})));c.loadingShown=!0;g()};f.prototype.hideLoading=function(){var a=this.options,c=this.loadingDiv;c&&(c.className="highcharts-loading highcharts-loading-hidden",this.styledMode||r(c,{opacity:0},{duration:a.loading.hideDuration||100,
complete:function(){M(c,{display:"none"})}}));this.loadingShown=!1};f.prototype.update=function(a,c,d,g){var e=this,f={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},k=a.isResponsiveOptions,h=[],m,p;O(e,"update",{options:a});k||e.setResponsive(!1,!0);a=S(a,e.options);e.userOptions=W(e.userOptions,a);var n=a.chart;if(n){W(!0,e.options.chart,n);"className"in n&&e.setClassName(n.className);"reflow"in n&&e.setReflow(n.reflow);if("inverted"in n||"polar"in n||"type"in
n){e.propFromSeries();var l=!0}"alignTicks"in n&&(l=!0);"events"in n&&z(this,n);X(n,function(a,c){-1!==e.propsRequireUpdateSeries.indexOf("chart."+c)&&(m=!0);-1!==e.propsRequireDirtyBox.indexOf(c)&&(e.isDirtyBox=!0);-1!==e.propsRequireReflow.indexOf(c)&&(k?e.isDirtyBox=!0:p=!0)});!e.styledMode&&n.style&&e.renderer.setStyle(e.options.chart.style||{})}!e.styledMode&&a.colors&&(this.options.colors=a.colors);a.time&&(this.time===D&&(this.time=new b(a.time)),W(!0,e.options.time,a.time));X(a,function(c,
b){if(e[b]&&"function"===typeof e[b].update)e[b].update(c,!1);else if("function"===typeof e[f[b]])e[f[b]](c);else"colors"!==b&&-1===e.collectionsWithUpdate.indexOf(b)&&W(!0,e.options[b],a[b]);"chart"!==b&&-1!==e.propsRequireUpdateSeries.indexOf(b)&&(m=!0)});this.collectionsWithUpdate.forEach(function(c){if(a[c]){var b=[];e[c].forEach(function(a,c){a.options.isInternal||b.push(Q(a.options.index,c))});fa(a[c]).forEach(function(a,g){var f=U(a.id),k;f&&(k=e.get(a.id));!k&&e[c]&&(k=e[c][b?b[g]:g])&&f&&
U(k.options.id)&&(k=void 0);k&&k.coll===c&&(k.update(a,!1),d&&(k.touched=!0));!k&&d&&e.collectionsWithInit[c]&&(e.collectionsWithInit[c][0].apply(e,[a].concat(e.collectionsWithInit[c][1]||[]).concat([!1])).touched=!0)});d&&e[c].forEach(function(a){a.touched||a.options.isInternal?delete a.touched:h.push(a)})}});h.forEach(function(a){a.chart&&a.remove&&a.remove(!1)});l&&e.axes.forEach(function(a){a.update({},!1)});m&&e.getSeriesOrderByLinks().forEach(function(a){a.chart&&a.update({},!1)},this);l=n&&
n.width;n=n&&(V(n.height)?ba(n.height,l||e.chartWidth):n.height);p||T(l)&&l!==e.chartWidth||T(n)&&n!==e.chartHeight?e.setSize(l,n,g):Q(c,!0)&&e.redraw(g);O(e,"afterUpdate",{options:a,redraw:c,animation:g})};f.prototype.setSubtitle=function(a,c){this.applyDescription("subtitle",a);this.layOutTitles(c)};f.prototype.setCaption=function(a,c){this.applyDescription("caption",a);this.layOutTitles(c)};f.prototype.showResetZoom=function(){function a(){b.zoomOut()}var b=this,d=c.lang,g=b.options.chart.resetZoomButton,
e=g.theme,f="chart"===g.relativeTo||"spacingBox"===g.relativeTo?null:"scrollablePlotBox";O(this,"beforeShowResetZoom",null,function(){b.resetZoomButton=b.renderer.button(d.resetZoom,null,null,a,e).attr({align:g.position.align,title:d.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(g.position,!1,f)});O(this,"afterShowResetZoom")};f.prototype.zoomOut=function(){O(this,"selection",{resetSelection:!0},this.zoom)};f.prototype.zoom=function(a){var c=this,b=c.pointer,d=c.inverted?b.mouseDownX:
b.mouseDownY,g=!1,e;!a||a.resetSelection?(c.axes.forEach(function(a){e=a.zoom()}),b.initiated=!1):a.xAxis.concat(a.yAxis).forEach(function(a){var f=a.axis,k=c.inverted?f.left:f.top,h=c.inverted?k+f.width:k+f.height,m=f.isXAxis,n=!1;if(!m&&d>=k&&d<=h||m||!U(d))n=!0;b[m?"zoomX":"zoomY"]&&n&&(e=f.zoom(a.min,a.max),f.displayBtn&&(g=!0))});var f=c.resetZoomButton;g&&!f?c.showResetZoom():!g&&N(f)&&(c.resetZoomButton=f.destroy());e&&c.redraw(Q(c.options.chart.animation,a&&a.animation,100>c.pointCount))};
f.prototype.pan=function(a,c){var b=this,d=b.hoverPoints;c="object"===typeof c?c:{enabled:c,type:"x"};var g=b.options.chart;g&&g.panning&&(g.panning=c);var e=c.type,f;O(this,"pan",{originalEvent:a},function(){d&&d.forEach(function(a){a.setState()});var c=b.xAxis;"xy"===e?c=c.concat(b.yAxis):"y"===e&&(c=b.yAxis);var g={};c.forEach(function(c){if(c.options.panningEnabled&&!c.options.isInternal){var d=c.horiz,k=a[d?"chartX":"chartY"];d=d?"mouseDownX":"mouseDownY";var h=b[d],m=c.minPointOffset||0,n=c.reversed&&
!b.inverted||!c.reversed&&b.inverted?-1:1,p=c.getExtremes(),l=c.toValue(h-k,!0)+m*n,F=c.toValue(h+c.len-k,!0)-(m*n||c.isXAxis&&c.pointRangePadding||0),r=F<l;n=c.hasVerticalPanning();h=r?F:l;l=r?l:F;var q=c.panningState;!n||c.isXAxis||q&&!q.isDirty||c.series.forEach(function(a){var c=a.getProcessedData(!0);c=a.getExtremes(c.yData,!0);q||(q={startMin:Number.MAX_VALUE,startMax:-Number.MAX_VALUE});T(c.dataMin)&&T(c.dataMax)&&(q.startMin=Math.min(Q(a.options.threshold,Infinity),c.dataMin,q.startMin),q.startMax=
Math.max(Q(a.options.threshold,-Infinity),c.dataMax,q.startMax))});n=Math.min(Q(q&&q.startMin,p.dataMin),m?p.min:c.toValue(c.toPixels(p.min)-c.minPixelPadding));F=Math.max(Q(q&&q.startMax,p.dataMax),m?p.max:c.toValue(c.toPixels(p.max)+c.minPixelPadding));c.panningState=q;c.isOrdinal||(m=n-h,0<m&&(l+=m,h=n),m=l-F,0<m&&(l=F,h-=m),c.series.length&&h!==p.min&&l!==p.max&&h>=n&&l<=F&&(c.setExtremes(h,l,!1,!1,{trigger:"pan"}),!b.resetZoomButton&&h!==n&&l!==F&&e.match("y")&&(b.showResetZoom(),c.displayBtn=
!1),f=!0),g[d]=k)}});X(g,function(a,c){b[c]=a});f&&b.redraw(!1);M(b.container,{cursor:"move"})})};return f}();K(f.prototype,{callbacks:[],collectionsWithInit:{xAxis:[f.prototype.addAxis,[!0]],yAxis:[f.prototype.addAxis,[!1]],series:[f.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),
propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")});"";return f});K(l,"Core/Legend/LegendSymbol.js",[l["Core/Utilities.js"]],function(f){var e=f.merge,l=f.pick,C;(function(f){f.drawLineMarker=function(f){var v=this.options,B=f.symbolWidth,y=f.symbolHeight,t=y/2,h=this.chart.renderer,d=this.legendGroup;f=f.baseline-Math.round(.3*f.fontMetrics.b);var b={},p=v.marker;this.chart.styledMode||(b={"stroke-width":v.lineWidth||
0},v.dashStyle&&(b.dashstyle=v.dashStyle));this.legendLine=h.path([["M",0,f],["L",B,f]]).addClass("highcharts-graph").attr(b).add(d);p&&!1!==p.enabled&&B&&(v=Math.min(l(p.radius,t),t),0===this.symbol.indexOf("url")&&(p=e(p,{width:y,height:y}),v=0),this.legendSymbol=B=h.symbol(this.symbol,B/2-v,f-v,2*v,2*v,p).addClass("highcharts-point").add(d),B.isMarker=!0)};f.drawRectangle=function(e,f){var v=e.symbolHeight,y=e.options.squareSymbol;f.legendSymbol=this.chart.renderer.rect(y?(e.symbolWidth-v)/2:0,
e.baseline-v+1,y?v:e.symbolWidth,v,l(e.options.symbolRadius,v/2)).addClass("highcharts-point").attr({zIndex:3}).add(f.legendGroup)}})(C||(C={}));return C});K(l,"Core/Series/SeriesDefaults.js",[],function(){return{lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",
lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",defer:!0,formatter:function(){var f=this.series.chart.numberFormatter;return"number"!==typeof this.y?"":f(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},
select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"}});K(l,"Core/Series/Series.js",[l["Core/Animation/AnimationUtilities.js"],l["Core/DefaultOptions.js"],l["Core/Foundation.js"],l["Core/Globals.js"],l["Core/Legend/LegendSymbol.js"],l["Core/Series/Point.js"],l["Core/Series/SeriesDefaults.js"],l["Core/Series/SeriesRegistry.js"],l["Core/Renderer/SVG/SVGElement.js"],l["Core/Utilities.js"]],function(f,e,l,C,v,E,G,B,
y,t){var h=f.animObject,d=f.setAnimation,b=e.defaultOptions,p=l.registerEventOptions,q=C.hasTouch,r=C.svg,n=C.win,J=B.seriesTypes,w=t.addEvent,z=t.arrayMax,x=t.arrayMin,m=t.clamp,k=t.cleanRecursively,a=t.correctFloat,g=t.defined,c=t.erase,D=t.error,A=t.extend,u=t.find,L=t.fireEvent,S=t.getNestedProperty,R=t.isArray,M=t.isNumber,U=t.isString,P=t.merge,I=t.objectEach,H=t.pick,K=t.removeEvent,da=t.splat,O=t.syncTimeout;f=function(){function e(){this.zones=this.yAxis=this.xAxis=this.userOptions=this.tooltipOptions=
this.processedYData=this.processedXData=this.points=this.options=this.linkedSeries=this.index=this.eventsToUnbind=this.eventOptions=this.data=this.chart=this._i=void 0}e.prototype.init=function(a,c){L(this,"init",{options:c});var b=this,d=a.series;this.eventsToUnbind=[];b.chart=a;b.options=b.setOptions(c);c=b.options;b.linkedSeries=[];b.bindAxes();A(b,{name:c.name,state:"",visible:!1!==c.visible,selected:!0===c.selected});p(this,c);var g=c.events;if(g&&g.click||c.point&&c.point.events&&c.point.events.click||
c.allowPointSelect)a.runTrackerClick=!0;b.getColor();b.getSymbol();b.parallelArrays.forEach(function(a){b[a+"Data"]||(b[a+"Data"]=[])});b.isCartesian&&(a.hasCartesianSeries=!0);var e;d.length&&(e=d[d.length-1]);b._i=H(e&&e._i,-1)+1;b.opacity=b.options.opacity;a.orderSeries(this.insert(d));c.dataSorting&&c.dataSorting.enabled?b.setDataSortingOptions():b.points||b.data||b.setData(c.data,!1);L(this,"afterInit")};e.prototype.is=function(a){return J[a]&&this instanceof J[a]};e.prototype.insert=function(a){var c=
this.options.index,b;if(M(c)){for(b=a.length;b--;)if(c>=H(a[b].options.index,a[b]._i)){a.splice(b+1,0,this);break}-1===b&&a.unshift(this);b+=1}else a.push(this);return H(b,a.length-1)};e.prototype.bindAxes=function(){var a=this,c=a.options,b=a.chart,d;L(this,"bindAxes",null,function(){(a.axisTypes||[]).forEach(function(g){var e=0;b[g].forEach(function(b){d=b.options;if(c[g]===e&&!d.isInternal||"undefined"!==typeof c[g]&&c[g]===d.id||"undefined"===typeof c[g]&&0===d.index)a.insert(b.series),a[g]=b,
b.isDirty=!0;d.isInternal||e++});a[g]||a.optionalAxis===g||D(18,!0,b)})});L(this,"afterBindAxes")};e.prototype.updateParallelArrays=function(a,c){var b=a.series,d=arguments,g=M(c)?function(d){var g="y"===d&&b.toYData?b.toYData(a):a[d];b[d+"Data"][c]=g}:function(a){Array.prototype[c].apply(b[a+"Data"],Array.prototype.slice.call(d,2))};b.parallelArrays.forEach(g)};e.prototype.hasData=function(){return this.visible&&"undefined"!==typeof this.dataMax&&"undefined"!==typeof this.dataMin||this.visible&&
this.yData&&0<this.yData.length};e.prototype.autoIncrement=function(a){var c=this.options,b=c.pointIntervalUnit,d=c.relativeXValue,g=this.chart.time,e=this.xIncrement,f;e=H(e,c.pointStart,0);this.pointInterval=f=H(this.pointInterval,c.pointInterval,1);d&&M(a)&&(f*=a);b&&(c=new g.Date(e),"day"===b?g.set("Date",c,g.get("Date",c)+f):"month"===b?g.set("Month",c,g.get("Month",c)+f):"year"===b&&g.set("FullYear",c,g.get("FullYear",c)+f),f=c.getTime()-e);if(d&&M(a))return e+f;this.xIncrement=e+f;return e};
e.prototype.setDataSortingOptions=function(){var a=this.options;A(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1});g(a.pointRange)||(a.pointRange=1)};e.prototype.setOptions=function(a){var c=this.chart,d=c.options,e=d.plotOptions,f=c.userOptions||{};a=P(a);c=c.styledMode;var k={plotOptions:e,userOptions:a};L(this,"setOptions",k);var h=k.plotOptions[this.type],m=f.plotOptions||{};this.userOptions=k.userOptions;f=P(h,e.series,f.plotOptions&&f.plotOptions[this.type],a);this.tooltipOptions=
P(b.tooltip,b.plotOptions.series&&b.plotOptions.series.tooltip,b.plotOptions[this.type].tooltip,d.tooltip.userOptions,e.series&&e.series.tooltip,e[this.type].tooltip,a.tooltip);this.stickyTracking=H(a.stickyTracking,m[this.type]&&m[this.type].stickyTracking,m.series&&m.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:f.stickyTracking);null===h.marker&&delete f.marker;this.zoneAxis=f.zoneAxis;e=this.zones=(f.zones||[]).slice();!f.negativeColor&&!f.negativeFillColor||f.zones||
(d={value:f[this.zoneAxis+"Threshold"]||f.threshold||0,className:"highcharts-negative"},c||(d.color=f.negativeColor,d.fillColor=f.negativeFillColor),e.push(d));e.length&&g(e[e.length-1].value)&&e.push(c?{}:{color:this.color,fillColor:this.fillColor});L(this,"afterSetOptions",{options:f});return f};e.prototype.getName=function(){return H(this.options.name,"Series "+(this.index+1))};e.prototype.getCyclic=function(a,c,b){var d=this.chart,e=this.userOptions,f=a+"Index",k=a+"Counter",h=b?b.length:H(d.options.chart[a+
"Count"],d[a+"Count"]);if(!c){var m=H(e[f],e["_"+f]);g(m)||(d.series.length||(d[k]=0),e["_"+f]=m=d[k]%h,d[k]+=1);b&&(c=b[m])}"undefined"!==typeof m&&(this[f]=m);this[a]=c};e.prototype.getColor=function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||b.plotOptions[this.type].color,this.chart.options.colors)};e.prototype.getPointsCollection=function(){return(this.hasGroupedData?this.points:this.data)||[]};e.prototype.getSymbol=
function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)};e.prototype.findPointIndex=function(a,c){var b=a.id,d=a.x,g=this.points,e=this.options.dataSorting,f,k;if(b)e=this.chart.get(b),e instanceof E&&(f=e);else if(this.linkedParent||this.enabledDataSorting||this.options.relativeXValue)if(f=function(c){return!c.touched&&c.index===a.index},e&&e.matchByName?f=function(c){return!c.touched&&c.name===a.name}:this.options.relativeXValue&&(f=function(c){return!c.touched&&
c.options.x===a.x}),f=u(g,f),!f)return;if(f){var h=f&&f.index;"undefined"!==typeof h&&(k=!0)}"undefined"===typeof h&&M(d)&&(h=this.xData.indexOf(d,c));-1!==h&&"undefined"!==typeof h&&this.cropped&&(h=h>=this.cropStart?h-this.cropStart:h);!k&&M(h)&&g[h]&&g[h].touched&&(h=void 0);return h};e.prototype.updateData=function(a,c){var b=this.options,d=b.dataSorting,e=this.points,f=[],k=this.requireSorting,h=a.length===e.length,m,n,p,l=!0;this.xIncrement=null;a.forEach(function(a,c){var n=g(a)&&this.pointClass.prototype.optionsToObject.call({series:this},
a)||{},l=n.x;if(n.id||M(l)){if(n=this.findPointIndex(n,p),-1===n||"undefined"===typeof n?f.push(a):e[n]&&a!==b.data[n]?(e[n].update(a,!1,null,!1),e[n].touched=!0,k&&(p=n+1)):e[n]&&(e[n].touched=!0),!h||c!==n||d&&d.enabled||this.hasDerivedData)m=!0}else f.push(a)},this);if(m)for(a=e.length;a--;)(n=e[a])&&!n.touched&&n.remove&&n.remove(!1,c);else!h||d&&d.enabled?l=!1:(a.forEach(function(a,c){a!==e[c].y&&e[c].update&&e[c].update(a,!1,null,!1)}),f.length=0);e.forEach(function(a){a&&(a.touched=!1)});if(!l)return!1;
f.forEach(function(a){this.addPoint(a,!1,null,null,!1)},this);null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=z(this.xData),this.autoIncrement());return!0};e.prototype.setData=function(a,c,b,d){var g=this,e=g.points,f=e&&e.length||0,k=g.options,h=g.chart,m=k.dataSorting,n=g.xAxis,p=k.turboThreshold,l=this.xData,r=this.yData,q=g.pointArrayMap;q=q&&q.length;var F=k.keys,u,t=0,z=1,w=null;if(!h.options.chart.allowMutatingData){k.data&&delete g.options.data;g.userOptions.data&&
delete g.userOptions.data;var x=P(!0,a)}a=x||a||[];x=a.length;c=H(c,!0);m&&m.enabled&&(a=this.sortData(a));h.options.chart.allowMutatingData&&!1!==d&&x&&f&&!g.cropped&&!g.hasGroupedData&&g.visible&&!g.isSeriesBoosting&&(u=this.updateData(a,b));if(!u){g.xIncrement=null;g.colorCounter=0;this.parallelArrays.forEach(function(a){g[a+"Data"].length=0});if(p&&x>p)if(w=g.getFirstValidPoint(a),M(w))for(b=0;b<x;b++)l[b]=this.autoIncrement(),r[b]=a[b];else if(R(w))if(q)if(w.length===q)for(b=0;b<x;b++)l[b]=this.autoIncrement(),
r[b]=a[b];else for(b=0;b<x;b++)d=a[b],l[b]=d[0],r[b]=d.slice(1,q+1);else if(F&&(t=F.indexOf("x"),z=F.indexOf("y"),t=0<=t?t:0,z=0<=z?z:1),1===w.length&&(z=0),t===z)for(b=0;b<x;b++)l[b]=this.autoIncrement(),r[b]=a[b][z];else for(b=0;b<x;b++)d=a[b],l[b]=d[t],r[b]=d[z];else D(12,!1,h);else for(b=0;b<x;b++)"undefined"!==typeof a[b]&&(d={series:g},g.pointClass.prototype.applyOptions.apply(d,[a[b]]),g.updateParallelArrays(d,b));r&&U(r[0])&&D(14,!0,h);g.data=[];g.options.data=g.userOptions.data=a;for(b=f;b--;)e[b]&&
e[b].destroy&&e[b].destroy();n&&(n.minRange=n.userMinRange);g.isDirty=h.isDirtyBox=!0;g.isDirtyData=!!e;b=!1}"point"===k.legendType&&(this.processData(),this.generatePoints());c&&h.redraw(b)};e.prototype.sortData=function(a){var c=this,b=c.options.dataSorting.sortKey||"y",d=function(a,c){return g(c)&&a.pointClass.prototype.optionsToObject.call({series:a},c)||{}};a.forEach(function(b,g){a[g]=d(c,b);a[g].index=g},this);a.concat().sort(function(a,c){a=S(b,a);c=S(b,c);return c<a?-1:c>a?1:0}).forEach(function(a,
c){a.x=c},this);c.linkedSeries&&c.linkedSeries.forEach(function(c){var b=c.options,g=b.data;b.dataSorting&&b.dataSorting.enabled||!g||(g.forEach(function(b,e){g[e]=d(c,b);a[e]&&(g[e].x=a[e].x,g[e].index=e)}),c.setData(g,!1))});return a};e.prototype.getProcessedData=function(a){var c=this.xAxis,b=this.options,d=b.cropThreshold,g=a||this.getExtremesFromAll||b.getExtremesFromAll,e=this.isCartesian;a=c&&c.val2lin;b=!(!c||!c.logarithmic);var f=0,k=this.xData,h=this.yData,m=this.requireSorting;var n=!1;
var p=k.length;if(c){n=c.getExtremes();var l=n.min;var r=n.max;n=!(!c.categories||c.names.length)}if(e&&this.sorted&&!g&&(!d||p>d||this.forceCrop))if(k[p-1]<l||k[0]>r)k=[],h=[];else if(this.yData&&(k[0]<l||k[p-1]>r)){var q=this.cropData(this.xData,this.yData,l,r);k=q.xData;h=q.yData;f=q.start;q=!0}for(d=k.length||1;--d;)if(c=b?a(k[d])-a(k[d-1]):k[d]-k[d-1],0<c&&("undefined"===typeof u||c<u))var u=c;else 0>c&&m&&!n&&(D(15,!1,this.chart),m=!1);return{xData:k,yData:h,cropped:q,cropStart:f,closestPointRange:u}};
e.prototype.processData=function(a){var c=this.xAxis;if(this.isCartesian&&!this.isDirty&&!c.isDirty&&!this.yAxis.isDirty&&!a)return!1;a=this.getProcessedData();this.cropped=a.cropped;this.cropStart=a.cropStart;this.processedXData=a.xData;this.processedYData=a.yData;this.closestPointRange=this.basePointRange=a.closestPointRange;L(this,"afterProcessData")};e.prototype.cropData=function(a,c,b,d,g){var e=a.length,f,k=0,h=e;g=H(g,this.cropShoulder);for(f=0;f<e;f++)if(a[f]>=b){k=Math.max(0,f-g);break}for(b=
f;b<e;b++)if(a[b]>d){h=b+g;break}return{xData:a.slice(k,h),yData:c.slice(k,h),start:k,end:h}};e.prototype.generatePoints=function(){var a=this.options,c=this.processedData||a.data,b=this.processedXData,d=this.processedYData,g=this.pointClass,e=b.length,f=this.cropStart||0,k=this.hasGroupedData,h=a.keys,m=[];a=a.dataGrouping&&a.dataGrouping.groupAll?f:0;var n,p,l=this.data;if(!l&&!k){var r=[];r.length=c.length;l=this.data=r}h&&k&&(this.options.keys=!1);for(p=0;p<e;p++){r=f+p;if(k){var q=(new g).init(this,
[b[p]].concat(da(d[p])));q.dataGroup=this.groupMap[a+p];q.dataGroup.options&&(q.options=q.dataGroup.options,A(q,q.dataGroup.options),delete q.dataLabels)}else(q=l[r])||"undefined"===typeof c[r]||(l[r]=q=(new g).init(this,c[r],b[p]));q&&(q.index=k?a+p:r,m[p]=q)}this.options.keys=h;if(l&&(e!==(n=l.length)||k))for(p=0;p<n;p++)p!==f||k||(p+=e),l[p]&&(l[p].destroyElements(),l[p].plotX=void 0);this.data=l;this.points=m;L(this,"afterGeneratePoints")};e.prototype.getXExtremes=function(a){return{min:x(a),
max:z(a)}};e.prototype.getExtremes=function(a,c){var b=this.xAxis,d=this.yAxis,g=this.processedXData||this.xData,e=[],f=this.requireSorting?this.cropShoulder:0;d=d?d.positiveValuesOnly:!1;var k,h=0,m=0,n=0;a=a||this.stackedYData||this.processedYData||[];var p=a.length;if(b){var l=b.getExtremes();h=l.min;m=l.max}for(k=0;k<p;k++){var q=g[k];l=a[k];var r=(M(l)||R(l))&&(l.length||0<l||!d);q=c||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!b||(g[k+f]||q)>=h&&(g[k-f]||q)<=m;if(r&&
q)if(r=l.length)for(;r--;)M(l[r])&&(e[n++]=l[r]);else e[n++]=l}a={activeYData:e,dataMin:x(e),dataMax:z(e)};L(this,"afterGetExtremes",{dataExtremes:a});return a};e.prototype.applyExtremes=function(){var a=this.getExtremes();this.dataMin=a.dataMin;this.dataMax=a.dataMax;return a};e.prototype.getFirstValidPoint=function(a){for(var c=a.length,b=0,d=null;null===d&&b<c;)d=a[b],b++;return d};e.prototype.translate=function(){this.processedXData||this.processData();this.generatePoints();var c=this.options,
b=c.stacking,d=this.xAxis,e=d.categories,f=this.enabledDataSorting,k=this.yAxis,h=this.points,n=h.length,p=this.pointPlacementToXValue(),l=!!p,q=c.threshold,r=c.startFromThreshold?q:0,u=this.zoneAxis||"y",t,z,w=Number.MAX_VALUE;for(t=0;t<n;t++){var x=h[t],A=x.x,y=void 0,D=void 0,v=x.y,J=x.low,B=b&&k.stacking&&k.stacking.stacks[(this.negStacks&&v<(r?0:q)?"-":"")+this.stackKey];if(k.positiveValuesOnly&&!k.validatePositiveValue(v)||d.positiveValuesOnly&&!d.validatePositiveValue(A))x.isNull=!0;x.plotX=
z=a(m(d.translate(A,0,0,0,1,p,"flags"===this.type),-1E5,1E5));if(b&&this.visible&&B&&B[A]){var C=this.getStackIndicator(C,A,this.index);x.isNull||(y=B[A],D=y.points[C.key])}R(D)&&(J=D[0],v=D[1],J===r&&C.key===B[A].base&&(J=H(M(q)&&q,k.min)),k.positiveValuesOnly&&0>=J&&(J=null),x.total=x.stackTotal=y.total,x.percentage=y.total&&x.y/y.total*100,x.stackY=v,this.irregularWidths||y.setOffset(this.pointXOffset||0,this.barW||0));x.yBottom=g(J)?m(k.translate(J,0,1,0,1),-1E5,1E5):null;this.dataModify&&(v=
this.dataModify.modifyValue(v,t));x.plotY=void 0;M(v)&&(y=k.translate(v,!1,!0,!1,!0),"undefined"!==typeof y&&(x.plotY=m(y,-1E5,1E5)));x.isInside=this.isPointInside(x);x.clientX=l?a(d.translate(A,0,0,0,1,p)):z;x.negative=x[u]<(c[u+"Threshold"]||q||0);x.category=H(e&&e[x.x],x.x);if(!x.isNull&&!1!==x.visible){"undefined"!==typeof G&&(w=Math.min(w,Math.abs(z-G)));var G=z}x.zone=this.zones.length?x.getZone():void 0;!x.graphic&&this.group&&f&&(x.isNew=!0)}this.closestPointRangePx=w;L(this,"afterTranslate")};
e.prototype.getValidPoints=function(a,c,b){var d=this.chart;return(a||this.points||[]).filter(function(a){return c&&!d.isInsidePlot(a.plotX,a.plotY,{inverted:d.inverted})?!1:!1!==a.visible&&(b||!a.isNull)})};e.prototype.getClipBox=function(){var a=this.chart,c=this.xAxis,b=this.yAxis,d=P(a.clipBox);c&&c.len!==a.plotSizeX&&(d.width=c.len);b&&b.len!==a.plotSizeY&&(d.height=b.len);return d};e.prototype.getSharedClipKey=function(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||
0)};e.prototype.setClip=function(){var a=this.chart,c=this.group,b=this.markerGroup,d=a.sharedClips;a=a.renderer;var g=this.getClipBox(),e=this.getSharedClipKey(),f=d[e];f?f.animate(g):d[e]=f=a.clipRect(g);c&&c.clip(!1===this.options.clip?void 0:f);b&&b.clip()};e.prototype.animate=function(a){var c=this.chart,b=this.group,d=this.markerGroup,g=c.inverted,e=h(this.options.animation),f=[this.getSharedClipKey(),e.duration,e.easing,e.defer].join(),k=c.sharedClips[f],m=c.sharedClips[f+"m"];if(a&&b)e=this.getClipBox(),
k?k.attr("height",e.height):(e.width=0,g&&(e.x=c.plotHeight),k=c.renderer.clipRect(e),c.sharedClips[f]=k,m=c.renderer.clipRect({x:g?(c.plotSizeX||0)+99:-99,y:g?-c.plotLeft:-c.plotTop,width:99,height:g?c.chartWidth:c.chartHeight}),c.sharedClips[f+"m"]=m),b.clip(k),d&&d.clip(m);else if(k&&!k.hasClass("highcharts-animating")){c=this.getClipBox();var n=e.step;d&&d.element.childNodes.length&&(e.step=function(a,c){n&&n.apply(c,arguments);m&&m.element&&m.attr(c.prop,"width"===c.prop?a+99:a)});k.addClass("highcharts-animating").animate(c,
e)}};e.prototype.afterAnimate=function(){var a=this;this.setClip();I(this.chart.sharedClips,function(c,b,d){c&&!a.chart.container.querySelector('[clip-path="url(#'.concat(c.id,')"]'))&&(c.destroy(),delete d[b])});this.finishedAnimating=!0;L(this,"afterAnimate")};e.prototype.drawPoints=function(){var a=this.points,c=this.chart,b=this.options.marker,d=this[this.specialGroup]||this.markerGroup,g=this.xAxis,e=H(b.enabled,!g||g.isRadial?!0:null,this.closestPointRangePx>=b.enabledThreshold*b.radius),f,
k;if(!1!==b.enabled||this._hasPointMarkers)for(f=0;f<a.length;f++){var h=a[f];var m=(k=h.graphic)?"animate":"attr";var n=h.marker||{};var p=!!h.marker;if((e&&"undefined"===typeof n.enabled||n.enabled)&&!h.isNull&&!1!==h.visible){var l=H(n.symbol,this.symbol,"rect");var q=this.markerAttribs(h,h.selected&&"select");this.enabledDataSorting&&(h.startXPos=g.reversed?-(q.width||0):g.width);var r=!1!==h.isInside;k?k[r?"show":"hide"](r).animate(q):r&&(0<(q.width||0)||h.hasImage)&&(h.graphic=k=c.renderer.symbol(l,
q.x,q.y,q.width,q.height,p?n:b).add(d),this.enabledDataSorting&&c.hasRendered&&(k.attr({x:h.startXPos}),m="animate"));k&&"animate"===m&&k[r?"show":"hide"](r).animate(q);if(k&&!c.styledMode)k[m](this.pointAttribs(h,h.selected&&"select"));k&&k.addClass(h.getClassName(),!0)}else k&&(h.graphic=k.destroy())}};e.prototype.markerAttribs=function(a,c){var b=this.options,d=b.marker,g=a.marker||{},e=g.symbol||d.symbol,f=H(g.radius,d&&d.radius);c&&(d=d.states[c],c=g.states&&g.states[c],f=H(c&&c.radius,d&&d.radius,
f&&f+(d&&d.radiusPlus||0)));a.hasImage=e&&0===e.indexOf("url");a.hasImage&&(f=0);a=M(f)?{x:b.crisp?Math.floor(a.plotX-f):a.plotX-f,y:a.plotY-f}:{};f&&(a.width=a.height=2*f);return a};e.prototype.pointAttribs=function(a,c){var b=this.options.marker,d=a&&a.options,g=d&&d.marker||{},e=d&&d.color,f=a&&a.color,k=a&&a.zone&&a.zone.color,h=this.color;a=H(g.lineWidth,b.lineWidth);d=1;h=e||k||f||h;e=g.fillColor||b.fillColor||h;f=g.lineColor||b.lineColor||h;c=c||"normal";b=b.states[c]||{};c=g.states&&g.states[c]||
{};a=H(c.lineWidth,b.lineWidth,a+H(c.lineWidthPlus,b.lineWidthPlus,0));e=c.fillColor||b.fillColor||e;f=c.lineColor||b.lineColor||f;d=H(c.opacity,b.opacity,d);return{stroke:f,"stroke-width":a,fill:e,opacity:d}};e.prototype.destroy=function(a){var b=this,d=b.chart,g=/AppleWebKit\/533/.test(n.navigator.userAgent),e=b.data||[],f,k,h,m;L(b,"destroy",{keepEventsForUpdate:a});this.removeEvents(a);(b.axisTypes||[]).forEach(function(a){(m=b[a])&&m.series&&(c(m.series,b),m.isDirty=m.forceRedraw=!0)});b.legendItem&&
b.chart.legend.destroyItem(b);for(k=e.length;k--;)(h=e[k])&&h.destroy&&h.destroy();b.clips&&b.clips.forEach(function(a){return a.destroy()});t.clearTimeout(b.animationTimeout);I(b,function(a,c){a instanceof y&&!a.survive&&(f=g&&"group"===c?"hide":"destroy",a[f]())});d.hoverSeries===b&&(d.hoverSeries=void 0);c(d.series,b);d.orderSeries();I(b,function(c,d){a&&"hcEvents"===d||delete b[d]})};e.prototype.applyZones=function(){var a=this,c=this.chart,b=c.renderer,d=this.zones,g=this.clips||[],e=this.graph,
f=this.area,k=Math.max(c.chartWidth,c.chartHeight),h=this[(this.zoneAxis||"y")+"Axis"],n=c.inverted,p,l,q,r,u,t,z,x,w=!1;if(d.length&&(e||f)&&h&&"undefined"!==typeof h.min){var A=h.reversed;var y=h.horiz;e&&!this.showLine&&e.hide();f&&f.hide();var D=h.getExtremes();d.forEach(function(d,F){p=A?y?c.plotWidth:0:y?0:h.toPixels(D.min)||0;p=m(H(l,p),0,k);l=m(Math.round(h.toPixels(H(d.value,D.max),!0)||0),0,k);w&&(p=l=h.toPixels(D.max));r=Math.abs(p-l);u=Math.min(p,l);t=Math.max(p,l);h.isXAxis?(q={x:n?t:
u,y:0,width:r,height:k},y||(q.x=c.plotHeight-q.x)):(q={x:0,y:n?t:u,width:k,height:r},y&&(q.y=c.plotWidth-q.y));n&&b.isVML&&(q=h.isXAxis?{x:0,y:A?u:t,height:q.width,width:c.chartWidth}:{x:q.y-c.plotLeft-c.spacingBox.x,y:0,width:q.height,height:c.chartHeight});g[F]?g[F].animate(q):g[F]=b.clipRect(q);z=a["zone-area-"+F];x=a["zone-graph-"+F];e&&x&&x.clip(g[F]);f&&z&&z.clip(g[F]);w=d.value>D.max;a.resetZones&&0===l&&(l=void 0)});this.clips=g}else a.visible&&(e&&e.show(),f&&f.show())};e.prototype.invertGroups=
function(a){function c(){["group","markerGroup"].forEach(function(c){b[c]&&(d.renderer.isVML&&b[c].attr({width:b.yAxis.len,height:b.xAxis.len}),b[c].width=b.yAxis.len,b[c].height=b.xAxis.len,b[c].invert(b.isRadialSeries?!1:a))})}var b=this,d=b.chart;b.xAxis&&(b.eventsToUnbind.push(w(d,"resize",c)),c(),b.invertGroups=c)};e.prototype.plotGroup=function(a,c,b,d,e){var f=this[a],k=!f;b={visibility:b,zIndex:d||.1};"undefined"===typeof this.opacity||this.chart.styledMode||"inactive"===this.state||(b.opacity=
this.opacity);k&&(this[a]=f=this.chart.renderer.g().add(e));f.addClass("highcharts-"+c+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(g(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(f.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0);f.attr(b)[k?"attr":"animate"](this.getPlotBox());return f};e.prototype.getPlotBox=function(){var a=this.chart,c=this.xAxis,b=this.yAxis;a.inverted&&(c=b,b=this.xAxis);return{translateX:c?c.left:
a.plotLeft,translateY:b?b.top:a.plotTop,scaleX:1,scaleY:1}};e.prototype.removeEvents=function(a){a||K(this);this.eventsToUnbind.length&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind.length=0)};e.prototype.render=function(){var a=this,c=a.chart,b=a.options,d=h(b.animation),g=a.visible?"inherit":"hidden",e=b.zIndex,f=a.hasRendered,k=c.seriesGroup,m=c.inverted;c=!a.finishedAnimating&&c.renderer.isSVG?d.duration:0;L(this,"render");var n=a.plotGroup("group","series",g,e,k);a.markerGroup=
a.plotGroup("markerGroup","markers",g,e,k);!1!==b.clip&&a.setClip();a.animate&&c&&a.animate(!0);n.inverted=H(a.invertible,a.isCartesian)?m:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.visible&&a.drawPoints();a.drawDataLabels&&a.drawDataLabels();a.redrawPoints&&a.redrawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(m);a.animate&&c&&a.animate();f||(c&&d.defer&&(c+=d.defer),a.animationTimeout=O(function(){a.afterAnimate()},c||0));a.isDirty=!1;a.hasRendered=
!0;L(a,"afterRender")};e.prototype.redraw=function(){var a=this.chart,c=this.isDirty||this.isDirtyData,b=this.group,d=this.xAxis,g=this.yAxis;b&&(a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight}),b.animate({translateX:H(d&&d.left,a.plotLeft),translateY:H(g&&g.top,a.plotTop)}));this.translate();this.render();c&&delete this.kdTree};e.prototype.searchPoint=function(a,c){var b=this.xAxis,d=this.yAxis,g=this.chart.inverted;return this.searchKDTree({clientX:g?b.len-a.chartY+b.pos:a.chartX-b.pos,
plotY:g?d.len-a.chartX+d.pos:a.chartY-d.pos},c,a)};e.prototype.buildKDTree=function(a){function c(a,d,g){var e=a&&a.length;if(e){var f=b.kdAxisArray[d%g];a.sort(function(a,c){return a[f]-c[f]});e=Math.floor(e/2);return{point:a[e],left:c(a.slice(0,e),d+1,g),right:c(a.slice(e+1),d+1,g)}}}this.buildingKdTree=!0;var b=this,d=-1<b.options.findNearestPointBy.indexOf("y")?2:1;delete b.kdTree;O(function(){b.kdTree=c(b.getValidPoints(null,!b.directTouch),d,d);b.buildingKdTree=!1},b.options.kdNow||a&&"touchstart"===
a.type?0:1)};e.prototype.searchKDTree=function(a,c,b){function d(a,c,b,m){var n=c.point,p=e.kdAxisArray[b%m],l=n,q=g(a[f])&&g(n[f])?Math.pow(a[f]-n[f],2):null;var r=g(a[k])&&g(n[k])?Math.pow(a[k]-n[k],2):null;r=(q||0)+(r||0);n.dist=g(r)?Math.sqrt(r):Number.MAX_VALUE;n.distX=g(q)?Math.sqrt(q):Number.MAX_VALUE;p=a[p]-n[p];r=0>p?"left":"right";q=0>p?"right":"left";c[r]&&(r=d(a,c[r],b+1,m),l=r[h]<l[h]?r:n);c[q]&&Math.sqrt(p*p)<l[h]&&(a=d(a,c[q],b+1,m),l=a[h]<l[h]?a:l);return l}var e=this,f=this.kdAxisArray[0],
k=this.kdAxisArray[1],h=c?"distX":"dist";c=-1<e.options.findNearestPointBy.indexOf("y")?2:1;this.kdTree||this.buildingKdTree||this.buildKDTree(b);if(this.kdTree)return d(a,this.kdTree,c,c)};e.prototype.pointPlacementToXValue=function(){var a=this.options,c=a.pointRange,b=this.xAxis;a=a.pointPlacement;"between"===a&&(a=b.reversed?-.5:.5);return M(a)?a*(c||b.pointRange):0};e.prototype.isPointInside=function(a){var c=this.chart,b=this.xAxis,d=this.yAxis;return"undefined"!==typeof a.plotY&&"undefined"!==
typeof a.plotX&&0<=a.plotY&&a.plotY<=(d?d.len:c.plotHeight)&&0<=a.plotX&&a.plotX<=(b?b.len:c.plotWidth)};e.prototype.drawTracker=function(){var a=this,c=a.options,b=c.trackByArea,d=[].concat(b?a.areaPath:a.graphPath),g=a.chart,e=g.pointer,f=g.renderer,k=g.options.tooltip.snap,h=a.tracker,m=function(c){if(g.hoverSeries!==a)a.onMouseOver()},n="rgba(192,192,192,"+(r?.0001:.002)+")";h?h.attr({d:d}):a.graph&&(a.tracker=f.path(d).attr({visibility:a.visible?"inherit":"hidden",zIndex:2}).addClass(b?"highcharts-tracker-area":
"highcharts-tracker-line").add(a.group),g.styledMode||a.tracker.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:n,fill:b?n:"none","stroke-width":a.graph.strokeWidth()+(b?0:2*k)}),[a.tracker,a.markerGroup,a.dataLabelsGroup].forEach(function(a){if(a&&(a.addClass("highcharts-tracker").on("mouseover",m).on("mouseout",function(a){e.onTrackerMouseOut(a)}),c.cursor&&!g.styledMode&&a.css({cursor:c.cursor}),q))a.on("touchstart",m)}));L(this,"afterDrawTracker")};e.prototype.addPoint=function(a,
c,b,d,g){var e=this.options,f=this.data,k=this.chart,h=this.xAxis;h=h&&h.hasNames&&h.names;var m=e.data,n=this.xData,p;c=H(c,!0);var l={series:this};this.pointClass.prototype.applyOptions.apply(l,[a]);var q=l.x;var r=n.length;if(this.requireSorting&&q<n[r-1])for(p=!0;r&&n[r-1]>q;)r--;this.updateParallelArrays(l,"splice",r,0,0);this.updateParallelArrays(l,r);h&&l.name&&(h[q]=l.name);m.splice(r,0,a);if(p||this.processedData)this.data.splice(r,0,null),this.processData();"point"===e.legendType&&this.generatePoints();
b&&(f[0]&&f[0].remove?f[0].remove(!1):(f.shift(),this.updateParallelArrays(l,"shift"),m.shift()));!1!==g&&L(this,"addPoint",{point:l});this.isDirtyData=this.isDirty=!0;c&&k.redraw(d)};e.prototype.removePoint=function(a,c,b){var g=this,e=g.data,f=e[a],k=g.points,h=g.chart,m=function(){k&&k.length===e.length&&k.splice(a,1);e.splice(a,1);g.options.data.splice(a,1);g.updateParallelArrays(f||{series:g},"splice",a,1);f&&f.destroy();g.isDirty=!0;g.isDirtyData=!0;c&&h.redraw()};d(b,h);c=H(c,!0);f?f.firePointEvent("remove",
null,m):m()};e.prototype.remove=function(a,c,b,d){function g(){e.destroy(d);f.isDirtyLegend=f.isDirtyBox=!0;f.linkSeries();H(a,!0)&&f.redraw(c)}var e=this,f=e.chart;!1!==b?L(e,"remove",null,g):g()};e.prototype.update=function(a,c){a=k(a,this.userOptions);L(this,"update",{options:a});var b=this,d=b.chart,g=b.userOptions,e=b.initialType||b.type,f=d.options.plotOptions,h=J[e].prototype,m=b.finishedAnimating&&{animation:!1},n={},p,l=["eventOptions","navigatorSeries","baseSeries"],q=a.type||g.type||d.options.chart.type,
r=!(this.hasDerivedData||q&&q!==this.type||"undefined"!==typeof a.pointStart||"undefined"!==typeof a.pointInterval||"undefined"!==typeof a.relativeXValue||a.joinBy||a.mapData||b.hasOptionChanged("dataGrouping")||b.hasOptionChanged("pointStart")||b.hasOptionChanged("pointInterval")||b.hasOptionChanged("pointIntervalUnit")||b.hasOptionChanged("keys"));q=q||e;r&&(l.push("data","isDirtyData","points","processedData","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","_hasPointLabels",
"clips","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX"),!1!==a.visible&&l.push("area","graph"),b.parallelArrays.forEach(function(a){l.push(a+"Data")}),a.data&&(a.dataSorting&&A(b.options.dataSorting,a.dataSorting),this.setData(a.data,!1)));a=P(g,m,{index:"undefined"===typeof g.index?b.index:g.index,pointStart:H(f&&f.series&&f.series.pointStart,g.pointStart,b.xData[0])},!r&&{data:b.options.data},a);r&&a.data&&(a.data=b.options.data);l=["group","markerGroup","dataLabelsGroup",
"transformGroup"].concat(l);l.forEach(function(a){l[a]=b[a];delete b[a]});f=!1;if(J[q]){if(f=q!==b.type,b.remove(!1,!1,!1,!0),f)if(Object.setPrototypeOf)Object.setPrototypeOf(b,J[q].prototype);else{m=Object.hasOwnProperty.call(b,"hcEvents")&&b.hcEvents;for(p in h)b[p]=void 0;A(b,J[q].prototype);m?b.hcEvents=m:delete b.hcEvents}}else D(17,!0,d,{missingModuleFor:q});l.forEach(function(a){b[a]=l[a]});b.init(d,a);if(r&&this.points){var u=b.options;!1===u.visible?(n.graphic=1,n.dataLabel=1):b._hasPointLabels||
(a=u.marker,h=u.dataLabels,!a||!1!==a.enabled&&(g.marker&&g.marker.symbol)===a.symbol||(n.graphic=1),h&&!1===h.enabled&&(n.dataLabel=1));this.points.forEach(function(a){a&&a.series&&(a.resolveColor(),Object.keys(n).length&&a.destroyElements(n),!1===u.showInLegend&&a.legendItem&&d.legend.destroyItem(a))},this)}b.initialType=e;d.linkSeries();f&&b.linkedSeries.length&&(b.isDirtyData=!0);L(this,"afterUpdate");H(c,!0)&&d.redraw(r?void 0:!1)};e.prototype.setName=function(a){this.name=this.options.name=
this.userOptions.name=a;this.chart.isDirtyLegend=!0};e.prototype.hasOptionChanged=function(a){var c=this.options[a],b=this.chart.options.plotOptions,d=this.userOptions[a];return d?c!==d:c!==H(b&&b[this.type]&&b[this.type][a],b&&b.series&&b.series[a],c)};e.prototype.onMouseOver=function(){var a=this.chart,c=a.hoverSeries;a.pointer.setHoverChartIndex();if(c&&c!==this)c.onMouseOut();this.options.events.mouseOver&&L(this,"mouseOver");this.setState("hover");a.hoverSeries=this};e.prototype.onMouseOut=function(){var a=
this.options,c=this.chart,b=c.tooltip,d=c.hoverPoint;c.hoverSeries=null;if(d)d.onMouseOut();this&&a.events.mouseOut&&L(this,"mouseOut");!b||this.stickyTracking||b.shared&&!this.noSharedTooltip||b.hide();c.series.forEach(function(a){a.setState("",!0)})};e.prototype.setState=function(a,c){var b=this,d=b.options,g=b.graph,e=d.inactiveOtherPoints,f=d.states,k=H(f[a||"normal"]&&f[a||"normal"].animation,b.chart.options.chart.animation),h=d.lineWidth,m=0,n=d.opacity;a=a||"";if(b.state!==a&&([b.group,b.markerGroup,
b.dataLabelsGroup].forEach(function(c){c&&(b.state&&c.removeClass("highcharts-series-"+b.state),a&&c.addClass("highcharts-series-"+a))}),b.state=a,!b.chart.styledMode)){if(f[a]&&!1===f[a].enabled)return;a&&(h=f[a].lineWidth||h+(f[a].lineWidthPlus||0),n=H(f[a].opacity,n));if(g&&!g.dashstyle)for(d={"stroke-width":h},g.animate(d,k);b["zone-graph-"+m];)b["zone-graph-"+m].animate(d,k),m+=1;e||[b.group,b.markerGroup,b.dataLabelsGroup,b.labelBySeries].forEach(function(a){a&&a.animate({opacity:n},k)})}c&&
e&&b.points&&b.setAllPointsToState(a||void 0)};e.prototype.setAllPointsToState=function(a){this.points.forEach(function(c){c.setState&&c.setState(a)})};e.prototype.setVisible=function(a,c){var b=this,d=b.chart,g=b.legendItem,e=d.options.chart.ignoreHiddenSeries,f=b.visible,k=(b.visible=a=b.options.visible=b.userOptions.visible="undefined"===typeof a?!f:a)?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(function(a){if(b[a])b[a][k]()});if(d.hoverSeries===b||(d.hoverPoint&&
d.hoverPoint.series)===b)b.onMouseOut();g&&d.legend.colorizeItem(b,a);b.isDirty=!0;b.options.stacking&&d.series.forEach(function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});b.linkedSeries.forEach(function(c){c.setVisible(a,!1)});e&&(d.isDirtyBox=!0);L(b,k);!1!==c&&d.redraw()};e.prototype.show=function(){this.setVisible(!0)};e.prototype.hide=function(){this.setVisible(!1)};e.prototype.select=function(a){this.selected=a=this.options.selected="undefined"===typeof a?!this.selected:a;this.checkbox&&
(this.checkbox.checked=a);L(this,a?"select":"unselect")};e.prototype.shouldShowTooltip=function(a,c,b){void 0===b&&(b={});b.series=this;b.visiblePlotOnly=!0;return this.chart.isInsidePlot(a,c,b)};e.defaultOptions=G;return e}();A(f.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,drawLegendSymbol:v.drawLineMarker,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:E,requireSorting:!0,sorted:!0});B.series=f;"";"";return f});
K(l,"Extensions/ScrollablePlotArea.js",[l["Core/Animation/AnimationUtilities.js"],l["Core/Axis/Axis.js"],l["Core/Chart/Chart.js"],l["Core/Series/Series.js"],l["Core/Renderer/RendererRegistry.js"],l["Core/Utilities.js"]],function(f,e,l,C,v,E){var G=f.stop,B=E.addEvent,y=E.createElement,t=E.defined,h=E.merge,d=E.pick;B(l,"afterSetChartSize",function(b){var d=this.options.chart.scrollablePlotArea,f=d&&d.minWidth;d=d&&d.minHeight;if(!this.renderer.forExport){if(f){if(this.scrollablePixelsX=f=Math.max(0,
f-this.chartWidth)){this.scrollablePlotBox=this.renderer.scrollablePlotBox=h(this.plotBox);this.plotBox.width=this.plotWidth+=f;this.inverted?this.clipBox.height+=f:this.clipBox.width+=f;var l={1:{name:"right",value:f}}}}else d&&(this.scrollablePixelsY=f=Math.max(0,d-this.chartHeight),t(f)&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=h(this.plotBox),this.plotBox.height=this.plotHeight+=f,this.inverted?this.clipBox.width+=f:this.clipBox.height+=f,l={2:{name:"bottom",value:f}}));l&&!b.skipAxes&&
this.axes.forEach(function(b){l[b.side]?b.getPlotLinePath=function(){var d=l[b.side].name,f=this[d];this[d]=f-l[b.side].value;var h=e.prototype.getPlotLinePath.apply(this,arguments);this[d]=f;return h}:(b.setAxisSize(),b.setAxisTranslation())})}});B(l,"render",function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()});l.prototype.setUpScrolling=function(){var b=this,d={WebkitOverflowScrolling:"touch",
overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(d.overflowX="auto");this.scrollablePixelsY&&(d.overflowY="auto");this.scrollingParent=y("div",{className:"highcharts-scrolling-parent"},{position:"relative"},this.renderTo);this.scrollingContainer=y("div",{className:"highcharts-scrolling"},d,this.scrollingParent);B(this.scrollingContainer,"scroll",function(){b.pointer&&delete b.pointer.chartPosition});this.innerContainer=y("div",{className:"highcharts-inner-container"},null,this.scrollingContainer);
this.innerContainer.appendChild(this.container);this.setUpScrolling=null};l.prototype.moveFixedElements=function(){var b=this.container,d=this.fixedRenderer,e=".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "),f;this.scrollablePixelsX&&
!this.inverted?f=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted?f=".highcharts-xaxis":this.scrollablePixelsY&&!this.inverted?f=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(f=".highcharts-yaxis");f&&e.push(""+f+":not(.highcharts-radial-axis)",""+f+"-labels:not(.highcharts-radial-axis-labels)");e.forEach(function(e){[].forEach.call(b.querySelectorAll(e),function(b){(b.namespaceURI===d.SVG_NS?d.box:d.box.parentNode).appendChild(b);b.style.pointerEvents="auto"})})};l.prototype.applyFixed=
function(){var b=!this.fixedDiv,e=this.options.chart,f=e.scrollablePlotArea,h=v.getRendererType();b?(this.fixedDiv=y("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(e.style&&e.style.zIndex||0)+2,top:0},null,!0),this.scrollingContainer&&this.scrollingContainer.parentNode.insertBefore(this.fixedDiv,this.scrollingContainer),this.renderTo.style.overflow="visible",this.fixedRenderer=e=new h(this.fixedDiv,this.chartWidth,this.chartHeight,this.options.chart.style),
this.scrollableMask=e.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":d(f.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),B(this,"afterShowResetZoom",this.moveFixedElements),B(this,"afterApplyDrilldown",this.moveFixedElements),B(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight);if(this.scrollableDirty||b)this.scrollableDirty=!1,this.moveFixedElements();e=this.chartWidth+(this.scrollablePixelsX||
0);h=this.chartHeight+(this.scrollablePixelsY||0);G(this.container);this.container.style.width=e+"px";this.container.style.height=h+"px";this.renderer.boxWrapper.attr({width:e,height:h,viewBox:[0,0,e,h].join(" ")});this.chartBackground.attr({width:e,height:h});this.scrollingContainer.style.height=this.chartHeight+"px";b&&(f.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*f.scrollPositionX),f.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*f.scrollPositionY));
h=this.axisOffset;b=this.plotTop-h[0]-1;f=this.plotLeft-h[3]-1;e=this.plotTop+this.plotHeight+h[2]+1;h=this.plotLeft+this.plotWidth+h[1]+1;var n=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),l=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);b=this.scrollablePixelsX?[["M",0,b],["L",this.plotLeft-1,b],["L",this.plotLeft-1,e],["L",0,e],["Z"],["M",n,b],["L",this.chartWidth,b],["L",this.chartWidth,e],["L",n,e],["Z"]]:this.scrollablePixelsY?[["M",f,0],["L",f,this.plotTop-1],["L",h,this.plotTop-
1],["L",h,0],["Z"],["M",f,l],["L",f,this.chartHeight],["L",h,this.chartHeight],["L",h,l],["Z"]]:[["M",0,0]];"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:b})};B(e,"afterInit",function(){this.chart.scrollableDirty=!0});B(C,"show",function(){this.chart.scrollableDirty=!0});""});K(l,"Core/Axis/StackingAxis.js",[l["Core/Animation/AnimationUtilities.js"],l["Core/Axis/Axis.js"],l["Core/Utilities.js"]],function(f,e,l){var C=f.getDeferredAnimation,v=l.addEvent,E=l.destroyObjectProperties,
G=l.fireEvent,B=l.isNumber,y=l.objectEach,t;(function(e){function d(){var b=this.stacking;if(b){var d=b.stacks;y(d,function(b,e){E(b);d[e]=null});b&&b.stackTotalGroup&&b.stackTotalGroup.destroy()}}function b(){this.stacking||(this.stacking=new h(this))}var f=[];e.compose=function(e){-1===f.indexOf(e)&&(f.push(e),v(e,"init",b),v(e,"destroy",d));return e};var h=function(){function b(b){this.oldStacks={};this.stacks={};this.stacksTouched=0;this.axis=b}b.prototype.buildStacks=function(){var b=this.axis,
d=b.series,e=b.options.reversedStacks,f=d.length,h;if(!b.isXAxis){this.usePercentage=!1;for(h=f;h--;){var m=d[e?h:f-h-1];m.setStackedPoints();m.setGroupedPoints()}for(h=0;h<f;h++)d[h].modifyStacks();G(b,"afterBuildStacks")}};b.prototype.cleanStacks=function(){if(!this.axis.isXAxis){if(this.oldStacks)var b=this.stacks=this.oldStacks;y(b,function(b){y(b,function(b){b.cumulative=b.total})})}};b.prototype.resetStacks=function(){var b=this,d=b.stacks;b.axis.isXAxis||y(d,function(d){y(d,function(e,f){B(e.touched)&&
e.touched<b.stacksTouched?(e.destroy(),delete d[f]):(e.total=null,e.cumulative=null)})})};b.prototype.renderStackTotals=function(){var b=this.axis,d=b.chart,e=d.renderer,f=this.stacks;b=C(d,b.options.stackLabels&&b.options.stackLabels.animation||!1);var h=this.stackTotalGroup=this.stackTotalGroup||e.g("stack-labels").attr({zIndex:6,opacity:0}).add();h.translate(d.plotLeft,d.plotTop);y(f,function(b){y(b,function(b){b.render(h)})});h.animate({opacity:1},b)};return b}();e.Additions=h})(t||(t={}));return t});
K(l,"Extensions/Stacking.js",[l["Core/Axis/Axis.js"],l["Core/Chart/Chart.js"],l["Core/FormatUtilities.js"],l["Core/Globals.js"],l["Core/Series/Series.js"],l["Core/Axis/StackingAxis.js"],l["Core/Utilities.js"]],function(f,e,l,C,v,E,G){var B=l.format,y=G.correctFloat,t=G.defined,h=G.destroyObjectProperties,d=G.isArray,b=G.isNumber,p=G.objectEach,q=G.pick,r=function(){function d(b,d,e,f,h){var k=b.chart.inverted;this.axis=b;this.isNegative=e;this.options=d=d||{};this.x=f;this.total=null;this.points=
{};this.hasValidPoints=!1;this.stack=h;this.rightCliff=this.leftCliff=0;this.alignOptions={align:d.align||(k?e?"left":"right":"center"),verticalAlign:d.verticalAlign||(k?"middle":e?"bottom":"top"),y:d.y,x:d.x};this.textAlign=d.textAlign||(k?e?"right":"left":"center")}d.prototype.destroy=function(){h(this,this.axis)};d.prototype.render=function(b){var d=this.axis.chart,e=this.options,f=e.format;f=f?B(f,this,d):e.formatter.call(this);this.label?this.label.attr({text:f,visibility:"hidden"}):(this.label=
d.renderer.label(f,null,null,e.shape,null,null,e.useHTML,!1,"stack-labels"),f={r:e.borderRadius||0,text:f,rotation:e.rotation,padding:q(e.padding,5),visibility:"hidden"},d.styledMode||(f.fill=e.backgroundColor,f.stroke=e.borderColor,f["stroke-width"]=e.borderWidth,this.label.css(e.style)),this.label.attr(f),this.label.added||this.label.add(b));this.label.labelrank=d.plotSizeY};d.prototype.setOffset=function(d,e,f,h,m){var k=this.axis,a=k.chart;h=k.translate(k.stacking.usePercentage?100:h?h:this.total,
0,0,0,1);f=k.translate(f?f:0);f=t(h)&&Math.abs(h-f);d=q(m,a.xAxis[0].translate(this.x))+d;k=t(h)&&this.getStackBox(a,this,d,h,e,f,k);e=this.label;f=this.isNegative;d="justify"===q(this.options.overflow,"justify");var g=this.textAlign;e&&k&&(m=e.getBBox(),h=e.padding,g="left"===g?a.inverted?-h:h:"right"===g?m.width:a.inverted&&"center"===g?m.width/2:a.inverted?f?m.width+h:-h:m.width/2,f=a.inverted?m.height/2:f?-h:m.height,this.alignOptions.x=q(this.options.x,0),this.alignOptions.y=q(this.options.y,
0),k.x-=g,k.y-=f,e.align(this.alignOptions,null,k),a.isInsidePlot(e.alignAttr.x+g-this.alignOptions.x,e.alignAttr.y+f-this.alignOptions.y)?e.show():(e.hide(),d=!1),d&&v.prototype.justifyDataLabel.call(this.axis,e,this.alignOptions,e.alignAttr,m,k),e.attr({x:e.alignAttr.x,y:e.alignAttr.y}),q(!d&&this.options.crop,!0)&&((a=b(e.x)&&b(e.y)&&a.isInsidePlot(e.x-h+e.width,e.y)&&a.isInsidePlot(e.x+h,e.y))||e.hide()))};d.prototype.getStackBox=function(b,d,e,f,h,k,a){var g=d.axis.reversed,c=b.inverted,m=a.height+
a.pos-(c?b.plotLeft:b.plotTop);d=d.isNegative&&!g||!d.isNegative&&g;return{x:c?d?f-a.right:f-k+a.pos-b.plotLeft:e+b.xAxis[0].transB-b.plotLeft,y:c?a.height-e-h:d?m-f-k:m-f,width:c?k:h,height:c?h:k}};return d}();e.prototype.getStacks=function(){var b=this,d=b.inverted;b.yAxis.forEach(function(b){b.stacking&&b.stacking.stacks&&b.hasVisibleSeries&&(b.stacking.oldStacks=b.stacking.stacks)});b.series.forEach(function(e){var f=e.xAxis&&e.xAxis.options||{};!e.options.stacking||!0!==e.visible&&!1!==b.options.chart.ignoreHiddenSeries||
(e.stackKey=[e.type,q(e.options.stack,""),d?f.top:f.left,d?f.height:f.width].join())})};E.compose(f);v.prototype.setGroupedPoints=function(){var b=this.yAxis.stacking;this.options.centerInCategory&&(this.is("column")||this.is("columnrange"))&&!this.options.stacking&&1<this.chart.series.length?v.prototype.setStackedPoints.call(this,"group"):b&&p(b.stacks,function(d,e){"group"===e.slice(-5)&&(p(d,function(b){return b.destroy()}),delete b.stacks[e])})};v.prototype.setStackedPoints=function(b){var e=
b||this.options.stacking;if(e&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var f=this.processedXData,h=this.processedYData,n=[],m=h.length,k=this.options,a=k.threshold,g=q(k.startFromThreshold&&a,0);k=k.stack;b=b?""+this.type+",".concat(e):this.stackKey;var c="-"+b,p=this.negStacks,l=this.yAxis,u=l.stacking.stacks,v=l.stacking.oldStacks,B,C;l.stacking.stacksTouched+=1;for(C=0;C<m;C++){var M=f[C];var G=h[C];var E=this.getStackIndicator(E,M,this.index);var I=E.key;var H=(B=
p&&G<(g?0:a))?c:b;u[H]||(u[H]={});u[H][M]||(v[H]&&v[H][M]?(u[H][M]=v[H][M],u[H][M].total=null):u[H][M]=new r(l,l.options.stackLabels,B,M,k));H=u[H][M];null!==G?(H.points[I]=H.points[this.index]=[q(H.cumulative,g)],t(H.cumulative)||(H.base=I),H.touched=l.stacking.stacksTouched,0<E.index&&!1===this.singleStacks&&(H.points[I][0]=H.points[this.index+","+M+",0"][0])):H.points[I]=H.points[this.index]=null;"percent"===e?(B=B?b:c,p&&u[B]&&u[B][M]?(B=u[B][M],H.total=B.total=Math.max(B.total,H.total)+Math.abs(G)||
0):H.total=y(H.total+(Math.abs(G)||0))):"group"===e?(d(G)&&(G=G[0]),null!==G&&(H.total=(H.total||0)+1)):H.total=y(H.total+(G||0));H.cumulative="group"===e?(H.total||1)-1:q(H.cumulative,g)+(G||0);null!==G&&(H.points[I].push(H.cumulative),n[C]=H.cumulative,H.hasValidPoints=!0)}"percent"===e&&(l.stacking.usePercentage=!0);"group"!==e&&(this.stackedYData=n);l.stacking.oldStacks={}}};v.prototype.modifyStacks=function(){var b=this,d=b.stackKey,e=b.yAxis.stacking.stacks,f=b.processedXData,h,m=b.options.stacking;
b[m+"Stacker"]&&[d,"-"+d].forEach(function(d){for(var a=f.length,g,c;a--;)if(g=f[a],h=b.getStackIndicator(h,g,b.index,d),c=(g=e[d]&&e[d][g])&&g.points[h.key])b[m+"Stacker"](c,g,a)})};v.prototype.percentStacker=function(b,d,e){d=d.total?100/d.total:0;b[0]=y(b[0]*d);b[1]=y(b[1]*d);this.stackedYData[e]=b[1]};v.prototype.getStackIndicator=function(b,d,e,f){!t(b)||b.x!==d||f&&b.stackKey!==f?b={x:d,index:0,key:f,stackKey:f}:b.index++;b.key=[e,d,b.index].join();return b};C.StackItem=r;"";return C.StackItem});
K(l,"Series/Line/LineSeries.js",[l["Core/Series/Series.js"],l["Core/Series/SeriesRegistry.js"],l["Core/Utilities.js"]],function(f,e,l){var C=this&&this.__extends||function(){var e=function(f,l){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,f){e.__proto__=f}||function(e,f){for(var d in f)f.hasOwnProperty(d)&&(e[d]=f[d])};return e(f,l)};return function(f,l){function t(){this.constructor=f}e(f,l);f.prototype=null===l?Object.create(l):(t.prototype=l.prototype,new t)}}(),v=l.defined,
E=l.merge;l=function(e){function l(){var f=null!==e&&e.apply(this,arguments)||this;f.data=void 0;f.options=void 0;f.points=void 0;return f}C(l,e);l.prototype.drawGraph=function(){var e=this,f=this.options,h=(this.gappedPath||this.getGraphPath).call(this),d=this.chart.styledMode,b=[["graph","highcharts-graph"]];d||b[0].push(f.lineColor||this.color||"#cccccc",f.dashStyle);b=e.getZonesGraphs(b);b.forEach(function(b,l){var p=b[0],n=e[p],q=n?"animate":"attr";n?(n.endX=e.preventGraphAnimation?null:h.xMap,
n.animate({d:h})):h.length&&(e[p]=n=e.chart.renderer.path(h).addClass(b[1]).attr({zIndex:1}).add(e.group));n&&!d&&(p={stroke:b[2],"stroke-width":f.lineWidth,fill:e.fillGraph&&e.color||"none"},b[3]?p.dashstyle=b[3]:"square"!==f.linecap&&(p["stroke-linecap"]=p["stroke-linejoin"]="round"),n[q](p).shadow(2>l&&f.shadow));n&&(n.startX=h.xMap,n.isArea=h.isArea)})};l.prototype.getGraphPath=function(e,f,h){var d=this,b=d.options,p=[],l=[],r,n=b.step;e=e||d.points;var t=e.reversed;t&&e.reverse();(n={right:1,
center:2}[n]||n&&3)&&t&&(n=4-n);e=this.getValidPoints(e,!1,!(b.connectNulls&&!f&&!h));e.forEach(function(q,t){var x=q.plotX,m=q.plotY,k=e[t-1];(q.leftCliff||k&&k.rightCliff)&&!h&&(r=!0);q.isNull&&!v(f)&&0<t?r=!b.connectNulls:q.isNull&&!f?r=!0:(0===t||r?t=[["M",q.plotX,q.plotY]]:d.getPointSpline?t=[d.getPointSpline(e,q,t)]:n?(t=1===n?[["L",k.plotX,m]]:2===n?[["L",(k.plotX+x)/2,k.plotY],["L",(k.plotX+x)/2,m]]:[["L",x,k.plotY]],t.push(["L",x,m])):t=[["L",x,m]],l.push(q.x),n&&(l.push(q.x),2===n&&l.push(q.x)),
p.push.apply(p,t),r=!1)});p.xMap=l;return d.graphPath=p};l.prototype.getZonesGraphs=function(e){this.zones.forEach(function(f,h){h=["zone-graph-"+h,"highcharts-graph highcharts-zone-graph-"+h+" "+(f.className||"")];this.chart.styledMode||h.push(f.color||this.color,f.dashStyle||this.options.dashStyle);e.push(h)},this);return e};l.defaultOptions=E(f.defaultOptions,{});return l}(f);e.registerSeriesType("line",l);"";return l});K(l,"Series/Area/AreaSeries.js",[l["Core/Color/Color.js"],l["Core/Legend/LegendSymbol.js"],
l["Core/Series/SeriesRegistry.js"],l["Core/Utilities.js"]],function(f,e,l,C){var v=this&&this.__extends||function(){var e=function(d,b){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,d){b.__proto__=d}||function(b,d){for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])};return e(d,b)};return function(d,b){function f(){this.constructor=d}e(d,b);d.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)}}(),E=f.parse,G=l.seriesTypes.line;f=C.extend;var B=C.merge,y=C.objectEach,
t=C.pick;C=function(e){function d(){var b=null!==e&&e.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;return b}v(d,e);d.prototype.drawGraph=function(){this.areaPath=[];e.prototype.drawGraph.apply(this);var b=this,d=this.areaPath,f=this.options,h=[["area","highcharts-area",this.color,f.fillColor]];this.zones.forEach(function(d,e){h.push(["zone-area-"+e,"highcharts-area highcharts-zone-area-"+e+" "+d.className,d.color||b.color,d.fillColor||f.fillColor])});h.forEach(function(e){var h=
e[0],p={},n=b[h],l=n?"animate":"attr";n?(n.endX=b.preventGraphAnimation?null:d.xMap,n.animate({d:d})):(p.zIndex=0,n=b[h]=b.chart.renderer.path(d).addClass(e[1]).add(b.group),n.isArea=!0);b.chart.styledMode||(p.fill=t(e[3],E(e[2]).setOpacity(t(f.fillOpacity,.75)).get()));n[l](p);n.startX=d.xMap;n.shiftUnit=f.step?2:1})};d.prototype.getGraphPath=function(b){var d=G.prototype.getGraphPath,e=this.options,f=e.stacking,h=this.yAxis,l=[],w=[],z=this.index,x=h.stacking.stacks[this.stackKey],m=e.threshold,
k=Math.round(h.getThreshold(e.threshold));e=t(e.connectNulls,"percent"===f);var a=function(a,c,d){var e=b[a];a=f&&x[e.x].points[z];var g=e[d+"Null"]||0;d=e[d+"Cliff"]||0;e=!0;if(d||g){var p=(g?a[0]:a[1])+d;var n=a[0]+d;e=!!g}else!f&&b[c]&&b[c].isNull&&(p=n=m);"undefined"!==typeof p&&(w.push({plotX:A,plotY:null===p?k:h.getThreshold(p),isNull:e,isCliff:!0}),l.push({plotX:A,plotY:null===n?k:h.getThreshold(n),doCurve:!1}))};b=b||this.points;f&&(b=this.getStackPoints(b));for(var g=0,c=b.length;g<c;++g){f||
(b[g].leftCliff=b[g].rightCliff=b[g].leftNull=b[g].rightNull=void 0);var D=b[g].isNull;var A=t(b[g].rectPlotX,b[g].plotX);var u=f?t(b[g].yBottom,k):k;if(!D||e)e||a(g,g-1,"left"),D&&!f&&e||(w.push(b[g]),l.push({x:g,plotX:A,plotY:u})),e||a(g,g+1,"right")}a=d.call(this,w,!0,!0);l.reversed=!0;D=d.call(this,l,!0,!0);(u=D[0])&&"M"===u[0]&&(D[0]=["L",u[1],u[2]]);D=a.concat(D);D.length&&D.push(["Z"]);d=d.call(this,w,!1,e);D.xMap=a.xMap;this.areaPath=D;return d};d.prototype.getStackPoints=function(b){var d=
this,e=[],f=[],h=this.xAxis,l=this.yAxis,w=l.stacking.stacks[this.stackKey],z={},x=l.series,m=x.length,k=l.options.reversedStacks?1:-1,a=x.indexOf(d);b=b||this.points;if(this.options.stacking){for(var g=0;g<b.length;g++)b[g].leftNull=b[g].rightNull=void 0,z[b[g].x]=b[g];y(w,function(a,c){null!==a.total&&f.push(c)});f.sort(function(a,c){return a-c});var c=x.map(function(a){return a.visible});f.forEach(function(b,g){var p=0,n,q;if(z[b]&&!z[b].isNull)e.push(z[b]),[-1,1].forEach(function(e){var h=1===
e?"rightNull":"leftNull",p=w[f[g+e]],l=0;if(p)for(var r=a;0<=r&&r<m;){var u=x[r].index;n=p.points[u];n||(u===d.index?z[b][h]=!0:c[r]&&(q=w[b].points[u])&&(l-=q[1]-q[0]));r+=k}z[b][1===e?"rightCliff":"leftCliff"]=l});else{for(var r=a;0<=r&&r<m;){if(n=w[b].points[x[r].index]){p=n[1];break}r+=k}p=t(p,0);p=l.translate(p,0,1,0,1);e.push({isNull:!0,plotX:h.translate(b,0,0,0,1),x:b,plotY:p,yBottom:p})}})}return e};d.defaultOptions=B(G.defaultOptions,{threshold:0});return d}(G);f(C.prototype,{singleStacks:!1,
drawLegendSymbol:e.drawRectangle});l.registerSeriesType("area",C);"";return C});K(l,"Series/Spline/SplineSeries.js",[l["Core/Series/SeriesRegistry.js"],l["Core/Utilities.js"]],function(f,e){var l=this&&this.__extends||function(){var e=function(f,l){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,f){e.__proto__=f}||function(e,f){for(var d in f)f.hasOwnProperty(d)&&(e[d]=f[d])};return e(f,l)};return function(f,l){function t(){this.constructor=f}e(f,l);f.prototype=null===l?Object.create(l):
(t.prototype=l.prototype,new t)}}(),C=f.seriesTypes.line,v=e.merge,E=e.pick;e=function(e){function f(){var f=null!==e&&e.apply(this,arguments)||this;f.data=void 0;f.options=void 0;f.points=void 0;return f}l(f,e);f.prototype.getPointSpline=function(e,f,h){var d=f.plotX||0,b=f.plotY||0,p=e[h-1];h=e[h+1];if(p&&!p.isNull&&!1!==p.doCurve&&!f.isCliff&&h&&!h.isNull&&!1!==h.doCurve&&!f.isCliff){e=p.plotY||0;var l=h.plotX||0;h=h.plotY||0;var r=0;var n=(1.5*d+(p.plotX||0))/2.5;var t=(1.5*b+e)/2.5;l=(1.5*d+
l)/2.5;var w=(1.5*b+h)/2.5;l!==n&&(r=(w-t)*(l-d)/(l-n)+b-w);t+=r;w+=r;t>e&&t>b?(t=Math.max(e,b),w=2*b-t):t<e&&t<b&&(t=Math.min(e,b),w=2*b-t);w>h&&w>b?(w=Math.max(h,b),t=2*b-w):w<h&&w<b&&(w=Math.min(h,b),t=2*b-w);f.rightContX=l;f.rightContY=w}f=["C",E(p.rightContX,p.plotX,0),E(p.rightContY,p.plotY,0),E(n,d,0),E(t,b,0),d,b];p.rightContX=p.rightContY=void 0;return f};f.defaultOptions=v(C.defaultOptions);return f}(C);f.registerSeriesType("spline",e);"";return e});K(l,"Series/AreaSpline/AreaSplineSeries.js",
[l["Series/Spline/SplineSeries.js"],l["Core/Legend/LegendSymbol.js"],l["Core/Series/SeriesRegistry.js"],l["Core/Utilities.js"]],function(f,e,l,C){var v=this&&this.__extends||function(){var e=function(f,d){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,d){b.__proto__=d}||function(b,d){for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])};return e(f,d)};return function(f,d){function b(){this.constructor=f}e(f,d);f.prototype=null===d?Object.create(d):(b.prototype=d.prototype,new b)}}(),
E=l.seriesTypes,G=E.area;E=E.area.prototype;var B=C.extend,y=C.merge;C=function(e){function h(){var d=null!==e&&e.apply(this,arguments)||this;d.data=void 0;d.points=void 0;d.options=void 0;return d}v(h,e);h.defaultOptions=y(f.defaultOptions,G.defaultOptions);return h}(f);B(C.prototype,{getGraphPath:E.getGraphPath,getStackPoints:E.getStackPoints,drawGraph:E.drawGraph,drawLegendSymbol:e.drawRectangle});l.registerSeriesType("areaspline",C);"";return C});K(l,"Series/Column/ColumnSeries.js",[l["Core/Animation/AnimationUtilities.js"],
l["Core/Color/Color.js"],l["Core/Globals.js"],l["Core/Legend/LegendSymbol.js"],l["Core/Series/Series.js"],l["Core/Series/SeriesRegistry.js"],l["Core/Utilities.js"]],function(f,e,l,C,v,E,G){var B=this&&this.__extends||function(){var b=function(d,a){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b])};return b(d,a)};return function(d,a){function e(){this.constructor=d}b(d,a);d.prototype=null===a?Object.create(a):
(e.prototype=a.prototype,new e)}}(),y=f.animObject,t=e.parse,h=l.hasTouch;f=l.noop;var d=G.clamp,b=G.css,p=G.defined,q=G.extend,r=G.fireEvent,n=G.isArray,J=G.isNumber,w=G.merge,z=G.pick,x=G.objectEach;G=function(e){function f(){var a=null!==e&&e.apply(this,arguments)||this;a.borderWidth=void 0;a.data=void 0;a.group=void 0;a.options=void 0;a.points=void 0;return a}B(f,e);f.prototype.animate=function(a){var b=this,c=this.yAxis,e=b.options,f=this.chart.inverted,k={},h=f?"translateX":"translateY";if(a)k.scaleY=
.001,a=d(c.toPixels(e.threshold),c.pos,c.pos+c.len),f?k.translateX=a-c.len:k.translateY=a,b.clipBox&&b.setClip(),b.group.attr(k);else{var m=Number(b.group.attr(h));b.group.animate({scaleY:1},q(y(b.options.animation),{step:function(a,d){b.group&&(k[h]=m+d.pos*(c.pos-m),b.group.attr(k))}}))}};f.prototype.init=function(a,b){e.prototype.init.apply(this,arguments);var c=this;a=c.chart;a.hasRendered&&a.series.forEach(function(a){a.type===c.type&&(a.isDirty=!0)})};f.prototype.getColumnMetrics=function(){var a=
this,b=a.options,c=a.xAxis,d=a.yAxis,e=c.options.reversedStacks;e=c.reversed&&!e||!c.reversed&&e;var f={},k,h=0;!1===b.grouping?h=1:a.chart.series.forEach(function(b){var c=b.yAxis,e=b.options;if(b.type===a.type&&(b.visible||!a.chart.options.chart.ignoreHiddenSeries)&&d.len===c.len&&d.pos===c.pos){if(e.stacking&&"group"!==e.stacking){k=b.stackKey;"undefined"===typeof f[k]&&(f[k]=h++);var g=f[k]}else!1!==e.grouping&&(g=h++);b.columnIndex=g}});var m=Math.min(Math.abs(c.transA)*(c.ordinal&&c.ordinal.slope||
b.pointRange||c.closestPointRange||c.tickInterval||1),c.len),l=m*b.groupPadding,p=(m-2*l)/(h||1);b=Math.min(b.maxPointWidth||c.len,z(b.pointWidth,p*(1-2*b.pointPadding)));a.columnMetrics={width:b,offset:(p-b)/2+(l+((a.columnIndex||0)+(e?1:0))*p-m/2)*(e?-1:1),paddedWidth:p,columnCount:h};return a.columnMetrics};f.prototype.crispCol=function(a,b,c,d){var e=this.chart,g=this.borderWidth,f=-(g%2?.5:0);g=g%2?.5:1;e.inverted&&e.renderer.isVML&&(g+=1);this.options.crisp&&(c=Math.round(a+c)+f,a=Math.round(a)+
f,c-=a);d=Math.round(b+d)+g;f=.5>=Math.abs(b)&&.5<d;b=Math.round(b)+g;d-=b;f&&d&&(--b,d+=1);return{x:a,y:b,width:c,height:d}};f.prototype.adjustForMissingColumns=function(a,b,c,d){var e=this,g=this.options.stacking;if(!c.isNull&&1<d.columnCount){var f=this.yAxis.options.reversedStacks,k=0,h=f?0:-d.columnCount;x(this.yAxis.stacking&&this.yAxis.stacking.stacks,function(a){if("number"===typeof c.x&&(a=a[c.x.toString()])){var b=a.points[e.index],d=a.total;g?(b&&(k=h),a.hasValidPoints&&(f?h++:h--)):n(b)&&
(k=b[1],h=d||0)}});a=(c.plotX||0)+((h-1)*d.paddedWidth+b)/2-b-k*d.paddedWidth}return a};f.prototype.translate=function(){var a=this,b=a.chart,c=a.options,e=a.dense=2>a.closestPointRange*a.xAxis.transA;e=a.borderWidth=z(c.borderWidth,e?0:1);var f=a.xAxis,k=a.yAxis,h=c.threshold,m=a.translatedThreshold=k.getThreshold(h),l=z(c.minPointLength,5),n=a.getColumnMetrics(),q=n.width,r=a.pointXOffset=n.offset,t=a.dataMin,x=a.dataMax,w=a.barW=Math.max(q,1+2*e);b.inverted&&(m-=.5);c.pointPadding&&(w=Math.ceil(w));
v.prototype.translate.apply(a);a.points.forEach(function(e){var g=z(e.yBottom,m),u=999+Math.abs(g),A=e.plotX||0;u=d(e.plotY,-u,k.len+u);var v=Math.min(u,g),y=Math.max(u,g)-v,D=q,B=A+r,C=w;l&&Math.abs(y)<l&&(y=l,A=!k.reversed&&!e.negative||k.reversed&&e.negative,J(h)&&J(x)&&e.y===h&&x<=h&&(k.min||0)<h&&(t!==x||(k.max||0)<=h)&&(A=!A),v=Math.abs(v-m)>l?g-l:m-(A?l:0));p(e.options.pointWidth)&&(D=C=Math.ceil(e.options.pointWidth),B-=Math.round((D-q)/2));c.centerInCategory&&(B=a.adjustForMissingColumns(B,
D,e,n));e.barX=B;e.pointWidth=D;e.tooltipPos=b.inverted?[d(k.len+k.pos-b.plotLeft-u,k.pos-b.plotLeft,k.len+k.pos-b.plotLeft),f.len+f.pos-b.plotTop-B-C/2,y]:[f.left-b.plotLeft+B+C/2,d(u+k.pos-b.plotTop,k.pos-b.plotTop,k.len+k.pos-b.plotTop),y];e.shapeType=a.pointClass.prototype.shapeType||"rect";e.shapeArgs=a.crispCol.apply(a,e.isNull?[B,m,C,0]:[B,v,C,y])})};f.prototype.drawGraph=function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")};f.prototype.pointAttribs=function(a,
b){var c=this.options,d=this.pointAttrToOptions||{},e=d.stroke||"borderColor",g=d["stroke-width"]||"borderWidth",f=a&&a.color||this.color,k=a&&a[e]||c[e]||f;d=a&&a.options.dashStyle||c.dashStyle;var h=a&&a[g]||c[g]||this[g]||0,m=z(a&&a.opacity,c.opacity,1);if(a&&this.zones.length){var l=a.getZone();f=a.options.color||l&&(l.color||a.nonZonedColor)||this.color;l&&(k=l.borderColor||k,d=l.dashStyle||d,h=l.borderWidth||h)}b&&a&&(a=w(c.states[b],a.options.states&&a.options.states[b]||{}),b=a.brightness,
f=a.color||"undefined"!==typeof b&&t(f).brighten(a.brightness).get()||f,k=a[e]||k,h=a[g]||h,d=a.dashStyle||d,m=z(a.opacity,m));e={fill:f,stroke:k,"stroke-width":h,opacity:m};d&&(e.dashstyle=d);return e};f.prototype.drawPoints=function(){var a=this,b=this.chart,c=a.options,d=b.renderer,e=c.animationLimit||250,f;a.points.forEach(function(g){var k=g.graphic,h=!!k,m=k&&b.pointCount<e?"animate":"attr";if(J(g.plotY)&&null!==g.y){f=g.shapeArgs;k&&g.hasNewShapeType()&&(k=k.destroy());a.enabledDataSorting&&
(g.startXPos=a.xAxis.reversed?-(f?f.width||0:0):a.xAxis.width);k||(g.graphic=k=d[g.shapeType](f).add(g.group||a.group))&&a.enabledDataSorting&&b.hasRendered&&b.pointCount<e&&(k.attr({x:g.startXPos}),h=!0,m="animate");if(k&&h)k[m](w(f));if(c.borderRadius)k[m]({r:c.borderRadius});b.styledMode||k[m](a.pointAttribs(g,g.selected&&"select")).shadow(!1!==g.allowShadow&&c.shadow,null,c.stacking&&!c.borderRadius);k&&(k.addClass(g.getClassName(),!0),k.attr({visibility:g.visible?"inherit":"hidden"}))}else k&&
(g.graphic=k.destroy())})};f.prototype.drawTracker=function(){var a=this,d=a.chart,c=d.pointer,e=function(a){var b=c.getPointFromEvent(a);"undefined"!==typeof b&&(c.isDirectTouch=!0,b.onMouseOver(a))},f;a.points.forEach(function(a){f=n(a.dataLabels)?a.dataLabels:a.dataLabel?[a.dataLabel]:[];a.graphic&&(a.graphic.element.point=a);f.forEach(function(b){b.div?b.div.point=a:b.element.point=a})});a._hasTracking||(a.trackerGroups.forEach(function(g){if(a[g]){a[g].addClass("highcharts-tracker").on("mouseover",
e).on("mouseout",function(a){c.onTrackerMouseOut(a)});if(h)a[g].on("touchstart",e);!d.styledMode&&a.options.cursor&&a[g].css(b).css({cursor:a.options.cursor})}}),a._hasTracking=!0);r(this,"afterDrawTracker")};f.prototype.remove=function(){var a=this,b=a.chart;b.hasRendered&&b.series.forEach(function(b){b.type===a.type&&(b.isDirty=!0)});v.prototype.remove.apply(a,arguments)};f.defaultOptions=w(v.defaultOptions,{borderRadius:0,centerInCategory:!1,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,
cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"});return f}(v);q(G.prototype,{cropShoulder:0,directTouch:!0,drawLegendSymbol:C.drawRectangle,getSymbol:f,negStacks:!0,trackerGroups:["group","dataLabelsGroup"]});E.registerSeriesType("column",G);"";"";return G});K(l,"Core/Series/DataLabel.js",
[l["Core/Animation/AnimationUtilities.js"],l["Core/FormatUtilities.js"],l["Core/Utilities.js"]],function(f,e,l){var C=f.getDeferredAnimation,v=e.format,E=l.defined,G=l.extend,B=l.fireEvent,y=l.isArray,t=l.merge,h=l.objectEach,d=l.pick,b=l.splat,p;(function(e){function f(b,a,e,c,f){var g=this,k=this.chart,h=this.isCartesian&&k.inverted,m=this.enabledDataSorting,l=d(b.dlBox&&b.dlBox.centerX,b.plotX),p=b.plotY,n=e.rotation,q=e.align,r=E(l)&&E(p)&&k.isInsidePlot(l,Math.round(p),{inverted:h,paneCoordinates:!0,
series:g}),t=function(c){m&&g.xAxis&&!x&&g.setDataLabelStartPos(b,a,f,r,c)},x="justify"===d(e.overflow,m?"none":"justify"),z=this.visible&&!1!==b.visible&&(b.series.forceDL||m&&!x||r||d(e.inside,!!this.options.stacking)&&c&&k.isInsidePlot(l,h?c.x+1:c.y+c.height-1,{inverted:h,paneCoordinates:!0,series:g}));if(z&&E(l)&&E(p)){n&&a.attr({align:q});q=a.getBBox(!0);var w=[0,0];var v=k.renderer.fontMetrics(k.styledMode?void 0:e.style.fontSize,a).b;c=G({x:h?this.yAxis.len-p:l,y:Math.round(h?this.xAxis.len-
l:p),width:0,height:0},c);G(e,{width:q.width,height:q.height});n?(x=!1,w=k.renderer.rotCorr(v,n),l={x:c.x+(e.x||0)+c.width/2+w.x,y:c.y+(e.y||0)+{top:0,middle:.5,bottom:1}[e.verticalAlign]*c.height},w=[q.x-Number(a.attr("x")),q.y-Number(a.attr("y"))],t(l),a[f?"attr":"animate"](l)):(t(c),a.align(e,void 0,c),l=a.alignAttr);x&&0<=c.height?this.justifyDataLabel(a,e,l,q,c,f):d(e.crop,!0)&&(c=l.x,t=l.y,c+=w[0],t+=w[1],z=k.isInsidePlot(c,t,{paneCoordinates:!0,series:g})&&k.isInsidePlot(c+q.width,t+q.height,
{paneCoordinates:!0,series:g}));if(e.shape&&!n)a[f?"attr":"animate"]({anchorX:h?k.plotWidth-b.plotY:b.plotX,anchorY:h?k.plotHeight-b.plotX:b.plotY})}f&&m&&(a.placed=!1);z||m&&!x?a.show():(a.hide(),a.placed=!1)}function l(b,a){var d=a.filter;return d?(a=d.operator,b=b[d.property],d=d.value,">"===a&&b>d||"<"===a&&b<d||">="===a&&b>=d||"<="===a&&b<=d||"=="===a&&b==d||"==="===a&&b===d?!0:!1):!0}function p(){var e=this,a=e.chart,g=e.options,c=e.points,f=e.hasRendered||0,m=a.renderer,p=g.dataLabels,n,q=
p.animation;q=p.defer?C(a,q,e):{defer:0,duration:0};p=z(z(a.options.plotOptions&&a.options.plotOptions.series&&a.options.plotOptions.series.dataLabels,a.options.plotOptions&&a.options.plotOptions[e.type]&&a.options.plotOptions[e.type].dataLabels),p);B(this,"drawDataLabels");if(y(p)||p.enabled||e._hasPointLabels){var r=e.plotGroup("dataLabelsGroup","data-labels",f?"inherit":"hidden",p.zIndex||6);r.attr({opacity:+f});!f&&(f=e.dataLabelsGroup)&&(e.visible&&r.show(),f[g.animation?"animate":"attr"]({opacity:1},
q));c.forEach(function(c){n=b(z(p,c.dlOptions||c.options&&c.options.dataLabels));n.forEach(function(b,f){var k=b.enabled&&(!c.isNull||c.dataLabelOnNull)&&l(c,b),p=c.connectors?c.connectors[f]:c.connector,n=c.dataLabels?c.dataLabels[f]:c.dataLabel,q=!n,t=d(b.distance,c.labelDistance);if(k){var u=c.getLabelConfig();var x=d(b[c.formatPrefix+"Format"],b.format);u=E(x)?v(x,u,a):(b[c.formatPrefix+"Formatter"]||b.formatter).call(u,b);x=b.style;var z=b.rotation;a.styledMode||(x.color=d(b.color,x.color,e.color,
"#000000"),"contrast"===x.color?(c.contrastColor=m.getContrast(c.color||e.color),x.color=!E(t)&&b.inside||0>t||g.stacking?c.contrastColor:"#000000"):delete c.contrastColor,g.cursor&&(x.cursor=g.cursor));var w={r:b.borderRadius||0,rotation:z,padding:b.padding,zIndex:1};a.styledMode||(w.fill=b.backgroundColor,w.stroke=b.borderColor,w["stroke-width"]=b.borderWidth);h(w,function(a,b){"undefined"===typeof a&&delete w[b]})}!n||k&&E(u)&&!!n.div===!!b.useHTML&&(n.rotation&&b.rotation||n.rotation===b.rotation)||
(q=!0,c.dataLabel=n=c.dataLabel&&c.dataLabel.destroy(),c.dataLabels&&(1===c.dataLabels.length?delete c.dataLabels:delete c.dataLabels[f]),f||delete c.dataLabel,p&&(c.connector=c.connector.destroy(),c.connectors&&(1===c.connectors.length?delete c.connectors:delete c.connectors[f])));k&&E(u)?(n?w.text=u:(c.dataLabels=c.dataLabels||[],n=c.dataLabels[f]=z?m.text(u,0,0,b.useHTML).addClass("highcharts-data-label"):m.label(u,0,0,b.shape,null,null,b.useHTML,null,"data-label"),f||(c.dataLabel=n),n.addClass(" highcharts-data-label-color-"+
c.colorIndex+" "+(b.className||"")+(b.useHTML?" highcharts-tracker":""))),n.options=b,n.attr(w),a.styledMode||n.css(x).shadow(b.shadow),n.added||n.add(r),b.textPath&&!b.useHTML&&(n.setTextPath(c.getDataLabelPath&&c.getDataLabelPath(n)||c.graphic,b.textPath),c.dataLabelPath&&!b.textPath.enabled&&(c.dataLabelPath=c.dataLabelPath.destroy())),e.alignDataLabel(c,n,b,null,q)):n&&n.hide()})})}B(this,"afterDrawDataLabels")}function q(b,a,d,c,e,f){var g=this.chart,k=a.align,h=a.verticalAlign,m=b.box?0:b.padding||
0,l=a.x;l=void 0===l?0:l;var n=a.y;n=void 0===n?0:n;var p=(d.x||0)+m;if(0>p){"right"===k&&0<=l?(a.align="left",a.inside=!0):l-=p;var q=!0}p=(d.x||0)+c.width-m;p>g.plotWidth&&("left"===k&&0>=l?(a.align="right",a.inside=!0):l+=g.plotWidth-p,q=!0);p=d.y+m;0>p&&("bottom"===h&&0<=n?(a.verticalAlign="top",a.inside=!0):n-=p,q=!0);p=(d.y||0)+c.height-m;p>g.plotHeight&&("top"===h&&0>=n?(a.verticalAlign="bottom",a.inside=!0):n+=g.plotHeight-p,q=!0);q&&(a.x=l,a.y=n,b.placed=!f,b.align(a,void 0,e));return q}
function z(b,a){var d=[],c;if(y(b)&&!y(a))d=b.map(function(b){return t(b,a)});else if(y(a)&&!y(b))d=a.map(function(a){return t(b,a)});else if(y(b)||y(a))for(c=Math.max(b.length,a.length);c--;)d[c]=t(b[c],a[c]);else d=t(b,a);return d}function x(b,a,d,c,e){var g=this.chart,f=g.inverted,h=this.xAxis,k=h.reversed,m=f?a.height/2:a.width/2;b=(b=b.pointWidth)?b/2:0;a.startXPos=f?e.x:k?-m-b:h.width-m+b;a.startYPos=f?k?this.yAxis.height-m+b:-m-b:e.y;c?"hidden"===a.visibility&&(a.show(),a.attr({opacity:0}).animate({opacity:1})):
a.attr({opacity:1}).animate({opacity:0},void 0,a.hide);g.hasRendered&&(d&&a.attr({x:a.startXPos,y:a.startYPos}),a.placed=!0)}var m=[];e.compose=function(b){if(-1===m.indexOf(b)){var a=b.prototype;m.push(b);a.alignDataLabel=f;a.drawDataLabels=p;a.justifyDataLabel=q;a.setDataLabelStartPos=x}}})(p||(p={}));"";return p});K(l,"Series/Column/ColumnDataLabel.js",[l["Core/Series/DataLabel.js"],l["Core/Series/SeriesRegistry.js"],l["Core/Utilities.js"]],function(f,e,l){var C=e.series,v=l.merge,E=l.pick,G;(function(e){function l(e,
d,b,f,l){var h=this.chart.inverted,n=e.series,p=(n.xAxis?n.xAxis.len:this.chart.plotSizeX)||0;n=(n.yAxis?n.yAxis.len:this.chart.plotSizeY)||0;var q=e.dlBox||e.shapeArgs,t=E(e.below,e.plotY>E(this.translatedThreshold,n)),x=E(b.inside,!!this.options.stacking);q&&(f=v(q),0>f.y&&(f.height+=f.y,f.y=0),q=f.y+f.height-n,0<q&&q<f.height&&(f.height-=q),h&&(f={x:n-f.y-f.height,y:p-f.x-f.width,width:f.height,height:f.width}),x||(h?(f.x+=t?0:f.width,f.width=0):(f.y+=t?f.height:0,f.height=0)));b.align=E(b.align,
!h||x?"center":t?"right":"left");b.verticalAlign=E(b.verticalAlign,h||x?"middle":t?"top":"bottom");C.prototype.alignDataLabel.call(this,e,d,b,f,l);b.inside&&e.contrastColor&&d.css({color:e.contrastColor})}var t=[];e.compose=function(e){f.compose(C);-1===t.indexOf(e)&&(t.push(e),e.prototype.alignDataLabel=l)}})(G||(G={}));return G});K(l,"Series/Bar/BarSeries.js",[l["Series/Column/ColumnSeries.js"],l["Core/Series/SeriesRegistry.js"],l["Core/Utilities.js"]],function(f,e,l){var C=this&&this.__extends||
function(){var e=function(f,l){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,f){e.__proto__=f}||function(e,f){for(var d in f)f.hasOwnProperty(d)&&(e[d]=f[d])};return e(f,l)};return function(f,l){function t(){this.constructor=f}e(f,l);f.prototype=null===l?Object.create(l):(t.prototype=l.prototype,new t)}}(),v=l.extend,E=l.merge;l=function(e){function l(){var f=null!==e&&e.apply(this,arguments)||this;f.data=void 0;f.options=void 0;f.points=void 0;return f}C(l,e);l.defaultOptions=
E(f.defaultOptions,{});return l}(f);v(l.prototype,{inverted:!0});e.registerSeriesType("bar",l);"";return l});K(l,"Series/Scatter/ScatterSeries.js",[l["Core/Series/SeriesRegistry.js"],l["Core/Utilities.js"]],function(f,e){var l=this&&this.__extends||function(){var e=function(f,h){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var e in b)b.hasOwnProperty(e)&&(d[e]=b[e])};return e(f,h)};return function(f,h){function d(){this.constructor=f}e(f,
h);f.prototype=null===h?Object.create(h):(d.prototype=h.prototype,new d)}}(),C=f.seriesTypes,v=C.column,E=C.line;C=e.addEvent;var G=e.extend,B=e.merge;e=function(e){function f(){var f=null!==e&&e.apply(this,arguments)||this;f.data=void 0;f.options=void 0;f.points=void 0;return f}l(f,e);f.prototype.applyJitter=function(){var e=this,d=this.options.jitter,b=this.points.length;d&&this.points.forEach(function(f,h){["x","y"].forEach(function(l,n){var p="plot"+l.toUpperCase();if(d[l]&&!f.isNull){var q=e[l+
"Axis"];var r=d[l]*q.transA;if(q&&!q.isLog){var t=Math.max(0,f[p]-r);q=Math.min(q.len,f[p]+r);n=1E4*Math.sin(h+n*b);f[p]=t+(q-t)*(n-Math.floor(n));"x"===l&&(f.clientX=f.plotX)}}})})};f.prototype.drawGraph=function(){this.options.lineWidth?e.prototype.drawGraph.call(this):this.graph&&(this.graph=this.graph.destroy())};f.defaultOptions=B(E.defaultOptions,{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 10px"> {series.name}</span><br/>',
pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}});return f}(E);G(e.prototype,{drawTracker:v.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1});C(e,"afterTranslate",function(){this.applyJitter()});f.registerSeriesType("scatter",e);"";return e});K(l,"Series/CenteredUtilities.js",[l["Core/Globals.js"],l["Core/Series/Series.js"],l["Core/Utilities.js"]],function(f,e,l){var C=f.deg2rad,v=l.fireEvent,
E=l.isNumber,G=l.pick,B=l.relativeLength,y;(function(f){f.getCenter=function(){var f=this.options,d=this.chart,b=2*(f.slicedOffset||0),l=d.plotWidth-2*b,q=d.plotHeight-2*b,r=f.center,n=Math.min(l,q),t=f.thickness,w=f.size,z=f.innerSize||0;"string"===typeof w&&(w=parseFloat(w));"string"===typeof z&&(z=parseFloat(z));f=[G(r[0],"50%"),G(r[1],"50%"),G(w&&0>w?void 0:f.size,"100%"),G(z&&0>z?void 0:f.innerSize||0,"0%")];!d.angular||this instanceof e||(f[3]=0);for(r=0;4>r;++r)w=f[r],d=2>r||2===r&&/%$/.test(w),
f[r]=B(w,[l,q,n,f[2]][r])+(d?b:0);f[3]>f[2]&&(f[3]=f[2]);E(t)&&2*t<f[2]&&0<t&&(f[3]=f[2]-2*t);v(this,"afterGetCenter",{positions:f});return f};f.getStartAndEndRadians=function(e,d){e=E(e)?e:0;d=E(d)&&d>e&&360>d-e?d:e+360;return{start:C*(e+-90),end:C*(d+-90)}}})(y||(y={}));"";return y});K(l,"Series/Pie/PiePoint.js",[l["Core/Animation/AnimationUtilities.js"],l["Core/Series/Point.js"],l["Core/Utilities.js"]],function(f,e,l){var C=this&&this.__extends||function(){var e=function(d,b){e=Object.setPrototypeOf||
{__proto__:[]}instanceof Array&&function(b,d){b.__proto__=d}||function(b,d){for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])};return e(d,b)};return function(d,b){function f(){this.constructor=d}e(d,b);d.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)}}(),v=f.setAnimation,E=l.addEvent,G=l.defined;f=l.extend;var B=l.isNumber,y=l.pick,t=l.relativeLength;e=function(e){function d(){var b=null!==e&&e.apply(this,arguments)||this;b.labelDistance=void 0;b.options=void 0;b.series=void 0;
return b}C(d,e);d.prototype.getConnectorPath=function(){var b=this.labelPosition,d=this.series.options.dataLabels,e=this.connectorShapes,f=d.connectorShape;e[f]&&(f=e[f]);return f.call(this,{x:b.final.x,y:b.final.y,alignment:b.alignment},b.connectorPosition,d)};d.prototype.getTranslate=function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}};d.prototype.haloPath=function(b){var d=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(d.x,
d.y,d.r+b,d.r+b,{innerR:d.r-1,start:d.start,end:d.end})};d.prototype.init=function(){var b=this;e.prototype.init.apply(this,arguments);this.name=y(this.name,"Slice");var d=function(d){b.slice("select"===d.type)};E(this,"select",d);E(this,"unselect",d);return this};d.prototype.isValid=function(){return B(this.y)&&0<=this.y};d.prototype.setVisible=function(b,d){var e=this,f=this.series,h=f.chart,l=f.options.ignoreHiddenPoint;d=y(d,l);b!==this.visible&&(this.visible=this.options.visible=b="undefined"===
typeof b?!this.visible:b,f.options.data[f.data.indexOf(this)]=this.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(d){if(e[d])e[d][b?"show":"hide"](b)}),this.legendItem&&h.legend.colorizeItem(this,b),b||"hover"!==this.state||this.setState(""),l&&(f.isDirty=!0),d&&h.redraw())};d.prototype.slice=function(b,d,e){var f=this.series;v(e,f.chart);y(d,!0);this.sliced=this.options.sliced=G(b)?b:!this.sliced;f.options.data[f.data.indexOf(this)]=this.options;this.graphic&&this.graphic.animate(this.getTranslate());
this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())};return d}(e);f(e.prototype,{connectorShapes:{fixedOffset:function(e,d,b){var f=d.breakAt;d=d.touchingSliceAt;return[["M",e.x,e.y],b.softConnector?["C",e.x+("left"===e.alignment?-5:5),e.y,2*f.x-d.x,2*f.y-d.y,f.x,f.y]:["L",f.x,f.y],["L",d.x,d.y]]},straight:function(e,d){d=d.touchingSliceAt;return[["M",e.x,e.y],["L",d.x,d.y]]},crookedLine:function(e,d,b){d=d.touchingSliceAt;var f=this.series,h=f.center[0],l=f.chart.plotWidth,n=f.chart.plotLeft;
f=e.alignment;var v=this.shapeArgs.r;b=t(b.crookDistance,1);l="left"===f?h+v+(l+n-h-v)*(1-b):n+(h-v)*b;b=["L",l,e.y];h=!0;if("left"===f?l>e.x||l<d.x:l<e.x||l>d.x)h=!1;e=[["M",e.x,e.y]];h&&e.push(b);e.push(["L",d.x,d.y]);return e}}});return e});K(l,"Series/Pie/PieSeries.js",[l["Series/CenteredUtilities.js"],l["Series/Column/ColumnSeries.js"],l["Core/Globals.js"],l["Core/Legend/LegendSymbol.js"],l["Series/Pie/PiePoint.js"],l["Core/Series/Series.js"],l["Core/Series/SeriesRegistry.js"],l["Core/Renderer/SVG/Symbols.js"],
l["Core/Utilities.js"]],function(f,e,l,C,v,E,G,B,y){var t=this&&this.__extends||function(){var b=function(d,e){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,d){b.__proto__=d}||function(b,d){for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])};return b(d,e)};return function(d,e){function f(){this.constructor=d}b(d,e);d.prototype=null===e?Object.create(e):(f.prototype=e.prototype,new f)}}(),h=f.getStartAndEndRadians;l=l.noop;var d=y.clamp,b=y.extend,p=y.fireEvent,q=y.merge,r=y.pick,
n=y.relativeLength;y=function(b){function e(){var d=null!==b&&b.apply(this,arguments)||this;d.center=void 0;d.data=void 0;d.maxLabelDistance=void 0;d.options=void 0;d.points=void 0;return d}t(e,b);e.prototype.animate=function(b){var d=this,e=d.points,f=d.startAngleRad;b||e.forEach(function(a){var b=a.graphic,c=a.shapeArgs;b&&c&&(b.attr({r:r(a.startR,d.center&&d.center[3]/2),start:f,end:f}),b.animate({r:c.r,start:c.start,end:c.end},d.options.animation))})};e.prototype.drawEmpty=function(){var b=this.startAngleRad,
d=this.endAngleRad,e=this.options;if(0===this.total&&this.center){var f=this.center[0];var a=this.center[1];this.graph||(this.graph=this.chart.renderer.arc(f,a,this.center[1]/2,0,b,d).addClass("highcharts-empty-series").add(this.group));this.graph.attr({d:B.arc(f,a,this.center[2]/2,0,{start:b,end:d,innerR:this.center[3]/2})});this.chart.styledMode||this.graph.attr({"stroke-width":e.borderWidth,fill:e.fillColor||"none",stroke:e.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())};
e.prototype.drawPoints=function(){var b=this.chart.renderer;this.points.forEach(function(d){d.graphic&&d.hasNewShapeType()&&(d.graphic=d.graphic.destroy());d.graphic||(d.graphic=b[d.shapeType](d.shapeArgs).add(d.series.group),d.delayedRendering=!0)})};e.prototype.generatePoints=function(){b.prototype.generatePoints.call(this);this.updateTotals()};e.prototype.getX=function(b,e,f){var k=this.center,a=this.radii?this.radii[f.index]||0:k[2]/2;b=Math.asin(d((b-k[1])/(a+f.labelDistance),-1,1));return k[0]+
(e?-1:1)*Math.cos(b)*(a+f.labelDistance)+(0<f.labelDistance?(e?-1:1)*this.options.dataLabels.padding:0)};e.prototype.hasData=function(){return!!this.processedXData.length};e.prototype.redrawPoints=function(){var b=this,d=b.chart,e=d.renderer,f=b.options.shadow,a,g,c,h;this.drawEmpty();!f||b.shadowGroup||d.styledMode||(b.shadowGroup=e.g("shadow").attr({zIndex:-1}).add(b.group));b.points.forEach(function(k){var l={};g=k.graphic;if(!k.isNull&&g){var m=void 0;h=k.shapeArgs;a=k.getTranslate();d.styledMode||
(m=k.shadowGroup,f&&!m&&(m=k.shadowGroup=e.g("shadow").add(b.shadowGroup)),m&&m.attr(a),c=b.pointAttribs(k,k.selected&&"select"));k.delayedRendering?(g.setRadialReference(b.center).attr(h).attr(a),d.styledMode||g.attr(c).attr({"stroke-linejoin":"round"}).shadow(f,m),k.delayedRendering=!1):(g.setRadialReference(b.center),d.styledMode||q(!0,l,c),q(!0,l,h,a),g.animate(l));g.attr({visibility:k.visible?"inherit":"hidden"});g.addClass(k.getClassName(),!0)}else g&&(k.graphic=g.destroy())})};e.prototype.sortByAngle=
function(b,d){b.sort(function(b,e){return"undefined"!==typeof b.angle&&(e.angle-b.angle)*d})};e.prototype.translate=function(b){p(this,"translate");this.generatePoints();var d=this.options,e=d.slicedOffset,f=e+(d.borderWidth||0),a=h(d.startAngle,d.endAngle),g=this.startAngleRad=a.start;a=(this.endAngleRad=a.end)-g;var c=this.points,l=d.dataLabels.distance;d=d.ignoreHiddenPoint;var q=c.length,t,v=0;b||(this.center=b=this.getCenter());for(t=0;t<q;t++){var w=c[t];var z=g+v*a;!w.isValid()||d&&!w.visible||
(v+=w.percentage/100);var y=g+v*a;var B={x:b[0],y:b[1],r:b[2]/2,innerR:b[3]/2,start:Math.round(1E3*z)/1E3,end:Math.round(1E3*y)/1E3};w.shapeType="arc";w.shapeArgs=B;w.labelDistance=r(w.options.dataLabels&&w.options.dataLabels.distance,l);w.labelDistance=n(w.labelDistance,B.r);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,w.labelDistance);y=(y+z)/2;y>1.5*Math.PI?y-=2*Math.PI:y<-Math.PI/2&&(y+=2*Math.PI);w.slicedTranslation={translateX:Math.round(Math.cos(y)*e),translateY:Math.round(Math.sin(y)*
e)};B=Math.cos(y)*b[2]/2;var C=Math.sin(y)*b[2]/2;w.tooltipPos=[b[0]+.7*B,b[1]+.7*C];w.half=y<-Math.PI/2||y>Math.PI/2?1:0;w.angle=y;z=Math.min(f,w.labelDistance/5);w.labelPosition={natural:{x:b[0]+B+Math.cos(y)*w.labelDistance,y:b[1]+C+Math.sin(y)*w.labelDistance},"final":{},alignment:0>w.labelDistance?"center":w.half?"right":"left",connectorPosition:{breakAt:{x:b[0]+B+Math.cos(y)*z,y:b[1]+C+Math.sin(y)*z},touchingSliceAt:{x:b[0]+B,y:b[1]+C}}}}p(this,"afterTranslate")};e.prototype.updateTotals=function(){var b=
this.points,d=b.length,e=this.options.ignoreHiddenPoint,f,a=0;for(f=0;f<d;f++){var g=b[f];!g.isValid()||e&&!g.visible||(a+=g.y)}this.total=a;for(f=0;f<d;f++)g=b[f],g.percentage=0<a&&(g.visible||!e)?g.y/a*100:0,g.total=a};e.defaultOptions=q(E.defaultOptions,{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,connectorShape:"fixedOffset",crookDistance:"70%",distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,
x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}});return e}(E);b(y.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawLegendSymbol:C.drawRectangle,drawTracker:e.prototype.drawTracker,getCenter:f.getCenter,getSymbol:l,isCartesian:!1,noSharedTooltip:!0,pointAttribs:e.prototype.pointAttribs,
pointClass:v,requireSorting:!1,searchPoint:l,trackerGroups:["group","dataLabelsGroup"]});G.registerSeriesType("pie",y);"";return y});K(l,"Series/Pie/PieDataLabel.js",[l["Core/Series/DataLabel.js"],l["Core/Globals.js"],l["Core/Renderer/RendererUtilities.js"],l["Core/Series/SeriesRegistry.js"],l["Core/Utilities.js"]],function(f,e,l,C,v){var E=e.noop,G=l.distribute,B=C.series,y=v.arrayMax,t=v.clamp,h=v.defined,d=v.merge,b=v.pick,p=v.relativeLength,q;(function(e){function l(){var e=this,f=e.data,a=e.chart,
g=e.options.dataLabels||{},c=g.connectorPadding,l=a.plotWidth,n=a.plotHeight,p=a.plotLeft,q=Math.round(a.chartWidth/3),r=e.center,t=r[2]/2,x=r[1],v=[[],[]],w=[0,0,0,0],z=e.dataLabelPositioners,C,E,J,K,P,F,T,N,V,W,X,Q;e.visible&&(g.enabled||e._hasPointLabels)&&(f.forEach(function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),B.prototype.drawDataLabels.apply(e),f.forEach(function(a){a.dataLabel&&
(a.visible?(v[a.half].push(a),a.dataLabel._pos=null,!h(g.style.width)&&!h(a.options.dataLabels&&a.options.dataLabels.style&&a.options.dataLabels.style.width)&&a.dataLabel.getBBox().width>q&&(a.dataLabel.css({width:Math.round(.7*q)+"px"}),a.dataLabel.shortened=!0)):(a.dataLabel=a.dataLabel.destroy(),a.dataLabels&&1===a.dataLabels.length&&delete a.dataLabels))}),v.forEach(function(d,f){var k=d.length,m=[],q;if(k){e.sortByAngle(d,f-.5);if(0<e.maxLabelDistance){var u=Math.max(0,x-t-e.maxLabelDistance);
var v=Math.min(x+t+e.maxLabelDistance,a.plotHeight);d.forEach(function(b){0<b.labelDistance&&b.dataLabel&&(b.top=Math.max(0,x-t-b.labelDistance),b.bottom=Math.min(x+t+b.labelDistance,a.plotHeight),q=b.dataLabel.getBBox().height||21,b.distributeBox={target:b.labelPosition.natural.y-b.top+q/2,size:q,rank:b.y},m.push(b.distributeBox))});u=v+q-u;G(m,u,u/5)}for(X=0;X<k;X++){C=d[X];F=C.labelPosition;K=C.dataLabel;W=!1===C.visible?"hidden":"inherit";V=u=F.natural.y;m&&h(C.distributeBox)&&("undefined"===
typeof C.distributeBox.pos?W="hidden":(T=C.distributeBox.size,V=z.radialDistributionY(C)));delete C.positionIndex;if(g.justify)N=z.justify(C,t,r);else switch(g.alignTo){case "connectors":N=z.alignToConnectors(d,f,l,p);break;case "plotEdges":N=z.alignToPlotEdges(K,f,l,p);break;default:N=z.radialDistributionX(e,C,V,u)}K._attr={visibility:W,align:F.alignment};Q=C.options.dataLabels||{};K._pos={x:N+b(Q.x,g.x)+({left:c,right:-c}[F.alignment]||0),y:V+b(Q.y,g.y)-10};F.final.x=N;F.final.y=V;b(g.crop,!0)&&
(P=K.getBBox().width,u=null,N-P<c&&1===f?(u=Math.round(P-N+c),w[3]=Math.max(u,w[3])):N+P>l-c&&0===f&&(u=Math.round(N+P-l+c),w[1]=Math.max(u,w[1])),0>V-T/2?w[0]=Math.max(Math.round(-V+T/2),w[0]):V+T/2>n&&(w[2]=Math.max(Math.round(V+T/2-n),w[2])),K.sideOverflow=u)}}}),0===y(w)||this.verifyDataLabelOverflow(w))&&(this.placeDataLabels(),this.points.forEach(function(c){Q=d(g,c.options.dataLabels);if(E=b(Q.connectorWidth,1)){var f;J=c.connector;if((K=c.dataLabel)&&K._pos&&c.visible&&0<c.labelDistance){W=
K._attr.visibility;if(f=!J)c.connector=J=a.renderer.path().addClass("highcharts-data-label-connector  highcharts-color-"+c.colorIndex+(c.className?" "+c.className:"")).add(e.dataLabelsGroup),a.styledMode||J.attr({"stroke-width":E,stroke:Q.connectorColor||c.color||"#666666"});J[f?"attr":"animate"]({d:c.getConnectorPath()});J.attr("visibility",W)}else J&&(c.connector=J.destroy())}}))}function q(){this.points.forEach(function(b){var d=b.dataLabel,a;d&&b.visible&&((a=d._pos)?(d.sideOverflow&&(d._attr.width=
Math.max(d.getBBox().width-d.sideOverflow,0),d.css({width:d._attr.width+"px",textOverflow:(this.options.dataLabels.style||{}).textOverflow||"ellipsis"}),d.shortened=!0),d.attr(d._attr),d[d.moved?"animate":"attr"](a),d.moved=!0):d&&d.attr({y:-9999}));delete b.distributeBox},this)}function r(b){var d=this.center,a=this.options,e=a.center,c=a.minSize||80,f=null!==a.size;if(!f){if(null!==e[0])var h=Math.max(d[2]-Math.max(b[1],b[3]),c);else h=Math.max(d[2]-b[1]-b[3],c),d[0]+=(b[3]-b[1])/2;null!==e[1]?
h=t(h,c,d[2]-Math.max(b[0],b[2])):(h=t(h,c,d[2]-b[0]-b[2]),d[1]+=(b[0]-b[2])/2);h<d[2]?(d[2]=h,d[3]=Math.min(a.thickness?Math.max(0,h-2*a.thickness):Math.max(0,p(a.innerSize||0,h)),h),this.translate(d),this.drawDataLabels&&this.drawDataLabels()):f=!0}return f}var v=[],x={radialDistributionY:function(b){return b.top+b.distributeBox.pos},radialDistributionX:function(b,d,a,e){return b.getX(a<d.top+2||a>d.bottom-2?e:a,d.half,d)},justify:function(b,d,a){return a[0]+(b.half?-1:1)*(d+b.labelDistance)},alignToPlotEdges:function(b,
d,a,e){b=b.getBBox().width;return d?b+e:a-b-e},alignToConnectors:function(b,d,a,e){var c=0,f;b.forEach(function(a){f=a.dataLabel.getBBox().width;f>c&&(c=f)});return d?c+e:a-c-e}};e.compose=function(b){f.compose(B);-1===v.indexOf(b)&&(v.push(b),b=b.prototype,b.dataLabelPositioners=x,b.alignDataLabel=E,b.drawDataLabels=l,b.placeDataLabels=q,b.verifyDataLabelOverflow=r)}})(q||(q={}));return q});K(l,"Extensions/OverlappingDataLabels.js",[l["Core/Chart/Chart.js"],l["Core/Utilities.js"]],function(f,e){function l(e,
f){var d=!1;if(e){var b=e.newOpacity;e.oldOpacity!==b&&(e.alignAttr&&e.placed?(e[b?"removeClass":"addClass"]("highcharts-data-label-hidden"),d=!0,e.alignAttr.opacity=b,e[e.isOld?"animate":"attr"](e.alignAttr,null,function(){f.styledMode||e.css({pointerEvents:b?"auto":"none"})}),v(f,"afterHideOverlappingLabel")):e.attr({opacity:b}));e.isOld=!0}return d}var C=e.addEvent,v=e.fireEvent,E=e.isArray,G=e.isNumber,B=e.objectEach,y=e.pick;C(f,"render",function(){var e=this,f=[];(this.labelCollectors||[]).forEach(function(d){f=
f.concat(d())});(this.yAxis||[]).forEach(function(d){d.stacking&&d.options.stackLabels&&!d.options.stackLabels.allowOverlap&&B(d.stacking.stacks,function(b){B(b,function(b){b.label&&f.push(b.label)})})});(this.series||[]).forEach(function(d){var b=d.options.dataLabels;d.visible&&(!1!==b.enabled||d._hasPointLabels)&&(b=function(b){return b.forEach(function(b){b.visible&&(E(b.dataLabels)?b.dataLabels:b.dataLabel?[b.dataLabel]:[]).forEach(function(d){var h=d.options;d.labelrank=y(h.labelrank,b.labelrank,
b.shapeArgs&&b.shapeArgs.height);h.allowOverlap?(d.oldOpacity=d.opacity,d.newOpacity=1,l(d,e)):f.push(d)})})},b(d.nodes||[]),b(d.points))});this.hideOverlappingLabels(f)});f.prototype.hideOverlappingLabels=function(e){var f=this,d=e.length,b=f.renderer,p,q,r,n=!1;var t=function(d){var e,f=d.box?0:d.padding||0,a=e=0,g;if(d&&(!d.alignAttr||d.placed)){var c=d.alignAttr||{x:d.attr("x"),y:d.attr("y")};var h=d.parentGroup;d.width||(e=d.getBBox(),d.width=e.width,d.height=e.height,e=b.fontMetrics(null,d.element).h);
var l=d.width-2*f;(g={left:"0",center:"0.5",right:"1"}[d.alignValue])?a=+g*l:G(d.x)&&Math.round(d.x)!==d.translateX&&(a=d.x-d.translateX);return{x:c.x+(h.translateX||0)+f-(a||0),y:c.y+(h.translateY||0)+f-e,width:d.width-2*f,height:d.height-2*f}}};for(q=0;q<d;q++)if(p=e[q])p.oldOpacity=p.opacity,p.newOpacity=1,p.absoluteBox=t(p);e.sort(function(b,d){return(d.labelrank||0)-(b.labelrank||0)});for(q=0;q<d;q++){var w=(t=e[q])&&t.absoluteBox;for(p=q+1;p<d;++p){var z=(r=e[p])&&r.absoluteBox;!w||!z||t===
r||0===t.newOpacity||0===r.newOpacity||"hidden"===t.visibility||"hidden"===r.visibility||z.x>=w.x+w.width||z.x+z.width<=w.x||z.y>=w.y+w.height||z.y+z.height<=w.y||((t.labelrank<r.labelrank?t:r).newOpacity=0)}}e.forEach(function(b){l(b,f)&&(n=!0)});n&&v(f,"afterHideAllOverlappingLabels")}});K(l,"Core/Responsive.js",[l["Core/Utilities.js"]],function(f){var e=f.extend,l=f.find,C=f.isArray,v=f.isObject,E=f.merge,G=f.objectEach,B=f.pick,y=f.splat,t=f.uniqueKey,h;(function(d){var b=[];d.compose=function(d){-1===
b.indexOf(d)&&(b.push(d),e(d.prototype,f.prototype));return d};var f=function(){function b(){}b.prototype.currentOptions=function(b){function d(b,f,h,k){var a;G(b,function(b,c){if(!k&&-1<e.collectionsWithUpdate.indexOf(c)&&f[c])for(b=y(b),h[c]=[],a=0;a<Math.max(b.length,f[c].length);a++)f[c][a]&&(void 0===b[a]?h[c][a]=f[c][a]:(h[c][a]={},d(b[a],f[c][a],h[c][a],k+1)));else v(b)?(h[c]=C(b)?[]:{},d(b,f[c]||{},h[c],k+1)):h[c]="undefined"===typeof f[c]?null:f[c]})}var e=this,f={};d(b,this.options,f,0);
return f};b.prototype.matchResponsiveRule=function(b,d){var e=b.condition;(e.callback||function(){return this.chartWidth<=B(e.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=B(e.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=B(e.minWidth,0)&&this.chartHeight>=B(e.minHeight,0)}).call(this)&&d.push(b._id)};b.prototype.setResponsive=function(b,d){var e=this,f=this.options.responsive,h=this.currentResponsive,n=[];!d&&f&&f.rules&&f.rules.forEach(function(b){"undefined"===typeof b._id&&(b._id=t());e.matchResponsiveRule(b,
n)},this);d=E.apply(void 0,n.map(function(b){return l((f||{}).rules||[],function(d){return d._id===b})}).map(function(b){return b&&b.chartOptions}));d.isResponsiveOptions=!0;n=n.toString()||void 0;n!==(h&&h.ruleIds)&&(h&&this.update(h.undoOptions,b,!0),n?(h=this.currentOptions(d),h.isResponsiveOptions=!0,this.currentResponsive={ruleIds:n,mergedOptions:d,undoOptions:h},this.update(d,b,!0)):this.currentResponsive=void 0)};return b}()})(h||(h={}));"";"";return h});K(l,"masters/highcharts.src.js",[l["Core/Globals.js"],
l["Core/Utilities.js"],l["Core/DefaultOptions.js"],l["Core/Animation/Fx.js"],l["Core/Animation/AnimationUtilities.js"],l["Core/Renderer/HTML/AST.js"],l["Core/FormatUtilities.js"],l["Core/Renderer/RendererUtilities.js"],l["Core/Renderer/SVG/SVGElement.js"],l["Core/Renderer/SVG/SVGRenderer.js"],l["Core/Renderer/HTML/HTMLElement.js"],l["Core/Renderer/HTML/HTMLRenderer.js"],l["Core/Axis/Axis.js"],l["Core/Axis/DateTimeAxis.js"],l["Core/Axis/LogarithmicAxis.js"],l["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
l["Core/Axis/Tick.js"],l["Core/Tooltip.js"],l["Core/Series/Point.js"],l["Core/Pointer.js"],l["Core/MSPointer.js"],l["Core/Legend/Legend.js"],l["Core/Chart/Chart.js"],l["Core/Series/Series.js"],l["Core/Series/SeriesRegistry.js"],l["Series/Column/ColumnSeries.js"],l["Series/Column/ColumnDataLabel.js"],l["Series/Pie/PieSeries.js"],l["Series/Pie/PieDataLabel.js"],l["Core/Series/DataLabel.js"],l["Core/Responsive.js"],l["Core/Color/Color.js"],l["Core/Time.js"]],function(f,e,l,C,v,E,G,B,y,t,h,d,b,p,q,r,
n,J,w,z,x,m,k,a,g,c,D,A,u,K,S,R,M){f.animate=v.animate;f.animObject=v.animObject;f.getDeferredAnimation=v.getDeferredAnimation;f.setAnimation=v.setAnimation;f.stop=v.stop;f.timers=C.timers;f.AST=E;f.Axis=b;f.Chart=k;f.chart=k.chart;f.Fx=C;f.Legend=m;f.PlotLineOrBand=r;f.Point=w;f.Pointer=x.isRequired()?x:z;f.Series=a;f.SVGElement=y;f.SVGRenderer=t;f.Tick=n;f.Time=M;f.Tooltip=J;f.Color=R;f.color=R.parse;d.compose(t);h.compose(y);f.defaultOptions=l.defaultOptions;f.getOptions=l.getOptions;f.time=l.defaultTime;
f.setOptions=l.setOptions;f.dateFormat=G.dateFormat;f.format=G.format;f.numberFormat=G.numberFormat;f.addEvent=e.addEvent;f.arrayMax=e.arrayMax;f.arrayMin=e.arrayMin;f.attr=e.attr;f.clearTimeout=e.clearTimeout;f.correctFloat=e.correctFloat;f.createElement=e.createElement;f.css=e.css;f.defined=e.defined;f.destroyObjectProperties=e.destroyObjectProperties;f.discardElement=e.discardElement;f.distribute=B.distribute;f.erase=e.erase;f.error=e.error;f.extend=e.extend;f.extendClass=e.extendClass;f.find=
e.find;f.fireEvent=e.fireEvent;f.getMagnitude=e.getMagnitude;f.getStyle=e.getStyle;f.inArray=e.inArray;f.isArray=e.isArray;f.isClass=e.isClass;f.isDOMElement=e.isDOMElement;f.isFunction=e.isFunction;f.isNumber=e.isNumber;f.isObject=e.isObject;f.isString=e.isString;f.keys=e.keys;f.merge=e.merge;f.normalizeTickInterval=e.normalizeTickInterval;f.objectEach=e.objectEach;f.offset=e.offset;f.pad=e.pad;f.pick=e.pick;f.pInt=e.pInt;f.relativeLength=e.relativeLength;f.removeEvent=e.removeEvent;f.seriesType=
g.seriesType;f.splat=e.splat;f.stableSort=e.stableSort;f.syncTimeout=e.syncTimeout;f.timeUnits=e.timeUnits;f.uniqueKey=e.uniqueKey;f.useSerialIds=e.useSerialIds;f.wrap=e.wrap;D.compose(c);K.compose(a);p.compose(b);q.compose(b);u.compose(A);r.compose(b);S.compose(k);return f});l["masters/highcharts.src.js"]._modules=l;return l["masters/highcharts.src.js"]});
//# sourceMappingURL=highcharts.js.map;
define('highcharts', ['highcharts/highcharts'], function (main) { return main; });

define('chart-config',['lib/utils', 'highcharts'],

    function(utils, Highcharts) {

        'use strict';

        var ChartConfig = function() {

                Highcharts.setOptions({
                    lang: {
                        thousandsSep: ""
                    },
                    chart: {
                        style: {
                            fontFamily: utils.isRTL() ? 'DUBAI-REGULAR' : 'DUBAI-REGULAR',
                            fontWeight: 100
                        }
                    },
                    plotOptions: {
                        line: {
                            marker: {
                                symbol: 'circle'
                            }
                        }
                    },
                    credits: {
                        enabled: false
                    }
                });

            },

            _singleton;

        _singleton = new ChartConfig();

        return _singleton;
    });

/* globalmodule */
require.config({

    baseUrl: '../../js/',

    deps: [
        'bootstrap'
    ],
    packages: [{
        name: 'highcharts',
        main: 'highcharts'
    }],
    paths: {
        components: '../src/sublayouts',
        text: 'vendor/require.text',
        jquery: 'vendor/jquery',
        jquery_mobile_touch: 'vendor/jquery.mobile.touch',
        slick: 'vendor/slick',
        iscroll: 'vendor/iscroll',
        mustache: 'vendor/mustache',
        picker: 'vendor/picker',
        pickerdate: 'vendor/picker.date',
        parsley: 'vendor/parsley',
        highcharts: 'vendor/highcharts',
        monthpicker: 'vendor/jquery.monthpicker',
        chat: 'vendor/chat',
        wickedpicker: 'vendor/wickedpicker',
        numeral: 'vendor/numeral',
        markerclusterer: 'vendor/markerclusterer'
    },

    shim: {
        'picker': {
            deps: ['jquery']
        },
        'monthpicker': {
            deps: ['jquery']
        },
        'pickerdate': {
            deps: ['jquery', 'picker']
        },
        'parsley': {
            deps: ['jquery']
        },
        'highcharts': {
            exports: 'Highcharts',
            deps: ['jquery']
        }
    },

    map: {
        '*': {
            'jquery': 'jquery-private'
        },
        'jquery-private': {
            'jquery': 'jquery'
        }
    }
});

define("config/requirejs", function(){});

define( 'mask',[ 'jquery', 'lib/utils' ],
	function ( $, utils ) {

		'use strict';

		var Mask = function () {

				this.$el = $( '<div class="mask"></div>' );
				this.open = false;
				$( 'body' ).append( this.$el );
			},
			_singleton;

		Mask.prototype.toggle = function () {

			if ( this.open ) {
				this.hide();
			} else {
				this.show();
			}
		};

		Mask.prototype.show = function () {

			this.$el.addClass( 'mask-show' );
			this.open = true;

		};

		Mask.prototype.hide = function () {

			this.$el.removeClass( 'mask-show' );
			this.open = false;
		};

		_singleton = new Mask();

		return _singleton;
	} );

define( 'spinner',[ 'jquery' ],
	function( $ ) {
		'use strict';

		var Spinner = function( $targetEl ) {

			this.$targetEl = $targetEl;
			return this;
		};

		Spinner.prototype.load = function() {

			this.$spinner = $( '<div class="spinner"></div>' );
			this.$targetEl.append( this.$spinner );
		};

		Spinner.prototype.unload = function() {

			this.$spinner.fadeOut( 200, $.proxy( this.destroy, this ) );
		};

		Spinner.prototype.destroy = function() {

			this.$spinner.remove();
		};

		return Spinner;

	} );

define( '../src/journeys/j01-transaction-history/j01-transaction-history',[ 'jquery' ], function ( $ ) {

	'use strict';

	var transHistory = function ( $journey ) {

		this.$journey = $journey;

		return this;
	};

	transHistory.prototype.init = function () {

		this.toggleDate();

	};

	transHistory.prototype.toggleDate = function() {
		var _this = this;

		$('.j01-transaction-history-select').find('.form-field__input--radio').each(function() {
			$(this).on('click', function() {
				if ( $(this).val() == 'custom' ) {
					$('.j01-transaction-history-selectdate').show();
					$('.j01-transaction-history-selectdate').find('.form-field__input--datepicker').each(function(){
						$(this).attr('required', true);
					});

				} else {
					$('.j01-transaction-history-selectdate').hide();
					$('.j01-transaction-history-selectdate').find('.form-field__input--datepicker').each(function(){
						$(this).removeAttr('required');
						$(this).parsley().reset();
						$(this).parent().removeClass('form-field__input-wrapper--error');
					});
				};
			});
		});
	};

	return transHistory;
} );

/**
 * @name MarkerClusterer for Google Maps v3
 * @version version 1.0.1
 * @author Luke Mahe
 * @fileoverview
 * The library creates and manages per-zoom-level clusters for large amounts of
 * markers.
 * <br/>
 * This is a v3 implementation of the
 * <a href="http://gmaps-utility-library-dev.googlecode.com/svn/tags/markerclusterer/"
 * >v2 MarkerClusterer</a>.
 */

/**
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


/**
 * A Marker Clusterer that clusters markers.
 *
 * @param {google.maps.Map} map The Google map to attach to.
 * @param {Array.<google.maps.Marker>=} opt_markers Optional markers to add to
 *   the cluster.
 * @param {Object=} opt_options support the following options:
 *     'gridSize': (number) The grid size of a cluster in pixels.
 *     'maxZoom': (number) The maximum zoom level that a marker can be part of a
 *                cluster.
 *     'zoomOnClick': (boolean) Whether the default behaviour of clicking on a
 *                    cluster is to zoom into it.
 *     'averageCenter': (boolean) Whether the center of each cluster should be
 *                      the average of all markers in the cluster.
 *     'minimumClusterSize': (number) The minimum number of markers to be in a
 *                           cluster before the markers are hidden and a count
 *                           is shown.
 *     'styles': (object) An object that has style properties:
 *       'url': (string) The image url.
 *       'height': (number) The image height.
 *       'width': (number) The image width.
 *       'anchor': (Array) The anchor position of the label text.
 *       'textColor': (string) The text color.
 *       'textSize': (number) The text size.
 *       'backgroundPosition': (string) The position of the backgound x, y.
 * @constructor
 * @extends google.maps.OverlayView
 */
function MarkerClusterer(map, opt_markers, opt_options) {
    // MarkerClusterer implements google.maps.OverlayView interface. We use the
    // extend function to extend MarkerClusterer with google.maps.OverlayView
    // because it might not always be available when the code is defined so we
    // look for it at the last possible moment. If it doesn't exist now then
    // there is no point going ahead :)
    this.extend(MarkerClusterer, google.maps.OverlayView);
    this.map_ = map;
  
    /**
     * @type {Array.<google.maps.Marker>}
     * @private
     */
    this.markers_ = [];
  
    /**
     *  @type {Array.<Cluster>}
     */
    this.clusters_ = [];
  
    this.sizes = [53, 56, 66, 78, 90];
  
    /**
     * @private
     */
    this.styles_ = [];
  
    /**
     * @type {boolean}
     * @private
     */
    this.ready_ = false;
  
    var options = opt_options || {};
  
    /**
     * @type {number}
     * @private
     */
    this.gridSize_ = options['gridSize'] || 60;
  
    /**
     * @private
     */
    this.minClusterSize_ = options['minimumClusterSize'] || 2;
  
  
    /**
     * @type {?number}
     * @private
     */
    this.maxZoom_ = options['maxZoom'] || null;
  
    this.styles_ = options['styles'] || [];
  
    /**
     * @type {string}
     * @private
     */
    this.imagePath_ = options['imagePath'] ||
        this.MARKER_CLUSTER_IMAGE_PATH_;
  
    /**
     * @type {string}
     * @private
     */
    this.imageExtension_ = options['imageExtension'] ||
        this.MARKER_CLUSTER_IMAGE_EXTENSION_;
  
    /**
     * @type {boolean}
     * @private
     */
    this.zoomOnClick_ = true;
  
    if (options['zoomOnClick'] != undefined) {
      this.zoomOnClick_ = options['zoomOnClick'];
    }
  
    /**
     * @type {boolean}
     * @private
     */
    this.averageCenter_ = false;
  
    if (options['averageCenter'] != undefined) {
      this.averageCenter_ = options['averageCenter'];
    }
  
    this.setupStyles_();
  
    this.setMap(map);
  
    /**
     * @type {number}
     * @private
     */
    this.prevZoom_ = this.map_.getZoom();
  
    // Add the map event listeners
    var that = this;
    google.maps.event.addListener(this.map_, 'zoom_changed', function() {
      // Determines map type and prevent illegal zoom levels
      var zoom = that.map_.getZoom();
      var minZoom = that.map_.minZoom || 0;
      var maxZoom = Math.min(that.map_.maxZoom || 100,
                           that.map_.mapTypes[that.map_.getMapTypeId()].maxZoom);
      zoom = Math.min(Math.max(zoom,minZoom),maxZoom);
  
      if (that.prevZoom_ != zoom) {
        that.prevZoom_ = zoom;
        that.resetViewport();
      }
    });
  
    google.maps.event.addListener(this.map_, 'idle', function() {
      that.redraw();
    });
  
    // Finally, add the markers
    if (opt_markers && (opt_markers.length || Object.keys(opt_markers).length)) {
      this.addMarkers(opt_markers, false);
    }
  }
  
  
  /**
   * The marker cluster image path.
   *
   * @type {string}
   * @private
   */
  MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '../images/m';
  
  
  /**
   * The marker cluster image path.
   *
   * @type {string}
   * @private
   */
  MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';
  
  
  /**
   * Extends a objects prototype by anothers.
   *
   * @param {Object} obj1 The object to be extended.
   * @param {Object} obj2 The object to extend with.
   * @return {Object} The new extended object.
   * @ignore
   */
  MarkerClusterer.prototype.extend = function(obj1, obj2) {
    return (function(object) {
      for (var property in object.prototype) {
        this.prototype[property] = object.prototype[property];
      }
      return this;
    }).apply(obj1, [obj2]);
  };
  
  
  /**
   * Implementaion of the interface method.
   * @ignore
   */
  MarkerClusterer.prototype.onAdd = function() {
    this.setReady_(true);
  };
  
  /**
   * Implementaion of the interface method.
   * @ignore
   */
  MarkerClusterer.prototype.draw = function() {};
  
  /**
   * Sets up the styles object.
   *
   * @private
   */
  MarkerClusterer.prototype.setupStyles_ = function() {
    if (this.styles_.length) {
      return;
    }
  
    for (var i = 0, size; size = this.sizes[i]; i++) {
      this.styles_.push({
        url: this.imagePath_ + (i + 1) + '.' + this.imageExtension_,
        height: size,
        width: size
      });
    }
  };
  
  /**
   *  Fit the map to the bounds of the markers in the clusterer.
   */
  MarkerClusterer.prototype.fitMapToMarkers = function() {
    var markers = this.getMarkers();
    var bounds = new google.maps.LatLngBounds();
    for (var i = 0, marker; marker = markers[i]; i++) {
      bounds.extend(marker.getPosition());
    }
  
    this.map_.fitBounds(bounds);
  };
  
  
  /**
   *  Sets the styles.
   *
   *  @param {Object} styles The style to set.
   */
  MarkerClusterer.prototype.setStyles = function(styles) {
    this.styles_ = styles;
  };
  
  
  /**
   *  Gets the styles.
   *
   *  @return {Object} The styles object.
   */
  MarkerClusterer.prototype.getStyles = function() {
    return this.styles_;
  };
  
  
  /**
   * Whether zoom on click is set.
   *
   * @return {boolean} True if zoomOnClick_ is set.
   */
  MarkerClusterer.prototype.isZoomOnClick = function() {
    return this.zoomOnClick_;
  };
  
  /**
   * Whether average center is set.
   *
   * @return {boolean} True if averageCenter_ is set.
   */
  MarkerClusterer.prototype.isAverageCenter = function() {
    return this.averageCenter_;
  };
  
  
  /**
   *  Returns the array of markers in the clusterer.
   *
   *  @return {Array.<google.maps.Marker>} The markers.
   */
  MarkerClusterer.prototype.getMarkers = function() {
    return this.markers_;
  };
  
  
  /**
   *  Returns the number of markers in the clusterer
   *
   *  @return {Number} The number of markers.
   */
  MarkerClusterer.prototype.getTotalMarkers = function() {
    return this.markers_.length;
  };
  
  
  /**
   *  Sets the max zoom for the clusterer.
   *
   *  @param {number} maxZoom The max zoom level.
   */
  MarkerClusterer.prototype.setMaxZoom = function(maxZoom) {
    this.maxZoom_ = maxZoom;
  };
  
  
  /**
   *  Gets the max zoom for the clusterer.
   *
   *  @return {number} The max zoom level.
   */
  MarkerClusterer.prototype.getMaxZoom = function() {
    return this.maxZoom_;
  };
  
  
  /**
   *  The function for calculating the cluster icon image.
   *
   *  @param {Array.<google.maps.Marker>} markers The markers in the clusterer.
   *  @param {number} numStyles The number of styles available.
   *  @return {Object} A object properties: 'text' (string) and 'index' (number).
   *  @private
   */
  MarkerClusterer.prototype.calculator_ = function(markers, numStyles) {
    var index = 0;
    var count = markers.length;
    var dv = count;
    while (dv !== 0) {
      dv = parseInt(dv / 10, 10);
      index++;
    }
  
    index = Math.min(index, numStyles);
    return {
      text: count,
      index: index
    };
  };
  
  
  /**
   * Set the calculator function.
   *
   * @param {function(Array, number)} calculator The function to set as the
   *     calculator. The function should return a object properties:
   *     'text' (string) and 'index' (number).
   *
   */
  MarkerClusterer.prototype.setCalculator = function(calculator) {
    this.calculator_ = calculator;
  };
  
  
  /**
   * Get the calculator function.
   *
   * @return {function(Array, number)} the calculator function.
   */
  MarkerClusterer.prototype.getCalculator = function() {
    return this.calculator_;
  };
  
  
  /**
   * Add an array of markers to the clusterer.
   *
   * @param {Array.<google.maps.Marker>} markers The markers to add.
   * @param {boolean=} opt_nodraw Whether to redraw the clusters.
   */
  MarkerClusterer.prototype.addMarkers = function(markers, opt_nodraw) {
    if (markers.length) {
      for (var i = 0, marker; marker = markers[i]; i++) {
        this.pushMarkerTo_(marker);
      }
    } else if (Object.keys(markers).length) {
      for (var marker in markers) {
        this.pushMarkerTo_(markers[marker]);
      }
    }
    if (!opt_nodraw) {
      this.redraw();
    }
  };
  
  
  /**
   * Pushes a marker to the clusterer.
   *
   * @param {google.maps.Marker} marker The marker to add.
   * @private
   */
  MarkerClusterer.prototype.pushMarkerTo_ = function(marker) {
    marker.isAdded = false;
    if (marker['draggable']) {
      // If the marker is draggable add a listener so we update the clusters on
      // the drag end.
      var that = this;
      google.maps.event.addListener(marker, 'dragend', function() {
        marker.isAdded = false;
        that.repaint();
      });
    }
    this.markers_.push(marker);
  };
  
  
  /**
   * Adds a marker to the clusterer and redraws if needed.
   *
   * @param {google.maps.Marker} marker The marker to add.
   * @param {boolean=} opt_nodraw Whether to redraw the clusters.
   */
  MarkerClusterer.prototype.addMarker = function(marker, opt_nodraw) {
    this.pushMarkerTo_(marker);
    if (!opt_nodraw) {
      this.redraw();
    }
  };
  
  
  /**
   * Removes a marker and returns true if removed, false if not
   *
   * @param {google.maps.Marker} marker The marker to remove
   * @return {boolean} Whether the marker was removed or not
   * @private
   */
  MarkerClusterer.prototype.removeMarker_ = function(marker) {
    var index = -1;
    if (this.markers_.indexOf) {
      index = this.markers_.indexOf(marker);
    } else {
      for (var i = 0, m; m = this.markers_[i]; i++) {
        if (m == marker) {
          index = i;
          break;
        }
      }
    }
  
    if (index == -1) {
      // Marker is not in our list of markers.
      return false;
    }
  
    marker.setMap(null);
  
    this.markers_.splice(index, 1);
  
    return true;
  };
  
  
  /**
   * Remove a marker from the cluster.
   *
   * @param {google.maps.Marker} marker The marker to remove.
   * @param {boolean=} opt_nodraw Optional boolean to force no redraw.
   * @return {boolean} True if the marker was removed.
   */
  MarkerClusterer.prototype.removeMarker = function(marker, opt_nodraw) {
    var removed = this.removeMarker_(marker);
  
    if (!opt_nodraw && removed) {
      this.resetViewport();
      this.redraw();
      return true;
    } else {
     return false;
    }
  };
  
  
  /**
   * Removes an array of markers from the cluster.
   *
   * @param {Array.<google.maps.Marker>} markers The markers to remove.
   * @param {boolean=} opt_nodraw Optional boolean to force no redraw.
   */
  MarkerClusterer.prototype.removeMarkers = function(markers, opt_nodraw) {
    var removed = false;
  
    for (var i = 0, marker; marker = markers[i]; i++) {
      var r = this.removeMarker_(marker);
      removed = removed || r;
    }
  
    if (!opt_nodraw && removed) {
      this.resetViewport();
      this.redraw();
      return true;
    }
  };
  
  
  /**
   * Sets the clusterer's ready state.
   *
   * @param {boolean} ready The state.
   * @private
   */
  MarkerClusterer.prototype.setReady_ = function(ready) {
    if (!this.ready_) {
      this.ready_ = ready;
      this.createClusters_();
    }
  };
  
  
  /**
   * Returns the number of clusters in the clusterer.
   *
   * @return {number} The number of clusters.
   */
  MarkerClusterer.prototype.getTotalClusters = function() {
    return this.clusters_.length;
  };
  
  
  /**
   * Returns the google map that the clusterer is associated with.
   *
   * @return {google.maps.Map} The map.
   */
  MarkerClusterer.prototype.getMap = function() {
    return this.map_;
  };
  
  
  /**
   * Sets the google map that the clusterer is associated with.
   *
   * @param {google.maps.Map} map The map.
   */
  MarkerClusterer.prototype.setMap = function(map) {
    this.map_ = map;
  };
  
  
  /**
   * Returns the size of the grid.
   *
   * @return {number} The grid size.
   */
  MarkerClusterer.prototype.getGridSize = function() {
    return this.gridSize_;
  };
  
  
  /**
   * Sets the size of the grid.
   *
   * @param {number} size The grid size.
   */
  MarkerClusterer.prototype.setGridSize = function(size) {
    this.gridSize_ = size;
  };
  
  
  /**
   * Returns the min cluster size.
   *
   * @return {number} The grid size.
   */
  MarkerClusterer.prototype.getMinClusterSize = function() {
    return this.minClusterSize_;
  };
  
  /**
   * Sets the min cluster size.
   *
   * @param {number} size The grid size.
   */
  MarkerClusterer.prototype.setMinClusterSize = function(size) {
    this.minClusterSize_ = size;
  };
  
  
  /**
   * Extends a bounds object by the grid size.
   *
   * @param {google.maps.LatLngBounds} bounds The bounds to extend.
   * @return {google.maps.LatLngBounds} The extended bounds.
   */
  MarkerClusterer.prototype.getExtendedBounds = function(bounds) {
    var projection = this.getProjection();
  
    // Turn the bounds into latlng.
    var tr = new google.maps.LatLng(bounds.getNorthEast().lat(),
        bounds.getNorthEast().lng());
    var bl = new google.maps.LatLng(bounds.getSouthWest().lat(),
        bounds.getSouthWest().lng());
  
    // Convert the points to pixels and the extend out by the grid size.
    var trPix = projection.fromLatLngToDivPixel(tr);
    trPix.x += this.gridSize_;
    trPix.y -= this.gridSize_;
  
    var blPix = projection.fromLatLngToDivPixel(bl);
    blPix.x -= this.gridSize_;
    blPix.y += this.gridSize_;
  
    // Convert the pixel points back to LatLng
    var ne = projection.fromDivPixelToLatLng(trPix);
    var sw = projection.fromDivPixelToLatLng(blPix);
  
    // Extend the bounds to contain the new bounds.
    bounds.extend(ne);
    bounds.extend(sw);
  
    return bounds;
  };
  
  
  /**
   * Determins if a marker is contained in a bounds.
   *
   * @param {google.maps.Marker} marker The marker to check.
   * @param {google.maps.LatLngBounds} bounds The bounds to check against.
   * @return {boolean} True if the marker is in the bounds.
   * @private
   */
  MarkerClusterer.prototype.isMarkerInBounds_ = function(marker, bounds) {
    return bounds.contains(marker.getPosition());
  };
  
  
  /**
   * Clears all clusters and markers from the clusterer.
   */
  MarkerClusterer.prototype.clearMarkers = function() {
    this.resetViewport(true);
  
    // Set the markers a empty array.
    this.markers_ = [];
  };
  
  
  /**
   * Clears all existing clusters and recreates them.
   * @param {boolean} opt_hide To also hide the marker.
   */
  MarkerClusterer.prototype.resetViewport = function(opt_hide) {
    // Remove all the clusters
    for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {
      cluster.remove();
    }
  
    // Reset the markers to not be added and to be invisible.
    for (var i = 0, marker; marker = this.markers_[i]; i++) {
      marker.isAdded = false;
      if (opt_hide) {
        marker.setMap(null);
      }
    }
  
    this.clusters_ = [];
  };
  
  /**
   *
   */
  MarkerClusterer.prototype.repaint = function() {
    var oldClusters = this.clusters_.slice();
    this.clusters_.length = 0;
    this.resetViewport();
    this.redraw();
  
    // Remove the old clusters.
    // Do it in a timeout so the other clusters have been drawn first.
    window.setTimeout(function() {
      for (var i = 0, cluster; cluster = oldClusters[i]; i++) {
        cluster.remove();
      }
    }, 0);
  };
  
  
  /**
   * Redraws the clusters.
   */
  MarkerClusterer.prototype.redraw = function() {
    this.createClusters_();
  };
  
  
  /**
   * Calculates the distance between two latlng locations in km.
   * @see http://www.movable-type.co.uk/scripts/latlong.html
   *
   * @param {google.maps.LatLng} p1 The first lat lng point.
   * @param {google.maps.LatLng} p2 The second lat lng point.
   * @return {number} The distance between the two points in km.
   * @private
  */
  MarkerClusterer.prototype.distanceBetweenPoints_ = function(p1, p2) {
    if (!p1 || !p2) {
      return 0;
    }
  
    var R = 6371; // Radius of the Earth in km
    var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;
    var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;
    var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
      Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *
      Math.sin(dLon / 2) * Math.sin(dLon / 2);
    var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
    var d = R * c;
    return d;
  };
  
  
  /**
   * Add a marker to a cluster, or creates a new cluster.
   *
   * @param {google.maps.Marker} marker The marker to add.
   * @private
   */
  MarkerClusterer.prototype.addToClosestCluster_ = function(marker) {
    var distance = 40000; // Some large number
    var clusterToAddTo = null;
    var pos = marker.getPosition();
    for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {
      var center = cluster.getCenter();
      if (center) {
        var d = this.distanceBetweenPoints_(center, marker.getPosition());
        if (d < distance) {
          distance = d;
          clusterToAddTo = cluster;
        }
      }
    }
  
    if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {
      clusterToAddTo.addMarker(marker);
    } else {
      var cluster = new Cluster(this);
      cluster.addMarker(marker);
      this.clusters_.push(cluster);
    }
  };
  
  
  /**
   * Creates the clusters.
   *
   * @private
   */
  MarkerClusterer.prototype.createClusters_ = function() {
    if (!this.ready_) {
      return;
    }
  
    // Get our current map view bounds.
    // Create a new bounds object so we don't affect the map.
    var mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),
        this.map_.getBounds().getNorthEast());
    var bounds = this.getExtendedBounds(mapBounds);
  
    for (var i = 0, marker; marker = this.markers_[i]; i++) {
      if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {
        this.addToClosestCluster_(marker);
      }
    }
  };
  
  
  /**
   * A cluster that contains markers.
   *
   * @param {MarkerClusterer} markerClusterer The markerclusterer that this
   *     cluster is associated with.
   * @constructor
   * @ignore
   */
  function Cluster(markerClusterer) {
    this.markerClusterer_ = markerClusterer;
    this.map_ = markerClusterer.getMap();
    this.gridSize_ = markerClusterer.getGridSize();
    this.minClusterSize_ = markerClusterer.getMinClusterSize();
    this.averageCenter_ = markerClusterer.isAverageCenter();
    this.center_ = null;
    this.markers_ = [];
    this.bounds_ = null;
    this.clusterIcon_ = new ClusterIcon(this, markerClusterer.getStyles(),
        markerClusterer.getGridSize());
  }
  
  /**
   * Determins if a marker is already added to the cluster.
   *
   * @param {google.maps.Marker} marker The marker to check.
   * @return {boolean} True if the marker is already added.
   */
  Cluster.prototype.isMarkerAlreadyAdded = function(marker) {
    if (this.markers_.indexOf) {
      return this.markers_.indexOf(marker) != -1;
    } else {
      for (var i = 0, m; m = this.markers_[i]; i++) {
        if (m == marker) {
          return true;
        }
      }
    }
    return false;
  };
  
  
  /**
   * Add a marker the cluster.
   *
   * @param {google.maps.Marker} marker The marker to add.
   * @return {boolean} True if the marker was added.
   */
  Cluster.prototype.addMarker = function(marker) {
    if (this.isMarkerAlreadyAdded(marker)) {
      return false;
    }
  
    if (!this.center_) {
      this.center_ = marker.getPosition();
      this.calculateBounds_();
    } else {
      if (this.averageCenter_) {
        var l = this.markers_.length + 1;
        var lat = (this.center_.lat() * (l-1) + marker.getPosition().lat()) / l;
        var lng = (this.center_.lng() * (l-1) + marker.getPosition().lng()) / l;
        this.center_ = new google.maps.LatLng(lat, lng);
        this.calculateBounds_();
      }
    }
  
    marker.isAdded = true;
    this.markers_.push(marker);
  
    var len = this.markers_.length;
    if (len < this.minClusterSize_ && marker.getMap() != this.map_) {
      // Min cluster size not reached so show the marker.
      marker.setMap(this.map_);
    }
  
    if (len == this.minClusterSize_) {
      // Hide the markers that were showing.
      for (var i = 0; i < len; i++) {
        this.markers_[i].setMap(null);
      }
    }
  
    if (len >= this.minClusterSize_) {
      marker.setMap(null);
    }
  
    this.updateIcon();
    return true;
  };
  
  
  /**
   * Returns the marker clusterer that the cluster is associated with.
   *
   * @return {MarkerClusterer} The associated marker clusterer.
   */
  Cluster.prototype.getMarkerClusterer = function() {
    return this.markerClusterer_;
  };
  
  
  /**
   * Returns the bounds of the cluster.
   *
   * @return {google.maps.LatLngBounds} the cluster bounds.
   */
  Cluster.prototype.getBounds = function() {
    var bounds = new google.maps.LatLngBounds(this.center_, this.center_);
    var markers = this.getMarkers();
    for (var i = 0, marker; marker = markers[i]; i++) {
      bounds.extend(marker.getPosition());
    }
    return bounds;
  };
  
  
  /**
   * Removes the cluster
   */
  Cluster.prototype.remove = function() {
    this.clusterIcon_.remove();
    this.markers_.length = 0;
    delete this.markers_;
  };
  
  
  /**
   * Returns the center of the cluster.
   *
   * @return {number} The cluster center.
   */
  Cluster.prototype.getSize = function() {
    return this.markers_.length;
  };
  
  
  /**
   * Returns the center of the cluster.
   *
   * @return {Array.<google.maps.Marker>} The cluster center.
   */
  Cluster.prototype.getMarkers = function() {
    return this.markers_;
  };
  
  
  /**
   * Returns the center of the cluster.
   *
   * @return {google.maps.LatLng} The cluster center.
   */
  Cluster.prototype.getCenter = function() {
    return this.center_;
  };
  
  
  /**
   * Calculated the extended bounds of the cluster with the grid.
   *
   * @private
   */
  Cluster.prototype.calculateBounds_ = function() {
    var bounds = new google.maps.LatLngBounds(this.center_, this.center_);
    this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);
  };
  
  
  /**
   * Determines if a marker lies in the clusters bounds.
   *
   * @param {google.maps.Marker} marker The marker to check.
   * @return {boolean} True if the marker lies in the bounds.
   */
  Cluster.prototype.isMarkerInClusterBounds = function(marker) {
    return this.bounds_.contains(marker.getPosition());
  };
  
  
  /**
   * Returns the map that the cluster is associated with.
   *
   * @return {google.maps.Map} The map.
   */
  Cluster.prototype.getMap = function() {
    return this.map_;
  };
  
  
  /**
   * Updates the cluster icon
   */
  Cluster.prototype.updateIcon = function() {
    var zoom = this.map_.getZoom();
    var mz = this.markerClusterer_.getMaxZoom();
  
    if (mz && zoom > mz) {
      // The zoom is greater than our max zoom so show all the markers in cluster.
      for (var i = 0, marker; marker = this.markers_[i]; i++) {
        marker.setMap(this.map_);
      }
      return;
    }
  
    if (this.markers_.length < this.minClusterSize_) {
      // Min cluster size not yet reached.
      this.clusterIcon_.hide();
      return;
    }
  
    var numStyles = this.markerClusterer_.getStyles().length;
    var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);
    this.clusterIcon_.setCenter(this.center_);
    this.clusterIcon_.setSums(sums);
    this.clusterIcon_.show();
  };
  
  
  /**
   * A cluster icon
   *
   * @param {Cluster} cluster The cluster to be associated with.
   * @param {Object} styles An object that has style properties:
   *     'url': (string) The image url.
   *     'height': (number) The image height.
   *     'width': (number) The image width.
   *     'anchor': (Array) The anchor position of the label text.
   *     'textColor': (string) The text color.
   *     'textSize': (number) The text size.
   *     'backgroundPosition: (string) The background postition x, y.
   * @param {number=} opt_padding Optional padding to apply to the cluster icon.
   * @constructor
   * @extends google.maps.OverlayView
   * @ignore
   */
  function ClusterIcon(cluster, styles, opt_padding) {
    cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView);
  
    this.styles_ = styles;
    this.padding_ = opt_padding || 0;
    this.cluster_ = cluster;
    this.center_ = null;
    this.map_ = cluster.getMap();
    this.div_ = null;
    this.sums_ = null;
    this.visible_ = false;
  
    this.setMap(this.map_);
  }
  
  
  /**
   * Triggers the clusterclick event and zoom's if the option is set.
   */
  ClusterIcon.prototype.triggerClusterClick = function() {
    var markerClusterer = this.cluster_.getMarkerClusterer();
  
    // Trigger the clusterclick event.
    google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster_);
  
    if (markerClusterer.isZoomOnClick()) {
      // Zoom into the cluster.
      this.map_.fitBounds(this.cluster_.getBounds());
    }
  };
  
  
  /**
   * Adding the cluster icon to the dom.
   * @ignore
   */
  ClusterIcon.prototype.onAdd = function() {
    this.div_ = document.createElement('DIV');
    if (this.visible_) {
      var pos = this.getPosFromLatLng_(this.center_);
      this.div_.style.cssText = this.createCss(pos);
      this.div_.innerHTML = this.sums_.text;
    }
  
    var panes = this.getPanes();
    panes.overlayMouseTarget.appendChild(this.div_);
  
    var that = this;
    google.maps.event.addDomListener(this.div_, 'click', function() {
      that.triggerClusterClick();
    });
  };
  
  
  /**
   * Returns the position to place the div dending on the latlng.
   *
   * @param {google.maps.LatLng} latlng The position in latlng.
   * @return {google.maps.Point} The position in pixels.
   * @private
   */
  ClusterIcon.prototype.getPosFromLatLng_ = function(latlng) {
    var pos = this.getProjection().fromLatLngToDivPixel(latlng);
    pos.x -= parseInt(this.width_ / 2, 10);
    pos.y -= parseInt(this.height_ / 2, 10);
    return pos;
  };
  
  
  /**
   * Draw the icon.
   * @ignore
   */
  ClusterIcon.prototype.draw = function() {
    if (this.visible_) {
      var pos = this.getPosFromLatLng_(this.center_);
      this.div_.style.top = pos.y + 'px';
      this.div_.style.left = pos.x + 'px';
    }
  };
  
  
  /**
   * Hide the icon.
   */
  ClusterIcon.prototype.hide = function() {
    if (this.div_) {
      this.div_.style.display = 'none';
    }
    this.visible_ = false;
  };
  
  
  /**
   * Position and show the icon.
   */
  ClusterIcon.prototype.show = function() {
    if (this.div_) {
      var pos = this.getPosFromLatLng_(this.center_);
      this.div_.style.cssText = this.createCss(pos);
      this.div_.style.display = '';
    }
    this.visible_ = true;
  };
  
  
  /**
   * Remove the icon from the map
   */
  ClusterIcon.prototype.remove = function() {
    this.setMap(null);
  };
  
  
  /**
   * Implementation of the onRemove interface.
   * @ignore
   */
  ClusterIcon.prototype.onRemove = function() {
    if (this.div_ && this.div_.parentNode) {
      this.hide();
      this.div_.parentNode.removeChild(this.div_);
      this.div_ = null;
    }
  };
  
  
  /**
   * Set the sums of the icon.
   *
   * @param {Object} sums The sums containing:
   *   'text': (string) The text to display in the icon.
   *   'index': (number) The style index of the icon.
   */
  ClusterIcon.prototype.setSums = function(sums) {
    this.sums_ = sums;
    this.text_ = sums.text;
    this.index_ = sums.index;
    if (this.div_) {
      this.div_.innerHTML = sums.text;
    }
  
    this.useStyle();
  };
  
  
  /**
   * Sets the icon to the the styles.
   */
  ClusterIcon.prototype.useStyle = function() {
    var index = Math.max(0, this.sums_.index - 1);
    index = Math.min(this.styles_.length - 1, index);
    var style = this.styles_[index];
    this.url_ = style['url'];
    this.height_ = style['height'];
    this.width_ = style['width'];
    this.textColor_ = style['textColor'];
    this.anchor_ = style['anchor'];
    this.textSize_ = style['textSize'];
    this.backgroundPosition_ = style['backgroundPosition'];
  };
  
  
  /**
   * Sets the center of the icon.
   *
   * @param {google.maps.LatLng} center The latlng to set as the center.
   */
  ClusterIcon.prototype.setCenter = function(center) {
    this.center_ = center;
  };
  
  
  /**
   * Create the css text based on the position of the icon.
   *
   * @param {google.maps.Point} pos The position.
   * @return {string} The css style text.
   */
  ClusterIcon.prototype.createCss = function(pos) {
    var style = [];
    style.push('background-image:url(' + this.url_ + ');');
    var backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';
    style.push('background-position:' + backgroundPosition + ';');
  
    if (typeof this.anchor_ === 'object') {
      if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&
          this.anchor_[0] < this.height_) {
        style.push('height:' + (this.height_ - this.anchor_[0]) +
            'px; padding-top:' + this.anchor_[0] + 'px;');
      } else {
        style.push('height:' + this.height_ + 'px; line-height:' + this.height_ +
            'px;');
      }
      if (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 &&
          this.anchor_[1] < this.width_) {
        style.push('width:' + (this.width_ - this.anchor_[1]) +
            'px; padding-left:' + this.anchor_[1] + 'px;');
      } else {
        style.push('width:' + this.width_ + 'px; text-align:center;');
      }
    } else {
      style.push('height:' + this.height_ + 'px; line-height:' +
          this.height_ + 'px; width:' + this.width_ + 'px; text-align:center;');
    }
  
    var txtColor = this.textColor_ ? this.textColor_ : 'black';
    var txtSize = this.textSize_ ? this.textSize_ : 11;
  
    style.push('cursor:pointer; top:' + pos.y + 'px; left:' +
        pos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' +
        txtSize + 'px; font-family:Arial,sans-serif; font-weight:bold');
    return style.join('');
  };
define("markerclusterer", function(){});

define('../src/journeys/j100-services-map/j100-services-map',['jquery', 'lib/utils', 'markerclusterer'], function($, utils) {

    'use strict';

    var J100_SERVICES_MAP = function($journey) {

        this.$journey = $journey;

        return this;
    };

    J100_SERVICES_MAP.prototype.init = function() {
        var _this = this;
        this.checkBoxes = this.$journey.find('.form-field__input--checkbox-filter');
        this.vtoken = this.$journey.find('[name="__RequestVerificationToken"]') != null ? this.$journey.find('[name="__RequestVerificationToken"]').val() : undefined;
        this.searchboxInit = false;
        this.overlayType = 0;
        this.displayFilter = [];
        this.procsPin = [];
        this.selectedChek = [];
        this.evMarkers = [];
        this.payMarkers = [];
        this.watMarkers = [];
        this.hapMarkers = [];
        this.evMarkersSearch = [];
        this.payMarkersSearch = [];
        this.watMarkersSearch = [];
        this.hapMarkersSearch = [];
        //this.markerCluster = null;
        //this.markerCluster2 = null;
        //this.markerCluster3 = null;
        //this.markerCluster4 = null;

        this.fastchargingMarkers = [];
        this.normalchargingMarkers = [];
        this.ultrafastchargingMarkers = [];
        this.wallmountchargingMarkers = [];
        this.serviceMarkers = [];
        this.paymentMarkers = [];
        this.waterSupplyMarkers = [];
        this.otherPaymentsMarkers = [];
        this.ATMMarkers = [];
        this.ENOCMarkers = [];
        this.EPPCOMarkers = [];
        this.CDMMarkers = [];

        this.AvailableFastCHMarkers = [];
        this.OccupiedFastCHMarkers = [];
        this.MaintFastCHMarkers = [];

        this.AvailableUlFastCHMarkers = [];
        this.OccupiedUlFastCHMarkers = [];
        this.MaintUlFastCHMarkers = [];

        this.AvailableWallCHMarkers = [];
        this.OccupiedWallCHMarkers = [];
        this.MaintWallCHMarkers = [];

        this.AvailableNormalCHMarkers = [];
        this.OccupiedNormalCHMarkers = [];
        this.MaintNormalCHMarkers = [];

        this.serviceCentresOpenMarkers = [];
        this.serviceCentresCloseMarkers = [];

        this.markerList = [
            this.serviceMarkers,
            this.waterSupplyMarkers,
            this.paymentMarkers,
            this.fastchargingMarkers,
            this.normalchargingMarkers,
            this.wallmountchargingMarkers,
            this.ultrafastchargingMarkers,
            this.otherPaymentsMarkers,
            this.ATMMarkers,
            this.EPPCOMarkers,
            this.ENOCMarkers,
            this.CDMMarkers,
            this.AvailableFastCHMarkers,
            this.OccupiedFastCHMarkers,
            this.MaintFastCHMarkers,
            this.AvailableUlFastCHMarkers,
            this.OccupiedUlFastCHMarkers,
            this.MaintUlFastCHMarkers,
            this.AvailableWallCHMarkers,
            this.OccupiedWallCHMarkers,
            this.MaintWallCHMarkers,
            this.AvailableNormalCHMarkers,
            this.OccupiedNormalCHMarkers,
            this.MaintNormalCHMarkers,
            this.serviceCentresOpenMarkers,
            this.serviceCentresCloseMarkers
        ];

        this.searchField1 = $('input[name="map_search_desktop"]');
        this.searchField2 = $('input[name="map_search_mobile"]');
        this.defaultZoom = 18;
        this.searchLocation = null;
        this.userLocation = null;
        this.labels = $(this.$journey).data('labels');
        this.specific = $(this.$journey).data('specific');
        this.pins = $(this.$journey).data('pins');
        this.EVloaded = false;
        this.currentClickedMarker;
        this.currentClickedMarkerIcon;
        this.isClickInProgress = false;

        // demo server location workaround
        this.urlPrefix = '../../..';
        if (window.location.href.indexOf('demo.brilliantbasics.com') != -1) {
            this.urlPrefix = '../../..';
        }

        // category text
        const labelMappings = {
            'data-txt-pay': _this.labels.paymentPoints,
            'data-txt-charger': _this.labels.chargingPoints,
            'data-txt-water': _this.labels.waterSupplyPoints,
            'data-txt-customer': _this.labels.serviceCentres,
            'data-txt-enoc': _this.labels.ENOC,
            'data-txt-espm': _this.labels.ATM,
            'data-txt-eppco': _this.labels.EPPCO,
            'data-txt-cdm': _this.labels.cdmpoints,
            'data-txt-NCPoints': _this.labels.normalchargingPoints,
            'data-txt-FCPoints': _this.labels.AvailableFastCH,
            'data-txt-UFCPoints': _this.labels.AvailableUlFastCH,
            'data-txt-WMCPoints': _this.labels.AvailableWallCH
        };
        
        $.each(labelMappings, function(dataAttr, label) {
            _this.$journey.find(`[${dataAttr}]`).text(label);
        });
        

        if (_this.specific || !_this.specific === '') {
            switch (_this.specific) {
                case 'e':
                    _this.displayFilter.push(4, 5, 6, 7)
                    break;
                case 'h':
                    $('.filter-charger').click()
                    break;
                case 'p':
                    _this.displayFilter.push(3)
                    break;
                case 'w':
                    $('.filter-water').click()
                    break;
            }
        } else {
            _this.displayFilter.push(1, 2, 3, 4, 5, 6, 7)
        }

        /*if (window.check) {
            if (window.check == 'head') {
                _this.$journey.find('[name="j100_checkbox_desktop1"]').prop('checked', true);
                _this.$journey.find('[name="j100_checkbox_mobile1"]').prop('checked', true);
                _this.displayFilter.push(1);
            } else if (window.check == 'all') {
                _this.displayFilter = [];
                _this.displayFilter.push(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 99)
            } else {
                _this.$journey.find('[name="j100_checkbox_desktop' + window.check + '"]').prop('checked', true);
                _this.$journey.find('[name="j100_checkbox_mobile' + window.check + '"]').prop('checked', true);
                _this.displayFilter.push(window.check);
            };

            setTimeout(function () {
                _this.checkBoxes.each(function () {
                    // $(this).prop('checked', false);
                });
                if (window.check == 'head') {
                    _this.$journey.find('[name="j100_checkbox_desktop1"]').prop('checked', true);
                    _this.$journey.find('[name="j100_checkbox_mobile1"]').prop('checked', true);
                } else if (window.check == 'all') {
                    _this.displayFilter = [];
                    _this.displayFilter.push(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 99)
                } else {
                    _this.$journey.find('[name="j100_checkbox_desktop' + window.check + '"]').prop('checked', true);
                    _this.$journey.find('[name="j100_checkbox_mobile' + window.check + '"]').prop('checked', true);
                };
            }, 100);
        };*/

        /*this.searchField1.on('keypress', function(e) {
            if ($(e.target).val() !== '' && e.charCode == 13) {
                $(e.target).blur();
            }
        });

        this.searchField2.on('keypress', function(e) {
            if ($(e.target).val() !== '' && e.charCode == 13) {
                $(e.target).blur();
            }
        });*/

        // listen for mapLoaded event
        $(window).off('mapLoaded').on('mapLoaded',function() {
            setTimeout(function() {
                _this.map = window.MAP.map;
                _this.loadData([1, 2, 4, 99]);

                _this.centerPoint = _this.map.getCenter();
                _this.map.addListener('dragend', function() {
                    _this.centerPoint = _this.map.getCenter();
                    _this.map.setCenter(_this.centerPoint);
                });

                // $(window).off('evLoad').on('evLoad', function() {
                //     _this.EVLoadData();
                // })
            }, 100);
        });

        $(window).on('resize orientationchange', function() {
            setTimeout(function() {
                _this.map.setCenter(_this.centerPoint);
            }, 100);
        });



        $('.j100-services-map__filters-modal .form-field__fakecheckbox').on('click', function() {

        })

        $('.reset').on('click', function() {
            $('.form-field__checkbox-filter').removeClass('hidden')
            $('.form-field__checkbox-filter-details').addClass('hidden')
            $('.form-field__input--checkbox-filter:checked').prop('checked', false)
            $('.form-field__input--checkbox-filter').prop('disabled', false)

            $('.form-field__checkbox-filter-details').find('.form-field__input--checkbox').prop('checked', false)
            $('.form-field__checkbox-filter-details').find('.button').removeClass('btn-active')
            $('.j100-services-map__filters-modal').each(function(){
                if(!$(this).hasClass('hidden')){
                    _this.hideModal($(this));
                }
            })

            _this.displayFilter = [];
            _this.displayFilter.push(1, 2, 3, 4, 5, 6, 7)
            _this.populateMap()
            _this.getLocationBySensor(false)
        })

        $('.select-all').on('click', function() {
            var thisModal = $(this).closest('.j100-services-map__filters-modal');
            thisModal.find('.form-field__input--checkbox').prop("checked", true)
            _this.checkChange(thisModal);
        })
        $('.select-clear').on('click', function() {
            var thisModal = $(this).closest('.j100-services-map__filters-modal');
            thisModal.find('.form-field__input--checkbox').prop("checked", false)
            _this.checkChange(thisModal);
        })
        $('.select-cancel').on('click', function () {
            $('.j100-services-map__filters-modal').each(function(){
                if(!$(this).hasClass('hidden')){
                    _this.hideModal($(this));
                }
            })
        })



        $('.show-location').on('click', function() {
            var thisModal = $(this).closest('.j100-services-map__filters-modal'),
                thisButton = thisModal.hasClass('charger-type-modal') ? $('.charger-type-btn') : thisModal.hasClass('charger-status-modal') ? $('.charger-status-btn') : thisModal.hasClass('payment-type-modal') ? $('.payment-type-btn') : $('.sc-status-btn'),
                countCheck = 0;
            if (thisModal.find('.form-field__input--checkbox:checked').length > 0) {
                thisModal.find('.form-field__input--checkbox').each(function() {
                    if ($(this).prop("checked")) {
                        countCheck++
                    }
                })
                _this.getChecked(thisModal);
                _this.populateMap();
                _this.getLocationBySensor(false);

                thisButton.addClass('btn-active');
                thisButton.find('.fl-count').empty();
                thisButton.find('.fl-count').html(countCheck)
                thisModal.find('.filters-modal-close').click()
            } else {
                _this.getChecked(thisModal);
                _this.populateMap();
                _this.getLocationBySensor(false);

                thisButton.removeClass('btn-active');
                thisButton.find('.fl-count').empty();
                //$('.charger-type-btn').removeClass('btn-active')
                //_this.displayFilter = [];
                //_this.populateMap(true)
            }

        })

        $('.j100-services-map__filters-modal').each(function() {
            var modal = $(this);
            var mask = modal.closest('.form-field__checkbox-filter-details').find('.j100-services-map_mask');

            function updateMaskVisibility() {
                if (!modal.hasClass('hidden')) {
                    mask.addClass('show-mask');
                } else {
                    mask.removeClass('show-mask');
                }
            }
            updateMaskVisibility();

            var observer = new MutationObserver(updateMaskVisibility);
            observer.observe(modal[0], { attributes: true, attributeFilter: ['class'] });
        });



        $('.filters-modal-close').on('click', function() {
            var thisModal = $(this).closest('.j100-services-map__filters-modal');
            _this.hideModal(thisModal)
            //console.log(_this.selectedChek)
            //_this.checkMake()
        })
        $('.filters-modal-cat-close').on('click', function() {
            var thisModal = $(this).closest('.j100-services-map__cat-modal');
            thisModal.addClass('hidden')
        })
        $('.form-field__checkbox-filter-input .form-field__fakecheckbox').off().on('click',function(){
            var thischeckBox = $(this).closest('.form-field__checkbox-filter-input').find('.form-field__input--checkbox-filter');
            if(thischeckBox.is(':checked')){
                $('.j100-services-map__cat-modal').removeClass('hidden');
                $('.j100-services-map__filters-modal').each(function(){
                    if(!$(this).hasClass('hidden')){
                        _this.hideModal($(this));
                    }
                })
                if ($('.m32-map__overlay').css('display') === 'block') {
                    _this.hideDetailsModal()
                }
            }
        })
        $('.modal-cat-item').on('click',function(){
            var catTrigger = $(this).data('dropdown-trigger'),
                activeCat = $('.modal-cat-item.active').data('dropdown-trigger');
                $('[data-cat-item = "'+activeCat+'"]').find('.reset').click();
            if(!(catTrigger == 'All')){
                $('[data-cat-item = "'+catTrigger+'"]').find('.form-field__input--checkbox-filter').click();
            }
            $('.filters-modal-cat-close').click()
        })

        $('.reset-filter').on('click',function(){
            var closeCat = $(this).closest('.form-field__checkbox-filter');
            closeCat.find('.reset').click();
            $('.j100-services-map__filters-modal').each(function(){
                if(!$(this).hasClass('hidden')){
                    _this.hideModal($(this));
                }
            })
            closeCat.find('.form-field__input--checkbox-filter').click();
        })
            
        $('.payment-type-btn').on('click', function() {
            var thisButton = $(this);
            if (!thisButton.hasClass('modal-active')) {
                _this.checkMake()
                _this.checkChange($('.payment-type-modal'))
                $('.j100-services-map__filters-modal').each(function(){
                    if(!$(this).hasClass('hidden')){
                        _this.hideModal($(this));
                    }
                })
                if ($('.m32-map__overlay').css('display') === 'block') {
                    _this.hideDetailsModal()
                }
                $('.payment-type-modal').removeClass('hidden')
                $(this).addClass('modal-active')
            }
        })

        $('.charger-type-btn').on('click', function() {
            var thisButton = $(this);
            if (!thisButton.hasClass('modal-active')) {
                _this.checkMake()
                _this.checkChange($('.charger-type-modal'))
                $('.j100-services-map__filters-modal').each(function(){
                    if(!$(this).hasClass('hidden')){
                        _this.hideModal($(this));
                    }
                })
                if ($('.m32-map__overlay').css('display') === 'block') {
                    _this.hideDetailsModal()
                }
                $('.charger-type-modal').removeClass('hidden')
                $(this).addClass('modal-active')
            }
        })

        $('.charger-status-btn').on('click', function() {
            var thisButton = $(this);
            if (!thisButton.hasClass('modal-active')) {
                _this.checkMake()
                _this.checkChange($('.charger-status-modal'))
                $('.j100-services-map__filters-modal').each(function(){
                    if(!$(this).hasClass('hidden')){
                        _this.hideModal($(this));
                    }
                })
                if ($('.m32-map__overlay').css('display') === 'block') {
                    _this.hideDetailsModal()
                }
                $('.charger-status-modal').removeClass('hidden')
                $(this).addClass('modal-active')
            }
        })

        $('.sc-status-btn').on('click', function() {
            var thisButton = $(this);
            if (!thisButton.hasClass('modal-active')) {
                _this.checkMake()
                _this.checkChange($('.sc-status-modal'))
                $('.j100-services-map__filters-modal').each(function(){
                    if(!$(this).hasClass('hidden')){
                        _this.hideModal($(this));
                    }
                })
                if ($('.m32-map__overlay').css('display') === 'block') {
                    _this.hideDetailsModal()
                }
                $('.sc-status-modal').removeClass('hidden')
                $(this).addClass('modal-active')
            }
        })

        $('.form-field__countcheckbox').on('click', function() {
            var thismodal = $(this).closest('.j100-services-map__filters-modal'),
                checkedItem = thismodal.find('.form-field__input--checkbox:checked');


            setTimeout(function() {
                _this.checkChange(thismodal)
            }, 250)

            /* if (checkedCount === totalCheckboxes - 4) {
                 thismodal.find('.show-location').addClass('disabled');
                 //checkedItem.closest('.form-field__checkbox-sort-filter').addClass('form-field--disabled')
 
             } else {
                 thismodal.find('.show-location').removeClass('disabled');
                 //thismodal.find('.form-field__checkbox-sort-filter').removeClass('form-field--disabled')
 
             }*/
        })
        this.checkBoxes.on('click',function(){
            console.log('click')
        })

        this.checkBoxes.each(function(e) {
            $(this).prop('checked', false)
            $(this).off().on('click', function() {
                var thisParent = $(this).closest('.form-field__checkbox-filter'),
                    thisDetails = thisParent.find('.form-field__checkbox-filter-details'),
                    thisChildFilter = thisDetails.find('.form-field__input--checkbox'),
                    thisChildModal = thisDetails.find('.j100-services-map__filters-modal'),
                    thisCatName = thisParent.data('cat-item');
                _this.displayFilter = [];

                if ($(this).prop("checked")) {
                    if (parseInt($(this).val()) == 4) {
                        _this.displayFilter.push(4, 5, 6, 7)
                    } else if (parseInt($(this).val()) == 3) {
                        _this.displayFilter.push(8, 9, 10, 11, 12)
                    } else {
                        _this.displayFilter.push(parseInt($(this).val()));
                    }
                    if (!_this.specific || _this.specific === '') {
                        _this.loadData([parseInt($(this).val())]);
                    }
                    $(this).prop('disabled', true)
                }
                /*else {
                    _this.displayFilter.splice(_this.displayFilter.indexOf(parseInt($(this).val())), 1);
                    if (_this.$journey.find('.j100-filters_desktop').find('.form-field__input--checkbox:checked').length == 0 && $(window).width() > 1024) {
                        _this.populateMap(true);
                    } else if (_this.$journey.find('.j100-services-map__filters--mobile').find('.form-field__input--checkbox:checked').length == 0 && $(window).width() <= 1024) {
                        _this.populateMap(true);
                    } else {
                        _this.populateMap(false);
                    }
                }*/
                //_this.populateMap(false);
                //_this.getLocationBySensor();


                $('.form-field__checkbox-filter').addClass('hidden')
                $('.form-field__checkbox-filter .form-field__checkbox-filter-details').addClass('hidden')

                thisParent.removeClass('hidden')
                thisDetails.removeClass('hidden')

                $('.modal-cat-item').removeClass('active');
                $('[data-dropdown-trigger="'+thisCatName+'"]').addClass('active');

                if (thisChildFilter.length > 0) {
                    _this.selectedChek = [];
                    thisChildFilter.each(function() {
                        // $(this).prop('checked', true)
                        //_this.selectedChek.push(parseInt($(this).val()))
                    });
                }
                if (thisChildModal.length > 0) {
                    thisChildModal.each(function() {
                        _this.resetChecked($(this))
                    })
                }

            });
        });

        this.$journey.find('.j100-expander_input').off('click.j100').on('click.j100', function() {
            if ($(this).hasClass('open')) {
                $(this).removeClass('open');
                $(this).addClass('closed');
                _this.$journey.find('.j100-filters_desktop').hide();
            } else {
                $(this).removeClass('closed');
                $(this).addClass('open');
                _this.$journey.find('.j100-filters_desktop').show();
            };
        })

        //this.getLocationBySensor();

        /*$('input[name="map_search_desktop"], input[name="map_search_mobile"]').on('focus', function() {
            _this.searchField1.val('');
            _this.searchField2.val('');
            _this.searchLocation = null;
            if (!this.searchboxInit) {
                _this.initSearchBox();
            }
        });*/

        $(this.$journey).on('click', '.m32-map__button--close', function() {
            _this.hideDetailsModal()
        });

        $('.m32-map__list-section-items').on('click', '.m32-map__list-item', function(event) {
            if (!$(event.target).hasClass('m32-map__list-item-title--direction-link') && !$(event.target).closest('.m32-map__list-item-title--direction-link').length) {
                var index = $(this).index();

                $(this).closest('.m32-map__list-section-items').find('.m32-map__list-item').removeClass('active');
                $(this).addClass('active');
                _this.pop(index);
            }
        });

        //_this.resetChecked()
        setTimeout(function() {
            if (_this.specific || !_this.specific === '') {
                switch (_this.specific) {
                    case 'e':
                        $('.filter-charger .form-field__input--checkbox-filter').click()
                        $('.filter-charger .reset').hide()
                        $('.filter-charger .form-field__checkbox-filter-input').addClass('disable-mouse')
                        break;
                    case 'h':
                        $('.filter-charger').click()
                        break;
                    case 'p':
                        $('.filter-payment .form-field__input--checkbox-filter').click()
                        $('.filter-payment .reset').hide()
                        $('.filter-payment .form-field__checkbox-filter-input').addClass('disable-mouse')
                        break;
                    case 'w':
                        $('.filter-water').click()
                        break;
                }
            }
        }, 2000)


        _this.mapMobileResize()
        $(window).on('resize orientationchange', function() {
            _this.mapMobileResize()
        });

        $('.m32-map__search .form-field__input--text').on('input keypress', function(event) {
            //var inputText = $(this).val().toLowerCase().split(/\s+/).filter(word => word.length > 0);
            var inputText = [$(this).val().toLowerCase()];  // Split input text and remove empty strings
            //if (inputText.length > 0 && !(inputText.length === 1 && inputText[0].length <= 1)) {
            if (inputText.length > 0 ) {
                if (event.type === 'keypress' && (event.which === 13 || event.keyCode === 13)) {
                    _this.searchCustom(inputText);
                } else if (event.type === 'input') {
                    _this.searchCustom(inputText);
                }
            }else{
                $('.m32-map__list-item').show()
                _this.clearClusters()
            setTimeout(function () {
                _this.clearClusters()
                _this.clusterMarker()
            }, 2000);
                _this.procsPin.forEach(function(proc, index) {
                    proc.marker.setVisible(true);
                });
                _this.setMapBounds()
                /*_this.map.setCenter(_this.centerPoint);
                if (_this.map.zoom < _this.defaultZoom) {
                    _this.map.setZoom(_this.defaultZoom);
                }*/
            }
        });


       $(document).click(function(event) {
            // Check if the clicked element is not the modal and not a descendant of the modal
            var $openModal = $('.j100-services-map__filters-modal:not(.hidden)');

            if($openModal.length > 0){
                $openModal.each(function(){
                    if (!$(this).is(event.target) && $(this).has(event.target).length === 0 && !$(event.target).hasClass('modal-active') && !$(event.target).closest('button').hasClass('modal-active'))  {
                        _this.hideModal($(this));
                    }
                })
            }
            if(!$(event.target).closest('div').hasClass('form-field__checkbox-filter-input')){
                $('.j100-services-map__cat-modal').addClass('hidden')
            }
        });
    };
    
    J100_SERVICES_MAP.prototype.hideModal = function(thisModal) {
        var modalButton = thisModal.closest('.form-field__checkbox-filter-details').find('.modal-active');
        thisModal.addClass('hidden')
        modalButton.removeClass('modal-active');
    }

    J100_SERVICES_MAP.prototype.hideDetailsModal = function() {
        var _this = this;
            _this.hideDetails();
            if(_this.currentClickedMarkerIcon){
                _this.currentClickedMarker.setIcon(_this.currentClickedMarkerIcon);
            }
            _this.currentClickedMarker = null;
            _this.currentClickedMarkerIcon = null;
            _this.map.setZoom(15);
    }

    J100_SERVICES_MAP.prototype.searchCustom = function(sertxt) {
         
        var searchItemIndex = [],
            _this = this;
        $('.m32-map__list-item').hide();
        $('.m32-map__list-item').filter(function() {
            var titleText = $(this).find('.m32-map__list-item-title--text').text().toLowerCase();
            var subtitleText = $(this).find('.m32-map__list-item-subtitle--text').text().toLowerCase();
            var categoryText = $(this).find('.catgory-txt').text().toLowerCase();
            return sertxt.every(word => titleText.includes(word) || subtitleText.includes(word) || categoryText.includes(word));
        }).each(function() {
            var index = $(this).index();
            searchItemIndex.push(index)
            $(this).show(); // Shows the filtered items_
        });

            let visibleIndicesSet = new Set(searchItemIndex);
            _this.procsPin.forEach(function(proc, index) {
                proc.marker.setVisible(visibleIndicesSet.has(index));
            });

            _this.evMarkersSearch = _this.evMarkers.filter(function(marker) {
                return marker.visible;
            })
            _this.payMarkersSearch = _this.payMarkers.filter(function(marker) {
                return marker.visible;
            })
            _this.watMarkersSearch = _this.watMarkers.filter(function(marker) {
                return marker.visible;
            })
            _this.hapMarkersSearch = _this.hapMarkers.filter(function(marker) {
                return marker.visible; 
            })
            _this.clearClusters()
            setTimeout(function () {
                _this.clearClusters()
                _this.clusterMarker(true)
            }, 2000);
            _this.hideDetailsModal()
            _this.map.setCenter(_this.procsPin[searchItemIndex[0]].marker.position);

            _this.setMapBounds()
        //
    }

    J100_SERVICES_MAP.prototype.mapMobileResize = function() {
        if (utils.breakpoint() == 's' || utils.breakpoint() == 'm') {
            var tHeight = 0,
                setHeight = 0;
            if ($('.location-map-title-grid__row').length > 0) {
                tHeight = $('.location-map-title-grid__row').outerHeight(true)
            }
            setHeight = $(window).height() - ($('.m12-masthead').height() + $('.m13-footer--floating').height() + tHeight)
            if ($(window).height() < 525) {
                setHeight = 300;
            }
            $('.m32-map').css('height', setHeight)
            $('#map').css('height', setHeight - 100)
        }
        if (utils.breakpoint() == 'l') {
            $('.m32-map').removeAttr('style')
            $('#map').removeAttr('style')
        }
    }

    J100_SERVICES_MAP.prototype.checkChange = function(modal, btnint) {
        var _this = this,
            allItem = modal.find('.form-field__input--checkbox'),
            modal1Values = [],
            modal2Values = [],
            combinations = [],
            cominationCheck = true,
            checkZero = true,
            n, m, showcount = 0;

        _this.displayFilter = [];

        if (modal.hasClass('charger-type-modal') || modal.hasClass('charger-status-modal')) {
            if ($('.charger-type-modal .form-field__input--checkbox:checked').length != 0) {
                $('.charger-type-modal .form-field__input--checkbox:checked').each(function() {
                    modal1Values.push(parseInt($(this).val()));
                });
                checkZero = false;
            } else {
                $('.charger-type-modal .form-field__input--checkbox').each(function() {
                    modal1Values.push(parseInt($(this).val()));
                });
            };
            if ($('.charger-status-modal .form-field__input--checkbox:checked').length != 0) {
                $('.charger-status-modal .form-field__input--checkbox:checked').each(function() {
                    modal2Values.push(parseInt($(this).val()));
                });
                checkZero = false;
            } else {
                $('.charger-status-modal .form-field__input--checkbox').each(function() {
                    modal2Values.push(parseInt($(this).val()));
                });
            };
        } else {
            if (modal.find('.form-field__input--checkbox:checked').length != 0) {
                modal.find('.form-field__input--checkbox:checked').each(function() {
                    combinations.push(parseInt($(this).val()));
                });
                checkZero = false;
            } else {
                modal.find('.form-field__input--checkbox').each(function() {
                    combinations.push(parseInt($(this).val()));
                });
            }
            cominationCheck = false;
        }


        if (cominationCheck) {
            // combinations = modal1Values.concat(modal2Values)
            modal1Values.forEach(function(val1) {
                modal2Values.forEach(function(val2) {
                    combinations.push(val1.toString() + val2.toString());
                });
            });
        }

        _this.displayFilter = combinations


        if (_this.displayFilter.length > 0) {
            for (n = 0; n < _this.displayFilter.length; n++) {
                var filter = _this.getFilterContent(_this.displayFilter[n]);
                for (m = 0; m < filter.items.length; m++) {
                    showcount++
                }
            }
        }
        modal.find('.loccount').html(showcount)
        if(showcount == 0){
            modal.find('.show-location').addClass('disabled')
        }else{
            modal.find('.show-location').removeClass('disabled')
        }
        if (!checkZero) {
            //modal.find('.show-location').removeClass('disabled');
            modal.find('.loccount').show();
           modal.find('.select-cancel').hide()
           modal.find('.select-clear').show()
        } else {
            //modal.find('.show-location').addClass('disabled')
            modal.find('.loccount').hide();
            modal.find('.select-cancel').show()
            modal.find('.select-clear').hide()
        }
    };

    J100_SERVICES_MAP.prototype.resetChecked = function(mod) {
        var thisTrigger = $('.' + mod.data('trigger')),
            checkedCount = mod.find('.form-field__input--checkbox:checked').length;
        if (checkedCount > 0) {
            thisTrigger.addClass('btn-active')
            thisTrigger.find('.fl-count').empty()
            thisTrigger.find('.fl-count').html(checkedCount)
        }
    }

    J100_SERVICES_MAP.prototype.getChecked = function(thisModal) {
        var _this = this;
        _this.selectedChek = [];
        if (thisModal.hasClass('charger-type-modal') || thisModal.hasClass('charger-status-modal')) {

            if ($('.charger-type-modal .form-field__input--checkbox:checked').length != 0) {
                $('.charger-type-modal .form-field__input--checkbox:checked').each(function() {
                    _this.selectedChek.push(parseInt($(this).val()))
                });
            } else {
                $('.charger-type-modal .form-field__input--checkbox').each(function() {
                   // _this.selectedChek.push(parseInt($(this).val()))
                });
            }

            if ($('.charger-status-modal .form-field__input--checkbox:checked').length != 0) {
                $('.charger-status-modal .form-field__input--checkbox:checked').each(function() {
                    _this.selectedChek.push(parseInt($(this).val()))
                });
            } else {
                $('.charger-status-modal .form-field__input--checkbox').each(function() {
                   // _this.selectedChek.push(parseInt($(this).val()))
                });
            }


        } else {
            if (thisModal.find('.form-field__input--checkbox:checked').length != 0) {
                thisModal.find('.form-field__input--checkbox:checked').each(function() {
                    _this.selectedChek.push(parseInt($(this).val()))
                });
            } else {
                thisModal.find('.form-field__input--checkbox').each(function() {
                    _this.selectedChek.push(parseInt($(this).val()))
                });
            }
        }
    }

    J100_SERVICES_MAP.prototype.checkMake = function() {
        var _this = this;
        $('.form-field__countcheckbox').each(function() {
            var checkbox = $(this).closest('.form-field__checkbox').find('.form-field__input--checkbox');
            if ($.inArray(parseInt(checkbox.val()), _this.selectedChek) !== -1) {
                checkbox.prop('checked', true);
            } else {
                checkbox.prop('checked', false);
            }
        });
    }





    J100_SERVICES_MAP.prototype.getLocationBySensor = function(detailStatus) {
        var _this = this,
            defaultLatLng;
        if (!_this.searchLocation) {
            defaultLatLng = new google.maps.LatLng({ lat: 25.2265435, lng: 55.3238108 })
            var closestMarker = _this.getClosestMarker(defaultLatLng);
            _this.highlightLocation(closestMarker.lastitem, closestMarker.list, closestMarker.listItems, detailStatus);
            if (navigator.geolocation) {
                navigator.geolocation.getCurrentPosition(showPosition, showError);
            }
        } else {
            defaultLatLng = _this.searchLocation
            var closestMarker = _this.getClosestMarker(defaultLatLng);
            _this.highlightLocation(closestMarker.lastitem, closestMarker.list, closestMarker.listItems, detailStatus);
        }



        function showPosition(position) {
            try {
                var latlng = new google.maps.LatLng({ lat: position.coords.latitude, lng: position.coords.longitude });
                var closestMarker = _this.getClosestMarker(latlng);
                _this.userLocation = latlng;
                _this.highlightLocation(closestMarker.lastitem, closestMarker.list, closestMarker.listItems, detailStatus);
            } catch (err) {
                var closestMarker = _this.getClosestMarker(defaultLatLng);
                _this.highlightLocation(closestMarker.lastitem, closestMarker.list, closestMarker.listItems, detailStatus);
            }
        }

        function showError(error) {
            var closestMarker = _this.getClosestMarker(defaultLatLng);
            _this.highlightLocation(closestMarker.lastitem, closestMarker.list, closestMarker.listItems, detailStatus);
        }
    };

    J100_SERVICES_MAP.prototype.getClosestMarker = function(latlng) {
        var _this = this,
            n, latlng2, distance,
            lastResult = {},
            markersArray = [],
            itemsArray = [];
        // check for filtering

        // loop through the visible markers array and find the closest marker
        if (this.displayFilter.length > 0) {
            for (n = 0; n < this.displayFilter.length; n++) {
                var filter = _this.getFilterContent(this.displayFilter[n]);
                for (m = 0; m < filter.markers.length; m++) {
                    latlng2 = filter.markers[m].position;
                    distance = google.maps.geometry.spherical.computeDistanceBetween(latlng, latlng2);
                    markersArray.push({ marker: filter.markers[m], distance: distance });
                    itemsArray.push({ items: filter.items[m] });
                    if (!lastResult.i || distance < lastResult.val) {
                        lastResult = { i: m, val: distance, marker: filter.markers[m] };
                    }
                }
            }
        } else { // loop through all markers and find the closest marker
            for (n = 0; n < this.markerList.length; n++) {
                var list = this.markerList[n];
                for (var m = 0; m < list.length; m++) {
                    latlng2 = list[m].position;
                    distance = google.maps.geometry.spherical.computeDistanceBetween(latlng, latlng2);
                    if (!lastResult.i || distance < lastResult.val) {
                        lastResult = { i: m, val: distance, marker: list[m] };
                    }
                }
            }
        }
        markersArray.sort(function(a, b) {
            return a.distance - b.distance;
        });
        return { lastitem: lastResult.marker, list: markersArray, listItems: itemsArray };

        /*if (this.displayFilter.length > 0) {
            var markersArray = [];
        
            for (n = 0; n < this.displayFilter.length; n++) {
                var filter = _this.getFilterContent(this.displayFilter[n]);
                
                for (m = 0; m < filter.markers.length; m++) {
                    latlng2 = filter.markers[m].position;
                    distance = google.maps.geometry.spherical.computeDistanceBetween(latlng, latlng2);
        
                    markersArray.push({ marker: filter.markers[m], distance: distance });
                }
            }
        
            // Sort the array based on the distance
            markersArray.sort(function(a, b) {
                return a.distance - b.distance;
            });
        
            // Select top 10 closest markers
            var closestMarkers = markersArray.slice(0, 10).map(function(item) {
                return item.marker;
            });
        
            return closestMarkers;
        }*/
    };

    J100_SERVICES_MAP.prototype.setMapBounds = function() {
        var _this = this;
        _this.bounds = new google.maps.LatLngBounds();
        for (var i = 0; i < _this.procsPin.length; i++) {
            if(_this.procsPin[i].marker.visible && !isNaN(_this.procsPin[i].marker.lat) && !isNaN(_this.procsPin[i].marker.lng)){
                _this.bounds.extend(_this.procsPin[i].marker.getPosition());
            }
        }
        //_this.map.fitBounds(_this.bounds);  
        //_this.map.centrePoint = _this.map.getCenter();
        // Calculate the buffer zone
        var boundsNE = _this.bounds.getNorthEast();
        var boundsSW = _this.bounds.getSouthWest();
        var latBuffer = (boundsNE.lat() - boundsSW.lat()) * 0.10; // 10% buffer
        var lngBuffer = (boundsNE.lng() - boundsSW.lng()) * 0.10; // 10% buffer

        // Extend the bounds by the buffer
        var extendedNE = new google.maps.LatLng(boundsNE.lat() + latBuffer, boundsNE.lng() + lngBuffer);
        var extendedSW = new google.maps.LatLng(boundsSW.lat() - latBuffer, boundsSW.lng() - lngBuffer);
        _this.bounds.extend(extendedNE);
        _this.bounds.extend(extendedSW);

        _this.map.fitBounds(_this.bounds);
    };

    J100_SERVICES_MAP.prototype.loadData = function(items) {
        var _this = this,
            specificCat = _this.specific;
        var url = this.urlPrefix + '/content/data/payment_locations_en.json';
        if (utils.isRTL()) {
            url = this.urlPrefix + '/content/data/payment_locations_ar.json';
        }

        if (_this.displayFilter.length != 0) {
            if (_this.paymentPoints == undefined && _this.vtoken != undefined) {
                if (!specificCat || specificCat === '') {
                    _this.dataLoadDefalt(_this.urlPrefix)
                } else {
                    _this.dataLoadDefalt(_this.urlPrefix, specificCat)
                }
            } else {
                _this.populateMap(false);
                _this.getLocationBySensor();
            };
        } else {
            _this.populateMap(false);
        };
    };




    J100_SERVICES_MAP.prototype.dataLoadDefalt = function(urlev, spcat) {
        var _this = this;
        _this.$journey.find('.j100-filters_desktop,.j100-services-map__filters--mobile').addClass('loading');

        var mapInputs = {
            "vendorid": "",
            "lang": $('html').attr('lang') == 'en' ? "EN" : "AR"
        };

        if (typeof spcat === 'undefined') {
            mapInputs.happinesscenter = "X";
            mapInputs.watersupplypoint = "X";
            mapInputs.evcharger = "X";
            mapInputs.paymentlocation = "X";
        } else {
            switch (spcat) {
                case 'e':
                    mapInputs.evcharger = "X";
                    break;
                case 'h':
                    mapInputs.happinesscenter = "X";
                    break;
                case 'p':
                    mapInputs.paymentlocation = "X";
                    break;
                case 'w':
                    mapInputs.watersupplypoint = "X";
                    break;
            }
        }

        $.ajax({
            //url: urlev + '/content/data/GetMapDataPoints.json',
            url: '/en/api/EVLocation/GetMapDataPoints',
            dataType: 'json',
            type: 'post',
            data: JSON.stringify({
                "onlinemapinputs": mapInputs,
                "__RequestVerificationToken": _this.vtoken
            }),
            error: function(jqXHR, textStatus, errorThrown) {
                console.log(errorThrown);
            },
            success: function(data) {

                //payment location 
                _this.paymentPoints = [];
                _this.ENOC = [];
                _this.EPPCO = [];
                _this.ATM = [];
                _this.cdmpoints = [];
                _this.otherPayments = [];

                // EV charger
                _this.normalchargingPoints = data.NormalEVCharge;
                _this.fastchargingPoints = data.FastEVCharge;
                _this.ultrafastchargingPoints = data.UltraFastCharge;
                _this.wallmountchargingPoints = data.WallMountCharge;

                _this.AvailableNormalCH = [];
                _this.OccupiedNormalCH = [];
                _this.MaintNormalCH = [];

                _this.AvailableFastCH = [];
                _this.OccupiedFastCH = [];
                _this.MaintFastCH = [];

                _this.AvailableUlFastCH = [];
                _this.OccupiedUlFastCH = [];
                _this.MaintUlFastCH = [];

                _this.AvailableWallCH = [];
                _this.OccupiedWallCH = [];
                _this.MaintWallCH = [];


                // water
                _this.waterSupplyPoints = data.WaterSupply;

                //service center
                _this.serviceCentres = data.CustomerService;

                //Payment Locations
                _this.paymentPoints = data.PaymentLocation;

                //Ev Charger Tariff
                _this.tariff = data.ChargerTariff;


                _this.serviceCentresOpen = [];
                _this.serviceCentresClose = [];


                //payment location
                if (data.PaymentLocation != undefined) {
                    for (var n = 0; n < data.PaymentLocation.length; n++) {
                        switch (data.PaymentLocation[n].type) {
                            case "EN":
                                _this.ENOC.push(data.PaymentLocation[n]);
                                break;
                            case "EP":
                                _this.EPPCO.push(data.PaymentLocation[n]);
                                break;
                            case "ET":
                                _this.ATM.push(data.PaymentLocation[n]);
                                break;
                            case "NB":
                                _this.cdmpoints.push(data.PaymentLocation[n]);
                                break;
                            case "PL":
                                _this.otherPayments.push(data.PaymentLocation[n]);
                                break;
                            default:
                                _this.otherPayments.push(data.PaymentLocation[n]);
                        }
                    }
                }

                // EV charger
                if (data.NormalEVCharge != undefined) {
                    for (var n = 0; n < data.NormalEVCharge.length; n++) {
                        switch (data.NormalEVCharge[n].dstatus) {
                            case "01":
                                _this.AvailableNormalCH.push(data.NormalEVCharge[n]);
                                break;
                            case "02":
                                _this.OccupiedNormalCH.push(data.NormalEVCharge[n]);
                                break;
                            case "07":
                                _this.MaintNormalCH.push(data.NormalEVCharge[n]);
                                break;
                            default:
                                _this.AvailableNormalCH.push(data.NormalEVCharge[n]);
                        }
                    }
                }
                if (data.FastEVCharge != undefined) {
                    for (var n = 0; n < data.FastEVCharge.length; n++) {
                        switch (data.FastEVCharge[n].dstatus) {
                            case "01":
                                _this.AvailableFastCH.push(data.FastEVCharge[n]);
                                break;
                            case "02":
                                _this.OccupiedFastCH.push(data.FastEVCharge[n]);
                                break;
                            case "07":
                                _this.MaintFastCH.push(data.FastEVCharge[n]);
                                break;
                            default:
                                _this.AvailableFastCH.push(data.FastEVCharge[n]);
                        }
                    }
                }
                if (data.UltraFastCharge != undefined) {
                    for (var n = 0; n < data.UltraFastCharge.length; n++) {
                        switch (data.UltraFastCharge[n].dstatus) {
                            case "01":
                                _this.AvailableUlFastCH.push(data.UltraFastCharge[n]);
                                break;
                            case "02":
                                _this.OccupiedUlFastCH.push(data.UltraFastCharge[n]);
                                break;
                            case "07":
                                _this.MaintUlFastCH.push(data.UltraFastCharge[n]);
                                break;
                            default:
                                _this.AvailableUlFastCH.push(data.UltraFastCharge[n]);
                        }
                    }
                }
                if (data.WallMountCharge != undefined) {
                    for (var n = 0; n < data.WallMountCharge.length; n++) {
                        switch (data.WallMountCharge[n].dstatus) {
                            case "01":
                                _this.AvailableWallCH.push(data.WallMountCharge[n]);
                                break;
                            case "02":
                                _this.OccupiedWallCH.push(data.WallMountCharge[n]);
                                break;
                            case "07":
                                _this.MaintWallCH.push(data.WallMountCharge[n]);
                                break;
                            default:
                                _this.AvailableWallCH.push(data.WallMountCharge[n]);
                        }
                    }
                }

                // Service Center
                if (data.CustomerService != undefined) {
                    for (var n = 0; n < data.CustomerService.length; n++) {
                        switch (data.CustomerService[n].status) {
                            case "O":
                                _this.serviceCentresOpen.push(data.CustomerService[n]);
                                break;
                            case "C":
                                _this.serviceCentresClose.push(data.CustomerService[n]);
                                break;
                        }
                    }
                }

                if(data.ChargerTariff != undefined){
                    for (var n = 0; n < data.ChargerTariff.length; n++) {
                        switch(data.ChargerTariff[n].evchargertype){
                            case "P" :
                                _this.$journey.find(`[${'data-txt-NCPoints'}]`).html(_this.labels.normalcharginglabel + '<span class="evtariff-txt">' + data.ChargerTariff[n].tariff + '</span>')
                                break;
                            case "W" :
                                _this.$journey.find(`[${'data-txt-WMCPoints'}]`).html(_this.labels.wallcharginglabel + '<span class="evtariff-txt">' + data.ChargerTariff[n].tariff + '</span>')
                                break;
                            case "F" :
                                _this.$journey.find(`[${'data-txt-FCPoints'}]`).html(_this.labels.fastcharginglabel + '<span class="evtariff-txt">' + data.ChargerTariff[n].tariff + '</span>')
                                break;
                            case "U" :
                                _this.$journey.find(`[${'data-txt-UFCPoints'}]`).html(_this.labels.ufastcharginglabel + '<span class="evtariff-txt">' + data.ChargerTariff[n].tariff + '</span>')
                                break;
                        }
                    }   
                }


                _this.populateMap(false);
                _this.getLocationBySensor();
                /*if (!this.searchboxInit) {
                    _this.initSearchBox();
                }*/
            },
            complete: function() {

                /*if (typeof spcat !== 'undefined') {
                    switch (spcat) {
                        case 'e':
                            $('.filter-charger .form-field__input--checkbox-filter').click()
                            $('.filter-charger .reset').hide()
                            break;
                        case 'h':
                            $('.filter-charger .form-field__input--checkbox-filter').click()
                            break;
                        case 'p':
                            $('.filter-charger .form-field__input--checkbox-filter').click()
                            break;
                        case 'w':
                            $('.filter-charger .form-field__input--checkbox-filter').click()
                            break;
                    }
                }*/
                _this.$journey.find('.j100-filters_desktop,.j100-services-map__filters--mobile').removeClass('loading');
            }
        });
    }





    J100_SERVICES_MAP.prototype.initSearchBox = function() {
        var _this = this;

        // define search box - desktop
        _this.input1 = document.getElementById(_this.searchField1.attr('id'));
        _this.searchBox1 = new google.maps.places.SearchBox(_this.input1);

        // define search box - mobile
        _this.input2 = document.getElementById(_this.searchField2.attr('id'));
        _this.searchBox2 = new google.maps.places.SearchBox(_this.input2);

        // listen for search events and stop page reloading
        _this.searchField1.closest('form').on('submit', function(e) {
            e.preventDefault();
        });
        _this.searchField2.closest('form').on('submit', function(e) {
            e.preventDefault();
        });

        // add area context for locally related search results
        _this.map.addListener('bounds_changed', function() {
            _this.searchBox1.setBounds(map.getBounds());
            _this.searchBox2.setBounds(map.getBounds());
        });

        // handle results on submit - desktop
        _this.searchBox1.addListener('places_changed', function() {
            _this.handleSearchResult(_this.searchBox1);
            _this.searchField2.val(_this.searchField1.val());
        });

        // handle results on submit - mobile
        _this.searchBox2.addListener('places_changed', function() {
            _this.handleSearchResult(_this.searchBox2);
            _this.searchField1.val(_this.searchField2.val());
        });

        this.searchboxInit = true;

    };

    J100_SERVICES_MAP.prototype.handleSearchResult = function(s) {
        var _this = this;
        var places = s.getPlaces();

        if (places.length == 0) {
            return;
        } else {
            // If set, clear the old searchMarker
            if (_this.searchMarker) _this.searchMarker.setMap(null);

            // For each place, get the icon, name and location.
            places.forEach(function(place) {
                var icon = {
                    url: place.icon,
                    size: new google.maps.Size(71, 71),
                    origin: new google.maps.Point(0, 0),
                    anchor: new google.maps.Point(17, 34),
                    scaledSize: new google.maps.Size(25, 25)
                };

                // Create a marker for each place.
                _this.searchMarker = new google.maps.Marker({
                    map: _this.map,
                    icon: icon,
                    title: place.name,
                    subtitle: place.subname,
                    position: place.geometry.location
                });
            });

            // add searchMarker and closest marker to an array and focus the map to display them both
            _this.hideDetails();
            _this.centerPoint = _this.searchLocation = _this.searchMarker.getPosition();
            //_this.map.setCenter(_this.centerPoint);
            //_this.map.setZoom(_this.defaultZoom);
            _this.getLocationBySensor(false, _this.searchLocation)
        }
    };

    J100_SERVICES_MAP.prototype.listMarkers = function(l, t) {
        var _this = this,
            itemMarkup = '',
            languagemap = utils.isRTL() ? 'ar' : 'en',
            directionsURL,
            lcount = 0,
            wcount = 0;
        //console.log(l)
        for (var i = 0; i < l.length; i++) {
            var listItem = l[i].marker,
                stdiv = (listItem.status == 'O') ? '<div class="m32-map__list-item-status green">' + _this.labels.statusOpen + '</div>' : (listItem.status == 'C') ? '<div class="m32-map__list-item-status red">' + _this.labels.statusClose + '</div>' : '',
                stEV = (listItem.evStatus == '01') ? '<div class="m32-map__list-item-status green">' + _this.labels.statusAv + '</div>' : (listItem.evStatus == '07') ? '<div class="m32-map__list-item-status orange">' + _this.labels.statusMt + '</div>' : (listItem.evStatus == '02') ? '<div class="m32-map__list-item-status red">' + _this.labels.statusOc + '</div>' : '',
                catText = listItem.category,
                subCatText = (listItem.evStatus !== false) ? _this.labels.chargingPoints : '';

            if (_this.userLocation) {
                var currentLocation = _this.userLocation;
                directionsURL = 'https://maps.google.com?saddr=' + currentLocation.lat() + ',' + currentLocation.lng() + '&daddr=' + listItem.lat + ',' + listItem.lng + '&ll=' + listItem.lat + ',' + listItem.lng + '&z=14&language=' + languagemap;
                lcount++;
            } else {
                directionsURL = 'https://maps.google.com?daddr=' + listItem.lat + ',' + listItem.lng + '&ll=' + listItem.lat + ',' + listItem.lng + '&z=14language=' + languagemap;
                wcount++
            }
            itemMarkup += '<div class="m32-map__list-item"><div class="m32-map__list-item-title"><div class="m32-map__list-item-title--image"><img src=' + listItem.image + ' /></div><div class="m32-map__list-item-title--head"><div class="m32-map__list-item-title--text">' + listItem.name + '</div><div class="m32-map__list-item-subtitle--text">' + listItem.address + '</div>' + stdiv + ' ' + stEV + '</div><div class="m32-map__list-item-title--direction"><a target="_blank" class="m32-map__list-item-title--direction-link" href="' + directionsURL + '"><img src="' + _this.labels.directionimg + '" /></a></div></div><div class="hidden catgory-txt">'+catText+'</div><div class="hidden catgory-txt">'+subCatText+'</div></div>'
        }
        $('.m32-map__list-section-items .m32-map__list-item').remove()
        $('.m32-map__list-section-items').append(itemMarkup)
        _this.procsPin = l;
        $('.m32-map__search .form-field__input--text').val('')
    }

    J100_SERVICES_MAP.prototype.pop = function(index) {
        var _this = this;
        //_this.populateDetails(_this.procsPin[index].marker)
        google.maps.event.trigger(_this.procsPin[index].marker, 'click')
    }




    J100_SERVICES_MAP.prototype.populateDetails = function(m) {
        var _this = this,
            subtitletxt = '',
            statusText = '',
            statusTextHtml = '',
            linkHtml = '',
            bodyContent,
            listmake,
            distance,
            subsectionHTML = '',
            disttitle = _this.labels.distancetitle,
            distunit = _this.labels.distanceunit,
            loctitle = _this.labels.locationtitle,
            directionsURL = null,
            languagemap = utils.isRTL() ? 'ar' : 'en',
            titleHTML = m.name;

            if(m.classification){
                switch (m.classification) {
                    case "S":
                        titleHTML = '<div class="m32-map__overlay-title--classification"> <img class="classification-evnormalicon" src=' + _this.labels.evnormalicon + ' /> <span>' + _this.labels.evnormaltext + '</span></div><div>' + m.name + '</div>'
                        break;
                    case "F":
                        titleHTML = '<div class="m32-map__overlay-title--classification"> <img class="classification-evfasticon" src=' + _this.labels.evfasticon + ' /> <span>' + _this.labels.evfasttext + '</span></div><div>' + m.name + '</div>'
                        break;
                }
            }


        this.overlayType = m.overlayType;
        $('.m32-map__overlay-title img').attr('src', (m.image));
        $('.m32-map__overlay-title--text').html(titleHTML);

        if (_this.userLocation) {
            var currentLocation = _this.userLocation,
                destination = new google.maps.LatLng(m.lat, m.lng),
                distance = google.maps.geometry.spherical.computeDistanceBetween(currentLocation, destination),
                distanceKm = (distance / 1000).toFixed(2);

            directionsURL = 'https://maps.google.com?saddr=' + currentLocation.lat() + ',' + currentLocation.lng() + '&daddr=' + m.lat + ',' + m.lng + '&ll=' + m.lat + ',' + m.lng + '&z=14&language=' + languagemap;
        } else {
            directionsURL = 'https://maps.google.com?daddr=' + m.lat + ',' + m.lng + '&ll=' + m.lat + ',' + m.lng + '&z=14language=' + languagemap;
        }


        var pwd = '';
        var apwd = '';
        //var evstatus = '';

        if (m.pwd) {
            pwd = '<span class="m32-map__overlay-address--inner"><strong>' + this.labels.pwd + '</strong>' + '<a href="tel:' + m.phone + '" class="link">' + m.phone + '</a>' + '</span><br/>'
        };

        if (m.apwd) {
            apwd = '<span class="m32-map__overlay-address--inner"><strong>' + this.labels.pwd + '</strong>' + ' ' + this.labels.apwd + '</span><br/>'
        }


        //if (m.evstatus) {
        //var evMatch = false;
        //
        //$(_this.evData).each(function () {
        //if (this.Code.toString() == m.evCode.toString()) {
        //console.log(m.name+' '+m.evCode+' '+this.Status);
        //
        //evMatch = true;
        //};
        //});
        //if (!evMatch) {
        //console('No match!');
        //};
        ////evstatus = '<span class="m32-map__overlay-address--inner"><strong>' + _this + '</strong></span><br/>'
        //}
        //$('.m32-map__overlay-address').html('<span class="m32-map__overlay-address--inner">' + m.address + '</span>' + '<br/>' + pwd + '<span class="m32-map__overlay-address--inner"><strong>' + this.labels.hours + '</strong>' + m.hours + '</span>' + makaninumber + apwd);

        subsectionHTML += '<div class="m32-map__overlay-address"><span class="m32-map__overlay-address--inner">' + m.address + '</span></div>'

        if (_this.userLocation) {
            subtitletxt = _this.labels.csimg + distanceKm + ' ' + distunit
            subsectionHTML += '<div class="m32-map__overlay-subtitle--text">' + subtitletxt + '</div>'
        } else {
            subtitletxt = ''
        }

        if (m.evStatus) {
            statusText = (m.evStatus == '01') ? '<div class="m32-map__list-item-status green">' + _this.labels.avimg + _this.labels.statusAv + '</div>' : (m.evStatus == '07') ? '<div class="m32-map__list-item-status orange">' + _this.labels.maimg + _this.labels.statusMt + '</div>' : (m.evStatus == '02') ? '<div class="m32-map__list-item-status red">' + _this.labels.notavimg + _this.labels.statusOc + '</div>' : '';
            statusTextHtml = '<div class="m32-map__overlay-status">' + statusText + '</div>'
        } else if (m.apwd) {
            statusText = (m.status == 'O') ? '<div class="m32-map__list-item-status green">' + _this.labels.avimg + _this.labels.statusOpen + '</div>' : (m.status == 'C') ? '<div class="m32-map__list-item-status red">' + _this.labels.notavimg + _this.labels.statusClose + '</div>' : '';
            statusTextHtml = '<div class="m32-map__overlay-status">' + statusText + '</div>'
        } else {
            statusTextHtml = ''
        }
        subsectionHTML += statusTextHtml;

        linkHtml += '<div class="m32-map__larger-map"><a target="_blank" href="' + directionsURL + '"><span class="m32-map__directions-link">' + _this.labels.dirimg + '' + this.labels.nav + '</span></a></div>'
        if (m.phone) {
            linkHtml += '<div class="m32-map__phone"><a href="tel:' + m.phone + '" class="link"><span class="m32-map__directions-link">' + _this.labels.telimg + '' + m.phone + '</span></a></div>'
        } else {
            linkHtml = linkHtml;
        }
        subsectionHTML += '<div class="m32-map__links">' + linkHtml + '</div>'


        $('.m32-map__overlay-title-subsection').html(subsectionHTML)
        $('.m32-map__rating, .m32-map__rating-stars, .m32-map__rating-reviews').remove();
        $('.m32-map__overlay-body').empty();

        /*if (this.searchLocation) {
            directionsURL = 'https://www.google.com/maps/dir/' + this.searchLocation.lat() + ',' + this.searchLocation.lng() + '/' + m.lat + ',' + m.lng + '?z=14';
        } else {
            directionsURL = 'https://maps.google.com?daddr=' + m.lat + ',' + m.lng + '&ll=' + m.lat + ',' + m.lng + '&z=14';
        }*/

        bodyContent = ''


        if (m.category) {
            bodyContent += '<div class="m32-map__overlay-address--inner"><span class="m32-map__overlay-address--inner-title">' + this.labels.categorytitle + '</span><br>' + m.category + '</div>'
        } else {
            bodyContent = bodyContent
        }

        if (m.landmark != undefined) {
            bodyContent += '<div class="m32-map__overlay-address--inner"><span class="m32-map__overlay-address--inner-title">' + this.labels.landmarktitle + '</span><br><span dir="ltr">' + m.landmark + '</span></div>';
        }

        if (m.nearMetro != undefined) {
            bodyContent += '<div class="m32-map__overlay-address--inner"><span class="m32-map__overlay-address--inner-title">' + this.labels.nearmetrotitle + '</span><br><span dir="ltr">' + m.nearMetro + '</span></div>';
        }

        if (m.makani != undefined) {
            bodyContent += '<div class="m32-map__overlay-address--inner"><span class="m32-map__overlay-address--inner-title">' + this.labels.makani + '</span><br><span dir="ltr">' + m.makani + '</span></div>';
        }

        if(m.chargingrate){
            bodyContent += '<div class="m32-map__overlay-address--inner"><span class="m32-map__overlay-address--inner-title">' + this.labels.chargingtext + '</span><br><span dir="ltr">' + m.chargingrate + '</span></div>';
        }
        /*if (navigator.geolocation) {
            navigator.geolocation.getCurrentPosition(function(position) {
                showPosition(position, m.position)
            });
        }
        
        function showPosition(position, markerPosition) {
            try {
                var latlng = new google.maps.LatLng({ lat: position.coords.latitude, lng: position.coords.longitude });
                distance = google.maps.geometry.spherical.computeDistanceBetween(latlng, markerPosition) / 1000;
                $('.m32-map__overlay-body').prepend('<div class="m32-map__overlay-address--inner"><strong class="m32-map__overlay-address--inner-title">' + disttitle + '</strong><br>' + distance.toFixed(1) + ' ' + distunit + '</div>');
            } catch (err) { }
        }*/


        bodyContent += '<div class="m32-map__overlay-address--inner"><span class="m32-map__overlay-address--inner-title">' + this.labels.hours + '</span><br>' + m.hours + '</div>';

        bodyContent += '<div class="m32-map__overlay-address--inner"><span class="m32-map__overlay-address--inner-title">' + loctitle + '</span><br>' + m.lat + ',' + m.lng + '</div>';

        if (m.apwd && m.services) {
            var listhtml = '',
                bodyItem1;
            for (var d = 0; m.services.length > d; d++) {
                listhtml += '<div>' + m.services[d].service + '</div>';
            }
            bodyContent += '<div class="m32-map__overlay-address--inner"><span class="m32-map__overlay-address--inner-title">' + this.labels.servicetitle + '</span><br>' + listhtml + '</div>';
        } else {
            bodyContent = bodyContent;
        }

        $('.m32-map__overlay-body').append(bodyContent)

        if ($('.m32-map__overlay').css('display') == 'none') {
            $('.m32-map__overlay').css({
                display: 'block'
            });
        }

        $('.m32-map__overlay').animate({
            opacity: 1
        }, 500);
        $('.j100-services-map__mapandfilter').addClass('mapdetail')
    };

    J100_SERVICES_MAP.prototype.highlightLocation = function(m, l, t, s, n) {
        var _this = this,
            lngOffset;
        try {
            _this.centerPoint = m.position;
            _this.map.setCenter(this.centerPoint);
            if (_this.map.zoom < this.defaultZoom) {
                _this.map.setZoom(this.defaultZoom);
            }
            if (_this.map.zoom <= this.defaultZoom) {
                lngOffset = 0.001;
            }else{
                lngOffset = 0.00006;
            }
            if (s) {
                $('.m32-map__list-item').removeClass('active')
                _this.populateDetails(m);
                _this.activeItem(m);
                // _this.scrollList(m)
                // Create a new LatLng for the shifted center
                if($(window).width() <= 1024){
                    lngOffset = 0;
                }
                var shiftedCenter =  utils.isRTL() ? new google.maps.LatLng(_this.centerPoint.lat(), _this.centerPoint.lng() + lngOffset) : new google.maps.LatLng(_this.centerPoint.lat(), _this.centerPoint.lng() - lngOffset);
                _this.map.setCenter(shiftedCenter);      
            }
            if (l && t) {
                _this.listMarkers(l, t);
            }
        } catch (err) {}

        const validArrays = [
            [1, 2, 3, 4, 5, 6, 7]
        ];
        
        function arraysEqual(a, b) {
            return Array.isArray(a) && Array.isArray(b) && a.length === b.length && a.every((val, index) => val === b[index]);
        }
        
        // Check if _this.displayFilter matches any of the arrays in validArrays
        const matches = validArrays.some(arr => arraysEqual(arr, _this.displayFilter));
        if (!matches && !s) {

            _this.setMapBounds()
        }
    };

    J100_SERVICES_MAP.prototype.scrollList = function(selectedMarker) {
        var _this = this;

        for (var n = 0; n < _this.procsPin.length; n++) {
            if (_this.procsPin[n].marker.position == selectedMarker.position) {
                var totalHeight = 0;
                var items = $('.m32-map__list-section-items').find('.m32-map__list-item');
                for (var i = 0; i <= n; i++) {
                    totalHeight += $(items[i]).outerHeight();
                }
                $('.m32-map__list-section').animate({ scrollTop: (totalHeight - $(items[n]).outerHeight()) + 1 }, 800);

            }
        }


        /*function scrollToIndex(index) {
            const list = document.querySelector('.m32-map__list');
            if (!list) return;
        
            const items = list.querySelectorAll('.m32-map__list-item');
            if (index < 0 || index >= items.length) return;
        
            const item = items[index];
            list.scrollTop = item.offsetTop - list.offsetTop;
        }
        
        // Usage example, scroll to the third item (index 2)
        scrollToIndex(2);*/
    };

    J100_SERVICES_MAP.prototype.activeItem = function(selectedMarker) {
        var _this = this;

        for (var n = 0; n < _this.procsPin.length; n++) {
            if (_this.procsPin[n].marker.position == selectedMarker.position) {
                var items = $('.m32-map__list-section-items').find('.m32-map__list-item');
                $(items[n]).addClass('active');
            }
        }
    };

    J100_SERVICES_MAP.prototype.getFilterContent = function(n) {
        var items = [],
            category,
            type,
            cpwd = false,
            isEV = false,
            isPayment = false,
            markers = [],
            sc = false;

        switch (parseInt(n)) {
            //CustomerService complete list
            case 1:
                items = this.serviceCentres;
                markers = this.serviceMarkers;
                category = this.labels.serviceCentres;
                type = 'serviceCentres';
                cpwd = true;
                sc = true;
                break;
                //WaterSupply data 
            case 2:
                items = this.waterSupplyPoints;
                markers = this.waterSupplyMarkers;
                category = this.labels.waterSupplyPoints;
                type = 'waterSupplyPoints';
                break;
                //WaterSupply data 
            case 3:
                items = this.paymentPoints;
                markers = this.paymentMarkers;
                category = this.labels.paymentPoints;
                type = 'paymentPoints';
                isPayment = true;
                break;
            case 4:
                items = this.normalchargingPoints;
                markers = this.normalchargingMarkers;
                category = this.labels.normalchargingPoints;
                type = 'normalchargingPoints';
                isEV = true;
                break;
            case 5:
                items = this.fastchargingPoints;
                markers = this.fastchargingMarkers;
                category = this.labels.fastchargingPoints;
                type = 'fastchargingPoints';
                isEV = true;
                break;
            case 6:
                items = this.ultrafastchargingPoints;
                markers = this.ultrafastchargingMarkers;
                category = this.labels.ultrafastchargingPoints;
                type = 'ultrafastchargingPoints';
                isEV = true;
                break;
            case 7:
                items = this.wallmountchargingPoints;
                markers = this.wallmountchargingMarkers;
                category = this.labels.wallmountchargingPoints;
                type = 'wallmountchargingPoints';
                isEV = true;
                break;

            case 8:
                items = this.otherPayments;
                markers = this.otherPaymentsMarkers;
                category = this.labels.otherPayments;
                type = 'otherPayments';
                isPayment = true;
                break;
            case 9:
                items = this.ATM;
                markers = this.ATMMarkers;
                category = this.labels.ATM;
                type = 'ATM';
                isPayment = true;
                break;
            case 10:
                items = this.ENOC;
                markers = this.ENOCMarkers;
                category = this.labels.ENOC;
                type = 'ENOC';
                isPayment = true;
                break;
            case 11:
                items = this.EPPCO;
                markers = this.EPPCOMarkers;
                category = this.labels.EPPCO;
                type = 'EPPCO';
                isPayment = true;
                break;
            case 12:
                items = this.cdmpoints;
                markers = this.CDMMarkers;
                category = this.labels.cdmpoints;
                type = 'cdmpoints';
                isPayment = true;
                break;

            case 13:
                items = this.serviceCentresOpen;
                markers = this.serviceCentresOpenMarkers;
                category = this.labels.serviceCentresOpen;
                type = 'serviceCentresOpen';
                cpwd = true;
                sc = true;
                break;
            case 14:
                items = this.serviceCentresClose;
                markers = this.serviceCentresCloseMarkers;
                category = this.labels.serviceCentresClose;
                type = 'serviceCentresClose';
                cpwd = true;
                sc = true;
                break;



            case 411:
                items = this.AvailableNormalCH;
                markers = this.AvailableNormalCHMarkers;
                category = this.labels.AvailableNormalCH;
                type = 'AvailableNormalCH';
                isEV = true;
                break;
            case 422:
                items = this.OccupiedNormalCH;
                markers = this.OccupiedNormalCHMarkers;
                category = this.labels.OccupiedNormalCH;
                type = 'OccupiedNormalCH';
                isEV = true;
                break;
            case 433:
                items = this.MaintNormalCH;
                markers = this.MaintNormalCHMarkers;
                category = this.labels.MaintNormalCH;
                isEV = true;
                type = 'MaintNormalCH';
                break;

            case 511:
                items = this.AvailableFastCH;
                markers = this.AvailableFastCHMarkers;
                category = this.labels.AvailableFastCH;
                isEV = true;
                type = 'AvailableFastCH';
                break;
            case 522:
                items = this.OccupiedFastCH;
                markers = this.OccupiedFastCHMarkers;
                category = this.labels.OccupiedFastCH;
                isEV = true;
                type = 'OccupiedFastCH';
                break;
            case 533:
                items = this.MaintFastCH;
                markers = this.MaintFastCHMarkers;
                category = this.labels.MaintFastCH;
                isEV = true;
                type = 'MaintFastCH';
                break;

            case 611:
                items = this.AvailableUlFastCH;
                markers = this.AvailableUlFastCHMarkers;
                category = this.labels.AvailableUlFastCH;
                isEV = true;
                type = 'AvailableUlFastCH';
                break;
            case 622:
                items = this.OccupiedUlFastCH;
                markers = this.OccupiedUlFastCHMarkers;
                category = this.labels.OccupiedUlFastCH;
                isEV = true;
                type = 'OccupiedUlFastCH';
                break;
            case 633:
                items = this.MaintUlFastCH;
                markers = this.MaintUlFastCHMarkers;
                category = this.labels.MaintUlFastCH;
                isEV = true;
                type = 'MaintUlFastCH';
                break;


            case 711:
                items = this.AvailableWallCH;
                markers = this.AvailableWallCHMarkers;
                category = this.labels.AvailableWallCH;
                isEV = true;
                type = 'AvailableWallCH';
                break;
            case 722:
                items = this.OccupiedWallCH;
                markers = this.OccupiedWallCHMarkers;
                category = this.labels.OccupiedWallCH;
                isEV = true;
                type = 'OccupiedWallCH';
                break;
            case 733:
                items = this.MaintWallCH;
                markers = this.MaintWallCHMarkers;
                category = this.labels.MaintWallCH;
                isEV = true;
                type = 'MaintWallCH';
                break;
        }
        return { items: items, markers: markers, category: category, cpwd: cpwd, isEV: isEV, type: type };
    };

    // J100_SERVICES_MAP.prototype.EVLoadData = function() {
    //     var _this = this;

    //     $.ajax({
    //         url: '/api/EVLocation/GetEVLocations',
    //         //url: '../../content/data/evstatus.json',
    //         dataType: 'json',
    //         error: function(jqXHR, textStatus, errorThrown) {
    //             console.log(errorThrown);
    //         },
    //         success: function(ev) {
    //             _this.evData = ev;
    //             _this.EVloaded = true;
    //             _this.populateMap(false);
    //             if (!this.searchboxInit) {
    //                 _this.initSearchBox();
    //             }

    //         }
    //     });
    // }

    J100_SERVICES_MAP.prototype.populateMap = function(isempty) {
        var _this = this;
        _this.evMarkers = [];
        _this.payMarkers = [];
        _this.watMarkers = [];
        _this.hapMarkers = [];


        // hide all pins
        var list = [];
        for (var n = 0; n < this.markerList.length; n++) {
            list.push(n + 1);
        }
        if (_this.displayFilter.length > 0) {
            _this.hideDetails();
            for (var n = 0; n < _this.markerList.length; n++) {
                try {
                    while (_this.markerList[n].length > 0) {
                        var m = _this.markerList[n].pop();
                        m.setVisible(false);
                    }
                } catch (err) {}
            }
            list = _this.displayFilter;
        }

        // if (list.indexOf(5) != -1 || list.indexOf(4) != -1) {
        //     if (_this.EVloaded) {
        //         $('.m32-map').find('.m66-preloader').hide();
        //     } else {
        //         $('.m32-map').find('.m66-preloader').show();
        //         if (!_this.EVloading) {

        //             _this.EVloading = true;
        //         }
        //     }
        // } else {
        //     $('.m32-map').find('.m66-preloader').hide();
        // }


        if (isempty) {
            $(_this.markerList).each(function() {
                var mgroup = this;

                for (let i = 0; i < mgroup.length; i++) {
                    mgroup[i].setMap(null);
                } // body...
            });
        }

        // show pins in filter list
        if (!isempty) {
            for (var n = 0; n < list.length; n++) {
                // define the list to show
                var filter = _this.getFilterContent(list[n]);
                var markers = filter.markers,
                    category = filter.category,
                    type = filter.type,
                    cpwd = filter.cpwd,
                    isEV = filter.isEV,
                    items = filter.items;


                /*if (isEV) {
                    realstatus = items[m].dstatus
                    if (!validStatuses.includes(realstatus)) {
                        console.log(markers)
                    }
                }*/


                /*var results = [];
                selectedChargerTypes.forEach(function(type) {
                    if (jsonData[type]) {
                        jsonData[type].forEach(function(item) {
                            // Replace 'includes' with a cross-browser compatible check
                            if ($.inArray(item.devicestatus, selectedDeviceStatuses) !== -1) {
                                results.push(item); // Add the item if it matches the filter
                            }
                        });
                    }
                });*/


                //markers = [];
                if(items !== null){
                if (markers.length < 1) {
                    for (var m = 0; m < items.length; m++) {
                        var pinStatus = '',
                            realstatus,
                            newLat,
                            newLng,
                            newCoords = false,
                            currentClickedMarker,
                            iconReSize = new google.maps.Size(35, 44),
                            iconURL = category == _this.labels.serviceCentres || category == _this.labels.serviceCentresOpen || category == _this.labels.serviceCentresClose ? items[m].imagelink.replace('.png', '.png?v=0.1') : items[m].pimage.replace('.png', '.png?v=0.2');

                        var mk = new google.maps.Marker({
                            map: _this.map,
                            category: category,
                            position: newCoords ? { lat: parseFloat(newLat), lng: parseFloat(newLng) } : { lat: parseFloat(items[m].latitude), lng: parseFloat(items[m].longitude) },
                            lat: newCoords ? parseFloat(newLat) : parseFloat(items[m].latitude),
                            lng: newCoords ? parseFloat(newLng) : parseFloat(items[m].longitude),
                            name: category == _this.labels.serviceCentres || category == _this.labels.serviceCentresOpen || category == _this.labels.serviceCentresClose ? items[m].title : category == _this.labels.fastchargingPoints || category == _this.labels.normalchargingPoints || category == _this.labels.ultrafastchargingPoints || category == _this.labels.wallmountchargingPoints || category == _this.labels.AvailableNormalCH || category == _this.labels.OccupiedNormalCH || category == _this.labels.MaintNormalCH || category == _this.labels.AvailableFastCH || category == _this.labels.OccupiedFastCH || category == _this.labels.MaintFastCH || category == _this.labels.AvailableUlFastCH || category == _this.labels.OccupiedUlFastCH || category == _this.labels.MaintUlFastCH || category == _this.labels.AvailableWallCH || category == _this.labels.OccupiedWallCH || category == _this.labels.MaintWallCH ? category : category == _this.labels.waterSupplyPoints ? items[m].address : items[m].category,
                            //name: category == _this.labels.serviceCentres || category == _this.labels.serviceCentresOpen || category == _this.labels.serviceCentresClose ? items[m].title : category == _this.labels.waterSupplyPoints ? items[m].address : items[m].category,
                            phone: category == _this.labels.fastchargingPoints || category == _this.labels.normalchargingPoints || category == _this.labels.ultrafastchargingPoints || category == _this.labels.wallmountchargingPoints || category == _this.labels.AvailableNormalCH || category == _this.labels.OccupiedNormalCH || category == _this.labels.MaintNormalCH || category == _this.labels.AvailableFastCH || category == _this.labels.OccupiedFastCH || category == _this.labels.MaintFastCH || category == _this.labels.AvailableUlFastCH || category == _this.labels.OccupiedUlFastCH || category == _this.labels.MaintUlFastCH || category == _this.labels.AvailableWallCH || category == _this.labels.OccupiedWallCH || category == _this.labels.MaintWallCH ? items[m].evphone : category == _this.labels.serviceCentres || category == _this.labels.serviceCentresOpen || category == _this.labels.serviceCentresClose ? items[m].callcenternumber : items[m].ccno,
                            pwd: items[m].pwd,
                            isWater: category == _this.labels.waterSupplyPoints ? true : false,
                            isPay: category == _this.labels.paymentPoints || category == _this.labels.otherPayments || category == _this.labels.ATM || category == _this.labels.ENOC || category == _this.labels.EPPCO || category == _this.labels.cdmpoints ? true : false,
                            apwd: cpwd,
                            subname: items[m].subname,
                            //address: category == _this.labels.fastchargingPoints || category == _this.labels.normalchargingPoints ? items[m].locationAddress : category == _this.labels.serviceCentres ? items[m].address : category == _this.labels.waterSupplyPoints ? items[m].address : items[m].city,
                            address: category == _this.labels.fastchargingPoints || category == _this.labels.normalchargingPoints || category == _this.labels.ultrafastchargingPoints || category == _this.labels.wallmountchargingPoints || category == _this.labels.AvailableNormalCH || category == _this.labels.OccupiedNormalCH || category == _this.labels.MaintNormalCH || category == _this.labels.AvailableFastCH || category == _this.labels.OccupiedFastCH || category == _this.labels.MaintFastCH || category == _this.labels.AvailableUlFastCH || category == _this.labels.OccupiedUlFastCH || category == _this.labels.MaintUlFastCH || category == _this.labels.AvailableWallCH || category == _this.labels.OccupiedWallCH || category == _this.labels.MaintWallCH ? items[m].locationAddress : category == _this.labels.waterSupplyPoints ? items[m].category : items[m].address,
                            makani: items[m].makaninumber,
                            landmark: items[m].landmark,
                            nearMetro: items[m].nearestmetro,
                            hours: category == _this.labels.serviceCentres || category == _this.labels.serviceCentresOpen || category == _this.labels.serviceCentresClose || category == _this.labels.fastchargingPoints || category == _this.labels.normalchargingPoints || category == _this.labels.ultrafastchargingPoints || category == _this.labels.wallmountchargingPoints || category == _this.labels.AvailableNormalCH || category == _this.labels.OccupiedNormalCH || category == _this.labels.MaintNormalCH || category == _this.labels.AvailableFastCH || category == _this.labels.OccupiedFastCH || category == _this.labels.MaintFastCH || category == _this.labels.AvailableUlFastCH || category == _this.labels.OccupiedUlFastCH || category == _this.labels.MaintUlFastCH || category == _this.labels.AvailableWallCH || category == _this.labels.OccupiedWallCH || category == _this.labels.MaintWallCH ? items[m].workinghours : category == _this.labels.paymentPoints || category == _this.labels.otherPayments || category == _this.labels.ATM || category == _this.labels.ENOC || category == _this.labels.EPPCO || category == _this.labels.cdmpoints ? items[m].workhours : items[m].workhours,
                            image: category == _this.labels.serviceCentres || category == _this.labels.serviceCentresOpen || category == _this.labels.serviceCentresClose ? items[m].mapimage : category == _this.labels.waterSupplyPoints ? _this.labels.watersupplypointimg : items[m].fimage,
                            chargingrate: category == _this.labels.fastchargingPoints || category == _this.labels.normalchargingPoints || category == _this.labels.ultrafastchargingPoints || category == _this.labels.wallmountchargingPoints || category == _this.labels.AvailableNormalCH || category == _this.labels.OccupiedNormalCH || category == _this.labels.MaintNormalCH || category == _this.labels.AvailableFastCH || category == _this.labels.OccupiedFastCH || category == _this.labels.MaintFastCH || category == _this.labels.AvailableUlFastCH || category == _this.labels.OccupiedUlFastCH || category == _this.labels.MaintUlFastCH || category == _this.labels.AvailableWallCH || category == _this.labels.OccupiedWallCH || category == _this.labels.MaintWallCH ? items[m].additionalText1 : false,
                            classification: category == _this.labels.fastchargingPoints || category == _this.labels.normalchargingPoints || category == _this.labels.ultrafastchargingPoints || category == _this.labels.wallmountchargingPoints || category == _this.labels.AvailableNormalCH || category == _this.labels.OccupiedNormalCH || category == _this.labels.MaintNormalCH || category == _this.labels.AvailableFastCH || category == _this.labels.OccupiedFastCH || category == _this.labels.MaintFastCH || category == _this.labels.AvailableUlFastCH || category == _this.labels.OccupiedUlFastCH || category == _this.labels.MaintUlFastCH || category == _this.labels.AvailableWallCH || category == _this.labels.OccupiedWallCH || category == _this.labels.MaintWallCH ? items[m].classification : false,
                            //image: items[m].fimage,
                            status: category == _this.labels.serviceCentres || category == _this.labels.serviceCentresOpen || category == _this.labels.serviceCentresClose ? items[m].status : false,
                            evStatus: category == _this.labels.fastchargingPoints || category == _this.labels.normalchargingPoints || category == _this.labels.ultrafastchargingPoints || category == _this.labels.wallmountchargingPoints || category == _this.labels.AvailableNormalCH || category == _this.labels.OccupiedNormalCH || category == _this.labels.MaintNormalCH || category == _this.labels.AvailableFastCH || category == _this.labels.OccupiedFastCH || category == _this.labels.MaintFastCH || category == _this.labels.AvailableUlFastCH || category == _this.labels.OccupiedUlFastCH || category == _this.labels.MaintUlFastCH || category == _this.labels.AvailableWallCH || category == _this.labels.OccupiedWallCH || category == _this.labels.MaintWallCH ? items[m].dstatus : false,
                            index: m,
                            overlayType: list[n],
                            optimized: false,
                            icon: { url: iconURL, scaledSize: iconReSize },
                            services: category == _this.labels.serviceCentres || category == _this.labels.serviceCentresOpen || category == _this.labels.serviceCentresClose ? items[m].servicelist : false,
                            catsec: category == _this.labels.serviceCentres || category == _this.labels.serviceCentresOpen || category == _this.labels.serviceCentresClose ? items[m].title : category == _this.labels.waterSupplyPoints || category == _this.labels.paymentPoints || category == _this.labels.otherPayments || category == _this.labels.ATM || category == _this.labels.ENOC || category == _this.labels.EPPCO || category == _this.labels.cdmpoints ? items[m].category : false
                            //icon: pinStatus.toLowerCase() == 'offline' || pinStatus.toLowerCase() == 'unknown' || pinStatus.toLowerCase() == 'maintenance' || pinStatus.toLowerCase() == 'closed' ? _this.pins[type].replace('.png', '_r.png') : pinStatus.toLowerCase() == 'occupied' || pinStatus.toLowerCase() == 'busy' ? _this.pins[type].replace('.png', '_o.png') : pinStatus.toLowerCase() == 'available' ? _this.pins[type] : isEV ? _this.pins[type].replace('.png', '_r.png') : _this.pins[type]
                            //icon: pinStatus.toLowerCase() == 'offline' || pinStatus.toLowerCase() == 'unknown' || pinStatus.toLowerCase() == 'maintenance' || pinStatus.toLowerCase() == 'closed' ? items[m].pimage.replace('.png', '_r.png') : pinStatus.toLowerCase() == 'occupied' || pinStatus.toLowerCase() == 'busy' ? items[m].pimage.replace('.png', '_o.png') : pinStatus.toLowerCase() == 'available' ? items[m].pimage : isEV ? items[m].pimage.replace('.png', '_r.png') : items[m].pimage
                        });

                        markers.push(mk);
                        markers[m].addListener('click', function(e) {
                            if (this === _this.currentClickedMarker) {
                                return; // Prevent further execution
                            }

                            _this.highlightLocation($(this)[0], null, null, true,true);

                            //console.log(_this.currentClickedMarker)
                            //console.log(_this.currentClickedMarkerIcon)
                            if (_this.currentClickedMarker && _this.currentClickedMarker !== this) {
                                _this.currentClickedMarker.setIcon(_this.currentClickedMarkerIcon);
                                _this.currentClickedMarker.setZIndex(undefined);
                            }

                            _this.currentClickedMarker = this;
                            _this.currentClickedMarkerIcon = this.getIcon();
                            var customIcon = {
                                url: _this.labels.activemarker,
                                scaledSize: new google.maps.Size(46, 58)
                            };

                            this.setIcon(customIcon);
                            this.setZIndex(100000);

                        });
                        mk.setVisible(true);
                        // Create a MarkerClusterer object, passing it the map object and the array of markers
                        if (isEV) {
                            _this.evMarkers.push(mk)
                        }
                        if (mk.isPay) {
                            _this.payMarkers.push(mk)
                        }
                        if (mk.isWater) {
                            _this.watMarkers.push(mk)
                        }
                        if (mk.apwd) {
                            _this.hapMarkers.push(mk)
                        }
                    }
                }
                }else{
                    $('.m32-map__list-section-items').empty()
                }
            }
            _this.clearClusters()
            setTimeout(function () {
                _this.clearClusters()
               _this.clusterMarker();
            }, 2000);

        }
    };
    J100_SERVICES_MAP.prototype.clusterMarker = function(searchItem) {
        var baseClusterStyle = {
            textColor: 'white',
            height: 41,
            width: 41,
            backgroundRepeat: 'no-repeat',
            backgroundPosition: 'center',
            backgroundSize: 'cover'
        },
        _this = this,
        evMr =  searchItem ?  _this.evMarkersSearch : _this.evMarkers,
        payMr =  searchItem ?  _this.payMarkersSearch : _this.payMarkers,
        watMr =  searchItem ?  _this.watMarkersSearch : _this.watMarkers,
        hapMr =  searchItem ?  _this.hapMarkersSearch : _this.hapMarkers;

        var clusterStyleev = Object.assign({}, baseClusterStyle, {
            url: _this.labels.clustorimgev.replace('.png', '.png?v=0.1')
        });

        var clusterStylepay = Object.assign({}, baseClusterStyle, {
            url: _this.labels.clustorimgpay.replace('.png', '.png?v=0.1')
        });

        var clusterStylewat = Object.assign({}, baseClusterStyle, {
            url: _this.labels.clustorimgwat.replace('.png', '.png?v=0.1')
        });

        var clusterStylehap = Object.assign({}, baseClusterStyle, {
            url: _this.labels.clustorimghap.replace('.png', '.png?v=0.1')
        });

        
        _this.markerCluster = new MarkerClusterer(map, evMr, {
            styles: [clusterStyleev],
            gridSize: 40,
            minimumClusterSize: 4
        });
        _this.markerCluster2 = new MarkerClusterer(map, payMr, {
            styles: [clusterStylepay],
            gridSize: 120,
            minimumClusterSize: 4
        });
        _this.markerCluster3 = new MarkerClusterer(map, watMr, {
            styles: [clusterStylewat],
            gridSize: 20,
            minimumClusterSize: 2
        });
        _this.markerCluster4 = new MarkerClusterer(map, hapMr, {
            styles: [clusterStylehap],
            gridSize: 20,
            minimumClusterSize: 2
        });
    };

    J100_SERVICES_MAP.prototype.hideDetails = function() {
        $('.m32-map__overlay').fadeOut();
        $('.j100-services-map__mapandfilter').removeClass('mapdetail')
        $('.m32-map__list-item').removeClass('active')
    };
    J100_SERVICES_MAP.prototype.clearClusters = function() {
        var _this = this;
        if (_this.markerCluster) {
            _this.markerCluster.clearMarkers();
        }
        if (_this.markerCluster2) {
            _this.markerCluster2.clearMarkers();
        }
        if (_this.markerCluster3) {
            _this.markerCluster3.clearMarkers();
        }
        if (_this.markerCluster4) {
            _this.markerCluster4.clearMarkers();
        }
    };

    return J100_SERVICES_MAP;
});

define('../src/journeys/j102-tayseer-service/j102-tayseer-service',['jquery', 'lib/utils'], function($, utils) {

    'use strict';

    var J102_TAYSEER_SERVICES = function($journey) {

        this.$journey = $journey;
        return this;
    };

    J102_TAYSEER_SERVICES.prototype.init = function() {
        var _this = this;
        this.checkBoxes = this.$journey.find('.form-field__input--checkbox');
        this.cancelAccount = this.$journey.find('.j102-tayseer-service--delete-yes');
        this.$totWrapper = this.$journey.find('.j102-tayseer-service--total-wrapper');

        var $deleteAc = _this.$journey.find('.j102-tayseer-en-service--delete-amount'),
            $editAm = _this.$journey.find('.j102-tayseer-en-service--edit-amount'),
            $deteteModel = _this.$journey.find('.confirm-delete'),
            $deteteTrue = $deteteModel.find('.confirm-delete-true'),
            $deteteFalse = $deteteModel.find('.confirm-delete-false');
            

        $('.j102-tayseer-service-next').on('click', function(e) {
            if ($(this).is('[disabled]')) {
                e.preventDefault();
            }
        });

        $deleteAc.on('click',function(){
            var thisAc = $(this).closest('.j102-tayseer-service--chckbx').addClass('confirm-message-init');
            $deteteModel.find('[data-trigger]').trigger('click')
        })

        $deteteTrue.on('click',function(){
            var thisModal = $(this).closest('.confirm-delete'),
                thisAc =  _this.$journey.find('.confirm-message-init');
                thisAc.remove();
                thisModal.find('.m39-modal__button--close').trigger('click');
        })
        $deteteFalse.on('click',function(){
            $('.j102-tayseer-service--chckbx').removeClass('102-tayseer-confirm-message-init');
        })

        $editAm.on('click',function() {
            var $thisAc = $(this).closest('.j102-tayseer-service--chckbx'),
                $thisEditWrapper = $thisAc.find('.j102-tayseer-service--amount-edit-wrapper');
                $thisEditWrapper.addClass('active')
        })



        //addEventListeners
        $(_this.cancelAccount).on('click', function (e) {
            var myBox = $(this).parent().parent().parent().parent().parent().parent();
            
            myBox.prev().find('input').prop('checked', false).attr('disabled', true).addClass('disabled');
            myBox.prev().remove();
            
            myBox.remove();
            $('.m39-m12-no').trigger('click');
            _this.updateTotal();
        });

        $('.j102-tayseer-service--select').on('click', function () {
            if ($('.j102-tayseer-service--select').html() == 'Select All') {
                $(_this.checkBoxes).each(function () {
                    if ($(this).hasClass('disabled')) {

                    }
                    else {
                        $(this).prop('checked', true);
                    };
                });
                $('.j102-tayseer-service--select').html('Deselect All')
                _this.updateTotal();
            } else {
                $(_this.checkBoxes).each(function () {
                    if ($(this).hasClass('disabled')) {

                    }
                    else {
                        $(this).prop('checked', false);
                    };
                });
                $('.j102-tayseer-service--select').html('Select All')
                _this.updateTotal();
                }
        });

        $('.j102-tayseer-service--add').on('click', function(e) {
            $('.j102-tayseer-service--add-form').addClass('j102-tayseer-service--add-form-active');
        });

        $('.j102-tayseer-service--add-form-cancel').on('click', function(e) {
            $('.j102-tayseer-service--add-form').removeClass('j102-tayseer-service--add-form-active');
        });

        $('.j102-tayseer-service--edit-amount').on('click', function(e) {
            $(this).parent().next().addClass('j102-tayseer-service--amount-pay-form-active');
        });

        $('.j102-tayseer-service--amount-pay-form-button--set').on('click', function (e) {
            $(this).prev().find('input').trigger('blur')
            
        });

        $('.j102-tayseer-service--amount-pay-form-button--cancel').on('click', function(e) {
            var input = $(this).prev().find('input');

            //console.log()
            //console.log(parseFloat((_this.reverseFormattedValue($(this).parent().parent().prev().find('.j102-tayseer-service--amount').html()))))
            $(this).parent().parent().removeClass('j102-tayseer-service--amount-pay-form-active');
            
            if ($(this).parent().parent().prev().find('.j102-tayseer-service--amount').html() != undefined) {
                input.val(parseFloat(($(this).parent().parent().prev().find('.j102-tayseer-service--amount').html()).replace(/,/g, '')));
            };;

            $(this).prev().find('input').trigger('blur')
            _this.getTotal();
        });


        //checkbox_init
        $(_this.checkBoxes).each(function (e) {
            $(this).prop('checked', true);
            $(this).on('click', function (){
                _this.updateTotal();
            });
        });

        $('.j102-tayseer-service--amount-pay-form-input input').on('blur', function (e) {
            var tthis = this;

            setTimeout(function(){
                
                _this.getTotal();
                _this.updateDisplay(tthis);

                var asfa = $(tthis).closest('.j102-tayseer-service--amount-pay-form').prev().find('.j102-tayseer-service--amount');
                asfa.html(_this.getFormattedValue($(asfa).html()))
                //$(tthis).closest('j102-tayseer-service--acc').('.j102-tayseer-service--amount').each(function() {
                //    $(this).html(_this.getFormattedValue($(this).html()));
                //});
            }, 250)
        });

        this.updateTotal();
        this.setValue();
        this.getTotal();

        $('.j102-tayseer-service--upload').on('click', function() {
            setTimeout(function(){

                $('.j102-tayseer-service--edit-amount').on('click', function(e) {
                    //console.log('click')
                    $(this).parent().next().addClass('j102-tayseer-service--amount-pay-form-active');
                });

                $('.j102-tayseer-service--amount-pay-form-button--cancel').on('click', function(e) {
                    var input = $(this).prev().find('input');

                    $(this).parent().parent().removeClass('j102-tayseer-service--amount-pay-form-active');
                    input.val(parseFloat(($(this).parent().parent().prev().find('.j102-tayseer-service--amount').html()).replace(/,/g, '')));
                    $(this).prev().find('input').trigger('blur')
                    _this.getTotal();
                });

                $('.j102-tayseer-service--amount-pay-form-button--set').on('click', function (e) {
                    $(this).prev().find('input').trigger('blur')
                });

                $('.j102-tayseer-service--amount-pay-form-input input').on('blur', function (e) {
                    var tthis = this;

                    setTimeout(function(){
                        _this.getTotal();
                        _this.updateDisplay(tthis);

                        var asfa = $(tthis).closest('.j102-tayseer-service--amount-pay-form').prev().find('.j102-tayseer-service--amount');
                        asfa.html(_this.getFormattedValue($(asfa).html()))
                    }, 250)
                });

                _this.updateTotal();
                _this.setValue();
                _this.getTotal();
                $('.j102-tayseer-service--amount-pay-form-input input').trigger('blur');
            }, 1000)
        })

        $(window).on('load', function(){
            $('.j102-tayseer-service--amount-pay-form-input input').trigger('blur')
        })
    };

    J102_TAYSEER_SERVICES.prototype.updateTotal = function() {
        var _this = this,
            i = 0;

        $(_this.checkBoxes).each(function(){
            if ($(this).prop('checked')) {
                i += 1;
            }
        });
        $('.j102-tayseer-service--total-new').html();
        return i;

        $('.j102-tayseer-service--total').html(_this.$totWrapper.data('num-selected').replace("{number}",i));
      

        if (i == 1) {
            $('.j102-tayseer-service-next').attr('disabled', true).addClass('disabled');
            $('.j102-tayseer-service-next').on('click', function (e) {
                $('.j102-tayseer-service--warning').trigger('click');
            });
        } else if (i == 0) {
            $('.j102-tayseer-service-next').attr('disabled', true).addClass('disabled')
        } else {
            $('.j102-tayseer-service-next').removeAttr('disabled').removeClass('disabled')
        }

    };

    J102_TAYSEER_SERVICES.prototype.setValue = function() {
        var _this = this;

        $('.j102-tayseer-service--amount-pay-form-input input').each(function (e) {
            var amount = $(this).parents('.j102-tayseer-service--amount-pay-form').prev().find('.j102-tayseer-service--amount').html();

            $(this).attr('value', amount);
            $(this).on('keydown', function(e) {
                if (e.keyCode === 13) {
                    e.preventDefault(); 
                    $(this).trigger('blur');
                };
            });
        })

    };

    J102_TAYSEER_SERVICES.prototype.getTotal = function() {
        var _this = this,
            total = 0;

        $('.j102-tayseer-service--amount-pay-form-input input').each(function (e) {
            
            total += parseFloat($(this).val());
        });
        $('.j102-tayseer-service--total-pay').html(_this.getFormattedValue(total));

    };

    J102_TAYSEER_SERVICES.prototype.getFormattedValue = function (value) {
        var dir = utils.isRTL() ? '\u200F' : '',
            formattedValue;

        if ( value != null && value != undefined ) {
            formattedValue = numeral(parseFloat(value)).format('0,0.00');
        }

        return dir + formattedValue;
    };



    J102_TAYSEER_SERVICES.prototype.updateDisplay = function (deez) {
        var _this = this,
            display = $(deez).parents('fieldset').parent().prev().find('.j102-tayseer-service--amount');

        $(deez).parents('.j102-tayseer-service--amount-pay-form')
        display.html($(deez).val())
    };

return J102_TAYSEER_SERVICES;
});

define('../src/journeys/j103-move-in/j103-move-in',['jquery', 'lib/utils'], function($, utils) {

    'use strict';

    var J103_MOVE_IN = function($journey) {

        this.$journey = $journey;
        return this;
    };

    J103_MOVE_IN.prototype.init = function() {
    	  var _this = this;

       
       this.$tabs = this.$journey.find( '[data-tabber="true"]');
       this.$button = this.$journey.find('.tabone');
       this.$buttonTwo = this.$journey.find('.tabtwo');

       this.$contentone= this.$journey.find('.formone');
       this.$contenttwo= this.$journey.find('.formtwo');


        this.paynew = $('.j103-move-out').find('#form-field-premise_no').parent('form-field__input-wrapper');
        var nextTo = $('#description-for-premise_no')
        $('.form-field__input-wrapper--currency').append( '<table class="m23-table__content-table prlist" style="font-size:"><thead class="m23-table__content-table-header"><tr class="m23-table__content-table-row"><td class="m23-table__content-table-cell--header">Premise No</td><td class="m23-table__content-table-cell--header">Details</td><td class="m23-table__content-table-cell--header"></td></tr></thead><tbody class="m23-table__content-table-body prelistbody"></tbody></table><span class="add-button">+</span>' );
          $('.add-button').on('click', function(){       
               _this.testone();
        })
          $('.m41-tabs-box__tab-link').on('click',function(){
            //console.log('hello')
          })

          this.activeTabsClass = 'm41-tabs-box__tab-link--active';
          this.activeContentClass = 'tab_content_active';

          this.$button.on('click',function(){
           _this.contentone();


          })
          this.$buttonTwo.on('click',function(){
           _this.contenttwo();

          })
    }; 

     J103_MOVE_IN.prototype.contentone = function() {
           var _this = this
           this.$contentone.addClass('tab_content_active');
           this.$contenttwo.removeClass('tab_content_active');
           this.$button.addClass('m41-tabs-box__tab-link--active');
           this.$buttonTwo.removeClass('m41-tabs-box__tab-link--active');
           
    }
     J103_MOVE_IN.prototype.contenttwo = function() {
           var _this = this
           this.$contentone.removeClass('tab_content_active');
           this.$contenttwo.addClass('tab_content_active');
           this.$button.removeClass('m41-tabs-box__tab-link--active');
           this.$buttonTwo.addClass('m41-tabs-box__tab-link--active');
    }


     J103_MOVE_IN.prototype.testone = function() {
           var _this = this;
           var value = $('#form-field-premise_no').val();
           var nextTo = $('.prlist tr').last();
          
          if(value){
              var newitem = '<tr class="m23-table__content-table-row"><td data-label="Premise No" class="m23-table__content-table-cell pre-list">'+ value +'</td><td data-label="Details" class="m23-table__content-table-cell">djsfhdhfkdsf</td> <td style="color:#268126;cursor:pointer;" class="m23-table__content-table-cell delete-pre"><i class="icon icon-cancel"></i></td></tr>'
               $('.prelistbody').append(newitem);
              //console.log(value)
             $('.delete-pre').on('click',function(){
            $(this).parent().remove()
           })                   
          }
          else{//console.log('none')
        }
    }

return J103_MOVE_IN;
});

define('../src/journeys/j104-move-out/j104-move-out',['jquery', 'lib/utils'], function($, utils) {

    'use strict';

    var J104_MOVE_OUT = function($journey) {

        this.$journey = $journey;
        return this;
    };

    J104_MOVE_OUT.prototype.init = function() {
    	var _this = this;

        this.j104accSelectButton = $('.j104_1-move-out').find('.m39-modal__footer').find('button');
        //this.initSelected = $('.j104_1-move-out').find('.m43-accountsel__selected').children('.m43-accountsel__account').attr('amount');

        this.chargecheck = $('.j104_1-move-out').find('#form-field-checkbox_1_1')

        // $(this.j104accSelectButton).on('click', function() {
        // 	_this.updateButton();
        // });
        // $(this.chargecheck).on('click', function() {
        //     _this.updateButton();
        // });

        //this.editButton(this.initSelected);
        
    };

   //  J104_MOVE_OUT.prototype.updateButton = function() {
   //  	var _this = this,
   //  		checkedBox,
			// selected = $('.j104_1-move-out').find('.m43-accountsel__selected').children('.m43-accountsel__account').children('.m43-accountsel__account').attr('amount');

   //      _this.editButton(selected);
   //  }

    


    J104_MOVE_OUT.prototype.editButton = function(value) {

    	var button = $('.j104_1-move-out').find('.form').children('.form-field__button').children('.button--primary'),
			dir = utils.isRTL() ? '\u200F' : '',
			formattedValue = numeral(parseFloat(value)).format('0,0.00');

            var charge = $('.j104_1-move-out').find('#form-field-checkbox_1_1').attr('value');
            var clearance_details = $('.j104_1-move-out').find('.m42-keyvalue__value').first()
             $(clearance_details).html(' AED' + formattedValue)

            if($('.j104_1-move-out').find('#form-field-checkbox_1_1').is(':checked')){

              var toPay = parseInt(value) + parseInt(charge) 
              $(button).html('Pay ' + toPay + ' AED')

           }else{
            $(button).html('Pay ' + formattedValue + ' AED')
           }

    	   
    }

return J104_MOVE_OUT;
});

define('../src/journeys/j106-ideal-home/j106-ideal-home',['jquery', 'lib/utils'], function ($, utils) {

	'use strict';

	var j106 = function ($journey) {

		this.$journey = $journey;

		return this;
	};

	j106.prototype.init = function() {
		var _this = this;

		$('video').each(function() {
			var uniqueID = utils.uniqueID();

			$(this).attr('id', uniqueID);
		});

		$('.form-field__input--radio').on('click', function() {
			_this.registration_type();
		})

		this.registration_type();

	};

	j106.prototype.registration_type = function() {
		var $type = $("#form-field-registration_type--customer");

		if ( $type.prop("checked") != true ) {
			$("input").each( function() {
				if ( $(this).attr("name") == "account_number" || $(this).attr("name") == "owner_name" ) {
					$(this).closest(".form-field").fadeOut();
					$(this).attr("required", false);
				}
			});

		} else if ( $type.prop("checked") == true ) {
			$("input").each( function() {
				if ( $(this).attr("name") == "account_number" || $(this).attr("name") == "owner_name" ) {
					$(this).closest(".form-field").fadeIn();
					$(this).attr("required", true);
				}
			});
		};
	};

	return j106;
});
define('../src/journeys/j109-ev-charger/j109-ev-charger',['jquery', 'lib/utils','parsley'], function($, utils, parsley) {

    'use strict';

    var J109 = function($journey) {

        this.$journey = $journey;

        return this;
    };

    J109.prototype.init = function() {
        var _this = this,
            reference = this.$journey.data('add_reference'),
            reference_show = this.$journey.data('show_reference'),
            reference_shownew = this.$journey.data('show_referencenew'),
            reference_name = this.$journey.data('reference_name'),
            reference_email = this.$journey.data('reference_email'),
            reference_phone = this.$journey.data('reference_phone'),
            reference_prim = this.$journey.data('reference_prim'),
            reference_error = this.$journey.data('reference_notification'),
            reference_errornew = this.$journey.data('reference_notificationnew'),
            empty_error = this.$journey.data('empty_error'),
            numnerRow = this.$journey.data('mulkiyanumber_row'),
            numnerRowPl = this.$journey.data('platenumber_row'),
            reference_limit = this.$journey.data('reference_limit'),
            totalEntry = this.$journey.data('total_entry'),
            formlabel = this.$journey.data('formlabel'),
            maxEntry = this.$journey.data('max_entry'),
            mulkiyaNum = this.$journey.data('mulkiya_num'),
            plate_error = this.$journey.data('plate_error'),
            equal_error = this.$journey.data('equal_error'),
            add_plate = this.$journey.find('.add-plate-btn'),
            e_checker = 0,
            e_check,
            uploads = ["IEC61215", "IEC61646", "IEC61730", "IEC61701", "IEC62716", "IEC61345", "IEC60068", "IEC621091", "IEC621092", "IEC1741", "IEC6100032", "IEC61000312", "IEC6100061", "IEC6100062", "IEC6100063", "IEC6100064", "dewadrrg", "IEC61850", "IEC610101"];

        this.init_forms(reference, reference_show, reference_name, reference_email, reference_phone, reference_prim, reference_error, reference_limit, plate_error, mulkiyaNum, totalEntry, maxEntry, formlabel, numnerRow, equal_error, empty_error);
        this.init_dropdowns();
        this.init_selectToggle();


        _this.mulkiyaTotal = this.$journey.find('[name="mulkiyanum"]')
        _this.mulkiyaAll = this.$journey.find('#form-field-allmulkiya')





        var addBtn = $('.add-plate-btn'),
            reCallCheck = addBtn.data('recall'),
            reCall =  addBtn.data('table'),
            message = addBtn.data('message'),
            plateBtnWrapper = addBtn.parent(),
            addFromWrapper = $('.add-plate-form'),
            addFromBtn = addFromWrapper.find('.add-plate-done'),
            plateField = addFromWrapper.find('input[name=platenum]'),
            parwrapper = addFromBtn.parent(),
            addFormAction = parwrapper.find('.j109-ev-charger-action'),
            actionTitle = addFormAction.attr('data-title'),
            $cl = addFormAction.html(),
            errorMessage = '<div class="maxerror">'+ message +'</div>',
            plateTable = '<table class="m23-table__content-table j109-ev-charger__platetable hidden"><thead class="m23-table__content-table-header"><tr class="m23-table__content-table-row last" tabindex="0"><tr></thead><tbody class="m23-table__content-table-body j109-ev-charger__platetable--body"><tr class="m23-table__content-table-row last"><tr></tbody></table>';
            plateBtnWrapper.after(plateTable);


        var plateWrapper = $('.j109-ev-charger__platetable');

            plateBtnWrapper.find('.form-field__label').hide()
            plateBtnWrapper.find('.form-field__input-wrapper').hide()
            plateBtnWrapper.find('.form-field__messages').hide()
            plateBtnWrapper.addClass('add-plate-wrapper');



             $('.j109-ev-charger .add-plate-btn').on('click',function(){
            var listMax = $(this).data('max');
            $('.j109-ev-charger .maxerror').remove();
            if(listMax == reCall.length){
                plateBtnWrapper.after(errorMessage);
            }
            if(listMax > reCall.length){
                $('.j109-ev-charger-model__trigger').trigger('click');
                $('.re-error').hide();
                $('.platenum-form').val('');
                $('.platenum-form').removeClass('parsley-success');
                $('.platenum-form').removeClass('form-field__input--error');
                $('.platenum-form').removeClass('parsley-error');
                $('.platenum-form').parent().removeClass('form-field__input-wrapper--error');
                $('.platenum-form').parent().removeClass('form-field__input-wrapper--validated');
            }            
        })

           

            if (reCallCheck){
                    $.each(reCall, function (index, value) {
                        var i;
                        for (i = 0; i < value.length; ++i) {
                            if(!plateWrapper.hasClass('hidden')){
                                addRow(value[i].label,value[i].delabel,value[i].value,value[i].text,false,false)
                            }
                            if(plateWrapper.hasClass('hidden')){
                                addCol(value[i].label,value[i].delabel,value[i].value,value[i].text,false)
                            }
                        }
                        var index = index + 1,
                            newlast = plateWrapper.find('.j109-ev-charger__platetable--body .last');
                            newlast.append('<td data-label="'+ actionTitle +'" class="m23-table__content-table-cell">' + $cl + '</td>')
                        if(index < reCall.length){
                            newlast.after('<tr class="m23-table__content-table-row last"><tr>')
                            newlast.removeClass('last')
                        }
                            plateWrapper.removeClass('hidden') 
                    });
                var tablehead = plateWrapper.find('.m23-table__content-table-header .m23-table__content-table-row');
                    tablehead.append('<th class="m23-table__content-platetable-cell--header">' + actionTitle + '</th>')
            }


            
            plateField.change(function() {
                var thisParent = $(this).closest('.form-field'),
                    thisMessage = thisParent.find('.re-error');
                    thisMessage.hide()
             })


            addFromBtn.on('click',function(){
                var f = 0,
                    parwrapper = $(this).parent(),
                    addFromInput = parwrapper.find('.table__input'),
                    addFormAction = parwrapper.find('.j109-ev-charger-action');
                    

                 

                addFromInput.each(function(){

                        var editVal = parwrapper.data('edit'),
                            thisVal = $(this).val(),
                            thisParent = $(this).closest('.form-field'),
                            thiswrapper = $(this).parent(),
                            thisMessage = thisParent.find('.re-error'),
                            reCallCheck = addBtn.data('recall');
                        

                        
                            if ($(this).data('delabel') == 'platenum'){
                                if(!(editVal == thisVal)){
                                    if (reCallCheck){
                                        $.each(reCall, function (index, value) {
                                            var i;
                                            for (i = 0; i < value.length; ++i) {
                                                if(value[i].delabel === 'platenum'){
                                                   if(value[i].value === thisVal){
                                                        thisMessage.show();
                                                        thiswrapper.removeClass('form-field__input-wrapper--validated');
                                                        thiswrapper.addClass('form-field__input-wrapper--error')
                                                        f = f + 1;
                                                        return f;
                                                   }
                                                }
                                            }
                                        })
                                    }
                                }
                            }
                        


                        $(this).parsley().validate();

                        

                        if($(this).parsley().isValid() == false){
                            f = f + 1;
                            return f;
                        }
                    })
                    
                    if(!parwrapper.hasClass('editing')){
                        if(f === 0){
                                if(plateWrapper.hasClass('hidden')){
                                    var actionTitle = addFormAction.attr('data-title'),
                                    $cl = addFormAction.html();

                                    var a = [];

                                    addFromInput.each(function(){
                                        var type = $(this).attr('type'),
                                        text = $(this).find('option:selected').text();
                                        if(type == 'text'){
                                            text = $(this).val();
                                        }
                                        var itemsdata = addCol($(this).attr('data-title'),$(this).attr('data-delabel'),$(this).val(),text,true);
                                        a.push(JSON.parse(itemsdata));
                                    })

                                    reCall.push(a)
                                    addBtn.attr('data-recall',true)
                                    addBtn.data('recall',true)
                                    addBtn.attr('data-table',JSON.stringify(reCall)) 

                                    var newlast = plateWrapper.find('.j109-ev-charger__platetable--body .last'),
                                        tablehead = plateWrapper.find('.m23-table__content-table-header .m23-table__content-table-row');
                                    tablehead.append('<th class="m23-table__content-platetable-cell--header">' + actionTitle + '</th>')
                                    newlast.append('<td data-label="'+ actionTitle +'" class="m23-table__content-table-cell">' + $cl + '</td>')
                                }
                            if(!plateWrapper.hasClass('hidden')){
                                var lastRow = plateWrapper.find('.j109-ev-charger__platetable--body .last'),
                                actionTitle = addFormAction.attr('data-title'),
                                $cl = addFormAction.html(),
                                addBtnData = addBtn.data('table');

                                lastRow.after('<tr class="m23-table__content-table-row last"><tr>')
                                lastRow.removeClass('last')

                                
                                var a = [];

                                addFromInput.each(function(){
                                    var type = $(this).attr('type'),
                                        text = $(this).find('option:selected').text();
                                    if(type == 'text'){
                                        text = $(this).val();
                                    }
                                   
                                    var itemsdata = addRow($(this).attr('data-title'),$(this).attr('data-delabel'),$(this).val(),text,false,true);
                                    a.push(JSON.parse(itemsdata));
                                    
                                })
                                reCall.push(a)
                                addBtn.attr('data-recall',true)
                                addBtn.data('recall',true)
                                addBtn.attr('data-table',JSON.stringify(reCall)) 

                                var newlast = plateWrapper.find('.j109-ev-charger__platetable--body .last');
                                newlast.append('<td data-label="'+ actionTitle +'" class="m23-table__content-table-cell">' + $cl + '</td>')
                            }
                             plateWrapper.removeClass('hidden')
                             $('.m39-modal__button--close').trigger('click');
                        }
                    }
                    if(parwrapper.hasClass('editing')){
                        if(f === 0){
                            var tablebody = plateWrapper.find('.j109-ev-charger__platetable--body .editing'),
                                thisVal = parwrapper.data('edit'),
                                $cl = addFormAction.html();
                            tablebody.empty()

                            $.each(reCall, function (index, value) {
                                        var i;
                                        for (i = 0; i < value.length; ++i) {
                                            if(value[i].delabel === 'platenum'){
                                               if(value[i].value == thisVal){
                                                  reCall = $.grep(reCall, function(e) {
                                                          return e != value;
                                                    });
                                               }
                                            }
                                        }
                                    })
                        
                            addBtn.attr('data-table',JSON.stringify(reCall))



                            var a = [];
                            addFromInput.each(function(){
                                 var type = $(this).attr('type'),
                                        text = $(this).find('option:selected').text();
                                    if(type == 'text'){
                                        text = $(this).val();
                                    }
                                
                                var itemsdata = addRow($(this).attr('data-title'),$(this).attr('data-delabel'),$(this).val(),text,true,true);
                                    a.push(JSON.parse(itemsdata));
                            })
                            reCall.push(a)
                            addBtn.attr('data-table',JSON.stringify(reCall)) 
                            tablebody.append('<td data-label="'+ actionTitle +'" class="m23-table__content-table-cell">' + $cl + '</td>')
                            
                            $(this).parent().removeClass('editing');
                            $('.j109-ev-charger__platetable--body .editing').removeClass('editing');
                            $('.m39-modal__button--close').trigger('click');
                        }
                    }
                
            })
    
                $('body').on('click', '.j109-ev-charger-actionBtn .delete', function() {
                    var par = $(this).closest('.j109-ev-charger__platetable'),
                        parbody = par.find('.m23-table__content-table-body'),
                        parhead = par.find('.m23-table__content-table-header'),
                        bodyRowCount = parbody.find('.m23-table__content-table-row').length,
                        container = $(this).closest('.m23-table__content-table-row'),
                        headRow = parhead.find('.m23-table__content-table-row'),
                        thisPlate = container.find('.platenum'),
                        thisVal = thisPlate.data('value');
                        
                        

                    if(bodyRowCount == 1 ){
                        container.addClass('last')
                        container.empty();
                        headRow.empty()
                        plateWrapper.addClass('hidden');
                        addBtn.attr('data-recall',false);
                        addBtn.data('recall',false);
                        addBtn.attr('data-table','[]');
                    }
                    if(bodyRowCount > 1 ){
                        if(container.hasClass('last')){
                            container.prev().addClass('last')
                        }
                        container.remove();
                         $.each(reCall, function (index, value) {
                                        var i;
                                        for (i = 0; i < value.length; ++i) {
                                            if(value[i].delabel === 'platenum'){
                                               if(value[i].value == thisVal){
                                                  reCall = $.grep(reCall, function(e) {
                                                          return e != value;
                                                    });
                                               }
                                            }
                                        }
                                    })
                            $('.j109-ev-charger .maxerror').remove();
                            addBtn.attr('data-table',JSON.stringify(reCall)) 
                    }   
                      
                        

                    
                });

                
                $('body').on('click', '.j109-ev-charger-actionBtn .edit', function() {
                    $('.j109-ev-charger-model__trigger').trigger('click');

                    var par = $(this).closest('.m23-table__content-table-row'),
                        parCell = par.find('.m23-table__content-table-cell'),
                        thisPlate = par.find('.platenum'),
                        thisVal = thisPlate.data('value'),
                        modelContent = $('.j109-ev-charger-model__trigger').attr('aria-controls'),
                        modelContentForm =  $('#'+modelContent).find('.add-plate-form'),
                        modelContentFormInput = modelContentForm.find('.table__input');

                        modelContentForm.addClass('editing');
                        modelContentForm.attr('data-edit',thisVal);
                        modelContentForm.data('edit',thisVal);
                        par.addClass('editing');

                        parCell.each(function(){
                            var label = $(this).data('label'),
                                colVal = $(this).data('value');

                            modelContentFormInput.each(function(){
                                var thistitle = $(this).data('title')
                                if(label == thistitle){
                                    $(this).val(colVal)
                                }
                            })
                        })
                })


            function addCol(title,delebal,value,text,repeat){
                var tablehead = plateWrapper.find('.m23-table__content-table-header .m23-table__content-table-row'),
                    tablebody = plateWrapper.find('.j109-ev-charger__platetable--body .m23-table__content-table-row');
                tablehead.append('<th class="m23-table__content-platetable-cell--header">' + title + '</th>');
                tablebody.append('<td data-label="' + title + '" data-delabel="' + delebal + '" data-value="' + value + '" class="m23-table__content-table-cell ' + delebal + '">' + text + '</td>');

                if(repeat == true){
                    var itemsdata = '{"label":"'+ title +'","delabel":"'+ delebal +'","value":"'+ value +'","text":"'+ text +'"}'
                    return itemsdata;
                }
              
            }

            function addRow(title,delebal,value,text,editing,repeat){
                if(editing == false){
                    var tablebody = plateWrapper.find('.j109-ev-charger__platetable--body .last');
                    tablebody.append('<td data-label="' + title + '" data-delabel="' + delebal + '" data-value="' + value + '" class="m23-table__content-table-cell ' + delebal + '">' + text + '</td>');
                }
                if(editing == true){
                    var tablebody = plateWrapper.find('.j109-ev-charger__platetable--body .editing');
                    tablebody.append('<td data-label="' + title + '" data-delabel="' + delebal + '" data-value="' + value + '" class="m23-table__content-table-cell ' + delebal + '">' + text + '</td>');
                }

                if(repeat == true){
                    var itemsdata = '{"label":"'+ title +'","delabel":"'+ delebal +'","value":"'+ value +'","text":"'+ text +'"}'
                    return itemsdata;
                }
            }

        if (numnerRow) {
            var numnerRow = String(numnerRow);
            var _this = this;

            var numberRow = numnerRow.split(',');
            _this.add_row(numberRow, reference_name);
            _this.mulkiyaAll.prop("checked", true)
            _this.change_text(reference, reference_show, reference_error)

        } else if (numnerRowPl) {
            var numnerRowPl = String(numnerRowPl);
            var _this = this;
            var numberRow = numnerRowPl.split(',')
            _this.add_row(numberRow, reference_name);
            _this.mulkiyaAll.prop("checked", false)

            _this.change_text(reference, reference_shownew, reference_error)
        }


        var row_count = 0;
        $('.j109-ev-charger__reference-row').each(function() {
            row_count += 1;

        });
        if (row_count > 0) {
            $('.m23-table__content-table').find('.m23-table__content-table-header').show()
        }
        if (row_count == 0) {
            $('.m23-table__content-table').find('.m23-table__content-table-header').hide()
        }




        _this.mulkiyaAll.on('click', function() {

            $(this).prop("checked", !$(this).prop("checked"));

            var row_count = 0;
            $('.j109-ev-charger__reference-row').each(function() {
                row_count += 1;
            });

            if (row_count == 0) {
                if ($(this).is(':checked')) {
                    $(this).prop('checked', false);
                    _this.change_text(reference, reference_shownew, reference_errornew)
                } else if (!$(this).is(':checked')) {
                    $(this).prop('checked', true);
                    _this.change_text(reference, reference_show, reference_error)
                }
            }

            if (row_count > 0) {

                $('.j109-ev-charger--delete-all').trigger('click');
                if ($(this).is(':checked')) {

                    var ch = $(this);
                    $('.j109-ev-charger--delete-all-yes').on('click', function() {
                        $(this).prev().trigger('click');
                        ch.prop('checked', false);
                        $('.j109-ev-charger__reference-row').remove();
                        $('.m23-table__content-table').find('.m23-table__content-table-header').hide()
                        _this.change_text(reference, reference_shownew, reference_errornew)
                    })
                } else if (!$(this).is(':checked')) {
                    ch = $(this)
                    $('.j109-ev-charger--delete-all-yes').on('click', function() {
                        $(this).prev().trigger('click');
                        ch.prop('checked', true);
                        $('.j109-ev-charger__reference-row').remove();
                        $('.m23-table__content-table').find('.m23-table__content-table-header').hide()
                        _this.change_text(reference, reference_show, reference_error)
                    })
                }

            }
        })



        $('.j109-ev-charger-tabs__tab').on('click', function() {
            $('.j109-ev-charger-tabs__tab').each(function() {
                $(this).removeClass('j109-ev-charger-tabs__tab--active')
            });
            $(this).addClass('j109-ev-charger-tabs__tab--active');
        });

        if ($('.j109-ev-charger').hasClass('edit-profile-drrg')) {

            $('.j109-ev-charger__reference-contact').each(function() {
                if ($(this).attr('name') == "ref_email") {
                    e_check = $(this).val();
                };
            });

            $('.j109-ev-charger__reference-email').each(function() {
                if ($(this).html() == e_check) {
                    e_checker++;
                };
            });


            $('.j109-ev-charger__table--cancel').on('click', function() {
                var __this = this;

                $('.j109-ev-charger--delete').trigger('click');

                $('.j109-ev-charger--delete-yes').on('click', function() {
                    _this.email_check(e_checker);
                    if ($(__this).closest('.m23-table__content-table-row').find('.form-field__input--radio').prop("checked") == true) {
                        $(__this).closest('.m23-table__content-table-row').remove();
                        $('.j109-ev-charger__table--body .m23-table__content-table-row:first-child').find('.form-field__input--radio').prop("checked", true);
                    } else {
                        $(__this).closest('.m23-table__content-table-row').remove();
                    };

                    $('.j109-ev-charger__reference-limit').removeClass('j109-ev-charger__reference-limit--active');

                    if ($('.j109-ev-charger__table--body').html().trim().length == 0) {
                        $('.j109-ev-charger__table--body').closest('.j109-ev-charger__table--inactive').removeClass('j109-ev-charger__table--active');
                    };
                    var row_count = 0;
                    $('.j109-ev-charger__reference-row').each(function() {
                        row_count += 1;
                        //console.log(row_count)
                    });
                    if (row_count > 0) {
                        $('.m23-table__content-table').find('.m23-table__content-table-header').show()
                    }
                    if (row_count == 0) {
                        $('.m23-table__content-table').find('.m23-table__content-table-header').hide()
                    }


                    $(this).prev().trigger('click');


                });

            });


        }

        if ($('.j109-ev-charger').hasClass('j109-ev-charger--1')) {
            this.check_logic(uploads, 0, 0);
        } else if ($('.j109-ev-charger').hasClass('j109-ev-charger--2')) {
            this.check_logic(uploads, 1, 1);
        } else if ($('.j109-ev-charger').hasClass('j109-ev-charger--3')) {
            this.check_logic(uploads, 2, 2);
        } else {};




        $('.form-field__input--textarea').each(function() {
            if ($(this).attr('name') == 'drrg-reject-remark') {
                $(this).on('keyup', function() {
                    if (this.value.length < 1) {
                        $(this).closest('.m39-modal__content').find('.m39-m12-yesReject').attr('disabled', '');
                        $(this).closest('.m39-modal__content').find('.m39-m12-yesReject').addClass('disabled');

                    } else if (this.value.length > 0) {
                        $(this).closest('.m39-modal__content').find('.m39-m12-yesReject').removeAttr('disabled');
                        $(this).closest('.m39-modal__content').find('.m39-m12-yesReject').removeClass('disabled');

                    };
                });
            };


        });


        $(".m39-m12-noReject").on('click', function(event) {
            $('#form-field-remark').val("");
            $('.m39-m12-yesReject').attr('disabled', '');
            $('.m39-m12-yesReject').addClass('disabled');
        });
    };

    J109.prototype.change_text = function(reference, referencetext, notificationtext) {
        $('.j109-ev-charger__show-contact').text(reference + ' ' + referencetext);
        $('.platenmulkiya').text(referencetext);
        $('.j109-ev-charger__reference_wrapper label').text(notificationtext);
        $('.j109-ev-charger__reference_wrapper input').attr("placeholder", referencetext);
        $('span.totalentry').text('');
        $('span.numthis').text(referencetext);
        $('span.numthis').css('display', 'none');
    }

    J109.prototype.add_row = function(array, reference_name) {
        var _this = this,
            num = 0

        $.each(array, function(index, value) {
            num++
            _this.mulkiyaTotal.val(num).change();

            var texttd = $('.m23-table__content-table').find('.m23-table__content-table-header .platenmulkiya').text()
            var tr = '<tr class="m23-table__content-table-row j109-ev-charger__reference-row" tabindex="0"><td class="m23-table__content-table-cell j109-ev-charger__rownum">' + num + '</td><td data-label="' + texttd + '" class="m23-table__content-table-cell j109-ev-charger__reference-name">' + value + '</td><td class="j109-ev-charger__table--cancel-wrapper"><span class="j109-ev-charger__table--cancel icon-cancel"></span></td></tr>';
            $('.j109-ev-charger__table--body').append(tr);

            $('.j109-ev-charger__table--cancel').off('click');

            $('.j109-ev-charger__table--cancel').on('click', function() {
                var __this = this;

                $('.j109-ev-charger--delete').trigger('click');

                $('.j109-ev-charger--delete-yes').on('click', function() {
                    $(__this).closest('.m23-table__content-table-row').remove();

                    var row_count = 0;
                    $('.j109-ev-charger__reference-row').each(function() {
                        row_count += 1;
                        //console.log(row_count)
                    });
                    if (row_count > 0) {
                        $('.m23-table__content-table').find('.m23-table__content-table-header').show()
                    }
                    if (row_count == 0) {
                        $('.m23-table__content-table').find('.m23-table__content-table-header').hide()
                    }

                    var tr_counter = 0
                    $('.j109-ev-charger__rownum').each(function() {
                        tr_counter++;
                        $(this).text(tr_counter)
                    });
                    $(this).prev().trigger('click');
                });


            });

        })

    }

    J109.prototype.init_forms = function(reference, reference_show, reference_name, reference_email, reference_phone, reference_prim, reference_error, reference_limit, plate_error, mulkiyaNum, totalEntry, maxEntry, formlabel, numnerRow, equal_error, empty_error) {
        var _this = this;

        $('.form-field__input--text').each(function() {
            var name = $(this).attr('name')
            if (name == "mulkiya") {
                $(this).addClass('j109-ev-charger__reference-contact');
                $(this).closest('.form-field').after('<div class="j109-ev-charger__add-contact--wrapper"><span class="totalentry"> </span> <span class="numthis">' + ' ' + reference_name + '</span></div>');
            }
            if (name == "mulkiya") {
                if (!($('.j109-ev-charger').hasClass('edit-profile-drrg'))) {
                    $(this).closest('.form-field').after('<div class="form-field__button mt12"><a class="j109-ev-charger__add-contact add-button" role="button">+</a></div>')
                }
            }
        });

        $('.j109-ev-charger__reference-contact').each(function() {
            $(this).closest('.form-field').addClass("mt12")
        });
        $('.mt12').wrapAll("<div class='j109-ev-charger__reference_wrapper' />");
        if (!($('.j109-ev-charger').hasClass('edit-profile-drrg'))) {
            $('.j109-ev-charger__add-contact--wrapper').after('<table class="m23-table__content-table"><thead class="m23-table__content-table-header"><tr class="m23-table__content-table-row" tabindex="0)"><th class="m23-table__content-table-cell--header ">' + mulkiyaNum + '</th><th class="m23-table__content-table-cell--header platenmulkiya">' + reference_show + '</th></tr></thead><tbody class="m23-table__content-table-body j109-ev-charger__table--body"></tbody></table><div class="form-field__messages j109-ev-charger__ref-error-mes"><ul class="parsley-errors-list filled" ><li class="parsley-required">Reference required</li></ul></div>');
            $('.j109-ev-charger__table--inactive').after('<div class="j109-ev-charger__reference-error">' + reference_error + '</div>');
            $('.j109-ev-charger__table--inactive').before('<div class="j109-ev-charger__email-error">' + plate_error + '</div>');
            $('.j109-ev-charger__table--inactive').before('<div class="j109-ev-charger__reference-limit">' + reference_limit + '</div>');
        };

        $('.j109-ev-charger__add-contact').on('click', function() {


            $(window).trigger(".j109-ev-charger__show-contact");
            $('span.numthis').css('display', 'none')
            $('span.totalentry').text('')

            var tr_counter = 0
            $('.m23-table__content-table-row').each(function() {
                tr_counter++;
            });


            var totalMulkita = _this.mulkiyaTotal.val()
            if (tr_counter <= _this.mulkiyaTotal.val()) {


            } else if (tr_counter === 21) {

                $('span.totalentry').text(maxEntry)

            } else {

                $('span.totalentry').text(totalEntry)
            }

        });





        $('.j109-ev-charger__add-contact').on('click', function() {
            if ($('.j109-ev-charger__reference-contact').attr('name') == 'mulkiya') {
                var value = $('.j109-ev-charger__reference-contact').val().trim(),
                    counter = 0,
                    row_count = 0;

                $('.j109-ev-charger__reference-row').each(function() {
                    row_count += 1;
                });

                $('.j109-ev-charger__reference-name').each(function() {
                    if (($(this).html()).toString().trim() == value.toString()) {
                        counter += 1;
                    };
                });



                if (value != '') {

                    if (counter == 0) {
                        _this.add_reference(reference_name, reference_email, reference_phone, reference_prim);

                    } else if (row_count == 0) {
                        _this.add_reference(reference_name, reference_email, reference_phone, reference_prim);
                    } else {
                        $('span.totalentry').text(plate_error);
                    }
                } else {

                    $('span.numthis').css('display', 'inline')
                    $('span.totalentry').text(empty_error)
                }

            };
            $(window).trigger("j109-ev-charger__add-contact");
        });

        $('.form-field__button').find('.j109-submit').on('click', function(e) {
            var row_count = 0,
                _this = this;

            $('.j109-ev-charger__reference-row').each(function() {
                row_count += 1;
            });

            if (!(row_count.toString() == $('.form-field__input--select[name="mulkiyanum"]').val().toString())) {
                e.preventDefault();
                $('span.totalentry').text(equal_error);
            } else {
                $('span.totalentry').text("");
            };

        });

        _this.table_check();

    };

    J109.prototype.init_dropdowns = function() {

        $('.form-field__input--select').each(function() {
            $(this).on('change', function() {
                var type = $(this).children(":selected").attr('value'),
                    uniqueID = $(this).closest('.form-field--select').attr('uniqueID'),
                    name = $(this).attr("name"),
                    label = $(this).closest(".form-field--select").attr("j109-ev-charger__other-name"),
                    new_field = '<div class="form-field form-field--text "><span class="form-field__input-wrapper"><input class="form-field__input form-field__input--text" id="form-field-' + uniqueID + '" name="' + uniqueID + '" type="text" aria-describedby="description-for-' + uniqueID + '" data-parsley-errors-container="#description-for-' + uniqueID + '"  data-parsley-trigger="focusout"></span><div id="description-for-' + uniqueID + '" class="form-field__messages"></div></div>';

                if (type == "other" || (type == "yes" && $(this).hasClass('j109-ev-charger--yes_no'))) {
                    $(this).after(new_field);
                } else {
                    $(this).next().remove();
                };
            });
        });

    };

    J109.prototype.init_selectToggle = function() {
        var _this = this,
            $toggle = this.$journey.find('.j109-ev-charger--selecttoggle'),
            $branchToggle = this.$journey.find('.j109-ev-charger--selecttogglebranch');

        this.$journey.find('.j109-ev-charger--toggled').not('.'+$toggle.val()).hide();
        this.$journey.find('.j109-ev-charger--toggledbranch').not('.'+$branchToggle.val()).hide();
        //setTimeout(fun)this.$journey.find('.'+$toggle.val()).show();

        $toggle.on('change', function () {
            var $value = $(this).val();

            _this.$journey.find('.j109-ev-charger--toggled').not('.'+$value).fadeOut();
            setTimeout(function () {
                _this.$journey.find('.'+$value).fadeIn();
            },400)

        });

        $branchToggle.on('change', function () {
            var $value = $(this).val();

            _this.$journey.find('.j109-ev-charger--toggledbranch').not('.'+$value).fadeOut();
            setTimeout(function () {
                _this.$journey.find('.'+$value).fadeIn();
            },400)

        });
    };

    J109.prototype.add_reference = function(reference_name, reference_email, reference_phone, reference_prim) {
        var _this = this,
            truth_counter = 0,
            name,
            email,
            phone,
            email_check,
            email_checker = 0,
            uniqueID = utils.uniqueID(),
            tr_counter = 0,
            checked;





        $('.j109-ev-charger__reference-contact').each(function() {
            $(this).attr('required', false);
        });

        if ($('.j109-ev-charger__table--body').html().trim().length == 0) {
            checked = "checked";
        } else {
            checked = ""
        };

        $('.j109-ev-charger__reference-contact').trigger('focusout');

        $('.j109-ev-charger__reference-contact').each(function() {
            if ($(this).hasClass('form-field__input--error')) {
                truth_counter++;
            };
        });

        $('.j109-ev-charger__reference-contact').each(function() {
            if ($(this).attr('name') == "ref_email") {
                email_check = $(this).val();
            };
        });



        $('.j109-ev-charger__reference-email').each(function() {
            if ($(this).html() == email_check) {
                truth_counter++;
                email_checker++;
            };
        });

        $('.button--j109-ev-charger__table-check').off('click');
        _this.table_check();


        $('.m23-table__content-table-row').each(function() {
            tr_counter++;
        });

        var totalMulkita = _this.mulkiyaTotal.val()

        if (tr_counter <= totalMulkita) {
            if (truth_counter == 0) {

                $('.m23-table__content-table').find('.m23-table__content-table-header').show()



                $('.j109-ev-charger__ref-error-mes').removeClass('j109-ev-charger__ref-error-mes-active');


                if (!($('.j109-ev-charger__table--inactive').hasClass('j109-ev-charger__table--active'))) {
                    $('.j109-ev-charger__table--inactive').addClass('j109-ev-charger__table--active');
                };
                $('.j109-ev-charger__reference-error').removeClass('j109-ev-charger__reference-error--active');

                $('.j109-ev-charger__reference-contact').each(function() {
                    if ($(this).attr('name') == "mulkiya") {
                        name = $(this).val();
                    } else if ($(this).attr('name') == "ref_email") {
                        email = $(this).val();
                    } else if ($(this).attr('name') == "ref_phone") {
                        phone = $(this).val();
                    }
                    $(this).parent().removeClass('form-field__input-wrapper--validated');
                    this.value = "";
                });

                var texttd = $('.m23-table__content-table').find('.m23-table__content-table-header .platenmulkiya').text()

                var radio = '<label><input ' + checked + ' class="j109-ev-charger__radio-primary form-field__input form-field__input--radio" id="form-field-radio_1_1" name="radios_group1" type="radio" value="' + email + '" aria-describedby="description-for-' + uniqueID + '" data-parsley-errors-container="#description-for-' + uniqueID + '" data-parsley-multiple="radios_group1" data-parsley-id="35"><span class="form-field__fakeradio focus-enabled"></span></label>',
                    tr = '<tr class="m23-table__content-table-row j109-ev-charger__reference-row" tabindex="0"><td class="m23-table__content-table-cell j109-ev-charger__rownum">' + tr_counter + '</td><td data-label="' + texttd + '" class="m23-table__content-table-cell j109-ev-charger__reference-name">' + name + '</td><td class="j109-ev-charger__table--cancel-wrapper"><span class="j109-ev-charger__table--cancel icon-cancel"></span></td></tr>';
                $('.j109-ev-charger__table--body').append(tr);

                $('.j109-ev-charger__table--cancel').off('click');

                $('.j109-ev-charger__table--cancel').on('click', function() {
                    var __this = this;

                    $('.j109-ev-charger--delete').trigger('click');

                    $('.j109-ev-charger--delete-yes').on('click', function() {
                        $(__this).closest('.m23-table__content-table-row').remove();
                        $('span.totalentry').text("");
                        var row_count = 0;
                        $('.j109-ev-charger__reference-row').each(function() {
                            row_count += 1;
                            //console.log(row_count)
                        });
                        if (row_count > 0) {
                            $('.m23-table__content-table').find('.m23-table__content-table-header').show()
                        }
                        if (row_count == 0) {
                            $('.m23-table__content-table').find('.m23-table__content-table-header').hide()
                            $('.j109-ev-charger__reference-contact').each(function() {
                                $(this).attr('required', true);
                            });
                        }

                        var tr_counter = 0
                        $('.j109-ev-charger__rownum').each(function() {
                            tr_counter++;
                            $(this).text(tr_counter)
                        });

                        $(this).prev().trigger('click');
                    });


                });

            };
        } else {
            if (!($('.j109-ev-charger__reference-limit').hasClass('j109-ev-charger__reference-limit--active'))) {
                $('.j109-ev-charger__reference-limit').addClass('j109-ev-charger__reference-limit--active');
                $('.j109-ev-charger__email-error').removeClass('j109-ev-charger__email-error--active');
                $('.j109-ev-charger__reference-error').removeClass('j109-ev-charger__reference-error--active');
            };
        };
    };

    J109.prototype.table_check = function() {

    };

    J109.prototype.email_check = function(email_checker) {

    };

    J109.prototype.check_logic = function(logic_list, log_index, index) {
        var check_logic = [],
            _this = this;

        /////////////////////
        //when adding files//
        /////////////////////
        $('.form-field__input--upload').each(function() {

            $(this).on('change', function() {
                var uniqueID = utils.uniqueID();

                if ($.inArray($(this).attr('name'), logic_list) != -1 && $(this).attr("aria-invalid") == "false") {
                    check_logic.push($(this).attr('name'));
                    $(this).closest('.form-field--upload').next().addClass('j109-ev-charger__datepicker--active');
                    $(this).closest('.form-field--upload').next().find('.form-field__input--datepicker').attr('required', '');
                };

                var logic_check = [
                    [
                        ["IEC61215", ($.inArray("IEC61215", check_logic) != -1 || $.inArray("IEC61646", check_logic) != -1)],
                        ["IEC61730", $.inArray("IEC61730", check_logic) != -1],
                        ["IEC61701", $.inArray("IEC61701", check_logic) != -1],
                        ["IEC62716", $.inArray("IEC62716", check_logic) != -1],
                        ["IEC61345", $.inArray("IEC61345", check_logic) != -1 && $.inArray("IEC60068", check_logic) != -1]
                    ],
                    [
                        ["IEC621091", (($.inArray("IEC621091", check_logic) != -1 && $.inArray("IEC621092", check_logic) != -1) || $.inArray("IEC1741", check_logic) != -1)],
                        ["IEC6100032", ($.inArray("IEC6100032", check_logic) != -1 || $.inArray("IEC61000312", check_logic) != -1)],
                        ["IEC6100061", ((($.inArray("IEC6100061", check_logic) != -1 || $.inArray("IEC6100062", check_logic) != -1) && $.inArray("IEC6100063", check_logic) != -1) || (($.inArray("IEC6100064", check_logic) != -1 || $.inArray("IEC6100063", check_logic) != -1) && $.inArray("IEC6100062", check_logic) != -1))],
                        ["dewadrrg", ($.inArray("dewadrrg", check_logic) != -1)]
                    ],
                    ['', true]
                ];

                _this.logic_checklist(logic_check[index]);

                var logic = [
                    (($.inArray("IEC61215", check_logic) != -1 || $.inArray("IEC61646", check_logic) != -1) && $.inArray("IEC61730", check_logic) != -1 && $.inArray("IEC61701", check_logic) != -1 && $.inArray("IEC62716", check_logic) != -1 && $.inArray("IEC61345", check_logic) != -1 && $.inArray("IEC60068", check_logic) != -1),
                    ((($.inArray("IEC621091", check_logic) != -1 && $.inArray("IEC621092", check_logic) != -1) || $.inArray("IEC1741", check_logic) != -1) && ($.inArray("IEC6100032", check_logic) != -1 || $.inArray("IEC61000312", check_logic) != -1) && ((($.inArray("IEC6100061", check_logic) != -1 || $.inArray("IEC6100062", check_logic) != -1) && $.inArray("IEC6100063", check_logic) != -1) || (($.inArray("IEC6100064", check_logic) != -1 || $.inArray("IEC6100063", check_logic) != -1) && $.inArray("IEC6100062", check_logic) != -1)) && $.inArray("dewadrrg", check_logic) != -1),
                    true
                ];

                if (logic[log_index]) {
                    $('.form-field__button').find('.button--primary').removeAttr("disabled");
                };

            });

        });

        ///////////////////////
        //when removing files//
        ///////////////////////
        $('.form-field--upload').each(function() {
            var _tthis = this;

            $(this).find('.button--remove').on('click', function() {
                var name = $(_tthis).find('.form-field__input--upload').attr('name');

                check_logic.splice($.inArray(name, check_logic), 1);

                var logic = [(($.inArray("IEC61215", check_logic) != -1 || $.inArray("IEC61646", check_logic) != -1) && $.inArray("IEC61730", check_logic) != -1 && $.inArray("IEC61701", check_logic) != -1 && $.inArray("IEC62716", check_logic) != -1 && $.inArray("IEC61345", check_logic) != -1 && $.inArray("IEC60068", check_logic) != -1), ((($.inArray("IEC621091", check_logic) != -1 && $.inArray("IEC621092", check_logic) != -1) || $.inArray("IEC1741", check_logic) != -1) && ($.inArray("IEC6100032", check_logic) != -1 || $.inArray("IEC61000312", check_logic) != -1) && ((($.inArray("IEC6100061", check_logic) != -1 || $.inArray("IEC6100062", check_logic) != -1) && $.inArray("IEC6100063", check_logic) != -1) || (($.inArray("IEC6100064", check_logic) != -1 || $.inArray("IEC6100063", check_logic) != -1) && $.inArray("IEC6100062", check_logic) != -1)) && $.inArray("dewadrrg", check_logic) != -1), true];

                if (logic[log_index]) {
                    $('.form-field__button').find('.button--primary').removeAttr("disabled");
                } else {
                    $('.form-field__button').find('.button--primary').attr("disabled", "");
                };

                var logic_check = [
                    [
                        ["IEC61215", ($.inArray("IEC61215", check_logic) != -1 || $.inArray("IEC61646", check_logic) != -1)],
                        ["IEC61730", $.inArray("IEC61730", check_logic) != -1],
                        ["IEC61701", $.inArray("IEC61701", check_logic) != -1],
                        ["IEC62716", $.inArray("IEC62716", check_logic) != -1],
                        ["IEC61345", $.inArray("IEC61345", check_logic) != -1 && $.inArray("IEC60068", check_logic) != -1]
                    ],
                    [
                        ["IEC621091", (($.inArray("IEC621091", check_logic) != -1 && $.inArray("IEC621092", check_logic) != -1) || $.inArray("IEC1741", check_logic) != -1)],
                        ["IEC6100032", ($.inArray("IEC6100032", check_logic) != -1 || $.inArray("IEC61000312", check_logic) != -1)],
                        ["IEC6100061", ((($.inArray("IEC6100061", check_logic) != -1 || $.inArray("IEC6100062", check_logic) != -1) && $.inArray("IEC6100063", check_logic) != -1) || (($.inArray("IEC6100064", check_logic) != -1 || $.inArray("IEC6100063", check_logic) != -1) && $.inArray("IEC6100062", check_logic) != -1))],
                        ["dewadrrg", ($.inArray("dewadrrg", check_logic) != -1)]
                    ],
                    ['', true]
                ];

                _this.logic_checklist(logic_check[index]);

                $(_tthis).next().removeClass('j109-ev-charger__datepicker--active');
                $(_tthis).next().find('.form-field__input--datepicker').removeAttr('required');
            });

        });

    };

    J109.prototype.logic_checklist = function(logic_check) {

        $(logic_check).each(function(index, value) {
            if (value[1]) {
                $('.form-field__input--upload').each(function() {
                    if ($(this).attr('name') == value[0]) {
                        $(this).closest('.fieldset').find('.legend').addClass('j109-ev-charger__logic--check-active');
                        $(this).closest('.fieldset').find('.legend').addClass('icon-tick');
                    };
                });
            } else {
                $('.form-field__input--upload').each(function() {
                    if ($(this).attr('name') == value[0]) {
                        $(this).closest('.fieldset').find('.legend').removeClass('j109-ev-charger__logic--check-active');
                        $(this).closest('.fieldset').find('.legend').removeClass('icon-tick');
                    };
                });
            };
        });

    };

    return J109;
});

define('../src/journeys/j112-clearance-certificate-NDC/j112-clearance-certificate-NDC',['jquery'], function($) {

    'use strict';

    var j112_clearance_certificate = function($journey) {

        this.$journey = $journey;

        return this;
    };

    j112_clearance_certificate.prototype.init = function() {
        this.labels = $(this.$journey).data('labels');
        this.NDEWA_C();
    };

    j112_clearance_certificate.prototype.NDEWA_C = function() {
        var labelSets = this.labels;

        jQuery('select[name="IdentityType"]').on('change', function() {
            var selectedOption = jQuery(this).val();
            var $input = jQuery('input[name="IdentityNumber"]');
            var $label = $input.closest('.form-field').find('label');



            $input.removeClass('form-field__input--error parsley-error');
            $input.removeAttr('aria-invalid');

            jQuery('#description-for-eid').empty();
            $input.closest('.form-field').find('.parsley-errors-list').empty();
            $input.closest('.form-field').find('.form-field__input-wrapper').removeClass('form-field__input-wrapper--error');

            if (selectedOption === 'TN') {
                $input.attr('placeholder', labelSets.tl.placeholder);
                $input.attr('data-parsley-error-message', labelSets.tl.validation);
                $input.removeAttr('data-parsley-emiratesid');
                $label.text(labelSets.tl.label);

                jQuery('.form-field__input--upload[name="uploads1"]').closest('.form-field__uploader-details').find('.form-field__label').text(labelSets.tl.uploadLabel1);
                jQuery('.form-field__input--upload[name="uploads2"').closest('.form-field__uploader-details').find('.form-field__label').text(labelSets.tl.uploadLabel2);
                return;
            } else if (selectedOption === 'PP') {
                $input.attr('placeholder', labelSets.pp.placeholder);
                $input.attr('data-parsley-error-message', labelSets.pp.validation);
                $input.removeAttr('data-parsley-emiratesid');
                $label.text(labelSets.pp.label);

                jQuery('.form-field__input--upload[name="uploads1"]').closest('.form-field__uploader-details').find('.form-field__label').text(labelSets.pp.uploadLabel1);
                jQuery('.form-field__input--upload[name="uploads2"').closest('.form-field__uploader-details').find('.form-field__label').text(labelSets.pp.uploadLabel2);

                return;
            } else if (selectedOption == 'ED') {
                $input.attr('placeholder', labelSets.eid.placeholder);
                $input.attr('data-parsley-error-message', labelSets.eid.validation);
                $input.attr('data-parsley-emiratesid', '');
                $label.text(labelSets.eid.label);

                jQuery('.form-field__input--upload[name="uploads1"]').closest('.form-field__uploader-details').find('.form-field__label').text(labelSets.eid.uploadLabel1);
                jQuery('.form-field__input--upload[name="uploads2"]').closest('.form-field__uploader-details').find('.form-field__label').text(labelSets.eid.uploadLabel2);
            }

            if ($input.val().length != 0) {
                $input.trigger('focusout')
            };

        });

        var select_customerType = function (elem) {
            var selectedOption = $(elem).val();

            if (selectedOption == "1") {
                jQuery('select[name="IdentityType"]').children('option[value^="ED"]').show();
                jQuery('select[name="IdentityType"]').children('option[value^="PP"]').show();
                jQuery('select[name="IdentityType"]').children('option[value^="TN"]').hide();

                jQuery('select[name="IdentityType"]').val('ED');
                jQuery('select[name="IdentityType"]').trigger('change');

                jQuery('#divCommercial').hide();
                jQuery('#divIndividual').show();

                jQuery('#form-field-tradelicense').removeAttr('required');
                jQuery('#form-field-trade-letter').removeAttr('required');

                jQuery('#form-field-eid-copy').attr('required', 'required');
                jQuery('#form-field-eid-copy-2').attr('required', 'required');
                jQuery('#form-field-letter').attr('required', 'required');
            } else if (selectedOption == "2") {
                jQuery('select[name="IdentityType"]').children('option[value^="ED"]').hide();
                jQuery('select[name="IdentityType"]').children('option[value^="PP"]').hide();
                jQuery('select[name="IdentityType"]').children('option[value^="TN"]').show();

                jQuery('select[name="IdentityType"]').val('TN');
                jQuery('select[name="IdentityType"]').trigger('change');

                jQuery('#divCommercial').show();
                jQuery('#divIndividual').hide();

                jQuery('#form-field-eid-copy').removeAttr('required');
                jQuery('#form-field-eid-copy-2').removeAttr('required');
                jQuery('#form-field-letter').removeAttr('required');

                jQuery('#form-field-tradelicense').attr('required', 'required');
                jQuery('#form-field-trade-letter').attr('required', 'required');
            }
        };

        select_customerType(jQuery('select[name="CustomerType"]'));

        jQuery('select[name="CustomerType"]').on('change', function() {
            select_customerType(this);
        });

        var select_purpose = function (elem) {
            var selectedOption = jQuery(elem).val();

            if (selectedOption == '2') {
                jQuery('.form-field__input[name="courtRef"]').closest('.form-field').show();
                jQuery('.form-field__input[name="courtRef"]').attr('required', 'required');
                jQuery('.form-field__input[name="courtRef"]').attr('aria-required', true);
            } else {
                jQuery('.form-field__input[name="courtRef"]').closest('.form-field').hide();
                jQuery('.form-field__input[name="courtRef"]').removeAttr('required');
                jQuery('.form-field__input[name="courtRef"]').removeAttr('aria-required');
            }
        };

        select_purpose(jQuery('select[name="purpose"]'));

        jQuery('select[name="purpose"]').on('change', function() {
            select_purpose(this);
        });
    };

    return j112_clearance_certificate;
});

define('../src/journeys/j119-scholarship/j119-scholarship',['jquery', 'parsley', 'lib/utils'], function ($, parsley, utils)  {

        'use strict';

        var j119_scholarship = function($journey) {

        this.$journey = $journey;
        
        return this;

   		 };

   		 j119_scholarship.prototype.init = function(){

          var _this = this;

          var button = this.$journey.find('.m73-form-trigger-expand'),
          parent = this.$journey.find('#university_grades-data-table'),
          select =  this.$journey.find('[data-required-options]'),
          $legendToggleButton = this.$journey.find('[data-toggle-button]'),
          formTable = this.$journey.find('[data-table-form]');


              // set a unique id (safer than doing this inline)
          var uniqueID = utils.uniqueID(),
              triggerID = uniqueID + '_trigger',
              contentID = uniqueID + '_content';

          // set a unique id (Select,Form and Table)
          var uniqueNewID = utils.uniqueID(),
              selectID = uniqueNewID + '_select',
              buttonID = uniqueNewID + '_button',
              formID = uniqueNewID + '_form',
              tableID = uniqueNewID + '_table';

          select.attr( 'aria-group-control', selectID ).attr( 'id', tableID );
          $legendToggleButton.attr( 'aria-group-control', buttonID )
          formTable.attr( 'aria-group-control', tableID );

          $legendToggleButton.addClass('form_button_disable')

          $('.form-field').on('change','[data-required-options]',function(){
            if($legendToggleButton.hasClass('form_button_disable')){
               if(this.value){
                  $legendToggleButton.removeClass('form_button_disable')
              }
            }else{
              if(!this.value){
                 $legendToggleButton.addClass('form_button_disable')
              }
            }
          });

          // cache dom els
          var $trigger = this.$journey.find( '[data-toggle]'),
          $content = this.$journey.find( '[data-content]'),
          openTriggerClassname = 'm73-form-trigger-expand-open',
          openContentClassname = 'm73-form-content-expand-open';

          // add dynamic ids and props for aria tagging
          $trigger.attr( 'id', triggerID ).attr( 'aria-controls', contentID );
          $content.attr( 'id', contentID ).attr( 'aria-labelledby', triggerID );
          




          $('.form-field').on('click','[data-toggle]',function(){
            var $thisContentID = $(this).attr('aria-controls'),
            $thisContent = $(this).next();
            var expanded = $thisContent.attr( 'aria-expanded' ) === 'true';
            $(this).toggleClass(openTriggerClassname );
            $thisContent.attr( 'aria-expanded', expanded = !expanded );
            $thisContent.toggleClass(openContentClassname );

          })


            

          


           $('.form-field').on('click','.form--data-table-buttons .edit',function(){

              var thisRow = $(this).closest('.form--data-table-row'),
              thisRowData = thisRow.attr('data-row-of'),
              $formField = $('#university_grades').find('.form-field'),
              $thisRowContent = thisRow.find('.form--data-table-content .form--data-table-wrapper');

              thisRow.addClass('on-edit');
              $thisRowContent.each(function(index){
                var num = index + 1
                var inputLabel = $(this).find('.form-data-table__label').text(),
                inputVal  = $(this).find('.form-data-table__value').text(),
                $formField = $('#university_grades').find('.form-field');               
                $('#university_grades .form-field:nth-child('+num+') .form-field__label').text(inputLabel)
                $('#university_grades .form-field:nth-child('+num+') .form-field__input').val(inputVal)
              })

              if($('#university_grades').hasClass('fieldset--hidden')){
                  $('#university_grades').removeClass('fieldset--hidden');
                  $('#university_grades').attr('data-area-valid', true);
                  $('#university_grades').attr('data-form-of',thisRowData)
                }
           })


        $('.form-field').on('click','.form--data-table-buttons .remove',function(){
            var thisRow = $(this).closest('.form--data-table-row'),
            thisRowData = thisRow.attr('data-row-of'),
            thisTable = thisRow.parent();
            thisRow.remove()
            var lastRow = thisTable.find('.form--data-table-row').last()
            if(!lastRow.hasClass('template-row')){
              lastRow.addClass('last-row')
            }
            if(thisTable.attr('data-table-form')){
              if(thisTable.attr('aria-group-control')){
                 $("#"+thisTable.attr('aria-group-control') + " option[data-option-value='"+thisRowData+"']").removeAttr('disabled');
              }
            }
          })

             
          $('.button--save_legend').on('click',function(){
                _this.saveData($legendToggleButton.closest('.form-field').find('select'))
          })

          $('.button--cancel_legand').on('click',function(){
            var $selectedOption = $legendToggleButton.closest('.form-field').find('select').find('[selected]');
            $('#university_grades').attr('data-area-valid', false);
            $('#university_grades').addClass('fieldset--hidden');
            $('#university_grades').removeAttr('data-form-of');
            $legendToggleButton.closest('.form-field').find('select').attr("disabled", false);
            $legendToggleButton.closest('.form-field').find('select').prop('selectedIndex',0);
          })


      $legendToggleButton.on('click',function(){
          var $parent = $(this).closest('.form-field'),
          childrenFields = $parent.find('select');
          $legendToggleButton.addClass('form_button_disable')
          childrenFields.each(function () { 
                $(this).parsley().validate();
            });

          if(childrenFields.parsley().isValid()){
            var selectedOpt =  childrenFields.find('option:selected');
            selectedOpt.attr("selected", true).siblings().removeAttr("selected");
            _this.toggleLegend(childrenFields);  
          } 
      })


        };




    j119_scholarship.prototype.toggleLegend = function($trigger) {

    var _this = this,
    $legend = $('#'+$trigger.attr( 'aria-controls'));

    
      var $selectedOption = $trigger.find('[selected]'),
      $selectedOptionTarget = $selectedOption.attr('data-option-target-id'),
      $selectedOptionToggle = $selectedOption.attr('data-option-toggle'),
      $selectedOptionRequired = $selectedOption.attr('data-option-target-required'),
      $selectedOptionVal = $selectedOption.attr('data-option-value');
      if($selectedOptionTarget){
        $legend = $('#'+$selectedOptionTarget)
      }
          

    var $formField = $legend.find('.form-field'),
    $button = $legend.find('button'),
    dataPost = $legend.attr('data-table-post'),
    childrenFieldsLeg = $legend.find( 'input[type=text],select, input[type=number], input[type=email]')
    childrenFieldsLeg.each(function (index, value) { 
        _this.customReset($(this))
    });

    
    if($legend.hasClass('fieldset--hidden')){
      $legend.removeClass('fieldset--hidden');
      $trigger.attr("disabled", true);
      $legend.attr('data-area-valid', false);
      $legend.attr('data-form-of',$selectedOptionVal)
    }


    if ( !$legend.hasClass('fieldset--hidden') ) {
        /*$('.button--save_legend').on('click',function(){
               _this.saveData($trigger)
          })*/
      }
  };




  j119_scholarship.prototype.customReset = function(inputElement){
    if(!inputElement.is("select")){
      inputElement.val("")
    }
      inputElement.parsley().reset();
      inputElement.removeClass('parsley-success')
      inputElement.parent().removeClass('form-field__input-wrapper--error')
      inputElement.parent().removeClass('form-field__input-wrapper--validated')
      inputElement.removeClass('form-field__input--error')
      inputElement.removeClass('parsley-error')
      inputElement.removeAttr('aria-invalid')
  }

  j119_scholarship.prototype.cancelData = function(){

  }

    j119_scholarship.prototype.saveData = function(trigger){
          var _this = this,
          $formField = $('#university_grades').find('.form-field'),
          $formFieldOf = $('#university_grades').attr('data-form-of'),
          childrenFieldsLegTwo = $('#university_grades').find( 'input[type=text],select, input[type=number], input[type=email]'),
          validation = true;

          childrenFieldsLegTwo.parsley({ excluded: 'input.form-field__input--readonly, input[type=button], input[type=submit], input[type=reset], input[type=hidden], [disabled], :hidden'})


            childrenFieldsLegTwo.each(function (index, value) { 
                $(this).parsley().validate();
                if(!$(this).parsley().isValid()){
                  validation = false;
                }
            });

            if(validation == true){

              if(trigger){
                var $selectedOption = trigger.find('[selected]');
                trigger.attr("disabled", false);
                $selectedOption.attr('disabled','disabled')
                $selectedOption.removeAttr("selected")
                trigger.prop('selectedIndex',0);
              }
              $('#university_grades').attr('data-area-valid', true);
              $('#university_grades').addClass('fieldset--hidden');
            if($formField){
                var rowContent = ''
                $formField.each(function (index, value) { 
                    var $label = $(this).find('label').contents().filter(function() {return this.nodeType == 3;}).text(),
                    $thisFor = $(this).find('label').attr('for'),
                    $labelText = $.trim($label),
                    $input = $(this).find('input[type=text],select,input[type=date],input[type=number], input[type=email]'),
                    $inputDispaly = $input.val();
                    
                    if($(this).find('select.form_select_textVal').length !== 0){
                      $inputDispaly = $(this).find('select option:selected').text()
                    }
                    
                    
                    if($(this).hasClass('form-field--6')){
                        rowContent  =  rowContent+'<div class="form--data-table-wrapper column-2" data-table-wrapper-id="'+$thisFor+'"><label class="form-data-table__label">'+ $labelText +' </label><span class="form-data-table__value">' + $inputDispaly + '</span></div>';
                      }else{
                        rowContent  =  rowContent+'<div class="form--data-table-wrapper" data-table-wrapper-id="'+$thisFor+'"><label class="form-data-table__label">'+ $labelText +' </label><span class="form-data-table__value">' + $inputDispaly + '</span></div>'
                      }
                    });
                var dataPost = '',
                $selectedOption = '';
                _this.formDataTable(rowContent,$formFieldOf);
            }
          } 
    }



     j119_scholarship.prototype.formDataTable = function(content,selected){

      var $dataTableId = $('#university_grades-data-table'),
      dataTableActive = $dataTableId.attr('data-table-form'),
      $dataTableRow = $dataTableId.find('.form--data-table-row'),
      $dataTableRowTemplate = $dataTableId.find('.template-row'),
      $dataTableLastRow = $dataTableRow.last();


      var uniqueID = utils.uniqueID(),
            triggerID = uniqueID + '_trigger',
            contentID = uniqueID + '_content';

      if(!$dataTableRow.hasClass('on-edit')){
                  
      if ($dataTableLastRow.hasClass('template-row')){
          $dataTableLastRow.clone().insertAfter($dataTableLastRow).removeClass('template-row').addClass('last-row').attr('data-row-of',selected);

        }else{
          $dataTableLastRow.removeClass('last-row')
          $dataTableLastRow.clone().insertAfter($dataTableLastRow).addClass('last-row').attr('data-row-of',selected);
        }

      var $dataTableLastRow = $dataTableId.find('.last-row'),
      $LastRowContent = $dataTableLastRow.find('.form--data-table-content'),
      $LastRowTitle = $dataTableLastRow.find('.tab-title');

      // cache dom els
          this.$trigger = $dataTableLastRow.find( '[data-toggle]' ).eq( 0 );
          this.$content = $dataTableLastRow.find( '[data-content]' ).eq( 0 );

          // add dynamic ids and props for aria tagging
          this.$trigger.attr( 'id', triggerID ).attr( 'aria-controls', contentID );
          this.$content.attr( 'id', contentID ).attr( 'aria-labelledby', triggerID ); 




      $LastRowContent.empty();
      $LastRowContent.append(content);
      $LastRowTitle.text(selected)
      $dataTableLastRow.removeClass('hidden');
      
      }else{
          var editingRow = $dataTableId.find('.on-edit'),
          $editingRowContent = editingRow.find('.form--data-table-content');
          $editingRowContent.empty();
          $editingRowContent.append(content);
          editingRow.removeClass('on-edit');
      }
    
  }
      
      


       return j119_scholarship;
    });
define('../src/journeys/j120-smart-response/j120-smart-response',['jquery', 'lib/utils', 'parsley', 'pickerdate'], function($, utils, parsley) {

    'use strict';

    var J120_SR = function($component) {

        this.$component = $component;

        return this;
    };

    J120_SR.prototype.init = function() {
        var _this = this;

        this.selected = ['Comments Section', 'Status Message'];
        this.track = [];

        this.$component.attr('id', 'j120-smart-response');
        this.initWindow();
        this.otp();
        this.confirmEdit();
        this.survey();
        this.initSelect2();
        this.reinit_parsley();
        this.countdown(parseInt($('.j120-smart-response--countdown').attr('data-time')));

        this.$component.find('.button[data-max]').each(function() {

        });

        this.$component.find('.j120-smart-response--happinEX-fieldset__wrapper').each(function() {
            var $button = $(this).find('.button[data-max]'),
                $msg = $(this).find('.j120-form-field__messages-max'),
                max = parseInt($button.attr('data-max')),
                min = parseInt($button.attr('data-min')),
                checked = 0;

            $(this).find('.j120-smart-response--happinEX_improveBox').each(function() {
                if ($(this).prop("checked")) {
                    checked++
                };
            });

            if (checked <= max && checked >= min) {
                $button.removeClass('disabled');
                $button.attr('disabled', false);
            } else {
                $button.addClass('disabled');
                $button.attr('disabled', true);
            };

            if (checked > max) {
                $msg.fadeIn();
            } else {
                $msg.fadeOut();
            }
        });

        // paste event queue
        function queuePasteEvent(el, type, param) {

            pasteQueue[type] = param || true;

            if (!pasteRunner) {
                pasteRunner = window.setTimeout(function() {
                    var value = el.val();

                    // run paste transforms
                    if (pasteQueue.numbers) {
                        value = pasteNumerals(value);
                    }

                    if (pasteQueue.currency) {
                        value = pasteCurrency(value);
                    }

                    if (pasteQueue.name) {
                        value = pasteName(value);
                    }

                    if (typeof pasteQueue.truncate === 'number') {
                        value = truncatePaste(value, param);
                    }

                    el.val(value);

                    resetPasteQueue();
                }, 20);
            }
        };

        // reset queue
        function resetPasteQueue() {
            pasteQueue = [];
            pasteRunner = null;
        }

        // truncation and input rules
        function truncateVal(target, len) {
            if (target.val().length >= len) {
                window.setTimeout(function() {
                    target.val(target.val().substring(0, (len)));
                }, 5);
            }
        }

        function truncatePaste(value, len) {
            return value.length >= len ? value.substring(0, (len)) : value;
        }

        function constrainNumerals(ev) {
            var keyCode = ev.which,
                character = String.fromCharCode(keyCode);

            // Allow: special keys and specifically backspace, delete, tab, escape, enter
            if (($.inArray(keyCode, [0, 8, 9, 13, 27, 190]) !== -1 && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+A
                (character === 'a' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+C
                (character === 'c' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+V
                (character === 'v' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+X
                (character === 'x' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: home, end, left, right
                (keyCode >= 35 && keyCode <= 38 && !ev.shiftKey) ||
                // if allowed character
                /[0-9]/.test(character)) {
                return;
            }

            // prevent all others
            ev.preventDefault();
        }

        function pasteNumerals(value) {
            return value.replace(/\D/g, '');
        }

        function constrainCurrency(ev) {
            var input = $(ev.target),
                keyCode = ev.which,
                allowDecimal = input.val().indexOf('.') < 0 ? true : false,
                character = String.fromCharCode(keyCode);

            // Allow: backspace, delete, tab, escape, enter
            if (($.inArray(keyCode, [0, 8, 9, 13, 27, 190]) !== -1 && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+A
                (character === 'a' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+C
                (character === 'c' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+V
                (character === 'v' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+X
                (character === 'x' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: home, end, left, right
                (keyCode >= 35 && keyCode <= 38 && !ev.shiftKey) ||
                // Allowed characters
                (allowDecimal && /[\.]/.test(character) || /[0-9]/.test(character))) {

                // prevent exceeding 2dp
                window.setTimeout(function() {
                    if (input.val().indexOf('.') >= 0 && input.val().split('.')[1] && input.val().split('.')[1].length > 2) {
                        input.val(Math.floor(parseFloat(input.val()) * 100) / 100);
                    }
                }, 10);

                // allow character
                return;
            }

            // prevent all others
            ev.preventDefault();
        }

        function pasteCurrency(value) {
            var wVal = value.replace(/[^0-9\.]+/g, ''),
                sVal, newVal;

            wVal = wVal[0] === '.' ? '0' + wVal : wVal;
            sVal = wVal.split('.');
            newVal = sVal.length > 1 ? sVal[0] + '.' + sVal[1] : sVal[0];

            return newVal;
        }

        function constrainName(ev) {
            var keyCode = ev.which,
                character = String.fromCharCode(keyCode);

            // Allow: backspace, delete, tab, escape, enter
            if (($.inArray(keyCode, [0, 8, 9, 13, 27, 190]) !== -1 && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+A
                (character === 'a' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+C
                (character === 'c' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+V
                (character === 'v' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: Ctrl/Cmd+X
                (character === 'x' && (ev.ctrlKey || ev.metaKey) && !ev.shiftKey) ||
                // Allow: home, end, left, right
                (keyCode >= 35 && keyCode <= 38 && !ev.shiftKey) ||
                // Allowed characters
                /[a-zA-Z\s'-]/.test(character)) {
                return;
            }

            // prevent all others
            ev.preventDefault();
        }

        function pasteName(value) {
            return value.replace(/[^a-zA-Z\s'-]+/g, '');
        }

        $('[ data-parsley-maxnumber ]').off('keypress.truncate').on('keypress.truncate', function() {
            truncateVal($(this), parseInt($(this).attr('data-parsley-maxnumber')));
        });
        $('[ data-parsley-maxnumber ]').off('paste.truncate').on('paste.truncate', function() {
            queuePasteEvent($(this), 'truncate', parseInt($(this).attr('data-parsley-maxnumber')));
        });

        if ($('.j120-smart-response--content').hasClass('j120-smart-response--happinEX')) {
            _this.happinEX();
        };

        $('.j120-smart-response--upload').not('.button[data-uploader-button]').off('click.upload').on('click.upload', function() {
            $('.button[data-uploader-button]').click();
        });

        $('.j120-smart-response--img-buttonclick').off('click.img').on('click.img', function() {
            var src = $(this).attr('src');

            $('.j120-smart-response--img-button--trigger').closest('.m39-modal').find('.j120-smart-response--img').attr('src', src);

            $('.j120-smart-response--img-button--trigger').click();
        });

        $('.j120-smart-response--survey_improve--suggest').off('click.suggest').on('click.suggest', function() {
            $(this).toggleClass('j120-smart-response--survey_improve--suggestA');
            $(this).find('.j120-smart-response--survey_improveBox').prop("checked", !($(this).find('.j120-smart-response--survey_improveBox').prop("checked")));
        });

        $('.j120-smart-response--lang_card').off('click.suggest').on('click.suggest', function() {
            var tis = this;

            $('.j120-smart-response--lang_card').each(function() {
                $(this).removeClass('j120-smart-response--lang_cardA');
                $(this).find('.j120-smart-response--langBox').prop("checked", false);
            });
            $(this).addClass('j120-smart-response--lang_cardA');
            $(this).find('.j120-smart-response--langBox').prop("checked", !($(this).find('.j120-smart-response--langBox').prop("checked")));
        });

        $(window).off('resize').on('resize', function() {
            _this.initWindow();
        });

        $(window).off('j120_load').on('j120_load', function() {
            _this.loading();
        });

        $(window).off('reinit_j120').on('reinit_j120', function() {
            _this.init();
        });

    };

    J120_SR.prototype.scrollIntoView = function($node) {
        $('html, body').animate({
            scrollTop: ~~$node.offset().top - 100
        }, 750);
    };

    J120_SR.prototype.initWindow = function() {
        var notifheight = ($('.notification-newstyle').height() == undefined) ? 0 : $('.notification-newstyle').height(),
            cookheight = ($('.m71-cookie').height() == undefined) ? 0 : $('.m71-cookie').height(),
            m13floatheight = ($('.m13-footer--floating').height() == undefined) ? 0 : $('.m13-footer--floating').height();

        var height = ($(window).height() - $('header').height() - notifheight - cookheight - m13floatheight);
        var grid = $('.box--7'),
            rammas = $(grid).find('.j120-smart-response--window'),
            $notif = $(grid).find('.j120-smart-response--alert'),
            cardMax = 0,
            welcome = $(grid).find('.j120-smart-response--content');

        grid.css('height', (height).toString() + 'px');

        $('.j120-smart-response--content-content').fadeIn(800);

        //jQuary version change fix
        var $notifHeight = $notif.length > 0 ? $notif.outerHeight(true) : null;

        if ((((grid.height() - welcome.height()) / 2) - $notifHeight) >= 0) {
            $(welcome).css('margin-top', (((grid.height() - welcome.height()) / 2) - $notifHeight).toString() + 'px');
            $('.j120-smart-response--survey_page').css('position', 'fixed');
        } else {
            $(welcome).attr('style', '');
            $('.j120-smart-response--survey_page').css('position', 'fixed');
        };
        $(welcome).fadeIn(400);
        $('.j120-smart-response--content-content').addClass('j120-smart-response--content__loaded');
    };

    J120_SR.prototype.confirmEdit = function() {
        var _this = this,
            $edit = $('.j120-smart-response--confirm_edit'),
            $board = $('.j120-smart-response--confirm'),
            $form = $('.j120-smart-response--confirm_form'),
            $formModal = $('.j120-smart-response--confirm_formModal'),
            $dialogModal = $formModal.find('.m39-modal__dialog'),
            $save = $('.j120-smart-response--confirm_save');

        $edit.off('click').on('click', function() {
            var sum = 12;

            $board.find('.m42-keyvalue__value[data-type]').each(function() {
                var $check1 = $(this).data('type'),
                    $item = $(this);

                $form.find('input, textarea').each(function() {
                    var $check2 = $(this).data('type');

                    if ($check1 == $check2) {
                        if ($check1 == 'mobile') {
                            $(this).val($item.html().slice(-9));
                        } else {
                            $(this).val($item.html());
                        };
                    };

                });
            });

            $dialogModal.children().each(function() {
                sum = sum + $(this).outerHeight(true);
            });
            $dialogModal.css('height', sum.toString() + 'px');
            $formModal.find('.m39-modal__trigger').click();
        });

        $save.off('click').on('click', function() {
            var wrong = 0;

            $form.find('input, textarea').each(function() {
                $(this).parsley().validate();
                if (!$(this).parsley().isValid()) {
                    wrong++
                };
            });

            if (wrong == 0) {
                $form.find('input, textarea').each(function() {
                    var $check1 = $(this).data('type'),
                        $item = $(this);

                    $board.find('.m42-keyvalue__value[data-type]').each(function() {
                        var $check2 = $(this).data('type');

                        if ($check1 == $check2) {
                            if ($check1 == 'mobile') {
                                $(this).html('0' + $item.val().toString());
                            } else {
                                $(this).html($item.val())
                            };
                        };

                    });
                });

                $formModal.find('.m39-modal__button--close').click();
            };
        });

        $formModal.find('.m39-modal__button--close').off('click.close').on('click.close', function() {
            $form.find('input, textarea').each(function() {
                $(this).parsley().reset();
                $(this).closest('.form-field__input-wrapper').removeClass('form-field__input-wrapper--validated');
                $(this).closest('.form-field__input-wrapper').removeClass('form-field__input-wrapper--error');
                $(this).closest('.form-field').find('.parsley-errors-list').remove();
            });
        });
    };

    J120_SR.prototype.otp = function() {
        var _this = this,
            $field = $('.form-field--otp'),
            $input = $field.find('.form-field__input--otp'),
            $inputMain = $field.find('.form-field__input--otp_main');

        $input.each(function() {
            var $i = $(this);

            $i.off('keyup.otp').on('keyup.otp', function() {
                if ($i.val().length > 0) {
                    $i.focusout();
                    $i.closest('.form-field__input-wrapper_otp').next().find('.form-field__input--otp').focus();
                };
            });;
        });

        $(".form-field__input--otp").on('keyup blur', function() {
            var OTPValue = '';

            $.each($(".form-field__input--otp"), function() {
                OTPValue += $(this).val();
            });

            $(".form-field__input--otp_main").val(OTPValue);
        });

    };

    J120_SR.prototype.survey = function() {
        var _this = this,
            $wrapper = $('.j120-smart-response--survey__wrapper'),
            $back = $('.j120-smart-response--survey_back');

        $('.j120-smart-response--survey_Tpage').html($wrapper.length);
        $('.j120-smart-response--survey_Cpage').html('1');

        $back.off('click.back').on('click.back', function() {
            $wrapper.each(function() {
                if ($(this).css('display') == 'block') {
                    var $prev = $(this).prev(),
                        $page = $prev.attr('data-page'),
                        $m = $(this),
                        $checker = $(this).prev().prev();

                    $m.fadeOut(400);
                    setTimeout(function() {
                        $prev.fadeIn(400);
                        setTimeout(function() {
                            $(window).trigger('resize');
                            $('.j120-smart-response--survey_Cpage').html($page);
                        }, 50);
                    }, 400);

                    if ($checker.length == 0) {
                        $back.fadeOut();
                    };
                };
            });
        });

        $wrapper.each(function() {
            var $k = $(this),
                $improve = $k.find('.j120-smart-response--survey_improve'),
                $page = $k.next().attr('data-page'),
                $next = $k.find('.button--next:not([type="submit"])'),
                $star = $(this).find('.j120-smart-response--survey_star--item');

            $next.off('click.surveynext').on('click.surveynext', function(e) {
                e.preventDefault();
                if ($k.next().length != 0) {
                    $k.fadeOut(400);
                    setTimeout(function() {
                        $k.next().fadeIn(400);
                        setTimeout(function() {
                            $(window).trigger('resize');
                            $('.j120-smart-response--survey_Cpage').html($page);
                        }, 50);
                    }, 400);
                } else {
                    $k.find('.form-field__button').fadeIn();
                };

                $back.fadeIn();
            });

            $star.each(function() {
                var $i = $(this);

                $i.off('click.star').on('click.star', function() {
                    var j = 1;

                    $star.each(function() {
                        $(this).removeClass('j120-smart-response--survey_star--itemactive');
                    });

                    $star.each(function() {

                        if (!($(this).attr('star-index') == $i.attr('star-index'))) {
                            $(this).addClass('j120-smart-response--survey_star--itemactive');
                            j++
                        } else {
                            return false;
                        };

                    });

                    $i.addClass('j120-smart-response--survey_star--itemactive');
                    $i.closest('.j120-smart-response--survey_star--wrapper').find('.j120-smart-response--survey_starTotal').val(j);

                    if (j < 4) {
                        if ($improve.css('display') == 'none') {
                            $improve.fadeIn(100);
                            $k.addClass('mt24');
                            $(window).trigger('resize');
                            if ($k.next().length == 0) {
                                $k.find('.form-field__button').fadeIn();
                            }
                        }
                    } else {
                        $improve.fadeOut(100);
                        if ($k.next().length != 0) {
                            $k.fadeOut(400);
                            setTimeout(function() {
                                $k.removeClass('mt24');
                                $k.next().fadeIn(400);
                                $improve.find('.j120-smart-response--survey_improve--suggestA').each(function() {
                                    $(this).click();
                                });
                                $improve.find('input, textarea').each(function() {
                                    $(this).val('');
                                });
                                setTimeout(function() {
                                    $(window).trigger('resize');
                                    $('.j120-smart-response--survey_Cpage').html($page);
                                }, 50);
                            }, 400);
                            $k.find('.form-field__button').fadeOut();

                            $back.fadeIn();
                        } else {
                            $k.find('.form-field__button').fadeIn();
                            $improve.fadeOut(100);
                            setTimeout(function() {
                                $improve.find('.j120-smart-response--survey_improve--suggestA').each(function() {
                                    $(this).click();
                                });
                                $improve.find('input, textarea').each(function() {
                                    $(this).val('');
                                });
                                $(window).trigger('resize');
                            }, 110);

                            $back.fadeIn();
                        };
                    };
                });
            });
        });
    };

    J120_SR.prototype.reinit_parsley = function() {
        var _this = this,
            $datepickersFuture = $('[ data-el="datepicker-future" ]'),
            $dp,
            dpOptions,
            dpMax,
            dpLabelId,
            $datepickersPast = $('[ data-el="datepicker-past" ]'),
            $datepickers = $('[ data-el="datepicker" ]'),
            defaultOpts = {
                closeOnSelect: true,
                format: 'd mmmm yyyy',
                formatSubmit: 'd mmmm yyyy',
                onStart: function() {
                    // set default date
                    var $dp = this.$node,
                        date;

                    if ($dp.data('initial-date')) {
                        date = new Date($dp.data('initial-date'));
                        this.set('select', [date.getFullYear(), date.getMonth(), date.getDate()]);
                    }
                },
                onOpen: function() {
                    _this.scrollIntoView(this.$node);
                },
                onClose: function() {
                    this.component.$node.parsley().validate();
                }
            };

        $('.j120-smart-response').find('.form, input, select, textarea').each(function() {
            $(this).parsley();
        });
        // init datepickers
        $datepickers.each(function(i, el) {
            $dp = $(el);

            if (true) {

                dpOptions = $dp.data('picker-options');
                dpLabelId = '#' + $dp.parents('.form-field').attr('id');

                if (typeof dpOptions === 'string') {
                    dpOptions = JSON.parse(dpOptions);
                } else if (typeof dpOptions !== 'object') {
                    dpOptions = {};
                }

                $dp.pickadate(
                    $.extend(
                        true,
                        dpOptions,
                        defaultOpts
                    )
                );

                // if dp is has a ref dataset update based on this
                if ($dp.data('ref')) {
                    $dp.on('change', _this.setConstraints);
                }

                // IE9clicker (1of2) - as IE9 doesn't have events on pseudoselectors (clicking on calendar icon does not trigger picker)
                // and as it would be too much work before delivery to update markup of all date fields... go js ugly solution
                $dp.after('<span data-clicker="' + dpLabelId + '" class="form-field__datepicker-icon-clicker"></span>');

            } else {

                $dp.attr('type', 'date');

                // if dp is has a ref dataset update based on this
                if ($dp.data('ref')) {
                    $dp.on('change', _this.setConstraintsMobile);
                }

            }

        });

        $datepickersFuture.each(function(i, el) {
            $dp = $(el);

            if (true) {

                dpMax = $dp.data('date-max');
                dpOptions = $dp.data('picker-options');
                dpLabelId = '#' + $dp.parents('.form-field').attr('id');

                if (typeof dpOptions === 'string') {
                    dpOptions = JSON.parse(dpOptions);
                } else if (typeof dpOptions !== 'object') {
                    dpOptions = {};
                }

                if (typeof dpMax === 'object') {
                    var maxDay = dpMax[0],
                        maxMonth = dpMax[1],
                        maxYear = dpMax[2],
                        day = new Date();

                    day.setDate(day.getDate() + maxDay);
                    day.setMonth(day.getMonth() + maxMonth);
                    day.setFullYear(day.getFullYear() + maxYear);

                    dpMax = {
                        max: day
                    };

                } else if (typeof dpMax !== 'object') {
                    dpMax = {};
                }

                $dp.pickadate(
                    $.extend(
                        true, {
                            container: dpLabelId,
                            min: new Date()
                        },
                        dpOptions,
                        dpMax,
                        defaultOpts
                    )
                );

                // if dp is has a ref dataset update based on this
                if ($dp.data('ref')) {
                    $dp.on('change', _this.setConstraints);
                }


                // IE9clicker (1of2) - as IE9 doesn't have events on pseudoselectors (clicking on calendar icon does not trigger picker)
                // and as it would be too much work before delivery to update markup of all date fields... go js ugly solution
                $dp.after('<span data-clicker="' + dpLabelId + '" class="form-field__datepicker-icon-clicker"></span>');

            } else {

                $dp.attr('type', 'date');

                // if dp is has a ref dataset update based on this
                if ($dp.data('ref')) {
                    $dp.on('change', _this.setConstraintsMobile);
                }
            }

        });

        $datepickersPast.each(function(i, el) {
            $dp = $(el);

            if (true) {

                dpOptions = $dp.data('picker-options');
                dpLabelId = '#' + $dp.parents('.form-field').attr('id');

                if (typeof dpOptions === 'string') {
                    dpOptions = JSON.parse(dpOptions);
                } else if (typeof dpOptions !== 'object') {
                    dpOptions = {};
                }

                $dp.pickadate(
                    $.extend(
                        true, {
                            container: dpLabelId,
                            max: new Date()
                        },
                        dpOptions,
                        defaultOpts
                    )
                );

                // if dp is has a ref dataset update based on this
                if ($dp.data('ref')) {
                    $dp.on('change', _this.setConstraints);
                }


                // IE9clicker (1of2) - as IE9 doesn't have events on pseudoselectors (clicking on calendar icon does not trigger picker)
                // and as it would be too much work before delivery to update markup of all date fields... go js ugly solution
                $dp.after('<span data-clicker="' + dpLabelId + '" class="form-field__datepicker-icon-clicker"></span>');

            } else {

                $dp.attr('type', 'date');

                // if dp is has a ref dataset update based on this
                if ($dp.data('ref')) {
                    $dp.on('change', _this.setConstraintsMobile);
                }
            }

        });
    };

    J120_SR.prototype.initSelect2 = function() {
        var _this = this,
            direction;

        if ($('.j120-smart-response').hasClass('j120-smart-response--rtl')) {
            direction = 'rtl'
        } else {
            direction = 'ltr'
        }

        $('.form-field__input--select2').each(function() {
            var $parent = $(this).closest('.form-field');

            $(this).select2({
                width: '100%',
                dropdownParent: $('.j120-smart-response')
            });
            $parent.find('.select2-selection__arrow').remove();
            $parent.find('.select2-selection').css('height', 'auto');
            if (($(this).hasClass('j120-location-form-field__input--select2') && !utils.isRTL()) || (!$(this).hasClass('j120-location-form-field__input--select2') && utils.isRTL())) {
                $parent.find('.select2-selection__rendered').css({ 'padding': '5px 12px 8px', 'padding-left': '44px' });
            } else if (($(this).hasClass('j120-location-form-field__input--select2') && utils.isRTL()) || (!$(this).hasClass('j120-location-form-field__input--select2') && !utils.isRTL())) {
                $parent.find('.select2-selection__rendered').css({ 'padding': '5px 12px 8px', 'padding-right': '44px' });
            }
        });

        if ($('.j120-smart-response').hasClass('j120-smart-response--rtl')) {
            setTimeout(function() {
                $('.select2-results__options').addClass('j120-smart-response--rtl');
            }, 500);
        };
    };

    J120_SR.prototype.countdown = function(time) {
        var _this = this,
            $count = $('.j120-smart-response--countdown');

        $count.html(time);

        setTimeout(function() {
            time = time - 1;
            if (time >= 0) {
                _this.countdown(time)
            };
        }, 1000);
    };

    J120_SR.prototype.loading = function() {
        var _this = this,
            $content = $('.j120-smart-response--content'),
            $height = ($content.height() - $('.j120-smart-response--rammas_icon').height()),
            $items = $content.children().not('.j120-smart-response--rammas_icon');

        $items.each(function() {
            $(this).addClass('j120-smart-response-opaque')
        });

        $('.j120-smart-response--content-content').append('<div class="j120-smart-response--clearscreen"></div>');

    };

    J120_SR.prototype.happinEX = function() {
        var _this = this,
            $smileys = $('.j120-smart-response--happinEX_rxn'),
            $mainWrapper = $('.j120-smart-response--happinEX-main'),
            $TDsuggest = $('.j120-smart-response--happinEX_improve--suggestTD'),
            $pseudoR = $('.j120-smart-response--happinEX-pseudoradio'),
            $back = $('.j120-smart-response--happinex_back'),
            $wrapper = $('.j120-smart-response--survey__wrapper');

        $back.off('click.back').on('click.back', function() {
            var $activePage = $('div[data-active="true"]'),
                $prev = $activePage.prev();

            if ($prev.hasClass('j120-smart-response--happinEX-main')) {
                if ($prev.find('.j120-smart-response--happinEX-mainTD').length > 0) {
                    var yesno = $prev.find('.j120-smart-response--happinEX-yesno').find('.form-field__input--radio:checked').val();
                    if (yesno.toLowerCase() == "yes") {
                        $activePage.fadeOut(400);
                        $('div[data-active="true"]').attr('data-active', '');
                        setTimeout(function() {
                            $prev.fadeIn(400);
                            $prev.find('.j120-smart-response--happinEX-mainTD:last-child').fadeIn(400);
                            $prev.find('.j120-smart-response--happinEX-mainTD:last-child').attr('data-active', 'true');
                            setTimeout(function() {
                                $(window).trigger('resize');
                                if ($(window).width() <= 599) {
                                    _this.toTop()
                                }
                            }, 50);
                        }, 400);
                    } else {
                        $activePage.fadeOut(400);
                        $('div[data-active="true"]').attr('data-active', '');
                        setTimeout(function() {

                            $prev.fadeIn(400);
                            $prev.find('.j120-smart-response--happinEX-mainTD:first-child').fadeIn(400);
                            $prev.find('.j120-smart-response--happinEX-mainTD:first-child').attr('data-active', 'true');
                            setTimeout(function() {
                                $(window).trigger('resize');
                                if ($(window).width() <= 599) {
                                    _this.toTop()
                                }
                            }, 50);
                        }, 400);
                    };
                } else {
                    $activePage.fadeOut(400);
                    $('div[data-active="true"]').attr('data-active', '');
                    setTimeout(function() {
                        $prev.fadeIn(400);
                        $prev.attr('data-active', 'true');
                        setTimeout(function() {
                            $(window).trigger('resize');
                            if ($(window).width() <= 599) {
                                _this.toTop()
                            }
                        }, 50);
                    }, 400);
                    if ($prev.prev().length == 0) {
                        $(this).fadeOut();
                    }
                }
            } else if ($prev.length > 0) {
                $activePage.fadeOut(400);
                $('div[data-active="true"]').attr('data-active', '');
                setTimeout(function() {
                    $prev.fadeIn(400);
                    $prev.attr('data-active', 'true');
                    setTimeout(function() {
                        $(window).trigger('resize');
                        if ($(window).width() <= 599) {
                            _this.toTop()
                        }
                    }, 50);
                }, 400);
                if ($prev.prev().length == 0) {
                    $(this).fadeOut();
                }
            }
        });

        $pseudoR.each(function() {
            var pseudo = $(this);

            $(this).find('.form-field__radio').each(function() {
                $(this).off('click.pseudo').on('click.pseudo', function() {
                    var $next = $(this).closest('.j120-smart-response--happinEX-mainTD').find('.button--next');

                    $next.removeClass('disabled');
                    $next.attr('disabled', false)
                });
            });
        });

        $mainWrapper.each(function() {
            var $a = $(this),
                $Bnext = $a.find('button.button--next').not('.button--TD'),
                $TDnext = $a.find('button.button--TD'),
                $hinpunt = $a.find('.form-field--happinEX-hidden'),
                $nexta = $(this).next();

            $TDnext.off('click.TD').on('click.TD', function() {
                var $TDwrapper = $(this).closest('.j120-smart-response--happinEX-mainTD'),
                    $val = $TDwrapper.find('.j120-smart-response--happinEX-yesno').find('.form-field__input--radio:checked').val();

                if ($val.toLowerCase() == 'yes') {
                    $TDwrapper.fadeOut(400);
                    $('div[data-active="true"]').attr('data-active', '');
                    setTimeout(function() {
                        $TDwrapper.next().fadeIn(400);
                        $TDwrapper.next().attr('data-active', 'true');
                        setTimeout(function() {
                            $(window).trigger('resize');
                            if ($(window).width() <= 599) {
                                _this.toTop()
                            }
                        }, 50);
                    }, 400);
                } else {
                    $TDwrapper.next().fadeOut();
                    $Bnext.trigger('click.Bnext');
                };
                $back.fadeIn();
            });

            $Bnext.off('click.Bnext').on('click.Bnext', function() {
                var i = 0;

                if ($hinpunt.length != 0) {
                    $hinpunt.find('input').parsley().validate()
                    if ($hinpunt.css('display') == 'block' && !$hinpunt.find('input').parsley().isValid()) {
                        i++;
                    };
                }

                if (i == 0) {
                    var sval = $pseudoR.find('.form-field__input--radio:checked').val();

                    $a.fadeOut(400);
                    $('div[data-active="true"]').attr('data-active', '');
                    setTimeout(function() {
                        $nexta.fadeIn(400);
                        $nexta.attr('data-active', 'true');
                        setTimeout(function() {
                            $(window).trigger('resize');
                            if ($(window).width() <= 599) {
                                _this.toTop()
                            }
                        }, 50);
                    }, 400);


                    $TDsuggest.each(function() {
                        if ($(this).data('tdtag') != undefined) {
                            var tags = $(this).data('tdtag').split(',');

                            if (tags.includes(sval)) {
                                if ($(window).width() <= 599) {
                                    $(this).css('display', 'table');
                                } else {
                                    $(this).css('display', 'inline-block');
                                }

                            } else {
                                $(this).css('display', 'none');
                            };
                        }
                    });
                    $back.fadeIn();
                };
            });
        });

        $('.j120-smart-response--happinEX-radios').find('.form-field__fakeradio').each(function() {
            var tis = this;

            $(this).off('click.Hradio').on('click.Hradio', function() {
                setTimeout(function() {
                    if (($(tis).closest('.form-field__radio').find('input').val().toLowerCase() == 'others') && ($(tis).closest('.form-field__radio').find('input').prop('checked') == true)) {
                        $('.form-field--happinEX-hidden').fadeIn();
                    } else {
                        $('.form-field--happinEX-hidden').fadeOut();
                    };
                }, 50);
            });
        });

        $('.j120-smart-response--happinEX_improve--suggest').off('click.suggest').on('click.suggest', function() {
            var $parent = $(this).closest('.j120-smart-response--happinEX-fieldset__wrapper'),
                $button = $parent.find('.button[data-max]'),
                $msg = $parent.find('.j120-form-field__messages-max'),
                val = $(this).find('.j120-smart-response--happinEX_improveBox').val(),
                max = parseInt($button.attr('data-max')),
                min = parseInt($button.attr('data-min')),
                checked = 0;

            $(this).toggleClass('j120-smart-response--happinEX_improve--suggestA');
            $(this).find('.j120-smart-response--happinEX_improveBox').prop("checked", !($(this).find('.j120-smart-response--happinEX_improveBox').prop("checked")));

            if ($(this).hasClass('j120-smart-response--happinEX_improve--suggestMain') && !_this.selected.includes(val)) {
                _this.selected.unshift(val);
            } else if ($(this).hasClass('j120-smart-response--happinEX_improve--suggestMain') && _this.selected.includes(val)) {
                _this.selected.splice(_this.selected.indexOf(val), 1);
            };

            $parent.find('.j120-smart-response--happinEX_improveBox').each(function() {
                if ($(this).prop("checked")) {
                    checked++
                };
            });

            if (checked <= max && checked >= min) {
                $button.removeClass('disabled');
                $button.attr('disabled', false);
            } else {
                $button.addClass('disabled');
                $button.attr('disabled', true);
            };

            if (checked > max) {
                $msg.fadeIn();
            } else {
                $msg.fadeOut();
            }
        });

        $('.j120-smart-response--happinEX-fieldset__wrapper').each(function() {
            $(this).attr('data-track', utils.uniqueID())
        });

        $smileys.each(function() {
            $(this).off('click.reax').on('click.reax', function() {
                var $reax = $(this).find('.j120-smart-response--happinEX_rxnBox'),
                    reaction = $reax.val(),
                    $back = $('.j120-smart-response--smiley_back'),
                    m = 0,
                    $wrapper = $('.j120-smart-response--happinEX-form__wrapper[data-reaction="' + reaction + '"]');

                $reax.prop('checked', true);

                $('.j120-smart-response--happinex_back').hide();
                $back.show();

                $('.j120-smart-response--happinEX_rxn__wrapper').prepend('<div class="j120-smart-response--happinEX_rxn--blocker"></div>')

                $back.off('click.back').on('click.back', function() {
                    if ($wrapper.find('.j120-smart-response--happinEX-fieldset__wrapper:first-child').css('display') != 'none') {
                        $wrapper.find('.j120-smart-response--happinEX_improve--suggestA').trigger('click');
                        $wrapper.fadeOut(400);

                        $('.j120-smart-response--happinEX-initial').find('.j120-smart-response--happinEX__title, .j120-smart-response--happinEX__subtitle, .j120-smart-response--happinEX_rxn').not($(this)).each(function() {
                            var $h = $(this);

                            $h.removeClass('hidden');
                            setTimeout(function() {
                                $h.animate({
                                    width: '100%'
                                }, 500, function() {
                                    $h.animate({
                                        height: '500px'
                                    }, 500, function() {
                                        $h.animate({
                                            opacity: '1'
                                        }, 100);
                                    });
                                });
                            }, 750);
                        });

                        setTimeout(function() {
                            setTimeout(function() {
                                $(window).trigger('resize');
                                if ($(window).width() <= 599) {
                                    _this.toTop()
                                }
                            }, 50);
                        }, 1000);

                        $('.j120-smart-response--happinEX_rxn--blocker').remove();

                        $('.j120-smart-response--happinex_back').show();
                        $back.hide();
                    } else {
                        var $active;

                        $wrapper.find('.j120-smart-response--happinEX-fieldset__wrapper').each(function() {
                            if ($(this).css('display') == 'block') {
                                $active = $(this);
                                $active.find('.j120-smart-response--happinEX_improve--suggestA').trigger('click');
                                $active.find('.form-field__input--textarea').val('');
                            };
                        });
                        $active.fadeOut(400);
                        setTimeout(function() {
                            $wrapper.find('.j120-smart-response--happinEX-fieldset__wrapper[data-track="' + _this.track[0] + '"]').fadeIn(400);
                            _this.track.splice(0, 1);
                            setTimeout(function() {
                                $(window).trigger('resize');
                                if ($(window).width() <= 599) {
                                    _this.toTop()
                                }
                            }, 50);
                        }, 400);

                        m = m - 1;
                    }

                });

                $('.j120-smart-response--happinEX-initial').find('.j120-smart-response--happinEX__title, .j120-smart-response--happinEX__subtitle, .j120-smart-response--happinEX_rxn').not($(this)).each(function() {
                    var $h = $(this);

                    $(this).animate({
                        opacity: '0'
                    }, 100, function() {
                        $(this).animate({
                            height: '0px'
                        }, 100, function() {
                            $(this).animate({
                                width: '0px'
                            }, 100);
                        });
                    });
                    setTimeout(function() {
                        $h.addClass('hidden');
                    }, 750);
                });
                //$(this).addClass('j120-smart-response--happinEX_rxn--animate');
                setTimeout(function() {
                    $wrapper.fadeIn(400);
                    setTimeout(function() {
                        $(window).trigger('resize');
                        if ($(window).width() <= 599) {
                            _this.toTop()
                        }
                    }, 50);
                }, 750);

                $wrapper.find('.j120-smart-response--happinEX-fieldset__wrapper').each(function() {
                    var $i = $(this),
                        $button = $i.find('.button[data-max]');

                    $button.off('click.surveynext').on('click.surveynext', function(e) {
                        if (_this.selected.length != 0) {
                            var $next = $wrapper.find('.j120-smart-response--happinEX-fieldset__wrapper[data-set="' + _this.selected[m] + '"]')

                            $i.fadeOut(400);
                            setTimeout(function() {
                                $next.fadeIn(400);
                                setTimeout(function() {
                                    $(window).trigger('resize');
                                    if ($(window).width() <= 599) {
                                        _this.toTop()
                                    }
                                }, 50);
                            }, 400);
                        } else {
                            $wrapper.find('.form-field__button').fadeIn();
                        };

                        _this.track.unshift($(this).closest('.j120-smart-response--happinEX-fieldset__wrapper').attr('data-track'));

                        if ($(this).attr('data-submit') == 'true') {
                            $('.j120-smart-response--happinEX-initial').fadeOut();
                            $('.j120-smart-response--smiley_back').fadeOut();
                        }
                        m = m + 1;
                    });
                });

            });
        });
    };

    J120_SR.prototype.toTop = function() {
        if (utils.isWindowsPhone()) {

            $('.j120-smart-response').find('.box--7').scrollTop(0);
        } else {

            $('.j120-smart-response').find('.box--7').animate({

                scrollTop: 0
            }, 500, function() {

                $('.j120-smart-response').find('.box--7').focus();
            });
        }
    }

    return J120_SR;

});

define('../src/journeys/j121-beneficiary-easy-pay/j121-beneficiary-easy-pay',['jquery', 'parsley', 'lib/utils'], function ($, parsley, utils)  {

        'use strict';

        var j121_beneficiary = function($journey) {

        this.$journey = $journey;
        
        return this;

       };

        j121_beneficiary.prototype.init = function(){


var input = this.$journey.find('.form-field__input-autoselect'),
beneficiaryList = input.data( 'beneficiary-number' ),
formGroup = this.$journey.find('.form-field-group'),
deleteBtn = this.$journey.find('.form-field-group .deleteBtn'),
editBtn = this.$journey.find('.form-field-group .editBtn'),
saveBtn = this.$journey.find('.form-field-group .button--save'),
openBtn = this.$journey.find('.form-field__input-arrow .icon-open'),
cancelBtn = this.$journey.find('.form-field-group .button--cancel');






editBtn.on('click',function(){
  $(this).parent().addClass('edit-mode')
  var intVal = $(this).parent().find('.form-field__input--nickname').val();
  var readonly = $(this).parent().find('.form-field__input-read-only');
  readonly.css("background-color", "#f6f6f6")
  saveCancel(intVal)
})
function saveCancel(a){
  cancelBtn.on('click',function(){
    $(this).parent().parent().removeClass('edit-mode')
    $(this).parent().parent().find('.form-field__input--nickname').val(a)
    var thisMessage = $(this).parent().parent().find('.form-field__messages'),
    thisInput = $(this).parent().parent().find('.form-field__input--nickname'),
    thisParslay = $(this).parent().parent().find('.form-field__input-wrapper');
    var readonly = $(this).parent().parent().find('.form-field__input-read-only');
    readonly.css("background-color", "#fff");
      thisMessage.empty()
      thisParslay.removeClass('form-field__input-wrapper--validated')
      thisParslay.removeClass('form-field__input-wrapper--error')
      thisInput.removeClass('form-field__input--error')
      thisInput.removeClass('parsley-error')
      thisInput.removeClass('parsley-success')
      $(this).parent().parent().removeClass('edit-mode')
  })
}



autocomplete(input,beneficiaryList);



function autocomplete(inp, arr) {
  var currentFocus;
  openBtn.on('click',function(){
    var a, b, i, val = inp.val();
      closeAllLists();
      currentFocus = -1;
      a = document.createElement("DIV");
      a.setAttribute("id", this.id + "autocomplete-list");
      a.setAttribute("class", "autocomplete-items");
      this.parentNode.appendChild(a);

      /*for each item in the array...*/
      for (i = 0; i < arr.length; i++) {
        /*check if the item starts with the same letters as the text field value:*/

         if (!inp.val()){
            var text = arr[i].key + '-' + arr[i].number;
            b = document.createElement('div');
    
            b.className = "select_list";
            //b.innerHTML = "<strong>" + arr[i].key.substr(0, val.length) + "</strong>";
            b.innerHTML += text;
            b.innerHTML += "<input type='hidden' value='" + arr[i].number + "'>";
            a.appendChild(b);
          }else if(inp.val()){ if (arr[i].key.substr(0, val.length).toUpperCase() == val.toUpperCase()|| arr[i].number.substr(0, val.length) == val ) {
            var text = arr[i].key + '-' + arr[i].number;
            b = document.createElement('div');
            b.className = "select_list";
            //b.innerHTML = "<strong>" + arr[i].key.substr(0, val.length) + "</strong>";
            b.innerHTML += text;
            b.innerHTML += "<input type='hidden' value='" + arr[i].number + "'>";
            a.appendChild(b);
          }
        }
      }
        $('.select_list').on('click', function(e) {
              $('.form-field__input-autoselect').val(this.getElementsByTagName("input")[0].value)
              closeAllLists();
          });
  })
  inp.on('input', function(e) {
      var a, b, i, val = this.value;
      closeAllLists();
      currentFocus = -1;
      a = document.createElement("DIV");
      a.setAttribute("id", this.id + "autocomplete-list");
      a.setAttribute("class", "autocomplete-items");
      this.parentNode.appendChild(a);

      /*for each item in the array...*/
      for (i = 0; i < arr.length; i++) {
        /*check if the item starts with the same letters as the text field value:*/
        if (arr[i].key.substr(0, val.length).toUpperCase() == val.toUpperCase()|| arr[i].number.substr(0, val.length) == val ) {
          var text = arr[i].key + '-' + arr[i].number;
          b = document.createElement('div');
          b.className = "select_list";
          //b.innerHTML = "<strong>" + arr[i].key.substr(0, val.length) + "</strong>";
          b.innerHTML += text;
          b.innerHTML += "<input type='hidden' value='" + arr[i].number + "'>";
          a.appendChild(b);
        }
      }

       $('.select_list').on('click', function(e) {
              $('.form-field__input-autoselect').val(this.getElementsByTagName("input")[0].value)
              closeAllLists();
          });
  });


  
  inp.keypress(function(e) {
      var x = document.getElementById(this.id + "autocomplete-list");
      if (x) x = x.getElementsByTagName("div");
      if (e.keyCode == 40) {
        currentFocus++;
        addActive(x);
      } else if (e.keyCode == 38) { 
        currentFocus--;
        addActive(x);
      } else if (e.keyCode == 13) {
        e.preventDefault();
        if (currentFocus > -1) {
          if (x) x[currentFocus].click();
        }
      }
  });

  function addActive(x) {
    if (!x) return false;
    removeActive(x);
    if (currentFocus >= x.length) currentFocus = 0;
    if (currentFocus < 0) currentFocus = (x.length - 1);
    x[currentFocus].classList.add("autocomplete-active");
  }

  function removeActive(x) {
    /*a function to remove the "active" class from all autocomplete items:*/
    for (var i = 0; i < x.length; i++) {
      x[i].classList.remove("autocomplete-active");
    }
  }

  function closeAllLists(elmnt) {
    var x = document.getElementsByClassName("autocomplete-items");
    for (var i = 0; i < x.length; i++) {
      if (elmnt != x[i] && elmnt != inp) {
      x[i].parentNode.removeChild(x[i]);
    }
  }
}
  $(document).click(function (e) {
      if(!$(e.target).hasClass("icon-open")){
        closeAllLists(e.target);
      }
      
  });
}
        }

return j121_beneficiary;
});
define('../src/journeys/j122-calls-inquiries/j122-calls-inquiries',['jquery', 'lib/utils'], function ($, utils)  {

        'use strict';

        var j122_calls_inquiries = function($journey) {
          this.$journey = $journey;
          return this;
   		  };

   		 j122_calls_inquiries.prototype.init = function(){
          var _this = this,
          $rangesBlock = this.$journey.find('[data-ranger-block]'),
          $ticks = $rangesBlock.find('.sliderticks .ticks'),
          $rangesClick = $rangesBlock.find('.rangeslider_click'),
          $rangeslider = $rangesBlock.find('#rangeslider'),
          $radioTrigger = this.$journey.find('[data-radio-trigger]'),
          $radioButton = this.$journey.find('[data-radio]'),
          $prevButton = this.$journey.find('.button--back'),
          $nextButton = this.$journey.find('.button--next'),
          $submitButton = this.$journey.find('.button--submit'),
          $warningMsg = this.$journey.find('.survey_warning-message'),
          $block = this.$journey.find('.survey_block');

          


          // Only for one survey block 
          if($block.length === 1){
            $prevButton.hide()
            $nextButton.hide()
            $submitButton.show() 
          }

          $ticks.on('click',function(){
            selected($(this))
          })
          $rangesClick.on('click',function(){
            selected($(this))
          })
          
          $rangeslider.on('mouseup touchend', function(event) {
              selected($(this))
          });

          $radioTrigger.on('click',function(){
            var triggerId = $(this).attr("data-radio-trigger"),
            $thisBlock = $(this).closest('.survey_block');
            $radioTrigger.removeClass('button--survey-active');
            $nextButton.removeAttr('disabled');
            $nextButton.removeClass('disabled');
            $thisBlock.addClass('selected-block');
            $warningMsg.hide()
            $(this).addClass('button--survey-active');
            $radioButton.each(function(){
              var radioId = $(this).attr('data-radio');
              $(this).attr("checked", false);
              if(triggerId == radioId){
                $(this).trigger('click')
                $(this).attr("checked", true)
              }
            })
            if ($thisBlock.hasClass('last')){
                $submitButton.show()
              }
          })

          // more than one survey block 
          if($block.length > 1){
                $block.last().addClass('last')
                $block.first().addClass('first')
                $nextButton.show()

                // Next Block 
                $nextButton.on('click',function(){
                  var wrapper = $(this).closest('.survey_wrapper'),
                    activeBlock = wrapper.find('.survey_block_active'),
                    nextBlock = activeBlock.next('.survey_block');
                    if(activeBlock.find('input[type=radio]').length > 0){
                        if(activeBlock.find('input[type=radio]:checked').length > 0){
                            flipNext(activeBlock,nextBlock)
                        }else{
                            $warningMsg.show()
                        }
                    }else{
                        flipNext(activeBlock,nextBlock)
                    }
                    
                })

                // Previous Block 
                $prevButton.on('click',function(){
                   var wrapper = $(this).closest('.survey_wrapper'),
                      activeBlock = wrapper.find('.survey_block_active'),
                      prevBlock = activeBlock.prev('.survey_block');
                      flipBack(activeBlock,prevBlock)
                });
          }


          function flipNext(ab,nb){
              setTimeout(function(){
                            ab.removeClass('survey_block_active');
                            nb.addClass('survey_block_active');
                            if(nb.hasClass('last')){
                              $prevButton.show()
                              $nextButton.hide()
                              $submitButton.show()
                            }else{
                              $prevButton.show()
                              $nextButton.show()  
                              if(!nb.hasClass('selected-block')){
                                $nextButton.attr('disabled','disabled')
                                $nextButton.addClass('disabled');
                              }
                            }
              }, 500);
          }
          function flipBack(ab,pb){
            setTimeout(function(){
                        ab.removeClass('survey_block_active');
                        pb.addClass('survey_block_active');
                        $warningMsg.hide()
                        $nextButton.removeAttr('disabled');
                        $nextButton.removeClass('disabled');
                        if(pb.hasClass('first')){
                            $prevButton.hide()
                            $nextButton.show()
                            $submitButton.hide()
                        }else{
                            $prevButton.show()
                            $nextButton.show()
                            $submitButton.hide()
                        } 
                      }, 500);
          }

          function selected(selector){
              setTimeout(function(){
            var $thisBlock = selector.closest('.survey_block'),
                $thisRangeslider = $thisBlock.find('#rangeslider');

            if ($thisRangeslider.val() > $thisRangeslider.attr('min')){
                $thisBlock.addClass('selected-block');
                $nextButton.removeAttr('disabled')
                $nextButton.removeClass('disabled');
                 if ($thisBlock.hasClass('last')){
                $submitButton.removeAttr('disabled');
                $submitButton.removeClass('disabled')
              }
            }
            if ($thisRangeslider.val() == $thisRangeslider.attr('min')){
                $nextButton.attr('disabled','disabled')
                $nextButton.addClass('disabled');
                $thisBlock.removeClass('selected-block');
                 if ($thisBlock.hasClass('last')){
                      $submitButton.attr('disabled','disabled');
                      $submitButton.addClass('disabled')
                      $thisBlock.removeClass('selected-block');
                }
            }

          }, 300);
        }
            

        
          

   
          
        
    
      }
      
       return j122_calls_inquiries;
    });
define('../src/journeys/j130-conservation-award/j130-conservation-award',['jquery', 'lib/utils'], function ($, utils)  {

        'use strict';

        var j130_conservation_award = function($journey) {
          this.$journey = $journey;
          return this;
   		  };

   		 j130_conservation_award.prototype.init = function(){

   		 		var _this = this,
   		 			checkBox = this.$journey.find('.form-field__checkbox');

   		 			$('.form-field__fakecheckbox').on('click',function(){
   		 				var parent = $(this).closest('.form-field__checkbox'),
   		 					checkBox = parent.find('.form-field__input--checkbox');

   		 				if(!checkBox.is(':checked')) {
							var parent = $(this).closest('.form-field__checkbox');
							parent.nextUntil($('.form-field__checkbox'), $('.checkbox-text')).show()
							parent.nextUntil($('.form-field__checkbox'), $('.checkbox-text')).find('.form-field__input').prop('required',true);

							
						}else {
							var parent = $(this).closest('.form-field__checkbox');
							parent.nextUntil($('.form-field__checkbox'), $('.checkbox-text')).hide()
							parent.nextUntil($('.form-field__checkbox'), $('.checkbox-text')).find('.form-field__input').prop('required',false);
							parent.nextUntil($('.form-field__checkbox'), $('.checkbox-text')).find('.form-field__input').removeClass('form-field__input--error');
							parent.nextUntil($('.form-field__checkbox'), $('.checkbox-text')).find('.form-field__input-wrapper').removeClass('form-field__input-wrapper--error');
							parent.nextUntil($('.form-field__checkbox'), $('.checkbox-text')).find('.form-field__messages').empty();
						}

   		 			})

   		 			

   		 }

   		 return j130_conservation_award;

});
;
define("../src/journeys/j131-scrap-sales/j131-scrap-sale", function(){});

define('../src/journeys/j132-happinex/j132-happinex',['jquery', 'lib/utils', 'parsley'], function($, utils) {

    'use strict';

    var j132 = function($journey) {

        this.$journey = $journey;

        return this;
    };

    /**
     * Initialise journey
     */

    j132.prototype.init = function() {
        var _this = this;

        this.panel = 0;

        this.intro();
        this.checkboxes();
        this.misc();

        $(window).on('resize', function() {
            setTimeout(function() {
                _this.intro();
                _this.scroll(false, false);
            }, 250)
        });
    };

    j132.prototype.progress = function() {
        var _this = this,
            rate = ((($('.j132-happinex--panel--active').index() - 1) / ($('.j132-happinex--panel').length - 1)) * 100);

        //console.log()

        $('.j132-happinex--trackergreenbar').css('width', rate.toString() + '%');
        $('.j132-happinex--trackernum').find('span').html(rate.toString().slice(0, 5));
        $('.j132-happinex--trackernum').find('span').css('padding-left', 'calc(' + rate.toString() + '% - 18px)')
        this.panel++;
        if (rate < 0) {
            _this.$journey.find('.j132-happinex--tracker').css('opacity', '0');
        } else {
            _this.$journey.find('.j132-happinex--tracker').css('opacity', '1');
        }
    };

    j132.prototype.misc = function() {
        var _this = this;

        this.$journey.find('.j132-happinex--start').off('click.start').on('click.start', function() {
            var invalid = 0;

            //_this.$journey.find('.j132-happinex--tracker').css('opacity', '1');
            $(this).closest('.j132-happinex--panel--active').find('input, select').not('.j132-happinex--emoticon-cbox').each(function() {

                if ($(this).height() > 0) {
                    $(this).parsley().validate()
                    if (!$(this).parsley().isValid()) {
                        invalid++;
                    };
                };

            });
            if (invalid == 0) {
                _this.scroll(true, false);
            };
        });

        this.$journey.find('.j132-happinex--back').off('click.start').on('click.start', function() {
            //_this.$journey.find('.j132-happinex--tracker').css('opacity', '1');
            _this.scroll(true, true);
        });

        $('.j132-happinex--radios').find('.form-field__input--radio').on('click', function() {
            if ($(this).hasClass('j132-happinex--branching')) {
                $('.j132-happinex--panel[panel-tag='+$(this).attr('panel-targets')+']').removeClass('j132-happinex--panel-branch');
            } else if ($(this).hasClass('j132-happinex--notbranching')) {
                $('.j132-happinex--panel[panel-tag='+$(this).attr('panel-targets')+']').addClass('j132-happinex--panel-branch');
            }
            if ($(this).attr('toggle-target').length == 0) {
                $(this).closest('.j132-happinex--panel--active').find('.j132-happinex--start').css('display', 'none');
                setTimeout(function() {
                    _this.scroll(true, false);
                }, 100);
            } else {
                $(this).closest('.j132-happinex--panel--active').find('.j132-happinex--start').css('display', 'inline-block');
                setTimeout(function() {
                    _this.scroll(false, false);
                }, 100);
            }
        });

        this.$journey.find('.m76-range-slider').find('.range').on('change', function() {
            if (($(this).val() == 1) || ($(this).val() == 2) || ($(this).val() == 3)) {
                $(this).closest('.j132-happinex--panel--active').find('.form-field--textarea').css('display', 'block');
                $(this).closest('.j132-happinex--panel--active').find('.j132-happinex--start').css('display', 'inline-block');

                setTimeout(function() {
                    _this.scroll(false, false);
                }, 100);
            } else {
                $(this).closest('.j132-happinex--panel--active').find('.form-field--textarea').css('display', 'none');
                $(this).closest('.j132-happinex--panel--active').find('.j132-happinex--start').css('display', 'none');
                _this.scroll(true, false);
            };
        });
        this.$journey.find('.m76-range-slider').find('.ticks').off('click.happinex').on('click.happinex', function() {
            $(this).closest('.m76-range-slider').find('.range').trigger('change')
        });
    };

    j132.prototype.intro = function() {
        var _this = this,
            $window = $(window).height(),
            $mast = $('.m12-masthead').outerHeight(true),
            $tracker = $('.j132-happinex--tracker').outerHeight(true),
            $screen = this.$journey.find('.j132-happinex--screen'),
            $intro = this.$journey.find('.j132-happinex--intro'),
            $panels = this.$journey.find('.j132-happinex--panel'),
            padding;

        $intro.attr('style', '')

        //if (utils.breakpoint() === 'l') {
        $screen.css('height', ($window - $mast - $tracker).toString() + 'px');
        //} else if ($intro.outerHeight(true) > $window) {
        //    $screen.css('height', $intro.height().toString() + 'px');
        //};

        $panels.css('max-height', ($window - $mast - $tracker).toString() + 'px')

        padding = ($window - ($intro.height() + $mast + $tracker)) / 2;

        $intro.css({ paddingTop: padding.toString() + 'px', height: ($window - $mast - $tracker).toString() + 'px' });

        $screen.css('opacity', '1');

    };

    j132.prototype.scroll = function(scroll, isBack) {
        var _this = this,
            $window = $(window).height(),
            $scroll = $('.j132-happinex--scroll'),
            $mast = $('.m12-masthead').outerHeight(true),
            $tracker = $('.j132-happinex--tracker').outerHeight(true),
            $scrollamount = 0,
            $active = $('.j132-happinex--panel--active'),
            $screen = this.$journey.find('.j132-happinex--screen'),
            $next = $('.j132-happinex--panel--active').next(),
            $prev = $('.j132-happinex--panel--active').prev();

        while ($next.hasClass('j132-happinex--panel-branch')) {
            $next = $next.next();
        }

        while ($prev.hasClass('j132-happinex--panel-branch')) {
            $prev = $prev.prev();
        }

        if (scroll) {
            if (!isBack) {
                $next.addClass('j132-happinex--panel--active');
                $active.removeClass('j132-happinex--panel--active');
            } else {
                $prev.addClass('j132-happinex--panel--active');
                $active.removeClass('j132-happinex--panel--active');
            }
        }

        $('.j132-happinex--panel--active').prevAll().each(function() {
            $scrollamount += $(this).outerHeight(true);
        });

        if (utils.breakpoint() === 'l') {
            if (!isBack) {
                $scroll.css('top', '-' + ($scrollamount - 30 + $('.j132-happinex--panel--active').outerHeight(true) - this.$journey.find('.j132-happinex--screen').outerHeight(true)).toString() + 'px');
            } else {
                $scroll.css('top', '-' + ($scrollamount - 30 + $('.j132-happinex--panel--active').outerHeight(true) - this.$journey.find('.j132-happinex--screen').outerHeight(true)).toString() + 'px');
            }
        } else {
            if (scroll) {
                setTimeout(function() {
                    $screen.scrollTop(0);
                }, 250);
            }
            $scroll.css('top', '0px');
            //$scroll.css({ top: '-' + ($scrollamount - $mast).toString() + 'px', height: ($('.j132-happinex--panel--active').height()).toString() + 'px'});
        };

        if (scroll) {
            this.progress();
        }
    };

    j132.prototype.checkboxes = function() {
        var _this = this;

        $('.j132-happinex--emoticon_wrapper').find('.j132-happinex--emoticon').each(function() {
            $(this).on('click.cbox', function() {
                $(this).closest('.j132-happinex--emoticon_wrapper').find('.j132-happinex--emoticon').each(function() {
                    $(this).removeClass('j132-happinex--emoticon_active');
                    $(this).find('.j132-happinex--emoticon-cbox').prop('checked', false);
                });
                $(this).addClass('j132-happinex--emoticon_active');
                $(this).find('.j132-happinex--emoticon-cbox').prop('checked', true);
            });
        });
    };

    return j132;
});

define('../src/journeys/j133-owner-tracking-system/j133-owner-tracking-system',['jquery'], function($) {

    'use strict';

    var j133_ots = function($journey) {

        this.$journey = $journey;

        return this;
    };

    j133_ots.prototype.init = function() {
        var _this = this;

        var script = document.createElement('script'),
            url = 'https://maps.googleapis.com/maps/api/js?key=AIzaSyC0KWP8MLqjGQbX8E3PK16snZabeB_E_x4&callback=initMap&libraries=&v=weekly';

        script.type = 'text/javascript';
        script.src = url + '&callback=j133InitializeGMap';
        document.body.appendChild(script);

        window.j133InitializeGMap = function j133InitializeGMap() {
            _this.map = new google.maps.Map(document.getElementById("j133map"), {
                zoom: 13,
                mapTypeControl: false,
                zoomControl: false,
                scaleControl: false,
                streetViewControl: false,
                fullscreenControl: false,
                center: new google.maps.LatLng(25.2276388, 55.3245075)
            });
            $(window).trigger('j133MapLoaded');
        };

        // listen for mapLoaded event
        $(window).on('j133MapLoaded', function() {
            //_this.map = window.MAP.map;
            _this.markers = [];

            _this.map.addListener('click', function(event) {

                for (var j = 0; j < _this.markers.length; j++) {
                    _this.markers[0].setMap(null);
                };

                _this.markers = [];

                var marker = new google.maps.Marker({
                    position: event.latLng,
                    map: _this.map,
                });

                _this.markers.push(marker);

                //console.log(JSON.stringify(event.latLng.toJSON(), null, 2))
                $('.j133-owner-tracking-system-map_latlng').attr('data-latlng', JSON.stringify(event.latLng.toJSON(), null, 2));
                //console.log(event.latLng.toJSON());

                var geocoder = new google.maps.Geocoder(),
                    infowindow = new google.maps.InfoWindow();

                geocoder.geocode({ location: event.latLng.toJSON() }, function(results, status) {
                    if (status === "OK") {
                        if (results[0]) {
                            $('.j133-owner-tracking-system-map_address').html(results[0].formatted_address);
                            infowindow.setContent(results[0].formatted_address);
                            infowindow.open(_this.map, marker);
                        } else {
                            window.alert("No results found");
                        }
                    } else {
                        window.alert("Geocoder failed due to: " + status);
                    }
                });
            });
        });
    };

    return j133_ots;
});

define('../src/journeys/j134-infrastructure-noc/j134-infrastructure-noc',['jquery', 'lib/utils'], function($, utils) {

    'use strict';

    var J134_INFRA_NOC = function($journey) {
        this.$journey = $journey;
        return this;
    };

    J134_INFRA_NOC.prototype.init = function() {
    	var _this = this;

    	var modalButtons = this.$journey.find('.request_links a'),
        modalButtonLink = modalButtons.find('[data-trigger]'),
            tabModal = $('.j134-infrastructure-noc-tab-modal'),
            tabModalLink = tabModal.find('.m39-modal__tabs li');



        modalButtons.on('click',function(){
            var thisClass = $(this).attr('class'),
          	    thisTrigger = thisClass + '__trigger',
                dataTab = $(this).data('tab');

                if(dataTab){
                    var dataTabClass = "tab-" + dataTab,
                        tabList = tabModal.find('.m39-modal__tabs'),
                        tabContent = tabModal.find('.m39-modal__tabs-content');

                        tabContent.find('.m39-modal__tabs-content-section').addClass('hidden');
                        tabList.find('li').removeClass('active');

                        tabList.find(".tab-" + dataTab).addClass('active');
                        tabContent.find(".tab-" + dataTab).removeClass('hidden'); 

                }

                $('.'+thisTrigger).trigger('click')
        })

        tabModalLink.on('click',function(){
            var dataTab = $(this).data('tab'),
                dataTabClass = "tab-" + dataTab,
                tabContent = tabModal.find('.m39-modal__tabs-content');

                tabModalLink.removeClass('active')
                $(this).addClass('active');

                tabContent.find('.m39-modal__tabs-content-section').addClass('hidden');
                tabContent.find(".tab-" + dataTab).removeClass('hidden'); 
        })

    }; 

return J134_INFRA_NOC;
});

/*
 _ _      _       _
 ___| (_) ___| | __  (_)___
 / __| | |/ __| |/ /  | / __|
 \__ \ | | (__|   < _ | \__ \
 |___/_|_|\___|_|\_(_)/ |___/
 |__/

 Version: 1.5.7
 Author: Ken Wheeler
 Website: http://kenwheeler.github.io
 Docs: http://kenwheeler.github.io/slick
 Repo: http://github.com/kenwheeler/slick
 Issues: http://github.com/kenwheeler/slick/issues

 */
/* global window, document, define, jQuery, setInterval, clearInterval */
(function (factory) {
	'use strict';
	if (typeof define === 'function' && define.amd) {
		define('slick',['jquery'], factory);
	} else if (typeof exports !== 'undefined') {
		module.exports = factory(require('jquery'));
	} else {
		factory(jQuery);
	}

}(function ($) {
	'use strict';
	var Slick = window.Slick || {};

	Slick = (function () {

		var instanceUid = 0;

		function Slick(element, settings) {

			var _ = this, dataSettings;

			_.defaults = {
				accessibility: true,
				adaptiveHeight: false,
				appendArrows: $(element),
				appendDots: $(element),
				arrows: true,
				asNavFor: null,
				prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',
				nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
				autoplay: false,
				autoplaySpeed: 3000,
				centerMode: false,
				centerPadding: '50px',
				cssEase: 'ease',
				customPaging: function (slider, i) {
					return '<button type="button" data-role="none" role="button" aria-required="false" tabindex="0">' + (i + 1) + '</button>';
				},
				dots: false,
				dotsClass: 'slick-dots',
				draggable: true,
				easing: 'linear',
				edgeFriction: 0.35,
				fade: false,
				focusOnSelect: false,
				infinite: true,
				initialSlide: 0,
				lazyLoad: 'ondemand',
				mobileFirst: false,
				pauseOnHover: true,
				pauseOnDotsHover: false,
				respondTo: 'window',
				responsive: null,
				rows: 1,
				rtl: false,
				slide: '',
				slidesPerRow: 1,
				slidesToShow: 1,
				slidesToScroll: 1,
				speed: 500,
				swipe: true,
				swipeToSlide: false,
				touchMove: true,
				touchThreshold: 5,
				useCSS: true,
				variableWidth: false,
				vertical: false,
				verticalSwiping: false,
				waitForAnimate: true,
				zIndex: 1000
			};

			_.initials = {
				animating: false,
				dragging: false,
				autoPlayTimer: null,
				currentDirection: 0,
				currentLeft: null,
				currentSlide: 0,
				direction: 1,
				$dots: null,
				listWidth: null,
				listHeight: null,
				loadIndex: 0,
				$nextArrow: null,
				$prevArrow: null,
				slideCount: null,
				slideWidth: null,
				$slideTrack: null,
				$slides: null,
				sliding: false,
				slideOffset: 0,
				swipeLeft: null,
				$list: null,
				touchObject: {},
				transformsEnabled: false,
				unslicked: false
			};

			$.extend(_, _.initials);

			_.activeBreakpoint = null;
			_.animType = null;
			_.animProp = null;
			_.breakpoints = [];
			_.breakpointSettings = [];
			_.cssTransitions = false;
			_.hidden = 'hidden';
			_.paused = false;
			_.positionProp = null;
			_.respondTo = null;
			_.rowCount = 1;
			_.shouldClick = true;
			_.$slider = $(element);
			_.$slidesCache = null;
			_.transformType = null;
			_.transitionType = null;
			_.visibilityChange = 'visibilitychange';
			_.windowWidth = 0;
			_.windowTimer = null;

			dataSettings = $(element).data('slick') || {};

			_.options = $.extend({}, _.defaults, dataSettings, settings);

			_.currentSlide = _.options.initialSlide;

			_.originalSettings = _.options;

			if (typeof document.mozHidden !== 'undefined') {
				_.hidden = 'mozHidden';
				_.visibilityChange = 'mozvisibilitychange';
			} else if (typeof document.webkitHidden !== 'undefined') {
				_.hidden = 'webkitHidden';
				_.visibilityChange = 'webkitvisibilitychange';
			}

			_.autoPlay = $.proxy(_.autoPlay, _);
			_.autoPlayClear = $.proxy(_.autoPlayClear, _);
			_.changeSlide = $.proxy(_.changeSlide, _);
			_.clickHandler = $.proxy(_.clickHandler, _);
			_.selectHandler = $.proxy(_.selectHandler, _);
			_.setPosition = $.proxy(_.setPosition, _);
			_.swipeHandler = $.proxy(_.swipeHandler, _);
			_.dragHandler = $.proxy(_.dragHandler, _);
			_.keyHandler = $.proxy(_.keyHandler, _);
			_.autoPlayIterator = $.proxy(_.autoPlayIterator, _);

			_.instanceUid = instanceUid++;

			// A simple way to check for HTML strings
			// Strict HTML recognition (must start with <)
			// Extracted from jQuery v1.11 source
			_.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;


			_.registerBreakpoints();
			_.init(true);
			_.checkResponsive(true);

		}

		return Slick;

	}());

	Slick.prototype.addSlide = Slick.prototype.slickAdd = function (markup, index, addBefore) {

		var _ = this;

		if (typeof(index) === 'boolean') {
			addBefore = index;
			index = null;
		} else if (index < 0 || (index >= _.slideCount)) {
			return false;
		}

		_.unload();

		if (typeof(index) === 'number') {
			if (index === 0 && _.$slides.length === 0) {
				$(markup).appendTo(_.$slideTrack);
			} else if (addBefore) {
				$(markup).insertBefore(_.$slides.eq(index));
			} else {
				$(markup).insertAfter(_.$slides.eq(index));
			}
		} else {
			if (addBefore === true) {
				$(markup).prependTo(_.$slideTrack);
			} else {
				$(markup).appendTo(_.$slideTrack);
			}
		}

		_.$slides = _.$slideTrack.children(this.options.slide);

		_.$slideTrack.children(this.options.slide).detach();

		_.$slideTrack.append(_.$slides);

		_.$slides.each(function (index, element) {
			$(element).attr('data-slick-index', index);
		});

		_.$slidesCache = _.$slides;

		_.reinit();

	};

	Slick.prototype.animateHeight = function () {
		var _ = this;
		if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
			var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
			_.$list.animate({
				height: targetHeight
			}, _.options.speed);
		}
	};

	Slick.prototype.animateSlide = function (targetLeft, callback) {

		var animProps = {},
			_ = this;

		_.animateHeight();

		if (_.options.rtl === true && _.options.vertical === false) {
			targetLeft = -targetLeft;
		}
		if (_.transformsEnabled === false) {
			if (_.options.vertical === false) {
				_.$slideTrack.animate({
					left: targetLeft
				}, _.options.speed, _.options.easing, callback);
			} else {
				_.$slideTrack.animate({
					top: targetLeft
				}, _.options.speed, _.options.easing, callback);
			}

		} else {

			if (_.cssTransitions === false) {
				if (_.options.rtl === true) {
					_.currentLeft = -(_.currentLeft);
				}
				$({
					animStart: _.currentLeft
				}).animate({
					animStart: targetLeft
				}, {
					duration: _.options.speed,
					easing: _.options.easing,
					step: function (now) {
						now = Math.ceil(now);
						if (_.options.vertical === false) {
							animProps[_.animType] = 'translate(' +
								now + 'px, 0px)';
							_.$slideTrack.css(animProps);
						} else {
							animProps[_.animType] = 'translate(0px,' +
								now + 'px)';
							_.$slideTrack.css(animProps);
						}
					},
					complete: function () {
						if (callback) {
							callback.call();
						}
					}
				});

			} else {

				_.applyTransition();
				targetLeft = Math.ceil(targetLeft);

				if (_.options.vertical === false) {
					animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
				} else {
					animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
				}
				_.$slideTrack.css(animProps);

				if (callback) {
					setTimeout(function () {

						_.disableTransition();

						callback.call();
					}, _.options.speed);
				}

			}

		}

	};

	Slick.prototype.asNavFor = function (index) {

		var _ = this,
			asNavFor = _.options.asNavFor;

		if (asNavFor && asNavFor !== null) {
			asNavFor = $(asNavFor).not(_.$slider);
		}

		if (asNavFor !== null && typeof asNavFor === 'object') {
			asNavFor.each(function () {
				var target = $(this).slick('getSlick');
				if (!target.unslicked) {
					target.slideHandler(index, true);
				}
			});
		}

	};

	Slick.prototype.applyTransition = function (slide) {

		var _ = this,
			transition = {};

		if (_.options.fade === false) {
			transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
		} else {
			transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
		}

		if (_.options.fade === false) {
			_.$slideTrack.css(transition);
		} else {
			_.$slides.eq(slide).css(transition);
		}

	};

	Slick.prototype.autoPlay = function () {

		var _ = this;

		if (_.autoPlayTimer) {
			clearInterval(_.autoPlayTimer);
		}

		if (_.slideCount > _.options.slidesToShow && _.paused !== true) {
			_.autoPlayTimer = setInterval(_.autoPlayIterator,
				_.options.autoplaySpeed);
		}

	};

	Slick.prototype.autoPlayClear = function () {

		var _ = this;
		if (_.autoPlayTimer) {
			clearInterval(_.autoPlayTimer);
		}

	};

	Slick.prototype.autoPlayIterator = function () {

		var _ = this;

		if (_.options.infinite === false) {

			if (_.direction === 1) {

				if ((_.currentSlide + 1) === _.slideCount -
					1) {
					_.direction = 0;
				}

				_.slideHandler(_.currentSlide + _.options.slidesToScroll);

			} else {

				if ((_.currentSlide - 1 === 0)) {

					_.direction = 1;

				}

				_.slideHandler(_.currentSlide - _.options.slidesToScroll);

			}

		} else {

			_.slideHandler(_.currentSlide + _.options.slidesToScroll);

		}

	};

	Slick.prototype.buildArrows = function () {

		var _ = this;

		if (_.options.arrows === true) {

			_.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
			_.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');

			if (_.slideCount > _.options.slidesToShow) {

				_.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
				_.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');

				if (_.htmlExpr.test(_.options.prevArrow)) {
					_.$prevArrow.prependTo(_.options.appendArrows);
				}

				if (_.htmlExpr.test(_.options.nextArrow)) {
					_.$nextArrow.appendTo(_.options.appendArrows);
				}

				if (_.options.infinite !== true) {
					_.$prevArrow
						.addClass('slick-disabled')
						.attr('aria-disabled', 'true');
				}

			} else {

				_.$prevArrow.add(_.$nextArrow)

					.addClass('slick-hidden')
					.attr({
						'aria-disabled': 'true',
						'tabindex': '-1'
					});

			}

		}

	};

	Slick.prototype.buildDots = function () {

		var _ = this,
			i, dotString;

		if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

			dotString = '<ul class="' + _.options.dotsClass + '">';

			for (i = 0; i <= _.getDotCount(); i += 1) {
				dotString += '<li>' + _.options.customPaging.call(this, _, i) + '</li>';
			}

			dotString += '</ul>';

			_.$dots = $(dotString).appendTo(
				_.options.appendDots);

			_.$dots.find('li').first().addClass('slick-active').attr('aria-hidden', 'false');

		}

	};

	Slick.prototype.buildOut = function () {

		var _ = this;

		_.$slides =
			_.$slider
				.children(_.options.slide + ':not(.slick-cloned)')
				.addClass('slick-slide');

		_.slideCount = _.$slides.length;

		_.$slides.each(function (index, element) {
			$(element)
				.attr('data-slick-index', index)
				.data('originalStyling', $(element).attr('style') || '');
		});

		_.$slidesCache = _.$slides;

		_.$slider.addClass('slick-slider');

		_.$slideTrack = (_.slideCount === 0) ?
			$('<div class="slick-track"/>').appendTo(_.$slider) :
			_.$slides.wrapAll('<div class="slick-track"/>').parent();

		_.$list = _.$slideTrack.wrap(
			'<div aria-live="polite" class="slick-list"/>').parent();
		_.$slideTrack.css('opacity', 0);

		if (_.options.centerMode === true || _.options.swipeToSlide === true) {
			_.options.slidesToScroll = 1;
		}

		$('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');

		_.setupInfinite();

		_.buildArrows();

		_.buildDots();

		_.updateDots();


		_.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);

		if (_.options.draggable === true) {
			_.$list.addClass('draggable');
		}

	};

	Slick.prototype.buildRows = function () {
		var _ = this, a, b, c, newSlides, numOfSlides, originalSlides, slidesPerSection;

		newSlides = document.createDocumentFragment();
		originalSlides = _.$slider.children();

		if (_.options.rows > 1) {

			slidesPerSection = _.options.slidesPerRow * _.options.rows;
			numOfSlides = Math.ceil(
				originalSlides.length / slidesPerSection
			);

			for (a = 0; a < numOfSlides; a++) {
				var slide = document.createElement('div');
				for (b = 0; b < _.options.rows; b++) {
					var row = document.createElement('div');
					for (c = 0; c < _.options.slidesPerRow; c++) {
						var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
						if (originalSlides.get(target)) {
							row.appendChild(originalSlides.get(target));
						}
					}
					slide.appendChild(row);
				}
				newSlides.appendChild(slide);
			}

			_.$slider.html(newSlides);
			_.$slider.children().children().children()
				.css({
					'width': (100 / _.options.slidesPerRow) + '%',
					'display': 'inline-block'
				});

		}

	};

	Slick.prototype.checkResponsive = function (initial, forceUpdate) {

		var _ = this,
			breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
		var sliderWidth = _.$slider.width();
		var windowWidth = window.innerWidth || $(window).width();

		if (_.respondTo === 'window') {
			respondToWidth = windowWidth;
		} else if (_.respondTo === 'slider') {
			respondToWidth = sliderWidth;
		} else if (_.respondTo === 'min') {
			respondToWidth = Math.min(windowWidth, sliderWidth);
		}

		if (_.options.responsive &&
			_.options.responsive.length &&
			_.options.responsive !== null) {

			targetBreakpoint = null;

			for (breakpoint in _.breakpoints) {
				if (_.breakpoints.hasOwnProperty(breakpoint)) {
					if (_.originalSettings.mobileFirst === false) {
						if (respondToWidth < _.breakpoints[breakpoint]) {
							targetBreakpoint = _.breakpoints[breakpoint];
						}
					} else {
						if (respondToWidth > _.breakpoints[breakpoint]) {
							targetBreakpoint = _.breakpoints[breakpoint];
						}
					}
				}
			}

			if (targetBreakpoint !== null) {
				if (_.activeBreakpoint !== null) {
					if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
						_.activeBreakpoint =
							targetBreakpoint;
						if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
							_.unslick(targetBreakpoint);
						} else {
							_.options = $.extend({}, _.originalSettings,
								_.breakpointSettings[
									targetBreakpoint]);
							if (initial === true) {
								_.currentSlide = _.options.initialSlide;
							}
							_.refresh(initial);
						}
						triggerBreakpoint = targetBreakpoint;
					}
				} else {
					_.activeBreakpoint = targetBreakpoint;
					if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
						_.unslick(targetBreakpoint);
					} else {
						_.options = $.extend({}, _.originalSettings,
							_.breakpointSettings[
								targetBreakpoint]);
						if (initial === true) {
							_.currentSlide = _.options.initialSlide;
						}
						_.refresh(initial);
					}
					triggerBreakpoint = targetBreakpoint;
				}
			} else {
				if (_.activeBreakpoint !== null) {
					_.activeBreakpoint = null;
					_.options = _.originalSettings;
					if (initial === true) {
						_.currentSlide = _.options.initialSlide;
					}
					_.refresh(initial);
					triggerBreakpoint = targetBreakpoint;
				}
			}

			// only trigger breakpoints during an actual break. not on initialize.
			if (!initial && triggerBreakpoint !== false) {
				_.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
			}
		}

	};

	Slick.prototype.changeSlide = function (event, dontAnimate) {

		var _ = this,
			$target = $(event.target),
			indexOffset, slideOffset, unevenOffset;

		// If target is a link, prevent default action.
		if ($target.is('a')) {
			event.preventDefault();
		}

		// If target is not the <li> element (ie: a child), find the <li>.
		if (!$target.is('li')) {
			$target = $target.closest('li');
		}

		unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
		indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;

		switch (event.data.message) {

			case 'previous':
				slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
				if (_.slideCount > _.options.slidesToShow) {
					_.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
				}
				break;

			case 'next':
				slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
				if (_.slideCount > _.options.slidesToShow) {
					_.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
				}
				break;

			case 'index':
				var index = event.data.index === 0 ? 0 :
				event.data.index || $target.index() * _.options.slidesToScroll;

				_.slideHandler(_.checkNavigable(index), false, dontAnimate);
				$target.children().trigger('focus');
				break;

			default:
				return;
		}

	};

	Slick.prototype.checkNavigable = function (index) {

		var _ = this,
			navigables, prevNavigable;

		navigables = _.getNavigableIndexes();
		prevNavigable = 0;
		if (index > navigables[navigables.length - 1]) {
			index = navigables[navigables.length - 1];
		} else {
			for (var n in navigables) {
				if (index < navigables[n]) {
					index = prevNavigable;
					break;
				}
				prevNavigable = navigables[n];
			}
		}

		return index;
	};

	Slick.prototype.cleanUpEvents = function () {

		var _ = this;

		if (_.options.dots && _.$dots !== null) {

			$('li', _.$dots).off('click.slick', _.changeSlide);

			if (_.options.pauseOnDotsHover === true && _.options.autoplay === true) {

				$('li', _.$dots)
					.off('mouseenter.slick', $.proxy(_.setPaused, _, true))
					.off('mouseleave.slick', $.proxy(_.setPaused, _, false));

			}

		}

		if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
			_.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
			_.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
		}

		_.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
		_.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
		_.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
		_.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);

		_.$list.off('click.slick', _.clickHandler);

		$(document).off(_.visibilityChange, _.visibility);

		_.$list.off('mouseenter.slick', $.proxy(_.setPaused, _, true));
		_.$list.off('mouseleave.slick', $.proxy(_.setPaused, _, false));

		if (_.options.accessibility === true) {
			_.$list.off('keydown.slick', _.keyHandler);
		}

		if (_.options.focusOnSelect === true) {
			$(_.$slideTrack).children().off('click.slick', _.selectHandler);
		}

		$(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);

		$(window).off('resize.slick.slick-' + _.instanceUid, _.resize);

		$('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);

		$(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
		$(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition);
	};

	Slick.prototype.cleanUpRows = function () {

		var _ = this, originalSlides;

		if (_.options.rows > 1) {
			originalSlides = _.$slides.children().children();
			originalSlides.removeAttr('style');
			_.$slider.html(originalSlides);
		}

	};

	Slick.prototype.clickHandler = function (event) {

		var _ = this;

		if (_.shouldClick === false) {
			event.stopImmediatePropagation();
			event.stopPropagation();
			event.preventDefault();
		}

	};

	Slick.prototype.destroy = function (refresh) {

		var _ = this;

		_.autoPlayClear();

		_.touchObject = {};

		_.cleanUpEvents();

		$('.slick-cloned', _.$slider).detach();

		if (_.$dots) {
			_.$dots.remove();
		}

		if (_.options.arrows === true) {

			if (_.$prevArrow && _.$prevArrow.length) {

				_.$prevArrow
					.removeClass('slick-disabled slick-arrow slick-hidden')
					.removeAttr('aria-hidden aria-disabled tabindex')
					.css("display", "");

				if (_.htmlExpr.test(_.options.prevArrow)) {
					_.$prevArrow.remove();
				}
			}

			if (_.$nextArrow && _.$nextArrow.length) {

				_.$nextArrow
					.removeClass('slick-disabled slick-arrow slick-hidden')
					.removeAttr('aria-hidden aria-disabled tabindex')
					.css("display", "");

				if (_.htmlExpr.test(_.options.nextArrow)) {
					_.$nextArrow.remove();
				}
			}

		}

		if (_.$slides) {

			_.$slides
				.removeClass('slick-slide slick-active slick-center slick-visible slick-current')
				.removeAttr('aria-hidden')
				.removeAttr('data-slick-index')
				.each(function () {
					$(this).attr('style', $(this).data('originalStyling'));
				});

			_.$slideTrack.children(this.options.slide).detach();

			_.$slideTrack.detach();

			_.$list.detach();

			_.$slider.append(_.$slides);
		}

		_.cleanUpRows();

		_.$slider.removeClass('slick-slider');
		_.$slider.removeClass('slick-initialized');

		_.unslicked = true;

		if (!refresh) {
			_.$slider.trigger('destroy', [_]);
		}

	};

	Slick.prototype.disableTransition = function (slide) {

		var _ = this,
			transition = {};

		transition[_.transitionType] = '';

		if (_.options.fade === false) {
			_.$slideTrack.css(transition);
		} else {
			_.$slides.eq(slide).css(transition);
		}

	};

	Slick.prototype.fadeSlide = function (slideIndex, callback) {

		var _ = this;

		if (_.cssTransitions === false) {

			_.$slides.eq(slideIndex).css({
				zIndex: _.options.zIndex
			});

			_.$slides.eq(slideIndex).animate({
				opacity: 1
			}, _.options.speed, _.options.easing, callback);

		} else {

			_.applyTransition(slideIndex);

			_.$slides.eq(slideIndex).css({
				opacity: 1,
				zIndex: _.options.zIndex
			});

			if (callback) {
				setTimeout(function () {

					_.disableTransition(slideIndex);

					callback.call();
				}, _.options.speed);
			}

		}

	};

	Slick.prototype.fadeSlideOut = function (slideIndex) {

		var _ = this;

		if (_.cssTransitions === false) {

			_.$slides.eq(slideIndex).animate({
				opacity: 0,
				zIndex: _.options.zIndex - 2
			}, _.options.speed, _.options.easing);

		} else {

			_.applyTransition(slideIndex);

			_.$slides.eq(slideIndex).css({
				opacity: 0,
				zIndex: _.options.zIndex - 2
			});

		}

	};

	Slick.prototype.filterSlides = Slick.prototype.slickFilter = function (filter) {

		var _ = this;

		if (filter !== null) {

			_.unload();

			_.$slideTrack.children(this.options.slide).detach();

			_.$slidesCache.filter(filter).appendTo(_.$slideTrack);

			_.reinit();

		}

	};

	Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function () {

		var _ = this;
		return _.currentSlide;

	};

	Slick.prototype.getDotCount = function () {

		var _ = this;

		var breakPoint = 0;
		var counter = 0;
		var pagerQty = 0;

		if (_.options.infinite === true) {
			while (breakPoint < _.slideCount) {
				++pagerQty;
				breakPoint = counter + _.options.slidesToShow;
				counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
			}
		} else if (_.options.centerMode === true) {
			pagerQty = _.slideCount;
		} else {
			while (breakPoint < _.slideCount) {
				++pagerQty;
				breakPoint = counter + _.options.slidesToShow;
				counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
			}
		}

		return pagerQty - 1;

	};

	Slick.prototype.getLeft = function (slideIndex) {

		var _ = this,
			targetLeft,
			verticalHeight,
			verticalOffset = 0,
			targetSlide;

		_.slideOffset = 0;
		verticalHeight = _.$slides.first().outerHeight(true);

		if (_.options.infinite === true) {
			if (_.slideCount > _.options.slidesToShow) {
				_.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
				verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
			}
			if (_.slideCount % _.options.slidesToScroll !== 0) {
				if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
					if (slideIndex > _.slideCount) {
						_.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
						verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
					} else {
						_.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
						verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
					}
				}
			}
		} else {
			if (slideIndex + _.options.slidesToShow > _.slideCount) {
				_.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
				verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
			}
		}

		if (_.slideCount <= _.options.slidesToShow) {
			_.slideOffset = 0;
			verticalOffset = 0;
		}

		if (_.options.centerMode === true && _.options.infinite === true) {
			_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
		} else if (_.options.centerMode === true) {
			_.slideOffset = 0;
			_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
		}

		if (_.options.vertical === false) {
			targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
		} else {
			targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
		}

		if (_.options.variableWidth === true) {

			if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
				targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
			} else {
				targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
			}

			targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;

			if (_.options.centerMode === true) {
				if (_.options.infinite === false) {
					targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
				} else {
					targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
				}
				targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
				targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
			}
		}

		return targetLeft;

	};

	Slick.prototype.getOption = Slick.prototype.slickGetOption = function (option) {

		var _ = this;

		return _.options[option];

	};

	Slick.prototype.getNavigableIndexes = function () {

		var _ = this,
			breakPoint = 0,
			counter = 0,
			indexes = [],
			max;

		if (_.options.infinite === false) {
			max = _.slideCount;
		} else {
			breakPoint = _.options.slidesToScroll * -1;
			counter = _.options.slidesToScroll * -1;
			max = _.slideCount * 2;
		}

		while (breakPoint < max) {
			indexes.push(breakPoint);
			breakPoint = counter + _.options.slidesToScroll;
			counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
		}

		return indexes;

	};

	Slick.prototype.getSlick = function () {

		return this;

	};

	Slick.prototype.getSlideCount = function () {

		var _ = this,
			slidesTraversed, swipedSlide, centerOffset;

		centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;

		if (_.options.swipeToSlide === true) {
			_.$slideTrack.find('.slick-slide').each(function (index, slide) {
				if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
					swipedSlide = slide;
					return false;
				}
			});

			slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;

			return slidesTraversed;

		} else {
			return _.options.slidesToScroll;
		}

	};

	Slick.prototype.goTo = Slick.prototype.slickGoTo = function (slide, dontAnimate) {

		var _ = this;

		_.changeSlide({
			data: {
				message: 'index',
				index: parseInt(slide)
			}
		}, dontAnimate);

	};

	Slick.prototype.init = function (creation) {

		var _ = this;

		if (!$(_.$slider).hasClass('slick-initialized')) {

			$(_.$slider).addClass('slick-initialized');

			_.buildRows();
			_.buildOut();
			_.setProps();
			_.startLoad();
			_.loadSlider();
			_.initializeEvents();
			_.updateArrows();
			_.updateDots();

		}

		if (creation) {
			_.$slider.trigger('init', [_]);
		}

		if (_.options.accessibility === true) {
			_.initADA();
		}

	};

	Slick.prototype.initArrowEvents = function () {

		var _ = this;

		if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
			_.$prevArrow.on('click.slick', {
				message: 'previous'
			}, _.changeSlide);
			_.$nextArrow.on('click.slick', {
				message: 'next'
			}, _.changeSlide);
		}

	};

	Slick.prototype.initDotEvents = function () {

		var _ = this;

		if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
			$('li', _.$dots).on('click.slick', {
				message: 'index'
			}, _.changeSlide);
		}

		if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.options.autoplay === true) {
			$('li', _.$dots)
				.on('mouseenter.slick', $.proxy(_.setPaused, _, true))
				.on('mouseleave.slick', $.proxy(_.setPaused, _, false));
		}

	};

	Slick.prototype.initializeEvents = function () {

		var _ = this;

		_.initArrowEvents();

		_.initDotEvents();

		_.$list.on('touchstart.slick mousedown.slick', {
			action: 'start'
		}, _.swipeHandler);
		_.$list.on('touchmove.slick mousemove.slick', {
			action: 'move'
		}, _.swipeHandler);
		_.$list.on('touchend.slick mouseup.slick', {
			action: 'end'
		}, _.swipeHandler);
		_.$list.on('touchcancel.slick mouseleave.slick', {
			action: 'end'
		}, _.swipeHandler);

		_.$list.on('click.slick', _.clickHandler);

		$(document).on(_.visibilityChange, $.proxy(_.visibility, _));

		_.$list.on('mouseenter.slick', $.proxy(_.setPaused, _, true));
		_.$list.on('mouseleave.slick', $.proxy(_.setPaused, _, false));

		if (_.options.accessibility === true) {
			_.$list.on('keydown.slick', _.keyHandler);
		}

		if (_.options.focusOnSelect === true) {
			$(_.$slideTrack).children().on('click.slick', _.selectHandler);
		}

		$(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));

		$(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));

		$('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);

		$(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
		$(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);

	};

	Slick.prototype.initUI = function () {

		var _ = this;

		if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {

			_.$prevArrow.show();
			_.$nextArrow.show();

		}

		if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

			_.$dots.show();

		}

		if (_.options.autoplay === true) {

			_.autoPlay();

		}

	};

	Slick.prototype.keyHandler = function (event) {

		var _ = this;
		//Dont slide if the cursor is inside the form fields and arrow keys are pressed
		if (!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
			if (event.keyCode === 37 && _.options.accessibility === true) {
				_.changeSlide({
					data: {
						message: 'previous'
					}
				});
			} else if (event.keyCode === 39 && _.options.accessibility === true) {
				_.changeSlide({
					data: {
						message: 'next'
					}
				});
			}
		}

	};

	Slick.prototype.lazyLoad = function () {

		var _ = this,
			loadRange, cloneRange, rangeStart, rangeEnd;

		function loadImages(imagesScope) {
			$('img[data-lazy]', imagesScope).each(function () {

				var image = $(this),
					imageSource = $(this).attr('data-lazy'),
					imageToLoad = document.createElement('img');

				imageToLoad.onload = function () {
					image
						.animate({opacity: 0}, 100, function () {
							image
								.attr('src', imageSource)
								.animate({opacity: 1}, 200, function () {
									image
										.removeAttr('data-lazy')
										.removeClass('slick-loading');
								});
							_.$slider.trigger('lazyLoaded', [_, image, imageSource]);
						});
				};

				imageToLoad.src = imageSource;

			});
		}

		if (_.options.centerMode === true) {
			if (_.options.infinite === true) {
				rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
				rangeEnd = rangeStart + _.options.slidesToShow + 2;
			} else {
				rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
				rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
			}
		} else {
			rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
			rangeEnd = rangeStart + _.options.slidesToShow;
			if (_.options.fade === true) {
				if (rangeStart > 0) rangeStart--;
				if (rangeEnd <= _.slideCount) rangeEnd++;
			}
		}

		loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
		loadImages(loadRange);

		if (_.slideCount <= _.options.slidesToShow) {
			cloneRange = _.$slider.find('.slick-slide');
			loadImages(cloneRange);
		} else if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
			cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
			loadImages(cloneRange);
		} else if (_.currentSlide === 0) {
			cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
			loadImages(cloneRange);
		}

	};

	Slick.prototype.loadSlider = function () {

		var _ = this;

		_.setPosition();

		_.$slideTrack.css({
			opacity: 1
		});

		_.$slider.removeClass('slick-loading');

		_.initUI();

		if (_.options.lazyLoad === 'progressive') {
			_.progressiveLazyLoad();
		}

	};

	Slick.prototype.next = Slick.prototype.slickNext = function () {

		var _ = this;

		_.changeSlide({
			data: {
				message: 'next'
			}
		});

	};

	Slick.prototype.orientationChange = function () {

		var _ = this;

		_.checkResponsive();
		_.setPosition();

	};

	Slick.prototype.pause = Slick.prototype.slickPause = function () {

		var _ = this;

		_.autoPlayClear();
		_.paused = true;
		_.options.autoplay = false;

	};

	Slick.prototype.play = Slick.prototype.slickPlay = function () {

		var _ = this;

		_.paused = false;
		_.autoPlay();
		_.options.autoplay = true;

	};

	Slick.prototype.postSlide = function (index) {

		var _ = this;

		_.$slider.trigger('afterChange', [_, index]);

		_.animating = false;

		_.setPosition();

		_.swipeLeft = null;

		if (_.options.autoplay === true && _.paused === false) {
			_.autoPlay();
		}
		if (_.options.accessibility === true) {
			_.initADA();
		}

	};

	Slick.prototype.prev = Slick.prototype.slickPrev = function () {

		var _ = this;

		_.changeSlide({
			data: {
				message: 'previous'
			}
		});

	};

	Slick.prototype.preventDefault = function (e) {
		e.preventDefault();
	};

	Slick.prototype.progressiveLazyLoad = function () {

		var _ = this,
			imgCount, targetImage;

		imgCount = $('img[data-lazy]', _.$slider).length;

		if (imgCount > 0) {
			targetImage = $('img[data-lazy]', _.$slider).first();
			targetImage.attr('src', targetImage.attr('data-lazy')).removeClass('slick-loading').load(function () {
				targetImage.removeAttr('data-lazy');
				_.progressiveLazyLoad();

				if (_.options.adaptiveHeight === true) {
					_.setPosition();
				}
			})
				.error(function () {
					targetImage.removeAttr('data-lazy');
					_.progressiveLazyLoad();
				});
		}

	};

	Slick.prototype.refresh = function (initializing) {

		var _ = this,
			currentSlide = _.currentSlide;

		_.destroy(true);

		$.extend(_, _.initials, {currentSlide: currentSlide});

		_.init();

		if (!initializing) {

			_.changeSlide({
				data: {
					message: 'index',
					index: currentSlide
				}
			}, false);

		}

	};

	Slick.prototype.registerBreakpoints = function () {

		var _ = this, breakpoint, currentBreakpoint, l,
			responsiveSettings = _.options.responsive || null;

		if ($.type(responsiveSettings) === "array" && responsiveSettings.length) {

			_.respondTo = _.options.respondTo || 'window';

			for (breakpoint in responsiveSettings) {

				l = _.breakpoints.length - 1;
				currentBreakpoint = responsiveSettings[breakpoint].breakpoint;

				if (responsiveSettings.hasOwnProperty(breakpoint)) {

					// loop through the breakpoints and cut out any existing
					// ones with the same breakpoint number, we don't want dupes.
					while (l >= 0) {
						if (_.breakpoints[l] && _.breakpoints[l] === currentBreakpoint) {
							_.breakpoints.splice(l, 1);
						}
						l--;
					}

					_.breakpoints.push(currentBreakpoint);
					_.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;

				}

			}

			_.breakpoints.sort(function (a, b) {
				return ( _.options.mobileFirst ) ? a - b : b - a;
			});

		}

	};

	Slick.prototype.reinit = function () {

		var _ = this;

		_.$slides =
			_.$slideTrack
				.children(_.options.slide)
				.addClass('slick-slide');

		_.slideCount = _.$slides.length;

		if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
			_.currentSlide = _.currentSlide - _.options.slidesToScroll;
		}

		if (_.slideCount <= _.options.slidesToShow) {
			_.currentSlide = 0;
		}

		_.registerBreakpoints();

		_.setProps();
		_.setupInfinite();
		_.buildArrows();
		_.updateArrows();
		_.initArrowEvents();
		_.buildDots();
		_.updateDots();
		_.initDotEvents();

		_.checkResponsive(false, true);

		if (_.options.focusOnSelect === true) {
			$(_.$slideTrack).children().on('click.slick', _.selectHandler);
		}

		_.setSlideClasses(0);

		_.setPosition();

		_.$slider.trigger('reInit', [_]);

		if (_.options.autoplay === true) {
			_.focusHandler();
		}

	};

	Slick.prototype.resize = function () {

		var _ = this;

		if ($(window).width() !== _.windowWidth) {
			clearTimeout(_.windowDelay);
			_.windowDelay = window.setTimeout(function () {
				_.windowWidth = $(window).width();
				_.checkResponsive();
				if (!_.unslicked) {
					_.setPosition();
				}
			}, 50);
		}
	};

	Slick.prototype.removeSlide = Slick.prototype.slickRemove = function (index, removeBefore, removeAll) {

		var _ = this;

		if (typeof(index) === 'boolean') {
			removeBefore = index;
			index = removeBefore === true ? 0 : _.slideCount - 1;
		} else {
			index = removeBefore === true ? --index : index;
		}

		if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
			return false;
		}

		_.unload();

		if (removeAll === true) {
			_.$slideTrack.children().remove();
		} else {
			_.$slideTrack.children(this.options.slide).eq(index).remove();
		}

		_.$slides = _.$slideTrack.children(this.options.slide);

		_.$slideTrack.children(this.options.slide).detach();

		_.$slideTrack.append(_.$slides);

		_.$slidesCache = _.$slides;

		_.reinit();

	};

	Slick.prototype.setCSS = function (position) {

		var _ = this,
			positionProps = {},
			x, y;

		if (_.options.rtl === true) {
			position = -position;
		}
		x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
		y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';

		positionProps[_.positionProp] = position;

		if (_.transformsEnabled === false) {
			_.$slideTrack.css(positionProps);
		} else {
			positionProps = {};
			if (_.cssTransitions === false) {
				positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
				_.$slideTrack.css(positionProps);
			} else {
				positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
				_.$slideTrack.css(positionProps);
			}
		}

	};

	Slick.prototype.setDimensions = function () {
		var _ = this;

		if (_.options.vertical === false) {
			if (_.options.centerMode === true) {
				_.$list.css({
					padding: ('0px ' + _.options.centerPadding)
				});
			}
		} else {
			_.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
			if (_.options.centerMode === true) {
				_.$list.css({
					padding: (_.options.centerPadding + ' 0px')
				});
			}
		}

		_.listWidth = _.$list.width();
		_.listHeight = _.$list.height();


		if (_.options.vertical === false && _.options.variableWidth === false) {
			_.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
			_.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));

		} else if (_.options.variableWidth === true) {
			_.$slideTrack.width(5000 * _.slideCount);
		} else {
			_.slideWidth = Math.ceil(_.listWidth);
			_.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
		}

		var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
		if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
	};

	Slick.prototype.setFade = function () {

		var _ = this,
			targetLeft;

		_.$slides.each(function (index, element) {
			targetLeft = (_.slideWidth * index) * -1;
			if (_.options.rtl === true) {
				$(element).css({
					position: 'relative',
					right: targetLeft,
					top: 0,
					zIndex: _.options.zIndex - 2,
					opacity: 0
				});
			} else {
				$(element).css({
					position: 'relative',
					left: targetLeft,
					top: 0,
					zIndex: _.options.zIndex - 2,
					opacity: 0
				});
			}
		});

		_.$slides.eq(_.currentSlide).css({
			zIndex: _.options.zIndex - 1,
			opacity: 1
		});

	};

	Slick.prototype.setHeight = function () {

		var _ = this;

		if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
			var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
			_.$list.css('height', targetHeight);
		}

	};

	Slick.prototype.setOption = Slick.prototype.slickSetOption = function (option, value, refresh) {

		var _ = this, l, item;

		if (option === "responsive" && $.type(value) === "array") {
			for (item in value) {
				if ($.type(_.options.responsive) !== "array") {
					_.options.responsive = [value[item]];
				} else {
					l = _.options.responsive.length - 1;
					// loop through the responsive object and splice out duplicates.
					while (l >= 0) {
						if (_.options.responsive[l].breakpoint === value[item].breakpoint) {
							_.options.responsive.splice(l, 1);
						}
						l--;
					}
					_.options.responsive.push(value[item]);
				}
			}
		} else {
			_.options[option] = value;
		}

		if (refresh === true) {
			_.unload();
			_.reinit();
		}

	};

	Slick.prototype.setPosition = function () {

		var _ = this;

		_.setDimensions();

		_.setHeight();

		if (_.options.fade === false) {
			_.setCSS(_.getLeft(_.currentSlide));
		} else {
			_.setFade();
		}

		_.$slider.trigger('setPosition', [_]);

	};

	Slick.prototype.setProps = function () {

		var _ = this,
			bodyStyle = document.body.style;

		_.positionProp = _.options.vertical === true ? 'top' : 'left';

		if (_.positionProp === 'top') {
			_.$slider.addClass('slick-vertical');
		} else {
			_.$slider.removeClass('slick-vertical');
		}

		if (bodyStyle.WebkitTransition !== undefined ||
			bodyStyle.MozTransition !== undefined ||
			bodyStyle.msTransition !== undefined) {
			if (_.options.useCSS === true) {
				_.cssTransitions = true;
			}
		}

		if (_.options.fade) {
			if (typeof _.options.zIndex === 'number') {
				if (_.options.zIndex < 3) {
					_.options.zIndex = 3;
				}
			} else {
				_.options.zIndex = _.defaults.zIndex;
			}
		}

		if (bodyStyle.OTransform !== undefined) {
			_.animType = 'OTransform';
			_.transformType = '-o-transform';
			_.transitionType = 'OTransition';
			if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
		}
		if (bodyStyle.MozTransform !== undefined) {
			_.animType = 'MozTransform';
			_.transformType = '-moz-transform';
			_.transitionType = 'MozTransition';
			if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
		}
		if (bodyStyle.webkitTransform !== undefined) {
			_.animType = 'webkitTransform';
			_.transformType = '-webkit-transform';
			_.transitionType = 'webkitTransition';
			if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
		}
		if (bodyStyle.msTransform !== undefined) {
			_.animType = 'msTransform';
			_.transformType = '-ms-transform';
			_.transitionType = 'msTransition';
			if (bodyStyle.msTransform === undefined) _.animType = false;
		}
		if (bodyStyle.transform !== undefined && _.animType !== false) {
			_.animType = 'transform';
			_.transformType = 'transform';
			_.transitionType = 'transition';
		}
		_.transformsEnabled = (_.animType !== null && _.animType !== false);

	};


	Slick.prototype.setSlideClasses = function (index) {

		var _ = this,
			centerOffset, allSlides, indexOffset, remainder;

		allSlides = _.$slider
			.find('.slick-slide')
			.removeClass('slick-active slick-center slick-current')
			.attr('aria-hidden', 'true');

		_.$slides
			.eq(index)
			.addClass('slick-current');

		if (_.options.centerMode === true) {

			centerOffset = Math.floor(_.options.slidesToShow / 2);

			if (_.options.infinite === true) {

				if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {

					_.$slides
						.slice(index - centerOffset, index + centerOffset + 1)
						.addClass('slick-active')
						.attr('aria-hidden', 'false');

				} else {

					indexOffset = _.options.slidesToShow + index;
					allSlides
						.slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2)
						.addClass('slick-active')
						.attr('aria-hidden', 'false');

				}

				if (index === 0) {

					allSlides
						.eq(allSlides.length - 1 - _.options.slidesToShow)
						.addClass('slick-center');

				} else if (index === _.slideCount - 1) {

					allSlides
						.eq(_.options.slidesToShow)
						.addClass('slick-center');

				}

			}

			_.$slides
				.eq(index)
				.addClass('slick-center');

		} else {

			if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {

				_.$slides
					.slice(index, index + _.options.slidesToShow)
					.addClass('slick-active')
					.attr('aria-hidden', 'false');

			} else if (allSlides.length <= _.options.slidesToShow) {

				allSlides
					.addClass('slick-active')
					.attr('aria-hidden', 'false');

			} else {

				remainder = _.slideCount % _.options.slidesToShow;
				indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;

				if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {

					allSlides
						.slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
						.addClass('slick-active')
						.attr('aria-hidden', 'false');

				} else {

					allSlides
						.slice(indexOffset, indexOffset + _.options.slidesToShow)
						.addClass('slick-active')
						.attr('aria-hidden', 'false');

				}

			}

		}

		if (_.options.lazyLoad === 'ondemand') {
			_.lazyLoad();
		}

	};

	Slick.prototype.setupInfinite = function () {

		var _ = this,
			i, slideIndex, infiniteCount;

		if (_.options.fade === true) {
			_.options.centerMode = false;
		}

		if (_.options.infinite === true && _.options.fade === false) {

			slideIndex = null;

			if (_.slideCount > _.options.slidesToShow) {

				if (_.options.centerMode === true) {
					infiniteCount = _.options.slidesToShow + 1;
				} else {
					infiniteCount = _.options.slidesToShow;
				}

				for (i = _.slideCount; i > (_.slideCount -
				infiniteCount); i -= 1) {
					slideIndex = i - 1;
					$(_.$slides[slideIndex]).clone(true).attr('id', '')
						.attr('data-slick-index', slideIndex - _.slideCount)
						.prependTo(_.$slideTrack).addClass('slick-cloned');
				}
				for (i = 0; i < infiniteCount; i += 1) {
					slideIndex = i;
					$(_.$slides[slideIndex]).clone(true).attr('id', '')
						.attr('data-slick-index', slideIndex + _.slideCount)
						.appendTo(_.$slideTrack).addClass('slick-cloned');
				}
				_.$slideTrack.find('.slick-cloned').find('[id]').each(function () {
					$(this).attr('id', '');
				});

			}

		}

	};

	Slick.prototype.setPaused = function (paused) {

		var _ = this;

		if (_.options.autoplay === true && _.options.pauseOnHover === true) {
			_.paused = paused;
			if (!paused) {
				_.autoPlay();
			} else {
				_.autoPlayClear();
			}
		}
	};

	Slick.prototype.selectHandler = function (event) {

		var _ = this;

		var targetElement =
			$(event.target).is('.slick-slide') ?
				$(event.target) :
				$(event.target).parents('.slick-slide');

		var index = parseInt(targetElement.attr('data-slick-index'));

		if (!index) index = 0;

		

		if (_.slideCount <= _.options.slidesToShow) {

			_.setSlideClasses(index);
			_.asNavFor(index);
			return;

		}

		_.slideHandler(index);

	};

	Slick.prototype.slideHandler = function (index, sync, dontAnimate) {

		var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
			_ = this;

		sync = sync || false;

		if (_.animating === true && _.options.waitForAnimate === true) {
			return;
		}

		if (_.options.fade === true && _.currentSlide === index) {
			return;
		}

		if (_.slideCount <= _.options.slidesToShow) {
			return;
		}

		if (sync === false) {
			_.asNavFor(index);
		}

		targetSlide = index;
		targetLeft = _.getLeft(targetSlide);
		slideLeft = _.getLeft(_.currentSlide);

		_.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;

		if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
			if (_.options.fade === false) {
				targetSlide = _.currentSlide;
				if (dontAnimate !== true) {
					_.animateSlide(slideLeft, function () {
						_.postSlide(targetSlide);
					});
				} else {
					_.postSlide(targetSlide);
				}
			}
			return;
		} else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
			if (_.options.fade === false) {
				targetSlide = _.currentSlide;
				if (dontAnimate !== true) {
					_.animateSlide(slideLeft, function () {
						_.postSlide(targetSlide);
					});
				} else {
					_.postSlide(targetSlide);
				}
			}
			return;
		}

		if (_.options.autoplay === true) {
			clearInterval(_.autoPlayTimer);
		}

		if (targetSlide < 0) {
			if (_.slideCount % _.options.slidesToScroll !== 0) {
				animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
			} else {
				animSlide = _.slideCount + targetSlide;
			}
		} else if (targetSlide >= _.slideCount) {
			if (_.slideCount % _.options.slidesToScroll !== 0) {
				animSlide = 0;
			} else {
				animSlide = targetSlide - _.slideCount;
			}
		} else {
			animSlide = targetSlide;
		}

		_.animating = true;

		_.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);

		oldSlide = _.currentSlide;
		_.currentSlide = animSlide;

		_.setSlideClasses(_.currentSlide);

		_.updateDots();
		_.updateArrows();

		if (_.options.fade === true) {
			if (dontAnimate !== true) {

				_.fadeSlideOut(oldSlide);

				_.fadeSlide(animSlide, function () {
					_.postSlide(animSlide);
				});

			} else {
				_.postSlide(animSlide);
			}
			_.animateHeight();
			return;
		}

		if (dontAnimate !== true) {
			_.animateSlide(targetLeft, function () {
				_.postSlide(animSlide);
			});
		} else {
			_.postSlide(animSlide);
		}

	};

	Slick.prototype.startLoad = function () {

		var _ = this;

		if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {

			_.$prevArrow.hide();
			_.$nextArrow.hide();

		}

		if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

			_.$dots.hide();

		}

		_.$slider.addClass('slick-loading');

	};

	Slick.prototype.swipeDirection = function () {

		var xDist, yDist, r, swipeAngle, _ = this;

		xDist = _.touchObject.startX - _.touchObject.curX;
		yDist = _.touchObject.startY - _.touchObject.curY;
		r = Math.atan2(yDist, xDist);

		swipeAngle = Math.round(r * 180 / Math.PI);
		if (swipeAngle < 0) {
			swipeAngle = 360 - Math.abs(swipeAngle);
		}

		if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
			return (_.options.rtl === false ? 'left' : 'right');
		}
		if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
			return (_.options.rtl === false ? 'left' : 'right');
		}
		if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
			return (_.options.rtl === false ? 'right' : 'left');
		}
		if (_.options.verticalSwiping === true) {
			if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
				return 'left';
			} else {
				return 'right';
			}
		}

		return 'vertical';

	};

	Slick.prototype.swipeEnd = function (event) {

		var _ = this,
			slideCount;

		_.dragging = false;

		_.shouldClick = (_.touchObject.swipeLength > 10) ? false : true;

		if (_.touchObject.curX === undefined) {
			return false;
		}

		if (_.touchObject.edgeHit === true) {
			_.$slider.trigger('edge', [_, _.swipeDirection()]);
		}

		if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {

			switch (_.swipeDirection()) {
				case 'left':
					slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()) : _.currentSlide + _.getSlideCount();
					_.slideHandler(slideCount);
					_.currentDirection = 0;
					_.touchObject = {};
					_.$slider.trigger('swipe', [_, 'left']);
					break;

				case 'right':
					slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()) : _.currentSlide - _.getSlideCount();
					_.slideHandler(slideCount);
					_.currentDirection = 1;
					_.touchObject = {};
					_.$slider.trigger('swipe', [_, 'right']);
					break;
			}
		} else {
			if (_.touchObject.startX !== _.touchObject.curX) {
				_.slideHandler(_.currentSlide);
				_.touchObject = {};
			}
		}

	};

	Slick.prototype.swipeHandler = function (event) {

		var _ = this;

		if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
			return;
		} else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
			return;
		}

		_.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
			event.originalEvent.touches.length : 1;

		_.touchObject.minSwipe = _.listWidth / _.options
				.touchThreshold;

		if (_.options.verticalSwiping === true) {
			_.touchObject.minSwipe = _.listHeight / _.options
					.touchThreshold;
		}

		switch (event.data.action) {

			case 'start':
				_.swipeStart(event);
				break;

			case 'move':
				_.swipeMove(event);
				break;

			case 'end':
				_.swipeEnd(event);
				break;

		}

	};

	Slick.prototype.swipeMove = function (event) {

		var _ = this,
			edgeWasHit = false,
			curLeft, swipeDirection, swipeLength, positionOffset, touches;

		touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;

		if (!_.dragging || touches && touches.length !== 1) {
			return false;
		}

		curLeft = _.getLeft(_.currentSlide);

		_.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
		_.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;

		_.touchObject.swipeLength = Math.round(Math.sqrt(
			Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));

		if (_.options.verticalSwiping === true) {
			_.touchObject.swipeLength = Math.round(Math.sqrt(
				Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
		}

		swipeDirection = _.swipeDirection();

		if (swipeDirection === 'vertical') {
			return;
		}

		if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
			event.preventDefault();
		}

		positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
		if (_.options.verticalSwiping === true) {
			positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
		}


		swipeLength = _.touchObject.swipeLength;

		_.touchObject.edgeHit = false;

		if (_.options.infinite === false) {
			if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
				swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
				_.touchObject.edgeHit = true;
			}
		}

		if (_.options.vertical === false) {
			_.swipeLeft = curLeft + swipeLength * positionOffset;
		} else {
			_.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
		}
		if (_.options.verticalSwiping === true) {
			_.swipeLeft = curLeft + swipeLength * positionOffset;
		}

		if (_.options.fade === true || _.options.touchMove === false) {
			return false;
		}

		if (_.animating === true) {
			_.swipeLeft = null;
			return false;
		}

		_.setCSS(_.swipeLeft);

	};

	Slick.prototype.swipeStart = function (event) {

		var _ = this,
			touches;

		if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
			_.touchObject = {};
			return false;
		}

		if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
			touches = event.originalEvent.touches[0];
		}

		_.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
		_.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;

		_.dragging = true;

	};

	Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function () {

		var _ = this;

		if (_.$slidesCache !== null) {

			_.unload();

			_.$slideTrack.children(this.options.slide).detach();

			_.$slidesCache.appendTo(_.$slideTrack);

			_.reinit();

		}

	};

	Slick.prototype.unload = function () {

		var _ = this;

		$('.slick-cloned', _.$slider).remove();

		if (_.$dots) {
			_.$dots.remove();
		}

		if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
			_.$prevArrow.remove();
		}

		if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
			_.$nextArrow.remove();
		}

		_.$slides
			.removeClass('slick-slide slick-active slick-visible slick-current')
			.attr('aria-hidden', 'true')
			.css('width', '');

	};

	Slick.prototype.unslick = function (fromBreakpoint) {

		var _ = this;
		_.$slider.trigger('unslick', [_, fromBreakpoint]);
		_.destroy();

	};

	Slick.prototype.updateArrows = function () {

		var _ = this,
			centerOffset;

		centerOffset = Math.floor(_.options.slidesToShow / 2);

		if (_.options.arrows === true &&
			_.slideCount > _.options.slidesToShow && !_.options.infinite) {

			_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
			_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

			if (_.currentSlide === 0) {

				_.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
				_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

			} else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {

				_.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
				_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

			} else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {

				_.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
				_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

			}

		}

	};

	Slick.prototype.updateDots = function () {

		var _ = this;

		if (_.$dots !== null) {

			_.$dots
				.find('li')
				.removeClass('slick-active')
				.attr('aria-hidden', 'true');

			_.$dots
				.find('li')
				.eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
				.addClass('slick-active')
				.attr('aria-hidden', 'false');

		}

	};

	Slick.prototype.visibility = function () {

		var _ = this;

		if (document[_.hidden]) {
			_.paused = true;
			_.autoPlayClear();
		} else {
			if (_.options.autoplay === true) {
				//_.paused = false;
				_.autoPlay();
			}
		}

	};
	Slick.prototype.initADA = function () {
		var _ = this;

		try{
			_.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
				'aria-hidden': 'true',
				'tabindex': '-1'
			}).find('a, input, button, select').attr({
				'tabindex': '-1'
			});

			_.$slideTrack.attr('role', 'listbox');

			_.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function (i) {
				$(this).attr({
					'role': 'option',
					'aria-describedby': 'slick-slide' + _.instanceUid + i + ''
				});
			});

			if (_.$dots !== null) {
				_.$dots.attr('role', 'tablist').find('li').each(function (i) {
					$(this).attr({
						'role': 'presentation',
						'aria-selected': 'false',
						'aria-controls': 'navigation' + _.instanceUid + i + '',
						'id': 'slick-slide' + _.instanceUid + i + ''
					});
				})
					.first().attr('aria-selected', 'true').end()
					.find('button').attr('role', 'button').end()
					.closest('div').attr('role', 'toolbar');
			}
		_.activateADA();
		} catch (err) {}

	};

	Slick.prototype.activateADA = function () {
		try{
			var _ = this,
				_isSlideOnFocus = _.$slider.find('*').is(':focus');
			// _isSlideOnFocus = _.$slides.is(':focus') || _.$slides.find('*').is(':focus');

			_.$slideTrack.find('.slick-active').attr({
				'aria-hidden': 'false',
				'tabindex': '0'
			}).find('a, input, button, select').attr({
				'tabindex': '0'
			});

			(_isSlideOnFocus) && _.$slideTrack.find('.slick-active').focus();
		} catch (err) {}
	};

	Slick.prototype.focusHandler = function () {
		var _ = this;
		_.$slider.on('focus.slick blur.slick', '*', function (event) {
			event.stopImmediatePropagation();
			var sf = $(this);
			setTimeout(function () {
				if (_.isPlay) {
					if (sf.is(':focus')) {
						_.autoPlayClear();
						_.paused = true;
					} else {
						_.paused = false;
						_.autoPlay();
					}
				}
			}, 0);
		});
	};

	$.fn.slick = function () {
		var _ = this,
			opt = arguments[0],
			args = Array.prototype.slice.call(arguments, 1),
			l = _.length,
			i = 0,
			ret;
		for (i; i < l; i++) {
			if (typeof opt == 'object' || typeof opt == 'undefined')
				_[i].slick = new Slick(_[i], opt);
			else
				ret = _[i].slick[opt].apply(_[i].slick, args);
			if (typeof ret != 'undefined') return ret;
		}
		return _;
	};

}));

define('../src/journeys/j134-media/j134-media',['jquery', 'lib/utils', 'slick', 'tooltipster'], function($, utils, slick, tooltipster) {

    'use strict';

    var j143_media = function($journey) {

        this.$journey = $journey;

        return this;
    };

    j143_media.prototype.init = function() {
        var _this = this;

        this.news();
        this.photoG();
        this.masdar();

        this.$journey.find('.j134-media--photo_itemimg').each(function() {
            var text = $(this).attr('data-alt');

            $(this).tooltipster({
                content: text,
                maxWidth: 250,
                    arrow: false
            });
        });

        this.$journey.find('.j134-media--photo_gallerytitle').each(function() {
            $(this).off('click.pgallery').on('click.pgallery', function() {
                $(this).toggleClass('j134-media--photo_gallerytitle_open');
                $(this).next('.j134-media--photo_outer').toggleClass('open');
            });
        });

        $(window).off('resize.media').on('resize.media', function() {
            setTimeout(function() {
                _this.photoG();
                _this.masdar();
            }, 100);
        });
    };

    j143_media.prototype.news = function() {
    };

    j143_media.prototype.photoG = function() {
        var _this = this;

        if (utils.breakpoint() != 's' && utils.breakpoint() != 'm') {
            if (this.$journey.find('.j134-media--photo_gallery').length != 0) {
                _this.$journey.find('.j134-media--photo_gallery').each(function() {
                    if ($(this).find('.j134-media--photo_slide').length > 1) {
                        $(this).slick({
                            arrows: true,
                            dots: true,
                            infinite: true,
                            speed: 750,
                            slidesToShow: 1,
                            slidesToScroll: 1,
                            rtl: ($('html').attr('dir') == 'rtl')
                        });
                    }
                });
            }
        } else {
            if (this.$journey.find('.j134-media--photo_gallery').length != 0) {
                _this.$journey.find('.j134-media--photo_gallery').each(function() {
                    if ($(this).hasClass('slick-initialized')) {
                        $(this).slick('unslick');
                    };

                });
            };
        }
    };

    j143_media.prototype.masdar = function() {
        var _this = this;

        if (utils.breakpoint() === 's' || utils.breakpoint() === 'm') {
            if (this.$journey.find('.j134-media-almasdar').length != 0) {
                _this.$journey.find('.j134-media-almasdar').each(function() {
                    if ($(this).find('.m9-teaser').length > 1) {
                        $(this).slick({
                            arrows: true,
                            dots: true,
                            infinite: true,
                            speed: 750,
                            slidesToShow: 1,
                            slidesToScroll: 1,
                            rtl: ($('html').attr('dir') == 'rtl')
                        });
                    }
                });
            }
        } else {
            if (this.$journey.find('.j134-media-almasdar').length != 0) {
                _this.$journey.find('.j134-media-almasdar').each(function() {
                    if ($(this).hasClass('slick-initialized')) {
                        $(this).slick('unslick');
                    };

                });
            };
        }
    };

    return j143_media;
});

define('../src/journeys/j136-sponsorship/j136-sponsorship',['jquery', 'lib/utils', 'slick'], function($, utils, slick) {

    'use strict';

    var j136_sponsorship= function($journey) {

        this.$journey = $journey;

        return this;
    };

    j136_sponsorship.prototype.init = function() {
        var _this = this;

      		
      		var addGoalBtn = this.$journey.find('.form-field--text_add-goal .form-field--add_button'),
              thisTable = this.$journey.find('.form-field--table');



              thisTable.each(function(){
                var thisTableRows = $(this).data('rows'),
                    thisTable = $(this);

                  if(thisTableRows.length > 0){
                    $.each(thisTableRows, function(i, el) {
                        var addTableRow = thisTable.find('.form-field--table-row'),
                            addTableRowLast = addTableRow.last(),
                            newRow = '';

                        if (i % 2 === 0) {
                            newRow = '<div class="form-field--table-row"><div class="form-field--6 form-field--6-mobile_full form-field--table-list-item">' + el + '<span class="form-field--table-list-item-delete"></span></div></div>'
                            thisTable.append(newRow)
                        }
                        else { 
                            newRow = '<div class="form-field--6 form-field--6-mobile_full form-field--table-list-item">' + el + '<span class="form-field--table-list-item-delete"></span></div>'
                            addTableRowLast.append(newRow)
                        }
                    })
                  }
              })


      		addGoalBtn.on('click',function(){
      			var addWrapper = $(this).closest('.form-field--text_add-goal'),
      				addTableId = '#'+addWrapper.data('add-table'),
              addTableRows = $(addTableId).data('rows'),
      				addInput = addWrapper.find('.form-field__input'),
              addTableRequiredRow = $(addTableId).data('table-required-row'),
      				addInputVal = addInput.val();

              if(addTableRows == ""){
                  var addTableRows =  []
              }

      				if(addInputVal){
      					var addTableRow = $(addTableId).find('.form-field--table-row'),
      						addTableRowLast = addTableRow.last(),
      						addTableRowLastItems = addTableRowLast.find('.form-field--table-list-item'),
                  totalItems = '';

                  if(addTableRow.length > 0){
                    if(addTableRowLastItems.length == 2){
                      $(addTableId).append('<div class="form-field--table-row"><div class="form-field--6 form-field--6-mobile_full form-field--table-list-item">' + addInputVal + '<span class="form-field--table-list-item-delete"></span></div></div>')
                      totalItems = (addTableRow.length * 2) + 1
                    }
                    if(addTableRowLastItems.length < 2){
                      addTableRowLast.append('<div class="form-field--6 form-field--6-mobile_full form-field--table-list-item">' + addInputVal + '<span class="form-field--table-list-item-delete"></span></div>')
                      totalItems = addTableRow.length * 2
                    }
                  } else{
                    $(addTableId).append('<div class="form-field--table-row"><div class="form-field--6 form-field--6-mobile_full form-field--table-list-item">' + addInputVal + '<span class="form-field--table-list-item-delete"></span></div></div>')
                    totalItems = 1
                  }
                  addTableRows.push(addInputVal)
                  $(addTableId).data('rows', addTableRows);
                  $(addTableId).attr('data-rows', addTableRows);

                  if(totalItems >= addTableRequiredRow){
                    addInput.removeAttr('required')
                  }
                  if(totalItems < addTableRequiredRow){
                    addInput.prop('required',true)
                  }
                  addInput.val('')
      				}
      		})

          thisTable.on('click', '.form-field--table-list-item-delete', function() {
            var thisTable = $(this).closest('.form-field--table'),
                thisTableRequiredRow = thisTable.data('table-required-row'),
                addInputId = '#'+thisTable.data('add-input'),
                addInput = $(addInputId).find('.form-field__input'),
                thisItem = $(this).closest('.form-field--table-list-item'),
                thisRow = thisItem.closest('.form-field--table-row'),
                restItem = thisRow.find('.form-field--table-list-item'),
                totalItems;
                if(restItem.length == 2){
                  thisItem.remove()
                }
                if(restItem.length == 1){
                  thisRow.remove()
                }

                var thisTableRow = thisTable.find('.form-field--table-row'),
                    thisTableLastRow = thisTableRow.last(),
                    thisTableLastRowItem = thisTableLastRow.find('.form-field--table-list-item');

                if(thisTableRow.length > 0){
                    if(thisTableLastRowItem.length == 2){
                      totalItems = thisTableRow.length * 2
                    }
                    if(thisTableLastRowItem.length < 2){
                      totalItems = (thisTableRow.length * 2) - 1
                    }
                }else{
                    totalItems = 0
                }
                  if(totalItems >= thisTableRequiredRow){
                    addInput.removeAttr('required')
                  }
                  if(totalItems < thisTableRequiredRow){
                    addInput.prop('required',true)
                  }
          });

    };




    return j136_sponsorship;
});

define('../src/journeys/j141-tracking-anonymous/j141-tracking-anonymous',['jquery'], function($) {

    'use strict';

    var j141_tracking = function($journey) {

        this.$journey = $journey;

        return this;
    };

    j141_tracking.prototype.init = function() {
        var _this = this,
            $radios = this.$journey.find('.j141-tracking--radio').find('.form-field__input--radio');

        $radios.each(function() {
            if ($(this).prop('checked') == true) {
                $(this).closest('.form-field__radio').find('.form-field--subRadio').find('.form-field__input').attr('required', true);
            } else {
                $(this).closest('.form-field__radio').find('.form-field--subRadio').find('.form-field__input').attr('required', false);
                $(this).closest('.form-field__radio').find('.form-field--subRadio').find('.form-field__input').removeClass('form-field__input--error');
            }
        });

        $radios.off('click.j141').on('click.j141', function() {
            $radios.each(function() {
                if ($(this).prop('checked') == true) {
                    $(this).closest('.form-field__radio').find('.form-field--subRadio').find('.form-field__input').attr('required', true);
                } else {
                    $(this).closest('.form-field__radio').find('.form-field--subRadio').find('.form-field__input').attr('required', false);
                    $(this).closest('.form-field__radio').find('.form-field--subRadio').find('.form-field__input').removeClass('form-field__input--error');
                }
            });
        })
    };




    return j141_tracking;
});

define( '../src/journeys/j143-ideal-home/j143-ideal-home',[ 'jquery','breakpoint','lib/utils', 'parsley', 'slick' ], function ( $ , breakpoint, utils, parsley, slick ) {

	'use strict';

	var J143_IDEAL_HOME = function ( $journey ) {

		this.$journey = $journey;

		return this;
	};

	J143_IDEAL_HOME.prototype.init = function () {

			var $this = this,
				itemTrigger = this.$journey.find('.modal_trigger'),
				idealModal = this.$journey.find('.m39-modal-ideal-home'),
				idealModalHead = this.$journey.find('.m39-modal__header'),
				idealModalDialog = this.$journey.find('.m39-modal__dialog'),
				modalTrigger = idealModal.find('.m39-modal__trigger'),
				galleryThumb = idealModal.find('.m33-thumbnail-gallery__thumb-carousel'),
				toggleColumn = this.$journey.find('.grid__column-toggle'),
				toggleBtn = toggleColumn.find('.grid__column-toggle-button'),
				thisForm = this.$journey.find('.form-section'),
				thisFormTag = thisForm.find('form'),
				thisFormRadio = thisForm.find('.form-field__input--radio'),
				thisFormText = thisForm.find('.form-field__input--text'),
				thisModalSlider = idealModal.find('.m33-thumbnail-gallery__main-carousel');

				idealModalDialog.css('height','')

				$('.form-section-group input').attr('disabled','disabled')
				$('.form-section-group').first().find('input').removeAttr('disabled')

				thisFormRadio.on('click',function(){
					var thisGroup = $(this).closest('.form-section-group'),
						thisGroupInput = thisGroup.find('input'),
						valid;
						thisGroupInput.each(function(){
							valid = false;
							if($(this).parsley().isValid()){
								valid = true;
							}
						})
					if(valid){
						thisGroup.addClass('valid-group')
						thisGroup.next('.form-section-group').find('input').removeAttr('disabled')
					}
				})
				thisFormText.keyup(function() {
					var thisGroup = $(this).closest('.form-section-group'),
						thisGroupInput = thisGroup.find('input'),
						valid;
						thisGroupInput.each(function(){
							valid = false;
							if($(this).parsley().isValid()){
								valid = true;
							}
						})
					if(valid){
						thisGroup.addClass('valid-group')

					}
				})

					thisModalSlider.on('afterChange', function(event, slick,currentSlide){
					    $this.resizeScroll(slick.$slider)
					});
				

				$(window).on('resize orientationchange', function() {
				    var thisSlide = $('.m39-modal__container--active').find('.m33-thumbnail-gallery__main-carousel');

				    setTimeout(function(){ $this.resizeScroll(thisSlide)}, 500);
				    
				});
			

				itemTrigger.on('click',function(){
					var slideNum = $(this).data('index'),
						trggerSlide = galleryThumb.find("[data-index='" + slideNum + "']");
						trggerSlide.trigger('click');
						modalTrigger.trigger('click');
				})

				$('.m39-modal-ideal-home_teaser-gallery-content-next').on('click',function(){
						var thisContainer = $(this).closest('.m33-thumbnail-gallery__main-carousel-container'),
							nextBtn = thisContainer.find('.m33-thumbnail-gallery__main-carousel-button--next');
							nextBtn.trigger('click');
				})


				toggleBtn.on('click',function(){
					var thistoggleColumn = $(this).closest('.grid__column-toggle');
						if(thistoggleColumn.hasClass('grid__column-active')){
							thistoggleColumn.removeClass('grid__column-active');
						}else{
							thistoggleColumn.addClass('grid__column-active');
						}
						
				})
	};

	J143_IDEAL_HOME.prototype.resizeScroll = function (thisSlider) {
		var thisWinHeight = ($(window).height() / 100 ) * 90,
					    	thisActiveSlide = thisSlider.find('.slick-active .m39-modal-ideal-home_teaser-gallery-content-text'),
					    	thiRichText = thisActiveSlide.find('.m14-richtext');

					    	thiRichText.css('height','')

					    	var thisActiveSlideHeight = thisActiveSlide.height(),
					    	idealModalDialogHeight = 50 + thisActiveSlideHeight,
					    	thisPrevButton = thisSlider.closest('.m33-thumbnail-gallery').find('.m33-thumbnail-gallery__main-carousel-button--prev'),
					    	thisNextButton = thisSlider.closest('.m33-thumbnail-gallery').find('.m33-thumbnail-gallery__main-carousel-button--next'),
					    	thisList = thisSlider.find('.slick-list'), 
					    	buttonTop = (idealModalDialogHeight / 2 ) - 57,
					    	_this = thisSlider,
					    	idealModalDialog = thisActiveSlide.closest('.m39-modal__dialog');

					    	idealModalDialog.css('height','')
					    	thisList.css('height','')

					    	if (utils.breakpoint() === 's') {
					            var idealModalDialogHeight = 130 + thisActiveSlideHeight;
					            thisList.css('height',idealModalDialogHeight - 80)
					        }

					        if(thisWinHeight >= idealModalDialogHeight){
					        	idealModalDialog.css('height',idealModalDialogHeight)
					    		thisNextButton.css('top',buttonTop)
					    		thisPrevButton.css('top',buttonTop)
					        }
					        if( thisWinHeight < idealModalDialogHeight ){
					        	if (utils.breakpoint() === 'm' || utils.breakpoint() === 'l') {
					        		var thiRichText = thisActiveSlide.find('.m14-richtext'),
					        			buttonTop = (thisWinHeight / 2 ) - 57;
					        		thiRichText.css('height',thisWinHeight - 134)
					        		thisNextButton.css('top',buttonTop)
					    			thisPrevButton.css('top',buttonTop)
					    			thiRichText.addClass('m14-richtext-scroll');
					        	}
					        }
					        console.log('resize')
	};

	return J143_IDEAL_HOME;
} );

define('../src/journeys/j152-ev-smart-charge/j152-ev-smart-charge',['jquery', 'breakpoint', 'lib/utils', 'tooltipster', 'format-numbers'], function($, breakpoint, utils, tooltipster, Numeral) {

    'use strict';

    var J152_EV_SMART_CHARGE = function($journey) {

        this.$journey = $journey;

        return this;
    };


    J152_EV_SMART_CHARGE.prototype.init = function() {
        var _this = this,
            timeSelect = this.$journey.find('.charge-time-select'),
            timeSelectRadio = timeSelect.find('.form-field__input--radio'),
            pricePlaceHolder = this.$journey.find('[data-price-place]'),
            fixBottom = this.$journey.find('.j152-ev-smart-charge-fixbottom');
            this.hiddenTime;


            setTimeout(function(){
                _this.initWindow();
            },200)

            $(window).on('resize orientationchange', function() {
                setTimeout(function(){
                    _this.initWindow();
                },200)
            });



            timeSelectRadio.change(function(){
                var price = $(this).data('price');
                    pricePlaceHolder.html(price)
                    Numeral.init()
                    fixBottom.removeClass('hidden');
                    fixBottom.addClass('active');
            })

            this.$journey.off('evtimer').on('evtimer', function() {
                var timer = _this.$journey.find('.timer'),
                    time = timer.data('timer-ev');
                _this.timeCount(timer,time);
            });
            
            if(_this.$journey.find('.timer').data('timer-trigger') == 'auto'){
                _this.$journey.find('.timer').trigger('evtimer')
            }
    };

    J152_EV_SMART_CHARGE.prototype.initWindow = function(){

        var wrapper = this,
            notifheight = ($('.notification-newstyle').height() == undefined) ? 0 : $('.notification-newstyle').height(),
            cookheight = ($('.m71-cookie').height() == undefined) ? 0 : $('.m71-cookie').height(),
            height = ($(window).height() - $('header').height() - notifheight - cookheight),
            breadcrumbBar = $('.m12-bar__breadcrumbs'),
            contentHeight = $('.j152-ev-smart-charge-content').outerHeight() + $('.j152-ev-smart-charge-fixbottom').outerHeight();

            

            if (contentHeight > height){
                $('.j152-ev-smart-charge-fixbottom').addClass('static-bottom');  
                $('.j152-ev-smart-charge').css('height',(height).toString()+'px')
            }else{
                 $('.j152-ev-smart-charge-fixbottom').removeClass('static-bottom');
                 $('.j152-ev-smart-charge').css('height','auto') 
            }
            
    };

    J152_EV_SMART_CHARGE.prototype.timeCount = function(container, countdown) {
        var _this = this,
            isPageVisible = true,
            timer,
            interval = 1000, // 1 second interval
            lastTimestamp = Date.now(),
            hiddenStartTime;
            

    
        // Function to calculate total seconds from 'mm:ss' format
        function parseTime(countdown) {
            var timer = countdown.split(':');
            var minutes = parseInt(timer[0], 10);
            var seconds = parseInt(timer[1], 10);
            return minutes * 60 + seconds;
        }
    
        // Function to format seconds back to 'mm:ss'
        function formatTime(totalSeconds) {
            var minutes = Math.floor(totalSeconds / 60);
            var seconds = totalSeconds % 60;
            return minutes + ':' + (seconds < 10 ? '0' + seconds : seconds);
        }
    
        // Function to run the countdown timer
        function runTimer() {
            if (isPageVisible) {
                const now = Date.now();
                const deltaTime = Math.floor((now - lastTimestamp) / 1000); // Get the elapsed time in seconds
                lastTimestamp = now;
                _this.hiddenTime = now;
    
                var totalSeconds = parseTime(countdown);
                totalSeconds -= deltaTime; // Adjust the time by the delta
    
                // Stop the timer if time runs out
                if (totalSeconds <= 0) {
                    container.html('0:00');
                    clearTimeout(timer);
                    $('#timerclick').trigger('click');
                    return;
                }
    
                // Update container with new time
                countdown = formatTime(totalSeconds);
                container.html(countdown);
    
                // Schedule the next run
                timer = setTimeout(runTimer, interval);
            }
        }
    
        // Handle visibility change
        function handleVisibilityChange() {
            if (document.hidden) {
                isPageVisible = false;
                hiddenStartTime = Date.now(); // Store the time when the page becomes hidden
                clearTimeout(timer); // Pause the timer
            } else {
                if(hiddenStartTime == undefined){
                    hiddenStartTime = _this.hiddenTime;
                }
                isPageVisible = true;
                var hiddenDuration = Math.floor((Date.now() - hiddenStartTime) / 1000); // Calculate how long the page was hidden
                lastTimestamp = Date.now(); // Reset the timestamp
    
                // Adjust the countdown by the hidden duration
                var totalSeconds = parseTime(countdown);
                totalSeconds -= hiddenDuration;
                countdown = formatTime(totalSeconds);
    
                // Resume the timer
                runTimer();
            }
        }
        // Listen to visibility change events
        document.addEventListener('visibilitychange', handleVisibilityChange);
    
        // Start the timer initially
        runTimer();
        handleVisibilityChange()
    };



    

    return J152_EV_SMART_CHARGE;
});

define('../src/journeys/j153-ev-map/j153-ev-map',['jquery', 'select2', 'lib/utils'], function($, select2, utils) {

    'use strict';

    var J100_SERVICES_MAP = function($journey) {

        this.$journey = $journey;

        return this;
    };

    J100_SERVICES_MAP.prototype.init = function() {
        var _this = this;
        this.overlayType = 0;
        this.displayFilter = [];
        this.checkBoxes = this.$journey.find('.j153-ev-map_cbox-input');
        this.vtoken = this.$journey.find('[name="__RequestVerificationToken"]') != null ? this.$journey.find('[name="__RequestVerificationToken"]').val() : undefined;

        this.fastchargingMarkers = [];
        this.normalchargingMarkers = [];

        this.markerList = [
            this.fastchargingMarkers,
            this.normalchargingMarkers
        ];

        this.defaultZoom = 13;
        this.searchLocation = null;
        this.labels = $(this.$journey).data('labels');
        this.pins = $(this.$journey).data('pins');
        this.EVloaded = false;
        this.EVloading = false;

        // demo server location workaround
        this.urlPrefix = '../../..';

        if (window.check) {
            if (window.check == 'head') {
                _this.$journey.find('[name="j100_checkbox_desktop1"]').prop('checked', true);
                _this.$journey.find('[name="j100_checkbox_mobile1"]').prop('checked', true);
                _this.displayFilter.push(1);
            } else {
                _this.$journey.find('[name="j100_checkbox_desktop' + window.check + '"]').prop('checked', true);
                _this.$journey.find('[name="j100_checkbox_mobile' + window.check + '"]').prop('checked', true);
                _this.displayFilter.push(window.check);
            }
        }

        // listen for mapLoaded event
        $(window).on('mapLoaded', function() {
            _this.map = window.MAP.map;
            _this.loadData();

            _this.centerPoint = _this.map.getCenter();
            _this.map.addListener('dragend', function() {
                _this.centerPoint = _this.map.getCenter();
                _this.map.setCenter(_this.centerPoint);
            });

            // $(window).off('evLoad').on('evLoad', function() {
            //     _this.EVLoadData();
            // })
        });

        $(window).on('resize orientationchange', function() {
            setTimeout(function() {
                _this.map.setCenter(_this.centerPoint);
            }, 100);
        });

        this.checkBoxes.each(function(e) {
            $(this).off().on('click', function() {
                if ($(this).prop("checked")) {
                    _this.displayFilter.push(parseInt($(this).val()));
                } else {
                    _this.displayFilter.splice(_this.displayFilter.indexOf(parseInt($(this).val())), 1);
                }
                _this.populateMap();
                _this.getLocationBySensor();
            });
        });

        this.getLocationBySensor();

        $(this.$journey).on('click', '.m32-map__button--close', function() {
            _this.hideDetails();
        });

    };

    J100_SERVICES_MAP.prototype.getLocationBySensor = function() {
        var _this = this;
        if (navigator.geolocation) {
            navigator.geolocation.getCurrentPosition(showPosition);
        }

        function showPosition(position) {
            try {
                var latlng = new google.maps.LatLng({ lat: position.coords.latitude, lng: position.coords.longitude });
                _this.highlightLocation(_this.getClosestMarker(latlng));
            } catch (err) {}
        }
    };

    J100_SERVICES_MAP.prototype.getClosestMarker = function(latlng) {
        var _this = this,
            n, latlng2, distance;
        var lastResult = {};
        // check for filtering

        // loop through the visible markers array and find the closest marker
        if (this.displayFilter.length > 0) {
            for (n = 0; n < this.displayFilter.length; n++) {
                var filter = _this.getFilterContent(this.displayFilter[n]);
                for (m = 0; m < filter.markers.length; m++) {
                    latlng2 = filter.markers[m].position;
                    distance = google.maps.geometry.spherical.computeDistanceBetween(latlng, latlng2);
                    if (!lastResult.i || distance < lastResult.val) {
                        lastResult = { i: m, val: distance, marker: filter.markers[m] };
                    }
                }
            }
        } else { // loop through all markers and find the closest marker
            for (n = 0; n < this.markerList.length; n++) {
                var list = this.markerList[n];
                for (var m = 0; m < list.length; m++) {
                    latlng2 = list[m].position;
                    distance = google.maps.geometry.spherical.computeDistanceBetween(latlng, latlng2);
                    if (!lastResult.i || distance < lastResult.val) {
                        lastResult = { i: m, val: distance, marker: list[m] };
                    }
                }
            }
        }
        return lastResult.marker;
    };

    J100_SERVICES_MAP.prototype.setMapBounds = function() {
        var _this = this;
        _this.bounds = new google.maps.LatLngBounds();
        for (var i = 0; i < _this.boundingMarkers.length; i++) {
            _this.bounds.extend(_this.boundingMarkers[i].getPosition());
        }
        _this.map.fitBounds(_this.bounds);
        _this.map.centrePoint = _this.map.getCenter();
    };

    J100_SERVICES_MAP.prototype.loadData = function(m) {
        var _this = this;
        var url = this.urlPrefix + '/content/data/payment_locations_en.json',
            langCh = "EN";
        if (utils.isRTL()) {
            url = this.urlPrefix + '/content/data/payment_locations_ar.json';
            langCh = "AR";
        }
        if (_this.vtoken != undefined) {
            $.ajax({
                url: '/en/api/EVLocation/GetMapDataPoints',
                dataType: 'json',
                type: 'post',
                data: JSON.stringify({
                    "onlinemapinputs": {
                        "vendorid": "",
                        "lang": $('html').attr('lang') == 'en' ? "EN" : "AR",
                        "evcharger": "X"
                    },
                    "__RequestVerificationToken": _this.vtoken
                }),
                error: function(jqXHR, textStatus, errorThrown) {
                    console.log(errorThrown);
                },
                success: function(data) {
                    _this.locationData = data;
                    _this.parseData();
                    //_this.initSearchBox();
                }
            });
        }
    };

    J100_SERVICES_MAP.prototype.parseData = function() {
        var _this = this;
        var items = this.locationData;

        this.fastchargingPoints = items.FastEVCharge;
        this.normalchargingPoints = items.NormalEVCharge;

        _this.$journey.find('[data-location-count="evgfcharger"]').text(' '+this.fastchargingPoints.length.toString());
        _this.$journey.find('[data-location-count="evgcharger"]').text(' '+this.normalchargingPoints.length.toString());

        _this.populateMap();
    };


    J100_SERVICES_MAP.prototype.initSearchBox = function() {
        var _this = this;

        // define search box - desktop
        _this.input1 = document.getElementById(_this.searchField1.attr('id'));
        _this.searchBox1 = new google.maps.places.SearchBox(_this.input1);

        // define search box - mobile
        _this.input2 = document.getElementById(_this.searchField2.attr('id'));
        _this.searchBox2 = new google.maps.places.SearchBox(_this.input2);

        // listen for search events and stop page reloading
        _this.searchField1.closest('form').on('submit', function(e) {
            e.preventDefault();
        });
        _this.searchField2.closest('form').on('submit', function(e) {
            e.preventDefault();
        });

        // add area context for locally related search results
        _this.map.addListener('bounds_changed', function() {
            _this.searchBox1.setBounds(map.getBounds());
            _this.searchBox2.setBounds(map.getBounds());
        });

        // handle results on submit - desktop
        _this.searchBox1.addListener('places_changed', function() {
            _this.handleSearchResult(_this.searchBox1);
            _this.searchField2.val(_this.searchField1.val());
        });

        // handle results on submit - mobile
        _this.searchBox2.addListener('places_changed', function() {
            _this.handleSearchResult(_this.searchBox2);
            _this.searchField1.val(_this.searchField2.val());
        });

    };

    J100_SERVICES_MAP.prototype.handleSearchResult = function(s) {
        var _this = this;
        var places = s.getPlaces();

        if (places.length == 0) {
            return;
        } else {
            // If set, clear the old searchMarker
            if (_this.searchMarker) _this.searchMarker.setMap(null);

            // For each place, get the icon, name and location.
            places.forEach(function(place) {
                var icon = {
                    url: place.icon,
                    size: new google.maps.Size(71, 71),
                    origin: new google.maps.Point(0, 0),
                    anchor: new google.maps.Point(17, 34),
                    scaledSize: new google.maps.Size(25, 25)
                };

                // Create a marker for each place.
                _this.searchMarker = new google.maps.Marker({
                    map: _this.map,
                    icon: icon,
                    title: place.name,
                    subtitle: place.subname,
                    position: place.geometry.location
                });
            });

            // add searchMarker and closest marker to an array and focus the map to display them both
            _this.hideDetails();
            _this.centerPoint = _this.searchLocation = _this.searchMarker.getPosition();
            _this.map.setCenter(_this.centerPoint);
            _this.map.setZoom(_this.defaultZoom);
        }
    };

    J100_SERVICES_MAP.prototype.populateDetails = function(m) {
        var _this = this;

        this.overlayType = m.overlayType;
        $('.m32-map__overlay-title img').attr('src', (this.urlPrefix + m.image));
        $('.m32-map__overlay-title--text').html(m.name);
        $('.m32-map__overlay-subtitle--text').html(m.category);

        var makaninumber = '';
        if (m.makani != undefined) {
            makaninumber = '<span class="m32-map__overlay-address--inner"><strong>' + this.labels.makani + '</strong>' + m.makani + '</span><br/>';
        }

        var pwd = '';
        var apwd = '';
        //var evstatus = '';

        if (m.pwd) {
            pwd = '<span class="m32-map__overlay-address--inner"><strong>' + this.labels.pwd + '</strong>' + '<a href="tel:' + m.phone + '" class="link">' + m.phone + '</a>' + '</span><br/>'
        };

        if (m.apwd) {
            apwd = '<span class="m32-map__overlay-address--inner"><strong>' + this.labels.pwd + '</strong>' + ' ' + this.labels.apwd + '</span><br/>'
        }

        //if (m.evstatus) {
        //var evMatch = false;
        //
        //$(_this.evData).each(function () {
        //if (this.Code.toString() == m.evCode.toString()) {
        //console.log(m.name+' '+m.evCode+' '+this.Status);
        //
        //evMatch = true;
        //};
        //});
        //if (!evMatch) {
        //console('No match!');
        //};
        ////evstatus = '<span class="m32-map__overlay-address--inner"><strong>' + _this + '</strong></span><br/>'
        //}

        $('.m32-map__overlay-address').html('<span class="m32-map__overlay-address--inner"><strong>' + this.labels.loc + '</strong>' + m.address + '</span>' + '<br/>' + pwd + '<span class="m32-map__overlay-address--inner"><strong>' + this.labels.hours + '</strong>' + m.hours + '</span>' + makaninumber + apwd);
        $('.m32-map__rating, .m32-map__rating-stars, .m32-map__rating-reviews').remove();
        $('.m32-map__larger-map').empty();

        var directionsURL = null;
        if (this.searchLocation) {
            directionsURL = 'https://www.google.com/maps/dir/' + this.searchLocation.lat() + ',' + this.searchLocation.lng() + '/' + m.lat + ',' + m.lng + '?z=14';
        } else {
            directionsURL = 'https://maps.google.com?daddr=' + m.lat + ',' + m.lng + '&ll=' + m.lat + ',' + m.lng + '&z=14';
        }
        $('.m32-map__larger-map').append('<span class="m32-map__directions-link"><a target="_blank" href="' + directionsURL + '">' + this.labels.nav + '</a></span>');

        if ($('.m32-map__overlay').css('display') == 'none') {
            $('.m32-map__overlay').css({
                display: 'block'
            });
        }

        $('.m32-map__overlay').fadeIn();
    };

    J100_SERVICES_MAP.prototype.highlightLocation = function(m) {
        try {
            this.centerPoint = m.position;
            this.map.setCenter(this.centerPoint);
            this.map.setZoom(this.defaultZoom);
            this.populateDetails(m);
        } catch (err) {}
    };

    J100_SERVICES_MAP.prototype.getFilterContent = function(n) {
        var items = [],
            category,
            type,
            cpwd = false,
            isEV = false,
            markers = [];

        switch (parseInt(n)) {
            case 1:
                items = this.fastchargingPoints;
                markers = this.fastchargingMarkers;
                category = this.labels.fastchargingPoints;
                type = 'fastchargingPoints';
                isEV = true;
                break;
            case 2:
                items = this.normalchargingPoints;
                markers = this.normalchargingMarkers;
                category = this.labels.normalchargingPoints;
                type = 'normalchargingPoints';
                isEV = true;
                break;
        }
        return { items: items, markers: markers, category: category, cpwd: cpwd, isEV: isEV, type: type };
    };

    J100_SERVICES_MAP.prototype.EVLoadData = function() {
        var _this = this;

        $.ajax({
            url: '/api/EVLocation/GetEVLocations',
            //url: '../../content/data/evstatus.json',
            dataType: 'json',
            error: function(jqXHR, textStatus, errorThrown) {
                console.log(errorThrown);
            },
            success: function(ev) {
                _this.evData = ev;
                _this.EVloaded = true;
                _this.parseData();
                _this.$journey.attr('data-evmapload', 'true');
                //_this.initSearchBox();
            }
        });
    }

    J100_SERVICES_MAP.prototype.populateMap = function() {
        var _this = this;

        // hide all pins
        var list = [],
            markerslist,
            $select2 = _this.$journey.find('.j153-ev-map_search-input');
        for (var n = 0; n < this.markerList.length; n++) {
            list.push(n + 1);
        }
        if (_this.displayFilter.length > 0) {
            _this.hideDetails();
            for (var n = 0; n < _this.markerList.length; n++) {
                try {
                    while (_this.markerList[n].length > 0) {
                        var m = _this.markerList[n].pop();
                        m.setVisible(false);
                    }
                } catch (err) {}
            }
            list = _this.displayFilter;
        }

        // if (_this.EVloaded) {
        //     $('.m32-map').find('.m66-preloader').hide();
        // } else {
        //     $('.m32-map').find('.m66-preloader').show();
        //     if (!_this.EVloading) {
        //         _this.EVloading = true;
        //     }
        // }

        $select2.html('')
        if (utils.isRTL()) {
            $select2.append('<option value="">أدخل العنوان</option>');
        } else {
            $select2.append('<option value="">Input address</option>');   
        }

        // show pins in filter list
        for (var n = 0; n < list.length; n++) {
            // define the list to show
            var filter = _this.getFilterContent(list[n]);
            var markers = filter.markers,
                category = filter.category,
                cpwd = filter.cpwd,
                type = filter.type,
                isEV = filter.isEV,
                items = filter.items;

            //markers = [];

            $(filter.items).each(function () {
                $select2.append('<option value="' + this.hubeleonid + '">' + this.locationName + ' - ' + this.locationAddress + '</option>')  
            });

            if (markers.length < 1) {
                for (var m = 0; m < items.length; m++) {
                    var pinStatus = '';

                    if (isEV) {
                        var evMatch = false;

                        $(_this.evData).each(function() {
                            if (items[m].code != undefined) {
                                if (this.HubeleonId.toString() == items[m].code.toString()) {
                                    evMatch = true;
                                    pinStatus = this.Status;
                                };
                            };

                            if (!evMatch) {
                                //console.log('Code ' + this.Code.toString() + ' has no match!');
                            };
                        });
                        //pinStatus = '<span class="m32-map__overlay-address--inner"><strong>' + _this + '</strong></span><br/>'
                    } else if (items[m].status != undefined) {
                        pinStatus = items[m].status;
                    }

                    var mk = new google.maps.Marker({
                        map: _this.map,
                        category: category,
                        position: { lat: parseFloat(items[m].latitude), lng: parseFloat(items[m].longitude) },
                        lat: parseFloat(items[m].latitude),
                        lng: parseFloat(items[m].longitude),
                        name: items[m].locationName,
                        phone: items[m].phone,
                        pwd: items[m].pwd,
                        apwd: cpwd,
                        code: items[m].hubeleonid,
                        subname: items[m].subname,
                        address: items[m].locationAddress,
                        makani: items[m].makaninumber,
                        hours: items[m].workinghours,
                        image: items[m].fimage,
                        index: m,
                        overlayType: list[n],
                        optimized: false,
                        icon: category == _this.labels.serviceCentres ? items[m].imagelink : items[m].pimage
                    });

                    markers.push(mk);
                    markers[m].addListener('click', function(e) {
                        _this.highlightLocation($(this)[0]);
                    });

                    mk.setVisible(true);
                }
            }
            markerslist = markers;
        }
        $select2.select2();
        $select2.off('change.j153').on('change.j153', function () {
            $(markerslist).each(function() {
                if (this.code == $select2.val()) {
                     _this.highlightLocation($(this)[0]);
                } 
            });
        })
    };

    J100_SERVICES_MAP.prototype.hideDetails = function() {
        $('.m32-map__overlay').fadeOut();
    };

    return J100_SERVICES_MAP;
});

define('../src/journeys/j153-villa-exemption/j153-villa-exemption',['jquery', 'breakpoint', 'lib/utils'], function($, breakpoint, utils) {

    'use strict';

    var J153_VILLA_EXEMPTION = function($journey) {

        this.$journey = $journey;

        return this;
    };


    J153_VILLA_EXEMPTION.prototype.init = function() {
        var _this = this,
            addModalTrigger = this.$journey.find('.add-owner-trigger'),
            addModal = this.$journey.find('.j153-villa-exemption_modal-add'),
            addOwnerForm = this.$journey.find('.form-add-owner'),
            addFormType = addOwnerForm.find('.form-field__add-owner-type .form-field__input--select'),
            addFormSection = addOwnerForm.find('.fieldset'),
            modalButtons = this.$journey.find('.request_links button'),
            modalButtonLink = modalButtons.find('[data-trigger]'),
            tabModal = $('.j153-villa-exemption-tab-modal'),
            tabModalLink = tabModal.find('.m39-modal__tabs li');

        addModalTrigger.on('click', function() {
            addModal.find('.m39-modal__trigger').trigger('click')
        })

        addFormType.on('change', function() {
            var thisVal = $(this).find(":selected").data("val");
            addFormSection.each(function() {
                if ($(this).hasClass(thisVal)) {
                    $(this).removeClass('hidden')
                } else {
                    $(this).addClass('hidden')
                }
            })
        });

        modalButtons.on('click', function() {
            var thisClass = $(this).find('span').attr('class'),
                thisTrigger = thisClass + '__trigger',
                dataTab = $(this).data('tab');

            if (dataTab) {
                var dataTabClass = "tab-" + dataTab,
                    tabList = tabModal.find('.m39-modal__tabs'),
                    tabContent = tabModal.find('.m39-modal__tabs-content');

                tabContent.find('.m39-modal__tabs-content-section').addClass('hidden');
                tabList.find('li').removeClass('active');

                tabList.find(".tab-" + dataTab).addClass('active');
                tabContent.find(".tab-" + dataTab).removeClass('hidden');

            }

            $('.' + thisTrigger).trigger('click')
        })

        tabModalLink.on('click', function() {
            var dataTab = $(this).data('tab'),
                dataTabClass = "tab-" + dataTab,
                tabContent = tabModal.find('.m39-modal__tabs-content');

            tabModalLink.removeClass('active')
            $(this).addClass('active');

            tabContent.find('.m39-modal__tabs-content-section').addClass('hidden');
            tabContent.find(".tab-" + dataTab).removeClass('hidden');
        })

    };



    return J153_VILLA_EXEMPTION;
});

define('../src/journeys/j154-self-energy-assessment/j154-self-energy-assessment',['jquery', 'chart-config', 'lib/utils'], function($, Highcharts, utils) {

    'use strict';

    var j154_sea = function($journey) {

        this.$journey = $journey;

        return this;
    };


    j154_sea.prototype.init = function() {
        var _this = this;

        _this.$journey.find('.j154-sea-donut-progress').each(function() {
            var $progressBar = $(this).find('.progress-bar__progress'),
                rate = parseInt($(this).attr('data-donut-rate')) * .01,
                dashoffset = 100 - (rate * 100);

            $progressBar.css("stroke-dashoffset", dashoffset);
            $(this).find('[data-donut-number]').html($(this).attr('data-donut-rate'))
        });

        _this.$journey.find('[data-chart154-container]').each(function() {
            _this.renderGraph($(this));
        });

        $(window).off('j154_reinit').on('j154_reinit', function() {
            _this.init();
        });
        _this.$journey.find('.j154-sea-assessment--tip_link .show-btn').on('click', function() {
            $(this).closest('.j154-sea-assessment--tip_content').removeClass('hidden-text');
            $(this).closest('.j154-sea-assessment--tip_content').addClass('show-text');
        })
        _this.$journey.find('.j154-sea-assessment--tip_link .hide-btn').on('click', function() {
            $(this).closest('.j154-sea-assessment--tip_content').addClass('hidden-text');
            $(this).closest('.j154-sea-assessment--tip_content').removeClass('show-text');
        });


        setTimeout(function() {
            if (_this.$journey.hasClass('j154-sea--card') && utils.breakpoint() == 'l') {
                _this.scroll(true);
            };
            
        }, 500);

        _this.$journey.find('.j154-sea-assessment--tip_desc').each(function () {
            if ($(this)[0].scrollHeight-1 <= $(this).innerHeight()) {
                $(this).closest('.hidden-text').find('.show-btn').hide();
                $(this).closest('.hidden-text').find('.hide-btn').hide();
            } else {
                $(this).closest('.hidden-text').find('.show-btn').show();
                //$(this).closest('.hidden-text').find('.hide-btn').show();
            };
        });

        $(window).off('resize.j154').on('resize.j154', function() {
            if (_this.$journey.hasClass('j154-sea--card') && utils.breakpoint() == 'l') {
                _this.scroll(true);
            } else {
                _this.scroll(false);
            };

            _this.$journey.find('.j154-sea-assessment--tip_desc').each(function () {
                if ($(this)[0].scrollHeight-1 <= $(this).innerHeight()) {
                    $(this).closest('.hidden-text').find('.show-btn').hide();
                    $(this).closest('.hidden-text').find('.hide-btn').hide();
                } else {
                    $(this).closest('.hidden-text').find('.show-btn').show();
                    //$(this).closest('.hidden-text').find('.hide-btn').show();
                };
            });
        });
    };

    j154_sea.prototype.scroll = function(initScroll) {
        var _this = this,
            lastLocation = 0,
            location = _this.$journey.offset().top;

        if (initScroll) {
            _this.$journey.css('width', _this.$journey.closest('.grid__column').width().toString() + 'px');
            $(window).off('scroll.j154').on('scroll.j154', function() {
                var currentLocation = $(window).scrollTop();

                if (currentLocation - lastLocation > 0 && currentLocation <= location + _this.$journey.closest('.grid__row').height() - 61 - _this.$journey.height()) {
                    if (currentLocation + 61 >= location) {
                        _this.$journey.addClass('fixed');
                        _this.$journey.removeClass('fixed-up');
                        _this.$journey.css('width', _this.$journey.closest('.grid__column').width().toString() + 'px');
                        //console.log('going down fix');
                    } else {
                        _this.$journey.removeClass('fixed');
                        _this.$journey.removeClass('fixed-up');
                        //console.log('going down not fix');
                    };
                } else if (currentLocation <= location + _this.$journey.closest('.grid__row').height() - 141 - _this.$journey.height()) {
                    if (currentLocation + 141 <= location) {
                        _this.$journey.removeClass('fixed');
                        _this.$journey.removeClass('fixed-up');
                        //console.log('going up not fix');
                    } else {
                        //console.log('going up fix');
                        _this.$journey.removeClass('fixed');
                        _this.$journey.addClass('fixed-up');
                        _this.$journey.css('width', _this.$journey.closest('.grid__column').width().toString() + 'px');
                    }
                } else {
                    _this.$journey.removeClass('fixed');
                    _this.$journey.removeClass('fixed-up');
                    //console.log('going down not fix');
                };

                lastLocation = currentLocation
            });
        } else {
            _this.$journey.removeClass('fixed');
            _this.$journey.removeClass('fixed-up');
            $(window).off('scroll.j154');
            _this.$journey.attr('style', '');
        }
    };

    j154_sea.prototype.renderGraph = function($graph) {
        var $container = $graph,
            series = JSON.parse($graph.attr('data-series')),
            isRTL = utils.isRTL();

        for (var i = 0; i < series.length; i++) {
            if (series[i].data.length == 0) {
                series.splice(i, 1);
            };
        };

        for (var i = 0; i < series[0].data.length; i = i + 1) {
            series[0].data[i].y = parseFloat(series[0].data[i].y)
                //console.log(series[0].data[i])
        };

        var opts = {
            chart: {
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false,
                type: 'pie'
            },
            title: {
                text: '',
                style: {
                    display: 'none'
                }
            },

            subtitle: {
                text: '',
                style: {
                    display: 'none'
                }
            },
            legend: {
                style: {
                    display: 'none'
                }
            },
            xAxis: {
                style: {
                    display: 'none'
                }
            },
            yAxis: {
                style: {
                    display: 'none'
                }
            },
            tooltip: {
                enabled: true,
                //positioner: function() {
                //    return { x: 0, y: 0 };
                //},
                outside: true,
                pointFormat: '<span style="font-size: 14px;font-weight:bold;">{point.name}: <b>{point.y} %</b></span>',
                headerFormat: '',
                crosshairs: true,
                useHTML: true
            },
            plotOptions: {
                pie: {
                    allowPointSelect: false,
                    dataLabels: {
                        enabled: false
                    },
                    innerSize: '50%'
                }
            },
            series: series
        };

        $container.highcharts(opts);

        //this.$journey.find('.m29v2-chart__legend--item').each(function() {
        //$(this).find('.m29v2-chart__legend--item-icon').css('color', $(this).data('color'));
        //});
    };

    return j154_sea;
});

define('../src/journeys/j155-evp-space/j155-evp-space',['jquery'], function($) {

    'use strict';

    var j155 = function($journey) {

        this.$journey = $journey;

        return this;
    };


    j155.prototype.init = function() {
        var _this = this;

        _this.$journey.find('.j155-search').off('keyup.j155').on('keyup.j155', function() {
            if ($(this).val().length != 0) {
                console.log($(this).val());
                var input, filter, files, a, i, txtValue, results;

                input = $(this);
                filter = input.val().toUpperCase();
                files = _this.$journey.find('.m60-teaser');
                results = 0;

                // Loop through all list items, and hide those who don't match the search query
                for (i = 0; i < files.length; i++) {
                    a = $(files[i]).find('.teaser__title').text();
                    txtValue = a;
                    if (txtValue.toUpperCase().indexOf(filter) > -1) {
                        $(files[i]).show();

                        results++;
                    } else {
                        $(files[i]).hide();
                    }
                };

                if (results == 0) {
                    _this.$journey.find('.j155-evp-space--noresult').show();
                } else {
                    _this.$journey.find('.j155-evp-space--noresult').hide();
                }
            } else {
                _this.$journey.find('.m60-teaser').each(function(){
                    $(this).show();
                });
            };
        })


    };

    return j155;
});

define('../src/journeys/j157-investor-relations/j157-investor-relations',['jquery', 'slick', 'lib/utils'], function($, slick, utils) {

    'use strict';

    var j157 = function($journey) {

        this.$journey = $journey;

        return this;
    };


    j157.prototype.init = function() {
        var _this = this,
            $modalDisc = _this.$journey.find('.m39-modal--disclaimer [data-trigger="true"]');

        setTimeout(function() {
            $modalDisc.click();

            var gridcheck = $('.grid.j157-investor-relations').find('.grid__column--3').html().replaceAll('\n', '').trim().length,
                $rowRemove = $('.grid.j157-investor-relations').find('.grid__column--3').closest('.grid__row');

            if (gridcheck == 0) {
                $rowRemove.hide();
            }
        }, 500);

        this.steps();
        this.watchHeaderBar();

        $(window).on('resize.j157', function() {
            _this.steps();
        });

        $(window).scroll($.proxy(this.watchHeaderBar, this));

        var $mainSlider = this.$journey.find('.j157-ir-banks-mainslider');

        this.$journey.find('.teaser__viewdetails').each(function(index) {
            var labels = JSON.parse($(this).attr('data-labels')),
                leading = ($(this).attr('data-leading') != undefined && $(this).attr('data-leading') != '') ? '<div class="j157-ir-banks-leading green">' + $(this).attr('data-leading') + '</div>' : '',
                address = ($(this).attr('data-address') != undefined && $(this).attr('data-address') != '') ? '<div class="j157-ir-banks-text" bankaddress>' + $(this).attr('data-address') + '</div>' : '',
                pobox = ($(this).attr('data-pobox') != undefined && $(this).attr('data-pobox') != '') ? '<div class="j157-ir-banks-text"><strong>' + labels.pobox + ':</strong> <span bankpobox>' + $(this).attr('data-pobox') + '</span></div>' : '',
                banktel = ($(this).attr('data-tel') != undefined && $(this).attr('data-tel') != '') ? '<div class="j157-ir-banks-text"><strong>' + labels.tel + ':</strong> <a href="tel:' + $(this).attr('data-tel') + '" class="link" banktel>' + $(this).attr('data-tel') + '</a></div>' : '',
                bankfax = ($(this).attr('data-fax') != undefined && $(this).attr('data-fax') != '') ? '<div class="j157-ir-banks-text"><strong>' + labels.fax + ':</strong> <a href="tel:' + $(this).attr('data-fax') + '" class="link" bankfax>' + $(this).attr('data-fax') + '</a></div>' : '',
                bankmail = ($(this).attr('data-email') != undefined && $(this).attr('data-email') != '') ? '<div class="j157-ir-banks-text"><strong>' + labels.email + ':</strong> <a href="mailto:' + $(this).attr('data-email') + '" class="link" bankemail>' + $(this).attr('data-email') + '</a></div>' : '',
                website = ($(this).attr('data-website') != undefined && $(this).attr('data-website') != '') ? '<div class="j157-ir-banks-text"><strong>' + labels.website + ':</strong> <a bankwebsite class="link" href="' + $(this).attr('data-website') + '">' + $(this).attr('data-website') + '</a></div>' : '',
                slide = '<div class="j157-ir-banks-slide"><div class="j157-ir-banks-slide--inner"><div class="j157-ir-banks-slideimg" style="background-image: url(' + $(this).attr('data-imgurl') + ');"></div><div class="j157-ir-banks-name" bankname>' + $(this).attr('data-name') + '</div>' + leading + address + pobox + banktel + bankfax + bankmail + website + '</div></div>';

            $('.j157-ir-banks-mainslider').append(slide);

            $(this).off('click.j157').on('click.j157', function() {

                _this.$journey.find('.j157-ir-banks-mainslider_wrapper').show();

                if (!$mainSlider.hasClass('slick-initialized')) {
                    $mainSlider.slick({
                        arrows: true,
                        dots: false,
                        infinite: true,
                        speed: 750,
                        slidesToShow: 1,
                        slidesToScroll: 1,
                        lazyLoad: 'ondemand',
                        rtl: ($('html').attr('dir') == 'rtl')
                    });
                };

                $mainSlider.slick('slickGoTo', index);

            });
        });

        this.$journey.find('.j157-ir-banks-mainslider_wrapper').off('click.j157').on('click.j157', function(event) {
            if ($(event.target).closest('.j157-ir-banks-mainslider').length == 0) {
                _this.$journey.find('.j157-ir-banks-mainslider_wrapper').hide();
            }
        });

        $('.m12-bar--investor__toggle').off('click.m12').on('click.m12', function() {
            $(this).toggleClass('active');
            $('.m12-bar--investor__list').toggleClass('active');
        });

        $('.m12-bar--investor__link.scroll_link').off('click.m12').on('click.m12', function() {
            var $target = $($(this).attr('data-target'));

            $('html, body').animate({
                scrollTop: $target.offset().top - 140
            }, 600);
        });
    };

    var lastScrollTop = 0;

    j157.prototype.steps = function() {
        var _this = this;

        if (utils.breakpoint() == 'l') {
            _this.$journey.find('.j157-ir-howto').each(function() {
                var $items = $(this).find('.j157-ir-howto-item'),
                    dir = utils.isRTL() ? 'right' : 'left',
                    space = ($(this).outerWidth(true) - 600 - ($items.length * 2)) / ($items.length - 1);

                $items.each(function(index) {
                    $(this).css(dir, (space * index).toString() + 'px');
                });
            });
        } else {
            _this.$journey.find('.j157-ir-howto').each(function() {
                var $items = $(this).find('.j157-ir-howto-item');

                $items.each(function(index) {
                    $(this).attr('style', '');
                });
            });
        };
    };

    j157.prototype.watchHeaderBar = function() {

            var st = $(window).scrollTop()
            var poss = 0

            var wHeight = $(window).height() + 130,
                docHeight = $(document).height();


            if (Math.abs(lastScrollTop - st) <= poss)
                return;

            if (st > lastScrollTop && st > 94) {
                $('.m12-bar--investor__wrapper').removeClass('fixed-new');
                $('.m12-bar--investor__wrapper').addClass('fixed');
            } else if (st < lastScrollTop) {
                if (st > 94) {
                    $('.m12-bar--investor__wrapper').addClass('fixed-new');
                    $('.m12-bar--investor__wrapper').removeClass('fixed');
                    
                } else {
                    $('.m12-bar--investor__wrapper').removeClass('fixed-new');
                    $('.m12-bar--investor__wrapper').removeClass('fixed');
                }
            };

            if ($('.m12-masthead').length == 0) {
                $('.m12-bar--investor__wrapper').css('top', '0px');
            };

            lastScrollTop = st;
        };

    return j157;
});

define('../src/journeys/j158-search-results/j158-search-results',['jquery'], function($) {

    'use strict';

    var j158 = function($journey) {

        this.$journey = $journey;

        return this;
    };


    j158.prototype.init = function() {
        var _this = this,
            $closeBtn = _this.$journey.find('.feedback-close'),
            $messageBl = _this.$journey.find('.feedback-message'),
            $actionBl = _this.$journey.find('.feedback-action'),
            $formBl = _this.$journey.find('.feedback-form'),
            $messageBtn = _this.$journey.find('.message-button'),
            $formBtn = _this.$journey.find('.form-button'),
            $tabList = _this.$journey.find('.j158-search-results--tab'),
            $tabContent= _this.$journey.find('.j158-search-results--tabcontent'),
            $tabContentSec = _this.$journey.find('.j158-search-results--tabcontent-section'),
            $modalBtn = _this.$journey.find('.feedback-block-button button'),
            $modalFeed = _this.$journey.find('.m39-modal--feedback'),
            $modalFeedTrigger = $modalFeed.find('.m39-modal__trigger'),
            $modalFeedSkip = $modalFeed.find('.form-field__button .skip');
            

        $closeBtn.on('click',function() {
            $(this).closest('.j158-search-results-feedback').addClass('hidden');
        })
        
        $messageBtn.on('click',function() {
            $messageBl.addClass('active');
            $actionBl.addClass('hidden');
        })

        $formBtn.on('click',function() {
            $formBl.addClass('active');
            $actionBl.addClass('hidden');
        })

        $modalBtn.on('click',function(){
            $modalFeedTrigger.trigger('click');
        })
        $modalFeedSkip.on('click',function(){
            $(this).closest('.m39-modal').find('.m39-modal__button--close').trigger('click')
        })

        $tabList.on('click',function(){
                var thisTabId = $(this).attr('id'),
                    thisTabContent = $tabContent.find('.'+thisTabId);
                    $tabList.removeClass('active');
                    $(this).addClass('active');

                    if(!(thisTabId ==='t-all')){
                        $tabContentSec.removeClass('active');
                        thisTabContent.addClass('active');
                    }else{
                        $tabContentSec.addClass('active');
                    }

        })

    };

    return j158;
});

define('../src/journeys/j160-customer-results/j160-customer-results',['jquery'], function($) {

    'use strict';

    var j160_CUSTOMER_RESULTS = function($journey) {

        this.$journey = $journey;

        return this;
    };


    j160_CUSTOMER_RESULTS.prototype.init = function() {
        var _this = this;

    };

    return j160_CUSTOMER_RESULTS;
});

define('../src/journeys/j167-internship/j167-internship',['jquery','parsley','wickedpicker'], function($, parsley, wickedpicker) {

    'use strict';

    var j167_INTERNSHIP = function($journey) {

        this.$journey = $journey;

        return this;
    };

    j167_INTERNSHIP.prototype.init = function() {
        var _this = this,
            infoForm = _this.$journey.find('.form-info'),
            infoFormCheckbox = infoForm.find('.form-field__input--checkbox'),
            conditionalField = infoForm.find('.conditional-fieldset'),
            coFieldCheck = conditionalField.find('.form-field__input--checkbox');

            infoFormCheckbox.bind('click',function() {
                var thisWrapper = $(this).closest('.form-field_checkbox-wrapper'),
                    thisCheckbox = thisWrapper.find('input');
                    thisCheckbox.removeAttr('required')
                    thisCheckbox.each(function(){$(this).parsley().reset()})
                if($(this).prop('checked') === false) {
                    $(this).prop('checked', true);
                }
                thisCheckbox.not(this).prop("checked", false);
            });
            coFieldCheck.each(
                function(){ 
                    if($(this).is(':checked')){
                        var thisSet = $(this).closest('.conditional-fieldset');
                        _this.comment($(this),thisSet)
                    }
                }
            )
            coFieldCheck.bind('click',function(){
                var thisSet = $(this).closest('.conditional-fieldset')
                _this.comment($(this),thisSet)
            })

            $('#form-field-group1_question6To').on('click', function() {
                var selectedStart = $('.to-time').val();
                var selectedEnd = $('.to-time').val();
                
                if (selectedEnd < selectedStart) {
                  $('#error-message').text('End time cannot be before start time').show();
                } else {
                  $('#error-message').hide();
                }
            });

    };
    j167_INTERNSHIP.prototype.comment = function(check,set){
        var commentBox = check.attr('data-comment'),
            thisComentBox;
            set.find('.form-field--textarea').hide()
        if (commentBox){
            thisComentBox = set.find('.'+commentBox);
            thisComentBox.show()
            thisComentBox.find('textarea').attr('required',true)    
        }else{
            set.find('.form-field--textarea textarea').removeAttr('required')
        }
        set.find('.form-field--textarea').each(
                function(){
                    var thisArea = $(this).find('textarea');
                    thisArea.parsley().reset()
                    thisArea.removeClass('form-field__input--error')
                    thisArea.parent().removeClass('form-field__input-wrapper--validated')
                    thisArea.parent().removeClass('form-field__input-wrapper--error')
                }
            )
    }

    return  j167_INTERNSHIP;
});

define('../src/journeys/j169-customer-support/j169-customer-support',['jquery'], function($) {

    'use strict';

    var J169 = function($journey) {

        this.$journey = $journey;

        return this;
    };

    J169.prototype.init = function() {
        var _this = this;

        this.$journey.find('.j169-cs--sectiontrack-toggle').each(function(){
            $(this).off('click.track').on('click.track', function () {
                var $parent = $(this).closest('.j169-cs--sectiontrack'),
                    $all = _this.$journey.find('.j169-cs--sectiontrack');

                if ($parent.hasClass('closed')) {
                    $all.addClass('closed');
                    $parent.removeClass('closed');
                } else {
                    $parent.addClass('closed');
                };
            });
        });
    };


    // J169.prototype.init = function() {
    //     var _this = this,
    //         data = this.$journey.attr('data-chain'),
    //         activedata = this.$journey.attr('data-activechain');

    //     this.state = ['default'];

    //     if (this.checkJSON(data)) {
    //         this.buildform(JSON.parse(data).default);
    //         if (this.checkJSON(activedata)) {
    //             $(JSON.parse(activedata)).each(function(){
    //                 $('#' + this).click();
    //             });
    //         };
    //     };
    // };

    // J169.prototype.checkJSON = function(str) {
    //     try {
    //         JSON.parse(str);
    //     } catch (e) {
    //         return false;
    //     }
    //     return true;
    // };

    // J169.prototype.buildform = function(data) {
    //     var _this = this,
    //         $container = this.$journey.find('.j169-cs--container'),
    //         tag = data.tag,
    //         head = '<div class="j169-cs--section">',
    //         end = '</div></fieldset></div></div></div>',
    //         label = '<div class="j169-cs--sectionlabel">' + data.label + '</div>',
    //         setType = data.type == 'buttonradio' ? 'form-field--buttonradio2' : 'form-field--iconradio2',
    //         radioType = data.type == 'buttonradio' ? 'form-field__fakeradio' : 'form-field__fakeiconradio',
    //         choices = ''

    //     $(data.choices).each(function(index) {
    //         var icon = data.type == 'iconradio' && this.icon != undefined && this.icon != '' ? '<img src="' + this.icon + '">' : '',
    //             link = '',
    //             formid = '',
    //             dropdown = '',
    //             links = '',
    //             child = '';

    //         if (this.choicetype == 'link') {
    //             link = 'data-hreflink="' + this.link + '"';
    //         } else if (this.choicetype == 'form') {
    //             formid = 'formid="' + this.formID + '"';
    //         } else if (this.choicetype == 'radio') {
    //             child = 'data-children=\'' + JSON.stringify(this.child) + '\'';
    //         };

    //         if (this.hasdropdown) {
    //             dropdown = 'data-dropdown=\'' + JSON.stringify(this.dropdown) + '\'';
    //         }

    //         if (this.haslinks) {
    //             links = 'data-links=\'' + JSON.stringify(this.links) + '\'';
    //         }

    //         choices = choices + '<p class="form-field__radio"><label><input class="form-field__input form-field__input--radio" dynamic-form-elements id="' + tag + index.toString() + '" name="' + tag + '" type="radio" value="' + this.value + '" aria-describedby="description-for-' + tag + '" data-parsley-errors-container="#description-for-' + tag + '" data-parsley-multiple="' + tag + '" action-type="' + this.choicetype + '" ' + child + ' ' + link + ' ' + formid + ' ' + dropdown + ' ' + links + '><span class="' + radioType + ' focus-enabled">' + icon + this.choicelabel + '</span></label></p>'
    //     });

    //     $container.append(head + label + '<div class="j169-cs--sectioncontent"><div class="form-field ' + setType + '"><fieldset class="fieldset"><legend class="form-field__label"><span class="aria-only">' + data.label + '</span></legend>' + choices + '<div id="description-for-' + tag + '" class="form-field__messages clear_both">' + end);

    //     this.formListeners();

    // };

    // J169.prototype.buildDDform = function(data) {
    //     var _this = this,
    //         $container = this.$journey.find('.j169-cs--container'),
    //         head = '<div class="j169-cs--section">',
    //         label = '<div class="j169-cs--sectionlabel">' + data.ddlabel + '</div>',
    //         options = '',
    //         end = 'class="form-field__messages"></div></div></div></div>';

    //     $(data.ddoptions).each(function() {
    //         options = options + '<option value="' + this.optionvalue + '">' + this.optionlabel + '</option>'
    //     });

    //     $container.append(head + label + '<div class="j169-cs--sectioncontent"><div class="form-field form-field--select form-field--select--big"><label for="' + data.tag + '" class="form-field__label"><span class="aria-only">' + data.ddlabel + '</span></label><span class="form-field__input-wrapper form-field__input-wrapper--select"><select class="form-field__input form-field__input--select form-field__input--select-full" id="' + data.tag + '" name="' + data.tag + '" aria-describedby="description-for-' + data.tag + '" data-parsley-errors-container="#description-for-' + data.tag + '">' + options + '</select></span><div id="description-for-' + data.tag + '" ' + end);
    // };

    // J169.prototype.buildLinks = function(data) {
    //     var _this = this,
    //         $container = this.$journey.find('.j169-cs--container'),
    //         head = '<div class="j169-cs--section j169-cs--section_links"><div class="j169-cs--sectioncontent">',
    //         links = '',
    //         end = '</div></div>';

    //     $(data).each(function() {
    //         links = links + '<a href="' + this.linkhref + '" class="j169-cs--section_link link">' + this.linklabel + '<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.63636 3.5C9.63636 3.22386 9.41251 3 9.13636 3H2.5C1.67157 3 1 3.67157 1 4.5V14.5C1 15.3284 1.67157 16 2.5 16H12.5C13.3284 16 14 15.3284 14 14.5V7.86364C14 7.58749 13.7761 7.36364 13.5 7.36364C13.2239 7.36364 13 7.58749 13 7.86364V14.5C13 14.7761 12.7761 15 12.5 15H2.5C2.22386 15 2 14.7761 2 14.5V4.5C2 4.22386 2.22386 4 2.5 4H9.13636C9.41251 4 9.63636 3.77614 9.63636 3.5Z" fill="#007560" stroke="#007560" stroke-width="0.5" stroke-linecap="round"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M16.5 1C16.5 0.723858 16.2761 0.5 16 0.5H11C10.7239 0.5 10.5 0.723858 10.5 1C10.5 1.27614 10.7239 1.5 11 1.5H14.7929L6.64645 9.64645C6.45118 9.84171 6.45118 10.1583 6.64645 10.3536C6.84171 10.5488 7.15829 10.5488 7.35355 10.3536L15.5 2.20711V6C15.5 6.27614 15.7239 6.5 16 6.5C16.2761 6.5 16.5 6.27614 16.5 6V1Z" fill="#007560" stroke="#007560" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></a>';
    //     });

    //     $container.append(head + links + end);
    // };

    // J169.prototype.formListeners = function() {
    //     var _this = this,
    //         $buttons = this.$journey.find('[dynamic-form-elements]'),
    //         top = 0;

    //     $buttons.off('click.j169').on('click.j169', function() {
    //         var type = $(this).attr('action-type'),
    //             $parent = $(this).closest('.j169-cs--section');

    //         if (type == 'radio' && !$(this).hasClass('active')) {
    //             if (_this.checkJSON($(this).attr('data-children'))) {
    //                 var $del = $(this).closest('.j169-cs--section').nextAll('.j169-cs--section');

    //                 $del.each(function() {
    //                     $(this).remove();
    //                 });

    //                 _this.buildform(JSON.parse($(this).attr('data-children')));
    //             }

    //             if (_this.checkJSON($(this).attr('data-dropdown'))) {
    //                 _this.buildDDform(JSON.parse($(this).attr('data-dropdown')))
    //             }

    //             if (_this.checkJSON($(this).attr('data-links'))) {
    //                 _this.buildLinks(JSON.parse($(this).attr('data-links')))
    //             }
    //         } else if (type == 'link' && !$(this).hasClass('active')) {
    //             window.location.href = $(this).attr('data-hreflink');
    //             var $del = $(this).closest('.j169-cs--section').nextAll('.j169-cs--section');

    //             $del.each(function() {
    //                 $(this).remove();
    //             });
    //         } else if (type == 'form' && !$(this).hasClass('active')) {
    //             var $del = $(this).closest('.j169-cs--section').nextAll('.j169-cs--section');

    //             $del.each(function() {
    //                 $(this).remove();
    //             });
    //             if (_this.checkJSON($(this).attr('data-dropdown'))) {
    //                 _this.buildDDform(JSON.parse($(this).attr('data-dropdown')))
    //             }
    //             if (_this.checkJSON($(this).attr('data-links'))) {
    //                 _this.buildLinks(JSON.parse($(this).attr('data-links')))
    //             }
    //         };

    //         $(this).closest('.form-field').find('[dynamic-form-elements]').each(function() {
    //             $(this).removeClass('active');
    //         });
    //         $(this).addClass('active');

    //         var height = [];

    //         _this.$journey.find('.j169-cs--container').find('.j169-cs--section:last-child').find('[dynamic-form-elements]').each(function () {
    //             height.push($(this).closest('.form-field__radio').find('.form-field__fakeiconradio').height());
    //         });

    //         _this.$journey.find('.j169-cs--container').find('.j169-cs--section:last-child').find('[dynamic-form-elements]').each(function () {
    //             $(this).closest('.form-field__radio').find('.form-field__fakeiconradio').css('height', Math.max(...height));
    //         });

    //         top = _this.$journey.find('.j169-cs--container').find('.j169-cs--section:last-child').offset().top;
    //         $('html, body').animate({
    //             scrollTop: top - 140
    //         }, 1000);

    //         $parent.addClass('blur');
    //     });
    // };

    return J169;
});

define('../src/journeys/j170-joint-owner-request/j170-joint-owner-request',['jquery', 'parsley'], function ($) {

    'use strict';

    var J170 = function ($journey) {

        this.$journey = $journey;

        return this;
    };


    J170.prototype.init = function () {
        var _this = this,
            data = this.$journey.attr('data-chain'),
            activedata = this.$journey.attr('data-activechain'),
            ownerListData = $(".owner-fieldset").data('owner'),
            premiseListData = $(".form-field-multiform").data('list');

        this.state = ['default'];

        $('.form-field-multiform .form-field__input--radio[name="premise_option"]').change(function () {
            if (!$(this).hasClass('fieldset_lessthan_select')) {
                $('.form-field-multiform .fieldset_morethan').show();
                $('.form-field-multiform .fieldset_lessthan').hide();
                $('.form-field-multiform .premiseList').empty()
            }
            else {
                $('.form-field-multiform .fieldset_morethan').hide();
                $('.form-field-multiform .fieldset_lessthan').show();
                $('.form-field-multiform .button--upload_remove').trigger('click');
            }
        });

        if(premiseListData.length > 0){
            var premiseList = this.$journey.find('.premiseList'),
                removeTxt = premiseList.data('remove-label'),
                premiseListInput = premiseList.closest('.form-field').find('.form-field__input--text');
                premiseListInput.removeAttr('required');
            $(".form-field-multiform").find('.form-field__input--radio.fieldset_lessthan_select').prop("checked", true)
            $(".form-field-multiform").find('.form-field__input--radio').trigger('change')
            $.each(premiseListData, function (index, value) {
                var insert = '<li class="pre-list-item">' + value + ' <span class="icon-item-remove">'+removeTxt+'</span></li>'
                premiseList.append(insert)
            })
        }

        if (ownerListData.length > 0) {
            $.each(ownerListData, function (index, value) {
                var itemNum = index;
                if (index > 1) {
                    _this.addMore()
                }
                $.each(value, function (key, value) {
                    if (key == "Type") {
                        var inputField = $('.form-field__input[name="Ownerlist[' + itemNum + '].' + key + '"]'),
                            wrapperSection = inputField.closest('.owner-content_section'),
                            selectOption = inputField.find('option[value=' + value + ']'),
                            sectionClass = selectOption.data('val');
                        selectOption.prop("selected", true);
                        wrapperSection.find('.detailsection').hide();
                        wrapperSection.find('.' + sectionClass + '').show();
                    } else {
                        var inputField = $('.form-field__input[name="Ownerlist[' + itemNum + '].' + key + '"]');
                        inputField.val(value);
                    }
                });
                $('.owner-content_section').eq(index).find('.numOwner').html(itemNum + 1)
            });
        }

        $(".owner-fieldset_content").on('change', ".identificationselection", function () {
            var selectedOption = $(this).children("option:selected").data('val'),
                wrapDiv = $(this).closest('.owner-content_section');
            _this.idChange(wrapDiv, selectedOption)
        });

        $(".owner-fieldset_content").on('click', ".remove-section", function () {
            $(this).closest('.owner-content_section').remove()
            var ownerNum = $('.owner-fieldset_content').find('.numOwner'),
                allSection = $('.owner-fieldset_content').find('.owner-content_section');

            ownerNum.each(function (index) {
                $(this).text(index + 1);
            });
            if (allSection.length > 3) {
                allSection.each(function (index) {
                    if (index > 1) {
                        var thisInput = $(this).find(".form-field__input[name^='Ownerlist']"),
                            itemNum = index;
                        thisInput.each(function () {
                            var setName = $(this).attr('name').replace(/\d+/, itemNum);
                            $(this).attr('name', setName);
                        })
                    }
                })
            }
        });

        $('.addmorelink').on('click', function () {
            _this.addMore();
            $(window).trigger('form_reinit');
        });

        $('.wrapper-add_link').on('click', function () {
            var premisefield = $(this).closest('.form-field'),
                premiseList = premisefield.find('.premiseList'),
                removeTxt = premiseList.data('remove-label'),
                premiseInput = premisefield.find('.form-field__input--text'),
                premiseInputWrapper = premiseInput.closest('.form-field__input-wrapper'),
                maxNum = $(this).data('max'),
                maxNumTex = $(this).data('max-message'),
                listNum = premiseList.find('.pre-list-item').length;
                if(premiseInput.val()){
                    if(listNum < maxNum){
                        premiseInput.parsley().validate()
                        if (premiseInput.parsley().isValid()){
                                var insert = '<li class="pre-list-item">' + premiseInput.val() + ' <span class="icon-item-remove">'+removeTxt+'</span></li>'
                                premiseList.append(insert)
                                _this.customReset(premiseInput)
                                premiseInput.removeAttr('required')
                        }
                    }else{
                        if(premiseList.find('.premise-list-error').length < 1){
                            var insertError = '<li class="red premise-list-error">' + maxNumTex + '</li>';
                            premiseList.prepend(insertError)
                        }
                        if(premiseInputWrapper.hasClass('form-field__input-wrapper--validated')){
                            premiseInputWrapper.removeClass('form-field__input-wrapper--validated')
                            premiseInputWrapper.addClass('form-field__input-wrapper--error')
                        }
                    }
                }
        })
        $('.premiseList').on('click', '.icon-item-remove', function () {
            $(this).closest('.premiseList').find('.premise-list-error').remove()
            var listLegth = $(this).closest('.premiseList').find('.pre-list-item').length,
                thisInput = $(this).closest('.form-field-multiform').find('.form-field__input--text');
            if (listLegth == 1) {
                thisInput.prop('required', true)
                thisInput.attr("required", true);
            } 
            $(this).closest('li').remove()
        })


        $('.form-field__input--upload-owner-list').on('change', function () {
            var wrapperDiv = $(this).closest('.form-field-multiform'),
                inputWrapper = wrapperDiv.find('.form-field__input-wrapper-add'),
                ownerList = wrapperDiv.find('.premiseList');
            if (this.files && this.files[0]) {
                inputWrapper.addClass('form-field__input-wrapper-add-disabled');
                ownerList.empty()
            }
        })

        $('.form-field-multiform').on('click', '.button--upload_remove', function () {
            var wrapperDiv = $(this).closest('.form-field-multiform'),
                uploadInput = wrapperDiv.find('.form-field__input--upload-owner-list'),
                inputWrapper = wrapperDiv.find('.form-field__input-wrapper-add');
            if (!(uploadInput.prop('files') && uploadInput.prop('files')[0])) {
                inputWrapper.removeClass('form-field__input-wrapper-add-disabled');
            }
        })

        
    };


    J170.prototype.idChange = function (wrapDiv, className) {
        wrapDiv.find('.detailsection').hide();
        wrapDiv.find('.' + className).show();
    };

    J170.prototype.customReset = function (inputElement) {
        if (!inputElement.is("select")) {
            inputElement.val("")
        }
        inputElement.parsley().reset();
        inputElement.removeClass('parsley-success')
        inputElement.parent().removeClass('form-field__input-wrapper--error')
        inputElement.parent().removeClass('form-field__input-wrapper--validated')
        inputElement.removeClass('form-field__input--error')
        inputElement.removeClass('parsley-error')
        inputElement.removeAttr('aria-invalid')
    }

    J170.prototype.addMore = function () {
        var cloneDiv = $('.owner-content_section-template').clone(),
            ownerNum = $('.owner-fieldset_content').find('.owner-content_section').length,
            maxNum = $('.owner-fieldset_content').data('max');

        if (ownerNum - 1 < maxNum) {
            $('.owner-content_section-template').before(cloneDiv);
            cloneDiv.show();
            cloneDiv.removeClass('owner-content_section-template');
            cloneDiv.find('.numOwner').html(ownerNum);
            cloneDiv.find(".form-field__input[name^='Ownerlist']").each(function () {
                var setName = $(this).attr('name').replace('#', ownerNum - 1);
                $(this).attr('name', setName);
            })
            cloneDiv.find('.form-field').each(function() {
                var thisSelect = $(this).find('select'),
                    thisMessage = $(this).find('.form-field__messages'),
                    thisInputText = $(this).find('.form-field__input--text'),
                    thisUpload = $(this).find('.form-field__input--upload');

                if(thisSelect){
                    var selectErrorConId = $(this).find('select').data('parsley-errors-container');
                    $(this).find('select').attr('data-parsley-errors-container',selectErrorConId + ownerNum)
                }
                if(thisMessage){
                    var messageId = $(this).find('.form-field__messages').attr('id')
                    $(this).find('.form-field__messages').attr('id',messageId + ownerNum)
                }
                if(thisInputText){
                    var selectErrorConId = $(this).find('.form-field__input--text').data('parsley-errors-container');
                    $(this).find('.form-field__input--text').attr('data-parsley-errors-container',selectErrorConId + ownerNum)
                }

                if(thisUpload){
                    var selectErrorConId = $(this).find('.form-field__input--upload').data('parsley-errors-container');
                    $(this).find('.form-field__input--upload').attr('data-parsley-errors-container',selectErrorConId + ownerNum)
                }
            });
            $(window).trigger('form_reinit');
        }
    }

    return J170;
});
define('../src/journeys/j171-masar/j171-masar',['jquery', 'parsley'], function ($) {

    'use strict';

    var J171 = function ($journey) {

        this.$journey = $journey;

        return this;
    };


    J171.prototype.init = function () {
        var _this = this;
        window.Parsley.on('field:reset', function() {
            var formFieldErrorClassname = 'form-field__input--error',
                    formFieldWrapperClass = '.form-field__input-wrapper',
                    formFieldWrapperErrorClassname = 'form-field__input-wrapper--error',
                    formFieldWrapperSuccessClassname = 'form-field__input-wrapper--validated';

            this.$element.attr('aria-invalid', false);
            this.$element.removeClass(formFieldErrorClassname);
            this.$element.parents(formFieldWrapperClass).removeClass(formFieldWrapperErrorClassname);
            this.$element.parents(formFieldWrapperClass).removeClass(formFieldWrapperSuccessClassname);

        });
    };

    return J171;
});
define('../src/journeys/j174-dewa-store/j174-dewa-store',['jquery', 'slick', 'lib/utils'], function($, utils) {

    'use strict';

    var J174 = function($journey) {

        this.$journey = $journey;

        return this;
    };


    J174.prototype.init = function() {
        var _this = this;

        this.carousel();
        this.filters();
        this.brandFilter();
        this.emptyList();
        this.tabs();
        this.redeemCode();
    };

    J174.prototype.brandFilter = function() {
        var _this = this,
            $parent = this.$journey.find('.j174-dewa-store--filters_brand'),
            $container = this.$journey.find('.j174-dewa-store--filters_brand .fieldset'),
            $cboxs = $container.find('.form-field__checkbox'),
            $finput = this.$journey.find('.j174-dewa-store--filters_search'),
            $vbutton = this.$journey.find('.j174-dewa-store--filters_brand .j174-dewa-store--filters_view'),
            vmore = $vbutton.attr('data-vmore'),
            vless = $vbutton.attr('data-vless'),
            $noresults = $parent.find('.j174-dewa-store--filters_brand-nr');

        if ($cboxs.length < 10) {
            $finput.closest('.form-field').hide();
            $vbutton.hide();
            $container.attr('style', '');
            $parent.removeClass('j174-dewa-store--filters_brand')
        } else {
            $finput.closest('.form-field').show();
            $vbutton.show();
            $container.css('max-height', $container.outerHeight(true));
            $parent.addClass('j174-dewa-store--filters_brand')
        };

        $vbutton.find('a.link').off('click.fsearch').on('click.fsearch', function(event) {
            event.preventDefault();
            $parent.toggleClass('showall');

            if ($parent.hasClass('showall')) {
                $(this).text(vless);
            } else {
                $(this).text(vmore);
            }
        });

        $cboxs.off('click.fsearch').on('click.fsearch', function() {
            $('html, body').animate({
                    scrollTop: 0
                }, 400);
        });

        $finput.off('keyup.fsearch').on('keyup.fsearch', function() {
            var q = $(this).val().toLowerCase().trim(),
                results = 0;

            $cboxs.each(function() {
                if ($(this).find('.form-field__input--checkbox:checked').length != 1) {
                    if ($(this).text().toLowerCase().trim().indexOf(q) != -1) {
                        $(this).show();
                        results++;
                    } else {
                        $(this).hide();
                    }
                } else {
                    results++;
                }
            });

            if (results != 0) {
                $noresults.hide();
                if (results < 10) {
                    $vbutton.hide();
                } else {
                    $vbutton.show();
                }
            } else {
                $noresults.show();
            }
        });
    };

    J174.prototype.filters = function() {
        var _this = this;

        this.$journey.find('.j174-dewa-store--alloffers_filters').each(function() {
            var checked = 0,
                $parent = $(this),
                $input = $parent.find('.form-field__input--checkbox'),
                $clearall = $parent.find('.j174-dewa-store--filters_clearall');

            $input.each(function() {
                var $group = $(this).closest('.j174-dewa-store--filters_group'),
                    $counter = $group.find('.j174-dewa-store--filters_groupcount');

                if ($group.find('.form-field__input--checkbox:checked').length != 0) {
                    $counter.text($group.find('.form-field__input--checkbox:checked').length);
                    $counter.css('opacity', '1');
                } else {
                    $counter.css('opacity', '0');
                    $counter.text('0');
                };

                if ($parent.find('.form-field__input--checkbox:checked').length != 0) {
                    $clearall.show();
                } else {
                    $clearall.hide();
                };
            });

            $input.off('click.174').on('click.174', function() {
                var $group = $(this).closest('.j174-dewa-store--filters_group'),
                    $counter = $group.find('.j174-dewa-store--filters_groupcount');

                if ($group.find('.form-field__input--checkbox:checked').length != 0) {
                    $counter.text($group.find('.form-field__input--checkbox:checked').length);
                    $counter.css('opacity', '1');
                } else {
                    $counter.css('opacity', '0');
                    $counter.text('0');
                };

                if ($parent.find('.form-field__input--checkbox:checked').length != 0) {
                    $clearall.show();
                } else {
                    $clearall.hide();
                };
            });

            $clearall.off('click.174').on('click.174', function(event) {
                event.preventDefault();

                $input.prop('checked', false);
                $parent.find('.j174-dewa-store--filters_groupcount').css('opacity', '0');
                $clearall.hide();
            });

        });

        this.$journey.find('[data-filter-trigger]').off('click.filter').on('click.filter', function() {
            _this.$journey.find('.j174-dewa-store--alloffers_filters').addClass('opened');
            $('body').addClass('unscrollable');
        });

        this.$journey.find('.j174-dewa-store--filters_closebtn').off('click.filter').on('click.filter', function() {
            $(this).closest('.j174-dewa-store--alloffers_filters').removeClass('opened');
            $('body').removeClass('unscrollable');
        });
    }

    J174.prototype.redeemCode = function() {
        this.$journey.find('.j174-dewa-store--redeemcode').off('click.m35').on('click.m35', function(event) {
            var $temp = $("<div class='aria-only'>");

            event.preventDefault();

            $(this).prepend($temp);

            $temp.attr("contenteditable", true)
                .html($(this).attr('data-redeem-code'))
                .on("focus", function() { document.execCommand('selectAll', false, null); })
                .focus();

            document.execCommand("copy");

            $temp.remove();

            $(this).text($(this).attr('data-redeemed-text'));
        });
    }

    J174.prototype.tabs = function() {
        this.$journey.find('.j174-dewa-store--tab').each(function() {
            var $parent = $(this),
                $links = $parent.find('.j174-dewa-store--tablink'),
                $tabs = $parent.find('.j174-dewa-store--tabcontent_item');

            $links.each(function() {
                $(this).off('click.j174').on('click.j174', function(event) {
                    var id = $(this).attr('data-tab-index');

                    event.preventDefault();
                    $links.removeClass('active');
                    $tabs.removeClass('active');

                    $(this).addClass('active');
                    $parent.find('.j174-dewa-store--tabcontent_item[data-tab-index="' + id + '"]').addClass('active');
                });
            });
        });
    };

    J174.prototype.emptyList = function() {
        var _this = this;

        this.$journey.find('.j174-dewa-store--centered').css('min-height', ($(window).outerHeight(true) - $('.m12-masthead').outerHeight(true) - $('.m13-footer').outerHeight(true)).toString() + 'px');

        $(window).off('resize.dstorecenter').on('resize.dstorecenter', function() {
            _this.$journey.find('.j174-dewa-store--centered').css('min-height', ($(window).outerHeight(true) - $('.m12-masthead').outerHeight(true) - $('.m13-footer').outerHeight(true)).toString() + 'px');
        });
    };

    J174.prototype.carousel = function() {
        var _this = this,
            slides = 4,
            ismob = false;

        if ($(window).outerWidth() <= 1024) {
            slides = 1;
            ismob = true;
        }

        this.$journey.find('.j174-dewa-store--carousel').not('.j174-dewa-store--moredeals_banner .j174-dewa-store--carousel').each(function() {
            var $slider = $(this),
                $parent = $slider.closest('.j174-dewa-store--carousel_outer'),
                $slides = $slider.find('.j174-dewa-store--carousel_slide'),
                $prev = $parent.find('.j174-dewa-store--carouseltfs--prev'),
                $next = $parent.find('.j174-dewa-store--carouseltfs--next');

            if ($slides.length > slides) {
                $slider.slick({
                    arrows: !ismob,
                    dots: ismob,
                    infinite: false,
                    speed: 750,
                    slidesToShow: slides,
                    slidesToScroll: 1,
                    autoplay: false,
                    lazyLoad: 'ondemand',
                    nextArrow: $next,
                    prevArrow: $prev,
                    rtl: ($('html').attr('dir') == 'rtl')
                });

                if (!ismob) {
                    $parent.find('.j174-dewa-store--carousel_nav').css('display', 'flex');
                }
            };
        });

        this.$journey.find('.j174-dewa-store--offerdeet_media').each(function() {
            var $thumbslider = $(this).find('.j174-dewa-store--offerdeet_carouselthumb'),
                $thumbslides = $thumbslider.find('.j174-dewa-store--offerdeet_carouselslide'),
                carouselID = $thumbslider.attr('data-carousel-id'),
                $mainslider = $(this).find('.j174-dewa-store--offerdeet_carouselmain[data-carousel-id="' + carouselID + '"]'),
                $mainslides = $mainslider.find('.j174-dewa-store--offerdeet_carouselslide');

            $mainslider.slick({
                arrows: false,
                dots: ismob,
                infinite: !ismob,
                speed: 750,
                slidesToShow: 1,
                swipe: ismob,
                slidesToScroll: 1,
                fade: !ismob,
                adaptiveHeight: !ismob,
                autoplay: ismob,
                lazyLoad: 'ondemand',
                rtl: ($('html').attr('dir') == 'rtl')
            });

            $thumbslider.find('.j174-dewa-store--offerdeet_carouselslide').each(function(index) {
                $(this).off('click.j174').on('click.j174', function() {
                    $thumbslides.removeClass('active');
                    $(this).addClass('active');
                    $mainslider.slick('slickGoTo', index);
                });
            });
        });
    };

    return J174;
});
define('../src/journeys/j34-tariff-calculator/j34-tariff-calculator',['jquery'], function ($) {

	'use strict';

	var TariffCalculator = function ($journey) {

		this.$journey = $journey;

		return this;
	};

	TariffCalculator.prototype.init = function () {

		var self = this;

		this.$resultsContainer = this.$journey.find('[data-results-container]');
		this.$formContainer = this.$journey.find('[data-form-container]');
		this.$form = this.$journey.find('[data-form]');
		this.$typeSelect = this.$form.find('[data-type]');
		this.$electricityInput = this.$form.find('[data-electricity]');
		this.$waterInput = this.$form.find('[data-water]');
		this.$recalculateButton = this.$journey.find('[data-recalculate-button]');

		this.electricityResults = this.$resultsContainer.find('#electricity, #surcharge tbody > tr:nth-child(1), #summary tbody > tr:nth-child(1)');
		this.waterResults = this.$resultsContainer.find('#water, #surcharge tbody > tr:nth-child(2), #summary tbody > tr:nth-child(2)');

		this.$form.on('submit', $.proxy(this.calculate, this));
		this.$recalculateButton.on('click', $.proxy(this.recalculate, this));
		this.$recalculateButton.removeAttr('style ');

		// selective requirement for electricy or water input
		if (this.$electricityInput.val() !== '') { this.$waterInput.removeAttr('required'); }
		if (this.$waterInput.val() !== '') { this.$electricityInput.removeAttr('required'); }

		this.$electricityInput.on('blur change', function () {
			if ($(this).val() !== '') {
				self.$waterInput.removeAttr('required');
			} else {
				self.$waterInput.attr('required', true);
			}
		});

		this.$waterInput.on('blur change', function () {
			if ($(this).val() !== '') {
				self.$electricityInput.removeAttr('required');
			} else {
				self.$electricityInput.attr('required', true);
			}
		});
	};

	TariffCalculator.prototype.recalculate = function (e) {

		e.preventDefault();
		this.$form[0].reset();
		$('html, body').scrollTop(0);
		this.$resultsContainer.hide();
		this.$formContainer.show();
		this.$form.find('span').removeClass('form-field__input-wrapper--validated');

		// reset form validation
		this.$electricityInput.attr('required', true);
		this.$waterInput.attr('required', true);

		// reset results view
		this.electricityResults.show();
		this.waterResults.show();

		this.$journey.find('[data-component="m23-table"]').each(function () {
			$(this).trigger('j34Done');
		});
	};
	/**
	 *
	 */

	TariffCalculator.prototype.calculate = function (e) {

		e.preventDefault();

		var elec = this.$electricityInput.val(),
			water = this.$waterInput.val(),
			isResedential = this.$typeSelect.val() === 'residential',
			isCommercial = this.$typeSelect.val() === 'commercial',
            isD33 = this.$typeSelect.val() === 'd33',
			data = this.$journey.data();

		// hide content specific to utilities if consumption not defined
		if (!elec) {
			// this.electricityResults.hide();
			elec = 0;
		}

		if (!water) {
			// this.waterResults.hide();
			water = 0;
		}

		this.$resultsContainer.show();
		this.$formContainer.hide();

		// pulled out constants from data attrs
		var elec2k = data.elec2k,
			elec4k = data.elec4k,
			elec6k = data.elec6k,
			elec6kp = data.elec6kp,
			elec10k = data.elec10k,
			elec10kp = data.elec10kp,
            elec10kd33 = data.elec10kd33,
            elec10kpd33 = data.elec10kpd33,
			water6k = data.water6k,
			water12k = data.water12k,
			water12kp = data.water12kp,
			nelec2k = data.nelec2k,
			nelec4k = data.nelec4k,
			nelec6k = data.nelec6k,
			nelec6kp = data.nelec6kp,
			nwater10k = data.nwater10k,
			nwater10kp = data.nwater10kp,
			fsWatervalue = data.fswatervalue,
			fsElecvalue = data.fselecvalue,
			resedentialData = data.resedential,
			commercialData = data.commercial,
			industrialData = data.industrial,
            d33Data = data.d33,
			vatpercentage = data.vat;

		// *********************************
		// DEWA JAVASCRIPT BELOW THIS COMMENT
		// **********************************
		// DEWA Javascript code (with some minor tweaks) lifted from source of initial website - www.dewa.gov.ae/tariff/newtariff.aspx

		var fsElecTotal, fsWaterTotal, fsTotal;

		function Tariff_Cal() {

			var subgrelec = 0,
				subyelelec = 0,
				suborelec = 0,
				subredelec = 0,
				subgrwater = 0,
				subyelwater = 0,
				suborwater = 0,
				totalwateramt = 0,
				totalelecamt = 0,
				totalvatamt = 0,
				totalbill = 0,
				totalbillinclvat = 0;

			//fuel surcharge labels
			document.getElementById("ctl00_ContentPlaceHolder1_lblfsElecvalue").innerHTML = (eval(fsElecvalue) * 100).toFixed(1);
			document.getElementById("ctl00_ContentPlaceHolder1_lblfsWatervalue").innerHTML = (eval(fsWatervalue) * 100).toFixed(1);

			water = parseFloat(water);
			elec = parseFloat(elec);

			//Calculate fuel surcharge
			fsElecTotal = (eval(fsElecvalue) * elec).toFixed(2);
			fsWaterTotal = (eval(fsWatervalue) * water).toFixed(2);
			fsTotal = eval(fsElecTotal) + eval(fsWaterTotal);

			//Display calculated fuel surcharge
			document.getElementById("ctl00_ContentPlaceHolder1_lblfsElec").innerHTML = fsElecTotal;
			document.getElementById("ctl00_ContentPlaceHolder1_lblfsWater").innerHTML = fsWaterTotal;
			document.getElementById("ctl00_ContentPlaceHolder1_lblfsTotal").innerHTML = eval(fsTotal).toFixed(2);

			document.getElementById("ctl00_ContentPlaceHolder1_lblConElec").innerHTML = eval(elec);
			document.getElementById("ctl00_ContentPlaceHolder1_lblConWater").innerHTML = eval(water);

			if (isResedential) {
				Assign_all();
				document.getElementById("ctl00_ContentPlaceHolder1_grelec").innerHTML = resedentialData.gelec;
				document.getElementById("ctl00_ContentPlaceHolder1_yelelec").innerHTML = resedentialData.yelec;
				document.getElementById("ctl00_ContentPlaceHolder1_orelec").innerHTML = resedentialData.oelec;
				document.getElementById("ctl00_ContentPlaceHolder1_redelec").innerHTML = resedentialData.relec;
				document.getElementById("ctl00_ContentPlaceHolder1_grwater").innerHTML = resedentialData.gwater;
				document.getElementById("ctl00_ContentPlaceHolder1_yelwater").innerHTML = resedentialData.ywater;
				document.getElementById("ctl00_ContentPlaceHolder1_orwater").innerHTML = resedentialData.owater;
				document.getElementById("ctl00_ContentPlaceHolder1_yeltariff").innerHTML = (eval(elec4k) * 100).toFixed(0);
				document.getElementById("ctl00_ContentPlaceHolder1_delec2k").innerHTML = (eval(elec2k) * 100).toFixed(0);
				document.getElementById("ctl00_ContentPlaceHolder1_delec6k").innerHTML = (eval(elec6k) * 100).toFixed(0);
				document.getElementById("ctl00_ContentPlaceHolder1_delec6kp").innerHTML = (eval(elec6kp) * 100).toFixed(0);

                    $('#ctl00_ContentPlaceHolder1_yltr').parent().show();
				$('#ctl00_ContentPlaceHolder1_ortr').parent().show();
				$('#ctl00_ContentPlaceHolder1_redtr').parent().show();

				if (elec > 0) {

					if (elec <= resedentialData.baseelec) {
						document.getElementById("ctl00_ContentPlaceHolder1_ygrelec").innerHTML = elec;
						subgrelec = Math.round(elec * elec2k * 1000) / 1000;

						document.getElementById("ctl00_ContentPlaceHolder1_fgrelec").innerHTML = subgrelec.toFixed(2);

					} else {
						document.getElementById("ctl00_ContentPlaceHolder1_ygrelec").innerHTML = resedentialData.baseelec;

						elec = eval(elec) - resedentialData.baseelec;
						subgrelec = resedentialData.baseelec * elec2k;

						document.getElementById("ctl00_ContentPlaceHolder1_fgrelec").innerHTML = subgrelec.toFixed(2);

						if (elec > 0 && elec <= resedentialData.baseelec) {
							document.getElementById("ctl00_ContentPlaceHolder1_yyelelec").innerHTML = elec;
							subyelelec = Math.round(eval(elec) * elec4k * 1000) / 1000;
							document.getElementById("ctl00_ContentPlaceHolder1_fyelelec").innerHTML = subyelelec.toFixed(2);

						} else {
							document.getElementById("ctl00_ContentPlaceHolder1_yyelelec").innerHTML = resedentialData.baseelec;
							elec = eval(elec) - resedentialData.baseelec;
							subyelelec = resedentialData.baseelec * elec4k;
							document.getElementById("ctl00_ContentPlaceHolder1_fyelelec").innerHTML = subyelelec.toFixed(2);

							if (elec > 0 && elec <= resedentialData.baseelec) {
								document.getElementById("ctl00_ContentPlaceHolder1_yorelec").innerHTML = elec;
								suborelec = Math.round(eval(elec) * elec6k * 1000) / 1000;
								document.getElementById("ctl00_ContentPlaceHolder1_forelec").innerHTML = suborelec.toFixed(2);

							} else {
								document.getElementById("ctl00_ContentPlaceHolder1_yorelec").innerHTML = "2000";
								elec = eval(elec) - resedentialData.baseelec;
								suborelec = resedentialData.baseelec * elec6k;
								document.getElementById("ctl00_ContentPlaceHolder1_forelec").innerHTML = suborelec.toFixed(2);

								if (elec > 0) {
									document.getElementById("ctl00_ContentPlaceHolder1_yredelec").innerHTML = elec;
									subredelec = Math.round(eval(elec) * elec6kp * 1000) / 1000;
									document.getElementById("ctl00_ContentPlaceHolder1_fredelec").innerHTML = subredelec.toFixed(2);
								}

							}
						}
					}

				}


				if (water > 0) {
					document.getElementById("ctl00_ContentPlaceHolder1_lblwater1").innerHTML = (eval(water6k) * 100).toFixed(1);
					document.getElementById("ctl00_ContentPlaceHolder1_lblwater2").innerHTML = (eval(water12k) * 100).toFixed(1);
					document.getElementById("ctl00_ContentPlaceHolder1_lblwater3").innerHTML = (eval(water12kp) * 100).toFixed(1);

					if (water > 0 && water <= resedentialData.basewater) {
						document.getElementById("ctl00_ContentPlaceHolder1_ygrwater").innerHTML = water;
						subgrwater = Math.round(eval(water) * water6k * 1000) / 1000;
						document.getElementById("ctl00_ContentPlaceHolder1_fgrwater").innerHTML = subgrwater.toFixed(2);
					} else {
						document.getElementById("ctl00_ContentPlaceHolder1_ygrwater").innerHTML = resedentialData.basewater;
						water = eval(water) - resedentialData.basewater;
						subgrwater = resedentialData.basewater * water6k;
						document.getElementById("ctl00_ContentPlaceHolder1_fgrwater").innerHTML = subgrwater.toFixed(2);

						if (water > 0 && water <= resedentialData.basewater) {
							document.getElementById("ctl00_ContentPlaceHolder1_yyelwater").innerHTML = water;
							subyelwater = Math.round(eval(water) * water12k * 1000) / 1000;
							document.getElementById("ctl00_ContentPlaceHolder1_fyelwater").innerHTML = subyelwater.toFixed(2);
						} else {
							document.getElementById("ctl00_ContentPlaceHolder1_yyelwater").innerHTML = resedentialData.basewater;
							water = eval(water) - resedentialData.basewater;
							subyelwater = resedentialData.basewater * water12k;
							document.getElementById("ctl00_ContentPlaceHolder1_fyelwater").innerHTML = subyelwater.toFixed(2);

							if (water > 0) {
								document.getElementById("ctl00_ContentPlaceHolder1_yorwater").innerHTML = water;
								suborwater = Math.round(eval(water) * water12kp * 1000) / 1000;
								document.getElementById("ctl00_ContentPlaceHolder1_forwater").innerHTML = suborwater.toFixed(2);
							}
						}
					}

				}
				subtotal = eval(subgrelec) + eval(subyelelec) + eval(suborelec) + eval(subredelec);
				document.getElementById("ctl00_ContentPlaceHolder1_subtotalelec").innerHTML = subtotal.toFixed(2);
				totalelecamt = (eval(subtotal) + eval(fsElecTotal)).toFixed(2);
				document.getElementById("ctl00_ContentPlaceHolder1_totalelecamt").innerHTML = totalelecamt;

				subtotalwater = eval(subgrwater) + eval(subyelwater) + eval(suborwater);
				document.getElementById("ctl00_ContentPlaceHolder1_subtotalwater").innerHTML = subtotalwater.toFixed(2);
				totalwateramt = (eval(subtotalwater) + eval(fsWaterTotal)).toFixed(2);
				document.getElementById("ctl00_ContentPlaceHolder1_totalwateramt").innerHTML = totalwateramt;

				totalbill = eval(totalelecamt) + eval(totalwateramt);
				document.getElementById("ctl00_ContentPlaceHolder1_totalbill").innerHTML = totalbill.toFixed(2);

				totalvatamt = Math.round(eval(totalbill) * eval(vatpercentage)) / 100;
				document.getElementById("ctl00_ContentPlaceHolder1_totalvatamt").innerHTML = totalvatamt.toFixed(2);

				totalbillinclvat = eval(totalvatamt) + eval(totalbill);
				document.getElementById("ctl00_ContentPlaceHolder1_totalbillincludingvat").innerHTML = totalbillinclvat.toFixed(2);

			} else if (isCommercial) {
				Assign_all();
				document.getElementById("ctl00_ContentPlaceHolder1_grelec").innerHTML = commercialData.gelec;
				document.getElementById("ctl00_ContentPlaceHolder1_yelelec").innerHTML = commercialData.yelec;
				document.getElementById("ctl00_ContentPlaceHolder1_orelec").innerHTML = commercialData.oelec;
				document.getElementById("ctl00_ContentPlaceHolder1_redelec").innerHTML = commercialData.relec;
				document.getElementById("ctl00_ContentPlaceHolder1_grwater").innerHTML = commercialData.gwater;
				document.getElementById("ctl00_ContentPlaceHolder1_yelwater").innerHTML = commercialData.ywater;
				document.getElementById("ctl00_ContentPlaceHolder1_orwater").innerHTML = commercialData.owater;

				document.getElementById("ctl00_ContentPlaceHolder1_yeltariff").innerHTML = (eval(elec4k) * 100).toFixed(0);
				document.getElementById("ctl00_ContentPlaceHolder1_delec2k").innerHTML = (eval(elec2k) * 100).toFixed(0);
				document.getElementById("ctl00_ContentPlaceHolder1_delec6k").innerHTML = (eval(elec6k) * 100).toFixed(0);
				document.getElementById("ctl00_ContentPlaceHolder1_delec6kp").innerHTML = (eval(elec6kp) * 100).toFixed(0);

                    $('#ctl00_ContentPlaceHolder1_yltr').parent().show();
				$('#ctl00_ContentPlaceHolder1_ortr').parent().show();
				$('#ctl00_ContentPlaceHolder1_redtr').parent().show();

				if (elec > 0) {

					if (elec > 0 && elec <= commercialData.baseelec) {
						document.getElementById("ctl00_ContentPlaceHolder1_ygrelec").innerHTML = elec;
						subgrelec = Math.round(eval(elec) * elec2k * 1000) / 1000;
						document.getElementById("ctl00_ContentPlaceHolder1_fgrelec").innerHTML = subgrelec.toFixed(2);

					} else {
						document.getElementById("ctl00_ContentPlaceHolder1_ygrelec").innerHTML = commercialData.baseelec;
						elec = eval(elec) - commercialData.baseelec;
						subgrelec = commercialData.baseelec * elec2k;
						document.getElementById("ctl00_ContentPlaceHolder1_fgrelec").innerHTML = subgrelec.toFixed(2);

						if (elec > 0 && elec <= commercialData.baseelec) {
							document.getElementById("ctl00_ContentPlaceHolder1_yyelelec").innerHTML = elec;
							subyelelec = Math.round(eval(elec) * elec4k * 1000) / 1000;
							document.getElementById("ctl00_ContentPlaceHolder1_fyelelec").innerHTML = subyelelec.toFixed(2);

						} else {
							document.getElementById("ctl00_ContentPlaceHolder1_yyelelec").innerHTML = commercialData.baseelec;
							elec = eval(elec) - commercialData.baseelec;
							subyelelec = commercialData.baseelec * elec4k;
							document.getElementById("ctl00_ContentPlaceHolder1_fyelelec").innerHTML = subyelelec.toFixed(2);

							if (elec > 0 && elec <= commercialData.baseelec) {
								document.getElementById("ctl00_ContentPlaceHolder1_yorelec").innerHTML = elec;
								suborelec = Math.round(eval(elec) * elec6k * 1000) / 1000;
								document.getElementById("ctl00_ContentPlaceHolder1_forelec").innerHTML = suborelec.toFixed(2);

							} else {
								document.getElementById("ctl00_ContentPlaceHolder1_yorelec").innerHTML = commercialData.baseelec;
								elec = eval(elec) - commercialData.baseelec;
								suborelec = commercialData.baseelec * elec6k;
								document.getElementById("ctl00_ContentPlaceHolder1_forelec").innerHTML = suborelec.toFixed(2);

								if (elec > 0) {
									document.getElementById("ctl00_ContentPlaceHolder1_yredelec").innerHTML = elec;
									subredelec = Math.round(eval(elec) * elec6kp * 1000) / 1000;
									document.getElementById("ctl00_ContentPlaceHolder1_fredelec").innerHTML = subredelec.toFixed(2);
								}

							}
						}
					}

				}
				if (water > 0) {
					document.getElementById("ctl00_ContentPlaceHolder1_lblwater1").innerHTML = (eval(water6k) * 100).toFixed(1);
					document.getElementById("ctl00_ContentPlaceHolder1_lblwater2").innerHTML = (eval(water12k) * 100).toFixed(1);
					document.getElementById("ctl00_ContentPlaceHolder1_lblwater3").innerHTML = (eval(water12kp) * 100).toFixed(1);

					if (water > 0 && water <= commercialData.basewater) {
						document.getElementById("ctl00_ContentPlaceHolder1_ygrwater").innerHTML = water;
						subgrwater = Math.round(eval(water) * water6k * 1000) / 1000;
						document.getElementById("ctl00_ContentPlaceHolder1_fgrwater").innerHTML = subgrwater.toFixed(2);
					} else {
						document.getElementById("ctl00_ContentPlaceHolder1_ygrwater").innerHTML = commercialData.basewater;
						water = eval(water) - commercialData.basewater;
						subgrwater = commercialData.basewater * water6k;
						document.getElementById("ctl00_ContentPlaceHolder1_fgrwater").innerHTML = subgrwater.toFixed(2);

						if (water > 0 && water <= commercialData.basewater) {
							document.getElementById("ctl00_ContentPlaceHolder1_yyelwater").innerHTML = water;
							subyelwater = Math.round(eval(water) * water12k * 1000) / 1000;
							document.getElementById("ctl00_ContentPlaceHolder1_fyelwater").innerHTML = subyelwater.toFixed(2);
						} else {
							document.getElementById("ctl00_ContentPlaceHolder1_yyelwater").innerHTML = commercialData.basewater;
							water = eval(water) - commercialData.basewater;
							subyelwater = commercialData.basewater * water12k;
							document.getElementById("ctl00_ContentPlaceHolder1_fyelwater").innerHTML = subyelwater.toFixed(2);

							if (water > 0) {
								document.getElementById("ctl00_ContentPlaceHolder1_yorwater").innerHTML = water;
								suborwater = Math.round(eval(water) * water12kp * 1000) / 1000;
								document.getElementById("ctl00_ContentPlaceHolder1_forwater").innerHTML = suborwater.toFixed(2);
							}
						}
					}

				}

				var subtotal = eval(subgrelec) + eval(subyelelec) + eval(suborelec) + eval(subredelec);
				document.getElementById("ctl00_ContentPlaceHolder1_subtotalelec").innerHTML = subtotal.toFixed(2);
				totalelecamt = (eval(subtotal) + eval(fsElecTotal)).toFixed(2);
				document.getElementById("ctl00_ContentPlaceHolder1_totalelecamt").innerHTML = totalelecamt;


				var subtotalwater = eval(subgrwater) + eval(subyelwater) + eval(suborwater);
				document.getElementById("ctl00_ContentPlaceHolder1_subtotalwater").innerHTML = subtotalwater.toFixed(2);
				totalwateramt = (eval(subtotalwater) + eval(fsWaterTotal)).toFixed(2);
				document.getElementById("ctl00_ContentPlaceHolder1_totalwateramt").innerHTML = totalwateramt;


				totalbill = eval(totalelecamt) + eval(totalwateramt);
				document.getElementById("ctl00_ContentPlaceHolder1_totalbill").innerHTML = totalbill.toFixed(2);

				totalvatamt = Math.round(eval(totalbill) * eval(vatpercentage)) / 100;
				document.getElementById("ctl00_ContentPlaceHolder1_totalvatamt").innerHTML = totalvatamt.toFixed(2);

                    totalbillinclvat = eval(totalvatamt) + eval(totalbill);
                    document.getElementById("ctl00_ContentPlaceHolder1_totalbillincludingvat").innerHTML = totalbillinclvat.toFixed(2);
                }else if(isD33) {
                    $('#ctl00_ContentPlaceHolder1_yltr').parent().hide();
                    $('#ctl00_ContentPlaceHolder1_ortr').parent().hide();
                    $('#ctl00_ContentPlaceHolder1_redtr').parent().hide();
                    Assign_all();
                    document.getElementById("ctl00_ContentPlaceHolder1_grelec").innerHTML = d33Data.gelec;
                    document.getElementById("ctl00_ContentPlaceHolder1_grwater").innerHTML = d33Data.gwater;
                    document.getElementById("ctl00_ContentPlaceHolder1_yelwater").innerHTML = d33Data.ywater;
                    document.getElementById("ctl00_ContentPlaceHolder1_orwater").innerHTML = d33Data.owater;
                    document.getElementById("ctl00_ContentPlaceHolder1_yeltariff").innerHTML = (eval(elec10kpd33) * 100).toFixed(0);

                    document.getElementById("ctl00_ContentPlaceHolder1_delec2k").innerHTML = (eval(elec10kd33) * 100).toFixed(0);

                    if (elec > 0) {

                        if (elec > 0 ) {
                            document.getElementById("ctl00_ContentPlaceHolder1_ygrelec").innerHTML = elec;
                            subgrelec = Math.round(eval(elec) * elec10kd33 * 1000) / 1000;
                            document.getElementById("ctl00_ContentPlaceHolder1_fgrelec").innerHTML = subgrelec.toFixed(2);

                        }
                    }
                    document.getElementById("ctl00_ContentPlaceHolder1_lblwater1").innerHTML = (eval(water6k) * 100).toFixed(1);
                    document.getElementById("ctl00_ContentPlaceHolder1_lblwater2").innerHTML = (eval(water12k) * 100).toFixed(1);
                    document.getElementById("ctl00_ContentPlaceHolder1_lblwater3").innerHTML = (eval(water12kp) * 100).toFixed(1);
                    if (water > 0) {

                        if (water > 0 && water <= d33Data.basewater) {
                            document.getElementById("ctl00_ContentPlaceHolder1_ygrwater").innerHTML = water;
                            subgrwater = Math.round(eval(water) * water6k * 1000) / 1000;
                            document.getElementById("ctl00_ContentPlaceHolder1_fgrwater").innerHTML = subgrwater.toFixed(2);
                        } else {
                            document.getElementById("ctl00_ContentPlaceHolder1_ygrwater").innerHTML = d33Data.basewater;
                            water = eval(water) - d33Data.basewater;
                            subgrwater = water6k * d33Data.basewater;
                            document.getElementById("ctl00_ContentPlaceHolder1_fgrwater").innerHTML = subgrwater.toFixed(2);

                            if (water > 0 && water <= d33Data.basewater) {
                                document.getElementById("ctl00_ContentPlaceHolder1_yyelwater").innerHTML = water;
                                subyelwater = Math.round(eval(water) * water12k * 1000) / 1000;
                                document.getElementById("ctl00_ContentPlaceHolder1_fyelwater").innerHTML = subyelwater.toFixed(2);
                            } else {
                                document.getElementById("ctl00_ContentPlaceHolder1_yyelwater").innerHTML = d33Data.basewater;
                                water = eval(water) - d33Data.basewater;
                                subyelwater = d33Data.basewater * water12k;
                                document.getElementById("ctl00_ContentPlaceHolder1_fyelwater").innerHTML = subyelwater.toFixed(2);

                                if (water > 0) {
                                    document.getElementById("ctl00_ContentPlaceHolder1_yorwater").innerHTML = water;
                                    suborwater = Math.round(eval(water) * water12kp * 1000) / 1000;
                                    document.getElementById("ctl00_ContentPlaceHolder1_forwater").innerHTML = suborwater.toFixed(2);
                                }
                            }
                        }

                    }

                    var subtotal = eval(subgrelec) + eval(subyelelec);
                    document.getElementById("ctl00_ContentPlaceHolder1_subtotalelec").innerHTML = subtotal.toFixed(2);
                    totalelecamt = (eval(subtotal) + eval(fsElecTotal)).toFixed(2);
                    document.getElementById("ctl00_ContentPlaceHolder1_totalelecamt").innerHTML = totalelecamt;


                    var subtotalwater = eval(subgrwater) + eval(subyelwater) + eval(suborwater);
                    document.getElementById("ctl00_ContentPlaceHolder1_subtotalwater").innerHTML = subtotalwater.toFixed(2);
                    totalwateramt = (eval(subtotalwater) + eval(fsWaterTotal)).toFixed(2);
                    document.getElementById("ctl00_ContentPlaceHolder1_totalwateramt").innerHTML = totalwateramt;


                    totalbill = eval(totalelecamt) + eval(totalwateramt);
                    document.getElementById("ctl00_ContentPlaceHolder1_totalbill").innerHTML = totalbill.toFixed(2);

                    totalvatamt = Math.round(eval(totalbill) * eval(vatpercentage)) / 100;
                    document.getElementById("ctl00_ContentPlaceHolder1_totalvatamt").innerHTML = totalvatamt.toFixed(2);

				totalbillinclvat = eval(totalvatamt) + eval(totalbill);
				document.getElementById("ctl00_ContentPlaceHolder1_totalbillincludingvat").innerHTML = totalbillinclvat.toFixed(2);
			}

			// Industrial
			else {
				$('#ctl00_ContentPlaceHolder1_ortr').parent().hide();
				$('#ctl00_ContentPlaceHolder1_redtr').parent().hide();
                    $('#ctl00_ContentPlaceHolder1_yltr').parent().show();
				Assign_all();
				document.getElementById("ctl00_ContentPlaceHolder1_grelec").innerHTML = industrialData.gelec;
				document.getElementById("ctl00_ContentPlaceHolder1_yelelec").innerHTML = industrialData.yelec;
				document.getElementById("ctl00_ContentPlaceHolder1_grwater").innerHTML = industrialData.gwater;
				document.getElementById("ctl00_ContentPlaceHolder1_yelwater").innerHTML = industrialData.ywater;
				document.getElementById("ctl00_ContentPlaceHolder1_orwater").innerHTML = industrialData.owater;
				document.getElementById("ctl00_ContentPlaceHolder1_yeltariff").innerHTML = (eval(elec10kp) * 100).toFixed(0);

				document.getElementById("ctl00_ContentPlaceHolder1_delec2k").innerHTML = (eval(elec10k) * 100).toFixed(0);

				if (elec > 0) {

					if (elec > 0 && elec <= industrialData.baseelec) {
						document.getElementById("ctl00_ContentPlaceHolder1_ygrelec").innerHTML = elec;
						subgrelec = Math.round(eval(elec) * elec10k * 1000) / 1000;
						document.getElementById("ctl00_ContentPlaceHolder1_fgrelec").innerHTML = subgrelec.toFixed(2);

					} else {
						document.getElementById("ctl00_ContentPlaceHolder1_ygrelec").innerHTML = industrialData.baseelec;
						elec = eval(elec) - industrialData.baseelec;
						subgrelec = industrialData.baseelec * elec10k;
						document.getElementById("ctl00_ContentPlaceHolder1_fgrelec").innerHTML = subgrelec.toFixed(2);

						if (elec > 0) {
							document.getElementById("ctl00_ContentPlaceHolder1_yyelelec").innerHTML = elec;
							subyelelec = Math.round(eval(elec) * elec10kp * 1000) / 1000;
							document.getElementById("ctl00_ContentPlaceHolder1_fyelelec").innerHTML = subyelelec.toFixed(2);

						}
					}

				}
				document.getElementById("ctl00_ContentPlaceHolder1_lblwater1").innerHTML = (eval(water6k) * 100).toFixed(1);
				document.getElementById("ctl00_ContentPlaceHolder1_lblwater2").innerHTML = (eval(water12k) * 100).toFixed(1);
				document.getElementById("ctl00_ContentPlaceHolder1_lblwater3").innerHTML = (eval(water12kp) * 100).toFixed(1);
				if (water > 0) {

                        if (water > 0 && water <= industrialData.basewater) {
						document.getElementById("ctl00_ContentPlaceHolder1_ygrwater").innerHTML = water;
						subgrwater = Math.round(eval(water) * water6k * 1000) / 1000;
						document.getElementById("ctl00_ContentPlaceHolder1_fgrwater").innerHTML = subgrwater.toFixed(2);
					} else {
                            document.getElementById("ctl00_ContentPlaceHolder1_ygrwater").innerHTML = industrialData.basewater;
                            water = eval(water) - industrialData.basewater;
                            subgrwater = water6k * industrialData.basewater;
						document.getElementById("ctl00_ContentPlaceHolder1_fgrwater").innerHTML = subgrwater.toFixed(2);

                            if (water > 0 && water <= industrialData.basewater) {
							document.getElementById("ctl00_ContentPlaceHolder1_yyelwater").innerHTML = water;
							subyelwater = Math.round(eval(water) * water12k * 1000) / 1000;
							document.getElementById("ctl00_ContentPlaceHolder1_fyelwater").innerHTML = subyelwater.toFixed(2);
						} else {
                                document.getElementById("ctl00_ContentPlaceHolder1_yyelwater").innerHTML = industrialData.basewater;
                                water = eval(water) - industrialData.basewater;
                                subyelwater = industrialData.basewater * water12k;
							document.getElementById("ctl00_ContentPlaceHolder1_fyelwater").innerHTML = subyelwater.toFixed(2);

							if (water > 0) {
								document.getElementById("ctl00_ContentPlaceHolder1_yorwater").innerHTML = water;
								suborwater = Math.round(eval(water) * water12kp * 1000) / 1000;
								document.getElementById("ctl00_ContentPlaceHolder1_forwater").innerHTML = suborwater.toFixed(2);
							}
						}
					}

				}

				var subtotal = eval(subgrelec) + eval(subyelelec);
				document.getElementById("ctl00_ContentPlaceHolder1_subtotalelec").innerHTML = subtotal.toFixed(2);
				totalelecamt = (eval(subtotal) + eval(fsElecTotal)).toFixed(2);
				document.getElementById("ctl00_ContentPlaceHolder1_totalelecamt").innerHTML = totalelecamt;


				var subtotalwater = eval(subgrwater) + eval(subyelwater) + eval(suborwater);
				document.getElementById("ctl00_ContentPlaceHolder1_subtotalwater").innerHTML = subtotalwater.toFixed(2);
				totalwateramt = (eval(subtotalwater) + eval(fsWaterTotal)).toFixed(2);
				document.getElementById("ctl00_ContentPlaceHolder1_totalwateramt").innerHTML = totalwateramt;


				totalbill = eval(totalelecamt) + eval(totalwateramt);
				document.getElementById("ctl00_ContentPlaceHolder1_totalbill").innerHTML = totalbill.toFixed(2);

				totalvatamt = Math.round(eval(totalbill) * eval(vatpercentage)) / 100;
				document.getElementById("ctl00_ContentPlaceHolder1_totalvatamt").innerHTML = totalvatamt.toFixed(2);

				totalbillinclvat = eval(totalvatamt) + eval(totalbill);
				document.getElementById("ctl00_ContentPlaceHolder1_totalbillincludingvat").innerHTML = totalbillinclvat.toFixed(2);
			}

		}

		function Assign_all() {
			document.getElementById("ctl00_ContentPlaceHolder1_ygrelec").innerHTML = "0";
			document.getElementById("ctl00_ContentPlaceHolder1_fgrelec").innerHTML = "0.00";
			document.getElementById("ctl00_ContentPlaceHolder1_yyelelec").innerHTML = "0";
			document.getElementById("ctl00_ContentPlaceHolder1_fyelelec").innerHTML = "0.00";
			document.getElementById("ctl00_ContentPlaceHolder1_yorelec").innerHTML = "0";
			document.getElementById("ctl00_ContentPlaceHolder1_forelec").innerHTML = "0.00";
			document.getElementById("ctl00_ContentPlaceHolder1_yredelec").innerHTML = "0";
			document.getElementById("ctl00_ContentPlaceHolder1_fredelec").innerHTML = "0.00";

			document.getElementById("ctl00_ContentPlaceHolder1_ygrwater").innerHTML = "0";
			document.getElementById("ctl00_ContentPlaceHolder1_fgrwater").innerHTML = "0.00";
			document.getElementById("ctl00_ContentPlaceHolder1_yyelwater").innerHTML = "0";
			document.getElementById("ctl00_ContentPlaceHolder1_fyelwater").innerHTML = "0.00";
			document.getElementById("ctl00_ContentPlaceHolder1_yorwater").innerHTML = "0";
			document.getElementById("ctl00_ContentPlaceHolder1_forwater").innerHTML = "0.00"

		}

		Tariff_Cal();

		this.$journey.find('[data-component="m23-table"]').each(function () {
			$(this).trigger('j34Done');
		});

	};

	return TariffCalculator;
});

define('../src/journeys/j40-pledge/j40-pledge',['jquery'], function ($) {

	'use strict';

	var J40 = function ($journey) {

		this.$journey = $journey;
		return this;
	};

	J40.prototype.init = function() {
		var _this = this;
		_this.total = 0;
		_this.numBulbsCB = $(this.$journey).find('input[data-j40-pledge="j40_checkbox_1_1"]');
		_this.numBulbsTF = $(this.$journey).find('input[data-j40-pledge="j40_textfield_1_1"]');
		_this.airConTempCB = $(this.$journey).find('input[data-j40-pledge="j40_checkbox_1_2"]');
		_this.airConTempTF = $(this.$journey).find('input[data-j40-pledge="j40_textfield_1_2"]');
		_this.airConMaintCB = $(this.$journey).find('input[data-j40-pledge="j40_checkbox_1_3"]');
		_this.airConMaintTF = $(this.$journey).find('input[data-j40-pledge="j40_textfield_1_3"]');
		_this.dryerCB = $(this.$journey).find('input[data-j40-pledge="j40_checkbox_1_4"]');
		//_this.heatersCB = $(this.$journey).find('input[data-j40-pledge="j40_checkbox_1_5"]');
		//_this.heatersTF = $(this.$journey).find('input[data-j40-pledge="j40_textfield_1_5"]');
		//_this.carwashCB = $(this.$journey).find('input[data-j40-pledge="j40_checkbox_1_6"]');
		_this.showerCB = $(this.$journey).find('input[data-j40-pledge="j40_checkbox_1_7"]');
		_this.showerSl = $(this.$journey).find('select[data-j40-pledge="j40_select_1_7"]');
		_this.reducerCB = $(this.$journey).find('input[data-j40-pledge="j40_checkbox_1_8"]');
		_this.reducerTF = $(this.$journey).find('input[data-j40-pledge="j40_textfield_1_8"]');
		_this.toiletCB = $(this.$journey).find('input[data-j40-pledge="j40_checkbox_1_9"]');
		_this.teethCB = $(this.$journey).find('input[data-j40-pledge="j40_checkbox_1_10"]');
		_this.teethTF = $(this.$journey).find('input[data-j40-pledge="j40_textfield_1_10"]');
		_this.kgCO2_TF = $(this.$journey).find('input[data-j40-pledge="j40_textfield_kgco2"]');
		_this.kwe_TF = $(this.$journey).find('input[data-j40-pledge="j40_textfield_kwe"]');
		_this.gw_TF = $(this.$journey).find('input[data-j40-pledge="j40_textfield_gw"]');
		_this.tro = $(this.$journey).find('input[data-j40-pledge="j40_textfield_tro"]');
		_this.led = $(this.$journey).find('input[data-j40-pledge="j40_textfield_led"]');
		_this.wBottle = $(this.$journey).find('input[data-j40-pledge="j40_textfield_wBottle"]');

		_this.numBulbsCB.on('change', function () {
			_this.updateTotals();
			if (_this.numBulbsCB.prop('checked')) {
				_this.numBulbsTF.attr('required', true);
				_this.numBulbsTF.trigger('focusout');
				_this.numBulbsTF.attr('disabled', false);
			} else {
				_this.numBulbsTF.attr('required', false);
				_this.numBulbsTF.trigger('focusout');
				_this.numBulbsTF.attr('disabled', true);
			};
		});
		_this.numBulbsTF.on('keyup', function () {
			if (_this.numBulbsCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.numBulbsTF.on('change', function () {
			if (_this.numBulbsCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.airConTempCB.on('change', function () {
			_this.updateTotals();
			if (_this.airConTempCB.prop('checked')) {
				_this.airConTempTF.attr('required', true);
				_this.airConTempTF.trigger('focusout');
				_this.airConTempTF.attr('disabled', false);
			} else {
				_this.airConTempTF.attr('required', false);
				_this.airConTempTF.trigger('focusout');
				_this.airConTempTF.attr('disabled', true);
			};
		});
		_this.airConTempTF.on('keyup', function () {
			if (_this.airConTempCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.airConTempTF.on('change', function () {
			if (_this.airConTempCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.airConMaintCB.on('change', function () {
			_this.updateTotals();
			if (_this.airConMaintCB.prop('checked')) {
				_this.airConMaintTF.attr('required', true);
				_this.airConMaintTF.trigger('focusout');
				_this.airConMaintTF.attr('disabled', false);
			} else {
				_this.airConMaintTF.attr('required', false);
				_this.airConMaintTF.trigger('focusout');
				_this.airConMaintTF.attr('disabled', true);
			};
		});
		_this.airConMaintTF.on('keyup', function () {
			if (_this.airConMaintCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.airConMaintTF.on('change', function () {
			if (_this.airConMaintCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.dryerCB.on('change', function () {
			_this.updateTotals();
		});
		//_this.heatersCB.on('change', function () {
		//	_this.updateTotals();
		//});
		//_this.heatersTF.on('change', function () {
		//	if (_this.heatersCB.prop('checked')) {
		//		_this.updateTotals();
		//	}
		//});
		//_this.heatersTF.on('keyup', function () {
		//	if (_this.heatersCB.prop('checked')) {
		//		_this.updateTotals();
		//	}
		//});
		//_this.carwashCB.on('change', function () {
		//	_this.updateTotals();
		//});
		_this.showerCB.on('change', function () {
			_this.updateTotals();
			if (_this.showerCB.prop('checked')) {
				_this.showerSl.attr('required', true);
				_this.showerSl.trigger('change');
				_this.showerSl.attr('disabled', false);
			} else {
				_this.showerSl.attr('required', false);
				_this.showerSl.trigger('change');
				_this.showerSl.attr('disabled', true);
			};
		});
		_this.showerSl.on('change', function () {
			_this.updateTotals();
		});
		_this.teethCB.on('change', function () {
			_this.updateTotals();
			if (_this.teethCB.prop('checked')) {
				_this.teethTF.attr('required', true);
				_this.teethTF.trigger('focusout');
				_this.teethTF.attr('disabled', false);
			} else {
				_this.teethTF.attr('required', false);
				_this.teethTF.trigger('focusout');
				_this.teethTF.attr('disabled', true);
			};
		});
		_this.teethTF.on('keyup', function () {
			if (_this.teethCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.reducerCB.on('change', function () {
			_this.updateTotals();
			if (_this.reducerCB.prop('checked')) {
				_this.reducerTF.attr('required', true);
				_this.reducerTF.trigger('focusout');
				_this.reducerTF.attr('disabled', false);
			} else {
				_this.reducerTF.attr('required', false);
				_this.reducerTF.trigger('focusout');
				_this.reducerTF.attr('disabled', true);
			};
		});
		_this.reducerTF.on('keyup', function () {
			if (_this.reducerCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		// _this.reducerTF.on('change', function () {
		// 	if (_this.reducerCB.prop('checked')) {
		// 		_this.updateTotals();
		// 	}
		// });
		_this.toiletCB.on('change', function () {
			_this.updateTotals();
		});
		_this.teethCB.on('change', function () {
			_this.updateTotals();
		});
	};

	J40.prototype.updateTotals = function() {
		var _this = this,
			eTotal = 0,
			wTotal = 0,
			v;

		if (_this.numBulbsCB.prop('checked')) {
			v = parseFloat(_this.numBulbsTF.val())*100.00;
			eTotal += !isNaN(v) ? v : 0;
		}
		if (_this.airConTempCB.prop('checked')) {
		    v = parseFloat(_this.airConTempTF.val())*960.00;
			eTotal += !isNaN(v) ? v : 0;
			//eTotal += parseFloat(_this.airConTempCB.val());
		}
		if (_this.airConMaintCB.prop('checked')) {
		    //eTotal += parseFloat(_this.airConMaintCB.val());
		    v = parseFloat(_this.airConMaintTF.val())*420;
			eTotal += !isNaN(v) ? v : 0;
		}
		if (_this.dryerCB.prop('checked')) {
		    //eTotal += parseFloat(_this.dryerCB.val());
		    eTotal += parseFloat(275);
		}
		//if (_this.heatersCB.prop('checked')) {
		//	v = parseFloat(_this.heatersTF.val())*273.8;
		//	eTotal += !isNaN(v) ? v : 0;
		//}
		//if (_this.carwashCB.prop('checked')) {
		//	wTotal += parseFloat(_this.carwashCB.val());
		//}
		if (_this.showerCB.prop('checked')) {
			v = parseFloat(_this.showerSl.val())*2190;
			wTotal += !isNaN(v) ? v : 0;
		}
		if (_this.reducerCB.prop('checked')) {
			v = parseFloat(_this.reducerTF.val())*10950;
			wTotal += !isNaN(v) ? v : 0;
		}
		if (_this.toiletCB.prop('checked')) {
		    wTotal += parseFloat(547.5);
		    //wTotal += parseFloat(_this.toiletCB.val());
		}
		if (_this.teethCB.prop('checked')) {
			v = parseFloat(_this.teethCB.val())*parseFloat(_this.teethTF.val());
			wTotal += !isNaN(v) ? v : 0;
		}

		//console.log(eTotal, wTotal);
		//console(wTotal);
		// kgs of CO2
		var eCO2 = Math.round(eTotal * 0.4178);
		var gallon = Math.round(wTotal / 4.546);
		var wCO2 = Math.round(gallon * 0.0242818);

		// rounding
		eTotal = Math.round(eTotal);
		wTotal = Math.round(wTotal);

		//console.log(eTotal, wTotal);

		_this.kgCO2_TF.val(eCO2 + wCO2);
		_this.kwe_TF.val(eTotal);
		_this.gw_TF.val(Math.round(wTotal / 4.546));
		_this.tro.val(Math.round(_this.kgCO2_TF / 22));
		_this.led.val(Math.round(eTotal/16.2));
		_this.wBottle.val(Math.round(wTotal*9.09218));
		//var waterTotal = Math.round(wTotal / 4.546);
		//_this.gw_TF.val(Math.round(waterTotal * 0.024221));
	};

	return J40;
});

define('../src/journeys/j41-pledge/j41-pledge',['jquery'], function ($) {

	'use strict';

	var J41 = function ($journey) {

		this.$journey = $journey;
		return this;
	};

	J41.prototype.init = function() {
		var _this = this;
		_this.total = 0;
		_this.numBulbsCB = $(this.$journey).find('input[data-J41-pledge="J41_checkbox_1_1"]');
		_this.numBulbsTF = $(this.$journey).find('input[data-J41-pledge="J41_textfield_1_1"]');
		_this.airConTempCB = $(this.$journey).find('input[data-J41-pledge="J41_checkbox_1_2"]');
		_this.airConTempTF = $(this.$journey).find('input[data-J41-pledge="j41_textfield_1_2"]');
		_this.airConMaintCB = $(this.$journey).find('input[data-J41-pledge="J41_checkbox_1_3"]');
		_this.airConMaintTF = $(this.$journey).find('input[data-J41-pledge="j41_textfield_1_3"]');
		_this.dryerCB = $(this.$journey).find('input[data-J41-pledge="J41_checkbox_1_4"]');
		_this.heatersCB = $(this.$journey).find('input[data-J41-pledge="J41_checkbox_1_5"]');
		_this.heatersTF = $(this.$journey).find('input[data-J41-pledge="J41_textfield_1_5"]');
		//_this.carwashCB = $(this.$journey).find('input[data-J41-pledge="J41_checkbox_1_6"]');
		_this.showerCB = $(this.$journey).find('input[data-J41-pledge="J41_checkbox_1_7"]');
		_this.showerSl = $(this.$journey).find('select[data-J41-pledge="J41_select_1_7"]');
		_this.reducerCB = $(this.$journey).find('input[data-J41-pledge="J41_checkbox_1_8"]');
		_this.reducerTF = $(this.$journey).find('input[data-J41-pledge="J41_textfield_1_8"]');
		_this.toiletCB = $(this.$journey).find('input[data-J41-pledge="J41_checkbox_1_9"]');
		_this.teethCB = $(this.$journey).find('input[data-J41-pledge="J41_checkbox_1_10"]');
		_this.teethTF = $(this.$journey).find('input[data-J41-pledge="J41_textfield_1_10"]');
		_this.kgCO2_TF = $(this.$journey).find('input[data-J41-pledge="J41_textfield_kgco2"]');
		_this.kwe_TF = $(this.$journey).find('input[data-J41-pledge="J41_textfield_kwe"]');
		_this.gw_TF = $(this.$journey).find('input[data-J41-pledge="J41_textfield_gw"]');
		_this.tro = $(this.$journey).find('input[data-J41-pledge="J41_textfield_tro"]');
		_this.led = $(this.$journey).find('input[data-J41-pledge="J41_textfield_led"]');
		_this.wBottle = $(this.$journey).find('input[data-J41-pledge="J41_textfield_wBottle"]');

		_this.numBulbsCB.on('change', function () {
			_this.updateTotals();
			if (_this.numBulbsCB.prop('checked')) {
				_this.numBulbsTF.attr('required', true);
				_this.numBulbsTF.trigger('focusout');
				_this.numBulbsTF.attr('disabled', false);
			} else {
				_this.numBulbsTF.attr('required', false);
				_this.numBulbsTF.trigger('focusout');
				_this.numBulbsTF.attr('disabled', true);
			};
		});
		_this.numBulbsTF.on('keyup', function () {
			if (_this.numBulbsCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.numBulbsTF.on('change', function () {
			if (_this.numBulbsCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.airConTempCB.on('change', function () {
			_this.updateTotals();
			if (_this.airConTempCB.prop('checked')) {
				_this.airConTempTF.attr('required', true);
				_this.airConTempTF.trigger('focusout');
				_this.airConTempTF.attr('disabled', false);
			} else {
				_this.airConTempTF.attr('required', false);
				_this.airConTempTF.trigger('focusout');
				_this.airConTempTF.attr('disabled', true);
			};
		});
		_this.airConTempTF.on('keyup', function () {
			if (_this.airConTempCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.airConTempTF.on('change', function () {
			if (_this.airConTempCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.airConMaintCB.on('change', function () {
			_this.updateTotals();
			if (_this.airConMaintCB.prop('checked')) {
				_this.airConMaintTF.attr('required', true);
				_this.airConMaintTF.trigger('focusout');
				_this.airConMaintTF.attr('disabled', false);
			} else {
				_this.airConMaintTF.attr('required', false);
				_this.airConMaintTF.trigger('focusout');
				_this.airConMaintTF.attr('disabled', true);
			};
		});
		_this.airConMaintTF.on('keyup', function () {
			if (_this.airConMaintCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.airConMaintTF.on('change', function () {
			if (_this.airConMaintCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.dryerCB.on('change', function () {
			_this.updateTotals();
		});
		_this.heatersCB.on('change', function () {
			_this.updateTotals();
			if (_this.heatersCB.prop('checked')) {
				_this.heatersTF.attr('required', true);
				_this.heatersTF.trigger('focusout');
				_this.heatersTF.attr('disabled', false);
			} else {
				_this.heatersTF.attr('required', false);
				_this.heatersTF.trigger('focusout');
				_this.heatersTF.attr('disabled', false);
			};
		});
		_this.heatersTF.on('change', function () {
			if (_this.heatersCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		_this.reducerCB.on('change', function () {
			_this.updateTotals();
			if (_this.reducerCB.prop('checked')) {
				_this.reducerTF.attr('required', true);
				_this.reducerTF.trigger('focusout');
				_this.reducerTF.attr('disabled', false);
			} else {
				_this.reducerTF.attr('required', false);
				_this.reducerTF.trigger('focusout');
				_this.reducerTF.attr('disabled', true);
			};
		});
		_this.reducerTF.on('change', function () {
			if (_this.reducerCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		//_this.heatersTF.on('keyup', function () {
		//	if (_this.heatersCB.prop('checked')) {
		//		_this.updateTotals();
		//	}
		//});
		//_this.carwashCB.on('change', function () {
		//	_this.updateTotals();
		//});
		_this.showerCB.on('change', function () {
			_this.updateTotals();
			if (_this.showerCB.prop('checked')) {
				_this.showerSl.attr('required', true);
				_this.showerSl.trigger('change');
				_this.showerSl.attr('disabled', false);
			} else {
				_this.showerSl.attr('required', false);
				_this.showerSl.trigger('change');
				_this.showerSl.attr('disabled', true);
			};
		});
		_this.showerSl.on('change', function () {
			_this.updateTotals();
		});
		_this.teethCB.on('change', function () {
			_this.updateTotals();
			if (_this.teethCB.prop('checked')) {
				_this.teethTF.attr('required', true);
				_this.teethTF.trigger('focusout');
				_this.teethTF.attr('disabled', false);
			} else {
				_this.teethTF.attr('required', false);
				_this.teethTF.trigger('focusout');
				_this.teethTF.attr('disabled', true);
			};
		});
		_this.teethTF.on('keyup', function () {
			if (_this.teethCB.prop('checked')) {
				_this.updateTotals();
			}
		});
		// _this.reducerTF.on('change', function () {
		// 	if (_this.reducerCB.prop('checked')) {
		// 		_this.updateTotals();
		// 	}
		// });
		_this.toiletCB.on('change', function () {
			_this.updateTotals();
		});
		_this.teethCB.on('change', function () {
			_this.updateTotals();
		});
	};

	J41.prototype.updateTotals = function() {
		var _this = this,
			eTotal = 0,
			wTotal = 0,
			v;

		if (_this.numBulbsCB.prop('checked')) {
			v = parseFloat(_this.numBulbsTF.val())*100.00;
			eTotal += !isNaN(v) ? v : 0;
		}
		if (_this.airConTempCB.prop('checked')) {
		    v = parseFloat(_this.airConTempTF.val())*960.00;
			eTotal += !isNaN(v) ? v : 0;
			//eTotal += parseFloat(_this.airConTempCB.val());
		}
		if (_this.airConMaintCB.prop('checked')) {
		    //eTotal += parseFloat(_this.airConMaintCB.val());
		    v = parseFloat(_this.airConMaintTF.val())*420;
			eTotal += !isNaN(v) ? v : 0;
		}
		if (_this.dryerCB.prop('checked')) {
		    //eTotal += parseFloat(_this.dryerCB.val());
		    eTotal += parseFloat(275);
		}
		if (_this.heatersCB.prop('checked')) {
			v = parseFloat(_this.heatersTF.val())*420;
			eTotal += !isNaN(v) ? v : 0;
		}
		//if (_this.carwashCB.prop('checked')) {
		//	wTotal += parseFloat(_this.carwashCB.val());
		//}
		if (_this.showerCB.prop('checked')) {
			v = parseFloat(_this.showerSl.val())*2190;
			wTotal += !isNaN(v) ? v : 0;
		}
		if (_this.reducerCB.prop('checked')) {
			v = parseFloat(_this.reducerTF.val())*10950;
			wTotal += !isNaN(v) ? v : 0;
		}
		if (_this.toiletCB.prop('checked')) {
		    wTotal += parseFloat(547.5);
		    //wTotal += parseFloat(_this.toiletCB.val());
		}
		if (_this.teethCB.prop('checked')) {
			v = parseFloat(_this.teethCB.val())*parseFloat(_this.teethTF.val());
			wTotal += !isNaN(v) ? v : 0;
		}

		//console.log(eTotal, wTotal);

		// kgs of CO2
		var eCO2 = Math.round(eTotal * 0.4178);
		var gallon = Math.round(wTotal / 4.546);
		var wCO2 = Math.round(gallon * 0.0242818);

		// rounding
		eTotal = Math.round(eTotal);
		wTotal = Math.round(wTotal);

		//console.log(eTotal, wTotal);

		_this.kgCO2_TF.val(eCO2 + wCO2);
		_this.kwe_TF.val(eTotal);
		_this.gw_TF.val(Math.round(wTotal / 1000));
		_this.tro.val(Math.round(_this.kgCO2_TF / 22));
		_this.led.val(Math.round(eTotal/16.2));
		_this.wBottle.val(Math.round(wTotal*9.09218));
		//var waterTotal = Math.round(wTotal / 4.546);
		//_this.gw_TF.val(Math.round(waterTotal * 0.024221));
	};

	return J41;
});

define('../src/journeys/j68a-residential-consumer-awards/j68a-residential-consumer-awards',['jquery'], function ($) {

	'use strict';

	var J68a = function ($journey) {

		this.$journey = $journey;

		return this;
	};

	J68a.prototype.init = function() {
		var lang = ($('html').attr('dir') == 'rtl') ? 'ar' : 'en';
		var script = document.createElement( 'script' );
		script.type = 'text/javascript';
		script.src = 'https://www.google.com/recaptcha/api.js?hl=' + lang;
		document.body.appendChild( script );

		document.forms['j68a-1-form'].onsubmit = function(e) {
			e.preventDefault();
			if (grecaptcha.getResponse()) {
				$('.g-recaptcha div[style="width: 304px; height: 78px;"]').removeClass('error');
				document.forms['j68a-1-form'].submit();
			} else {
				$('.g-recaptcha div[style="width: 304px; height: 78px;"]').addClass('error');
			}
		};
	};

	return J68a;
});
define('../src/journeys/j68b-facility-management-awards/j68b-facility-management-awards',['jquery'], function ($) {

	'use strict';

	var J68b = function ($journey) {

		this.$journey = $journey;

		return this;
	};

	J68b.prototype.init = function() {
		var lang = ($('html').attr('dir') == 'rtl') ? 'ar' : 'en';
		var script = document.createElement( 'script' );
		script.type = 'text/javascript';
		script.src = 'https://www.google.com/recaptcha/api.js?hl=' + lang;
		document.body.appendChild( script );

		document.forms['j68b-3-form'].onsubmit = function(e) {
			e.preventDefault();
			if (grecaptcha.getResponse()) {
				$('.g-recaptcha div[style="width: 304px; height: 78px;"]').removeClass('error');
				document.forms['j68b-3-form'].submit();
			} else {
				$('.g-recaptcha div[style="width: 304px; height: 78px;"]').addClass('error');
			}
		};
	};


	return J68b;
});
define('../src/journeys/j68c-conservation-team-awards/j68c-conservation-team-awards',['jquery'], function ($) {

	'use strict';

	var J68b = function ($journey) {

		this.$journey = $journey;

		return this;
	};

	J68b.prototype.init = function() {
		var lang = ($('html').attr('dir') == 'rtl') ? 'ar' : 'en';
		var script = document.createElement( 'script' );
		script.type = 'text/javascript';
		script.src = 'https://www.google.com/recaptcha/api.js?hl=' + lang;
		document.body.appendChild( script );

		document.forms['j68c-1-form'].onsubmit = function(e) {
			e.preventDefault();
			if (grecaptcha.getResponse()) {
				$('.g-recaptcha div[style="width: 304px; height: 78px;"]').removeClass('error');
				document.forms['j68c-1-form'].submit();
			} else {
				$('.g-recaptcha div[style="width: 304px; height: 78px;"]').addClass('error');
			}
		};
	};

	return J68b;
});
define('../src/journeys/j69-dashboard/j69-dashboard',['jquery', 'slick', 'lib/utils', 'parsley', 'chart-config'], function($, slick, utils) {

    'use strict';

    var J69 = function($journey) {
        this.$journey = $journey;
        return this;

    };

    J69.prototype.init = function() {
        var _this = this;

        this.labels = "";

        if ($(this.$journey).find('.j69-dashboard--customer_labels').attr('data-labels') != null || $(this.$journey).find('.j69-dashboard--customer_labels').attr('data-labels') != undefined) {
            this.labels = JSON.parse($(this.$journey).find('.j69-dashboard--customer_labels').attr('data-labels'));
        }

        this.details_collapsable();
        this.otp();



        $('.form-field--select').find('.relationship').each(function() {
            $(this).off('change.relationship').on('change.relationship', function() {
                if ($(this).val() == '09') {
                    $(this).closest('.j69-customer--details_forms').find('.relationship-others').show();
                } else {
                    $(this).closest('.j69-customer--details_forms').find('.relationship-others').hide();
                }
            });
        });

        this.$journey.find('.j69-customer--add_fam').off('click.add').on('click.add', function() {
            var __this = this,
                famemname = _this.labels.famemname,
                famemres = _this.labels.famemres,
                reside_label = _this.labels.reside_label,
                reside_option = $('.j69-customer--reside_option').html(),
                rela_option = $('.j69-customer--rela_option').html(),
                mem_namelabel = _this.labels.mem_namelabel,
                mem_namepholder = _this.labels.mem_namepholder,
                req_label = _this.labels.req_label,
                rela_label = _this.labels.rela_label,
                cat_label = _this.labels.cat_label,
                hasPOD_label = _this.labels.hasPOD_label,
                hasPMI_label = _this.labels.hasPMI_label,
                medeq_label = _this.labels.medeq_label,
                podcard_label = _this.labels.podcard_label,
                mdcard_label = _this.labels.mdcard_label,
                srcard_label = _this.labels.srcard_label,
                podeidcard_label = _this.labels.podeidcard_label,
                mdeidcard_label = _this.labels.mdeidcard_label,
                sreidcard_label = _this.labels.sreidcard_label,
                podcard_pholder = _this.labels.podcard_pholder,
                preview_path = _this.labels.preview_path,
                eidfile_label = _this.labels.eidfile_label,
                choose_label = _this.labels.choose_label,
                uploadformat_msg = _this.labels.uploadformat_msg,
                uploadfile_msg = _this.labels.uploadfile_msg,
                remove_label = _this.labels.remove_label,
                upload_note = _this.labels.upload_note,
                yes = _this.labels.yes,
                no = _this.labels.no,
                target1 = utils.uniqueID(),
                target2 = utils.uniqueID(),
                reside_id = utils.uniqueID(),
                cat_radioID = utils.uniqueID(),
                rela_ID = utils.uniqueID(),
                fam_pod = utils.uniqueID(),
                fam_pmi = utils.uniqueID(),
                dis_typeID = utils.uniqueID(),
                medsit_ID = utils.uniqueID(),
                medeq_ID = utils.uniqueID(),
                podcard_ID = utils.uniqueID(),
                eidfile_ID = utils.uniqueID(),
                podcardfile_ID = utils.uniqueID(),
                memeidcardfile_ID = utils.uniqueID(),
                fieldset_ID = utils.uniqueID(),
                mem_nameID = utils.uniqueID();

            var $clonedmed = _this.$journey.find('.j69-customer--med_issues').clone(),
                $clonedpod = _this.$journey.find('.j69-customer--pod_issues').clone(),
                $clonedmedeq = _this.$journey.find('.j69-customer--med_equipment').clone(),
                $clonedmedpod = _this.$journey.find('.j69-customer--medpod_issues').clone();

            $clonedmed.find('.form-field__input').each(function(index) {
                $(this).attr('aria-describedby', 'description-for-' + medsit_ID);
                $(this).attr('data-parsley-errors-container', '#description-for-' + medsit_ID);
                $(this).attr('id', 'form-field-' + medsit_ID + index.toString());
            });
            $clonedmed.find('label').each(function(index) {
                $(this).attr('for', 'form-field-' + medsit_ID + index.toString());
            });

            $clonedpod.find('.form-field__input').each(function(index) {
                $(this).attr('aria-describedby', 'description-for-' + dis_typeID);
                $(this).attr('data-parsley-errors-container', '#description-for-' + dis_typeID);
                $(this).attr('id', 'form-field-' + dis_typeID + index.toString());
            });
            $clonedpod.find('label').each(function(index) {
                $(this).attr('for', 'form-field-' + dis_typeID + index.toString());
            });

            $clonedmedeq.find('.form-field__input').each(function(index) {
                $(this).attr('aria-describedby', 'description-for-' + medeq_ID);
                $(this).attr('data-parsley-errors-container', '#description-for-' + medeq_ID);
                $(this).attr('id', 'form-field-' + medeq_ID + index.toString());
            });
            $clonedmedeq.find('label').each(function(index) {
                $(this).attr('for', 'form-field-' + medeq_ID + index.toString());
            });
            $clonedmedeq.find('.form-field__messages').each(function() {
                $(this).attr('id', 'description-for-' + medeq_ID);
            });

            $clonedmedpod.find('.form-field__input').each(function(index) {
                $(this).attr('aria-describedby', 'description-for-' + cat_radioID);
                $(this).attr('data-parsley-errors-container', '#description-for-' + cat_radioID);
                $(this).attr('id', 'form-field-' + cat_radioID + index.toString());
                $(this).attr('name', cat_radioID);
                $(this).attr('data-parsley-multiple', cat_radioID);
            });
            $clonedmedpod.find('label').each(function(index) {
                $(this).attr('for', 'form-field-' + cat_radioID + index.toString());
            });

            $clonedmed.find('.form-field__messages').attr('id', 'description-for-' + medsit_ID);
            $clonedpod.find('.form-field__messages').attr('id', 'description-for-' + dis_typeID);
            $clonedmedpod.find('.form-field__messages').attr('id', 'description-for-' + cat_radioID);

            $clonedmed = $clonedmed.wrap('<div></div>');
            $clonedpod = $clonedpod.wrap('<div></div>');
            $clonedmedpod = $clonedmedpod.wrap('<div></div>');

            var customer_field = '<div class="j69-customer--details_field--remove icon-new-bin"></div><fieldset id="' + fieldset_ID + '" class="j69-customer--details_field form-field"> <div class="j69-customer--details_title"> <div class="j69-customer--details_name" id="' + target1 + '" binding-default="' + famemname + '">' + famemname + '</div> <div class="j69-customer--details_account" id="' + target2 + '" binding-default="' + famemres + '">' + famemres + '</div> </div> <div class="j69-customer--details_forms"> <div class="form-field form-field--select form-field--select-single"> <label for="form-field-' + reside_id + '" class="form-field__label"> ' + reside_label + ' </label> <span class="form-field__input-wrapper form-field__input-wrapper--select"> <select class="form-field__input form-field__input--select form-field__input--select-full form-field__input--text-binded reside_dp" required  data-parsley-required-message="' + req_label + '" id="form-field-' + reside_id + '" name="select" aria-describedby="description-for-' + reside_id + '" binding-target="#' + target2 + '" data-parsley-errors-container="#description-for-' + reside_id + '" data-parsley-trigger="change" data-parsley-id="28" required=""> ' + reside_option + ' </select> </span> <div id="description-for-' + reside_id + '" class="form-field__messages"> </div> </div> <div class="form-field form-field--text"> <label for="form-field-' + mem_nameID + '" class="form-field__label"> ' + mem_namelabel + ' </label> <span class="form-field__input-wrapper"> <input class="form-field__input form-field__input--text form-field__input--text-binded fam_name" maxlength="50" id="form-field-' + mem_nameID + '" binding-target="#' + target1 + '" name="mem_name" type="text" placeholder="' + mem_namepholder + '" aria-describedby="description-for-' + mem_nameID + '" data-parsley-errors-container="#description-for-' + mem_nameID + '" required="" data-parsley-required-message="' + req_label + '" data-parsley-trigger="focusout"> </span> <div id="description-for-' + mem_nameID + '" class="form-field__messages"> </div> </div> <div class="form-field form-field--select form-field--select-single"> <label for="form-field-' + rela_ID + '" class="form-field__label"> ' + rela_label + ' </label> <span class="form-field__input-wrapper form-field__input-wrapper--select"> <select class="form-field__input form-field__input--select form-field__input--select-full relationship" data-parsley-required-message="' + req_label + '" id="form-field-' + rela_ID + '" name="select" aria-describedby="description-for-' + rela_ID + '" data-parsley-errors-container="#description-for-' + rela_ID + '" data-parsley-trigger="change" data-parsley-id="28" required=""> ' + rela_option + ' </select> </span> <div id="description-for-' + rela_ID + '" class="form-field__messages"> </div> </div> ' + $clonedmedpod.html() + ' <div class="form-field form-field--toggles target01"> ' + $clonedpod.html() + ' </div> <div class="target02 form-field" style="display: none;"> <div class="form-field form-field--toggles"> ' + $clonedmed.html() + ' </div> ' + $clonedmedeq.html() + ' </div> <div class="form-field form-field--text"> <label for="form-field-' + podcard_ID + '" class="form-field__label"> ' + podcard_label + ' </label> <span class="form-field__input-wrapper"> <input class="form-field__input form-field__input--text pod_num" id="form-field-' + podcard_ID + '" name="podid" data-parsley-maxnumber="15" type="number" placeholder="' + podcard_pholder + '" aria-describedby="description-for-' + podcard_ID + '" data-parsley-errors-container="#description-for-' + podcard_ID + '" required="" data-parsley-required-message="' + req_label + '" data-parsley-trigger="focusout"> </span> <div id="description-for-' + podcard_ID + '" class="form-field__messages"> </div> </div> <div class="form-field form-field--upload"> <div class="form-field__input-wrapper"> <div class="form-field__preview-wrapper"> <img src="' + preview_path + '" data-src="' + preview_path + '" data-success="../../images/upload_success.png" class="form-field__preview" aria-hidden="true" role="presentation" alt="alt text" data-uploader-image="' + podcardfile_ID + '"> </div> <div class="form-field__uploader-details"> <label for="form-field-' + podcardfile_ID + '" class="target01 form-field__label"> ' + podcard_label + ' </label><label for="form-field-' + podcardfile_ID + '" class="target02 form-field__label"> ' + mdcard_label + ' </label><label for="form-field-' + podcardfile_ID + '" class="form-field__label target03"> ' + srcard_label + ' </label> <div> <label> <input class="form-field__input form-field__input--upload senior_file" id="form-field-' + podcardfile_ID + '" name="tlupload' + podcardfile_ID + '" type="file" aria-describedby="description-for-' + podcardfile_ID + '" data-parsley-errors-container="#description-for-' + podcardfile_ID + '" required="" data-parsley-required-message="' + req_label + '" data-uploader-field="' + podcardfile_ID + '" accept="image/*" data-accepts="&quot;jpg&quot;, &quot;bmp&quot;,&quot;gif&quot;,&quot;png&quot;,&quot;jpeg&quot;,&quot;pdf&quot;,&quot;doc&quot;,&quot;docx&quot;,&quot;xls&quot;,&quot;csv&quot;, &quot;xlsx&quot;" data-size="2048000" data-parsley-trigger="focusout" data-parsley-id="18"> <span class="button button--primary button--next button--small focus-enabled" data-uploader-button="upload-choose">' + choose_label + '</span> </label> </div> <p class="form-field__input--upload-format-error-message" data-uploader-format-error="error-message">' + uploadformat_msg + '</p> <p class="form-field__input--upload-size-error-message" data-uploader-size-error="error-message">' + uploadfile_msg + '</p> <p class="form-field__input--upload-filename" data-uploader-filename="' + podcardfile_ID + '"></p> <p> <button class="button button--text button--remove hidden" data-uploader-remove="' + podcardfile_ID + '">' + remove_label + '</button> </p> </div> </div> <div id="description-for-' + podcardfile_ID + '" class="form-field__messages"> <p class="form-field__description">' + upload_note + '</p> </div> </div> </div> </fieldset>'

            $(this).closest('.link').before(customer_field);
            _this.details_collapsable();

            $('#' + fieldset_ID).find('.form-field__radio--toggle').find('.form-field__input--radio').each(function() {
                var radioTarget = $(this).attr('toggle-target'),
                    replaceID = utils.uniqueID();

                if (radioTarget != undefined && radioTarget != "") {
                    $(radioTarget).removeClass(radioTarget.slice(1)).addClass(replaceID);
                    $(this).attr('toggle-target', '.' + replaceID)
                };
            });

            $('#' + fieldset_ID).find('.form-field__input--checkbox--toggle').each(function() {
                var boxTarget = $(this).attr('toggle-target'),
                    replaceID = utils.uniqueID();

                if (boxTarget != undefined && boxTarget != "") {
                    $(boxTarget).removeClass(boxTarget.slice(1)).addClass(replaceID);
                    $(this).attr('toggle-target', '.' + replaceID)
                };
            });

            $('.form-field--select').find('.relationship').each(function() {
                $(this).off('change.relationship').on('change.relationship', function() {
                    if ($(this).val() == '09') {
                        $(this).closest('.j69-customer--details_forms').find('.relationship-others').show();
                    } else {
                        $(this).closest('.j69-customer--details_forms').find('.relationship-others').hide();
                    }
                });
            });

            $(window).trigger('form_reinit');
            $('[ data-parsley-maxnumber ]').on('keypress.truncate', function() {
                truncateVal($(this), parseInt($(this).attr('data-parsley-maxnumber')));
            });

            function truncateVal(target, len) {
                if (target.val().length >= len) {
                    window.setTimeout(function() {
                        target.val(target.val().substring(0, (len)));
                    }, 5);
                }
            }

            setTimeout(function() {
                $(__this).closest('.link').prev().find('.form-field__input--select.form-field__input--text-binded').trigger('change');
            }, 300);

        });
        //this.$journey.find('.j69-customer--add_fam').click();
        $(window).off('j69-customer_reinit').on('j69-customer_reinit', function() {
            _this.init();
        });


        $('.fieldset-edit-beneficiary-item-form input').keypress(function (e) {
            var keys = [3, 9, 12, 13, 16, 17, 18, 19, 20, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46 ];
            if(keys.indexOf(e.which) < 0){
                $(this).closest('.fieldset-edit-beneficiary-item').find('.form-field__button').removeClass('hidden')

            }
        })

        $('.btn-reset').unbind('click').click(function(e){


            e.preventDefault()
            var thisItem = $(this).closest('.fieldset-edit-beneficiary-item'),
                thisItemName = thisItem.find('.fieldset-edit-beneficiary-item-name input'),
                thisItemAc = thisItem.find('.fieldset-edit-beneficiary-item-account input');
            
            thisItemAc.val(thisItemAc.data('default-value'))
            thisItemName.val(thisItemName.data('default-value'))
            $(this).closest('.fieldset-edit-beneficiary-item').find('.form-field__button').addClass('hidden')
            
        })

        $('.add-button').unbind('click').click(function(e){

            $(this).closest('form').parsley().validate()
            if($(this).closest('form').parsley().isValid()){
                e.preventDefault()

            var thisWrapper = $(this).closest('.fieldset-add-beneficiary'),
                thisFromNameLabel = thisWrapper.find('.fieldset-edit-beneficiary-item-name label').text(),
                thisFromNameVal = thisWrapper.find('.fieldset-edit-beneficiary-item-name input').val(),
                thisFromAcLabel = thisWrapper.find('.fieldset-edit-beneficiary-item-account label').text(),
                thisFromAcVal = thisWrapper.find('.fieldset-edit-beneficiary-item-account input').val(),
                thisModal  = thisWrapper.find('.m39-modal'),
                modalTrigger = thisModal.find('.m39-modal__trigger'),
                modalContant = thisModal.find('.m39-modal__content'),
                modalItem = modalContant.find('.fieldset-edit-beneficiary-item-value'),
                html = "<dl><dt class='m42-keyvalue__key'><strong>"+ thisFromNameLabel + "</strong></dt> <dd class='m42-keyvalue__value m42-keyvalue__value--secondary'>"+thisFromNameVal+"</dd><dt class='m42-keyvalue__key'><strong>"+thisFromAcLabel+"</strong></dt> <dd class='m42-keyvalue__value m42-keyvalue__value--secondary'>"+ thisFromAcVal +"</dd></dl>"

                modalItem.empty()
                modalItem.append(html)
                modalTrigger.trigger('click') 
            }
               
        })

        $('.save-button').unbind('click').click(function(e){
            e.preventDefault()

            var thisWrapper = $(this).closest('.fieldset-edit-beneficiary-wrapper'),
                thisItem = $(this).closest('.fieldset-edit-beneficiary-item'),
                thisFromNameLabel = thisItem.find('.fieldset-edit-beneficiary-item-name label').text(),
                thisFromNameVal = thisItem.find('.fieldset-edit-beneficiary-item-name input').val(),
                thisFromAcLabel = thisItem.find('.fieldset-edit-beneficiary-item-account label').text(),
                thisFromAcVal = thisItem.find('.fieldset-edit-beneficiary-item-account input').val(),
                thisModal  = thisWrapper.find('.m39-modal'),
                modalTrigger = thisModal.find('.m39-modal__trigger'),
                modalTitle = thisModal.find('.m39-modal__title'),
                modalTitleSave = thisModal.find('.save-title'),
                modalBtn = thisModal.find('.btn'),
                modalBtnSave = thisModal.find('.add-btn'),
                modalContant = thisModal.find('.m39-modal__content'),
                modalItem = modalContant.find('.fieldset-edit-beneficiary-item-value'),
                html = "<dl><dt class='m42-keyvalue__key'><strong>"+ thisFromNameLabel + "</strong></dt> <dd class='m42-keyvalue__value m42-keyvalue__value--secondary'>"+thisFromNameVal+"</dd><dt class='m42-keyvalue__key'><strong>"+thisFromAcLabel+"</strong></dt> <dd class='m42-keyvalue__value m42-keyvalue__value--secondary'>"+ thisFromAcVal +"</dd></dl>"

                modalItem.empty()
                modalTitle.addClass('hidden')
                modalBtn.addClass('hidden')
                modalBtnSave.removeClass('hidden')
                modalTitleSave.removeClass('hidden')
                modalItem.append(html)
                modalTrigger.trigger('click')    
        })

        



        $('.fieldset-edit-beneficiary-item-button-delete').unbind('click').click(function(e){
            e.preventDefault()

            var thisWrapper = $(this).closest('.fieldset-edit-beneficiary-wrapper'),
                thisItem = $(this).closest('.fieldset-edit-beneficiary-item'),
                thisFrom = thisWrapper.find('.fieldset-edit-beneficiary'),
                thisFromReset = thisFrom.find('.btn-reset'),
                thisModal  = thisWrapper.find('.m39-modal'),
                modalTrigger = thisModal.find('.m39-modal__trigger'),
                modalTitle = thisModal.find('.m39-modal__title'),
                modalTitleDe = thisModal.find('.delete-title');
                

                thisFromReset.trigger('click');

            var thisFromNameLabel = thisItem.find('.fieldset-edit-beneficiary-item-name label').text(),
                thisFromNameVal = thisItem.find('.fieldset-edit-beneficiary-item-name input').val(),
                thisFromAcLabel = thisItem.find('.fieldset-edit-beneficiary-item-account label').text(),
                thisFromAcVal = thisItem.find('.fieldset-edit-beneficiary-item-account input').val(),
                modalBtn = thisModal.find('.btn'),
                modalBtnRemove = thisModal.find('.remove-btn'),
                modalContant = thisModal.find('.m39-modal__content'),
                modalItem = modalContant.find('.fieldset-edit-beneficiary-item-value'),
                html = "<dl><dt class='m42-keyvalue__key'><strong>"+ thisFromNameLabel + "</strong></dt> <dd class='m42-keyvalue__value m42-keyvalue__value--secondary'>"+thisFromNameVal+"</dd><dt class='m42-keyvalue__key'><strong>"+thisFromAcLabel+"</strong></dt> <dd class='m42-keyvalue__value m42-keyvalue__value--secondary'>"+ thisFromAcVal +"</dd></dl>";

                modalItem.empty()
                modalTitle.addClass('hidden')
                modalBtn.addClass('hidden')
                modalBtnRemove.removeClass('hidden')
                modalTitleDe.removeClass('hidden')
                modalItem.append(html)
                modalTrigger.trigger('click')    
        })

        
            
        
    };

    J69.prototype.details_collapsable = function() {
        var _this = this;

        this.$journey.find('.j69-customer--details_field').each(function() {
            var $title = $(this).find('.j69-customer--details_title'),
                $remove = $(this).prev('.j69-customer--details_field--remove'),
                tthis = this,
                $form = $(this).find('.j69-customer--details_forms');

            $title.off('click').on('click', function() {
                $(this).toggleClass('collapsed');
                $form.toggleClass('hidden');
                $(this).closest('.fieldset--collapsable').trigger('DOMSubtreeModified');
            });

            //$remove.off('click').on('click', function() {
            //    $(tthis).remove();
            //    $(this).remove();
            //});
        });
    };

    J69.prototype.otp = function() {
        var _this = this,
            $field = $('.form-field--otp'),
            $input = $field.find('.form-field__input--otp'),
            i,
            $inputMain = $field.find('.form-field__input--otp_main');

        $input.each(function(index) {
            var $i = $(this);

            $i.off('keyup.otp').on('keyup.otp', function() {
                if ($i.val().length > 0) {
                    $i.focusout();
                    $i.closest('.form-field__input-wrapper_otp').next().find('.form-field__input--otp').focus();
                    i = index
                };
            });;
        });

        $(".form-field__input--otp").on('keyup blur', function() {
            var OTPValue = '';

            $.each($(".form-field__input--otp"), function() {
                OTPValue += $(this).val();
            });

            $(".form-field__input--otp_main").val(OTPValue);
            if (i == $input.length - 1) {
                $field.closest('.form').submit();
            };
        });

    };

    return J69;
});

define( '../src/journeys/j75-request-temp-connection/j75-request-temp-connection',[ 'jquery' ], function ( $ ) {

	'use strict';

	var RequestTempConnection = function ( $journey ) {

		this.$journey = $journey;

		return this;
	};

	RequestTempConnection.prototype.init = function () {

		var self = this;

		this.$eventSelect = this.$journey.find( 'select[name=eventType]' );
		this.$startDateField = $( '#form-field-picker_start_date' );
		this.$endDateField = $( '#form-field-picker_end_date' );
		this.$startDateContainer = $( '#datepicker-container-picker_start_date' );
		this.$endDateContainer = $( '#datepicker-container-picker_end_date' );

		this.startPickerOptions = this.$startDateField.data( 'picker-options' );
		this.startDatePicker = this.$startDateField.pickadate( 'picker' );
		this.endDatePicker = this.$endDateField.pickadate( 'picker' );

		this.disableDateFields();

		this.$eventSelect.on( 'change', function () {
			self.eventSelected();
		} );

		if (this.$eventSelect.find(':selected').val().length) {
			self.eventSelected();
		}

		try{
			this.startDatePicker.on( {
				set: function ( props ) {
					self.startDateSelected( props );
				}
			} );
		} catch(err){}

	};

	RequestTempConnection.prototype.startDateSelected = function ( props ) {

		var dateSelected, endMaxDate, endDate = new Date( this.$endDateField.val() );

		if ( props.select !== undefined ) {

			dateSelected = new Date( props.select );
			endMaxDate = this.addDays( dateSelected, 6 );

			if ( dateSelected.getTime() > endDate.getTime() || endDate.getTime() > endMaxDate.getTime() ) {
				this.resetDateField( this.$endDateField );
				this.endDatePicker.clear();
			}

			this.setPickerDate( this.endDatePicker, 'min', dateSelected );
			this.setPickerDate( this.endDatePicker, 'max', endMaxDate );

		}

	};

	RequestTempConnection.prototype.eventSelected = function () {

		var value = this.$eventSelect.val(),
			defaultMinDate,
			startMinDate;

		this.isWedding = value === 'Wedding';

		if ( this.startPickerOptions.defaultMin === undefined ) {

			this.startPickerOptions.defaultMin = this.startPickerOptions.min;
		}

		if ( this.startPickerOptions.defaultMax === undefined ) {

			this.startPickerOptions.defaultMax = this.startPickerOptions.max;
		}

		defaultMinDate = new Date( this.startPickerOptions.defaultMin[ 0 ], this.startPickerOptions.defaultMin[ 1 ], this.startPickerOptions.defaultMin[ 2 ] );

		this.resetDateField( this.$startDateField );
		this.resetDateField( this.$endDateField );
		try{
			this.startDatePicker.set( 'highlight', false );
			this.startDatePicker.clear();
			this.endDatePicker.set( 'highlight', false );
			this.endDatePicker.clear();
		} catch(e){}

		if ( value === '' ) {

			this.disableDateFields();

		} else {

			this.$startDateContainer.removeClass( 'form-field--disabled' );
			this.$endDateContainer.removeClass( 'form-field--disabled' );

			this.$startDateField.prop( 'disabled', false );
			this.$endDateField.prop( 'disabled', false );

			if ( this.isWedding ) {

				startMinDate = this.addDays( defaultMinDate, 4 );

			} else {

				startMinDate = defaultMinDate;

			}

			this.setPickerDate( this.startDatePicker, 'min', startMinDate );
			this.setPickerDate( this.endDatePicker, 'min', startMinDate );

			if( !this.startDatePicker.get() ) {
				this.startDatePicker.set('select', startMinDate);
				this.startDatePicker.set('clear');
			}
		}

	};

	RequestTempConnection.prototype.setPickerDate = function ( picker, prop, date ) {
		try{
			picker.set( prop, [ date.getFullYear(), date.getMonth(), date.getDate() ] );
		} catch(e){}
	};

	RequestTempConnection.prototype.resetDateField = function ( $field ) {

		$field.val( '' ).parent().removeClass( 'form-field__input-wrapper--validated' );
	};

	RequestTempConnection.prototype.disableDateFields = function () {

		this.$startDateField.prop( 'disabled', true );
		this.$endDateField.prop( 'disabled', true );
		this.$startDateContainer.addClass( 'form-field--disabled' );
		this.$endDateContainer.addClass( 'form-field--disabled' );
	};

	RequestTempConnection.prototype.addDays = function ( date, days ) {

		var result = new Date( date );
		result.setDate( result.getDate() + days );

		return result;

	};

	return RequestTempConnection;
} );

define('../src/journeys/j87-partnership-services/j87-partnership-services',['jquery'], function ($) {

	'use strict';

	var J87 = function ($journey) {

		this.$journey = $journey;

		return this;
	};

	J87.prototype.init = function() {
		var _this = this;
		_this.$modal = $('.j87-partnership-services__modal');
		$(this.$journey).find('.partner-document-list__item-document--delete').on('click', function () {
			$('body').addClass('modal-open');
			_this.$modal.fadeIn();
		})
		$(this.$journey).find('.j87-partnership-services__modal--button-confirm button').on('click', function () {
			$('body').removeClass('modal-open');
			_this.$modal.fadeOut(400, function () {
				$(this).closest('form').submit();
			});
		})
		$(this.$journey).find('.j87-partnership-services__modal--button-cancel button').on('click', function (e) {
			e.preventDefault();
			e.stopPropagation();
			e.stopImmediatePropagation();
			$('body').removeClass('modal-open');
			_this.$modal.fadeOut();
		})
	};

	return J87;
});
define('../src/journeys/j92-roadwork-locations/j92-roadwork-locations',['jquery'], function ($) {

	'use strict';

	var J92_ROADWORKS_MAP = function ($journey) {

		this.$journey = $journey;

		return this;
	};

	J92_ROADWORKS_MAP.prototype.init = function() {
		var _this = this;
			_this.labels = this.$journey.data('labels');

		// listen for mapLoaded event
		$(window).on('mapLoaded', function(){
			_this.map = window.MAP.map;
			_this.populateMap();

			_this.centerPoint = _this.map.getCenter();
			_this.map.addListener('dragend', function () {
				_this.map.setCenter(_this.map.getCenter());
				_this.centerPoint = _this.map.getCenter();
			});
		});

		$(window).on('resize orientationchange', function () {
			setTimeout(function () {
				_this.map.setCenter(_this.centerPoint);
			},10);
		});
	};

	J92_ROADWORKS_MAP.prototype.showInfoWindow = function(m) {
		var _this = this;
		var contentString  = '<div class="m32-map__infowindow-container">';
			if (m.city) {
				contentString += '<strong>'+ m.city+'</strong><br/>';
			} else if (m.street){
				contentString += '<strong>'+ m.street+'</strong><br/>';
			}
			contentString += m.start+' - '+ m.end+'<i class="icon-Understanding_Your_Bill"></i>';
			contentString += '</div>';
		_this.currentMarker = m;
		_this.infowindow.close();
		_this.infowindow = new google.maps.InfoWindow({
			content: contentString,
			maxWidth: 200
		});
		_this.infowindow.open(_this.map, m);
		$('.m32-map__infowindow-container').closest('.gm-style-iw').next('div').css('display','none');
		$('.m32-map__infowindow-container').on('click', function () {

			_this.showMoreInfo(m);
		});

	};

	J92_ROADWORKS_MAP.prototype.showMoreInfo = function(m) {
		var labels = this.labels;
		var el = $(this.$journey).find('.m42-keyvalue dl'),
			contentString = '';
		
			if (m.street) {
				contentString += '<dt class="m42-keyvalue__key m42-keyvalue__key--secondary">'+ labels.streetLabel +'</dt>';
				contentString += '<dd class="m42-keyvalue__value m42-keyvalue__value--secondary">'+ m.street+'</dd>';
			}
			if (m.city) {
				contentString += '<dt class="m42-keyvalue__key m42-keyvalue__key--secondary">'+ labels.cityLabel+'</dt>';
				contentString += '<dd class="m42-keyvalue__value m42-keyvalue__value--secondary">'+ m.city+'</dd>';
			}
			contentString += '<dt class="m42-keyvalue__key m42-keyvalue__key--secondary">'+ labels.disruptionLabel+'</dt>';
			contentString += '<dd class="m42-keyvalue__value m42-keyvalue__value--secondary">'+ m.disruption+'</dd>';
			contentString += '<dt class="m42-keyvalue__key m42-keyvalue__key--secondary">'+ labels.startLabel+'</dt>';
			contentString += '<dd class="m42-keyvalue__value m42-keyvalue__value--secondary">'+ m.start+'</dd>';
			contentString += '<dt class="m42-keyvalue__key m42-keyvalue__key--secondary">'+ labels.endLabel+'</dt>';
			contentString += '<dd class="m42-keyvalue__value m42-keyvalue__value--secondary">'+ m.end+'</dd>';

			el.empty().html(contentString);
			el.closest('.grid__row--hidden').slideDown();
	};

	J92_ROADWORKS_MAP.prototype.populateMap = function() {
		var _this = this;
		var items = $(_this.$journey).data('locations').GetRoadWorkNotif.Item;
		_this.worksMarkers = [];
		_this.infowindow = new google.maps.InfoWindow({});

		for (var n=0 ; n<items.length; n++) {
			var marker = new google.maps.Marker({
				map: _this.map,
					position: {lat: parseFloat(items[n].X_COORDINATE), lng: parseFloat(items[n].Y_COORDINATE)},
				street: items[n].Street,
				city: items[n].CITY_NAME,
				start: items[n].START_DATE,
				end: items[n].END_DATE,
				disruption: items[n].DISRUPTION,
				index:n
			});

			if (n === 0) {
				_this.map.setCenter(marker.getPosition());
			}

			_this.worksMarkers.push(marker);
			_this.worksMarkers[n].addListener('click', function (e) {
				_this.map.setCenter(_this.worksMarkers[$(this)[0].index].getPosition());
				_this.showInfoWindow($(this)[0]);
			})

			marker.setVisible(true);
		}
		_this.map.addListener('click', function () {
			_this.infowindow.close();
			$('.m42-keyvalue dl').closest('.grid__row--hidden').slideUp();
		});

	};

	return J92_ROADWORKS_MAP;
});
define( '../src/sublayouts/_helpers/edit-toggle/edit-toggle',[ 'jquery', 'breakpoint', 'lib/utils', 'numeral' ], function ( $, breakpoint, utils ) {

	'use strict';

	/**
	 * Toggle menu - currently only triggers for mobile view only.
	 */

	var EditToggle = function ( $el ) {

		this.$el = $el;

		return this;
	};

	EditToggle.prototype.init = function () {

		//dom els
		this.$trigger = this.$el.find( '[data-edit-toggle-trigger]' );
		this.$fieldWrapper = this.$el.find( '[data-edit-toggle-field]' );
		this.$target = this.$el.find( '[data-edit-toggle-target]' );
		this.$input = this.$fieldWrapper.find( 'input' );
		this.$cancel = this.$el.find( '[data-edit-toggle-cancel]' );

		// classnames
		this.fieldOpenClassname = 'edit-toggle__field--open';
		this.originalAmount = parseFloat( this.$target.text() ).toFixed( 2 );

		// bind events
		this.$trigger.on( 'click', $.proxy( this.open, this ) );
		this.$cancel.on( 'click', $.proxy( this.close, this ) );
		this.$input.on( 'keyup', $.proxy( this.update, this ) );
	};

	EditToggle.prototype.open = function () {
		this.$trigger.hide();
		this.$fieldWrapper.addClass( this.fieldOpenClassname );
		this.$input.focus();
	};

	EditToggle.prototype.close = function () {
		this.$trigger.show();
		this.$input.val( '' );
		this.$target.text( numeral( this.originalAmount ).format('0,0.00') );
		this.$fieldWrapper.removeClass( this.fieldOpenClassname );
		this.$input.focus();
	};

	EditToggle.prototype.update = function () {
		this.$target.text( numeral( this.$input.val() ).format('0,0.00') );
	};

	return EditToggle;

} );

define( '../src/sublayouts/_helpers/spinner/spinner',[ 'jquery' ],
	function( $ ) {
		'use strict';

		var Spinner = function( $targetEl ) {

			this.$targetEl = $targetEl;
			return this;
		};

		Spinner.prototype.load = function() {

			this.$spinner = $( '<div class="spinner"></div>' );
			this.$targetEl.append( this.$spinner );
		};

		Spinner.prototype.unload = function() {

			this.$spinner.fadeOut( 200, $.proxy( this.destroy, this ) );
		};

		Spinner.prototype.destroy = function() {

			this.$spinner.remove();
		};

		return Spinner;

	} );

define( '../src/sublayouts/_helpers/toggle-menu/toggle-menu',[ 'jquery', 'breakpoint', 'lib/utils' ], function ( $, breakpoint, utils ) {

	'use strict';

	/**
	 * Toggle menu - currently only triggers for mobile view only.
	 */

	var ToggleMenu = function ( $component ) {

		this.$component = $component;

		return this;
	};

	ToggleMenu.prototype.init = function () {

		this.$trigger = this.$component.find( '[data-toggle-trigger="true"]' );
		this.$content = this.$component.find( '[data-toggle-content="true"]' );
		this.autoOpen = this.$component.data( 'toggle-auto-open' );

		this.activeClass = 'toggle-menu--active';
		this.activeToggleClass = 'toggle-menu__trigger--active';
		this.triggerBreakpoint = this.$component.data( 'toggle-breakpoint' ) === undefined ? 's' : this.$component.data( 'toggle-breakpoint' );

		this.respond();
		this.active = false;

		if ( this.triggerBreakpoint === 'l' ) {

			this.display();
			if ( this.autoOpen ) {
				this.toggle( this.$trigger.eq( 0 ) );
			}

		} else {

			$( breakpoint ).on( 'change', $.proxy( this.respond, this ) );
			$( window ).on( 'orientationchange', $.proxy( this.orientationchange, this ) );
		}
	};

	ToggleMenu.prototype.respond = function () {

		var self = this;

		if ( ( this.triggerBreakpoint === 's' && utils.breakpoint() === 's' ) || this.triggerBreakpoint === 'm' && ( utils.breakpoint() === 's' || utils.breakpoint() === 'm' ) ) {

			self.display();

		} else {

			this.reset();
		}

	};

	ToggleMenu.prototype.display = function () {

		var self = this;
		if ( !this.active ) {

			this.$component.addClass( this.activeClass );
			this.$content.hide();

			this.$trigger.on( 'click', function () {
				self.toggle( $( this ) );
			} );

			// test for empty toggles
			$.each( this.$trigger, function () {

				if ( $( this ).next().length === 0 ) {

					$( this ).addClass( 'toggle-menu__trigger--empty' ).attr( 'tabindex', '-1' );
					$( this ).off( 'click' );
				}
			} );

			this.active = true;
		}
	};

	ToggleMenu.prototype.toggle = function ( $toggle ) {

		var $currentContent = $toggle.next();
		this.$content.not( $currentContent ).hide();
		this.$trigger.not( $toggle ).removeClass( this.activeToggleClass );

		$toggle.toggleClass( this.activeToggleClass );
		$currentContent.toggle();

	};

	ToggleMenu.prototype.orientationchange = function () {

		this.reset();
		this.respond();
	};

	ToggleMenu.prototype.reset = function () {
		this.$component.removeClass( this.activeClass );
		this.$trigger.off();
		this.$trigger.removeClass( this.activeToggleClass );
		this.$content.removeAttr( 'style' );
		this.active = false;
	};

	return ToggleMenu;

} );

/*! iScroll v5.1.3 ~ (c) 2008-2014 Matteo Spinelli ~ http://cubiq.org/license */
(function (window, document, Math) {
var rAF = window.requestAnimationFrame	||
	window.webkitRequestAnimationFrame	||
	window.mozRequestAnimationFrame		||
	window.oRequestAnimationFrame		||
	window.msRequestAnimationFrame		||
	function (callback) { window.setTimeout(callback, 1000 / 60); };

var utils = (function () {
	var me = {};

	var _elementStyle = document.createElement('div').style;
	var _vendor = (function () {
		var vendors = ['t', 'webkitT', 'MozT', 'msT', 'OT'],
			transform,
			i = 0,
			l = vendors.length;

		for ( ; i < l; i++ ) {
			transform = vendors[i] + 'ransform';
			if ( transform in _elementStyle ) return vendors[i].substr(0, vendors[i].length-1);
		}

		return false;
	})();

	function _prefixStyle (style) {
		if ( _vendor === false ) return false;
		if ( _vendor === '' ) return style;
		return _vendor + style.charAt(0).toUpperCase() + style.substr(1);
	}

	me.getTime = Date.now || function getTime () { return new Date().getTime(); };

	me.extend = function (target, obj) {
		for ( var i in obj ) {
			target[i] = obj[i];
		}
	};

	me.addEvent = function (el, type, fn, capture) {
		el.addEventListener(type, fn, !!capture);
	};

	me.removeEvent = function (el, type, fn, capture) {
		el.removeEventListener(type, fn, !!capture);
	};

	me.prefixPointerEvent = function (pointerEvent) {
		return window.MSPointerEvent ?
			'MSPointer' + pointerEvent.charAt(9).toUpperCase() + pointerEvent.substr(10):
			pointerEvent;
	};

	me.momentum = function (current, start, time, lowerMargin, wrapperSize, deceleration) {
		var distance = current - start,
			speed = Math.abs(distance) / time,
			destination,
			duration;

		deceleration = deceleration === undefined ? 0.0006 : deceleration;

		destination = current + ( speed * speed ) / ( 2 * deceleration ) * ( distance < 0 ? -1 : 1 );
		duration = speed / deceleration;

		if ( destination < lowerMargin ) {
			destination = wrapperSize ? lowerMargin - ( wrapperSize / 2.5 * ( speed / 8 ) ) : lowerMargin;
			distance = Math.abs(destination - current);
			duration = distance / speed;
		} else if ( destination > 0 ) {
			destination = wrapperSize ? wrapperSize / 2.5 * ( speed / 8 ) : 0;
			distance = Math.abs(current) + destination;
			duration = distance / speed;
		}

		return {
			destination: Math.round(destination),
			duration: duration
		};
	};

	var _transform = _prefixStyle('transform');

	me.extend(me, {
		hasTransform: _transform !== false,
		hasPerspective: _prefixStyle('perspective') in _elementStyle,
		hasTouch: 'ontouchstart' in window,
		hasPointer: window.PointerEvent || window.MSPointerEvent, // IE10 is prefixed
		hasTransition: _prefixStyle('transition') in _elementStyle
	});

	// This should find all Android browsers lower than build 535.19 (both stock browser and webview)
	me.isBadAndroid = /Android /.test(window.navigator.appVersion) && !(/Chrome\/\d/.test(window.navigator.appVersion));

	me.extend(me.style = {}, {
		transform: _transform,
		transitionTimingFunction: _prefixStyle('transitionTimingFunction'),
		transitionDuration: _prefixStyle('transitionDuration'),
		transitionDelay: _prefixStyle('transitionDelay'),
		transformOrigin: _prefixStyle('transformOrigin')
	});

	me.hasClass = function (e, c) {
		var re = new RegExp("(^|\\s)" + c + "(\\s|$)");
		return re.test(e.className);
	};

	me.addClass = function (e, c) {
		if ( me.hasClass(e, c) ) {
			return;
		}

		var newclass = e.className.split(' ');
		newclass.push(c);
		e.className = newclass.join(' ');
	};

	me.removeClass = function (e, c) {
		if ( !me.hasClass(e, c) ) {
			return;
		}

		var re = new RegExp("(^|\\s)" + c + "(\\s|$)", 'g');
		e.className = e.className.replace(re, ' ');
	};

	me.offset = function (el) {
		var left = -el.offsetLeft,
			top = -el.offsetTop;

		// jshint -W084
		while (el = el.offsetParent) {
			left -= el.offsetLeft;
			top -= el.offsetTop;
		}
		// jshint +W084

		return {
			left: left,
			top: top
		};
	};

	me.preventDefaultException = function (el, exceptions) {
		for ( var i in exceptions ) {
			if ( exceptions[i].test(el[i]) ) {
				return true;
			}
		}

		return false;
	};

	me.extend(me.eventType = {}, {
		touchstart: 1,
		touchmove: 1,
		touchend: 1,

		mousedown: 2,
		mousemove: 2,
		mouseup: 2,

		pointerdown: 3,
		pointermove: 3,
		pointerup: 3,

		MSPointerDown: 3,
		MSPointerMove: 3,
		MSPointerUp: 3
	});

	me.extend(me.ease = {}, {
		quadratic: {
			style: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',
			fn: function (k) {
				return k * ( 2 - k );
			}
		},
		circular: {
			style: 'cubic-bezier(0.1, 0.57, 0.1, 1)',	// Not properly "circular" but this looks better, it should be (0.075, 0.82, 0.165, 1)
			fn: function (k) {
				return Math.sqrt( 1 - ( --k * k ) );
			}
		},
		back: {
			style: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',
			fn: function (k) {
				var b = 4;
				return ( k = k - 1 ) * k * ( ( b + 1 ) * k + b ) + 1;
			}
		},
		bounce: {
			style: '',
			fn: function (k) {
				if ( ( k /= 1 ) < ( 1 / 2.75 ) ) {
					return 7.5625 * k * k;
				} else if ( k < ( 2 / 2.75 ) ) {
					return 7.5625 * ( k -= ( 1.5 / 2.75 ) ) * k + 0.75;
				} else if ( k < ( 2.5 / 2.75 ) ) {
					return 7.5625 * ( k -= ( 2.25 / 2.75 ) ) * k + 0.9375;
				} else {
					return 7.5625 * ( k -= ( 2.625 / 2.75 ) ) * k + 0.984375;
				}
			}
		},
		elastic: {
			style: '',
			fn: function (k) {
				var f = 0.22,
					e = 0.4;

				if ( k === 0 ) { return 0; }
				if ( k == 1 ) { return 1; }

				return ( e * Math.pow( 2, - 10 * k ) * Math.sin( ( k - f / 4 ) * ( 2 * Math.PI ) / f ) + 1 );
			}
		}
	});

	me.tap = function (e, eventName) {
		var ev = document.createEvent('Event');
		ev.initEvent(eventName, true, true);
		ev.pageX = e.pageX;
		ev.pageY = e.pageY;
		e.target.dispatchEvent(ev);
	};

	me.click = function (e) {
		var target = e.target,
			ev;

		if ( !(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName) ) {
			ev = document.createEvent('MouseEvents');
			ev.initMouseEvent('click', true, true, e.view, 1,
				target.screenX, target.screenY, target.clientX, target.clientY,
				e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
				0, null);

			ev._constructed = true;
			target.dispatchEvent(ev);
		}
	};

	return me;
})();

function IScroll (el, options) {
	this.wrapper = typeof el == 'string' ? document.querySelector(el) : el;
	this.scroller = this.wrapper.children[0];
	this.scrollerStyle = this.scroller.style;		// cache style for better performance

	this.options = {

		resizeScrollbars: true,

		mouseWheelSpeed: 20,

		snapThreshold: 0.334,

// INSERT POINT: OPTIONS

		startX: 0,
		startY: 0,
		scrollY: true,
		directionLockThreshold: 5,
		momentum: true,

		bounce: true,
		bounceTime: 600,
		bounceEasing: '',

		preventDefault: true,
		preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ },

		HWCompositing: true,
		useTransition: true,
		useTransform: true
	};

	for ( var i in options ) {
		this.options[i] = options[i];
	}

	// Normalize options
	this.translateZ = this.options.HWCompositing && utils.hasPerspective ? ' translateZ(0)' : '';

	this.options.useTransition = utils.hasTransition && this.options.useTransition;
	this.options.useTransform = utils.hasTransform && this.options.useTransform;

	this.options.eventPassthrough = this.options.eventPassthrough === true ? 'vertical' : this.options.eventPassthrough;
	this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault;

	// If you want eventPassthrough I have to lock one of the axes
	this.options.scrollY = this.options.eventPassthrough == 'vertical' ? false : this.options.scrollY;
	this.options.scrollX = this.options.eventPassthrough == 'horizontal' ? false : this.options.scrollX;

	// With eventPassthrough we also need lockDirection mechanism
	this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough;
	this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold;

	this.options.bounceEasing = typeof this.options.bounceEasing == 'string' ? utils.ease[this.options.bounceEasing] || utils.ease.circular : this.options.bounceEasing;

	this.options.resizePolling = this.options.resizePolling === undefined ? 60 : this.options.resizePolling;

	if ( this.options.tap === true ) {
		this.options.tap = 'tap';
	}

	if ( this.options.shrinkScrollbars == 'scale' ) {
		this.options.useTransition = false;
	}

	this.options.invertWheelDirection = this.options.invertWheelDirection ? -1 : 1;

	if ( this.options.probeType == 3 ) {
		this.options.useTransition = false;	}

// INSERT POINT: NORMALIZATION

	// Some defaults
	this.x = 0;
	this.y = 0;
	this.directionX = 0;
	this.directionY = 0;
	this._events = {};

// INSERT POINT: DEFAULTS

	this._init();
	this.refresh();

	this.scrollTo(this.options.startX, this.options.startY);
	this.enable();
}

IScroll.prototype = {
	version: '5.1.3',

	_init: function () {
		this._initEvents();

		if ( this.options.scrollbars || this.options.indicators ) {
			this._initIndicators();
		}

		if ( this.options.mouseWheel ) {
			this._initWheel();
		}

		if ( this.options.snap ) {
			this._initSnap();
		}

		if ( this.options.keyBindings ) {
			this._initKeys();
		}

// INSERT POINT: _init

	},

	destroy: function () {
		this._initEvents(true);

		this._execEvent('destroy');
	},

	_transitionEnd: function (e) {
		if ( e.target != this.scroller || !this.isInTransition ) {
			return;
		}

		this._transitionTime();
		if ( !this.resetPosition(this.options.bounceTime) ) {
			this.isInTransition = false;
			this._execEvent('scrollEnd');
		}
	},

	_start: function (e) {
		// React to left mouse button only
		if ( utils.eventType[e.type] != 1 ) {
			if ( e.button !== 0 ) {
				return;
			}
		}

		if ( !this.enabled || (this.initiated && utils.eventType[e.type] !== this.initiated) ) {
			return;
		}

		if ( this.options.preventDefault && !utils.isBadAndroid && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) {
			e.preventDefault();
		}

		var point = e.touches ? e.touches[0] : e,
			pos;

		this.initiated	= utils.eventType[e.type];
		this.moved		= false;
		this.distX		= 0;
		this.distY		= 0;
		this.directionX = 0;
		this.directionY = 0;
		this.directionLocked = 0;

		this._transitionTime();

		this.startTime = utils.getTime();

		if ( this.options.useTransition && this.isInTransition ) {
			this.isInTransition = false;
			pos = this.getComputedPosition();
			this._translate(Math.round(pos.x), Math.round(pos.y));
			this._execEvent('scrollEnd');
		} else if ( !this.options.useTransition && this.isAnimating ) {
			this.isAnimating = false;
			this._execEvent('scrollEnd');
		}

		this.startX    = this.x;
		this.startY    = this.y;
		this.absStartX = this.x;
		this.absStartY = this.y;
		this.pointX    = point.pageX;
		this.pointY    = point.pageY;

		this._execEvent('beforeScrollStart');
	},

	_move: function (e) {
		if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {
			return;
		}

		if ( this.options.preventDefault ) {	// increases performance on Android? TODO: check!
			e.preventDefault();
		}

		var point		= e.touches ? e.touches[0] : e,
			deltaX		= point.pageX - this.pointX,
			deltaY		= point.pageY - this.pointY,
			timestamp	= utils.getTime(),
			newX, newY,
			absDistX, absDistY;

		this.pointX		= point.pageX;
		this.pointY		= point.pageY;

		this.distX		+= deltaX;
		this.distY		+= deltaY;
		absDistX		= Math.abs(this.distX);
		absDistY		= Math.abs(this.distY);

		// We need to move at least 10 pixels for the scrolling to initiate
		if ( timestamp - this.endTime > 300 && (absDistX < 10 && absDistY < 10) ) {
			return;
		}

		// If you are scrolling in one direction lock the other
		if ( !this.directionLocked && !this.options.freeScroll ) {
			if ( absDistX > absDistY + this.options.directionLockThreshold ) {
				this.directionLocked = 'h';		// lock horizontally
			} else if ( absDistY >= absDistX + this.options.directionLockThreshold ) {
				this.directionLocked = 'v';		// lock vertically
			} else {
				this.directionLocked = 'n';		// no lock
			}
		}

		if ( this.directionLocked == 'h' ) {
			if ( this.options.eventPassthrough == 'vertical' ) {
				e.preventDefault();
			} else if ( this.options.eventPassthrough == 'horizontal' ) {
				this.initiated = false;
				return;
			}

			deltaY = 0;
		} else if ( this.directionLocked == 'v' ) {
			if ( this.options.eventPassthrough == 'horizontal' ) {
				e.preventDefault();
			} else if ( this.options.eventPassthrough == 'vertical' ) {
				this.initiated = false;
				return;
			}

			deltaX = 0;
		}

		deltaX = this.hasHorizontalScroll ? deltaX : 0;
		deltaY = this.hasVerticalScroll ? deltaY : 0;

		newX = this.x + deltaX;
		newY = this.y + deltaY;

		// Slow down if outside of the boundaries
		if ( newX > 0 || newX < this.maxScrollX ) {
			newX = this.options.bounce ? this.x + deltaX / 3 : newX > 0 ? 0 : this.maxScrollX;
		}
		if ( newY > 0 || newY < this.maxScrollY ) {
			newY = this.options.bounce ? this.y + deltaY / 3 : newY > 0 ? 0 : this.maxScrollY;
		}

		this.directionX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0;
		this.directionY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0;

		if ( !this.moved ) {
			this._execEvent('scrollStart');
		}

		this.moved = true;

		this._translate(newX, newY);

/* REPLACE START: _move */
		if ( timestamp - this.startTime > 300 ) {
			this.startTime = timestamp;
			this.startX = this.x;
			this.startY = this.y;

			if ( this.options.probeType == 1 ) {
				this._execEvent('scroll');
			}
		}

		if ( this.options.probeType > 1 ) {
			this._execEvent('scroll');
		}
/* REPLACE END: _move */

	},

	_end: function (e) {
		if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {
			return;
		}

		if ( this.options.preventDefault && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) {
			e.preventDefault();
		}

		var point = e.changedTouches ? e.changedTouches[0] : e,
			momentumX,
			momentumY,
			duration = utils.getTime() - this.startTime,
			newX = Math.round(this.x),
			newY = Math.round(this.y),
			distanceX = Math.abs(newX - this.startX),
			distanceY = Math.abs(newY - this.startY),
			time = 0,
			easing = '';

		this.isInTransition = 0;
		this.initiated = 0;
		this.endTime = utils.getTime();

		// reset if we are outside of the boundaries
		if ( this.resetPosition(this.options.bounceTime) ) {
			return;
		}

		this.scrollTo(newX, newY);	// ensures that the last position is rounded

		// we scrolled less than 10 pixels
		if ( !this.moved ) {
			if ( this.options.tap ) {
				utils.tap(e, this.options.tap);
			}

			if ( this.options.click ) {
				utils.click(e);
			}

			this._execEvent('scrollCancel');
			return;
		}

		if ( this._events.flick && duration < 200 && distanceX < 100 && distanceY < 100 ) {
			this._execEvent('flick');
			return;
		}

		// start momentum animation if needed
		if ( this.options.momentum && duration < 300 ) {
			momentumX = this.hasHorizontalScroll ? utils.momentum(this.x, this.startX, duration, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : { destination: newX, duration: 0 };
			momentumY = this.hasVerticalScroll ? utils.momentum(this.y, this.startY, duration, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : { destination: newY, duration: 0 };
			newX = momentumX.destination;
			newY = momentumY.destination;
			time = Math.max(momentumX.duration, momentumY.duration);
			this.isInTransition = 1;
		}


		if ( this.options.snap ) {
			var snap = this._nearestSnap(newX, newY);
			this.currentPage = snap;
			time = this.options.snapSpeed || Math.max(
					Math.max(
						Math.min(Math.abs(newX - snap.x), 1000),
						Math.min(Math.abs(newY - snap.y), 1000)
					), 300);
			newX = snap.x;
			newY = snap.y;

			this.directionX = 0;
			this.directionY = 0;
			easing = this.options.bounceEasing;
		}

// INSERT POINT: _end

		if ( newX != this.x || newY != this.y ) {
			// change easing function when scroller goes out of the boundaries
			if ( newX > 0 || newX < this.maxScrollX || newY > 0 || newY < this.maxScrollY ) {
				easing = utils.ease.quadratic;
			}

			this.scrollTo(newX, newY, time, easing);
			return;
		}

		this._execEvent('scrollEnd');
	},

	_resize: function () {
		var that = this;

		clearTimeout(this.resizeTimeout);

		this.resizeTimeout = setTimeout(function () {
			that.refresh();
		}, this.options.resizePolling);
	},

	resetPosition: function (time) {
		var x = this.x,
			y = this.y;

		time = time || 0;

		if ( !this.hasHorizontalScroll || this.x > 0 ) {
			x = 0;
		} else if ( this.x < this.maxScrollX ) {
			x = this.maxScrollX;
		}

		if ( !this.hasVerticalScroll || this.y > 0 ) {
			y = 0;
		} else if ( this.y < this.maxScrollY ) {
			y = this.maxScrollY;
		}

		if ( x == this.x && y == this.y ) {
			return false;
		}

		this.scrollTo(x, y, time, this.options.bounceEasing);

		return true;
	},

	disable: function () {
		this.enabled = false;
	},

	enable: function () {
		this.enabled = true;
	},

	refresh: function () {
		var rf = this.wrapper.offsetHeight;		// Force reflow

		this.wrapperWidth	= this.wrapper.clientWidth;
		this.wrapperHeight	= this.wrapper.clientHeight;

/* REPLACE START: refresh */

		this.scrollerWidth	= this.scroller.offsetWidth;
		this.scrollerHeight	= this.scroller.offsetHeight;

		this.maxScrollX		= this.wrapperWidth - this.scrollerWidth;
		this.maxScrollY		= this.wrapperHeight - this.scrollerHeight;

/* REPLACE END: refresh */

		this.hasHorizontalScroll	= this.options.scrollX && this.maxScrollX < 0;
		this.hasVerticalScroll		= this.options.scrollY && this.maxScrollY < 0;

		if ( !this.hasHorizontalScroll ) {
			this.maxScrollX = 0;
			this.scrollerWidth = this.wrapperWidth;
		}

		if ( !this.hasVerticalScroll ) {
			this.maxScrollY = 0;
			this.scrollerHeight = this.wrapperHeight;
		}

		this.endTime = 0;
		this.directionX = 0;
		this.directionY = 0;

		this.wrapperOffset = utils.offset(this.wrapper);

		this._execEvent('refresh');

		this.resetPosition();

// INSERT POINT: _refresh

	},

	on: function (type, fn) {
		if ( !this._events[type] ) {
			this._events[type] = [];
		}

		this._events[type].push(fn);
	},

	off: function (type, fn) {
		if ( !this._events[type] ) {
			return;
		}

		var index = this._events[type].indexOf(fn);

		if ( index > -1 ) {
			this._events[type].splice(index, 1);
		}
	},

	_execEvent: function (type) {
		if ( !this._events[type] ) {
			return;
		}

		var i = 0,
			l = this._events[type].length;

		if ( !l ) {
			return;
		}

		for ( ; i < l; i++ ) {
			this._events[type][i].apply(this, [].slice.call(arguments, 1));
		}
	},

	scrollBy: function (x, y, time, easing) {
		x = this.x + x;
		y = this.y + y;
		time = time || 0;

		this.scrollTo(x, y, time, easing);
	},

	scrollTo: function (x, y, time, easing) {
		easing = easing || utils.ease.circular;

		this.isInTransition = this.options.useTransition && time > 0;

		if ( !time || (this.options.useTransition && easing.style) ) {
			this._transitionTimingFunction(easing.style);
			this._transitionTime(time);
			this._translate(x, y);
		} else {
			this._animate(x, y, time, easing.fn);
		}
	},

	scrollToElement: function (el, time, offsetX, offsetY, easing) {
		el = el.nodeType ? el : this.scroller.querySelector(el);

		if ( !el ) {
			return;
		}

		var pos = utils.offset(el);

		pos.left -= this.wrapperOffset.left;
		pos.top  -= this.wrapperOffset.top;

		// if offsetX/Y are true we center the element to the screen
		if ( offsetX === true ) {
			offsetX = Math.round(el.offsetWidth / 2 - this.wrapper.offsetWidth / 2);
		}
		if ( offsetY === true ) {
			offsetY = Math.round(el.offsetHeight / 2 - this.wrapper.offsetHeight / 2);
		}

		pos.left -= offsetX || 0;
		pos.top  -= offsetY || 0;

		pos.left = pos.left > 0 ? 0 : pos.left < this.maxScrollX ? this.maxScrollX : pos.left;
		pos.top  = pos.top  > 0 ? 0 : pos.top  < this.maxScrollY ? this.maxScrollY : pos.top;

		time = time === undefined || time === null || time === 'auto' ? Math.max(Math.abs(this.x-pos.left), Math.abs(this.y-pos.top)) : time;

		this.scrollTo(pos.left, pos.top, time, easing);
	},

	_transitionTime: function (time) {
		time = time || 0;

		this.scrollerStyle[utils.style.transitionDuration] = time + 'ms';

		if ( !time && utils.isBadAndroid ) {
			this.scrollerStyle[utils.style.transitionDuration] = '0.001s';
		}


		if ( this.indicators ) {
			for ( var i = this.indicators.length; i--; ) {
				this.indicators[i].transitionTime(time);
			}
		}


// INSERT POINT: _transitionTime

	},

	_transitionTimingFunction: function (easing) {
		this.scrollerStyle[utils.style.transitionTimingFunction] = easing;


		if ( this.indicators ) {
			for ( var i = this.indicators.length; i--; ) {
				this.indicators[i].transitionTimingFunction(easing);
			}
		}


// INSERT POINT: _transitionTimingFunction

	},

	_translate: function (x, y) {
		if ( this.options.useTransform ) {

/* REPLACE START: _translate */

			this.scrollerStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.translateZ;

/* REPLACE END: _translate */

		} else {
			x = Math.round(x);
			y = Math.round(y);
			this.scrollerStyle.left = x + 'px';
			this.scrollerStyle.top = y + 'px';
		}

		this.x = x;
		this.y = y;


	if ( this.indicators ) {
		for ( var i = this.indicators.length; i--; ) {
			this.indicators[i].updatePosition();
		}
	}


// INSERT POINT: _translate

	},

	_initEvents: function (remove) {
		var eventType = remove ? utils.removeEvent : utils.addEvent,
			target = this.options.bindToWrapper ? this.wrapper : window;

		eventType(window, 'orientationchange', this);
		eventType(window, 'resize', this);

		if ( this.options.click ) {
			eventType(this.wrapper, 'click', this, true);
		}

		if ( !this.options.disableMouse ) {
			eventType(this.wrapper, 'mousedown', this);
			eventType(target, 'mousemove', this);
			eventType(target, 'mousecancel', this);
			eventType(target, 'mouseup', this);
		}

		if ( utils.hasPointer && !this.options.disablePointer ) {
			eventType(this.wrapper, utils.prefixPointerEvent('pointerdown'), this);
			eventType(target, utils.prefixPointerEvent('pointermove'), this);
			eventType(target, utils.prefixPointerEvent('pointercancel'), this);
			eventType(target, utils.prefixPointerEvent('pointerup'), this);
		}

		if ( utils.hasTouch && !this.options.disableTouch ) {
			eventType(this.wrapper, 'touchstart', this);
			eventType(target, 'touchmove', this);
			eventType(target, 'touchcancel', this);
			eventType(target, 'touchend', this);
		}

		eventType(this.scroller, 'transitionend', this);
		eventType(this.scroller, 'webkitTransitionEnd', this);
		eventType(this.scroller, 'oTransitionEnd', this);
		eventType(this.scroller, 'MSTransitionEnd', this);
	},

	getComputedPosition: function () {
		var matrix = window.getComputedStyle(this.scroller, null),
			x, y;

		if ( this.options.useTransform ) {
			matrix = matrix[utils.style.transform].split(')')[0].split(', ');
			x = +(matrix[12] || matrix[4]);
			y = +(matrix[13] || matrix[5]);
		} else {
			x = +matrix.left.replace(/[^-\d.]/g, '');
			y = +matrix.top.replace(/[^-\d.]/g, '');
		}

		return { x: x, y: y };
	},

	_initIndicators: function () {
		var interactive = this.options.interactiveScrollbars,
			customStyle = typeof this.options.scrollbars != 'string',
			indicators = [],
			indicator;

		var that = this;

		this.indicators = [];

		if ( this.options.scrollbars ) {
			// Vertical scrollbar
			if ( this.options.scrollY ) {
				indicator = {
					el: createDefaultScrollbar('v', interactive, this.options.scrollbars),
					interactive: interactive,
					defaultScrollbars: true,
					customStyle: customStyle,
					resize: this.options.resizeScrollbars,
					shrink: this.options.shrinkScrollbars,
					fade: this.options.fadeScrollbars,
					listenX: false
				};

				this.wrapper.appendChild(indicator.el);
				indicators.push(indicator);
			}

			// Horizontal scrollbar
			if ( this.options.scrollX ) {
				indicator = {
					el: createDefaultScrollbar('h', interactive, this.options.scrollbars),
					interactive: interactive,
					defaultScrollbars: true,
					customStyle: customStyle,
					resize: this.options.resizeScrollbars,
					shrink: this.options.shrinkScrollbars,
					fade: this.options.fadeScrollbars,
					listenY: false
				};

				this.wrapper.appendChild(indicator.el);
				indicators.push(indicator);
			}
		}

		if ( this.options.indicators ) {
			// TODO: check concat compatibility
			indicators = indicators.concat(this.options.indicators);
		}

		for ( var i = indicators.length; i--; ) {
			this.indicators.push( new Indicator(this, indicators[i]) );
		}

		// TODO: check if we can use array.map (wide compatibility and performance issues)
		function _indicatorsMap (fn) {
			for ( var i = that.indicators.length; i--; ) {
				fn.call(that.indicators[i]);
			}
		}

		if ( this.options.fadeScrollbars ) {
			this.on('scrollEnd', function () {
				_indicatorsMap(function () {
					this.fade();
				});
			});

			this.on('scrollCancel', function () {
				_indicatorsMap(function () {
					this.fade();
				});
			});

			this.on('scrollStart', function () {
				_indicatorsMap(function () {
					this.fade(1);
				});
			});

			this.on('beforeScrollStart', function () {
				_indicatorsMap(function () {
					this.fade(1, true);
				});
			});
		}


		this.on('refresh', function () {
			_indicatorsMap(function () {
				this.refresh();
			});
		});

		this.on('destroy', function () {
			_indicatorsMap(function () {
				this.destroy();
			});

			delete this.indicators;
		});
	},

	_initWheel: function () {
		utils.addEvent(this.wrapper, 'wheel', this);
		utils.addEvent(this.wrapper, 'mousewheel', this);
		utils.addEvent(this.wrapper, 'DOMMouseScroll', this);

		this.on('destroy', function () {
			utils.removeEvent(this.wrapper, 'wheel', this);
			utils.removeEvent(this.wrapper, 'mousewheel', this);
			utils.removeEvent(this.wrapper, 'DOMMouseScroll', this);
		});
	},

	_wheel: function (e) {
		if ( !this.enabled ) {
			return;
		}

		e.preventDefault();
		e.stopPropagation();

		var wheelDeltaX, wheelDeltaY,
			newX, newY,
			that = this;

		if ( this.wheelTimeout === undefined ) {
			that._execEvent('scrollStart');
		}

		// Execute the scrollEnd event after 400ms the wheel stopped scrolling
		clearTimeout(this.wheelTimeout);
		this.wheelTimeout = setTimeout(function () {
			that._execEvent('scrollEnd');
			that.wheelTimeout = undefined;
		}, 400);

		if ( 'deltaX' in e ) {
			if (e.deltaMode === 1) {
				wheelDeltaX = -e.deltaX * this.options.mouseWheelSpeed;
				wheelDeltaY = -e.deltaY * this.options.mouseWheelSpeed;
			} else {
				wheelDeltaX = -e.deltaX;
				wheelDeltaY = -e.deltaY;
			}
		} else if ( 'wheelDeltaX' in e ) {
			wheelDeltaX = e.wheelDeltaX / 120 * this.options.mouseWheelSpeed;
			wheelDeltaY = e.wheelDeltaY / 120 * this.options.mouseWheelSpeed;
		} else if ( 'wheelDelta' in e ) {
			wheelDeltaX = wheelDeltaY = e.wheelDelta / 120 * this.options.mouseWheelSpeed;
		} else if ( 'detail' in e ) {
			wheelDeltaX = wheelDeltaY = -e.detail / 3 * this.options.mouseWheelSpeed;
		} else {
			return;
		}

		wheelDeltaX *= this.options.invertWheelDirection;
		wheelDeltaY *= this.options.invertWheelDirection;

		if ( !this.hasVerticalScroll ) {
			wheelDeltaX = wheelDeltaY;
			wheelDeltaY = 0;
		}

		if ( this.options.snap ) {
			newX = this.currentPage.pageX;
			newY = this.currentPage.pageY;

			if ( wheelDeltaX > 0 ) {
				newX--;
			} else if ( wheelDeltaX < 0 ) {
				newX++;
			}

			if ( wheelDeltaY > 0 ) {
				newY--;
			} else if ( wheelDeltaY < 0 ) {
				newY++;
			}

			this.goToPage(newX, newY);

			return;
		}

		newX = this.x + Math.round(this.hasHorizontalScroll ? wheelDeltaX : 0);
		newY = this.y + Math.round(this.hasVerticalScroll ? wheelDeltaY : 0);

		if ( newX > 0 ) {
			newX = 0;
		} else if ( newX < this.maxScrollX ) {
			newX = this.maxScrollX;
		}

		if ( newY > 0 ) {
			newY = 0;
		} else if ( newY < this.maxScrollY ) {
			newY = this.maxScrollY;
		}

		this.scrollTo(newX, newY, 0);

		if ( this.options.probeType > 1 ) {
			this._execEvent('scroll');
		}

// INSERT POINT: _wheel
	},

	_initSnap: function () {
		this.currentPage = {};

		if ( typeof this.options.snap == 'string' ) {
			this.options.snap = this.scroller.querySelectorAll(this.options.snap);
		}

		this.on('refresh', function () {
			var i = 0, l,
				m = 0, n,
				cx, cy,
				x = 0, y,
				stepX = this.options.snapStepX || this.wrapperWidth,
				stepY = this.options.snapStepY || this.wrapperHeight,
				el;

			this.pages = [];

			if ( !this.wrapperWidth || !this.wrapperHeight || !this.scrollerWidth || !this.scrollerHeight ) {
				return;
			}

			if ( this.options.snap === true ) {
				cx = Math.round( stepX / 2 );
				cy = Math.round( stepY / 2 );

				while ( x > -this.scrollerWidth ) {
					this.pages[i] = [];
					l = 0;
					y = 0;

					while ( y > -this.scrollerHeight ) {
						this.pages[i][l] = {
							x: Math.max(x, this.maxScrollX),
							y: Math.max(y, this.maxScrollY),
							width: stepX,
							height: stepY,
							cx: x - cx,
							cy: y - cy
						};

						y -= stepY;
						l++;
					}

					x -= stepX;
					i++;
				}
			} else {
				el = this.options.snap;
				l = el.length;
				n = -1;

				for ( ; i < l; i++ ) {
					if ( i === 0 || el[i].offsetLeft <= el[i-1].offsetLeft ) {
						m = 0;
						n++;
					}

					if ( !this.pages[m] ) {
						this.pages[m] = [];
					}

					x = Math.max(-el[i].offsetLeft, this.maxScrollX);
					y = Math.max(-el[i].offsetTop, this.maxScrollY);
					cx = x - Math.round(el[i].offsetWidth / 2);
					cy = y - Math.round(el[i].offsetHeight / 2);

					this.pages[m][n] = {
						x: x,
						y: y,
						width: el[i].offsetWidth,
						height: el[i].offsetHeight,
						cx: cx,
						cy: cy
					};

					if ( x > this.maxScrollX ) {
						m++;
					}
				}
			}

			this.goToPage(this.currentPage.pageX || 0, this.currentPage.pageY || 0, 0);

			// Update snap threshold if needed
			if ( this.options.snapThreshold % 1 === 0 ) {
				this.snapThresholdX = this.options.snapThreshold;
				this.snapThresholdY = this.options.snapThreshold;
			} else {
				this.snapThresholdX = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width * this.options.snapThreshold);
				this.snapThresholdY = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height * this.options.snapThreshold);
			}
		});

		this.on('flick', function () {
			var time = this.options.snapSpeed || Math.max(
					Math.max(
						Math.min(Math.abs(this.x - this.startX), 1000),
						Math.min(Math.abs(this.y - this.startY), 1000)
					), 300);

			this.goToPage(
				this.currentPage.pageX + this.directionX,
				this.currentPage.pageY + this.directionY,
				time
			);
		});
	},

	_nearestSnap: function (x, y) {
		if ( !this.pages.length ) {
			return { x: 0, y: 0, pageX: 0, pageY: 0 };
		}

		var i = 0,
			l = this.pages.length,
			m = 0;

		// Check if we exceeded the snap threshold
		if ( Math.abs(x - this.absStartX) < this.snapThresholdX &&
			Math.abs(y - this.absStartY) < this.snapThresholdY ) {
			return this.currentPage;
		}

		if ( x > 0 ) {
			x = 0;
		} else if ( x < this.maxScrollX ) {
			x = this.maxScrollX;
		}

		if ( y > 0 ) {
			y = 0;
		} else if ( y < this.maxScrollY ) {
			y = this.maxScrollY;
		}

		for ( ; i < l; i++ ) {
			if ( x >= this.pages[i][0].cx ) {
				x = this.pages[i][0].x;
				break;
			}
		}

		l = this.pages[i].length;

		for ( ; m < l; m++ ) {
			if ( y >= this.pages[0][m].cy ) {
				y = this.pages[0][m].y;
				break;
			}
		}

		if ( i == this.currentPage.pageX ) {
			i += this.directionX;

			if ( i < 0 ) {
				i = 0;
			} else if ( i >= this.pages.length ) {
				i = this.pages.length - 1;
			}

			x = this.pages[i][0].x;
		}

		if ( m == this.currentPage.pageY ) {
			m += this.directionY;

			if ( m < 0 ) {
				m = 0;
			} else if ( m >= this.pages[0].length ) {
				m = this.pages[0].length - 1;
			}

			y = this.pages[0][m].y;
		}

		return {
			x: x,
			y: y,
			pageX: i,
			pageY: m
		};
	},

	goToPage: function (x, y, time, easing) {
		easing = easing || this.options.bounceEasing;

		if ( x >= this.pages.length ) {
			x = this.pages.length - 1;
		} else if ( x < 0 ) {
			x = 0;
		}

		if ( y >= this.pages[x].length ) {
			y = this.pages[x].length - 1;
		} else if ( y < 0 ) {
			y = 0;
		}

		var posX = this.pages[x][y].x,
			posY = this.pages[x][y].y;

		time = time === undefined ? this.options.snapSpeed || Math.max(
			Math.max(
				Math.min(Math.abs(posX - this.x), 1000),
				Math.min(Math.abs(posY - this.y), 1000)
			), 300) : time;

		this.currentPage = {
			x: posX,
			y: posY,
			pageX: x,
			pageY: y
		};

		this.scrollTo(posX, posY, time, easing);
	},

	next: function (time, easing) {
		var x = this.currentPage.pageX,
			y = this.currentPage.pageY;

		x++;

		if ( x >= this.pages.length && this.hasVerticalScroll ) {
			x = 0;
			y++;
		}

		this.goToPage(x, y, time, easing);
	},

	prev: function (time, easing) {
		var x = this.currentPage.pageX,
			y = this.currentPage.pageY;

		x--;

		if ( x < 0 && this.hasVerticalScroll ) {
			x = 0;
			y--;
		}

		this.goToPage(x, y, time, easing);
	},

	_initKeys: function (e) {
		// default key bindings
		var keys = {
			pageUp: 33,
			pageDown: 34,
			end: 35,
			home: 36,
			left: 37,
			up: 38,
			right: 39,
			down: 40
		};
		var i;

		// if you give me characters I give you keycode
		if ( typeof this.options.keyBindings == 'object' ) {
			for ( i in this.options.keyBindings ) {
				if ( typeof this.options.keyBindings[i] == 'string' ) {
					this.options.keyBindings[i] = this.options.keyBindings[i].toUpperCase().charCodeAt(0);
				}
			}
		} else {
			this.options.keyBindings = {};
		}

		for ( i in keys ) {
			this.options.keyBindings[i] = this.options.keyBindings[i] || keys[i];
		}

		utils.addEvent(window, 'keydown', this);

		this.on('destroy', function () {
			utils.removeEvent(window, 'keydown', this);
		});
	},

	_key: function (e) {
		if ( !this.enabled ) {
			return;
		}

		var snap = this.options.snap,	// we are using this alot, better to cache it
			newX = snap ? this.currentPage.pageX : this.x,
			newY = snap ? this.currentPage.pageY : this.y,
			now = utils.getTime(),
			prevTime = this.keyTime || 0,
			acceleration = 0.250,
			pos;

		if ( this.options.useTransition && this.isInTransition ) {
			pos = this.getComputedPosition();

			this._translate(Math.round(pos.x), Math.round(pos.y));
			this.isInTransition = false;
		}

		this.keyAcceleration = now - prevTime < 200 ? Math.min(this.keyAcceleration + acceleration, 50) : 0;

		switch ( e.keyCode ) {
			case this.options.keyBindings.pageUp:
				if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) {
					newX += snap ? 1 : this.wrapperWidth;
				} else {
					newY += snap ? 1 : this.wrapperHeight;
				}
				break;
			case this.options.keyBindings.pageDown:
				if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) {
					newX -= snap ? 1 : this.wrapperWidth;
				} else {
					newY -= snap ? 1 : this.wrapperHeight;
				}
				break;
			case this.options.keyBindings.end:
				newX = snap ? this.pages.length-1 : this.maxScrollX;
				newY = snap ? this.pages[0].length-1 : this.maxScrollY;
				break;
			case this.options.keyBindings.home:
				newX = 0;
				newY = 0;
				break;
			case this.options.keyBindings.left:
				newX += snap ? -1 : 5 + this.keyAcceleration>>0;
				break;
			case this.options.keyBindings.up:
				newY += snap ? 1 : 5 + this.keyAcceleration>>0;
				break;
			case this.options.keyBindings.right:
				newX -= snap ? -1 : 5 + this.keyAcceleration>>0;
				break;
			case this.options.keyBindings.down:
				newY -= snap ? 1 : 5 + this.keyAcceleration>>0;
				break;
			default:
				return;
		}

		if ( snap ) {
			this.goToPage(newX, newY);
			return;
		}

		if ( newX > 0 ) {
			newX = 0;
			this.keyAcceleration = 0;
		} else if ( newX < this.maxScrollX ) {
			newX = this.maxScrollX;
			this.keyAcceleration = 0;
		}

		if ( newY > 0 ) {
			newY = 0;
			this.keyAcceleration = 0;
		} else if ( newY < this.maxScrollY ) {
			newY = this.maxScrollY;
			this.keyAcceleration = 0;
		}

		this.scrollTo(newX, newY, 0);

		this.keyTime = now;
	},

	_animate: function (destX, destY, duration, easingFn) {
		var that = this,
			startX = this.x,
			startY = this.y,
			startTime = utils.getTime(),
			destTime = startTime + duration;

		function step () {
			var now = utils.getTime(),
				newX, newY,
				easing;

			if ( now >= destTime ) {
				that.isAnimating = false;
				that._translate(destX, destY);

				if ( !that.resetPosition(that.options.bounceTime) ) {
					that._execEvent('scrollEnd');
				}

				return;
			}

			now = ( now - startTime ) / duration;
			easing = easingFn(now);
			newX = ( destX - startX ) * easing + startX;
			newY = ( destY - startY ) * easing + startY;
			that._translate(newX, newY);

			if ( that.isAnimating ) {
				rAF(step);
			}

			if ( that.options.probeType == 3 ) {
				that._execEvent('scroll');
			}
		}

		this.isAnimating = true;
		step();
	},

	handleEvent: function (e) {
		switch ( e.type ) {
			case 'touchstart':
			case 'pointerdown':
			case 'MSPointerDown':
			case 'mousedown':
				this._start(e);
				break;
			case 'touchmove':
			case 'pointermove':
			case 'MSPointerMove':
			case 'mousemove':
				this._move(e);
				break;
			case 'touchend':
			case 'pointerup':
			case 'MSPointerUp':
			case 'mouseup':
			case 'touchcancel':
			case 'pointercancel':
			case 'MSPointerCancel':
			case 'mousecancel':
				this._end(e);
				break;
			case 'orientationchange':
			case 'resize':
				this._resize();
				break;
			case 'transitionend':
			case 'webkitTransitionEnd':
			case 'oTransitionEnd':
			case 'MSTransitionEnd':
				this._transitionEnd(e);
				break;
			case 'wheel':
			case 'DOMMouseScroll':
			case 'mousewheel':
				this._wheel(e);
				break;
			case 'keydown':
				this._key(e);
				break;
			case 'click':
				if ( !e._constructed ) {
					e.preventDefault();
					e.stopPropagation();
				}
				break;
		}
	}
};
function createDefaultScrollbar (direction, interactive, type) {
	var scrollbar = document.createElement('div'),
		indicator = document.createElement('div');

	if ( type === true ) {
		scrollbar.style.cssText = 'position:absolute;z-index:9999';
		indicator.style.cssText = '-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px';
	}

	indicator.className = 'iScrollIndicator';

	if ( direction == 'h' ) {
		if ( type === true ) {
			scrollbar.style.cssText += ';height:7px;left:2px;right:2px;bottom:0';
			indicator.style.height = '100%';
		}
		scrollbar.className = 'iScrollHorizontalScrollbar';
	} else {
		if ( type === true ) {
			scrollbar.style.cssText += ';width:7px;bottom:2px;top:2px;right:1px';
			indicator.style.width = '100%';
		}
		scrollbar.className = 'iScrollVerticalScrollbar';
	}

	scrollbar.style.cssText += ';overflow:hidden';

	if ( !interactive ) {
		scrollbar.style.pointerEvents = 'none';
	}

	scrollbar.appendChild(indicator);

	return scrollbar;
}

function Indicator (scroller, options) {
	this.wrapper = typeof options.el == 'string' ? document.querySelector(options.el) : options.el;
	this.wrapperStyle = this.wrapper.style;
	this.indicator = this.wrapper.children[0];
	this.indicatorStyle = this.indicator.style;
	this.scroller = scroller;

	this.options = {
		listenX: true,
		listenY: true,
		interactive: false,
		resize: true,
		defaultScrollbars: false,
		shrink: false,
		fade: false,
		speedRatioX: 0,
		speedRatioY: 0
	};

	for ( var i in options ) {
		this.options[i] = options[i];
	}

	this.sizeRatioX = 1;
	this.sizeRatioY = 1;
	this.maxPosX = 0;
	this.maxPosY = 0;

	if ( this.options.interactive ) {
		if ( !this.options.disableTouch ) {
			utils.addEvent(this.indicator, 'touchstart', this);
			utils.addEvent(window, 'touchend', this);
		}
		if ( !this.options.disablePointer ) {
			utils.addEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this);
			utils.addEvent(window, utils.prefixPointerEvent('pointerup'), this);
		}
		if ( !this.options.disableMouse ) {
			utils.addEvent(this.indicator, 'mousedown', this);
			utils.addEvent(window, 'mouseup', this);
		}
	}

	if ( this.options.fade ) {
		this.wrapperStyle[utils.style.transform] = this.scroller.translateZ;
		this.wrapperStyle[utils.style.transitionDuration] = utils.isBadAndroid ? '0.001s' : '0ms';
		this.wrapperStyle.opacity = '0';
	}
}

Indicator.prototype = {
	handleEvent: function (e) {
		switch ( e.type ) {
			case 'touchstart':
			case 'pointerdown':
			case 'MSPointerDown':
			case 'mousedown':
				this._start(e);
				break;
			case 'touchmove':
			case 'pointermove':
			case 'MSPointerMove':
			case 'mousemove':
				this._move(e);
				break;
			case 'touchend':
			case 'pointerup':
			case 'MSPointerUp':
			case 'mouseup':
			case 'touchcancel':
			case 'pointercancel':
			case 'MSPointerCancel':
			case 'mousecancel':
				this._end(e);
				break;
		}
	},

	destroy: function () {
		if ( this.options.interactive ) {
			utils.removeEvent(this.indicator, 'touchstart', this);
			utils.removeEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this);
			utils.removeEvent(this.indicator, 'mousedown', this);

			utils.removeEvent(window, 'touchmove', this);
			utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this);
			utils.removeEvent(window, 'mousemove', this);

			utils.removeEvent(window, 'touchend', this);
			utils.removeEvent(window, utils.prefixPointerEvent('pointerup'), this);
			utils.removeEvent(window, 'mouseup', this);
		}

		if ( this.options.defaultScrollbars ) {
			this.wrapper.parentNode.removeChild(this.wrapper);
		}
	},

	_start: function (e) {
		var point = e.touches ? e.touches[0] : e;

		e.preventDefault();
		e.stopPropagation();

		this.transitionTime();

		this.initiated = true;
		this.moved = false;
		this.lastPointX	= point.pageX;
		this.lastPointY	= point.pageY;

		this.startTime	= utils.getTime();

		if ( !this.options.disableTouch ) {
			utils.addEvent(window, 'touchmove', this);
		}
		if ( !this.options.disablePointer ) {
			utils.addEvent(window, utils.prefixPointerEvent('pointermove'), this);
		}
		if ( !this.options.disableMouse ) {
			utils.addEvent(window, 'mousemove', this);
		}

		this.scroller._execEvent('beforeScrollStart');
	},

	_move: function (e) {
		var point = e.touches ? e.touches[0] : e,
			deltaX, deltaY,
			newX, newY,
			timestamp = utils.getTime();

		if ( !this.moved ) {
			this.scroller._execEvent('scrollStart');
		}

		this.moved = true;

		deltaX = point.pageX - this.lastPointX;
		this.lastPointX = point.pageX;

		deltaY = point.pageY - this.lastPointY;
		this.lastPointY = point.pageY;

		newX = this.x + deltaX;
		newY = this.y + deltaY;

		this._pos(newX, newY);


		if ( this.scroller.options.probeType == 1 && timestamp - this.startTime > 300 ) {
			this.startTime = timestamp;
			this.scroller._execEvent('scroll');
		} else if ( this.scroller.options.probeType > 1 ) {
			this.scroller._execEvent('scroll');
		}


// INSERT POINT: indicator._move

		e.preventDefault();
		e.stopPropagation();
	},

	_end: function (e) {
		if ( !this.initiated ) {
			return;
		}

		this.initiated = false;

		e.preventDefault();
		e.stopPropagation();

		utils.removeEvent(window, 'touchmove', this);
		utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this);
		utils.removeEvent(window, 'mousemove', this);

		if ( this.scroller.options.snap ) {
			var snap = this.scroller._nearestSnap(this.scroller.x, this.scroller.y);

			var time = this.options.snapSpeed || Math.max(
					Math.max(
						Math.min(Math.abs(this.scroller.x - snap.x), 1000),
						Math.min(Math.abs(this.scroller.y - snap.y), 1000)
					), 300);

			if ( this.scroller.x != snap.x || this.scroller.y != snap.y ) {
				this.scroller.directionX = 0;
				this.scroller.directionY = 0;
				this.scroller.currentPage = snap;
				this.scroller.scrollTo(snap.x, snap.y, time, this.scroller.options.bounceEasing);
			}
		}

		if ( this.moved ) {
			this.scroller._execEvent('scrollEnd');
		}
	},

	transitionTime: function (time) {
		time = time || 0;
		this.indicatorStyle[utils.style.transitionDuration] = time + 'ms';

		if ( !time && utils.isBadAndroid ) {
			this.indicatorStyle[utils.style.transitionDuration] = '0.001s';
		}
	},

	transitionTimingFunction: function (easing) {
		this.indicatorStyle[utils.style.transitionTimingFunction] = easing;
	},

	refresh: function () {
		this.transitionTime();

		if ( this.options.listenX && !this.options.listenY ) {
			this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? 'block' : 'none';
		} else if ( this.options.listenY && !this.options.listenX ) {
			this.indicatorStyle.display = this.scroller.hasVerticalScroll ? 'block' : 'none';
		} else {
			this.indicatorStyle.display = this.scroller.hasHorizontalScroll || this.scroller.hasVerticalScroll ? 'block' : 'none';
		}

		if ( this.scroller.hasHorizontalScroll && this.scroller.hasVerticalScroll ) {
			utils.addClass(this.wrapper, 'iScrollBothScrollbars');
			utils.removeClass(this.wrapper, 'iScrollLoneScrollbar');

			if ( this.options.defaultScrollbars && this.options.customStyle ) {
				if ( this.options.listenX ) {
					this.wrapper.style.right = '8px';
				} else {
					this.wrapper.style.bottom = '8px';
				}
			}
		} else {
			utils.removeClass(this.wrapper, 'iScrollBothScrollbars');
			utils.addClass(this.wrapper, 'iScrollLoneScrollbar');

			if ( this.options.defaultScrollbars && this.options.customStyle ) {
				if ( this.options.listenX ) {
					this.wrapper.style.right = '2px';
				} else {
					this.wrapper.style.bottom = '2px';
				}
			}
		}

		var r = this.wrapper.offsetHeight;	// force refresh

		if ( this.options.listenX ) {
			this.wrapperWidth = this.wrapper.clientWidth;
			if ( this.options.resize ) {
				this.indicatorWidth = Math.max(Math.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8);
				this.indicatorStyle.width = this.indicatorWidth + 'px';
			} else {
				this.indicatorWidth = this.indicator.clientWidth;
			}

			this.maxPosX = this.wrapperWidth - this.indicatorWidth;

			if ( this.options.shrink == 'clip' ) {
				this.minBoundaryX = -this.indicatorWidth + 8;
				this.maxBoundaryX = this.wrapperWidth - 8;
			} else {
				this.minBoundaryX = 0;
				this.maxBoundaryX = this.maxPosX;
			}

			this.sizeRatioX = this.options.speedRatioX || (this.scroller.maxScrollX && (this.maxPosX / this.scroller.maxScrollX));
		}

		if ( this.options.listenY ) {
			this.wrapperHeight = this.wrapper.clientHeight;
			if ( this.options.resize ) {
				this.indicatorHeight = Math.max(Math.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8);
				this.indicatorStyle.height = this.indicatorHeight + 'px';
			} else {
				this.indicatorHeight = this.indicator.clientHeight;
			}

			this.maxPosY = this.wrapperHeight - this.indicatorHeight;

			if ( this.options.shrink == 'clip' ) {
				this.minBoundaryY = -this.indicatorHeight + 8;
				this.maxBoundaryY = this.wrapperHeight - 8;
			} else {
				this.minBoundaryY = 0;
				this.maxBoundaryY = this.maxPosY;
			}

			this.maxPosY = this.wrapperHeight - this.indicatorHeight;
			this.sizeRatioY = this.options.speedRatioY || (this.scroller.maxScrollY && (this.maxPosY / this.scroller.maxScrollY));
		}

		this.updatePosition();
	},

	updatePosition: function () {
		var x = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0,
			y = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0;

		if ( !this.options.ignoreBoundaries ) {
			if ( x < this.minBoundaryX ) {
				if ( this.options.shrink == 'scale' ) {
					this.width = Math.max(this.indicatorWidth + x, 8);
					this.indicatorStyle.width = this.width + 'px';
				}
				x = this.minBoundaryX;
			} else if ( x > this.maxBoundaryX ) {
				if ( this.options.shrink == 'scale' ) {
					this.width = Math.max(this.indicatorWidth - (x - this.maxPosX), 8);
					this.indicatorStyle.width = this.width + 'px';
					x = this.maxPosX + this.indicatorWidth - this.width;
				} else {
					x = this.maxBoundaryX;
				}
			} else if ( this.options.shrink == 'scale' && this.width != this.indicatorWidth ) {
				this.width = this.indicatorWidth;
				this.indicatorStyle.width = this.width + 'px';
			}

			if ( y < this.minBoundaryY ) {
				if ( this.options.shrink == 'scale' ) {
					this.height = Math.max(this.indicatorHeight + y * 3, 8);
					this.indicatorStyle.height = this.height + 'px';
				}
				y = this.minBoundaryY;
			} else if ( y > this.maxBoundaryY ) {
				if ( this.options.shrink == 'scale' ) {
					this.height = Math.max(this.indicatorHeight - (y - this.maxPosY) * 3, 8);
					this.indicatorStyle.height = this.height + 'px';
					y = this.maxPosY + this.indicatorHeight - this.height;
				} else {
					y = this.maxBoundaryY;
				}
			} else if ( this.options.shrink == 'scale' && this.height != this.indicatorHeight ) {
				this.height = this.indicatorHeight;
				this.indicatorStyle.height = this.height + 'px';
			}
		}

		this.x = x;
		this.y = y;

		if ( this.scroller.options.useTransform ) {
			this.indicatorStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.scroller.translateZ;
		} else {
			this.indicatorStyle.left = x + 'px';
			this.indicatorStyle.top = y + 'px';
		}
	},

	_pos: function (x, y) {
		if ( x < 0 ) {
			x = 0;
		} else if ( x > this.maxPosX ) {
			x = this.maxPosX;
		}

		if ( y < 0 ) {
			y = 0;
		} else if ( y > this.maxPosY ) {
			y = this.maxPosY;
		}

		x = this.options.listenX ? Math.round(x / this.sizeRatioX) : this.scroller.x;
		y = this.options.listenY ? Math.round(y / this.sizeRatioY) : this.scroller.y;

		this.scroller.scrollTo(x, y);
	},

	fade: function (val, hold) {
		if ( hold && !this.visible ) {
			return;
		}

		clearTimeout(this.fadeTimeout);
		this.fadeTimeout = null;

		var time = val ? 250 : 500,
			delay = val ? 0 : 300;

		val = val ? '1' : '0';

		this.wrapperStyle[utils.style.transitionDuration] = time + 'ms';

		this.fadeTimeout = setTimeout((function (val) {
			this.wrapperStyle.opacity = val;
			this.visible = +val;
		}).bind(this, val), delay);
	}
};

IScroll.utils = utils;

if ( typeof module != 'undefined' && module.exports ) {
	module.exports = IScroll;
} else {
	window.IScroll = IScroll;
}

})(window, document, Math);

define("iscroll", function(){});

define( '../src/sublayouts/_helpers/touch-scroller/touch-scroller',[ 'lib/utils', 'iscroll' ],

	function ( utils ) {
		'use strict';

		/**
		 * Adds native feeling scrolling to scrollable content elements
		 * @exports helpers/Scroller
		 * @constructor
		 */
		var Scroller = function () {
			return this;
		};

		/**
		 * Initiate scroller
		 */
		Scroller.prototype.init = function ( $el ) {

			this.$el = $el;

			this.scrollify = utils.isTouchDevice();

			this.$content = this.$el.find( 'div:first-child' );

			if ( this.scrollify ) {
				this.loadScroller();
				this.$el.addClass( 'touch-scroller-wrapper' );
				this.$content.addClass( 'touch-scroller-content' );
			} else {
				this.$el.addClass( 'touch-scroller-overflow' );
			}

		};

		Scroller.prototype.loadScroller = function () {

			var scroller = new IScroll( this.$el[ 0 ], {

				mouseWheel: true,
				disableMouse: false,
				scrollX: false,
				scrollY: true,
				momentum: true,
				snap: false,
				keyBindings: true,
				click: true,
				tap: true
			} );

			this.iscroll = scroller;
			this.refresh();

		};

		Scroller.prototype.refresh = function () {

			if ( this.scrollify ) {
				this.iscroll.refresh();
			}

		};

		return Scroller;

	} );

/* homemodule */
define('../src/sublayouts/m1-hero/m1-hero',['jquery', 'slick', 'lib/utils', 'tooltipster'], function($, slick, utils, tooltipster) {

    'use strict';

    var M1_HERO = function($component) {

        this.$component = $component;

        return this;
    };

    /**
     * Initialise component
     */

    M1_HERO.prototype.init = function() {
        this.$M1_slider = $('.m1-hero__carousel');
        var $nav = $('.m1-hero__carousel-nav-inner'),
            $prev = $('.m1-hero__carousel-button--prev'),
            $next = $('.m1-hero__carousel-button--next'),
            $btnnav = $('.m1-hero__carousel-nav-inner-btn'),
            $body = $('body'),
            _this = this,
            isRTL = utils.isRTL(),
            $margin = 27,
            narrow,
            parrow;

        //if (this.$component.hasClass('m1-hero--stock') || this.$component.hasClass('m1-hero--variant')) {

        //} else {
        $('.m12-masthead').addClass('m12-masthead--dark');
        $('.m12-logo img').each(function() {
            $(this).attr('src', $(this).attr('data-hompagesrc'));
        });
        $('.m12-bar--logo_mobile img').attr('src', $('.m12-logo-image--dewa').attr('data-hompagesrc'));
        //};

        this.$component.find('.m1-hero__carousel-slide').each(function() {
            var m12mainH = $('.m12-masthead .m12-main').is(':visible') ? $('.m12-masthead .m12-main').outerHeight(true) : 0,
                m12wrapperH = $('.m12-masthead .m12-bar__outerwrapper').is(':visible') ? $('.m12-masthead .m12-bar__outerwrapper').outerHeight(true) : 0,
                offset = utils.breakpoint() == 'l' ? 132 : 0;

            $(this).css('max-height', window.innerHeight - m12mainH - m12wrapperH - offset);
        });

        $(window).off('resize.m1height').on('resize.m1height', function() {
            _this.$component.find('.m1-hero__carousel-slide').each(function() {
                var m12mainH = $('.m12-masthead .m12-main').is(':visible') ? $('.m12-masthead .m12-main').outerHeight(true) : 0,
                    m12wrapperH = $('.m12-masthead .m12-bar__outerwrapper').is(':visible') ? $('.m12-masthead .m12-bar__outerwrapper').outerHeight(true) : 0,
                    offset = utils.breakpoint() == 'l' ? 132 : 0;

                $(this).css('max-height', window.innerHeight - m12mainH - m12wrapperH - offset);
            });
        });

        if ($('.m1-hero__carousel-slide').length > 1) {
            var that = this;

            // listen for carousel initialisation
            this.$M1_slider.on('init', function(event) {
                // resize nav arrow container to fit around dot navigation
                $btnnav.css({
                    width: (($('.m1-hero .slick-dots li').length * 26) + 24)
                });
                if (isRTL) {
                    $('.m1-hero .slick-dots').css({
                        width: (($('.m1-hero .slick-dots li').length * 26) + 16),
                        right: 'calc((100% - ' + ((($('.m1-hero .slick-dots li').length * 26) + 16)) + 'px)/2)'
                    });
                    $('.m1-hero__carousel-nav').css({
                        width: (46 + 25 + (($('.m1-hero .slick-dots li').length * 26) + 24)),
                        right: 'calc((100% - ' + (46 + 25 + (($('.m1-hero .slick-dots li').length * 26) + 24)) + 'px)/2)'
                    });
                } else {
                    $('.m1-hero .slick-dots').css({
                        width: (($('.m1-hero .slick-dots li').length * 26) + 16),
                        left: 'calc((100% - ' + ((($('.m1-hero .slick-dots li').length * 26) + 16)) + 'px)/2)'
                    });
                    $('.m1-hero__carousel-nav').css({
                        width: (46 + 25 + (($('.m1-hero .slick-dots li').length * 26) + 24)),
                        left: 'calc((100% - ' + (46 + 25 + (($('.m1-hero .slick-dots li').length * 26) + 24)) + 'px)/2)'
                    });
                }
                // show pause/play button
                that.$component.find('.m1-hero__carousel-button-play-pause').show();
                //$('.slick-arrow').hide();
                // display the carousel
                that.display();
            });

            // bind the play button click event

            // bind the play button click event
            $body.on(
                'click',
                '.m1-hero__carousel-button--play',
                function() {
                    that.$M1_slider.slick('slickPlay');
                    $(this).removeClass('m1-hero__carousel-button--play');
                    $(this).addClass('m1-hero__carousel-button--pause');
                });

            // bind the pause button click event
            $body.on(
                'click',
                '.m1-hero__carousel-button--pause',
                function() {
                    that.$M1_slider.slick('slickPause');
                    $(this).removeClass('m1-hero__carousel-button--pause');
                    $(this).addClass('m1-hero__carousel-button--play');
                });

            // initialise the carousel
            if (isRTL) {
                narrow = '.m1-hero__carousel-button--prev';
                parrow = '.m1-hero__carousel-button--next';
            } else {
                narrow = '.m1-hero__carousel-button--next';
                parrow = '.m1-hero__carousel-button--prev';
            }
            this.$M1_slider.slick({
                arrows: true,
                dots: true,
                infinite: true,
                speed: 750,
                fade: true,
                slidesToShow: 1,
                slidesToScroll: 1,
                autoplay: true,
                autoplaySpeed: 3000,
                pauseOnHover: true,
                lazyLoad: 'ondemand',
                nextArrow: '.m1-hero__carousel-button--next',
                prevArrow: '.m1-hero__carousel-button--prev',
                rtl: ($('html').attr('dir') == 'rtl')
            });
            //$('.m1-hero__carousel-slide').each(function() {
            //  var text = $(this).attr('data-alt');

            //  $(this).tooltipster({
            //      content: text,
            //      distance: -48,
            //      maxWidth: 250,
            //      arrow: false
            //  });
            //});

             $prev.tooltipster({
                 content: isRTL ? "سابق" : "Previous",
                 maxWidth: 250,
                 arrow: false
             });

             $next.tooltipster({
                 content: isRTL ? "التالي" : "Next",
                 maxWidth: 250,
                 arrow: false
             });

        } else {
            // only one image, do not initialise the carousel, just display the image
            this.display();
        }
    };

    M1_HERO.prototype.display = function() {

        $('.m1-hero__carousel-slide-gradient').each(function() {
            var target = $(this);
            target.css({
                background: "rgba(0, 0, 0, 0.4)"
            })
        });

        this.$M1_slider.css({
            top: 0,
            opacity: 1,
            position: 'relative'
        });

        var index = ""


    }

    return M1_HERO;
});
define('../src/sublayouts/m100-ev-card/m100-ev-card',['jquery'], function($) {

    'use strict';

    var M100EvCard = function($component) {

        this.$component = $component;

        return this;
    };

    M100EvCard.prototype.init = function() {
        var _this = this;

        if (!_this.$component.hasClass('m100-ev-card--selector')) {
            _this.$component.find('.m100-ev-card--actions').each(function() {
                var $action = $(this),
                    $options = $(this).next('.m100-ev-card--actions_box');

                $action.off('click.m100').on('click.m100', function() {
                    $('.m100-ev-card--actions_box').not($options).each(function() {
                        $(this).removeClass('active');
                    });
                    $options.toggleClass('active');
                });
            });

            _this.$component.find('.m100-ev-card--buttons').find('.m39-modal__button--close').off('click.m100').on('click.m100', function() {
                $(this).closest('.m39-modal').find('.m100-ev-card--actions_box').each(function() {
                    $(this).removeClass('active');
                });
            });

            $(document).click(function(e) {
                var $target = $(e.target);
                var popupContent = _this.$component.find(".m100-ev-card--actions");
                if (!$target.is(popupContent)) {
                    _this.$component.find('.m100-ev-card--actions_box').removeClass('active')
                };
            });

            _this.$component.find('.m100-ev-card--actions_link[data-card-title]').each(function() {
                $(this).off('click.m100').on('click.m100', function(event) {
                    var title = $(this).attr('data-card-title'),
                        data = $(this).attr('data-modal'),
                        cardid = $(this).attr('data-cardid');

                    event.preventDefault();

                    _this.$component.find('.m39-modal--ev_cardtitle').find('.form-field__input--cardtitle').val(title);
                    _this.$component.find('.m39-modal--ev_cardtitle').find('.button--primary').attr('data-modal', data);
                    _this.$component.find('.m39-modal--ev_cardtitle').find('.button--primary').attr('data-cardid', cardid);
                    if (_this.$component.find('.m100-ev-card--buttons').find('.m39-modal__container').hasClass('m39-modal__container--active')) {
                        _this.$component.find('.m100-ev-card--buttons').find('.m39-modal__button--close').click();
                    }
                    _this.$component.find('.m39-modal--ev_cardtitle').find('.m39-modal__trigger').click();
                });
            });

            _this.$component.find('.m39-modal').find('.j69-dashboard--card_filter').find('.form-field__input').on('keyup', function (event) {
                if (event.keyCode == 13) {
                    _this.$component.find('.m39-modal').find('.j69-dashboard--card_filter').find('button[type="submit"]').click();
                };
            });

        } else {
            _this.$component.find('.m100-ev-card--selector_wrapper').off('click.m100').on('click.m100', function() {
                _this.$component.find('[data-trigger="true"]').click();
            });

            _this.$component.find('.m100-table__content-table-row').off('click.m100').on('click.m100', function() {
                var holder = $(this).find('[data-holder]').text(),
                    cnumber = $(this).find('[data-cardnumber]').text(),
                    evnumber = $(this).find('[data-evnumber]').text(),
                    title = $(this).find('[data-title]').text(),
                    $evcard = _this.$component.find('.m100-ev-card'),
                    holderCard = $evcard.find('[data-holder]'),
                    cnumberCard = $evcard.find('[data-cardnumber]'),
                    evnumberCard = $evcard.find('[data-evnumber]'),
                    titleCard = $evcard.find('[data-title]'),
                    $close = _this.$component.find('[data-close="true"]');

                holderCard.html(holder);
                cnumberCard.html(cnumber);
                cnumberCard.attr('data-cardnumber', $(this).find('[data-cardnumber]').attr('data-cardnumber').trim());
                evnumberCard.html(evnumber);
                evnumberCard.attr('data-evnumber', $(this).find('[data-evnumber]').attr('data-evnumber').trim());
                titleCard.html(title);

                $close.click();
            });
        };

        $(window).off('reinitm100').on('reinitm100', function() {
            _this.init();
        });
    };

    return M100EvCard;

});

define('../src/sublayouts/m101-journey-map/m101-journey-map',['jquery'], function($) {

    'use strict';

    var M101 = function($component) {

        this.$component = $component;

        return this;
    };

    return M101;

});

/**
 * jQuery.marquee - scrolling text like old marquee element
 * @author Aamir Afridi - aamirafridi(at)gmail(dot)com / http://aamirafridi.com/jquery/jquery-marquee-plugin
 */
;(function(d){d.fn.marquee=function(w){return this.each(function(){var a=d.extend({},d.fn.marquee.defaults,w),b=d(this),c,k,p,q,h,l=3,x="animation-play-state",e=!1,B=function(a,b,c){for(var d=["webkit","moz","MS","o",""],e=0;e<d.length;e++)d[e]||(b=b.toLowerCase()),a.addEventListener(d[e]+b,c,!1)},E=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c+":"+a[c]);b.push();return"{"+b.join(",")+"}"},g={pause:function(){e&&a.allowCss3Support?c.css(x,"paused"):d.fn.pause&&c.pause();b.data("runningStatus",
"paused");b.trigger("paused")},resume:function(){e&&a.allowCss3Support?c.css(x,"running"):d.fn.resume&&c.resume();b.data("runningStatus","resumed");b.trigger("resumed")},toggle:function(){g["resumed"==b.data("runningStatus")?"pause":"resume"]()},destroy:function(){clearTimeout(b.timer);b.css("visibility","hidden").html(b.find(".js-marquee:first"));setTimeout(function(){b.css("visibility","visible")},0)}};if("string"===typeof w)d.isFunction(g[w])&&(c||(c=b.find(".js-marquee-wrapper")),!0===b.data("css3AnimationIsSupported")&&
(e=!0),g[w]());else{var r;d.each(a,function(c,d){r=b.attr("data-"+c);if("undefined"!==typeof r){switch(r){case "true":r=!0;break;case "false":r=!1}a[c]=r}});a.duration=a.speed||a.duration;q="up"==a.direction||"down"==a.direction;a.gap=a.duplicated?a.gap:0;b.wrapInner('<div class="js-marquee"></div>');var f=b.find(".js-marquee").css({"margin-right":a.gap,"float":"left"});a.duplicated&&f.clone(!0).appendTo(b);b.wrapInner('<div style="width:100000px" class="js-marquee-wrapper"></div>');c=b.find(".js-marquee-wrapper");
if(q){var m=b.height();c.removeAttr("style");b.height(m);b.find(".js-marquee").css({"float":"none","margin-bottom":a.gap,"margin-right":0});a.duplicated&&b.find(".js-marquee:last").css({"margin-bottom":0});var s=b.find(".js-marquee:first").height()+a.gap;a.duration*=(parseInt(s,10)+parseInt(m,10))/parseInt(m,10)}else h=b.find(".js-marquee:first").width()+a.gap,k=b.width(),a.duration*=(parseInt(h,10)+parseInt(k,10))/parseInt(k,10);a.duplicated&&(a.duration/=2);if(a.allowCss3Support){var f=document.body||
document.createElement("div"),n="marqueeAnimation-"+Math.floor(1E7*Math.random()),z=["Webkit","Moz","O","ms","Khtml"],A="animation",t="",u="";f.style.animation&&(u="@keyframes "+n+" ",e=!0);if(!1===e)for(var y=0;y<z.length;y++)if(void 0!==f.style[z[y]+"AnimationName"]){f="-"+z[y].toLowerCase()+"-";A=f+A;x=f+x;u="@"+f+"keyframes "+n+" ";e=!0;break}e&&(t=n+" "+a.duration/1E3+"s "+a.delayBeforeStart/1E3+"s infinite "+a.css3easing,b.data("css3AnimationIsSupported",!0))}var C=function(){c.css("margin-top",
"up"==a.direction?m+"px":"-"+s+"px")},D=function(){c.css("margin-left","left"==a.direction?k+"px":"-"+h+"px")};a.duplicated?(q?c.css("margin-top","up"==a.direction?m:"-"+(2*s-a.gap)+"px"):c.css("margin-left","left"==a.direction?k+"px":"-"+(2*h-a.gap)+"px"),l=1):q?C():D();var v=function(){a.duplicated&&(1===l?(a._originalDuration=a.duration,a.duration=q?"up"==a.direction?a.duration+m/(s/a.duration):2*a.duration:"left"==a.direction?a.duration+k/(h/a.duration):2*a.duration,t&&(t=n+" "+a.duration/1E3+
"s "+a.delayBeforeStart/1E3+"s "+a.css3easing),l++):2===l&&(a.duration=a._originalDuration,t&&(n+="0",u=d.trim(u)+"0 ",t=n+" "+a.duration/1E3+"s 0s infinite "+a.css3easing),l++));q?a.duplicated?(2<l&&c.css("margin-top","up"==a.direction?0:"-"+s+"px"),p={"margin-top":"up"==a.direction?"-"+s+"px":0}):(C(),p={"margin-top":"up"==a.direction?"-"+c.height()+"px":m+"px"}):a.duplicated?(2<l&&c.css("margin-left","left"==a.direction?0:"-"+h+"px"),p={"margin-left":"left"==a.direction?"-"+h+"px":0}):(D(),p={"margin-left":"left"==
a.direction?"-"+h+"px":k+"px"});b.trigger("beforeStarting");if(e){c.css(A,t);var f=u+" { 100%  "+E(p)+"}",g=d("style");0!==g.length?g.filter(":last").append(f):d("head").append("<style>"+f+"</style>");B(c[0],"AnimationIteration",function(){b.trigger("finished")});B(c[0],"AnimationEnd",function(){v();b.trigger("finished")})}else c.animate(p,a.duration,a.easing,function(){b.trigger("finished");a.pauseOnCycle?b.timer=setTimeout(v,a.delayBeforeStart):v()});b.data("runningStatus","resumed")};b.bind("pause",
g.pause);b.bind("resume",g.resume);a.pauseOnHover&&b.bind("mouseenter mouseleave",g.toggle);e&&a.allowCss3Support?v():b.timer=setTimeout(v,a.delayBeforeStart)}})};d.fn.marquee.defaults={allowCss3Support:!0,css3easing:"linear",easing:"linear",delayBeforeStart:1E3,direction:"left",duplicated:!1,duration:5E3,gap:20,pauseOnCycle:!1,pauseOnHover:!1}})(jQuery);
define("vendor/marquee", function(){});

define('../src/sublayouts/m103-marquee/m103-marquee',['jquery', 'lib/utils', 'vendor/marquee'], function($, utils, marquee) {

    'use strict';

    var M103_MARQUEE = function($component) {

        this.$component = $component;

        return this;
    };

    /**
     * Initialise component
     */

    M103_MARQUEE.prototype.init = function() {
        var _this = this;

        //this.marquee(this.$component.find('.m103-marquee--set'), true);

        var $mq = this.$component.marquee({
            //speed in milliseconds of the marquee
            duration: 30000,
            //gap in pixels between the tickers
            gap: 50,
            //time in milliseconds before the marquee will start animating
            delayBeforeStart: 0,
            //'left' or 'right'
            direction: utils.isRTL() ? 'right' : 'left',
            //true or false - should the marquee be duplicated to show an effect of continues flow
            duplicated: true,
            startVisible: true
        });

        this.$component.off('mouseenter.m103').on('mouseenter.m103', function(){
            if (!$('#m103-marquee--pause').hasClass('paused')) {
                $mq.marquee('pause');
            }
        });

        this.$component.off('mouseleave.m103').on('mouseleave.m103', function(){
            if (!$('#m103-marquee--pause').hasClass('paused')) {
                $mq.marquee('resume');
            }
        });

        $('#m103-marquee--pause').off('click.m103').on('click.m103', function(){
            $mq.marquee('toggle');
            $('#m103-marquee--pause').toggleClass('paused');
        });
    };

    // M103_MARQUEE.prototype.marquee = function($set, isInit) {
    //     var _this = this,
    //         setTime = parseInt(this.$component.attr('data-animationms')),
    //         ticks = setTime / 10,
    //         tickWidth = ($set.outerWidth(true) + $(window).outerWidth(true)) / ticks,
    //         j = 0,
    //         currentTime = 0,
    //         currentPos = $(window).outerWidth(true);

    //     if (isInit) {
    //         var cloned = $set.clone().css('left', currentPos);
    //         $set.parent().append(cloned);
    //     };

    //     $set.addClass('active');
    //     $set.removeClass('flagged');
    //     for (var i = 0; i < ticks; i++) {
    //         setTimeout(function() {
    //             currentPos = currentPos - tickWidth
    //             $set.css('left', currentPos);

    //             if (!$set.hasClass('flagged') && (parseInt($set.css('left').replace('px', '')) + $set.outerWidth(true)) < $(window).outerWidth(true) && _this.$component.find('.m103-marquee--set.active').length == (_this.$component.find('.m103-marquee--set').length - 1)) {

    //                 if ((_this.$component.find('.m103-marquee--set').length - 1) * _this.$component.find('.m103-marquee--set').outerWidth(true) < $(window).outerWidth(true)) {
    //                     _this.marquee(_this.$component.find('.m103-marquee--set').not('.active'), true);
    //                 } else {
    //                     _this.marquee(_this.$component.find('.m103-marquee--set').not('.active'), false);
    //                 };
    //                 $set.addClass('flagged');

    //             };

    //             j = j + 10
    //             if (j == setTime) {
    //                 $set.removeClass('active');
    //                 $set.css('left', $(window).outerWidth(true));
    //             }
    //         }, currentTime);
    //         currentTime = currentTime + 10;
    //     };
    // };

    return M103_MARQUEE;
});

define('../src/sublayouts/m104-stock-graph/m104-stock-graph',['jquery', 'lib/utils'],
    function($, utils) {

        'use strict';

        var m104 = function($component) {

            this.$component = $component;
        };

        m104.prototype.init = function() {
            var scripts = ["https://code.highcharts.com/stock/highstock.js", "https://code.highcharts.com/stock/modules/data.js", "https://code.highcharts.com/stock/modules/exporting.js", "https://code.highcharts.com/stock/modules/export-data.js"];

            $(scripts).each(function() {
                var tag = document.createElement('script');

                tag.setAttribute('src', this);

                document.head.appendChild(tag);
            });

            
        };

        return m104;


    });

define('../src/sublayouts/m105-text-chart/m105-text-chart',['jquery', 'lib/utils', 'chart-config'],
    function($, utils) {

        'use strict';

        var m105 = function($component) {

            this.$component = $component;
        };

        m105.prototype.init = function() {
            var _this = this;

            _this.$component.find('.m105-text-chart--graph').each(function() {
                var width = $(this).outerWidth(true);

                $(this).css('height', width);
            });

            _this.$component.find('.m105-text-chart--graphtitle').each(function() {
                var height = $(this).outerHeight(true);

                $(this).css('top', 'calc((100% - '+height.toString()+'px - '+$(this).closest('.m105-text-chart--graphcontainer').find('.m105-text-chart--footercolumn').outerHeight(true)+'px)/2)');
            });

            $(window).off('resize.105').on('resize.105', function() {
                _this.$component.find('.m105-text-chart--graph').each(function() {
                    var width = $(this).outerWidth(true);

                    $(this).css('height', width);
                });
                
                _this.$component.find('.m105-text-chart--graphtitle').each(function() {
                    var height = $(this).outerHeight(true);

                    $(this).css('top', 'calc((100% - '+height.toString()+'px - '+$(this).closest('.m105-text-chart--graphcontainer').find('.m105-text-chart--footercolumn').outerHeight(true)+'px)/2)');
                });
            });

            _this.$component.find('[data-chart105-container]').each(function() {
                _this.renderGraph($(this));
            });

            setTimeout(function () {
                $(window).trigger('resize.105')
            },250);

            setTimeout(function () {
                $(window).trigger('resize.105')
            },1000)
        };

        m105.prototype.renderGraph = function($graph) {
            var $container = $graph,
                series = JSON.parse($graph.attr('data-series')),
                isRTL = utils.isRTL();

            for (var i = 0; i < series.length; i++) {
                if (series[i].data.length == 0) {
                    series.splice(i, 1);
                };
            };

            for (var i = 0; i < series[0].data.length; i = i + 1) {
                series[0].data[i].y = parseFloat(series[0].data[i].y)
                    //console.log(series[0].data[i])
            };

            var opts = {
                chart: {
                    plotBackgroundColor: null,
                    plotBorderWidth: null,
                    plotShadow: false,
                    type: 'pie',
                    backgroundColor: 'transparent'
                },
                title: {
                    text: '',
                    style: {
                        display: 'none'
                    }
                },

                subtitle: {
                    text: '',
                    style: {
                        display: 'none'
                    }
                },
                legend: {
                    style: {
                        display: 'none'
                    }
                },
                xAxis: {
                    style: {
                        display: 'none'
                    }
                },
                yAxis: {
                    style: {
                        display: 'none'
                    }
                },
                tooltip: {
                    enabled: true,
                    //positioner: function() {
                    //    return { x: 0, y: 0 };
                    //},
                    outside: true,
                    pointFormat: $('html').attr('dir') == "rtl" ? '<span style="font-size: 14px;font-weight:bold;">%<b>{point.y}</b> :{point.name}</span>' : '<span style="font-size: 14px;font-weight:bold;">{point.name}: <b>{point.y} %</b></span>',
                    headerFormat: '',
                    crosshairs: true,
                    rtl: $('html').attr('dir') == "rtl",
                    useHTML: true
                },
                plotOptions: {
                    pie: {
                        allowPointSelect: false,
                        dataLabels: {
                            enabled: false
                        },
                        size: '100%',
                        innerSize: '66.6667%'
                    }
                },
                series: series
            };

            $container.highcharts(opts);

            //this.$journey.find('.m29v2-chart__legend--item').each(function() {
            //$(this).find('.m29v2-chart__legend--item-icon').css('color', $(this).data('color'));
            //});
        };

        return m105;


    });

define('../src/sublayouts/m106-timeline/m106-timeline',['jquery', 'lib/utils'],
    function($, utils) {

        'use strict';

        var m106 = function($component) {

            this.$component = $component;
        };

        m106.prototype.init = function() {
            var _this = this;

            this.initEl();

            $(window).off('resize.106').on('resize.106', function () {
                _this.initEl();
            })

        };

        m106.prototype.initEl = function() {
            var _this = this,
                top = 0,
                height = 0;

            _this.$component.find('.m106-timeline--card').each(function(index) {
                var $dash = $(this).find('.m106-timeline--dash'),
                    sub = utils.breakpoint() == 's' ? -12 : 12;

                $(this).css('top', top - sub);
                top = top + $(this).outerHeight(true) + (utils.breakpoint() == 's' ? 12 : 0);

                $dash.css('height', $(this).outerHeight(true) + (utils.breakpoint() == 's' ? 10 : 0));

                height = height + $(this).outerHeight(true);
            });

            _this.$component.find('.m106-timeline--body').css('height', height + 30 + (utils.breakpoint() == 's' ? 12*_this.$component.find('.m106-timeline--card').length : 0));

            var arrowbot = _this.$component.find('.m106-timeline--card:last-child').outerHeight(true);

            _this.$component.find('.m106-timeline--arrow').css('bottom', arrowbot - 30)
        }

        return m106;

    });

define('../src/sublayouts/m107-mbar-chart/m107-mbar-chart',['jquery', 'lib/utils', 'chart-config'],
    function($, utils) {

        'use strict';

        var M107_BAR_CHART = function($component) {

            this.$component = $component;
        };

        M107_BAR_CHART.prototype.init = function() {
            var _this = this;

           /* _this.$component.find('.m105-text-chart--graph').each(function() {
                var width = $(this).outerWidth(true);

                $(this).css('height', width);
            });

            _this.$component.find('.m105-text-chart--graphtitle').each(function() {
                var height = $(this).outerHeight(true);

                $(this).css('top', 'calc((100% - '+height.toString()+'px)/2)');
            });

            $(window).off('resize.105').on('resize.105', function() {
                _this.$component.find('.m105-text-chart--graph').each(function() {
                    var width = $(this).outerWidth(true);

                    $(this).css('height', width);
                });
            });

            _this.$component.find('[data-chart105-container]').each(function() {
                _this.renderGraph($(this));
            });

            setTimeout(function () {
                $(window).trigger('resize.105')
            },250);

            setTimeout(function () {
                $(window).trigger('resize.105')
            },1000)*/

             _this.$component.find('[data-chart107-container]').each(function() {
                var type = $(this).attr('data-chart-type');

                    if(type == 'column'){
                        _this.renderGraphCol($(this));
                    }
                    
                    if(type == 'bar'){
                        _this.renderGraphBar($(this));
                    }

                    if(type == 'number'){
                        _this.renderGraphNum($(this));
                    }

            });
        };

        M107_BAR_CHART.prototype.renderGraphCol = function($graph) {
            var $container = $graph,
                category = JSON.parse($graph.attr('data-category')),
                type = $graph.attr('data-chart-type'),
                isRTL = utils.isRTL(),
                label = $graph.attr('data-category-hidden') === 'true' ? false : true,
                series = JSON.parse($graph.attr('data-series'));
                        

                for(var i = 0; i < series.length; i++) {
                    if (series[i].data.length == 0) {
                        series.splice(i, 1);
                    };
                };
                function round(value, exp) {
                  if (typeof exp === 'undefined' || +exp === 0)
                    return Math.round(value);
                
                  value = +value;
                  exp = +exp;
                
                  if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0))
                    return NaN;
                
                  // Shift
                  value = value.toString().split('e');
                  value = Math.round(+(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp)));
                
                  // Shift back
                  value = value.toString().split('e');
                  return +(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp));
                }

                for(var i = 0; i < series[0].data.length; i = i + 1) {
                    series[0].data[i].y = parseFloat(series[0].data[i].y);
                    series[0].data[i].y = round(series[0].data[i].y,2)
                };

            var opts = {
                chart: {
                    plotBackgroundColor: null,
                    plotBorderWidth: null,
                    plotShadow: false,
                    marginTop : 40,
                    type: type,
                    backgroundColor: 'transparent'
                },
                title: {
                    text: ''
                },
                xAxis: {
                    categories: category,
                    crosshair: true,
                    labels: {
                        enabled: label,
                        style: {
                            fontSize: '13px'
                        }
                    }
                },
                yAxis: {
                    min: 0,
                    max: 100,
                    gridLineWidth: 0,
                    visible: false,
                },
                tooltip: {
                    enabled: false,
                },
                legend:{
                    enabled: false,
                },
                plotOptions: {
                    series: {
                        dataLabels: {
                            enabled: true,
                            crop: false,
                            align: 'top',
                            position: 'center',
                            x: -5,
                            shadow:false,
                            overflow:'allow',
                            format: '{y}%',
                            style: {
                               fontSize: '14px',
                               color:'#222222',
                               fontWeight:'normal'
                            }
                        },
                        states: {
                             inactive: {
                                 opacity: 1
                            },
                            hover: {
                                enabled: false
                            }
                        }
                    },
                    column: {
                        pointPadding: 0,
                        borderWidth: 0,
                        maxPointWidth: 30
                    }
                },
                series: series
            };

            $container.highcharts(opts);
        };

         M107_BAR_CHART.prototype.renderGraphBar = function($graph) {
            var $container = $graph,
                category = JSON.parse($graph.attr('data-category')),
                type = $graph.attr('data-chart-type'),
                isRTL = utils.isRTL(),
                label = $graph.attr('data-category-hidden') === 'true' ? false : true,
                numTargetArr = [],
                numActualArr = [],
                series = JSON.parse($graph.attr('data-series')),
                numTarget = parseFloat(series[0].data[0].target),
                numActual = parseFloat(series[0].data[0].actual),
                maxtarget = parseFloat(series[0].data[0].target),
                numTargetBg = series[0].data[0].targetcolor,
                numActualBg = series[0].data[0].actualcolor;
                numTargetArr.push(numTarget);
                numActualArr.push(numActual);
           


            var optsBar = {
              chart: {
                type: 'bar',
                marginRight: 55,
              },
              legend: {
                enabled: false
              },
              xAxis: {
                categories: category,
                labels: {
                  align: 'left',
                  x: 0,
                  y: -10, /* to be adjusted according to number of bars*/
                  style: {
                    fontSize: "18px",
                    fontWeight: "bold",
                    color: '#222222'
                  }
                },
                lineWidth: 0,
                gridLineWidth: 0,
                lineColor: 'transparent',
                minorTickLength: 0,
                tickLength: 0,
                title: {
                  enabled: false
                }

              },
              yAxis: {
                min: 0,
                max: maxtarget,
                lineWidth: 0,
                gridLineWidth: 0,
                lineColor: 'transparent',
                labels: {
                  enabled: false
                },
                minorTickLength: 0,
                tickLength: 0,
                title: {
                  enabled: false
                }
              },
              tooltip: {
                enabled: false
               },
              plotOptions: {
                series: {
                    pointWidth: 10,
                    dataLabels: {
                        enabled: true,
                        crop: false,
                        align: 'right',
                        position: 'right',
                        format: numActual+'%',
                        overflow:'allow',
                        x: 60,
                        style: {
                            fontSize: "17px",
                            fontWeight: "normal",
                        }
                    }
                }
              },
              title: {
                text: "",
              },

              series: [
                       {
                        name: "Target",
                        data: numTargetArr,
                        color: numTargetBg,
                        grouping: false,
                        states: {
                             inactive: {
                                 opacity: 1
                            },
                            hover: {
                                enabled: false
                            }
                        }
                      },
                      {
                        name: "Actual",
                        data: numActualArr,
                        color: numActualBg,
                        dataLabels: {
                          enabled: false,
                        },
                        states: {
                             inactive: {
                                 opacity: 1
                            },
                            hover: {
                                enabled: false
                            }
                        }
                      }
                      ]
            };


            $container.highcharts(optsBar);
        };

         M107_BAR_CHART.prototype.renderGraphNum = function($graph) {
            var $container = $graph,
                category = JSON.parse($graph.attr('data-category')),
                type = $graph.attr('data-chart-type'),
                isRTL = utils.isRTL(),
                label = $graph.attr('data-category-hidden') === 'true' ? false : true,
                numTargetArr = [],
                numActualArr = [],
                series = JSON.parse($graph.attr('data-series')),
                numTarget = parseFloat(series[0].data[0].target),
                numActual = parseFloat(series[0].data[0].actual),
                maxtarget = parseFloat(series[0].data[0].target),
                numTargetBg = series[0].data[0].targetcolor,
                numActualBg = series[0].data[0].actualcolor;
                numTargetArr.push(numTarget);
                numActualArr.push(parseInt((numActual /numTarget) * 100));



            var optsNum = {
              chart: {
                type: 'bar',
                marginRight: 55,
              },
              legend: {
                enabled: false
              },
              xAxis: {
                categories: category,
                labels: {
                  align: 'left',
                  x: 0,
                  y: -10, /* to be adjusted according to number of bars*/
                  style: {
                    fontSize: "18px",
                    fontWeight: "bold",
                    color: '#222222'
                  }
                },
                lineWidth: 0,
                gridLineWidth: 0,
                lineColor: 'transparent',
                minorTickLength: 0,
                tickLength: 0,
                title: {
                  enabled: false
                }

              },
              yAxis: {
                min: 0,
                max: 100,
                lineWidth: 0,
                gridLineWidth: 0,
                lineColor: 'transparent',
                labels: {
                  enabled: false
                },
                minorTickLength: 0,
                tickLength: 0,
                title: {
                  enabled: false
                }
              },
              tooltip: {
                enabled: false
               },
              plotOptions: {
                series: {
                    pointWidth: 10,
                    dataLabels: {
                        enabled: true,
                        crop: false,
                        align: 'right',
                        position: 'right',
                        overflow:'allow',
                        format: numActual+'/'+maxtarget,
                        x: 60,
                        style: {
                            fontSize: "17px",
                            fontWeight: "normal",
                        }
                    },
                }
              },
              title: {
                text: "",
              },
              series: [
                       {
                        name: "Target",
                        data: [100],
                        color: numTargetBg,
                        grouping: false,
                        states: {
                             inactive: {
                                 opacity: 1
                            },
                            hover: {
                                enabled: false
                            }
                        }
                      },
                      {
                        name: "Actual",
                        data: numActualArr,
                        color: numActualBg,
                        dataLabels: {
                          enabled: false,
                        },
                        states: {
                             inactive: {
                                 opacity: 1
                            },
                            hover: {
                                enabled: false
                            }
                        }
                      }
                      ]
            };

            $container.highcharts(optsNum);
        };

        return M107_BAR_CHART;


    });

define('../src/sublayouts/m108-add-to-calendar/m108-add-to-calendar',['jquery'], function($, utils) {

    'use strict';

    var m108 = function($component) {

        this.$component = $component;
    };

    m108.prototype.init = function() {
        var _this = this;

        this.ICSinit();

        $('html').not('.m108-atc--linklist').off('click.calendarz').on('click.calendarz', function() {
            $('.m108-atc--linklist').each(function() {
                $(this).removeClass('active');
            });
        });

        this.$component.find('.m108-atc--link').each(function() {
            $(this).off('click.calendar').on('click.calendar', function() {
                var _thiss = this;
                setTimeout(function() {
                    _this.$component.find('.m108-atc--linklist').each(function() {
                        $(_thiss).removeClass('active');
                    });
                    $(_thiss).find('.m108-atc--linklist').addClass('active');
                }, 50);
            });
        });

        this.$component.find('.m108-atc--linkitem_link[data-client="google"]').each(function () {
            var $cal = JSON.parse($(this).closest('.m108-atc--link').attr('data-ics_entry'));

            $(this).attr('href', 'https://calendar.google.com/calendar/u/0/r/eventedit?text=%27'+$cal.subject.replaceAll(' ', '%20').replaceAll('&', '%26')+'%27&dates='+_this.formatDate($cal.begin)+'/'+_this.formatDate($cal.end)+'&details='+$cal.description.replaceAll(' ', '%20').replaceAll('&', '%26')+'&location='+$cal.location.replaceAll(' ', '%20').replaceAll('&', '%26')+'&trp=false&sprop&sprop=name:&sf=true')
        });

        this.$component.find('.m108-atc--linkitem_link[data-client="yahoo"]').each(function () {
            var $cal = JSON.parse($(this).closest('.m108-atc--link').attr('data-ics_entry'));

            $(this).attr('href', 'https://calendar.yahoo.com/?v=60&view=d&type=20&title=%27'+$cal.subject.replaceAll(' ', '%20').replaceAll('&', '%26')+'%27&st='+_this.formatDate($cal.begin)+'&et='+_this.formatDate($cal.end)+'&desc='+$cal.description.replaceAll(' ', '%20').replaceAll('&', '%26')+'&in_loc='+$cal.location.replaceAll(' ', '%20').replaceAll('&', '%26')+'&uid=')
        });
    };

    m108.prototype.ICSinit = function() {
        var _this = this;

        var icsFormatter = function() {
            'use strict';

            if (navigator.userAgent.indexOf('MSIE') > -1 && navigator.userAgent.indexOf('MSIE 10') == -1) {
                console.log('Unsupported Browser');
                return;
            }

            var SEPARATOR = (navigator.appVersion.indexOf('Win') !== -1) ? '\r\n' : '\n';
            var calendarEvents = [];
            var calendarStart = [
                'BEGIN:VCALENDAR',
                'VERSION:2.0'
            ].join(SEPARATOR);
            var calendarEnd = SEPARATOR + 'END:VCALENDAR';

            return {
                /**
                 * Returns events array
                 * @return {array} Events
                 */
                'events': function() {
                    return calendarEvents;
                },

                /**
                 * Returns calendar
                 * @return {string} Calendar in iCalendar format
                 */
                'calendar': function() {
                    return calendarStart + SEPARATOR + calendarEvents.join(SEPARATOR) + calendarEnd;
                },

                /**
                 * Add event to the calendar
                 * @param  {string} subject     Subject/Title of event
                 * @param  {string} description Description of event
                 * @param  {string} location    Location of event
                 * @param  {string} begin       Beginning date of event
                 * @param  {string} stop        Ending date of event
                 */
                'addEvent': function(subject, description, location, begin, stop) {
                    // I'm not in the mood to make these optional... So they are all required
                    if (typeof subject === 'undefined' ||
                        typeof description === 'undefined' ||
                        typeof location === 'undefined' ||
                        typeof begin === 'undefined' ||
                        typeof stop === 'undefined'
                    ) {
                        return false;
                    }

                    //TODO add time and time zone? use moment to format?
                    // var start_date = new Date(begin);
                    // var end_date = new Date(stop);

                    // var start_year = ("0000" + (start_date.getFullYear().toString())).slice(-4);
                    // var start_month = ("00" + ((start_date.getMonth() + 1).toString())).slice(-2);
                    // var start_day = ("00" + ((start_date.getDate()).toString())).slice(-2);
                    // var start_hours = ("00" + (start_date.getHours().toString())).slice(-2);
                    // var start_minutes = ("00" + (start_date.getMinutes().toString())).slice(-2);
                    // var start_seconds = ("00" + (start_date.getMinutes().toString())).slice(-2);

                    // var end_year = ("0000" + (end_date.getFullYear().toString())).slice(-4);
                    // var end_month = ("00" + ((end_date.getMonth() + 1).toString())).slice(-2);
                    // var end_day = ("00" + ((end_date.getDate()).toString())).slice(-2);
                    // var end_hours = ("00" + (end_date.getHours().toString())).slice(-2);
                    // var end_minutes = ("00" + (end_date.getMinutes().toString())).slice(-2);
                    // var end_seconds = ("00" + (end_date.getMinutes().toString())).slice(-2);

                    // // Since some calendars don't add 0 second events, we need to remove time if there is none...
                    // var start_time = '';
                    // var end_time = '';
                    // if (start_minutes + start_seconds + end_minutes + end_seconds !== 0) {
                    //     start_time = 'T' + start_hours + start_minutes + start_seconds;
                    //     end_time = 'T' + end_hours + end_minutes + end_seconds;
                    // }

                    var start = _this.formatDate(begin);
                    var end = _this.formatDate(stop);

                    var calendarEvent = [
                        'BEGIN:VEVENT',
                        'CLASS:PUBLIC',
                        'DESCRIPTION:' + description,
                        'DTSTART;VALUE=DATE:' + start,
                        'DTEND;VALUE=DATE:' + end,
                        'LOCATION:' + location,
                        'SUMMARY;LANGUAGE=en-us:' + subject,
                        'TRANSP:TRANSPARENT',
                        'END:VEVENT'
                    ].join(SEPARATOR);

                    calendarEvents.push(calendarEvent);
                    return calendarEvent;
                },

                /**
                 * Download calendar using the saveAs function from filesave.js
                 * @param  {string} filename Filename
                 * @param  {string} ext      Extention
                 */
                'download': function(filename, ext) {
                    if (calendarEvents.length < 1) {
                        return false;
                    }

                    ext = (typeof ext !== 'undefined') ? ext : '.ics';
                    filename = (typeof filename !== 'undefined') ? filename : 'calendar';
                    var calendar = calendarStart + SEPARATOR + calendarEvents.join(SEPARATOR) + calendarEnd;
                    window.open("data:text/calendar;charset=utf8," + encodeURI(calendar));
                }
            };
        };

        if (typeof define === "function" && define.amd) {
            /* AMD Format */
            define("icsFormatter", [], function() {
                return icsFormatter();
            });
        } else if (typeof module === "object" && module.exports) {
            /* CommonJS Format */
            module.exports = icsFormatter();
        } else {
            /* Plain Browser Support */
            this.myModule = icsFormatter();
        }

        var buildICSEntry = function(subject, description, location, begin, end, rrule) {

            var calEntry = icsFormatter();


            calEntry.addEvent(subject, description, location, begin, end);
            calEntry.download('ourSecretMeeting');
        };

        this.$component.find('.m108-atc--ICS').off('click.calendar').on('click.calendar', function(event) {
            event.preventDefault();

            var $cal = JSON.parse($(this).closest('.m108-atc--link').attr('data-ics_entry'));

            buildICSEntry($cal.subject, $cal.description, $cal.location, $cal.begin, $cal.end);
        });
    };

    m108.prototype.formatDate = function(date) {
        var object_date = new Date(date);

        var year = ("0000" + (object_date.getFullYear().toString())).slice(-4);
        var month = ("00" + ((object_date.getMonth() + 1).toString())).slice(-2);
        var day = ("00" + ((object_date.getDate()).toString())).slice(-2);
        var hours = ("00" + (object_date.getHours().toString())).slice(-2);
        var minutes = ("00" + (object_date.getMinutes().toString())).slice(-2);
        var seconds = ("00" + (object_date.getMinutes().toString())).slice(-2);

        // Since some calendars don't add 0 second events, we need to remove time if there is none...
        var time = '';
        if (minutes + seconds !== 0) {
            time = 'T' + hours + minutes + seconds;
        }

        var start = year + month + day + time;

        return start
    }

    return m108;

});

define('../src/sublayouts/m110-home-compare/m110-home-compare',['jquery', 'numeral'], function($, utils) {

    'use strict';

    var M10_Compare = function($component) {

        this.$component = $component;
    };

    M10_Compare.prototype.init = function() {
        var _this = this;

        var $graphcont = this.$component.find('[data-graph-series]'),
            $pointer = this.$component.find('.m110-home-compare--scale_pointer'),
            data = JSON.parse($graphcont.attr('data-graph-series')),
            grade = 1,
            maxval = 0,
            median = 0,
            hval = 0,
            base = 0,
            colorArray = $graphcont.hasClass('electricity') ? ['#0a715a', '#6ea78f', '#C8DFC6'] : ['#0072C6', '#6caede', '#CAE5F5'],
            pOffset = 0;

        data.sort(function(a, b) {
            return b.value - a.value;
        });

        data.map(function (item, index) {
            item['color'] = colorArray[index];

            return item
        });

        $graphcont.html('')

        $(data).each(function(index) {
            var value = this.value,
                width = 'calc(100% - 80px)',
                bgcolor = this.color,
                type = this.type,
                isHomeClass = '',
                isHomeStyle = '',
                $bar;

            if (index == 0) {
                maxval = value;
            } else {
                width = 'calc(' + ((value / maxval) * (100)).toString() + '% - 80px)';
            };

            if (type == 'home') {
                grade = index;
                hval = this.value;
                isHomeClass = 'm110-home-compare--graph_itemhome';
                isHomeStyle = 'style="color:'+bgcolor+'"';
            } else {
                median = median + (value / (data.length - 1));
                base = Math.abs(this.value - median);
            };

            $bar = $('<div class="m110-home-compare--graph_item '+isHomeClass+'"><div class="m110-home-compare--graph_label">' + this.label + '</div><div class="m110-home-compare--graph_barwrapper"><div class="m110-home-compare--graph_bar ' + this.type + '"></div><div class="m110-home-compare--graph_barlabel">' + numeral(this.value).format('0,0') + ' ' + this.unit + '</div></div></div>');
            $graphcont.prepend($bar);
            setTimeout(function() {
                $bar.find('.m110-home-compare--graph_bar').css({ width: width, backgroundColor: bgcolor });
            }, 50)
        });

        // pOffset = ((median - hval)/base)*100;

        // if (Math.abs(pOffset) <= 100) {
        //     if (pOffset != 0) {
        //         $pointer.css('top', 'calc(((100% - 4px) / 2) + ((0% - '+pOffset+'% + (16px*('+Math.abs(pOffset)/pOffset+'))) / 2))');
        //     }
        // } else if (pOffset < 0) {
        //     $pointer.css('top', 'calc((200% - 4px) / 2) ');
        // } else {
        //     $pointer.css('top', 'calc((0% - 4px) / 2)');
        // };

        var bGrade = (parseInt($graphcont.attr('data-graph-grade'))).toString();

        $pointer.css('top', 'calc(((100% * '+bGrade+') + (12px*(1 - '+bGrade+'))) / 2) ');
        _this.$component.find('.m110-home-compare--scale_label').attr('style', '');

        switch (bGrade) {
            case '0':
                _this.$component.find('.m110-home-compare--grade').addClass('great');
                _this.$component.find('.m110-home-compare--scale_label.great').css('font-weight', 'bold');
                break;
            case '1':
                _this.$component.find('.m110-home-compare--grade').addClass('good');
                _this.$component.find('.m110-home-compare--scale_label.good').css('font-weight', 'bold');
                break;
            case '2':
                _this.$component.find('.m110-home-compare--grade').addClass('bad');
                _this.$component.find('.m110-home-compare--scale_label.bad').css('font-weight', 'bold');
                break;
        };

    };

    return M10_Compare;

});
define('../src/sublayouts/m113-tabs/m113-tabs',['jquery'], function($, utils) {

    'use strict';

    var M113Tab = function($component) {

        this.$component = $component;
    };

    M113Tab.prototype.init = function() {
        var _this = this;

        var $links = this.$component.find('.m113-tabs--tablink'),
            $panels = this.$component.find('.m113-tabs--panel');

        this.$component.find('.m113-tabs--panel[data-tabid="' + this.$component.find('.m113-tabs--tablink.active').attr('data-tabid') + '"]').addClass('active');

        $links.off('click.m113').on('click.m113', function(event) {
            event.preventDefault();
            $links.removeClass('active');
            $panels.removeClass('active');
            $(this).addClass('active');
            _this.$component.find('.m113-tabs--panel.active').removeClass('active');
            _this.$component.find('.m113-tabs--panel[data-tabid="' + $(this).attr('data-tabid') + '"]').addClass('active');
        });

        var $togglebtn = this.$component.find('[data-filter-open]'),
            $window = this.$component.find('.m113-tabs--tabfilters_window'),
            $closebtn = this.$component.find('[data-filter-close]'),
            $submitbtn = this.$component.find('[data-filter-submit]'),
            $selAll = this.$component.find('[data-input-all]'),
            $input = $window.find('.m113-tabs--tabfilters_inputcheckbox, .m113-tabs--tabfilters_inputradio'),
            $cbox = this.$component.find('.m113-tabs--tabfilters_inputcheckbox');

        $togglebtn.off('click.m113').on('click.m113', function() {
            if ($window.hasClass('opened')) {
                $window.removeClass('opened');
            } else {
                $window.addClass('opened');
                setTimeout(function () {
                    if (_this.$component.find('[data-input-all]').attr('data-firsload') == '1') {
                        _this.$component.find('[data-input-all]').trigger('click'); 
                    };
                },50)
                $input.prop('checked', false);
                $window.find('.m113-tabs--tabfilters_inputcheckbox[checked], .m113-tabs--tabfilters_inputradio[checked]').prop('checked', true);
            };
        });

        $closebtn.off('click.m113').on('click.m113', function() {
            $window.removeClass('opened');
        });

        $submitbtn.off('click.m113').on('click.m113', function() {
            $input.removeAttr('checked');
            $window.find('.m113-tabs--tabfilters_inputcheckbox:checked, .m113-tabs--tabfilters_inputradio:checked').attr('checked', '');
            $window.removeClass('opened');
            _this.$component.find('[data-input-all]').attr('data-firsload', '0');
        });

        $selAll.off('click.m113selall').on('click.m113selall', function() {
            if ($(this).prop('checked')) {
                $(this).closest('.m113-tabs--tabfilters_section').find('.m113-tabs--tabfilters_inputcheckbox').prop('checked', true);
            } else {
                $(this).closest('.m113-tabs--tabfilters_section').find('.m113-tabs--tabfilters_inputcheckbox').prop('checked', false);
            };
        });

        $cbox.off('click.m113').on('click.m113', function() {
            var checkedlen = $(this).closest('.m113-tabs--tabfilters_section').find('.m113-tabs--tabfilters_inputcheckbox:checked').not(('[data-input-all]')).length,
                len = $(this).closest('.m113-tabs--tabfilters_section').find('.m113-tabs--tabfilters_inputcheckbox').not(('[data-input-all]')).length;

            if (checkedlen == len) {
                $(this).closest('.m113-tabs--tabfilters_section').find('[data-input-all]').prop('checked', true);
            } else {
                $(this).closest('.m113-tabs--tabfilters_section').find('[data-input-all]').prop('checked', false);
            };
        });

    };

    return M113Tab;

});
define('../src/sublayouts/m114-modal/m114-modal',['jquery', 'lib/utils'], function($, utils) {

    'use strict';

    var M114Modal = function($component) {

        this.$component = $component;
    };

    M114Modal.prototype.init = function() {
        this.modalID = this.$component.attr('data-modal-id');
        this.isFormComplete = false;
        this.isLoad = true;

        var _this = this;

        this.initTrigger();
        this.initClose();

        if (this.$component.find('.m114-modalform').length != 0) {
            _this.formHeight();
            _this.scrollP();
            _this.initForm();
            _this.radioToggle();
            _this.cboxToggle();
            _this.checkFormProg();

            _this.$component.find('.m114-modalform--item').each(function() {
                _this.checkFormItem($(this), false);
            });

            _this.$component.find('.m114-modalform--flip').off('click.' + _this.modalID).on('click.' + _this.modalID, function(event) {
                event.preventDefault();

                _this.$component.find('.m114-modalform--main').show();
                _this.$component.find('.m114-modal--details').hide();
            });

            _this.$component.find('.m114-modalform--later,.m114-modalform--next').off('click.' + _this.modalID).on('click.' + _this.modalID, function(event) {
                event.preventDefault();
                _this.scrollItem($(this).closest('.m114-modalform--item'));
            });

            // setTimeout(function() {
            //     var progF = parseFloat(_this.$component.find('.m114-modalform--prog').text().replace('%', ''));

            //     if (progF == 100) {
            //         _this.$component.find('.m114-modalform--main').hide();
            //         _this.$component.find('.m114-modal--details').show();
            //     };
            // }, 500);

            _this.$component.find('.m114-modalform--field_input--text').off('keyup.saveshow').on('keyup.saveshow', function () {
                var $savebtn = $(this).closest('.m114-modalform--field').find('.m114-modalform--field_input--save');

                if ($(this).val() != $(this).attr('value')) {
                    $savebtn.fadeIn();
                } else {
                    $savebtn.fadeOut();
                };
            });

            _this.$component.find('.m114-modalform--field_input--save').off('click.saveshow').on('click.saveshow', function () {
                var $input = $(this).closest('.m114-modalform--field').find('.m114-modalform--field_input--text');

                $input.attr('value', $input.val());

                $(this).fadeOut();
            });

            $(window).off('resize.' + _this.modalID).on('resize.' + _this.modalID, function() {
                _this.formHeight();
            });
        };

        this.isLoad = false;
    };

    M114Modal.prototype.radioToggle = function() {
        var _this = this;

        this.$component.find('.m114-modalform--fieldset_toggle').each(function() {
            var $rtoggles = $(this).find('.m114-modalform--field_input--radio')

            $rtoggles.each(function() {
                var $target = $($(this).attr('data-toggle-target'));

                if ($(this).prop('checked')) {
                    $target.show()
                } else {
                    $target.hide();
                };

                _this.checkFormProg();

                $(this).off('click.tog' + _this.modalID).on('click.tog' + _this.modalID, function() {
                    $rtoggles.each(function() {
                        var $target = $($(this).attr('data-toggle-target'));

                        if ($(this).prop('checked')) {
                            $target.show()
                        } else {
                            $target.hide();
                        };

                        _this.checkFormProg();
                    });
                });
            });
        });
    };

    M114Modal.prototype.cboxToggle = function() {
        var _this = this;

        this.$component.find('.m114-modalform--fieldset_toggle').each(function() {
            var $rtoggles = $(this).find('.m114-modalform--field_input--checkbox')

            $rtoggles.each(function() {
                var $target = $($(this).attr('data-toggle-target'));

                if ($(this).prop('checked')) {
                    $target.show()
                } else {
                    $target.hide();
                };

                _this.checkFormProg();

                $(this).off('click.tog' + _this.modalID).on('click.tog' + _this.modalID, function() {
                    $rtoggles.each(function() {
                        var $target = $($(this).attr('data-toggle-target'));

                        if ($(this).prop('checked')) {
                            $target.show()
                        } else {
                            $target.hide();
                        };

                        _this.checkFormProg();
                    });
                });
            });
        });
    };

    M114Modal.prototype.checkFormProg = function() {
        var _this,
            $progBarOut = this.$component.find('.m114-modalform--prog_bar'),
            $progBarSettings = $progBarOut.attr('data-progbar-settings') != undefined && $progBarOut.attr('data-progbar-settings') != '' ? JSON.parse($progBarOut.attr('data-progbar-settings')) : '',
            $progBar = this.$component.find('.m114-modalform--prog_barinner'),
            $progRate = this.$component.find('.m114-modalform--prog'),
            $progText = this.$component.find('.m114-modalform--progtext_text'),
            current = this.$component.find('.m114-modalform--item').not(':hidden').find('.m114-modalform--later:hidden').length,
            total = this.$component.find('.m114-modalform--item').not(':hidden').length;

        if (utils.isRTL()) {
            $progRate.parent('div').css({
                display: 'flex',
                gap: '4px',
                flexDirection: 'row-reverse',
            })
        } else {
            $progRate.parent('div').attr('style', '');
        };

        if (total != 0) {
            $progBar.css('width', ((current / total) * 100).toString() + '%');
            if (utils.isRTL()) {
                $progRate.text('%'+Math.floor((current / total) * 100).toString());
            } else {
                $progRate.text(Math.floor((current / total) * 100).toString() + '%');
            }
        }

        $($progBarSettings).each(function() {
            if (this.minval < Math.floor((current / total) * 100) && Math.floor((current / total) * 100) <= this.maxval) {
                if (this.text != (0 / 0).toString()) {
                    $progText.text(this.text);
                };
            };
        });

        this.formState((((current / total) * 100) == 100))

    };

    M114Modal.prototype.formState = function(isComplete) {
        var _this = this,
            $compEl = _this.$component.find('.m114-modalform--complete'),
            $incEl = _this.$component.find('.m114-modalform--incomplete'),
            $form = _this.$component.find('.m114-modalform--main'),
            $confirm = _this.$component.find('.m114-modal--details');

        if (isComplete) {
            $compEl.show();
            $incEl.hide();
            if (_this.isLoad) {
                $form.hide();
                $confirm.show();
            };
            _this.isFormComplete = true;
        } else {
            $compEl.hide();
            $incEl.show();
            if (_this.isLoad) {
                $form.show();
                $confirm.hide();
            };
            _this.isFormComplete = false;
        }
    };

    M114Modal.prototype.scrollItem = function($item) {
        var _this = this,
            $main = this.$component.find('.m114-modalform--main');

        $main.animate({
            scrollTop: $main.scrollTop() + $item.offset().top - $main.offset().top + $item.outerHeight(true)
        }, 250);
    };

    M114Modal.prototype.checkCBoxItem = function($item) {
        var _this = this,
            $laterbtn = $item.find('.m114-modalform--later'),
            $nextbtn = $item.find('.m114-modalform--next');

        if ($item.find('.m114-modalform--field_input--radio:checked,.m114-modalform--field_input--checkbox:checked').length != 0 || ($item.find('.m114-modalform--field_input--radio,.m114-modalform--field_input--checkbox').length == 0 && $item.find('.m114-modalform--field_input--text').val() != '')) {
            $laterbtn.fadeOut();
            setTimeout(function() {
                $nextbtn.fadeIn();
            }, 400);
        };
    };

    M114Modal.prototype.checkFormItem = function($item, isScroll) {
        var _this = this,
            $laterbtn = $item.find('.m114-modalform--later'),
            $nextbtn = $item.find('.m114-modalform--next');

        if ($item.find('.m114-modalform--field_input--radio:checked,.m114-modalform--field_input--checkbox:checked').length != 0 || ($item.find('.m114-modalform--field_input--radio,.m114-modalform--field_input--checkbox').length == 0 && $item.find('.m114-modalform--field_input--text').val() != '')) {
            $laterbtn.fadeOut();
            setTimeout(function() {
                //$nextbtn.fadeIn();
            }, 400);
            if (isScroll && $item.find('.m114-modalform--field_input--checkbox:checked').length == 0) {
                _this.scrollItem($item);
            };
        } else {
            // if ($item.find('.m114-modalform--field_input--checkbox').length == 0) {
            $nextbtn.fadeOut();
            // };
            setTimeout(function() {
                $laterbtn.fadeIn();
                // if ($item.find('.m114-modalform--field_input--checkbox').length != 0) {
                //     $nextbtn.fadeOut();
                // };
            }, 400);
        };

        setTimeout(function() {
            _this.checkFormProg();
        }, 500);

    };

    M114Modal.prototype.initForm = function() {
        var _this = this,
            $controls = this.$component.find('.m114-modalform--main_inner').find('.m114-modalform--field_input,.m114-modalform--field_input--save ').not('.m114-modalform--field_input--text,.m114-modalform--field_input--checkbox'),
            $cboxnext = this.$component.find('.m114-modalform--main_inner').find('.m114-modalform--field_input--checkbox').closest('.m114-modalform--item').find('.m114-modalform--next'),
            $cbox = this.$component.find('.m114-modalform--main_inner').find('.m114-modalform--field_input--checkbox');

        $controls.each(function() {

            $(this).off('click.' + _this.modalID).on('click.' + _this.modalID, function() {
                _this.checkFormItem($(this).closest('.m114-modalform--item'), true);

                if ($(this).prop('checked')) {
                    if ($(this).is('[data-m114-cbox-none]')) {
                        $(this).closest('.m114-modalform--item').find('.m114-modalform--field_input--checkbox').not(this).prop('checked', false);
                    } else if ($(this).hasClass('m114-modalform--field_input--radio')) {
                        $(this).closest('.m114-modalform--item').find('.m114-modalform--field_input--radio:checked').not(this).prop('checked', false);
                    } else {
                        $(this).closest('.m114-modalform--item').find('.m114-modalform--field_input--checkbox[data-m114-cbox-none]').prop('checked', false);
                    };
                };
            });
        });

        $cbox.off('click.prog' + _this.modalID).on('click.prog' + _this.modalID, function() {
            _this.checkCBoxItem($(this).closest('.m114-modalform--item'));
            if ($(this).prop('checked')) {
                if ($(this).is('[data-m114-cbox-none]')) {
                    $(this).closest('.m114-modalform--item').find('.m114-modalform--field_input--checkbox').not(this).prop('checked', false);
                } else {
                    $(this).closest('.m114-modalform--item').find('.m114-modalform--field_input--checkbox[data-m114-cbox-none]').prop('checked', false);
                }
            }
        });

        $cboxnext.off('click.prog' + _this.modalID).on('click.prog' + _this.modalID, function() {
            _this.checkFormItem($(this).closest('.m114-modalform--item'), true);
            $(this).fadeOut();
        });
    };

    M114Modal.prototype.initClose = function() {
        var _this = this;

        this.$component.find('[data-modal-close]').off('click.' + _this.modalID).on('click.' + _this.modalID, function(event) {
            event.preventDefault();


            if (_this.$component.find('.m114-modalform').length != 0) {
                var progF = parseFloat(_this.$component.find('.m114-modalform--prog').text().replace('%', '')),
                    $form = _this.$component.find('.m114-modalform--main'),
                    $confirm = _this.$component.find('.m114-modal--details');

                if (!$confirm.is(':visible')) {
                    $form.hide();
                    $confirm.show();
                } else {
                    _this.$component.removeClass('active');
                    $('body').removeClass('unscrollable');
                    setTimeout(function() {
                        $form.show();
                        $confirm.hide();
                    },400);
                }
            } else {
                _this.$component.removeClass('active');
                $('body').removeClass('unscrollable');
            }
        });
    };

    M114Modal.prototype.initTrigger = function() {
        var _this = this;

        $('[data-modal-trigger]').off('click.' + _this.modalID).on('click.' + _this.modalID, function(event) {
            event.preventDefault();

            _this.$component.removeClass('active');

            $('body').removeClass('unscrollable');
            if ($('[data-modal-id="' + $(this).attr('data-modal-trigger') + '"]').length != 0) {
                $('[data-modal-id="' + $(this).attr('data-modal-trigger') + '"]').addClass('active');
                $('body').addClass('unscrollable');
            };
        });
    };

    M114Modal.prototype.formHeight = function() {
        var _this = this,
            headerHeight = this.$component.find('.m114-modalform--header').outerHeight(true),
            modalMTop = this.$component.find('.m114-modalform').css('margin-top');

        this.$component.find('.m114-modalform--main').css('height', 'calc(100vh - ' + modalMTop + ' - ' + headerHeight.toString() + 'px)');
    };

    M114Modal.prototype.scrollP = function() {
        var _this = this,
            $main = this.$component.find('.m114-modalform--main'),
            $inner = this.$component.find('.m114-modalform--main_inner'),
            $pBar = this.$component.find('.m114-modalform--scrollproginner');

        $pBar.css('width', (($main.scrollTop() / ($inner.outerHeight(true) - $main.outerHeight(true))) * 100).toString() + '%');

        $main.off('scroll.' + _this.modalID).on('scroll.' + _this.modalID, function() {
            $pBar.css('width', (($main.scrollTop() / ($inner.outerHeight(true) - $main.outerHeight(true))) * 100).toString() + '%');
        });
    };

    return M114Modal;

});
define('../src/sublayouts/m116-group-teaser/m116-group-teaser',['jquery','breakpoint','lib/utils'], function ($, breakpoint, utils) {

    'use strict';

    var m116 = function ($component) {

        this.$component = $component;
    };

    m116.prototype.init = function () {
        var _this = this,
            comHeight = _this.$component.outerHeight();
        this.title = _this.$component.find('.m116-group-teaser-title');
        this.titlespace;
        this.titlespaceHeight;

        if (_this.title.hasClass('left-vertical')) {
            _this.titlespace = _this.title.outerWidth()
            _this.titlespaceHeight = _this.title.height()
            _this.$component.css('min-height', _this.titlespace)
        }

        var prevHeight = comHeight;
        // Create a new ResizeObserver instance
        var resizeObserver = new ResizeObserver(function (entries) {
            entries.forEach(function (entry) {
                var newHeight = entry.contentRect.height;
                if (newHeight != prevHeight) {
                    if (entry.contentRect.height) {
                        _this.$component.trigger('heightChanged');
                    }
                    prevHeight = newHeight
                }
            });
        });
        resizeObserver.observe(this.$component[0]);
        _this.$component.off('heightChanged').on('heightChanged', function () {
            _this.reSize()
        });
        _this.reSize()
        $(window).on('resize.m116', function() {
            _this.reSize();
            _this.reHeight();
        })
    };

    m116.prototype.reSize = function () {
        var _this = this,
            comHeight = _this.$component.outerHeight(),
            comWidth = _this.$component.outerWidth(),
            titlePos,
            titleBottomPos,
            posit = $('html').attr('dir') == 'rtl' ? 'right' : 'left',
            titleTopPos,
            titleheightHalf;

        if (_this.titlespace == 0) {
            _this.titlespace = _this.title.outerWidth()
            _this.titlespaceHeight = _this.title.height()
        }

        titlePos = _this.titlespace / 2;
        titleheightHalf = _this.titlespaceHeight / 2;
        if (comHeight > _this.titlespace) {
            titleBottomPos = (comHeight / 2) - titleheightHalf;
        } else {
            titleBottomPos = titlePos - _this.titlespaceHeight;
        }
        titleTopPos = -titlePos;


        if (utils.breakpoint() === 's' || utils.breakpoint() === 'm') {
            titleBottomPos = 'auto';
            if(comWidth > _this.titlespace){
                titleTopPos = (comWidth / 2) - (_this.titlespace / 2)
            }
            _this.title.css('top', -titleheightHalf - 1)
        }else{
            _this.title.css('top','auto')
        }
        if($('html').attr('dir') == 'rtl'){
            _this.title.css({ 'right': titleTopPos, 'bottom': titleBottomPos, 'display': 'inline-block' })
        }else{
            _this.title.css({ 'left': titleTopPos, 'bottom': titleBottomPos, 'display': 'inline-block' })
        }
       
    }


    m116.prototype.reHeight = function(){
        var _this = this,
            groupItem = _this.$component.find('.sameheightItemsGroup'),
            wrapperItem = groupItem.find('.sameHeightItemsWrapper');

             // Get the number of items in each .sameHeightItemsWrapper
             let maxItemsInRow = Math.max(...$('.sameHeightItemsWrapper1').map(function() {
                 return $(this).find('.sameHeightItems').outerHeight();
             }).get());

             //

     
             // Loop through each row index
             for (let i = 0; i < maxItemsInRow; i++) {
                 let maxHeight = 0;
     
                 // Loop through each wrapper to find the tallest item in the current row
                 wrapperItem.each(function() {
                     let $item = $(this).find('.sameHeightItems').eq(i);
                     if ($item.length) {
                         maxHeight = Math.max(maxHeight, $item.outerHeight());
                     }
                 });
     
                 // Set min-height for each item in the current row
                 wrapperItem.each(function() {
                     let $item = $(this).find('.sameHeightItems').eq(i);
                     if ($item.length) {
                         $item.css('min-height', maxHeight);
                     }
                 });
             }
    }

    return m116;

});

/* homemodule */
define( '../src/sublayouts/m12-masthead/m12-masthead-desktop-menu',[
	'jquery',
	'lib/utils'
	 ],

	function ( $, utils ) {

		'use strict';

		var DesktopMenu = function () {

				this.initialized = false;
			},
			_singleton;

		DesktopMenu.prototype.init = function ( $masthead ) {

			if ( !this.initialized ) {

				// cache masthead dom els (have had to look for some classnames due to integration)
				this.$masthead = $masthead;
				this.$myAccountSection = this.$masthead.find( '[data-myaccount-section]' );
				this.$activeSectionNav = this.$masthead.find( '.m12-section-nav--active' );
				this.$menubar = this.$masthead.find( '[data-m12-bar-content]' );
				this.$sections = this.$activeSectionNav.find( '[data-section]' ).add( this.$myAccountSection );
				this.$searchField = this.$masthead.find( '[data-search-field]' );
				this.$subsections = this.$masthead.find( '.m12-subsection' );

				// class names
				this.sectionFocusedClassname = 'm12-section-nav__item--focused';
				this.sectionExpandedClassname = 'm12-section-nav__item--expanded';
				this.activeSubsectionClassname = 'm12-subsection--active';
				this.toggleButtonClassname = 'm12-section__toggle';
				this.toggleButtonOpenClassname = 'm12-section__toggle--open';
				this.subsectionClass = '.m12-subsection';
				this.subsectionActiveClassname = 'm12-subsection--active';
				this.sectionNavItemHoverClassname = 'm12-section-nav__item--hover';

				// methods
				this.configureUI();
				this.polyfills();

				// set initialized flag
				this.initialized = true;
			}

			if (navigator.userAgent.match(/iPad/i) != null) {
				$('.m12-section-nav__link').on('click', function(e) {
					e.preventDefault();
					$(this).trigger('hover');
				});
			};

		};

		DesktopMenu.prototype.polyfills = function () {

			if ( utils.isLessThanIE10() ) {

				var searchLabel = this.$searchField.attr( 'aria-label' );
				this.$searchField.val( searchLabel );
				this.$searchField.on( 'focus', function () {
					if ($( this ).val() === searchLabel) {
						$( this ).val( '' );
					}
				} );
				this.$searchField.on( 'blur', function () {
					if ($( this ).val().replace(/^\s+|\s+$/g,'') === '' ) {
						$( this ).val( searchLabel );
					}
				} );
			}
		};

		DesktopMenu.prototype.configureUI = function () {

			var self = this;

			$.each( this.$sections, function () {

				var $section = $( this ),
					$link = $( this ).find( '[data-section-link]' ).eq( 0 ),
					$toggleButton = $( '<button aria-label="Toggle menu" class="m12-section__toggle"><span class="aria-only">Toggle Menu</span></button>' );

				if ( $link.attr( 'aria-haspopup' ) === 'true' ) {

					$toggleButton.on( 'click', function () {

						var expanded = $link.attr( 'aria-expanded' );
						$section.toggleClass( self.sectionExpandedClassname );
						$link.attr( 'aria-expanded', expanded === 'false' );
						$toggleButton.toggleClass( self.toggleButtonOpenClassname );

					} );

					$toggleButton.on( 'focus', function () {

						$section.addClass( self.sectionFocusedClassname );
					} );

					$( $toggleButton ).insertAfter( $link );
				}

				$link.on( 'focus', function () {
					self.resetSectionNav();
					$section.addClass( self.sectionFocusedClassname );
				} );

				$link.on( 'blur mouseover', function (ev) {

					// don't reset if moving to a section toggle
					if (ev.type === 'blur' && $(ev.relatedTarget).hasClass('m12-section__toggle') ) {
						return;
					}

					self.resetSectionNav();
				} );

			} );


			this.$searchField.on( 'focus', function () {
				self.resetSectionNav();
			} );

		};

		DesktopMenu.prototype.resetSectionNav = function () {

			this.$sections.removeClass( this.sectionFocusedClassname ).removeClass( this.sectionExpandedClassname );

		};

		_singleton = new DesktopMenu();

		return _singleton;
	} );

define( 'components/_helpers/touch-scroller/touch-scroller',[ 'lib/utils', 'iscroll' ],

	function ( utils ) {
		'use strict';

		/**
		 * Adds native feeling scrolling to scrollable content elements
		 * @exports helpers/Scroller
		 * @constructor
		 */
		var Scroller = function () {
			return this;
		};

		/**
		 * Initiate scroller
		 */
		Scroller.prototype.init = function ( $el ) {

			this.$el = $el;

			this.scrollify = utils.isTouchDevice();

			this.$content = this.$el.find( 'div:first-child' );

			if ( this.scrollify ) {
				this.loadScroller();
				this.$el.addClass( 'touch-scroller-wrapper' );
				this.$content.addClass( 'touch-scroller-content' );
			} else {
				this.$el.addClass( 'touch-scroller-overflow' );
			}

		};

		Scroller.prototype.loadScroller = function () {

			var scroller = new IScroll( this.$el[ 0 ], {

				mouseWheel: true,
				disableMouse: false,
				scrollX: false,
				scrollY: true,
				momentum: true,
				snap: false,
				keyBindings: true,
				click: true,
				tap: true
			} );

			this.iscroll = scroller;
			this.refresh();

		};

		Scroller.prototype.refresh = function () {

			if ( this.scrollify ) {
				this.iscroll.refresh();
			}

		};

		return Scroller;

	} );

define('text',{load: function(id){throw new Error("Dynamic load not allowed: " + id);}});

define('text!components/m12-masthead/_m12-masthead-mobile-menu.hbs',[],function () { return '<div class="mobile-menu" data-mobile-menu="true">\r\n\t<div class="mobile-menu--close_tablet">\r\n\t\t<button class="mobile-menu--close_tabletbtn">\r\n\t\t\t<span class="aria-only">Close</span>\r\n\t\t</button>\r\n\t</div>\r\n    <div class="mobile-menu--inner">\r\n        <div class="m12-quicklinks--mobile">\r\n            <div class="m12-quicklinks--mobiletitle">\r\n            </div>\r\n        </div>\r\n        <div class="mobile-menu-navs">\r\n            <div class="mobile-menu-navstitle">\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <div class="mobile-menu__footer" data-mobile-menu-footer="true">\r\n        <div class="mobile-menu__header" data-mobile-menu-header="true">\r\n            <div class="mobile-menu__tools" data-mobile-menu-tools="true">\r\n                <div class="mobile-menu__tools--group">\r\n                    <!-- <button data-o4-button="true" class="mobile-menu__tool-button mobile-menu__tool-button--o4" aria-label="O4 Initiative">\r\n\t\t\t\t\t\t\t<img src="">\r\n\t\t\t\t\t\t</button> -->\r\n                    <button data-accessibility-button="true" class="mobile-menu__tool-button mobile-menu__tool-button--accessibility" aria-label="Accessibility"></button>\r\n                    <a data-language-link="true" class="mobile-menu__tool-button mobile-menu__tool-button--language"></a>\r\n                    <!-- <span data-mobile-menu-myaccount="true"></span> -->\r\n                </div>\r\n            </div>\r\n        </div>\r\n        <img src="">\r\n    </div>\r\n    <div class="mobile-menu__accessibility" data-mobile-menu-accessibility="true">\r\n        <button class="mobile-menu__accessibilityheader" data-mobile-menu-accessibility-header="true">Accessibility</button>\r\n        <div data-panel-content="true" class="mobile-menu-panel__content">\r\n            <div data-mobile-accessibility-panel="true">\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <div class="mobile-menu-search" data-mobile-search-panel="true">\r\n    </div>\r\n</div>';});

define( '../src/sublayouts/m12-masthead/m12-masthead-mobile-menu',[
	'jquery',
	'breakpoint',
	'lib/utils',
	'mask',
	'components/_helpers/touch-scroller/touch-scroller',
	'text!components/m12-masthead/_m12-masthead-mobile-menu.hbs',
	 ],

	function ( $, breakpoint, utils, Mask, TouchScroller, mobileMenuPartial ) {

		'use strict';

		var MobileMenu = function () {

				this.initialized = false;
			},
			_singleton;

		MobileMenu.prototype.init = function ( $masthead ) {

			if ( !this.initialized ) {
				var _this = this;

				this.done = false;
				// cache masthead dom els
				this.$masthead = $masthead;
				this.$segmentNav = this.$masthead.find( '[data-segment-nav]' );
				this.$segmentLinks = this.$masthead.find( '[data-segment-link]' );
				this.$sectionNavs = this.$masthead.find( '[data-section-nav]' );
				this.$accessibilityContent = this.$masthead.find( '[data-accessibility-content]' );
				this.$myAccountLink = this.$masthead.find( '.m12-myaccount__link[data-m12-myaccount-link]' );
				this.$myAccountLogoutLink = this.$masthead.find( '[data-myaccount-logout]' );
				this.$myAccountPostLoginNav = this.$masthead.find( '[data-myaccount-postlogin-nav]' );
				this.$languageLink = this.$masthead.find( '[data-m12-lang-link]' );
				this.$barContent = this.$masthead.find( '[data-m12-bar-content]' );
				this.$menuButton = $( '<button class="m12-mobile-menu-button" data-menu-button="true"><div class="m12-menu_expandable m12-menu_expandable--mobile"><div class="m12-menu_bar--wrapper"><span class="top-bar"></span><span class="mid-bar"></span><span class="bot-bar"></span></div><label class="m12-menu_label">'+$('.m12-section-navs').find('.m12-menu_label').html()+'</label></div></button>' );
				//this.$closeButton = $( '<button class="mobile-menu-closebtn" data-mobile-menu-close-button="true"></button>' );
				this.$searchContent = this.$masthead.find( '[data-search]' );

				// general props
				this.mobileMenuActiveClassname = 'mobile-menu--active';
				this.mobielMenuActiveCloseClassname = 'mobile-menu-closebtn--active';
				this.mobileMenuAccessibilityClassname = 'mobile-menu--accessibility-open';
				this.labels = $masthead.data( 'labels' );
				this.theme = $masthead.data( 'theme' );
				this.isSAP = $masthead.data( 'sap' ) === true;
				this.open = false;
				this.maxWidth = 440;

				// add the mobile menu to dom
				this.addMenu();

				// cache dom els from above
				this.$mobileMenu = $( '[data-mobile-menu="true"]' );
				this.$accessibilityPanel = this.$mobileMenu.find( '[data-mobile-accessibility-panel]' );
				this.$languageLinkContainer = this.$mobileMenu.find( '[data-language-link]' );
				this.$searchPanel = this.$mobileMenu.find( '[data-mobile-search-panel]' );
				this.$accessibilityMobileContent = this.$mobileMenu.find( '[data-mobile-menu-accessibility]' );
				this.$accessibilityHeader = this.$mobileMenu.find( '[data-mobile-menu-accessibility-header]' );
				// this.$myAccount = this.$mobileMenu.find( '[data-mobile-menu-myaccount]' );
				this.$accessibilityButton = this.$mobileMenu.find( '[data-accessibility-button]' );
				this.$o4Button = this.$mobileMenu.find('[data-o4-button]');
				//this.$searchButton = this.$mobileMenu.find( '[data-search-button]' );
				this.$header = this.$mobileMenu.find( '[data-mobile-menu-header]' );

				// other props
				// this.postLogin = this.$myAccountPostLoginNav.length > 0;

				// search field el
				this.$searchField = this.$mobileMenu.find( '[data-search-field]' );

				// bind global el events
				//this.$menuButton.on( 'click', $.proxy( this.openMenu, this ) );
				this.$menuButton.on('click', function (event) {
					if ($(this).find('.m12-menu_bar--wrapper').hasClass('active')) {
						_this.closeMenu();
					} else {
						_this.openMenu(event);
					}
				});
				$('.mobile-menu--close_tabletbtn').on('click', function () {
					_this.closeMenu();
				});
				//this.$closeButton.on( 'click', $.proxy( this.closeMenu, this ) );
				this.$accessibilityHeader.text($('.m27-accessibility-overlay__title').text());
				this.$accessibilityHeader.on( 'click', $.proxy( this.toggleAccessibilityPanel, this ) );
				this.$accessibilityButton.on( 'click', $.proxy( this.toggleAccessibilityPanel, this ) );

				this.$o4Button.find('img').attr('src', $('.m13-footer--floating_link--o4').find('img').attr('src'));
				this.$o4Button.on('click', function(){
					$('.m13-footer--floating_link--o4').trigger('click');
				});
				//this.$searchButton.on( 'click', $.proxy( this.openSearch, this ) );

				$(window).off('searchOpen').on('searchOpen', function () {
					_this.openSearch();
				});

				this.buildMenu();
				this.buildFooter();

				// bind window events
				$( window ).on( 'orientationchange resize', $.proxy( this.setStyle, this ) );

				$( breakpoint ).on( 'change', $.proxy( this.respond, this ) );

				// set initialized flag
				this.initialized = true;

				// popup modal switch language 
				//$('.m12-tools__link--lang').on('click', function (event) {
				//	var defRef = $(this).attr('href');

				//	event.preventDefault();
				//	$('.mobile-menu-closebtn').trigger('click');
				//	$('.m39-modal__triggerLang').trigger('click');
				//	$('.m39-m12-yes').attr('href', defRef)
				//});

				var home_link = $('.m12-section-nav').find('.m12-segment-nav__link--Home').attr('href');

				$('.mobile-menu__myaccount').find('.m12-segment-nav__link--Home').attr('href', home_link);

				$('.mobile-menu-navs .m12-menuover-main').css('max-height', 'calc(100% - '+(100 + $('.mobile-menu__header').outerHeight(true))+'px)');

				$('[data-mobile-menu-footer] img').not('[data-o4-button] img').attr('src', $('.m12-logo-image--government').attr('data-defaultsrc'));

				$('.m13-footer--floating_linkmobile-hide').not('.m13-footer--floating_link--o4, .m13-footer--floating_link--ai').each(function () {
					$('.m12-menuover-main').append('<a class="m12-menuover-main_item m12-menuover-main_itemlink" href="'+$(this).attr('href')+'">'+$(this).text()+'</a>')
				});

				$('.m12-quicklinks--mobiletitle').text(this.labels.quicklinks);

				$('.mobile-menu-navstitle').text(this.labels.mainmenu);

				// if ($('.m12-myaccount__link--logout').length != 0) {
				// 	var lClone = $('.m12-myaccount__link--logout').clone();

				// 	_this.$myAccount.after(lClone);
				// };

			}

		};

		/**
		 * Adds the menu to the dom from a mustache template. 
		 */
		MobileMenu.prototype.addMenu = function () {

			// var mobileMenuTemplate = Mustache.render( mobileMenuPartial, {
			// 	is_sap: this.isSAP
			// } );

			// console.log(mobileMenuPartial)

			// add menu button
			this.$barContent.prepend( this.$menuButton );
			this.$menuButton.find('.m12-menu_label').text( this.labels.menu );

			// add menu template
			$( 'body' ).append( mobileMenuPartial );

			// add close button
			//$( '.mobile-menu' ).append( $( this.$closeButton ) );
			//this.$closeButton.attr( 'aria-label', this.labels.close );
			//this.$closeButton.html( this.labels.close );

		};

		MobileMenu.prototype.loadScrollers = function () {

			this.level1Scroller = new TouchScroller();
			this.level1Scroller.init( this.$level1Nav.parent() );

			this.level2Scroller = new TouchScroller();
			this.level2Scroller.init( this.$level2Nav.parent() );

			this.level3Scroller = new TouchScroller();
			this.level3Scroller.init( this.$level3Nav.parent() );

			this.$accessibilityPanel.parent().addClass( 'scroll' );
			
		};

		MobileMenu.prototype.buildMenu = function () {
			var _this = this,
				$desktopc = $('.m12-menuover-content'),
				$mainclone = $('.m12-menuover-main').clone();

			$('.mobile-menu-navs').append($mainclone);

			$('.mobile-menu-navs').find('.m12-menuover-main_item').each(function() {
				var $main = $(this),
					call = $(this).attr('data-call');

				//$main.removeClass('m12-menuover-main_itemactive');
				$main.html('<label class="m12-menuover-main_item--label">'+$main.text()+'</label>');

				$desktopc.find('.m12-menuover-2').find('.m12-menuover-primary').each(function() {
					var tag = $(this).attr('data-tag'),
						$clone = $(this).clone();

					if ( call == tag ) {
						$main.append($clone);
					};
				});
			});

			$('.mobile-menu-navs').find('.m12-menuover-primary_item').each(function() {
				var $primary = $(this),
					call = $(this).attr('data-call');

				//$primary.removeClass('m12-menuover-primary_itemactive');
				$primary.html('<label class="m12-menuover-primary_item--label">'+$primary.text()+'</label>');

				$desktopc.find('.m12-menuover-3').find('.m12-menuover-secondary').each(function() {
					var tag = $(this).attr('data-tag'),
						$clone = $(this).clone();

					//$(this).removeClass('m12-menuover-secondaryactive');

					if ( call == tag ) {
						$primary.append($clone);
					};
				});
			});

			this.$languageLinkContainer.html(this.$languageLink.html());
			this.$languageLinkContainer.attr('href', this.$languageLink.attr('href'));

			// this.$myAccount.append(this.$myAccountLink.clone());
			// this.$myAccount.attr('href', this.$myAccountLink.attr('href'));
			// this.$myAccount.attr('class', this.$myAccountLink.attr('class'));
			// this.$myAccount.removeClass('m12-myaccount__link');
			// this.$myAccount.removeClass('icon-new-myaccount');
			// this.$myAccount.removeClass('button--outline');
			// this.$myAccount.addClass('mobile-menu__tool-button--myaccount');
			// this.$myAccount.addClass('mobile-menu__tool-button');
			// this.$myAccount.addClass('button--primary');

			// add accessibility panel
			if ( this.$accessibilityContent[ 0 ] !== undefined ) {

				var aPanel = this.$accessibilityContent.clone( true );
				aPanel.find('#xp1').attr('id', 'xp2');
				aPanel.find('a.readspeaker-link').attr('onclick', 'readpage(this.href, \'xp2\'); return false;');
				this.$accessibilityPanel.append( aPanel );
			};
			
			// add search
			this.$searchPanel.append( this.$searchContent.clone( true ) );
			this.$searchPanel.find('#searchcategory').attr('class', 'mobile--searchcategory');

			this.buildMenuListeners();

			setTimeout(function() {
				$('.mobile-menu-navs').find('.m12-menuover-main_itemactive').find('.m12-menuover-main_item--label').click();
				$('.mobile-menu-navs').find('.m12-menuover-primary_itemactive').find('.m12-menuover-primary_item--label').click();
			},250);
		};

		MobileMenu.prototype.buildMenuListeners = function () {
			var _this = this;

			$('.mobile-menu-navs').find('.m12-menuover-main_item').each(function() {
				var $main = $(this);

				$main.find('.m12-menuover-main_item--label').on('click', function() {
					var height = $main.find('.m12-menuover-primary').height() + 53;

					$('.mobile-menu-navs').find('.m12-menuover-main_item').each(function() {
						$(this).not($main).css('height', '53px');	
						$(this).not($main).removeClass('m12-menuover-main_itemactive');
						$(this).not($main).removeClass('m12-menuover-main_itemactive-mobile');
					});

					if ( $main.hasClass('m12-menuover-main_itemactive-mobile') ) {
						$main.removeClass('m12-menuover-main_itemactive');
						$main.removeClass('m12-menuover-main_itemactive-mobile');
						$main.css('height', '53px');
					} else {
						$main.css('height', height.toString() + 'px');
						$main.addClass('m12-menuover-main_itemactive');
						$main.addClass('m12-menuover-main_itemactive-mobile');
					}
				});
			});

			$('.mobile-menu-navs').find('.m12-menuover-primary_item').each(function() {
				var $primary = $(this);

				$primary.find('.m12-menuover-primary_item--label').on('click', function() {
					var height = $primary.find('.m12-menuover-secondary').height(),
						$parentheight = $(this).closest('.m12-menuover-main_item').outerHeight(true);

					//$parentheight =  $parentheight - $('.m12-menuover-primary_itemactive-mobile').height();

					$('.mobile-menu-navs').find('.m12-menuover-primary_item').each(function() {
						$(this).not($primary).css('height', '40px');
						$(this).not($primary).removeClass('m12-menuover-primary_itemactive');
						$(this).not($primary).removeClass('m12-menuover-primary_itemactive-mobile');
						//$parentheight = $primary.closest('.m12-menuover-primary').height() + 42;
					});

					if ( $primary.hasClass('m12-menuover-primary_itemactive-mobile') ) {
						$primary.removeClass('m12-menuover-primary_itemactive');
						$primary.removeClass('m12-menuover-primary_itemactive-mobile');
						$primary.css('height', '40px');
						$primary.closest('.m12-menuover-main_item').css('height', ($parentheight-height).toString() + 'px');
					} else {
						$parentheight = ($(this).closest('.m12-menuover-main_item').find('.m12-menuover-primary_item').length * 40) + 50;
						$primary.css('height', (height+40).toString() + 'px');
						$primary.closest('.m12-menuover-main_item').css('height', (height + $parentheight).toString() + 'px');
						$primary.addClass('m12-menuover-primary_itemactive');
						$primary.addClass('m12-menuover-primary_itemactive-mobile');
					}
				});
			});

			$('.mobile-menu__tool-button--myaccount').off('click.dynamic').on('click.dynamic', function(event) {
				var href = $('.m12-menuover-main_itemactive-mobile').attr('data-loginhref')
				if ( href != undefined && href != "") {
					event.preventDefault();
					window.location.href = href;
				}
			});
		};

		MobileMenu.prototype.buildFooter = function () {
			var _this = this;

			$('.m12-quicklinks').find('.m12-quicklinks-item').each(function() {
				$('.m12-quicklinks--mobile').append($(this).clone())
			});
		};

		MobileMenu.prototype.openMenu = function ( e ) {
			var _this = this;

			e.stopImmediatePropagation();
			var self = this;
			this.open = true;
			Mask.show();
			this.$mobileMenu.addClass( 'theme--' + this.theme ).addClass( this.mobileMenuActiveClassname );
			//this.$closeButton.addClass( this.mobielMenuActiveCloseClassname );
			$( 'body' ).addClass( 'unscrollable' );
			$( 'body' ).css( 'position','static' );
			this.setStyle();
			_this.$masthead.find('.m12-menu_expandable--mobile .m12-menu_bar--wrapper').addClass('active');

			// prevent any bouncy effects on the mobile menu
			$( document ).on( 'touchmove', function ( e ) {

				if ( $( e.target ).parents( '[data-mobile-accessibility-panel]' )[ 0 ] === undefined ) {
					
					e.preventDefault();
				}
			} );

			$( Mask.$el ).on( 'click', function ( e ) {

				if ( $( e.target ).parents( '[data-mobile-menu]' )[ 0 ] === undefined ) {

					self.closeMenu();
				}
			} );

			if ( $('.mobile-menu').hasClass('theme--c') && !_this.done ) {
				$('.mobile-menu').find('.m12-section-nav[data-mobile-menu-level1-nav=true]').append('<li class="m12-segment-nav__item"><a class="m12-segment-nav__link--c" href="'+$('.m12-section-nav__item:last-child').find('.m12-section-nav__link ').attr('href')+'">'+$('.m12-section-nav__item:last-child').find('.m12-section-nav__link ').text()+'</a></li>');
				_this.done = true;
			};

		};

		MobileMenu.prototype.closeMenu = function () {
			var _this = this;

			if ( this.initialized ) {

				this.open = false;
				this.closeSearch();
				Mask.hide();
				this.$mobileMenu.removeClass().addClass( 'mobile-menu' );
				//this.$closeButton.removeClass( this.mobielMenuActiveCloseClassname );
				$( 'body' ).removeClass( 'unscrollable' );
				$( document ).off( 'touchmove' );
				$( Mask.$el ).off( 'click' );
				_this.$masthead.find('.m12-menu_expandable--mobile .m12-menu_bar--wrapper').removeClass('active');
			}
		};

		MobileMenu.prototype.toggleAccessibilityPanel = function () {

			this.$mobileMenu.toggleClass( this.mobileMenuAccessibilityClassname );

		};

		MobileMenu.prototype.openSearch = function () {

			var self = this;

			this.$header.hide();

			this.$searchPanel.addClass( 'mobile-menu-search--active' );

			this.$searchPanel.find( 'input[type=search]' ).focus();

			$('.m12-search__panel--close').on( 'click', function () {

				setTimeout( function () {

					self.closeSearch();
					window.scrollTo( 0, 0 );
				}, 150 );

			} );

			this.$searchPanel.on( 'click', function ( e ) {

				if ( $( e.target ).parents( '[data-search]' )[ 0 ] === undefined ) {
					self.closeSearch();
				}
			} );

		};

		MobileMenu.prototype.closeSearch = function () {

			this.$header.show();

			this.$searchPanel.removeClass( 'mobile-menu-search--active' );

			this.$searchPanel.off( 'click' );

			setTimeout( function () {

				$( document ).scrollTop( $( document ).scrollTop() );
			}, 1 );
		};

		MobileMenu.prototype.setStyle = function () {

			var windowWidth = $( window ).width(),
				width = $( window ).width() > this.maxWidth ? this.maxWidth : windowWidth;

			this.$mobileMenu.css( 'width', width);

		};

		MobileMenu.prototype.respond = function () {

			if ( utils.breakpoint() === 'l' || utils.breakpoint() === 'xl' ) {

				this.closeMenu();

			}
		};


		_singleton = new MobileMenu();

		return _singleton;
	} );

define( 'components/m12-masthead/m12-masthead-mobile-menu',[
	'jquery',
	'breakpoint',
	'lib/utils',
	'mask',
	'components/_helpers/touch-scroller/touch-scroller',
	'text!components/m12-masthead/_m12-masthead-mobile-menu.hbs',
	 ],

	function ( $, breakpoint, utils, Mask, TouchScroller, mobileMenuPartial ) {

		'use strict';

		var MobileMenu = function () {

				this.initialized = false;
			},
			_singleton;

		MobileMenu.prototype.init = function ( $masthead ) {

			if ( !this.initialized ) {
				var _this = this;

				this.done = false;
				// cache masthead dom els
				this.$masthead = $masthead;
				this.$segmentNav = this.$masthead.find( '[data-segment-nav]' );
				this.$segmentLinks = this.$masthead.find( '[data-segment-link]' );
				this.$sectionNavs = this.$masthead.find( '[data-section-nav]' );
				this.$accessibilityContent = this.$masthead.find( '[data-accessibility-content]' );
				this.$myAccountLink = this.$masthead.find( '.m12-myaccount__link[data-m12-myaccount-link]' );
				this.$myAccountLogoutLink = this.$masthead.find( '[data-myaccount-logout]' );
				this.$myAccountPostLoginNav = this.$masthead.find( '[data-myaccount-postlogin-nav]' );
				this.$languageLink = this.$masthead.find( '[data-m12-lang-link]' );
				this.$barContent = this.$masthead.find( '[data-m12-bar-content]' );
				this.$menuButton = $( '<button class="m12-mobile-menu-button" data-menu-button="true"><div class="m12-menu_expandable m12-menu_expandable--mobile"><div class="m12-menu_bar--wrapper"><span class="top-bar"></span><span class="mid-bar"></span><span class="bot-bar"></span></div><label class="m12-menu_label">'+$('.m12-section-navs').find('.m12-menu_label').html()+'</label></div></button>' );
				//this.$closeButton = $( '<button class="mobile-menu-closebtn" data-mobile-menu-close-button="true"></button>' );
				this.$searchContent = this.$masthead.find( '[data-search]' );

				// general props
				this.mobileMenuActiveClassname = 'mobile-menu--active';
				this.mobielMenuActiveCloseClassname = 'mobile-menu-closebtn--active';
				this.mobileMenuAccessibilityClassname = 'mobile-menu--accessibility-open';
				this.labels = $masthead.data( 'labels' );
				this.theme = $masthead.data( 'theme' );
				this.isSAP = $masthead.data( 'sap' ) === true;
				this.open = false;
				this.maxWidth = 440;

				// add the mobile menu to dom
				this.addMenu();

				// cache dom els from above
				this.$mobileMenu = $( '[data-mobile-menu="true"]' );
				this.$accessibilityPanel = this.$mobileMenu.find( '[data-mobile-accessibility-panel]' );
				this.$languageLinkContainer = this.$mobileMenu.find( '[data-language-link]' );
				this.$searchPanel = this.$mobileMenu.find( '[data-mobile-search-panel]' );
				this.$accessibilityMobileContent = this.$mobileMenu.find( '[data-mobile-menu-accessibility]' );
				this.$accessibilityHeader = this.$mobileMenu.find( '[data-mobile-menu-accessibility-header]' );
				// this.$myAccount = this.$mobileMenu.find( '[data-mobile-menu-myaccount]' );
				this.$accessibilityButton = this.$mobileMenu.find( '[data-accessibility-button]' );
				this.$o4Button = this.$mobileMenu.find('[data-o4-button]');
				//this.$searchButton = this.$mobileMenu.find( '[data-search-button]' );
				this.$header = this.$mobileMenu.find( '[data-mobile-menu-header]' );

				// other props
				// this.postLogin = this.$myAccountPostLoginNav.length > 0;

				// search field el
				this.$searchField = this.$mobileMenu.find( '[data-search-field]' );

				// bind global el events
				//this.$menuButton.on( 'click', $.proxy( this.openMenu, this ) );
				this.$menuButton.on('click', function (event) {
					if ($(this).find('.m12-menu_bar--wrapper').hasClass('active')) {
						_this.closeMenu();
					} else {
						_this.openMenu(event);
					}
				});
				$('.mobile-menu--close_tabletbtn').on('click', function () {
					_this.closeMenu();
				});
				//this.$closeButton.on( 'click', $.proxy( this.closeMenu, this ) );
				this.$accessibilityHeader.text($('.m27-accessibility-overlay__title').text());
				this.$accessibilityHeader.on( 'click', $.proxy( this.toggleAccessibilityPanel, this ) );
				this.$accessibilityButton.on( 'click', $.proxy( this.toggleAccessibilityPanel, this ) );

				this.$o4Button.find('img').attr('src', $('.m13-footer--floating_link--o4').find('img').attr('src'));
				this.$o4Button.on('click', function(){
					$('.m13-footer--floating_link--o4').trigger('click');
				});
				//this.$searchButton.on( 'click', $.proxy( this.openSearch, this ) );

				$(window).off('searchOpen').on('searchOpen', function () {
					_this.openSearch();
				});

				this.buildMenu();
				this.buildFooter();

				// bind window events
				$( window ).on( 'orientationchange resize', $.proxy( this.setStyle, this ) );

				$( breakpoint ).on( 'change', $.proxy( this.respond, this ) );

				// set initialized flag
				this.initialized = true;

				// popup modal switch language 
				//$('.m12-tools__link--lang').on('click', function (event) {
				//	var defRef = $(this).attr('href');

				//	event.preventDefault();
				//	$('.mobile-menu-closebtn').trigger('click');
				//	$('.m39-modal__triggerLang').trigger('click');
				//	$('.m39-m12-yes').attr('href', defRef)
				//});

				var home_link = $('.m12-section-nav').find('.m12-segment-nav__link--Home').attr('href');

				$('.mobile-menu__myaccount').find('.m12-segment-nav__link--Home').attr('href', home_link);

				$('.mobile-menu-navs .m12-menuover-main').css('max-height', 'calc(100% - '+(100 + $('.mobile-menu__header').outerHeight(true))+'px)');

				$('[data-mobile-menu-footer] img').not('[data-o4-button] img').attr('src', $('.m12-logo-image--government').attr('data-defaultsrc'));

				$('.m13-footer--floating_linkmobile-hide').not('.m13-footer--floating_link--o4, .m13-footer--floating_link--ai').each(function () {
					$('.m12-menuover-main').append('<a class="m12-menuover-main_item m12-menuover-main_itemlink" href="'+$(this).attr('href')+'">'+$(this).text()+'</a>')
				});

				$('.m12-quicklinks--mobiletitle').text(this.labels.quicklinks);

				$('.mobile-menu-navstitle').text(this.labels.mainmenu);

				// if ($('.m12-myaccount__link--logout').length != 0) {
				// 	var lClone = $('.m12-myaccount__link--logout').clone();

				// 	_this.$myAccount.after(lClone);
				// };

			}

		};

		/**
		 * Adds the menu to the dom from a mustache template. 
		 */
		MobileMenu.prototype.addMenu = function () {

			// var mobileMenuTemplate = Mustache.render( mobileMenuPartial, {
			// 	is_sap: this.isSAP
			// } );

			// console.log(mobileMenuPartial)

			// add menu button
			this.$barContent.prepend( this.$menuButton );
			this.$menuButton.find('.m12-menu_label').text( this.labels.menu );

			// add menu template
			$( 'body' ).append( mobileMenuPartial );

			// add close button
			//$( '.mobile-menu' ).append( $( this.$closeButton ) );
			//this.$closeButton.attr( 'aria-label', this.labels.close );
			//this.$closeButton.html( this.labels.close );

		};

		MobileMenu.prototype.loadScrollers = function () {

			this.level1Scroller = new TouchScroller();
			this.level1Scroller.init( this.$level1Nav.parent() );

			this.level2Scroller = new TouchScroller();
			this.level2Scroller.init( this.$level2Nav.parent() );

			this.level3Scroller = new TouchScroller();
			this.level3Scroller.init( this.$level3Nav.parent() );

			this.$accessibilityPanel.parent().addClass( 'scroll' );
			
		};

		MobileMenu.prototype.buildMenu = function () {
			var _this = this,
				$desktopc = $('.m12-menuover-content'),
				$mainclone = $('.m12-menuover-main').clone();

			$('.mobile-menu-navs').append($mainclone);

			$('.mobile-menu-navs').find('.m12-menuover-main_item').each(function() {
				var $main = $(this),
					call = $(this).attr('data-call');

				//$main.removeClass('m12-menuover-main_itemactive');
				$main.html('<label class="m12-menuover-main_item--label">'+$main.text()+'</label>');

				$desktopc.find('.m12-menuover-2').find('.m12-menuover-primary').each(function() {
					var tag = $(this).attr('data-tag'),
						$clone = $(this).clone();

					if ( call == tag ) {
						$main.append($clone);
					};
				});
			});

			$('.mobile-menu-navs').find('.m12-menuover-primary_item').each(function() {
				var $primary = $(this),
					call = $(this).attr('data-call');

				//$primary.removeClass('m12-menuover-primary_itemactive');
				$primary.html('<label class="m12-menuover-primary_item--label">'+$primary.text()+'</label>');

				$desktopc.find('.m12-menuover-3').find('.m12-menuover-secondary').each(function() {
					var tag = $(this).attr('data-tag'),
						$clone = $(this).clone();

					//$(this).removeClass('m12-menuover-secondaryactive');

					if ( call == tag ) {
						$primary.append($clone);
					};
				});
			});

			this.$languageLinkContainer.html(this.$languageLink.html());
			this.$languageLinkContainer.attr('href', this.$languageLink.attr('href'));

			// this.$myAccount.append(this.$myAccountLink.clone());
			// this.$myAccount.attr('href', this.$myAccountLink.attr('href'));
			// this.$myAccount.attr('class', this.$myAccountLink.attr('class'));
			// this.$myAccount.removeClass('m12-myaccount__link');
			// this.$myAccount.removeClass('icon-new-myaccount');
			// this.$myAccount.removeClass('button--outline');
			// this.$myAccount.addClass('mobile-menu__tool-button--myaccount');
			// this.$myAccount.addClass('mobile-menu__tool-button');
			// this.$myAccount.addClass('button--primary');

			// add accessibility panel
			if ( this.$accessibilityContent[ 0 ] !== undefined ) {

				var aPanel = this.$accessibilityContent.clone( true );
				aPanel.find('#xp1').attr('id', 'xp2');
				aPanel.find('a.readspeaker-link').attr('onclick', 'readpage(this.href, \'xp2\'); return false;');
				this.$accessibilityPanel.append( aPanel );
			};
			
			// add search
			this.$searchPanel.append( this.$searchContent.clone( true ) );
			this.$searchPanel.find('#searchcategory').attr('class', 'mobile--searchcategory');

			this.buildMenuListeners();

			setTimeout(function() {
				$('.mobile-menu-navs').find('.m12-menuover-main_itemactive').find('.m12-menuover-main_item--label').click();
				$('.mobile-menu-navs').find('.m12-menuover-primary_itemactive').find('.m12-menuover-primary_item--label').click();
			},250);
		};

		MobileMenu.prototype.buildMenuListeners = function () {
			var _this = this;

			$('.mobile-menu-navs').find('.m12-menuover-main_item').each(function() {
				var $main = $(this);

				$main.find('.m12-menuover-main_item--label').on('click', function() {
					var height = $main.find('.m12-menuover-primary').height() + 53;

					$('.mobile-menu-navs').find('.m12-menuover-main_item').each(function() {
						$(this).not($main).css('height', '53px');	
						$(this).not($main).removeClass('m12-menuover-main_itemactive');
						$(this).not($main).removeClass('m12-menuover-main_itemactive-mobile');
					});

					if ( $main.hasClass('m12-menuover-main_itemactive-mobile') ) {
						$main.removeClass('m12-menuover-main_itemactive');
						$main.removeClass('m12-menuover-main_itemactive-mobile');
						$main.css('height', '53px');
					} else {
						$main.css('height', height.toString() + 'px');
						$main.addClass('m12-menuover-main_itemactive');
						$main.addClass('m12-menuover-main_itemactive-mobile');
					}
				});
			});

			$('.mobile-menu-navs').find('.m12-menuover-primary_item').each(function() {
				var $primary = $(this);

				$primary.find('.m12-menuover-primary_item--label').on('click', function() {
					var height = $primary.find('.m12-menuover-secondary').height(),
						$parentheight = $(this).closest('.m12-menuover-main_item').outerHeight(true);

					//$parentheight =  $parentheight - $('.m12-menuover-primary_itemactive-mobile').height();

					$('.mobile-menu-navs').find('.m12-menuover-primary_item').each(function() {
						$(this).not($primary).css('height', '40px');
						$(this).not($primary).removeClass('m12-menuover-primary_itemactive');
						$(this).not($primary).removeClass('m12-menuover-primary_itemactive-mobile');
						//$parentheight = $primary.closest('.m12-menuover-primary').height() + 42;
					});

					if ( $primary.hasClass('m12-menuover-primary_itemactive-mobile') ) {
						$primary.removeClass('m12-menuover-primary_itemactive');
						$primary.removeClass('m12-menuover-primary_itemactive-mobile');
						$primary.css('height', '40px');
						$primary.closest('.m12-menuover-main_item').css('height', ($parentheight-height).toString() + 'px');
					} else {
						$parentheight = ($(this).closest('.m12-menuover-main_item').find('.m12-menuover-primary_item').length * 40) + 50;
						$primary.css('height', (height+40).toString() + 'px');
						$primary.closest('.m12-menuover-main_item').css('height', (height + $parentheight).toString() + 'px');
						$primary.addClass('m12-menuover-primary_itemactive');
						$primary.addClass('m12-menuover-primary_itemactive-mobile');
					}
				});
			});

			$('.mobile-menu__tool-button--myaccount').off('click.dynamic').on('click.dynamic', function(event) {
				var href = $('.m12-menuover-main_itemactive-mobile').attr('data-loginhref')
				if ( href != undefined && href != "") {
					event.preventDefault();
					window.location.href = href;
				}
			});
		};

		MobileMenu.prototype.buildFooter = function () {
			var _this = this;

			$('.m12-quicklinks').find('.m12-quicklinks-item').each(function() {
				$('.m12-quicklinks--mobile').append($(this).clone())
			});
		};

		MobileMenu.prototype.openMenu = function ( e ) {
			var _this = this;

			e.stopImmediatePropagation();
			var self = this;
			this.open = true;
			Mask.show();
			this.$mobileMenu.addClass( 'theme--' + this.theme ).addClass( this.mobileMenuActiveClassname );
			//this.$closeButton.addClass( this.mobielMenuActiveCloseClassname );
			$( 'body' ).addClass( 'unscrollable' );
			$( 'body' ).css( 'position','static' );
			this.setStyle();
			_this.$masthead.find('.m12-menu_expandable--mobile .m12-menu_bar--wrapper').addClass('active');

			// prevent any bouncy effects on the mobile menu
			$( document ).on( 'touchmove', function ( e ) {

				if ( $( e.target ).parents( '[data-mobile-accessibility-panel]' )[ 0 ] === undefined ) {
					
					e.preventDefault();
				}
			} );

			$( Mask.$el ).on( 'click', function ( e ) {

				if ( $( e.target ).parents( '[data-mobile-menu]' )[ 0 ] === undefined ) {

					self.closeMenu();
				}
			} );

			if ( $('.mobile-menu').hasClass('theme--c') && !_this.done ) {
				$('.mobile-menu').find('.m12-section-nav[data-mobile-menu-level1-nav=true]').append('<li class="m12-segment-nav__item"><a class="m12-segment-nav__link--c" href="'+$('.m12-section-nav__item:last-child').find('.m12-section-nav__link ').attr('href')+'">'+$('.m12-section-nav__item:last-child').find('.m12-section-nav__link ').text()+'</a></li>');
				_this.done = true;
			};

		};

		MobileMenu.prototype.closeMenu = function () {
			var _this = this;

			if ( this.initialized ) {

				this.open = false;
				this.closeSearch();
				Mask.hide();
				this.$mobileMenu.removeClass().addClass( 'mobile-menu' );
				//this.$closeButton.removeClass( this.mobielMenuActiveCloseClassname );
				$( 'body' ).removeClass( 'unscrollable' );
				$( document ).off( 'touchmove' );
				$( Mask.$el ).off( 'click' );
				_this.$masthead.find('.m12-menu_expandable--mobile .m12-menu_bar--wrapper').removeClass('active');
			}
		};

		MobileMenu.prototype.toggleAccessibilityPanel = function () {

			this.$mobileMenu.toggleClass( this.mobileMenuAccessibilityClassname );

		};

		MobileMenu.prototype.openSearch = function () {

			var self = this;

			this.$header.hide();

			this.$searchPanel.addClass( 'mobile-menu-search--active' );

			this.$searchPanel.find( 'input[type=search]' ).focus();

			$('.m12-search__panel--close').on( 'click', function () {

				setTimeout( function () {

					self.closeSearch();
					window.scrollTo( 0, 0 );
				}, 150 );

			} );

			this.$searchPanel.on( 'click', function ( e ) {

				if ( $( e.target ).parents( '[data-search]' )[ 0 ] === undefined ) {
					self.closeSearch();
				}
			} );

		};

		MobileMenu.prototype.closeSearch = function () {

			this.$header.show();

			this.$searchPanel.removeClass( 'mobile-menu-search--active' );

			this.$searchPanel.off( 'click' );

			setTimeout( function () {

				$( document ).scrollTop( $( document ).scrollTop() );
			}, 1 );
		};

		MobileMenu.prototype.setStyle = function () {

			var windowWidth = $( window ).width(),
				width = $( window ).width() > this.maxWidth ? this.maxWidth : windowWidth;

			this.$mobileMenu.css( 'width', width);

		};

		MobileMenu.prototype.respond = function () {

			if ( utils.breakpoint() === 'l' || utils.breakpoint() === 'xl' ) {

				this.closeMenu();

			}
		};


		_singleton = new MobileMenu();

		return _singleton;
	} );

/* homemodule */
define( 'components/m12-masthead/m12-masthead-desktop-menu',[
	'jquery',
	'lib/utils'
	 ],

	function ( $, utils ) {

		'use strict';

		var DesktopMenu = function () {

				this.initialized = false;
			},
			_singleton;

		DesktopMenu.prototype.init = function ( $masthead ) {

			if ( !this.initialized ) {

				// cache masthead dom els (have had to look for some classnames due to integration)
				this.$masthead = $masthead;
				this.$myAccountSection = this.$masthead.find( '[data-myaccount-section]' );
				this.$activeSectionNav = this.$masthead.find( '.m12-section-nav--active' );
				this.$menubar = this.$masthead.find( '[data-m12-bar-content]' );
				this.$sections = this.$activeSectionNav.find( '[data-section]' ).add( this.$myAccountSection );
				this.$searchField = this.$masthead.find( '[data-search-field]' );
				this.$subsections = this.$masthead.find( '.m12-subsection' );

				// class names
				this.sectionFocusedClassname = 'm12-section-nav__item--focused';
				this.sectionExpandedClassname = 'm12-section-nav__item--expanded';
				this.activeSubsectionClassname = 'm12-subsection--active';
				this.toggleButtonClassname = 'm12-section__toggle';
				this.toggleButtonOpenClassname = 'm12-section__toggle--open';
				this.subsectionClass = '.m12-subsection';
				this.subsectionActiveClassname = 'm12-subsection--active';
				this.sectionNavItemHoverClassname = 'm12-section-nav__item--hover';

				// methods
				this.configureUI();
				this.polyfills();

				// set initialized flag
				this.initialized = true;
			}

			if (navigator.userAgent.match(/iPad/i) != null) {
				$('.m12-section-nav__link').on('click', function(e) {
					e.preventDefault();
					$(this).trigger('hover');
				});
			};

		};

		DesktopMenu.prototype.polyfills = function () {

			if ( utils.isLessThanIE10() ) {

				var searchLabel = this.$searchField.attr( 'aria-label' );
				this.$searchField.val( searchLabel );
				this.$searchField.on( 'focus', function () {
					if ($( this ).val() === searchLabel) {
						$( this ).val( '' );
					}
				} );
				this.$searchField.on( 'blur', function () {
					if ($( this ).val().replace(/^\s+|\s+$/g,'') === '' ) {
						$( this ).val( searchLabel );
					}
				} );
			}
		};

		DesktopMenu.prototype.configureUI = function () {

			var self = this;

			$.each( this.$sections, function () {

				var $section = $( this ),
					$link = $( this ).find( '[data-section-link]' ).eq( 0 ),
					$toggleButton = $( '<button aria-label="Toggle menu" class="m12-section__toggle"><span class="aria-only">Toggle Menu</span></button>' );

				if ( $link.attr( 'aria-haspopup' ) === 'true' ) {

					$toggleButton.on( 'click', function () {

						var expanded = $link.attr( 'aria-expanded' );
						$section.toggleClass( self.sectionExpandedClassname );
						$link.attr( 'aria-expanded', expanded === 'false' );
						$toggleButton.toggleClass( self.toggleButtonOpenClassname );

					} );

					$toggleButton.on( 'focus', function () {

						$section.addClass( self.sectionFocusedClassname );
					} );

					$( $toggleButton ).insertAfter( $link );
				}

				$link.on( 'focus', function () {
					self.resetSectionNav();
					$section.addClass( self.sectionFocusedClassname );
				} );

				$link.on( 'blur mouseover', function (ev) {

					// don't reset if moving to a section toggle
					if (ev.type === 'blur' && $(ev.relatedTarget).hasClass('m12-section__toggle') ) {
						return;
					}

					self.resetSectionNav();
				} );

			} );


			this.$searchField.on( 'focus', function () {
				self.resetSectionNav();
			} );

		};

		DesktopMenu.prototype.resetSectionNav = function () {

			this.$sections.removeClass( this.sectionFocusedClassname ).removeClass( this.sectionExpandedClassname );

		};

		_singleton = new DesktopMenu();

		return _singleton;
	} );

/* homemodule */
define('../src/sublayouts/m12-masthead/m12-masthead',[
        'jquery',
        'breakpoint',
        'tooltipster',
        'lib/utils',
        '!components/m12-masthead/m12-masthead-mobile-menu',
        '!components/m12-masthead/m12-masthead-desktop-menu'
    ],

    function($, breakpoint, tooltipster, utils, MobileMenu, DesktopMenu) {

        'use strict';

        /**
         * Masthead component.
         * @exports Masthead
         * @constructor
         */

        var Masthead = function($component) {

            this.$component = $component;

            return this;
        };

        Masthead.prototype.init = function() {
            var fontsize = this.getCookie("fontsize");
            var body = $('body');
            var _this = this;

            if (document.body.style.fontSize == "") {
                document.body.style.fontSize = "1em";
            }

            if (fontsize != "" && fontsize > 0) {
                //this.increaseFontSize(fontsize);
            }

            this.$anchor = this.$component.find('[data-m13-back-to-top="true"]');
            this.$anchor.on('click', $.proxy(this.toTop, this));

            // cache dom elements
            this.$headerMain = this.$component.find('[ data-m12-main ]');
            this.$headerBar = this.$component.find('[ data-m12-bar ]');
            this.$breadcrumbs = this.$component.find('[ data-m12-breadcrumbs ]');

            // general props
            if (this.$headerBar.length) {
                this.headerBarTop = this.$headerBar.offset().top;
            };
            this.fixedHeader = false;
            this.labels = this.$component.data('labels');
            this.fontSize = $('.m12-bar__breadcrumb--tools__fontSizeRange');

            // class name and data attr props
            this.headerMainOffscreenClassname = 'm12-main--offscreen';
            this.headerBarFixedClassname = 'm12-bar--fixed';
            this.headerBarFixedNewClassname = 'm12-bar--fixed-new';
            this.headerBarFixedDataAttr = 'data-m12-bar-fixed';
            this.breadcrumbsFixedClassname = 'm12-bar__breadcrumbs--fixed';
            this.breadcrumbsFixedToggleClassname = 'm12-bar__breadcrumbs--toggle';
            this.breadcrumbsFixedNewClassname = 'm12-bar__breadcrumbs--fixed-new';

            // init methods
            this.tooltip();
            this.menuOver();
            this.respond();
            this.watchHeaderBar();
            this.fontSlide();
            if ($('.activate-idlewatch').length > 0) {
                _this.idleWatcher(parseInt($('.activate-idlewatch').attr('data-timer')));
            };

            $(window).off('reinit_tooltip').on('reinit_tooltip', function() {
                _this.tooltip();
            });

            // watch for events
            $(breakpoint).on('change', $.proxy(this.respond, this));
            $(window).on('initMobile', function() {
                _this.respond();
            });
            $(window).scroll($.proxy(this.watchHeaderBar, this));
            $(window).on('orientationchange', $.proxy(this.orientationchange, this));

            $('.m12-myaccount__login-form').find('button').on("DOMSubtreeModified", function() {
                $('.create').addClass('create--active');
            });

            $('.m12-myaccount__login-form').find('button').on("propertychange", function() {
                $('.create').addClass('create--active');
            });


            var wHeight = $(window).height() + 130,
                docHeight = $(document).height();
            if (wHeight > docHeight) {
                this.$breadcrumbs.addClass(this.breadcrumbsFixedClassname);
                this.$breadcrumbs.addClass(this.breadcrumbsFixedToggleClassname);
            }

            if (utils.breakpoint() === 's' || utils.breakpoint() === 'm') {
                this.$breadcrumbs.addClass(this.breadcrumbsFixedClassname);
            }


            // popup modal switch language 
            //$('.m12-tools__link--lang').on('click', function (event) {
            //      var defRef = $(this).attr('href');

            //      event.preventDefault();
            //      $('.mobile-menu-closebtn').trigger('click');
            //      $('.m39-modal__triggerLang').trigger('click');
            //      $('.m39-m12-yes').attr('href', defRef)
            //  })

            $('.skip-content a').click(function(e) {
                e.preventDefault();
                
                $('html, body').animate({
                    scrollTop: $('#rs_area').offset().top + 110 - _this.$component.height()
                }, 'slow');


                setTimeout(function() {
                    window.location.href = window.location.href.replace('#rs_area', '') + '#rs_area'
                }, 601);
            });

            this.$component.css('height', this.$component.find('.m12-main').outerHeight(true) + this.$component.find('.m12-bar').outerHeight(true));

            //$('#rs_area').focus();

            $('.m60-grid__scroll').css('width', ($('.m60-teaser').length * 250).toString() + 'px');

            $('.m12-lang-switch_mobile').find('a').attr('href', $('.m12-tools__link-lang').attr('href'));

            this.$component.find('.m12-myaccount__loggedin').off('click.myaccount').on('click.myaccount', function(event) {
                event.preventDefault();
                $(this).closest('.m12-myaccount__item').find('.m12-myaccount--dropdown').toggleClass('active');
                $('body').toggleClass('loggedin_active');
                _this.$component.toggleClass('loggedin_active');
            });

            this.$component.find('.m12-myaccount--dropdown_closebtn').off('click.myaccount').on('click.myaccount', function(event) {
                $(this).closest('.m12-myaccount__item').find('.m12-myaccount--dropdown').removeClass('active');
                $('body').removeClass('loggedin_active');
                _this.$component.removeClass('loggedin_active');
            });

            $(document).off('click.myaccount').on('click.myaccount', function(event) {
                if ($(event.target).closest('.m12-myaccount__item').length == 0) {
                    $('.m12-myaccount--dropdown.active').removeClass('active');
                    $('body').removeClass('loggedin_active');
                };
            });

        };

        Masthead.prototype.tooltip = function() {
            var _this = this,
                $img = $('img').not('.tooltip'),
                warning = '';

            if (utils.isRTL()) {
                warning = 'يفتح في نافذة جديدة'
            } else {
                warning = 'Opens in a new window'
            }

            $img.each(function() {
                var text = $(this).attr('alt');

                $(this).tooltipster({
                    content: text,
                    maxWidth: 250,
                    arrow: false
                });
            });

            $('a').each(function() {
                if ($(this).attr('target') == '_blank') {
                    $(this).tooltipster({
                        content: warning,
                        maxWidth: 250,
                        side: 'right',
                        arrow: false
                    });
                    if ($(this).find('.aria-only').length == 0) {
                        $(this).append('<span class="aria-only">' + warning + '</span>');
                    }
                }
            });

        };

        Masthead.prototype.menuOver = function() {
            var _this = this;

            $('.m12-menu_expandable').not('.m12-menu_expandable--mobile').on('click', function() {
                $('.m12-menuover').removeClass('hidden');
                $(this).toggleClass('active');
                setTimeout(function() {
                    $('.m12-menuover').addClass('m12-menuover--active');
                    $('body').addClass('unscrollable');
                }, 100);
            });

            $('.m12-menuover-closebutton').on('click', function() {
                $('.m12-menuover').removeClass('m12-menuover--active');
                $('body').removeClass('unscrollable');
                setTimeout(function() {
                    $('.m12-menuover').addClass('hidden');
                }, 1100);
            });

            $(document).on('keydown', function(event) {
                if (event.key === 'Escape' && $('.m12-menuover').hasClass('m12-menuover--active')) {
                    $('.m12-menuover').removeClass('m12-menuover--active');
                    $('body').removeClass('unscrollable');
                    setTimeout(function() {
                        $('.m12-menuover').addClass('hidden');
                    }, 1100);
                }
            });

            $('.m12-menuover-main_item').on('click', function() {
                var call = $(this).attr('data-call'),
                    href = $(this).attr('data-loginhref');

                if ($(window).width() > 1024) {
                    $('.m12-menuover-main_item').each(function() {
                        $(this).removeClass('m12-menuover-main_itemactive');
                    });
                    $(this).addClass('m12-menuover-main_itemactive');
                }

                $('.m12-menuover-primary').each(function() {
                    $(this).removeClass('m12-menuover-primaryactive');
                });

                $('.m12-menuover-secondary').each(function() {
                    $(this).removeClass('m12-menuover-secondaryactive');
                });
                if ($(window).width() > 1024) {
                    $('.m12-menuover-primary').each(function() {
                        var tag = $(this).attr('data-tag');

                        if (tag == call) {
                            $(this).addClass('m12-menuover-primaryactive');
                            $(this).find('.m12-menuover-primary_item:first-child').click();
                            $(this).find('.m12-menuover-primary_item:first-child').focus();
                        }
                    });
                };

                if (href != "" && href != undefined) {
                    $('.m12-menuover-footer').find('.button[data-login="true"]').attr('href', href);
                }

            });

            $('.m12-menuover-primary_item').on('click', function() {
                var call = $(this).attr('data-call');

                if ($(window).width() > 1024) {
                    $('.m12-menuover-primary_item').each(function() {
                        $(this).removeClass('m12-menuover-primary_itemactive');
                    });
                    $(this).addClass('m12-menuover-primary_itemactive');
                }

                $('.m12-menuover-secondary').each(function() {
                    $(this).removeClass('m12-menuover-secondaryactive');
                });

                $('.m12-menuover-secondary').each(function() {
                    var tag = $(this).attr('data-tag');

                    if (tag == call) {
                        $(this).addClass('m12-menuover-secondaryactive');
                        $(this).find('.m12-menuover-secondary_item:first-child').find('a').focus();
                    }
                });
            });


            $('.button--menu').on('click', function() {
                var call = $(this).attr('data-call');

                $('.m12-menuover-main_item').each(function() {
                    var tag = $(this).attr('data-call');

                    if (tag == call) {
                        $('.m12-menu_expandable').click();
                        $(this).click();
                    };
                });
            });

            $('.m12-menuover-footer').find('.m31-search__button').off('click.search').on('click.search', function() {
                $('.m12-menuover-closebutton').click();
                setTimeout(function() {
                    $('.m12-tools').find('.m31-search__button').click();
                }, 500)
            });
        };

        Masthead.prototype.respond = function() {

            // trigger mobile view for 's' and 'm' breakpoints

            if (utils.breakpoint() === 's' || utils.breakpoint() === 'm') {

                MobileMenu.init(this.$component);

            } else {

                DesktopMenu.init(this.$component);
            }
        };
        var lastScrollTop = 0

        Masthead.prototype.idleWatcher = function(timer_value) {
            var _this = this,
                t;

            // DOM Events
            $(window).on('mousemove', function() {
                resetTimer(timer_value * 60000);
            });
            $(window).on('keypress', function() {
                resetTimer(timer_value * 60000);
            });

            function logout() {
                $(window).on('mousemove', function() {
                    window.location.reload();
                });
                $(window).on('keypress', function() {
                    window.location.reload();
                });
            }

            function resetTimer(value) {
                clearTimeout(t);
                t = setTimeout(logout, value)
                // 1000 milisec = 1 sec
            }

            window.onload = resetTimer(timer_value * 60000);
        };

        Masthead.prototype.watchHeaderBar = function() {

            var st = $(window).scrollTop()
            var poss = 0

            var wHeight = $(window).height() + 130,
                docHeight = $(document).height();


            if (Math.abs(lastScrollTop - st) <= poss)
                return;

            if (st > lastScrollTop && st > 0 && $('.mobile-menu--active').length == 0) {
                $('.m71-cookie').trigger('posm71check');
                $('.new-notification').trigger('posm20check');
                $(window).trigger('overrideFixed');
                this.$headerBar.removeClass(this.headerBarFixedClassname);
                $('.m13-footer--floating').addClass('scroll');
                this.$headerBar.addClass(this.headerBarFixedNewClassname);
                // $('.m12-bar--investor__wrapper').removeClass('fixed-new');
                // $('.m12-bar--investor__wrapper').addClass('fixed');
                $('.m12-bar--substitute').show();
                // this.$headerMain.removeClass( this.headerMainOffscreenClassname );
                this.$headerBar.attr(this.headerBarFixedDataAttr, false);
                this.$breadcrumbs.addClass(this.breadcrumbsFixedClassname);
                this.fixedHeader = false;
                this.$component.removeClass('m12-masthead--dark');
                    $('.m12-logo img').each(function() {
                        $(this).attr('src', $(this).attr('data-defaultsrc'));
                        $('.m12-bar--logo_mobile img').attr('src', $('.m12-logo-image--dewa').attr('data-defaultsrc'));
                    });
            } else if (st < lastScrollTop) {
                if (st > 0) {
                    $('.m71-cookie').trigger('posm71check');
                    $('.new-notification').trigger('posm20check');
                    $(window).trigger('overrideFixedNew');
                    this.$headerBar.addClass(this.headerBarFixedClassname);
                    $('.m13-footer--floating').removeClass('scroll');
                    this.$headerBar.removeClass(this.headerBarFixedNewClassname);
                    // $('.m12-bar--investor__wrapper').addClass('fixed-new');
                    // $('.m12-bar--investor__wrapper').removeClass('fixed');
                    $('.m12-bar--substitute').show();
                    // this.$headerMain.addClass(this.headerMainOffscreenClassname );
                    this.$headerBar.attr(this.headerBarFixedDataAttr, true);
                    this.$breadcrumbs.addClass(this.breadcrumbsFixedClassname);
                    this.fixedHeader = true;
                    this.$component.removeClass('m12-masthead--dark');
                    $('.m12-logo img').each(function() {
                        $(this).attr('src', $(this).attr('data-defaultsrc'));
                        $('.m12-bar--logo_mobile img').attr('src', $('.m12-logo-image--dewa').attr('data-defaultsrc'));
                    });
                } else {
                    $('.m71-cookie').trigger('negm71check');
                    $('.new-notification').trigger('negm20check');
                    $(window).trigger('overrideFixedRemove');
                    this.$headerBar.removeClass(this.headerBarFixedClassname);
                    $('.m13-footer--floating').removeClass('scroll');
                    this.$headerBar.removeClass(this.headerBarFixedNewClassname);
                    // $('.m12-bar--investor__wrapper').removeClass('fixed-new');
                    // $('.m12-bar--investor__wrapper').removeClass('fixed');
                    $('.m12-bar--substitute').hide();
                    // this.$headerMain.removeClass( this.headerMainOffscreenClassname );
                    this.$headerBar.attr(this.headerBarFixedDataAttr, false);
                    this.fixedHeader = false;
                    if ($('[data-component="m1-hero"]').length != 0 && ($('m1-hero--stock').length == 0 && $('m1-hero--variant').length == 0)) {
                        this.$component.addClass('m12-masthead--dark');
                        $('.m12-logo img').each(function() {
                            $(this).attr('src', $(this).attr('data-hompagesrc'))
                        });
                        $('.m12-bar--logo_mobile img').attr('src', $('.m12-logo-image--dewa').attr('data-hompagesrc'));
                    }
                    if (wHeight < docHeight) {
                        this.$breadcrumbs.removeClass(this.breadcrumbsFixedClassname);
                        this.$breadcrumbs.removeClass(this.breadcrumbsFixedToggleClassname)
                    }
                    if (utils.breakpoint() === 's' || utils.breakpoint() === 'm') {
                        this.$breadcrumbs.addClass(this.breadcrumbsFixedClassname);
                    }
                }
            };

            if (st + wHeight >= docHeight) {
                $('.m13-footer--floating').removeClass('scroll');
            };

            lastScrollTop = st;
        };

        Masthead.prototype.orientationchange = function() {
            this.respond();
        };

        Masthead.prototype.fontSlide = function() {
            var _this = this,
                width = 1000,
                width_classes = ['grid', 'm13-supplementary__wrapper', 'm12-main', 'm12-bar__wrapper', 'm12-bar__breadcrumbs-wrapper', 'm12-subsection__wrapper', 'service-message__wrapper', 'm12-main__navs--inner'];

            $(_this.fontSize).attr('min', '-0.5');
            $(_this.fontSize).attr('max', '0.5');
            $(_this.fontSize).attr('step', '0.125');
            $(_this.fontSize).on('change', function() {
                document.body.style.fontSize = "1em";
                document.body.style.fontSize = parseFloat(document.body.style.fontSize) + ($(this).val() * 0.5) + "em";
                for (var e in width_classes) {
                    $(e).css('width', width + ($(this).val() * 500));
                };
                console.log($(this).val())
                _this.setCookie("fontsize", ($(this).val()), 1);
            })
            $(_this.fontSize).attr('value', '0');
        };

        Masthead.prototype.setCookie = function(cname, cvalue, exdays) {
            var d = new Date();
            d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
            var expires = "expires=" + d.toUTCString();
            document.cookie = cname + "=" + cvalue + ";path=/; " + expires;
        };

        Masthead.prototype.getCookie = function(cname) {
            var name = cname + "=";
            var ca = document.cookie.split(';');
            for (var i = 0; i < ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0) == ' ') c = c.substring(1);
                if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
            }
            return "";
        };

        Masthead.prototype.searchActivate = function() {
            var searchButton = $('.m12-search__submit'),
                searchPanel = $('.m12-search__panel');

            searchButton.on('click', function() {
                searchPanel.addClass('m12-search__panel--active')
            });
        }

        Masthead.prototype.toTop = function(e) {

            e.preventDefault();

            $('body').attr('tabindex', -1);

            if (utils.isWindowsPhone()) {

                $('html, body').scrollTop(0);
            } else {

                $('html, body').animate({

                    scrollTop: 0
                }, 500, function() {

                    $('#page').focus();
                });
            }
        };

        return Masthead;
    });
/* homemodule */
define( '../src/sublayouts/m13-footer/m13-footer',[ 'jquery', 'lib/utils', 'tooltipster'], function ( $, utils, tooltipster ) {

	'use strict';

	var Footer = function ( $component ) {

		this.$component = $component;

		return this;
	};

	Footer.prototype.init = function () {
		var _this = this;

		this.$anchor = this.$component.find( '[data-m13-back-to-top="true"]' );
		this.$anchor.on( 'click', $.proxy( this.toTop, this ) );

		this.$footerModel = this.$component.find('.m39-modal__container')
		this.$modalWrapper = this.$component.find('.mask-show')

		this.$totalHeight = $(window).height()
		this.$topMargin = this.$totalHeight / 10
		this.$footerModel.css({'margin-top': this.$topMargin,'margin-bottom': this.$topMargin});

		this.$component.find('.m13-footer--medialinks_item').each(function() {
			var text = $(this).find('a').text();

			$(this).tooltipster({
				content: text,
				maxWidth: 250,
					arrow: false
			});
		});
		
		this.$component.find('.m13-footer_linktrigger--mobile').off('click.m13').on('click.m13', function(event) {
			event.preventDefault();

			$(this).closest('.m13-footer--floating_item').toggleClass('active');

		});
	};

	Footer.prototype.toTop = function ( e ) {

		e.preventDefault();

		$( 'body' ).attr( 'tabindex', -1 );

		if ( utils.isWindowsPhone() ) {

			$( 'html, body' ).scrollTop( 0 );
		} else {

			$( 'html, body' ).animate( {

				scrollTop: 0
			}, 500, function () {

				$( '#page' ).focus();
			} );
		}
	};



	return Footer;

} );

;
define("../src/sublayouts/m14-richtext/m14-richtext", function(){});

define('../src/sublayouts/m15-social-media-feed/m15-social-media-feed',['jquery', 'slick'], function ($) {

	'use strict';

	var M15_SOCIAL = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M15_SOCIAL.prototype.init = function () {
		$('.m15-social-media-feed__image').each(function () {
			$(this).css({
				backgroundImage: "url('"+$(this).data('src')+"')"
			})
		})
	};

	return M15_SOCIAL;
});
/* homemodule */
define( '../src/sublayouts/m17-sectiontitle/m17-sectiontitle',[ 'jquery' ], function ( $ ) {

	'use strict';

	var M17_SECTIONTITLE = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M17_SECTIONTITLE.prototype.init = function () {
		
    this.$rammasTrigger = this.$component.find('.m17-sectiontitle-rammas__trigger');
   	this.$rammasTrigger.on('click',function(event) { 
    	event.preventDefault();
    	this.$rammasBtn = $('.rammas-wrapper').find('a');
        this.$rammasBtn.trigger( "click" );
   		})
    };

	return M17_SECTIONTITLE;
});
/* homemodule */
define('../src/sublayouts/m18-quick-tools/m18-quick-tools',['jquery', 'slick'], function ($) {

	'use strict';

	var M18_QL = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M18_QL.prototype.init = function () {
		var _this = this;

		if ( $(window).width() < 600 ) {
			_this.initCarousel();
		} else {
			//_this.destroyCarousel();
		}

		$(window).on('resize', function() {
			setTimeout(function() {
				if ( $(window).width() < 600 ) {
					_this.initCarousel();
				} else if ( _this.$component.find('.m18-quick-tools--wrapper').hasClass('slick-initialized') ) {
					_this.destroyCarousel();
				}
			},50);
		});
	};

	M18_QL.prototype.destroyCarousel = function () {
		var _this = this;

		_this.$component.find('.m18-quick-tools--wrapper').slick('unslick');
		_this.$component.find('.m18-quick-tools--wrapper').attr('style', '');
	};

	M18_QL.prototype.initCarousel = function () {
		this.$M18_slider = this.$component.find('.m18-quick-tools--wrapper');
		var rtl = ($('html').attr('dir') == 'rtl');

		if ($('.m19-ql-carousel__slide').length > 1) {
			this.$M18_slider.slick({
				dots: true,
				arrows: false,
				infinite: true,
				speed: 750,
				slidesToShow: 1,
				slidesToScroll: 1,
				autoplay: false,
				rtl: rtl
			});
		}

		this.$M18_slider.css({
			top: 0,
			opacity: 1,
			position: 'relative'
		});

		this.$component.find('.slick-slide').each(function() {
			if ( $(this).attr('aria-describedby') != undefined ) {
				$(this).find('.m18-quick-tools--panel').attr('id', $(this).attr('aria-describedby'))
			};
		});

	};

	return M18_QL;
});
/* homemodule */
define('../src/sublayouts/m19-ql-carousel/m19-ql-carousel',['jquery', 'slick'], function($) {

    'use strict';

    var M19_CAROUSEL = function($component) {

        this.$component = $component;

        return this;
    };

    /**
     * Initialise component
     */

    M19_CAROUSEL.prototype.init = function() {

        if (!this.$component.hasClass('no-carousel')) {

            this.$M3_slider = $('.m19-ql-carousel__carousel');
            var rtl = ($('html').attr('dir') == 'rtl'),
                count;

            if ($(window).width() > 1024) {
                count = 5;
            } else {
                count = 3;
            }

            if ($('.m19-ql-carousel__slide').length > count) {
                this.$M3_slider.slick({
                    dots: false,
                    arrows: true,
                    infinite: true,
                    speed: 750,
                    slidesToShow: count,
                    slidesToScroll: 1,
                    autoplay: false,
                    rtl: rtl
                });
            };

            this.$M3_slider.css({
                top: 0,
                opacity: 1,
                position: 'relative'
            });

            this.$component.find('.slick-slide').each(function() {
                if ($(this).attr('aria-describedby') != undefined) {
                    $(this).find('.m19-ql-carousel__slide--img').attr('id', $(this).attr('aria-describedby'));
                };
            });
        }
    };

    return M19_CAROUSEL;
});

/* homemodule */
define('../src/sublayouts/m2-hero-image/m2-hero-image',['jquery', 'tooltipster', 'lib/utils'], function($, tooltipster, utils) {

    'use strict';

    /**
     * This module only effects Tabs on desktop. Mobile view uses the toggle helper.
     */

    var m2Hero = function($component) {

        this.$component = $component;

        return this;
    };

    m2Hero.prototype.init = function() {

        this.$component.find('.m2-hero-image__inner').each(function() {
            var text = $(this).attr('data-alt');

            $(this).tooltipster({
                content: text,
                distance: -48,
                maxWidth: 250,
                arrow: false
            });
        });
    };

    return m2Hero;
});

/* homemodule */
define('../src/sublayouts/m20-notification/m20-notification',['jquery'],
    function($, utils) {

        'use strict';

        var Notification = function($component) {

            this.$component = $component;
        };

        Notification.prototype.init = function() {

            var _this = this;

            this.timeout = this.$component.data('timeout');
            this.repeat = this.$component.data('time-repeat');
            this.permanent = this.$component.hasClass('show-permanent') ? true : false;
            this.$closenew = this.$component.find('.m20-new-close');
            this.$closenewstyle = this.$component.find('.m20-newstyle-close');
            this.$close = this.$component.find('.m20-notification__dismiss');
            this.repetTime = this.repeat * 60 * 1000;
            this.cookieName = this.$component.data('cookie-name');

            // Remove special characters and spaces
            this.cookieName = this.cookieName.replace(/[^a-zA-Z0-9]/g, '');


            $(window).scroll(function() {
                var scroll = $(window).scrollTop();
                _this.$component.addClass('fixed');
            });

            if(_this.$component.hasClass('sap-maintenance-notification')){
                var x = _this.readCookie(this.cookieName);
                if (x === null) {
                    _this.notifictionShow();
                }
            }else{
                _this.notifictionShow();
            }
                

            if (!this.permanent) {
                setInterval(
                    function() {
                        var x = _this.readCookie(this.cookieName);

                        if (x === null) {
                            _this.notifictionShow()

                        }
                    }, this.repetTime)
            }

            this.$closenew.on('click', function() {
                //console.log('click')
                _this.$component.removeClass('shown')
            });

            this.$closenewstyle.on('click', function() {
                //console.log('click')
                _this.$component.removeClass('shown');
                $('.m12-bar').removeAttr('style');
                if (_this.$component.hasClass('notification-newstyle') && !_this.$component.hasClass('sap-maintenance-notification')) {
                    _this.$component.css('min-height', 0);
                    _this.$component.css('max-height', 0);
                };

                // SAP M notification - setting cookie on hide, once expire notification will show again.
                if(_this.$component.hasClass('sap-maintenance-notification')){
                    var datenow = new Date();
                    datenow.setTime(datenow.getTime() + (24 * 60 * 60 * 1000)); // Convert hours to milliseconds
                    var expires = "expires=" + datenow.toUTCString();
                    document.cookie =  this.cookieName + " = " + this.cookieName + ";" + expires + ";path=/";
                    _this.$component.hide()
                }
            });

            this.$close.one('click', function(ev) {
                ev.preventDefault();
                _this.$component.fadeOut(function() {
                    _this.$component.remove();
                });
            });

            this.listenToScroll();

            if (this.$component.hasClass('m20-notification--marquee')) {

                $('.m12-masthead').addClass('m20marquee');

                setTimeout(function () {
                    $('.mobile-menu').attr('m20marquee', "");
                }, 500);

                $(window).off('resize.m20').on('resize.m20',function () {
                    setTimeout(function () {
                        $('.mobile-menu').attr('m20marquee', "");
                    }, 500);
                });

                // var intervalId = setInterval(function() {
                //     var m20clone2 = _this.$component.find('.m20-notification-2').clone()

                //     _this.$component.find('.m20-notification-2:first-child').remove();
                //     _this.$component.find('.grid__row').append(m20clone2);
                // }, parseInt(_this.$component.attr('data-marquee-duration'))*1000);
            };

            this.$component.find('[m20-close="true"]').off('click.m20').on('click.m20', function() {
                _this.$component.hide();
            });

        };

        Notification.prototype.listenToScroll = function() {
            var _this = this,
                offset;

            $('.new-notification').on('posm20check', function() {
                if ($(window).width() <= 1024) {
                    offset = 65;
                } else {
                    offset = 60;
                };
                if ($('.new-notification').hasClass('shown')) {
                    if ($('.m12-bar').hasClass('m12-bar--fixed-new')) {
                        $('.m12-bar--fixed-new').css('top', ($('.new-notification').height() - offset).toString() + 'px');
                    } else {
                        $('.m12-bar--fixed').css('top', $('.new-notification').height().toString() + 'px');
                    }
                };
            });

            $('.notification-newstyle').on('posm20check', function() {
                console.log('posm20check')
                $(this).css({
                    height: '0px',
                    overflow: 'hidden'
                });
            })

            $('.new-notification').on('negm20check', function() {
                $('.m12-bar').removeAttr('style');
            });

            $('.notification-newstyle').on('negm20check', function() {
                $(this).css({
                    height: 'unset',
                    overflow: 'hidden'
                });
                console.log('negm20check')
            })
        };

        Notification.prototype.notifictionShow = function() {
            var _this = this;
            var stay = this.timeout * 1000
            $('.new-notification').addClass('shown')

            // SAP M notification- remove min and max 0 height from the component to show
            if(_this.$component.hasClass('sap-maintenance-notification')){
                _this.$component.show()
            }

            if ($('.new-notification').hasClass('notification-newstyle')) {
                var conHeight = $('.m20-notification-2').height()
                if (conHeight > 60) {
                    var conHeight = conHeight + 10
                }
                $(window).on('resize', function() {
                    $('.new-notification').css('min-height', 'unset');
                    $('.new-notification').css('max-height', 'unset');
                });
                $('.new-notification').css('min-height', 'unset');
                $('.new-notification').css('max-height', 'unset');
            }

            if (this.permanent == true) {
                if(_this.$component.hasClass('sap-maintenance-notification')){
                    
                }else{
                    document.cookie =  this.cookieName + ' = ' + this.cookieName + '; expires=25 Dec 2050 12:00:00 UTC; path=/';
                }
            } else {
                    setTimeout(_this.notifictionHide, stay)
                    _this.createCookie(this.cookieName , this.cookieName, this.repetTime);
            }
        }

        Notification.prototype.createCookie = function(name, value, hours) {
            var expires = "";
            if (hours) {
                var date = new Date();
                date.setTime(date.getTime() + (hours - 10));


                expires = "; expires=" + date.toUTCString();
            };
            document.cookie = name + "=" + value + expires + "; path=/";
        };

        Notification.prototype.readCookie = function() {
            var _this = this,
                nameEQ = this.cookieName + "=";
            
            // SAP M notification - cookie name change
            if(_this.$component.hasClass('sap-maintenance-notification')){
                nameEQ = this.cookieName;
            }

            var ca = document.cookie.split(';');

            for (var i = 0; i < ca.length; i++) {

                var c = ca[i];

                while (c.charAt(0) == ' ') {
                    c = c.substring(1, c.length)
                };

                if (c.indexOf(nameEQ) == 0) {
                    return true
                };

            }

            return null;
        };

        Notification.prototype.notifictionHide = function() {
            var _this = this;
            //console.log(this.$notification)
            if ($('.new-notification').hasClass('shown')) {
                $('.new-notification').removeClass('shown')
            }
            if ($('.new-notification').hasClass('notification-newstyle')) {
                $('.new-notification').css('min-height', 0);
                $('.new-notification').css('max-height', 0);
            }
            $('.m12-bar').removeAttr('style');
        }

        return Notification;

    });

;
define("../src/sublayouts/m22-image-with-caption/m22-image-with-caption", function(){});

define('../src/sublayouts/m23-table/m23-table',['jquery'],
    function($, utils) {

        'use strict';

        var Table = function($component) {

            this.$component = $component;
        };

        Table.prototype.init = function() {
            var _this = this;

            _this.$headings = [];
            this.loadMultiplier = 1;

            //if (!_this.$component.hasClass('m23-table--variant')) {
            if (true) {
                this.$component.find('th').each(function() {
                    _this.$headings.push($(this).text());
                });
                this.$component.find('.m23-table__content-table-row').each(function() {
                    _this.$headings.push($(this).text());
                    $(this).attr('tabindex', '0');
                    $(this).find('td').each(function(index) {

                        if ($(this).attr('data-label') == undefined) {
                            $(this).attr('data-label', _this.$headings[index]);
                        };

                        if ($(this).attr('data-label') != undefined && $(this).find('.m23-table__content-table-th-mobile').length == 0) {
                            $(this).append('<div class="m23-table__content-table-th-mobile">' + $(this).attr('data-label') + '</div>');
                        } else if ($(this).find('.m23-table__content-table-th-mobile').length == 0) {
                            $(this).append('<div class="m23-table__content-table-th-mobile"></div>');
                        };

                        $(this).addClass('initialized');

                        if ($(this).find('.m23-table__content-table-th-mobile') != undefined) {
                            $(this).css('min-height', ($(this).find('.m23-table__content-table-th-mobile').height()).toString() + 'px');
                        }
                    })
                });
            };

            $(window).off('resize.m23').on('resize.m23', function() {
                if (!_this.$component.hasClass('m23-table--variant')) {
                    _this.$component.find('.m23-table__content-table-row').each(function() {
                        $(this).find('td').each(function(index) {
                            $(this).css('min-height', ($(this).find('.m23-table__content-table-th-mobile').height()).toString() + 'px');
                        });
                    });
                }
            });

            this.$component.off('j34Done.m23').on('j34Done.m23', function() {
                _this.$component.find('.m23-table__content-table-row').each(function() {
                    $(this).find('td').each(function(index) {

                        if ($(this).attr('data-label') != undefined && $(this).find('.m23-table__content-table-th-mobile').length == 0) {
                            $(this).append('<div class="m23-table__content-table-th-mobile">' + $(this).attr('data-label') + '</div>');
                        } else if ($(this).find('.m23-table__content-table-th-mobile').length == 0) {
                            $(this).append('<div class="m23-table__content-table-th-mobile"></div>');
                        };

                        if ($(this).find('.m23-table__content-table-th-mobile') != undefined) {
                            $(this).css('min-height', ($(this).find('.m23-table__content-table-th-mobile').height()).toString() + 'px');
                        };
                    });
                });
            });

            this.$component.find('.m23-table__content-table-row').each(function() {
                $(this).attr('tabindex', '0');
            });

            if (this.$component.find('.m23-table--load').length > 0) {
                _this.loadMore();
            };

            if (_this.$component.hasClass('m23-table--variant')) {
                _this.$component.find('.m23-table--mobile-open').each(function() {
                    $(this).off('click.m32').on('click.m32', function() {
                        var $parent = $(this).closest('.m23-table--mobile-row');

                        _this.$component.find('.m23-table--mobile-row').each(function() {
                            $(this).removeClass('active');
                        });

                        $parent.addClass('active');
                    });
                });

                _this.$component.find('.m23-table--mobile-close').each(function() {
                    $(this).off('click.m32').on('click.m32', function() {
                        var $parent = $(this).closest('.m23-table--mobile-row');

                        $parent.removeClass('active');
                    });
                });
            };

            $(window).off('reinit_m23').on('reinit_m23', function () {
                _this.init();
            });
        };

        Table.prototype.loadMore = function() {
            var _this = this,
                $button = this.$component.find('.m23-table--load'),
                increment = parseInt($button.attr('data-increment')),
                $trs = this.$component.find('.m23-table__content-table-body').find('tr'),
                currentLoad = increment * _this.loadMultiplier,
                trCount = $trs.length;

            if (trCount <= (currentLoad)) {
                $button.hide();
            }

            $trs.each(function(index) {
                if (index < currentLoad) {
                    if (index > 0 && $(window).width() > 600) {
                        $($trs[index - 1]).find('.m23-table__content-table-cell').css('border-bottom', 'none');
                    }
                    if ($(window).width() > 600) {
                        $(this).find('.m23-table__content-table-cell').css('border-bottom', '1px solid #BCBEC0');
                    }
                    $(this).show();
                } else {
                    $(this).hide();
                }
            });

            _this.loadMultiplier = _this.loadMultiplier + 1;

            $button.off('click.load').on('click.load', function() {
                _this.loadMore();

            });
        };

        return Table;

    });

/* homemodule */
define( '../src/sublayouts/m24-msg-float/m24-msg-float',[ 'jquery' ],
	function ( $, utils ) {

		'use strict';

		var m24 = function ( $component ) {

			this.$component = $component;
		};

		m24.prototype.init = function () {
			var _this = this;

			if ( !this.getCookie() ) {
				_this.$component.removeClass('hidden');
				this.$component.addClass('m24-msg-float--active');
				$('.m12-menuover').addClass('m12-menuover--m24');
			
				$(window).on('overrideFixed', function() {
					if ($(window).width() > 1024) {
						_this.overrideFixed();
					};
				});

				$(window).on('overrideFixedNew', function() {
					if ($(window).width() > 1024) {
						_this.overrideFixedNew();
					};
				});

				$(window).on('overrideFixedRemove', function() {
					$('.m12-bar').removeClass('m12-bar--fixed-new-override');
					$('.m12-bar').removeClass('m12-bar--fixed-override');
				});
			} else {
				this.$component.addClass('hidden');
				$('.m12-menuover').removeClass('m12-menuover--m24');
			};

			this.$component.find('.m24-msg-float--close').on('click', function() {
				_this.$component.removeClass('m24-msg-float--active');
				$('.m12-menuover').removeClass('m12-menuover--m24');
				setTimeout(function() {
					_this.$component.addClass('hidden');
				}, 750);
				_this.setCookie();

				$('.m12-bar').removeClass('m12-bar--fixed-new-override');
				$('.m12-bar').removeClass('m12-bar--fixed-override');

				$(window).off('overrideFixed');

				$(window).off('overrideFixedNew');

				$(window).off('overrideFixedRemove');

				window.open(
				  _this.$component.attr('data-redirect-url'),
				  '_blank' // <- This is what makes it open in a new window.
				);
				//window.location.href = _this.$component.attr('data-redirect-url');
			});

			this.$component.find('.m24-msg-float--closebtn').on('click', function() {
				_this.$component.removeClass('m24-msg-float--active');
				$('.m12-menuover').removeClass('m12-menuover--m24');
				setTimeout(function() {
					_this.$component.addClass('hidden');
				}, 750);
				_this.setCookieTemp();

				$('.m12-bar').removeClass('m12-bar--fixed-new-override');
				$('.m12-bar').removeClass('m12-bar--fixed-override');

				$(window).off('overrideFixed');

				$(window).off('overrideFixedNew');

				$(window).off('overrideFixedRemove');
			});
		};

		m24.prototype.setCookie = function() {
            document.cookie = 'dewa_m24=1;path=/; expires=25 Dec 2050 12:00:00 UTC';
        };

		m24.prototype.setCookieTemp = function() {
            document.cookie = 'dewa_m24=1;path=/;';
        };

        m24.prototype.overrideFixed = function() {
        	if ( !$('.m12-bar').hasClass('m12-bar--fixed-override') ) {
        		$('.m12-bar').addClass('m12-bar--fixed-override');
        		$('.m12-bar').removeClass('m12-bar--fixed-new-override');
        	};
        };

        m24.prototype.overrideFixedNew = function() {
        	if ( !$('.m12-bar').hasClass('m12-bar--fixed-new-override') ) {
        		$('.m12-bar').addClass('m12-bar--fixed-new-override');
        		$('.m12-bar').removeClass('m12-bar--fixed-override');
        	};
        };

		m24.prototype.getCookie = function() {
            var nameEQ = "dewa_m24=";

            var ca = document.cookie.split(';');

            for (var i = 0; i < ca.length; i++) {

                var c = ca[i];

                while (c.charAt(0) == ' ') {
                    c = c.substring(1, c.length)
                };

                if (c.indexOf(nameEQ) == 0) {
                    return true
                };

            }

            return null;
        };

		return m24;

	} );
define('../src/sublayouts/m25-tabs/m25-tabs',['jquery', 'breakpoint', 'lib/utils'], function($, breakpoint, utils) {

    'use strict';

    /**
     * This module only effects Tabs on desktop. Mobile view uses the toggle helper.
     */

    var Tabs = function($component) {

        this.$component = $component;

        return this;
    };

    Tabs.prototype.init = function() {

        // cache dom els
        this.$tabs = this.$component.find('[data-m25-tabs-tab="true"]');
        this.$tabsMenu = this.$component.find('[data-m25-tabs-menu="true"]');
        this.$content = this.$component.find('[data-m25-tabs-content="true"]');
        this.$selected = this.$component.data('selected-tab-id');
        this.selectedTabID = utils.getParameterByName('faq');
        // id param makes more sense but keep above for backward compatibility
        if (this.selectedTabID === '') this.selectedTabID = utils.getParameterByName('id');

        // props

        this.activeTabsClass = 'm25-tabs__tab--active';
        this.activeContentClass = 'm25-tabs__content--active';

        this.$selectedTab = this.$tabs.eq(0);

        if (this.selectedTabID !== '') {

            this.$selectedTab = this.$component.find('#' + this.selectedTabID);
            if (this.$selectedTab[0] === undefined) this.$selectedTab = this.$tabs.eq(0);

        }

        this.respond();

        $(breakpoint).on('change', $.proxy(this.respond, this));

        //expand listener
        $('.m25-tabs__tab').on('click', function() {
            if ($(this).hasClass('icon-close')) {
                $(this).next('ul').addClass('ul--m25-active');
                $(this).removeClass('icon-close');
                $(this).addClass('icon-open');
            } else if ($(this).hasClass('icon-open')) {
                $(this).next('ul').removeClass('ul--m25-active');
                $(this).removeClass('icon-open');
                $(this).addClass('icon-close');
            } else {
                $('.m25-tabs__tab').next('ul').removeClass('ul--m25-active');
                $('.m25-tabs__tab').each(function() {
                    if ($(this).hasClass('icon-open')) {
                        $(this).removeClass('icon-open');
                        $(this).addClass('icon-close');
                    } else {}
                });
            }
        });

    };

    Tabs.prototype.respond = function() {

        this.setUpDesktopView();

        if (utils.breakpoint() === 's') {

            this.setUpMobileView();

        } else {

        }
    };

    Tabs.prototype.setUpDesktopView = function() {

        var self = this,
            _this = this;

        //this.$tabsMenu.show();
        if (this.$component.attr('m25isLink') != 'true') {
            this.$tabs.on('click', function(e) {

                e.preventDefault();
                self.displayTab($(this));

            });

            this.displayTab(this.$selectedTab);

            $('#' + _this.$selected).click();
        };

    };

    Tabs.prototype.setUpMobileView = function() {
        var _this = this;

        $('.m25-tabs--select-mobile').empty();
        $('.m25-tabs--container-mobile').empty();

        this.$component.find('.toggle-menu__item').each(function() {
            var html_cat = $(this).find('.m25-tabs__title').html(),
                html_con = $(this).find('.m25-tabs__content').html(),
                html_conID = $(this).find('.m25-tabs__content').attr('id').replace('panel', 'tab');

            $('<option class="' + html_conID + '" data-trigger-index="' + html_conID + '"' + '>' + html_cat + '</option>').appendTo($('.m25-tabs--select-mobile'));
        });

        this.$component.find('.m25-tabs__tab').each(function() {
            if ($(this).hasClass('m25-tabs__tab--active')) {
                $('option[data-trigger-index="' + $(this).attr('id').replace('panel', 'tab') + '"]').prop('selected', true)
            }
        });

        $('.m25-tabs--select-mobile').change(function() {
            var index_trigger = $(this).children(":selected").attr('data-trigger-index');
            if (_this.$component.attr('m25isLink') != 'true') {
                _this.$tabsMenu.find('#' + index_trigger).click();
            } else {
                window.location.href = _this.$tabsMenu.find('#' + index_trigger).attr('href');
            }
        });
    };

    Tabs.prototype.displayTab = function($tab) {

        this.$tabs.removeClass(this.activeTabsClass).attr('aria-selected', false);

        $tab.addClass(this.activeTabsClass);
        $tab.attr('aria-selected', true);
        this.$content.removeClass(this.activeContentClass);
        this.$content.parent().removeClass('toggle-menu__itemactive');
        $('#' + $tab.attr('aria-controls')).addClass(this.activeContentClass);
        $('#' + $tab.attr('aria-controls')).parent().addClass('toggle-menu__itemactive');
        this.$selectedTab = $tab;


    };

    Tabs.prototype.fixPosition = function() {

        var self = this;

        if (utils.fixedHeader()) {

            $('body').animate({
                scrollTop: self.$component.offset().top - utils.headerBarHeight() - 60

            }, 100);
        }
    };

    Tabs.prototype.orientationchange = function() {

        this.reset();
        this.respond();
    };

    Tabs.prototype.reset = function() {

        this.$content.removeClass(this.activeContentClass);
        this.$content.parent().removeClass('toggle-menu__itemactive');
        this.$tabs.removeClass(this.activeTabsClass);
        this.$tabs.off('click');
        this.$component.find('[data-toggle-trigger]').off('click.scroll');
    };

    return Tabs;

});

/* homemodule */
define( '../src/sublayouts/m27-accessibility-overlay/m27-accessibility-overlay',[ 'jquery', 'lib/utils' ], function ( $, utils ) {

	'use strict';

	/**
	 * Accessibility overlay  component.
	 * @exports M27_AccessibilityOverlay
	 * @constructor
	 */

	var M27_AccessibilityOverlay = function ( $component ) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M27_AccessibilityOverlay.prototype.init = function () {
		var _this = this;
		var colour = this.getCookie("colour");
		var read = this.getCookie("read");
		var fontsize = this.getCookie("fontsize");
		var body = $('body');
		this.$ao = $('.m27-accessibility-overlay');
		this.$aob = $('.m27-accessibility-overlay__cta');

		var lang = utils.isRTL() ? 'ar_ar' : 'en_UK',
				voice = utils.isRTL() ? 'Faris' : 'en_gb_amy',
				pageurl = window.location.href;

		if (document.body.style.fontSize == "") {
			document.body.style.fontSize = "1em";
		}

		if (fontsize!="" && fontsize>0) {
			this.increaseFontSize(fontsize);
		}

		if (colour=="invert") {
			this.invertColour();
			this.$component.find('.form-field__input--radio').eq(0).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(2).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(3).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(1).prop('checked', true);
		}

		if (colour=="blue") {
			this.blueColour();
			this.$component.find('.form-field__input--radio').eq(0).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(1).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(3).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(2).prop('checked', true);
		}

		if (colour=="red") {
			this.redColour();
			this.$component.find('.form-field__input--radio').eq(0).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(1).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(2).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(3).prop('checked', true);
		}
		if (colour=="full") {
			this.$component.find('.form-field__input--radio').eq(1).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(2).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(3).prop('checked', false);
			this.$component.find('.form-field__input--radio').eq(0).prop('checked', true);
		}

		$('.readspeaker-link').attr('href', 'https://app.readspeaker.com/cgi-bin/rsent?customerid=7358&lang='+lang+'&voice='+voice+'&readid=rs_area&url='+pageurl);

		body.on('click', '.readspeaker-link', function () {
			$(window).trigger('readspeakerRequest');
		});

		$('html').on('click', function (e) {
			// hide if not a radio button
			var t = $(e.target);
			if ((t && t.attr('class') && t.attr('class').indexOf('radio') == -1) && (t && t.attr('class') && (t.attr('id') != 'MrSlCb')) && (t && t.attr('class') && (t.attr('id') != 'DeafTranslate')) && (t && t.attr('class') && (t.attr('id') != 'TranslateStop'))) {
				_this.hideOverlay();
			}
		});

		$('.m12-tools__link').on('focusin', function (e) {
			_this.hideOverlay();
		});

		this.$aob.on('click', function (e) {
			e.stopPropagation();
			e.preventDefault();
			if ($(this).hasClass('m12-menuover-accessibility')) {
				_this.toggleOverlay(true);
			} else {
				_this.toggleOverlay(false);
			}
			
		});

		$('.m27-accessibility-overlay__content').on('click','.form-field__radio', function (e) {
			switch (parseInt($(e.target).siblings(1).val())) {
				case 1:
					_this.fullColour();
					break;
				case 2:
					_this.invertColour();
					break;
				case 3:
					_this.blueColour();
					break;
				case 4:
					_this.redColour();
					break;
			}
		});

		$('.m27-accessibility-overlay__content').find('.m27-accessibility-overlay__text-smaller').on('click', function (e) {
			e.stopPropagation();
			e.preventDefault();
			_this.decreaseFontSize(1);
		});
		$('.m27-accessibility-overlay__content').find('.m27-accessibility-overlay__text-larger').on('click', function (e) {
			e.stopPropagation();
			e.preventDefault();
			_this.increaseFontSize(1);
		});
		$('.m27-accessibility-overlay__content').find('.m27-accessibility-overlay__button--print').on('click', function () {
			if (window.print) {
				window.print();
			}
		});

		$('.m27-accessibility-overlay__content').find('.readspeaker-link').on('click', function () {
			_this.hideReadSpeakerButton();
			_this.setCookie('read', 1, 1);
		});

		body.on('click', '.rsbtn_closer.rsimg', function () {
			_this.showReadSpeakerButton();
		});
	};

	M27_AccessibilityOverlay.prototype.hideOverlay = function () {
		this.$ao.removeClass('m27-accessibility-overlay--visible');
		this.$ao.removeClass('m27-accessibility-overlay--menuover');
		this.$ao.attr('aria-expanded', false);
		this.$aob.removeClass('m27-accessibility-overlay__cta--active');
	};

	M27_AccessibilityOverlay.prototype.showOverlay = function () {
		this.$ao.addClass('m27-accessibility-overlay--visible');
		this.$ao.attr('aria-expanded', true);
		this.$aob.addClass('m27-accessibility-overlay__cta--active');
	};

	M27_AccessibilityOverlay.prototype.toggleOverlay = function (ismenuOver) {
		if (ismenuOver) {
			if (this.$ao.hasClass('m27-accessibility-overlay--menuover')) {
				this.$ao.removeClass('m27-accessibility-overlay--menuover');
			} else {
				this.$ao.removeClass('m27-accessibility-overlay--menuover');
				this.$ao.addClass('m27-accessibility-overlay--menuover');
			}
		} else {
			this.$ao.removeClass('m27-accessibility-overlay--menuover');
		}

		if (this.$aob.hasClass('m27-accessibility-overlay__cta--active')) {
			this.$aob.removeClass('m27-accessibility-overlay__cta--active');
		} else {
			this.$aob.removeClass('m27-accessibility-overlay__cta--active');
			this.$aob.addClass('m27-accessibility-overlay__cta--active');
		}

		if (this.$ao.hasClass('m27-accessibility-overlay--visible')) {
			this.$ao.attr('aria-expanded', false);
			this.$ao.removeClass('m27-accessibility-overlay--visible');
		} else {
			this.$ao.removeClass('m27-accessibility-overlay--visible');
			this.$ao.addClass('m27-accessibility-overlay--visible');
			this.$ao.attr('aria-expanded', true);
		}

	};


	M27_AccessibilityOverlay.prototype.fullColour = function() {
		$('body').removeClass('invert').removeClass('blue').removeClass('blue').removeClass('red-weakness');
		this.setCookie("colour", "full", 1);
	};

	M27_AccessibilityOverlay.prototype.invertColour = function() {
		$('body').removeClass('blue').removeClass('red-weakness').addClass('invert');
		this.setCookie("colour", "invert", 1);
	};

	M27_AccessibilityOverlay.prototype.blueColour = function() {
		$('body').removeClass('invert').removeClass('red-weakness').addClass('blue');
		this.setCookie("colour", "blue", 1);
	};

	M27_AccessibilityOverlay.prototype.redColour = function() {
		$('body').removeClass('blue').removeClass('invert').addClass('red-weakness');
		this.setCookie("colour", "red", 1);
	};

	M27_AccessibilityOverlay.prototype.hideReadSpeakerButton = function() {
		$('.readspeaker-link').css('display', 'none');
	};

	M27_AccessibilityOverlay.prototype.showReadSpeakerButton = function() {
		$('.readspeaker-link').css('display', 'block');
	};

	M27_AccessibilityOverlay.prototype.increaseFontSize = function resizeText(multiplier) {
		if (document.body.style.fontSize == "1em" ) {
			document.body.style.fontSize = parseFloat(document.body.style.fontSize) + (multiplier * 0.2) + "em";
			this.setCookie("fontsize", multiplier, 1);
			setTimeout(function() {
				$(window).trigger('resize');
			},100)
		}
	};

	M27_AccessibilityOverlay.prototype.decreaseFontSize = function resizeText(multiplier) {
		if (document.body.style.fontSize != "1em" ) {
			document.body.style.fontSize = parseFloat(document.body.style.fontSize) - (multiplier * 0.2) + "em";
			this.setCookie("fontsize", 0, 0);
			setTimeout(function() {
				$(window).trigger('resize');
			},100)
		}
	};

	M27_AccessibilityOverlay.prototype.setCookie = function (cname, cvalue, exdays) {
		var d = new Date();
		d.setTime(d.getTime() + (exdays*24*60*60*1000));
		var expires = "expires="+d.toUTCString();
		document.cookie = cname + "=" + cvalue + ";path=/; " + expires;
	};

	M27_AccessibilityOverlay.prototype.getCookie = function(cname) {
		var name = cname + "=";
		var ca = document.cookie.split(';');
		for(var i=0; i<ca.length; i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1);
			if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
		}
		return "";
	};

	return M27_AccessibilityOverlay;
} );
	
define('../src/sublayouts/m28-dashboard-component-gauge/m28-dashboard-component-gauge',['jquery', 'lib/utils', 'tooltipster', 'chart-config'], function($, utils, tooltipster) {

    'use strict';

    var gaugeDashboardComponent = function($component) {

        this.$component = $component;

        return this;
    };

    gaugeDashboardComponent.prototype.init = function() {
        var _this = this;

        //this.initLineGraph(wdata, '.m28-columncharts--water', JSON.parse(this.$component.attr('data-water')));
        //this.initLineGraph(edata, '.m28-columncharts--electricity', JSON.parse(this.$component.attr('data-electricity')));

        jQuery(window).off('reinit_m28').on('reinit_m28', function() {
            var edata = _this.$component.find('.m28-gauge--wrapperdata').attr('data-electricityconsumption'),
                etype = _this.$component.find('.m28-gauge--wrapperdata').attr('data-accounttype'),
                wdata = _this.$component.find('.m28-gauge--wrapperdata').attr('data-waterconsumption'),
                cdata = _this.$component.find('.m28-gauge--wrapperdata').attr('data-carbonconsumption');

            //if ( edata !=null && edata.length > 0 ) {
            //    this.initColumnGraph(edata, JSON.parse(this.$component.attr('data-electricity-max')), '.m28-columncharts--electricity', '.m28-gauge--container--electricity');    
            //};
            //if ( wdata!=null && wdata.length > 0 ) {
            //    this.initColumnGraph(wdata, JSON.parse(this.$component.attr('data-water-max')), '.m28-columncharts--water', '.m28-gauge--container--water');
            //};

            if (edata != null && edata.length > 0) {
                    if (_this.$component.find('.m28-gauge--wrapperdata').attr('data-electricityslab').split(',').length == 2) {
                        _this.initGaugeGraph(_this.$component.find('.m28-gauge--wrapperdata').attr('data-electricityslab').split(','), 2, edata, '.m28-gauge--container--electricity-i', (76.25 * 2)+15);
                        jQuery('.m28-gauge--container--electricity-i').show();
                        jQuery('.m28-gauge--container--electricity-r').hide();
                    } else {
                        _this.initGaugeGraph(_this.$component.find('.m28-gauge--wrapperdata').attr('data-electricityslab').split(','), 4, edata, '.m28-gauge--container--electricity-r', 76.25);
                        jQuery('.m28-gauge--container--electricity-r').show();
                        jQuery('.m28-gauge--container--electricity-i').hide();
                    }

                };
                if (wdata != null && wdata.length > 0) {
                    _this.initGaugeGraph(_this.$component.find('.m28-gauge--wrapperdata').attr('data-waterslab').split(','), 4, wdata, '.m28-gauge--container--water', 106.666667);
                };
                if (cdata != null && cdata.length > 0) {
                    _this.initGaugeGraph(_this.$component.find('.m28-gauge--wrapperdata').attr('data-carbonslab').split(','), 4, cdata, '.m28-gauge--container--carbonfootprint', 76.25);
                    //_this.initGaugeGraphCarbon(4, cdata, JSON.parse(_this.$component.find('.m28-gauge--wrapperdata').attr('data-carbonfootprint-max')), '.m28-gauge--container--carbonfootprint', 76.25);
                };

        });

    };

    gaugeDashboardComponent.prototype.initGaugeGraph = function(slabData, bars, rawvalue, placeholder, per) {
        var value = parseFloat(rawvalue),
            bar_count = 0 + 1,
            min_bar = 1,
            total = 0,
            excess_rate = 0;

            

        $(placeholder).find('.m28-gauge--bar_fill').each(function() {
            $(this).attr('style', '');
        });

        $(slabData).each(function() {
            total = total + parseFloat(this);
            if (value > total) {
                bar_count = bar_count + 1;
            } else {
                excess_rate = (((value - total + parseFloat(this)) / parseFloat(this)) * per)
                return false
            }
        });

        while (min_bar < bar_count) {
            var $g = $(placeholder).find('.m28-gauge--bar' + min_bar + '');

            $g.find('#m28-gauge--bar_fill').css({
                strokeDasharray: per.toString() + ' 9999',
                opacity: '1'
            });

            min_bar++;
        };

        if (excess_rate > 0) {
            $(placeholder).find('.m28-gauge--bar' + (min_bar) + '').find('#m28-gauge--bar_fill').css({
                strokeDasharray: excess_rate.toString() + ' 9999',
                opacity: '1'
            });
        };

        $(placeholder).closest('.m28-gauge--wrapper').find('.m28-gauge--details-value').html(rawvalue);
        //$(placeholder).closest('.m28-gauge--wrapper').find('.m28-gauge--details-month').html(months[parseFloat(month) - 1]);
        //$(placeholder).closest('.m28-gauge--wrapper').find('.m28-gauge--details-year').html(year);

        if (/Edge\/|Trident\/|MSIE /.test(window.navigator.userAgent)) {
            $('[id=m28-gauge--bar_fill]').each(function() {
                var __this = this;
                
                setTimeout(function() {
                    $(__this).attr('class', 'm28-gauge--bar_fill');
                }, 125)
            });
        };

    };

    

    return gaugeDashboardComponent;

});

define( '../src/sublayouts/m29-chart/m29-chart',[ 'jquery', 'lib/utils', 'chart-config' ],
	function ( $, utils ) {

		'use strict';

		var Chart = function ( $component ) {

			this.$component = $component;
		};

		Chart.prototype.init = function () {

			var $container = this.$component.find( '[data-chart-container]' ),
				series = this.$component.data( 'series' ),
				yAxisTitleText = this.$component.data( 'y-axis-text' ),
				xAxisCategories = this.$component.data( 'x-axis-categories' ).split( ',' ),
				tooltipValueSuffix = this.$component.data( 'tooltip-value-suffix' ),
				isRTL = utils.isRTL(),
				usageFor = this.$component.data( 'usagefor'),
				legend = this.$component.data( 'legend'),
				label = this.$component.data( 'label'),
				labelstyle = this.$component.data( 'labelstyle' ),
				labelXAxisStep = parseInt(this.$component.data( 'step' ),10) || 1,
				labelXAxisStepMobile =  parseInt(this.$component.data( 'step-s' ),10) || 1,
				opts = {
					chart: {
						type: this.$component.data( 'graph-type' ) != undefined ? this.$component.data( 'graph-type' ) : 'line'
					},

					title: {
						text: ''
					},

					subtitle: {
						text: '',
						style: {
							display: 'none'
						}
					},

					legend: {
						enabled: false
					},

					plotOptions: {
						spline: {
							marker: {
								radius: 4,
								lineColor: '#666666',
								lineWidth: 1
							}
						},
						column: {
							dataLabels: {
								enabled: this.$component.data( 'graph-type' ) != undefined ? true : false,
								inside: true
							}
						}

					},
					xAxis: {
						reversed: isRTL,
						categories: xAxisCategories,
						labels:{
							autoRotation: false,
							staggerLines: labelXAxisStep
						}
					},
					yAxis: {
						visible: this.$component.data( 'graph-type' ) != undefined ? false : true,
						opposite: isRTL,
						title: {
							text: yAxisTitleText
						},
						plotLines: [ {
							value: 0,
							width: 1,
							color: '#808080'
	            } ]
					},
					tooltip: {
						enabled: this.$component.data( 'graph-type' ) != undefined ? false : true,
						headerFormat: '<span style="font-size: 12px;font-weight:bold;">' + usageFor + '</span><br><span style="color:{point.color}">\u25CF</span> {point.x} {series.name}: ',
						pointFormat: '<b>{point.y}</b>',
						valueSuffix: tooltipValueSuffix,
						crosshairs: true,
						useHTML: true
					},

					series: series
				};

			if (utils.breakpoint() === 's') {
				opts.xAxis.labels.staggerLines = labelXAxisStepMobile;
			}

			$container.highcharts( opts );

			this.$component.find('.m29-chart__legend--item').each(function () {
				$(this).find('.m29-chart__legend--item-icon').css('color', $(this).data('color'));
			});
		};

		return Chart;


	} );

;(function (window, $, undefined) { ;(function () {
    var VERSION = '2.2.3',
        pluginName = 'datepicker',
        autoInitSelector = '.datepicker-here',
        $body, $datepickersContainer,
        containerBuilt = false,
        baseTemplate = '' +
            '<div class="datepicker">' +
            '<i class="datepicker--pointer"></i>' +
            '<nav class="datepicker--nav"></nav>' +
            '<div class="datepicker--content"></div>' +
            '</div>',
        defaults = {
            classes: '',
            inline: false,
            language: 'ru',
            startDate: new Date(),
            firstDay: '',
            weekends: [6, 0],
            dateFormat: '',
            altField: '',
            altFieldDateFormat: '@',
            toggleSelected: true,
            keyboardNav: true,

            position: 'bottom left',
            offset: 12,

            view: 'days',
            minView: 'days',

            showOtherMonths: true,
            selectOtherMonths: true,
            moveToOtherMonthsOnSelect: true,

            showOtherYears: true,
            selectOtherYears: true,
            moveToOtherYearsOnSelect: true,

            minDate: '',
            maxDate: '',
            disableNavWhenOutOfRange: true,

            multipleDates: false, // Boolean or Number
            multipleDatesSeparator: ',',
            range: false,

            todayButton: false,
            clearButton: false,

            showEvent: 'focus',
            autoClose: false,

            // navigation
            monthsField: 'monthsShort',
            prevHtml: '<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',
            nextHtml: '<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',
            navTitles: {
                days: 'MM, <i>yyyy</i>',
                months: 'yyyy',
                years: 'yyyy1 - yyyy2'
            },

            // timepicker
            timepicker: false,
            onlyTimepicker: false,
            dateTimeSeparator: ' ',
            timeFormat: '',
            minHours: 0,
            maxHours: 24,
            minMinutes: 0,
            maxMinutes: 59,
            hoursStep: 1,
            minutesStep: 1,

            // events
            onSelect: '',
            onShow: '',
            onHide: '',
            onChangeMonth: '',
            onChangeYear: '',
            onChangeDecade: '',
            onChangeView: '',
            onRenderCell: ''
        },
        hotKeys = {
            'ctrlRight': [17, 39],
            'ctrlUp': [17, 38],
            'ctrlLeft': [17, 37],
            'ctrlDown': [17, 40],
            'shiftRight': [16, 39],
            'shiftUp': [16, 38],
            'shiftLeft': [16, 37],
            'shiftDown': [16, 40],
            'altUp': [18, 38],
            'altRight': [18, 39],
            'altLeft': [18, 37],
            'altDown': [18, 40],
            'ctrlShiftUp': [16, 17, 38]
        },
        datepicker;

    var Datepicker  = function (el, options) {
        this.el = el;
        this.$el = $(el);

        this.opts = $.extend(true, {}, defaults, options, this.$el.data());

        if ($body == undefined) {
            $body = $('body');
        }

        if (!this.opts.startDate) {
            this.opts.startDate = new Date();
        }

        if (this.el.nodeName == 'INPUT') {
            this.elIsInput = true;
        }

        if (this.opts.altField) {
            this.$altField = typeof this.opts.altField == 'string' ? $(this.opts.altField) : this.opts.altField;
        }

        this.inited = false;
        this.visible = false;
        this.silent = false; // Need to prevent unnecessary rendering

        this.currentDate = this.opts.startDate;
        this.currentView = this.opts.view;
        this._createShortCuts();
        this.selectedDates = [];
        this.views = {};
        this.keys = [];
        this.minRange = '';
        this.maxRange = '';
        this._prevOnSelectValue = '';

        this.init()
    };

    datepicker = Datepicker;

    datepicker.prototype = {
        VERSION: VERSION,
        viewIndexes: ['days', 'months', 'years'],

        init: function () {
            if (!containerBuilt && !this.opts.inline && this.elIsInput) {
                this._buildDatepickersContainer();
            }
            this._buildBaseHtml();
            this._defineLocale(this.opts.language);
            this._syncWithMinMaxDates();

            if (this.elIsInput) {
                if (!this.opts.inline) {
                    // Set extra classes for proper transitions
                    this._setPositionClasses(this.opts.position);
                    this._bindEvents()
                }
                if (this.opts.keyboardNav && !this.opts.onlyTimepicker) {
                    this._bindKeyboardEvents();
                }
                this.$datepicker.on('mousedown', this._onMouseDownDatepicker.bind(this));
                this.$datepicker.on('mouseup', this._onMouseUpDatepicker.bind(this));
            }

            if (this.opts.classes) {
                this.$datepicker.addClass(this.opts.classes)
            }

            if (this.opts.timepicker) {
                this.timepicker = new $.fn.datepicker.Timepicker(this, this.opts);
                this._bindTimepickerEvents();
            }

            if (this.opts.onlyTimepicker) {
                this.$datepicker.addClass('-only-timepicker-');
            }

            this.views[this.currentView] = new $.fn.datepicker.Body(this, this.currentView, this.opts);
            this.views[this.currentView].show();
            this.nav = new $.fn.datepicker.Navigation(this, this.opts);
            this.view = this.currentView;

            this.$el.on('clickCell.adp', this._onClickCell.bind(this));
            this.$datepicker.on('mouseenter', '.datepicker--cell', this._onMouseEnterCell.bind(this));
            this.$datepicker.on('mouseleave', '.datepicker--cell', this._onMouseLeaveCell.bind(this));

            this.inited = true;
        },

        _createShortCuts: function () {
            this.minDate = this.opts.minDate ? this.opts.minDate : new Date(-8639999913600000);
            this.maxDate = this.opts.maxDate ? this.opts.maxDate : new Date(8639999913600000);
        },

        _bindEvents : function () {
            this.$el.on(this.opts.showEvent + '.adp', this._onShowEvent.bind(this));
            this.$el.on('mouseup.adp', this._onMouseUpEl.bind(this));
            this.$el.on('blur.adp', this._onBlur.bind(this));
            this.$el.on('keyup.adp', this._onKeyUpGeneral.bind(this));
            $(window).on('resize.adp', this._onResize.bind(this));
            $('body').on('mouseup.adp', this._onMouseUpBody.bind(this));
        },

        _bindKeyboardEvents: function () {
            this.$el.on('keydown.adp', this._onKeyDown.bind(this));
            this.$el.on('keyup.adp', this._onKeyUp.bind(this));
            this.$el.on('hotKey.adp', this._onHotKey.bind(this));
        },

        _bindTimepickerEvents: function () {
            this.$el.on('timeChange.adp', this._onTimeChange.bind(this));
        },

        isWeekend: function (day) {
            return this.opts.weekends.indexOf(day) !== -1;
        },

        _defineLocale: function (lang) {
            if (typeof lang == 'string') {
                this.loc = $.fn.datepicker.language[lang];
                if (!this.loc) {
                    console.warn('Can\'t find language "' + lang + '" in Datepicker.language, will use "ru" instead');
                    this.loc = $.extend(true, {}, $.fn.datepicker.language.ru)
                }

                this.loc = $.extend(true, {}, $.fn.datepicker.language.ru, $.fn.datepicker.language[lang])
            } else {
                this.loc = $.extend(true, {}, $.fn.datepicker.language.ru, lang)
            }

            if (this.opts.dateFormat) {
                this.loc.dateFormat = this.opts.dateFormat
            }

            if (this.opts.timeFormat) {
                this.loc.timeFormat = this.opts.timeFormat
            }

            if (this.opts.firstDay !== '') {
                this.loc.firstDay = this.opts.firstDay
            }

            if (this.opts.timepicker) {
                this.loc.dateFormat = [this.loc.dateFormat, this.loc.timeFormat].join(this.opts.dateTimeSeparator);
            }

            if (this.opts.onlyTimepicker) {
                this.loc.dateFormat = this.loc.timeFormat;
            }

            var boundary = this._getWordBoundaryRegExp;
            if (this.loc.timeFormat.match(boundary('aa')) ||
                this.loc.timeFormat.match(boundary('AA'))
            ) {
               this.ampm = true;
            }
        },

        _buildDatepickersContainer: function () {
            containerBuilt = true;
            $body.append('<div class="datepickers-container" id="datepickers-container"></div>');
            $datepickersContainer = $('#datepickers-container');
        },

        _buildBaseHtml: function () {
            var $appendTarget,
                $inline = $('<div class="datepicker-inline">');

            if(this.el.nodeName == 'INPUT') {
                if (!this.opts.inline) {
                    $appendTarget = $datepickersContainer;
                } else {
                    $appendTarget = $inline.insertAfter(this.$el)
                }
            } else {
                $appendTarget = $inline.appendTo(this.$el)
            }

            this.$datepicker = $(baseTemplate).appendTo($appendTarget);
            this.$content = $('.datepicker--content', this.$datepicker);
            this.$nav = $('.datepicker--nav', this.$datepicker);
        },

        _triggerOnChange: function () {
            if (!this.selectedDates.length) {
                // Prevent from triggering multiple onSelect callback with same argument (empty string) in IE10-11
                if (this._prevOnSelectValue === '') return;
                this._prevOnSelectValue = '';
                return this.opts.onSelect('', '', this);
            }

            var selectedDates = this.selectedDates,
                parsedSelected = datepicker.getParsedDate(selectedDates[0]),
                formattedDates,
                _this = this,
                dates = new Date(
                    parsedSelected.year,
                    parsedSelected.month,
                    parsedSelected.date,
                    parsedSelected.hours,
                    parsedSelected.minutes
                );

                formattedDates = selectedDates.map(function (date) {
                    return _this.formatDate(_this.loc.dateFormat, date)
                }).join(this.opts.multipleDatesSeparator);

            // Create new dates array, to separate it from original selectedDates
            if (this.opts.multipleDates || this.opts.range) {
                dates = selectedDates.map(function(date) {
                    var parsedDate = datepicker.getParsedDate(date);
                    return new Date(
                        parsedDate.year,
                        parsedDate.month,
                        parsedDate.date,
                        parsedDate.hours,
                        parsedDate.minutes
                    );
                })
            }

            this._prevOnSelectValue = formattedDates;
            this.opts.onSelect(formattedDates, dates, this);
        },

        next: function () {
            var d = this.parsedDate,
                o = this.opts;
            switch (this.view) {
                case 'days':
                    this.date = new Date(d.year, d.month + 1, 1);
                    if (o.onChangeMonth) o.onChangeMonth(this.parsedDate.month, this.parsedDate.year);
                    break;
                case 'months':
                    this.date = new Date(d.year + 1, d.month, 1);
                    if (o.onChangeYear) o.onChangeYear(this.parsedDate.year);
                    break;
                case 'years':
                    this.date = new Date(d.year + 10, 0, 1);
                    if (o.onChangeDecade) o.onChangeDecade(this.curDecade);
                    break;
            }
        },

        prev: function () {
            var d = this.parsedDate,
                o = this.opts;
            switch (this.view) {
                case 'days':
                    this.date = new Date(d.year, d.month - 1, 1);
                    if (o.onChangeMonth) o.onChangeMonth(this.parsedDate.month, this.parsedDate.year);
                    break;
                case 'months':
                    this.date = new Date(d.year - 1, d.month, 1);
                    if (o.onChangeYear) o.onChangeYear(this.parsedDate.year);
                    break;
                case 'years':
                    this.date = new Date(d.year - 10, 0, 1);
                    if (o.onChangeDecade) o.onChangeDecade(this.curDecade);
                    break;
            }
        },

        formatDate: function (string, date) {
            date = date || this.date;
            var result = string,
                boundary = this._getWordBoundaryRegExp,
                locale = this.loc,
                leadingZero = datepicker.getLeadingZeroNum,
                decade = datepicker.getDecade(date),
                d = datepicker.getParsedDate(date),
                fullHours = d.fullHours,
                hours = d.hours,
                ampm = string.match(boundary('aa')) || string.match(boundary('AA')),
                dayPeriod = 'am',
                replacer = this._replacer,
                validHours;

            if (this.opts.timepicker && this.timepicker && ampm) {
                validHours = this.timepicker._getValidHoursFromDate(date, ampm);
                fullHours = leadingZero(validHours.hours);
                hours = validHours.hours;
                dayPeriod = validHours.dayPeriod;
            }

            switch (true) {
                case /@/.test(result):
                    result = result.replace(/@/, date.getTime());
                case /aa/.test(result):
                    result = replacer(result, boundary('aa'), dayPeriod);
                case /AA/.test(result):
                    result = replacer(result, boundary('AA'), dayPeriod.toUpperCase());
                case /dd/.test(result):
                    result = replacer(result, boundary('dd'), d.fullDate);
                case /d/.test(result):
                    result = replacer(result, boundary('d'), d.date);
                case /DD/.test(result):
                    result = replacer(result, boundary('DD'), locale.days[d.day]);
                case /D/.test(result):
                    result = replacer(result, boundary('D'), locale.daysShort[d.day]);
                case /mm/.test(result):
                    result = replacer(result, boundary('mm'), d.fullMonth);
                case /m/.test(result):
                    result = replacer(result, boundary('m'), d.month + 1);
                case /MM/.test(result):
                    result = replacer(result, boundary('MM'), this.loc.months[d.month]);
                case /M/.test(result):
                    result = replacer(result, boundary('M'), locale.monthsShort[d.month]);
                case /ii/.test(result):
                    result = replacer(result, boundary('ii'), d.fullMinutes);
                case /i/.test(result):
                    result = replacer(result, boundary('i'), d.minutes);
                case /hh/.test(result):
                    result = replacer(result, boundary('hh'), fullHours);
                case /h/.test(result):
                    result = replacer(result, boundary('h'), hours);
                case /yyyy/.test(result):
                    result = replacer(result, boundary('yyyy'), d.year);
                case /yyyy1/.test(result):
                    result = replacer(result, boundary('yyyy1'), decade[0]);
                case /yyyy2/.test(result):
                    result = replacer(result, boundary('yyyy2'), decade[1]);
                case /yy/.test(result):
                    result = replacer(result, boundary('yy'), d.year.toString().slice(-2));
            }

            return result;
        },

        _replacer: function (str, reg, data) {
            return str.replace(reg, function (match, p1,p2,p3) {
                return p1 + data + p3;
            })
        },

        _getWordBoundaryRegExp: function (sign) {
            var symbols = '\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;';

            return new RegExp('(^|>|' + symbols + ')(' + sign + ')($|<|' + symbols + ')', 'g');
        },


        selectDate: function (date) {
            var _this = this,
                opts = _this.opts,
                d = _this.parsedDate,
                selectedDates = _this.selectedDates,
                len = selectedDates.length,
                newDate = '';

            if (Array.isArray(date)) {
                date.forEach(function (d) {
                    _this.selectDate(d)
                });
                return;
            }

            if (!(date instanceof Date)) return;

            this.lastSelectedDate = date;

            // Set new time values from Date
            if (this.timepicker) {
                this.timepicker._setTime(date);
            }

            // On this step timepicker will set valid values in it's instance
            _this._trigger('selectDate', date);

            // Set correct time values after timepicker's validation
            // Prevent from setting hours or minutes which values are lesser then `min` value or
            // greater then `max` value
            if (this.timepicker) {
                date.setHours(this.timepicker.hours);
                date.setMinutes(this.timepicker.minutes)
            }

            if (_this.view == 'days') {
                if (date.getMonth() != d.month && opts.moveToOtherMonthsOnSelect) {
                    newDate = new Date(date.getFullYear(), date.getMonth(), 1);
                }
            }

            if (_this.view == 'years') {
                if (date.getFullYear() != d.year && opts.moveToOtherYearsOnSelect) {
                    newDate = new Date(date.getFullYear(), 0, 1);
                }
            }

            if (newDate) {
                _this.silent = true;
                _this.date = newDate;
                _this.silent = false;
                _this.nav._render()
            }

            if (opts.multipleDates && !opts.range) { // Set priority to range functionality
                if (len === opts.multipleDates) return;
                if (!_this._isSelected(date)) {
                    _this.selectedDates.push(date);
                }
            } else if (opts.range) {
                if (len == 2) {
                    _this.selectedDates = [date];
                    _this.minRange = date;
                    _this.maxRange = '';
                } else if (len == 1) {
                    _this.selectedDates.push(date);
                    if (!_this.maxRange){
                        _this.maxRange = date;
                    } else {
                        _this.minRange = date;
                    }
                    // Swap dates if they were selected via dp.selectDate() and second date was smaller then first
                    if (datepicker.bigger(_this.maxRange, _this.minRange)) {
                        _this.maxRange = _this.minRange;
                        _this.minRange = date;
                    }
                    _this.selectedDates = [_this.minRange, _this.maxRange]

                } else {
                    _this.selectedDates = [date];
                    _this.minRange = date;
                }
            } else {
                _this.selectedDates = [date];
            }

            _this._setInputValue();

            if (opts.onSelect) {
                _this._triggerOnChange();
            }

            if (opts.autoClose && !this.timepickerIsActive) {
                if (!opts.multipleDates && !opts.range) {
                    _this.hide();
                } else if (opts.range && _this.selectedDates.length == 2) {
                    _this.hide();
                }
            }

            _this.views[this.currentView]._render()
        },

        removeDate: function (date) {
            var selected = this.selectedDates,
                _this = this;

            if (!(date instanceof Date)) return;

            return selected.some(function (curDate, i) {
                if (datepicker.isSame(curDate, date)) {
                    selected.splice(i, 1);

                    if (!_this.selectedDates.length) {
                        _this.minRange = '';
                        _this.maxRange = '';
                        _this.lastSelectedDate = '';
                    } else {
                        _this.lastSelectedDate = _this.selectedDates[_this.selectedDates.length - 1];
                    }

                    _this.views[_this.currentView]._render();
                    _this._setInputValue();

                    if (_this.opts.onSelect) {
                        _this._triggerOnChange();
                    }

                    return true
                }
            })
        },

        today: function () {
            this.silent = true;
            this.view = this.opts.minView;
            this.silent = false;
            this.date = new Date();

            if (this.opts.todayButton instanceof Date) {
                this.selectDate(this.opts.todayButton)
            }
        },

        clear: function () {
            this.selectedDates = [];
            this.minRange = '';
            this.maxRange = '';
            this.views[this.currentView]._render();
            this._setInputValue();
            if (this.opts.onSelect) {
                this._triggerOnChange()
            }
        },

        /**
         * Updates datepicker options
         * @param {String|Object} param - parameter's name to update. If object then it will extend current options
         * @param {String|Number|Object} [value] - new param value
         */
        update: function (param, value) {
            var len = arguments.length,
                lastSelectedDate = this.lastSelectedDate;

            if (len == 2) {
                this.opts[param] = value;
            } else if (len == 1 && typeof param == 'object') {
                this.opts = $.extend(true, this.opts, param)
            }

            this._createShortCuts();
            this._syncWithMinMaxDates();
            this._defineLocale(this.opts.language);
            this.nav._addButtonsIfNeed();
            if (!this.opts.onlyTimepicker) this.nav._render();
            this.views[this.currentView]._render();

            if (this.elIsInput && !this.opts.inline) {
                this._setPositionClasses(this.opts.position);
                if (this.visible) {
                    this.setPosition(this.opts.position)
                }
            }

            if (this.opts.classes) {
                this.$datepicker.addClass(this.opts.classes)
            }

            if (this.opts.onlyTimepicker) {
                this.$datepicker.addClass('-only-timepicker-');
            }

            if (this.opts.timepicker) {
                if (lastSelectedDate) this.timepicker._handleDate(lastSelectedDate);
                this.timepicker._updateRanges();
                this.timepicker._updateCurrentTime();
                // Change hours and minutes if it's values have been changed through min/max hours/minutes
                if (lastSelectedDate) {
                    lastSelectedDate.setHours(this.timepicker.hours);
                    lastSelectedDate.setMinutes(this.timepicker.minutes);
                }
            }

            this._setInputValue();

            return this;
        },

        _syncWithMinMaxDates: function () {
            var curTime = this.date.getTime();
            this.silent = true;
            if (this.minTime > curTime) {
                this.date = this.minDate;
            }

            if (this.maxTime < curTime) {
                this.date = this.maxDate;
            }
            this.silent = false;
        },

        _isSelected: function (checkDate, cellType) {
            var res = false;
            this.selectedDates.some(function (date) {
                if (datepicker.isSame(date, checkDate, cellType)) {
                    res = date;
                    return true;
                }
            });
            return res;
        },

        _setInputValue: function () {
            var _this = this,
                opts = _this.opts,
                format = _this.loc.dateFormat,
                altFormat = opts.altFieldDateFormat,
                value = _this.selectedDates.map(function (date) {
                    return _this.formatDate(format, date)
                }),
                altValues;

            if (opts.altField && _this.$altField.length) {
                altValues = this.selectedDates.map(function (date) {
                    return _this.formatDate(altFormat, date)
                });
                altValues = altValues.join(this.opts.multipleDatesSeparator);
                this.$altField.val(altValues);
            }

            value = value.join(this.opts.multipleDatesSeparator);

            this.$el.val(value)
        },

        /**
         * Check if date is between minDate and maxDate
         * @param date {object} - date object
         * @param type {string} - cell type
         * @returns {boolean}
         * @private
         */
        _isInRange: function (date, type) {
            var time = date.getTime(),
                d = datepicker.getParsedDate(date),
                min = datepicker.getParsedDate(this.minDate),
                max = datepicker.getParsedDate(this.maxDate),
                dMinTime = new Date(d.year, d.month, min.date).getTime(),
                dMaxTime = new Date(d.year, d.month, max.date).getTime(),
                types = {
                    day: time >= this.minTime && time <= this.maxTime,
                    month: dMinTime >= this.minTime && dMaxTime <= this.maxTime,
                    year: d.year >= min.year && d.year <= max.year
                };
            return type ? types[type] : types.day
        },

        _getDimensions: function ($el) {
            var offset = $el.offset();

            return {
                width: $el.outerWidth(),
                height: $el.outerHeight(),
                left: offset.left,
                top: offset.top
            }
        },

        _getDateFromCell: function (cell) {
            var curDate = this.parsedDate,
                year = cell.data('year') || curDate.year,
                month = cell.data('month') == undefined ? curDate.month : cell.data('month'),
                date = cell.data('date') || 1;

            return new Date(year, month, date);
        },

        _setPositionClasses: function (pos) {
            pos = pos.split(' ');
            var main = pos[0],
                sec = pos[1],
                classes = 'datepicker -' + main + '-' + sec + '- -from-' + main + '-';

            if (this.visible) classes += ' active';

            this.$datepicker
                .removeAttr('class')
                .addClass(classes);
        },

        setPosition: function (position) {
            position = position || this.opts.position;

            var dims = this._getDimensions(this.$el),
                selfDims = this._getDimensions(this.$datepicker),
                pos = position.split(' '),
                top, left,
                offset = this.opts.offset,
                main = pos[0],
                secondary = pos[1];

            switch (main) {
                case 'top':
                    top = dims.top - selfDims.height - offset;
                    break;
                case 'right':
                    left = dims.left + dims.width + offset;
                    break;
                case 'bottom':
                    top = dims.top + dims.height + offset;
                    break;
                case 'left':
                    left = dims.left - selfDims.width - offset;
                    break;
            }

            switch(secondary) {
                case 'top':
                    top = dims.top;
                    break;
                case 'right':
                    left = dims.left + dims.width - selfDims.width;
                    break;
                case 'bottom':
                    top = dims.top + dims.height - selfDims.height;
                    break;
                case 'left':
                    left = dims.left;
                    break;
                case 'center':
                    if (/left|right/.test(main)) {
                        top = dims.top + dims.height/2 - selfDims.height/2;
                    } else {
                        left = dims.left + dims.width/2 - selfDims.width/2;
                    }
            }
            if ( $('html').attr('dir') == 'rtl' ) {
                this.$datepicker
                    .css({
                        left: left,
                        top: top,
                        right: 'auto'
                    })
            } else {
                this.$datepicker
                    .css({
                        left: left,
                        top: top
                    })   
            }
        },

        show: function () {
            var onShow = this.opts.onShow;

            this.setPosition(this.opts.position);
            this.$datepicker.addClass('active');
            this.visible = true;

            if (onShow) {
                this._bindVisionEvents(onShow)
            }
        },

        hide: function () {
            var onHide = this.opts.onHide;

            if ( $('html').attr('dir') == 'rtl' ) {
            this.$datepicker
                .removeClass('active')
                .css({
                    right: '-100000px'
                });
            } else {
            this.$datepicker
                .removeClass('active')
                .css({
                    left: '-100000px'
                });
            }

            this.focused = '';
            this.keys = [];

            this.inFocus = false;
            this.visible = false;
            this.$el.blur();

            if (onHide) {
                this._bindVisionEvents(onHide)
            }
        },

        down: function (date) {
            this._changeView(date, 'down');
        },

        up: function (date) {
            this._changeView(date, 'up');
        },

        _bindVisionEvents: function (event) {
            this.$datepicker.off('transitionend.dp');
            event(this, false);
            this.$datepicker.one('transitionend.dp', event.bind(this, this, true))
        },

        _changeView: function (date, dir) {
            date = date || this.focused || this.date;

            var nextView = dir == 'up' ? this.viewIndex + 1 : this.viewIndex - 1;
            if (nextView > 2) nextView = 2;
            if (nextView < 0) nextView = 0;

            this.silent = true;
            this.date = new Date(date.getFullYear(), date.getMonth(), 1);
            this.silent = false;
            this.view = this.viewIndexes[nextView];

        },

        _handleHotKey: function (key) {
            var date = datepicker.getParsedDate(this._getFocusedDate()),
                focusedParsed,
                o = this.opts,
                newDate,
                totalDaysInNextMonth,
                monthChanged = false,
                yearChanged = false,
                decadeChanged = false,
                y = date.year,
                m = date.month,
                d = date.date;

            switch (key) {
                case 'ctrlRight':
                case 'ctrlUp':
                    m += 1;
                    monthChanged = true;
                    break;
                case 'ctrlLeft':
                case 'ctrlDown':
                    m -= 1;
                    monthChanged = true;
                    break;
                case 'shiftRight':
                case 'shiftUp':
                    yearChanged = true;
                    y += 1;
                    break;
                case 'shiftLeft':
                case 'shiftDown':
                    yearChanged = true;
                    y -= 1;
                    break;
                case 'altRight':
                case 'altUp':
                    decadeChanged = true;
                    y += 10;
                    break;
                case 'altLeft':
                case 'altDown':
                    decadeChanged = true;
                    y -= 10;
                    break;
                case 'ctrlShiftUp':
                    this.up();
                    break;
            }

            totalDaysInNextMonth = datepicker.getDaysCount(new Date(y,m));
            newDate = new Date(y,m,d);

            // If next month has less days than current, set date to total days in that month
            if (totalDaysInNextMonth < d) d = totalDaysInNextMonth;

            // Check if newDate is in valid range
            if (newDate.getTime() < this.minTime) {
                newDate = this.minDate;
            } else if (newDate.getTime() > this.maxTime) {
                newDate = this.maxDate;
            }

            this.focused = newDate;

            focusedParsed = datepicker.getParsedDate(newDate);
            if (monthChanged && o.onChangeMonth) {
                o.onChangeMonth(focusedParsed.month, focusedParsed.year)
            }
            if (yearChanged && o.onChangeYear) {
                o.onChangeYear(focusedParsed.year)
            }
            if (decadeChanged && o.onChangeDecade) {
                o.onChangeDecade(this.curDecade)
            }
        },

        _registerKey: function (key) {
            var exists = this.keys.some(function (curKey) {
                return curKey == key;
            });

            if (!exists) {
                this.keys.push(key)
            }
        },

        _unRegisterKey: function (key) {
            var index = this.keys.indexOf(key);

            this.keys.splice(index, 1);
        },

        _isHotKeyPressed: function () {
            var currentHotKey,
                found = false,
                _this = this,
                pressedKeys = this.keys.sort();

            for (var hotKey in hotKeys) {
                currentHotKey = hotKeys[hotKey];
                if (pressedKeys.length != currentHotKey.length) continue;

                if (currentHotKey.every(function (key, i) { return key == pressedKeys[i]})) {
                    _this._trigger('hotKey', hotKey);
                    found = true;
                }
            }

            return found;
        },

        _trigger: function (event, args) {
            this.$el.trigger(event, args)
        },

        _focusNextCell: function (keyCode, type) {
            type = type || this.cellType;

            var date = datepicker.getParsedDate(this._getFocusedDate()),
                y = date.year,
                m = date.month,
                d = date.date;

            if (this._isHotKeyPressed()){
                return;
            }

            switch(keyCode) {
                case 37: // left
                    type == 'day' ? (d -= 1) : '';
                    type == 'month' ? (m -= 1) : '';
                    type == 'year' ? (y -= 1) : '';
                    break;
                case 38: // up
                    type == 'day' ? (d -= 7) : '';
                    type == 'month' ? (m -= 3) : '';
                    type == 'year' ? (y -= 4) : '';
                    break;
                case 39: // right
                    type == 'day' ? (d += 1) : '';
                    type == 'month' ? (m += 1) : '';
                    type == 'year' ? (y += 1) : '';
                    break;
                case 40: // down
                    type == 'day' ? (d += 7) : '';
                    type == 'month' ? (m += 3) : '';
                    type == 'year' ? (y += 4) : '';
                    break;
            }

            var nd = new Date(y,m,d);
            if (nd.getTime() < this.minTime) {
                nd = this.minDate;
            } else if (nd.getTime() > this.maxTime) {
                nd = this.maxDate;
            }

            this.focused = nd;

        },

        _getFocusedDate: function () {
            var focused  = this.focused || this.selectedDates[this.selectedDates.length - 1],
                d = this.parsedDate;

            if (!focused) {
                switch (this.view) {
                    case 'days':
                        focused = new Date(d.year, d.month, new Date().getDate());
                        break;
                    case 'months':
                        focused = new Date(d.year, d.month, 1);
                        break;
                    case 'years':
                        focused = new Date(d.year, 0, 1);
                        break;
                }
            }

            return focused;
        },

        _getCell: function (date, type) {
            type = type || this.cellType;

            var d = datepicker.getParsedDate(date),
                selector = '.datepicker--cell[data-year="' + d.year + '"]',
                $cell;

            switch (type) {
                case 'month':
                    selector = '[data-month="' + d.month + '"]';
                    break;
                case 'day':
                    selector += '[data-month="' + d.month + '"][data-date="' + d.date + '"]';
                    break;
            }
            $cell = this.views[this.currentView].$el.find(selector);

            return $cell.length ? $cell : $('');
        },

        destroy: function () {
            var _this = this;
            _this.$el
                .off('.adp')
                .data('datepicker', '');

            _this.selectedDates = [];
            _this.focused = '';
            _this.views = {};
            _this.keys = [];
            _this.minRange = '';
            _this.maxRange = '';

            if (_this.opts.inline || !_this.elIsInput) {
                _this.$datepicker.closest('.datepicker-inline').remove();
            } else {
                _this.$datepicker.remove();
            }
        },

        _handleAlreadySelectedDates: function (alreadySelected, selectedDate) {
            if (this.opts.range) {
                if (!this.opts.toggleSelected) {
                    // Add possibility to select same date when range is true
                    if (this.selectedDates.length != 2) {
                        this._trigger('clickCell', selectedDate);
                    }
                } else {
                    this.removeDate(selectedDate);
                }
            } else if (this.opts.toggleSelected){
                this.removeDate(selectedDate);
            }

            // Change last selected date to be able to change time when clicking on this cell
            if (!this.opts.toggleSelected) {
                this.lastSelectedDate = alreadySelected;
                if (this.opts.timepicker) {
                    this.timepicker._setTime(alreadySelected);
                    this.timepicker.update();
                }
            }
        },

        _onShowEvent: function (e) {
            if (!this.visible) {
                this.show();
            }
        },

        _onBlur: function () {
            if (!this.inFocus && this.visible) {
                this.hide();
            }
        },

        _onMouseDownDatepicker: function (e) {
            this.inFocus = true;
        },

        _onMouseUpDatepicker: function (e) {
            this.inFocus = false;
            e.originalEvent.inFocus = true;
            if (!e.originalEvent.timepickerFocus) this.$el.focus();
        },

        _onKeyUpGeneral: function (e) {
            var val = this.$el.val();

            if (!val) {
                this.clear();
            }
        },

        _onResize: function () {
            if (this.visible) {
                this.setPosition();
            }
        },

        _onMouseUpBody: function (e) {
            if (e.originalEvent.inFocus) return;

            if (this.visible && !this.inFocus) {
                this.hide();
            }
        },

        _onMouseUpEl: function (e) {
            e.originalEvent.inFocus = true;
            setTimeout(this._onKeyUpGeneral.bind(this),4);
        },

        _onKeyDown: function (e) {
            var code = e.which;
            this._registerKey(code);

            // Arrows
            if (code >= 37 && code <= 40) {
                e.preventDefault();
                this._focusNextCell(code);
            }

            // Enter
            if (code == 13) {
                if (this.focused) {
                    if (this._getCell(this.focused).hasClass('-disabled-')) return;
                    if (this.view != this.opts.minView) {
                        this.down()
                    } else {
                        var alreadySelected = this._isSelected(this.focused, this.cellType);

                        if (!alreadySelected) {
                            if (this.timepicker) {
                                this.focused.setHours(this.timepicker.hours);
                                this.focused.setMinutes(this.timepicker.minutes);
                            }
                            this.selectDate(this.focused);
                            return;
                        }
                        this._handleAlreadySelectedDates(alreadySelected, this.focused)
                    }
                }
            }

            // Esc
            if (code == 27) {
                this.hide();
            }
        },

        _onKeyUp: function (e) {
            var code = e.which;
            this._unRegisterKey(code);
        },

        _onHotKey: function (e, hotKey) {
            this._handleHotKey(hotKey);
        },

        _onMouseEnterCell: function (e) {
            var $cell = $(e.target).closest('.datepicker--cell'),
                date = this._getDateFromCell($cell);

            // Prevent from unnecessary rendering and setting new currentDate
            this.silent = true;

            if (this.focused) {
                this.focused = ''
            }

            $cell.addClass('-focus-');

            this.focused = date;
            this.silent = false;

            if (this.opts.range && this.selectedDates.length == 1) {
                this.minRange = this.selectedDates[0];
                this.maxRange = '';
                if (datepicker.less(this.minRange, this.focused)) {
                    this.maxRange = this.minRange;
                    this.minRange = '';
                }
                this.views[this.currentView]._update();
            }
        },

        _onMouseLeaveCell: function (e) {
            var $cell = $(e.target).closest('.datepicker--cell');

            $cell.removeClass('-focus-');

            this.silent = true;
            this.focused = '';
            this.silent = false;
        },

        _onTimeChange: function (e, h, m) {
            var date = new Date(),
                selectedDates = this.selectedDates,
                selected = false;

            if (selectedDates.length) {
                selected = true;
                date = this.lastSelectedDate;
            }

            date.setHours(h);
            date.setMinutes(m);

            if (!selected && !this._getCell(date).hasClass('-disabled-')) {
                this.selectDate(date);
            } else {
                this._setInputValue();
                if (this.opts.onSelect) {
                    this._triggerOnChange();
                }
            }
        },

        _onClickCell: function (e, date) {
            if (this.timepicker) {
                date.setHours(this.timepicker.hours);
                date.setMinutes(this.timepicker.minutes);
            }
            this.selectDate(date);
        },

        set focused(val) {
            if (!val && this.focused) {
                var $cell = this._getCell(this.focused);

                if ($cell.length) {
                    $cell.removeClass('-focus-')
                }
            }
            this._focused = val;
            if (this.opts.range && this.selectedDates.length == 1) {
                this.minRange = this.selectedDates[0];
                this.maxRange = '';
                if (datepicker.less(this.minRange, this._focused)) {
                    this.maxRange = this.minRange;
                    this.minRange = '';
                }
            }
            if (this.silent) return;
            this.date = val;
        },

        get focused() {
            return this._focused;
        },

        get parsedDate() {
            return datepicker.getParsedDate(this.date);
        },

        set date (val) {
            if (!(val instanceof Date)) return;

            this.currentDate = val;

            if (this.inited && !this.silent) {
                this.views[this.view]._render();
                this.nav._render();
                if (this.visible && this.elIsInput) {
                    this.setPosition();
                }
            }
            return val;
        },

        get date () {
            return this.currentDate
        },

        set view (val) {
            this.viewIndex = this.viewIndexes.indexOf(val);

            if (this.viewIndex < 0) {
                return;
            }

            this.prevView = this.currentView;
            this.currentView = val;

            if (this.inited) {
                if (!this.views[val]) {
                    this.views[val] = new  $.fn.datepicker.Body(this, val, this.opts)
                } else {
                    this.views[val]._render();
                }

                this.views[this.prevView].hide();
                this.views[val].show();
                this.nav._render();

                if (this.opts.onChangeView) {
                    this.opts.onChangeView(val)
                }
                if (this.elIsInput && this.visible) this.setPosition();
            }

            return val
        },

        get view() {
            return this.currentView;
        },

        get cellType() {
            return this.view.substring(0, this.view.length - 1)
        },

        get minTime() {
            var min = datepicker.getParsedDate(this.minDate);
            return new Date(min.year, min.month, min.date).getTime()
        },

        get maxTime() {
            var max = datepicker.getParsedDate(this.maxDate);
            return new Date(max.year, max.month, max.date).getTime()
        },

        get curDecade() {
            return datepicker.getDecade(this.date)
        }
    };

    //  Utils
    // -------------------------------------------------

    datepicker.getDaysCount = function (date) {
        return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
    };

    datepicker.getParsedDate = function (date) {
        return {
            year: date.getFullYear(),
            month: date.getMonth(),
            fullMonth: (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1, // One based
            date: date.getDate(),
            fullDate: date.getDate() < 10 ? '0' + date.getDate() : date.getDate(),
            day: date.getDay(),
            hours: date.getHours(),
            fullHours:  date.getHours() < 10 ? '0' + date.getHours() :  date.getHours() ,
            minutes: date.getMinutes(),
            fullMinutes:  date.getMinutes() < 10 ? '0' + date.getMinutes() :  date.getMinutes()
        }
    };

    datepicker.getDecade = function (date) {
        var firstYear = Math.floor(date.getFullYear() / 10) * 10;

        return [firstYear, firstYear + 9];
    };

    datepicker.template = function (str, data) {
        return str.replace(/#\{([\w]+)\}/g, function (source, match) {
            if (data[match] || data[match] === 0) {
                return data[match]
            }
        });
    };

    datepicker.isSame = function (date1, date2, type) {
        if (!date1 || !date2) return false;
        var d1 = datepicker.getParsedDate(date1),
            d2 = datepicker.getParsedDate(date2),
            _type = type ? type : 'day',

            conditions = {
                day: d1.date == d2.date && d1.month == d2.month && d1.year == d2.year,
                month: d1.month == d2.month && d1.year == d2.year,
                year: d1.year == d2.year
            };

        return conditions[_type];
    };

    datepicker.less = function (dateCompareTo, date, type) {
        if (!dateCompareTo || !date) return false;
        return date.getTime() < dateCompareTo.getTime();
    };

    datepicker.bigger = function (dateCompareTo, date, type) {
        if (!dateCompareTo || !date) return false;
        return date.getTime() > dateCompareTo.getTime();
    };

    datepicker.getLeadingZeroNum = function (num) {
        return parseInt(num) < 10 ? '0' + num : num;
    };

    /**
     * Returns copy of date with hours and minutes equals to 0
     * @param date {Date}
     */
    datepicker.resetTime = function (date) {
        if (typeof date != 'object') return;
        date = datepicker.getParsedDate(date);
        return new Date(date.year, date.month, date.date)
    };

    $.fn.datepicker = function ( options ) {
        return this.each(function () {
            if (!$.data(this, pluginName)) {
                $.data(this,  pluginName,
                    new Datepicker( this, options ));
            } else {
                var _this = $.data(this, pluginName);

                _this.opts = $.extend(true, _this.opts, options);
                _this.update();
            }
        });
    };

    $.fn.datepicker.Constructor = Datepicker;

    $.fn.datepicker.language = {
        ru: {
            days: ['Ð’Ð¾ÑÐºÑ€ÐµÑÐµÐ½ÑŒÐµ', 'ÐŸÐ¾Ð½ÐµÐ´ÐµÐ»ÑŒÐ½Ð¸Ðº', 'Ð’Ñ‚Ð¾Ñ€Ð½Ð¸Ðº', 'Ð¡Ñ€ÐµÐ´Ð°', 'Ð§ÐµÑ‚Ð²ÐµÑ€Ð³', 'ÐŸÑÑ‚Ð½Ð¸Ñ†Ð°', 'Ð¡ÑƒÐ±Ð±Ð¾Ñ‚Ð°'],
            daysShort: ['Ð’Ð¾Ñ','ÐŸÐ¾Ð½','Ð’Ñ‚Ð¾','Ð¡Ñ€Ðµ','Ð§ÐµÑ‚','ÐŸÑÑ‚','Ð¡ÑƒÐ±'],
            daysMin: ['Ð’Ñ','ÐŸÐ½','Ð’Ñ‚','Ð¡Ñ€','Ð§Ñ‚','ÐŸÑ‚','Ð¡Ð±'],
            months: ['Ð¯Ð½Ð²Ð°Ñ€ÑŒ', 'Ð¤ÐµÐ²Ñ€Ð°Ð»ÑŒ', 'ÐœÐ°Ñ€Ñ‚', 'ÐÐ¿Ñ€ÐµÐ»ÑŒ', 'ÐœÐ°Ð¹', 'Ð˜ÑŽÐ½ÑŒ', 'Ð˜ÑŽÐ»ÑŒ', 'ÐÐ²Ð³ÑƒÑÑ‚', 'Ð¡ÐµÐ½Ñ‚ÑÐ±Ñ€ÑŒ', 'ÐžÐºÑ‚ÑÐ±Ñ€ÑŒ', 'ÐÐ¾ÑÐ±Ñ€ÑŒ', 'Ð”ÐµÐºÐ°Ð±Ñ€ÑŒ'],
            monthsShort: ['Ð¯Ð½Ð²', 'Ð¤ÐµÐ²', 'ÐœÐ°Ñ€', 'ÐÐ¿Ñ€', 'ÐœÐ°Ð¹', 'Ð˜ÑŽÐ½', 'Ð˜ÑŽÐ»', 'ÐÐ²Ð³', 'Ð¡ÐµÐ½', 'ÐžÐºÑ‚', 'ÐÐ¾Ñ', 'Ð”ÐµÐº'],
            today: 'Ð¡ÐµÐ³Ð¾Ð´Ð½Ñ',
            clear: 'ÐžÑ‡Ð¸ÑÑ‚Ð¸Ñ‚ÑŒ',
            dateFormat: 'dd.mm.yyyy',
            timeFormat: 'hh:ii',
            firstDay: 1
        },
        en: {
            days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
            daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
            daysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
            months: ['January','February','March','April','May','June', 'July','August','September','October','November','December'],
            monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
            today: 'Today',
            clear: 'Clear',
            dateFormat: 'mm/dd/yyyy',
            timeFormat: 'hh:ii aa',
            firstDay: 0
        },
        ar: {
            days: ['Ø§Ù„Ø£Ø­Ø¯', 'Ø§Ù„Ø¥Ø«Ù†ÙŠÙ†', 'Ø§Ù„Ø«Ù„Ø§Ø«Ø§Ø¡', 'Ø§Ù„Ø£Ø±Ø¨Ø¹Ø§Ø¡', 'Ø§Ù„Ø®Ù…ÙŠØ³', 'Ø§Ù„Ø¬Ù…Ø¹Ø©', 'Ø§Ù„Ø³Ø¨Øª'],
            daysShort: ['Ø§Ù„Ø£Ø­Ø¯', 'Ø§Ù„Ø¥Ø«Ù†ÙŠÙ†', 'Ø§Ù„Ø«Ù„Ø§Ø«Ø§Ø¡', 'Ø§Ù„Ø£Ø±Ø¨Ø¹Ø§Ø¡', 'Ø§Ù„Ø®Ù…ÙŠØ³', 'Ø§Ù„Ø¬Ù…Ø¹Ø©', 'Ø§Ù„Ø³Ø¨Øª'],
            daysMin: ['Ø§Ù„Ø£Ø­Ø¯', 'Ø§Ù„Ø¥Ø«Ù†ÙŠÙ†', 'Ø§Ù„Ø«Ù„Ø§Ø«Ø§Ø¡', 'Ø§Ù„Ø£Ø±Ø¨Ø¹Ø§Ø¡', 'Ø§Ù„Ø®Ù…ÙŠØ³', 'Ø§Ù„Ø¬Ù…Ø¹Ø©', 'Ø§Ù„Ø³Ø¨Øª'],
            months: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
            monthsShort: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
            today: 'Ø§Ù„ÙŠÙˆÙ…',
            clear: 'Ù…Ø³Ø­',
            dateFormat: 'dd.mm.yyyy',
            timeFormat: 'hh:ii',
            firstDay: 1
        }
    };

    $(function () {
        $(autoInitSelector).datepicker();
    })

})();

;(function () {
    var templates = {
        days:'' +
        '<div class="datepicker--days datepicker--body">' +
        '<div class="datepicker--days-names"></div>' +
        '<div class="datepicker--cells datepicker--cells-days"></div>' +
        '</div>',
        months: '' +
        '<div class="datepicker--months datepicker--body">' +
        '<div class="datepicker--cells datepicker--cells-months"></div>' +
        '</div>',
        years: '' +
        '<div class="datepicker--years datepicker--body">' +
        '<div class="datepicker--cells datepicker--cells-years"></div>' +
        '</div>'
        },
        datepicker = $.fn.datepicker,
        dp = datepicker.Constructor;

    datepicker.Body = function (d, type, opts) {
        this.d = d;
        this.type = type;
        this.opts = opts;
        this.$el = $('');

        if (this.opts.onlyTimepicker) return;
        this.init();
    };

    datepicker.Body.prototype = {
        init: function () {
            this._buildBaseHtml();
            this._render();

            this._bindEvents();
        },

        _bindEvents: function () {
            this.$el.on('click', '.datepicker--cell', $.proxy(this._onClickCell, this));
        },

        _buildBaseHtml: function () {
            this.$el = $(templates[this.type]).appendTo(this.d.$content);
            this.$names = $('.datepicker--days-names', this.$el);
            this.$cells = $('.datepicker--cells', this.$el);
        },

        _getDayNamesHtml: function (firstDay, curDay, html, i) {
            curDay = curDay != undefined ? curDay : firstDay;
            html = html ? html : '';
            i = i != undefined ? i : 0;

            if (i > 7) return html;
            if (curDay == 7) return this._getDayNamesHtml(firstDay, 0, html, ++i);

            html += '<div class="datepicker--day-name' + (this.d.isWeekend(curDay) ? " -weekend-" : "") + '">' + this.d.loc.daysMin[curDay] + '</div>';

            return this._getDayNamesHtml(firstDay, ++curDay, html, ++i);
        },

        _getCellContents: function (date, type) {
            var classes = "datepicker--cell datepicker--cell-" + type,
                currentDate = new Date(),
                parent = this.d,
                minRange = dp.resetTime(parent.minRange),
                maxRange = dp.resetTime(parent.maxRange),
                opts = parent.opts,
                d = dp.getParsedDate(date),
                render = {},
                html = d.date;

            switch (type) {
                case 'day':
                    if (parent.isWeekend(d.day)) classes += " -weekend-";
                    if (d.month != this.d.parsedDate.month) {
                        classes += " -other-month-";
                        if (!opts.selectOtherMonths) {
                            classes += " -disabled-";
                        }
                        if (!opts.showOtherMonths) html = '';
                    }
                    break;
                case 'month':
                    html = parent.loc[parent.opts.monthsField][d.month];
                    break;
                case 'year':
                    var decade = parent.curDecade;
                    html = d.year;
                    if (d.year < decade[0] || d.year > decade[1]) {
                        classes += ' -other-decade-';
                        if (!opts.selectOtherYears) {
                            classes += " -disabled-";
                        }
                        if (!opts.showOtherYears) html = '';
                    }
                    break;
            }

            if (opts.onRenderCell) {
                render = opts.onRenderCell(date, type) || {};
                html = render.html ? render.html : html;
                classes += render.classes ? ' ' + render.classes : '';
            }

            if (opts.range) {
                if (dp.isSame(minRange, date, type)) classes += ' -range-from-';
                if (dp.isSame(maxRange, date, type)) classes += ' -range-to-';

                if (parent.selectedDates.length == 1 && parent.focused) {
                    if (
                        (dp.bigger(minRange, date) && dp.less(parent.focused, date)) ||
                        (dp.less(maxRange, date) && dp.bigger(parent.focused, date)))
                    {
                        classes += ' -in-range-'
                    }

                    if (dp.less(maxRange, date) && dp.isSame(parent.focused, date)) {
                        classes += ' -range-from-'
                    }
                    if (dp.bigger(minRange, date) && dp.isSame(parent.focused, date)) {
                        classes += ' -range-to-'
                    }

                } else if (parent.selectedDates.length == 2) {
                    if (dp.bigger(minRange, date) && dp.less(maxRange, date)) {
                        classes += ' -in-range-'
                    }
                }
            }


            if (dp.isSame(currentDate, date, type)) classes += ' -current-';
            if (parent.focused && dp.isSame(date, parent.focused, type)) classes += ' -focus-';
            if (parent._isSelected(date, type)) classes += ' -selected-';
            if (!parent._isInRange(date, type) || render.disabled) classes += ' -disabled-';

            return {
                html: html,
                classes: classes
            }
        },

        /**
         * Calculates days number to render. Generates days html and returns it.
         * @param {object} date - Date object
         * @returns {string}
         * @private
         */
        _getDaysHtml: function (date) {
            var totalMonthDays = dp.getDaysCount(date),
                firstMonthDay = new Date(date.getFullYear(), date.getMonth(), 1).getDay(),
                lastMonthDay = new Date(date.getFullYear(), date.getMonth(), totalMonthDays).getDay(),
                daysFromPevMonth = firstMonthDay - this.d.loc.firstDay,
                daysFromNextMonth = 6 - lastMonthDay + this.d.loc.firstDay;

            daysFromPevMonth = daysFromPevMonth < 0 ? daysFromPevMonth + 7 : daysFromPevMonth;
            daysFromNextMonth = daysFromNextMonth > 6 ? daysFromNextMonth - 7 : daysFromNextMonth;

            var startDayIndex = -daysFromPevMonth + 1,
                m, y,
                html = '';

            for (var i = startDayIndex, max = totalMonthDays + daysFromNextMonth; i <= max; i++) {
                y = date.getFullYear();
                m = date.getMonth();

                html += this._getDayHtml(new Date(y, m, i))
            }

            return html;
        },

        _getDayHtml: function (date) {
           var content = this._getCellContents(date, 'day');

            return '<div class="' + content.classes + '" ' +
                'data-date="' + date.getDate() + '" ' +
                'data-month="' + date.getMonth() + '" ' +
                'data-year="' + date.getFullYear() + '">' + content.html + '</div>';
        },

        /**
         * Generates months html
         * @param {object} date - date instance
         * @returns {string}
         * @private
         */
        _getMonthsHtml: function (date) {
            var html = '',
                d = dp.getParsedDate(date),
                i = 0;

            while(i < 12) {
                html += this._getMonthHtml(new Date(d.year, i));
                i++
            }

            return html;
        },

        _getMonthHtml: function (date) {
            var content = this._getCellContents(date, 'month');

            return '<div class="' + content.classes + '" data-month="' + date.getMonth() + '">' + content.html + '</div>'
        },

        _getYearsHtml: function (date) {
            var d = dp.getParsedDate(date),
                decade = dp.getDecade(date),
                firstYear = decade[0] - 1,
                html = '',
                i = firstYear;

            for (i; i <= decade[1] + 1; i++) {
                html += this._getYearHtml(new Date(i , 0));
            }

            return html;
        },

        _getYearHtml: function (date) {
            var content = this._getCellContents(date, 'year');

            return '<div class="' + content.classes + '" data-year="' + date.getFullYear() + '">' + content.html + '</div>'
        },

        _renderTypes: {
            days: function () {
                var dayNames = this._getDayNamesHtml(this.d.loc.firstDay),
                    days = this._getDaysHtml(this.d.currentDate);

                this.$cells.html(days);
                this.$names.html(dayNames)
            },
            months: function () {
                var html = this._getMonthsHtml(this.d.currentDate);

                this.$cells.html(html)
            },
            years: function () {
                var html = this._getYearsHtml(this.d.currentDate);

                this.$cells.html(html)
            }
        },

        _render: function () {
            if (this.opts.onlyTimepicker) return;
            this._renderTypes[this.type].bind(this)();
        },

        _update: function () {
            var $cells = $('.datepicker--cell', this.$cells),
                _this = this,
                classes,
                $cell,
                date;
            $cells.each(function (cell, i) {
                $cell = $(this);
                date = _this.d._getDateFromCell($(this));
                classes = _this._getCellContents(date, _this.d.cellType);
                $cell.attr('class',classes.classes)
            });
        },

        show: function () {
            if (this.opts.onlyTimepicker) return;
            this.$el.addClass('active');
            this.acitve = true;
        },

        hide: function () {
            this.$el.removeClass('active');
            this.active = false;
        },

        //  Events
        // -------------------------------------------------

        _handleClick: function (el) {
            var date = el.data('date') || 1,
                month = el.data('month') || 0,
                year = el.data('year') || this.d.parsedDate.year,
                dp = this.d;
            // Change view if min view does not reach yet
            if (dp.view != this.opts.minView) {
                dp.down(new Date(year, month, date));
                return;
            }
            // Select date if min view is reached
            var selectedDate = new Date(year, month, date),
                alreadySelected = this.d._isSelected(selectedDate, this.d.cellType);

            if (!alreadySelected) {
                dp._trigger('clickCell', selectedDate);
                return;
            }

            dp._handleAlreadySelectedDates.bind(dp, alreadySelected, selectedDate)();

        },

        _onClickCell: function (e) {
            var $el = $(e.target).closest('.datepicker--cell');

            if ($el.hasClass('-disabled-')) return;

            this._handleClick.bind(this)($el);
        }
    };
})();

;(function () {
    var template = '' +
        '<div class="datepicker--nav-action" data-action="prev">#{prevHtml}</div>' +
        '<div class="datepicker--nav-title">#{title}</div>' +
        '<div class="datepicker--nav-action" data-action="next">#{nextHtml}</div>',
        buttonsContainerTemplate = '<div class="datepicker--buttons"></div>',
        button = '<span class="datepicker--button" data-action="#{action}">#{label}</span>',
        datepicker = $.fn.datepicker,
        dp = datepicker.Constructor;

    datepicker.Navigation = function (d, opts) {
        this.d = d;
        this.opts = opts;

        this.$buttonsContainer = '';

        this.init();
    };

    datepicker.Navigation.prototype = {
        init: function () {
            this._buildBaseHtml();
            this._bindEvents();
        },

        _bindEvents: function () {
            this.d.$nav.on('click', '.datepicker--nav-action', $.proxy(this._onClickNavButton, this));
            this.d.$nav.on('click', '.datepicker--nav-title', $.proxy(this._onClickNavTitle, this));
            this.d.$datepicker.on('click', '.datepicker--button', $.proxy(this._onClickNavButton, this));
        },

        _buildBaseHtml: function () {
            if (!this.opts.onlyTimepicker) {
                this._render();
            }
            this._addButtonsIfNeed();
        },

        _addButtonsIfNeed: function () {
            if (this.opts.todayButton) {
                this._addButton('today')
            }
            if (this.opts.clearButton) {
                this._addButton('clear')
            }
        },

        _render: function () {
            var title = this._getTitle(this.d.currentDate),
                html = dp.template(template, $.extend({title: title}, this.opts));
            this.d.$nav.html(html);
            if (this.d.view == 'years') {
                $('.datepicker--nav-title', this.d.$nav).addClass('-disabled-');
            }
            this.setNavStatus();
        },

        _getTitle: function (date) {
            return this.d.formatDate(this.opts.navTitles[this.d.view], date)
        },

        _addButton: function (type) {
            if (!this.$buttonsContainer.length) {
                this._addButtonsContainer();
            }

            var data = {
                    action: type,
                    label: this.d.loc[type]
                },
                html = dp.template(button, data);

            if ($('[data-action=' + type + ']', this.$buttonsContainer).length) return;
            this.$buttonsContainer.append(html);
        },

        _addButtonsContainer: function () {
            this.d.$datepicker.append(buttonsContainerTemplate);
            this.$buttonsContainer = $('.datepicker--buttons', this.d.$datepicker);
        },

        setNavStatus: function () {
            if (!(this.opts.minDate || this.opts.maxDate) || !this.opts.disableNavWhenOutOfRange) return;

            var date = this.d.parsedDate,
                m = date.month,
                y = date.year,
                d = date.date;

            switch (this.d.view) {
                case 'days':
                    if (!this.d._isInRange(new Date(y, m-1, 1), 'month')) {
                        this._disableNav('prev')
                    }
                    if (!this.d._isInRange(new Date(y, m+1, 1), 'month')) {
                        this._disableNav('next')
                    }
                    break;
                case 'months':
                    if (!this.d._isInRange(new Date(y-1, m, d), 'year')) {
                        this._disableNav('prev')
                    }
                    if (!this.d._isInRange(new Date(y+1, m, d), 'year')) {
                        this._disableNav('next')
                    }
                    break;
                case 'years':
                    var decade = dp.getDecade(this.d.date);
                    if (!this.d._isInRange(new Date(decade[0] - 1, 0, 1), 'year')) {
                        this._disableNav('prev')
                    }
                    if (!this.d._isInRange(new Date(decade[1] + 1, 0, 1), 'year')) {
                        this._disableNav('next')
                    }
                    break;
            }
        },

        _disableNav: function (nav) {
            $('[data-action="' + nav + '"]', this.d.$nav).addClass('-disabled-')
        },

        _activateNav: function (nav) {
            $('[data-action="' + nav + '"]', this.d.$nav).removeClass('-disabled-')
        },

        _onClickNavButton: function (e) {
            var $el = $(e.target).closest('[data-action]'),
                action = $el.data('action');

            this.d[action]();
        },

        _onClickNavTitle: function (e) {
            if ($(e.target).hasClass('-disabled-')) return;

            if (this.d.view == 'days') {
                return this.d.view = 'months'
            }

            this.d.view = 'years';
        }
    }

})();

;(function () {
    var template = '<div class="datepicker--time">' +
        '<div class="datepicker--time-current">' +
        '   <span class="datepicker--time-current-hours">#{hourVisible}</span>' +
        '   <span class="datepicker--time-current-colon">:</span>' +
        '   <span class="datepicker--time-current-minutes">#{minValue}</span>' +
        '</div>' +
        '<div class="datepicker--time-sliders">' +
        '   <div class="datepicker--time-row">' +
        '      <input type="range" name="hours" value="#{hourValue}" min="#{hourMin}" max="#{hourMax}" step="#{hourStep}"/>' +
        '   </div>' +
        '   <div class="datepicker--time-row">' +
        '      <input type="range" name="minutes" value="#{minValue}" min="#{minMin}" max="#{minMax}" step="#{minStep}"/>' +
        '   </div>' +
        '</div>' +
        '</div>',
        datepicker = $.fn.datepicker,
        dp = datepicker.Constructor;

    datepicker.Timepicker = function (inst, opts) {
        this.d = inst;
        this.opts = opts;

        this.init();
    };

    datepicker.Timepicker.prototype = {
        init: function () {
            var input = 'input';
            this._setTime(this.d.date);
            this._buildHTML();

            if (navigator.userAgent.match(/trident/gi)) {
                input = 'change';
            }

            this.d.$el.on('selectDate', this._onSelectDate.bind(this));
            this.$ranges.on(input, this._onChangeRange.bind(this));
            this.$ranges.on('mouseup', this._onMouseUpRange.bind(this));
            this.$ranges.on('mousemove focus ', this._onMouseEnterRange.bind(this));
            this.$ranges.on('mouseout blur', this._onMouseOutRange.bind(this));
        },

        _setTime: function (date) {
            var _date = dp.getParsedDate(date);

            this._handleDate(date);
            this.hours = _date.hours < this.minHours ? this.minHours : _date.hours;
            this.minutes = _date.minutes < this.minMinutes ? this.minMinutes : _date.minutes;
        },

        /**
         * Sets minHours and minMinutes from date (usually it's a minDate)
         * Also changes minMinutes if current hours are bigger then @date hours
         * @param date {Date}
         * @private
         */
        _setMinTimeFromDate: function (date) {
            this.minHours = date.getHours();
            this.minMinutes = date.getMinutes();

            // If, for example, min hours are 10, and current hours are 12,
            // update minMinutes to default value, to be able to choose whole range of values
            if (this.d.lastSelectedDate) {
                if (this.d.lastSelectedDate.getHours() > date.getHours()) {
                    this.minMinutes = this.opts.minMinutes;
                }
            }
        },

        _setMaxTimeFromDate: function (date) {
            this.maxHours = date.getHours();
            this.maxMinutes = date.getMinutes();

            if (this.d.lastSelectedDate) {
                if (this.d.lastSelectedDate.getHours() < date.getHours()) {
                    this.maxMinutes = this.opts.maxMinutes;
                }
            }
        },

        _setDefaultMinMaxTime: function () {
            var maxHours = 23,
                maxMinutes = 59,
                opts = this.opts;

            this.minHours = opts.minHours < 0 || opts.minHours > maxHours ? 0 : opts.minHours;
            this.minMinutes = opts.minMinutes < 0 || opts.minMinutes > maxMinutes ? 0 : opts.minMinutes;
            this.maxHours = opts.maxHours < 0 || opts.maxHours > maxHours ? maxHours : opts.maxHours;
            this.maxMinutes = opts.maxMinutes < 0 || opts.maxMinutes > maxMinutes ? maxMinutes : opts.maxMinutes;
        },

        /**
         * Looks for min/max hours/minutes and if current values
         * are out of range sets valid values.
         * @private
         */
        _validateHoursMinutes: function (date) {
            if (this.hours < this.minHours) {
                this.hours = this.minHours;
            } else if (this.hours > this.maxHours) {
                this.hours = this.maxHours;
            }

            if (this.minutes < this.minMinutes) {
                this.minutes = this.minMinutes;
            } else if (this.minutes > this.maxMinutes) {
                this.minutes = this.maxMinutes;
            }
        },

        _buildHTML: function () {
            var lz = dp.getLeadingZeroNum,
                data = {
                    hourMin: this.minHours,
                    hourMax: lz(this.maxHours),
                    hourStep: this.opts.hoursStep,
                    hourValue: this.hours,
                    hourVisible: lz(this.displayHours),
                    minMin: this.minMinutes,
                    minMax: lz(this.maxMinutes),
                    minStep: this.opts.minutesStep,
                    minValue: lz(this.minutes)
                },
                _template = dp.template(template, data);

            this.$timepicker = $(_template).appendTo(this.d.$datepicker);
            this.$ranges = $('[type="range"]', this.$timepicker);
            this.$hours = $('[name="hours"]', this.$timepicker);
            this.$minutes = $('[name="minutes"]', this.$timepicker);
            this.$hoursText = $('.datepicker--time-current-hours', this.$timepicker);
            this.$minutesText = $('.datepicker--time-current-minutes', this.$timepicker);

            if (this.d.ampm) {
                this.$ampm = $('<span class="datepicker--time-current-ampm">')
                    .appendTo($('.datepicker--time-current', this.$timepicker))
                    .html(this.dayPeriod);

                this.$timepicker.addClass('-am-pm-');
            }
        },

        _updateCurrentTime: function () {
            var h =  dp.getLeadingZeroNum(this.displayHours),
                m = dp.getLeadingZeroNum(this.minutes);

            this.$hoursText.html(h);
            this.$minutesText.html(m);

            if (this.d.ampm) {
                this.$ampm.html(this.dayPeriod);
            }
        },

        _updateRanges: function () {
            this.$hours.attr({
                min: this.minHours,
                max: this.maxHours
            }).val(this.hours);

            this.$minutes.attr({
                min: this.minMinutes,
                max: this.maxMinutes
            }).val(this.minutes)
        },

        /**
         * Sets minHours, minMinutes etc. from date. If date is not passed, than sets
         * values from options
         * @param [date] {object} - Date object, to get values from
         * @private
         */
        _handleDate: function (date) {
            this._setDefaultMinMaxTime();
            if (date) {
                if (dp.isSame(date, this.d.opts.minDate)) {
                    this._setMinTimeFromDate(this.d.opts.minDate);
                } else if (dp.isSame(date, this.d.opts.maxDate)) {
                    this._setMaxTimeFromDate(this.d.opts.maxDate);
                }
            }

            this._validateHoursMinutes(date);
        },

        update: function () {
            this._updateRanges();
            this._updateCurrentTime();
        },

        /**
         * Calculates valid hour value to display in text input and datepicker's body.
         * @param date {Date|Number} - date or hours
         * @param [ampm] {Boolean} - 12 hours mode
         * @returns {{hours: *, dayPeriod: string}}
         * @private
         */
        _getValidHoursFromDate: function (date, ampm) {
            var d = date,
                hours = date;

            if (date instanceof Date) {
                d = dp.getParsedDate(date);
                hours = d.hours;
            }

            var _ampm = ampm || this.d.ampm,
                dayPeriod = 'am';

            if (_ampm) {
                switch(true) {
                    case hours == 0:
                        hours = 12;
                        break;
                    case hours == 12:
                        dayPeriod = 'pm';
                        break;
                    case hours > 11:
                        hours = hours - 12;
                        dayPeriod = 'pm';
                        break;
                    default:
                        break;
                }
            }

            return {
                hours: hours,
                dayPeriod: dayPeriod
            }
        },

        set hours (val) {
            this._hours = val;

            var displayHours = this._getValidHoursFromDate(val);

            this.displayHours = displayHours.hours;
            this.dayPeriod = displayHours.dayPeriod;
        },

        get hours() {
            return this._hours;
        },

        //  Events
        // -------------------------------------------------

        _onChangeRange: function (e) {
            var $target = $(e.target),
                name = $target.attr('name');
            
            this.d.timepickerIsActive = true;

            this[name] = $target.val();
            this._updateCurrentTime();
            this.d._trigger('timeChange', [this.hours, this.minutes]);

            this._handleDate(this.d.lastSelectedDate);
            this.update()
        },

        _onSelectDate: function (e, data) {
            this._handleDate(data);
            this.update();
        },

        _onMouseEnterRange: function (e) {
            var name = $(e.target).attr('name');
            $('.datepicker--time-current-' + name, this.$timepicker).addClass('-focus-');
        },

        _onMouseOutRange: function (e) {
            var name = $(e.target).attr('name');
            if (this.d.inFocus) return; // Prevent removing focus when mouse out of range slider
            $('.datepicker--time-current-' + name, this.$timepicker).removeClass('-focus-');
        },

        _onMouseUpRange: function (e) {
            this.d.timepickerIsActive = false;
        }
    };
})();
 })(window, jQuery);
define("vendor/jquery.monthpicker", function(){});

/*
 Highcharts JS v10.2.0 (2022-07-05)

 Exporting module

 (c) 2010-2021 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/exporting",["highcharts"],function(g){a(g);a.Highcharts=g;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function g(a,e,t,n){a.hasOwnProperty(e)||(a[e]=n.apply(null,t),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:a[e]}})))}a=a?a._modules:{};g(a,
"Extensions/FullScreen.js",[a["Core/Chart/Chart.js"],a["Core/Globals.js"],a["Core/Renderer/HTML/AST.js"],a["Core/Utilities.js"]],function(a,e,t,n){var l=n.addEvent,k=n.fireEvent;n=function(){function a(b){this.chart=b;this.isOpen=!1;b=b.renderTo;this.browserProps||("function"===typeof b.requestFullscreen?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:b.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",
requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:b.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:b.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}a.prototype.close=function(){var b=this,c=b.chart,a=c.options.chart;k(c,"fullscreenClose",null,
function(){if(b.isOpen&&b.browserProps&&c.container.ownerDocument instanceof Document)c.container.ownerDocument[b.browserProps.exitFullscreen]();b.unbindFullscreenEvent&&(b.unbindFullscreenEvent=b.unbindFullscreenEvent());c.setSize(b.origWidth,b.origHeight,!1);b.origWidth=void 0;b.origHeight=void 0;a.width=b.origWidthOption;a.height=b.origHeightOption;b.origWidthOption=void 0;b.origHeightOption=void 0;b.isOpen=!1;b.setButtonText()})};a.prototype.open=function(){var b=this,c=b.chart,a=c.options.chart;
k(c,"fullscreenOpen",null,function(){a&&(b.origWidthOption=a.width,b.origHeightOption=a.height);b.origWidth=c.chartWidth;b.origHeight=c.chartHeight;if(b.browserProps){var k=l(c.container.ownerDocument,b.browserProps.fullscreenChange,function(){b.isOpen?(b.isOpen=!1,b.close()):(c.setSize(null,null,!1),b.isOpen=!0,b.setButtonText())}),e=l(c,"destroy",k);b.unbindFullscreenEvent=function(){k();e()};var p=c.renderTo[b.browserProps.requestFullscreen]();if(p)p["catch"](function(){alert("Full screen is not supported inside a frame.")})}})};
a.prototype.setButtonText=function(){var b=this.chart,c=b.exportDivElements,a=b.options.exporting,k=a&&a.buttons&&a.buttons.contextButton.menuItems;b=b.options.lang;a&&a.menuItemDefinitions&&b&&b.exitFullscreen&&b.viewFullscreen&&k&&c&&(c=c[k.indexOf("viewFullscreen")])&&t.setElementHTML(c,this.isOpen?b.exitFullscreen:a.menuItemDefinitions.viewFullscreen.text||b.viewFullscreen)};a.prototype.toggle=function(){this.isOpen?this.close():this.open()};return a}();e.Fullscreen=n;l(a,"beforeRender",function(){this.fullscreen=
new e.Fullscreen(this)});"";return e.Fullscreen});g(a,"Core/Chart/ChartNavigationComposition.js",[],function(){var a;(function(a){a.compose=function(a){a.navigation||(a.navigation=new e(a));return a};var e=function(){function a(a){this.updates=[];this.chart=a}a.prototype.addUpdate=function(a){this.chart.navigation.updates.push(a)};a.prototype.update=function(a,k){var e=this;this.updates.forEach(function(b){b.call(e.chart,a,k)})};return a}();a.Additions=e})(a||(a={}));return a});g(a,"Extensions/Exporting/ExportingDefaults.js",
[a["Core/Globals.js"]],function(a){a=a.isTouchDevice;return{exporting:{type:"image/png",url:"https://export.highcharts.com/",pdfFont:{normal:void 0,bold:void 0,bolditalic:void 0,italic:void 0},printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",titleKey:"contextButtonTitle",menuItems:"viewFullscreen printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG".split(" ")}},menuItemDefinitions:{viewFullscreen:{textKey:"viewFullscreen",
onclick:function(){this.fullscreen.toggle()}},printChart:{textKey:"printChart",onclick:function(){this.print()}},separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}}},
lang:{viewFullscreen:"View in full screen",exitFullscreen:"Exit from full screen",printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"},navigation:{buttonOptions:{symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24,symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{padding:5}},
menuStyle:{border:"1px solid ".concat("#999999"),background:"#ffffff",padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",color:"#333333",background:"none",fontSize:a?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",color:"#ffffff"}}}});g(a,"Extensions/Exporting/ExportingSymbols.js",[],function(){var a;(function(a){function e(a,e,b,c){return[["M",a,e+2.5],["L",a+b,e+2.5],["M",a,e+c/2+.5],["L",a+b,e+c/2+.5],["M",a,e+c-1.5],["L",a+b,e+c-1.5]]}function l(a,
e,b,c){a=c/3-2;c=[];return c=c.concat(this.circle(b-a,e,a,a),this.circle(b-a,e+a+4,a,a),this.circle(b-a,e+2*(a+4),a,a))}var g=[];a.compose=function(a){-1===g.indexOf(a)&&(g.push(a),a=a.prototype.symbols,a.menu=e,a.menuball=l.bind(a))}})(a||(a={}));return a});g(a,"Core/HttpUtilities.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,e){var l=a.doc,g=e.createElement,z=e.discardElement,k=e.merge,p=e.objectEach,b={ajax:function(a){var b={json:"application/json",xml:"application/xml",text:"text/plain",
octet:"application/octet-stream"},c=new XMLHttpRequest;if(!a.url)return!1;c.open((a.type||"get").toUpperCase(),a.url,!0);a.headers&&a.headers["Content-Type"]||c.setRequestHeader("Content-Type",b[a.dataType||"json"]||b.text);p(a.headers,function(a,b){c.setRequestHeader(b,a)});a.responseType&&(c.responseType=a.responseType);c.onreadystatechange=function(){if(4===c.readyState){if(200===c.status){if("blob"!==a.responseType){var b=c.responseText;if("json"===a.dataType)try{b=JSON.parse(b)}catch(x){if(x instanceof
Error){a.error&&a.error(c,x);return}}}return a.success&&a.success(b,c)}a.error&&a.error(c,c.responseText)}};a.data&&"string"!==typeof a.data&&(a.data=JSON.stringify(a.data));c.send(a.data)},getJSON:function(a,e){b.ajax({url:a,success:e,dataType:"json",headers:{"Content-Type":"text/plain"}})},post:function(a,b,e){var c=g("form",k({method:"post",action:a,enctype:"multipart/form-data"},e),{display:"none"},l.body);p(b,function(a,b){g("input",{type:"hidden",name:b,value:a},void 0,c)});c.submit();z(c)}};
"";return b});g(a,"Extensions/Exporting/Exporting.js",[a["Core/Renderer/HTML/AST.js"],a["Core/Chart/Chart.js"],a["Core/Chart/ChartNavigationComposition.js"],a["Core/DefaultOptions.js"],a["Extensions/Exporting/ExportingDefaults.js"],a["Extensions/Exporting/ExportingSymbols.js"],a["Core/Globals.js"],a["Core/HttpUtilities.js"],a["Core/Utilities.js"]],function(a,e,g,n,z,k,p,b,c){e=n.defaultOptions;var l=p.doc,t=p.SVG_NS,A=p.win,x=c.addEvent,v=c.css,C=c.createElement,J=c.discardElement,D=c.extend,N=c.find,
E=c.fireEvent,O=c.isObject,q=c.merge,P=c.objectEach,y=c.pick,Q=c.removeEvent,R=c.uniqueKey,F;(function(e){function n(a){var d=this,b=d.renderer,c=q(d.options.navigation.buttonOptions,a),e=c.onclick,m=c.menuItems,r=c.symbolSize||12;d.btnCount||(d.btnCount=0);d.exportDivElements||(d.exportDivElements=[],d.exportSVGElements=[]);if(!1!==c.enabled&&c.theme){var f=c.theme,I;d.styledMode||(f.fill=y(f.fill,"#ffffff"),f.stroke=y(f.stroke,"none"));e?I=function(a){a&&a.stopPropagation();e.call(d,a)}:m&&(I=function(a){a&&
a.stopPropagation();d.contextMenu(u.menuClassName,m,u.translateX,u.translateY,u.width,u.height,u);u.setState(2)});c.text&&c.symbol?f.paddingLeft=y(f.paddingLeft,30):c.text||D(f,{width:c.width,height:c.height,padding:0});d.styledMode||(f["stroke-linecap"]="round",f.fill=y(f.fill,"#ffffff"),f.stroke=y(f.stroke,"none"));var u=b.button(c.text,0,0,I,f).addClass(a.className).attr({title:y(d.options.lang[c._titleKey||c.titleKey],"")});u.menuClassName=a.menuClassName||"highcharts-menu-"+d.btnCount++;if(c.symbol){var l=
b.symbol(c.symbol,c.symbolX-r/2,c.symbolY-r/2,r,r,{width:r,height:r}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(u);d.styledMode||l.attr({stroke:c.symbolStroke,fill:c.symbolFill,"stroke-width":c.symbolStrokeWidth||1})}u.add(d.exportingGroup).align(D(c,{width:u.width,x:y(c.x,d.buttonOffset)}),!0,"spacingBox");d.buttonOffset+=(u.width+c.buttonSpacing)*("right"===c.align?-1:1);d.exportSVGElements.push(u,l)}}function z(){if(this.printReverseInfo){var a=this.printReverseInfo,c=a.childNodes,
b=a.origDisplay;a=a.resetParams;this.moveContainers(this.renderTo);[].forEach.call(c,function(a,d){1===a.nodeType&&(a.style.display=b[d]||"")});this.isPrinting=!1;a&&this.setSize.apply(this,a);delete this.printReverseInfo;G=void 0;E(this,"afterPrint")}}function F(){var a=l.body,c=this.options.exporting.printMaxWidth,b={childNodes:a.childNodes,origDisplay:[],resetParams:void 0};this.isPrinting=!0;this.pointer.reset(null,0);E(this,"beforePrint");c&&this.chartWidth>c&&(b.resetParams=[this.options.chart.width,
void 0,!1],this.setSize(c,void 0,!1));[].forEach.call(b.childNodes,function(a,d){1===a.nodeType&&(b.origDisplay[d]=a.style.display,a.style.display="none")});this.moveContainers(a);this.printReverseInfo=b}function S(a){a.renderExporting();x(a,"redraw",a.renderExporting);x(a,"destroy",a.destroyExport)}function T(d,b,e,H,K,m,r){var f=this,w=f.options.navigation,B=f.chartWidth,g=f.chartHeight,p="cache-"+d,k=Math.max(K,m),h=f[p];if(!h){f.exportContextMenu=f[p]=h=C("div",{className:d},{position:"absolute",
zIndex:1E3,padding:k+"px",pointerEvents:"auto"},f.fixedDiv||f.container);var q=C("ul",{className:"highcharts-menu"},{listStyle:"none",margin:0,padding:0},h);f.styledMode||v(q,D({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},w.menuStyle));h.hideMenu=function(){v(h,{display:"none"});r&&r.setState(0);f.openMenu=!1;v(f.renderTo,{overflow:"hidden"});v(f.container,{overflow:"hidden"});c.clearTimeout(h.hideTimer);E(f,"exportMenuHidden")};f.exportEvents.push(x(h,
"mouseleave",function(){h.hideTimer=A.setTimeout(h.hideMenu,500)}),x(h,"mouseenter",function(){c.clearTimeout(h.hideTimer)}),x(l,"mouseup",function(a){f.pointer.inClass(a.target,d)||h.hideMenu()}),x(h,"click",function(){f.openMenu&&h.hideMenu()}));b.forEach(function(d){"string"===typeof d&&(d=f.options.exporting.menuItemDefinitions[d]);if(O(d,!0)){var b=void 0;d.separator?b=C("hr",void 0,void 0,q):("viewData"===d.textKey&&f.isDataTableVisible&&(d.textKey="hideData"),b=C("li",{className:"highcharts-menu-item",
onclick:function(a){a&&a.stopPropagation();h.hideMenu();d.onclick&&d.onclick.apply(f,arguments)}},void 0,q),a.setElementHTML(b,d.text||f.options.lang[d.textKey]),f.styledMode||(b.onmouseover=function(){v(this,w.menuItemHoverStyle)},b.onmouseout=function(){v(this,w.menuItemStyle)},v(b,D({cursor:"pointer"},w.menuItemStyle||{}))));f.exportDivElements.push(b)}});f.exportDivElements.push(q,h);f.exportMenuWidth=h.offsetWidth;f.exportMenuHeight=h.offsetHeight}b={display:"block"};e+f.exportMenuWidth>B?b.right=
B-e-K-k+"px":b.left=e-k+"px";H+m+f.exportMenuHeight>g&&"top"!==r.alignOptions.verticalAlign?b.bottom=g-H-k+"px":b.top=H+m-k+"px";v(h,b);v(f.renderTo,{overflow:""});v(f.container,{overflow:""});f.openMenu=!0;E(f,"exportMenuShown")}function U(a){var d=a?a.target:this,b=d.exportSVGElements,e=d.exportDivElements;a=d.exportEvents;var l;b&&(b.forEach(function(a,c){a&&(a.onclick=a.ontouchstart=null,l="cache-"+a.menuClassName,d[l]&&delete d[l],b[c]=a.destroy())}),b.length=0);d.exportingGroup&&(d.exportingGroup.destroy(),
delete d.exportingGroup);e&&(e.forEach(function(a,d){a&&(c.clearTimeout(a.hideTimer),Q(a,"mouseleave"),e[d]=a.onmouseout=a.onmouseover=a.ontouchstart=a.onclick=null,J(a))}),e.length=0);a&&(a.forEach(function(a){a()}),a.length=0)}function V(a,c){c=this.getSVGForExport(a,c);a=q(this.options.exporting,a);b.post(a.url,{filename:a.filename?a.filename.replace(/\//g,"-"):this.getFilename(),type:a.type,width:a.width||0,scale:a.scale,svg:c},a.formAttributes)}function W(){this.styledMode&&this.inlineStyles();
return this.container.innerHTML}function X(){var a=this.userOptions.title&&this.userOptions.title.text,b=this.options.exporting.filename;if(b)return b.replace(/\//g,"-");"string"===typeof a&&(b=a.toLowerCase().replace(/<\/?[^>]+(>|$)/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z0-9\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,""));if(!b||5>b.length)b="chart";return b}function Y(a){var b,d=q(this.options,a);d.plotOptions=q(this.userOptions.plotOptions,a&&a.plotOptions);
d.time=q(this.userOptions.time,a&&a.time);var c=C("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},l.body),e=this.renderTo.style.width;var m=this.renderTo.style.height;e=d.exporting.sourceWidth||d.chart.width||/px$/.test(e)&&parseInt(e,10)||(d.isGantt?800:600);m=d.exporting.sourceHeight||d.chart.height||/px$/.test(m)&&parseInt(m,10)||400;D(d.chart,{animation:!1,renderTo:c,forExport:!0,renderer:"SVGRenderer",width:e,height:m});d.exporting.enabled=
!1;delete d.data;d.series=[];this.series.forEach(function(a){b=q(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});b.isInternal||d.series.push(b)});var g={};this.axes.forEach(function(a){a.userOptions.internalKey||(a.userOptions.internalKey=R());a.options.isInternal||(g[a.coll]||(g[a.coll]=!0,d[a.coll]=[]),d[a.coll].push(q(a.userOptions,{visible:a.visible})))});var f=new this.constructor(d,this.callback);a&&["xAxis","yAxis","series"].forEach(function(d){var b=
{};a[d]&&(b[d]=a[d],f.update(b))});this.axes.forEach(function(a){var d=N(f.axes,function(d){return d.options.internalKey===a.userOptions.internalKey}),b=a.getExtremes(),c=b.userMin;b=b.userMax;d&&("undefined"!==typeof c&&c!==d.min||"undefined"!==typeof b&&b!==d.max)&&d.setExtremes(c,b,!0,!1)});m=f.getChartHTML();E(this,"getSVG",{chartCopy:f});m=this.sanitizeSVG(m,d);d=null;f.destroy();J(c);return m}function Z(a,b){var d=this.options.exporting;return this.getSVG(q({chart:{borderRadius:0}},d.chartOptions,
b,{exporting:{sourceWidth:a&&a.sourceWidth||d.sourceWidth,sourceHeight:a&&a.sourceHeight||d.sourceHeight}}))}function aa(a){return a.replace(/([A-Z])/g,function(a,b){return"-"+b.toLowerCase()})}function ba(){function a(d){var e={},f,w;if(r&&1===d.nodeType&&-1===ca.indexOf(d.nodeName)){var l=A.getComputedStyle(d,null);var m="svg"===d.nodeName?{}:A.getComputedStyle(d.parentNode,null);if(!g[d.nodeName]){k=r.getElementsByTagName("svg")[0];var h=r.createElementNS(d.namespaceURI,d.nodeName);k.appendChild(h);
g[d.nodeName]=q(A.getComputedStyle(h,null));"text"===d.nodeName&&delete g.text.fill;k.removeChild(h)}for(var B in l)if(p.isFirefox||p.isMS||p.isSafari||Object.hasOwnProperty.call(l,B)){var t=l[B],n=B;h=f=!1;if(c.length){for(w=c.length;w--&&!f;)f=c[w].test(n);h=!f}"transform"===n&&"none"===t&&(h=!0);for(w=b.length;w--&&!h;)h=b[w].test(n)||"function"===typeof t;h||m[n]===t&&"svg"!==d.nodeName||g[d.nodeName][n]===t||(L&&-1===L.indexOf(n)?"parentRule"!==n&&(e[n]=t):t&&d.setAttribute(aa(n),t))}v(d,e);
"svg"===d.nodeName&&d.setAttribute("stroke-width","1px");"text"!==d.nodeName&&[].forEach.call(d.children||d.childNodes,a)}}var b=da,c=e.inlineWhitelist,g={},k,m=l.createElement("iframe");v(m,{width:"1px",height:"1px",visibility:"hidden"});l.body.appendChild(m);var r=m.contentWindow&&m.contentWindow.document;r&&r.body.appendChild(r.createElementNS(t,"svg"));a(this.container.querySelector("svg"));k.parentNode.removeChild(k);m.parentNode.removeChild(m)}function ea(a){(this.fixedDiv?[this.fixedDiv,this.scrollingContainer]:
[this.container]).forEach(function(d){a.appendChild(d)})}function fa(){var a=this;a.exporting={update:function(d,b){a.isDirtyExporting=!0;q(!0,a.options.exporting,d);y(b,!0)&&a.redraw()}};g.compose(a).navigation.addUpdate(function(d,b){a.isDirtyExporting=!0;q(!0,a.options.navigation,d);y(b,!0)&&a.redraw()})}function ha(){var a=this;a.isPrinting||(G=a,p.isSafari||a.beforePrint(),setTimeout(function(){A.focus();A.print();p.isSafari||setTimeout(function(){a.afterPrint()},1E3)},1))}function ia(){var a=
this,b=a.options.exporting,c=b.buttons,e=a.isDirtyExporting||!a.exportSVGElements;a.buttonOffset=0;a.isDirtyExporting&&a.destroyExport();e&&!1!==b.enabled&&(a.exportEvents=[],a.exportingGroup=a.exportingGroup||a.renderer.g("exporting-group").attr({zIndex:3}).add(),P(c,function(b){a.addButton(b)}),a.isDirtyExporting=!1)}function ja(a,b){var c=a.indexOf("</svg>")+6,d=a.substr(c);a=a.substr(0,c);b&&b.exporting&&b.exporting.allowHTML&&d&&(d='<foreignObject x="0" y="0" width="'+b.chart.width+'" height="'+
b.chart.height+'"><body xmlns="http://www.w3.org/1999/xhtml">'+d.replace(/(<(?:img|br).*?(?=>))>/g,"$1 />")+"</body></foreignObject>",a=a.replace("</svg>",d+"</svg>"));a=a.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|&quot;)(.*?)("|&quot;);?\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (|NS[0-9]+:)href=/g," xlink:href=").replace(/\n/," ").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,
'$1="rgb($2)" $1-opacity="$3"').replace(/&nbsp;/g,"\u00a0").replace(/&shy;/g,"\u00ad");this.ieSanitizeSVG&&(a=this.ieSanitizeSVG(a));return a}var M=[],da=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/],L="fill stroke strokeLinecap strokeLinejoin strokeWidth textAnchor x y".split(" ");e.inlineWhitelist=[];var ca=["clipPath","defs","desc"],G;e.compose=function(a,b){k.compose(b);-1===M.indexOf(a)&&(M.push(a),
b=a.prototype,b.afterPrint=z,b.exportChart=V,b.inlineStyles=ba,b.print=ha,b.sanitizeSVG=ja,b.getChartHTML=W,b.getSVG=Y,b.getSVGForExport=Z,b.getFilename=X,b.moveContainers=ea,b.beforePrint=F,b.contextMenu=T,b.addButton=n,b.destroyExport=U,b.renderExporting=ia,b.callbacks.push(S),x(a,"init",fa),p.isSafari&&p.win.matchMedia("print").addListener(function(a){G&&(a.matches?G.beforePrint():G.afterPrint())}))}})(F||(F={}));e.exporting=q(z.exporting,e.exporting);e.lang=q(z.lang,e.lang);e.navigation=q(z.navigation,
e.navigation);"";"";return F});g(a,"masters/modules/exporting.src.js",[a["Core/Globals.js"],a["Extensions/Exporting/Exporting.js"],a["Core/HttpUtilities.js"]],function(a,e,g){a.HttpUtilities=g;a.ajax=g.ajax;a.getJSON=g.getJSON;a.post=g.post;e.compose(a.Chart,a.Renderer)})});
//# sourceMappingURL=exporting.js.map;
/*
 Highcharts JS v10.2.0 (2022-07-05)

 Exporting module

 (c) 2010-2021 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/export-data",["highcharts","highcharts/modules/exporting"],function(m){a(m);a.Highcharts=m;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function m(a,d,c,p){a.hasOwnProperty(d)||(a[d]=p.apply(null,c),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:d,module:a[d]}})))}
a=a?a._modules:{};m(a,"Extensions/DownloadURL.js",[a["Core/Globals.js"]],function(a){var d=a.isSafari,c=a.win,p=c.document,f=c.URL||c.webkitURL||c,r=a.dataURLtoBlob=function(a){if((a=a.replace(/filename=.*;/,"").match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/))&&3<a.length&&c.atob&&c.ArrayBuffer&&c.Uint8Array&&c.Blob&&f.createObjectURL){var d=c.atob(a[3]),y=new c.ArrayBuffer(d.length);y=new c.Uint8Array(y);for(var l=0;l<y.length;++l)y[l]=d.charCodeAt(l);a=new c.Blob([y],{type:a[1]});return f.createObjectURL(a)}};
a=a.downloadURL=function(a,f){var w=c.navigator,l=p.createElement("a");if("string"===typeof a||a instanceof String||!w.msSaveOrOpenBlob){a="".concat(a);w=/Edge\/\d+/.test(w.userAgent);if(d&&"string"===typeof a&&0===a.indexOf("data:application/pdf")||w||2E6<a.length)if(a=r(a)||"",!a)throw Error("Failed to convert to blob");if("undefined"!==typeof l.download)l.href=a,l.download=f,p.body.appendChild(l),l.click(),p.body.removeChild(l);else try{var n=c.open(a,"chart");if("undefined"===typeof n||null===
n)throw Error("Failed to open window");}catch(t){c.location.href=a}}else w.msSaveOrOpenBlob(a,f)};return{dataURLtoBlob:r,downloadURL:a}});m(a,"Extensions/ExportData.js",[a["Core/Axis/Axis.js"],a["Core/Chart/Chart.js"],a["Core/Renderer/HTML/AST.js"],a["Core/Globals.js"],a["Core/DefaultOptions.js"],a["Core/Utilities.js"],a["Extensions/DownloadURL.js"]],function(a,d,c,p,f,r,y){function m(a,e){var b=t.navigator,B=-1<b.userAgent.indexOf("WebKit")&&0>b.userAgent.indexOf("Chrome"),z=t.URL||t.webkitURL||
t;try{if(b.msSaveOrOpenBlob&&t.MSBlobBuilder){var g=new t.MSBlobBuilder;g.append(a);return g.getBlob("image/svg+xml")}if(!B)return z.createObjectURL(new t.Blob(["\ufeff"+a],{type:e}))}catch(Q){}}var w=this&&this.__spreadArray||function(a,e,k){if(k||2===arguments.length)for(var b=0,z=e.length,g;b<z;b++)!g&&b in e||(g||(g=Array.prototype.slice.call(e,0,b)),g[b]=e[b]);return a.concat(g||Array.prototype.slice.call(e))},l=p.doc,n=p.seriesTypes,t=p.win;p=f.getOptions;f=f.setOptions;var I=r.addEvent,M=r.defined,
J=r.extend,N=r.find,G=r.fireEvent,O=r.isNumber,x=r.pick,K=y.downloadURL;f({exporting:{csv:{annotations:{itemDelimiter:"; ",join:!1},columnHeaderFormatter:null,dateFormat:"%Y-%m-%d %H:%M:%S",decimalPoint:null,itemDelimiter:null,lineDelimiter:"\n"},showTable:!1,useMultiLevelHeaders:!0,useRowspanHeaders:!0},lang:{downloadCSV:"Download CSV",downloadXLS:"Download XLS",exportData:{annotationHeader:"Annotations",categoryHeader:"Category",categoryDatetimeHeader:"DateTime"},viewData:"View data table",hideData:"Hide data table"}});
I(d,"render",function(){this.options&&this.options.exporting&&this.options.exporting.showTable&&!this.options.chart.forExport&&this.viewData()});I(d,"afterViewData",function(){var a=this,e=a.dataTableDiv,k=document.querySelectorAll("thead")[0].querySelectorAll("tr")[0],B=function(a,b){return function(e,g){var k=(b?e:g).children[a].textContent;e=(b?g:e).children[a].textContent;return""===k||""===e||isNaN(k)||isNaN(e)?k.toString().localeCompare(e):k-e}};e&&k.childNodes.forEach(function(b){var k=b.closest("table");
b.addEventListener("click",function(){var g=w([],e.querySelectorAll("tr:not(thead tr)"),!0),d=w([],b.parentNode.children,!0);g.sort(B(d.indexOf(b),a.ascendingOrderInTable=!a.ascendingOrderInTable)).forEach(function(a){k.appendChild(a)});d.forEach(function(a){["highcharts-sort-ascending","highcharts-sort-descending"].forEach(function(b){a.classList.contains(b)&&a.classList.remove(b)})});b.classList.add(a.ascendingOrderInTable?"highcharts-sort-ascending":"highcharts-sort-descending")})})});d.prototype.setUpKeyToAxis=
function(){n.arearange&&(n.arearange.prototype.keyToAxis={low:"y",high:"y"});n.gantt&&(n.gantt.prototype.keyToAxis={start:"x",end:"x"})};d.prototype.getDataRows=function(b){var e=this.hasParallelCoordinates,k=this.time,d=this.options.exporting&&this.options.exporting.csv||{},c=this.xAxis,g={},l=[],n=[],p=[],D;var E=this.options.lang.exportData;var f=E.categoryHeader,P=E.categoryDatetimeHeader,u=function(q,e,k){if(d.columnHeaderFormatter){var g=d.columnHeaderFormatter(q,e,k);if(!1!==g)return g}return q?
q instanceof a?q.options.title&&q.options.title.text||(q.dateTime?P:f):b?{columnTitle:1<k?e:q.name,topLevelColumnTitle:q.name}:q.name+(1<k?" ("+e+")":""):f},L=function(a,b,e){var q={},k={};b.forEach(function(b){var g=(a.keyToAxis&&a.keyToAxis[b]||b)+"Axis";g=O(e)?a.chart[g][e]:a[g];q[b]=g&&g.categories||[];k[b]=g&&g.dateTime});return{categoryMap:q,dateTimeValueAxisMap:k}},r=function(a,b){return a.data.filter(function(a){return"undefined"!==typeof a.y&&a.name}).length&&b&&!b.categories&&!a.keyToAxis?
a.pointArrayMap&&a.pointArrayMap.filter(function(a){return"x"===a}).length?(a.pointArrayMap.unshift("x"),a.pointArrayMap):["x","y"]:a.pointArrayMap||["y"]},v=[];var A=0;this.setUpKeyToAxis();this.series.forEach(function(a){var h=a.xAxis,q=a.options.keys||r(a,h),B=q.length,l=!a.requireSorting&&{},m=c.indexOf(h),z=L(a,q),f;if(!1!==a.options.includeInDataExport&&!a.options.isInternal&&!1!==a.visible){N(v,function(a){return a[0]===m})||v.push([m,A]);for(f=0;f<B;)D=u(a,q[f],q.length),p.push(D.columnTitle||
D),b&&n.push(D.topLevelColumnTitle||D),f++;var F={chart:a.chart,autoIncrement:a.autoIncrement,options:a.options,pointArrayMap:a.pointArrayMap};a.options.data.forEach(function(b,u){e&&(z=L(a,q,u));var v={series:F};a.pointClass.prototype.applyOptions.apply(v,[b]);b=v.x;var c=a.data[u]&&a.data[u].name;f=0;if(!h||"name"===a.exportKey||!e&&h&&h.hasNames&&c)b=c;l&&(l[b]&&(b+="|"+u),l[b]=!0);g[b]||(g[b]=[],g[b].xValues=[]);g[b].x=v.x;g[b].name=c;for(g[b].xValues[m]=v.x;f<B;)u=q[f],c=v[u],g[b][A+f]=x(z.categoryMap[u][c],
z.dateTimeValueAxisMap[u]?k.dateFormat(d.dateFormat,c):null,c),f++});A+=f}});for(h in g)Object.hasOwnProperty.call(g,h)&&l.push(g[h]);var h=b?[n,p]:[p];for(A=v.length;A--;){var F=v[A][0];var H=v[A][1];var m=c[F];l.sort(function(a,b){return a.xValues[F]-b.xValues[F]});E=u(m);h[0].splice(H,0,E);b&&h[1]&&h[1].splice(H,0,E);l.forEach(function(a){var b=a.name;m&&!M(b)&&(m.dateTime?(a.x instanceof Date&&(a.x=a.x.getTime()),b=k.dateFormat(d.dateFormat,a.x)):b=m.categories?x(m.names[a.x],m.categories[a.x],
a.x):a.x);a.splice(H,0,b)})}h=h.concat(l);G(this,"exportData",{dataRows:h});return h};d.prototype.getCSV=function(a){var b="",k=this.getDataRows(),c=this.options.exporting.csv,d=x(c.decimalPoint,","!==c.itemDelimiter&&a?(1.1).toLocaleString()[1]:"."),g=x(c.itemDelimiter,","===d?";":","),f=c.lineDelimiter;k.forEach(function(a,e){for(var c,l=a.length;l--;)c=a[l],"string"===typeof c&&(c='"'+c+'"'),"number"===typeof c&&"."!==d&&(c=c.toString().replace(".",d)),a[l]=c;a.length=k.length?k[0].length:0;b+=
a.join(g);e<k.length-1&&(b+=f)});return b};d.prototype.getTable=function(a){var b=function(a){if(!a.tagName||"#text"===a.tagName)return a.textContent||"";var c=a.attributes,e="<".concat(a.tagName);c&&Object.keys(c).forEach(function(a){var b=c[a];e+=" ".concat(a,'="').concat(b,'"')});e+=">";e+=a.textContent||"";(a.children||[]).forEach(function(a){e+=b(a)});return e+="</".concat(a.tagName,">")};a=this.getTableAST(a);return b(a)};d.prototype.getTableAST=function(a){var b=0,c=[],d=this.options,f=a?(1.1).toLocaleString()[1]:
".",g=x(d.exporting.useMultiLevelHeaders,!0);a=this.getDataRows(g);var l=g?a.shift():null,m=a.shift(),n=function(a,b,c,e){var d=x(e,"");b="highcharts-text"+(b?" "+b:"");"number"===typeof d?(d=d.toString(),","===f&&(d=d.replace(".",f)),b="highcharts-number"):e||(b="highcharts-empty");c=J({"class":b},c);return{tagName:a,attributes:c,textContent:d}};!1!==d.exporting.tableCaption&&c.push({tagName:"caption",attributes:{"class":"highcharts-table-caption"},textContent:x(d.exporting.tableCaption,d.title.text?
d.title.text:"Chart")});for(var p=0,r=a.length;p<r;++p)a[p].length>b&&(b=a[p].length);c.push(function(a,b,c){var e=[],f=0;c=c||b&&b.length;var l=0,h;if(h=g&&a&&b){a:if(h=a.length,b.length===h){for(;h--;)if(a[h]!==b[h]){h=!1;break a}h=!0}else h=!1;h=!h}if(h){for(h=[];f<c;++f){var k=a[f];var m=a[f+1];k===m?++l:l?(h.push(n("th","highcharts-table-topheading",{scope:"col",colspan:l+1},k)),l=0):(k===b[f]?d.exporting.useRowspanHeaders?(m=2,delete b[f]):(m=1,b[f]=""):m=1,k=n("th","highcharts-table-topheading",
{scope:"col"},k),1<m&&k.attributes&&(k.attributes.valign="top",k.attributes.rowspan=m),h.push(k))}e.push({tagName:"tr",children:h})}if(b){h=[];f=0;for(c=b.length;f<c;++f)"undefined"!==typeof b[f]&&h.push(n("th",null,{scope:"col"},b[f]));e.push({tagName:"tr",children:h})}return{tagName:"thead",children:e}}(l,m,Math.max(b,m.length)));var t=[];a.forEach(function(a){for(var c=[],e=0;e<b;e++)c.push(n(e?"td":"th",null,e?{}:{scope:"row"},a[e]));t.push({tagName:"tr",children:c})});c.push({tagName:"tbody",
children:t});c={tree:{tagName:"table",id:"highcharts-data-table-".concat(this.index),children:c}};G(this,"aftergetTableAST",c);return c.tree};d.prototype.downloadCSV=function(){var a=this.getCSV(!0);K(m(a,"text/csv")||"data:text/csv,\ufeff"+encodeURIComponent(a),this.getFilename()+".csv")};d.prototype.downloadXLS=function(){var a='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head>\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>Ark1</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e<style>td{border:none;font-family: Calibri, sans-serif;} .number{mso-number-format:"0.00";} .text{ mso-number-format:"@";}</style><meta name=ProgId content=Excel.Sheet><meta charset=UTF-8></head><body>'+
this.getTable(!0)+"</body></html>";K(m(a,"application/vnd.ms-excel")||"data:application/vnd.ms-excel;base64,"+t.btoa(unescape(encodeURIComponent(a))),this.getFilename()+".xls")};d.prototype.viewData=function(){this.toggleDataTable(!0)};d.prototype.hideData=function(){this.toggleDataTable(!1)};d.prototype.toggleDataTable=function(a){(a=x(a,!this.isDataTableVisible))&&!this.dataTableDiv&&(this.dataTableDiv=l.createElement("div"),this.dataTableDiv.className="highcharts-data-table",this.renderTo.parentNode.insertBefore(this.dataTableDiv,
this.renderTo.nextSibling));this.dataTableDiv&&(this.dataTableDiv.style.display=a?"block":"none",a&&(this.dataTableDiv.innerHTML=c.emptyHTML,(new c([this.getTableAST()])).addToDOM(this.dataTableDiv),G(this,"afterViewData",this.dataTableDiv)));this.isDataTableVisible=a;a=this.exportDivElements;var b=this.options.exporting,d=b&&b.buttons&&b.buttons.contextButton.menuItems;b=this.options.lang;C&&C.menuItemDefinitions&&b&&b.viewData&&b.hideData&&d&&a&&(a=a[d.indexOf("viewData")])&&c.setElementHTML(a,
this.isDataTableVisible?b.hideData:b.viewData)};var C=p().exporting;C&&(J(C.menuItemDefinitions,{downloadCSV:{textKey:"downloadCSV",onclick:function(){this.downloadCSV()}},downloadXLS:{textKey:"downloadXLS",onclick:function(){this.downloadXLS()}},viewData:{textKey:"viewData",onclick:function(){this.toggleDataTable()}}}),C.buttons&&C.buttons.contextButton.menuItems.push("separator","downloadCSV","downloadXLS","viewData"));n.map&&(n.map.prototype.exportKey="name");n.mapbubble&&(n.mapbubble.prototype.exportKey=
"name");n.treemap&&(n.treemap.prototype.exportKey="name")});m(a,"masters/modules/export-data.src.js",[],function(){})});
//# sourceMappingURL=export-data.js.map;
define('../src/sublayouts/m29v3-chart/m29v3-chart',['jquery', 'vendor/moment', 'lib/utils', 'vendor/jquery.monthpicker', 'chart-config', 'pickerdate', 'highcharts/modules/exporting', 'highcharts/modules/export-data'],
    function($, moment, utils, datepicker, Highcharts) {

        'use strict';

        var ChartV2 = function($component) {

            this.$component = $component;
        };

        ChartV2.prototype.init = function() {
            var _this = this;

            //this.renderGraph();

            //this.listeners(false);

            this.selectedyear = [];
            this.selectedmonth = [];
            this.disabledMonth = [];
            this.totalYear = [];
            this.rate = 1;
            this.unit = '';
            //document.cookie = 'm29v3'+_this.$component.attr('data-cookie-id')+'='

            this.$component.off('m29v3-chart-init').on('m29v3-chart-init', function() {
                setTimeout(function() {

                    _this.$component.find('.m29v3-chart--typeitem').each(function() {
                        if ($(this).attr('data-conversion') != null && $(this).hasClass('m29v3-chart--typeitemactive')) {
                            _this.rate = parseFloat($(this).attr('data-conversion'));
                            _this.$component.attr('data-y-axis-text', $(this).attr('data-unit'));
                            _this.$component.attr('data-tooltip-value-suffix', $(this).attr('data-unit'));
                            _this.unit = ' ' + $(this).attr('data-unit');
                        };
                    });
                    _this.renderGraph(false, false);
                    _this.download();
                    _this.toggles();
                    _this.listeners(false);

                    //_this.disabledMonth = [];


                    _this.$component.find('.form-field__input--monthpicker').each(function() {
                        //$(this).val('');
                        //$(this).attr('data-month', '');
                        //$(this).attr('data-year', '');
                    });
                    //_this.monthInit();

                    _this.monthInit(true);
                }, 100);
                //console.log('adasdas')
            });

            this.$component.off('m29v3-chart-initEV').on('m29v3-chart-initEV', function() {
                setTimeout(function() {
                    _this.renderGraph(false, true);
                    _this.download();
                    _this.toggles();
                    _this.listeners(false);

                    _this.$component.find('.m29v3-chart--typeitem').each(function() {
                        if ($(this).attr('data-conversion') != null && $(this).hasClass('m29v3-chart--typeitemactive')) {
                            _this.rate = parseFloat($(this).attr('data-conversion'));
                            _this.$component.attr('data-y-axis-text', $(this).attr('data-unit'));
                            _this.$component.attr('data-tooltip-value-suffix', $(this).attr('data-unit'));
                            _this.unit = ' ' + $(this).attr('data-unit');
                        };
                    });
                    //_this.$component.find('.m29v3-chart--listitem.active').click();
                    //_this.disabledMonth = [];
                    _this.$component.find('.form-field__input--monthpicker').each(function() {
                        //$(this).val('');
                        //$(this).attr('data-month', '');
                        //$(this).attr('data-year', '');
                    });
                    //_this.monthInit(false);

                    _this.$component.find('.form-field__label-month').each(function() {
                        if ($(this).hasClass('active')) {
                            var cindex = $(this).attr('custom-index'),
                                $mylabel = $(this),
                                $legend = _this.$component.find('.highcharts-legend').find('.highcharts-legend-item[custom-index="' + cindex + '"]');

                            if ($legend.hasClass('highcharts-legend-item-hidden')) {
                                $(this).trigger('click');
                                $(this).trigger('mouseout');
                                $mylabel.addClass('active');
                                $mylabel.prev().css({
                                    color: $mylabel.attr('data-color')
                                });
                            };
                        };
                    });

                }, 100);
                //console.log('adasdas')
            });

            this.$component.off('m29v3-chart-nodata').on('m29v3-chart-nodata', function() {
                _this.$component.find('.m29v3-chart__nodata-container').show();
                _this.$component.find('.m29v3-chart--download').hide();
                _this.$component.find('.m29v3-chart__container').hide();
                _this.$component.find('.m29v3-chart__label').hide();
                if (_this.$component.hasClass('m29v3-chart--EV')) {
                    _this.$component.find('.m29v3-chart--controls.active[data-index="1"]').css({
                        opacity: '0',
                        height: '0'
                    });
                    // _this.$component.find('.m29v3-chart--type').hide();
                    // _this.$component.find('.m29v3-chart--tablist').hide();
                }
                if (!_this.$component.hasClass('m29v3-chart--EV')) {
                    _this.disabledMonth = [];
                };
            });

            $(window).on('changeMinMonth', function() {
                _this.monthInit(true);
            });

            this.$component.find('.form-field__input--datepicker').each(function() {
                var __this = $(this);

                var picker = __this.pickadate().pickadate('picker');

                picker.on('set', function(event) {
                    if (event.select) {
                        _this.$component.find('.form-field__input--datepicker').not(__this).pickadate().pickadate('picker').set('enable', true);
                        _this.$component.find('.form-field__input--datepicker').not(__this).pickadate().pickadate('picker').set('disable', [picker.get('select').obj])
                    }
                });
            });
        };

        ChartV2.prototype.monthInit = function(destroy) {
            var _this = this,
                disabledYear = [];

            this.$component.find('.form-field__input--monthpicker').each(function() {
                var imonth_ar = ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
                    imonth_en = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
                    imonthindex;

                if (!utils.isRTL()) {
                    imonthindex = imonth_en.indexOf($(this).val().slice(0, -5)) + 1;
                } else {
                    imonthindex = imonth_ar.indexOf($(this).val().slice(0, -5)) + 1;
                }

                var __this = this,
                    min = moment($(this).attr('data-mindate'), 'YYYY-MM-DD HH:mm').toDate(),
                    max = moment($(this).attr('data-maxdate'), 'YYYY-MM-DD HH:mm').toDate(),
                    currVal = $(this).val() != '' && $(this).val() != undefined ? moment($(this).val().slice(-5) + '-' + imonthindex.toString(), 'YYYY-MM-DD HH:mm').toDate() : '';

                //console.log(currVal);

                if (min.toString() == 'Invalid Date') {
                    min = moment('Jan 1990', 'YYYY-MM-DD HH:mm').toDate();
                }

                if (max.toString() == 'Invalid Date') {
                    max = new Date();
                }

                //console.log(min)
                if (destroy) {
                    $(this).datepicker().data('datepicker').destroy();
                };

                _this.disabledMonth.push(JSON.parse('{"month":"' + parseInt($(this).attr('data-month')) + '", "year":"' + parseInt($(this).attr('data-year')) + '"}'));

                var optsMonths = {
                    language: utils.isRTL() ? 'ar' : 'en',
                    minView: 'months',
                    view: 'months',
                    autoClose: true,
                    clearButton: true,
                    closeButton: true,
                    maxDate: max,
                    minDate: min,
                    position: utils.isRTL() ? 'bottom right' : 'bottom left',
                    dateFormat: 'MM yyyy',
                    onRenderCell: function(date, cellType) {
                        if (cellType == 'month') {
                            var month = (moment(date, 'YYYY-MM-DD HH:mm').toDate()).getMonth(),
                                year = (moment(date, 'YYYY-MM-DD HH:mm').toDate()).getFullYear(),
                                match = 0,
                                isDisabled = false;
                            //isDisabled = Object.values(_this.disabledMonth).indexOf(month.toString()) != -1 && disabledYear.indexOf(year) != -1;
                            $(_this.disabledMonth).each(function(index) {
                                if (Object.values(this).indexOf(month.toString()) != -1) {
                                    if (_this.disabledMonth[index].year == year.toString()) {
                                        match = match + 1;
                                    }
                                }
                            });
                            if (match > 0) {
                                isDisabled = true;
                            }
                            return {
                                disabled: isDisabled
                            }
                        }
                    },
                    onSelect: function(date) {
                        $(__this).trigger('change');

                        var month_ar = ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
                            month_en = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];

                        $(month_ar).each(function() {
                            if (date.includes(this)) {
                                date = date.replace(this, month_en[month_ar.indexOf(this)])
                            }
                        })

                        var dat = moment(date, 'YYYY-MM-DD HH:mm').toDate();
                        var dat2 = moment(date, 'YYYY-MM-DD');
                        //console.log(dat2);

                        var dat3 = moment(date, 'MMMM YYYY').toDate();
                        var for_date = dat2.toDate();

                        $(__this).attr('data-month', dat3.getMonth())
                        //if (false) {
                        //    _this.disabledMonth.splice(0, 1);
                        //    _this.disabledMonth.push(dat.getMonth());
                        //} else {
                        //    _this.disabledMonth = [];
                        //    _this.disabledMonth.push(dat.getMonth());
                        //}
                        $(__this).attr('data-year', dat3.getFullYear())
                        //if (false) {
                        //    disabledYear.splice(0, 1);
                        //    disabledYear.push(dat.getFullYear());
                        //} else {
                        //    disabledYear = [];
                        //    disabledYear.push(dat.getFullYear());
                        //}
                        _this.disabledMonth = [];
                        //disabledYear = [];
                        _this.$component.find('.form-field__input--monthpicker').each(function() {
                            _this.disabledMonth.push(JSON.parse('{"month":"' + parseInt($(this).attr('data-month')) + '", "year":"' + parseInt($(this).attr('data-year')) + '"}'))
                            //disabledYear.push(parseInt($(this).attr('data-year')))
                        });
                        _this.$component.find('.form-field__input--monthpicker').not(__this).datepicker().data('datepicker').update();
                    }
                };

                $(this).datepicker({
                    language: utils.isRTL() ? 'ar' : 'en',
                    minView: 'months',
                    view: 'months',
                    autoClose: true,
                    clearButton: true,
                    closeButton: true,
                    maxDate: max,
                    minDate: min,
                    position: utils.isRTL() ? 'bottom right' : 'bottom left',
                    dateFormat: 'MM yyyy',
                    onRenderCell: function(date, cellType) {
                        if (cellType == 'month') {
                            var month = (moment(date, 'YYYY-MM-DD HH:mm').toDate()).getMonth(),
                                year = (moment(date, 'YYYY-MM-DD HH:mm').toDate()).getFullYear(),
                                match = 0,
                                isDisabled = false;
                            //isDisabled = Object.values(_this.disabledMonth).indexOf(month.toString()) != -1 && disabledYear.indexOf(year) != -1;
                            $(_this.disabledMonth).each(function(index) {
                                if (Object.values(this).indexOf(month.toString()) != -1) {
                                    if (_this.disabledMonth[index].year == year.toString()) {
                                        match = match + 1;
                                    }
                                }
                            });
                            if (match > 0) {
                                isDisabled = true;
                            }
                            return {
                                disabled: isDisabled
                            }
                        }
                    }
                }).data('datepicker').selectDate(currVal);
                $(this).datepicker().data('datepicker').update(optsMonths);
            });
        };

        ChartV2.prototype.listeners = function(isType) {
            var _this = this;

            $('.m29v3-chart--fakecbox').off('click.box').on('click.box', function() {
                var $input = $(this).find('input')
                $(this).toggleClass('active');

                if ($(this).hasClass('active')) {
                    $input.prop('checked', true);
                } else {
                    $input.prop('checked', false);
                }
            });

            this.$component.find('.m29v3-chart--typeitem').each(function() {

                $(this).off('click.and').on('click.and', function() {
                    $(this).closest('.m29v3-chart--type').find('.m29v3-chart--typeitem').each(function() {
                        $(this).removeClass('m29v3-chart--typeitemactive')
                    });

                    if ($(this).attr('data-conversion') != null) {
                        _this.rate = parseFloat($(this).attr('data-conversion'));
                        _this.$component.attr('data-y-axis-text', $(this).attr('data-unit'));
                        _this.$component.attr('data-tooltip-value-suffix', $(this).attr('data-unit'));
                        _this.unit = ' ' + $(this).attr('data-unit');
                    };

                    if (!$(this).hasClass('m29v3-chart--typeitemactive')) {
                        $(this).addClass('m29v3-chart--typeitemactive');
                        _this.renderGraph(true);
                        _this.listeners(true);
                    };

                });
            });

            this.$component.find('.m29v3-chart--year').each(function(index) {
                $(this).off('click.year').on('click.year', function() {
                    var $clicked = $(this),
                        $siblings = $(this).closest('.m29v3-chart--controls').find('.m29v3-chart--year'),
                        cindex = $(this).attr('custom-index'),
                        $alert = _this.$component.find('.m29v3-chart--year_alert'),
                        active = 0;

                    _this.totalYear = [];

                    if ($clicked.hasClass('m29v3-chart--year_active')) {
                        $siblings.each(function() {
                            if ($(this).hasClass('m29v3-chart--year_active')) {
                                active = active + 1;
                            };
                        });
                        if (active != 1) {
                            var ser = _this.$component.find('[data-chart-container]').highcharts().series,
                                serIndex = parseInt(cindex);

                            $clicked.removeClass('m29v3-chart--year_active');
                            $clicked.attr('style', '');

                            if (ser[serIndex].visible) {
                                ser[serIndex].hide();
                            } else {
                                ser[serIndex].show();
                            }

                            //_this.$component.find('.highcharts-legend').find('.highcharts-legend-item[custom-index="' + cindex + '"]').trigger('click');
                            //_this.$component.find('.highcharts-legend').find('.highcharts-legend-item[custom-index="' + cindex + '"]').trigger('mouseout');
                            $alert.hide();
                        }
                    } else {
                        $siblings.each(function() {
                            if ($(this).hasClass('m29v3-chart--year_active')) {
                                active = active + 1;
                            };
                        });

                        if (active < 3) {
                            var ser = _this.$component.find('[data-chart-container]').highcharts().series,
                                serIndex = parseInt(cindex);

                            $clicked.addClass('m29v3-chart--year_active');

                            if (ser[serIndex].visible) {
                                ser[serIndex].hide();
                            } else {
                                ser[serIndex].show();
                            }

                            //_this.$component.find('.highcharts-legend').find('.highcharts-legend-item[custom-index="' + cindex + '"]').trigger('click');
                            //_this.$component.find('.highcharts-legend').find('.highcharts-legend-item[custom-index="' + cindex + '"]').trigger('mouseout');
                            $clicked.css({
                                background: $clicked.attr('data-color'),
                                borderColor: $clicked.attr('data-color'),
                            })
                        } else {
                            $alert.show();
                        };
                    }

                    _this.$component.find('.m29v3-chart--year').each(function() {
                        if ($(this).hasClass('m29v3-chart--year_active')) {
                            _this.totalYear.push($(this).attr('custom-index'))
                        };
                        _this.$component.find('.m29v3-chart--listitem.active').attr('data-selected-series', _this.totalYear.toString())
                    });
                });

            });

            this.$component.find('.form-field__label-month').each(function(index) {
                $(this).off('click.month').on('click.month', function() {
                    var $clicked = $(this),
                        $siblings = $(this).closest('.m29v3-chart--controls').find('.form-field__label-month'),
                        cindex = $(this).attr('custom-index'),
                        active = 0;

                    _this.totalYear = [];

                    if ($clicked.hasClass('active')) {
                        $siblings.each(function() {
                            if ($(this).hasClass('active')) {
                                active = active + 1;
                            };
                        });
                        if (active != 1) {
                            var ser = _this.$component.find('[data-chart-container]').highcharts().series,
                                serIndex = parseInt(cindex);

                            $clicked.removeClass('active');
                            $clicked.attr('style', '');

                            if (ser[serIndex].visible) {
                                ser[serIndex].hide();
                            } else {
                                ser[serIndex].show();
                            }

                            //_this.$component.find('.highcharts-legend').find('.highcharts-legend-item[custom-index="' + cindex + '"]').trigger('click');
                            //_this.$component.find('.highcharts-legend').find('.highcharts-legend-item[custom-index="' + cindex + '"]').trigger('mouseout');
                            $clicked.prev().css({
                                color: '#c6c6c6'
                            });
                        };
                        //$alert.hide();
                    } else {
                        var ser = _this.$component.find('[data-chart-container]').highcharts().series,
                            serIndex = parseInt(cindex);

                        $clicked.addClass('active');

                        if (ser[serIndex].visible) {
                            ser[serIndex].hide();
                        } else {
                            ser[serIndex].show();
                        }

                        //_this.$component.find('.highcharts-legend').find('.highcharts-legend-item[custom-index="' + cindex + '"]').trigger('click');
                        //_this.$component.find('.highcharts-legend').find('.highcharts-legend-item[custom-index="' + cindex + '"]').trigger('mouseout');


                        $clicked.prev().css({
                            color: $clicked.attr('data-color')
                        })
                    }

                    _this.$component.find('.form-field__label-month').each(function() {
                        if ($(this).hasClass('active')) {
                            _this.totalYear.push($(this).attr('custom-index'))
                        };
                        _this.$component.find('.m29v3-chart--listitem.active').attr('data-selected-series', _this.totalYear.toString())
                    });
                });

            });

            if (isType) {
                //console.log(_this.selectedmonth)
                $(_this.selectedyear).each(function() {
                    _this.$component.find('.m29v3-chart--year[custom-index="' + this + '"]').trigger('click');
                });
                $(_this.selectedmonth).each(function() {
                    //_this.$component.find('.form-field__label-month[custom-index="' + this + '"]').trigger('click');
                    //_this.$component.find('.form-field__label-month[custom-index="' + this + '"]').addClass('active');
                    //_this.$component.find('.form-field__label-month[custom-index="' + this + '"]').prev().css({
                    //        color: _this.$component.find('.form-field__label-month[custom-index="' + this + '"]').attr('data-color')
                    //});
                });
            }

            $(_this.selectedmonth).each(function() {
                _this.$component.find('.form-field__label-month[custom-index="' + this + '"]').not('.active').trigger('click');
                //_this.$component.find('.form-field__label-month[custom-index="' + this + '"]').addClass('active');
                //_this.$component.find('.form-field__label-month[custom-index="' + this + '"]').prev().css({
                //        color: _this.$component.find('.form-field__label-month[custom-index="' + this + '"]').attr('data-color')
                //});
            });

            //console.log(_this.selectedmonth)
            _this.$component.find('.m29v3-chart--controls.active').find('.form-field__label').not('.active').each(function() {
                //$(this).trigger('click');
            });
            //setTimeout(function() {}, 100)

        };

        ChartV2.prototype.toggles = function() {
            var _this = this,
                $tab = this.$component.find('.m29v3-chart--listitem'),
                $controls = this.$component.find('.m29v3-chart--controls');

            $tab.each(function() {
                var index = $(this).attr('data-index');

                $(this).off('click.tab').on('click.tab', function() {
                    $controls.each(function() {
                        if ($(this).attr('data-index') == index) {
                            if (!$(this).hasClass('active')) {
                                $(this).addClass('active');
                            };
                        } else {
                            $(this).removeClass('active');
                        }
                    });

                    $tab.each(function() {
                        $(this).removeClass('active');
                    });

                    $(this).addClass('active');

                    if ($(this).hasClass('m29v3-chart__container--nolegend')) {
                        if (!_this.$component.hasClass('m29v3-chart__container--nolegend')) {
                            _this.$component.find('.m29v3-chart__container').addClass('m29v3-chart__container--nolegend')
                        };
                    } else {
                        _this.$component.find('.m29v3-chart__container').removeClass('m29v3-chart__container--nolegend');
                    }
                    //_this.renderGraph();
                });
            });
        };

        ChartV2.prototype.download = function() {
            var _this = this,
                $download = this.$component.find('.m29v3-chart--download');

            $download.off('click.dl').on('click.dl', function() {
                //$panel.toggleClass('hidden');
                //_this.$component.find('.highcharts-exporting-group').find('.highcharts-contextbutton').click()
                //_this.$component.find('.highcharts-contextmenu').find('.highcharts-menu-item:nth-child(10)').click()
                var dlChart = _this.$component.find('[data-chart-container]').highcharts();

                dlChart.downloadXLS();
            });
        };

        ChartV2.prototype.renderGraph = function(isType, isEV) {
            var _this = this,
                listyear = this.$component.find('.m29v3-chart--listitem.active').attr('data-selected-series').split(',');

            this.selectedyear = [];
            this.selectedmonth = [];

            this.$component.find('.form-field__input--monthpicker').each(function() {
                $(this).off('change.label').on('change.label', function() {
                    if (!$(this).closest('.form-field').find('.form-field__label-month').hasClass('active')) {
                        $(this).closest('.form-field').find('.form-field__label-month').addClass('active');
                        $(this).prev().trigger('click');
                    };
                });
            });

            if (!isType) {
                _this.$component.find('.m29v3-chart__nodata-container').hide();
                _this.$component.find('.m29v3-chart__container').show();
                _this.$component.find('.m29v3-chart__label').show();
                _this.$component.find('.m29v3-chart--download').each(function() {
                    $(this).show();
                });
                if (_this.$component.hasClass('m29v3-chart--EV')) {
                    _this.$component.find('.m29v3-chart--controls.active[data-index="1"]').css({
                        opacity: '1',
                        height: 'auto'
                    });
                    // _this.$component.find('.m29v3-chart--type').show();
                    // _this.$component.find('.m29v3-chart--tablist').show();
                };
            } else {
                this.$component.find('.m29v3-chart--controls.active').find('.m29v3-chart--year_active').each(function() {
                    _this.selectedyear.push($(this).attr('custom-index'))
                });
            };

            this.$component.find('.m29v3-chart--controls.active').find('.form-field__label-month.active').each(function() {
                _this.selectedmonth.push($(this).attr('custom-index'))
            });

            //_this.$component.find('.m29v3-chart--download').css('display', 'absolute');

            var labelRotate = 0;
            if ($(window).width() <= 1024) {
                labelRotate = 270;
                if ($('html').attr('dir') == "rtl") {
                    labelRotate = 270;
                }
            }

            if (_this.$component.attr('data-x-axis-categories-rotate') == 'true') {
                labelRotate = 270;
            }

            var $container = this.$component.find('[data-chart-container]'),
                series = JSON.parse(this.$component.attr('data-series')),
                yAxisTitleText = this.$component.attr('data-y-axis-text'),
                xAxisTitleText = this.$component.attr('data-x-axis-text'),
                xAxisCategories = this.$component.attr('data-x-axis-categories').split(','),
                tooltipValueSuffix = this.$component.attr('data-tooltip-value-suffix'),
                isRTL = utils.isRTL(),
                alignment = utils.isRTL() ? 'left' : 'right',
                usageFor = this.$component.attr('data-usagefor'),
                legend = this.$component.attr('data-legend'),
                label = this.$component.attr('data-label'),
                labelstyle = this.$component.attr('data-labelstyle'),
                thickness = utils.breakpoint() == 'l' ? 10 : 3,
                labelXAxisStep = parseInt(this.$component.attr('data-step'), 10) || 1,
                labelXAxisStepMobile = parseInt(this.$component.attr('data-step-s'), 10) || 1;

            if (_this.$component.find('.m29v3-chart--controls.active[data-index="2"]').closest('.m29v3-chart--EV ').length == 0) {
                $(series).each(function(index) {
                    if ($(this)[0].name.length == 0) {
                        series.splice(series.indexOf(this), 1)
                    }
                })

                for (var i = 0; i < series.length; i++) {
                    if (series[i].data.length == 0) {
                        series.splice(i, 1);
                    };
                };
            };

            $(series).each(function() {
                this.data = this.data.map(function(num) {
                    return num != null ? parseFloat(numeral(num * _this.rate).format('0.00')) : null;
                });
                // console.log(this);
            });

            if (!isEV) {

                var opts = {
                    chart: {
                        type: this.$component.find('.m29v3-chart--typeitemactive').not('.conversion').attr('data-type')
                    },

                    title: {
                        text: ''
                    },

                    subtitle: {
                        text: '',
                        style: {
                            display: 'none'
                        }
                    },
                    legend: {
                        verticalAlign: 'top',
                        align: alignment,
                        itemStyle: {
                            fontSize: '16px'
                        },
                        //title: {
                        //    text: legend,
                        //    style: {
                        //        fontWeight: 'light',
                        //        fontSize: '16px'
                        //    }
                        //},
                        rtl: $('html').attr('dir') == "rtl",
                        symbolWidth: 16,
                        symbolRadius: 10,
                    },
                    plotOptions: {
                        spline: {
                            marker: {
                                radius: 4,
                                lineColor: '#666666',
                                lineWidth: 1
                            }
                        },
                        series: {
                            pointWidth: thickness,
                            borderRadius: utils.breakpoint() == 'l' ? 5 : 3,
                        }

                    },
                    xAxis: {
                        reversed: isRTL,
                        categories: xAxisCategories,
                        title: {
                            text: xAxisTitleText,
                            style: {
                                display: 'none'
                            }
                        },
                        labels: {
                            autoRotation: false,
                            style: {
                                fontSize: '12px'
                            },
                            rotation: labelRotate
                        },
                        minRange: 0.01
                    },
                    yAxis: {
                        opposite: isRTL,
                        //tickInterval: 10000,
                        title: {
                            text: yAxisTitleText,
                            style: {
                                fontWeight: 'bold',
                                fontSize: '16px'
                            },
                            align: 'high',
                            reserveSpace: false,
                            offset: 0,
                            rotation: 0,
                            y: -15,
                            textAlign: utils.isRTL() ? "right" : "left"
                        },
                        plotLines: [{
                            value: 0,
                            width: 1,
                            color: '#808080'
                        }]
                    },
                    tooltip: {
                        headerFormat: '<span style="font-size: 12px;font-weight:bold;">' + usageFor + '</span> {point.x}<br> ',
                        // pointFormat: utils.isRTL() ? '<span style="text-align:right;width:100%;display:inline-block;direction:rtl;"> {series.name}:<b> {point.y}</b><span style="color:{point.color}">\u25CF</span></span><br/>' : '<span style="color:{point.color}">\u25CF</span>{series.name}:<b> {point.y}</b> <br/>',
                        pointFormatter: function() {
                            const isRTL = utils.isRTL();
                            const seriesName = this.series.name.trim() != '' ? `${this.series.name}: ` : '';
                            const pointSymbol = `<span style="color:${this.color}">\u25CF</span>`;
                            const value = `<b>${this.y + (_this.unit == '' ? ' '+tooltipValueSuffix : _this.unit)}</b>`;

                            if (isRTL) {
                                return `<span style="text-align:right;width:100%;display:inline-block;direction:rtl;"> 
                                            ${seriesName}${value} ${pointSymbol}
                                        </span><br/>`;
                            } else {
                                return `${pointSymbol} ${seriesName}${value} <br/>`;
                            }

                        },
                        valueSuffix: ' ' + tooltipValueSuffix,
                        crosshairs: true,
                        shared: true,
                        useHTML: true

                    },
                    exporting: {
                        // filename: $('.m43-accountsel__selected').find('[data-acc-detail="acc_number"]').html().replace('(', "").replace(')', "") + '-' + _this.$component.find('.m29v3-chart--title').html().replace(/\s/g, '-') + '-' + _this.$component.find('.m29v3-chart--listitem.active').html() + _this.getSelected(),
                        // tableCaption: $('.m43-accountsel__selected').find('[data-acc-detail="acc_number"]').html().replace('(', "").replace(')', "") + '-' + _this.$component.find('.m29v3-chart--title').html().replace(/\s/g, '-') + '-' + _this.$component.find('.m29v3-chart--listitem.active').html() + _this.getSelected(),
                        filename: _this.$component.find('.m29v3-chart--title').text() + ' - ' + _this.$component.find('.m29v3-chart--listitem.active').text() + _this.unit,
                        tableCaption: _this.$component.find('.m29v3-chart--title').text() + ' - ' + _this.$component.find('.m29v3-chart--listitem.active').text() + _this.unit,
                        chartOptions: {
                            title: {
                                text: _this.$component.find('.m29v3-chart--title').html() + ' - ' + _this.$component.find('.m29v3-chart--listitem.active').text() + _this.unit
                            },
                            yAxis: {
                                title: {
                                    text: '{series.name}' + tooltipValueSuffix
                                },
                                labels: {
                                    format: '{point.y}'
                                }
                            }
                        }
                    },

                    series: series
                };
            } else {

                var opts = {
                    chart: {
                        type: this.$component.find('.m29v3-chart--typeitemactive').attr('data-type')
                    },

                    title: {
                        text: ''
                    },

                    subtitle: {
                        text: '',
                        style: {
                            display: 'none'
                        }
                    },
                    legend: {
                        verticalAlign: 'top',
                        align: alignment,
                        itemStyle: {
                            fontSize: '16px'
                        },
                        //title: {
                        //    text: legend,
                        //    style: {
                        //        fontWeight: 'light',
                        //        fontSize: '16px'
                        //    }
                        //},
                        rtl: $('html').attr('dir') == "rtl",
                        symbolWidth: 16,
                        symbolRadius: 10,
                    },
                    plotOptions: {
                        spline: {
                            marker: {
                                radius: 4,
                                lineColor: '#666666',
                                lineWidth: 1
                            }
                        },
                        series: {
                            pointWidth: thickness,
                            borderRadius: utils.breakpoint() == 'l' ? 5 : 3
                        }

                    },
                    xAxis: {
                        reversed: isRTL,
                        categories: xAxisCategories,
                        title: {
                            text: xAxisTitleText,
                            style: {
                                display: 'none'
                            }
                        },
                        labels: {
                            autoRotation: false,
                            style: {
                                fontSize: '12px'
                            },
                            rotation: labelRotate
                        },
                        minRange: 0.01
                    },
                    yAxis: {
                        opposite: isRTL,
                        //tickInterval: 10000,
                        title: {
                            text: yAxisTitleText,
                            style: {
                                fontWeight: 'bold',
                                fontSize: '16px'
                            },
                            align: 'high',
                            reserveSpace: false,
                            offset: 0,
                            rotation: 0,
                            y: -15,
                            textAlign: utils.isRTL() ? "right" : "left"
                        },
                        plotLines: [{
                            value: 0,
                            width: 1,
                            color: '#808080'
                        }]
                    },
                    tooltip: {
                        headerFormat: '<span style="font-size: 12px;font-weight:bold;">' + usageFor + '</span> {point.x}<br> ',
                        pointFormat: utils.isRTL() ? '<span style="text-align:right;width:100%;display:inline-block;"><b> {point.y}</b> :{series.name}<span style="color:{point.color}">\u25CF</span></span><br/>' : '<span style="color:{point.color}">\u25CF</span>{series.name}:<b> {point.y}</b> <br/>',
                        valueSuffix: tooltipValueSuffix,
                        crosshairs: true,
                        shared: true,
                        useHTML: true

                    },

                    series: series
                };
            }

            $container.highcharts(opts);

            //console.log($container.highcharts().series)

            this.$component.find('.m29v3-chart__legend--item').each(function() {
                $(this).find('.m29v3-chart__legend--item-icon').css('color', $(this).data('color'));
            });

            this.$component.find('.m29v3-chart--year').remove();
            this.$component.find('.form-field__label-month').removeClass('active');
            this.$component.find('.form-field__label-month').prev().attr('style', '');

            this.$component.find('.highcharts-legend').find('.highcharts-legend-item').each(function(index) {
                var $legend = $(this),
                    year = $(this).find('text').text(),
                    indexi = index,
                    color = $(this).find('path:first-child').attr('stroke');

                if ($(this).find('path:first-child').attr('stroke') == undefined) {
                    color = $(this).find('rect').attr('fill');
                };

                $(this).attr('custom-index', index.toString());

                if ((listyear.indexOf(index.toString()) != -1) && !isType) {
                    _this.$component.find('.m29v3-chart--yearlabel').closest('.form-field').append('<button class="m29v3-chart--year m29v3-chart--year_active" custom-index="' + index.toString() + '" style="background: ' + color + '; border-color: ' + color + '" data-color="' + color + '"> ' + year + ' </button>');
                    _this.$component.find('.m29v3-chart--controls.active').find('.form-field__label').each(function(index) {
                        //console.log($(this).html())
                        if (index == indexi) {
                            $(this).attr('custom-index', index.toString());
                            $(this).attr('data-color', color);
                            $(this).addClass('active');
                            $(this).prev().css('color', color)
                        };
                    });

                } else {
                    _this.$component.find('.m29v3-chart--yearlabel').closest('.form-field').append('<button class="m29v3-chart--year" custom-index="' + index.toString() + '" data-color="' + color + '"> ' + year + ' </button>');
                    _this.$component.find('.m29v3-chart--controls.active').find('.form-field__label').not('.aria-only').each(function(index) {
                        //console.log($(this).html())
                        if (index == indexi) {
                            $(this).attr('custom-index', index.toString());
                            $(this).attr('data-color', color);
                        };
                    });
                    var ser = _this.$component.find('[data-chart-container]').highcharts().series,
                        serIndex = parseInt(indexi);

                    ser[serIndex].hide();
                };
            });
        };

        ChartV2.prototype.getSelected = function() {
            var _this = this,
                total = '';

            if (this.$component.find('.m29v3-chart--listitem.active').hasClass('m29v3-chart__container--nolegend')) {
                _this.$component.find('.m29v3-chart--year.m29v3-chart--year_active').each(function(index) {
                    if (index == 0) {
                        total = total + '(' + $(this).html().trim();
                    } else {
                        total = total + ',' + $(this).html().trim();
                    }

                });
            } else {
                _this.$component.find('.form-field__label-month.active').each(function(index) {
                    if (index == 0) {
                        total = total + '(' + $(this).parent('.form-field').find('.form-field__input').val().replace(/\s/g, '-');
                    } else {
                        total = total + ',' + $(this).parent('.form-field').find('.form-field__input').val().replace(/\s/g, '-');
                    }

                });
            }

            return total + ')';
        };

        return ChartV2;
    });
define('../src/sublayouts/m29v4-chart/m29v4-chart',['jquery', 'vendor/moment', 'lib/utils', 'vendor/jquery.monthpicker', 'chart-config', 'pickerdate', 'highcharts/modules/exporting', 'highcharts/modules/export-data'],
        function($, moment, utils, datepicker, Highcharts) {

            'use strict';

            var ChartV4 = function($component) {

                this.$component = $component;
            };

            ChartV4.prototype.init = function() {
                var _this = this;

                //this.renderGraph();

                //this.listeners(false);

                this.selectedyear = [];
                this.selectedmonth = [];
                this.disabledMonth = [];
                this.totalYear = [];
                //document.cookie = 'm29v3'+_this.$component.attr('data-cookie-id')+'='

                this.$component.off('m29v4-chart-init').on('m29v4-chart-init', function() {
                    setTimeout(function() {
                        _this.renderGraph(false);
                        _this.download();
                    }, 100);
                });




                var startDate = this.$component.attr('data-start-date'),
                    endDate = this.$component.attr('data-end-date'),
                    dateArr,
                    prevDate,
                    nextDate;


                }

                ChartV4.prototype.download = function() {
                    var _this = this,
                        $download = this.$component.find('.m29v4-chart--download');
                    //$pdf = this.$component.find('.m29v4-chart--download--pdf'),
                    //$xls = this.$component.find('.m29v4-chart--download--xls'),
                    //$panel = this.$component.find('.m29v4-chart--download_panel');

                    $download.off('click.dl').on('click.dl', function() {
                        //$panel.toggleClass('hidden');
                        _this.$component.find('.highcharts-exporting-group').find('.highcharts-contextbutton').click()
                        _this.$component.find('.highcharts-contextmenu').find('.highcharts-menu-item:nth-child(10)').click()
                    });
                    //$pdf.off('click.dl').on('click.dl', function() {
                    //_this.$component.find('.highcharts-exporting-group').find('.highcharts-contextbutton').click();
                    //_this.$component.find('.highcharts-contextmenu').find('.highcharts-menu-item:nth-child(6)').click();
                    //$panel.addClass('hidden');
                    //});

                    //$xls.off('click.dl').on('click.dl', function() {
                    //_this.$component.find('.highcharts-exporting-group').find('.highcharts-contextbutton').click();
                    //_this.$component.find('.highcharts-contextmenu').find('.highcharts-menu-item:nth-child(10)').click();
                    //$panel.addClass('hidden');
                    //});
                };

                ChartV4.prototype.renderGraph = function(isType) {
                    var _this = this

                    this.selectedyear = [];
                    this.selectedmonth = [];


                    var $container = this.$component.find('[data-chart-container]'),
                        series = JSON.parse(this.$component.attr('data-series')),
                        yAxisTitleText = this.$component.attr('data-y-axis-text'),
                        xAxisTitleText = this.$component.attr('data-x-axis-text'),
                        highValue = this.$component.attr('data-high-value'),
                        colorStatus = this.$component.attr('data-status'),
                        xAxisCategories = this.$component.attr('data-x-axis-categories').split(','),
                        tooltipValueSuffix = this.$component.attr('data-tooltip-value-suffix'),
                        isRTL = utils.isRTL(),
                        lang = $('html').attr('dir'),
                        alignment = utils.isRTL() ? 'left' : 'right',
                        usageFor = this.$component.attr('data-usagefor'),
                        legend = this.$component.attr('data-legend'),
                        label = this.$component.attr('data-label'),
                        labelstyle = this.$component.attr('data-labelstyle'),
                        thickness = utils.breakpoint() == 'l' ? 10 : 3,
                        labelXAxisStep = parseInt(this.$component.attr('data-step'), 10) || 1,
                        labelXAxisStepMobile = parseInt(this.$component.attr('data-step-s'), 10) || 1;



                        
                       
                        var seriesObj = jQuery.map( series[0].data, function( value, index ) {
                            return ({y : value,color:'#127bbe'});
                        });
                        
                        var colorGroup = colorStatus.split(',');
                        $.each(colorGroup, function( index, value ) {
                            if(value == 1){
                                seriesObj[index].color = '#B00020'
                            }
                        });


                    var opts = {
                        chart: {
                            type: 'column'
                        },

                        title: {
                            text: ''
                        },

                        subtitle: {
                            text: '',
                            style: {
                                display: 'none'
                            }
                        },
                        legend: {
                            verticalAlign: 'top',
                            align: alignment,
                            itemStyle: {
                                fontSize: '16px'
                            },
                            //title: {
                            //    text: legend,
                            //    style: {
                            //        fontWeight: 'light',
                            //        fontSize: '16px'
                            //    }
                            //},
                            rtl: $('html').attr('dir') == "rtl",
                            symbolWidth: 16,
                            symbolRadius: 10,
                        },
                        plotOptions: {
                            spline: {
                                marker: {
                                    radius: 4,
                                    lineColor: '#127bbe',
                                    lineWidth: 1
                                }
                            },
                            series: {
                                pointWidth: thickness,
                                borderRadius: utils.breakpoint() == 'l' ? 5 : 3,
                            }
                        },
                        xAxis: {
                            reversed: isRTL,
                            categories: xAxisCategories,
                            title: {
                                text: xAxisTitleText,
                                style: {
                                    display: 'none'
                                }
                            },
                            labels: {
                                autoRotation: false,
                                rotation: utils.isRTL() ? 90 : 270,
                                style: {
                                    fontSize: '12px'
                                },
                                //rotation: labelRotate
                            },
                            minRange: 0.01
                        },
                        yAxis: {
                            opposite: isRTL,
                            //tickInterval: 10000,
                            title: {
                                text: yAxisTitleText,
                                style: {
                                    fontWeight: 'bold',
                                    fontSize: '16px'
                                },
                                align: 'high',
                                reserveSpace: false,
                                offset: 0,
                                rotation: 0,
                                y: -15,
                                textAlign: utils.isRTL() ? "right" : "left"
                            },
                            plotLines: [{
                                value: 0,
                                width: 1,
                                color: '#808080'
                            }]
                        },
                        tooltip: {
                            headerFormat: '<span style="font-size: 12px;font-weight:bold;">' + usageFor + '</span> {point.x}<br> ',
                            pointFormat:'<span style="text-align:right;width:100%;display:inline-block;"><b> {point.y}</b><span style="color:{point.color}">\u25CF</span></span><br/>' ,
                            valueSuffix: tooltipValueSuffix,
                            style:{textAlign:alignment,direction:lang},
                            crosshairs: true,
                            shared: true,
                            useHTML: true

                        },
                        exporting: {
                            //csv: {
                            //columnHeaderFormatter: function(item, key) {
                            //console.log(item)
                            //if (!item) {
                            //return _this.$component.find('.m29v4-chart--listitem.active').attr('data-x-axis-title-text');
                            //} else {
                            //return item.name
                            //}
                            //}
                            //},
                            chartOptions: {
                                title: {
                                    text: _this.$component.find('.m29v4-chart--title').html()
                                },
                                yAxis: {
                                    title: {
                                        text: '{series.name}' + tooltipValueSuffix
                                    },
                                    labels: {
                                        format: '{point.y}'
                                    }
                                }
                            }
                        },

                        series: [{
                            data: seriesObj
                            }]
                    };

                    $container.highcharts(opts);

                };




                return ChartV4;
            });
define('../src/sublayouts/m3-carousel/m3-carousel',['jquery', 'slick'], function ($) {

	'use strict';

	var M3_CAROUSEL = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M3_CAROUSEL.prototype.init = function () {
		this.$M3_slider = $('.m3-carousel__carousel');
		var rtl = ($('html').attr('dir') == 'rtl');

		if ($('.m3-carousel__slide').length > 1) {
			this.$M3_slider.slick({
				dots: true,
				arrows: true,
				infinite: true,
				speed: 750,
				slidesToShow: 1,
				slidesToScroll: 1,
				autoplay: false,
				rtl: rtl
			});
		}

		this.$M3_slider.css({
			top: 0,
			opacity: 1,
			position: 'relative'
		});
	};

	return M3_CAROUSEL;
});
/* homemodule */
define('../src/sublayouts/m3-teaser-carousel/m3-teaser-carousel',['jquery', 'lib/utils', 'slick'], function ($, utils) {

	'use strict';

	var M3_CAROUSEL = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M3_CAROUSEL.prototype.init = function () {
		var _this = this;

		this.initCarousel();

		$(window).on('resize', function() {
			if ($('.m3-teaser-carousel__carousel').hasClass('slick-initialized')) {
				$('.m3-teaser-carousel__carousel').slick('destroy');	
			};
			_this.initCarousel();
		});

	};

	M3_CAROUSEL.prototype.initCarousel = function () {
		this.$M3_slider = $('.m3-teaser-carousel__carousel');
		var rtl = ($('html').attr('dir') == 'rtl');

		if ( utils.breakpoint() === 'l' ) {
			if ($('.m3-teaser-carousel__slide').length > 1) {
				this.$M3_slider.slick({
					dots: false,
					arrows: true,
					infinite: true,
					speed: 750,
					slidesToShow: 4,
					slidesToScroll: 1,
					autoplay: false,
					rtl: rtl
				});
			}
		} else if ( utils.breakpoint() === 'm' ) {
			if ($('.m3-teaser-carousel__slide').length > 1) {
				this.$M3_slider.slick({
					dots: false,
					arrows: true,
					infinite: true,
					speed: 750,
					slidesToShow: 2,
					slidesToScroll: 1,
					autoplay: false,
					rtl: rtl
				});
			}
		} else if ( utils.breakpoint() === 's' ) {
			if ($('.m3-teaser-carousel__slide').length > 1) {
				this.$M3_slider.slick({
					dots: true,
					arrows: false,
					infinite: true,
					speed: 750,
					slidesToShow: 1,
					slidesToScroll: 1,
					autoplay: false,
					rtl: rtl
				});
			}
		}

		this.$M3_slider.css({
			top: 0,
			opacity: 1,
			position: 'relative'
		});

		this.$component.find('.slick-slide').each(function() {
			if ( $(this).attr('aria-describedby') != undefined ) {
				$(this).find('.teaser__title').attr('id', $(this).attr('aria-describedby'))
			};
		});

	};

	return M3_CAROUSEL;
});
define('../src/sublayouts/m30-share/m30-share',['jquery', 'slick'], function ($) {

	'use strict';

	var M30_SHARE = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M30_SHARE.prototype.init = function () {
		var $this = this;
		this.$html = $('html');
		this.$isRTL = (this.$html.attr('dir') == 'rtl');
		this.shareOpen = false;

		this.$html.on('click', function () {
			$this.hideSharePanel();
		});

		$('.m30-share__item, .m30-share__link').on('click', function (e) {
			e.stopPropagation();
		});

		$('.m30-share__button').off().on('click', function (e) {
			e.stopPropagation();
			e.preventDefault();
			$this.$panel = $(this).closest('.m30-share').find('.m30-share__panel');
			var	p  = $(this).offset().top,
				ph = $this.$panel.outerHeight(),
				wh = $(window).height(),
				st = $(window).scrollTop();

			if ((((p-st) + ph) >= wh) && (p-st) >= ph) {
				$this.$panel.addClass('m30-share__panel--top');
			} else {
				$this.$panel.removeClass('m30-share__panel--top');
			}
			if ($this.$panel.attr('aria-expanded') == 'true') {
				$this.hideSharePanel();
			} else {
				$this.showSharePanel();
			}
		});
	};

	M30_SHARE.prototype.hideSharePanel = function () {
		try{
			this.$panel.removeClass('m30-share__panel--visible');
			this.$panel.attr('aria-expanded', false);
		} catch(e) {}
	};

	M30_SHARE.prototype.showSharePanel = function () {
		this.$panel.addClass('m30-share__panel--visible');
		this.$panel.attr('aria-expanded', true);
		this.$panel.fadeIn();
	};

	return M30_SHARE;
});
/* homemodule */
define('../src/sublayouts/m31-search/m31-search',['jquery', 'slick', 'breakpoint', 'lib/utils'], function($, slick, breakpoint, utils) {

    'use strict';

    var M31_SEARCH = function($component) {

        this.$component = $component;
        return this;
    };

    /**
     * Initialise component
     */

    M31_SEARCH.prototype.init = function() {
        var _this = this,
            $input = _this.$component.find('.m31-search--input'),
            $searchBtn = _this.$component.find('.m31-search--button'),
            $searchMobBack = _this.$component.find('.m31-search--back');


        _this.setMobile();

        /* $input.on('keyup',function(){
             if ($input.val()) {
                 $(".m31-search--dm_close-word").show();
                 $(".m31-search--button").hide();
             }
             else {
                 $(".m31-search--dm_close-word").hide();
                 $(".m31-search--button").show();
             }
         })*/

        /* setTimeout(function() {
             if($input.val()){
                 _this.checkFocus(true);
                 _this.$component.find('.m31-search--tools-wrapper').show();
                 $(".m31-search--dm_close-word").show();
                 $(".m31-search--button").hide();
             }},400)*/


        // Backbutton only visible on small screens
        // when user click on back onFocusout() function trigger on page and backBtnMobile() function here
        // backBtnMobile() reset the UI by removing classes from parent of the search
        $searchMobBack.on('touchstart click', function(e) {
            _this.backBtnMobile();
        });

        $searchBtn.on('touchstart click', function(e) {
            _this.checkFocus(true);
        });

        $(window).on('orientationchange', $.proxy(this.setMobile, this));

        $(breakpoint).on('change', $.proxy(this.setMobile, this));

        if (utils.breakpoint() === 'm' || utils.breakpoint() === 'l' || utils.breakpoint() === 'xl') {
            _this.$component.removeClass('m31-search__mobile');
        }

        this.$component.find('.m31-search--expand').off('click.m31').on('click.m31', function() {
            if (utils.breakpoint() == 'm' || utils.breakpoint() == 'l' || utils.breakpoint() == 'xl') {
                $(this).hide();
                _this.checkFocus(true);
                _this.$component.find('.m31-search--tools-wrapper').fadeIn();
                _this.$component.find('.m31-search--input').focusin();
            }
        });

        // Close search when user click on document 
        // Only applicable on large screens, small screen close by button click
        $(document).off('click.m31close').on('click.m31close', function(event) {
            if ((utils.breakpoint() == 'm' || utils.breakpoint() == 'l' || utils.breakpoint() == 'xl') && $(event.target).closest('.m31-search').length == 0 && _this.$component.find('.m31-search--input').val().length == 0 && _this.$component.hasClass('active')) {
                var $searchDoormat = _this.$component.find('.m31-search--doormat');
                if (!$searchDoormat.hasClass('active')) {
                    _this.$component.find('.m31-search--tools-wrapper').fadeOut();
                    setTimeout(function() {
                        _this.docClick(false);
                        _this.$component.find('.m31-search--expand').show();
                    }, 200)
                }
            };
        });

        // Trigger click search input on serch result page on load
        if (window.location.href.indexOf('term') > -1) {
            if (utils.breakpoint() == 'm' || utils.breakpoint() == 'l' || utils.breakpoint() == 'xl') {
                $('.m31-search--expand').click();
            } else {
                jQuery('.m31-search--button').trigger('touchstart')
            }
        }
    };

    M31_SEARCH.prototype.checkFocus = function(isFocus) {
        var _this = this,
            $input = _this.$component.find('.m31-search--input'),
            $m12ToolSearch = _this.$component.closest('.m12-tools__search'),
            $m12BarWrapper = _this.$component.closest('.m12-bar__wrapper'),
            $searchDoormat = _this.$component.find('.m31-search--doormat');

        if (isFocus || $searchDoormat.hasClass('active')) {
            _this.$component.addClass('active');
            $m12ToolSearch.addClass('search-active');
            if (_this.$component.hasClass('m31-search__icon--only') || _this.$component.hasClass('m31-search__mobile')) {
                $m12BarWrapper.addClass('search-active-wrapper');
                $input.focus()
            }
        } else {
            setTimeout(function() {
                _this.$component.removeClass('active');
                $m12ToolSearch.removeClass('search-active');
                $m12BarWrapper.removeClass('search-active-wrapper');
            }, 400)
            $input.val('');
        }
    };



    M31_SEARCH.prototype.setMobile = function() {
        var _this = this,
            dir = $('html').attr('dir') == "ltr" ? 'right' : 'left',
            $m12ToolSearch = _this.$component.closest('.m12-tools__search'),
            $input = _this.$component.find('.m31-search--input'),
            isFocus = false;

        if (utils.breakpoint() === 's') {
            $m12ToolSearch.css(dir, (0) + 'px')
            _this.$component.addClass('m31-search__mobile');
        } else {
            $m12ToolSearch.css(dir, '')
            _this.$component.removeClass('m31-search__mobile');
        }


        /*if ($input.val() || $input.is(':focus') || _this.$component.hasClass('active')) {
            isFocus = true
        }
        _this.checkFocus(isFocus);*/
    };

    // Backbutton only visible on small screens
    // when user click on back onFocusout() function trigger on page and backBtnMobile() function here
    // backBtnMobile() reset the UI by removing classes from parent of the search
    M31_SEARCH.prototype.backBtnMobile = function() {
        var _this = this,
            $m12ToolSearch = _this.$component.closest('.m12-tools__search'),
            $m12BarWrapper = _this.$component.closest('.m12-bar__wrapper'),
            $searchDoormat = _this.$component.find('.m31-search--doormat');
        setTimeout(function() {
            // repeated function from onFocusout() on page
            $('#wrapper_loader').hide();
            // repeated function from onFocusout() on page
            $searchDoormat.removeClass('active');

            _this.$component.removeClass('active');
            $m12ToolSearch.removeClass('search-active');
            $m12BarWrapper.removeClass('search-active-wrapper');

            // repeated function from onFocusout() on page
            $(".m31-search--dm_close-word").hide();
            // repeated function from onFocusout() on page
            $(".m31-search--button").show();
        }, 400)
        $input.val('');
        $input.blur();
    }

    M31_SEARCH.prototype.docClick = function(isFocus) {
        var _this = this,
            $input = _this.$component.find('.m31-search--input'),
            $m12ToolSearch = _this.$component.closest('.m12-tools__search'),
            $m12BarWrapper = _this.$component.closest('.m12-bar__wrapper'),
            $searchDoormat = _this.$component.find('.m31-search--doormat');

        if (isFocus || $searchDoormat.hasClass('active')) {
            _this.$component.addClass('active');
            $m12ToolSearch.addClass('search-active');
            if (_this.$component.hasClass('m31-search__icon--only') || _this.$component.hasClass('m31-search__mobile')) {
                $m12BarWrapper.addClass('search-active-wrapper');
                $input.focus()
            }
        } else {
            setTimeout(function() {
                _this.$component.removeClass('active');
                $m12ToolSearch.removeClass('search-active');
                $m12BarWrapper.removeClass('search-active-wrapper');
            }, 400)
            $input.val('');
        }
    };

    return M31_SEARCH;
});
define('../src/sublayouts/m32-map/m32-map',['jquery'], function ($) {

	'use strict';

	var M32_MAP = function ($component) {
		this.$component = $component;
		window.MAP = this;
		return this;
	};

	M32_MAP.prototype.loaded = function (map) {
		this.map = map;
		$(window).trigger('mapLoaded');
	};

	M32_MAP.prototype.init = function () {
		var lang = ($('html').attr('dir') == 'rtl') ? 'ar' : 'en';
		var script = document.createElement('script'),
			url = 'https://maps.googleapis.com/maps/api/js?libraries=places,geometry&v=3&key=AIzaSyC0KWP8MLqjGQbX8E3PK16snZabeB_E_x4&language=' + lang;
			//url = 'https://maps.googleapis.com/maps/api/js?libraries=places,geometry&v=3&key=AIzaSyB41DRUbKWJHPxaFjMAwdrzWzbVKartNGg&language=' + lang;
		script.type = 'text/javascript';
		script.src = url +
			'&callback=initializeGMap';
		document.body.appendChild(script);
	};

	window.initializeGMap = function initializeGMap() {
		var mapDiv = document.getElementById('map'),
			_this = this,
			pos = ($('html').attr('dir') == 'rtl') ? google.maps.ControlPosition.LEFT_BOTTOM : google.maps.ControlPosition.RIGHT_BOTTOM;

		window.map = new google.maps.Map(mapDiv, {
			center: new google.maps.LatLng(25.2276388, 55.3245075),
			zoom: 13,
			minZoom: 3,
			mapTypeId: google.maps.MapTypeId.ROADMAP,
			navigationControl: true,
			navigationControlOptions: {
				style: google.maps.NavigationControlStyle.SMALL
			},
			mapTypeControl: false, // Disable default map type control
			streetViewControl: false,
			fullscreenControlOptions: {
				position: pos
			},
			zoomControlOptions: {
				position: pos
			}
		});



		// Initialize the thumbnail map
		function initThumbnailMap() {
			const thumbnailMapDiv = document.createElement('div');
			const maincontrol = $('#mapTypeControl');
			Object.assign(thumbnailMapDiv.style, {
				width: '100px',
				height: '100px',
				position: 'absolute', // Position it over the main map
				bottom: '20px',       // 10px from the bottom
				zIndex: '5',         // Ensure it's above other map elements
				border: '2px solid #fff',  // 2px solid black border
				boxShadow: '0px 3px 1px rgba(0, 0, 0, 0.3)',
				borderRadius: '10px'
				// Add other styles as needed
			});

			thumbnailMapDiv.classList.add('thumbMap');

			const thumbnailMapOptions = {
				zoom: window.map.getZoom() - 2, // Keep the thumbnail map zoomed out
				center: window.map.getCenter(),
				mapTypeId: google.maps.MapTypeId.SATELLITE,
				disableDefaultUI: true // We don't want any controls on the thumbnail
			};

			const thumbnailMap = new google.maps.Map(thumbnailMapDiv, thumbnailMapOptions);
			mapDiv.appendChild(thumbnailMapDiv); // Append the thumbnail map to the main map div
			//mapDiv.appendChild(maincontrol);

			// Add listener to update the thumbnail when the main map is panned or zoomed
			window.map.addListener('bounds_changed', function () {
				thumbnailMap.setCenter(window.map.getCenter());
				thumbnailMap.setZoom(window.map.getZoom() - 2);
			});

			// Optional: Sync clicks on the thumbnail to re-center the main map
			$('.map-type-button').on('click', function (e) {
				var tbutton = $(this).attr('id');
				$('.map-type-button').removeClass('active')
				$(this).addClass('active')
				switch (tbutton) {
					case 'standardMapType':
						window.map.setMapTypeId(google.maps.MapTypeId.ROADMAP);
						thumbnailMap.setMapTypeId(google.maps.MapTypeId.SATELLITE);
						break;
					case 'satelliteMapType':
						window.map.setMapTypeId(google.maps.MapTypeId.SATELLITE);
						thumbnailMap.setMapTypeId(google.maps.MapTypeId.ROADMAP);
						break;
					case 'hybridMapType':
						window.map.setMapTypeId(google.maps.MapTypeId.HYBRID);
						thumbnailMap.setMapTypeId(google.maps.MapTypeId.ROADMAP);
						break;
				}
			});
			thumbnailMapDiv.addEventListener('click',function(){
				if($('#mapTypeControl').hasClass('map-type-visible')){
					$('#mapTypeControl').removeClass('map-type-visible')
				}else{
					$('#mapTypeControl').addClass('map-type-visible')
				}
			})

			/*if (thumbnailMap.getMapTypeId() === google.maps.MapTypeId.SATELLITE) {
				window.map.setMapTypeId(google.maps.MapTypeId.SATELLITE);
				thumbnailMap.setMapTypeId(google.maps.MapTypeId.ROADMAP);
			} else {
				window.map.setMapTypeId(google.maps.MapTypeId.ROADMAP);
				thumbnailMap.setMapTypeId(google.maps.MapTypeId.SATELLITE);
			}*/
		}

		// Call the function to initialize the thumbnail map
		initThumbnailMap();

		var myLatLng = { lat: 25.2276388, lng: 55.3245075 };

		var service = new google.maps.places.PlacesService(map);

		/*var scriptn = document.createElement('script');
		scriptn.src = 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js';
		document.head.appendChild(scriptn);*/



		service.getDetails({
			placeId: 'ChIJX2yk7EhdXz4RxfnDVtxbBaE'
		}, function (place, status) {
			if (status === google.maps.places.PlacesServiceStatus.OK) {
				if ($('.m32-map').closest('.j153-ev-map') != undefined) {
					$('.m32-map__overlay-title--text').text(place.name);
					$('.m32-map__overlay-subtitle--text').text(place.subname);
					$('.m32-map__overlay-address').text(place.formatted_address);
					$('.m32-map__rating').text(place.rating);
					$('.m32-map__rating-reviews').html('<a target="_blank" href="' + place.url + '">' + place.user_ratings_total + ' reviews</a>');
					$('.m32-map__larger-map a').attr('href', 'https://www.google.co.uk/maps/place/' + (place.name.replace(' ', '+')));
					$('.m32-map__rating-stars--foreground').css({ width: ($('.m32-map__rating-stars').width() * (((100 / 5) * parseFloat(place.rating)) / 100)) + 'px' });
					$('.m32-map__overlay').animate({
						opacity: 1
					}, 500);
				}
			}
		});

		google.maps.event.addDomListener(window, 'resize', function () {
			map.setCenter(myLatLng);
		});

		var isToggled = false;
		$('.m32-map__btn').click(function () {
			if (isToggled) {
				$(this).find('.list-view').show()
				$(this).find('.map-view').hide()
				$('.m32-map__list').removeClass('m32-map__list-map')
				$(this).closest('.j100-services-map__mapandfilter').removeClass('bgwhite')
			} else {
				$(this).find('.map-view').show()
				$(this).find('.list-view').hide()
				$('.m32-map__list').addClass('m32-map__list-map')
				$(this).closest('.j100-services-map__mapandfilter').addClass('bgwhite')
				$('.m32-map__list-section').scrollTop(0)
			}
			isToggled = !isToggled;
		});

		window.MAP.loaded(map);
	};

	return M32_MAP;
});

define('../src/sublayouts/m33-thumbnail-gallery/m33-thumbnail-gallery',['jquery', 'slick'], function ($) {

	'use strict';

	var M33_THUMBNAIL_GALLERY = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M33_THUMBNAIL_GALLERY.prototype.init = function () {
		var _ = this;
		this.$mainSlider = $('.m33-thumbnail-gallery__main-carousel');
		this.$thumbSlider = $('.m33-thumbnail-gallery__thumb-carousel');
		this.$numSlides = $('.m33-thumbnail-gallery__thumb-carousel-slide').length;
		this.$navSlidesToShow = 6;
		this.$gutter = ($( window).width() >= 1024) ? 32 : 16;
		this.$padding = ($( window).width() >= 1024) ? 0 : 32;
		this.$body = $('body');
		this.$html = $('html');
		this.$isRTL = (this.$html.attr('dir') == 'rtl');
		this.shareOpen = false;
		this.ofValue = this.$thumbSlider.data('of-value') || 'of';

		$('.m33-thumbnail-gallery__thumb-carousel-slide').each(function (e) {
			var	origClass = $(this).attr('class'),
				dataClass = $(this).attr('data-index');
			$(this).replaceWith("<button class=" + origClass + " data-index=" + dataClass + " >" + $(this).html() + "</button>");
		});

		this.initMainCarousel();
		this.initThumbCarousel();

		this.$html.on('click', function () {
			_.hideSharePanel();
		});
	};

	M33_THUMBNAIL_GALLERY.prototype.initThumbCarousel = function () {
		var _ = this;

		$('.m33-thumbnail-gallery__share-item, .m33-thumbnail-gallery__share-item-link').on('click', function (e) {
			e.stopPropagation();
		});

		$('.m33-thumbnail-gallery__button--share').on('click', function (e) {
			e.stopPropagation();
			if (_.shareOpen) {
				_.hideSharePanel();
			} else {
				_.showSharePanel();
			}
		});

		this.$body.on('click', '.m33-thumbnail-gallery__thumb-carousel-slide', function (e) {
			e.stopPropagation();
			$(this).parent().find('.m33-thumbnail-gallery__thumb-carousel-slide').each(function () {
				$(this).removeClass('current');
			});
			$(this).addClass('current');
			_.$mainSlider.slick('goTo', $(this).data('index'));
		});

		this.$thumbSlider.on('afterChange', function(event, slick, currentSlide){
			var $tileDimension = Math.ceil((($(this).width()-(_.$padding*2)) - (_.$gutter*5)) / 6);

			$(this).find('.slick-slide').each(function () {
				$(this).css({
					width: ($tileDimension+_.$gutter)
				});
			});
		});

		// listen for thumbnail carousel initialisation
		this.$thumbSlider.on('init', function(){
			// resize thumb carousel images to fit width
			var slider = $('.m33-thumbnail-gallery__thumb-carousel .slick-list');
			var $tileDimension = Math.ceil(((slider.width()-(_.$padding*2)) - (_.$gutter*5)) / 6);

			$(this).find('.slick-slide').each(function () {
				$(this).css({
					width: ($tileDimension+_.$gutter)
				});
			});

			if ((_.$numSlides > _.$navSlidesToShow)) {
				var offset = ((($tileDimension+_.$gutter)*_.$navSlidesToShow))*(-1);
				if (_.$isRTL) {
					offset = ((($tileDimension+_.$gutter)*_.$navSlidesToShow));
				}
				$(this).find('.slick-track').css('transform', 'translate3d('+offset+'px, 0px, 0px)');
			}

			$('.m33-thumbnail-gallery__thumb-carousel-slide-image').each(function () {
				$(this).css({
					width:$tileDimension,
					height:$tileDimension
				});
			});

			// highlight first element
			_.$thumbSlider.find("[data-index=0]").addClass('current');
			_.updateCaption($("[data-slick-index=0]").data('caption'));
			$('.m33-thumbnail-gallery__pagination').text('1 '+_.ofValue+' '+_.$numSlides);

			// update thumbnail sizes on window resize
			$( window ).resize(function() {
				_.$gutter = ($( window).width() >= 1024) ? 32 : 16;
				var $tileDimension = Math.ceil((_.$thumbSlider.find('.slick-list').width() - (_.$gutter*5)) / 6);
				$('.m33-thumbnail-gallery__thumb-carousel-slide-image').each(function () {
					$(this).css({
						width:$tileDimension,
						height:$tileDimension
					});
				});
				$('.m33-thumbnail-gallery__thumb-carousel .slick-slide').each(function () {
					$(this).css({
						width: ($tileDimension+_.$gutter)
					});
				});

			});

			// display the carousel
			_.display();
		});

		// initialise the nav carousel
		this.$thumbSlider.slick({
			arrows: true,
			dots: false,
			infinite: true,
			variableWidth: !_.$isRTL, // variable width breaks the carousel in rtl mode
			speed: 750,
			slidesToShow: _.$navSlidesToShow,
			slidesToScroll: 1,
			autoplay: false,
			pauseOnHover: false,
			asNavFor: _.$mainSlider,
			nextArrow: '.m33-thumbnail-gallery__thumb-carousel-button--next',
			prevArrow: '.m33-thumbnail-gallery__thumb-carousel-button--prev',
			rtl: this.$isRTL
		});

		this.$component.find('.slick-slide').each(function() {
			if ( $(this).attr('aria-describedby') != undefined ) {
				$(this).find('img').attr('id', $(this).attr('aria-describedby'))
			};
		});
	};

	M33_THUMBNAIL_GALLERY.prototype.hideSharePanel = function () {
		$('.m33-thumbnail-gallery__share-panel').fadeOut();
		this.shareOpen = false;
	};

	M33_THUMBNAIL_GALLERY.prototype.showSharePanel = function () {
		$('.m33-thumbnail-gallery__share-panel').fadeIn();
		this.shareOpen = true;
	};

	M33_THUMBNAIL_GALLERY.prototype.initMainCarousel = function () {
		var _ = this;

		this.$mainSlider.on('afterChange', function(event, slick, currentSlide){
			_.$thumbSlider.find(".m33-thumbnail-gallery__thumb-carousel-slide").each(function () {
				$(this).removeClass('current');
			});
			_.$thumbSlider.find("[data-index="+currentSlide+"]").addClass('current');
		});

		this.$mainSlider.on('beforeChange', function(event, slick, currentSlide, nextSlide){
			_.updateCaption($("[data-slick-index="+nextSlide+"]").data('caption'));
			_.updatePagination(nextSlide);
		});

		// initialise the main carousel
		this.$mainSlider.slick({
			arrows: true,
			dots: false,
			infinite: true,
			speed: 750,
			slidesToShow: 1,
			slidesToScroll: 1,
			autoplay: false,
			autoplaySpeed: 3000,
			pauseOnHover: false,
			asNavFor: _.$thumbSlider,
			nextArrow: '.m33-thumbnail-gallery__main-carousel-button--next',
			prevArrow: '.m33-thumbnail-gallery__main-carousel-button--prev',
			rtl: this.$isRTL
		});

	};

	M33_THUMBNAIL_GALLERY.prototype.updatePagination = function (nextSlide) {
		$('.m33-thumbnail-gallery__pagination').text((nextSlide+1)+' '+this.ofValue+' '+this.$numSlides);
	};

	M33_THUMBNAIL_GALLERY.prototype.updateCaption = function (caption) {
		var target = $('.m33-thumbnail-gallery__caption');
		target.animate({
			opacity:0
		}, 500, function () {
			target.text(caption);
			target.animate({
				opacity:1
			}, 500);
		});
	};

	M33_THUMBNAIL_GALLERY.prototype.display = function () {
		this.$mainSlider.css({
			top: 0,
			position: 'relative'
		});
		this.$thumbSlider.css({
			top: 0,
			position: 'relative'
		});
	};

	return M33_THUMBNAIL_GALLERY;
});

define('../src/sublayouts/m34-pagination/m34-pagination',['jquery'], function ($) {

	'use strict';

	var M234_PAGINATION = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M234_PAGINATION.prototype.init = function () {
		//var _ = this;
		//_.$pages = $('.m34-pagination__page-list-item');
		//_.$nextBtn = $('.m34-pagination__button--next');
		//_.$prevBtn = $('.m34-pagination__button--prev');
		//_.$current = 0;
		//_.$limit = 5;

		//_.showPages();

		//_.$prevBtn.on('click', function (e) {
		//	e.preventDefault();
		//	_.prev();
		//});
		//
		//_.$nextBtn.on('click', function (e) {
		//	e.preventDefault();
		//	_.next();
		//});
	};

	M234_PAGINATION.prototype.showPages = function () {
		//var _ = this;
		//_.$pages.each(function () {
		//	if ($(this).data('index') >= _.$current && $(this).data('index') < _.$current + _.$limit) {
		//		if (_.$current == $(this).data('index')) {
		//			$(this).addClass('m34-pagination__page-list-item--active');
		//		} else {
		//			$(this).removeClass('m34-pagination__page-list-item--active');
		//		}
		//		$(this).css({display: 'inline-block'});
		//	} else {
		//		$(this).css({display: 'none'});
		//	}
		//});
	};

	M234_PAGINATION.prototype.next = function () {
		//var _ = this;
		//if (_.$current < _.$pages.length - _.$limit) {
		//	_.$current++;
		//	_.showPages();
		//}
	};

	M234_PAGINATION.prototype.prev = function () {
		//var _ = this;
		//if (_.$current > 0) {
		//	_.$current--;
		//	_.showPages();
		//}
	};

	return M234_PAGINATION;
});
/* homemodule */
define( '../src/sublayouts/m36-video-player/m36-video-player',[ 'jquery' ], function ( $ ) {
	'use strict';

	var M36 = function ( $component ) {

		this.$component = $component;

		return this;
	};

	M36.prototype.init = function () {
		var _this = this;
		
        this.$component.find('.m36-videoplayer-teaser--video').each(function () {
        	$(this).off('click.m36').on('click.m36', function () {
        		var iframe = $(this).attr('data-iframe');

        		_this.$component.find('[data-component="m39-modal"] .m39-modal__content').html(iframe);
        		_this.$component.find('[data-component="m39-modal"] [data-trigger="true"]').click();
        	});
        });
    };

	return M36;

} );

define( '../src/sublayouts/m37-expander/m37-expander',[ 'jquery', 'lib/utils' ], function ( $, utils ) {

	'use strict';

	var Expander = function ( $component ) {

		this.$component = $component;

		return this;
	};

	Expander.prototype.init = function () {

		// set a unique id (safer than doing this inline)
		var uniqueID = utils.uniqueID(),
			triggerID = uniqueID + '_trigger',
			contentID = uniqueID + '_content';

		// cache dom els
		this.$trigger = this.$component.find( '[data-toggle]' ).eq( 0 );
		this.$content = this.$component.find( '[data-content]' ).eq( 0 );

		// add dynamic ids and props for aria tagging
		this.$trigger.attr( 'id', triggerID ).attr( 'aria-controls', contentID );
		this.$content.attr( 'id', contentID ).attr( 'aria-labelledby', triggerID );

		// classnames
		this.openTriggerClassname = 'm37-expander__trigger--open';
		this.openContentClassname = 'm37-expander__content--open';

		// toggle open if expanded
		if ( this.$content.attr( 'aria-expanded' ) === 'true' ) {
			this.toggle();
		}

		// bind events
		this.$trigger.on( 'click', $.proxy( this.toggle, this ) );
		
		var pagerUpdate = this.$component.find("[ data-pager-update ]");
		$(pagerUpdate).on('click', function () {
			debugger;
		});

	};

	Expander.prototype.toggle = function ( e ) {

		if ( e !== undefined ) {

			e.preventDefault();

		}

		var expanded = this.$content.attr( 'aria-expanded' ) === 'true',
				expanderForm = this.$content.find('[data-parsley-trigger]').eq(0).closest('form');

		this.$trigger.toggleClass( this.openTriggerClassname );
		this.$content.attr( 'aria-expanded', expanded = !expanded );
		this.$content.toggleClass( this.openContentClassname );

		// reinit parsley when form is expanded
		if (expanded && expanderForm.length) {
			expanderForm.parsley().destroy();
			window.setTimeout(function(){
				expanderForm.parsley();
			}, 10);
		}
	};

	return Expander;

} );

define( '../src/sublayouts/m38-step-tracker/m38-step-tracker',[ 'jquery' ], function ( $ ) {

	'use strict';

	var StepTracker = function ( $component ) {

		this.$component = $component;

		return this;
	};

	StepTracker.prototype.init = function () {
		var _this = this;

		this.totalSteps = parseInt( this.$component.attr( 'data-total-steps' ) );
		this.currentStep = parseInt(this.$component.attr( 'data-current-step' ));
		this.$progressbar = this.$component.find( '[data-m38-progressbar]' );

		this.build();
		this.applyAria();

		$(window).off('reinit_m38').on('reinit_m38', function() {
			_this.init();
		});

		if (this.$component.attr('data-hasInfo') == "true") {
			_this.buildInfo();
		};

	};

	StepTracker.prototype.buildInfo = function () {
		var _this = this,
			valuetext = _this.$progressbar.attr('aria-valuetext'),
			word = _this.$component.data('labels').conjunction,
			info = '<div class="m38-steptracker__info-wrapper">'+_this.currentStep+' '+word+' '+_this.totalSteps+': <span class="m38-steptracker__info-value">'+valuetext+'</span></div>';

		$('.m38-steptracker__info-wrapper').remove();
		_this.$component.prepend(info);

	};

	StepTracker.prototype.build = function () {

		$(this.$progressbar).html("");

		for ( var i = 0; i < this.totalSteps; i = i + 1 ) {

			var $step = $( '<div class="m38-steptracker__step"></div>' );

			if ( this.currentStep > i ) {
				$step.addClass( 'm38-steptracker__step--active' );
			}

			this.$progressbar.append( $step );

		}

	};

	StepTracker.prototype.applyAria = function () {

		this.$progressbar.attr( 'aria-valuenow', 100 / this.totalSteps ).attr( 'aria-valuemin', 0 ).attr( 'aria-valuemax', 100 );
	};

	return StepTracker;

} );

/* homemodule */
define('../src/sublayouts/m39-modal/m39-modal',['jquery', 'lib/utils', 'mask', 'spinner', 'slick', 'parsley'], function($, utils, Mask, Spinner, slick, parsley) {
    'use strict';

    var Modal = function($component) {

        this.$component = $component;

        return this;
    };

    Modal.prototype.init = function() {

        // set a unique id (safer than doing this inline)
        var uniqueID = utils.uniqueID(),
            _this = this,
            triggerID = uniqueID + '_trigger',
            contentID = uniqueID + '_content',
            closeID = uniqueID + '_close';

        // cache dom els
        this.$content = this.$component.find('[ data-content ]');
        this.$close = this.$component.find('[ data-close ]');
        this.$body = $('body');
        this.$modalContent = this.$component.find('.m39-modal__content');
        this.$overlay = $('.m39-modal__overlay')

        if (this.$content.data('content') === true) {

            this.$trigger = this.$component.find('[ data-trigger ]');

        } else {

            // account selector
            this.$trigger = $('[ data-accountselector="' + this.$content.data('content') + '" ]');

            // other
            if (this.$trigger[0] === undefined) {
                this.$trigger = $('[ data-modal-trigger="' + this.$content.data('content') + '" ]');
            }

        }




        // make sure trigger is not triggred when hitting enter in a form
        if (this.$trigger.is('button')) {

            this.$trigger.attr('type', 'button');
        }

        // add dynamic ids and props for aria tagging
        this.$trigger.attr('id', triggerID).attr('aria-controls', contentID);
        this.$content.attr('id', uniqueID + '_content').attr('aria-labelledby', triggerID);
        this.$close.attr('id', closeID).attr('aria-controls', contentID);

        // classnames
        this.openContentClassname = 'm39-modal__container--active';

        // bind events
        this.$trigger.on('click', function(e) {
            var __this = this;
            if (_this.$component.hasClass('m39-modal--form_binded')) {
                var e_count = 0;

                $(_this.$component.attr('target-form')).parsley().validate();
                if (_this.$component.hasClass('moveinModalPay')) {
                    $(_this.$component.attr('target-form')).find('.form-field__input').not('#form-field-SuqiaDonationAmt').each(function() {
                        if (!$(this).parsley().isValid()) {
                            e_count++;
                        };
                    });
                } else {
                    $(_this.$component.attr('target-form')).find('.form-field__input').each(function() {
                        if (!$(this).parsley().isValid()) {
                            e_count++;
                        };
                    });
                }
                if (e_count == 0) {
                    //console.log('asdasdadasd')
                    _this.show(e)
                }
            } else {
                _this.show(e)
            }
        });
        this.$close.on('click', $.proxy(this.hide, this));
        $('.m39-m12-no').on('click', $.proxy(this.hide, this));
        this.$body.on('focusin', $.proxy(this.checkModalFocus, this));
        $(document).off('click.m39close').on('click.m39close', function(event) {
            if ($(event.target).is('[data-content]')) {
                var $closebtn = $('#' + $('#' + $(event.target).attr('id')).find('[data-close]').attr('id'));
                if (!$closebtn.closest('.m39-modal').hasClass('m39-modal--nofocus')) {
                    $closebtn.trigger('click')
                }
            };
        });

        jQuery('.m36-videoplayer--image').off('click.video').on('click.video', function() {
            if ($(this).find('.m36-videoplayer--play').length == 0) {
                var title = jQuery(this).closest('.m36-videoplayer--variant').attr('data-title'),
                    content = jQuery(this).closest('.m36-videoplayer--variant').attr('data-iframe');

                jQuery('.m39-modal--video').find('.m39-modal__title').html(title);
                jQuery('.m39-modal--video').find('.m39-modal__content').html(content);
                jQuery('.m39-modal--video').find('.m39-modal__trigger').trigger('click');

                if (jQuery(this).closest('.m36-videoplayer--variant').hasClass('m36-videoplayer--modal')) {
                    var uniqueID = utils.uniqueID(),
                        thisContain = jQuery(this).closest('.m36-videoplayer--variant'),
                        viModal = jQuery('.m39-modal--video .m39-modal__content').find('video');
                    thisContain.data('vid', uniqueID);
                    thisContain.attr('data-vid', uniqueID);
                    viModal.attr('id', uniqueID)
                }
            }
        });

        jQuery('.m36-videoplayer--play').off('click.video').on('click.video', function() {
            var title = jQuery(this).closest('.m36-videoplayer--variant').attr('data-title'),
                content = jQuery(this).closest('.m36-videoplayer--variant').attr('data-iframe');

            jQuery('.m39-modal--video').find('.m39-modal__title').html(title);
            jQuery('.m39-modal--video').find('.m39-modal__content').html(content);
            jQuery('.m39-modal--video').find('.m39-modal__trigger').trigger('click');
        });

        jQuery('.m36-videoplayer--tutorial-link').off('click.video').on('click.video', function() {
            var title = jQuery(this).closest('.m36-videoplayer--variant').attr('data-title'),
                content = jQuery(this).closest('.m36-videoplayer--variant').attr('data-iframe');

            jQuery('.m39-modal--video').find('.m39-modal__title').html(title);
            jQuery('.m39-modal--video').find('.m39-modal__content').html(content);
            jQuery('.m39-modal--video').find('.m39-modal__trigger').trigger('click');
        });

        this.disclaimer();

        $(window).off('reinit_m39').on('reinit_m39', function () {
           _this.init();
        });


        /*$('.form-field__fakecheckbox_donation').on('click',function() {
            var $clickedCheckbox = $(this);
            $('.form-field__fakecheckbox_donation').not($clickedCheckbox).each(function() {
                $(this).closest('.form-field__checkbox').find('.form-field__input--checkbox').prop('checked', false)
            });
            if($clickedCheckbox.closest('.form-field__checkbox').hasClass('form-field__checkbox_custom-enter') && $('.m39-modal__suqia--donation-input').hasClass('hidden')){
                $('.m39-modal__suqia--donation-input').removeClass('hidden')
            }else{
                $('.m39-modal__suqia--donation-input').addClass('hidden')
            }

            $clickedCheckbox.focus();
        })*/

    };

    Modal.prototype.checkModalFocus = function(e) {

        var _this = this,
            isMpActive = $('.datepicker').hasClass('active');

        window.setTimeout(function() {

            if (_this.modalOpened && _this.$content.find(':focus').length === 0 && !isMpActive && !_this.$component.hasClass('m39-modal--nofocus')) {

                e.stopPropagation();
                _this.$close.click();
            }

        }, 1);

    };

    Modal.prototype.show = function(e) {

        var _this = this;

        var spinner = new Spinner(_this.$content);
        spinner.load();

        e.preventDefault();

        setTimeout(function() {
            //console.log('here')
            Mask.show();
            _this.$body.addClass('unscrollable');
            _this.$body.css({ position: 'static' })

            _this.setContentBelowHeader();
            $(window).on('resize orientationchange', $.proxy(_this.setContentBelowHeader, _this));

            _this.$content.attr('aria-expanded', true);
            _this.$content.addClass(_this.openContentClassname);

            window.setTimeout(function() {

                spinner.unload();
                //_this.$close.focus();
                $('body').trigger('modal_opened', _this);

            }, 501); // let the css visibility transition finish... otherwise .focus() will fail. ugly but necessary.

            _this.modalOpened = true;
            $(_this.$overlay).css('display', 'block')

            _this.$component.find('.m39-modal__content').animate({
                scrollTop: 0
            }, 25);

            // suqia payment modal checkbox uncheck
            if(_this.$content.find('.m39-modal__dialog--payment_2').length > 0){
                $('.m39-modal__suqia--donation-list-items').find('.form-field__input--checkbox').prop('checked', false);
                $('.m39-modal__suqia--donation-input').hide();
                $('.m39-modal__suqia--donation-input').find('.form-field__input').val(0);
            }
        }, 50);
    };

    Modal.prototype.setContentBelowHeader = function() {

        this.headerHeight = this.$component.find('.m39-modal__header').innerHeight() + 'px';
        this.$modalContent.css('top', this.headerHeight);
    };

    Modal.prototype.hide = function(e) {

        e.preventDefault();

        $('body').trigger('modal_closed', this);

        Mask.hide();


        if (this.$component.hasClass('m39-modal--video')) {
            this.$modalContent.empty()
        }


        this.$body.removeClass('unscrollable');
        this.$body.css({ position: '' })
        this.$content.attr('aria-expanded', false);
        this.$content.removeClass(this.openContentClassname);
        this.modalOpened = false;
        this.$trigger.focus();
        $(this.$overlay).css('display', 'none')
    };

    Modal.prototype.autoShow = function(ID) {
        var _this = this;

        setTimeout(function() {
            $('#' + ID).trigger('click')
        }, 3000)

    };

    Modal.prototype.disclaimer = function() {
        var _this = this,
            $proceed = _this.$component.find('.m39-modal--disclaimer_next'),
            banlist = ['usa', 'canada', 'australia', 'south africa', 'japan', 'russia'];

        $proceed.each(function() {
            $(this).off('click.disc').on('click.disc', function() {
                var $content = _this.$component.find('.m39-modal__content--inner.active'),
                    $button = $(this),
                    $outercontent = $(this).closest('.m39-modal__dialog '),
                    $parent = $(this).closest('.m39-modal__footer--inner'),
                    $inputs = $content.find('.form-field__input'),
                    errorcount = 0;

                $inputs.each(function() {
                    $(this).parsley().validate();
                    if (!$(this).parsley().isValid()) {
                        errorcount++
                    };
                });

                if (errorcount == 0) {
                    if (banlist.indexOf(_this.$component.find('select').val().toLowerCase()) == -1) {
                        $content.next('.m39-modal__content--inner').addClass('active');
                        $parent.next('.m39-modal__footer--inner').addClass('active');

                        $parent.removeClass('active');
                        $content.removeClass('active');

                        if ($button.hasClass('expandModal')) {
                            $outercontent.addClass('expanded')
                        } else {
                            $outercontent.removeClass('expanded')
                        };
                    } else {
                        $('.m39-modal__content--inner.restricted').addClass('active');
                        $('.m39-modal__footer--inner.restricted').addClass('active');
                        $parent.removeClass('active');
                        $content.removeClass('active');
                    }
                };

            });
        });
    };

    return Modal;

});
/* homemodule */
define('../src/sublayouts/m4-masonry/m4-masonry',['jquery', 'breakpoint', 'lib/utils'], function($, breakpoint, utils) {

    'use strict';

    var M4_Masonry = function($component) {

        this.$component = $component;

        return this;
    };

    /**
     * Initialise component
     */

    M4_Masonry.prototype.init = function() {
        var _this = this;

        this.doneMobile = false;

        this.masonryInitPromo();

        $(window).on('resize.m4', function() {
            //alert('click');
            setTimeout(function() {
                if ($(window).width() > 1024) {
                    _this.masonryInit(2);
                    $('.m41-persona-tabs-box__tab-item').off('click.masonry').on('click.masonry', function() {
                        _this.masonryInit(2);
                    });
                    _this.doneMobile = false;
                } else if ($(window).width() > 599) {
                    _this.masonryInit(1);
                    $('.m41-persona-tabs-box__tab-item').off('click.masonry').on('click.masonry', function() {
                        _this.masonryInit(1);
                    });
                    _this.doneMobile = false;
                } else {
                    if (!_this.doneMobile) {
                        _this.destroyCSS();
                        _this.masonryInitMobile();
                        $('.m41-persona-tabs-box__tab-item').off('click.masonry').on('click.masonry', function() {
                            _this.masonryInitMobile();
                        });
                        _this.doneMobile = true;
                    }
                }
            }, 251)
        });

        if ($(window).width() > 1024) {
            _this.masonryInit(2);

            var index = this.$component.closest('.m41-persona-tabs-box__tab-panel').attr('data-index'),
                $tabparent = this.$component.closest('.m41-persona-tabs-box__tabs'),
                $tab = $tabparent.find('.m41-persona-tabs-box__tab-item[data-index=' + index + ']');

            $tab.off('click.masonry').on('click.masonry', function() {
                _this.masonryInit(2);
            });

            _this.doneMobile = false;

        } else if ($(window).width() > 599) {
            _this.masonryInit(1);

            var index = this.$component.closest('.m41-persona-tabs-box__tab-panel').attr('data-index'),
                $tabparent = this.$component.closest('.m41-persona-tabs-box__tabs'),
                $tab = $tabparent.find('.m41-persona-tabs-box__tab-item[data-index=' + index + ']');

            $tab.off('click.masonry').on('click.masonry', function() {
                _this.masonryInit(1);
            });

            _this.doneMobile = false;

        } else {
            if (!_this.doneMobile) {
                //alert(_this.doneMobile)
                _this.masonryInitMobile();

                var index = this.$component.closest('.m41-persona-tabs-box__tab-panel').attr('data-index'),
                    $tabparent = this.$component.closest('.m41-persona-tabs-box__tabs'),
                    $tab = $tabparent.find('.m41-persona-tabs-box__tab-item[data-index=' + index + ']');

                $tab.off('click.masonry').on('click.masonry', function() {
                    _this.masonryInitMobile();
                });

                _this.doneMobile = true;
            };

        };

        window.setInterval(function() {
            $(window).trigger('resize.m4')
        }, 3000);
    };

    M4_Masonry.prototype.masonryInitPromo = function() {
        var _this = this;

        this.$component.find('.m4-masonry--item_wrapper_promo').each(function() {
            var $cloned = $(this).clone();

            $cloned.removeClass('mobile-hide').addClass('desktop-hide');

            _this.$component.append($cloned);
        });

    };

    M4_Masonry.prototype.destroyCSS = function() {
        var _this = this;

        this.$component.find('.m4-masonry--item_wrapper').each(function() {
            $(this).attr('style', '');
        });

        this.$component.attr('style', '');
    };

    M4_Masonry.prototype.masonryInitMobile = function() {
        var _this = this,
            timing = 0;

        this.$component.find('.m4-masonry--item_wrapper').not('.m4-masonry--item_wrapper_promo').each(function() {
            var $parent = $(this),
                $item = $parent.find('.m4-masonry--item'),
                $label = $parent.find('.m4-masonry--title'),
                $teaser = $parent.find('.m6-teaser'),
                $teaserheight = 0,
                $content = $parent.find('.m4-masonry--list');

            if (!$(this).hasClass('m4-masonry--item_wrapperactive')) {
                setTimeout(function() {
                    $item.height(($label.height()).toString() + 'px');
                    //alert('here');
                }, 251);
            } else {
                setTimeout(function() {
                    $item.height(($label.height() + $content.outerHeight(true) + $teaserheight + 28).toString() + 'px');
                }, 251);
            }
            //$parent.removeClass('m4-masonry--item_wrapperactive');

            // If More than one teaser (eg service guide)
                if (($teaser.height() > 0) && $teaser.css('display') != 'none') {
                    if ($(this).hasClass('m4-masonry-service-guide')) {
                        $teaser.each(function() {
                            $teaserheight = $teaserheight + $(this).height() + 56
                        })
                        if (utils.breakpoint() === 's' || utils.breakpoint() === 'm') {
                            $teaserheight = 0;
                        }
                    } else {
                        $teaserheight = $teaser.height() + 56;
                    }
                };


            $label.off('click.masonry').on('click.masonry', function() {
                if (($teaser.height() > 0) && $teaser.css('display') != 'none') {
                    if ($(this).hasClass('m4-masonry-service-guide')) {
                        $teaser.each(function() {
                            $teaserheight = $teaserheight + $(this).height() + 56
                        })
                        if (utils.breakpoint() === 's' || utils.breakpoint() === 'm') {
                            $teaserheight = 0;
                        }
                    } else {
                        $teaserheight = $teaser.height() + 56;
                    }
                };
                _this.$component.find('.m4-masonry--item_wrapperactive').find('.m4-masonry--title').not($label).click();
                if (!$parent.hasClass('m4-masonry--item_wrapperactive')) {
                    $item.height(($label.height() + $content.outerHeight(true) + $teaserheight + 28).toString() + 'px');
                    $parent.addClass('m4-masonry--item_wrapperactive');
                } else {
                    $item.height(($label.height()).toString() + 'px');
                    $parent.removeClass('m4-masonry--item_wrapperactive');
                }

            });
        });

        if (!this.getCookie()) {
            _this.$component.find('.m4-masonry--item_wrapper').each(function() {
                var $m4item = $(this);

                setTimeout(function() {
                    $m4item.addClass('m4-masonry--item_wrapper--show');
                }, timing);

                timing = timing + 250
            });
            _this.setCookie();
        } else {
            _this.$component.find('.m4-masonry--item_wrapper').each(function() {
                var $m4item = $(this);

                $m4item.addClass('m4-masonry--item_wrapper--instant');

            });
        };

    };

    M4_Masonry.prototype.setCookie = function() {
        document.cookie = 'dewa_m4=' + window.location.href + ';';
    };

    M4_Masonry.prototype.getCookie = function() {
        var nameEQ = "dewa_m4=";

        var ca = document.cookie.split(';');

        for (var i = 0; i < ca.length; i++) {

            var c = ca[i];

            while (c.charAt(0) == ' ') {
                c = c.substring(1, c.length)
            };

            if (c.indexOf(nameEQ) == 0 && c.substring(nameEQ.length, c.length) == window.location.href) {
                return true
            };

        };

        return null;
    };

    M4_Masonry.prototype.masonryInit = function(columns) {
        var _this = this,
            i = 0,
            k = 0,
            dir = 'left',
            timing = 0,
            height = 0;

        if (utils.isRTL()) {
            dir = 'right'
        };

        //this.destroyCSS();

        this.$component.find('.m4-masonry--item_wrapper').each(function() {
            $(this).attr('data-column', '');
            $(this).attr('style', '');
            if (i < columns) {
                $(this).attr('data-column', i.toString());
                i++
            } else {
                $(this).attr('data-column', i.toString());
                i = 0
            };
        });

        while (k <= columns) {
            var $column = this.$component.find('.m4-masonry--item_wrapper[data-column="' + k + '"]'),
                col_height = 0,
                column_array = [];

            $column.each(function() {
                column_array.push($(this)[0]);
            });

            $column.each(function() {
                //console.log(column_array)
                var index = column_array.indexOf($(this)[0]);

                col_height = col_height + $(this).outerHeight(true);

                if (index > 0) {
                    var top = 0;

                    while (index > 0) {
                        top = top + $(column_array[index - 1]).outerHeight(true);

                        index = index - 1;
                    };

                    $(this).css('top', top.toString() + 'px')
                }
            });

            if (k > 0) {
                var width = 0,
                    j = k;

                while (j > 0) {

                    width = width + 30 + this.$component.find('.m4-masonry--item_wrapper[data-column="' + (k - 1) + '"]').width();

                    j = j - 1;
                }

                $column.each(function() {
                    $(this).css(dir, (width).toString() + 'px')
                });
            }

            if (col_height > height) {
                height = col_height;
            };

            k++;
        };

        if (!this.getCookie()) {
            _this.$component.find('.m4-masonry--item_wrapper').each(function() {
                var $m4item = $(this);

                setTimeout(function() {
                    $m4item.addClass('m4-masonry--item_wrapper--show');
                }, timing);

                timing = timing + 250
            });
            _this.setCookie();
        } else {
            _this.$component.find('.m4-masonry--item_wrapper').each(function() {
                var $m4item = $(this);

                $m4item.addClass('m4-masonry--item_wrapper--instant');

            });
        };

        this.$component.height(height);
    };

    return M4_Masonry;
});

define( '../src/sublayouts/m40-status-message/m40-status-message',[ 'jquery' ], function ( $ ) {

	'use strict';

	var M40_StatusMessage = function ( $component ) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M40_StatusMessage.prototype.init = function () {

		this.$component.find( '[ data-print ]' ).on('click', function() {

			if ( window.print ) {
				window.print();
			}

		} );

	};

	return M40_StatusMessage;
} );
define( '../src/sublayouts/m40v2-status-message/m40v2-status-message',[ 'jquery' ], function ( $ ) {

	'use strict';

	var M40v2_StatusMessage = function ( $component ) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M40v2_StatusMessage.prototype.init = function () {

		this.$component.find( '[ data-print ]' ).on('click', function() {

			if ( window.print ) {
				window.print();
			}

		} );

	};

	return M40v2_StatusMessage;
} );
/* homemodule */
define( '../src/sublayouts/m41-persona-tabs-box/m41-persona-tabs-box',[ 'jquery', 'breakpoint', 'lib/utils' ], function ( $, breakpoint, utils ) {

	'use strict';

	var TabsBox = function ( $component ) {

		this.$component = $component;

		return this;
	};

	TabsBox.prototype.init = function () {
		this.$content = $('.m41-persona-tabs-box__tab-panels').clone();

		var _this = this;

		if (_this.$component.hasClass('m41-persona-tabs-box--scripted')) {
			_this.hideShow();
			_this.hideShowToggle();
		};

		$( breakpoint ).on( 'change', $.proxy( this.respond, this ) );
		
		if (_this.$component.hasClass('m41-persona-tabs-box-v2')) {
			if ( utils.breakpoint() === 's' || utils.breakpoint() === 'm') {
				var scrollParent = _this.$component.find('.m41-persona-tabs-box__tab-items_wrapper'),
					activelink = scrollParent.find('.m41-persona-tabs-box__tab-link--active'),
					activeTarget = activelink.length == 0 ? $(scrollParent.find('.m41-persona-tabs-box__tab-link')[0]).closest('.m41-persona-tabs-box__tab-item') : activelink.closest('.m41-persona-tabs-box__tab-item');
				_this.autoScroll(activeTarget,scrollParent)
			}
		}
		
	};

	TabsBox.prototype.hideShow = function () {
		var _this = this;

		$('.m41-persona-tabs-box__tab-link').off().on('click', function(e) {
			e.preventDefault();
			$('.m41-persona-tabs-box__tab-link').each(function(){
				$(this).removeClass('m41-persona-tabs-box__tab-link--active');
			});
			$(this).addClass('m41-persona-tabs-box__tab-link--active');
			_this.hideShowToggle();
		});

	};

	TabsBox.prototype.hideShowToggle = function () {

		$('.m41-persona-tabs-box__tab-item').each(function(){
			if ($(this).find('.m41-persona-tabs-box__tab-link').hasClass('m41-persona-tabs-box__tab-link--active')) {
				var activate = $(this).attr('data-index');
				$('.m41-persona-tabs-box__tab-panel').each(function() {
					$(this).hide();
					if ($(this).attr('data-index') == activate) {
						$(this).show();
					}
				});
			}
		});

	};

	TabsBox.prototype.autoScroll= function(target,parent){
		var targetPos = target.offset().left,
			parentPos = target.parent().offset().left,
			targetWidth = target.outerWidth(),
			parentWidth = target.parent().outerWidth(),
			centerPos = parentWidth/2 - targetWidth/2,
			scrollAmount = targetPos - parentPos - centerPos;
			parent.animate({scrollLeft: scrollAmount}, 'slow');
	};

	return TabsBox;

} );

define( '../src/sublayouts/m41-tabs-box/m41-tabs-box',[ 'jquery', 'breakpoint', 'lib/utils' ], function ( $, breakpoint, utils ) {

	'use strict';

	var TabsBox = function ( $component ) {

		this.$component = $component;

		return this;
	};

	TabsBox.prototype.init = function () {
		this.$content = $('.m41-tabs-box__tab-panels').clone();

		var _this = this;

		this.$content.find('label').each(function () {
			var $input = _this.$content.find('#'+$(this).attr('for')),
				newID = utils.uniqueID();

				$input.attr('id', newID);
				$(this).attr('for', newID);
		});
		
		if ( ((!_this.$component.hasClass('m41-tabs-box--variant') || _this.$component.hasClass('m41-tabs-box--variantmobile')) && _this.$component.find('.m41-tabs-box--mobile').length == 0) || _this.$component.hasClass('m41-tabs-box--variantcentered')) {
			var ID = utils.uniqueID();
			_this.$component.append('<div class="m41-tabs-box--mobile" id="m41-tabs-box--'+ID+'"><div class="form-field form-field--select form-field--select-single"><label for="'+ID+'"><span class="aria-only">Label</span></label><span class="form-field__input-wrapper form-field__input-wrapper--select"><select class="m41-tabs-box--select-mobile form-field__input form-field__input--select" id="'+ID+'"></select></span></div></div>');
			if ( _this.$component.hasClass('m41-tabs-box--scripted') ) {
				if ( $('.m41-tabs-box--mobile').find('.m41-tabs-box__tab-panels').length <= 0 ) {
					$('.m41-tabs-box--mobile').append(_this.$content);
					jQuery(window).trigger('resize.m77');
					window.initComponents('components-reinit');
					window.initComponents('m41-tabs-box--'+ID);
					$(window).trigger('resize');
				};
			};
		};

		this.respond();

		if (_this.$component.hasClass('m41-tabs-box--scripted')) {
			_this.hideShow();
			if(_this.$component.hasClass('m41-tabs-box--variant-nested')){
				_this.hideShowToggleNested();
			}else{
				_this.hideShowToggle();
			}
			
		};

		if (_this.$component.hasClass('m41-tabs-box--variant4_service-guide')) {
			if ( utils.breakpoint() === 's' || utils.breakpoint() === 'm') {
				var scrollParent = _this.$component.find('.m41-tabs-box__tab-items'),
					activelink = scrollParent.find('.m41-tabs-box__tab-link--active'),
					activeTarget = activelink.closest('.m41-tabs-box__tab-item');
				_this.autoScroll(activeTarget,scrollParent)
			}
		}

		$( breakpoint ).on( 'change', $.proxy( this.respond, this ) );
		this.checkURL();
		
	};

	TabsBox.prototype.respond = function () {

		if ( utils.breakpoint() === 's' ) {

			this.setUpMobileView();

		} else {

			//this.setUpDesktopView();

		}
	};

	TabsBox.prototype.setUpMobileView = function () {
		var count = 0,
			active_index,
			_this = this;

		$('.m41-tabs-box--select-mobile').empty();

		$('.m41-tabs-box__tab-link').each(function(){
			var content = $(this).html();

			if ($(this).hasClass('m41-tabs-box__tab-link--active')) {
				active_index = count;
			}

			$('.m41-tabs-box--select-mobile').append('<option trigger_index='+count+'>'+content+'</option>');
			count++
		});

		$('.m41-tabs-box--select-mobile').change(function(){
			var index_trigger = $(this).children(":selected").attr('trigger_index');

			$('.m41-tabs-box__tab-link')[index_trigger].click();
		});

		$('.m41-tabs-box--select-mobile>option').eq(active_index).prop('selected', true);

	};

	TabsBox.prototype.hideShow = function () {
		var _this = this;

		$('.m41-tabs-box__tab-link').off().on('click', function(e) {
			e.preventDefault();
			$('.m41-tabs-box__tab-link').each(function(){
				$(this).removeClass('m41-tabs-box__tab-link--active');
			});
			$(this).addClass('m41-tabs-box__tab-link--active');
			_this.hideShowToggle();
		});

		$('.m41-tabs-box__tab-link-nested').off().on('click', function(e) {
			e.preventDefault();
			$('.m41-tabs-box__tab-link-nested').each(function(){
				$(this).removeClass('m41-tabs-box__tab-link-nested--active');
			});
			$(this).addClass('m41-tabs-box__tab-link-nested--active');
			_this.hideShowToggleNested();
		});

	};

	TabsBox.prototype.hideShowToggle = function () {

		$('.m41-tabs-box__tab-item').each(function(){
			if ($(this).find('.m41-tabs-box__tab-link').hasClass('m41-tabs-box__tab-link--active')) {
				var activate = $(this).attr('data-index');
				$('.m41-tabs-box__tab-panel').each(function() {
					$(this).hide();
					if ($(this).attr('data-index') == activate) {
						$(this).show();
						jQuery(window).trigger('resize.m77');
						window.initComponents('components-reinit');
					}
				});
			}
		});

	};

	TabsBox.prototype.hideShowToggleNested = function () {

		$('.m41-tabs-box__tab-item-nested').each(function(){
			if ($(this).find('.m41-tabs-box__tab-link-nested').hasClass('m41-tabs-box__tab-link-nested--active')) {
				var activate = $(this).attr('data-nested-index');
				$('.m41-tabs-box__tab-panel-nested').each(function() {
					$(this).hide();
					if ($(this).attr('data-nested-index') == activate) {
						$(this).show();
						jQuery(window).trigger('resize.m77');
						window.initComponents('components-reinit');
					}
				});
			}
		});

	};

	TabsBox.prototype.checkURL = function () {
		var _this = this,
			index = window.location.href[window.location.href.indexOf('m41index=')+9];
			//console.log(index)
		this.$component.find('.m41-tabs-box__tab-item').each(function() {
			if ($(this).attr('data-index') == index) {
				$(this).find('.m41-tabs-box__tab-link').click();
			}
		});
	}

	TabsBox.prototype.autoScroll= function(target,parent){
		var targetPos = target.offset().left,
			parentPos = target.parent().offset().left,
			targetWidth = target.outerWidth(),
			parentWidth = target.parent().outerWidth(),
			centerPos = parentWidth/2 - targetWidth/2,
			scrollAmount = targetPos - parentPos - centerPos;
			parent.animate({scrollLeft: scrollAmount}, 'slow');
	}

	return TabsBox;

} );

define('../src/sublayouts/m43-account-selector/m43-account-selector',['jquery', 'lib/utils'], function($, utils) {

    'use strict';

    var AccountSelector = function($component) {

        this.$component = $component;

        return this;
    };

    AccountSelector.prototype.init = function() {
        var _this = this,
            moveout = false;


        this.refresh();

        //if( utils.isTouchDevice() ) {
        //  this.optimiseForTouchDevices();
        //}

        $(window).on('bind-selector-checkbox', function() {
            _this.resetMultiSelection();
        });

        $(window).off('hellopopulate').on('hellopopulate', function() {
            _this.populate_moveout();
        });

        $(window).off('data_loaded').on('data_loaded', function(){
            _this.init();
        });

        //$( document ).ajaxStop(function(){
        //    _this.$component.find('.m43-accountsel-hidden').show()
        //    _this.$component.find('.m66-preloader').hide()
        //});

        $( document ).ready(function(){
            _this.$component.find('.m43-accountsel-hidden').show()
            _this.$component.find('.m66-preloader').hide()
        });

        $('.m43-accountsel').each(function() {
            _this.defaultSelectedAccount(this);
        });
        
    };

    AccountSelector.prototype.defaultSelectedAccount = function($parent) {
        var _this = this,
            $accounts = $($parent).attr('data-selected-account');

        if ($accounts != undefined) {
            var accArr = $accounts.toString().replace(' ','').split(',');
            //console.log(accArr)
            if ( accArr.length != 0 ) {
                $(accArr).each(function() {
                    $($parent).find('.m49-list-filter--input').val(this);
                    $($parent).find('.m49-list-filter--button').click();
                    $($parent).find('.m43-accountsel__accounts-list').find('.form-field__fakecheckbox').click();
                    $($parent).find('.m43-accountsel__accounts-list').find('.form-field__fakeradio').click();
                    $($parent).find('.button--primary[data-accountupdate=true]').click();
                    $($parent).find('.m49-list-filter-reset-button').click();
                });
            } else {

            };
        }

    };

    AccountSelector.prototype.optimiseForTouchDevices = function() {

        var _this = this,
            $content = this.$component.find('.m39-modal__content').clone();

        this.$component.find('.m39-modal__content').remove();

        $('body').on('modal_opened', function() {

            _this.$component.find('.m39-modal__dialog--account').append($content);
            _this.refresh();
        });

        $('body').on('modal_closed', function() {

            _this.$component.find('.m39-modal__content').remove();
        });
    };

    AccountSelector.prototype.refresh = function() {
        var _this = this;
        // data- selector for dropdown update
        this.detailsWrapper = '[ data-acc-detail="wrapper" ]';
        this.additionalDetails = {
            'accType': '[ data-acc-detail="acc_type" ]',
            'accBusinessPartner': '[ data-acc-detail="acc_businesspartner" ]'
        };
        this.additionalDetails2 = {
            'accType': '[ data-acc-detail="type" ]',
            'accPremise': '[ data-acc-detail="acc_premise" ]',
            'accPremiseType': '[ data-acc-detail="acc_premiseType" ]',
            'accBusinessPartner': '[ data-acc-detail="acc_businesspartner" ]'
        };

        // cache dom els
        this.$selectedAccount = this.$component.find('[ data-accountselector ]');
        this.$selectedAccountDetails = this.$selectedAccount.find(this.detailsWrapper);
        this.$selectedAccountAdditionalsDetails = this.$component.find('[ data-accountsel-additional-details ]');
        this.$multiSelectedText = this.$component.find('[ data-acc-multiselected ]');
        this.$multiSelectedTextcopy = this.$component.find('[ data-acc-multiselected-copy ]');
        this.$errorText = this.$component.find('[ data-modal="errormessage" ]');
        this.$accountImages = this.$component.find(' [ data-acc-detail="acc_image" ] ');

        this.$update = this.$component.find('[ data-accountupdate ]');
        this.$close = this.$component.find('[ data-close ]');
        this.$accounts = this.$component.find('[ data-input ]');
        this.$checkboxes = this.$component.find('[ data-input="checkbox" ]');

        // tabs
        this.$tabbers = this.$component.find('[ data-tabber ]');
        this.$tabPanels = this.$component.find('[ data-tabpanel ]');
        this.$tabStorer = this.$component.find('[ data-tabstorer ]');
        this.hasTabs = this.$tabStorer.length > 0;

        // whether to let the form submit on modal cta
        this.preventSubmit = this.$selectedAccount.data('preventsubmit');

        // listeners
        this.$selectedAccount.on('click', $.proxy(this.stashSelectedInput, this));
        this.$update.on('click', $.proxy(this.populate, this));
        this.$close.on('click', $.proxy(this.resetSelected, this));
        this.$tabbers.on('click', $.proxy(this.switchTabs, this));

        // undo changes to checkboxes selection on cancel(close)
        this.$currentCheckedCheckboxes = {};
        this.$previousCheckedCheckboxes = {};

        // min/max selection validation
        this.minMaxValidated = true;
        this.minSelection = this.$selectedAccount.data('minselection');
        if (this.minSelection === undefined) {
            this.minSelection = 1;
        }
        this.maxSelection = this.$selectedAccount.data('maxselection');
        if (this.maxSelection === undefined) {
            this.maxSelection = 99999; // arbitrary but enough
        }

        // load account images
        this.sequentiallyLoadImages();

        //Global Object for account multi-selection tab-wise
        dewaGlobal.multiSelectionInputData = [];
        //Reset the muti-selection tab-wise
        this.resetMultiSelection();

        var resetControl = this.$component.find("[ data-reset-control ]");
        var resetUpdate = this.$component.find("[ data-reset-update ]");
        $(resetUpdate).on('click', function() {

            _this.$currentCheckedCheckboxes = {};
            _this.$previousCheckedCheckboxes = {};
            dewaGlobal.multiSelectionInputData = [];
            _this.init();
            var msg = $('#multiselected-copy');
            msg.removeClass('hidden')
                .attr('aria-hidden', false)
                .text(msg.data('acc-multiselected-copy'));

            var msgnew = $('#multiselected');
            if (_this.moveout) {
                msgnew.html($('.moveout_hidden_container').html());
            } else {
                msgnew.addClass('hidden').attr('aria-hidden', true).text(' ');
            }
            

        });

        var pagerUpdate = this.$component.find("[ data-pager-update ]");
        $(pagerUpdate).on('click', function() {
            //Reset the value of account list
            _this.$selectedAccountDetails = _this.$selectedAccount.find(_this.detailsWrapper);
            _this.$accounts = _this.$component.find("[ data-input ]");
            //Reset the checkbox for multi-selection.
            _this.$checkboxes = _this.$component.find('[ data-input="checkbox" ]');
            //Reset the value of tabs
            _this.$tabbers = _this.$component.find("[ data-tabber ]");
            _this.$tabPanels = _this.$component.find("[ data-tabpanel ]");
            _this.$tabStorer = _this.$component.find("[ data-tabstorer ]");
            _this.hasTabs = _this.$tabStorer.length > 0;
            //Check tab found, if any. 
            if (_this.hasTabs) {
                //then find the current value & call click event of tab-button.
                var dewaTabber = _this.$tabbers[$(_this.$tabStorer).val()];
                $(dewaTabber).click();
                //debugger;
            }
            _this.resetMultiSelection();
            //Set the checkbox selection
            _this.resetMultiSelected();
        });
        //Check tab found at first time. then find the current value & call click event of tab-button.
        if (this.hasTabs) {
            var dewaTabber = this.$tabbers[$(this.$tabStorer).val()];
            $(dewaTabber).click();

            //Find the default checked item & add in the list at first time.
            var currentCheckedInputList = this.$accounts.filter(":checked");
            $(currentCheckedInputList).each(function(i, elem) {
                var currentTab = $(elem).parents('.m43-accountsel__tabpanel')[0];
                var tabIndex = $(currentTab).data('tabpanel');
                var currentInput = $(elem);
                var isChecked = currentInput.is(":checked") ? 1 : 0;
                _this.updateMultiSelectionData(tabIndex, currentInput, isChecked);
            });
        };
    };


    AccountSelector.prototype.switchTabs = function(e) {

        var $selectedTabber = $(e.target),
            $selectedTabberCode = $selectedTabber.data('tabber'),
            $selectedTabPanel = this.$component.find('[ data-tabpanel="' + $selectedTabberCode + '" ]');

        e.preventDefault();

        this.$tabbers.removeClass('m41-tabs-box__tab-link--active').attr('aria-selected', 'false');
        $selectedTabber.addClass('m41-tabs-box__tab-link--active').attr('aria-selected', 'true');

        this.$tabPanels.addClass('m43-accountsel__tabpanel--hidden').attr('aria-hidden', 'true');
        $selectedTabPanel.removeClass('m43-accountsel__tabpanel--hidden').attr('aria-hidden', 'false');

        this.$tabStorer.val($selectedTabberCode);

        // reset min/max selection message status
        this.$accounts.off('change');

        this.$errorText
            .addClass('hidden')
            .attr('aria-hidden', true);

        this.$update
            .removeClass('hidden')
            .attr('aria-hidden', false);

    };

    AccountSelector.prototype.resetSelected = function() {

        var key;

        if (this.minMaxValidated === true) {

            this.$currentCheckedInput.prop('checked', true);

            for (key in this.$currentCheckedCheckboxes) {
                if (this.$currentCheckedCheckboxes.hasOwnProperty(key)) {
                    $('#' + key).prop('checked', this.$currentCheckedCheckboxes[key]);
                }
            }
        } else {

            this.$previousCheckedInput.prop('checked', true);

            for (key in this.$previousCheckedCheckboxes) {
                if (this.$previousCheckedCheckboxes.hasOwnProperty(key)) {
                    $('#' + key).prop('checked', this.$previousCheckedCheckboxes[key]);
                }
            }

        }
    };
    AccountSelector.prototype.resetMultiSelected = function() {
        var _this = this;
        var currentTabIndex = (_this.hasTabs ? $(_this.$tabStorer).val() : 0);
        var currentTabObj = $.map(dewaGlobal.multiSelectionInputData, function(Obj, key) {
            if (Obj.tabindex == currentTabIndex) return Obj;
        });
        for (var i in currentTabObj) {
            $("#" + currentTabObj[i].id).prop("checked", true);
        }
    };
    AccountSelector.prototype.resetMultiSelection = function() {
        var _this = this;
        this.$inputBoxMutiSelection = this.$component.find('.form-field__fakecheckbox');
        $(this.$inputBoxMutiSelection).on('click', function(event) {
            var tabIndex = (_this.hasTabs ? $(_this.$tabStorer).val() : 0);
            var currentInput = $(this.previousElementSibling);
            var isChecked = currentInput.is(":checked") ? 0 : 1; //Here event value is reverese or i use true=0 & false=1 
            _this.updateMultiSelectionData(tabIndex, currentInput, isChecked);
        });
    };
    AccountSelector.prototype.updateMultiSelectionData = function(tabIndex, currentInput, isChecked) {
        var _this = this;
        var currentAccObj = { tabindex: tabIndex, id: currentInput.attr('id'), account: (currentInput.data('account-number')).toString(), name: currentInput.data('account-name'), type: currentInput.data('account-class') };
        var isExist = $.grep(dewaGlobal.multiSelectionInputData, function(obj) {
            return (obj.account === currentAccObj.account && obj.tabindex === currentAccObj.tabindex);
        });

        if (isChecked == 0) { //false remove it
            dewaGlobal.multiSelectionInputData = $.grep(dewaGlobal.multiSelectionInputData, function(obj, i) {
                return (obj.account === currentAccObj.account && obj.tabindex === currentAccObj.tabindex); }, true);
        } else {
            if (isExist.length == 0 && isChecked == 1) { //checked it true
                dewaGlobal.multiSelectionInputData.push(currentAccObj);
            }
        }
    };
    AccountSelector.prototype.stashSelectedInput = function() {
        var _this = this;

        this.$currentCheckedInput = this.$accounts.filter(':checked');
        // create an object of checkboxes 'id':'checked'
        this.$checkboxes.each(function(i, e) {
            _this.$currentCheckedCheckboxes[$(e).attr('id')] = $(e).is(':checked');
        });
        //Reset the multiselected input box
        this.resetMultiSelected();
    };

    AccountSelector.prototype.findCurrentTabCheckedInputs = function() {
        var _this = this;
        this.$currentTabChecked = this.$tabPanels.filter('[ data-tabpanel="' + this.$tabStorer.val() + '" ]').find(':checked');
        //Added for multi-selection page-wise
        this.$currentTabCheckedCount = $.grep(dewaGlobal.multiSelectionInputData, function(obj) {
            return (obj.tabindex == _this.$tabStorer.val());
        });
    };


    AccountSelector.prototype.populate = function(e) {

        var _this = this,
            totAccounts,
            $updateAccount;

        this.$previousCheckedInput = this.$currentCheckedInput;
        this.$previousCheckedCheckboxes = $.extend({}, this.$currentCheckedCheckboxes);
        this.stashSelectedInput();

        if (this.hasTabs) {
            // we have tabs - then count how many were checked in the current tab ipanel
            this.findCurrentTabCheckedInputs();
            //totAccounts = this.$currentTabChecked.length; //Bharat: I have changed for multi-selection page-wise validation
            totAccounts = this.$currentTabCheckedCount.length;

        } else {
            totAccounts = this.$currentCheckedInput.length;
        }
        if (totAccounts == 0 && this.minSelection == 1 && this.maxSelection == 1) {

            e.preventDefault();

            this.$close.click();


        } else {
            if (totAccounts >= this.minSelection && totAccounts <= this.maxSelection) {

                this.minMaxValidated = true;

                this.clearMessage(this.$multiSelectedText);

                if (this.preventSubmit === true) {
                    e.preventDefault();
                }

                switch (totAccounts) {
                    //debugger;
                    // radio or single checkbox - show account deatails
                    case 1:
                        if (this.hasTabs) {
                            // this.$currentCheckedInput stores ALL checked inputs for all tabs, so it doesn't work. We need to find the checked one in the current tab.
                            // (I'm so sorry about this line of code)
                            $updateAccount = this.$currentTabChecked.parent().find(this.detailsWrapper).clone();

                            var $link = _this.$component.find('.m43accountdetailslink'),
                                pholder = $link.attr('data-url');

                            if ( pholder != undefined && pholder != null ) {
                                $link.attr('href', pholder+this.$currentTabChecked.parent().find(this.detailsWrapper).find('[data-acc-detail="acc_number"]').html().replace('(', '').replace(')', ''))
                            }
                        } else {
                            $updateAccount = this.$currentCheckedInput.parent().find(this.detailsWrapper).clone();

                            var $link = _this.$component.find('.m43accountdetailslink'),
                                pholder = $link.attr('data-url');

                            if ( pholder != undefined && pholder != null ) {
                                $link.attr('href', pholder+this.$currentCheckedInput.parent().find(this.detailsWrapper).find('[data-acc-detail="acc_number"]').html().replace('(', '').replace(')', ''))
                            }
                        }

                        for (var key in this.additionalDetails2) {

                            if (this.additionalDetails2.hasOwnProperty(key)) {
                                var k = this.additionalDetails2[key],
                                    $newDetailNode = $updateAccount.find(k);

                                this.$selectedAccountAdditionalsDetails.find(k).text($newDetailNode.text());
                                if ($newDetailNode.text().length == 0) {
                                    this.$selectedAccountAdditionalsDetails.find(k).hide();
                                    //this.$selectedAccountAdditionalsDetails.find(k).prev().hide();
                                } else {
                                    this.$selectedAccountAdditionalsDetails.find(k).show();
                                    //this.$selectedAccountAdditionalsDetails.find(k).prev().show();
                                }
                                
                            }

                        }

                        for (var key in this.additionalDetails) {

                            if (this.additionalDetails.hasOwnProperty(key)) {
                                var k = this.additionalDetails[key],
                                    $newDetailNode = $updateAccount.find(k);

                                //this.$selectedAccountAdditionalsDetails.find(k).text($newDetailNode.text());
                                $updateAccount.find($newDetailNode).parent().remove();
                            }

                        }
                        break;
                        // if more than one selected (checkboxes!) - show how many
                    default:
                        $updateAccount = '';

                        this.$multiSelectedText
                            .removeClass('hidden')
                            .attr('aria-hidden', false)
                            .text(this.$multiSelectedText.data('acc-multiselected').replace("{number}",totAccounts));
                            //.text(totAccounts + this.$multiSelectedText.data('acc-multiselected'));

                        /*this.$multiselectedcopy
                            .addClass('hidden' )
                            .attr( 'aria-hidden', true )
                            .text('');*/
                        var msgnew = $('#multiselected-copy');
                        msgnew.addClass('hidden').attr('aria-hidden', true).text(' ');
                }

                this.$selectedAccountDetails.html($updateAccount);

                this.$close.click();

            } else { // handle error message when out of min/max selection bounds

                this.minMaxValidated = false;

                e.preventDefault();

                if (totAccounts < this.minSelection) {
                    this.$errorText.text(this.$errorText.data('min-error'));
                } else { // if > this.maxSelection
                    this.$errorText.text(this.$errorText.data('max-error'));
                }

                this.$errorText
                    .removeClass('hidden')
                    .attr('aria-hidden', false)
                    .focus();

                this.$update
                    .addClass('hidden')
                    .attr('aria-hidden', true);

                this.$accounts.on('change', function() {
                    var currentSelectedAmount;

                    if (_this.hasTabs) {

                        _this.findCurrentTabCheckedInputs();
                        //currentSelectedAmount = _this.$currentTabChecked.length; //Bharat: I have changed for multi-selection page-wise validation
                        currentSelectedAmount = _this.$currentTabCheckedCount.length;
                    } else {

                        currentSelectedAmount = _this.$accounts.filter(':checked').length;
                    }

                    if (currentSelectedAmount >= _this.minSelection) {

                        _this.$accounts.off('change');

                        _this.$errorText
                            .addClass('hidden')
                            .attr('aria-hidden', true);

                        _this.$update
                            .removeClass('hidden')
                            .attr('aria-hidden', false);
                    }

                });

            }
        }

    };

    AccountSelector.prototype.populate_moveout = function(e) {

        var _this = this,
            totAccounts,
            $updateAccount;

        this.$previousCheckedInput = this.$currentCheckedInput;
        this.$previousCheckedCheckboxes = $.extend({}, this.$currentCheckedCheckboxes);
        this.stashSelectedInput();

        this.moveout = true;

        if (this.hasTabs) {
            // we have tabs - then count how many were checked in the current tab ipanel
            this.findCurrentTabCheckedInputs();
            //totAccounts = this.$currentTabChecked.length; //Bharat: I have changed for multi-selection page-wise validation
            totAccounts = this.$currentTabCheckedCount.length;

        } else {
            totAccounts = this.$currentCheckedInput.length;
        }
        if (totAccounts == 0 && this.minSelection == 1 && this.maxSelection == 1) {

            e.preventDefault();

            this.$close.click();


        } else {
            if (totAccounts >= this.minSelection && totAccounts <= this.maxSelection) {

                this.minMaxValidated = true;

                this.clearMessage(this.$multiSelectedText);

                if (this.preventSubmit === true) {
                    e.preventDefault();
                }

                if (totAccounts == 1) {
                    this.$multiSelectedText
                        .removeClass('hidden')
                        .attr('aria-hidden', false)
                        .text(this.$multiSelectedText.data('acc-multiselected-sing').replace("{number}", totAccounts));
                    _this.$component.find(".m43-accountsel__selected").find(".m43-accountsel__account").html("");
                } else {
                    this.$multiSelectedText
                        .removeClass('hidden')
                        .attr('aria-hidden', false)
                        .text(this.$multiSelectedText.data('acc-multiselected').replace("{number}", totAccounts));
                        //.text(totAccounts + this.$multiSelectedText.data('acc-multiselected'));
                    _this.$component.find(".m43-accountsel__selected").find(".m43-accountsel__account").html("");
                };

                this.$selectedAccountDetails.html($updateAccount);

                this.$close.click();

            } else { // handle error message when out of min/max selection bounds

                this.minMaxValidated = false;

                e.preventDefault();

                if (totAccounts < this.minSelection) {
                    this.$errorText.text(this.$errorText.data('min-error'));
                } else { // if > this.maxSelection
                    this.$errorText.text(this.$errorText.data('max-error'));
                }

                this.$errorText
                    .removeClass('hidden')
                    .attr('aria-hidden', false)
                    .focus();

                this.$update
                    .addClass('hidden')
                    .attr('aria-hidden', true);

                this.$accounts.on('change', function() {
                    var currentSelectedAmount;

                    if (_this.hasTabs) {

                        _this.findCurrentTabCheckedInputs();
                        //currentSelectedAmount = _this.$currentTabChecked.length; //Bharat: I have changed for multi-selection page-wise validation
                        currentSelectedAmount = _this.$currentTabCheckedCount.length;
                    } else {

                        currentSelectedAmount = _this.$accounts.filter(':checked').length;
                    }

                    if (currentSelectedAmount >= _this.minSelection) {

                        _this.$accounts.off('change');

                        _this.$errorText
                            .addClass('hidden')
                            .attr('aria-hidden', true);

                        _this.$update
                            .removeClass('hidden')
                            .attr('aria-hidden', false);
                    }

                });

            }
        }

    };

    AccountSelector.prototype.clearMessage = function($message) {

        // empty and hide the DOM element showing the given message
        $message
            .addClass('hidden')
            .attr('aria-hidden', true)
            .text('');
    };

    // due to slow webservices defer loading of images until after DOM load and load them sequentially
    AccountSelector.prototype.sequentiallyLoadImages = function(index) {
        var _this = this,
            accountImages = _this.$accountImages,
            promises = [],
            chunkSize = 10,
            chunkEnd,
            set, i;

        function defferedImage(i, img) {
            var deferred = $.Deferred(),
                dataSrc = $(img).data('src');

            // resolve on load
            img.onload = function() {
                deferred.done();
            }

            // set src of image or resolve promise it no async src defined
            if (dataSrc) {
                img.src = dataSrc;
            } else {
                deferred.done();
            }

            return deferred.promise();
        }

        index = index || 0;
        chunkEnd = index + chunkSize;
        set = accountImages.slice(index, chunkEnd);

        // set up image load promises
        promises.push(set.each(defferedImage));

        // handle promise set resolution
        $.when.apply($, promises).always(function(response) {
            if (chunkEnd < accountImages.length) {
                _this.sequentiallyLoadImages(chunkEnd);
            }
        });
    };

    return AccountSelector;

});

define( '../src/sublayouts/m44-bill-selector/m44-bill-selector',[ 'jquery' , 'lib/utils', 'numeral'], function ( $, utils) {

	'use strict';

	var BillSelector = function ($component) {

		this.$component = $component;

		return this;
	};


	BillSelector.prototype.init = function () {
		var _this = this;
		dewaGlobal.billAccountsListSelected = [];
		this.$checkboxes = this.$component.find( '[ data-input="checkbox" ]' );
		this.$total = this.$component.find('.m44-bill-selector__total .m42-keyvalue--justified-dd');
		this.$selectionTotal = this.$component.find('.m44-bill-selector__total .m42-keyvalue__key');
		this.$selectionAccountPlural = this.$selectionTotal.find('.m44-account-plural');
		this.suffix = this.$component.data('currency-suffix');
		this.$accountImages = this.$component.find(' [ data-acc-detail="acc_image" ] ');
		this.$nextButton = $('[data-m44-next]');

		// listeners
		this.$component.on( "change", '[ data-input="checkbox" ]', function(e) {
			e.stopImmediatePropagation();
			var currentInput = $(this);
			var isChecked = currentInput.is(":checked") ? 1 : 0; 
			_this.updateMultiSelectionData(currentInput, isChecked);
			_this.updateTotal();
		});

		this.$component.on( "click", '.m44-bill-selector__review-details--edit', function(e) {
			_this.isolateEvent(e);
			_this.showEditAmountForm($(this));
		});

		this.$component.on( "click", '.m44-bill-selector__deselect', "click", function(e) {
			_this.isolateEvent(e);
			if ($(this).data('state') == 1) {
				$(this).data('state', 0);
				$(this).text($(this).data('select'));
				_this.$checkboxes.each(function () {
					if ($(this).hasClass('disabled')) {

					}
					else {
						$(this).prop('checked', false);
					};
				});
				_this.billAccountsListSelected = []; //Set blank. Becuase nothing is selected
			} else {
				$(this).data('state', 1);
				$(this).text($(this).data('deselect'));
				_this.$checkboxes.each(function () {
					if ($(this).hasClass('disabled')) {

					}
					else {
						$(this).prop('checked', true);
					};
				});
				//if (!_this.$component.hasClass('m44-bill-selectorEV')) {
				_this.billAccountsListSelected = _this.billAccountsList; //Set All. Copy all list to selected list
				//};
			}
			_this.updateTotal();
		});

		$(window).on('updatetotal', function () {
			_this.updateTotal();
		});

		this.$component.on( "click", '.m44-bill-selector__review-form-button--cancel', "click", function(e) {
			_this.isolateEvent(e);
			_this.hideEditAmountForm($(this));
		});

		this.$component.on( "click", '.m44-bill-selector__submit .button', "click", function(e) {
			_this.isolateEvent(e);
			var form = $(this).closest('form');
			var valid = form.parsley().isValid();
			if (valid) {
				form.submit();
			}
		});

		this.$nextButton.on('click', function(e) {
			if ($(this).is('[disabled]')) {
				e.preventDefault();
			}
			dewaGlobal.billAccountsListSelected = _this.billAccountsListSelected;
		});

		// get maximum payment value
		this.paymentMax = this.$component.data('payment-max');
		//Find all the account at first load. dewaGlobal.billAccountsList is intialized in M44 Bill selection List.cshtml
		this.isBillSelectorPage = this.$component.find('.m44-bill-selector__account--select').length > 0 ? true : false;
		this.billAccountsList = [];
		this.billAccountsListSelected = [];
		if (!_this.$component.hasClass('m44-bill-selectorEV')) {
			if (this.isBillSelectorPage) {
				setTimeout(function() {
					_this.billAccountsList = $.map(dewaGlobal.billAccountsList, function (Obj, key) {
						return {
							AccountNumber: Obj.AccountNumber,
							Active: Obj.Active,
							Balance: Obj.Balance,
							BusinessPartnerNumber: Obj.BusinessPartnerNumber
						};
					});
				if (!_this.$component.hasClass('m44-bill-selectorEV')) {
					_this.billAccountsListSelected = _this.billAccountsList;
				}
				}, 1500);
			}
		} else {
			if (this.isBillSelectorPage) {
				setTimeout(function() {
					_this.billAccountsList = $.map(dewaGlobal.billAccountsList, function (Obj, key) {
						return {
							Index: Obj.index,
							Platenumber: Obj.Platenumber,
							Balance: parseFloat(Obj.Totalamount)
						};
					});
				if (!_this.$component.hasClass('m44-bill-selectorEV')) {
					_this.billAccountsListSelected = _this.billAccountsList;
				}
				}, 1500);
			}
		};
			
		//calculate totals for nodes already in the DOM
		this.$checkboxes.each(function () {
			_this.populateTotals($(this));
		});

		// if we are in review mode, populate totals
		if (this.$component.find('.m44-bill-selector__account--review').length) {
			// set review mode and hidden total field
			this.reviewMode = true;
			this.$submit = this.$component.find('.m44-bill-selector__submit > button');
			this.$hiddenTotal = this.$component.find('#form-field-billtotal');

			this.initReviewTotal();

			// and add an event listener for input field changes
			$( ".m44-bill-selector" ).on( 'blur change', '.form-field__input--text', function(e) {
				e.stopPropagation();
				_this.editTotal($(this));
			});
		}

		if (this.$component.find('.m44-bill-selector__account--select').length) {
			_this.updateTotal();
		}

		// load account images
		this.sequentiallyLoadImages();
		
		//AccountNumber, Active, Balance, BusinessPartnerNumber
		var pagerUpdate = this.$component.find("[ data-pager-update ]");
		$(pagerUpdate).on('click', function () {
			//Reset the checkbox for multi-selection.
			_this.$checkboxes = _this.$component.find('[ data-input="checkbox" ]');
			_this.$total = _this.$component.find('.m44-bill-selector__total .m42-keyvalue--justified-dd');
			_this.$selectionTotal = _this.$component.find('.m44-bill-selector__total .m42-keyvalue__key');
			_this.$selectionAccountPlural = _this.$selectionTotal.find('.m44-account-plural');
			_this.suffix = _this.$component.data('currency-suffix');
			_this.$accountImages = _this.$component.find(' [ data-acc-detail="acc_image" ] ');
			//calculate totals for nodes already in the DOM
			_this.$checkboxes.each(function () {
				_this.populateTotals($(this));

				if (!_this.$component.hasClass('m44-bill-selectorEV')) {

					var accountNumber = $(this).data('account-number').toString()

					var isExist = $.grep(_this.billAccountsListSelected, function (obj) {
						return (obj.AccountNumber === accountNumber);
					});
				} else {

					var Index = Number($(this).data('index'));

					var isExist = $.grep(_this.billAccountsListSelected, function (obj) {
						return (obj.Index === Index);
					});
				}
				
				if (isExist.length > 0) {
					$(this).prop('checked', true);
				}
				else {
					$(this).prop('checked', false);
				}
			});
			_this.updateTotal();
		});

		setTimeout(function() {
			$('.m44-bill-selector__deselect').trigger('click');
			$('.m44-bill-selector__deselect').trigger('click');
			$('.m66-preloader.j105-drrg--loader').hide();
			$('body').removeClass('unscrollable');
		}, 2000);
	};
	BillSelector.prototype.updateMultiSelectionData = function (currentInput, isChecked) {
		var _this = this;

		if (!_this.$component.hasClass('m44-bill-selectorEV')) {
			var currentAccObj = {
				AccountNumber: currentInput.data('account-number').toString(),
				Active: Boolean(currentInput.data('active')),
				Balance: Number(currentInput.data('balance')),
				BusinessPartnerNumber: currentInput.data('business-partner-number').toString()
			}; 

			var isExist = $.grep(this.billAccountsListSelected, function (obj) {
				return (obj.AccountNumber === currentAccObj.AccountNumber);
			});
			
			if (isChecked == 0) { //false remove it
				this.billAccountsListSelected = $.grep(this.billAccountsListSelected, function (obj, i) { return (obj.AccountNumber === currentAccObj.AccountNumber); }, true);
			}
			else {
				if (isExist.length == 0 && isChecked == 1) { //checked it true
					this.billAccountsListSelected.push(currentAccObj);
				}
			}
		} else {
			var currentAccObj = {
				Platenumber: currentInput.data('account-number').toString(),
				Active: Boolean(currentInput.data('active')),
				Balance: Number(currentInput.data('balance')),
				Index: Number(currentInput.data('index')),
				BusinessPartnerNumber: currentInput.data('business-partner-number').toString()
			};

			var isExist = $.grep(this.billAccountsListSelected, function (obj) {
				return (obj.Index === currentAccObj.Index);
			});
			
			if (isChecked == 0) { //false remove it
				this.billAccountsListSelected = $.grep(this.billAccountsListSelected, function (obj, i) { return (obj.Index === currentAccObj.Index); }, true);
			}
			else {
				if (isExist.length == 0 && isChecked == 1) { //checked it true
					this.billAccountsListSelected.push(currentAccObj);
				}
			}
		}
	};
	
	BillSelector.prototype.isolateEvent = function (e) {
		e.preventDefault();
		e.stopPropagation();
		e.stopImmediatePropagation();
	};

	BillSelector.prototype.showEditAmountForm = function (el) {
		$(el).closest('.m44-bill-selector__account--review').find('.m44-bill-selector__review-form').css({
			height:"auto"
		});
	};

	BillSelector.prototype.hideEditAmountForm = function (el) {
		var target = $(el).closest('.m44-bill-selector__account--review');
		target.data('bill-partial', target.data('bill-amount'));
		target.find('.form-field__input--text').val(target.data('bill-amount'));
		target.find('.m44-bill-selector__review-form').css({
			height: '0'
		});
		this.updateReviewTotal();
	};

	BillSelector.prototype.editTotal = function (el) {
		el.closest('.m44-bill-selector__account--review').data('bill-partial', Number(el.val()));
		this.updateReviewTotal();
	};

	BillSelector.prototype.getReviewTotal = function (init) {
		var _this = this,
				total = 0,
				dir = utils.isRTL() ? '\u200F' : '';

		this.$component.find('.m44-bill-selector__account--review').each(function () {
			var t = $(this);

			if(init) {
				// expand any pre edited payment values and retotal
				if (t.find('input[data-parsley-currency]').length && t.data('bill-partial').toString() !== t.find('input[data-parsley-currency]').val()) {
					_this.showEditAmountForm(t.find('.m44-bill-selector__review-details--edit'));
					t.data('bill-partial', Number(t.find('input[data-parsley-currency]').val()));
				}

				// set bill amounts
				t.find('button').text(_this.getFormattedValue(t.data('bill-amount'), _this.suffix));
			}

			if (t.data('bill-amount') != t.data('bill-partial' )) {

				if (t.data('bill-partial') > 0) {
					total += Number(t.data('bill-partial'));
				}
			} else {
				if (t.data('bill-amount') > 0) {
					total += Number(t.data('bill-amount'));
				}
			}

			if (_this.reviewMode) {

				// update hidden total
				_this.$hiddenTotal.val(total.toFixed(2)).parsley().validate();

				if (total.toFixed(2) > 0 && total.toFixed(2) <= parseFloat(_this.paymentMax)) {
					_this.$submit.removeAttr('disabled').removeClass('disabled');
				} else {
					_this.$submit.attr('disabled', true).addClass('disabled');
				}
			}
		});

		return parseFloat(total).toFixed(2);
	};

	BillSelector.prototype.updateReviewTotal = function () {
		this.updateDisplay(this.getReviewTotal());
	};

	BillSelector.prototype.initReviewTotal = function () {
		this.updateDisplay(this.getReviewTotal(true));
	};

	BillSelector.prototype.updateDisplay = function (total) {
		var suffix = this.$component.data('currency-suffix'),
				dir = utils.isRTL() ? '\u200F' : '';

		$(this.$component).data('bill-total', total);
		$(this.$component).find('.amount_label').text(this.getFormattedValue(total, suffix));
	};

	BillSelector.prototype.updateTotal = function () {
		var _this = this,
				total = 0,
				dir = utils.isRTL() ? '\u200F' : '';

		//// Next block of code is implemeted as alternative of this code.(This is without Paging.) //Commented by Bharat
		//$(this.$checkboxes).each(function () {
		//	if ($(this).prop('checked')) {
		//		var parent = $(this).closest('.form-field__checkbox--billselector'),
		//			account = parent.find('.m44-bill-selector__account--select'),
		//			amount = Number(account.data('bill-amount'));
		//		if (amount>0){
		//			total += amount;
		//		}
		//	}
		//});
		
		//New code is implemented for calculating the total. (This is page-wise) //Added by Bharat
		//Start of New Code
		$(this.billAccountsListSelected).each(function (i, obj) {
			var amount = obj.Balance;
			if (amount > 0) {
				total += amount;
			}
		});
		//End : End of New Code
		
		if (total <= 0) {
			total = '0.00';
		}

		total = parseFloat(total).toFixed(2);

		$(this.$component).data('bill-total', total);
		this.$total.text(this.getFormattedValue(total, _this.suffix));

		this.updateSelectCount();
	};

	BillSelector.prototype.updateSelectCount = function () {
		//var numSelected = this.$checkboxes.filter(':checked').length; //Commented By Bharat
		var numSelected = this.billAccountsListSelected.length;
		
		this.$selectionTotal.find('.m44-account-count').text( numSelected );

		if ( numSelected === 1 && this.$selectionAccountPlural.text() !== this.$selectionAccountPlural.data('single') ) {
			this.$selectionAccountPlural.text( this.$selectionAccountPlural.data('single') );
		} else if ( numSelected !== 1 && this.$selectionAccountPlural.text() !== this.$selectionAccountPlural.data('plural') ) {
			this.$selectionAccountPlural.text( this.$selectionAccountPlural.data('plural') );
		}

		if (numSelected > 0) {
			this.$nextButton.removeClass('disabled').removeAttr('disabled');
		} else {
			// disable if no accounts selected
			this.$nextButton.addClass('disabled').attr('disabled', true);
		}
	};

	BillSelector.prototype.populateTotals = function (el) {
		var _this = this,
				parent = el.closest('.form-field__checkbox--billselector'),
				account = parent.find('.m44-bill-selector__account--select'),
				suffix = this.$component.data('currency-suffix');

		account.each(function () {
			parent.find('button').text(_this.getFormattedValue($(this).data('bill-amount'), suffix));
		});
	};

	BillSelector.prototype.getFormattedValue = function (value, suffix) {
		var dir = utils.isRTL() ? '\u200F' : '',
				formattedValue = numeral(parseFloat(value)).format('0,0.00');

		return dir + formattedValue + ' ' + suffix;
	};

	// due to slow webservices defer loading of images until after DOM load and load them sequentially
	BillSelector.prototype.sequentiallyLoadImages = function ( index ) {
		var _this = this,
				accountImages = _this.$accountImages,
				promises = [],
				chunkSize = 10,
				chunkEnd,
				set, i;

		function defferedImage(i, img) {
			var deferred = $.Deferred(),
					dataSrc = $(img).data('src');

			// resolve on load
			img.onload = function() {
				deferred.done();
			}

			// set src of image or resolve promise it no async src defined
			if (dataSrc) {
				img.src = dataSrc;
			} else {
				deferred.done();
			}

			return deferred.promise();
		}

		index = index || 0;
		chunkEnd = index + chunkSize;
		set = accountImages.slice(index, chunkEnd);

		// set up image load promises
		promises.push( set.each( defferedImage ) );

		// handle promise set resolution
		$.when.apply($, promises).always( function(response) {
			if ( chunkEnd < accountImages.length ) {
				_this.sequentiallyLoadImages( chunkEnd );
			}
		});
	};

	return BillSelector;
});

define( '../src/sublayouts/m45-estimate-selector/m45-estimate-selector',[ 'jquery', 'lib/utils' ], function ( $, utils ) {

	'use strict';

	var EstimateSelector = function ( $component ) {

		this.$component = $component;

		return this;
	};

	EstimateSelector.prototype.init = function () {
		var _this = this;



		
			// cache dom el
			this.$menu = this.$component.find( '[data-menu]' );
			this.$menuTrigger = this.$component.find( '[data-accountselector]' );

			this.$options = this.$menu.find( 'input' );
			this.$billDetails = this.$component.find( '[data-bill-details]' );
			this.$close = this.$component.find( '[ data-close ]' );

			this.$activeClassname = 'm45-estimate-selector__active';
			this.$activeBill = this.$billDetails.eq( 0 );
			this.$update = this.$component.find( '[ data-accountupdate ]' );
			this.$paymentAmount = this.$component.find( '[data-payment-amount]' );

			this.$submit = this.$paymentAmount.parent('button');
			this.$errorMessage = this.$component.find('.m45-estimate-selector--error');
			
			this.$paymentMax = this.$component.data('payment-max');
			this.$editAmount = $('.m45-estimate-selector--amount-pay-form-input').find('input');
			
			


			//event listener
			$('.m45-estimate-selector--edit-amount').on('click', function () {
				$('.m45-estimate-selector--amount-pay-form').addClass('m45-estimate-selector--amount-pay-form-active')
				_this.$submit.attr('disabled', true).addClass('disabled');
				$('.m45-estimate-selector--amount-utils').addClass('m45-estimate-selector--amount-utils-hide')
				$('.m45-estimate-selector--amount-pay-form-input').find('input').val($('#estimatedamount').val())

			});
			$('.m45-estimate-selector--amount-pay-form-button--set').on('click', function() {	   
			_this.setAmount();		
			
			});
			    $('.m45-estimate-selector--amount-pay-form-button--cancel').on('click', function() {
				$('.m45-estimate-selector--amount-pay-form').removeClass('m45-estimate-selector--amount-pay-form-active')
				$('.m45-estimate-selector--amount-utils').removeClass('m45-estimate-selector--amount-utils-hide')
				_this.$submit.removeAttr('disabled').removeClass('disabled');
				_this.$errorMessage.removeClass('on');
				$('.m45-estimate-selector--amount-pay-form-input').find('input').val(parseFloat(_this.$activeBill.data( 'bill-amount' ).toString().replace(/,/g, '')))
				$('.m45-estimate-selector--amount-pay-form-input').find('input').blur();
			})

			this.updateActiveBill();
			this.bindEvents();
		

	};


    EstimateSelector.prototype.setAmount = function(){

    	 var _this = this
         var editAmount = numeral(parseFloat(_this.$editAmount.val()))
         var activeAmount = parseInt(_this.$activeBill.data( 'bill-amount' ).toString().replace(/,/g, ''))
         var zero = 0.00001
         
                  
         		
             if ( editAmount > _this.$paymentMax || editAmount <= 0 || editAmount > activeAmount || isNaN(editAmount)) {
             	this.$errorMessage.children().css('display','none');
				this.$submit.attr('disabled', true).addClass('disabled');
				this.$errorMessage.addClass('on');

				  if ( editAmount > activeAmount ) {
				 this.$errorMessage.find('.error-one').css('display','block');
			     } else if ( editAmount <= zero || isNaN(editAmount)){
                  this.$errorMessage.find('.error-two').css('display','block');
			     }
			}
			else {
				this.$errorMessage.children().css('display','none')
				this.$submit.removeAttr('disabled').removeClass('disabled');
				this.$errorMessage.removeClass('on');
				$('.m45-estimate-selector--amount-pay-form').removeClass('m45-estimate-selector--amount-pay-form-active')
				$('.m45-estimate-selector--amount-utils').removeClass('m45-estimate-selector--amount-utils-hide')
				this.updateEditBill();
            }
    };


	EstimateSelector.prototype.bindEvents = function () {
		var self = this;

		this.$options.on( 'click', function () {
			self.select( $( this ) );
		} );

		this.$update.on( 'click', function ( e ) {
			e.preventDefault();
			self.$close.click();
		} );
	};

	EstimateSelector.prototype.updateActiveBill = function () {
		var editAmount = $('.m45-estimate-selector--amount-pay-form-input').find('input'),
			_this = this;

		this.$activeBill.addClass( this.$activeClassname );

		this.$menuTrigger.empty().append( this.$activeBill.find( '[data-bill-summary]' ).clone() );
		//this.$paymentAmount.html( this.$activeBill.data( 'bill-amount' ) );
		$('.m45-estimate-selector--amount-selected').html(numeral(parseFloat(this.$activeBill.data( 'bill-amount' ).toString().replace(/,/g, ''))).format('0,0.00'))

		$('#estimatedamount').attr('value', numeral(parseFloat(this.$activeBill.data( 'bill-amount' ).toString().replace(/,/g, ''))))
		this.$paymentAmount.html( numeral(parseFloat(this.$activeBill.data( 'bill-amount' ).toString().replace(/,/g, ''))).format('0,0.00'))	
		
	};

	EstimateSelector.prototype.updateEditBill = function () {
		var editAmount = $('.m45-estimate-selector--amount-pay-form-input').find('input'),
			_this = this;

		$('.m45-estimate-selector--amount-selected').html(numeral((editAmount.val())).format('0,0.00'))
		
		$('#estimatedamount').attr('value', numeral((editAmount.val())))
		this.$paymentAmount.html( numeral((editAmount.val())).format('0,0.00'))

		
			var numlog = numeral((editAmount.val())).format('0,0.00');
			$('.m45-estimate-selector--amount-selected').html(numlog);
			$('#estimatedamount').attr('value', numeral((editAmount.val())))
			_this.$paymentAmount.html(numlog);	

	};

	EstimateSelector.prototype.select = function ( $option ) {

		var id = $option.data( 'id' );

		this.$activeBill.removeClass( this.$activeClassname );

		this.$activeBill = this.$component.find( '[data-bill-details-id=' + id + ']' );

		this.updateActiveBill();

	};

	return EstimateSelector;

} );

define('../src/sublayouts/m47-new-video-gallery/m47-new-video-gallery',['jquery', 'lib/utils'], function ($, utils) {

	'use strict';

	var VideoCarousel = function ($component) {

		this.$component = $component;

		return this;
	};

	VideoCarousel.prototype.init = function () {
		var _this = this;

		//console.log(this.$component.data('video'));

		this.initGallery();
		//$('.m47-new-video-gallery__videoplayer--inner').on('load',function() {
		//	console.log('asdadasdasdadqwq')
		//});
		$('.m47-new-video-gallery--playlistToggle').on('click', function() {
			$(this).toggleClass('icon-open');
			$(this).toggleClass('icon-close');
			$('.m47-new-video-gallery--playlist').toggleClass('m47-new-video-gallery--playlist_active');
		});
	};

	VideoCarousel.prototype.initGallery = function () {
		var _this = this,
			$list = this.$component.find('.m47-new-video-gallery--playlist'),
			$data = $(this.$component.data('video').list),
			i = 0;

		$data.each(function () {
			var $time;
			$list.append('<div class="m47-new-video-gallery--playlist_item" data-index='+i+' data-id="'+this.id+'"><img alt="'+this.title+'" class="m47-new-video-gallery--playlist_thumb" src="'+this.img+'"><div class="m47-new-video-gallery--playlist_details"><div class="m47-new-video-gallery--playlist_title">'+this.title+'</div><div class="m47-new-video-gallery--playlist_len">'+this.len+'</div><div class="m47-new-video-gallery--playlist_date">'+this.DoP+'</div></div></div>');
			i++
		});

		$('.m47-new-video-gallery--playlist_item').each(function() {
			var $item = $(this);

			$item.on('click', function() {
				if ( !$item.hasClass('m47-new-video-gallery--playlist_item--active') ) {
					$('.m47-new-video-gallery--playlist_item').each(function() {
						$(this).removeClass('icon-play m47-new-video-gallery--playlist_item--active');
					});
					_this.loadVideo($data[$item.attr('data-index')]);
					$item.addClass('icon-play m47-new-video-gallery--playlist_item--active');
				};
			});
		});

		_this.loadVideo($data[0]);
		$('.m47-new-video-gallery--playlist_item:first-child').addClass('icon-play m47-new-video-gallery--playlist_item--active');
	};

	VideoCarousel.prototype.loadVideo = function (data) {
		var _this = this,
			$container = this.$component.find('.m47-new-video-gallery--player'),
			$title = this.$component.find('.m47-new-video-gallery--playertitle'),
			$pub = this.$component.find('.m47-new-video-gallery--playerpub'),
			$len = this.$component.find('.m47-new-video-gallery--playerlen'),
			$desc = this.$component.find('.m47-new-video-gallery--playerdesc');

		$container.find('.m47-new-video-gallery__videoplayer--inner').attr('src','https://www.youtube.com/embed/' +data.id+ '?autoplay=1&rel=0&modestbranding=1');
		$container.find('.m47-new-video-gallery__videoplayer--inner').attr('title', data.title);
		$title.html(data.title);
		$pub.find('span').html(data.DoP);
		$len.find('span').html(data.len);
		$desc.html('<p class="mt12">'+data.desc.split(/\n/).join('</p><p class="mt12">')+'</p>');

	};

	return VideoCarousel;
});

define('../src/sublayouts/m48-payment-total-submit/m48-payment-total-submit',['jquery', 'lib/utils', 'numeral'], function ($, utils) {

	'use strict';

	var PaymentTotalSubmit = function ($component) {

		this.$component = $component;

		return this;
	};

	PaymentTotalSubmit.prototype.init = function () {
		this.$input = $('#form-field-editpayment');
		this.$total = this.$component.find('#form-field-billtotal');
		this.$amountLabel = this.$component.find('.amount_label');
		this.$submit = this.$component.find('.m48-payment-total-submit--button');

		this.suffix = this.$component.data('currency-suffix');
		this.billDefault = this.$component.data('bill-default');
		this.paymentMax = this.$component.data('payment-max');

		this.updateTotal();

		this.$input.on('blur change', $.proxy(this.updateTotal, this));

		this.$input.parents('.edit-toggle__input-wrapper').find('.edit-toggle__cancel > button').on('click', $.proxy(function(){
			this.$input.val('');
			this.updateTotal();
		}, this));

	};



	PaymentTotalSubmit.prototype.updateTotal = function () {
		var total = this.$input.val();

		if (parseFloat(total) <= 0) {
			total = '0.00 ' + this.suffix;
		}

		if (total === '') {
			total = this.billDefault;
		}

		total = parseFloat(total).toFixed(2);

		this.$total.val(total).parsley().validate();
		this.$amountLabel.text(this.getFormattedValue(total, this.suffix));

		if (total > 0 && total <= parseFloat(this.paymentMax)) {
			this.$submit.removeAttr('disabled').removeClass('disabled');;
		} else {
			this.$submit.attr('disabled', true).addClass('disabled');
		}
	};

	PaymentTotalSubmit.prototype.getFormattedValue = function (value, suffix) {
		var dir = utils.isRTL() ? '\u200F' : '',
				formattedValue = numeral(parseFloat(value)).format('0,0.00');

		return dir + formattedValue + ' ' + suffix;
	};

	return PaymentTotalSubmit;
});

define( '../src/sublayouts/m49-list-filter/m49-list-filter',[ 'jquery', 'lib/utils' ], function ( $, utils ) {

	'use strict';

	var ListFilter = function ( $component ) {

		this.$component = $component;

		return this;
	};

	ListFilter.prototype.init = function () {
		var _this = this;

		this.listIdentifier = this.$component.data('filter-list');
		this.$input = this.$component.find('.m49-list-filter--input');
		this.$filterButton = this.$component.find('.m49-list-filter--button');
		this.$listContainer = $(this.listIdentifier);
		this.$filterItems = this.$listContainer.find('.form-field__checkbox, .form-field__radio');
		this.$bpSections = $('.m44-bill-selector__partner, .m43-accountsel__group, .m51-smart-wallet__partner');
		this.$noMatches = this.$listContainer.find('.m49-no-matches, + .m49-no-matches');

		// bind events
		//this.$input.on('keydown', $.proxy(function () {
		//	window.setTimeout( $.proxy(this.filterList, this), 10);
		//}, this));
		this.$filterButton.on('click', $.proxy(this.filterList, this));

		$(window).on('data_loaded', function(){
			_this.init();
		});

		//if( utils.isTouchDevice() ) {

		//this.optimiseForTouchDevices();
		//}

	};

	ListFilter.prototype.filterList = function () {
		var query = this.$input.val(),
		_this = this,
				matches;

		this.$filterItems.each(function(i, el) {
			var $el = $(el);

			// show all items if there is no search
			if ( query === '' ||
					// show item if radio is checked
					 $el.find( '.form-field__input--radio:checked' ).length ||
					// keep item if query matches account number
					 $el.find( '[data-acc-detail="acc_number"]' ).text().indexOf(query) >= 0  ||
					// keep item if query matches account name (but not status)
					 $el.find( '.m43-accountsel__name, .m44-bill-selector__name, .m51-smart-wallet__name' ).children(':first-child').text().toLowerCase().indexOf(query.toLowerCase()) >= 0  ||
					// keep item if query matches estimate
					 $el.find( '.m45-estimate-selector__id' ).text().indexOf(query) >= 0 ) {

				$el.show();
			} else {
				if (_this.$component.closest('.j102-tayseer-service').length != 0) {
					setTimeout(function() {
						$el.hide();
					},500);
				} else {
					$el.hide();
				}
			}
		});

		window.setTimeout( $.proxy(function() {
			// check for matches and show message as appropriate
			matches = this.$filterItems.filter(':visible');

			if ( query === '' ||
					// check if query matches account number
					 matches.find( '[data-acc-detail="acc_number"]' ).text().indexOf(query) >= 0  ||
					// check if query matches account name (but not status)
					 matches.find( '.m43-accountsel__name, .m44-bill-selector__name, .m51-smart-wallet__name' ).children(':first-child').text().toLowerCase().indexOf(query.toLowerCase()) >= 0  ||
					// check if query matches estimate
					 matches.find( '.m45-estimate-selector__id' ).text().indexOf(query) >= 0 ) {
				this.$noMatches.hide();
			} else {
				this.$noMatches.show();
			}
		}, this), 5);

		// hide empty BP sections
		if ( this.$bpSections.length ) {
			this.$bpSections.each(function(i, el) {
				var $el = $(el),
						accountList = $el.find('.m44-bill-selector__accounts-list, .m43-accountsel__accounts-list, .m51-smart-wallet__accounts-list'),
						accountInputs = accountList.find('.form-field__checkbox, .form-field__radio');

				// hide section if no accounts are visible
				if ( accountInputs.filter('[style*="display:none;"], [style*="display: none;"]').length === accountInputs.length ) {
					$el.hide();
				} else {
					$el.show();
				}
			});
		}
	};

	return ListFilter;

} );

define('../src/sublayouts/m55-rammas/m55-rammas',['jquery', 'tooltipster', 'lib/utils', 'parsley'], function($, tooltipster, utils, parsley) {

    'use strict';

    var M55_RAMMAS = function($component) {

        this.$component = $component;

        return this;
    };

    M55_RAMMAS.prototype.init = function() {
        var _this = this;

        this.labels = $(this.$component).data('labels');
        this.initRammas();

        this.bind_loading();

        $('.wc-console').next('iframe').remove();

        $('.wc-send').off().on('click', function() {
            if ($('.wc-shellinput').val().length != 0) {
                _this.loading();
                _this.bind_loading();
            };

            setTimeout(function() {
                if ($('.wc-shellinput').val().length != 0) {
                    if (!$('.wc-send').hasClass('active')) {
                        $('.wc-send').addClass('active');
                    };
                } else {
                    $('.wc-send').removeClass('active');
                };
            }, 500)
        });

        $('.wc-shellinput').on('keydown', function(e) {
            if (e.keyCode === 13) {
                if ($('.wc-shellinput').val().length != 0) {
                    _this.loading();
                    _this.bind_loading();
                };
            };
            if ($(this).val().length != 0) {
                if (!$('.wc-send').hasClass('active')) {
                    $('.wc-send').addClass('active');
                };
            };
        });

        $('.wc-shellinput').on('keyup', function(e) {

            if ($(this).val().length == 0) {
                $('.wc-send').removeClass('active');
            };

        });

        $('.m55-rammas-active--close-button').on('click', function() {
            $('.m55-rammas--input-inject').css('height', 'unset');
            $('.m55-rammas--input-inject').css('overflow', 'unset');
            $('.m55-rammas--input-bg').remove();
        });

        if (this.labels.src == undefined) {
            this.labels.src = "../../images/rammas_icon.gif"
        };

        $('.wc-message-group-welcome').append('<img class="m55-rammas--welcome_icon" src="' + this.labels.src + '">');

        if (this.labels.FL) {
            $('.wc-message-group-welcome').append('<div class="m55-rammas--welcome_FL">' + this.labels.FL + '</div>');
        }

        $(window).on('resize', function() {
            _this.initRammas();
        });

        this.share_rammas();
        this.toggleVoice();
        this.disclaimer_fn();

        $('.m55-rammas--mute, .m55-rammas--share').each(function() {
            var text = $(this).attr('data-alt');

            $(this).tooltipster({
                content: text,
                maxWidth: 250,
                arrow: false
            });
        });

    };

    M55_RAMMAS.prototype.disclaimer_fn = function() {
        var _this = this,
            $button = this.$component.find('.m55-rammas--disclaimer_next'),
            $back = this.$component.find('.m55-rammas--disclaimer_prev'),
            $content = this.$component.find('.m55-rammas--disclaimer_content'),
            $recaptcha = this.$component.find('.recaptcha_check'),
            $primary;

        $content.each(function() {
            if ($(this).hasClass('m55-rammas--disclaimer_contentactive')) {
                $primary = $(this);
            }
        });

        $button.off('click.disclaimer').on('click.disclaimer', function() {
            var error = 0;

            $primary.find('.form-field__input').each(function() {
                $(this).parsley().validate();
                if (!$(this).parsley().isValid()) {
                    error++;
                }
            });

            if ($recaptcha.attr('data-checked').toLowerCase() == 'false') {
                error++;
                //$('.form-field__messages-recaptcha').show();
            };

            if (error == 0) {
                $primary.fadeOut();
                $button.fadeOut();
                setTimeout(function() {
                    $back.fadeIn();
                    $primary.next().fadeIn();
                    $button.next().fadeIn();
                }, 400)
            }
        });

        $back.off('click.disclaimer').on('click.disclaimer', function() {
            $back.fadeOut();
            $primary.next().fadeOut();
            $primary.closest('.m39-modal__dialog').find('.msgcontent').fadeOut();
            $button.next().fadeOut();
            setTimeout(function() {
                $primary.closest('.rammasExportChat').fadeIn();
                $primary.fadeIn();
                $button.fadeIn();
            }, 400)
        });
    };

    M55_RAMMAS.prototype.bind_loading = function() {
        var _this = this;

        $('.wc-message-group-content').off('DOMSubtreeModified.event').on("DOMSubtreeModified.event", function() {

            setTimeout(function() {
                $('.ac-pushButton').each(function() {
                    $(this).off('click.loading').on('click.loading', function() {
                        _this.loading();
                    });
                });
                _this.bind_loading();
            }, 500);

        });
    };

    M55_RAMMAS.prototype.loading = function() {
        var _this = this,
            $clone = $('.m55-rammas--loading').clone(),
            lengths = $('.wc-message-group-content').find('.wc-message-from-bot').length;

        $('.wc-message-group-content').append($clone);
        $('audio').trigger('pause');

        setTimeout(function() {
            $('.wc-message-groups').scrollTop($('.wc-message-group-content').height());
        }, 10)

        $clone.addClass('m55-rammas--loading-clone').removeClass('hide');
        jQuery('audio').trigger('stop');

        $('.wc-message-group-content').off("DOMSubtreeModified.loading").on("DOMSubtreeModified.loading", function() {

            if ((lengths + 2) != $('.wc-message-group-content').find('.wc-message-from-bot').length) {
                $('.m55-rammas--loading-clone').remove();
                $(this).off()
            }
        });

        setTimeout(function() {
            $('.m55-rammas--loading-clone').remove();
        }, 5000)

    };

    M55_RAMMAS.prototype.toggleVoice = function() {
        var _this = this;

        jQuery('#BotChatGoesHere').off("DOMSubtreeModified.voice").on("DOMSubtreeModified.voice", function() {
            //jQuery('audio').trigger('play');
            jQuery('.wc-adaptive-card.audio').each(function() {
                if ((jQuery(this).closest('.wc-list').children().length == 1) && !(jQuery(this).closest('.wc-list').prev('.format-markdown').length > 0)) {
                    jQuery(this).closest('.wc-message-wrapper').addClass('wc-message-wrapper_audio').hide();
                } else if ((jQuery(this).closest('.wc-list').children().length > 1) || (jQuery(this).closest('.wc-list').prev('.format-markdown').length > 0)) {
                    jQuery(this).addClass('wc-message-wrapper_audio').hide();
                }
            });
        });

        jQuery('.m55-rammas--mute').off('click.voice').on('click.voice', function() {

            jQuery(this).toggleClass('voice_muted');

            if (jQuery(this).hasClass('voice_muted')) {

                jQuery('.m55-rammas').off("DOMSubtreeModified.mutevoice").on("DOMSubtreeModified.mutevoice", function() {
                    jQuery('.wc-card.audio').find('audio').off('play.voice').on('play.voice', function() {
                        jQuery(this).prop('muted', 'muted');
                    });
                });


                jQuery('.wc-card.audio').find('audio').off('play.mutevoice').on('play.mutevoice', function() {
                    jQuery(this).prop('muted', 'muted');
                });

                jQuery('.wc-card.audio').find('audio').each(function() {
                    jQuery(this).prop('muted', 'muted');
                });

            } else {
                jQuery('.m55-rammas').off("DOMSubtreeModified.mutevoice");
                jQuery('.wc-card.audio').find('audio').off('play.mutevoice');
                jQuery('.wc-card.audio').find('audio').each(function() {
                    jQuery(this).prop('muted', false);
                });
            }

        });
    };

    M55_RAMMAS.prototype.initRammas = function() {

        var $notifi = $('.warning notification-newstyle'),
            $cookie = $('.m71-cookie'),
            $header = $('header'),
            notiHight = $notifi.length>0?$notifi.outerHeight(true) : null,
            cookieHeight = $cookie.length>0?$cookie.outerHeight(true) : null,
            headerHeight = $header.length>0?$header.outerHeight(true) : null;

        var height = ($(window).height() - headerHeight - notiHight - cookieHeight - 60);

        //$('header').nextUntil($('.m55-rammas--input-bg'),$(".grid")).wrapAll("<div class='m55-rammas--input-inject'></div>");

        var grid = $('.box--7'),
            rammas = $(grid).find('.m55-rammas'),
            welcome = $(grid).find('.wc-message-group-content');

        //if ( ($(grid).find('.m55-rammas').length == 0) && ($('body').find('.m55-rammas--input-bg').length != 0) ) {
        //  grid.css('height', height.toString()+'px');
        //  grid.css('overflow', 'scroll');
        //  grid.css('overflow-x', 'hidden');
        //};


        rammas.css('height', (height - 15).toString() + 'px');

        if ($(window).height() >= 400) {
            $(welcome).css('margin-top', ((rammas.height() - welcome.height()) / 2).toString() + 'px');
        };
    };

    M55_RAMMAS.prototype.share_rammas = function() {
        var _this = this;

        jQuery('.m55-rammas--share').on('click.share_rammas').on('click.share_rammas', function() {
            $('.m40v2-status-message').hide();
            $('.fieldset').show();
            $('.m55-rammas--shareModal_clone').show();
            $('.g-recaptcha').show();

            var $dialog = jQuery('#BotChatGoesHere').find('.wc-message-group-content').clone();

            $dialog.find('.wc-message-wrapper_audio').each(function() {
                jQuery(this).remove();
            });

            jQuery('.m55-rammas--shareModal_clone').html('');
            jQuery('.m55-rammas--shareModal_clone').append($dialog);
            jQuery('.m55-rammas--shareModal_clone').find('.wc-message-group-content').css({ marginTop: '36px', overflow: 'visible' });
            jQuery('.m55-rammas--shareModal_clone').find('.wc-message-group-welcome').remove();
            jQuery('.m55-rammas--shareModal_clone').find('.wc-message-wrapper_audio').each(function() {
                jQuery(this).remove();
            });

            jQuery('.m55-rammas--shareModal_clone').find('.wc-message-from-me').each(function() {
                jQuery(this).prepend('<div class="wc-message-from-me_icon"></div>')
            });
            jQuery('.m55-rammas--shareModal_clone').find('.wc-message-from-bot').each(function() {
                jQuery(this).prepend('<div class="wc-message-from-bot_icon"></div>')
            });

            _this.share_rammasdumm();

            jQuery('.m55-rammas--shareModal').find('button[data-trigger="true"]').click();


        });

    };

    M55_RAMMAS.prototype.share_rammasdumm = function() {
        var _this = this,
            head = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Rammas</title> <style type="text/css">p{margin: 0px;} .wc-message-callout{display: none;}</style></head> <body style="background-color: #f9f9f9;"> <div> <div style="margin-bottom: 12px;"><div style=" width: 49%; display: inline-block; padding-left: 1%; "><img alt="" height="50" src="http://www.dewa.gov.ae/iphone/rammas/images/govlogo.png"></div><div style=" width: 49%; display: inline-block; text-align: right; padding-right: 1%; "><img alt="" height="50" src="http://www.dewa.gov.ae/iphone/rammas/images/dewalogo.png"></div> </div> <div style=" font-weight: bold; color: #FFFFFF; background-color: #007560; text-align: center; font-size: 20px; padding: 8px; font-family: Arial, Helvetica, sans-serif;">' + this.$component.attr('data-title') + '</div> </div>',
            disclaimer = $('.rammas_disclaimer').html(),
            end = disclaimer + '</body></html>',
            textalign = 'left',
            dir = 'ltr';

        if (utils.isRTL()) {
            textalign = 'right'
            dir = 'rtl'
        } else {
            textalign = 'left'
            dir = 'ltr'
        }

        var transcript = '<div style="font-family: Arial, Helvetica, sans-serif; direction: ' + dir + '; text-align:' + textalign + '">';
        jQuery('.m55-rammas--shareModal_clone').find('.wc-message').each(function() {
            //jQuery('.wc-message').each(function() {
            var rammas_transcript = '';
            if (jQuery(this).hasClass('wc-message-from-bot')) {
                if (jQuery(this).find('.wc-carousel').length > 0) {
                    var carousel_transcript = '<div style="overflow: auto; padding: 4px 2px; margin-bottom: 12px;"><div style="float:left; margin-left:4px;">'
                    jQuery(this).find('.wc-carousel-item').each(function() {
                        if (jQuery(this).text().trim().length != 0) {
                            carousel_transcript = carousel_transcript + '<div style="overflow: hidden; text-overflow: ellipsis; display:block; flex: 0 1 auto;background: transparent; border: solid 1px #007560; color: #007560; border-radius: 10px; padding: 8px 16px; font-weight: 600; font-size: 14px; white-space: unset !important; line-height: 1.25; outline: none;float: left; margin-right: 8px; margin-top:4px;">' + jQuery(this).text().replace('&', 'and').replace('â', '"').replace('€', '"') + '</div>';
                        }
                    });
                    carousel_transcript = carousel_transcript + '</div></div>';
                    rammas_transcript = rammas_transcript + carousel_transcript
                } else if (jQuery(this).find('.wc-list').length > 0) {
                    var list_transcript = '',
                        hasFormatMarkdown = false;

                    if (jQuery(this).find('.format-markdown').text().trim().length != 0) {
                        list_transcript = list_transcript + '<div style="overflow: auto; padding: 4px 2px;text-align:left; margin-bottom: 12px;"><div style="display:inline-block"><img src="http://www.dewa.gov.ae/iphone/rammas/images/dewaicon.png" style="margin-bottom:12px; width: 35px; height: 35px; text-align: left; float: left;"><div style=" background-color: #ffffff; color: #4e4e4e; border-radius: 0px 20px 20px 20px; box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2); padding: 12px; word-break: break-word; max-width: 400px; text-align:' + textalign + '; margin-left:40px;">' + jQuery(this).find('.format-markdown').html().replace('&', 'and').replace('â', '"').replace('€', '"') + '';
                        hasFormatMarkdown = true;
                    }
                    jQuery(this).find('.ac-container').find('p').each(function(i, val) {
                        if (jQuery(this).text().trim().length != 0) {
                            if (i == 0 && !hasFormatMarkdown) {
                                list_transcript = list_transcript + '<div style="overflow: auto; padding: 4px 2px;text-align:left; margin-bottom: 12px;"><div style="display:inline-block"><img src="http://www.dewa.gov.ae/iphone/rammas/images/dewaicon.png" style="margin-bottom:12px; width: 35px; height: 35px; text-align: left; float: left;"><div style=" background-color: #ffffff; color: #4e4e4e; border-radius: 0px 20px 20px 20px; box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2); padding: 12px; word-break: break-word; width: 300px; width:fit-content; text-align:' + textalign + '; margin-left:4px;">';
                            }
                            list_transcript = list_transcript + '<p>' + jQuery(this).text().replace('&', 'and').replace('â', '"').replace('€', '"') + '</p>';
                        }
                    });
                    jQuery(this).find('.ac-pushButton').each(function() {
                        if (jQuery(this).text().trim().length != 0) {
                            list_transcript = list_transcript + '<div style="overflow: hidden; text-overflow: ellipsis; display:block; flex: 0 1 auto; background-color: #d3eed3; color: #007560; max-width: 176px; padding: 8px 16px; font-weight: 600; border-radius: 35px; font-size: 14px; white-space: unset !important; line-height: 1.25; border-color: transparent;outline: none; transition: color 0.2s ease,background-color 0.2s ease; text-align: center; margin-top: 8px;">' + jQuery(this).text().replace('&', 'and').replace('â', '"').replace('€', '"') + '</div>';
                        }
                    });
                    list_transcript = list_transcript + '</div></div></div>';
                    rammas_transcript = rammas_transcript + list_transcript
                } else {
                    if (jQuery(this).text().trim().length != 0) {
                        rammas_transcript = rammas_transcript + '<div style="overflow: auto; padding: 4px 2px;text-align:left; margin-bottom: 12px;"><div style="display:inline-block"><img src="http://www.dewa.gov.ae/iphone/rammas/images/dewaicon.png" style="margin-bottom:12px; width: 35px; height: 35px; text-align: left; float: left;"><div style=" background-color: #ffffff; color: #4e4e4e; border-radius: 0px 20px 20px 20px; box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2); padding: 12px; word-break: break-word; max-width: 400px; text-align:' + textalign + '; margin-left:40px;">' + jQuery(this).html().replace('&', 'and').replace('â', '"').replace('€', '"') + '</div></div></div>';
                    }
                };
            } else {
                if (jQuery(this).text().trim().length != 0) {
                    rammas_transcript = rammas_transcript + '<div style="overflow: auto; padding: 4px 2px; text-align: right; margin-bottom: 12px;"><img src="http://www.dewa.gov.ae/iphone/rammas/images/usericon.png" style="margin-bottom:12px; width: 35px;height: 35px;text-align: right; float:right;"><div><div style=" background-color: #007560; color: #ffffff; border-radius: 20px 0px 20px 20px; box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2); padding: 12px; word-break: break-word; max-width: 200px; display:inline-block; margin-right: 4px;">' + jQuery(this).text().replace('&', 'and').replace('â', '"').replace('€', '"') + '</div></div></div>';
                }
            };
            transcript = transcript + rammas_transcript;
        });
        console.log(head + transcript + '</div>' + end);

        jQuery('.m55-rammas--shareModal').find('.m55-rammas--share-html_container').val(head + transcript + end);
        //window.location.href = link+encodeURI(transcript);

    };

    return M55_RAMMAS;

});

define('../src/sublayouts/m55a-rammas/m55a-rammas',['jquery', 'tooltipster', 'lib/utils','parsley'], function($, tooltipster, utils, parsley) {

    'use strict';

    var M55A_RAMMAS = function($component) {

        this.$component = $component;

        return this;
    };

    M55A_RAMMAS.prototype.init = function() {
        var _this = this;
        this.$html = $('html');
        this.$isRTL = (this.$html.attr('dir') == 'rtl');
        this.$rammasSlider = $('.dewa-bot-slider-wrapper');
        this.$navSlidesToShow = 6;

        this.initRammas();

        this.bind_loading();

        $('.dewa-bot-send').off().on('click', function() {
            if ($('.dewa-bot-shellinput').val().length != 0) {
                _this.loading();
                _this.bind_loading();
            };

            setTimeout(function() {
                if ($('.dewa-bot-shellinput').val().length != 0) {
                    if (!$('.dewa-bot-send').hasClass('active')) {
                        $('.dewa-bot-send').addClass('active');
                    };
                } else {
                    $('.dewa-bot-send').removeClass('active');
                };
            }, 500)
        });

        $('.dewa-bot-shellinput').on('keydown', function(e) {
            if (e.keyCode === 13) {
                if ($('.dewa-bot-shellinput').val().length != 0) {
                    _this.loading();
                    _this.bind_loading();
                };
            };
            if ($(this).val().length != 0) {
                if (!$('.dewa-bot-send').hasClass('active')) {
                    $('.dewa-bot-send').addClass('active');
                };
            };
        });

        $('.dewa-bot-shellinput').on('keyup', function(e) {

            if ($(this).val().length == 0) {
                $('.dewa-bot-send').removeClass('active');
            };

        });

        $('.m55a-rammas-active--close-button').on('click', function() {
            $('.m55a-rammas--input-inject').css('height', 'unset');
            $('.m55a-rammas--input-inject').css('overflow', 'unset');
            $('.m55a-rammas--input-bg').remove();
        });


        
        

      

        $(window).on('resize', function() {
            _this.initRammas();
        });

        this.share_rammas();
        this.toggleVoice();
        this.disclaimer_fn();

        $('.m55a-rammas--mute, .m55a-rammas--share').each(function() {
            var text = $(this).attr('data-alt');

            $(this).tooltipster({
                content: text,
                maxWidth: 250,
                    arrow: false
            });
        });

    };


     M55A_RAMMAS.prototype.disclaimer_fn = function() {
        var _this = this,
            $button = this.$component.find('.m55a-rammas--disclaimer_next'),
            $back = this.$component.find('.m55a-rammas--disclaimer_prev'),
            $content = this.$component.find('.m55a-rammas--disclaimer_content'),
            $recaptcha = this.$component.find('.recaptcha_check'),
            $primary;

        $content.each(function() {
            if ($(this).hasClass('m55a-rammas--disclaimer_contentactive')) {
                $primary = $(this);
            }
        });

        $button.off('click.disclaimer').on('click.disclaimer', function() {
            var error = 0;

            $primary.find('.form-field__input').each(function() {
                $(this).parsley().validate();
                if (!$(this).parsley().isValid()) {
                    error++;
                }
            });

            if ($recaptcha.attr('data-checked').toLowerCase() == 'false') {
                error++;
                //$('.form-field__messages-recaptcha').show();
            };

            if (error == 0) {
                $primary.fadeOut();
                $button.fadeOut();
                setTimeout(function() {
                    $back.fadeIn();
                    $primary.next().fadeIn();
                    $button.next().fadeIn();
                }, 400)
            }
        });

        $back.off('click.disclaimer').on('click.disclaimer', function() {
            $back.fadeOut();
            $primary.next().fadeOut();
            $primary.closest('.m39-modal__dialog').find('.msgcontent').fadeOut();
            $button.next().fadeOut();
            setTimeout(function() {
                $primary.closest('.rammasExportChat').fadeIn();
                $primary.fadeIn();
                $button.fadeIn();
            }, 400)
        });
    };

    M55A_RAMMAS.prototype.bind_loading = function() {
       /* var _this = this;

        $('.dewa-bot-message-group-content').off('DOMSubtreeModified.event').on("DOMSubtreeModified.event", function() {
            
            setTimeout(function() {
                $('.ac-pushButton').each(function() {
                    $(this).off('click.loading').on('click.loading', function() {
                        _this.loading();
                    });
                });
                _this.bind_loading();
            }, 500);

        });*/
    };

    M55A_RAMMAS.prototype.loading = function() {
       /* var _this = this,
            $clone = $('.m55a-rammas--loading').clone(),
            lengths = $('.dewa-bot-message-group-content').find('.dewa-bot-message-from-bot').length;

        $('.dewa-bot-message-group-content').append($clone);
        $('audio').trigger('pause');

        setTimeout(function() {
            $('.dewa-bot-message-groups').scrollTop($('.dewa-bot-message-group-content').height());
        }, 10)

        $clone.addClass('m55a-rammas--loading-clone').removeClass('hide');
        jQuery('audio').trigger('stop');

        $('.dewa-bot-message-group-content').off("DOMSubtreeModified.loading").on("DOMSubtreeModified.loading", function() {

            if ((lengths + 2) != $('.dewa-bot-message-group-content').find('.dewa-bot-message-from-bot').length) {
                $('.m55a-rammas--loading-clone').remove();
                $(this).off()
            }
        });

        setTimeout(function() {
            $('.m55a-rammas--loading-clone').remove();
        }, 5000)*/

    };

    M55A_RAMMAS.prototype.toggleVoice = function() {
        var _this = this;

        jQuery('#BotChatGoesHere').off("DOMSubtreeModified.voice").on("DOMSubtreeModified.voice", function() {
            //jQuery('audio').trigger('play');
            jQuery('.dewa-bot-adaptive-card.audio').each(function() {
                if ((jQuery(this).closest('.dewa-bot-list').children().length == 1) && !(jQuery(this).closest('.dewa-bot-list').prev('.format-markdown').length > 0)) {
                    jQuery(this).closest('.dewa-bot-message-wrapper').addClass('dewa-bot-message-wrapper_audio').hide();
                } else if ((jQuery(this).closest('.dewa-bot-list').children().length > 1) || (jQuery(this).closest('.dewa-bot-list').prev('.format-markdown').length > 0)) {
                    jQuery(this).addClass('dewa-bot-message-wrapper_audio').hide();
                }
            });
        });

        jQuery('.m55a-rammas--mute').off('click.voice').on('click.voice', function() {

            jQuery(this).toggleClass('voice_muted');

            if (jQuery(this).hasClass('voice_muted')) {

              //  jQuery('.m55a-rammas').off("DOMSubtreeModified.mutevoice").on("DOMSubtreeModified.mutevoice", function() {
              //     jQuery('.dewa-bot-card.audio').find('audio').off('play.voice').on('play.voice', function() {
              //         jQuery(this).prop('muted', 'muted');
              //    });
              // });


                jQuery('.audio').find('audio').off('play.mutevoice').on('play.mutevoice', function() {
                    jQuery(this).prop('muted', 'muted');
                });

                jQuery('.audio').find('audio').each(function() {
                    jQuery(this).prop('muted', 'muted');
                });

            } else {
                jQuery('.m55a-rammas').off("DOMSubtreeModified.mutevoice");
                jQuery('.audio').find('audio').off('play.mutevoice');
                jQuery('.audio').find('audio').each(function() {
                    jQuery(this).prop('muted', false);
                });
            }

        });
    };

    M55A_RAMMAS.prototype.initRammas = function() {

        var $notifi = $('.warning notification-newstyle'),
            $notifiNew = $('.m24-msg-float'),
            $cookie = $('.m71-cookie'),
            $header = $('header'),
            notiHight = $notifi.length>0?$notifi.outerHeight(true) : null,
            notiNewHight = $notifiNew.length>0?$notifiNew.outerHeight(true) : null,
            cookieHeight = $cookie.length>0?$cookie.outerHeight(true) : null,
            headerHeight = $header.length>0?$header.outerHeight(true) : null;

        var height = ($(window).height() - headerHeight - notiHight - notiNewHight - cookieHeight - 60);

        //$('header').nextUntil($('.m55-rammas--input-bg'),$(".grid")).wrapAll("<div class='m55-rammas--input-inject'></div>");

        var grid = $('.box--7'),
            rammas = grid.find('.m55a-rammas'),
            welcome = grid.find('.dewa-bot-message-group-welcome');

        //if ( ($(grid).find('.m55-rammas').length == 0) && ($('body').find('.m55-rammas--input-bg').length != 0) ) {
        //  grid.css('height', height.toString()+'px');
        //  grid.css('overflow', 'scroll');
        //  grid.css('overflow-x', 'hidden');
        //};


        rammas.css('height', (height - 15).toString() + 'px');

        if ($(window).height() >= 400) {
            $(welcome).css('margin-top', ((rammas.height() - welcome.height()) / 2).toString() + 'px');
        };
    };

    M55A_RAMMAS.prototype.share_rammas = function() {
        var _this = this;

        jQuery('.m55a-rammas--share').on('click.share_rammas').on('click.share_rammas', function() {
            $('.m40v2-status-message').hide();
            $('.fieldset').show();
            $('.m55a-rammas--shareModal_clone').show();
            $('.g-recaptcha').show();

            

            var $dialog = jQuery('.dewa-bot-message-groups').clone();

          

            $dialog.find('.dewa-bot-message-wrapper_audio').each(function() {
                jQuery(this).remove();
            });

            jQuery('.m55a-rammas--shareModal_clone').html('');
            jQuery('.m55a-rammas--shareModal_clone').append($dialog);
            jQuery('.m55a-rammas--shareModal_clone').find('.dewa-bot-message-group-content').css({ marginTop: '36px', overflow: 'visible' });
            jQuery('.m55a-rammas--shareModal_clone').find('.dewa-bot-message-group-welcome').remove();
            jQuery('.m55a-rammas--shareModal_clone').find('.dewa-bot-slider-item').css('margin-bottom', '10px')
            jQuery('.m55a-rammas--shareModal_clone').find('.dewa-bot-message-wrapper_audio').each(function() {
                jQuery(this).remove();
            });

            jQuery('.m55a-rammas--shareModal_clone').find('.dewa-bot-message-from-me').each(function() {
                jQuery(this).prepend('<div class="dewa-bot-message-from-me_icon"></div>')
            });
            jQuery('.m55a-rammas--shareModal_clone').find('.dewa-bot-message-from-bot').each(function() {
                jQuery(this).prepend('<div class="dewa-bot-message-from-bot_icon"></div>')
            });

            _this.share_rammasdumm();

            jQuery('.m55a-rammas--shareModal').find('button[data-trigger="true"]').click();


        });

    };

    M55A_RAMMAS.prototype.share_rammasdumm = function() {
        var _this = this,
            head = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Rammas</title> <style type="text/css">p{margin: 0px;} .dewa-bot-message-callout{display: none;}</style></head> <body style="background-color: #f9f9f9;"> <div> <div style="margin-bottom: 12px;"><div style=" width: 49%; display: inline-block; padding-left: 1%; "><img alt="" height="50" src="https://www.dewa.gov.ae/~/media/Images/Header%20and%20Footer/Header/govlogo2x.ashx"></div><div style=" width: 49%; display: inline-block; text-align: right; padding-right: 1%; "><img alt="" height="50" src="https://www.dewa.gov.ae/~/media/Images/Header%20and%20Footer/Header/dewalogo2x.ashx"></div> </div> <div style=" font-weight: bold; color: #FFFFFF; background-color: #007560; text-align: center; font-size: 20px; padding: 8px; font-family: Arial, Helvetica, sans-serif;">'+this.$component.attr('data-title')+'</div> </div>',
            disclaimer = $('.rammas_disclaimer').html(),
            end = disclaimer+'</body></html>',
            textalign = 'left',
            dir = 'ltr';

        if ( utils.isRTL() ) {
            textalign = 'right'
            dir = 'rtl'
        } else {
            textalign = 'left'
            dir = 'ltr'
        }

        var transcript = '<div style="font-family: Arial, Helvetica, sans-serif; direction: '+dir+'; text-align:'+textalign+'">';
        jQuery('.m55a-rammas--shareModal_clone').find('.dewa-bot-message').each(function() {
            //jQuery('.dewa-bot-message').each(function() {
            var rammas_transcript = '';
            if (jQuery(this).hasClass('dewa-bot-message-from-bot')) {
                if (jQuery(this).find('.dewa-bot-carousel').length > 0) {
                    var carousel_transcript = '<div style="overflow: auto; padding: 4px 2px; margin-bottom: 12px;"><div style="float:left; margin-left:4px;">'
                    jQuery(this).find('.dewa-bot-carousel-item').each(function() {
                        if (jQuery(this).text().trim().length != 0) {
                            carousel_transcript = carousel_transcript + '<div style="overflow: hidden; text-overflow: ellipsis; display:block; flex: 0 1 auto;background: transparent; border: solid 1px #007560; color: #007560; border-radius: 10px; padding: 8px 16px; font-weight: 600; font-size: 14px; white-space: unset !important; line-height: 1.25; outline: none;float: left; margin-right: 8px; margin-top:4px;">' + jQuery(this).text().replace('&', 'and').replace('â', '"').replace('€', '"') + '</div>';
                        }
                    });
                    carousel_transcript = carousel_transcript + '</div></div>';
                    rammas_transcript = rammas_transcript + carousel_transcript
                } else if(jQuery(this).find('.dewa-bot-list').length > 0) {
                    var list_transcript = '',
                        hasFormatMarkdown = false;

                    if (jQuery(this).find('.format-markdown').text().trim().length != 0) {
                        list_transcript = list_transcript + '<div style="overflow: auto; padding: 4px 2px;text-align:left; margin-bottom: 12px;"><div style="display:inline-block"><img src="https://www.dewa.gov.ae/images/rammas_avatar.png" style="margin-bottom:12px; width: 35px; height: 35px; text-align: left; float: left;"><div style=" background-color: #ffffff; color: #4e4e4e; border-radius: 0px 20px 20px 20px; box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2); padding: 12px; word-break: break-word; max-width: 400px; text-align:'+textalign+'; margin-left:40px;">' + jQuery(this).find('.format-markdown').html().replace('&', 'and').replace('â', '"').replace('€', '"') + '';
                        hasFormatMarkdown = true;
                    }
                    jQuery(this).find('.ac-container').find('p').each(function(i, val) {
                        if (jQuery(this).text().trim().length != 0) {
                            if (i == 0 && !hasFormatMarkdown) {
                                list_transcript = list_transcript + '<div style="overflow: auto; padding: 4px 2px;text-align:left; margin-bottom: 12px;"><div style="display:inline-block"><img src="https://www.dewa.gov.ae/images/rammas_avatar.png" style="margin-bottom:12px; width: 35px; height: 35px; text-align: left; float: left;"><div style=" background-color: #ffffff; color: #4e4e4e; border-radius: 0px 20px 20px 20px; box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2); padding: 12px; word-break: break-word; width: 300px; width:fit-content; text-align:'+textalign+'; margin-left:4px;">';
                            }
                            list_transcript = list_transcript + '<p>' + jQuery(this).text().replace('&', 'and').replace('â', '"').replace('€', '"') + '</p>';
                        }
                    });
                    jQuery(this).find('.ac-pushButton').each(function() {
                        if (jQuery(this).text().trim().length != 0) {
                            list_transcript = list_transcript + '<div style="overflow: hidden; text-overflow: ellipsis; display:block; flex: 0 1 auto; background-color: #d3eed3; color: #007560; max-width: 176px; padding: 8px 16px; font-weight: 600; border-radius: 35px; font-size: 14px; white-space: unset !important; line-height: 1.25; border-color: transparent;outline: none; transition: color 0.2s ease,background-color 0.2s ease; text-align: center; margin-top: 8px;">' + jQuery(this).text().replace('&', 'and').replace('â', '"').replace('€', '"') + '</div>';
                        }
                    });
                    list_transcript = list_transcript + '</div></div></div>';
                    rammas_transcript = rammas_transcript + list_transcript
                }else if(jQuery(this).find('.dewa-bot-slider-wrapper').length > 0) {
                            var slide_transcript = '',
                            hasFormatMarkdown = false;
                            
                        jQuery(this).find('.dewa-bot-slider-item').each(function() {
                             
                            if (jQuery(this).find('.format-markdown').text().trim().length != 0) {
                                slide_transcript = slide_transcript + '<div style="overflow: auto; padding: 4px 2px;text-align:left; margin-bottom: 12px;"><div style="display:inline-block"><img src="https://www.dewa.gov.ae/images/rammas_avatar.png" style="margin-bottom:12px; width: 35px; height: 35px; text-align: left; float: left;"><div style=" background-color: #ffffff; color: #4e4e4e; border-radius: 0px 20px 20px 20px; box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2); padding: 12px; word-break: break-word; max-width: 400px; text-align:'+textalign+'; margin-left:40px;">' + jQuery(this).find('.format-markdown').html().replace('&', 'and').replace('â', '"').replace('€', '"') + '';
                                hasFormatMarkdown = true;
                            }
                            jQuery(this).find('.dewa-bot-teaser_text').each(function() {
                                slide_transcript = slide_transcript + '<p>' + jQuery(this).text().replace('&', 'and').replace('â', '"').replace('€', '"') + '</p>';
                            });
                            jQuery(this).find('.dewa-bot-teaser_thumb').each(function() {
                                slide_transcript = slide_transcript + '<div style="max-height: 50px;">' + jQuery(this).html().replace('<img','<img style="max-height: 50px;"').replace('&', 'and').replace('â', '"').replace('€', '"') + '</div>';
                                
                             });
                             jQuery(this).find('.ac-pushButton').each(function() {
                                if (jQuery(this).text().trim().length != 0) {
                                    slide_transcript = slide_transcript + '<div style="overflow: hidden; text-overflow: ellipsis; display:block; flex: 0 1 auto; background-color: #d3eed3; color: #007560; max-width: 176px; padding: 8px 16px; font-weight: 600; border-radius: 35px; font-size: 14px; white-space: unset !important; line-height: 1.25; border-color: transparent;outline: none; transition: color 0.2s ease,background-color 0.2s ease; text-align: center; margin-top: 8px;">' + jQuery(this).text().replace('&', 'and').replace('â', '"').replace('€', '"') + '</div>';
                                }
                            });
                            slide_transcript = slide_transcript + '</div></div></div>';
                        })
                            rammas_transcript = rammas_transcript + slide_transcript
                } else {
                    if (jQuery(this).text().trim().length != 0) {
                        rammas_transcript = rammas_transcript + '<div style="overflow: auto; padding: 4px 2px;text-align:left; margin-bottom: 12px;"><div style="display:inline-block"><img src="https://www.dewa.gov.ae/images/rammas_avatar.png" style="margin-bottom:12px; width: 35px; height: 35px; text-align: left; float: left;"><div style=" background-color: #ffffff; color: #4e4e4e; border-radius: 0px 20px 20px 20px; box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2); padding: 12px; word-break: break-word; max-width: 400px; text-align:'+textalign+'; margin-left:40px;">' + jQuery(this).html().replace('<img','<img style="max-height: 50px;"').replace('&', 'and').replace('â', '"').replace('€', '"') + '</div></div></div>';
                    }
                };
            } else {
                if (jQuery(this).text().trim().length != 0) {
                    rammas_transcript = rammas_transcript + '<div style="overflow: auto; padding: 4px 2px; text-align: right; margin-bottom: 12px;"><img src="https://www.dewa.gov.ae/images/user.png" style="margin-bottom:12px; width: 35px;height: 35px;text-align: right; float:right;"><div><div style=" background-color: #007560; color: #ffffff; border-radius: 20px 0px 20px 20px; box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2); padding: 12px; word-break: break-word; max-width: 200px; display:inline-block; margin-right: 4px;">' + jQuery(this).text().replace('&', 'and').replace('â', '"').replace('€', '"') + '</div></div></div>';
                }
            };
            transcript = transcript + rammas_transcript;
        });
        console.log(head + transcript + '</div>' + end);

        jQuery('.m55a-rammas--shareModal').find('.m55a-rammas--share-html_container').val(head + transcript + end);
        //window.location.href = link+encodeURI(transcript);

    };

    return M55A_RAMMAS;

});

/* homemodule */
define('../src/sublayouts/m60-teaser/m60-teaser',['jquery', 'tooltipster'], function ($, tooltipster) {

	'use strict';

	/**
	 * This module only effects Tabs on desktop. Mobile view uses the toggle helper.
	 */

	var m60 = function ( $component ) {

		this.$component = $component;

		return this;
	};

	m60.prototype.init = function () {

		this.$component.find('.m60-teaser-image').each(function() {
			var text = $(this).attr('data-alt');

			$(this).tooltipster({
				content: text,
				maxWidth: 250,
					arrow: false
			});
		});

	};

	return m60;
});
define( '../src/sublayouts/m62-expand/m62-expand',[ 'jquery', 'breakpoint', 'lib/utils' ], function ( $, breakpoint, utils ) {

	'use strict';

	/**
	 * This module only effects Tabs on desktop. Mobile view uses the toggle helper.
	 */

	var m62Expand = function ( $component ) {

		this.$component = $component;

		return this;
	};

	m62Expand.prototype.init = function () {
		var _this = this;

		var $trigger = this.$component.find('[data-m62-expands-trigger]');

		$trigger.each(function () {
			$(this).off('click.m62').on('click.m62', function (event) {
				if (!$(event.target).is('a')) {
					event.preventDefault();
					
					if (!$(this).hasClass('m62-expand--active')) {
						_this.$component.find('.m62-expand--active').removeClass('m62-expand--active');
						_this.$component.find('.m62-tabs--content--active').removeClass('m62-tabs--content--active');

						$(this).addClass('m62-expand--active');
						$(this).find('.m62-expand-content').addClass('m62-tabs--content--active');
					} else {
						$(this).removeClass('m62-expand--active');
						$(this).find('.m62-expand-content').removeClass('m62-tabs--content--active');
					}
				};
			});
		});
	};

	return m62Expand;

} );

define('../src/sublayouts/m63-search-results/m63-search-results',['jquery'], function ($) {

	'use strict';

	var M63_SEARCH = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M63_SEARCH.prototype.init = function () {
		var _this= this,
			menu_close = false;
		
		$('.m63-search-results--modify').on('click', function() {

			if ( $(window).width() <= 1024 ) {
				$('.m12-tools').find('.m31-search__button').trigger('click');
				menu_close = true;
			} else {
				$('.m12-tools').find('.m31-search__button').trigger('click');
			}
		});

		$('.m12-search__panel--close').on('click', function() {
			if (menu_close) {
				$('.mobile-menu-closebtn').trigger('click');
				menu_close = false;
			} else {}
		});

	};

	return M63_SEARCH;
});

define('../src/sublayouts/m65-gallery/m65-gallery',['jquery', 'slick'], function ($) {

	'use strict';

	var M60_GALLERY = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M60_GALLERY.prototype.init = function () {
		var _this= this;
		

		$('.m65-gallery__thumbnail').each(function(){
			$(this).hover(function(){
				$(this).find('.m65-gallery__date').fadeIn(250);
				$(this).find('.m65-gallery__caption').fadeIn(250);
			},function(){
				$(this).find('.m65-gallery__date').fadeOut(250);
				$(this).find('.m65-gallery__caption').fadeOut(250);
			})
		});
	};

	return M60_GALLERY;
});

define('../src/sublayouts/m66-preloader/m66-preloader',['jquery', 'numeral'], function($) {

    'use strict';

    var m66Preloader = function($component) {

        this.$component = $component;

        return this;
    };

    /**
     * Initialise component
     */

    m66Preloader.prototype.init = function() {
        this.rate = 0;

        var _this = this;

        $(window).off('m66Tick').on('m66Tick', function() {
            _this.load();
        })
    };

    m66Preloader.prototype.load = function() {
        var _this = this,
            base = parseInt(this.$component.attr('data-base')),
            percentage = parseInt(this.$component.attr('data-per')),
            $placeholder = this.$component.find('.m66-preloader-per_rate'),
            current = parseInt($placeholder.html()),
            $bar = this.$component.find('.m66-preloader-per_green'),
            tick;

        if (((percentage / base) * 100) <= 100) {
            $bar.css('width', ((percentage / base) * 100).toString() + '%');

            tick = (((percentage / base) * 100) - _this.rate) / 75;

            for (var i = 0; i < 75; i++) {
                setTimeout(function() {
                    $placeholder.html(numeral(_this.rate + tick).format('00.'));
                    _this.rate = _this.rate + tick;
                }, (500 / 75) * i);
            };
        } else {
            $bar.css('width', (100).toString() + '%');

            tick = ((100) - _this.rate) / 75;

            for (var i = 0; i < 75; i++) {
                setTimeout(function() {
                    $placeholder.html(numeral(_this.rate + tick).format('00.'));
                    _this.rate = _this.rate + tick;
                }, (500 / 75) * i);
            };
        };

    };

    return m66Preloader;
});

define('../src/sublayouts/m70-status-tracker/m70-status-tracker',['jquery', 'lib/utils'], function($, utils) {

    'use strict';

    var StatusTracker = function($component) {

        this.$component = $component;

        return this;
    };

    StatusTracker.prototype.init = function() {
        var _this = this;

        if (!_this.$component.hasClass('m70-status-tracker-new') && !_this.$component.hasClass('m70-status-tracker-vertical')) {

            _this.currentStep = parseInt(_this.$component.attr('data-current-step'));
            _this.$progressbar = _this.$component.find('[data-m70-progressbar]');
            _this.$steps = _this.$component.attr('data-steps');
            _this.$error = _this.$component.attr('data-has-error');

            $(window).off('reinit_m70').on('reinit_m70', function() {
                _this.init();
            });

            _this.build();
            _this.count();
            _this.current();

            $(window).on('resize', function() {
                _this.count();
            });
        };

        this.new();

        $(window).on('resize', function() {
            _this.new();
        });
    };

    StatusTracker.prototype.build = function() {
        var _this = this,
            steps = _this.$steps.split(',');

        $('.m70-status-tracker__progressbar').html('');

        for (var i = 0; i < steps.length; i++) {
            $('.m70-status-tracker__progressbar').each(function() {
                $(this).append('<div class="m70-status-tracker__step-wrapper"><div class="m70-status-tracker__step-aesth icon-tick"></div><div class="m70-status-tracker__step-text">' + steps[i] + '</div></div>');
            });
        }
    };

    StatusTracker.prototype.count = function() {
        var _this = this,
            count = $('.m70-status-tracker__progressbar').find('.m70-status-tracker__step-wrapper').length,
            $parent = $('.m70-status-tracker__progressbar'),
            offset = (20 / $('.m70-status-tracker__progressbar').width()) * 100;

        //margin = 

        $parent.find('.m70-status-tracker__step-wrapper').each(function(index) {
            $(this).css('width', (100 / count).toString() + '%')
        });

        if (!utils.isRTL()) {
            $('.m70-status-tracker__progressbar').css('padding-left', ((50 / count) + offset).toString() + '%')
            $parent.find('.m70-status-tracker__step-text').each(function() {
                $(this).css('right', (($parent.find('.m70-status-tracker__step-aesth').width() - 24) / 2).toString() + 'px');
            });
        } else {
            $('.m70-status-tracker__progressbar').css('padding-right', ((50 / count) + offset).toString() + '%')
            $parent.find('.m70-status-tracker__step-text').each(function() {
                $(this).css('left', (($parent.find('.m70-status-tracker__step-aesth').width() - 24) / 2).toString() + 'px');
            });
        }

    };

    StatusTracker.prototype.current = function() {
        var _this = this,
            step = _this.currentStep;

        $('.m70-status-tracker__progressbar').each(function() {
            $(this).find('.m70-status-tracker__step-wrapper').each(function(index) {
                if (index < step) {
                    $(this).addClass('m70-status-tracker__step-wrapper--active');
                };

                if (index == step - 1) {
                    $(this).find('.m70-status-tracker__step-aesth').css('border-top', '5px solid #DBDBDB');
                    if (_this.$error == 'true') {
                        $(this).removeClass('m70-status-tracker__step-wrapper--active').addClass('m70-status-tracker__step-wrapper--error');
                        $(this).find('.m70-status-tracker__step-aesth').removeClass('icon-tick').addClass('icon-cancel');
                    };
                }
            });
        });

    };

    StatusTracker.prototype.new = function() {
        var _this = this,
            $items = this.$component.find('.m70-status-tracker--item'),
            width = (100 / this.$component.find('.m70-status-tracker--item').length) - .5;

        if (_this.$component.hasClass('m70-status-tracker-new') && $(window).width() > 1024) {
            $items.each(function() {
                $(this).css('width', width.toString() + '%');
            });
        } else {
            $items.each(function() {
                $(this).attr('style', '');
            });
        }
    }

    return StatusTracker;

});
/* homemodule */
define('../src/sublayouts/m71-cookie/m71-cookie',['jquery'],
    function($, utils) {

        'use strict';

        var Cookie = function($component) {

            this.$component = $component;
        };

        Cookie.prototype.init = function() {
            var _this = this;
            this.$close = this.$component.find('.m71-cookie__dismiss');

            this.$close.one('click', function(ev) {
                ev.preventDefault();
                _this.$component.fadeOut(function() {
                    _this.$component.remove();
                    $('.m12-bar').removeAttr('style');
                    _this.setCookie();
                });
            });

            if (!_this.getCookie()) {
                _this.$component.fadeIn(500);
                setTimeout(function() {
                    _this.$component.css('height', $('.m71-cookie--outer').height().toString() + 'px')
                }, 10);
                $(window).on('resize', function() {
                    _this.$component.css('height', $('.m71-cookie--outer').height().toString() + 'px');
                });
            };

            this.listenToScroll();

        };

        Cookie.prototype.setCookie = function() {
            document.cookie = 'dewa_cp=1; expires=25 Dec 2050 12:00:00 UTC';
        };

        Cookie.prototype.listenToScroll = function() {
            var _this = this,
                offset;

            if ($('.notification-newstyle') != undefined) {
                $('.m71-cookie').on('posm71check', function() {
                    if ($(window).width() <= 1024) {
                        offset = 65;
                    } else {
                        offset = 60;
                    };
                    if (!_this.getCookie()) {
                        if ($('.m12-bar').hasClass('m12-bar--fixed-new')) {
                            $('.m12-bar--fixed-new').css('top', ($('.m71-cookie--outer').height() - offset).toString() + 'px');
                        } else {
                            $('.m12-bar--fixed').css('top', $('.m71-cookie--outer').height().toString() + 'px');
                        }
                    };
                });

                $('.m71-cookie').on('negm71check', function() {
                    $('.m12-bar').removeAttr('style');
                });
            };

        };

        Cookie.prototype.getCookie = function() {
            var nameEQ = "dewa_cp=";

            var ca = document.cookie.split(';');

            for (var i = 0; i < ca.length; i++) {

                var c = ca[i];

                while (c.charAt(0) == ' ') {
                    c = c.substring(1, c.length)
                };

                if (c.indexOf(nameEQ) == 0) {
                    return true
                };

            }

            return null;
        };

        return Cookie;

    });

define('../src/sublayouts/m72-add-form/m72-add-form',['jquery', 'parsley'],
    function($, parsley) {

        'use strict';

        var add_form = function($component) {

            this.$component = $component;
        };

        add_form.prototype.init = function() {
            var _this = this;

            this.remove = this.$component.attr('data-remove');
            this.hasPrice = this.$component.attr('hasPrice');

            //////////////////////////
            //set initial conditions//
            //////////////////////////
            if (this.hasPrice = 'true' && this.hasPrice != undefined) {
                $('select.m72-add-form--select_input').attr('price', $('select.m72-add-form--select_input').find('option:selected').attr('price'));
                _this.calculate($('select.m72-add-form--select_input').closest('.form-field').next('.m72-add-form--data_container'))

                $('select.m72-add-form--select_input').off('change.calculate').on('change.calculate', function() {
                    $(this).attr('price', $(this).find('option:selected').attr('price'));
                    _this.calculate($(this).closest('.form-field').next('.m72-add-form--data_container'));
                });
            };

            $('.m72-add-form--footnote').html($('select.m72-add-form--select_input').find('option:selected').attr('footnote'));

            $('.form-field').next('.m72-add-form--data_container').find('.m72-add-form--quantity_input').attr('data-max', $('select.m72-add-form--select_input').find('option:selected').attr('data-max'));
            $('.form-field').next('.m72-add-form--data_container').find('.m72-add-form--quantity_input').attr('data-min', $('select.m72-add-form--select_input').find('option:selected').attr('data-min'));

            $('select.m72-add-form--select_input').off('change.add').on('change.add', function() {
                $(this).closest('.m72-add-form--main_control').find('.m72-add-form--footnote').html($('select.m72-add-form--select_input').find('option:selected').attr('footnote'));
                $(this).closest('.m72-add-form--main_control').find('.m72-add-form--quantity_input').attr('data-max', '');
                $(this).closest('.m72-add-form--main_control').find('.m72-add-form--quantity_input').attr('data-min', '');
                $(this).closest('.m72-add-form--main_control').find('.m72-add-form--quantity_input').attr('data-max', $(this).find('option:selected').attr('data-max'));
                $(this).closest('.m72-add-form--main_control').find('.m72-add-form--quantity_input').attr('data-min', $(this).find('option:selected').attr('data-min'));
                _this.checkLimit(_this.hasPrice);
            });

            $('.m72-add-form--add_item').on('click.m72add', function() {
                _this.addSelection($(this), _this.hasPrice)
            });

            $('.m72-add-form').closest('form').find('.form-field__button').find('button').on('click', function(e) {
                if ($('.m72-add-form').find('.m72-add-form--new_selection').length == 0) {
                    $('.m72-add-form').find('.form-field__messages').show();
                    $('.m72-add-form').closest('form').parsley().validate();
                    e.preventDefault();
                } else {
                    $('.m72-add-form').find('.form-field__messages').hide();
                };
            });

            ////////
            //done//
            ////////

            this.inputListener();
            this.AddSubtract(this.hasPrice);
            this.truncate();
            $('.m72-add-form--quantity_input').each(function() {
                $(this).trigger('change');
            });
        };

        add_form.prototype.truncate = function() {
            var _this = this;

            $('.m72-add-form--quantity_input').each(function() {
            	var __this = this;

                $(__this).off('keypress.truncate').on('keypress.truncate', function() {
                    var len = $(__this).attr('data-max');

                    if (len != undefined && len != null) {
	                    if ($(__this).val().length >= parseFloat(len.length)) {
	                        window.setTimeout(function() {
	                            $(__this).val($(__this).val().substring(0, (parseFloat(len.length))));
	                        }, 5);
	                    };
                    };
                });
            });
        };

        add_form.prototype.checkLimit = function(hasPrice) {
            var _this = this;

            $('.m72-add-form--quantity_input').each(function() {
                if (parseFloat($(this).attr('data-max')) < $(this).val()) {
                    $(this).val(parseFloat($(this).attr('data-max')));
                };
                if (parseFloat($(this).attr('data-min')) > $(this).val() || $(this).val().length == 0) {
                    $(this).val(parseFloat($(this).attr('data-min')));
                };
                if (0 > $(this).val() || $(this).val().length == 0) {
                    $(this).val(0);
                };
            });

            if (hasPrice) {

            };

        };

        add_form.prototype.AddSubtract = function(hasPrice) {
            var _this = this,
                step = this.$component.find('.m72-add-form--data_container').attr('data-step');

            if (step != undefined && step != null) {
                step = parseFloat(step);
            } else {
                step = 1;
            };

            $('.m72-add-form--add').off('click.add').on('click.add', function() {
                var $input = $(this).closest('.m72-add-form--data_container').find('.m72-add-form--quantity_input'),
                    check;

                if ($input.attr('data-max') != undefined && $input.attr('data-max') != '') {
                    check = (parseFloat($input.val())) < parseFloat($input.attr('data-max'));
                } else {
                    check = true;
                };

                if (check) {
                    $input.val((parseFloat($input.val()) + step));
                };
                if (hasPrice) {
                    _this.calculate($(this).closest('.m72-add-form--data_container'));
                };
                $(this).closest('.m72-add-form--data_container').find('.m72-add-form--quantity_input').trigger('change');
            });

            $('.m72-add-form--subtract').off('click.add').on('click.add', function() {
                var $input = $(this).closest('.m72-add-form--data_container').find('.m72-add-form--quantity_input'),
                    check;

                if ($input.attr('data-min') != undefined && $input.attr('data-min') != '') {
                    check = (parseFloat($input.val()) - 1) >= parseFloat($input.attr('data-min'));
                } else {
                    check = true;
                };

                if ((parseFloat($input.val()) - 1) >= 0 && check) {
                    $input.val((parseFloat($input.val()) - step));
                }
                if (hasPrice) {
                    _this.calculate($(this).closest('.m72-add-form--data_container'));
                };
                $(this).closest('.m72-add-form--data_container').find('.m72-add-form--quantity_input').trigger('change');
            });

        };

        add_form.prototype.addSelection = function($el, hasPrice) {
            var _this = this,
                selected = $el.closest('.form-field').find('.m72-add-form--select_input').find('option:selected').text(),
                footnote = $el.closest('.form-field').find('.m72-add-form--select_input').find('option:selected').attr('footnote'),
                label = $el.closest('.form-field').find('label').text(),
                selectedValue = $el.closest('.form-field').find('.m72-add-form--select_input').find('option:selected').val(),
                controls = $el.closest('.form-field').next('.m72-add-form--data_container').clone(),
                container = '<div class="m72-add-form--new_selection"><div class="form-field form-field--select form-field--select-single"><label for="" class="form-field__label">' + label + '</label><span class="m72-add-form--select_wrapper"><div value="' + selectedValue + '" class="m72-add-form--select_input">' + selected + '</div></span><div class="m72-add-form--remove_item"><span>-</span> ' + _this.remove + '</div></div></div>';

            if (hasPrice) {

            };

            $el.closest('.m72-add-form').append(container);
            $('.m72-add-form--new_selection:last-child').append(controls);
            $('.m72-add-form--new_selection:last-child').find('.m72-add-form--footnote').text(footnote);


            this.AddSubtract(this.hasPrice);
            this.inputListener();
            this.truncate();
            $('.m72-add-form--remove_item').off().on('click', function() {
                var removedItem = $(this).closest('.m72-add-form--new_selection').find('.m72-add-form--select_input').attr('value');

                $('select.m72-add-form--select_input').find('option').each(function() {
                    if ($(this).val() == removedItem) {
                        $(this).attr('disabled', false);
                    };
                });

                if ($el.closest('.form-field').find('.m72-add-form--select_input').find('option').not(':disabled').length == 0) {
                    $('.m72-add-form--add_item').attr('disabled', true);
                } else {
                    $('.m72-add-form--add_item').attr('disabled', false);
                };

                $el.closest('.form-field').find('.m72-add-form--select_input').find('option').each(function() {
                    if ($(this).prop('disabled') == false) {
                        $(this).prop('selected', true);
                        $el.closest('.form-field').find('.m72-add-form--select_input').trigger('change.add', 'change.limit')
                        return false;
                    };
                });

                $(this).closest('.m72-add-form--new_selection').remove();
            });

            $el.closest('.form-field').find('.m72-add-form--select_input').find('option:selected').attr('disabled', true);

            $el.closest('.form-field').find('.m72-add-form--select_input').find('option').each(function() {
                if ($(this).prop('disabled') == false) {
                    $(this).prop('selected', true);
                    $el.closest('.form-field').find('.m72-add-form--select_input').trigger('change.add', 'change.limit')
                    return false;
                };
            });

            if ($el.closest('.form-field').find('.m72-add-form--select_input').find('option').not(':disabled').length == 0) {
                $('.m72-add-form--add_item').attr('disabled', true);
            } else {
                $('.m72-add-form--add_item').attr('disabled', false);
            };

            $('.m72-add-form').find('.form-field__messages').hide();

        };

        add_form.prototype.inputListener = function() {
            var _this = this;

            $('.m72-add-form--quantity_input').each(function() {
                $(this).off('change.limit').on('change.limit', function() {
                    _this.checkLimit();
                });
            });
        };

        add_form.prototype.calculate = function($container) {
            var _this = this,
                price = parseFloat($container.parent().find('.m72-add-form--select_input').attr('price')),
                total = $container.find('.m72-add-form--total'),
                quantity = $container.find('.m72-add-form--quantity_input').val();

            console.log(price * quantity)
        };

        return add_form;

    });

;
define("../src/sublayouts/m73-form-expand-tab/m73-form-expand-tab", function(){});

/* homemodule */
define('../src/sublayouts/m74-rammas_expand/m74-rammas_expand',['jquery', 'lib/utils'], function($, utils) {

    'use strict';

    var M74_RE = function($component) {

        this.$component = $component;

        return this;
    };

    /**
     * Initialise component
     */

    M74_RE.prototype.init = function() {
        var _this = this,
            $button = this.$component.find('.m74-rammas_expand--icon'),
            $content = this.$component.find('.m74-rammas_expand--container');

        this.size();

        $(window).off('resize.m74').on('resize.m74', function() {
            _this.size();
        });

        $button.off('click').on('click', function() {
            $content.toggleClass('m74-rammas_expand--container_active');
            $('.m13-footer--floating').toggleClass('expand_active');
            $button.toggleClass('m74-rammas_expand--icon_active');
        });

        if (this.$component.hasClass('m74-rammas_expand--auto') && !this.getCookie()) {
            setTimeout(function() {
                $button.click();
            }, 1500);
            _this.$component.find('.m74-rammas_expand--close').off('click').on('click', function() {
                _this.$component.find('.m74-rammas_expand--icon_active').click();
                _this.setCookie()
            });
            _this.$component.find('.m74-rammas_expand--link').off('click').on('click', function() {
            	_this.setCookie()
            });
        };

    };

    M74_RE.prototype.setCookie = function() {
        document.cookie = 'dewa_74=1;path=/; expires='+this.$component.attr('data-expiry');
    };

    M74_RE.prototype.getCookie = function() {
        var nameEQ = "dewa_74=";

        var ca = document.cookie.split(';');

        for (var i = 0; i < ca.length; i++) {

            var c = ca[i];

            while (c.charAt(0) == ' ') {
                c = c.substring(1, c.length)
            };

            if (c.indexOf(nameEQ) == 0) {
                return true
            };

        }

        return null;
    };

    M74_RE.prototype.size = function() {
        var _this = this,
            $content = this.$component.find('.m74-rammas_expand--container'),
            $height = ($(window).height()),
            $contentHeight = $content.outerHeight(true) + 80;

        if (($contentHeight > $height) && (utils.breakpoint() === 's' || utils.breakpoint() === 'm')) {
            $content.addClass('m74-rammas_expand--container_LS');
        } else {
            $content.removeClass('m74-rammas_expand--container_LS');
        };
    };

    return M74_RE;
});

define('../src/sublayouts/m76-range-slider/m76-range-slider',['jquery', 'lib/utils'], function($, utils) {

    'use strict';

    var M78 = function($component) {

        this.$component = $component;
        return this;
    };

    M78.prototype.init = function() {
        var _this = this;

        if (!_this.$component.hasClass('m76-range-slider--temp')) {

            var $rangeslider = this.$component.find('[data-range-slider]'),
                $ticks = this.$component.find('.sliderticks .ticks'),
                $container = this.$component.find('.range-container-bg');


            var ua = window.navigator.userAgent;
            var msie = ua.indexOf("MSIE ");

            if (/Edge\/|Trident\/|MSIE /.test(window.navigator.userAgent)) {
                //$rangeslider.css('height', '45px')
                //$rangeslider.css('position', 'relative')
                //$rangeslider.css('bottom', '15px')
                //$rangeslider.css('pointer-events', 'auto')
                $rangeslider.attr('style', 'height: 45px; position: relative; bottom: 15px; pointer-events: auto;');
            }

            function getClosest(arr, val) {
                return arr.reduce(function(prev, curr) {
                    return (Math.abs(curr - val) < Math.abs(prev - val) ? curr : prev);
                });
            }

            function changeColor(slider) {
                var val = (slider.val() - slider.attr('min')) / (slider.attr('max') - slider.attr('min'));

                if ($('html').attr('dir') == 'rtl') {
                    var ua = window.navigator.userAgent;
                    var msie = ua.indexOf("MSIE ");

                    if (/Edge\/|Trident\/|MSIE /.test(window.navigator.userAgent)) {

                        //$container.css('font-size', +val + 'em')
                        $ticks.css('text-align', 'right')

                        var perVal = val * 100
                            //$container.css({
                            //    fontSize: val + 'em',
                            //    backgroundImage: 'linear-gradient(to left,rgba(38,129,38,1) 0%,rgba(38,129,38,1) ' + perVal + '%,rgba(216,216,216,1) ' + perVal + '%,rgba(216,216,216,1) 100%);'
                            //});
                        $container.attr('style', 'font-size:' + val + 'em; background-image:linear-gradient(to left,rgba(38,129,38,1) 0%,rgba(38,129,38,1) ' + perVal + '%,rgba(216,216,216,1) ' + perVal + '%,rgba(216,216,216,1) 100%);');

                    } else {
                        $container.css('background-image',
                            '-webkit-gradient(linear, right top, left top, ' + 'color-stop(' + val + ', #007560), ' + 'color-stop(' + val + ', #D8D8D8)' + ')'
                        );
                    }

                };
                if ($('html').attr('dir') == 'ltr') {

                    var ua = window.navigator.userAgent;
                    var msie = ua.indexOf("MSIE ");

                    if (/Edge\/|Trident\/|MSIE /.test(window.navigator.userAgent)) {

                        //$container.css('font-size', +val + 'em')
                        $ticks.css('text-align', 'left')
                        var perVal = val * 100
                            //$container.css({
                            //    fontSize: val + 'em',
                            //    backgroundImage: 'linear-gradient(to right,rgba(38,129,38,1) 0%,rgba(38,129,38,1) ' + perVal + '%,rgba(216,216,216,1) ' + perVal + '%,rgba(216,216,216,1) 100%);'
                            //});
                        $container.attr('style', 'font-size:' + val + 'em; background-image:linear-gradient(to right,rgba(38,129,38,1) 0%,rgba(38,129,38,1) ' + perVal + '%,rgba(216,216,216,1) ' + perVal + '%,rgba(216,216,216,1) 100%);');

                    } else {

                        $container.css('background-image',
                            '-webkit-gradient(linear, left top, right top, ' + 'color-stop(' + val + ', #007560), ' + 'color-stop(' + val + ', #D8D8D8)' + ')'
                        );
                    }

                };

            };
            changeColor($rangeslider)

            $rangeslider.on('change', function() {
                //console.log('change')
                var snap = $rangeslider.data('snap').split(',')
                var closest = getClosest(snap, this.value);
                var thisVal = this.value;
                $ticks.removeClass('ticks-active');
                $ticks.each(function() {
                    if ($(this).attr('data-option') == thisVal) {
                        $(this).addClass('ticks-active')
                    }
                })
                changeColor($(this))
            });

            $ticks.on('click', function() {

                var thisVal = $(this).data('option');
                $rangeslider.val(thisVal)
                if (!$(this).hasClass('ticks-active')) {
                    $ticks.removeClass('ticks-active');
                    $(this).addClass('ticks-active');
                }
                changeColor($rangeslider)
            })
        } else {
            var $input = _this.$component.find('.slider'),
                $container = _this.$component.find('.range-container-bg'),
                $quant = _this.$component.find('.m76-range-quant'),
                bgDir = $('html').attr('dir') == 'ltr' ? 'right' : 'left',
                dir = $('html').attr('dir') == 'ltr' ? 'left' : 'right',
                rate = (parseInt($input.val()) - parseInt($input.attr('min')))/(parseInt($input.attr('max')) - parseInt($input.attr('min'))) * 100;

                $container.attr('style', 'background-image:linear-gradient(to ' + bgDir + ',rgba(8,123,54,1) 0%,rgba(8,123,54,1) ' + rate.toString() + '%,rgba(216,216,216,1) ' + rate.toString() + '%,rgba(216,216,216,1) 100%);');
                $quant.attr('style', dir + ': calc(' + rate.toString() + '% - (56px * ' + rate.toString() + ')/100 );');
                $quant.find('span').html($input.val());

            $input.off('input.m76').on('input.m76', function () {
                rate = (parseInt($input.val()) - parseInt($input.attr('min')))/(parseInt($input.attr('max')) - parseInt($input.attr('min'))) * 100;

                $container.attr('style', 'background-image:linear-gradient(to ' + bgDir + ',rgba(8,123,54,1) 0%,rgba(8,123,54,1) ' + rate.toString() + '%,rgba(216,216,216,1) ' + rate.toString() + '%,rgba(216,216,216,1) 100%);');
                $quant.attr('style', dir + ': calc(' + rate.toString() + '% - (56px * ' + rate.toString() + ')/100 );');
                $quant.find('span').html($input.val());
            });
        };

        $(window).off('m76_reinit').on('m76_reinit', function () {
            _this.init();
        })

    };

    return M78;

});

define('../src/sublayouts/m77-understand-bill/m77-understand-bill',['jquery', 'tooltipster', 'lib/utils'], function($, tooltipster, utils) {

    'use strict';

    var M77 = function($component) {

        this.$component = $component;
        return this;
    };

    M77.prototype.init = function() {
        var _this = this;

        this.buildMap();
        this.initTooltip();

        $(window).off('resize.m77').on('resize.m77', function() {
            _this.buildMap();
            _this.initTooltip();
            setTimeout(function(){
                window.initComponents('m41-tabs-box-bill');
            },100)
        });
    };

    M77.prototype.initTooltip = function() {
        var map = this.$component.find('.m77-understand-bill--map'),
            img = this.$component.find('.m77-understand-bill--img'),
            unique = utils.uniqueID();

        map.attr('name', unique);
        img.attr('usemap', '#'+unique);

        this.$component.find('.m77-understand-bill--area').each(function() {
            var text = $(this).attr('content'),
                side = $(this).attr('side');

            if ($(this).hasClass('tooltipster')) {
                $(this).tooltipster('destroy')
            };

            $(this).tooltipster({
                content: text,
                maxWidth: 500,
                side: side,
                theme: ['m77-understand-bill--tooltip'],
                trigger: 'custom',
                triggerOpen: {
                    mouseenter: true,
                    tap: true
                },
                triggerClose: {
                    mouseleave: true,
                    tap: true
                }
            });
        });
    };

    M77.prototype.buildMap = function() {
        var data = JSON.parse(this.$component.attr('data-map')),
            dimension = JSON.parse(this.$component.attr('data-dimension')),
            map = this.$component.find('.m77-understand-bill--map'),
            dimensionRatio;

        dimensionRatio = this.$component.find('.m77-understand-bill--img').height() / parseFloat(dimension.height);
        map.html('')

        $(data).each(function() {
            var area,
                coords = [];

            $(this.coords.split(",")).each(function() {
                coords.push(parseFloat(this)*dimensionRatio)
            })

            area = '<area class="m77-understand-bill--area" shape="' + this.shape + '" coords="' + coords.toString() + '" side="'+this.side+'" alt="' + this.content + '" content="' + this.content + '">';

            map.append(area)
        });
    };

    return M77;

});

define('../src/sublayouts/m78-timer/m78-timer',['jquery', 'lib/utils'], function($, utils) {

    'use strict';

    var M78 = function($component) {

        this.$component = $component;
        return this;
    };

    M78.prototype.init = function() {
        var _this = this;

        if (this.$component.hasClass('button--timer')) {
            this.timer = JSON.parse(_this.$component.attr('timer-time'));
            this.labels = JSON.parse(_this.$component.attr('timer-labels'));
            this.endDate = new Date(_this.$component.attr('timer-enddate'));
        } else {
            this.totalDays = Math.floor((new Date(this.$component.attr('data-enddate')) - new Date(this.$component.attr('data-startdate'))) / (1000 * 60 * 60 * 24));
            this.unitColors = JSON.parse(_this.$component.attr('data-unitColor'));
            this.countDown(new Date(this.$component.attr('data-enddate')) - new Date());
        }

        this.buttonCheck();

        jQuery(window).off('reinit_m78').on('reinit_m78', function() {
            _this.init();
        })
    };

    M78.prototype.countDown = function(diff) {
        var _this = this,
            sec = 1000,
            min = sec * 60,
            hr = min * 60,
            day = hr * 24;

        var fday = ("0" + Math.floor(diff / day).toString()).slice(-2),
            fhr = ("0" + Math.floor((diff % day) / hr).toString()).slice(-2),
            fmin = ("0" + Math.floor((diff % hr) / min).toString()).slice(-2),
            fsec = ("0" + Math.floor((diff % min) / sec).toString()).slice(-2);

        _this.$component.find('.m78-timer--wrapper[unit="days"]').find('.m78-timer--digit').html(fday);
        _this.$component.find('.m78-timer--wrapper[unit="hours"]').find('.m78-timer--digit').html(fhr);
        _this.$component.find('.m78-timer--wrapper[unit="minutes"]').find('.m78-timer--digit').html(fmin);
        _this.$component.find('.m78-timer--wrapper[unit="seconds"]').find('.m78-timer--digit').html(fsec);

        this.$component.find('.m78-timer--clock').each(function() {
            //var i = 60;
            $(this).html('')
            for (var i = 0; i < 60; i++) {
                $(this).append("<div class='m78-timer--tick'></div>");
            };

            $(this).find('.m78-timer--tick').each(function(index) {
                var deg = utils.isRTL() ? -((360 / 60) * index) : ((360 / 60) * index),
                    offset = (utils.breakpoint() == 'l') ? "-100px" : (utils.breakpoint() == 'm') ? "-65px" : "-35px";

                $(this).css({
                    transform: "rotate(" + deg.toString() + "deg) translate(0px, "+offset+")"
                });
            });

        });

        _this.animateClockDesktop('seconds', _this.unitColors.seconds, Math.floor((diff % min) / sec));
        _this.animateClockDesktop('minutes', _this.unitColors.minutes, Math.floor((diff % hr) / min));
        _this.animateClockDesktop('hours', _this.unitColors.hours, Math.round((60 / 24) * (Math.floor((diff % day) / hr))));
        _this.animateClockDesktop('days', _this.unitColors.days, Math.round((60 / _this.totalDays) * (Math.floor(diff / day))));

        setTimeout(function() {
            _this.countDown(diff - 1000);
        }, 1000)
    };

    M78.prototype.animateClockDesktop = function(unit, color, quotient) {
        var _this = this;

        _this.$component.find('.m78-timer--wrapper[unit="' + unit + '"]').find('.m78-timer--clock').find('.m78-timer--tick').each(function(index) {
            var $transform = $(this).css('transform');

            if (index < quotient) {
                $(this).css({
                    transform: $transform,
                    backgroundColor: color
                });
            } else {
                $(this).css({
                    transform: $transform
                });
            }
        });
    };

    M78.prototype.buttonCheck = function() {
        var _this = this;

        if (this.$component.hasClass('button--timer')) {
            _this.labels = _this.$component.attr('timer-labels');

            this.$component.off('start.timer').on('start.timer', function() {
                var sec = _this.timer.seconds;

                _this.buttonTimer(sec);
            });
        };
    };

    M78.prototype.buttonTimer = function(sec) {
        var _this = this,
            $textcontainer = _this.$component.find('.m78-timer--button_text'),
            $timecontainer = _this.$component.find('.m78-timer--button_time'),
            beforeText = JSON.parse(_this.labels).before,
            afterText = JSON.parse(_this.labels).after,
            min = Math.floor((sec - 0) / 60);

            if (_this.timerInterval) {
                clearTimeout(_this.timerInterval);
            }

        _this.$component.off('click.timer');
        _this.$component.removeClass('button--primary');
        _this.$component.addClass('timer-button--outline');
        $textcontainer.text(afterText);
        $('.m78-timer-instructions').hide();
        $('.m78-timer-verification').show();

        if (sec > 0) {
            $timecontainer.text(min.toString() + ':' + ('0' + (sec - (min * 60)).toString()).slice(-2) + ' )');
            _this.timerInterval = setTimeout(function() {
                sec = sec - 1;
                _this.buttonTimer(sec);
            }, 1000);
        } else {
            _this.buttonCheck();
            _this.$component.addClass('button--primary');
            _this.$component.removeClass('timer-button--outline');
            $textcontainer.text(beforeText);
            $timecontainer.text('')
            $('.m78-timer-instructions').show();
            $('.m78-timer-verification').hide();
        };
    };

    return M78;

});

define('../src/sublayouts/m79-dashboard-tools/m79-dashboard-tools',['jquery'], function($) {

    'use strict';

    var M79 = function($component) {

        this.$component = $component;
        return this;
    };

    M79.prototype.init = function() {
        var _this = this,
        	date = new Date(),
        	hour = date.getHours(),
        	$greeting = this.$component.find('.m79-dashboard-tools--greeting_wrapper').find('.m79-dashboard-tools--greeting'),
        	$greets = this.$component.find('.m79-dashboard-tools--greeting_wrapper').data('greeting');

        //console.log(hour)

        if (hour < 12) {
        	$greeting.html($greets.morning)
        } else if ((18 > hour) && (hour >= 12)) {
        	$greeting.html($greets.afternoon)
        } else {
        	$greeting.html($greets.evening)
        }
    };

    return M79;

});

define('../src/sublayouts/m80-my-consumption/m80-my-consumption',['jquery'], function($) {

    'use strict';

    var M80 = function($component) {

        this.$component = $component;
        return this;
    };

    M80.prototype.init = function() {
        var _this = this,
            $rate = this.$component.find('.circle-foreground'),
            $num = parseFloat(this.$component.attr('data-rate')),
            $ratenum = ($num/100)*300;

        $rate.css('stroke-dasharray', $ratenum.toString()+' 624.86px')
    };

    return M80;

});

define('../src/sublayouts/m81-total-amount/m81-total-amount',['jquery', 'lib/utils', 'chart-config'], function($, utils, Highcharts) {

    'use strict';

    var M81 = function($component) {

        this.$component = $component;
        return this;
    };

    M81.prototype.init = function() {
        var _this = this;
        //this.renderGraph();

        //var series = JSON.parse(this.$component.find('.m81-total-amount').attr('data-series'));
        //console.log(series);
        $(window).off('m81-initGraph').on('m81-initGraph', function() {
            //console.log(parseFloat(_this.$component.find('.m81-total-amount').attr('data-total')))
            if (parseFloat(_this.$component.find('.m81-total-amount').attr('data-total')) <= 0) {
                _this.$component.find('.m81-total-amount--graph_placeholder').show();
            } else {
                _this.$component.find('.m81-total-amount--graph_placeholder').hide();
                _this.renderGraph();
            }
            _this.tab();
        });


    };

    M81.prototype.tab = function() {
        var _this = this,
            $list = this.$component.find('.m81-total-amount--list'),
            $tabs = this.$component.find('.m81-total-amount--list_item.toggled');

        $tabs.each(function() {
            var $content = $(this).next('.m81-total-amount--list_item--toggled'),
                height = 0;
            if ($(this).hasClass('toggle-open')) {
                $content.find('.m81-total-amount--list_item--toggleditem').each(function() {
                    height = height + $(this).outerHeight(true);
                });
                //console.log(height)
                $content.css('height', height.toString() + 'px');
            } else {
                $content.css('height', '0px');
            }

            $(this).off('click.tab').on('click.tab', function() {
                var __this = this;

                $content = $(this).next('.m81-total-amount--list_item--toggled');
                height = 0;

                $tabs.each(function() {
                    $(this).removeClass('toggle-open');
                });

                if (!$(this).hasClass('toggle-open')) {
                    $(this).addClass('toggle-open');
                }

                $tabs.each(function() {
                    if ($(this).hasClass('toggle-open')) {
                        $(this).next('.m81-total-amount--list_item--toggled').find('.m81-total-amount--list_item--toggleditem').each(function() {
                            height = height + $(this).outerHeight(true);
                        });
                        //console.log(height)
                        $(this).next('.m81-total-amount--list_item--toggled').css('height', height.toString() + 'px');
                    } else {
                        $(this).next('.m81-total-amount--list_item--toggled').css('height', '0px');
                    }
                });
            });
        });

    };

    M81.prototype.renderGraph = function(isType) {
        var _this = this;

        var $container = this.$component.find('[data-chart-container]'),
            series = JSON.parse(this.$component.find('.m81-total-amount').attr('data-series')),
            //yAxisTitleText = this.$component.attr('data-y-axis-text'),
            //xAxisCategories = this.$component.attr('data-x-axis-categories').split(','),
            //tooltipValueSuffix = this.$component.attr('data-tooltip-value-suffix'),
            isRTL = utils.isRTL();
        //alignment = utils.isRTL() ? 'left' : 'right',
        //usageFor = this.$component.attr('data-usagefor'),
        //legend = this.$component.attr('data-legend'),
        //label = this.$component.attr('data-label'),
        //labelstyle = this.$component.attr('data-labelstyle'),
        //labelXAxisStep = parseInt(this.$component.attr('data-step'), 10) || 1,
        //labelXAxisStepMobile = parseInt(this.$component.attr('data-step-s'), 10) || 1;

        for (var i = 0; i < series.length; i++) {
            if (series[i].data.length == 0) {
                series.splice(i, 1);
            };
        };

        for (var i = 0; i < series[0].data.length; i = i + 1) {
            series[0].data[i].y = parseFloat(series[0].data[i].y)
                //console.log(series[0].data[i])
        };

        var opts = {
            chart: {
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false,
                type: 'pie'
            },

            title: {
                text: '',
                style: {
                    display: 'none'
                }
            },

            subtitle: {
                text: '',
                style: {
                    display: 'none'
                }
            },
            legend: {
                style: {
                    display: 'none'
                }
            },
            xAxis: {
                style: {
                    display: 'none'
                }
            },
            yAxis: {
                style: {
                    display: 'none'
                }
            },
            tooltip: {
                enabled: true,
                //positioner: function() {
                //    return { x: 0, y: 0 };
                //},
                outside: true,
                pointFormat: '<span style="font-size: 14px;font-weight:bold;">{point.name}: <b>{point.y} ' + _this.$component.find('.m81-total-amount').attr('data-currency') + '</b></span>',
                headerFormat: '',
                crosshairs: true,
                useHTML: true
            },
            plotOptions: {
                pie: {
                    allowPointSelect: false,
                    dataLabels: {
                        enabled: false
                    }
                }
            },
            series: series
        };

        $container.highcharts(opts);

        this.$component.find('.m29v2-chart__legend--item').each(function() {
            $(this).find('.m29v2-chart__legend--item-icon').css('color', $(this).data('color'));
        });
    };

    return M81;

});

define('../src/sublayouts/m82-payment-history/m82-payment-history',['jquery'], function($) {

    'use strict';

    var M82 = function($component) {

        this.$component = $component;
        return this;
    };

    M82.prototype.init = function() {
        var _this = this;
        
        $(window).off('m82EV').on('m82EV', function() {
            _this.$component.addClass('m82-payment-history--EV');
        });
        
        $(window).off('m82').on('m82', function() {
            _this.$component.removeClass('m82-payment-history--EV');
        });

        this.$component.find('.m82-payment-history--header_buttoni').off('click.a').on('click.a', function() {
            _this.$component.find('.m82-payment-history--header_buttoni').each(function() {
                $(this).removeClass('m82-payment-history--header_buttona');
            });
            $(this).addClass('m82-payment-history--header_buttona');
        });
    };

    return M82;

});

define('../src/sublayouts/m84-bills-compare/m84-bills-compare',['jquery', 'lib/utils', 'chart-config', 'highcharts/modules/exporting', 'highcharts/modules/export-data'], function($, utils, Highcharts) {

    'use strict';

    var M84 = function($component) {

        this.$component = $component;
        return this;
    };

    M84.prototype.init = function() {
        var _this = this;

        this.tabs();
        this.filter();
        this.download();

        $(window).off('init_m84').on('init_m84', function() {
            _this.renderGraph('m84-bills-compare--graph_paid', 'both', false, false);
            _this.renderGraph('m84-bills-compare--graph_billed', 'both', false, false);


            $('.m84-bills-compare--graph_footerwrp-modal').off('click.modal').on('click.modal', function() {
                var mindex = $(this).attr('modal-index');

                _this.$component.find('.m84-bills-compare-modal[modal-index="' + mindex + '"]').find('.m39-modal__trigger').trigger('click');
            });

            _this.$component.find('[data-target="m84-bills-compare--graph_billed"]').trigger('click');
        });

        $(window).off('init_EVm84').on('init_EVm84', function() {
            _this.renderGraph('m84-bills-compare--graph_billed', 'ev', false, true);
        });

        $(document).off('click.m84check').on('click.m84check', function(e) {
            var $target = $(e.target);
            //console.log($target.closest('.m84-bills-compare--filter'))
            if ($target.is('.m84-bills-compare--filter') || $target.closest('.m84-bills-compare--filter').length != 0 || $target.is('.m84-bills-compare--tools_filter')) {

            } else {
                _this.$component.find('.m84-bills-compare--filter').removeClass('m84-bills-compare--filter-active');
            }
        });

        if (jQuery('input[name="SelectedAccountNumber"]:checked').attr("data-evaccount") != undefined) {
            if (jQuery('input[name="SelectedAccountNumber"]:checked').attr("data-evaccount").toLowerCase() == 'true') {
                jQuery(window).trigger('m82EV');
            } else {
                jQuery(window).trigger('m82');
            }
        } else {
            jQuery(window).trigger('m82');
        }

    };

    M84.prototype.download = function() {
        var _this = this,
            $download = this.$component.find('.m84-bills-compare--tools_download');
        //$pdf = this.$component.find('.m84-bills-compare--download--pdf'),
        //$xls = this.$component.find('.m84-bills-compare--download--xls'),
        //$panel = this.$component.find('.m84-bills-compare--download_panel');

        $download.off('click.dl').on('click.dl', function() {
            //$panel.toggleClass('hidden');
            //_this.$component.find('.m84-bills-compare--graph_inner--active').find('.highcharts-exporting-group').find('.highcharts-contextbutton').click()
            //_this.$component.find('.m84-bills-compare--graph_inner--active').find('.highcharts-contextmenu').find('.highcharts-menu-item:nth-child(10)').click()
            var dlChart = _this.$component.find('[data-chart-container]').highcharts();

            dlChart.downloadXLS();
        });

        //$pdf.off('click.dl').on('click.dl', function() {
        //_this.$component.find('.m84-bills-compare--graph_inner--active').find('.highcharts-exporting-group').find('.highcharts-contextbutton').click();
        //_this.$component.find('.m84-bills-compare--graph_inner--active').find('.highcharts-contextmenu').find('.highcharts-menu-item:nth-child(6)').click();
        //$panel.addClass('hidden');
        //});

        //$xls.off('click.dl').on('click.dl', function() {
        //_this.$component.find('.m84-bills-compare--graph_inner--active').find('.highcharts-exporting-group').find('.highcharts-contextbutton').click();
        //_this.$component.find('.m84-bills-compare--graph_inner--active').find('.highcharts-contextmenu').find('.highcharts-menu-item:nth-child(10)').click();
        //$panel.addClass('hidden');
        //});

    };

    M84.prototype.tabs = function() {
        var _this = this;

        this.$component.find('.m84-bills-compare--header_buttoni').off('click.a').on('click.a', function() {
            var $target = $('.' + $(this).attr('data-target')),
                targ = $(this).attr('data-target');

            _this.$component.find('.m84-bills-compare--header_buttoni').each(function() {
                $(this).removeClass('m84-bills-compare--header_buttona');
            });
            $(this).addClass('m84-bills-compare--header_buttona');
            _this.$component.find('.m84-bills-compare--tools_filter').css({
                opacity: 0,
                display: 'none'
            });
            _this.$component.find('.m84-bills-compare--graph_inner').css({
                opacity: 0,
                display: 'none'
            });
            $target.css({
                display: 'block'
            });
            //_this.renderGraph(targ, );
            $target.animate({ 'opacity': 1 });
            _this.$component.find('.m84-bills-compare--graph_inner').each(function() {
                $(this).removeClass('m84-bills-compare--graph_inner--active');
            });
            $target.addClass('m84-bills-compare--graph_inner--active');

            if (jQuery('input[name="SelectedAccountNumber"]:checked').attr("data-evaccount").toLowerCase() == 'true') {
                _this.$component.find('.m84-bills-compare--tools_filter').attr('style', 'display:none !important;');
                jQuery(window).trigger('m82EV');
            } else {
                jQuery(window).trigger('m82');
            }
        });

    };

    M84.prototype.filter = function() {
        var _this = this;

        var $filter = _this.$component.find('.m84-bills-compare--tools_filter'),
            def = _this.$component.find('.m84-bills-compare--filter_radio').attr('data-default-text');

        this.$component.find('.m84-bills-compare--tools_filter').off('click.f').on('click.f', function() {
            _this.$component.find('.m84-bills-compare--filter').toggleClass('m84-bills-compare--filter-active');
        });

        this.$component.find('.m84-bills-compare--filter_apply').off('click.app').on('click.app', function() {
            var $checked = _this.$component.find('.m84-bills-compare--filter_radio').find('.form-field__input--radio:checked');

            if ($checked.length != 0) {
                $filter.html($checked.val());
                _this.renderGraph('m84-bills-compare--graph_billed', $checked.attr('series-type'), false);
                $filter.addClass('filter--active');
            } else {
                $filter.html(def);
                _this.renderGraph('m84-bills-compare--graph_billed', 'both', false);
                $filter.removeClass('filter--active');
            };

            _this.$component.find('.m84-bills-compare--filter').removeClass('m84-bills-compare--filter-active');
        });

        this.$component.find('.m84-bills-compare--filter_clear').off('click.app').on('click.app', function() {
            var $checked = _this.$component.find('.m84-bills-compare--filter_radio').find('.form-field__input--radio:checked');

            $checked.prop('checked', false);
        });

    };

    M84.prototype.renderGraph = function(parent, type, isEmpty, isEV) {
        var _this = this;

        //_this.$component.find('.m29v3-chart--download').css('display', 'absolute');

        //var labelRotate = utils.breakpoint() == 'l' ? 0 : 270;
        var labelRotate = 0;
        //console.log('asdasda')
        var $container = this.$component.find('.' + parent).find('.m84-bills-compare--graph'),
            lnbtn = this.$component.find('.' + parent).find('.m84-bills-compare--graph_footerwrp').length,
            series,
            yAxisTitleText = this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-y-axis-text'),
            xAxisTitleText = this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-x-axis-text'),
            currency = this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-currency'),
            //xAxisCategories = utils.breakpoint() == 'l' ? this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-x-axis-categories').split(',') : this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-x-axis-mcategories').split(',') ,
            xAxisCategories = this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-x-axis-categories').split(','),
            tooltipValueSuffix = this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-tooltip-value-suffix'),
            isRTL = utils.isRTL(),
            labelRotatedl = utils.breakpoint() == 'l' ? 0 : 270,
            //labelRotatedl = 0,
            alignment = utils.isRTL() ? 'left' : 'right',
            usageFor = this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-usagefor'),
            legend = this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-legend'),
            label = this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-label'),
            labelstyle = this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-labelstyle'),
            fsize = utils.breakpoint() == 'l' ? '13px' : '9px',
            thickness = utils.breakpoint() == 'l' ? 10 : 5,
            labelXAxisStep = parseInt(this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-step'), 10) || 1,
            labelXAxisStepMobile = parseInt(this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-step-s'), 10) || 1;

        if (type == 'both') {
            if (this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-series') != '') {
                series = JSON.parse(this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-series'));
            }
        } else if (type == 'electricity') {
            if (this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-electricity-series') != '') {
                series = JSON.parse(this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-electricity-series'));
            }
        } else if (type == 'ev') {
            if (this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-ev-series') != '') {
                series = JSON.parse(this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-ev-series'));
            }
        } else {
            if (this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-water-series') != '') {
                series = JSON.parse(this.$component.find('.' + parent).find('.m84-bills-compare--graph').attr('data-water-series'));
            }
        };

        this.$component.find('.' + parent).find('.m84-bills-compare--graph_footerwrp').each(function() {
            $(this).css('width', 'calc(100% / ' + lnbtn.toString() + ')');
        });

        if (series != null) {

            for (var i = 0; i < series.length; i++) {
                if (series[i].data.length == 0) {
                    series.splice(i, 1);
                };
            };

            if (!isEV) {

                var opts = {
                    chart: {
                        type: 'column'
                    },
                    title: {
                        text: 'Billed Amount',
                        style: {
                            display: 'none'
                        }
                    },
                    subtitle: {
                        text: '',
                        style: {
                            display: 'none'
                        }
                    },
                    legend: {
                        enabled: false
                    },
                    plotOptions: {
                        column: {
                            dataLabels: {
                                enabled: true,
                                useHTML: true,
                                crop: false,
                                overflow: 'allow',
                                rotation: labelRotatedl,
                                allowOverlap: true,
                                format: utils.breakpoint() == 'l' ? '<div style="text-align:center;"><span style="font-size:16px;font-weight:normal;position: relative;top: 6px;">' + currency + '</span><br><span style="font-size:16px;font-weight:100;">{y}</span></div>' : '<span style="position:relative;top:-4px;"><span style="padding-left:72px;font-size:13px;font-weight:100;">{y}</span><span style="font-size:13px;font-weight:normal;"> ' + currency + '</span></span>'
                                    //format: '<div style="text-align:center;"><span style="font-size:11px;font-weight:normal;position: relative;top: 6px;">'+currency+'</span><br><span style="font-size:11px;font-weight:100;">{y}</span></div>'
                            }
                        },
                        series: {
                            pointWidth: thickness,
                            borderRadius: 5
                        }
                    },
                    xAxis: {
                        reversed: isRTL,
                        categories: xAxisCategories,
                        title: {
                            text: xAxisTitleText,
                            style: {
                                display: 'none'
                            }
                        },
                        labels: {
                            autoRotation: false,
                            rotation: labelRotate,
                            useHTML: true
                                //format: '<div style="text-align:center;"><span style="font-weight:bold;font-size:' + fsize + ';">{value}</span><br> <span style="font-size:' + fsize + ';font-weight:normal;position:relative;top:-8px;">2019<span></div>'
                        },
                        gridLineColor: '#ffffff',
                        lineColor: '#ffffff'
                    },
                    yAxis: {
                        visible: false,
                        title: {
                            style: {
                                display: 'none'
                            },
                            align: 'high',
                            offset: 0,
                            rotation: 0,
                            y: -15
                        }
                    },
                    tooltip: {
                        style: {
                            display: 'none'
                        }
                    },
                    exporting: {
                        filename: $('.m43-accountsel__selected').find('[data-acc-detail="acc_number"]').html().replace('(', "").replace(')', "") + '-' + _this.$component.find('.m84-bills-compare--header_title').html().trim().replace(/\s/g, '-') + '-' + _this.$component.find('.m84-bills-compare--header_buttoni[data-target="' + parent + '"]').html().replace(/\s/g, '-') + _this.getFiltered(),
                        tableCaption: $('.m43-accountsel__selected').find('[data-acc-detail="acc_number"]').html().replace('(', "").replace(')', "") + '-' + _this.$component.find('.m84-bills-compare--header_title').html().trim().replace(/\s/g, '-') + '-' + _this.$component.find('.m84-bills-compare--header_buttoni[data-target="' + parent + '"]').html().replace(/\s/g, '-') + _this.getFiltered(),
                        width: 1400,
                        csv: {
                            annotations: {
                                join: true
                            }
                        },
                        allowHTML: false
                    },
                    series: series
                };
            } else {
                var opts = {
                    chart: {
                        type: 'column'
                    },
                    title: {
                        text: 'Billed Amount',
                        style: {
                            display: 'none'
                        }
                    },
                    subtitle: {
                        text: '',
                        style: {
                            display: 'none'
                        }
                    },
                    legend: {
                        enabled: false
                    },
                    plotOptions: {
                        column: {
                            dataLabels: {
                                enabled: true,
                                useHTML: true,
                                crop: false,
                                overflow: 'allow',
                                rotation: labelRotatedl,
                                allowOverlap: true,
                                format: utils.breakpoint() == 'l' ? '<div style="text-align:center;"><span style="font-size:16px;font-weight:normal;position: relative;top: 6px;">' + currency + '</span><br><span style="font-size:16px;font-weight:100;text-decoration:' + '{point.striked}' + ';">{y}</span></div>' : '<span style="position:relative;top:-4px;"><span style="padding-left:72px;font-size:13px;font-weight:100;text-decoration:' + '{point.striked}' + ';">{y}</span><span style="font-size:13px;font-weight:normal;"> ' + currency + '</span></span>'
                                    //format: '<div style="text-align:center;"><span style="font-size:11px;font-weight:normal;position: relative;top: 6px;">'+currency+'</span><br><span style="font-size:11px;font-weight:100;">{y}</span></div>'
                            }
                        },
                        series: {
                            pointWidth: thickness,
                            borderRadius: 5
                        }
                    },
                    xAxis: {
                        reversed: isRTL,
                        categories: xAxisCategories,
                        title: {
                            text: xAxisTitleText,
                            style: {
                                display: 'none'
                            }
                        },
                        labels: {
                            autoRotation: false,
                            rotation: labelRotate,
                            useHTML: true
                                //format: '<div style="text-align:center;"><span style="font-weight:bold;font-size:' + fsize + ';">{value}</span><br> <span style="font-size:' + fsize + ';font-weight:normal;position:relative;top:-8px;">2019<span></div>'
                        },
                        gridLineColor: '#ffffff',
                        lineColor: '#ffffff'
                    },
                    yAxis: {
                        visible: false,
                        title: {
                            style: {
                                display: 'none'
                            },
                            align: 'high',
                            offset: 0,
                            rotation: 0,
                            y: -15
                        }
                    },
                    tooltip: {
                        style: {
                            display: 'none'
                        }
                    },
                    series: series
                };
            }

            //if (utils.breakpoint() === 's') {
            //    opts.xAxis.labels.staggerLines = labelXAxisStepMobile;
            //}

            if (series.length == 0) {
                $container.hide();
                this.$component.find('.' + parent).find('.m84-bills-compare--graph_footer').hide();
                this.$component.find('.' + parent).find('.m84-bills-compare--no-data').show();
            } else {
                $container.highcharts(opts);
                $container.show();
                this.$component.find('.' + parent).find('.m84-bills-compare--graph_footer').show();
                this.$component.find('.' + parent).find('.m84-bills-compare--no-data').hide();
            }
        }
        //console.log($('.m43-accountsel__selected').find('[data-acc-detail="acc_number"]').html().replace('(', "").replace(')', "") + '-' + _this.$component.find('.m84-bills-compare--header_title').html().trim().replace(/\s/g, '-') + '-' + _this.$component.find('.m84-bills-compare--header_buttoni[data-target="'+parent+'"]').html().replace(/\s/g, '-') + _this.getFiltered())
        //Highcharts.chart('m84-bills-compare--graph', opts)
    };

    M84.prototype.getFiltered = function() {
        var _this = this,
            total = '';

        this.$component.find('.m84-bills-compare--filter_radio').find('.form-field__input').each(function() {
            if ($(this).prop('checked') == true) {
                total = total + '-' + $(this).val()[0].toUpperCase();
            }
        });

        return total;
    };

    return M84;

});

define('../src/sublayouts/m85-dstore-carousel/m85-dstore-carousel',['jquery', 'lib/utils', 'slick'], function ($, utils) {

    'use strict';

    var M85 = function($component) {

        this.$component = $component;
        return this;
    };

    M85.prototype.init = function() {
        var _this = this;
        
        this.initCarousel();

        $(window).on('resize', function() {
            if ($('.m85-dstore-carousel_carousel').hasClass('slick-initialized')) {
                $('.m85-dstore-carousel_carousel').slick('destroy');    
            };
            _this.initCarousel();
        });
    };

    M85.prototype.initCarousel = function () {
        this.$M3_slider = $('.m85-dstore-carousel_carousel');
        var rtl = ($('html').attr('dir') == 'rtl');

        if ( utils.breakpoint() === 'l' ) {
            if ($('.m85-dstore-carousel_slide').length > 1) {
                this.$M3_slider.slick({
                    dots: false,
                    arrows: true,
                    infinite: true,
                    speed: 750,
                    slidesToShow: 4,
                    slidesToScroll: 1,
                    autoplay: false,
                    rtl: rtl
                });
            }
        } else if ( utils.breakpoint() === 'm' ) {
            if ($('.m85-dstore-carousel_slide').length > 1) {
                this.$M3_slider.slick({
                    dots: false,
                    arrows: true,
                    infinite: true,
                    speed: 750,
                    slidesToShow: 2,
                    slidesToScroll: 1,
                    autoplay: false,
                    rtl: rtl
                });
            }
        } else if ( utils.breakpoint() === 's' ) {
            if ($('.m85-dstore-carousel_slide').length > 1) {
                this.$M3_slider.slick({
                    dots: true,
                    arrows: false,
                    infinite: true,
                    speed: 750,
                    slidesToShow: 1,
                    slidesToScroll: 1,
                    autoplay: false,
                    rtl: rtl
                });
            }
        }

        this.$M3_slider.css({
            top: 0,
            opacity: 1,
            position: 'relative'
        });

        this.$component.find('.slick-slide').each(function() {
            if ( $(this).attr('aria-describedby') != undefined ) {
                $(this).find('.teaser__title').attr('id', $(this).attr('aria-describedby'))
            };
        });

        this.modal();

    };

    M85.prototype.modal = function () {
        var _this = this,
            $slides = this.$component.find('.m85-dstore-carousel_slide');

        $slides.each(function() {
            $(this).off('click.store').on('click.store', function() {
                var $modal = _this.$component.find('.m39-modal--dstore'),
                    discount = $(this).find('.teaser__discount').html(),
                    title = $(this).find('.teaser__title').html(),
                    text = $(this).find('.teaser__copy').html(),
                    store = $(this).find('.teaser__storelogo').text(),
                    main_img = $(this).find('.m60-teaser-image').css('background-image'),
                    img = $(this).find('.teaser__storelogo').find('img').attr('src'),
                    url = $(this).find('.teaser_offerUno').val();

                $modal.find('.m39-modal__discount').html(discount);
                $modal.find('.m39-modal__title').html(title);
                $modal.find('.m39-modal__store').text(store);
                $modal.find('.m39-modal__store').append('<img src="'+img+'">');
                $modal.find('.m39-modal__dstore-img').css('background-image', main_img);
                $modal.find('.m39-modal__dstore-txt').html(text);
                $modal.find('.m39-modal__dstore-link').attr('href', url);

                $modal.find('.m39-modal__trigger').trigger('click');
            });
        });
    };

    return M85;

});

define('../src/sublayouts/m87-gauge-alerts/m87-gauge-alerts',['jquery', 'lib/utils', 'tooltipster', 'chart-config'], function($, utils, tooltipster) {

    'use strict';

    var gaugeDashboardComponent = function($component) {

        this.$component = $component;

        return this;
    };

    gaugeDashboardComponent.prototype.init = function() {
        var _this = this,
            waterWrapper = _this.$component.find('.m87-gauge-alerts--container--water').closest('.m87-gauge-alerts--wrapper'),
            electWrapper = _this.$component.find('.m87-gauge-alerts--container--electricity-r').closest('.m87-gauge-alerts--wrapper'),
            carbonWrapper = _this.$component.find('.m87-gauge-alerts--container--carbonfootprint').closest('.m87-gauge-alerts--wrapper'),
            $disclaimer = _this.$component.find('.m87-gauge-alerts--disclaimer');
            

        //this.initLineGraph(wdata, '.m28-columncharts--water', JSON.parse(this.$component.attr('data-water')));
        //this.initLineGraph(edata, '.m28-columncharts--electricity', JSON.parse(this.$component.attr('data-electricity')));

        jQuery(window).off('reinit_m87-select').on('reinit_m87-select', function() {
            var $select = _this.$component.find('.m87-gauge-alerts-select');

            $select.off('change.m87').on('change.m87', function() {
                var $selected = $(this).find(':selected'),
                    edata = $selected.attr('data-electricityconsumption'),
                    //etype = $selected.attr('data-accounttype'),
                    wdata = $selected.attr('data-waterconsumption'),
                    cdata = $selected.attr('data-carbonconsumption'),
                    eselectconsume = $(this).find(':selected').attr('data-iselectricityconsumed'),
                    wselectconsume = $(this).find(':selected').attr('data-iswaterconsumed');

                if ($selected.attr('data-iselectricityconsumed') === 'true') {
                    electWrapper.show()
                    carbonWrapper.show()
                } else {
                    electWrapper.hide()
                    carbonWrapper.hide()
                };

                    if(eselectconsume === 'true'){
                        jQuery('.m87-gauge-alerts--container--electricity-r').closest('.m87-gauge-alerts--wrapper').show()
                        jQuery('.m87-gauge-alerts--container--carbonfootprint').closest('.m87-gauge-alerts--wrapper').show()
                    }else{
                        jQuery('.m87-gauge-alerts--container--electricity-r').closest('.m87-gauge-alerts--wrapper').hide()
                        jQuery('.m87-gauge-alerts--container--carbonfootprint').closest('.m87-gauge-alerts--wrapper').hide()
                    }
                    if(wselectconsume === 'true'){
                       jQuery('.m87-gauge-alerts--container--water').closest('.m87-gauge-alerts--wrapper').show()
                    }else{
                       jQuery('.m87-gauge-alerts--container--water').closest('.m87-gauge-alerts--wrapper').hide()
                    }

                if ($selected.attr('data-iswaterconsumed') === 'true') {
                    waterWrapper.show()
                } else {
                    waterWrapper.hide()
                };

                if ($selected.val() != undefined) {  
                    if ($selected.val().toLowerCase() === 'unbilledconsumption') {
                        $disclaimer.show()
                    } else {
                        $disclaimer.hide()
                    }
                } else {
                    $disclaimer.hide();
                };

                if (edata != null && edata.length > 0) {
                    if ($selected.attr('data-electricityslab').split(',').length == 2) {
                        _this.initGaugeGraph($selected.attr('data-electricityslab').split(','), 2, edata, '.m87-gauge-alerts--container--electricity-i', (76.25 * 2)+15);
                        jQuery('.m87-gauge-alerts--container--electricity-i').show();
                        jQuery('.m87-gauge-alerts--container--electricity-r').hide();
                    } else {
                        _this.initGaugeGraph($selected.attr('data-electricityslab').split(','), 4, edata, '.m87-gauge-alerts--container--electricity-r', 76.25);
                        jQuery('.m87-gauge-alerts--container--electricity-r').show();
                        jQuery('.m87-gauge-alerts--container--electricity-i').hide();
                    }

                };
                if (wdata != null && wdata.length > 0) {
                    _this.initGaugeGraph($selected.attr('data-waterslab').split(','), 4, wdata, '.m87-gauge-alerts--container--water', 106.666667);
                };
                if (cdata != null && cdata.length > 0) {
                    _this.initGaugeGraph($selected.attr('data-carbonslab').split(','), 4, cdata, '.m87-gauge-alerts--container--carbonfootprint', 76.25);
                    //_this.initGaugeGraphCarbon(4, cdata, JSON.parse($selected.attr('data-carbonfootprint-max')), '.m87-gauge-alerts--container--carbonfootprint', 76.25);
                };
            });

            $select.trigger('change.m87')
        });

        jQuery(window).off('reinit_m87').on('reinit_m87', function() {
            var edata = _this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-electricityconsumption'),
                etype = _this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-accounttype'),
                wdata = _this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-waterconsumption'),
                cdata = _this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-carbonconsumption'),
                econsume = _this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-iselectricityconsumed'),
                wconsume = _this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-iswaterconsumed');

            //if ( edata !=null && edata.length > 0 ) {
            //    this.initColumnGraph(edata, JSON.parse(this.$component.attr('data-electricity-max')), '.m28-columncharts--electricity', '.m87-gauge-alerts--container--electricity');    
            //};
            //if ( wdata!=null && wdata.length > 0 ) {
            //    this.initColumnGraph(wdata, JSON.parse(this.$component.attr('data-water-max')), '.m28-columncharts--water', '.m87-gauge-alerts--container--water');
            //};

            if (econsume === 'true') {
                electWrapper.show()
                carbonWrapper.show()
            } else {
                electWrapper.hide()
                carbonWrapper.hide()
            }
            if (wconsume === 'true') {
                waterWrapper.show()
            } else {
                waterWrapper.hide()
            }

            if (edata != null && edata.length > 0) {
                if (etype == "30") {
                    _this.initGaugeGraph(_this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-electricityslab').split(','), 2, edata, '.m87-gauge-alerts--container--electricity', 76.25 * 2);
                } else {
                    _this.initGaugeGraph(_this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-electricityslab').split(','), 4, edata, '.m87-gauge-alerts--container--electricity', 76.25);
                }

            };
            if (wdata != null && wdata.length > 0) {
                _this.initGaugeGraph(_this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-waterslab').split(','), 4, wdata, '.m87-gauge-alerts--container--water', 106.666667);
            };
            if (cdata != null && cdata.length > 0) {
                _this.initGaugeGraph(_this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-carbonslab').split(','), 4, cdata, '.m87-gauge-alerts--container--carbonfootprint', 76.25);
                //_this.initGaugeGraphCarbon(4, cdata, JSON.parse(_this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-carbonfootprint-max')), '.m87-gauge-alerts--container--carbonfootprint', 76.25);
            };

            _this.initBell(_this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-electricityalerts'), _this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-electricity-max'), 4, _this.$component.find('.m87-gauge-alerts--container--electricity'));
            _this.initBell(_this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-wateralerts'), _this.$component.find('.m87-gauge-alerts--wrapperdata').attr('data-water-max'), 4, _this.$component.find('.m87-gauge-alerts--container--water'));
            //_this.initBell('data-wateralerts', 'data-water-max', 3);
            _this.listeners();
        });

    };

    gaugeDashboardComponent.prototype.initGaugeGraph = function(slabData, bars, rawvalue, placeholder, per) {
        var value = parseFloat(rawvalue),
            bar_count = 0 + 1,
            min_bar = 1,
            total = 0,
            excess_rate = 0;

        $(placeholder).find('.m87-gauge-alerts--bar_fill').each(function() {
            $(this).attr('style', '');
        });

        $(slabData).each(function() {
            total = total + parseFloat(this);
            if (value > total) {
                bar_count = bar_count + 1;
            } else {
                excess_rate = (((value - total + parseFloat(this)) / parseFloat(this)) * per)
                return false
            }
        });

        while (min_bar < bar_count) {
            var $g = $(placeholder).find('.m87-gauge-alerts--bar' + min_bar + '');

            $g.find('#m87-gauge-alerts--bar_fill').css({
                strokeDasharray: per.toString() + ' 9999',
                opacity: '1'
            });

            min_bar++;
        };

        if (excess_rate > 0) {
            $(placeholder).find('.m87-gauge-alerts--bar' + (min_bar) + '').find('#m87-gauge-alerts--bar_fill').css({
                strokeDasharray: excess_rate.toString() + ' 9999',
                opacity: '1'
            });
        };

        $(placeholder).closest('.m87-gauge-alerts--wrapper').find('.m87-gauge-alerts--details-value').html(rawvalue);
        //$(placeholder).closest('.m87-gauge-alerts--wrapper').find('.m87-gauge-alerts--details-month').html(months[parseFloat(month) - 1]);
        //$(placeholder).closest('.m87-gauge-alerts--wrapper').find('.m87-gauge-alerts--details-year').html(year);

        if (/Edge\/|Trident\/|MSIE /.test(window.navigator.userAgent)) {
            $('[id=m87-gauge-alerts--bar_fill]').each(function() {
                var __this = this;
                
                setTimeout(function() {
                    $(__this).attr('class', 'm87-gauge-alerts--bar_fill');
                }, 125)
            });
        };

    };

    gaugeDashboardComponent.prototype.initBell = function(value, total, barln, container) {
        var _this = this,
            array = value.split(',');

        container.find('.icon-bell_wrapper').remove();

        $(array).each(function() {
            if (parseFloat(this) > 0) {
                var ceiling = parseFloat(this),
                    max = parseFloat(total),
                    $water = _this.$component.find('.m87-gauge-alerts--container--water'),
                    $clone = _this.$component.find('.icon-bell_clone').clone(),
                    angle,
                    bars,
                    totAngle = 250,
                    offsetAngle = 35;

                bars = parseInt(ceiling / (max / barln))
                angle = ((ceiling / max) * totAngle) - offsetAngle + (bars * 3);

                //if ($(this).find('.form-field__switch-checkbox').prop('checked')) {
                $clone.find('.icon-bell_wrapper').css('transform', 'rotate(' + angle.toString() + 'deg');
                $clone.find('.icon-bell').css('transform', 'rotate(' + (angle * -1).toString() + 'deg');
                container.prepend($clone.html());
                //}
            }

        });
    };

    gaugeDashboardComponent.prototype.listeners = function() {
        var _this = this,
            $items = this.$component.find('.m87-gauge-alerts--ceiling');

        $items.find('.m87-gauge-alerts--remove').off('click.c').on('click.c', function() {
            _this.$component.find('.m87-gauge-alerts-modalBell').find('.m39-modal__trigger').trigger('click');
        });

        this.$component.find('.m87-gauge-alerts--details-button').off('click.m').on('click.m', function() {
            _this.$component.find('.m87-gauge-alerts-modal').find('.form-field__input--radio[data-type="' + $(this).attr('data-type') + '"]').trigger('click');
            _this.$component.find('.m87-gauge-alerts-modal').find('.m39-modal__trigger').trigger('click');
        });
    };

    return gaugeDashboardComponent;

});

define('../src/sublayouts/m88-dashboard-map/m88-dashboard-map',['jquery'], function($) {

    'use strict';

    var M32_MAP = function($component) {
        this.$component = $component;
        window.MAP = this;
        return this;
    };

    M32_MAP.prototype.loaded = function(map) {
        this.map = map;
        $(window).trigger('mapLoaded');
    };
    
    M32_MAP.prototype.init = function() {
        var lang = ($('html').attr('dir') == 'rtl') ? 'ar' : 'en';
        var script = document.createElement('script'),
            url = 'https://maps.googleapis.com/maps/api/js?libraries=places,geometry&v=3&key=AIzaSyC0KWP8MLqjGQbX8E3PK16snZabeB_E_x4&language=' + lang;
        script.type = 'text/javascript';
        script.src = url +
            '&callback=initializeGMap';
        document.body.appendChild(script);
    };

    window.initializeGMap = function initializeGMap() {
        var mapDiv = document.getElementById('map'),
        	latlng = JSON.parse($('.m88-dashboard-map').attr('data-coord'));

        window.map = new google.maps.Map(mapDiv, {
            center: new google.maps.LatLng(latlng.lat, latlng.lng),
            zoom: 15,
            mapTypeId: google.maps.MapTypeId.ROADMAP,
            navigationControl: true,
            navigationControlOptions: {
                style: google.maps.NavigationControlStyle.SMALL
            },
            mapTypeControl: false,
            streetViewControl: false
        });

        var myLatLng = { lat: latlng.lat, lng: latlng.lng };

        var service = new google.maps.places.PlacesService(map);

        var pin = new google.maps.Marker({
            map: window.map,
            position: myLatLng,
            icon: '/images/dewa-pin-_servicecenters.png'
        });

        google.maps.event.addDomListener(window, 'resize', function() {
            map.setCenter(myLatLng);
        });

        window.MAP.loaded(map);
    };

    return M32_MAP;
});

define('../src/sublayouts/m89-donut-chart/m89-donut-chart',['jquery','lib/utils', 'chart-config'], function($,utils) {

    'use strict';

    var DashboardComponent = function($component) {

        this.$component = $component;

        return this;
    };

    DashboardComponent.prototype.init = function() {

        var chartData = this.$component.data('chart-data'),
            tooltip = this.$component.data('tiptext'),
            lang = $('html').attr('dir'),
            align = ($('html').attr('dir') == 'rtl') ? 'right' : 'left';

        var data = []

        $.each(chartData,function(index,value){

            var newData = {
                name: value.title,
                y: value.value,
                time: value.time,
                color: value.color
            }
            data.push(newData)
        })


        this.$chartContainer = this.$component.find('[data-chart-container]');

            var distance = 1;
        if (utils.breakpoint() === 's' || utils.breakpoint() === 'm') {
               var distance = 0;
            }

        var opts = {
            chart : {
                plotBorderWidth: null,
                plotShadow: false
            },
            title : {
                text: '' 
            },
            tooltip : {
                style:{textAlign:align,direction:lang},
                pointFormat: tooltip +'<b style="direction:ltr; display:inline-block">{point.percentage:.1f}%</b>',
                useHTML: true
            },
            plotOptions : {
                pie: {
                    shadow: false,
                    center: ['50%', '50%'],
                    size:'60%',
                    startAngle: -40,
                    innerSize: '55%'            
                },
                series: {
                    dataLabels: {
                        enabled: true,
                        useHTML: true,
                        alignTo: 'plotEdges',
                        connectorShape: 'straight',
                        distance: 0,
                        itemStyle: {
                            color: '#222222',
                            fontWeight: 'normal',
                            fontSize: '13px'
                        },
                        formatter: function() {
                            return ("<span class='datalabel' style='color:"+this.color+"'>" + this.y+"%</span><span class='dataname'>" + this.point.name +"</span><span class='datatime'>" + this.point.time +"</span>");
                        }
                    }
                }
            },
            series : [{
                type: 'pie',
                name: 'Browser share',
                data: data
            }]
        };

        this.$chartContainer.highcharts(opts);


    }





    return DashboardComponent;

});

/* homemodule */
define('../src/sublayouts/m9-new-teaser/m9-new-teaser',['jquery', 'tooltipster'], function ($, tooltipster) {

	'use strict';

	var M9_TEASER = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M9_TEASER.prototype.init = function () {
		var _this= this;
		

		$('.m9-teaser .teaser__title').each(function(){
			//if ($(this).height) {};
			$(this).hover(function(){
				$(this).addClass('teaser__title--active');
			},function(){
				$(this).removeClass('teaser__title--active');
			})
		});


		this.$component.find('.m9-teaser-image').each(function() {
			var text = $(this).attr('data-alt');

			$(this).tooltipster({
				content: text,
				maxWidth: 250,
					arrow: false
			});
		});
	};

	return M9_TEASER;
});

/* homemodule */
define('../src/sublayouts/m9-teaser/m9-teaser',['jquery', 'tooltipster'], function ($, tooltipster) {

	'use strict';

	var M9_TEASER = function ($component) {

		this.$component = $component;

		return this;
	};

	/**
	 * Initialise component
	 */

	M9_TEASER.prototype.init = function () {
		var _this= this;
		

		$('.m9-teaser .teaser__title').each(function(){
			//if ($(this).height) {};
			$(this).hover(function(){
				$(this).addClass('teaser__title--active');
			},function(){
				$(this).removeClass('teaser__title--active');
			})
		});


		this.$component.find('.m9-teaser-image').each(function() {
			var text = $(this).attr('data-alt');

			$(this).tooltipster({
				content: text,
				maxWidth: 250,
					arrow: false
			});
		});
	};

	return M9_TEASER;
});

define('../src/sublayouts/m93-tabs-content/m93-tabs-content',['jquery', 'breakpoint', 'lib/utils'], function($, breakpoint, utils) {

    'use strict';

    /**
     * This module only effects Tabs on desktop. Mobile view uses the toggle helper.
     */

    var Tabs = function($component) {

        this.$component = $component;

        return this;
    };

    Tabs.prototype.init = function() {

        // cache dom els
        this.$tabs = this.$component.find('[data-m93-tabs-content-tab="true"]');
        this.$tabsMenu = this.$component.find('[data-m93-tabs-content-menu="true"]');
        this.$content = this.$component.find('[data-m93-tabs-content-content="true"]');
        this.$selected = this.$component.data('selected-tab-id');
        this.selectedTabID = utils.getParameterByName('faq');
        // id param makes more sense but keep above for backward compatibility
        if (this.selectedTabID === '') this.selectedTabID = utils.getParameterByName('id');

        // props

        this.activeTabsClass = 'm93-tabs-content__tab--active';
        this.activeContentClass = 'm93-tabs-content__content--active';

        this.$selectedTab = this.$tabs.eq(0);

        if (this.selectedTabID !== '') {

            this.$selectedTab = this.$component.find('#' + this.selectedTabID);
            if (this.$selectedTab[0] === undefined) this.$selectedTab = this.$tabs.eq(0);

        }

        this.setUpDesktopView();


        //expand listener
        $('.m93-tabs-content__tab').on('click', function() {
            if ($(this).hasClass('icon-close')) {
                $(this).next('.m93-panel-container').addClass('ul--m93-active');
                $(this).removeClass('icon-close');
                $(this).addClass('icon-open');
            } else if ($(this).hasClass('icon-open')) {
                $(this).next('.m93-panel-container').removeClass('ul--m93-active');
                $(this).removeClass('icon-open');
                $(this).addClass('icon-close');
            } else {
                $('.m93-tabs-content__tab').next('ul').removeClass('ul--m93-active');
                $('.m93-tabs-content__tab').each(function() {
                    if ($(this).hasClass('icon-open')) {
                        $(this).removeClass('icon-open');
                        $(this).addClass('icon-close');
                    } else {}
                });
            }
        });

    };



    Tabs.prototype.setUpDesktopView = function() {

        var self = this,
            _this = this;

        //this.$tabsMenu.show();
        if (this.$component.attr('m93isLink') != 'true') {
            this.$tabs.on('click', function(e) {

                e.preventDefault();
                self.displayTab($(this));

            });

            this.displayTab(this.$selectedTab);

            $('#' + _this.$selected).click();
        };

    };

    

    Tabs.prototype.displayTab = function($tab) {

        this.$tabs.removeClass(this.activeTabsClass).attr('aria-selected', false);

        $tab.addClass(this.activeTabsClass);
        $tab.attr('aria-selected', true);
        this.$content.removeClass(this.activeContentClass);
        this.$content.parent().removeClass('toggle-menu__itemactive');
        $('#' + $tab.attr('aria-controls')).addClass(this.activeContentClass);
        $('#' + $tab.attr('aria-controls')).parent().addClass('toggle-menu__itemactive');
        this.$selectedTab = $tab;


    };

    Tabs.prototype.fixPosition = function() {

        var self = this;

        if (utils.fixedHeader()) {

            $('body').animate({
                scrollTop: self.$component.offset().top - utils.headerBarHeight() - 60

            }, 100);
        }
    };


    Tabs.prototype.reset = function() {

        this.$content.removeClass(this.activeContentClass);
        this.$content.parent().removeClass('toggle-menu__itemactive');
        this.$tabs.removeClass(this.activeTabsClass);
        this.$tabs.off('click');
        this.$component.find('[data-toggle-trigger]').off('click.scroll');
    };

    return Tabs;

});

define('../src/sublayouts/m94-progress-chart/m94-progress-chart',['jquery', 'breakpoint', 'lib/utils', 'chart-config'], function($, breakpoint, utils, Highcharts) {

    'use strict';

    var M94_PROGRESS_CHART = function($component) {

        this.$component = $component;

        return this;
    };

    M94_PROGRESS_CHART.prototype.init = function() {

        
        var textCenter = this.$component.data('progress-text'),
            completed = this.$component.data('completed'),
            color =this.$component.data('completed-color'),
            notCompleted = 100 - completed;




        var gaugeOptions = {
              title: {
                text: ''
              },
              chart: {
                backgroundColor: 'rgba(0,0,0,0)'
                },
              subtitle: {
                text: '<div class="progress-text">'+textCenter+'</div><div class="progress-text-number">'+completed+'%</div>',
                align: "center",
                verticalAlign: "middle",
                style: {
                  "textAlign": "center"
                },
                x: 0,
                y: -2,
                useHTML: true
              },
              series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                  enabled: false
                },
                data: [{
                  y: completed,
                  color: color
                }, {
                  y: notCompleted,
                  color: '#e3e3e3'
                }]
              }]
        };

            this.$component.highcharts(gaugeOptions);
    };




    return M94_PROGRESS_CHART;

});

define( '../src/sublayouts/m97-pod/m97-pod',[ 'jquery', 'lib/utils', 'tooltipster'], function ( $, utils, tooltipster ) {

  'use strict';

  var POD = function ( $component ) {

    this.$component = $component;

    return this;
  };

  POD.prototype.init = function () {
    var _this = this;

    
  };

  return POD;

} );

//# sourceMappingURL=static.js.map;
jQuery.fn.highlight=function(c){function e(b,c){var d=0;if(3==b.nodeType){var a=b.data.toUpperCase().indexOf(c),a=a-(b.data.substr(0,a).toUpperCase().length-b.data.substr(0,a).length);if(0<=a){d=document.createElement("span");d.className="highlight";a=b.splitText(a);a.splitText(c.length);var f=a.cloneNode(!0);d.appendChild(f);a.parentNode.replaceChild(d,a);d=1}}else if(1==b.nodeType&&b.childNodes&&!/(script|style)/i.test(b.tagName))for(a=0;a<b.childNodes.length;++a)a+=e(b.childNodes[a],c);return d} return this.length&&c&&c.length?this.each(function(){e(this,c.toUpperCase())}):this};jQuery.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;with(this.parentNode)replaceChild(this.firstChild,this),normalize()}).end()};;
/*!
 * fancyBox - jQuery Plugin
 * version: 2.1.5 (Fri, 14 Jun 2013)
 * @requires jQuery v1.6 or later
 *
 * Examples at http://fancyapps.com/fancybox/
 * License: www.fancyapps.com/fancybox/#license
 *
 * Copyright 2012 Janis Skarnelis - janis@fancyapps.com
 *
 */

(function (window, document, $, undefined) {
    "use strict";

    var H = $("html"),
		W = $(window),
		D = $(document),
		F = $.fancybox = function () {
		    F.open.apply(this, arguments);
		},
		IE = navigator.userAgent.match(/msie/i),
		didUpdate = null,
		isTouch = document.createTouch !== undefined,

		isQuery = function (obj) {
		    return obj && obj.hasOwnProperty && obj instanceof $;
		},
		isString = function (str) {
		    return str && $.type(str) === "string";
		},
		isPercentage = function (str) {
		    return isString(str) && str.indexOf('%') > 0;
		},
		isScrollable = function (el) {
		    return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight)));
		},
		getScalar = function (orig, dim) {
		    var value = parseInt(orig, 10) || 0;

		    if (dim && isPercentage(orig)) {
		        value = F.getViewport()[dim] / 100 * value;
		    }

		    return Math.ceil(value);
		},
		getValue = function (value, dim) {
		    return getScalar(value, dim) + 'px';
		};

    $.extend(F, {
        // The current version of fancyBox
        version: '2.1.5',

        defaults: {
            padding: 0,
            margin: 5,

            width: '95%',
            height: 500,
            minWidth: 100,
            minHeight: 500,
            maxWidth: 850,
            maxHeight: 500,
            pixelRatio: 1, // Set to 2 for retina display support

            autoSize: true,
            autoHeight: true,
            autoWidth: true,

            autoResize: true,
            autoCenter: !isTouch,
            fitToView: true,
            aspectRatio: false,
            topRatio: 0.5,
            leftRatio: 0.5,

            scrolling: 'auto', // 'auto', 'yes' or 'no'
            wrapCSS: '',

            arrows: true,
            closeBtn: true,
            closeClick: true,
            nextClick: false,
            mouseWheel: false,
            autoPlay: false,
            playSpeed: 3000,
            preload: 3,
            modal: false,
            loop: true,

            ajax: {
                dataType: 'html',
                headers: { 'X-fancyBox': true }
            },
            iframe: {
                scrolling: 'auto',
                preload: true
            },
            swf: {
                wmode: 'transparent',
                allowfullscreen: 'true',
                allowscriptaccess: 'always'
            },

            keys: {
                next: {
                    13: 'left', // enter
                    34: 'up',   // page down
                    39: 'left', // right arrow
                    40: 'up'    // down arrow
                },
                prev: {
                    8: 'right',  // backspace
                    33: 'down',   // page up
                    37: 'right',  // left arrow
                    38: 'down'    // up arrow
                },
                close: [27], // escape key
                play: [32], // space - start/stop slideshow
                toggle: [70]  // letter "f" - toggle fullscreen
            },

            direction: {
                next: 'left',
                prev: 'right'
            },

            scrollOutside: true,

            // Override some properties
            index: 0,
            type: null,
            href: null,
            content: null,
            title: null,

            // HTML templates
            tpl: {
                wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
                image: '<img class="fancybox-image" src="{href}" alt="" />',
                iframe: '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>',
                error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
                closeBtn: '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
                next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
                prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
            },

            // Properties for each animation type
            // Opening fancyBox
            openEffect: 'fade', // 'elastic', 'fade' or 'none'
            openSpeed: 250,
            openEasing: 'swing',
            openOpacity: true,
            openMethod: 'zoomIn',

            // Closing fancyBox
            closeEffect: 'fade', // 'elastic', 'fade' or 'none'
            closeSpeed: 250,
            closeEasing: 'swing',
            closeOpacity: true,
            closeMethod: 'zoomOut',

            // Changing next gallery item
            nextEffect: 'elastic', // 'elastic', 'fade' or 'none'
            nextSpeed: 250,
            nextEasing: 'swing',
            nextMethod: 'changeIn',

            // Changing previous gallery item
            prevEffect: 'elastic', // 'elastic', 'fade' or 'none'
            prevSpeed: 250,
            prevEasing: 'swing',
            prevMethod: 'changeOut',

            // Enable default helpers
            helpers: {
                overlay: true,
                title: true
            },

            // Callbacks
            onCancel: $.noop, // If canceling
            beforeLoad: $.noop, // Before loading
            afterLoad: $.noop, // After loading
            beforeShow: $.noop, // Before changing in current item
            afterShow: $.noop, // After opening
            beforeChange: $.noop, // Before changing gallery item
            beforeClose: $.noop, // Before closing
            afterClose: $.noop  // After closing
        },

        //Current state
        group: {}, // Selected group
        opts: {}, // Group options
        previous: null,  // Previous element
        coming: null,  // Element being loaded
        current: null,  // Currently loaded element
        isActive: false, // Is activated
        isOpen: false, // Is currently open
        isOpened: false, // Have been fully opened at least once

        wrap: null,
        skin: null,
        outer: null,
        inner: null,

        player: {
            timer: null,
            isActive: false
        },

        // Loaders
        ajaxLoad: null,
        imgPreload: null,

        // Some collections
        transitions: {},
        helpers: {},

        /*
		 *	Static methods
		 */

        open: function (group, opts) {
            if (!group) {
                return;
            }

            if (!$.isPlainObject(opts)) {
                opts = {};
            }

            // Close if already active
            if (false === F.close(true)) {
                return;
            }

            // Normalize group
            if (!$.isArray(group)) {
                group = isQuery(group) ? $(group).get() : [group];
            }

            // Recheck if the type of each element is `object` and set content type (image, ajax, etc)
            $.each(group, function (i, element) {
                var obj = {},
					href,
					title,
					content,
					type,
					rez,
					hrefParts,
					selector;

                if ($.type(element) === "object") {
                    // Check if is DOM element
                    if (element.nodeType) {
                        element = $(element);
                    }

                    if (isQuery(element)) {
                        obj = {
                            href: element.data('fancybox-href') || element.attr('href'),
                            title: element.data('fancybox-title') || element.attr('title'),
                            isDom: true,
                            element: element
                        };

                        if ($.metadata) {
                            $.extend(true, obj, element.metadata());
                        }

                    } else {
                        obj = element;
                    }
                }

                href = opts.href || obj.href || (isString(element) ? element : null);
                title = opts.title !== undefined ? opts.title : obj.title || '';

                content = opts.content || obj.content;
                type = content ? 'html' : (opts.type || obj.type);

                if (!type && obj.isDom) {
                    type = element.data('fancybox-type');

                    if (!type) {
                        rez = element.prop('class').match(/fancybox\.(\w+)/);
                        type = rez ? rez[1] : null;
                    }
                }

                if (isString(href)) {
                    // Try to guess the content type
                    if (!type) {
                        if (F.isImage(href)) {
                            type = 'image';

                        } else if (F.isSWF(href)) {
                            type = 'swf';

                        } else if (href.charAt(0) === '#') {
                            type = 'inline';

                        } else if (isString(element)) {
                            type = 'html';
                            content = element;
                        }
                    }

                    // Split url into two pieces with source url and content selector, e.g,
                    // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id"
                    if (type === 'ajax') {
                        hrefParts = href.split(/\s+/, 2);
                        href = hrefParts.shift();
                        selector = hrefParts.shift();
                    }
                }

                if (!content) {
                    if (type === 'inline') {
                        if (href) {
                            content = $(isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href); //strip for ie7

                        } else if (obj.isDom) {
                            content = element;
                        }

                    } else if (type === 'html') {
                        content = href;

                    } else if (!type && !href && obj.isDom) {
                        type = 'inline';
                        content = element;
                    }
                }

                $.extend(obj, {
                    href: href,
                    type: type,
                    content: content,
                    title: title,
                    selector: selector
                });

                group[i] = obj;
            });

            // Extend the defaults
            F.opts = $.extend(true, {}, F.defaults, opts);

            // All options are merged recursive except keys
            if (opts.keys !== undefined) {
                F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false;
            }

            F.group = group;

            return F._start(F.opts.index);
        },

        // Cancel image loading or abort ajax request
        cancel: function () {
            var coming = F.coming;

            if (!coming || false === F.trigger('onCancel')) {
                return;
            }

            F.hideLoading();

            if (F.ajaxLoad) {
                F.ajaxLoad.abort();
            }

            F.ajaxLoad = null;

            if (F.imgPreload) {
                F.imgPreload.onload = F.imgPreload.onerror = null;
            }

            if (coming.wrap) {
                coming.wrap.stop(true, true).trigger('onReset').remove();
            }

            F.coming = null;

            // If the first item has been canceled, then clear everything
            if (!F.current) {
                F._afterZoomOut(coming);
            }
        },

        // Start closing animation if is open; remove immediately if opening/closing
        close: function (event) {
            F.cancel();

            if (false === F.trigger('beforeClose')) {
                return;
            }

            F.unbindEvents();

            if (!F.isActive) {
                return;
            }

            if (!F.isOpen || event === true) {
                $('.fancybox-wrap').stop(true).trigger('onReset').remove();

                F._afterZoomOut();

            } else {
                F.isOpen = F.isOpened = false;
                F.isClosing = true;

                $('.fancybox-item, .fancybox-nav').remove();

                F.wrap.stop(true, true).removeClass('fancybox-opened');

                F.transitions[F.current.closeMethod]();
            }
        },

        // Manage slideshow:
        //   $.fancybox.play(); - toggle slideshow
        //   $.fancybox.play( true ); - start
        //   $.fancybox.play( false ); - stop
        play: function (action) {
            var clear = function () {
                clearTimeout(F.player.timer);
            },
				set = function () {
				    clear();

				    if (F.current && F.player.isActive) {
				        F.player.timer = setTimeout(F.next, F.current.playSpeed);
				    }
				},
				stop = function () {
				    clear();

				    D.unbind('.player');

				    F.player.isActive = false;

				    F.trigger('onPlayEnd');
				},
				start = function () {
				    if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) {
				        F.player.isActive = true;

				        D.bind({
				            'onCancel.player beforeClose.player': stop,
				            'onUpdate.player': set,
				            'beforeLoad.player': clear
				        });

				        set();

				        F.trigger('onPlayStart');
				    }
				};

            if (action === true || (!F.player.isActive && action !== false)) {
                start();
            } else {
                stop();
            }
        },

        // Navigate to next gallery item
        next: function (direction) {
            var current = F.current;

            if (current) {
                if (!isString(direction)) {
                    direction = current.direction.next;
                }

                F.jumpto(current.index + 1, direction, 'next');
            }
        },

        // Navigate to previous gallery item
        prev: function (direction) {
            var current = F.current;

            if (current) {
                if (!isString(direction)) {
                    direction = current.direction.prev;
                }

                F.jumpto(current.index - 1, direction, 'prev');
            }
        },

        // Navigate to gallery item by index
        jumpto: function (index, direction, router) {
            var current = F.current;

            if (!current) {
                return;
            }

            index = getScalar(index);

            F.direction = direction || current.direction[(index >= current.index ? 'next' : 'prev')];
            F.router = router || 'jumpto';

            if (current.loop) {
                if (index < 0) {
                    index = current.group.length + (index % current.group.length);
                }

                index = index % current.group.length;
            }

            if (current.group[index] !== undefined) {
                F.cancel();

                F._start(index);
            }
        },

        // Center inside viewport and toggle position type to fixed or absolute if needed
        reposition: function (e, onlyAbsolute) {
            var current = F.current,
				wrap = current ? current.wrap : null,
				pos;

            if (wrap) {
                pos = F._getPosition(onlyAbsolute);

                if (e && e.type === 'scroll') {
                    delete pos.position;

                    wrap.stop(true, true).animate(pos, 200);

                } else {
                    wrap.css(pos);

                    current.pos = $.extend({}, current.dim, pos);
                }
            }
        },

        update: function (e) {
            var type = (e && e.type),
				anyway = !type || type === 'orientationchange';

            if (anyway) {
                clearTimeout(didUpdate);

                didUpdate = null;
            }

            if (!F.isOpen || didUpdate) {
                return;
            }

            didUpdate = setTimeout(function () {
                var current = F.current;

                if (!current || F.isClosing) {
                    return;
                }

                F.wrap.removeClass('fancybox-tmp');

                if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) {
                    F._setDimension();
                }

                if (!(type === 'scroll' && current.canShrink)) {
                    F.reposition(e);
                }

                F.trigger('onUpdate');

                didUpdate = null;

            }, (anyway && !isTouch ? 0 : 300));
        },

        // Shrink content to fit inside viewport or restore if resized
        toggle: function (action) {
            if (F.isOpen) {
                F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView;

                // Help browser to restore document dimensions
                if (isTouch) {
                    F.wrap.removeAttr('style').addClass('fancybox-tmp');

                    F.trigger('onUpdate');
                }

                F.update();
            }
        },

        hideLoading: function () {
            D.unbind('.loading');

            $('#fancybox-loading').remove();
        },

        showLoading: function () {
            var el, viewport;

            F.hideLoading();

            el = $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body');

            // If user will press the escape-button, the request will be canceled
            D.bind('keydown.loading', function (e) {
                if ((e.which || e.keyCode) === 27) {
                    e.preventDefault();

                    F.cancel();
                }
            });

            if (!F.defaults.fixed) {
                viewport = F.getViewport();

                el.css({
                    position: 'absolute',
                    top: (viewport.h * 0.5) + viewport.y,
                    left: (viewport.w * 0.5) + viewport.x
                });
            }
        },

        getViewport: function () {
            var locked = (F.current && F.current.locked) || false,
				rez = {
				    x: W.scrollLeft(),
				    y: W.scrollTop()
				};

            if (locked) {
                rez.w = locked[0].clientWidth;
                rez.h = locked[0].clientHeight;

            } else {
                // See http://bugs.jquery.com/ticket/6724
                rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width();
                rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height();
            }

            return rez;
        },

        // Unbind the keyboard / clicking actions
        unbindEvents: function () {
            if (F.wrap && isQuery(F.wrap)) {
                F.wrap.unbind('.fb');
            }

            D.unbind('.fb');
            W.unbind('.fb');
        },

        bindEvents: function () {
            var current = F.current,
				keys;

            if (!current) {
                return;
            }

            // Changing document height on iOS devices triggers a 'resize' event,
            // that can change document height... repeating infinitely
            W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update);

            keys = current.keys;

            if (keys) {
                D.bind('keydown.fb', function (e) {
                    var code = e.which || e.keyCode,
						target = e.target || e.srcElement;

                    // Skip esc key if loading, because showLoading will cancel preloading
                    if (code === 27 && F.coming) {
                        return false;
                    }

                    // Ignore key combinations and key events within form elements
                    if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) {
                        $.each(keys, function (i, val) {
                            if (current.group.length > 1 && val[code] !== undefined) {
                                F[i](val[code]);

                                e.preventDefault();
                                return false;
                            }

                            if ($.inArray(code, val) > -1) {
                                F[i]();

                                e.preventDefault();
                                return false;
                            }
                        });
                    }
                });
            }

            if ($.fn.mousewheel && current.mouseWheel) {
                F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) {
                    var target = e.target || null,
						parent = $(target),
						canScroll = false;

                    while (parent.length) {
                        if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) {
                            break;
                        }

                        canScroll = isScrollable(parent[0]);
                        parent = $(parent).parent();
                    }

                    if (delta !== 0 && !canScroll) {
                        if (F.group.length > 1 && !current.canShrink) {
                            if (deltaY > 0 || deltaX > 0) {
                                F.prev(deltaY > 0 ? 'down' : 'left');

                            } else if (deltaY < 0 || deltaX < 0) {
                                F.next(deltaY < 0 ? 'up' : 'right');
                            }

                            e.preventDefault();
                        }
                    }
                });
            }
        },

        trigger: function (event, o) {
            var ret, obj = o || F.coming || F.current;

            if (!obj) {
                return;
            }

            if ($.isFunction(obj[event])) {
                ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1));
            }

            if (ret === false) {
                return false;
            }

            if (obj.helpers) {
                $.each(obj.helpers, function (helper, opts) {
                    if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) {
                        F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj);
                    }
                });
            }

            D.trigger(event);
        },

        isImage: function (str) {
            return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
        },

        isSWF: function (str) {
            return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i);
        },

        _start: function (index) {
            var coming = {},
				obj,
				href,
				type,
				margin,
				padding;

            index = getScalar(index);
            obj = F.group[index] || null;

            if (!obj) {
                return false;
            }

            coming = $.extend(true, {}, F.opts, obj);

            // Convert margin and padding properties to array - top, right, bottom, left
            margin = coming.margin;
            padding = coming.padding;

            if ($.type(margin) === 'number') {
                coming.margin = [margin, margin, margin, margin];
            }

            if ($.type(padding) === 'number') {
                coming.padding = [padding, padding, padding, padding];
            }

            // 'modal' propery is just a shortcut
            if (coming.modal) {
                $.extend(true, coming, {
                    closeBtn: false,
                    closeClick: false,
                    nextClick: false,
                    arrows: false,
                    mouseWheel: false,
                    keys: null,
                    helpers: {
                        overlay: {
                            closeClick: false
                        }
                    }
                });
            }

            // 'autoSize' property is a shortcut, too
            if (coming.autoSize) {
                coming.autoWidth = coming.autoHeight = true;
            }

            if (coming.width === 'auto') {
                coming.autoWidth = true;
            }

            if (coming.height === 'auto') {
                coming.autoHeight = true;
            }

            /*
			 * Add reference to the group, so it`s possible to access from callbacks, example:
			 * afterLoad : function() {
			 *     this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
			 * }
			 */

            coming.group = F.group;
            coming.index = index;

            // Give a chance for callback or helpers to update coming item (type, title, etc)
            F.coming = coming;

            if (false === F.trigger('beforeLoad')) {
                F.coming = null;

                return;
            }

            type = coming.type;
            href = coming.href;

            if (!type) {
                F.coming = null;

                //If we can not determine content type then drop silently or display next/prev item if looping through gallery
                if (F.current && F.router && F.router !== 'jumpto') {
                    F.current.index = index;

                    return F[F.router](F.direction);
                }

                return false;
            }

            F.isActive = true;

            if (type === 'image' || type === 'swf') {
                coming.autoHeight = coming.autoWidth = false;
                coming.scrolling = 'visible';
            }

            if (type === 'image') {
                coming.aspectRatio = true;
            }

            if (type === 'iframe' && isTouch) {
                coming.scrolling = 'scroll';
            }

            // Build the neccessary markup
            coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo(coming.parent || 'body');

            $.extend(coming, {
                skin: $('.fancybox-skin', coming.wrap),
                outer: $('.fancybox-outer', coming.wrap),
                inner: $('.fancybox-inner', coming.wrap)
            });

            $.each(["Top", "Right", "Bottom", "Left"], function (i, v) {
                coming.skin.css('padding' + v, getValue(coming.padding[i]));
            });

            F.trigger('onReady');

            // Check before try to load; 'inline' and 'html' types need content, others - href
            if (type === 'inline' || type === 'html') {
                if (!coming.content || !coming.content.length) {
                    return F._error('content');
                }

            } else if (!href) {
                return F._error('href');
            }

            if (type === 'image') {
                F._loadImage();

            } else if (type === 'ajax') {
                F._loadAjax();

            } else if (type === 'iframe') {
                F._loadIframe();

            } else {
                F._afterLoad();
            }
        },

        _error: function (type) {
            $.extend(F.coming, {
                type: 'html',
                autoWidth: true,
                autoHeight: true,
                minWidth: 0,
                minHeight: 0,
                scrolling: 'no',
                hasError: type,
                content: F.coming.tpl.error
            });

            F._afterLoad();
        },

        _loadImage: function () {
            // Reset preload image so it is later possible to check "complete" property
            var img = F.imgPreload = new Image();

            img.onload = function () {
                this.onload = this.onerror = null;

                F.coming.width = this.width / F.opts.pixelRatio;
                F.coming.height = this.height / F.opts.pixelRatio;

                F._afterLoad();
            };

            img.onerror = function () {
                this.onload = this.onerror = null;

                F._error('image');
            };

            img.src = F.coming.href;

            if (img.complete !== true) {
                F.showLoading();
            }
        },

        _loadAjax: function () {
            var coming = F.coming;

            F.showLoading();

            F.ajaxLoad = $.ajax($.extend({}, coming.ajax, {
                url: coming.href,
                error: function (jqXHR, textStatus) {
                    if (F.coming && textStatus !== 'abort') {
                        F._error('ajax', jqXHR);

                    } else {
                        F.hideLoading();
                    }
                },
                success: function (data, textStatus) {
                    if (textStatus === 'success') {
                        coming.content = data;

                        F._afterLoad();
                    }
                }
            }));
        },

        _loadIframe: function () {
            var coming = F.coming,
				iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime()))
					.attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling)
					.attr('src', coming.href);

            // This helps IE
            $(coming.wrap).bind('onReset', function () {
                try {
                    $(this).find('iframe').hide().attr('src', '//about:blank').end().empty();
                } catch (e) { }
            });

            if (coming.iframe.preload) {
                F.showLoading();

                iframe.one('load', function () {
                    $(this).data('ready', 1);

                    // iOS will lose scrolling if we resize
                    if (!isTouch) {
                        $(this).bind('load.fb', F.update);
                    }

                    // Without this trick:
                    //   - iframe won't scroll on iOS devices
                    //   - IE7 sometimes displays empty iframe
                    $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show();

                    F._afterLoad();
                });
            }

            coming.content = iframe.appendTo(coming.inner);

            if (!coming.iframe.preload) {
                F._afterLoad();
            }
        },

        _preloadImages: function () {
            var group = F.group,
				current = F.current,
				len = group.length,
				cnt = current.preload ? Math.min(current.preload, len - 1) : 0,
				item,
				i;

            for (i = 1; i <= cnt; i += 1) {
                item = group[(current.index + i) % len];

                if (item.type === 'image' && item.href) {
                    new Image().src = item.href;
                }
            }
        },

        _afterLoad: function () {
            var coming = F.coming,
				previous = F.current,
				placeholder = 'fancybox-placeholder',
				current,
				content,
				type,
				scrolling,
				href,
				embed;

            F.hideLoading();

            if (!coming || F.isActive === false) {
                return;
            }

            if (false === F.trigger('afterLoad', coming, previous)) {
                coming.wrap.stop(true).trigger('onReset').remove();

                F.coming = null;

                return;
            }

            if (previous) {
                F.trigger('beforeChange', previous);

                previous.wrap.stop(true).removeClass('fancybox-opened')
					.find('.fancybox-item, .fancybox-nav')
					.remove();
            }

            F.unbindEvents();

            current = coming;
            content = coming.content;
            type = coming.type;
            scrolling = coming.scrolling;

            $.extend(F, {
                wrap: current.wrap,
                skin: current.skin,
                outer: current.outer,
                inner: current.inner,
                current: current,
                previous: previous
            });

            href = current.href;

            switch (type) {
                case 'inline':
                case 'ajax':
                case 'html':
                    if (current.selector) {
                        content = $('<div>').html(content).find(current.selector);

                    } else if (isQuery(content)) {
                        if (!content.data(placeholder)) {
                            content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter(content).hide());
                        }

                        content = content.show().detach();

                        current.wrap.bind('onReset', function () {
                            if ($(this).find(content).length) {
                                content.hide().replaceAll(content.data(placeholder)).data(placeholder, false);
                            }
                        });
                    }
                    break;

                case 'image':
                    content = current.tpl.image.replace('{href}', href);
                    break;

                case 'swf':
                    content = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>';
                    embed = '';

                    $.each(current.swf, function (name, val) {
                        content += '<param name="' + name + '" value="' + val + '"></param>';
                        embed += ' ' + name + '="' + val + '"';
                    });

                    content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>';
                    break;
            }

            if (!(isQuery(content) && content.parent().is(current.inner))) {
                current.inner.append(content);
            }

            // Give a chance for helpers or callbacks to update elements
            F.trigger('beforeShow');

            // Set scrolling before calculating dimensions
            current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling));

            // Set initial dimensions and start position
            F._setDimension();

            F.reposition();

            F.isOpen = false;
            F.coming = null;

            F.bindEvents();

            if (!F.isOpened) {
                $('.fancybox-wrap').not(current.wrap).stop(true).trigger('onReset').remove();

            } else if (previous.prevMethod) {
                F.transitions[previous.prevMethod]();
            }

            F.transitions[F.isOpened ? current.nextMethod : current.openMethod]();

            F._preloadImages();
        },

        _setDimension: function () {
            var viewport = F.getViewport(),
				steps = 0,
				canShrink = false,
				canExpand = false,
				wrap = F.wrap,
				skin = F.skin,
				inner = F.inner,
				current = F.current,
				width = current.width,
				height = current.height,
				minWidth = current.minWidth,
				minHeight = current.minHeight,
				maxWidth = current.maxWidth,
				maxHeight = current.maxHeight,
				scrolling = current.scrolling,
				scrollOut = current.scrollOutside ? current.scrollbarWidth : 0,
				margin = current.margin,
				wMargin = getScalar(margin[1] + margin[3]),
				hMargin = getScalar(margin[0] + margin[2]),
				wPadding,
				hPadding,
				wSpace,
				hSpace,
				origWidth,
				origHeight,
				origMaxWidth,
				origMaxHeight,
				ratio,
				width_,
				height_,
				maxWidth_,
				maxHeight_,
				iframe,
				body;

            // Reset dimensions so we could re-check actual size
            wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp');

            wPadding = getScalar(skin.outerWidth(true) - skin.width());
            hPadding = getScalar(skin.outerHeight(true) - skin.height());

            // Any space between content and viewport (margin, padding, border, title)
            wSpace = wMargin + wPadding;
            hSpace = hMargin + hPadding;

            origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width;
            origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height;

            if (current.type === 'iframe') {
                iframe = current.content;

                if (current.autoHeight && iframe.data('ready') === 1) {
                    try {
                        if (iframe[0].contentWindow.document.location) {
                            inner.width(origWidth).height(9999);

                            body = iframe.contents().find('body');

                            if (scrollOut) {
                                body.css('overflow-x', 'hidden');
                            }

                            origHeight = body.outerHeight(true);
                        }

                    } catch (e) { }
                }

            } else if (current.autoWidth || current.autoHeight) {
                inner.addClass('fancybox-tmp');

                // Set width or height in case we need to calculate only one dimension
                if (!current.autoWidth) {
                    inner.width(origWidth);
                }

                if (!current.autoHeight) {
                    inner.height(origHeight);
                }

                if (current.autoWidth) {
                    origWidth = inner.width();
                }

                if (current.autoHeight) {
                    origHeight = inner.height();
                }

                inner.removeClass('fancybox-tmp');
            }

            width = getScalar(origWidth);
            height = getScalar(origHeight);

            ratio = origWidth / origHeight;

            // Calculations for the content
            minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth);
            maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth);

            minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight);
            maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight);

            // These will be used to determine if wrap can fit in the viewport
            origMaxWidth = maxWidth;
            origMaxHeight = maxHeight;

            if (current.fitToView) {
                maxWidth = Math.min(viewport.w - wSpace, maxWidth);
                maxHeight = Math.min(viewport.h - hSpace, maxHeight);
            }

            maxWidth_ = viewport.w - wMargin;
            maxHeight_ = viewport.h - hMargin;

            if (current.aspectRatio) {
                if (width > maxWidth) {
                    width = maxWidth;
                    height = getScalar(width / ratio);
                }

                if (height > maxHeight) {
                    height = maxHeight;
                    width = getScalar(height * ratio);
                }

                if (width < minWidth) {
                    width = minWidth;
                    height = getScalar(width / ratio);
                }

                if (height < minHeight) {
                    height = minHeight;
                    width = getScalar(height * ratio);
                }

            } else {
                width = Math.max(minWidth, Math.min(width, maxWidth));

                if (current.autoHeight && current.type !== 'iframe') {
                    inner.width(width);

                    height = inner.height();
                }

                height = Math.max(minHeight, Math.min(height, maxHeight));
            }

            // Try to fit inside viewport (including the title)
            if (current.fitToView) {
                inner.width(width).height(height);

                wrap.width(width + wPadding);

                // Real wrap dimensions
                width_ = wrap.width();
                height_ = wrap.height();

                if (current.aspectRatio) {
                    while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) {
                        if (steps++ > 19) {
                            break;
                        }

                        height = Math.max(minHeight, Math.min(maxHeight, height - 10));
                        width = getScalar(height * ratio);

                        if (width < minWidth) {
                            width = minWidth;
                            height = getScalar(width / ratio);
                        }

                        if (width > maxWidth) {
                            width = maxWidth;
                            height = getScalar(width / ratio);
                        }

                        inner.width(width).height(height);

                        wrap.width(width + wPadding);

                        width_ = wrap.width();
                        height_ = wrap.height();
                    }

                } else {
                    width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_)));
                    height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_)));
                }
            }

            if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) {
                width += scrollOut;
            }

            inner.width(width).height(height);

            wrap.width(width + wPadding);

            width_ = wrap.width();
            height_ = wrap.height();

            canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight;
            canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight));

            $.extend(current, {
                dim: {
                    width: getValue(width_),
                    height: getValue(height_)
                },
                origWidth: origWidth,
                origHeight: origHeight,
                canShrink: canShrink,
                canExpand: canExpand,
                wPadding: wPadding,
                hPadding: hPadding,
                wrapSpace: height_ - skin.outerHeight(true),
                skinSpace: skin.height() - height
            });

            if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) {
                inner.height('auto');
            }
        },

        _getPosition: function (onlyAbsolute) {
            var current = F.current,
				viewport = F.getViewport(),
				margin = current.margin,
				width = F.wrap.width() + margin[1] + margin[3],
				height = F.wrap.height() + margin[0] + margin[2],
				rez = {
				    position: 'absolute',
				    top: margin[0],
				    left: margin[3]
				};

            if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) {
                rez.position = 'fixed';

            } else if (!current.locked) {
                rez.top += viewport.y;
                rez.left += viewport.x;
            }

            rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio)));
            rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio)));

            return rez;
        },

        _afterZoomIn: function () {
            var current = F.current;

            if (!current) {
                return;
            }

            F.isOpen = F.isOpened = true;

            F.wrap.css('overflow', 'visible').addClass('fancybox-opened');

            F.update();

            // Assign a click event
            if (current.closeClick || (current.nextClick && F.group.length > 1)) {
                F.inner.css('cursor', 'pointer').bind('click.fb', function (e) {
                    if (!$(e.target).is('a') && !$(e.target).parent().is('a')) {
                        e.preventDefault();

                        F[current.closeClick ? 'close' : 'next']();
                    }
                });
            }

            // Create a close button
            if (current.closeBtn) {
                $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function (e) {
                    e.preventDefault();

                    F.close();
                });
            }

            // Create navigation arrows
            if (current.arrows && F.group.length > 1) {
                if (current.loop || current.index > 0) {
                    $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev);
                }

                if (current.loop || current.index < F.group.length - 1) {
                    $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next);
                }
            }

            F.trigger('afterShow');

            // Stop the slideshow if this is the last item
            if (!current.loop && current.index === current.group.length - 1) {
                F.play(false);

            } else if (F.opts.autoPlay && !F.player.isActive) {
                F.opts.autoPlay = false;

                F.play();
            }
        },

        _afterZoomOut: function (obj) {
            obj = obj || F.current;

            $('.fancybox-wrap').trigger('onReset').remove();

            $.extend(F, {
                group: {},
                opts: {},
                router: false,
                current: null,
                isActive: false,
                isOpened: false,
                isOpen: false,
                isClosing: false,
                wrap: null,
                skin: null,
                outer: null,
                inner: null
            });

            F.trigger('afterClose', obj);
        }
    });

    /*
	 *	Default transitions
	 */

    F.transitions = {
        getOrigPosition: function () {
            var current = F.current,
				element = current.element,
				orig = current.orig,
				pos = {},
				width = 50,
				height = 50,
				hPadding = current.hPadding,
				wPadding = current.wPadding,
				viewport = F.getViewport();

            if (!orig && current.isDom && element.is(':visible')) {
                orig = element.find('img:first');

                if (!orig.length) {
                    orig = element;
                }
            }

            if (isQuery(orig)) {
                pos = orig.offset();

                if (orig.is('img')) {
                    width = orig.outerWidth();
                    height = orig.outerHeight();
                }

            } else {
                pos.top = viewport.y + (viewport.h - height) * current.topRatio;
                pos.left = viewport.x + (viewport.w - width) * current.leftRatio;
            }

            if (F.wrap.css('position') === 'fixed' || current.locked) {
                pos.top -= viewport.y;
                pos.left -= viewport.x;
            }

            pos = {
                top: getValue(pos.top - hPadding * current.topRatio),
                left: getValue(pos.left - wPadding * current.leftRatio),
                width: getValue(width + wPadding),
                height: getValue(height + hPadding)
            };

            return pos;
        },

        step: function (now, fx) {
            var ratio,
				padding,
				value,
				prop = fx.prop,
				current = F.current,
				wrapSpace = current.wrapSpace,
				skinSpace = current.skinSpace;

            if (prop === 'width' || prop === 'height') {
                ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start);

                if (F.isClosing) {
                    ratio = 1 - ratio;
                }

                padding = prop === 'width' ? current.wPadding : current.hPadding;
                value = now - padding;

                F.skin[prop](getScalar(prop === 'width' ? value : value - (wrapSpace * ratio)));
                F.inner[prop](getScalar(prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio)));
            }
        },

        zoomIn: function () {
            var current = F.current,
				startPos = current.pos,
				effect = current.openEffect,
				elastic = effect === 'elastic',
				endPos = $.extend({ opacity: 1 }, startPos);

            // Remove "position" property that breaks older IE
            delete endPos.position;

            if (elastic) {
                startPos = this.getOrigPosition();

                if (current.openOpacity) {
                    startPos.opacity = 0.1;
                }

            } else if (effect === 'fade') {
                startPos.opacity = 0.1;
            }

            F.wrap.css(startPos).animate(endPos, {
                duration: effect === 'none' ? 0 : current.openSpeed,
                easing: current.openEasing,
                step: elastic ? this.step : null,
                complete: F._afterZoomIn
            });
        },

        zoomOut: function () {
            var current = F.current,
				effect = current.closeEffect,
				elastic = effect === 'elastic',
				endPos = { opacity: 0.1 };

            if (elastic) {
                endPos = this.getOrigPosition();

                if (current.closeOpacity) {
                    endPos.opacity = 0.1;
                }
            }

            F.wrap.animate(endPos, {
                duration: effect === 'none' ? 0 : current.closeSpeed,
                easing: current.closeEasing,
                step: elastic ? this.step : null,
                complete: F._afterZoomOut
            });
        },

        changeIn: function () {
            var current = F.current,
				effect = current.nextEffect,
				startPos = current.pos,
				endPos = { opacity: 1 },
				direction = F.direction,
				distance = 200,
				field;

            startPos.opacity = 0.1;

            if (effect === 'elastic') {
                field = direction === 'down' || direction === 'up' ? 'top' : 'left';

                if (direction === 'down' || direction === 'right') {
                    startPos[field] = getValue(getScalar(startPos[field]) - distance);
                    endPos[field] = '+=' + distance + 'px';

                } else {
                    startPos[field] = getValue(getScalar(startPos[field]) + distance);
                    endPos[field] = '-=' + distance + 'px';
                }
            }

            // Workaround for http://bugs.jquery.com/ticket/12273
            if (effect === 'none') {
                F._afterZoomIn();

            } else {
                F.wrap.css(startPos).animate(endPos, {
                    duration: current.nextSpeed,
                    easing: current.nextEasing,
                    complete: F._afterZoomIn
                });
            }
        },

        changeOut: function () {
            var previous = F.previous,
				effect = previous.prevEffect,
				endPos = { opacity: 0.1 },
				direction = F.direction,
				distance = 200;

            if (effect === 'elastic') {
                endPos[direction === 'down' || direction === 'up' ? 'top' : 'left'] = (direction === 'up' || direction === 'left' ? '-' : '+') + '=' + distance + 'px';
            }

            previous.wrap.animate(endPos, {
                duration: effect === 'none' ? 0 : previous.prevSpeed,
                easing: previous.prevEasing,
                complete: function () {
                    $(this).trigger('onReset').remove();
                }
            });
        }
    };

    /*
	 *	Overlay helper
	 */

    F.helpers.overlay = {
        defaults: {
            closeClick: true,      // if true, fancyBox will be closed when user clicks on the overlay
            speedOut: 200,       // duration of fadeOut animation
            showEarly: true,      // indicates if should be opened immediately or wait until the content is ready
            css: {},        // custom CSS properties
            locked: !isTouch,  // if true, the content will be locked into overlay
            fixed: true       // if false, the overlay CSS position property will not be set to "fixed"
        },

        overlay: null,      // current handle
        fixed: false,     // indicates if the overlay has position "fixed"
        el: $('html'), // element that contains "the lock"

        // Public methods
        create: function (opts) {
            opts = $.extend({}, this.defaults, opts);

            if (this.overlay) {
                this.close();
            }

            this.overlay = $('<div class="fancybox-overlay"></div>').appendTo(F.coming ? F.coming.parent : opts.parent);
            this.fixed = false;

            if (opts.fixed && F.defaults.fixed) {
                this.overlay.addClass('fancybox-overlay-fixed');

                this.fixed = true;
            }
        },

        open: function (opts) {
            var that = this;

            opts = $.extend({}, this.defaults, opts);

            if (this.overlay) {
                this.overlay.unbind('.overlay').width('auto').height('auto');

            } else {
                this.create(opts);
            }

            if (!this.fixed) {
                W.bind('resize.overlay', $.proxy(this.update, this));

                this.update();
            }

            if (opts.closeClick) {
                this.overlay.bind('click.overlay', function (e) {
                    if ($(e.target).hasClass('fancybox-overlay')) {
                        if (F.isActive) {
                            F.close();
                        } else {
                            that.close();
                        }

                        return false;
                    }
                });
            }

            this.overlay.css(opts.css).show();
        },

        close: function () {
            var scrollV, scrollH;

            W.unbind('resize.overlay');

            if (this.el.hasClass('fancybox-lock')) {
                $('.fancybox-margin').removeClass('fancybox-margin');

                scrollV = W.scrollTop();
                scrollH = W.scrollLeft();

                this.el.removeClass('fancybox-lock');

                W.scrollTop(scrollV).scrollLeft(scrollH);
            }

            $('.fancybox-overlay').remove().hide();

            $.extend(this, {
                overlay: null,
                fixed: false
            });
        },

        // Private, callbacks

        update: function () {
            var width = '100%', offsetWidth;

            // Reset width/height so it will not mess
            this.overlay.width(width).height('100%');

            // jQuery does not return reliable result for IE
            if (IE) {
                offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);

                if (D.width() > offsetWidth) {
                    width = D.width();
                }

            } else if (D.width() > W.width()) {
                width = D.width();
            }

            this.overlay.width(width).height(D.height());
        },

        // This is where we can manipulate DOM, because later it would cause iframes to reload
        onReady: function (opts, obj) {
            var overlay = this.overlay;

            $('.fancybox-overlay').stop(true, true);

            if (!overlay) {
                this.create(opts);
            }

            if (opts.locked && this.fixed && obj.fixed) {
                if (!overlay) {
                    this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false;
                }

                obj.locked = this.overlay.append(obj.wrap);
                obj.fixed = false;
            }

            if (opts.showEarly === true) {
                this.beforeShow.apply(this, arguments);
            }
        },

        beforeShow: function (opts, obj) {
            var scrollV, scrollH;

            if (obj.locked) {
                if (this.margin !== false) {
                    $('*').filter(function () {
                        return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap"));
                    }).addClass('fancybox-margin');

                    this.el.addClass('fancybox-margin');
                }

                scrollV = W.scrollTop();
                scrollH = W.scrollLeft();

                this.el.addClass('fancybox-lock');

                W.scrollTop(scrollV).scrollLeft(scrollH);
            }

            this.open(opts);
        },

        onUpdate: function () {
            if (!this.fixed) {
                this.update();
            }
        },

        afterClose: function (opts) {
            // Remove overlay if exists and fancyBox is not opening
            // (e.g., it is not being open using afterClose callback)
            //if (this.overlay && !F.isActive) {
            if (this.overlay && !F.coming) {
                this.overlay.fadeOut(opts.speedOut, $.proxy(this.close, this));
            }
        }
    };

    /*
	 *	Title helper
	 */

    F.helpers.title = {
        defaults: {
            type: 'float', // 'float', 'inside', 'outside' or 'over',
            position: 'bottom' // 'top' or 'bottom'
        },

        beforeShow: function (opts) {
            var current = F.current,
				text = current.title,
				type = opts.type,
				title,
				target;

            if ($.isFunction(text)) {
                text = text.call(current.element, current);
            }

            if (!isString(text) || $.trim(text) === '') {
                return;
            }

            title = $('<div class="fancybox-title fancybox-title-' + type + '-wrap">' + text + '</div>');

            switch (type) {
                case 'inside':
                    target = F.skin;
                    break;

                case 'outside':
                    target = F.wrap;
                    break;

                case 'over':
                    target = F.inner;
                    break;

                default: // 'float'
                    target = F.skin;

                    title.appendTo('body');

                    if (IE) {
                        title.width(title.width());
                    }

                    title.wrapInner('<span class="child"></span>');

                    //Increase bottom margin so this title will also fit into viewport
                    F.current.margin[2] += Math.abs(getScalar(title.css('margin-bottom')));
                    break;
            }

            title[(opts.position === 'top' ? 'prependTo' : 'appendTo')](target);
        }
    };

    // jQuery plugin initialization
    $.fn.fancybox = function (options) {
        var index,
			that = $(this),
			selector = this.selector || '',
			run = function (e) {
			    var what = $(this).blur(), idx = index, relType, relVal;

			    if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) {
			        relType = options.groupAttr || 'data-fancybox-group';
			        relVal = what.attr(relType);

			        if (!relVal) {
			            relType = 'rel';
			            relVal = what.get(0)[relType];
			        }

			        if (relVal && relVal !== '' && relVal !== 'nofollow') {
			            what = selector.length ? $(selector) : that;
			            what = what.filter('[' + relType + '="' + relVal + '"]');
			            idx = what.index(this);
			        }

			        options.index = idx;

			        // Stop an event from bubbling if everything is fine
			        if (F.open(what, options) !== false) {
			            e.preventDefault();
			        }
			    }
			};

        options = options || {};
        index = options.index || 0;

        if (!selector || options.live === false) {
            that.unbind('click.fb-start').bind('click.fb-start', run);

        } else {
            D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run);
        }

        this.filter('[data-fancybox-start=1]').trigger('click');

        return this;
    };

    // Tests that need a body at doc ready
    D.ready(function () {
        var w1, w2;

        if ($.scrollbarWidth === undefined) {
            // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth
            $.scrollbarWidth = function () {
                var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'),
					child = parent.children(),
					width = child.innerWidth() - child.height(99).innerWidth();

                parent.remove();

                return width;
            };
        }

        if ($.support.fixedPosition === undefined) {
            $.support.fixedPosition = (function () {
                var elem = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'),
					fixed = (elem[0].offsetTop === 20 || elem[0].offsetTop === 15);

                elem.remove();

                return fixed;
            }());
        }

        $.extend(F.defaults, {
            scrollbarWidth: $.scrollbarWidth(),
            fixed: $.support.fixedPosition,
            parent: $('body')
        });

        //Get real width of page scroll-bar
        w1 = $(window).width();

        H.addClass('fancybox-lock-test');

        w2 = $(window).width();

        H.removeClass('fancybox-lock-test');

        $("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head");
    });

}(window, document, jQuery));;
// Via: http://stackoverflow.com/questions/21784134/add-or-update-query-string-parameter-url-remains-unchanged
function UpdateQueryString(key, value, url) {
    //this flag is to check if you want to change the current page url
    //var iscurrentpage = false;
    //if (!url) {
    //	url = window.location.href;
    //	iscurrentpage = true;
    //}
    var re = new RegExp("([?&])" + key + "=.*?(&|#|$)(.*)", "gi");

    //this variable would be used as the result for this function
    var result = null;

    if (re.test(url)) {
        if (typeof value !== 'undefined' && value !== null) result = url.replace(re, '$1' + key + "=" + value + '$2$3');
        else {
            var hash = url.split('#');
            url = hash[0].replace(re, '$1$3').replace(/(&|\?)$/, '');
            if (typeof hash[1] !== 'undefined' && hash[1] !== null) url += '#' + hash[1];
            result = url;
        }
    } else {
        if (typeof value !== 'undefined' && value !== null) {
            var separator = url.indexOf('?') !== -1 ? '&' : '?',
                hash = url.split('#');
            url = hash[0] + separator + key + '=' + value;
            if (typeof hash[1] !== 'undefined' && hash[1] !== null) url += '#' + hash[1];
            result = url;
        } else result = url;
    }
    //if this is current page update the current page url
    //if (iscurrentpage) window.location.href = result;
    return result;
}

function ajaxifiedForm($form) {
    var type = $form.attr('method');
    var url = $form.attr('action');
    var data = $form.serialize();
    return jQuery.ajax({ type: type, url: url, data: data });
}

function timeAgo(date) {
    var now = new Date();
    var utc = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds());
    var difference = utc - date;
    var seconds = parseInt(difference / 1000);
    var minutes = parseInt(seconds / 60);
    var hours = parseInt(minutes / 60);
    var days = parseInt(hours / 24);
    if (days > 0) return days + " days ago";
    if (hours > 0) return hours + "h ago";
    if (minutes > 0) return minutes + "min ago";
    if (seconds > 0) return seconds + "s ago";
    return "Just now";
}

window.ParsleyConfig = {
    validators: {
        cannotbebeforetoday: {
            fn: function (value, requirements) {
                if (value == '')
                    return true;
                var now = new Date();
                var today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
                return Date.parse(value) >= today;
            },
            priority: 32
        },
        cannotbeafterthreemonth: {
            fn: function (value, requirements) {
                if (value == '')
                    return true;
                var now = new Date();
                var futureMonth = new Date(now.getFullYear(), now.getMonth() + 3, now.getDate());
                return futureMonth >= Date.parse(value);
            },
            priority: 32
        },
        mustbetchecked: {
            fn: function (value, requirements) {
                return requirements.$element.is(':checked');
            },
            priority: 32
        }
    }
};

AddForgeryToken = function (data, formid) {
    data.__RequestVerificationToken = $('#' + formid + ' input[name=__RequestVerificationToken]').val();
    return data;
};
GoogleRecaptchaCallback = function (containerid, textvalue) {
    var v = grecaptcha.getResponse();
    if (v.length == 0) {
        jQuery('#' + containerid).text(textvalue);
        return false;
    }
    else {
        jQuery('#' + containerid).text("");
        return true;
    }
};
function steptrackerwithinpage(total, current, txt, info) {
    $('.m38-step-tracker').attr('data-total-steps', total);
    $('.m38-step-tracker').attr('data-current-step', current);
    $('.m38-step-tracker__progressbar').attr('aria-valuetext', txt);
    $('.m38-step-tracker').attr('data-hasInfo', info);

    jQuery(window).trigger('reinit_m38');
}
function removeSpaces(string) {
    return string.split(' ').join('');
}
Icadetails = function (eid, eidexp, pcat, pcode, pno, psrc, ica, beforesendfunc, completefunc, successfunc, errorfunc) {
    var url = "/api/ICAUserDetails/get/";
    jQuery.ajax({
        type: 'GET',
        url: url,
        beforeSend: beforesendfunc,
        data: {
            eid: eid,
            eidexp: eidexp,
            pcat: pcat,
            pcode: pcode,
            pno: pno,
            psrc: psrc,
            ica: ica
        },
        complete: completefunc,
        dataType: 'json',
        method: 'GET',
        async: true,
        success: function (response) {
            successfunc(response);
        }, error: function (response) {
            errorfunc();
        }
    });
}

jQuery(function (n) { function i(i) { i.preventDefault(); var o = n("#hiform"); o.submit() } n(".fancybox").fancybox(),n(".fancybox2").fancybox({ wrapCSS:'o4fancybox' }), n("#hitrigger").on("click", i), n(".non_arabic_link").on("click", function (i) { return n(i.id).is("#modal2") || (n(".dewa_noar").trigger("click"), window.setTimeout(function () { window.location.href = i.target }, 3e3)), !1 }) });
var lang = jQuery('html').attr('dir') == 'ltr' ? 'en' : 'ar';
moment.locale(lang);
window.attachSpinner = function (el, options) {
    var defaults = {
        zIndex: 0,
        minHeight: 300,
        bgColor: 'transparent',
        bgPosition: 'center center',
        opacity: 1
    };
    var opts = jQuery.extend(defaults, options);
    if (typeof el === 'string') {
        el = jQuery(el);
    }
    jQuery(el).animate({ minHeight: opts.minHeight }, {
        duration: 0, // iPad Mini cannot handle the CPU intesiveness of animation. Disabling for the time-being.
        complete: function () {
            var $el = jQuery(this);
            var $overlay = jQuery(document.createElement('div'))
                .addClass('ajax-loader-overlay')
                .css({
                    padding: $el.css('padding'),
                    width: $el.width(),
                    height: $el.height(),
                    minWidth: $el.css('min-width'),
                    minHeight: $el.css('min-height'),
                    zIndex: opts.zIndex,
                    backgroundColor: opts.bgColor,
                    backgroundPosition: opts.bgPosition
                })
                .fadeTo(0, opts.opacity);
            $el.append($overlay);
        }
    });
};
window.detachSpinner = function (el) {
    if (typeof el === 'string') {
        el = document.getElementById(el.replace('#', ''));
    }
    jQuery(el).animate({ minHeight: 0 }, {
        duration: 0 // iPad Mini cannot handle the CPU intesiveness of animation. Disabling for the time-being.
    }).find('.ajax-loader-overlay').remove();
};
;(function (window, $, undefined) { ;(function () {
    var VERSION = '2.2.3',
        pluginName = 'datepicker',
        autoInitSelector = '.datepicker-here',
        $body, $datepickersContainer,
        containerBuilt = false,
        baseTemplate = '' +
            '<div class="datepicker">' +
            '<i class="datepicker--pointer"></i>' +
            '<nav class="datepicker--nav"></nav>' +
            '<div class="datepicker--content"></div>' +
            '</div>',
        defaults = {
            classes: '',
            inline: false,
            language: 'ru',
            startDate: new Date(),
            firstDay: '',
            weekends: [6, 0],
            dateFormat: '',
            altField: '',
            altFieldDateFormat: '@',
            toggleSelected: true,
            keyboardNav: true,

            position: 'bottom left',
            offset: 12,

            view: 'days',
            minView: 'days',

            showOtherMonths: true,
            selectOtherMonths: true,
            moveToOtherMonthsOnSelect: true,

            showOtherYears: true,
            selectOtherYears: true,
            moveToOtherYearsOnSelect: true,

            minDate: '',
            maxDate: '',
            disableNavWhenOutOfRange: true,

            multipleDates: false, // Boolean or Number
            multipleDatesSeparator: ',',
            range: false,

            todayButton: false,
            clearButton: false,

            showEvent: 'focus',
            autoClose: false,

            // navigation
            monthsField: 'monthsShort',
            prevHtml: '<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',
            nextHtml: '<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',
            navTitles: {
                days: 'MM, <i>yyyy</i>',
                months: 'yyyy',
                years: 'yyyy1 - yyyy2'
            },

            // timepicker
            timepicker: false,
            onlyTimepicker: false,
            dateTimeSeparator: ' ',
            timeFormat: '',
            minHours: 0,
            maxHours: 24,
            minMinutes: 0,
            maxMinutes: 59,
            hoursStep: 1,
            minutesStep: 1,

            // events
            onSelect: '',
            onShow: '',
            onHide: '',
            onChangeMonth: '',
            onChangeYear: '',
            onChangeDecade: '',
            onChangeView: '',
            onRenderCell: ''
        },
        hotKeys = {
            'ctrlRight': [17, 39],
            'ctrlUp': [17, 38],
            'ctrlLeft': [17, 37],
            'ctrlDown': [17, 40],
            'shiftRight': [16, 39],
            'shiftUp': [16, 38],
            'shiftLeft': [16, 37],
            'shiftDown': [16, 40],
            'altUp': [18, 38],
            'altRight': [18, 39],
            'altLeft': [18, 37],
            'altDown': [18, 40],
            'ctrlShiftUp': [16, 17, 38]
        },
        datepicker;

    var Datepicker  = function (el, options) {
        this.el = el;
        this.$el = $(el);

        this.opts = $.extend(true, {}, defaults, options, this.$el.data());

        if ($body == undefined) {
            $body = $('body');
        }

        if (!this.opts.startDate) {
            this.opts.startDate = new Date();
        }

        if (this.el.nodeName == 'INPUT') {
            this.elIsInput = true;
        }

        if (this.opts.altField) {
            this.$altField = typeof this.opts.altField == 'string' ? $(this.opts.altField) : this.opts.altField;
        }

        this.inited = false;
        this.visible = false;
        this.silent = false; // Need to prevent unnecessary rendering

        this.currentDate = this.opts.startDate;
        this.currentView = this.opts.view;
        this._createShortCuts();
        this.selectedDates = [];
        this.views = {};
        this.keys = [];
        this.minRange = '';
        this.maxRange = '';
        this._prevOnSelectValue = '';

        this.init()
    };

    datepicker = Datepicker;

    datepicker.prototype = {
        VERSION: VERSION,
        viewIndexes: ['days', 'months', 'years'],

        init: function () {
            if (!containerBuilt && !this.opts.inline && this.elIsInput) {
                this._buildDatepickersContainer();
            }
            this._buildBaseHtml();
            this._defineLocale(this.opts.language);
            this._syncWithMinMaxDates();

            if (this.elIsInput) {
                if (!this.opts.inline) {
                    // Set extra classes for proper transitions
                    this._setPositionClasses(this.opts.position);
                    this._bindEvents()
                }
                if (this.opts.keyboardNav && !this.opts.onlyTimepicker) {
                    this._bindKeyboardEvents();
                }
                this.$datepicker.on('mousedown', this._onMouseDownDatepicker.bind(this));
                this.$datepicker.on('mouseup', this._onMouseUpDatepicker.bind(this));
            }

            if (this.opts.classes) {
                this.$datepicker.addClass(this.opts.classes)
            }

            if (this.opts.timepicker) {
                this.timepicker = new $.fn.datepicker.Timepicker(this, this.opts);
                this._bindTimepickerEvents();
            }

            if (this.opts.onlyTimepicker) {
                this.$datepicker.addClass('-only-timepicker-');
            }

            this.views[this.currentView] = new $.fn.datepicker.Body(this, this.currentView, this.opts);
            this.views[this.currentView].show();
            this.nav = new $.fn.datepicker.Navigation(this, this.opts);
            this.view = this.currentView;

            this.$el.on('clickCell.adp', this._onClickCell.bind(this));
            this.$datepicker.on('mouseenter', '.datepicker--cell', this._onMouseEnterCell.bind(this));
            this.$datepicker.on('mouseleave', '.datepicker--cell', this._onMouseLeaveCell.bind(this));

            this.inited = true;
        },

        _createShortCuts: function () {
            this.minDate = this.opts.minDate ? this.opts.minDate : new Date(-8639999913600000);
            this.maxDate = this.opts.maxDate ? this.opts.maxDate : new Date(8639999913600000);
        },

        _bindEvents : function () {
            this.$el.on(this.opts.showEvent + '.adp', this._onShowEvent.bind(this));
            this.$el.on('mouseup.adp', this._onMouseUpEl.bind(this));
            this.$el.on('blur.adp', this._onBlur.bind(this));
            this.$el.on('keyup.adp', this._onKeyUpGeneral.bind(this));
            $(window).on('resize.adp', this._onResize.bind(this));
            $('body').on('mouseup.adp', this._onMouseUpBody.bind(this));
        },

        _bindKeyboardEvents: function () {
            this.$el.on('keydown.adp', this._onKeyDown.bind(this));
            this.$el.on('keyup.adp', this._onKeyUp.bind(this));
            this.$el.on('hotKey.adp', this._onHotKey.bind(this));
        },

        _bindTimepickerEvents: function () {
            this.$el.on('timeChange.adp', this._onTimeChange.bind(this));
        },

        isWeekend: function (day) {
            return this.opts.weekends.indexOf(day) !== -1;
        },

        _defineLocale: function (lang) {
            if (typeof lang == 'string') {
                this.loc = $.fn.datepicker.language[lang];
                if (!this.loc) {
                    console.warn('Can\'t find language "' + lang + '" in Datepicker.language, will use "ru" instead');
                    this.loc = $.extend(true, {}, $.fn.datepicker.language.ru)
                }

                this.loc = $.extend(true, {}, $.fn.datepicker.language.ru, $.fn.datepicker.language[lang])
            } else {
                this.loc = $.extend(true, {}, $.fn.datepicker.language.ru, lang)
            }

            if (this.opts.dateFormat) {
                this.loc.dateFormat = this.opts.dateFormat
            }

            if (this.opts.timeFormat) {
                this.loc.timeFormat = this.opts.timeFormat
            }

            if (this.opts.firstDay !== '') {
                this.loc.firstDay = this.opts.firstDay
            }

            if (this.opts.timepicker) {
                this.loc.dateFormat = [this.loc.dateFormat, this.loc.timeFormat].join(this.opts.dateTimeSeparator);
            }

            if (this.opts.onlyTimepicker) {
                this.loc.dateFormat = this.loc.timeFormat;
            }

            var boundary = this._getWordBoundaryRegExp;
            if (this.loc.timeFormat.match(boundary('aa')) ||
                this.loc.timeFormat.match(boundary('AA'))
            ) {
               this.ampm = true;
            }
        },

        _buildDatepickersContainer: function () {
            containerBuilt = true;
            $body.append('<div class="datepickers-container" id="datepickers-container"></div>');
            $datepickersContainer = $('#datepickers-container');
        },

        _buildBaseHtml: function () {
            var $appendTarget,
                $inline = $('<div class="datepicker-inline">');

            if(this.el.nodeName == 'INPUT') {
                if (!this.opts.inline) {
                    $appendTarget = $datepickersContainer;
                } else {
                    $appendTarget = $inline.insertAfter(this.$el)
                }
            } else {
                $appendTarget = $inline.appendTo(this.$el)
            }

            this.$datepicker = $(baseTemplate).appendTo($appendTarget);
            this.$content = $('.datepicker--content', this.$datepicker);
            this.$nav = $('.datepicker--nav', this.$datepicker);
        },

        _triggerOnChange: function () {
            if (!this.selectedDates.length) {
                // Prevent from triggering multiple onSelect callback with same argument (empty string) in IE10-11
                if (this._prevOnSelectValue === '') return;
                this._prevOnSelectValue = '';
                return this.opts.onSelect('', '', this);
            }

            var selectedDates = this.selectedDates,
                parsedSelected = datepicker.getParsedDate(selectedDates[0]),
                formattedDates,
                _this = this,
                dates = new Date(
                    parsedSelected.year,
                    parsedSelected.month,
                    parsedSelected.date,
                    parsedSelected.hours,
                    parsedSelected.minutes
                );

                formattedDates = selectedDates.map(function (date) {
                    return _this.formatDate(_this.loc.dateFormat, date)
                }).join(this.opts.multipleDatesSeparator);

            // Create new dates array, to separate it from original selectedDates
            if (this.opts.multipleDates || this.opts.range) {
                dates = selectedDates.map(function(date) {
                    var parsedDate = datepicker.getParsedDate(date);
                    return new Date(
                        parsedDate.year,
                        parsedDate.month,
                        parsedDate.date,
                        parsedDate.hours,
                        parsedDate.minutes
                    );
                })
            }

            this._prevOnSelectValue = formattedDates;
            this.opts.onSelect(formattedDates, dates, this);
        },

        next: function () {
            var d = this.parsedDate,
                o = this.opts;
            switch (this.view) {
                case 'days':
                    this.date = new Date(d.year, d.month + 1, 1);
                    if (o.onChangeMonth) o.onChangeMonth(this.parsedDate.month, this.parsedDate.year);
                    break;
                case 'months':
                    this.date = new Date(d.year + 1, d.month, 1);
                    if (o.onChangeYear) o.onChangeYear(this.parsedDate.year);
                    break;
                case 'years':
                    this.date = new Date(d.year + 10, 0, 1);
                    if (o.onChangeDecade) o.onChangeDecade(this.curDecade);
                    break;
            }
        },

        prev: function () {
            var d = this.parsedDate,
                o = this.opts;
            switch (this.view) {
                case 'days':
                    this.date = new Date(d.year, d.month - 1, 1);
                    if (o.onChangeMonth) o.onChangeMonth(this.parsedDate.month, this.parsedDate.year);
                    break;
                case 'months':
                    this.date = new Date(d.year - 1, d.month, 1);
                    if (o.onChangeYear) o.onChangeYear(this.parsedDate.year);
                    break;
                case 'years':
                    this.date = new Date(d.year - 10, 0, 1);
                    if (o.onChangeDecade) o.onChangeDecade(this.curDecade);
                    break;
            }
        },

        formatDate: function (string, date) {
            date = date || this.date;
            var result = string,
                boundary = this._getWordBoundaryRegExp,
                locale = this.loc,
                leadingZero = datepicker.getLeadingZeroNum,
                decade = datepicker.getDecade(date),
                d = datepicker.getParsedDate(date),
                fullHours = d.fullHours,
                hours = d.hours,
                ampm = string.match(boundary('aa')) || string.match(boundary('AA')),
                dayPeriod = 'am',
                replacer = this._replacer,
                validHours;

            if (this.opts.timepicker && this.timepicker && ampm) {
                validHours = this.timepicker._getValidHoursFromDate(date, ampm);
                fullHours = leadingZero(validHours.hours);
                hours = validHours.hours;
                dayPeriod = validHours.dayPeriod;
            }

            switch (true) {
                case /@/.test(result):
                    result = result.replace(/@/, date.getTime());
                case /aa/.test(result):
                    result = replacer(result, boundary('aa'), dayPeriod);
                case /AA/.test(result):
                    result = replacer(result, boundary('AA'), dayPeriod.toUpperCase());
                case /dd/.test(result):
                    result = replacer(result, boundary('dd'), d.fullDate);
                case /d/.test(result):
                    result = replacer(result, boundary('d'), d.date);
                case /DD/.test(result):
                    result = replacer(result, boundary('DD'), locale.days[d.day]);
                case /D/.test(result):
                    result = replacer(result, boundary('D'), locale.daysShort[d.day]);
                case /mm/.test(result):
                    result = replacer(result, boundary('mm'), d.fullMonth);
                case /m/.test(result):
                    result = replacer(result, boundary('m'), d.month + 1);
                case /MM/.test(result):
                    result = replacer(result, boundary('MM'), this.loc.months[d.month]);
                case /M/.test(result):
                    result = replacer(result, boundary('M'), locale.monthsShort[d.month]);
                case /ii/.test(result):
                    result = replacer(result, boundary('ii'), d.fullMinutes);
                case /i/.test(result):
                    result = replacer(result, boundary('i'), d.minutes);
                case /hh/.test(result):
                    result = replacer(result, boundary('hh'), fullHours);
                case /h/.test(result):
                    result = replacer(result, boundary('h'), hours);
                case /yyyy/.test(result):
                    result = replacer(result, boundary('yyyy'), d.year);
                case /yyyy1/.test(result):
                    result = replacer(result, boundary('yyyy1'), decade[0]);
                case /yyyy2/.test(result):
                    result = replacer(result, boundary('yyyy2'), decade[1]);
                case /yy/.test(result):
                    result = replacer(result, boundary('yy'), d.year.toString().slice(-2));
            }

            return result;
        },

        _replacer: function (str, reg, data) {
            return str.replace(reg, function (match, p1,p2,p3) {
                return p1 + data + p3;
            })
        },

        _getWordBoundaryRegExp: function (sign) {
            var symbols = '\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;';

            return new RegExp('(^|>|' + symbols + ')(' + sign + ')($|<|' + symbols + ')', 'g');
        },


        selectDate: function (date) {
            var _this = this,
                opts = _this.opts,
                d = _this.parsedDate,
                selectedDates = _this.selectedDates,
                len = selectedDates.length,
                newDate = '';

            if (Array.isArray(date)) {
                date.forEach(function (d) {
                    _this.selectDate(d)
                });
                return;
            }

            if (!(date instanceof Date)) return;

            this.lastSelectedDate = date;

            // Set new time values from Date
            if (this.timepicker) {
                this.timepicker._setTime(date);
            }

            // On this step timepicker will set valid values in it's instance
            _this._trigger('selectDate', date);

            // Set correct time values after timepicker's validation
            // Prevent from setting hours or minutes which values are lesser then `min` value or
            // greater then `max` value
            if (this.timepicker) {
                date.setHours(this.timepicker.hours);
                date.setMinutes(this.timepicker.minutes)
            }

            if (_this.view == 'days') {
                if (date.getMonth() != d.month && opts.moveToOtherMonthsOnSelect) {
                    newDate = new Date(date.getFullYear(), date.getMonth(), 1);
                }
            }

            if (_this.view == 'years') {
                if (date.getFullYear() != d.year && opts.moveToOtherYearsOnSelect) {
                    newDate = new Date(date.getFullYear(), 0, 1);
                }
            }

            if (newDate) {
                _this.silent = true;
                _this.date = newDate;
                _this.silent = false;
                _this.nav._render()
            }

            if (opts.multipleDates && !opts.range) { // Set priority to range functionality
                if (len === opts.multipleDates) return;
                if (!_this._isSelected(date)) {
                    _this.selectedDates.push(date);
                }
            } else if (opts.range) {
                if (len == 2) {
                    _this.selectedDates = [date];
                    _this.minRange = date;
                    _this.maxRange = '';
                } else if (len == 1) {
                    _this.selectedDates.push(date);
                    if (!_this.maxRange){
                        _this.maxRange = date;
                    } else {
                        _this.minRange = date;
                    }
                    // Swap dates if they were selected via dp.selectDate() and second date was smaller then first
                    if (datepicker.bigger(_this.maxRange, _this.minRange)) {
                        _this.maxRange = _this.minRange;
                        _this.minRange = date;
                    }
                    _this.selectedDates = [_this.minRange, _this.maxRange]

                } else {
                    _this.selectedDates = [date];
                    _this.minRange = date;
                }
            } else {
                _this.selectedDates = [date];
            }

            _this._setInputValue();

            if (opts.onSelect) {
                _this._triggerOnChange();
            }

            if (opts.autoClose && !this.timepickerIsActive) {
                if (!opts.multipleDates && !opts.range) {
                    _this.hide();
                } else if (opts.range && _this.selectedDates.length == 2) {
                    _this.hide();
                }
            }

            _this.views[this.currentView]._render()
        },

        removeDate: function (date) {
            var selected = this.selectedDates,
                _this = this;

            if (!(date instanceof Date)) return;

            return selected.some(function (curDate, i) {
                if (datepicker.isSame(curDate, date)) {
                    selected.splice(i, 1);

                    if (!_this.selectedDates.length) {
                        _this.minRange = '';
                        _this.maxRange = '';
                        _this.lastSelectedDate = '';
                    } else {
                        _this.lastSelectedDate = _this.selectedDates[_this.selectedDates.length - 1];
                    }

                    _this.views[_this.currentView]._render();
                    _this._setInputValue();

                    if (_this.opts.onSelect) {
                        _this._triggerOnChange();
                    }

                    return true
                }
            })
        },

        today: function () {
            this.silent = true;
            this.view = this.opts.minView;
            this.silent = false;
            this.date = new Date();

            if (this.opts.todayButton instanceof Date) {
                this.selectDate(this.opts.todayButton)
            }
        },

        clear: function () {
            this.selectedDates = [];
            this.minRange = '';
            this.maxRange = '';
            this.views[this.currentView]._render();
            this._setInputValue();
            if (this.opts.onSelect) {
                this._triggerOnChange()
            }
        },

        /**
         * Updates datepicker options
         * @param {String|Object} param - parameter's name to update. If object then it will extend current options
         * @param {String|Number|Object} [value] - new param value
         */
        update: function (param, value) {
            var len = arguments.length,
                lastSelectedDate = this.lastSelectedDate;

            if (len == 2) {
                this.opts[param] = value;
            } else if (len == 1 && typeof param == 'object') {
                this.opts = $.extend(true, this.opts, param)
            }

            this._createShortCuts();
            this._syncWithMinMaxDates();
            this._defineLocale(this.opts.language);
            this.nav._addButtonsIfNeed();
            if (!this.opts.onlyTimepicker) this.nav._render();
            this.views[this.currentView]._render();

            if (this.elIsInput && !this.opts.inline) {
                this._setPositionClasses(this.opts.position);
                if (this.visible) {
                    this.setPosition(this.opts.position)
                }
            }

            if (this.opts.classes) {
                this.$datepicker.addClass(this.opts.classes)
            }

            if (this.opts.onlyTimepicker) {
                this.$datepicker.addClass('-only-timepicker-');
            }

            if (this.opts.timepicker) {
                if (lastSelectedDate) this.timepicker._handleDate(lastSelectedDate);
                this.timepicker._updateRanges();
                this.timepicker._updateCurrentTime();
                // Change hours and minutes if it's values have been changed through min/max hours/minutes
                if (lastSelectedDate) {
                    lastSelectedDate.setHours(this.timepicker.hours);
                    lastSelectedDate.setMinutes(this.timepicker.minutes);
                }
            }

            this._setInputValue();

            return this;
        },

        _syncWithMinMaxDates: function () {
            var curTime = this.date.getTime();
            this.silent = true;
            if (this.minTime > curTime) {
                this.date = this.minDate;
            }

            if (this.maxTime < curTime) {
                this.date = this.maxDate;
            }
            this.silent = false;
        },

        _isSelected: function (checkDate, cellType) {
            var res = false;
            this.selectedDates.some(function (date) {
                if (datepicker.isSame(date, checkDate, cellType)) {
                    res = date;
                    return true;
                }
            });
            return res;
        },

        _setInputValue: function () {
            var _this = this,
                opts = _this.opts,
                format = _this.loc.dateFormat,
                altFormat = opts.altFieldDateFormat,
                value = _this.selectedDates.map(function (date) {
                    return _this.formatDate(format, date)
                }),
                altValues;

            if (opts.altField && _this.$altField.length) {
                altValues = this.selectedDates.map(function (date) {
                    return _this.formatDate(altFormat, date)
                });
                altValues = altValues.join(this.opts.multipleDatesSeparator);
                this.$altField.val(altValues);
            }

            value = value.join(this.opts.multipleDatesSeparator);

            this.$el.val(value)
        },

        /**
         * Check if date is between minDate and maxDate
         * @param date {object} - date object
         * @param type {string} - cell type
         * @returns {boolean}
         * @private
         */
        _isInRange: function (date, type) {
            var time = date.getTime(),
                d = datepicker.getParsedDate(date),
                min = datepicker.getParsedDate(this.minDate),
                max = datepicker.getParsedDate(this.maxDate),
                dMinTime = new Date(d.year, d.month, min.date).getTime(),
                dMaxTime = new Date(d.year, d.month, max.date).getTime(),
                types = {
                    day: time >= this.minTime && time <= this.maxTime,
                    month: dMinTime >= this.minTime && dMaxTime <= this.maxTime,
                    year: d.year >= min.year && d.year <= max.year
                };
            return type ? types[type] : types.day
        },

        _getDimensions: function ($el) {
            var offset = $el.offset();

            return {
                width: $el.outerWidth(),
                height: $el.outerHeight(),
                left: offset.left,
                top: offset.top
            }
        },

        _getDateFromCell: function (cell) {
            var curDate = this.parsedDate,
                year = cell.data('year') || curDate.year,
                month = cell.data('month') == undefined ? curDate.month : cell.data('month'),
                date = cell.data('date') || 1;

            return new Date(year, month, date);
        },

        _setPositionClasses: function (pos) {
            pos = pos.split(' ');
            var main = pos[0],
                sec = pos[1],
                classes = 'datepicker -' + main + '-' + sec + '- -from-' + main + '-';

            if (this.visible) classes += ' active';

            this.$datepicker
                .removeAttr('class')
                .addClass(classes);
        },

        setPosition: function (position) {
            position = position || this.opts.position;

            var dims = this._getDimensions(this.$el),
                selfDims = this._getDimensions(this.$datepicker),
                pos = position.split(' '),
                top, left,
                offset = this.opts.offset,
                main = pos[0],
                secondary = pos[1];

            switch (main) {
                case 'top':
                    top = dims.top - selfDims.height - offset;
                    break;
                case 'right':
                    left = dims.left + dims.width + offset;
                    break;
                case 'bottom':
                    top = dims.top + dims.height + offset;
                    break;
                case 'left':
                    left = dims.left - selfDims.width - offset;
                    break;
            }

            switch(secondary) {
                case 'top':
                    top = dims.top;
                    break;
                case 'right':
                    left = dims.left + dims.width - selfDims.width;
                    break;
                case 'bottom':
                    top = dims.top + dims.height - selfDims.height;
                    break;
                case 'left':
                    left = dims.left;
                    break;
                case 'center':
                    if (/left|right/.test(main)) {
                        top = dims.top + dims.height/2 - selfDims.height/2;
                    } else {
                        left = dims.left + dims.width/2 - selfDims.width/2;
                    }
            }
            if ( $('html').attr('dir') == 'rtl' ) {
                this.$datepicker
                    .css({
                        left: left,
                        top: top,
                        right: 'auto'
                    })
            } else {
                this.$datepicker
                    .css({
                        left: left,
                        top: top
                    })   
            }
        },

        show: function () {
            var onShow = this.opts.onShow;

            this.setPosition(this.opts.position);
            this.$datepicker.addClass('active');
            this.visible = true;

            if (onShow) {
                this._bindVisionEvents(onShow)
            }
        },

        hide: function () {
            var onHide = this.opts.onHide;

            if ( $('html').attr('dir') == 'rtl' ) {
            this.$datepicker
                .removeClass('active')
                .css({
                    right: '-100000px'
                });
            } else {
            this.$datepicker
                .removeClass('active')
                .css({
                    left: '-100000px'
                });
            }

            this.focused = '';
            this.keys = [];

            this.inFocus = false;
            this.visible = false;
            this.$el.blur();

            if (onHide) {
                this._bindVisionEvents(onHide)
            }
        },

        down: function (date) {
            this._changeView(date, 'down');
        },

        up: function (date) {
            this._changeView(date, 'up');
        },

        _bindVisionEvents: function (event) {
            this.$datepicker.off('transitionend.dp');
            event(this, false);
            this.$datepicker.one('transitionend.dp', event.bind(this, this, true))
        },

        _changeView: function (date, dir) {
            date = date || this.focused || this.date;

            var nextView = dir == 'up' ? this.viewIndex + 1 : this.viewIndex - 1;
            if (nextView > 2) nextView = 2;
            if (nextView < 0) nextView = 0;

            this.silent = true;
            this.date = new Date(date.getFullYear(), date.getMonth(), 1);
            this.silent = false;
            this.view = this.viewIndexes[nextView];

        },

        _handleHotKey: function (key) {
            var date = datepicker.getParsedDate(this._getFocusedDate()),
                focusedParsed,
                o = this.opts,
                newDate,
                totalDaysInNextMonth,
                monthChanged = false,
                yearChanged = false,
                decadeChanged = false,
                y = date.year,
                m = date.month,
                d = date.date;

            switch (key) {
                case 'ctrlRight':
                case 'ctrlUp':
                    m += 1;
                    monthChanged = true;
                    break;
                case 'ctrlLeft':
                case 'ctrlDown':
                    m -= 1;
                    monthChanged = true;
                    break;
                case 'shiftRight':
                case 'shiftUp':
                    yearChanged = true;
                    y += 1;
                    break;
                case 'shiftLeft':
                case 'shiftDown':
                    yearChanged = true;
                    y -= 1;
                    break;
                case 'altRight':
                case 'altUp':
                    decadeChanged = true;
                    y += 10;
                    break;
                case 'altLeft':
                case 'altDown':
                    decadeChanged = true;
                    y -= 10;
                    break;
                case 'ctrlShiftUp':
                    this.up();
                    break;
            }

            totalDaysInNextMonth = datepicker.getDaysCount(new Date(y,m));
            newDate = new Date(y,m,d);

            // If next month has less days than current, set date to total days in that month
            if (totalDaysInNextMonth < d) d = totalDaysInNextMonth;

            // Check if newDate is in valid range
            if (newDate.getTime() < this.minTime) {
                newDate = this.minDate;
            } else if (newDate.getTime() > this.maxTime) {
                newDate = this.maxDate;
            }

            this.focused = newDate;

            focusedParsed = datepicker.getParsedDate(newDate);
            if (monthChanged && o.onChangeMonth) {
                o.onChangeMonth(focusedParsed.month, focusedParsed.year)
            }
            if (yearChanged && o.onChangeYear) {
                o.onChangeYear(focusedParsed.year)
            }
            if (decadeChanged && o.onChangeDecade) {
                o.onChangeDecade(this.curDecade)
            }
        },

        _registerKey: function (key) {
            var exists = this.keys.some(function (curKey) {
                return curKey == key;
            });

            if (!exists) {
                this.keys.push(key)
            }
        },

        _unRegisterKey: function (key) {
            var index = this.keys.indexOf(key);

            this.keys.splice(index, 1);
        },

        _isHotKeyPressed: function () {
            var currentHotKey,
                found = false,
                _this = this,
                pressedKeys = this.keys.sort();

            for (var hotKey in hotKeys) {
                currentHotKey = hotKeys[hotKey];
                if (pressedKeys.length != currentHotKey.length) continue;

                if (currentHotKey.every(function (key, i) { return key == pressedKeys[i]})) {
                    _this._trigger('hotKey', hotKey);
                    found = true;
                }
            }

            return found;
        },

        _trigger: function (event, args) {
            this.$el.trigger(event, args)
        },

        _focusNextCell: function (keyCode, type) {
            type = type || this.cellType;

            var date = datepicker.getParsedDate(this._getFocusedDate()),
                y = date.year,
                m = date.month,
                d = date.date;

            if (this._isHotKeyPressed()){
                return;
            }

            switch(keyCode) {
                case 37: // left
                    type == 'day' ? (d -= 1) : '';
                    type == 'month' ? (m -= 1) : '';
                    type == 'year' ? (y -= 1) : '';
                    break;
                case 38: // up
                    type == 'day' ? (d -= 7) : '';
                    type == 'month' ? (m -= 3) : '';
                    type == 'year' ? (y -= 4) : '';
                    break;
                case 39: // right
                    type == 'day' ? (d += 1) : '';
                    type == 'month' ? (m += 1) : '';
                    type == 'year' ? (y += 1) : '';
                    break;
                case 40: // down
                    type == 'day' ? (d += 7) : '';
                    type == 'month' ? (m += 3) : '';
                    type == 'year' ? (y += 4) : '';
                    break;
            }

            var nd = new Date(y,m,d);
            if (nd.getTime() < this.minTime) {
                nd = this.minDate;
            } else if (nd.getTime() > this.maxTime) {
                nd = this.maxDate;
            }

            this.focused = nd;

        },

        _getFocusedDate: function () {
            var focused  = this.focused || this.selectedDates[this.selectedDates.length - 1],
                d = this.parsedDate;

            if (!focused) {
                switch (this.view) {
                    case 'days':
                        focused = new Date(d.year, d.month, new Date().getDate());
                        break;
                    case 'months':
                        focused = new Date(d.year, d.month, 1);
                        break;
                    case 'years':
                        focused = new Date(d.year, 0, 1);
                        break;
                }
            }

            return focused;
        },

        _getCell: function (date, type) {
            type = type || this.cellType;

            var d = datepicker.getParsedDate(date),
                selector = '.datepicker--cell[data-year="' + d.year + '"]',
                $cell;

            switch (type) {
                case 'month':
                    selector = '[data-month="' + d.month + '"]';
                    break;
                case 'day':
                    selector += '[data-month="' + d.month + '"][data-date="' + d.date + '"]';
                    break;
            }
            $cell = this.views[this.currentView].$el.find(selector);

            return $cell.length ? $cell : $('');
        },

        destroy: function () {
            var _this = this;
            _this.$el
                .off('.adp')
                .data('datepicker', '');

            _this.selectedDates = [];
            _this.focused = '';
            _this.views = {};
            _this.keys = [];
            _this.minRange = '';
            _this.maxRange = '';

            if (_this.opts.inline || !_this.elIsInput) {
                _this.$datepicker.closest('.datepicker-inline').remove();
            } else {
                _this.$datepicker.remove();
            }
        },

        _handleAlreadySelectedDates: function (alreadySelected, selectedDate) {
            if (this.opts.range) {
                if (!this.opts.toggleSelected) {
                    // Add possibility to select same date when range is true
                    if (this.selectedDates.length != 2) {
                        this._trigger('clickCell', selectedDate);
                    }
                } else {
                    this.removeDate(selectedDate);
                }
            } else if (this.opts.toggleSelected){
                this.removeDate(selectedDate);
            }

            // Change last selected date to be able to change time when clicking on this cell
            if (!this.opts.toggleSelected) {
                this.lastSelectedDate = alreadySelected;
                if (this.opts.timepicker) {
                    this.timepicker._setTime(alreadySelected);
                    this.timepicker.update();
                }
            }
        },

        _onShowEvent: function (e) {
            if (!this.visible) {
                this.show();
            }
        },

        _onBlur: function () {
            if (!this.inFocus && this.visible) {
                this.hide();
            }
        },

        _onMouseDownDatepicker: function (e) {
            this.inFocus = true;
        },

        _onMouseUpDatepicker: function (e) {
            this.inFocus = false;
            e.originalEvent.inFocus = true;
            if (!e.originalEvent.timepickerFocus) this.$el.focus();
        },

        _onKeyUpGeneral: function (e) {
            var val = this.$el.val();

            if (!val) {
                this.clear();
            }
        },

        _onResize: function () {
            if (this.visible) {
                this.setPosition();
            }
        },

        _onMouseUpBody: function (e) {
            if (e.originalEvent.inFocus) return;

            if (this.visible && !this.inFocus) {
                this.hide();
            }
        },

        _onMouseUpEl: function (e) {
            e.originalEvent.inFocus = true;
            setTimeout(this._onKeyUpGeneral.bind(this),4);
        },

        _onKeyDown: function (e) {
            var code = e.which;
            this._registerKey(code);

            // Arrows
            if (code >= 37 && code <= 40) {
                e.preventDefault();
                this._focusNextCell(code);
            }

            // Enter
            if (code == 13) {
                if (this.focused) {
                    if (this._getCell(this.focused).hasClass('-disabled-')) return;
                    if (this.view != this.opts.minView) {
                        this.down()
                    } else {
                        var alreadySelected = this._isSelected(this.focused, this.cellType);

                        if (!alreadySelected) {
                            if (this.timepicker) {
                                this.focused.setHours(this.timepicker.hours);
                                this.focused.setMinutes(this.timepicker.minutes);
                            }
                            this.selectDate(this.focused);
                            return;
                        }
                        this._handleAlreadySelectedDates(alreadySelected, this.focused)
                    }
                }
            }

            // Esc
            if (code == 27) {
                this.hide();
            }
        },

        _onKeyUp: function (e) {
            var code = e.which;
            this._unRegisterKey(code);
        },

        _onHotKey: function (e, hotKey) {
            this._handleHotKey(hotKey);
        },

        _onMouseEnterCell: function (e) {
            var $cell = $(e.target).closest('.datepicker--cell'),
                date = this._getDateFromCell($cell);

            // Prevent from unnecessary rendering and setting new currentDate
            this.silent = true;

            if (this.focused) {
                this.focused = ''
            }

            $cell.addClass('-focus-');

            this.focused = date;
            this.silent = false;

            if (this.opts.range && this.selectedDates.length == 1) {
                this.minRange = this.selectedDates[0];
                this.maxRange = '';
                if (datepicker.less(this.minRange, this.focused)) {
                    this.maxRange = this.minRange;
                    this.minRange = '';
                }
                this.views[this.currentView]._update();
            }
        },

        _onMouseLeaveCell: function (e) {
            var $cell = $(e.target).closest('.datepicker--cell');

            $cell.removeClass('-focus-');

            this.silent = true;
            this.focused = '';
            this.silent = false;
        },

        _onTimeChange: function (e, h, m) {
            var date = new Date(),
                selectedDates = this.selectedDates,
                selected = false;

            if (selectedDates.length) {
                selected = true;
                date = this.lastSelectedDate;
            }

            date.setHours(h);
            date.setMinutes(m);

            if (!selected && !this._getCell(date).hasClass('-disabled-')) {
                this.selectDate(date);
            } else {
                this._setInputValue();
                if (this.opts.onSelect) {
                    this._triggerOnChange();
                }
            }
        },

        _onClickCell: function (e, date) {
            if (this.timepicker) {
                date.setHours(this.timepicker.hours);
                date.setMinutes(this.timepicker.minutes);
            }
            this.selectDate(date);
        },

        set focused(val) {
            if (!val && this.focused) {
                var $cell = this._getCell(this.focused);

                if ($cell.length) {
                    $cell.removeClass('-focus-')
                }
            }
            this._focused = val;
            if (this.opts.range && this.selectedDates.length == 1) {
                this.minRange = this.selectedDates[0];
                this.maxRange = '';
                if (datepicker.less(this.minRange, this._focused)) {
                    this.maxRange = this.minRange;
                    this.minRange = '';
                }
            }
            if (this.silent) return;
            this.date = val;
        },

        get focused() {
            return this._focused;
        },

        get parsedDate() {
            return datepicker.getParsedDate(this.date);
        },

        set date (val) {
            if (!(val instanceof Date)) return;

            this.currentDate = val;

            if (this.inited && !this.silent) {
                this.views[this.view]._render();
                this.nav._render();
                if (this.visible && this.elIsInput) {
                    this.setPosition();
                }
            }
            return val;
        },

        get date () {
            return this.currentDate
        },

        set view (val) {
            this.viewIndex = this.viewIndexes.indexOf(val);

            if (this.viewIndex < 0) {
                return;
            }

            this.prevView = this.currentView;
            this.currentView = val;

            if (this.inited) {
                if (!this.views[val]) {
                    this.views[val] = new  $.fn.datepicker.Body(this, val, this.opts)
                } else {
                    this.views[val]._render();
                }

                this.views[this.prevView].hide();
                this.views[val].show();
                this.nav._render();

                if (this.opts.onChangeView) {
                    this.opts.onChangeView(val)
                }
                if (this.elIsInput && this.visible) this.setPosition();
            }

            return val
        },

        get view() {
            return this.currentView;
        },

        get cellType() {
            return this.view.substring(0, this.view.length - 1)
        },

        get minTime() {
            var min = datepicker.getParsedDate(this.minDate);
            return new Date(min.year, min.month, min.date).getTime()
        },

        get maxTime() {
            var max = datepicker.getParsedDate(this.maxDate);
            return new Date(max.year, max.month, max.date).getTime()
        },

        get curDecade() {
            return datepicker.getDecade(this.date)
        }
    };

    //  Utils
    // -------------------------------------------------

    datepicker.getDaysCount = function (date) {
        return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
    };

    datepicker.getParsedDate = function (date) {
        return {
            year: date.getFullYear(),
            month: date.getMonth(),
            fullMonth: (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1, // One based
            date: date.getDate(),
            fullDate: date.getDate() < 10 ? '0' + date.getDate() : date.getDate(),
            day: date.getDay(),
            hours: date.getHours(),
            fullHours:  date.getHours() < 10 ? '0' + date.getHours() :  date.getHours() ,
            minutes: date.getMinutes(),
            fullMinutes:  date.getMinutes() < 10 ? '0' + date.getMinutes() :  date.getMinutes()
        }
    };

    datepicker.getDecade = function (date) {
        var firstYear = Math.floor(date.getFullYear() / 10) * 10;

        return [firstYear, firstYear + 9];
    };

    datepicker.template = function (str, data) {
        return str.replace(/#\{([\w]+)\}/g, function (source, match) {
            if (data[match] || data[match] === 0) {
                return data[match]
            }
        });
    };

    datepicker.isSame = function (date1, date2, type) {
        if (!date1 || !date2) return false;
        var d1 = datepicker.getParsedDate(date1),
            d2 = datepicker.getParsedDate(date2),
            _type = type ? type : 'day',

            conditions = {
                day: d1.date == d2.date && d1.month == d2.month && d1.year == d2.year,
                month: d1.month == d2.month && d1.year == d2.year,
                year: d1.year == d2.year
            };

        return conditions[_type];
    };

    datepicker.less = function (dateCompareTo, date, type) {
        if (!dateCompareTo || !date) return false;
        return date.getTime() < dateCompareTo.getTime();
    };

    datepicker.bigger = function (dateCompareTo, date, type) {
        if (!dateCompareTo || !date) return false;
        return date.getTime() > dateCompareTo.getTime();
    };

    datepicker.getLeadingZeroNum = function (num) {
        return parseInt(num) < 10 ? '0' + num : num;
    };

    /**
     * Returns copy of date with hours and minutes equals to 0
     * @param date {Date}
     */
    datepicker.resetTime = function (date) {
        if (typeof date != 'object') return;
        date = datepicker.getParsedDate(date);
        return new Date(date.year, date.month, date.date)
    };

    $.fn.datepicker = function ( options ) {
        return this.each(function () {
            if (!$.data(this, pluginName)) {
                $.data(this,  pluginName,
                    new Datepicker( this, options ));
            } else {
                var _this = $.data(this, pluginName);

                _this.opts = $.extend(true, _this.opts, options);
                _this.update();
            }
        });
    };

    $.fn.datepicker.Constructor = Datepicker;

    $.fn.datepicker.language = {
        ru: {
            days: ['Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'],
            daysShort: ['Вос','Пон','Вто','Сре','Чет','Пят','Суб'],
            daysMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
            months: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
            monthsShort: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'],
            today: 'Сегодня',
            clear: 'Очистить',
            dateFormat: 'dd.mm.yyyy',
            timeFormat: 'hh:ii',
            firstDay: 1
        },
        en: {
            days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
            daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
            daysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
            months: ['January','February','March','April','May','June', 'July','August','September','October','November','December'],
            monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
            today: 'Today',
            clear: 'Clear',
            dateFormat: 'mm/dd/yyyy',
            timeFormat: 'hh:ii aa',
            firstDay: 0
        },
        ar: {
             days: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
            daysShort: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
            daysMin: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
            months: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
            monthsShort: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
            today: 'اليوم',
            clear: 'مسح',
            dateFormat: 'dd.mm.yyyy',
            timeFormat: 'hh:ii',
            firstDay: 1
        }
    };

    $(function () {
        $(autoInitSelector).datepicker();
    })

})();

;(function () {
    var templates = {
        days:'' +
        '<div class="datepicker--days datepicker--body">' +
        '<div class="datepicker--days-names"></div>' +
        '<div class="datepicker--cells datepicker--cells-days"></div>' +
        '</div>',
        months: '' +
        '<div class="datepicker--months datepicker--body">' +
        '<div class="datepicker--cells datepicker--cells-months"></div>' +
        '</div>',
        years: '' +
        '<div class="datepicker--years datepicker--body">' +
        '<div class="datepicker--cells datepicker--cells-years"></div>' +
        '</div>'
        },
        datepicker = $.fn.datepicker,
        dp = datepicker.Constructor;

    datepicker.Body = function (d, type, opts) {
        this.d = d;
        this.type = type;
        this.opts = opts;
        this.$el = $('');

        if (this.opts.onlyTimepicker) return;
        this.init();
    };

    datepicker.Body.prototype = {
        init: function () {
            this._buildBaseHtml();
            this._render();

            this._bindEvents();
        },

        _bindEvents: function () {
            this.$el.on('click', '.datepicker--cell', $.proxy(this._onClickCell, this));
        },

        _buildBaseHtml: function () {
            this.$el = $(templates[this.type]).appendTo(this.d.$content);
            this.$names = $('.datepicker--days-names', this.$el);
            this.$cells = $('.datepicker--cells', this.$el);
        },

        _getDayNamesHtml: function (firstDay, curDay, html, i) {
            curDay = curDay != undefined ? curDay : firstDay;
            html = html ? html : '';
            i = i != undefined ? i : 0;

            if (i > 7) return html;
            if (curDay == 7) return this._getDayNamesHtml(firstDay, 0, html, ++i);

            html += '<div class="datepicker--day-name' + (this.d.isWeekend(curDay) ? " -weekend-" : "") + '">' + this.d.loc.daysMin[curDay] + '</div>';

            return this._getDayNamesHtml(firstDay, ++curDay, html, ++i);
        },

        _getCellContents: function (date, type) {
            var classes = "datepicker--cell datepicker--cell-" + type,
                currentDate = new Date(),
                parent = this.d,
                minRange = dp.resetTime(parent.minRange),
                maxRange = dp.resetTime(parent.maxRange),
                opts = parent.opts,
                d = dp.getParsedDate(date),
                render = {},
                html = d.date;

            switch (type) {
                case 'day':
                    if (parent.isWeekend(d.day)) classes += " -weekend-";
                    if (d.month != this.d.parsedDate.month) {
                        classes += " -other-month-";
                        if (!opts.selectOtherMonths) {
                            classes += " -disabled-";
                        }
                        if (!opts.showOtherMonths) html = '';
                    }
                    break;
                case 'month':
                    html = parent.loc[parent.opts.monthsField][d.month];
                    break;
                case 'year':
                    var decade = parent.curDecade;
                    html = d.year;
                    if (d.year < decade[0] || d.year > decade[1]) {
                        classes += ' -other-decade-';
                        if (!opts.selectOtherYears) {
                            classes += " -disabled-";
                        }
                        if (!opts.showOtherYears) html = '';
                    }
                    break;
            }

            if (opts.onRenderCell) {
                render = opts.onRenderCell(date, type) || {};
                html = render.html ? render.html : html;
                classes += render.classes ? ' ' + render.classes : '';
            }

            if (opts.range) {
                if (dp.isSame(minRange, date, type)) classes += ' -range-from-';
                if (dp.isSame(maxRange, date, type)) classes += ' -range-to-';

                if (parent.selectedDates.length == 1 && parent.focused) {
                    if (
                        (dp.bigger(minRange, date) && dp.less(parent.focused, date)) ||
                        (dp.less(maxRange, date) && dp.bigger(parent.focused, date)))
                    {
                        classes += ' -in-range-'
                    }

                    if (dp.less(maxRange, date) && dp.isSame(parent.focused, date)) {
                        classes += ' -range-from-'
                    }
                    if (dp.bigger(minRange, date) && dp.isSame(parent.focused, date)) {
                        classes += ' -range-to-'
                    }

                } else if (parent.selectedDates.length == 2) {
                    if (dp.bigger(minRange, date) && dp.less(maxRange, date)) {
                        classes += ' -in-range-'
                    }
                }
            }


            if (dp.isSame(currentDate, date, type)) classes += ' -current-';
            if (parent.focused && dp.isSame(date, parent.focused, type)) classes += ' -focus-';
            if (parent._isSelected(date, type)) classes += ' -selected-';
            if (!parent._isInRange(date, type) || render.disabled) classes += ' -disabled-';

            return {
                html: html,
                classes: classes
            }
        },

        /**
         * Calculates days number to render. Generates days html and returns it.
         * @param {object} date - Date object
         * @returns {string}
         * @private
         */
        _getDaysHtml: function (date) {
            var totalMonthDays = dp.getDaysCount(date),
                firstMonthDay = new Date(date.getFullYear(), date.getMonth(), 1).getDay(),
                lastMonthDay = new Date(date.getFullYear(), date.getMonth(), totalMonthDays).getDay(),
                daysFromPevMonth = firstMonthDay - this.d.loc.firstDay,
                daysFromNextMonth = 6 - lastMonthDay + this.d.loc.firstDay;

            daysFromPevMonth = daysFromPevMonth < 0 ? daysFromPevMonth + 7 : daysFromPevMonth;
            daysFromNextMonth = daysFromNextMonth > 6 ? daysFromNextMonth - 7 : daysFromNextMonth;

            var startDayIndex = -daysFromPevMonth + 1,
                m, y,
                html = '';

            for (var i = startDayIndex, max = totalMonthDays + daysFromNextMonth; i <= max; i++) {
                y = date.getFullYear();
                m = date.getMonth();

                html += this._getDayHtml(new Date(y, m, i))
            }

            return html;
        },

        _getDayHtml: function (date) {
           var content = this._getCellContents(date, 'day');

            return '<div class="' + content.classes + '" ' +
                'data-date="' + date.getDate() + '" ' +
                'data-month="' + date.getMonth() + '" ' +
                'data-year="' + date.getFullYear() + '">' + content.html + '</div>';
        },

        /**
         * Generates months html
         * @param {object} date - date instance
         * @returns {string}
         * @private
         */
        _getMonthsHtml: function (date) {
            var html = '',
                d = dp.getParsedDate(date),
                i = 0;

            while(i < 12) {
                html += this._getMonthHtml(new Date(d.year, i));
                i++
            }

            return html;
        },

        _getMonthHtml: function (date) {
            var content = this._getCellContents(date, 'month');

            return '<div class="' + content.classes + '" data-month="' + date.getMonth() + '">' + content.html + '</div>'
        },

        _getYearsHtml: function (date) {
            var d = dp.getParsedDate(date),
                decade = dp.getDecade(date),
                firstYear = decade[0] - 1,
                html = '',
                i = firstYear;

            for (i; i <= decade[1] + 1; i++) {
                html += this._getYearHtml(new Date(i , 0));
            }

            return html;
        },

        _getYearHtml: function (date) {
            var content = this._getCellContents(date, 'year');

            return '<div class="' + content.classes + '" data-year="' + date.getFullYear() + '">' + content.html + '</div>'
        },

        _renderTypes: {
            days: function () {
                var dayNames = this._getDayNamesHtml(this.d.loc.firstDay),
                    days = this._getDaysHtml(this.d.currentDate);

                this.$cells.html(days);
                this.$names.html(dayNames)
            },
            months: function () {
                var html = this._getMonthsHtml(this.d.currentDate);

                this.$cells.html(html)
            },
            years: function () {
                var html = this._getYearsHtml(this.d.currentDate);

                this.$cells.html(html)
            }
        },

        _render: function () {
            if (this.opts.onlyTimepicker) return;
            this._renderTypes[this.type].bind(this)();
        },

        _update: function () {
            var $cells = $('.datepicker--cell', this.$cells),
                _this = this,
                classes,
                $cell,
                date;
            $cells.each(function (cell, i) {
                $cell = $(this);
                date = _this.d._getDateFromCell($(this));
                classes = _this._getCellContents(date, _this.d.cellType);
                $cell.attr('class',classes.classes)
            });
        },

        show: function () {
            if (this.opts.onlyTimepicker) return;
            this.$el.addClass('active');
            this.acitve = true;
        },

        hide: function () {
            this.$el.removeClass('active');
            this.active = false;
        },

        //  Events
        // -------------------------------------------------

        _handleClick: function (el) {
            var date = el.data('date') || 1,
                month = el.data('month') || 0,
                year = el.data('year') || this.d.parsedDate.year,
                dp = this.d;
            // Change view if min view does not reach yet
            if (dp.view != this.opts.minView) {
                dp.down(new Date(year, month, date));
                return;
            }
            // Select date if min view is reached
            var selectedDate = new Date(year, month, date),
                alreadySelected = this.d._isSelected(selectedDate, this.d.cellType);

            if (!alreadySelected) {
                dp._trigger('clickCell', selectedDate);
                return;
            }

            dp._handleAlreadySelectedDates.bind(dp, alreadySelected, selectedDate)();

        },

        _onClickCell: function (e) {
            var $el = $(e.target).closest('.datepicker--cell');

            if ($el.hasClass('-disabled-')) return;

            this._handleClick.bind(this)($el);
        }
    };
})();

;(function () {
    var template = '' +
        '<div class="datepicker--nav-action" data-action="prev">#{prevHtml}</div>' +
        '<div class="datepicker--nav-title">#{title}</div>' +
        '<div class="datepicker--nav-action" data-action="next">#{nextHtml}</div>',
        buttonsContainerTemplate = '<div class="datepicker--buttons"></div>',
        button = '<span class="datepicker--button" data-action="#{action}">#{label}</span>',
        datepicker = $.fn.datepicker,
        dp = datepicker.Constructor;

    datepicker.Navigation = function (d, opts) {
        this.d = d;
        this.opts = opts;

        this.$buttonsContainer = '';

        this.init();
    };

    datepicker.Navigation.prototype = {
        init: function () {
            this._buildBaseHtml();
            this._bindEvents();
        },

        _bindEvents: function () {
            this.d.$nav.on('click', '.datepicker--nav-action', $.proxy(this._onClickNavButton, this));
            this.d.$nav.on('click', '.datepicker--nav-title', $.proxy(this._onClickNavTitle, this));
            this.d.$datepicker.on('click', '.datepicker--button', $.proxy(this._onClickNavButton, this));
        },

        _buildBaseHtml: function () {
            if (!this.opts.onlyTimepicker) {
                this._render();
            }
            this._addButtonsIfNeed();
        },

        _addButtonsIfNeed: function () {
            if (this.opts.todayButton) {
                this._addButton('today')
            }
            if (this.opts.clearButton) {
                this._addButton('clear')
            }
        },

        _render: function () {
            var title = this._getTitle(this.d.currentDate),
                html = dp.template(template, $.extend({title: title}, this.opts));
            this.d.$nav.html(html);
            if (this.d.view == 'years') {
                $('.datepicker--nav-title', this.d.$nav).addClass('-disabled-');
            }
            this.setNavStatus();
        },

        _getTitle: function (date) {
            return this.d.formatDate(this.opts.navTitles[this.d.view], date)
        },

        _addButton: function (type) {
            if (!this.$buttonsContainer.length) {
                this._addButtonsContainer();
            }

            var data = {
                    action: type,
                    label: this.d.loc[type]
                },
                html = dp.template(button, data);

            if ($('[data-action=' + type + ']', this.$buttonsContainer).length) return;
            this.$buttonsContainer.append(html);
        },

        _addButtonsContainer: function () {
            this.d.$datepicker.append(buttonsContainerTemplate);
            this.$buttonsContainer = $('.datepicker--buttons', this.d.$datepicker);
        },

        setNavStatus: function () {
            if (!(this.opts.minDate || this.opts.maxDate) || !this.opts.disableNavWhenOutOfRange) return;

            var date = this.d.parsedDate,
                m = date.month,
                y = date.year,
                d = date.date;

            switch (this.d.view) {
                case 'days':
                    if (!this.d._isInRange(new Date(y, m-1, 1), 'month')) {
                        this._disableNav('prev')
                    }
                    if (!this.d._isInRange(new Date(y, m+1, 1), 'month')) {
                        this._disableNav('next')
                    }
                    break;
                case 'months':
                    if (!this.d._isInRange(new Date(y-1, m, d), 'year')) {
                        this._disableNav('prev')
                    }
                    if (!this.d._isInRange(new Date(y+1, m, d), 'year')) {
                        this._disableNav('next')
                    }
                    break;
                case 'years':
                    var decade = dp.getDecade(this.d.date);
                    if (!this.d._isInRange(new Date(decade[0] - 1, 0, 1), 'year')) {
                        this._disableNav('prev')
                    }
                    if (!this.d._isInRange(new Date(decade[1] + 1, 0, 1), 'year')) {
                        this._disableNav('next')
                    }
                    break;
            }
        },

        _disableNav: function (nav) {
            $('[data-action="' + nav + '"]', this.d.$nav).addClass('-disabled-')
        },

        _activateNav: function (nav) {
            $('[data-action="' + nav + '"]', this.d.$nav).removeClass('-disabled-')
        },

        _onClickNavButton: function (e) {
            var $el = $(e.target).closest('[data-action]'),
                action = $el.data('action');

            this.d[action]();
        },

        _onClickNavTitle: function (e) {
            if ($(e.target).hasClass('-disabled-')) return;

            if (this.d.view == 'days') {
                return this.d.view = 'months'
            }

            this.d.view = 'years';
        }
    }

})();

;(function () {
    var template = '<div class="datepicker--time">' +
        '<div class="datepicker--time-current">' +
        '   <span class="datepicker--time-current-hours">#{hourVisible}</span>' +
        '   <span class="datepicker--time-current-colon">:</span>' +
        '   <span class="datepicker--time-current-minutes">#{minValue}</span>' +
        '</div>' +
        '<div class="datepicker--time-sliders">' +
        '   <div class="datepicker--time-row">' +
        '      <input type="range" name="hours" value="#{hourValue}" min="#{hourMin}" max="#{hourMax}" step="#{hourStep}"/>' +
        '   </div>' +
        '   <div class="datepicker--time-row">' +
        '      <input type="range" name="minutes" value="#{minValue}" min="#{minMin}" max="#{minMax}" step="#{minStep}"/>' +
        '   </div>' +
        '</div>' +
        '</div>',
        datepicker = $.fn.datepicker,
        dp = datepicker.Constructor;

    datepicker.Timepicker = function (inst, opts) {
        this.d = inst;
        this.opts = opts;

        this.init();
    };

    datepicker.Timepicker.prototype = {
        init: function () {
            var input = 'input';
            this._setTime(this.d.date);
            this._buildHTML();

            if (navigator.userAgent.match(/trident/gi)) {
                input = 'change';
            }

            this.d.$el.on('selectDate', this._onSelectDate.bind(this));
            this.$ranges.on(input, this._onChangeRange.bind(this));
            this.$ranges.on('mouseup', this._onMouseUpRange.bind(this));
            this.$ranges.on('mousemove focus ', this._onMouseEnterRange.bind(this));
            this.$ranges.on('mouseout blur', this._onMouseOutRange.bind(this));
        },

        _setTime: function (date) {
            var _date = dp.getParsedDate(date);

            this._handleDate(date);
            this.hours = _date.hours < this.minHours ? this.minHours : _date.hours;
            this.minutes = _date.minutes < this.minMinutes ? this.minMinutes : _date.minutes;
        },

        /**
         * Sets minHours and minMinutes from date (usually it's a minDate)
         * Also changes minMinutes if current hours are bigger then @date hours
         * @param date {Date}
         * @private
         */
        _setMinTimeFromDate: function (date) {
            this.minHours = date.getHours();
            this.minMinutes = date.getMinutes();

            // If, for example, min hours are 10, and current hours are 12,
            // update minMinutes to default value, to be able to choose whole range of values
            if (this.d.lastSelectedDate) {
                if (this.d.lastSelectedDate.getHours() > date.getHours()) {
                    this.minMinutes = this.opts.minMinutes;
                }
            }
        },

        _setMaxTimeFromDate: function (date) {
            this.maxHours = date.getHours();
            this.maxMinutes = date.getMinutes();

            if (this.d.lastSelectedDate) {
                if (this.d.lastSelectedDate.getHours() < date.getHours()) {
                    this.maxMinutes = this.opts.maxMinutes;
                }
            }
        },

        _setDefaultMinMaxTime: function () {
            var maxHours = 23,
                maxMinutes = 59,
                opts = this.opts;

            this.minHours = opts.minHours < 0 || opts.minHours > maxHours ? 0 : opts.minHours;
            this.minMinutes = opts.minMinutes < 0 || opts.minMinutes > maxMinutes ? 0 : opts.minMinutes;
            this.maxHours = opts.maxHours < 0 || opts.maxHours > maxHours ? maxHours : opts.maxHours;
            this.maxMinutes = opts.maxMinutes < 0 || opts.maxMinutes > maxMinutes ? maxMinutes : opts.maxMinutes;
        },

        /**
         * Looks for min/max hours/minutes and if current values
         * are out of range sets valid values.
         * @private
         */
        _validateHoursMinutes: function (date) {
            if (this.hours < this.minHours) {
                this.hours = this.minHours;
            } else if (this.hours > this.maxHours) {
                this.hours = this.maxHours;
            }

            if (this.minutes < this.minMinutes) {
                this.minutes = this.minMinutes;
            } else if (this.minutes > this.maxMinutes) {
                this.minutes = this.maxMinutes;
            }
        },

        _buildHTML: function () {
            var lz = dp.getLeadingZeroNum,
                data = {
                    hourMin: this.minHours,
                    hourMax: lz(this.maxHours),
                    hourStep: this.opts.hoursStep,
                    hourValue: this.hours,
                    hourVisible: lz(this.displayHours),
                    minMin: this.minMinutes,
                    minMax: lz(this.maxMinutes),
                    minStep: this.opts.minutesStep,
                    minValue: lz(this.minutes)
                },
                _template = dp.template(template, data);

            this.$timepicker = $(_template).appendTo(this.d.$datepicker);
            this.$ranges = $('[type="range"]', this.$timepicker);
            this.$hours = $('[name="hours"]', this.$timepicker);
            this.$minutes = $('[name="minutes"]', this.$timepicker);
            this.$hoursText = $('.datepicker--time-current-hours', this.$timepicker);
            this.$minutesText = $('.datepicker--time-current-minutes', this.$timepicker);

            if (this.d.ampm) {
                this.$ampm = $('<span class="datepicker--time-current-ampm">')
                    .appendTo($('.datepicker--time-current', this.$timepicker))
                    .html(this.dayPeriod);

                this.$timepicker.addClass('-am-pm-');
            }
        },

        _updateCurrentTime: function () {
            var h =  dp.getLeadingZeroNum(this.displayHours),
                m = dp.getLeadingZeroNum(this.minutes);

            this.$hoursText.html(h);
            this.$minutesText.html(m);

            if (this.d.ampm) {
                this.$ampm.html(this.dayPeriod);
            }
        },

        _updateRanges: function () {
            this.$hours.attr({
                min: this.minHours,
                max: this.maxHours
            }).val(this.hours);

            this.$minutes.attr({
                min: this.minMinutes,
                max: this.maxMinutes
            }).val(this.minutes)
        },

        /**
         * Sets minHours, minMinutes etc. from date. If date is not passed, than sets
         * values from options
         * @param [date] {object} - Date object, to get values from
         * @private
         */
        _handleDate: function (date) {
            this._setDefaultMinMaxTime();
            if (date) {
                if (dp.isSame(date, this.d.opts.minDate)) {
                    this._setMinTimeFromDate(this.d.opts.minDate);
                } else if (dp.isSame(date, this.d.opts.maxDate)) {
                    this._setMaxTimeFromDate(this.d.opts.maxDate);
                }
            }

            this._validateHoursMinutes(date);
        },

        update: function () {
            this._updateRanges();
            this._updateCurrentTime();
        },

        /**
         * Calculates valid hour value to display in text input and datepicker's body.
         * @param date {Date|Number} - date or hours
         * @param [ampm] {Boolean} - 12 hours mode
         * @returns {{hours: *, dayPeriod: string}}
         * @private
         */
        _getValidHoursFromDate: function (date, ampm) {
            var d = date,
                hours = date;

            if (date instanceof Date) {
                d = dp.getParsedDate(date);
                hours = d.hours;
            }

            var _ampm = ampm || this.d.ampm,
                dayPeriod = 'am';

            if (_ampm) {
                switch(true) {
                    case hours == 0:
                        hours = 12;
                        break;
                    case hours == 12:
                        dayPeriod = 'pm';
                        break;
                    case hours > 11:
                        hours = hours - 12;
                        dayPeriod = 'pm';
                        break;
                    default:
                        break;
                }
            }

            return {
                hours: hours,
                dayPeriod: dayPeriod
            }
        },

        set hours (val) {
            this._hours = val;

            var displayHours = this._getValidHoursFromDate(val);

            this.displayHours = displayHours.hours;
            this.dayPeriod = displayHours.dayPeriod;
        },

        get hours() {
            return this._hours;
        },

        //  Events
        // -------------------------------------------------

        _onChangeRange: function (e) {
            var $target = $(e.target),
                name = $target.attr('name');
            
            this.d.timepickerIsActive = true;

            this[name] = $target.val();
            this._updateCurrentTime();
            this.d._trigger('timeChange', [this.hours, this.minutes]);

            this._handleDate(this.d.lastSelectedDate);
            this.update()
        },

        _onSelectDate: function (e, data) {
            this._handleDate(data);
            this.update();
        },

        _onMouseEnterRange: function (e) {
            var name = $(e.target).attr('name');
            $('.datepicker--time-current-' + name, this.$timepicker).addClass('-focus-');
        },

        _onMouseOutRange: function (e) {
            var name = $(e.target).attr('name');
            if (this.d.inFocus) return; // Prevent removing focus when mouse out of range slider
            $('.datepicker--time-current-' + name, this.$timepicker).removeClass('-focus-');
        },

        _onMouseUpRange: function (e) {
            this.d.timepickerIsActive = false;
        }
    };
})();
 })(window, jQuery);;
