54 lines
1.5 MiB
54 lines
1.5 MiB
/*!
|
||
* Bootstrap v5.1.3 (https://getbootstrap.com/)
|
||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||
*/
|
||
!function(t,e){"object"==typeof exports&&void 0!==module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t="transitionend",e=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n="#"+n.split("#")[1]),e=n&&"#"!==n?n.trim():null}return e},n=t=>{const n=e(t);return n&&document.querySelector(n)?n:null},r=t=>{const n=e(t);return n?document.querySelector(n):null},i=e=>{e.dispatchEvent(new Event(t))},o=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),s=t=>o(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,a=(t,e,n)=>{Object.keys(n).forEach(r=>{const i=n[r],s=e[r],a=s&&o(s)?"element":null==(l=s)?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();var l;if(!new RegExp(i).test(a))throw new TypeError(`${t.toUpperCase()}: Option "${r}" provided type "${a}" but expected type "${i}".`)})},l=t=>!(!o(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),u=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),c=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?c(t.parentNode):null},d=()=>{},h=t=>{t.offsetHeight},p=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},f=[],m=()=>"rtl"===document.documentElement.dir,g=t=>{var e;e=()=>{const e=p();if(e){const n=t.NAME,r=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=r,t.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",()=>{f.forEach(t=>t())}),f.push(e)):e()},v=t=>{"function"==typeof t&&t()},y=(e,n,r=!0)=>{if(!r)return void v(e);const o=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const r=Number.parseFloat(e),i=Number.parseFloat(n);return r||i?(e=e.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(n))):0})(n)+5;let s=!1;const a=({target:r})=>{r===n&&(s=!0,n.removeEventListener(t,a),v(e))};n.addEventListener(t,a),setTimeout(()=>{s||i(n)},o)},_=(t,e,n,r)=>{let i=t.indexOf(e);if(-1===i)return t[!n&&r?t.length-1:0];const o=t.length;return i+=n?1:-1,r&&(i=(i+o)%o),t[Math.max(0,Math.min(i,o-1))]},b=/[^.]*(?=\..*)\.|.*/,w=/\..*/,x=/::\d+$/,S={};let k=1;const C={mouseenter:"mouseover",mouseleave:"mouseout"},E=/^(mouseenter|mouseleave)/i,T=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function P(t,e){return e&&`${e}::${k++}`||t.uidEvent||k++}function O(t){const e=P(t);return t.uidEvent=e,S[e]=S[e]||{},S[e]}function A(t,e,n=null){const r=Object.keys(t);for(let i=0,o=r.length;i<o;i++){const o=t[r[i]];if(o.originalHandler===e&&o.delegationSelector===n)return o}return null}function M(t,e,n){const r="string"==typeof e,i=r?n:e;let o=j(t);return T.has(o)||(o=t),[r,i,o]}function L(t,e,n,r,i){if("string"!=typeof e||!t)return;if(n||(n=r,r=null),E.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r?r=t(r):n=t(n)}const[o,s,a]=M(e,n,r),l=O(t),u=l[a]||(l[a]={}),c=A(u,s,o?n:null);if(c)return void(c.oneOff=c.oneOff&&i);const d=P(s,e.replace(b,"")),h=o?function(t,e,n){return function r(i){const o=t.querySelectorAll(e);for(let{target:s}=i;s&&s!==this;s=s.parentNode)for(let a=o.length;a--;)if(o[a]===s)return i.delegateTarget=s,r.oneOff&&D.off(t,i.type,e,n),n.apply(s,[i]);return null}}(t,n,r):function(t,e){return function n(r){return r.delegateTarget=t,n.oneOff&&D.off(t,r.type,e),e.apply(t,[r])}}(t,n);h.delegationSelector=o?n:null,h.originalHandler=s,h.oneOff=i,h.uidEvent=d,u[d]=h,t.addEventListener(a,h,o)}function I(t,e,n,r,i){const o=A(e[n],r,i);o&&(t.removeEventListener(n,o,Boolean(i)),delete e[n][o.uidEvent])}function j(t){return t=t.replace(w,""),C[t]||t}const D={on(t,e,n,r){L(t,e,n,r,!1)},one(t,e,n,r){L(t,e,n,r,!0)},off(t,e,n,r){if("string"!=typeof e||!t)return;const[i,o,s]=M(e,n,r),a=s!==e,l=O(t),u=e.startsWith(".");if(void 0!==o){if(!l||!l[s])return;return void I(t,l,s,o,i?n:null)}u&&Object.keys(l).forEach(n=>{!function(t,e,n,r){const i=e[n]||{};Object.keys(i).forEach(o=>{if(o.includes(r)){const r=i[o];I(t,e,n,r.originalHandler,r.delegationSelector)}})}(t,l,n,e.slice(1))});const c=l[s]||{};Object.keys(c).forEach(n=>{const r=n.replace(x,"");if(!a||e.includes(r)){const e=c[n];I(t,l,s,e.originalHandler,e.delegationSelector)}})},trigger(t,e,n){if("string"!=typeof e||!t)return null;const r=p(),i=j(e),o=e!==i,s=T.has(i);let a,l=!0,u=!0,c=!1,d=null;return o&&r&&(a=r.Event(e,n),r(t).trigger(a),l=!a.isPropagationStopped(),u=!a.isImmediatePropagationStopped(),c=a.isDefaultPrevented()),s?(d=document.createEvent("HTMLEvents"),d.initEvent(i,l,!0)):d=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==n&&Object.keys(n).forEach(t=>{Object.defineProperty(d,t,{get:()=>n[t]})}),c&&d.preventDefault(),u&&t.dispatchEvent(d),d.defaultPrevented&&void 0!==a&&a.preventDefault(),d}},N=new Map,R={set(t,e,n){N.has(t)||N.set(t,new Map);const r=N.get(t);r.has(e)||0===r.size?r.set(e,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`)},get:(t,e)=>N.has(t)&&N.get(t).get(e)||null,remove(t,e){if(!N.has(t))return;const n=N.get(t);n.delete(e),0===n.size&&N.delete(t)}};class F{constructor(t){(t=s(t))&&(this._element=t,R.set(this._element,this.constructor.DATA_KEY,this))}dispose(){R.remove(this._element,this.constructor.DATA_KEY),D.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(t=>{this[t]=null})}_queueCallback(t,e,n=!0){y(t,e,n)}static getInstance(t){return R.get(s(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.1.3"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return"bs."+this.NAME}static get EVENT_KEY(){return"."+this.DATA_KEY}}const V=(t,e="hide")=>{const n="click.dismiss"+t.EVENT_KEY,i=t.NAME;D.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),u(this))return;const o=r(this)||this.closest("."+i);t.getOrCreateInstance(o)[e]()}))};class z extends F{static get NAME(){return"alert"}close(){if(D.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),D.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=z.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}V(z,"close"),g(z);const B='[data-bs-toggle="button"]';class q extends F{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=q.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}function H(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function $(t){return t.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}D.on(document,"click.bs.button.data-api",B,t=>{t.preventDefault();const e=t.target.closest(B);q.getOrCreateInstance(e).toggle()}),g(q);const U={setDataAttribute(t,e,n){t.setAttribute("data-bs-"+$(e),n)},removeDataAttribute(t,e){t.removeAttribute("data-bs-"+$(e))},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter(t=>t.startsWith("bs")).forEach(n=>{let r=n.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),e[r]=H(t.dataset[n])}),e},getDataAttribute:(t,e)=>H(t.getAttribute("data-bs-"+$(e))),offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},W={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const n=[];let r=t.parentNode;for(;r&&r.nodeType===Node.ELEMENT_NODE&&3!==r.nodeType;)r.matches(e)&&n.push(r),r=r.parentNode;return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>t+':not([tabindex^="-"])').join(", ");return this.find(e,t).filter(t=>!u(t)&&l(t))}},G="carousel",Y={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Z={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},K="next",X="prev",Q="left",J="right",tt={ArrowLeft:J,ArrowRight:Q},et="slid.bs.carousel",nt="active",rt=".active.carousel-item";class it extends F{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=W.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return Y}static get NAME(){return G}next(){this._slide(K)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(X)}pause(t){t||(this._isPaused=!0),W.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(i(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=W.findOne(rt,this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void D.one(this._element,et,()=>this.to(t));if(e===t)return this.pause(),void this.cycle();const n=t>e?K:X;this._slide(n,this._items[t])}_getConfig(t){return t={...Y,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}},a(G,t,Z),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=40)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?J:Q)}_addEventListeners(){this._config.keyboard&&D.on(this._element,"keydown.bs.carousel",t=>this._keydown(t)),"hover"===this._config.pause&&(D.on(this._element,"mouseenter.bs.carousel",t=>this.pause(t)),D.on(this._element,"mouseleave.bs.carousel",t=>this.cycle(t))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>this._pointerEvent&&("pen"===t.pointerType||"touch"===t.pointerType),e=e=>{t(e)?this.touchStartX=e.clientX:this._pointerEvent||(this.touchStartX=e.touches[0].clientX)},n=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},r=e=>{t(e)&&(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(t=>this.cycle(t),500+this._config.interval))};W.find(".carousel-item img",this._element).forEach(t=>{D.on(t,"dragstart.bs.carousel",t=>t.preventDefault())}),this._pointerEvent?(D.on(this._element,"pointerdown.bs.carousel",t=>e(t)),D.on(this._element,"pointerup.bs.carousel",t=>r(t)),this._element.classList.add("pointer-event")):(D.on(this._element,"touchstart.bs.carousel",t=>e(t)),D.on(this._element,"touchmove.bs.carousel",t=>n(t)),D.on(this._element,"touchend.bs.carousel",t=>r(t)))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=tt[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?W.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const n=t===K;return _(this._items,e,n,this._config.wrap)}_triggerSlideEvent(t,e){const n=this._getItemIndex(t),r=this._getItemIndex(W.findOne(rt,this._element));return D.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:r,to:n})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=W.findOne(".active",this._indicatorsElement);e.classList.remove(nt),e.removeAttribute("aria-current");const n=W.find("[data-bs-target]",this._indicatorsElement);for(let e=0;e<n.length;e++)if(Number.parseInt(n[e].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){n[e].classList.add(nt),n[e].setAttribute("aria-current","true");break}}}_updateInterval(){const t=this._activeElement||W.findOne(rt,this._element);if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(t,e){const n=this._directionToOrder(t),r=W.findOne(rt,this._element),i=this._getItemIndex(r),o=e||this._getItemByOrder(n,r),s=this._getItemIndex(o),a=Boolean(this._interval),l=n===K,u=l?"carousel-item-start":"carousel-item-end",c=l?"carousel-item-next":"carousel-item-prev",d=this._orderToDirection(n);if(o&&o.classList.contains(nt))return void(this._isSliding=!1);if(this._isSliding)return;if(this._triggerSlideEvent(o,d).defaultPrevented)return;if(!r||!o)return;this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(o),this._activeElement=o;const p=()=>{D.trigger(this._element,et,{relatedTarget:o,direction:d,from:i,to:s})};if(this._element.classList.contains("slide")){o.classList.add(c),h(o),r.classList.add(u),o.classList.add(u);const t=()=>{o.classList.remove(u,c),o.classList.add(nt),r.classList.remove(nt,c,u),this._isSliding=!1,setTimeout(p,0)};this._queueCallback(t,r,!0)}else r.classList.remove(nt),o.classList.add(nt),this._isSliding=!1,p();a&&this.cycle()}_directionToOrder(t){return[J,Q].includes(t)?m()?t===Q?X:K:t===Q?K:X:t}_orderToDirection(t){return[K,X].includes(t)?m()?t===X?Q:J:t===X?J:Q:t}static carouselInterface(t,e){const n=it.getOrCreateInstance(t,e);let{_config:r}=n;"object"==typeof e&&(r={...r,...e});const i="string"==typeof e?e:r.slide;if("number"==typeof e)n.to(e);else if("string"==typeof i){if(void 0===n[i])throw new TypeError(`No method named "${i}"`);n[i]()}else r.interval&&r.ride&&(n.pause(),n.cycle())}static jQueryInterface(t){return this.each((function(){it.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=r(this);if(!e||!e.classList.contains("carousel"))return;const n={...U.getDataAttributes(e),...U.getDataAttributes(this)},i=this.getAttribute("data-bs-slide-to");i&&(n.interval=!1),it.carouselInterface(e,n),i&&it.getInstance(e).to(i),t.preventDefault()}}D.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",it.dataApiClickHandler),D.on(window,"load.bs.carousel.data-api",()=>{const t=W.find('[data-bs-ride="carousel"]');for(let e=0,n=t.length;e<n;e++)it.carouselInterface(t[e],it.getInstance(t[e]))}),g(it);const ot="collapse",st={toggle:!0,parent:null},at={toggle:"boolean",parent:"(null|element)"},lt="show",ut="collapse",ct="collapsing",dt="collapsed",ht=":scope .collapse .collapse",pt='[data-bs-toggle="collapse"]';class ft extends F{constructor(t,e){super(t),this._isTransitioning=!1,this._config=this._getConfig(e),this._triggerArray=[];const r=W.find(pt);for(let t=0,e=r.length;t<e;t++){const e=r[t],i=n(e),o=W.find(i).filter(t=>t===this._element);null!==i&&o.length&&(this._selector=i,this._triggerArray.push(e))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return st}static get NAME(){return ot}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t,e=[];if(this._config.parent){const t=W.find(ht,this._config.parent);e=W.find(".collapse.show, .collapse.collapsing",this._config.parent).filter(e=>!t.includes(e))}const n=W.findOne(this._selector);if(e.length){const r=e.find(t=>n!==t);if(t=r?ft.getInstance(r):null,t&&t._isTransitioning)return}if(D.trigger(this._element,"show.bs.collapse").defaultPrevented)return;e.forEach(e=>{n!==e&&ft.getOrCreateInstance(e,{toggle:!1}).hide(),t||R.set(e,"bs.collapse",null)});const r=this._getDimension();this._element.classList.remove(ut),this._element.classList.add(ct),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i="scroll"+(r[0].toUpperCase()+r.slice(1));this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ct),this._element.classList.add(ut,lt),this._element.style[r]="",D.trigger(this._element,"shown.bs.collapse")},this._element,!0),this._element.style[r]=this._element[i]+"px"}hide(){if(this._isTransitioning||!this._isShown())return;if(D.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=this._element.getBoundingClientRect()[t]+"px",h(this._element),this._element.classList.add(ct),this._element.classList.remove(ut,lt);const e=this._triggerArray.length;for(let t=0;t<e;t++){const e=this._triggerArray[t],n=r(e);n&&!this._isShown(n)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ct),this._element.classList.add(ut),D.trigger(this._element,"hidden.bs.collapse")},this._element,!0)}_isShown(t=this._element){return t.classList.contains(lt)}_getConfig(t){return(t={...st,...U.getDataAttributes(this._element),...t}).toggle=Boolean(t.toggle),t.parent=s(t.parent),a(ot,t,at),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=W.find(ht,this._config.parent);W.find(pt,this._config.parent).filter(e=>!t.includes(e)).forEach(t=>{const e=r(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))})}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach(t=>{e?t.classList.remove(dt):t.classList.add(dt),t.setAttribute("aria-expanded",e)})}static jQueryInterface(t){return this.each((function(){const e={};"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1);const n=ft.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}}))}}D.on(document,"click.bs.collapse.data-api",pt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=n(this);W.find(e).forEach(t=>{ft.getOrCreateInstance(t,{toggle:!1}).toggle()})})),g(ft);var mt="top",gt="bottom",vt="right",yt="left",_t="auto",bt=[mt,gt,vt,yt],wt="start",xt="end",St="clippingParents",kt="viewport",Ct="popper",Et="reference",Tt=bt.reduce((function(t,e){return t.concat([e+"-"+wt,e+"-"+xt])}),[]),Pt=[].concat(bt,[_t]).reduce((function(t,e){return t.concat([e,e+"-"+wt,e+"-"+xt])}),[]),Ot="beforeRead",At="afterRead",Mt="beforeMain",Lt="afterMain",It="beforeWrite",jt="afterWrite",Dt=[Ot,"read",At,Mt,"main",Lt,It,"write",jt];function Nt(t){return t?(t.nodeName||"").toLowerCase():null}function Rt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ft(t){return t instanceof Rt(t).Element||t instanceof Element}function Vt(t){return t instanceof Rt(t).HTMLElement||t instanceof HTMLElement}function zt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Rt(t).ShadowRoot||t instanceof ShadowRoot)}const Bt={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},i=e.elements[t];Vt(i)&&Nt(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(t){var e=r[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var r=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});Vt(r)&&Nt(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]};function qt(t){return t.split("-")[0]}function Ht(t,e){var n=t.getBoundingClientRect();return{width:n.width/1,height:n.height/1,top:n.top/1,right:n.right/1,bottom:n.bottom/1,left:n.left/1,x:n.left/1,y:n.top/1}}function $t(t){var e=Ht(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function Ut(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&zt(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Wt(t){return Rt(t).getComputedStyle(t)}function Gt(t){return["table","td","th"].indexOf(Nt(t))>=0}function Yt(t){return((Ft(t)?t.ownerDocument:t.document)||window.document).documentElement}function Zt(t){return"html"===Nt(t)?t:t.assignedSlot||t.parentNode||(zt(t)?t.host:null)||Yt(t)}function Kt(t){return Vt(t)&&"fixed"!==Wt(t).position?t.offsetParent:null}function Xt(t){for(var e=Rt(t),n=Kt(t);n&&Gt(n)&&"static"===Wt(n).position;)n=Kt(n);return n&&("html"===Nt(n)||"body"===Nt(n)&&"static"===Wt(n).position)?e:n||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Vt(t)&&"fixed"===Wt(t).position)return null;for(var n=Zt(t);Vt(n)&&["html","body"].indexOf(Nt(n))<0;){var r=Wt(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||e&&"filter"===r.willChange||e&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(t)||e}function Qt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var Jt=Math.max,te=Math.min,ee=Math.round;function ne(t,e,n){return Jt(t,te(e,n))}function re(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function ie(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}const oe={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=qt(n.placement),l=Qt(a),u=[yt,vt].indexOf(a)>=0?"height":"width";if(o&&s){var c=function(t,e){return re("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:ie(t,bt))}(i.padding,n),d=$t(o),h="y"===l?mt:yt,p="y"===l?gt:vt,f=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],m=s[l]-n.rects.reference[l],g=Xt(o),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=f/2-m/2,_=c[h],b=v-d[u]-c[p],w=v/2-d[u]/2+y,x=ne(_,w,b),S=l;n.modifiersData[r]=((e={})[S]=x,e.centerOffset=x-w,e)}},effect:function(t){var e=t.state,n=t.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=e.elements.popper.querySelector(r)))&&Ut(e.elements.popper,r)&&(e.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function se(t){return t.split("-")[1]}var ae={top:"auto",right:"auto",bottom:"auto",left:"auto"};function le(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=!0===c?function(t){var e=t.x,n=t.y,r=window.devicePixelRatio||1;return{x:ee(ee(e*r)/r)||0,y:ee(ee(n*r)/r)||0}}(s):"function"==typeof c?c(s):s,h=d.x,p=void 0===h?0:h,f=d.y,m=void 0===f?0:f,g=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),y=yt,_=mt,b=window;if(u){var w=Xt(n),x="clientHeight",S="clientWidth";w===Rt(n)&&"static"!==Wt(w=Yt(n)).position&&"absolute"===a&&(x="scrollHeight",S="scrollWidth"),w=w,i!==mt&&(i!==yt&&i!==vt||o!==xt)||(_=gt,m-=w[x]-r.height,m*=l?1:-1),i!==yt&&(i!==mt&&i!==gt||o!==xt)||(y=vt,p-=w[S]-r.width,p*=l?1:-1)}var k,C=Object.assign({position:a},u&&ae);return l?Object.assign({},C,((k={})[_]=v?"0":"",k[y]=g?"0":"",k.transform=(b.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",k)):Object.assign({},C,((e={})[_]=v?m+"px":"",e[y]=g?p+"px":"",e.transform="",e))}const ue={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,u={placement:qt(e.placement),variation:se(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,le(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,le(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ce={passive:!0};const de={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,l=Rt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach((function(t){t.addEventListener("scroll",n.update,ce)})),a&&l.addEventListener("resize",n.update,ce),function(){o&&u.forEach((function(t){t.removeEventListener("scroll",n.update,ce)})),a&&l.removeEventListener("resize",n.update,ce)}},data:{}};var he={left:"right",right:"left",bottom:"top",top:"bottom"};function pe(t){return t.replace(/left|right|bottom|top/g,(function(t){return he[t]}))}var fe={start:"end",end:"start"};function me(t){return t.replace(/start|end/g,(function(t){return fe[t]}))}function ge(t){var e=Rt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ve(t){return Ht(Yt(t)).left+ge(t).scrollLeft}function ye(t){var e=Wt(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function _e(t,e){var n;void 0===e&&(e=[]);var r=function t(e){return["html","body","#document"].indexOf(Nt(e))>=0?e.ownerDocument.body:Vt(e)&&ye(e)?e:t(Zt(e))}(t),i=r===(null==(n=t.ownerDocument)?void 0:n.body),o=Rt(r),s=i?[o].concat(o.visualViewport||[],ye(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(_e(Zt(s)))}function be(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function we(t,e){return e===kt?be(function(t){var e=Rt(t),n=Yt(t),r=e.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:s+ve(t),y:a}}(t)):Vt(e)?function(t){var e=Ht(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):be(function(t){var e,n=Yt(t),r=ge(t),i=null==(e=t.ownerDocument)?void 0:e.body,o=Jt(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Jt(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+ve(t),l=-r.scrollTop;return"rtl"===Wt(i||n).direction&&(a+=Jt(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Yt(t)))}function xe(t){var e,n=t.reference,r=t.element,i=t.placement,o=i?qt(i):null,s=i?se(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case mt:e={x:a,y:n.y-r.height};break;case gt:e={x:a,y:n.y+n.height};break;case vt:e={x:n.x+n.width,y:l};break;case yt:e={x:n.x-r.width,y:l};break;default:e={x:n.x,y:n.y}}var u=o?Qt(o):null;if(null!=u){var c="y"===u?"height":"width";switch(s){case wt:e[u]=e[u]-(n[c]/2-r[c]/2);break;case xt:e[u]=e[u]+(n[c]/2-r[c]/2)}}return e}function Se(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=void 0===r?t.placement:r,o=n.boundary,s=void 0===o?St:o,a=n.rootBoundary,l=void 0===a?kt:a,u=n.elementContext,c=void 0===u?Ct:u,d=n.altBoundary,h=void 0!==d&&d,p=n.padding,f=void 0===p?0:p,m=re("number"!=typeof f?f:ie(f,bt)),g=c===Ct?Et:Ct,v=t.rects.popper,y=t.elements[h?g:c],_=function(t,e,n){var r="clippingParents"===e?function(t){var e=_e(Zt(t)),n=["absolute","fixed"].indexOf(Wt(t).position)>=0&&Vt(t)?Xt(t):t;return Ft(n)?e.filter((function(t){return Ft(t)&&Ut(t,n)&&"body"!==Nt(t)})):[]}(t):[].concat(e),i=[].concat(r,[n]),o=i[0],s=i.reduce((function(e,n){var r=we(t,n);return e.top=Jt(r.top,e.top),e.right=te(r.right,e.right),e.bottom=te(r.bottom,e.bottom),e.left=Jt(r.left,e.left),e}),we(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(Ft(y)?y:y.contextElement||Yt(t.elements.popper),s,l),b=Ht(t.elements.reference),w=xe({reference:b,element:v,strategy:"absolute",placement:i}),x=be(Object.assign({},v,w)),S=c===Ct?x:b,k={top:_.top-S.top+m.top,bottom:S.bottom-_.bottom+m.bottom,left:_.left-S.left+m.left,right:S.right-_.right+m.right},C=t.modifiersData.offset;if(c===Ct&&C){var E=C[i];Object.keys(k).forEach((function(t){var e=[vt,gt].indexOf(t)>=0?1:-1,n=[mt,gt].indexOf(t)>=0?"y":"x";k[t]+=E[n]*e}))}return k}const ke={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=e.options.placement,v=qt(g),y=l||(v!==g&&f?function(t){if(qt(t)===_t)return[];var e=pe(t);return[me(t),e,me(e)]}(g):[pe(g)]),_=[g].concat(y).reduce((function(t,n){return t.concat(qt(n)===_t?function(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?Pt:l,c=se(r),d=c?a?Tt:Tt.filter((function(t){return se(t)===c})):bt,h=d.filter((function(t){return u.indexOf(t)>=0}));0===h.length&&(h=d);var p=h.reduce((function(e,n){return e[n]=Se(t,{placement:n,boundary:i,rootBoundary:o,padding:s})[qt(n)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),b=e.rects.reference,w=e.rects.popper,x=new Map,S=!0,k=_[0],C=0;C<_.length;C++){var E=_[C],T=qt(E),P=se(E)===wt,O=[mt,gt].indexOf(T)>=0,A=O?"width":"height",M=Se(e,{placement:E,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),L=O?P?vt:yt:P?gt:mt;b[A]>w[A]&&(L=pe(L));var I=pe(L),j=[];if(o&&j.push(M[T]<=0),a&&j.push(M[L]<=0,M[I]<=0),j.every((function(t){return t}))){k=E,S=!1;break}x.set(E,j)}if(S)for(var D=function(t){var e=_.find((function(e){var n=x.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return k=e,"break"},N=f?3:1;N>0&&"break"!==D(N);N--);e.placement!==k&&(e.modifiersData[r]._skip=!0,e.placement=k,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ce(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Ee(t){return[mt,vt,gt,yt].some((function(e){return t[e]>=0}))}const Te={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=Se(e,{elementContext:"reference"}),a=Se(e,{altBoundary:!0}),l=Ce(s,r),u=Ce(a,i,o),c=Ee(l),d=Ee(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}},Pe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=void 0===i?[0,0]:i,s=Pt.reduce((function(t,n){return t[n]=function(t,e,n){var r=qt(t),i=[yt,mt].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},e,{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[yt,vt].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,e.rects,o),t}),{}),a=s[e.placement],l=a.x,u=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}},Oe={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=xe({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},Ae={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,h=n.tether,p=void 0===h||h,f=n.tetherOffset,m=void 0===f?0:f,g=Se(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),v=qt(e.placement),y=se(e.placement),_=!y,b=Qt(v),w="x"===b?"y":"x",x=e.modifiersData.popperOffsets,S=e.rects.reference,k=e.rects.popper,C="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,E={x:0,y:0};if(x){if(o||a){var T="y"===b?mt:yt,P="y"===b?gt:vt,O="y"===b?"height":"width",A=x[b],M=x[b]+g[T],L=x[b]-g[P],I=p?-k[O]/2:0,j=y===wt?S[O]:k[O],D=y===wt?-k[O]:-S[O],N=e.elements.arrow,R=p&&N?$t(N):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=F[T],z=F[P],B=ne(0,S[O],R[O]),q=_?S[O]/2-I-B-V-C:j-B-V-C,H=_?-S[O]/2+I+B+z+C:D+B+z+C,$=e.elements.arrow&&Xt(e.elements.arrow),U=$?"y"===b?$.clientTop||0:$.clientLeft||0:0,W=e.modifiersData.offset?e.modifiersData.offset[e.placement][b]:0,G=x[b]+q-W-U,Y=x[b]+H-W;if(o){var Z=ne(p?te(M,G):M,A,p?Jt(L,Y):L);x[b]=Z,E[b]=Z-A}if(a){var K="x"===b?mt:yt,X="x"===b?gt:vt,Q=x[w],J=Q+g[K],tt=Q-g[X],et=ne(p?te(J,G):J,Q,p?Jt(tt,Y):tt);x[w]=et,E[w]=et-Q}}e.modifiersData[r]=E}},requiresIfExists:["offset"]};function Me(t,e,n){void 0===n&&(n=!1);var r=Vt(e);Vt(e)&&function(t){var e=t.getBoundingClientRect();e.width,t.offsetWidth,e.height,t.offsetHeight}(e);var i,o,s=Yt(e),a=Ht(t),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==Nt(e)||ye(s))&&(l=(i=e)!==Rt(i)&&Vt(i)?{scrollLeft:(o=i).scrollLeft,scrollTop:o.scrollTop}:ge(i)),Vt(e)?((u=Ht(e)).x+=e.clientLeft,u.y+=e.clientTop):s&&(u.x=ve(s))),{x:a.left+l.scrollLeft-u.x,y:a.top+l.scrollTop-u.y,width:a.width,height:a.height}}function Le(t){var e=new Map,n=new Set,r=[];return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||function t(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(r){if(!n.has(r)){var i=e.get(r);i&&t(i)}})),r.push(i)}(t)})),r}var Ie={placement:"bottom",modifiers:[],strategy:"absolute"};function je(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function De(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,r=void 0===n?[]:n,i=e.defaultOptions,o=void 0===i?Ie:i;return function(t,e,n){void 0===n&&(n=o);var i,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ie,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],u=!1,c={state:a,setOptions:function(n){var i="function"==typeof n?n(a.options):n;d(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:Ft(t)?_e(t):t.contextElement?_e(t.contextElement):[],popper:_e(e)};var s,u,h=function(t){var e=Le(t);return Dt.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((s=[].concat(r,a.options.modifiers),u=s.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(u).map((function(t){return u[t]}))));return a.orderedModifiers=h.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,n=t.options,r=void 0===n?{}:n,i=t.effect;if("function"==typeof i){var o=i({state:a,name:e,instance:c,options:r});l.push(o||function(){})}})),c.update()},forceUpdate:function(){if(!u){var t=a.elements,e=t.reference,n=t.popper;if(je(e,n)){a.rects={reference:Me(e,Xt(n),"fixed"===a.options.strategy),popper:$t(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var i=a.orderedModifiers[r],o=i.fn,s=i.options,l=void 0===s?{}:s,d=i.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:c})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(t){c.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(i())}))}))),s}),destroy:function(){d(),u=!0}};if(!je(t,e))return c;function d(){l.forEach((function(t){return t()})),l=[]}return c.setOptions(n).then((function(t){!u&&n.onFirstUpdate&&n.onFirstUpdate(t)})),c}}var Ne=De(),Re=De({defaultModifiers:[de,Oe,ue,Bt]}),Fe=De({defaultModifiers:[de,Oe,ue,Bt,Pe,ke,Ae,oe,Te]});const Ve=Object.freeze({__proto__:null,popperGenerator:De,detectOverflow:Se,createPopperBase:Ne,createPopper:Fe,createPopperLite:Re,top:mt,bottom:gt,right:vt,left:yt,auto:_t,basePlacements:bt,start:wt,end:xt,clippingParents:St,viewport:kt,popper:Ct,reference:Et,variationPlacements:Tt,placements:Pt,beforeRead:Ot,read:"read",afterRead:At,beforeMain:Mt,main:"main",afterMain:Lt,beforeWrite:It,write:"write",afterWrite:jt,modifierPhases:Dt,applyStyles:Bt,arrow:oe,computeStyles:ue,eventListeners:de,flip:ke,hide:Te,offset:Pe,popperOffsets:Oe,preventOverflow:Ae}),ze="dropdown",Be="Escape",qe="ArrowUp",He="ArrowDown",$e=new RegExp("ArrowUp|ArrowDown|Escape"),Ue="click.bs.dropdown.data-api",We="keydown.bs.dropdown.data-api",Ge="show",Ye='[data-bs-toggle="dropdown"]',Ze=".dropdown-menu",Ke=m()?"top-end":"top-start",Xe=m()?"top-start":"top-end",Qe=m()?"bottom-end":"bottom-start",Je=m()?"bottom-start":"bottom-end",tn=m()?"left-start":"right-start",en=m()?"right-start":"left-start",nn={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},rn={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class on extends F{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return nn}static get DefaultType(){return rn}static get NAME(){return ze}toggle(){return this._isShown()?this.hide():this.show()}show(){if(u(this._element)||this._isShown(this._menu))return;const t={relatedTarget:this._element};if(D.trigger(this._element,"show.bs.dropdown",t).defaultPrevented)return;const e=on.getParentFromElement(this._element);this._inNavbar?U.setDataAttribute(this._menu,"popper","none"):this._createPopper(e),"ontouchstart"in document.documentElement&&!e.closest(".navbar-nav")&&[].concat(...document.body.children).forEach(t=>D.on(t,"mouseover",d)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ge),this._element.classList.add(Ge),D.trigger(this._element,"shown.bs.dropdown",t)}hide(){if(u(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){D.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>D.off(t,"mouseover",d)),this._popper&&this._popper.destroy(),this._menu.classList.remove(Ge),this._element.classList.remove(Ge),this._element.setAttribute("aria-expanded","false"),U.removeDataAttribute(this._menu,"popper"),D.trigger(this._element,"hidden.bs.dropdown",t))}_getConfig(t){if(t={...this.constructor.Default,...U.getDataAttributes(this._element),...t},a(ze,t,this.constructor.DefaultType),"object"==typeof t.reference&&!o(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(ze.toUpperCase()+': Option "reference" provided type "object" without a required "getBoundingClientRect" method.');return t}_createPopper(t){if(void 0===Ve)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:o(this._config.reference)?e=s(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const n=this._getPopperConfig(),r=n.modifiers.find(t=>"applyStyles"===t.name&&!1===t.enabled);this._popper=Fe(e,this._menu,n),r&&U.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains(Ge)}_getMenuElement(){return W.next(this._element,Ze)[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains("dropend"))return tn;if(t.classList.contains("dropstart"))return en;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Xe:Ke:e?Je:Qe}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const n=W.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(l);n.length&&_(n,e,t===He,!n.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=on.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t&&(2===t.button||"keyup"===t.type&&"Tab"!==t.key))return;const e=W.find(Ye);for(let n=0,r=e.length;n<r;n++){const r=on.getInstance(e[n]);if(!r||!1===r._config.autoClose)continue;if(!r._isShown())continue;const i={relatedTarget:r._element};if(t){const e=t.composedPath(),n=e.includes(r._menu);if(e.includes(r._element)||"inside"===r._config.autoClose&&!n||"outside"===r._config.autoClose&&n)continue;if(r._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;"click"===t.type&&(i.clickEvent=t)}r._completeHide(i)}}static getParentFromElement(t){return r(t)||t.parentNode}static dataApiKeydownHandler(t){if(/input|textarea/i.test(t.target.tagName)?"Space"===t.key||t.key!==Be&&(t.key!==He&&t.key!==qe||t.target.closest(Ze)):!$e.test(t.key))return;const e=this.classList.contains(Ge);if(!e&&t.key===Be)return;if(t.preventDefault(),t.stopPropagation(),u(this))return;const n=this.matches(Ye)?this:W.prev(this,Ye)[0],r=on.getOrCreateInstance(n);if(t.key!==Be)return t.key===qe||t.key===He?(e||r.show(),void r._selectMenuItem(t)):void(e&&"Space"!==t.key||on.clearMenus());r.hide()}}D.on(document,We,Ye,on.dataApiKeydownHandler),D.on(document,We,Ze,on.dataApiKeydownHandler),D.on(document,Ue,on.clearMenus),D.on(document,"keyup.bs.dropdown.data-api",on.clearMenus),D.on(document,Ue,Ye,(function(t){t.preventDefault(),on.getOrCreateInstance(this).toggle()})),g(on);const sn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",an=".sticky-top";class ln{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",e=>e+t),this._setElementAttributes(sn,"paddingRight",e=>e+t),this._setElementAttributes(an,"marginRight",e=>e-t)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const r=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+r)return;this._saveInitialAttribute(t,e);const i=window.getComputedStyle(t)[e];t.style[e]=n(Number.parseFloat(i))+"px"})}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(sn,"paddingRight"),this._resetElementAttributes(an,"marginRight")}_saveInitialAttribute(t,e){const n=t.style[e];n&&U.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const n=U.getDataAttribute(t,e);void 0===n?t.style.removeProperty(e):(U.removeDataAttribute(t,e),t.style[e]=n)})}_applyManipulationCallback(t,e){o(t)?e(t):W.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const un={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},cn={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},dn="mousedown.bs.backdrop";class hn{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&h(this._getElement()),this._getElement().classList.add("show"),this._emulateAnimation(()=>{v(t)})):v(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation(()=>{this.dispose(),v(t)})):v(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_getConfig(t){return(t={...un,..."object"==typeof t?t:{}}).rootElement=s(t.rootElement),a("backdrop",t,cn),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),D.on(this._getElement(),dn,()=>{v(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&(D.off(this._element,dn),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){y(t,this._getElement(),this._config.isAnimated)}}const pn={trapElement:null,autofocus:!0},fn={trapElement:"element",autofocus:"boolean"},mn=".bs.focustrap",gn="backward";class vn{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),D.off(document,mn),D.on(document,"focusin.bs.focustrap",t=>this._handleFocusin(t)),D.on(document,"keydown.tab.bs.focustrap",t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,D.off(document,mn))}_handleFocusin(t){const{target:e}=t,{trapElement:n}=this._config;if(e===document||e===n||n.contains(e))return;const r=W.focusableChildren(n);0===r.length?n.focus():this._lastTabNavDirection===gn?r[r.length-1].focus():r[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?gn:"forward")}_getConfig(t){return t={...pn,..."object"==typeof t?t:{}},a("focustrap",t,fn),t}}const yn={backdrop:!0,keyboard:!0,focus:!0},_n={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},bn="hidden.bs.modal",wn="show.bs.modal",xn="resize.bs.modal",Sn="click.dismiss.bs.modal",kn="keydown.dismiss.bs.modal",Cn="mousedown.dismiss.bs.modal",En="modal-open",Tn="modal-static";class Pn extends F{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=W.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new ln}static get Default(){return yn}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||D.trigger(this._element,wn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(En),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),D.on(this._dialog,Cn,()=>{D.one(this._element,"mouseup.dismiss.bs.modal",t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(t)))}hide(){if(!this._isShown||this._isTransitioning)return;if(D.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove("show"),D.off(this._element,Sn),D.off(this._dialog,Cn),this._queueCallback(()=>this._hideModal(),this._element,t)}dispose(){[window,this._dialog].forEach(t=>D.off(t,".bs.modal")),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new hn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new vn({trapElement:this._element})}_getConfig(t){return t={...yn,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}},a("modal",t,_n),t}_showElement(t){const e=this._isAnimated(),n=W.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,n&&(n.scrollTop=0),e&&h(this._element),this._element.classList.add("show"),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,D.trigger(this._element,"shown.bs.modal",{relatedTarget:t})},this._dialog,e)}_setEscapeEvent(){this._isShown?D.on(this._element,kn,t=>{this._config.keyboard&&"Escape"===t.key?(t.preventDefault(),this.hide()):this._config.keyboard||"Escape"!==t.key||this._triggerBackdropTransition()}):D.off(this._element,kn)}_setResizeEvent(){this._isShown?D.on(window,xn,()=>this._adjustDialog()):D.off(window,xn)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(En),this._resetAdjustments(),this._scrollBar.reset(),D.trigger(this._element,bn)})}_showBackdrop(t){D.on(this._element,Sn,t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())}),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(D.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const{classList:t,scrollHeight:e,style:n}=this._element,r=e>document.documentElement.clientHeight;!r&&"hidden"===n.overflowY||t.contains(Tn)||(r||(n.overflowY="hidden"),t.add(Tn),this._queueCallback(()=>{t.remove(Tn),r||this._queueCallback(()=>{n.overflowY=""},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;(!n&&t&&!m()||n&&!t&&m())&&(this._element.style.paddingLeft=e+"px"),(n&&!t&&!m()||!n&&t&&m())&&(this._element.style.paddingRight=e+"px")}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const n=Pn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}}))}}D.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=r(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),D.one(e,wn,t=>{t.defaultPrevented||D.one(e,bn,()=>{l(this)&&this.focus()})});const n=W.findOne(".modal.show");n&&Pn.getInstance(n).hide(),Pn.getOrCreateInstance(e).toggle(this)})),V(Pn),g(Pn);const On="offcanvas",An={backdrop:!0,keyboard:!0,scroll:!1},Mn={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},Ln=".offcanvas.show",In="hidden.bs.offcanvas";class jn extends F{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return On}static get Default(){return An}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||D.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new ln).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add("show"),this._queueCallback(()=>{this._config.scroll||this._focustrap.activate(),D.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(D.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove("show"),this._backdrop.hide(),this._queueCallback(()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new ln).reset(),D.trigger(this._element,In)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...An,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}},a(On,t,Mn),t}_initializeBackDrop(){return new hn({className:"offcanvas-backdrop",isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new vn({trapElement:this._element})}_addEventListeners(){D.on(this._element,"keydown.dismiss.bs.offcanvas",t=>{this._config.keyboard&&"Escape"===t.key&&this.hide()})}static jQueryInterface(t){return this.each((function(){const e=jn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}D.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=r(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),u(this))return;D.one(e,In,()=>{l(this)&&this.focus()});const n=W.findOne(Ln);n&&n!==e&&jn.getInstance(n).hide(),jn.getOrCreateInstance(e).toggle(this)})),D.on(window,"load.bs.offcanvas.data-api",()=>W.find(Ln).forEach(t=>jn.getOrCreateInstance(t).show())),V(jn),g(jn);const Dn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Nn=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Rn=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Fn=(t,e)=>{const n=t.nodeName.toLowerCase();if(e.includes(n))return!Dn.has(n)||Boolean(Nn.test(t.nodeValue)||Rn.test(t.nodeValue));const r=e.filter(t=>t instanceof RegExp);for(let t=0,e=r.length;t<e;t++)if(r[t].test(n))return!0;return!1};function Vn(t,e,n){if(!t.length)return t;if(n&&"function"==typeof n)return n(t);const r=(new window.DOMParser).parseFromString(t,"text/html"),i=[].concat(...r.body.querySelectorAll("*"));for(let t=0,n=i.length;t<n;t++){const n=i[t],r=n.nodeName.toLowerCase();if(!Object.keys(e).includes(r)){n.remove();continue}const o=[].concat(...n.attributes),s=[].concat(e["*"]||[],e[r]||[]);o.forEach(t=>{Fn(t,s)||n.removeAttribute(t.nodeName)})}return r.body.innerHTML}const zn="tooltip",Bn=new Set(["sanitize","allowList","sanitizeFn"]),qn={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},Hn={AUTO:"auto",TOP:"top",RIGHT:m()?"left":"right",BOTTOM:"bottom",LEFT:m()?"right":"left"},$n={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},Un={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Wn="fade",Gn="show",Yn="show",Zn=".tooltip-inner",Kn="hide.bs.modal",Xn="hover";class Qn extends F{constructor(t,e){if(void 0===Ve)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return $n}static get NAME(){return zn}static get Event(){return Un}static get DefaultType(){return qn}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(Gn))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),D.off(this._element.closest(".modal"),Kn,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=D.trigger(this._element,this.constructor.Event.SHOW),e=c(this._element),n=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!n)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(Zn).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const r=this.getTipElement(),i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME);r.setAttribute("id",i),this._element.setAttribute("aria-describedby",i),this._config.animation&&r.classList.add(Wn);const o="function"==typeof this._config.placement?this._config.placement.call(this,r,this._element):this._config.placement,s=this._getAttachment(o);this._addAttachmentClass(s);const{container:a}=this._config;R.set(r,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(a.append(r),D.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=Fe(this._element,r,this._getPopperConfig(s)),r.classList.add(Gn);const l=this._resolvePossibleFunction(this._config.customClass);l&&r.classList.add(...l.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>{D.on(t,"mouseover",d)});const u=this.tip.classList.contains(Wn);this._queueCallback(()=>{const t=this._hoverState;this._hoverState=null,D.trigger(this._element,this.constructor.Event.SHOWN),"out"===t&&this._leave(null,this)},this.tip,u)}hide(){if(!this._popper)return;const t=this.getTipElement();if(D.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove(Gn),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>D.off(t,"mouseover",d)),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const e=this.tip.classList.contains(Wn);this._queueCallback(()=>{this._isWithActiveTrigger()||(this._hoverState!==Yn&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),D.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())},this.tip,e),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(Wn,Gn),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),Zn)}_sanitizeAndSetContent(t,e,n){const r=W.findOne(n,t);e||!r?this.setElementContent(r,e):r.remove()}setElementContent(t,e){if(null!==t)return o(e)?(e=s(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=Vn(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return Hn[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(t=>{if("click"===t)D.on(this._element,this.constructor.Event.CLICK,this._config.selector,t=>this.toggle(t));else if("manual"!==t){const e=t===Xn?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,n=t===Xn?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;D.on(this._element,e,this._config.selector,t=>this._enter(t)),D.on(this._element,n,this._config.selector,t=>this._leave(t))}}),this._hideModalHandler=()=>{this._element&&this.hide()},D.on(this._element.closest(".modal"),Kn,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?"focus":Xn]=!0),e.getTipElement().classList.contains(Gn)||e._hoverState===Yn?e._hoverState=Yn:(clearTimeout(e._timeout),e._hoverState=Yn,e._config.delay&&e._config.delay.show?e._timeout=setTimeout(()=>{e._hoverState===Yn&&e.show()},e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?"focus":Xn]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e._config.delay&&e._config.delay.hide?e._timeout=setTimeout(()=>{"out"===e._hoverState&&e.hide()},e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=U.getDataAttributes(this._element);return Object.keys(e).forEach(t=>{Bn.has(t)&&delete e[t]}),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:s(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),a(zn,t,this.constructor.DefaultType),t.sanitize&&(t.template=Vn(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),n=t.getAttribute("class").match(e);null!==n&&n.length>0&&n.map(t=>t.trim()).forEach(e=>t.classList.remove(e))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=Qn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}g(Qn);const Jn={...Qn.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},tr={...Qn.DefaultType,content:"(string|element|function)"},er={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class nr extends Qn{static get Default(){return Jn}static get NAME(){return"popover"}static get Event(){return er}static get DefaultType(){return tr}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),".popover-header"),this._sanitizeAndSetContent(t,this._getContent(),".popover-body")}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return"bs-popover"}static jQueryInterface(t){return this.each((function(){const e=nr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}g(nr);const rr="scrollspy",ir={offset:10,method:"auto",target:""},or={offset:"number",method:"string",target:"(string|element)"},sr="active",ar=".nav-link, .list-group-item, .dropdown-item",lr="position";class ur extends F{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,D.on(this._scrollElement,"scroll.bs.scrollspy",()=>this._process()),this.refresh(),this._process()}static get Default(){return ir}static get NAME(){return rr}refresh(){const t=this._scrollElement===this._scrollElement.window?"offset":lr,e="auto"===this._config.method?t:this._config.method,r=e===lr?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),W.find(ar,this._config.target).map(t=>{const i=n(t),o=i?W.findOne(i):null;if(o){const t=o.getBoundingClientRect();if(t.width||t.height)return[U[e](o).top+r,i]}return null}).filter(t=>t).sort((t,e)=>t[0]-e[0]).forEach(t=>{this._offsets.push(t[0]),this._targets.push(t[1])})}dispose(){D.off(this._scrollElement,".bs.scrollspy"),super.dispose()}_getConfig(t){return(t={...ir,...U.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target=s(t.target)||document.documentElement,a(rr,t,or),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}_activate(t){this._activeTarget=t,this._clear();const e=ar.split(",").map(e=>`${e}[data-bs-target="${t}"],${e}[href="${t}"]`),n=W.findOne(e.join(","),this._config.target);n.classList.add(sr),n.classList.contains("dropdown-item")?W.findOne(".dropdown-toggle",n.closest(".dropdown")).classList.add(sr):W.parents(n,".nav, .list-group").forEach(t=>{W.prev(t,".nav-link, .list-group-item").forEach(t=>t.classList.add(sr)),W.prev(t,".nav-item").forEach(t=>{W.children(t,".nav-link").forEach(t=>t.classList.add(sr))})}),D.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})}_clear(){W.find(ar,this._config.target).filter(t=>t.classList.contains(sr)).forEach(t=>t.classList.remove(sr))}static jQueryInterface(t){return this.each((function(){const e=ur.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}D.on(window,"load.bs.scrollspy.data-api",()=>{W.find('[data-bs-spy="scroll"]').forEach(t=>new ur(t))}),g(ur);const cr="active",dr=".active",hr=":scope > li > .active";class pr extends F{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(cr))return;let t;const e=r(this._element),n=this._element.closest(".nav, .list-group");if(n){const e="UL"===n.nodeName||"OL"===n.nodeName?hr:dr;t=W.find(e,n),t=t[t.length-1]}const i=t?D.trigger(t,"hide.bs.tab",{relatedTarget:this._element}):null;if(D.trigger(this._element,"show.bs.tab",{relatedTarget:t}).defaultPrevented||null!==i&&i.defaultPrevented)return;this._activate(this._element,n);const o=()=>{D.trigger(t,"hidden.bs.tab",{relatedTarget:this._element}),D.trigger(this._element,"shown.bs.tab",{relatedTarget:t})};e?this._activate(e,e.parentNode,o):o()}_activate(t,e,n){const r=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?W.children(e,dr):W.find(hr,e))[0],i=n&&r&&r.classList.contains("fade"),o=()=>this._transitionComplete(t,r,n);r&&i?(r.classList.remove("show"),this._queueCallback(o,t,!0)):o()}_transitionComplete(t,e,n){if(e){e.classList.remove(cr);const t=W.findOne(":scope > .dropdown-menu .active",e.parentNode);t&&t.classList.remove(cr),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add(cr),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),h(t),t.classList.contains("fade")&&t.classList.add("show");let r=t.parentNode;if(r&&"LI"===r.nodeName&&(r=r.parentNode),r&&r.classList.contains("dropdown-menu")){const e=t.closest(".dropdown");e&&W.find(".dropdown-toggle",e).forEach(t=>t.classList.add(cr)),t.setAttribute("aria-expanded",!0)}n&&n()}static jQueryInterface(t){return this.each((function(){const e=pr.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}D.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),u(this)||pr.getOrCreateInstance(this).show()})),g(pr);const fr="show",mr="showing",gr={animation:"boolean",autohide:"boolean",delay:"number"},vr={animation:!0,autohide:!0,delay:5e3};class yr extends F{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return gr}static get Default(){return vr}static get NAME(){return"toast"}show(){D.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove("hide"),h(this._element),this._element.classList.add(fr),this._element.classList.add(mr),this._queueCallback(()=>{this._element.classList.remove(mr),D.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this._element.classList.contains(fr)&&(D.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(mr),this._queueCallback(()=>{this._element.classList.add("hide"),this._element.classList.remove(mr),this._element.classList.remove(fr),D.trigger(this._element,"hidden.bs.toast")},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this._element.classList.contains(fr)&&this._element.classList.remove(fr),super.dispose()}_getConfig(t){return t={...vr,...U.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},a("toast",t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){D.on(this._element,"mouseover.bs.toast",t=>this._onInteraction(t,!0)),D.on(this._element,"mouseout.bs.toast",t=>this._onInteraction(t,!1)),D.on(this._element,"focusin.bs.toast",t=>this._onInteraction(t,!0)),D.on(this._element,"focusout.bs.toast",t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=yr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return V(yr),g(yr),{Alert:z,Button:q,Carousel:it,Collapse:ft,Dropdown:on,Modal:Pn,Offcanvas:jn,Popover:nr,ScrollSpy:ur,Tab:pr,Toast:yr,Tooltip:Qn}})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSHeader=e():t.HSHeader=e()}(window,(function(){return d={"./src/js/hs-header.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return HSHeader; });\n/* harmony import */ var _observers_sticky__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./observers/sticky */ \"./src/js/observers/sticky.js\");\n/* harmony import */ var _observers_moment_show_hide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./observers/moment-show-hide */ \"./src/js/observers/moment-show-hide.js\");\n/* harmony import */ var _observers_show_hide__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./observers/show-hide */ \"./src/js/observers/show-hide.js\");\n/* harmony import */ var _observers_hide_section__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./observers/hide-section */ \"./src/js/observers/hide-section.js\");\n/* harmony import */ var _observers_has_hidden_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./observers/has-hidden-element */ \"./src/js/observers/has-hidden-element.js\");\n/* harmony import */ var _observers_floating__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./observers/floating */ \"./src/js/observers/floating.js\");\n/* harmony import */ var _observers_without_behavior__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./observers/without-behavior */ \"./src/js/observers/without-behavior.js\");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\r\n* HSHeader Plugin\r\n* @version: 3.0.0 (Mon, 25 Mar 2021)\r\n* @author: HtmlStream\r\n* @event-namespace: .HSHeader\r\n* @license: Htmlstream Libraries (https://htmlstream.com/)\r\n* Copyright 2019 Htmlstream\r\n*/\n// Sticky\n // Moment Show / Hide\n\n // Show / Hide\n\n // Hide Section\n\n // Has Hidden Element\n\n // Floating\n\n // Without Behavior\n\n\n\nvar HSHeader = /*#__PURE__*/function () {\n function HSHeader(el, config, observers) {\n _classCallCheck(this, HSHeader);\n\n this.element = typeof el === \"string\" ? document.querySelector(el) : el;\n this.config = config;\n this.observers = observers && Object.prototype.toString.call(observers) === '[object Object]' ? observers : {};\n this.viewport = 'xs';\n this.defaults = {\n fixMoment: 0,\n fixMomentClasses: null,\n fixMomentExclude: null,\n fixEffect: 'slide',\n breakpoint: 'lg',\n breakpointsMap: {\n 'md': 768,\n 'sm': 576,\n 'lg': 992,\n 'xl': 1200\n },\n effectCompensation: false,\n effectCompensationStartClass: false,\n effectCompensationEndClass: false\n };\n }\n\n _createClass(HSHeader, [{\n key: \"init\",\n value: function init() {\n var self = this,\n element = this.element;\n var dataSettings = element.hasAttribute('data-hs-header-options') ? JSON.parse(element.getAttribute('data-hs-header-options')) : {};\n if (!element || element.hasAttribute('HSHeader')) return;\n this.config = Object.assign({}, this.defaults, dataSettings, this.config);\n\n this._detectObservers();\n\n this.fixMediaDifference(this.element);\n this.checkViewport();\n onScroll();\n document.addEventListener('scroll', onScroll);\n onResize();\n window.addEventListener('resize', onResize);\n\n function onScroll() {\n window.HSHeader = null;\n\n if (window.pageYOffset < self.config.fixMoment - 100 && self.config.effectCompensation === true) {\n element.style.top = -window.pageYOffset;\n element.classList.add(self.config.effectCompensationStartClass);\n element.classList.remove(self.config.effectCompensationEndClass);\n } else if (self.config.effectCompensation === true) {\n element.style.top = 0;\n element.classList.add(self.config.effectCompensationEndClass);\n element.classList.remove(self.config.effectCompensationStartClass);\n }\n\n if (element.hasAttribute('HSHeader')) {\n self.notify();\n }\n\n element.setAttribute('HSHeader', true);\n }\n\n function onResize() {\n if (self.resizeTimeOutId) clearTimeout(self.resizeTimeOutId);\n self.resizeTimeOutId = setTimeout(function () {\n // self.checkViewport()\n self.update();\n }, 100);\n }\n\n return this.element;\n }\n }, {\n key: \"header\",\n value: function header(element, config, observers) {\n if (!element || !element.length) return;\n this.element = element;\n this.config = config;\n this.observers = observers && $.isPlainObject(observers) ? observers : {};\n this.viewport = 'xs';\n this.checkViewport();\n }\n }, {\n key: \"_detectObservers\",\n value: function _detectObservers() {\n if (!this.element) return;\n var observers = this.observers = {\n 'xs': [],\n 'sm': [],\n 'md': [],\n 'lg': [],\n 'xl': []\n };\n /* ------------------------ xs -------------------------*/\n // Has Hidden Element\n\n if (this.element.classList.contains('navbar-has-hidden-element')) {\n observers['xs'].push(new _observers_has_hidden_element__WEBPACK_IMPORTED_MODULE_4__[\"default\"](this.element).init());\n } // Sticky top\n\n\n if (this.element.classList.contains('navbar-sticky-top')) {\n if (this.element.classList.contains('navbar-show-hide')) {\n observers['xs'].push(new _observers_moment_show_hide__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.element).init());\n } else if (this.element.classList.contains('navbar-toggle')) {\n observers['xs'].push(new _observers_hide_section__WEBPACK_IMPORTED_MODULE_3__[\"default\"](this.element).init());\n }\n\n observers['xs'].push(new _observers_sticky__WEBPACK_IMPORTED_MODULE_0__[\"default\"](this.element).init());\n } // Floating\n\n\n if (this.element.classList.contains('navbar-floating')) {\n observers['xs'].push(new _observers_floating__WEBPACK_IMPORTED_MODULE_5__[\"default\"](this.element).init());\n }\n\n if (this.element.classList.contains('navbar-invulnerable')) {\n observers['xs'].push(new _observers_without_behavior__WEBPACK_IMPORTED_MODULE_6__[\"default\"](this.element).init());\n } // Abs top & Static\n\n\n if (this.element.classList.contains('navbar-absolute-top') || this.element.classList.contains('navbar-static')) {\n if (this.element.classList.contains('navbar-show-hide')) {\n observers['xs'].push(new _observers_show_hide__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.element, this.config).init());\n }\n }\n\n return observers;\n }\n }, {\n key: \"fixMediaDifference\",\n value: function fixMediaDifference(element) {\n if (!element || !element.length || !element.filter(function (el) {\n return el.closest('[class*=\"navbar-side\"]');\n }).length) return;\n var toggleable;\n\n if (element.classList.contains('navbar-side-left-xl') || element.classList.contains('navbar-side-right-xl')) {\n toggleable = element.querySelector('.navbar-expand-xl');\n\n if (toggleable) {\n toggleable.classList.remove('navbar-expand-xl');\n toggleable.classList.add('navbar-expand-lg');\n }\n } else if (element.classList.contains('navbar-side-left-lg') || element.classList.contains('navbar-side-right-lg')) {\n toggleable = element.querySelector('.navbar-expand-lg');\n\n if (toggleable) {\n toggleable.classList.remove('navbar-expand-lg');\n toggleable.classList.add('navbar-expand-md');\n }\n } else if (element.classList.contains('navbar-side-left-md') || element.classList.contains('navbar-side-right-md')) {\n toggleable = element.querySelector('.navbar-expand-md');\n\n if (toggleable) {\n toggleable.classList.remove('navbar-expand-md');\n toggleable.classList.add('navbar-expand-sm');\n }\n } else if (element.classList.contains('navbar-side-left-sm') || element.classList.contains('navbar-side-right-sm')) {\n toggleable = element.querySelector('.navbar-expand-sm');\n\n if (toggleable) {\n toggleable.classList.remove('navbar-expand-sm');\n toggleable.classList.add('navbar-expand');\n }\n }\n }\n }, {\n key: \"checkViewport\",\n value: function checkViewport() {\n if (window.innerWidth > this.config.breakpointsMap['sm'] && this.observers['sm'].length) {\n this.prevViewport = this.viewport;\n this.viewport = 'sm';\n\n if (this.config.fixMoment && window.pageYOffset > this.config.fixMoment) {\n if (typeof this.config.breakpointsMap['sm'] === 'undefined') {\n this.element.classList.remove('navbar-scrolled');\n } else {\n this.element.classList.add('navbar-scrolled');\n }\n }\n\n return this;\n }\n\n if (window.innerWidth > this.config.breakpointsMap['md'] && this.observers['md'].length) {\n this.prevViewport = this.viewport;\n this.viewport = 'md';\n\n if (this.config.fixMoment && window.pageYOffset > this.config.fixMoment) {\n if (typeof this.config.breakpointsMap['md'] === 'undefined') {\n this.element.classList.remove('navbar-scrolled');\n } else {\n this.element.classList.add('navbar-scrolled');\n }\n }\n\n return this;\n }\n\n if (window.innerWidth > this.config.breakpointsMap['lg'] && this.observers['lg'].length) {\n this.prevViewport = this.viewport;\n this.viewport = 'lg';\n\n if (this.config.fixMoment && window.pageYOffset > this.config.fixMoment) {\n if (typeof this.config.breakpointsMap['lg'] === 'undefined') {\n this.element.classList.remove('navbar-scrolled');\n } else {\n this.element.classList.add('navbar-scrolled');\n }\n }\n\n return this;\n }\n\n if (window.innerWidth > this.config.breakpointsMap['xl'] && this.observers['xl'].length) {\n this.prevViewport = this.viewport;\n this.viewport = 'xl';\n\n if (this.config.fixMoment && window.pageYOffset > this.config.fixMoment) {\n if (typeof this.config.breakpointsMap['xl'] === 'undefined') {\n this.element.classList.remove('navbar-scrolled');\n } else {\n this.element.classList.add('navbar-scrolled');\n }\n }\n\n return this;\n }\n\n if (this.prevViewport) this.prevViewport = this.viewport;\n\n if (this.config.fixMoment && window.pageYOffset > this.config.fixMoment) {\n if (typeof this.config.breakpointsMap['xs'] === 'undefined') {\n this.element.classList.remove('navbar-scrolled');\n } else {\n this.element.classList.add('navbar-scrolled');\n }\n }\n\n this.viewport = 'xs';\n return this;\n }\n }, {\n key: \"notify\",\n value: function notify() {\n if (this.prevViewport) {\n this.observers[this.prevViewport].forEach(function (observer) {\n observer.destroy();\n });\n this.prevViewport = null;\n }\n\n this.observers[this.viewport].forEach(function (observer) {\n observer.check();\n });\n return this;\n }\n }, {\n key: \"update\",\n value: function update() {\n for (var viewport in this.observers) {\n this.observers[viewport].forEach(function (observer) {\n observer.destroy();\n });\n }\n\n this.prevViewport = null;\n this.observers[this.viewport].forEach(function (observer) {\n observer.reinit();\n });\n return this;\n }\n }]);\n\n return HSHeader;\n}();\n\n\n\n//# sourceURL=webpack://HSHeader/./src/js/hs-header.js?")},"./src/js/observers/abstract.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSAbstractObserver; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar HSAbstractObserver = /*#__PURE__*/function () {\n function HSAbstractObserver(element) {\n _classCallCheck(this, HSAbstractObserver);\n\n this.element = element;\n this.defaultState = true;\n }\n\n _createClass(HSAbstractObserver, [{\n key: "reinit",\n value: function reinit() {\n this.destroy().init().check();\n }\n }]);\n\n return HSAbstractObserver;\n}();\n\n\n\n//# sourceURL=webpack://HSHeader/./src/js/observers/abstract.js?')},"./src/js/observers/floating.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSHeaderFloatingObserver; });\n/* harmony import */ var _abstract__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstract */ "./src/js/observers/abstract.js");\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\nvar HSHeaderFloatingObserver = /*#__PURE__*/function (_HSAbstractObserver) {\n _inherits(HSHeaderFloatingObserver, _HSAbstractObserver);\n\n var _super = _createSuper(HSHeaderFloatingObserver);\n\n function HSHeaderFloatingObserver(element) {\n var _this;\n\n _classCallCheck(this, HSHeaderFloatingObserver);\n\n _this = _super.call(this, element);\n _this.dataSettings = _this.element.hasAttribute(\'data-hs-header-options\') ? JSON.parse(_this.element.getAttribute(\'data-hs-header-options\')) : {};\n return _this;\n }\n\n _createClass(HSHeaderFloatingObserver, [{\n key: "init",\n value: function init() {\n this.offset = this.element.offsetTop;\n this.sections = this.element.querySelectorAll(\'.navbar-section\');\n this.defaultState = true;\n return this;\n }\n }, {\n key: "destroy",\n value: function destroy() {\n this.toDefaultState();\n return this;\n }\n }, {\n key: "check",\n value: function check() {\n var docScrolled = window.pageYOffset;\n\n if (docScrolled > this.offset && this.defaultState) {\n this.changeState();\n } else if (docScrolled <= this.offset && !this.defaultState) {\n this.toDefaultState();\n }\n\n return this;\n }\n }, {\n key: "changeState",\n value: function changeState() {\n this.element.classList.add(\'navbar-scrolled\');\n this.element.classList.add(this.dataSettings.fixMomentClasses);\n this.element.classList.remove(this.dataSettings.fixMomentExclude);\n\n if (this.sections.length) {\n this.sections.forEach(function ($section) {\n var dataSettings = $section.hasAttribute(\'data-hs-navbar-item-options\') ? JSON.parse($section.getAttribute(\'data-hs-navbar-item-options\')) : {};\n $section.classList.add(dataSettings.fixMomentClasses);\n $section.classList.remove(dataSettings.fixMomentExclude);\n });\n }\n\n this.defaultState = !this.defaultState;\n return this;\n }\n }, {\n key: "toDefaultState",\n value: function toDefaultState() {\n this.element.classList.remove(\'navbar-scrolled\');\n this.element.classList.remove(this.dataSettings.fixMomentClasses);\n this.element.classList.add(this.dataSettings.fixMomentExclude);\n\n if (this.sections.length) {\n this.sections.forEach(function ($section) {\n var dataSettings = $section.hasAttribute(\'data-hs-navbar-item-options\') ? JSON.parse($section.getAttribute(\'data-hs-navbar-item-options\')) : {};\n $section.classList.add(dataSettings.fixMomentClasses);\n $section.classList.remove(dataSettings.fixMomentExclude);\n });\n }\n\n this.defaultState = !this.defaultState;\n return this;\n }\n }]);\n\n return HSHeaderFloatingObserver;\n}(_abstract__WEBPACK_IMPORTED_MODULE_0__["default"]);\n\n\n\n//# sourceURL=webpack://HSHeader/./src/js/observers/floating.js?')},"./src/js/observers/has-hidden-element.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSHeaderHasHiddenElement; });\n/* harmony import */ var _abstract__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstract */ "./src/js/observers/abstract.js");\n/* harmony import */ var _utils_slideUp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/slideUp */ "./src/js/utils/slideUp.js");\n/* harmony import */ var _utils_slideDown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/slideDown */ "./src/js/utils/slideDown.js");\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\nvar HSHeaderHasHiddenElement = /*#__PURE__*/function (_HSAbstractObserver) {\n _inherits(HSHeaderHasHiddenElement, _HSAbstractObserver);\n\n var _super = _createSuper(HSHeaderHasHiddenElement);\n\n function HSHeaderHasHiddenElement(element) {\n var _this;\n\n _classCallCheck(this, HSHeaderHasHiddenElement);\n\n _this = _super.call(this, element);\n _this.config = {\n animated: true\n };\n _this.dataSettings = _this.element.hasAttribute(\'data-hs-header-options\') ? JSON.parse(_this.element.getAttribute(\'data-hs-header-options\')) : {};\n return _this;\n }\n\n _createClass(HSHeaderHasHiddenElement, [{\n key: "init",\n value: function init() {\n this.offset = isFinite(this.dataSettings.fixMoment) ? this.dataSettings.fixMoment : 5;\n this.elements = this.element.querySelectorAll(\'.navbar-hidden-element\');\n this.defaultState = true;\n return this;\n }\n }, {\n key: "destroy",\n value: function destroy() {\n this.toDefaultState();\n return this;\n }\n }, {\n key: "check",\n value: function check() {\n if (!this.elements.length) return this;\n var docScrolled = window.pageYOffset;\n\n if (docScrolled > this.offset && this.defaultState) {\n this.changeState();\n } else if (docScrolled <= this.offset && !this.defaultState) {\n this.toDefaultState();\n }\n\n return this;\n }\n }, {\n key: "changeState",\n value: function changeState() {\n if (this.config.animated) {\n this.elements.forEach(function (item) {\n Object(_utils_slideUp__WEBPACK_IMPORTED_MODULE_1__["default"])(item);\n });\n } else {\n this.elements.forEach(function (item) {\n item.style.display = \'none\';\n });\n }\n\n this.defaultState = !this.defaultState;\n return this;\n }\n }, {\n key: "toDefaultState",\n value: function toDefaultState() {\n if (this.config.animated) {\n this.elements.forEach(function (item) {\n Object(_utils_slideDown__WEBPACK_IMPORTED_MODULE_2__["default"])(item);\n });\n } else {\n this.elements.forEach(function (item) {\n item.style.display = \'block\';\n });\n }\n\n this.defaultState = !this.defaultState;\n return this;\n }\n }]);\n\n return HSHeaderHasHiddenElement;\n}(_abstract__WEBPACK_IMPORTED_MODULE_0__["default"]);\n\n\n\n//# sourceURL=webpack://HSHeader/./src/js/observers/has-hidden-element.js?')},"./src/js/observers/hide-section.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSHeaderHideSectionObserver; });\n/* harmony import */ var _abstract__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstract */ "./src/js/observers/abstract.js");\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\nvar HSHeaderHideSectionObserver = /*#__PURE__*/function (_HSAbstractObserver) {\n _inherits(HSHeaderHideSectionObserver, _HSAbstractObserver);\n\n var _super = _createSuper(HSHeaderHideSectionObserver);\n\n function HSHeaderHideSectionObserver(element) {\n var _this;\n\n _classCallCheck(this, HSHeaderHideSectionObserver);\n\n _this = _super.call(this, element);\n _this.dataSettings = _this.element.hasAttribute(\'data-hs-header-options\') ? JSON.parse(_this.element.getAttribute(\'data-hs-header-options\')) : {};\n return _this;\n }\n\n _createClass(HSHeaderHideSectionObserver, [{\n key: "init",\n value: function init() {\n this.offset = isFinite(this.dataSettings.fixMoment) ? this.dataSettings.fixMoment : 5;\n this.section = this.element.querySelector(\'.navbar-section-hidden\');\n this.defaultState = true;\n this.sectionHeight = this.section ? this.section.offsetHeight : 0;\n return this;\n }\n }, {\n key: "destroy",\n value: function destroy() {\n if (this.section) {\n this.element.transition = \'margin-top .5s\';\n this.element.style.marginTop = 0;\n }\n\n return this;\n }\n }, {\n key: "check",\n value: function check() {\n if (!this.section) return this;\n var docScrolled = window.pageYOffset;\n\n if (docScrolled > this.offset && this.defaultState) {\n this.changeState();\n } else if (docScrolled <= this.offset && !this.defaultState) {\n this.toDefaultState();\n }\n\n return this;\n }\n }, {\n key: "changeState",\n value: function changeState() {\n var self = this;\n this.element.transition = \'margin-top .5s\';\n this.element.style.marginTop = self.sectionHeight * -1 - 1 + \'px\';\n this.defaultState = !this.defaultState;\n return this;\n }\n }, {\n key: "toDefaultState",\n value: function toDefaultState() {\n this.element.transition = \'margin-top .5s\';\n this.element.style.marginTop = 0;\n this.defaultState = !this.defaultState;\n return this;\n }\n }]);\n\n return HSHeaderHideSectionObserver;\n}(_abstract__WEBPACK_IMPORTED_MODULE_0__["default"]);\n\n\n\n//# sourceURL=webpack://HSHeader/./src/js/observers/hide-section.js?')},"./src/js/observers/moment-show-hide.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSHeaderMomentShowHideObserver; });\n/* harmony import */ var _abstract__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstract */ "./src/js/observers/abstract.js");\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\nvar HSHeaderMomentShowHideObserver = /*#__PURE__*/function (_HSAbstractObserver) {\n _inherits(HSHeaderMomentShowHideObserver, _HSAbstractObserver);\n\n var _super = _createSuper(HSHeaderMomentShowHideObserver);\n\n function HSHeaderMomentShowHideObserver(element) {\n var _this;\n\n _classCallCheck(this, HSHeaderMomentShowHideObserver);\n\n _this = _super.call(this, element);\n _this.dataSettings = _this.element.hasAttribute(\'data-hs-header-options\') ? JSON.parse(_this.element.getAttribute(\'data-hs-header-options\')) : {};\n return _this;\n }\n\n _createClass(HSHeaderMomentShowHideObserver, [{\n key: "init",\n value: function init() {\n this.direction = \'down\';\n this.delta = 0;\n this.defaultState = true;\n this.offset = isFinite(this.dataSettings.fixMoment) && this.dataSettings.fixMoment !== 0 ? this.dataSettings.fixMoment : 5;\n this.effect = this.dataSettings.fixEffect ? this.dataSettings.fixEffect : \'show-hide\';\n return this;\n }\n }, {\n key: "destroy",\n value: function destroy() {\n this.toDefaultState();\n return this;\n }\n }, {\n key: "checkDirection",\n value: function checkDirection() {\n if (window.pageYOffset > this.delta) {\n this.direction = \'down\';\n } else {\n this.direction = \'up\';\n }\n\n this.delta = window.pageYOffset;\n return this;\n }\n }, {\n key: "toDefaultState",\n value: function toDefaultState() {\n switch (this.effect) {\n case \'slide\':\n this.element.classList.remove(\'navbar-moved-up\');\n break;\n\n case \'fade\':\n this.element.classList.remove(\'navbar-faded\');\n break;\n\n default:\n this.element.classList.remove(\'navbar-invisible\');\n }\n\n this.defaultState = !this.defaultState;\n return this;\n }\n }, {\n key: "changeState",\n value: function changeState() {\n switch (this.effect) {\n case \'slide\':\n this.element.classList.add(\'navbar-moved-up\');\n break;\n\n case \'fade\':\n this.element.classList.add(\'navbar-faded\');\n break;\n\n default:\n this.element.classList.add(\'navbar-invisible\');\n }\n\n this.defaultState = !this.defaultState;\n return this;\n }\n }, {\n key: "check",\n value: function check() {\n var docScrolled = window.pageYOffset;\n this.checkDirection();\n\n if (docScrolled >= this.offset && this.defaultState && this.direction === \'down\') {\n this.changeState();\n } else if (!this.defaultState && this.direction === \'up\') {\n this.toDefaultState();\n }\n\n return this;\n }\n }]);\n\n return HSHeaderMomentShowHideObserver;\n}(_abstract__WEBPACK_IMPORTED_MODULE_0__["default"]);\n\n\n\n//# sourceURL=webpack://HSHeader/./src/js/observers/moment-show-hide.js?')},"./src/js/observers/show-hide.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return HSHeaderShowHideObserver; });\n/* harmony import */ var _abstract__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstract */ \"./src/js/observers/abstract.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\nvar HSHeaderShowHideObserver = /*#__PURE__*/function (_HSAbstractObserver) {\n _inherits(HSHeaderShowHideObserver, _HSAbstractObserver);\n\n var _super = _createSuper(HSHeaderShowHideObserver);\n\n function HSHeaderShowHideObserver(element, config) {\n var _this;\n\n _classCallCheck(this, HSHeaderShowHideObserver);\n\n _this = _super.call(this, element, config);\n _this.dataSettings = _this.element.hasAttribute('data-hs-header-options') ? JSON.parse(_this.element.getAttribute('data-hs-header-options')) : {};\n _this.config = config;\n return _this;\n }\n\n _createClass(HSHeaderShowHideObserver, [{\n key: \"init\",\n value: function init() {\n if (!this.defaultState && window.pageYOffset > this.offset) return this;\n this.defaultState = true;\n this.transitionDuration = parseFloat(getComputedStyle(this.element)['transition-duration'], 10) * 1000;\n this.offset = isFinite(this.dataSettings.fixMoment) && this.dataSettings.fixMoment > this.element.offsetHeight ? this.dataSettings.fixMoment : this.element.offsetHeight + 100;\n this.effect = this.dataSettings.fixEffect ? this.dataSettings.fixEffect : 'show-hide';\n return this;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (!this.defaultState && window.pageYOffset > this.offset) return this;\n this.element.classList.remove('navbar-untransitioned');\n\n this._removeCap();\n\n return this;\n }\n }, {\n key: \"check\",\n value: function check() {\n if (window.pageYOffset > this.element.offsetHeight && !this.capInserted) {\n this._insertCap();\n } else if (window.pageYOffset <= this.element.offsetHeight && this.capInserted) {\n this._removeCap();\n }\n\n if (window.pageYOffset > this.offset && this.defaultState) {\n this.changeState();\n } else if (window.pageYOffset <= this.offset && !this.defaultState) {\n this.toDefaultState();\n }\n }\n }, {\n key: \"changeState\",\n value: function changeState() {\n if (this.config.fixMomentClasses) {\n var _this$element$classLi;\n\n (_this$element$classLi = this.element.classList).add.apply(_this$element$classLi, _toConsumableArray(this.config.fixMomentClasses));\n }\n\n this.element.classList.remove('navbar-untransitioned');\n if (this.animationTimeoutId) clearTimeout(this.animationTimeoutId);\n\n switch (this.effect) {\n case 'fade':\n this.element.classList.remove('navbar-faded');\n break;\n\n case 'slide':\n this.element.classList.remove('navbar-moved-up');\n break;\n\n default:\n this.element.classList.remove('navbar-invisible');\n }\n\n this.defaultState = !this.defaultState;\n }\n }, {\n key: \"toDefaultState\",\n value: function toDefaultState() {\n var self = this;\n\n if (this.config.fixMomentClasses) {\n var _this$element$classLi2;\n\n (_this$element$classLi2 = this.element.classList).remove.apply(_this$element$classLi2, _toConsumableArray(this.config.fixMomentClasses));\n }\n\n this.animationTimeoutId = setTimeout(function () {\n self.element.classList.add('navbar-untransitioned');\n }, this.transitionDuration);\n\n switch (this.effect) {\n case 'fade':\n this.element.classList.add('navbar-faded');\n break;\n\n case 'slide':\n this.element.classList.add('navbar-moved-up');\n break;\n\n default:\n this.element.classList.add('navbar-invisible');\n }\n\n this.defaultState = !this.defaultState;\n }\n }, {\n key: \"_insertCap\",\n value: function _insertCap() {\n this.element.classList.add('navbar-scrolled', 'navbar-untransitioned');\n\n if (this.element.classList.contains('navbar-static')) {\n document.documentElement.style.paddingTop = this.element.offsetHeight;\n }\n\n switch (this.effect) {\n case 'fade':\n this.element.classList.add('navbar-faded');\n break;\n\n case 'slide':\n this.element.classList.add('navbar-moved-up');\n break;\n\n default:\n this.element.classList.add('navbar-invisible');\n }\n\n this.capInserted = true;\n }\n }, {\n key: \"_removeCap\",\n value: function _removeCap() {\n var self = this;\n this.element.classList.remove('navbar-scrolled');\n\n if (this.element.classList.contains('navbar-static')) {\n document.documentElement.style.paddingTop = 0;\n }\n\n if (this.removeCapTimeOutId) clearTimeout(this.removeCapTimeOutId);\n this.removeCapTimeOutId = setTimeout(function () {\n self.element.classList.remove('navbar-moved-up', 'navbar-faded', 'navbar-invisible');\n }, 10);\n this.capInserted = false;\n }\n }]);\n\n return HSHeaderShowHideObserver;\n}(_abstract__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n\n\n//# sourceURL=webpack://HSHeader/./src/js/observers/show-hide.js?")},"./src/js/observers/sticky.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSHeaderStickObserver; });\n/* harmony import */ var _abstract__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstract */ "./src/js/observers/abstract.js");\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\nvar HSHeaderStickObserver = /*#__PURE__*/function (_HSAbstractObserver) {\n _inherits(HSHeaderStickObserver, _HSAbstractObserver);\n\n var _super = _createSuper(HSHeaderStickObserver);\n\n function HSHeaderStickObserver(element) {\n _classCallCheck(this, HSHeaderStickObserver);\n\n return _super.call(this, element);\n }\n\n _createClass(HSHeaderStickObserver, [{\n key: "init",\n value: function init() {\n this.defaultState = true;\n this.offset = this.element.offsetTop;\n return this;\n }\n }, {\n key: "destroy",\n value: function destroy() {\n this.toDefaultState();\n return this;\n }\n }, {\n key: "check",\n value: function check() {\n var docScrolled = window.pageYOffset;\n\n if (docScrolled > this.offset && this.defaultState) {\n this.changeState();\n } else if (docScrolled <= this.offset && !this.defaultState) {\n this.toDefaultState();\n }\n\n return this;\n }\n }, {\n key: "changeState",\n value: function changeState() {\n this.element.classList.add(\'navbar-scrolled\');\n this.defaultState = !this.defaultState;\n return this;\n }\n }, {\n key: "toDefaultState",\n value: function toDefaultState() {\n this.element.classList.remove(\'navbar-scrolled\');\n this.defaultState = !this.defaultState;\n return this;\n }\n }]);\n\n return HSHeaderStickObserver;\n}(_abstract__WEBPACK_IMPORTED_MODULE_0__["default"]);\n\n\n\n//# sourceURL=webpack://HSHeader/./src/js/observers/sticky.js?')},"./src/js/observers/without-behavior.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSHeaderWithoutBehaviorObserver; });\n/* harmony import */ var _abstract__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstract */ "./src/js/observers/abstract.js");\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\nvar HSHeaderWithoutBehaviorObserver = /*#__PURE__*/function (_HSAbstractObserver) {\n _inherits(HSHeaderWithoutBehaviorObserver, _HSAbstractObserver);\n\n var _super = _createSuper(HSHeaderWithoutBehaviorObserver);\n\n function HSHeaderWithoutBehaviorObserver(element) {\n _classCallCheck(this, HSHeaderWithoutBehaviorObserver);\n\n return _super.call(this, element);\n }\n\n _createClass(HSHeaderWithoutBehaviorObserver, [{\n key: "init",\n value: function init() {\n return this;\n }\n }, {\n key: "check",\n value: function check() {\n return this;\n }\n }, {\n key: "destroy",\n value: function destroy() {\n return this;\n }\n }, {\n key: "changeState",\n value: function changeState() {\n return this;\n }\n }, {\n key: "toDefaultState",\n value: function toDefaultState() {\n return this;\n }\n }]);\n\n return HSHeaderWithoutBehaviorObserver;\n}(_abstract__WEBPACK_IMPORTED_MODULE_0__["default"]);\n\n\n\n//# sourceURL=webpack://HSHeader/./src/js/observers/without-behavior.js?')},"./src/js/utils/slideDown.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\nvar slideDown = function slideDown(target) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n target.style.removeProperty('display');\n var display = window.getComputedStyle(target).display;\n if (display === 'none') display = 'block';\n target.style.display = display;\n var height = target.offsetHeight;\n target.style.overflow = 'hidden';\n target.style.height = 0;\n target.style.paddingTop = 0;\n target.style.paddingBottom = 0;\n target.style.marginTop = 0;\n target.style.marginBottom = 0;\n target.offsetHeight;\n target.style.boxSizing = 'border-box';\n target.style.transitionProperty = \"height, margin, padding\";\n target.style.transitionDuration = duration + 'ms';\n target.style.height = height + 'px';\n target.style.removeProperty('padding-top');\n target.style.removeProperty('padding-bottom');\n target.style.removeProperty('margin-top');\n target.style.removeProperty('margin-bottom');\n window.setTimeout(function () {\n target.style.removeProperty('height');\n target.style.removeProperty('overflow');\n target.style.removeProperty('transition-duration');\n target.style.removeProperty('transition-property');\n }, duration);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (slideDown);\n\n//# sourceURL=webpack://HSHeader/./src/js/utils/slideDown.js?")},"./src/js/utils/slideUp.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\nvar slideUp = function slideUp(target) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n target.style.transitionProperty = 'height, margin, padding';\n target.style.transitionDuration = duration + 'ms';\n target.style.boxSizing = 'border-box';\n target.style.height = target.offsetHeight + 'px';\n target.offsetHeight;\n target.style.overflow = 'hidden';\n target.style.height = 0;\n target.style.paddingTop = 0;\n target.style.paddingBottom = 0;\n target.style.marginTop = 0;\n target.style.marginBottom = 0;\n window.setTimeout(function () {\n target.style.display = 'none';\n target.style.removeProperty('height');\n target.style.removeProperty('padding-top');\n target.style.removeProperty('padding-bottom');\n target.style.removeProperty('margin-top');\n target.style.removeProperty('margin-bottom');\n target.style.removeProperty('overflow');\n target.style.removeProperty('transition-duration');\n target.style.removeProperty('transition-property'); //alert(\"!\");\n }, duration);\n return target;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (slideUp);\n\n//# sourceURL=webpack://HSHeader/./src/js/utils/slideUp.js?")}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-header.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSMegaMenu=e():t.HSMegaMenu=e()}(window,(function(){return d={"./src/js/hs-mega-menu.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSMegaMenu; });\n/* harmony import */ var _methods_object_assign_deep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./methods/object-assign-deep */ "./src/js/methods/object-assign-deep.js");\n/* harmony import */ var _methods_object_assign_deep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_methods_object_assign_deep__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _methods_get_type__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./methods/get-type */ "./src/js/methods/get-type.js");\n/* harmony import */ var _methods_smart_position__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./methods/smart-position */ "./src/js/methods/smart-position.js");\n/* harmony import */ var _methods_desktop_css_animation_enable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./methods/desktop-css-animation-enable */ "./src/js/methods/desktop-css-animation-enable.js");\n/* harmony import */ var _methods_desktop_mouseenter_event_listener__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./methods/desktop-mouseenter-event-listener */ "./src/js/methods/desktop-mouseenter-event-listener.js");\n/* harmony import */ var _methods_desktop_mouseleave_event_listener__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./methods/desktop-mouseleave-event-listener */ "./src/js/methods/desktop-mouseleave-event-listener.js");\n/* harmony import */ var _methods_desktop_click_event_listener__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./methods/desktop-click-event-listener */ "./src/js/methods/desktop-click-event-listener.js");\n/* harmony import */ var _methods_mobile_click_event_listener__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./methods/mobile-click-event-listener */ "./src/js/methods/mobile-click-event-listener.js");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n* HSMegaMenu Plugin\n* @version: 2.0.1 (Sun, 1 Nov 2021)\n* @author: HtmlStream\n* @event-namespace: .HSMegaMenu\n* @license: Htmlstream Libraries (https://htmlstream.com/)\n* Copyright 2021 Htmlstream\n*/\n\n\n\n\n\n\n\n\nvar dataAttributeName = \'data-hs-mega-menu-options\';\nvar defaults = {\n eventType: \'hover\',\n direction: \'horizontal\',\n breakpoint: \'lg\',\n rtl: false,\n isMenuOpened: false,\n sideBarRatio: 1 / 4,\n pageContainer: document.getElementsByTagName(\'body\'),\n mobileSpeed: 400,\n duration: 300,\n delay: 0,\n itemOptions: {\n megaMenuTimeOut: null,\n desktop: {\n animation: \'animated\',\n animationIn: \'slideInUp\',\n animationOut: false,\n position: null,\n maxWidth: null\n }\n },\n classMap: {\n rtl: \'.hs-rtl\',\n reversed: \'.hs-reversed\',\n initialized: \'.hs-menu-initialized\',\n mobileState: \'.hs-mobile-state\',\n invoker: \'.hs-mega-menu-invoker\',\n subMenu: \'.hs-sub-menu\',\n hasSubMenu: \'.hs-has-sub-menu\',\n hasSubMenuActive: \'.hs-sub-menu-opened\',\n megaMenu: \'.hs-mega-menu\',\n hasMegaMenu: \'.hs-has-mega-menu\',\n hasMegaMenuActive: \'.hs-mega-menu-opened\'\n }\n};\n\nvar HSMegaMenu = /*#__PURE__*/function () {\n function HSMegaMenu(el, options, id) {\n _classCallCheck(this, HSMegaMenu);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(HSMegaMenu, [{\n key: "_init",\n value: function _init() {\n var _this = this;\n\n var that = this;\n\n var _loop = function _loop(i) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty(\'$initializedEl\')) {\n return "continue";\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options;\n _options.state = null; // Resolution list\n\n resolutionsList = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n }; // Keycodes\n\n ESC_KEYCODE = 27;\n TAB_KEYCODE = 9;\n ENTER_KEYCODE = 13;\n SPACE_KEYCODE = 32;\n ARROW_UP_KEYCODE = 38;\n ARROW_DOWN_KEYCODE = 40;\n ARROW_RIGHT_KEYCODE = 39;\n ARROW_LEFT_KEYCODE = 37; // Prevent scroll\n\n var preventScroll = function preventScroll(keycode) {\n return function (e) {\n if (e.which === keycode) {\n e.preventDefault();\n }\n };\n }; // Get Item Settings\n\n\n var getItemSettings = function getItemSettings($el) {\n if (!$el) return false;\n var dataSettings = $el.hasAttribute(\'data-hs-mega-menu-item-options\') ? JSON.parse($el.getAttribute(\'data-hs-mega-menu-item-options\')) : {},\n itemSettings = _options.itemOptions;\n itemSettings = Object.assign({}, itemSettings, dataSettings);\n\n itemSettings.activeItemClass = function () {\n return Object(_methods_get_type__WEBPACK_IMPORTED_MODULE_1__["default"])($el, _options) === \'mega-menu\' ? _options.classMap.hasMegaMenuActive : _options.classMap.hasSubMenuActive;\n };\n\n return itemSettings;\n };\n\n var stateDetection = function stateDetection() {\n if (window.innerWidth < resolutionsList[_options.breakpoint]) {\n _this.state = \'mobile\';\n } else {\n _this.state = \'desktop\';\n }\n };\n\n stateDetection(); // State Detection\n\n window.addEventListener(\'resize\', function () {\n stateDetection();\n }); // Set RTL\n\n if (_options.rtl) {\n _$el.addClass(_options.classMap.rtl.slice(1));\n } // Init Menu Items\n\n\n _$el.querySelectorAll("".concat(_options.classMap.hasMegaMenu, ", ").concat(_options.classMap.hasSubMenu)).forEach(function (el) {\n _this.MegaMenuItem(el, el.querySelector(_options.classMap[Object(_methods_get_type__WEBPACK_IMPORTED_MODULE_1__["default"])(el, _options) === \'mega-menu\' ? \'megaMenu\' : \'subMenu\']), _options);\n }); // Add Initialized Classes\n\n\n _$el.classList.add("".concat(_options.classMap.initialized.slice(1)), "hs-menu-".concat(_options.direction)); // *****\n // Start: ACCESSIBILITY\n // *****\n\n\n myPreventScrollSpace = preventScroll(SPACE_KEYCODE);\n myPreventScrollDown = preventScroll(ARROW_DOWN_KEYCODE);\n myPreventScrollUp = preventScroll(ARROW_UP_KEYCODE);\n var $items = void 0,\n index = void 0,\n state = null;\n document.addEventListener(\'keyup\', function () {\n window.removeEventListener(\'keydown\', myPreventScrollSpace, false);\n window.removeEventListener(\'keydown\', myPreventScrollUp, false);\n window.removeEventListener(\'keydown\', myPreventScrollDown, false);\n });\n document.addEventListener(\'keyup\', function (e) {\n if (!e.target.closest("".concat(_options.classMap.hasMegaMenu, ", ").concat(_options.classMap.hasSubMenu))) return false; //\n // Start: PREVENT SCROLL\n //\n\n e.preventDefault();\n e.stopPropagation();\n window.addEventListener(\'keydown\', myPreventScrollSpace, false);\n window.addEventListener(\'keydown\', myPreventScrollUp, false);\n window.addEventListener(\'keydown\', myPreventScrollDown, false); //\n // End: PREVENT SCROLL\n //\n //\n // Start: ELEMENT DETECTION\n //\n\n if (e.target.classList.contains(_options.classMap.invoker.slice(1)) && !e.target.closest(["".concat(_options.classMap.subMenu, ", ").concat(_options.classMap.megaMenu)])) {\n // console.log(\'Top level\');\n if (state !== \'topLevel\') {\n state = \'topLevel\';\n }\n\n $items = [].slice.call(e.target.parentNode.parentNode.querySelectorAll(_options.classMap.invoker)).filter(function (item) {\n if (!item.closest(["".concat(_options.classMap.subMenu, ", ").concat(_options.classMap.megaMenu)])) {\n return item.offsetParent !== null;\n }\n });\n } else if (e.target.closest(["".concat(_options.classMap.subMenu, ", ").concat(_options.classMap.megaMenu)]) && e.target.parentNode.querySelector("".concat(_options.classMap.subMenu, ", ").concat(_options.classMap.megaMenu))) {\n // console.log(\'Has submenu and not top level\');\n if (state !== \'hasSubmenu\') {\n state = \'hasSubmenu\';\n }\n\n $items = [].slice.call(e.target.parentNode.parentNode.querySelectorAll(_options.classMap.invoker)).filter(function (item) {\n return item.offsetParent !== null;\n });\n } else {\n // console.log(\'Just element\');\n if (state !== \'simple\') {\n state = \'simple\';\n }\n\n $items = [].slice.call(e.target.closest(["".concat(_options.classMap.subMenu, ", ").concat(_options.classMap.megaMenu)]).querySelectorAll(\'a, button\')).filter(function (item) {\n return item.offsetParent !== null;\n });\n } //\n // End: ELEMENT DETECTION\n //\n\n\n index = $items.indexOf(e.target); //\n // Start: TOP LEVEL\n //\n // Left\n\n if (state === \'topLevel\' && e.which === ARROW_LEFT_KEYCODE && index > 0) {\n index--;\n } // Right\n\n\n if (state === \'topLevel\' && e.which === ARROW_RIGHT_KEYCODE && index < $items.length - 1) {\n index++;\n } // Open Sub\n\n\n if (state === \'topLevel\' && (e.which === ARROW_DOWN_KEYCODE || e.which === SPACE_KEYCODE || e.which === ENTER_KEYCODE)) {\n if (!e.target.parentNode.querySelector(["".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn)])) {\n Object(_methods_desktop_mouseenter_event_listener__WEBPACK_IMPORTED_MODULE_4__["default"])(e.target.parentNode, e.target.parentNode.querySelector(["".concat(_options.classMap.subMenu, ", ").concat(_options.classMap.megaMenu)]), _options, getItemSettings(e.target.parentNode))();\n } else if (e.target.parentNode.querySelector(["".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn)])) {\n e.target.parentNode.querySelector(["".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn)]).querySelectorAll(\'a\')[0].focus();\n return;\n }\n } // Close Siblings\n\n\n if (state === \'topLevel\' && (e.which === TAB_KEYCODE || e.which === ARROW_RIGHT_KEYCODE || e.which === ARROW_LEFT_KEYCODE) && e.target.closest("".concat(_options.classMap.hasMegaMenu, ", ").concat(_options.classMap.hasSubMenu)).parentNode.querySelector("".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn))) {\n Object(_methods_desktop_mouseleave_event_listener__WEBPACK_IMPORTED_MODULE_5__["default"])(e.target.closest("".concat(_options.classMap.hasMegaMenu, ", ").concat(_options.classMap.hasSubMenu)), e.target.closest("".concat(_options.classMap.hasMegaMenu, ", ").concat(_options.classMap.hasSubMenu)).parentNode.querySelector("".concat(_options.classMap.hasMegaMenuActive, " > ").concat(_options.classMap.megaMenu, ", ").concat(_options.classMap.hasSubMenuActive, " > ").concat(_options.classMap.subMenu)), _options, getItemSettings(e.target.closest("".concat(_options.classMap.hasMegaMenu, ", ").concat(_options.classMap.hasSubMenu))))();\n } //\n // End: TOP LEVEL\n //\n //\n // Start: HAS SUB-MENU BUT NOT TOP LEVEL\n //\n // Up\n\n\n if (state === \'hasSubmenu\' && e.which === ARROW_UP_KEYCODE && index > 0) {\n index--;\n } // Down\n\n\n if (state === \'hasSubmenu\' && e.which === ARROW_DOWN_KEYCODE && index < $items.length - 1) {\n index++;\n } // Open Sub\n\n\n if (state === \'hasSubmenu\' && (e.which === ARROW_LEFT_KEYCODE || e.which === ARROW_RIGHT_KEYCODE || e.which === SPACE_KEYCODE || e.which === ENTER_KEYCODE)) {\n if (!e.target.parentNode.querySelector(["".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn)])) {\n Object(_methods_desktop_mouseenter_event_listener__WEBPACK_IMPORTED_MODULE_4__["default"])(e.target.parentNode, e.target.parentNode.querySelector(["".concat(_options.classMap.subMenu, ", ").concat(_options.classMap.megaMenu)]), _options, getItemSettings(e.target.parentNode))();\n } else if (e.target.parentNode.querySelector(["".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn)])) {\n e.target.parentNode.querySelector(["".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn)]).querySelectorAll(\'a\')[0].focus();\n return;\n }\n } // Close Siblings\n\n\n if (state === \'hasSubmenu\' && (e.which === TAB_KEYCODE || e.which === ARROW_DOWN_KEYCODE || e.which === ARROW_UP_KEYCODE) && e.target.closest(["".concat(_options.classMap.hasMegaMenu, ", ").concat(_options.classMap.hasSubMenu)]).parentNode.querySelectorAll("".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn)).length) {\n Object(_methods_desktop_mouseleave_event_listener__WEBPACK_IMPORTED_MODULE_5__["default"])(e.target.closest(["".concat(_options.classMap.hasMegaMenu, ", ").concat(_options.classMap.hasSubMenu)]), e.target.closest(["".concat(_options.classMap.hasMegaMenu, ", ").concat(_options.classMap.hasSubMenu)]).parentNode.querySelector("".concat(_options.classMap.hasMegaMenuActive, " > ").concat(_options.classMap.megaMenu, ", ").concat(_options.classMap.hasSubMenuActive, " > ").concat(_options.classMap.subMenu)), _options, getItemSettings(e.target.closest(["".concat(_options.classMap.hasMegaMenu, ", ").concat(_options.classMap.hasSubMenu)])))();\n } //\n // End: HAS SUB-MENU BUT NOT TOP LEVEL\n //\n //\n // Start: SIMPLE\n //\n // Left, Up\n\n\n if (state === \'simple\' && e.which === ARROW_UP_KEYCODE && index > 0) {\n index--;\n } // Right, Down\n\n\n if (state === \'simple\' && e.which === ARROW_DOWN_KEYCODE && index < $items.length - 1) {\n index++;\n } // Close Siblings\n\n\n if (state === \'simple\' && (e.which === ARROW_RIGHT_KEYCODE || e.which === ARROW_LEFT_KEYCODE) && e.target.closest(_options.classMap.hasSubMenu).parentNode.querySelector(_options.classMap.subMenu)) {\n e.target.closest(_options.classMap.hasSubMenu).querySelector(_options.classMap.invoker).focus();\n Object(_methods_desktop_mouseleave_event_listener__WEBPACK_IMPORTED_MODULE_5__["default"])(e.target.closest(_options.classMap.hasSubMenu), e.target.closest(_options.classMap.hasSubMenu).parentNode.querySelector("".concat(_options.classMap.hasSubMenuActive, " > ").concat(_options.classMap.subMenu)), _options, getItemSettings(e.target.closest(_options.classMap.hasSubMenu)))();\n return;\n } //\n // End: SIMPLE\n //\n // Close Self\n\n\n if (e.which === ESC_KEYCODE && _this.state === \'desktop\' && document.querySelector("".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn))) {\n Object(_methods_desktop_mouseleave_event_listener__WEBPACK_IMPORTED_MODULE_5__["default"])(document.querySelector("".concat(_options.classMap.hasMegaMenuActive, ", ").concat(_options.classMap.hasSubMenuActive)), document.querySelector("".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn)), _options, getItemSettings(document.querySelector("".concat(_options.classMap.hasMegaMenuActive, ", ").concat(_options.classMap.hasSubMenuActive))))();\n return;\n } // Reset index\n\n\n if (index < 0) {\n index = 0;\n }\n\n $items[index].focus();\n });\n document.addEventListener(\'keyup\', function (e) {\n // Close All\n if (e.which === TAB_KEYCODE && document.querySelector("".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn))) {\n Object(_methods_desktop_mouseleave_event_listener__WEBPACK_IMPORTED_MODULE_5__["default"])(document.querySelector("".concat(_options.classMap.hasMegaMenuActive, ", ").concat(_options.classMap.hasSubMenuActive)), document.querySelector("".concat(_options.classMap.megaMenu, ".").concat(_options.itemOptions.desktop.animationIn, ", ").concat(_options.classMap.subMenu, ".").concat(_options.itemOptions.desktop.animationIn)), _options, getItemSettings(document.querySelector("".concat(_options.classMap.hasMegaMenuActive, ", ").concat(_options.classMap.hasSubMenuActive))))();\n }\n }); // *****\n // End: ACCESSIBILITY\n // *****\n\n that.collection[i].$initializedEl = _options;\n };\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var resolutionsList;\n var ESC_KEYCODE, TAB_KEYCODE, ENTER_KEYCODE, SPACE_KEYCODE, ARROW_UP_KEYCODE, ARROW_DOWN_KEYCODE, ARROW_RIGHT_KEYCODE, ARROW_LEFT_KEYCODE;\n var myPreventScrollSpace, myPreventScrollDown, myPreventScrollUp;\n\n var _ret = _loop(i);\n\n if (_ret === "continue") continue;\n }\n }\n }, {\n key: "MegaMenuItem",\n value: function MegaMenuItem(el, menu, params) {\n var context = this,\n settings = params,\n itemDataSettings = el.hasAttribute(\'data-hs-mega-menu-item-options\') ? JSON.parse(el.getAttribute(\'data-hs-mega-menu-item-options\')) : {},\n $el = el,\n $menu = menu;\n var itemSettings = {\n eventType: itemDataSettings.eventType ? itemDataSettings.eventType : settings.eventType,\n megaMenuTimeOut: null,\n desktop: {\n animation: \'animated\',\n animationIn: \'slideInUp\',\n animationOut: false,\n position: null,\n maxWidth: null\n }\n };\n itemSettings = _methods_object_assign_deep__WEBPACK_IMPORTED_MODULE_0___default()({}, settings, itemSettings, itemDataSettings);\n\n itemSettings.activeItemClass = function () {\n return Object(_methods_get_type__WEBPACK_IMPORTED_MODULE_1__["default"])($el, itemSettings) === \'mega-menu\' ? itemSettings.classMap.hasMegaMenuActive : itemSettings.classMap.hasSubMenuActive;\n }; // Set Menu Breakpoint Class\n\n\n $menu.classList.add(Object(_methods_get_type__WEBPACK_IMPORTED_MODULE_1__["default"])($el, itemSettings) === \'mega-menu\' ? "hs-mega-menu-desktop-".concat(itemSettings.breakpoint) : "hs-sub-menu-desktop-".concat(itemSettings.breakpoint)); // Listeners\n\n var myDesktopCSSAnimationEnable = Object(_methods_desktop_css_animation_enable__WEBPACK_IMPORTED_MODULE_3__["default"])($menu, itemSettings),\n myDesktopMouseEnterEventListener = Object(_methods_desktop_mouseenter_event_listener__WEBPACK_IMPORTED_MODULE_4__["default"])($el, $menu, settings, itemSettings),\n myDesktopMouseLeaveEventListener = Object(_methods_desktop_mouseleave_event_listener__WEBPACK_IMPORTED_MODULE_5__["default"])($el, $menu, settings, itemSettings),\n myDesktopClickEventListener = Object(_methods_desktop_click_event_listener__WEBPACK_IMPORTED_MODULE_6__["default"])($el, $menu, settings, itemSettings),\n myMobileClickEventListener = Object(_methods_mobile_click_event_listener__WEBPACK_IMPORTED_MODULE_7__["default"])($el, $menu, settings, itemSettings);\n\n var mobileListeners = function mobileListeners() {\n // Remove Desktop Listeners\n $menu.removeEventListener(\'animationend\', myDesktopCSSAnimationEnable, false);\n $menu.removeEventListener(\'webkitAnimationEnd\', myDesktopCSSAnimationEnable, false);\n $el.removeEventListener(\'mouseenter\', myDesktopMouseEnterEventListener, false);\n $el.removeEventListener(\'mouseleave\', myDesktopMouseLeaveEventListener, false); // $el.children(settings.classMap.invoker)[0].removeEventListener(\'focus\', myDesktopMouseEnterEventListener, false);\n\n $el.querySelector(itemSettings.classMap.invoker).removeEventListener(\'click\', myDesktopClickEventListener, false); // Add Mobile Listeners\n\n $el.querySelector(itemSettings.classMap.invoker).addEventListener(\'click\', myMobileClickEventListener, false);\n },\n desktopListeners = function desktopListeners() {\n // Remove Mobile Listeners\n $el.querySelector(itemSettings.classMap.invoker).removeEventListener(\'click\', myMobileClickEventListener, false); // Add Desktop Listeners\n\n $menu.addEventListener(\'animationend\', myDesktopCSSAnimationEnable, false);\n $menu.addEventListener(\'webkitAnimationEnd\', myDesktopCSSAnimationEnable, false);\n\n if (itemSettings.eventType === \'hover\') {\n $el.addEventListener(\'mouseenter\', myDesktopMouseEnterEventListener, false);\n $el.addEventListener(\'mouseleave\', myDesktopMouseLeaveEventListener, false);\n }\n\n if (itemSettings.eventType === \'click\') {\n $el.querySelector(itemSettings.classMap.invoker).addEventListener(\'click\', myDesktopClickEventListener, false);\n }\n };\n\n if (itemSettings.desktop.maxWidth) {\n $menu.style.maxWidth = itemSettings.desktop.maxWidth;\n }\n\n if (itemSettings.desktop.position) {\n $menu.classList.add("hs-position-".concat(itemSettings.desktop.position));\n } // Document Events\n\n\n document.addEventListener(\'click\', function (e) {\n if (!e.target.closest([itemSettings.classMap.subMenu, itemSettings.classMap.megaMenu, itemSettings.classMap.invoker]) && context.state === \'desktop\') {\n $el.classList.remove(itemSettings.activeItemClass().slice(1));\n $menu.classList.remove(itemSettings.desktop.animationIn);\n\n if (itemSettings.animationOut) {\n $menu.classList.add(itemSettings.desktop.animationOut);\n } else {\n $menu.style.display = \'none\';\n }\n }\n }); // Resize and Scroll Events\n\n window.addEventListener(\'resize\', function () {\n if (context.state === \'desktop\') {\n Object(_methods_smart_position__WEBPACK_IMPORTED_MODULE_2__["default"])($menu, itemSettings);\n }\n });\n\n var resizeDetection = function resizeDetection() {\n if (context.state === \'mobile\') {\n $menu.classList.remove(itemSettings.desktop.animation);\n $menu.style.animationDuration = \'\';\n mobileListeners();\n } else if (context.state === \'desktop\') {\n $menu.classList.add(itemSettings.desktop.animation);\n $menu.style.animationDuration = "".concat(itemSettings.duration, "ms");\n desktopListeners();\n }\n };\n\n resizeDetection(); // State Detection\n\n window.addEventListener(\'resize\', function () {\n resizeDetection();\n });\n }\n }, {\n key: "addToCollection",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: _methods_object_assign_deep__WEBPACK_IMPORTED_MODULE_0___default()({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: "getItems",\n value: function getItems() {\n var that = this;\n var newCollection = [];\n\n for (var i = 0; i < that.collection.length; i += 1) {\n newCollection.push(that.collection[i].$initializedEl);\n }\n\n return newCollection;\n }\n }, {\n key: "getItem",\n value: function getItem(ind) {\n return this.collection[ind].$initializedEl;\n }\n }]);\n\n return HSMegaMenu;\n}();\n\n\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/hs-mega-menu.js?')},"./src/js/methods/desktop-click-event-listener.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return desktopClickEventListener; });\n/* harmony import */ var _get_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-type */ "./src/js/methods/get-type.js");\n/* harmony import */ var _smart_position__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./smart-position */ "./src/js/methods/smart-position.js");\n/* harmony import */ var _desktop_show__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./desktop-show */ "./src/js/methods/desktop-show.js");\n/* harmony import */ var _desktop_hide__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./desktop-hide */ "./src/js/methods/desktop-hide.js");\n\n\n\n\nfunction desktopClickEventListener(el, menu, params, itemParams) {\n return function () {\n var $siblingInvokers = menu.closest("".concat(params.classMap.hasMegaMenu, ", ").concat(params.classMap.hasSubMenu)).parentNode.querySelectorAll("".concat(params.classMap.hasMegaMenu).concat(params.classMap.hasMegaMenuActive, ", ").concat(params.classMap.hasSubMenu).concat(params.classMap.hasSubMenuActive));\n\n if ($siblingInvokers.length) {\n $siblingInvokers.forEach(function ($el) {\n var $menu = $el.querySelector("".concat(params.classMap.megaMenu, ", ").concat(params.classMap.subMenu)),\n itemDataSettings = $el.hasAttribute(\'data-hs-mega-menu-item-options\') ? JSON.parse($el.getAttribute(\'data-hs-mega-menu-item-options\')) : {};\n var itemSettings = {\n desktop: {\n animation: \'animated\',\n animationIn: \'slideInUp\',\n animationOut: \'fadeOut\',\n position: null\n }\n };\n itemSettings = Object.assign({}, itemSettings, itemDataSettings);\n\n itemSettings.activeItemClass = function () {\n return Object(_get_type__WEBPACK_IMPORTED_MODULE_0__["default"])($el, params) === \'mega-menu\' ? params.classMap.hasMegaMenuActive : params.classMap.hasSubMenuActive;\n };\n\n $el.classList.remove(itemSettings.activeItemClass().slice(1));\n Object(_desktop_hide__WEBPACK_IMPORTED_MODULE_3__["default"])($el, $menu, params, itemSettings);\n });\n }\n\n if (menu.previousElementSibling.classList.contains(\'show\')) {\n el.classList.add(itemParams.activeItemClass().slice(1));\n Object(_desktop_show__WEBPACK_IMPORTED_MODULE_2__["default"])(el, menu, params, itemParams);\n Object(_smart_position__WEBPACK_IMPORTED_MODULE_1__["default"])(menu, params);\n }\n };\n}\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/desktop-click-event-listener.js?')},"./src/js/methods/desktop-css-animation-enable.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return desktopCSSAnimationEnable; });\nfunction desktopCSSAnimationEnable(menu, itemParams) {\n return function (e) {\n if (menu.classList.contains(itemParams.desktop.animationOut)) {\n menu.classList.remove(itemParams.desktop.animationOut);\n menu.style.display = 'none';\n }\n\n e.preventDefault();\n e.stopPropagation();\n };\n}\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/desktop-css-animation-enable.js?")},"./src/js/methods/desktop-hide.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return desktopHide; });\nfunction desktopHide(el, menu, params, itemParams) {\n if (!menu) {\n return this;\n }\n\n if (itemParams.desktop.animationOut) {\n menu.classList.remove(itemParams.desktop.animationIn);\n menu.classList.add(itemParams.desktop.animationOut);\n menu.style.display = 'none';\n } else {\n menu.classList.remove(itemParams.desktop.animationIn);\n menu.style.display = 'none';\n }\n}\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/desktop-hide.js?")},"./src/js/methods/desktop-mouseenter-event-listener.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return desktopMouseEnterEventListener; });\n/* harmony import */ var _smart_position__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./smart-position */ "./src/js/methods/smart-position.js");\n/* harmony import */ var _desktop_show__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./desktop-show */ "./src/js/methods/desktop-show.js");\n/* harmony import */ var _get_type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-type */ "./src/js/methods/get-type.js");\n/* harmony import */ var _desktop_hide__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./desktop-hide */ "./src/js/methods/desktop-hide.js");\n\n\n\n\nfunction desktopMouseEnterEventListener(el, menu, params, itemParams) {\n return function () {\n if (itemParams.megaMenuTimeOut) {\n clearTimeout(itemParams.megaMenuTimeOut);\n }\n\n var $siblingInvokers = menu.closest("".concat(params.classMap.hasMegaMenu, ", ").concat(params.classMap.hasSubMenu)).parentNode.querySelectorAll("".concat(params.classMap.hasMegaMenu).concat(params.classMap.hasMegaMenuActive, ", ").concat(params.classMap.hasSubMenu).concat(params.classMap.hasSubMenuActive));\n\n if ($siblingInvokers.length) {\n $siblingInvokers.forEach(function ($el) {\n var $menu = $el.querySelector("".concat(params.classMap.megaMenu, ", ").concat(params.classMap.subMenu)),\n itemDataSettings = $el.hasAttribute(\'data-hs-mega-menu-item-options\') ? JSON.parse($el.getAttribute(\'data-hs-mega-menu-item-options\')) : {};\n var itemSettings = {\n desktop: {\n animation: \'animated\',\n animationIn: \'slideInUp\',\n animationOut: \'fadeOut\',\n position: null\n }\n };\n itemSettings = Object.assign({}, itemSettings, itemDataSettings);\n\n itemSettings.activeItemClass = function () {\n return Object(_get_type__WEBPACK_IMPORTED_MODULE_2__["default"])($el, params) === \'mega-menu\' ? params.classMap.hasMegaMenuActive : params.classMap.hasSubMenuActive;\n };\n\n $el.classList.remove(itemSettings.activeItemClass().slice(1));\n Object(_desktop_hide__WEBPACK_IMPORTED_MODULE_3__["default"])($el, $menu, params, itemSettings);\n });\n }\n\n el.classList.add(itemParams.activeItemClass().slice(1));\n Object(_desktop_show__WEBPACK_IMPORTED_MODULE_1__["default"])(el, menu, params, itemParams);\n Object(_smart_position__WEBPACK_IMPORTED_MODULE_0__["default"])(menu, params);\n };\n}\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/desktop-mouseenter-event-listener.js?')},"./src/js/methods/desktop-mouseleave-event-listener.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return desktopMouseLeaveEventListener; });\n/* harmony import */ var _desktop_hide__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./desktop-hide */ "./src/js/methods/desktop-hide.js");\n\nfunction desktopMouseLeaveEventListener(el, menu, params, itemParams) {\n return function () {\n itemParams.megaMenuTimeOut = setTimeout(function () {\n el.classList.remove(itemParams.activeItemClass().slice(1));\n Object(_desktop_hide__WEBPACK_IMPORTED_MODULE_0__["default"])(el, menu, params, itemParams);\n }, params.delay);\n };\n}\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/desktop-mouseleave-event-listener.js?')},"./src/js/methods/desktop-show.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return desktopShow; });\nfunction desktopShow(el, menu, params, itemParams) {\n menu.classList.remove(itemParams.desktop.animationOut);\n menu.style.display = 'block';\n menu.classList.add(itemParams.desktop.animationIn);\n}\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/desktop-show.js?")},"./src/js/methods/get-type.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getType; });\nfunction getType(el, params) {\n if (!el) {\n return false;\n }\n\n return el.classList.contains(params.classMap.hasSubMenu.slice(1)) ? 'sub-menu' : el.classList.contains(params.classMap.hasMegaMenu.slice(1)) ? 'mega-menu' : null;\n}\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/get-type.js?")},"./src/js/methods/mobile-click-event-listener.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return mobileClickEventListener; });\n/* harmony import */ var _get_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-type */ "./src/js/methods/get-type.js");\n/* harmony import */ var _mobile_show__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mobile-show */ "./src/js/methods/mobile-show.js");\n/* harmony import */ var _mobile_hide__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mobile-hide */ "./src/js/methods/mobile-hide.js");\n\n\n\nfunction mobileClickEventListener(el, menu, params, itemParams) {\n return function () {\n var $siblingInvokers = menu.closest("".concat(params.classMap.hasMegaMenu, ", ").concat(params.classMap.hasSubMenu)).parentNode.querySelectorAll("".concat(params.classMap.hasMegaMenu).concat(params.classMap.hasMegaMenuActive, ", ").concat(params.classMap.hasSubMenu).concat(params.classMap.hasSubMenuActive));\n\n if ($siblingInvokers.length) {\n $siblingInvokers.forEach(function ($el) {\n var $menu = $el.querySelector("".concat(params.classMap.megaMenu, ", ").concat(params.classMap.subMenu)),\n itemSettings = {};\n\n itemSettings.activeItemClass = function () {\n return Object(_get_type__WEBPACK_IMPORTED_MODULE_0__["default"])($el, params) === \'mega-menu\' ? params.classMap.hasMegaMenuActive : params.classMap.hasSubMenuActive;\n };\n\n Object(_mobile_hide__WEBPACK_IMPORTED_MODULE_2__["default"])($el, $menu, params, itemSettings);\n });\n }\n\n if (menu.offsetParent === null) {\n Object(_mobile_show__WEBPACK_IMPORTED_MODULE_1__["default"])(el, menu, params, itemParams);\n } else {\n Object(_mobile_hide__WEBPACK_IMPORTED_MODULE_2__["default"])(el, menu, params, itemParams);\n }\n };\n}\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/mobile-click-event-listener.js?')},"./src/js/methods/mobile-hide.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return mobileHide; });\n/* harmony import */ var _slideUp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./slideUp */ "./src/js/methods/slideUp.js");\n\nfunction mobileHide(el, menu, params, itemParams) {\n if (!menu) {\n return this;\n }\n\n el.classList.remove(itemParams.activeItemClass().slice(1));\n Object(_slideUp__WEBPACK_IMPORTED_MODULE_0__["default"])(menu, params.mobileSpeed);\n}\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/mobile-hide.js?')},"./src/js/methods/mobile-show.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return mobileShow; });\n/* harmony import */ var _slideDown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./slideDown */ "./src/js/methods/slideDown.js");\n\nfunction mobileShow(el, menu, params, itemParams) {\n if (!menu) {\n return this;\n }\n\n el.classList.add(itemParams.activeItemClass().slice(1));\n Object(_slideDown__WEBPACK_IMPORTED_MODULE_0__["default"])(menu, params.mobileSpeed);\n}\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/mobile-show.js?')},"./src/js/methods/object-assign-deep.js":function(module,exports,__webpack_require__){"use strict";eval("\n/*\n * OBJECT ASSIGN DEEP\n * Allows deep cloning of plain objects that contain primitives, nested plain objects, or nested plain arrays.\n */\n\n/*\n * A unified way of returning a string that describes the type of the given variable.\n */\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction getTypeOf(input) {\n if (input === null) {\n return 'null';\n } else if (typeof input === 'undefined') {\n return 'undefined';\n } else if (_typeof(input) === 'object') {\n return Array.isArray(input) ? 'array' : 'object';\n }\n\n return _typeof(input);\n}\n/*\n * Branching logic which calls the correct function to clone the given value base on its type.\n */\n\n\nfunction cloneValue(value) {\n // The value is an object so lets clone it.\n if (getTypeOf(value) === 'object') {\n return quickCloneObject(value);\n } // The value is an array so lets clone it.\n else if (getTypeOf(value) === 'array') {\n return quickCloneArray(value);\n } // Any other value can just be copied.\n\n\n return value;\n}\n/*\n * Enumerates the given array and returns a new array, with each of its values cloned (i.e. references broken).\n */\n\n\nfunction quickCloneArray(input) {\n return input.map(cloneValue);\n}\n/*\n * Enumerates the properties of the given object (ignoring the prototype chain) and returns a new object, with each of\n * its values cloned (i.e. references broken).\n */\n\n\nfunction quickCloneObject(input) {\n var output = {};\n\n for (var key in input) {\n if (!Object.prototype.hasOwnProperty.call(input, key)) {\n continue;\n }\n\n output[key] = cloneValue(input[key]);\n }\n\n return output;\n}\n/*\n * Does the actual deep merging.\n */\n\n\nfunction executeDeepMerge(target) {\n var _objects = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n var _options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var options = {\n arrayBehaviour: _options.arrayBehaviour || 'replace' // Can be \"merge\" or \"replace\".\n\n }; // Ensure we have actual objects for each.\n\n var objects = _objects.map(function (object) {\n return object || {};\n });\n\n var output = target || {}; // Enumerate the objects and their keys.\n\n for (var oindex = 0; oindex < objects.length; oindex++) {\n var object = objects[oindex];\n var keys = Object.keys(object);\n\n for (var kindex = 0; kindex < keys.length; kindex++) {\n var key = keys[kindex];\n var value = object[key];\n var type = getTypeOf(value);\n var existingValueType = getTypeOf(output[key]);\n\n if (type === 'object') {\n if (existingValueType !== 'undefined') {\n var existingValue = existingValueType === 'object' ? output[key] : {};\n output[key] = executeDeepMerge({}, [existingValue, quickCloneObject(value)], options);\n } else {\n output[key] = quickCloneObject(value);\n }\n } else if (type === 'array') {\n if (existingValueType === 'array') {\n var newValue = quickCloneArray(value);\n output[key] = options.arrayBehaviour === 'merge' ? output[key].concat(newValue) : newValue;\n } else {\n output[key] = quickCloneArray(value);\n }\n } else {\n output[key] = value;\n }\n }\n }\n\n return output;\n}\n/*\n * Merge all the supplied objects into the target object, breaking all references, including those of nested objects\n * and arrays, and even objects nested inside arrays. The first parameter is not mutated unlike Object.assign().\n * Properties in later objects will always overwrite.\n */\n\n\nmodule.exports = function objectAssignDeep(target) {\n for (var _len = arguments.length, objects = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n objects[_key - 1] = arguments[_key];\n }\n\n return executeDeepMerge(target, objects);\n};\n/*\n * Same as objectAssignDeep() except it doesn't mutate the target object and returns an entirely new object.\n */\n\n\nmodule.exports.noMutate = function objectAssignDeepInto() {\n for (var _len2 = arguments.length, objects = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n objects[_key2] = arguments[_key2];\n }\n\n return executeDeepMerge({}, objects);\n};\n/*\n * Allows an options object to be passed in to customise the behaviour of the function.\n */\n\n\nmodule.exports.withOptions = function objectAssignDeepInto(target, objects, options) {\n return executeDeepMerge(target, objects, options);\n};\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/object-assign-deep.js?")},"./src/js/methods/offset.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__["default"] = (function (el) {\n if (!el) return false;\n var rect = el.getBoundingClientRect();\n return {\n top: rect.top - window.scrollY,\n left: rect.left - window.scrollX\n };\n});\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/offset.js?')},"./src/js/methods/slideDown.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\nvar slideDown = function slideDown(target) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n target.style.removeProperty('display');\n var display = window.getComputedStyle(target).display;\n if (display === 'none') display = 'block';\n target.style.display = display;\n var height = target.offsetHeight;\n target.style.overflow = 'hidden';\n target.style.height = 0;\n target.style.paddingTop = 0;\n target.style.paddingBottom = 0;\n target.style.marginTop = 0;\n target.style.marginBottom = 0;\n target.offsetHeight;\n target.style.boxSizing = 'border-box';\n target.style.transitionProperty = \"height, margin, padding\";\n target.style.transitionDuration = duration + 'ms';\n target.style.height = height + 'px';\n target.style.removeProperty('padding-top');\n target.style.removeProperty('padding-bottom');\n target.style.removeProperty('margin-top');\n target.style.removeProperty('margin-bottom');\n window.setTimeout(function () {\n target.style.removeProperty('height');\n target.style.removeProperty('overflow');\n target.style.removeProperty('transition-duration');\n target.style.removeProperty('transition-property');\n }, duration);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (slideDown);\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/slideDown.js?")},"./src/js/methods/slideUp.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\nvar slideUp = function slideUp(target) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n target.style.transitionProperty = 'height, margin, padding';\n target.style.transitionDuration = duration + 'ms';\n target.style.boxSizing = 'border-box';\n target.style.height = target.offsetHeight + 'px';\n target.offsetHeight;\n target.style.overflow = 'hidden';\n target.style.height = 0;\n target.style.paddingTop = 0;\n target.style.paddingBottom = 0;\n target.style.marginTop = 0;\n target.style.marginBottom = 0;\n window.setTimeout(function () {\n target.style.display = 'none';\n target.style.removeProperty('height');\n target.style.removeProperty('padding-top');\n target.style.removeProperty('padding-bottom');\n target.style.removeProperty('margin-top');\n target.style.removeProperty('margin-bottom');\n target.style.removeProperty('overflow');\n target.style.removeProperty('transition-duration');\n target.style.removeProperty('transition-property'); //alert(\"!\");\n }, duration);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (slideUp);\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/slideUp.js?")},"./src/js/methods/smart-position.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return smartPosition; });\n/* harmony import */ var _offset__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./offset */ "./src/js/methods/offset.js");\n\nfunction smartPosition(el, params) {\n if (!el) return;\n\n if (!params.rtl) {\n if (Object(_offset__WEBPACK_IMPORTED_MODULE_0__["default"])(el).left + el.offsetWidth > window.innerWidth) {\n el.classList.add(params.classMap.reversed.slice(1));\n }\n } else {\n if (Object(_offset__WEBPACK_IMPORTED_MODULE_0__["default"])(el).left < 0) {\n el.classList.add(params.classMap.reversed.slice(1));\n }\n }\n}\n\n//# sourceURL=webpack://HSMegaMenu/./src/js/methods/smart-position.js?')}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-mega-menu.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSShowAnimation=e():t.HSShowAnimation=e()}(window,(function(){return d={"./src/js/hs-show-animation.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSShowAnimation; });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./src/js/utils.js");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n* HSShowAnimation Plugin\n* @version: 3.0.0 (Sat, 20 Nov 2021)\n* @author: HtmlStream\n* @event-namespace: .HSShowAnimation\n* @license: Htmlstream Libraries (https://htmlstream.com/)\n* Copyright 2021 Htmlstream\n*/\n\nvar dataAttributeName = \'data-hs-show-animation-options\';\nvar defaults = {\n groupName: null,\n targetSelector: null,\n siblingSelector: null,\n eventType: \'click\',\n classMap: {\n active: \'active\'\n },\n animationType: \'simple\',\n animationInit: \'animated\',\n animationIn: null,\n duration: null,\n afterShow: function afterShow() {}\n};\n\nvar HSShowAnimation = /*#__PURE__*/function () {\n function HSShowAnimation(el, options, id) {\n _classCallCheck(this, HSShowAnimation);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(HSShowAnimation, [{\n key: "_init",\n value: function _init() {\n var that = this;\n\n var _loop = function _loop(i) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty(\'$initializedEl\')) {\n return "continue";\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options;\n that.prepareObject(_$el, _options);\n\n _$el.addEventListener(_options.eventType, function (e) {\n e.preventDefault();\n\n if (_$el.classList.contains(_options.classMap.active)) {\n return;\n }\n\n that.activeClassChange(_options);\n\n if (_options.animationType === \'css-animation\') {\n that.cssAnimation(_options);\n } else {\n that.simpleAnimation(_options);\n }\n });\n };\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var _ret = _loop(i);\n\n if (_ret === "continue") continue;\n }\n }\n }, {\n key: "prepareObject",\n value: function prepareObject($el, settings) {\n var $targetSelector = document.querySelector(settings.targetSelector),\n $siblingSelector = document.querySelector(settings.siblingSelector);\n $el.setAttribute(\'data-hs-show-animation-link-group\', settings.groupName);\n\n if (settings.duration) {\n $targetSelector.style.animationDuration = "".concat(settings.duration, "ms");\n }\n\n $targetSelector.setAttribute(\'data-hs-show-animation-target-group\', settings.groupName);\n\n if ($siblingSelector) {\n $siblingSelector.setAttribute(\'data-hs-show-animation-target-group\', settings.groupName);\n }\n }\n }, {\n key: "activeClassChange",\n value: function activeClassChange(settings) {\n var $targets = document.querySelectorAll("[data-hs-show-animation-link-group=\\"".concat(settings.groupName, "\\"]"));\n\n if ($targets.length) {\n $targets.forEach(function ($item) {\n return $item.classList.remove(settings.classMap.active);\n });\n }\n }\n }, {\n key: "simpleAnimation",\n value: function simpleAnimation(settings) {\n var $targets = document.querySelectorAll("[data-hs-show-animation-target-group=\\"".concat(settings.groupName, "\\"]")),\n $targetSelector = document.querySelector(settings.targetSelector);\n\n if ($targets.length) {\n $targets.forEach(function ($item) {\n $item.style.display = \'none\';\n $item.style.opacity = 0;\n });\n }\n\n Object(_utils__WEBPACK_IMPORTED_MODULE_0__["fadeIn"])($targetSelector, 400);\n settings.afterShow();\n }\n }, {\n key: "cssAnimation",\n value: function cssAnimation(settings) {\n var $targets = document.querySelectorAll("[data-hs-show-animation-target-group=\\"".concat(settings.groupName, "\\"]")),\n $targetSelector = document.querySelector(settings.targetSelector);\n\n if ($targets.length) {\n $targets.forEach(function ($item) {\n $item.style.display = \'none\';\n $item.style.opacity = 0;\n $item.classList.remove(settings.animationInit, settings.animationIn);\n });\n }\n\n $targetSelector.style.display = \'block\';\n settings.afterShow();\n setTimeout(function () {\n $targetSelector.style.opacity = 1;\n $targetSelector.classList.add(settings.animationInit, settings.animationIn);\n }, 50);\n }\n }, {\n key: "addToCollection",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: Object.assign({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: "getItem",\n value: function getItem(item) {\n if (typeof item === \'number\') {\n return this.collection[item].$initializedEl;\n } else {\n return this.collection.find(function (el) {\n return el.id === item;\n }).$initializedEl;\n }\n }\n }]);\n\n return HSShowAnimation;\n}();\n\n\n\n//# sourceURL=webpack://HSShowAnimation/./src/js/hs-show-animation.js?')},"./src/js/utils.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fadeIn\", function() { return fadeIn; });\nfunction fadeIn(el, time) {\n if (!el || el.offsetParent !== null) return el;\n el.style.opacity = 0;\n el.style.display = 'block';\n var last = +new Date();\n\n var tick = function tick() {\n el.style.opacity = +el.style.opacity + (new Date() - last) / time;\n last = +new Date();\n\n if (+el.style.opacity < 1) {\n window.requestAnimationFrame && requestAnimationFrame(tick) || setTimeout(tick, 16);\n }\n };\n\n tick();\n}\n\n//# sourceURL=webpack://HSShowAnimation/./src/js/utils.js?")}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-show-animation.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSGoTo=e():t.HSGoTo=e()}(window,(function(){return d={"./src/js/hs-go-to.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSGoTo; });\n/* harmony import */ var _utils_scrollTo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/scrollTo */ "./src/utils/scrollTo.js");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\nvar dataAttributeName = \'data-hs-go-to-options\';\nvar defaults = {\n pageContainerSelector: \'html, body\',\n targetSelector: null,\n compensationSelector: null,\n animationInit: \'animated\',\n animationIn: \'fadeInUp\',\n animationOut: \'fadeOutDown\',\n duration: 800,\n offsetTop: 0,\n position: {\n init: null,\n hide: null,\n show: null\n },\n isReferencedToOtherPage: null,\n preventEventClass: \'hs-go-to-prevent-event\'\n};\n\nvar HSGoTo = /*#__PURE__*/function () {\n function HSGoTo(el, options, id) {\n _classCallCheck(this, HSGoTo);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(HSGoTo, [{\n key: "_init",\n value: function _init() {\n var _this = this;\n\n var that = this;\n\n var _loop = function _loop(i) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty(\'$initializedEl\')) {\n return "continue";\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options;\n\n var _compensationSelector = document.querySelector(_options.compensationSelector),\n _targetSelector = document.querySelector(_options.targetSelector),\n _pageContainerSelector = document.querySelector(_options.pageContainerSelector);\n\n _options.targetOffsetTop = function () {\n if (_compensationSelector) {\n return _targetSelector ? _targetSelector.offsetTop - _compensationSelector.innerHeight : 0;\n } else {\n return _targetSelector ? _targetSelector.offsetTop : 0;\n }\n };\n\n _this.prepareObject(_$el, _options); // Set Position\n\n\n if (_options.position) {\n _this.setPosition(_$el, _options);\n } // Click Events\n\n\n _$el.addEventListener(\'click\', function (e) {\n return _this.clickEvents(_$el, _options, {\n _pageContainerSelector: _pageContainerSelector,\n _compensationSelector: _compensationSelector,\n _targetSelector: _targetSelector\n });\n }); // Scroll Events\n\n\n if (_options.animationIn && _options.animationOut) {\n document.addEventListener(\'scroll\', function (e) {\n return _this.scrollEvents(_$el, _options);\n });\n }\n };\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var _ret = _loop(i);\n\n if (_ret === "continue") continue;\n }\n }\n }, {\n key: "prepareObject",\n value: function prepareObject($el, settings) {\n if (settings.animationIn && settings.animationOut) {\n if (navigator.userAgent.match(\'MSIE 10.0\')) {\n document.html.classList.add(\'ie10\');\n }\n\n $el.classList.add(settings.animationInit, settings.animationOut, settings.preventEventClass);\n }\n }\n }, {\n key: "setPosition",\n value: function setPosition($el, settings) {\n for (var style in settings.position.init) {\n $el.style.setProperty(style, settings.position.init[style]);\n }\n }\n }, {\n key: "clickEvents",\n value: function clickEvents($el, settings, _ref) {\n var _pageContainerSelector = _ref._pageContainerSelector;\n\n if (!settings.isReferencedToOtherPage) {\n if (event) {\n event.preventDefault();\n }\n\n Object(_utils_scrollTo__WEBPACK_IMPORTED_MODULE_0__["default"])({\n to: settings.targetOffsetTop(),\n el: _pageContainerSelector\n }, settings.duration);\n }\n }\n }, {\n key: "scrollEvents",\n value: function scrollEvents($el, settings) {\n $el.style.visibility = \'\';\n\n if (window.scrollY >= settings.offsetTop) {\n if (settings.position.show) {\n for (var style in settings.position.show) {\n $el.style.setProperty(style, settings.position.show[style]);\n }\n }\n\n $el.classList.remove(settings.animationOut);\n $el.classList.add(settings.animationIn);\n } else {\n if (settings.position.show) {\n for (var _style in settings.position.show) {\n $el.style.setProperty(_style, settings.position.show[_style]);\n }\n }\n\n $el.classList.remove(settings.animationIn);\n $el.classList.add(settings.animationOut);\n }\n }\n }, {\n key: "addToCollection",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: Object.assign({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: "getItem",\n value: function getItem(item) {\n if (typeof item === \'number\') {\n return this.collection[item].$initializedEl;\n } else {\n return this.collection.find(function (el) {\n return el.id === item;\n }).$initializedEl;\n }\n }\n }]);\n\n return HSGoTo;\n}();\n\n\n\n//# sourceURL=webpack://HSGoTo/./src/js/hs-go-to.js?')},"./src/utils/scrollTo.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return scrollTo; });\nMath.easeInOutQuad = function (t, b, c, d) {\n t /= d / 2;\n if (t < 1) return c / 2 * t * t + b;\n t--;\n return -c / 2 * (t * (t - 2) - 1) + b;\n};\n/*\n scrollTo(element.scrollTop || 200, 400)\n*/\n\n\nfunction scrollTo(_ref, duration) {\n var el = _ref.el,\n to = _ref.to;\n var element = el;\n var start = element && element.scrollTop || window.pageYOffset,\n change = to - start,\n increment = 20;\n var currentTime = 0;\n\n var animateScroll = function animateScroll() {\n currentTime += increment;\n var val = Math.easeInOutQuad(currentTime, start, change, duration);\n el.scrollTop = val;\n\n if (currentTime < duration) {\n window.setTimeout(animateScroll, increment);\n }\n };\n\n animateScroll();\n}\n\n//# sourceURL=webpack://HSGoTo/./src/utils/scrollTo.js?')}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-go-to.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),function(t,e){"object"==typeof exports&&void 0!==module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).IMask={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")(),i={},o=function(t){try{return!!t()}catch(t){return!0}},s=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={},l={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,c=u&&!l.call({1:2},1);a.f=c?function(t){var e=u(this,t);return!!e&&e.enumerable}:l;var d,h,p=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},f={}.toString,m="".split,g=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==function(t){return f.call(t).slice(8,-1)}(t)?m.call(t,""):Object(t)}:Object,v=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},y=g,_=v,b=function(t){return y(_(t))},w=function(t){return"object"==typeof t?null!==t:"function"==typeof t},x=r,S=function(t){return"function"==typeof t?t:void 0},k=function(t,e){return arguments.length<2?S(x[t]):x[t]&&x[t][e]},C=k("navigator","userAgent")||"",E=r,T=C,P=E.process,O=E.Deno,A=P&&P.versions||O&&O.version,M=A&&A.v8;M?h=(d=M.split("."))[0]<4?1:d[0]+d[1]:T&&(!(d=T.match(/Edge\/(\d+)/))||d[1]>=74)&&(d=T.match(/Chrome\/(\d+)/))&&(h=d[1]);var L=h&&+h,I=o,j=!!Object.getOwnPropertySymbols&&!I((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&L&&L<41})),D=j&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,N=k,R=D?function(t){return"symbol"==typeof t}:function(t){var e=N("Symbol");return"function"==typeof e&&Object(t)instanceof e},F=w,V={exports:{}},z=r,B=function(t,e){try{Object.defineProperty(z,t,{value:e,configurable:!0,writable:!0})}catch(n){z[t]=e}return e},q=B,H="__core-js_shared__",$=r[H]||q(H,{}),U=$;(V.exports=function(t,e){return U[t]||(U[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var W=v,G=function(t){return Object(W(t))},Y=G,Z={}.hasOwnProperty,K=Object.hasOwn||function(t,e){return Z.call(Y(t),e)},X=0,Q=Math.random(),J=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++X+Q).toString(36)},tt=r,et=V.exports,nt=K,rt=J,it=j,ot=D,st=et("wks"),at=tt.Symbol,lt=ot?at:at&&at.withoutSetter||rt,ut=w,ct=R,dt=function(t){return nt(st,t)&&(it||"string"==typeof st[t])||(it&&nt(at,t)?st[t]=at[t]:st[t]=lt("Symbol."+t)),st[t]}("toPrimitive"),ht=function(t,e){if(!ut(t)||ct(t))return t;var n,r=t[dt];if(void 0!==r){if(void 0===e&&(e="default"),n=r.call(t,e),!ut(n)||ct(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&"function"==typeof(n=t.toString)&&!F(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!F(r=n.call(t)))return r;if("string"!==e&&"function"==typeof(n=t.toString)&&!F(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}(t,e)},pt=R,ft=function(t){var e=ht(t,"string");return pt(e)?e:String(e)},mt=w,gt=r.document,vt=mt(gt)&&mt(gt.createElement),yt=!s&&!o((function(){return 7!=Object.defineProperty(function(t){return vt?gt.createElement(t):{}}("div"),"a",{get:function(){return 7}}).a})),_t=s,bt=a,wt=p,xt=b,St=ft,kt=K,Ct=yt,Et=Object.getOwnPropertyDescriptor;i.f=_t?Et:function(t,e){if(t=xt(t),e=St(e),Ct)try{return Et(t,e)}catch(t){}if(kt(t,e))return wt(!bt.f.call(t,e),t[e])};var Tt={},Pt=w,Ot=function(t){if(!Pt(t))throw TypeError(String(t)+" is not an object");return t},At=s,Mt=yt,Lt=Ot,It=ft,jt=Object.defineProperty;Tt.f=At?jt:function(t,e,n){if(Lt(t),e=It(e),Lt(n),Mt)try{return jt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Dt=Tt,Nt=p,Rt=s?function(t,e,n){return Dt.f(t,e,Nt(1,n))}:function(t,e,n){return t[e]=n,t},Ft={exports:{}},Vt=$,zt=Function.toString;"function"!=typeof Vt.inspectSource&&(Vt.inspectSource=function(t){return zt.call(t)});var Bt,qt,Ht,$t=Vt.inspectSource,Ut=$t,Wt=r.WeakMap,Gt="function"==typeof Wt&&/native code/.test(Ut(Wt)),Yt=V.exports,Zt=J,Kt=Yt("keys"),Xt={},Qt=Gt,Jt=w,te=Rt,ee=K,ne=$,re=Xt,ie="Object already initialized",oe=r.WeakMap;if(Qt||ne.state){var se=ne.state||(ne.state=new oe),ae=se.get,le=se.has,ue=se.set;Bt=function(t,e){if(le.call(se,t))throw new TypeError(ie);return e.facade=t,ue.call(se,t,e),e},qt=function(t){return ae.call(se,t)||{}},Ht=function(t){return le.call(se,t)}}else{var ce=function(t){return Kt[t]||(Kt[t]=Zt(t))}("state");re[ce]=!0,Bt=function(t,e){if(ee(t,ce))throw new TypeError(ie);return e.facade=t,te(t,ce,e),e},qt=function(t){return ee(t,ce)?t[ce]:{}},Ht=function(t){return ee(t,ce)}}var de={set:Bt,get:qt,has:Ht,enforce:function(t){return Ht(t)?qt(t):Bt(t,{})},getterFor:function(t){return function(e){var n;if(!Jt(e)||(n=qt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},he=r,pe=Rt,fe=K,me=B,ge=$t,ve=de.get,ye=de.enforce,_e=String(String).split("String");(Ft.exports=function(t,e,n,r){var i,o=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||fe(n,"name")||pe(n,"name",e),(i=ye(n)).source||(i.source=_e.join("string"==typeof e?e:""))),t!==he?(o?!a&&t[e]&&(s=!0):delete t[e],s?t[e]=n:pe(t,e,n)):s?t[e]=n:me(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&ve(this).source||ge(this)}));var be={},we=Math.ceil,xe=Math.floor,Se=function(t){return isNaN(t=+t)?0:(t>0?xe:we)(t)},ke=Se,Ce=Math.min,Ee=function(t){return t>0?Ce(ke(t),9007199254740991):0},Te=Se,Pe=Math.max,Oe=Math.min,Ae=b,Me=Ee,Le=function(t){return function(e,n,r){var i,o=Ae(e),s=Me(o.length),a=function(t,e){var n=Te(t);return n<0?Pe(n+e,0):Oe(n,e)}(r,s);if(t&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},Ie={includes:Le(!0),indexOf:Le(!1)},je=K,De=b,Ne=Ie.indexOf,Re=Xt,Fe=function(t,e){var n,r=De(t),i=0,o=[];for(n in r)!je(Re,n)&&je(r,n)&&o.push(n);for(;e.length>i;)je(r,n=e[i++])&&(~Ne(o,n)||o.push(n));return o},Ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ze=Fe,Be=Ve.concat("length","prototype");be.f=Object.getOwnPropertyNames||function(t){return ze(t,Be)};var qe={};qe.f=Object.getOwnPropertySymbols;var He=be,$e=qe,Ue=Ot,We=k("Reflect","ownKeys")||function(t){var e=He.f(Ue(t)),n=$e.f;return n?e.concat(n(t)):e},Ge=K,Ye=We,Ze=i,Ke=Tt,Xe=o,Qe=/#|\.prototype\./,Je=function(t,e){var n=en[tn(t)];return n==rn||n!=nn&&("function"==typeof e?Xe(e):!!e)},tn=Je.normalize=function(t){return String(t).replace(Qe,".").toLowerCase()},en=Je.data={},nn=Je.NATIVE="N",rn=Je.POLYFILL="P",on=Je,sn=r,an=i.f,ln=Rt,un=Ft.exports,cn=B,dn=function(t,e){for(var n=Ye(e),r=Ke.f,i=Ze.f,o=0;o<n.length;o++){var s=n[o];Ge(t,s)||r(t,s,i(e,s))}},hn=on,pn=function(t,e){var n,r,i,o,s,a=t.target,l=t.global,u=t.stat;if(n=l?sn:u?sn[a]||cn(a,{}):(sn[a]||{}).prototype)for(r in e){if(o=e[r],i=t.noTargetGet?(s=an(n,r))&&s.value:n[r],!hn(l?r:a+(u?".":"#")+r,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;dn(o,i)}(t.sham||i&&i.sham)&&ln(o,"sham",!0),un(n,r,o,t)}},fn=Fe,mn=Ve,gn=Object.keys||function(t){return fn(t,mn)},vn=s,yn=o,_n=gn,bn=qe,wn=a,xn=G,Sn=g,kn=Object.assign,Cn=Object.defineProperty,En=!kn||yn((function(){if(vn&&1!==kn({b:1},kn(Cn({},"a",{enumerable:!0,get:function(){Cn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=kn({},t)[n]||_n(kn({},e)).join("")!=r}))?function(t,e){for(var n=xn(t),r=arguments.length,i=1,o=bn.f,s=wn.f;r>i;)for(var a,l=Sn(arguments[i++]),u=o?_n(l).concat(o(l)):_n(l),c=u.length,d=0;c>d;)a=u[d++],vn&&!s.call(l,a)||(n[a]=l[a]);return n}:kn;pn({target:"Object",stat:!0,forced:Object.assign!==En},{assign:En});var Tn=R,Pn=function(t){if(Tn(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},On=Se,An=Pn,Mn=v,Ln=function(t){var e=An(Mn(this)),n="",r=On(t);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n};pn({target:"String",proto:!0},{repeat:Ln});var In=Ee,jn=Pn,Dn=Ln,Nn=v,Rn=Math.ceil,Fn=function(t){return function(e,n,r){var i,o,s=jn(Nn(e)),a=s.length,l=void 0===r?" ":jn(r),u=In(n);return u<=a||""==l?s:(i=u-a,(o=Dn.call(l,Rn(i/l.length))).length>i&&(o=o.slice(0,i)),t?s+o:o+s)}},Vn={start:Fn(!1),end:Fn(!0)},zn=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(C),Bn=Vn.start;pn({target:"String",proto:!0,forced:zn},{padStart:function(t){return Bn(this,t,arguments.length>1?arguments[1]:void 0)}});var qn=Vn.end;function Hn(t){return(Hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Un(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wn(t,e,n){return e&&Un(t.prototype,e),n&&Un(t,n),t}function Gn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Zn(t,e)}function Yn(t){return(Yn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Zn(t,e){return(Zn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Kn(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Xn(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Qn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Yn(t);if(e){var i=Yn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xn(this,n)}}function Jn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Yn(t)););return t}function tr(t,e,n){return(tr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Jn(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function er(t,e,n,r){return(er="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,r){var i,o=Jn(t,e);if(o){if((i=Object.getOwnPropertyDescriptor(o,e)).set)return i.set.call(r,n),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(r,e)){if(!i.writable)return!1;i.value=n,Object.defineProperty(r,e,i)}else!function(t,e,n){e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(r,e,n);return!0})(t,e,n,r)}function nr(t,e,n,r,i){if(!er(t,e,n,r||t)&&i)throw new Error("failed to set property");return n}function rr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ir(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ir(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ir(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function or(t){return"string"==typeof t||t instanceof String}pn({target:"String",proto:!0,forced:zn},{padEnd:function(t){return qn(this,t,arguments.length>1?arguments[1]:void 0)}}),pn({global:!0},{globalThis:r});var sr="NONE",ar="LEFT",lr="FORCE_LEFT",ur="RIGHT",cr="FORCE_RIGHT";function dr(t){switch(t){case ar:return lr;case ur:return cr;default:return t}}function hr(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}var pr=function(){function t(e,n,r,i){for($n(this,t),this.value=e,this.cursorPos=n,this.oldValue=r,this.oldSelection=i;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}return Wn(t,[{key:"startChangePos",get:function(){return Math.min(this.cursorPos,this.oldSelection.start)}},{key:"insertedCount",get:function(){return this.cursorPos-this.startChangePos}},{key:"inserted",get:function(){return this.value.substr(this.startChangePos,this.insertedCount)}},{key:"removedCount",get:function(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}},{key:"removed",get:function(){return this.oldValue.substr(this.startChangePos,this.removedCount)}},{key:"head",get:function(){return this.value.substring(0,this.startChangePos)}},{key:"tail",get:function(){return this.value.substring(this.startChangePos+this.insertedCount)}},{key:"removeDirection",get:function(){return!this.removedCount||this.insertedCount?sr:this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos?ur:ar}}]),t}(),fr=function(){function t(e){$n(this,t),Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}return Wn(t,[{key:"aggregate",value:function(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}},{key:"offset",get:function(){return this.tailShift+this.inserted.length}}]),t}(),mr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;$n(this,t),this.value=e,this.from=n,this.stop=r}return Wn(t,[{key:"toString",value:function(){return this.value}},{key:"extend",value:function(t){this.value+=String(t)}},{key:"appendTo",value:function(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}},{key:"state",get:function(){return{value:this.value,from:this.from,stop:this.stop}},set:function(t){Object.assign(this,t)}},{key:"shiftBefore",value:function(t){if(this.from>=t||!this.value.length)return"";var e=this.value[0];return this.value=this.value.slice(1),e}}]),t}();function gr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new gr.InputMask(t,e)}var vr=function(){function t(e){$n(this,t),this._value="",this._update(Object.assign({},t.DEFAULTS,e)),this.isInitialized=!0}return Wn(t,[{key:"updateOptions",value:function(t){Object.keys(t).length&&this.withValueRefresh(this._update.bind(this,t))}},{key:"_update",value:function(t){Object.assign(this,t)}},{key:"state",get:function(){return{_value:this.value}},set:function(t){this._value=t._value}},{key:"reset",value:function(){this._value=""}},{key:"value",get:function(){return this._value},set:function(t){this.resolve(t)}},{key:"resolve",value:function(t){return this.reset(),this.append(t,{input:!0},""),this.doCommit(),this.value}},{key:"unmaskedValue",get:function(){return this.value},set:function(t){this.reset(),this.append(t,{},""),this.doCommit()}},{key:"typedValue",get:function(){return this.doParse(this.value)},set:function(t){this.value=this.doFormat(t)}},{key:"rawInputValue",get:function(){return this.extractInput(0,this.value.length,{raw:!0})},set:function(t){this.reset(),this.append(t,{raw:!0},""),this.doCommit()}},{key:"isComplete",get:function(){return!0}},{key:"nearestInputPos",value:function(t,e){return t}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this.value.slice(t,e)}},{key:"extractTail",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return new mr(this.extractInput(t,e),t)}},{key:"appendTail",value:function(t){return or(t)&&(t=new mr(String(t))),t.appendTo(this)}},{key:"_appendCharRaw",value:function(t){return t?(this._value+=t,new fr({inserted:t,rawInserted:t})):new fr}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=this.state,i=this._appendCharRaw(this.doPrepare(t,e),e);if(i.inserted){var o,s=!1!==this.doValidate(e);if(s&&null!=n){var a=this.state;this.overwrite&&(o=n.state,n.shiftBefore(this.value.length));var l=this.appendTail(n);(s=l.rawInserted===n.toString())&&l.inserted&&(this.state=a)}s||(i=new fr,this.state=r,n&&o&&(n.state=o))}return i}},{key:"_appendPlaceholder",value:function(){return new fr}},{key:"append",value:function(t,e,n){if(!or(t))throw new Error("value should be string");var r=new fr,i=or(n)?new mr(String(n)):n;e&&e.tail&&(e._beforeTailState=this.state);for(var o=0;o<t.length;++o)r.aggregate(this._appendChar(t[o],e,i));return null!=i&&(r.tailShift+=this.appendTail(i).tailShift),r}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this._value=this.value.slice(0,t)+this.value.slice(e),new fr}},{key:"withValueRefresh",value:function(t){if(this._refreshing||!this.isInitialized)return t();this._refreshing=!0;var e=this.rawInputValue,n=this.value,r=t();return this.rawInputValue=e,this.value&&this.value!==n&&0===n.indexOf(this.value)&&this.append(n.slice(this.value.length),{},""),delete this._refreshing,r}},{key:"runIsolated",value:function(t){if(this._isolated||!this.isInitialized)return t(this);this._isolated=!0;var e=this.state,n=t(this);return this.state=e,delete this._isolated,n}},{key:"doPrepare",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.prepare?this.prepare(t,this,e):t}},{key:"doValidate",value:function(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}},{key:"doCommit",value:function(){this.commit&&this.commit(this.value,this)}},{key:"doFormat",value:function(t){return this.format?this.format(t,this):t}},{key:"doParse",value:function(t){return this.parse?this.parse(t,this):t}},{key:"splice",value:function(t,e,n,r){var i=t+e,o=this.extractTail(i),s=this.nearestInputPos(t,r);return new fr({tailShift:s-t}).aggregate(this.remove(s)).aggregate(this.append(n,{input:!0},o))}}]),t}();function yr(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?gr.MaskedRegExp:or(t)?gr.MaskedPattern:t instanceof Date||t===Date?gr.MaskedDate:t instanceof Number||"number"==typeof t||t===Number?gr.MaskedNumber:Array.isArray(t)||t===Array?gr.MaskedDynamic:gr.Masked&&t.prototype instanceof gr.Masked?t:t instanceof Function?gr.MaskedFunction:t instanceof gr.Masked?t.constructor:(console.warn("Mask not found for mask",t),gr.Masked)}function _r(t){if(gr.Masked&&t instanceof gr.Masked)return t;var e=(t=Object.assign({},t)).mask;if(gr.Masked&&e instanceof gr.Masked)return e;var n=yr(e);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.");return new n(t)}vr.DEFAULTS={format:function(t){return t},parse:function(t){return t}},gr.Masked=vr,gr.createMask=_r;var br=["mask"],wr={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./},xr=function(){function t(e){$n(this,t);var n=e.mask,r=Kn(e,br);this.masked=_r({mask:n}),Object.assign(this,r)}return Wn(t,[{key:"reset",value:function(){this._isFilled=!1,this.masked.reset()}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return 0===t&&e>=1?(this._isFilled=!1,this.masked.remove(t,e)):new fr}},{key:"value",get:function(){return this.masked.value||(this._isFilled&&!this.isOptional?this.placeholderChar:"")}},{key:"unmaskedValue",get:function(){return this.masked.unmaskedValue}},{key:"isComplete",get:function(){return Boolean(this.masked.value)||this.isOptional}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._isFilled)return new fr;var n=this.masked.state,r=this.masked._appendChar(t,e);return r.inserted&&!1===this.doValidate(e)&&(r.inserted=r.rawInserted="",this.masked.state=n),r.inserted||this.isOptional||this.lazy||e.input||(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this._isFilled=Boolean(r.inserted),r}},{key:"append",value:function(){var t;return(t=this.masked).append.apply(t,arguments)}},{key:"_appendPlaceholder",value:function(){var t=new fr;return this._isFilled||this.isOptional||(this._isFilled=!0,t.inserted=this.placeholderChar),t}},{key:"extractTail",value:function(){var t;return(t=this.masked).extractTail.apply(t,arguments)}},{key:"appendTail",value:function(){var t;return(t=this.masked).appendTail.apply(t,arguments)}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(t,e,n)}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sr,n=0,r=this.value.length,i=Math.min(Math.max(t,n),r);switch(e){case ar:case lr:return this.isComplete?i:n;case ur:case cr:return this.isComplete?i:r;default:return i}}},{key:"doValidate",value:function(){var t,e;return(t=this.masked).doValidate.apply(t,arguments)&&(!this.parent||(e=this.parent).doValidate.apply(e,arguments))}},{key:"doCommit",value:function(){this.masked.doCommit()}},{key:"state",get:function(){return{masked:this.masked.state,_isFilled:this._isFilled}},set:function(t){this.masked.state=t.masked,this._isFilled=t._isFilled}}]),t}(),Sr=function(){function t(e){$n(this,t),Object.assign(this,e),this._value=""}return Wn(t,[{key:"value",get:function(){return this._value}},{key:"unmaskedValue",get:function(){return this.isUnmasking?this.value:""}},{key:"reset",value:function(){this._isRawInput=!1,this._value=""}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new fr}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sr,n=0,r=this._value.length;switch(e){case ar:case lr:return n;default:return r}}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.raw&&this._isRawInput&&this._value.slice(t,e)||""}},{key:"isComplete",get:function(){return!0}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new fr;if(this._value)return n;var r=this.char===t[0],i=r&&(this.isUnmasking||e.input||e.raw)&&!e.tail;return i&&(n.rawInserted=this.char),this._value=n.inserted=this.char,this._isRawInput=i&&(e.raw||e.input),n}},{key:"_appendPlaceholder",value:function(){var t=new fr;return this._value||(this._value=t.inserted=this.char),t}},{key:"extractTail",value:function(){return arguments.length>1&&void 0!==arguments[1]||this.value.length,new mr("")}},{key:"appendTail",value:function(t){return or(t)&&(t=new mr(String(t))),t.appendTo(this)}},{key:"append",value:function(t,e,n){var r=this._appendChar(t,e);return null!=n&&(r.tailShift+=this.appendTail(n).tailShift),r}},{key:"doCommit",value:function(){}},{key:"state",get:function(){return{_value:this._value,_isRawInput:this._isRawInput}},set:function(t){Object.assign(this,t)}}]),t}(),kr=["chunks"],Cr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;$n(this,t),this.chunks=e,this.from=n}return Wn(t,[{key:"toString",value:function(){return this.chunks.map(String).join("")}},{key:"extend",value:function(e){if(String(e)){or(e)&&(e=new mr(String(e)));var n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||null==e.stop)&&e.from===n.from+n.toString().length;if(e instanceof mr)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof t){if(null==e.stop)for(var i;e.chunks.length&&null==e.chunks[0].stop;)(i=e.chunks.shift()).from+=e.from,this.extend(i);e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}}},{key:"appendTo",value:function(e){if(!(e instanceof gr.MaskedPattern))return new mr(this.toString()).appendTo(e);for(var n=new fr,r=0;r<this.chunks.length&&!n.skip;++r){var i=this.chunks[r],o=e._mapPosToBlock(e.value.length),s=i.stop,a=void 0;if(null!=s&&(!o||o.index<=s)&&((i instanceof t||e._stops.indexOf(s)>=0)&&n.aggregate(e._appendPlaceholder(s)),a=i instanceof t&&e._blocks[s]),a){var l=a.appendTail(i);l.skip=!1,n.aggregate(l),e._value+=l.inserted;var u=i.toString().slice(l.rawInserted.length);u&&n.aggregate(e.append(u,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}},{key:"state",get:function(){return{chunks:this.chunks.map((function(t){return t.state})),from:this.from,stop:this.stop,blockIndex:this.blockIndex}},set:function(e){var n=e.chunks,r=Kn(e,kr);Object.assign(this,r),this.chunks=n.map((function(e){var n="chunks"in e?new t:new mr;return n.state=e,n}))}},{key:"shiftBefore",value:function(t){if(this.from>=t||!this.chunks.length)return"";for(var e=t-this.from,n=0;n<this.chunks.length;){var r=this.chunks[n],i=r.shiftBefore(e);if(r.toString()){if(!i)break;++n}else this.chunks.splice(n,1);if(i)return i}return""}}]),t}(),Er=function(t){Gn(n,t);var e=Qn(n);function n(){return $n(this,n),e.apply(this,arguments)}return Wn(n,[{key:"_update",value:function(t){t.mask&&(t.validate=function(e){return e.search(t.mask)>=0}),tr(Yn(n.prototype),"_update",this).call(this,t)}}]),n}(vr);gr.MaskedRegExp=Er;var Tr=["_blocks"],Pr=function(t){Gn(n,t);var e=Qn(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return $n(this,n),t.definitions=Object.assign({},wr,t.definitions),e.call(this,Object.assign({},n.DEFAULTS,t))}return Wn(n,[{key:"_update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.definitions=Object.assign({},this.definitions,t.definitions),tr(Yn(n.prototype),"_update",this).call(this,t),this._rebuildMask()}},{key:"_rebuildMask",value:function(){var t=this,e=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};var r=this.mask;if(r&&e)for(var i=!1,o=!1,s=0;s<r.length;++s)if(!this.blocks||"continue"!==function(){var e=r.slice(s),n=Object.keys(t.blocks).filter((function(t){return 0===e.indexOf(t)}));n.sort((function(t,e){return e.length-t.length}));var i=n[0];if(i){var o=_r(Object.assign({parent:t,lazy:t.lazy,placeholderChar:t.placeholderChar,overwrite:t.overwrite},t.blocks[i]));return o&&(t._blocks.push(o),t._maskedBlocks[i]||(t._maskedBlocks[i]=[]),t._maskedBlocks[i].push(t._blocks.length-1)),s+=i.length-1,"continue"}}()){var a=r[s],l=a in e;if(a!==n.STOP_CHAR)if("{"!==a&&"}"!==a)if("["!==a&&"]"!==a){if(a===n.ESCAPE_CHAR){if(++s,!(a=r[s]))break;l=!1}var u=l?new xr({parent:this,lazy:this.lazy,placeholderChar:this.placeholderChar,mask:e[a],isOptional:o}):new Sr({char:a,isUnmasking:i});this._blocks.push(u)}else o=!o;else i=!i;else this._stops.push(this._blocks.length)}}},{key:"state",get:function(){return Object.assign({},tr(Yn(n.prototype),"state",this),{_blocks:this._blocks.map((function(t){return t.state}))})},set:function(t){var e=t._blocks,r=Kn(t,Tr);this._blocks.forEach((function(t,n){return t.state=e[n]})),nr(Yn(n.prototype),"state",r,this,!0)}},{key:"reset",value:function(){tr(Yn(n.prototype),"reset",this).call(this),this._blocks.forEach((function(t){return t.reset()}))}},{key:"isComplete",get:function(){return this._blocks.every((function(t){return t.isComplete}))}},{key:"doCommit",value:function(){this._blocks.forEach((function(t){return t.doCommit()})),tr(Yn(n.prototype),"doCommit",this).call(this)}},{key:"unmaskedValue",get:function(){return this._blocks.reduce((function(t,e){return t+e.unmaskedValue}),"")},set:function(t){nr(Yn(n.prototype),"unmaskedValue",t,this,!0)}},{key:"value",get:function(){return this._blocks.reduce((function(t,e){return t+e.value}),"")},set:function(t){nr(Yn(n.prototype),"value",t,this,!0)}},{key:"appendTail",value:function(t){return tr(Yn(n.prototype),"appendTail",this).call(this,t).aggregate(this._appendPlaceholder())}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._mapPosToBlock(this.value.length),r=new fr;if(!n)return r;for(var i=n.index;;++i){var o=this._blocks[i];if(!o)break;var s=o._appendChar(t,e),a=s.skip;if(r.aggregate(s),a||s.rawInserted)break}return r}},{key:"extractTail",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,r=new Cr;return e===n||this._forEachBlocksInRange(e,n,(function(e,n,i,o){var s=e.extractTail(i,o);s.stop=t._findStopBefore(n),s.from=t._blockStartPos(n),s instanceof Cr&&(s.blockIndex=n),r.extend(s)})),r}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t===e)return"";var r="";return this._forEachBlocksInRange(t,e,(function(t,e,i,o){r+=t.extractInput(i,o,n)})),r}},{key:"_findStopBefore",value:function(t){for(var e,n=0;n<this._stops.length;++n){var r=this._stops[n];if(!(r<=t))break;e=r}return e}},{key:"_appendPlaceholder",value:function(t){var e=this,n=new fr;if(this.lazy&&null==t)return n;var r=this._mapPosToBlock(this.value.length);if(!r)return n;var i=r.index,o=null!=t?t:this._blocks.length;return this._blocks.slice(i,o).forEach((function(r){if(!r.lazy||null!=t){var i=null!=r._blocks?[r._blocks.length]:[],o=r._appendPlaceholder.apply(r,i);e._value+=o.inserted,n.aggregate(o)}})),n}},{key:"_mapPosToBlock",value:function(t){for(var e="",n=0;n<this._blocks.length;++n){var r=this._blocks[n],i=e.length;if(t<=(e+=r.value).length)return{index:n,offset:t-i}}}},{key:"_blockStartPos",value:function(t){return this._blocks.slice(0,t).reduce((function(t,e){return t+e.value.length}),0)}},{key:"_forEachBlocksInRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=arguments.length>2?arguments[2]:void 0,r=this._mapPosToBlock(t);if(r){var i=this._mapPosToBlock(e),o=i&&r.index===i.index,s=r.offset,a=i&&o?i.offset:this._blocks[r.index].value.length;if(n(this._blocks[r.index],r.index,s,a),i&&!o){for(var l=r.index+1;l<i.index;++l)n(this._blocks[l],l,0,this._blocks[l].value.length);n(this._blocks[i.index],i.index,0,i.offset)}}}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,r=tr(Yn(n.prototype),"remove",this).call(this,t,e);return this._forEachBlocksInRange(t,e,(function(t,e,n,i){r.aggregate(t.remove(n,i))})),r}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sr,n=this._mapPosToBlock(t)||{index:0,offset:0},r=n.offset,i=n.index,o=this._blocks[i];if(!o)return t;var s=r;0!==s&&s<o.value.length&&(s=o.nearestInputPos(r,dr(e)));var a=s===o.value.length,l=0===s;if(!l&&!a)return this._blockStartPos(i)+s;var u=a?i+1:i;if(e===sr){if(u>0){var c=u-1,d=this._blocks[c],h=d.nearestInputPos(0,sr);if(!d.value.length||h!==d.value.length)return this._blockStartPos(u)}for(var p=u,f=p;f<this._blocks.length;++f){var m=this._blocks[f],g=m.nearestInputPos(0,sr);if(!m.value.length||g!==m.value.length)return this._blockStartPos(f)+g}for(var v=u-1;v>=0;--v){var y=this._blocks[v],_=y.nearestInputPos(0,sr);if(!y.value.length||_!==y.value.length)return this._blockStartPos(v)+y.value.length}return t}if(e===ar||e===lr){for(var b,w=u;w<this._blocks.length;++w)if(this._blocks[w].value){b=w;break}if(null!=b){var x=this._blocks[b],S=x.nearestInputPos(0,ur);if(0===S&&x.unmaskedValue.length)return this._blockStartPos(b)+S}for(var k,C=-1,E=u-1;E>=0;--E){var T=this._blocks[E],P=T.nearestInputPos(T.value.length,lr);if(T.value&&0===P||(k=E),0!==P){if(P!==T.value.length)return this._blockStartPos(E)+P;C=E;break}}if(e===ar)for(var O=C+1;O<=Math.min(u,this._blocks.length-1);++O){var A=this._blocks[O],M=A.nearestInputPos(0,sr),L=this._blockStartPos(O)+M;if(L>t)break;if(M!==A.value.length)return L}if(C>=0)return this._blockStartPos(C)+this._blocks[C].value.length;if(e===lr||this.lazy&&!this.extractInput()&&!Or(this._blocks[u]))return 0;if(null!=k)return this._blockStartPos(k);for(var I=u;I<this._blocks.length;++I){var j=this._blocks[I],D=j.nearestInputPos(0,sr);if(!j.value.length||D!==j.value.length)return this._blockStartPos(I)+D}return 0}if(e===ur||e===cr){for(var N,R,F=u;F<this._blocks.length;++F){var V=this._blocks[F],z=V.nearestInputPos(0,sr);if(z!==V.value.length){R=this._blockStartPos(F)+z,N=F;break}}if(null!=N&&null!=R){for(var B=N;B<this._blocks.length;++B){var q=this._blocks[B],H=q.nearestInputPos(0,cr);if(H!==q.value.length)return this._blockStartPos(B)+H}return e===cr?this.value.length:R}for(var $=Math.min(u,this._blocks.length-1);$>=0;--$){var U=this._blocks[$],W=U.nearestInputPos(U.value.length,ar);if(0!==W){var G=this._blockStartPos($)+W;if(G>=t)return G;break}}}return t}},{key:"maskedBlock",value:function(t){return this.maskedBlocks(t)[0]}},{key:"maskedBlocks",value:function(t){var e=this,n=this._maskedBlocks[t];return n?n.map((function(t){return e._blocks[t]})):[]}}]),n}(vr);function Or(t){if(!t)return!1;var e=t.value;return!e||t.nearestInputPos(0,sr)!==e.length}Pr.DEFAULTS={lazy:!0,placeholderChar:"_"},Pr.STOP_CHAR="`",Pr.ESCAPE_CHAR="\\",Pr.InputDefinition=xr,Pr.FixedDefinition=Sr,gr.MaskedPattern=Pr;var Ar=function(t){Gn(n,t);var e=Qn(n);function n(){return $n(this,n),e.apply(this,arguments)}return Wn(n,[{key:"_matchFrom",get:function(){return this.maxLength-String(this.from).length}},{key:"_update",value:function(t){t=Object.assign({to:this.to||0,from:this.from||0},t);var e=String(t.to).length;null!=t.maxLength&&(e=Math.max(e,t.maxLength)),t.maxLength=e;for(var r=String(t.from).padStart(e,"0"),i=String(t.to).padStart(e,"0"),o=0;o<i.length&&i[o]===r[o];)++o;t.mask=i.slice(0,o).replace(/0/g,"\\0")+"0".repeat(e-o),tr(Yn(n.prototype),"_update",this).call(this,t)}},{key:"isComplete",get:function(){return tr(Yn(n.prototype),"isComplete",this)&&Boolean(this.value)}},{key:"boundaries",value:function(t){var e="",n="",r=rr(t.match(/^(\D*)(\d*)(\D*)/)||[],3),i=r[1],o=r[2];return o&&(e="0".repeat(i.length)+o,n="9".repeat(i.length)+o),[e=e.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9")]}},{key:"doPrepare",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=tr(Yn(n.prototype),"doPrepare",this).call(this,t,e).replace(/\D/g,""),!this.autofix)return t;for(var r=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),o=this.value,s="",a=0;a<t.length;++a){var l=o+s+t[a],u=this.boundaries(l),c=rr(u,2),d=c[0],h=c[1];Number(h)<this.from?s+=r[l.length-1]:Number(d)>this.to?s+=i[l.length-1]:s+=t[a]}return s}},{key:"doValidate",value:function(){var t,e=this.value,r=e.search(/[^0]/);if(-1===r&&e.length<=this._matchFrom)return!0;for(var i=this.boundaries(e),o=rr(i,2),s=o[0],a=o[1],l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return this.from<=Number(a)&&Number(s)<=this.to&&(t=tr(Yn(n.prototype),"doValidate",this)).call.apply(t,[this].concat(u))}}]),n}(Pr);gr.MaskedRange=Ar;var Mr=function(t){Gn(n,t);var e=Qn(n);function n(t){return $n(this,n),e.call(this,Object.assign({},n.DEFAULTS,t))}return Wn(n,[{key:"_update",value:function(t){t.mask===Date&&delete t.mask,t.pattern&&(t.mask=t.pattern);var e=t.blocks;t.blocks=Object.assign({},n.GET_DEFAULT_BLOCKS()),t.min&&(t.blocks.Y.from=t.min.getFullYear()),t.max&&(t.blocks.Y.to=t.max.getFullYear()),t.min&&t.max&&t.blocks.Y.from===t.blocks.Y.to&&(t.blocks.m.from=t.min.getMonth()+1,t.blocks.m.to=t.max.getMonth()+1,t.blocks.m.from===t.blocks.m.to&&(t.blocks.d.from=t.min.getDate(),t.blocks.d.to=t.max.getDate())),Object.assign(t.blocks,e),Object.keys(t.blocks).forEach((function(e){var n=t.blocks[e];"autofix"in n||(n.autofix=t.autofix)})),tr(Yn(n.prototype),"_update",this).call(this,t)}},{key:"doValidate",value:function(){for(var t,e=this.date,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=tr(Yn(n.prototype),"doValidate",this)).call.apply(t,[this].concat(i))&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}},{key:"isDateExist",value:function(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}},{key:"date",get:function(){return this.typedValue},set:function(t){this.typedValue=t}},{key:"typedValue",get:function(){return this.isComplete?tr(Yn(n.prototype),"typedValue",this):null},set:function(t){nr(Yn(n.prototype),"typedValue",t,this,!0)}}]),n}(Pr);Mr.DEFAULTS={pattern:"d{.}`m{.}`Y",format:function(t){return[String(t.getDate()).padStart(2,"0"),String(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join(".")},parse:function(t){var e=rr(t.split("."),3),n=e[0],r=e[1],i=e[2];return new Date(i,r-1,n)}},Mr.GET_DEFAULT_BLOCKS=function(){return{d:{mask:Ar,from:1,to:31,maxLength:2},m:{mask:Ar,from:1,to:12,maxLength:2},Y:{mask:Ar,from:1900,to:9999}}},gr.MaskedDate=Mr;var Lr=function(){function t(){$n(this,t)}return Wn(t,[{key:"selectionStart",get:function(){var t;try{t=this._unsafeSelectionStart}catch(t){}return null!=t?t:this.value.length}},{key:"selectionEnd",get:function(){var t;try{t=this._unsafeSelectionEnd}catch(t){}return null!=t?t:this.value.length}},{key:"select",value:function(t,e){if(null!=t&&null!=e&&(t!==this.selectionStart||e!==this.selectionEnd))try{this._unsafeSelect(t,e)}catch(t){}}},{key:"_unsafeSelect",value:function(t,e){}},{key:"isActive",get:function(){return!1}},{key:"bindEvents",value:function(t){}},{key:"unbindEvents",value:function(){}}]),t}();gr.MaskElement=Lr;var Ir=function(t){Gn(n,t);var e=Qn(n);function n(t){var r;return $n(this,n),(r=e.call(this)).input=t,r._handlers={},r}return Wn(n,[{key:"rootElement",get:function(){return this.input.getRootNode?this.input.getRootNode():document}},{key:"isActive",get:function(){return this.input===this.rootElement.activeElement}},{key:"_unsafeSelectionStart",get:function(){return this.input.selectionStart}},{key:"_unsafeSelectionEnd",get:function(){return this.input.selectionEnd}},{key:"_unsafeSelect",value:function(t,e){this.input.setSelectionRange(t,e)}},{key:"value",get:function(){return this.input.value},set:function(t){this.input.value=t}},{key:"bindEvents",value:function(t){var e=this;Object.keys(t).forEach((function(r){return e._toggleEventHandler(n.EVENTS_MAP[r],t[r])}))}},{key:"unbindEvents",value:function(){var t=this;Object.keys(this._handlers).forEach((function(e){return t._toggleEventHandler(e)}))}},{key:"_toggleEventHandler",value:function(t,e){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),e&&(this.input.addEventListener(t,e),this._handlers[t]=e)}}]),n}(Lr);Ir.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},gr.HTMLMaskElement=Ir;var jr=function(t){Gn(n,t);var e=Qn(n);function n(){return $n(this,n),e.apply(this,arguments)}return Wn(n,[{key:"_unsafeSelectionStart",get:function(){var t=this.rootElement,e=t.getSelection&&t.getSelection();return e&&e.anchorOffset}},{key:"_unsafeSelectionEnd",get:function(){var t=this.rootElement,e=t.getSelection&&t.getSelection();return e&&this._unsafeSelectionStart+String(e).length}},{key:"_unsafeSelect",value:function(t,e){if(this.rootElement.createRange){var n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,t),n.setEnd(this.input.lastChild||this.input,e);var r=this.rootElement,i=r.getSelection&&r.getSelection();i&&(i.removeAllRanges(),i.addRange(n))}}},{key:"value",get:function(){return this.input.textContent},set:function(t){this.input.textContent=t}}]),n}(Ir);gr.HTMLContenteditableMaskElement=jr;var Dr=["mask"],Nr=function(){function t(e,n){$n(this,t),this.el=e instanceof Lr?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new jr(e):new Ir(e),this.masked=_r(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}return Wn(t,[{key:"mask",get:function(){return this.masked.mask},set:function(t){if(!this.maskEquals(t))if(t instanceof gr.Masked||this.masked.constructor!==yr(t)){var e=_r({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}else this.masked.updateOptions({mask:t})}},{key:"maskEquals",value:function(t){return null==t||t===this.masked.mask||t===Date&&this.masked instanceof Mr}},{key:"value",get:function(){return this._value},set:function(t){this.masked.value=t,this.updateControl(),this.alignCursor()}},{key:"unmaskedValue",get:function(){return this._unmaskedValue},set:function(t){this.masked.unmaskedValue=t,this.updateControl(),this.alignCursor()}},{key:"typedValue",get:function(){return this.masked.typedValue},set:function(t){this.masked.typedValue=t,this.updateControl(),this.alignCursor()}},{key:"_bindEvents",value:function(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}},{key:"_unbindEvents",value:function(){this.el&&this.el.unbindEvents()}},{key:"_fireEvent",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=this._listeners[t];i&&i.forEach((function(t){return t.apply(void 0,n)}))}},{key:"selectionStart",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}},{key:"cursorPos",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd},set:function(t){this.el&&this.el.isActive&&(this.el.select(t,t),this._saveSelection())}},{key:"_saveSelection",value:function(){this.value!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}},{key:"updateValue",value:function(){this.masked.value=this.el.value,this._value=this.masked.value}},{key:"updateControl",value:function(){var t=this.masked.unmaskedValue,e=this.masked.value,n=this.unmaskedValue!==t||this.value!==e;this._unmaskedValue=t,this._value=e,this.el.value!==e&&(this.el.value=e),n&&this._fireChangeEvents()}},{key:"updateOptions",value:function(t){var e=t.mask,n=Kn(t,Dr),r=!this.maskEquals(e),i=!function t(e,n){if(n===e)return!0;var r,i=Array.isArray(n),o=Array.isArray(e);if(i&&o){if(n.length!=e.length)return!1;for(r=0;r<n.length;r++)if(!t(n[r],e[r]))return!1;return!0}if(i!=o)return!1;if(n&&e&&"object"===Hn(n)&&"object"===Hn(e)){var s=n instanceof Date,a=e instanceof Date;if(s&&a)return n.getTime()==e.getTime();if(s!=a)return!1;var l=n instanceof RegExp,u=e instanceof RegExp;if(l&&u)return n.toString()==e.toString();if(l!=u)return!1;var c=Object.keys(n);for(r=0;r<c.length;r++)if(!Object.prototype.hasOwnProperty.call(e,c[r]))return!1;for(r=0;r<c.length;r++)if(!t(e[c[r]],n[c[r]]))return!1;return!0}return!(!n||!e||"function"!=typeof n||"function"!=typeof e)&&n.toString()===e.toString()}(this.masked,n);r&&(this.mask=e),i&&this.masked.updateOptions(n),(r||i)&&this.updateControl()}},{key:"updateCursor",value:function(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}},{key:"_delayUpdateCursor",value:function(t){var e=this;this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout((function(){e.el&&(e.cursorPos=e._changingCursorPos,e._abortUpdateCursor())}),10)}},{key:"_fireChangeEvents",value:function(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}},{key:"_abortUpdateCursor",value:function(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}},{key:"alignCursor",value:function(){this.cursorPos=this.masked.nearestInputPos(this.cursorPos,ar)}},{key:"alignCursorFriendly",value:function(){this.selectionStart===this.cursorPos&&this.alignCursor()}},{key:"on",value:function(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}},{key:"off",value:function(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;var n=this._listeners[t].indexOf(e);return n>=0&&this._listeners[t].splice(n,1),this}},{key:"_onInput",value:function(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();var e=new pr(this.el.value,this.cursorPos,this.value,this._selection),n=this.masked.rawInputValue,r=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection).offset,i=n===this.masked.rawInputValue?e.removeDirection:sr,o=this.masked.nearestInputPos(e.startChangePos+r,i);this.updateControl(),this.updateCursor(o),delete this._inputEvent}},{key:"_onChange",value:function(){this.value!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}},{key:"_onDrop",value:function(t){t.preventDefault(),t.stopPropagation()}},{key:"_onFocus",value:function(t){this.alignCursorFriendly()}},{key:"_onClick",value:function(t){this.alignCursorFriendly()}},{key:"destroy",value:function(){this._unbindEvents(),this._listeners.length=0,delete this.el}}]),t}();gr.InputMask=Nr;var Rr=function(t){Gn(n,t);var e=Qn(n);function n(){return $n(this,n),e.apply(this,arguments)}return Wn(n,[{key:"_update",value:function(t){t.enum&&(t.mask="*".repeat(t.enum[0].length)),tr(Yn(n.prototype),"_update",this).call(this,t)}},{key:"doValidate",value:function(){for(var t,e=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return this.enum.some((function(t){return t.indexOf(e.unmaskedValue)>=0}))&&(t=tr(Yn(n.prototype),"doValidate",this)).call.apply(t,[this].concat(i))}}]),n}(Pr);gr.MaskedEnum=Rr;var Fr=function(t){Gn(n,t);var e=Qn(n);function n(t){return $n(this,n),e.call(this,Object.assign({},n.DEFAULTS,t))}return Wn(n,[{key:"_update",value:function(t){tr(Yn(n.prototype),"_update",this).call(this,t),this._updateRegExps()}},{key:"_updateRegExps",value:function(){var t="^"+(this.allowNegative?"[+|\\-]?":""),e=(this.scale?"("+hr(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExpInput=new RegExp(t+"(0|([1-9]+\\d*))?"+e),this._numberRegExp=new RegExp(t+"\\d*"+e),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(hr).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(hr(this.thousandsSeparator),"g")}},{key:"_removeThousandsSeparators",value:function(t){return t.replace(this._thousandsSeparatorRegExp,"")}},{key:"_insertThousandsSeparators",value:function(t){var e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}},{key:"doPrepare",value:function(t){for(var e,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return(e=tr(Yn(n.prototype),"doPrepare",this)).call.apply(e,[this,this._removeThousandsSeparators(t.replace(this._mapToRadixRegExp,this.radix))].concat(i))}},{key:"_separatorsCount",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=0;r<t;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++n,e&&(t+=this.thousandsSeparator.length));return n}},{key:"_separatorsCountFromSlice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._value;return this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,r=arguments.length>2?arguments[2]:void 0,i=this._adjustRangeWithSeparators(t,e),o=rr(i,2);return t=o[0],e=o[1],this._removeThousandsSeparators(tr(Yn(n.prototype),"extractInput",this).call(this,t,e,r))}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.thousandsSeparator)return tr(Yn(n.prototype),"_appendCharRaw",this).call(this,t,e);var r=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);var o=tr(Yn(n.prototype),"_appendCharRaw",this).call(this,t,e);this._value=this._insertThousandsSeparators(this._value);var s=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(s);return o.tailShift+=(a-i)*this.thousandsSeparator.length,o.skip=!o.rawInserted&&t===this.thousandsSeparator,o}},{key:"_findSeparatorAround",value:function(t){if(this.thousandsSeparator){var e=t-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,e);if(n<=t)return n}return-1}},{key:"_adjustRangeWithSeparators",value:function(t,e){var n=this._findSeparatorAround(t);n>=0&&(t=n);var r=this._findSeparatorAround(e);return r>=0&&(e=r+this.thousandsSeparator.length),[t,e]}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=this._adjustRangeWithSeparators(t,e),r=rr(n,2);t=r[0],e=r[1];var i=this.value.slice(0,t),o=this.value.slice(e),s=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+o));var a=this._separatorsCountFromSlice(i);return new fr({tailShift:(a-s)*this.thousandsSeparator.length})}},{key:"nearestInputPos",value:function(t,e){if(!this.thousandsSeparator)return t;switch(e){case sr:case ar:case lr:var n=this._findSeparatorAround(t-1);if(n>=0){var r=n+this.thousandsSeparator.length;if(t<r||this.value.length<=r||e===lr)return n}break;case ur:case cr:var i=this._findSeparatorAround(t);if(i>=0)return i+this.thousandsSeparator.length}return t}},{key:"doValidate",value:function(t){var e=(t.input?this._numberRegExpInput:this._numberRegExp).test(this._removeThousandsSeparators(this.value));if(e){var r=this.number;e=e&&!isNaN(r)&&(null==this.min||this.min>=0||this.min<=this.number)&&(null==this.max||this.max<=0||this.number<=this.max)}return e&&tr(Yn(n.prototype),"doValidate",this).call(this,t)}},{key:"doCommit",value:function(){if(this.value){var t=this.number,e=t;null!=this.min&&(e=Math.max(e,this.min)),null!=this.max&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=String(e));var r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&(r=this._padFractionalZeros(r)),this._value=r}tr(Yn(n.prototype),"doCommit",this).call(this)}},{key:"_normalizeZeros",value:function(t){var e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,(function(t,e,n,r){return e+r})),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}},{key:"_padFractionalZeros",value:function(t){if(!t)return t;var e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}},{key:"unmaskedValue",get:function(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,".")},set:function(t){nr(Yn(n.prototype),"unmaskedValue",t.replace(".",this.radix),this,!0)}},{key:"typedValue",get:function(){return Number(this.unmaskedValue)},set:function(t){nr(Yn(n.prototype),"unmaskedValue",String(t),this,!0)}},{key:"number",get:function(){return this.typedValue},set:function(t){this.typedValue=t}},{key:"allowNegative",get:function(){return this.signed||null!=this.min&&this.min<0||null!=this.max&&this.max<0}}]),n}(vr);Fr.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:["."],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1},gr.MaskedNumber=Fr;var Vr=function(t){Gn(n,t);var e=Qn(n);function n(){return $n(this,n),e.apply(this,arguments)}return Wn(n,[{key:"_update",value:function(t){t.mask&&(t.validate=t.mask),tr(Yn(n.prototype),"_update",this).call(this,t)}}]),n}(vr);gr.MaskedFunction=Vr;var zr=["compiledMasks","currentMaskRef","currentMask"],Br=function(t){Gn(n,t);var e=Qn(n);function n(t){var r;return $n(this,n),(r=e.call(this,Object.assign({},n.DEFAULTS,t))).currentMask=null,r}return Wn(n,[{key:"_update",value:function(t){tr(Yn(n.prototype),"_update",this).call(this,t),"mask"in t&&(this.compiledMasks=Array.isArray(t.mask)?t.mask.map((function(t){return _r(t)})):[])}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._applyDispatch(t,e);return this.currentMask&&n.aggregate(this.currentMask._appendChar(t,e)),n}},{key:"_applyDispatch",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.tail&&null!=e._beforeTailState?e._beforeTailState._value:this.value,r=this.rawInputValue,i=e.tail&&null!=e._beforeTailState?e._beforeTailState._rawInputValue:r,o=r.slice(i.length),s=this.currentMask,a=new fr,l=s&&s.state;if(this.currentMask=this.doDispatch(t,Object.assign({},e)),this.currentMask)if(this.currentMask!==s){if(this.currentMask.reset(),i){var u=this.currentMask.append(i,{raw:!0});a.tailShift=u.inserted.length-n.length}o&&(a.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=l;return a}},{key:"_appendPlaceholder",value:function(){var t=this._applyDispatch.apply(this,arguments);return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}},{key:"doDispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.dispatch(t,this,e)}},{key:"doValidate",value:function(){for(var t,e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=tr(Yn(n.prototype),"doValidate",this)).call.apply(t,[this].concat(i))&&(!this.currentMask||(e=this.currentMask).doValidate.apply(e,i))}},{key:"reset",value:function(){this.currentMask&&this.currentMask.reset(),this.compiledMasks.forEach((function(t){return t.reset()}))}},{key:"value",get:function(){return this.currentMask?this.currentMask.value:""},set:function(t){nr(Yn(n.prototype),"value",t,this,!0)}},{key:"unmaskedValue",get:function(){return this.currentMask?this.currentMask.unmaskedValue:""},set:function(t){nr(Yn(n.prototype),"unmaskedValue",t,this,!0)}},{key:"typedValue",get:function(){return this.currentMask?this.currentMask.typedValue:""},set:function(t){var e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}},{key:"isComplete",get:function(){return!!this.currentMask&&this.currentMask.isComplete}},{key:"remove",value:function(){var t,e=new fr;return this.currentMask&&e.aggregate((t=this.currentMask).remove.apply(t,arguments)).aggregate(this._applyDispatch()),e}},{key:"state",get:function(){return Object.assign({},tr(Yn(n.prototype),"state",this),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((function(t){return t.state})),currentMaskRef:this.currentMask,currentMask:this.currentMask&&this.currentMask.state})},set:function(t){var e=t.compiledMasks,r=t.currentMaskRef,i=t.currentMask,o=Kn(t,zr);this.compiledMasks.forEach((function(t,n){return t.state=e[n]})),null!=r&&(this.currentMask=r,this.currentMask.state=i),nr(Yn(n.prototype),"state",o,this,!0)}},{key:"extractInput",value:function(){var t;return this.currentMask?(t=this.currentMask).extractInput.apply(t,arguments):""}},{key:"extractTail",value:function(){for(var t,e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return this.currentMask?(t=this.currentMask).extractTail.apply(t,i):(e=tr(Yn(n.prototype),"extractTail",this)).call.apply(e,[this].concat(i))}},{key:"doCommit",value:function(){this.currentMask&&this.currentMask.doCommit(),tr(Yn(n.prototype),"doCommit",this).call(this)}},{key:"nearestInputPos",value:function(){for(var t,e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return this.currentMask?(t=this.currentMask).nearestInputPos.apply(t,i):(e=tr(Yn(n.prototype),"nearestInputPos",this)).call.apply(e,[this].concat(i))}},{key:"overwrite",get:function(){return this.currentMask?this.currentMask.overwrite:tr(Yn(n.prototype),"overwrite",this)},set:function(t){console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings')}}]),n}(vr);Br.DEFAULTS={dispatch:function(t,e,n){if(e.compiledMasks.length){var r=e.rawInputValue,i=e.compiledMasks.map((function(e,i){return e.reset(),e.append(r,{raw:!0}),e.append(t,n),{weight:e.rawInputValue.length,index:i}}));return i.sort((function(t,e){return e.weight-t.weight})),e.compiledMasks[i[0].index]}}},gr.MaskedDynamic=Br;var qr={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Hr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qr.MASKED,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:qr.MASKED,r=_r(t);return function(t){return r.runIsolated((function(r){return r[e]=t,r[n]}))}}function $r(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Hr.apply(void 0,n)(t)}gr.PIPE_TYPE=qr,gr.createPipe=Hr,gr.pipe=$r;try{globalThis.IMask=gr}catch(t){}t.HTMLContenteditableMaskElement=jr,t.HTMLMaskElement=Ir,t.InputMask=Nr,t.MaskElement=Lr,t.Masked=vr,t.MaskedDate=Mr,t.MaskedDynamic=Br,t.MaskedEnum=Rr,t.MaskedFunction=Vr,t.MaskedNumber=Fr,t.MaskedPattern=Pr,t.MaskedRange=Ar,t.MaskedRegExp=Er,t.PIPE_TYPE=qr,t.createMask=_r,t.createPipe=Hr,t.default=gr,t.pipe=$r,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&void 0!==module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).TomSelect=e()}(this,(function(){"use strict";function t(t,e){t.split(/\s+/).forEach(t=>{e(t)})}class e{constructor(){this._events={}}on(e,n){t(e,t=>{this._events[t]=this._events[t]||[],this._events[t].push(n)})}off(e,n){var r=arguments.length;0!==r?t(e,t=>{if(1===r)return delete this._events[t];t in this._events!=0&&this._events[t].splice(this._events[t].indexOf(n),1)}):this._events={}}trigger(e,...n){var r=this;t(e,t=>{if(t in r._events!=0)for(let e of r._events[t])e.apply(r,n)})}}var n;const r=new RegExp("[̀-ͯ·ʾ]","g");var i;const o={"æ":"ae","ⱥ":"a","ø":"o"},s=new RegExp(Object.keys(o).join("|"),"g"),a=[[67,67],[160,160],[192,438],[452,652],[961,961],[1019,1019],[1083,1083],[1281,1289],[1984,1984],[5095,5095],[7429,7441],[7545,7549],[7680,7935],[8580,8580],[9398,9449],[11360,11391],[42792,42793],[42802,42851],[42873,42897],[42912,42922],[64256,64260],[65313,65338],[65345,65370]],l=t=>t.normalize("NFKD").replace(r,"").toLowerCase().replace(s,(function(t){return o[t]})),u=(t,e="|")=>t.length>1?"(?:"+t.join(e)+")":t[0],c=t=>{if(1===t.length)return[[t]];var e=[];return c(t.substring(1)).forEach((function(n){var r=n.slice(0);r[0]=t.charAt(0)+r[0],e.push(r),(r=n.slice(0)).unshift(t.charAt(0)),e.push(r)})),e},d=t=>(void 0===i&&(i=(()=>{var t={};a.forEach(e=>{for(let n=e[0];n<=e[1];n++){let e=String.fromCharCode(n),r=l(e);r!=e.toLowerCase()&&(r in t||(t[r]=[r]),t[r].push(e))}});var e=Object.keys(t);e=e.sort((t,e)=>e.length-t.length),n=new RegExp("("+u(e)+"[̀-ͯ·ʾ]*)","g");var r={};return e.sort((t,e)=>t.length-e.length).forEach(e=>{var n=c(e).map(e=>(e=e.map(e=>t.hasOwnProperty(e)?u(t[e]):e),u(e,"")));r[e]=u(n)}),r})()),t.normalize("NFKD").toLowerCase().split(n).map(t=>{if(""==t)return"";const e=l(t);if(i.hasOwnProperty(e))return i[e];const n=t.normalize("NFC");return n!=t?u([t,n]):t}).join("")),h=(t,e)=>{if(t)return t[e]},p=(t,e)=>{if(t){for(var n,r=e.split(".");(n=r.shift())&&(t=t[n]););return t}},f=(t,e,n)=>{var r,i;return t?-1===(i=(t+="").search(e.regex))?0:(r=e.string.length/t.length,0===i&&(r+=.5),r*n):0},m=t=>(t+"").replace(/([\$\(-\+\.\?\[-\^\{-\}])/g,"\\$1"),g=(t,e)=>{var n=t[e];n&&!Array.isArray(n)&&(t[e]=[n])},v=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},y=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t<e?-1:0:(t=l(t+"").toLowerCase())>(e=l(e+"").toLowerCase())?1:e>t?-1:0;class _{constructor(t,e){this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,n){if(!t||!t.length)return[];const r=[],i=t.split(/\s+/);var o;return n&&(o=new RegExp("^("+Object.keys(n).map(m).join("|")+"):(.*)$")),i.forEach(t=>{let n,i=null,s=null;o&&(n=t.match(o))&&(i=n[1],t=n[2]),t.length>0&&(s=m(t),this.settings.diacritics&&(s=d(s)),e&&(s="\\b"+s)),r.push({string:t,regex:s?new RegExp(s,"iu"):null,field:i})}),r}getScoreFunction(t,e){var n=this.prepareSearch(t,e);return this._getScoreFunction(n)}_getScoreFunction(t){const e=t.tokens,n=e.length;if(!n)return function(){return 0};const r=t.options.fields,i=t.weights,o=r.length,s=t.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(t,e){const n=r[0].field;return f(s(e,n),t,i[n])}:function(t,e){var n=0;if(t.field){const r=s(e,t.field);!t.regex&&r?n+=1/o:n+=f(r,t,1)}else v(i,(r,i)=>{n+=f(s(e,i),t,r)});return n/o};return 1===n?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){for(var r,i=0,o=0;i<n;i++){if((r=a(e[i],t))<=0)return 0;o+=r}return o/n}:function(t){var r=0;return v(e,e=>{r+=a(e,t)}),r/n}}getSortFunction(t,e){var n=this.prepareSearch(t,e);return this._getSortFunction(n)}_getSortFunction(t){var e,n,r;const i=this,o=t.options,s=!t.query&&o.sort_empty?o.sort_empty:o.sort,a=[],l=[],u=function(e,n){return"$score"===e?n.score:t.getAttrFn(i.items[n.id],e)};if(s)for(e=0,n=s.length;e<n;e++)(t.query||"$score"!==s[e].field)&&a.push(s[e]);if(t.query){for(r=!0,e=0,n=a.length;e<n;e++)if("$score"===a[e].field){r=!1;break}r&&a.unshift({field:"$score",direction:"desc"})}else for(e=0,n=a.length;e<n;e++)if("$score"===a[e].field){a.splice(e,1);break}for(e=0,n=a.length;e<n;e++)l.push("desc"===a[e].direction?-1:1);const c=a.length;if(c){if(1===c){const t=a[0].field,e=l[0];return function(n,r){return e*y(u(t,n),u(t,r))}}return function(t,e){var n,r,i;for(n=0;n<c;n++)if(i=a[n].field,r=l[n]*y(u(i,t),u(i,e)))return r;return 0}}return null}prepareSearch(t,e){const n={};var r=Object.assign({},e);if(g(r,"sort"),g(r,"sort_empty"),r.fields){g(r,"fields");const t=[];r.fields.forEach(e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),n[e.field]="weight"in e?e.weight:1}),r.fields=t}return{options:r,query:t.toLowerCase().trim(),tokens:this.tokenize(t,r.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:r.nesting?p:h}}search(t,e){var n,r,i=this;r=this.prepareSearch(t,e),e=r.options,t=r.query;const o=e.score||i._getScoreFunction(r);t.length?v(i.items,(t,i)=>{n=o(t),(!1===e.filter||n>0)&&r.items.push({score:n,id:i})}):v(i.items,(t,e)=>{r.items.push({score:1,id:e})});const s=i._getSortFunction(r);return s&&r.items.sort(s),r.total=r.items.length,"number"==typeof e.limit&&(r.items=r.items.slice(0,e.limit)),r}}const b=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(t.indexOf("<")>-1){let e=document.createElement("div");return e.innerHTML=t.trim(),e.firstChild}return document.querySelector(t)},w=(t,e)=>{var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!1),t.dispatchEvent(n)},x=(t,e)=>{Object.assign(t.style,e)},S=(t,...e)=>{var n=C(e);(t=E(t)).map(t=>{n.map(e=>{t.classList.add(e)})})},k=(t,...e)=>{var n=C(e);(t=E(t)).map(t=>{n.map(e=>{t.classList.remove(e)})})},C=t=>{var e=[];for(let n of t)"string"==typeof n&&(n=n.trim().split(/[\11\12\14\15\40]/)),Array.isArray(n)&&(e=e.concat(n));return e.filter(Boolean)},E=t=>(Array.isArray(t)||(t=[t]),t),T=(t,e,n)=>{if(!n||n.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},P=(t,e=0)=>e>0?t[t.length-1]:t[0],O=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n},A=(t,e)=>{for(const n in e){let r=e[n];null==r?t.removeAttribute(n):t.setAttribute(n,""+r)}},M=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},L=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const n=t=>3===t.nodeType?(t=>{var n=t.data.match(e);if(n&&t.data.length>0){var r=document.createElement("span");r.className="highlight";var i=t.splitText(n.index);i.splitText(n[0].length);var o=i.cloneNode(!0);return r.appendChild(o),M(i,r),1}return 0})(t):((t=>{if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName)&&("highlight"!==t.className||"SPAN"!==t.tagName))for(var e=0;e<t.childNodes.length;++e)e+=n(t.childNodes[e])})(t),0);n(t)},I="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var j={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,closeAfterSelect:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-control",inputClass:"ts-input",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:null,copyClassesToDropdown:!0,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};const D=t=>null==t?null:N(t),N=t=>"boolean"==typeof t?t?"1":"0":t+"",R=t=>(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),F=(t,e)=>{var n;return function(r,i){var o=this;n&&(o.loading=Math.max(o.loading-1,0),clearTimeout(n)),n=setTimeout((function(){n=null,o.loadedSearches[r]=!0,t.call(o,r,i)}),e)}},V=(t,e,n)=>{var r,i=t.trigger,o={};for(r in t.trigger=function(){var n=arguments[0];if(-1===e.indexOf(n))return i.apply(t,arguments);o[n]=arguments},n.apply(t,[]),t.trigger=i,o)i.apply(t,o[r])},z=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},B=(t,e,n,r)=>{t.addEventListener(e,n,r)},q=(t,e)=>!!e&&!!e[t]&&1==(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0),H=(t,e)=>t.getAttribute("id")||(t.setAttribute("id",e),e),U=t=>t.replace(/[\\"']/g,"\\$&"),W=(t,e)=>{e&&t.append(e)};function G(t,e){var n=Object.assign({},j,e),r=n.dataAttr,i=n.labelField,o=n.valueField,s=n.disabledField,a=n.optgroupField,l=n.optgroupLabelField,u=n.optgroupValueField,c=t.tagName.toLowerCase(),d=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!d&&!n.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(d=e.textContent)}var h={placeholder:d,options:[],optgroups:[],items:[],maxItems:null};return"select"===c?(()=>{var e,c=h.options,d={},p=1,f=t=>{var e=Object.assign({},t.dataset),n=r&&e[r];return"string"==typeof n&&n.length&&(e=Object.assign(e,JSON.parse(n))),e},m=(t,e)=>{var r=D(t.value);if(null!=r&&(r||n.allowEmptyOption)){if(d.hasOwnProperty(r)){if(e){var l=d[r][a];l?Array.isArray(l)?l.push(e):d[r][a]=[l,e]:d[r][a]=e}}else{var u=f(t);u[i]=u[i]||t.textContent,u[o]=u[o]||r,u[s]=u[s]||t.disabled,u[a]=u[a]||e,u.$option=t,d[r]=u,c.push(u)}t.selected&&h.items.push(r)}},g=t=>{var e,n;(n=f(t))[l]=n[l]||t.getAttribute("label")||"",n[u]=n[u]||p++,n[s]=n[s]||t.disabled,h.optgroups.push(n),e=n[u];for(const n of t.children)m(n,e)};h.maxItems=t.hasAttribute("multiple")?null:1;for(const n of t.children)"optgroup"===(e=n.tagName.toLowerCase())?g(n):"option"===e&&m(n)})():(()=>{const e=t.getAttribute(r);if(e){h.options=JSON.parse(e);for(const t of h.options)h.items.push(t[o])}else{var s=t.value.trim()||"";if(!n.allowEmptyOption&&!s.length)return;const e=s.split(n.delimiter);for(const t of e){const e={};e[i]=t,e[o]=t,h.options.push(e)}h.items=e}})(),Object.assign({},j,h,e)}var Y=0;class Z extends(function(t){return t.plugins={},class extends t{constructor(...t){super(...t),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,n){t.plugins[e]={name:e,fn:n}}initializePlugins(t){var e,n;const r=this,i=[];if(Array.isArray(t))t.forEach(t=>{"string"==typeof t?i.push(t):(r.plugins.settings[t.name]=t.options,i.push(t.name))});else if(t)for(e in t)t.hasOwnProperty(e)&&(r.plugins.settings[e]=t[e],i.push(e));for(;n=i.shift();)r.require(n)}loadPlugin(e){var n=this,r=n.plugins,i=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');r.requested[e]=!0,r.loaded[e]=i.fn.apply(n,[n.plugins.settings[e]||{}]),r.names.push(e)}require(t){var e=this,n=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(n.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return n.loaded[t]}}}(e)){constructor(t,e){var n;super(),this.order=0,this.tab_key=!1,this.isOpen=!1,this.isDisabled=!1,this.isInvalid=!1,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.renderCache={item:{},option:{}},Y++;var r=b(t),i=this;if(r.tomselect)throw new Error("Tom Select already initialized on this element");r.tomselect=this,n=(window.getComputedStyle&&window.getComputedStyle(r,null)).getPropertyValue("direction"),this.settings=G(r,e),this.input=r,this.tabIndex=r.tabIndex||0,this.is_select_tag="select"===r.tagName.toLowerCase(),this.rtl=/rtl/i.test(n),this.inputId=H(r,"tomselect-"+Y),this.isRequired=r.required,this.sifter=new _(this.options,{diacritics:this.settings.diacritics}),this.setupOptions(this.settings.options,this.settings.optgroups),delete this.settings.optgroups,delete this.settings.options,this.settings.mode=this.settings.mode||(1===this.settings.maxItems?"single":"multi"),"boolean"!=typeof this.settings.hideSelected&&(this.settings.hideSelected="multi"===this.settings.mode),"boolean"!=typeof this.settings.hidePlaceholder&&(this.settings.hidePlaceholder="multi"!==this.settings.mode);var o,s,a,l,u,c,d,h,p,f=this.settings.createFilter;"function"!=typeof f&&("string"==typeof f&&(f=new RegExp(f)),f instanceof RegExp?this.settings.createFilter=t=>f.test(t):this.settings.createFilter=()=>!0),this.initializePlugins(this.settings.plugins),this.setupCallbacks(),this.setupTemplates(),e=i.settings,r=i.input;const g={passive:!0},v=i.inputId+"-ts-dropdown";if(c=i.settings.mode,d=r.getAttribute("class")||"",o=b("<div>"),S(o,e.wrapperClass,d,c),s=b('<div class="items">'),S(s,e.inputClass),W(o,s),l=i._render("dropdown"),S(l,e.dropdownClass,c),u=b(`<div role="listbox" id="${v}" tabindex="-1">`),S(u,e.dropdownContentClass),W(l,u),b(e.dropdownParent||o).appendChild(l),e.controlInput)a=b(e.controlInput);else{a=b('<input type="text" autocomplete="off" size="1" />');for(const t of["autocorrect","autocapitalize","autocomplete"])r.getAttribute(t)&&A(a,{[t]:r.getAttribute(t)})}e.controlInput||(a.tabIndex=r.disabled?-1:i.tabIndex,s.appendChild(a)),A(a,{role:"combobox",haspopup:"listbox","aria-expanded":"false","aria-controls":v}),p=H(a,i.inputId+"-tomselected");let y="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(i.inputId)+"']",w=document.querySelector(y);if(w){A(w,{for:p});let t=H(w,i.inputId+"-ts-label");A(u,{"aria-labelledby":t})}i.settings.copyClassesToDropdown&&S(l,d),o.style.width=r.style.width,i.plugins.names.length&&(h="plugin-"+i.plugins.names.join(" plugin-"),S([o,l],h)),(null===e.maxItems||e.maxItems>1)&&i.is_select_tag&&A(r,{multiple:"multiple"}),i.settings.placeholder&&A(a,{placeholder:e.placeholder}),!i.settings.splitOn&&i.settings.delimiter&&(i.settings.splitOn=new RegExp("\\s*"+m(i.settings.delimiter)+"+\\s*")),this.settings.load&&this.settings.loadThrottle&&(this.settings.load=F(this.settings.load,this.settings.loadThrottle)),this.control=s,this.control_input=a,this.wrapper=o,this.dropdown=l,this.dropdown_content=u,i.control_input.type=r.type,B(l,"click",t=>{const e=T(t.target,"[data-selectable]");e&&(i.onOptionSelect(t,e),z(t,!0))}),B(s,"click",t=>{var e=T(t.target,"."+i.settings.itemClass,s);e&&i.onItemSelect(t,e)?z(t,!0):""==a.value&&(i.onClick(),z(t,!0))}),B(a,"mousedown",t=>{""!==a.value&&t.stopPropagation()}),B(a,"keydown",t=>i.onKeyDown(t)),B(a,"keyup",t=>i.onKeyUp(t)),B(a,"keypress",t=>i.onKeyPress(t)),B(a,"resize",()=>i.positionDropdown(),g),B(a,"blur",()=>i.onBlur()),B(a,"focus",t=>i.onFocus(t)),B(a,"paste",t=>i.onPaste(t));const x=t=>{const e=t.composedPath()[0];if(!o.contains(e)&&!l.contains(e))return i.isFocused&&i.blur(),void i.inputState();z(t,!0)};var k=()=>{i.isOpen&&i.positionDropdown()};B(document,"mousedown",x),B(window,"sroll",k,g),B(window,"resize",k,g),this._destroy=()=>{document.removeEventListener("mousedown",x),window.removeEventListener("sroll",k),window.removeEventListener("resize",k)},this.revertSettings={innerHTML:r.innerHTML,tabIndex:r.tabIndex},r.tabIndex=-1,A(r,{hidden:"hidden"}),r.insertAdjacentElement("afterend",i.wrapper),i.setValue(e.items),e.items=[],B(r,"invalid",t=>{z(t),i.isInvalid||(i.isInvalid=!0,i.refreshState())}),i.updateOriginalInput(),i.refreshItems(),i.close(!1),i.inputState(),i.isSetup=!0,r.disabled&&i.disable(),i.on("change",this.onChange),S(r,"tomselected"),i.trigger("initialize"),!0===e.preload&&i.load(""),i.setup()}setup(){}setupOptions(t=[],e=[]){for(const e of t)this.registerOption(e);for(const t of e)this.registerOptionGroup(t)}setupTemplates(){var t=this,e=t.settings.labelField,n=t.settings.optgroupLabelField,r={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'<div class="optgroup-header">'+e(t[n])+"</div>",option:(t,n)=>"<div>"+n(t[e])+"</div>",item:(t,n)=>"<div>"+n(t[e])+"</div>",option_create:(t,e)=>'<div class="create">Add <strong>'+e(t.input)+"</strong>…</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};t.settings.render=Object.assign({},r,t.settings.render)}setupCallbacks(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in n)(e=this.settings[n[t]])&&this.on(t,e)}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){w(this.input,"input"),w(this.input,"change")}onPaste(t){var e=this;e.isFull()||e.isInputHidden||e.isLocked?z(t):e.settings.splitOn&&setTimeout(()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var n=t.trim().split(e.settings.splitOn);for(const t of n)e.createItem(t)}},0)}onKeyPress(t){var e=this;if(!e.isLocked){var n=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&n===e.settings.delimiter?(e.createItem(),void z(t)):void 0}z(t)}onKeyDown(t){var e=this;if(e.isLocked)9!==t.keyCode&&z(t);else{switch(t.keyCode){case 65:if(q(I,t))return void e.selectAll();break;case 27:return e.isOpen&&(z(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void z(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void z(t);case 13:return void(e.isOpen&&e.activeOption?(e.onOptionSelect(t,e.activeOption),z(t)):e.settings.create&&e.createItem()&&z(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.isOpen&&e.activeOption&&(e.tab_key=!0,e.onOptionSelect(t,e.activeOption),z(t),e.tab_key=!1),e.settings.create&&e.createItem()&&z(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!q(I,t)&&z(t)}}onKeyUp(t){var e=this;if(e.isLocked)z(t);else{var n=e.inputValue();e.lastValue!==n&&(e.lastValue=n,e.settings.shouldLoad.call(e,n)&&e.load(n),e.refreshOptions(),e.trigger("type",n))}}onFocus(t){var e=this,n=e.isFocused;if(e.isDisabled)return e.blur(),void z(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.load(""),n||e.trigger("focus"),e.activeItems.length||(e.showInput(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(){var t=this;if(t.isFocused){t.isFocused=!1,t.ignoreFocus=!1;var e=()=>{t.close(),t.setActiveItem(),t.setCaret(t.items.length),t.trigger("blur")};t.settings.create&&t.settings.createOnBlur?t.createItem(null,!1,e):e()}}onOptionSelect(t,e){var n,r=this;e&&(e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?r.createItem(null,!0,()=>{r.settings.closeAfterSelect&&r.close()}):void 0!==(n=e.dataset.value)&&(r.lastQuery=null,r.addItem(n),r.settings.closeAfterSelect&&r.close(),!r.settings.hideSelected&&t.type&&/click/.test(t.type)&&r.setActiveOption(e))))}onItemSelect(t,e){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(z(t),n.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;S(e.wrapper,e.settings.loadingClass),e.loading++;const n=e.loadCallback.bind(e);e.settings.load.call(e,t,n)}loadCallback(t,e){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(t,e),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||k(n.wrapper,n.settings.loadingClass),n.trigger("load",t,e)}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,w(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){V(this,e?[]:["change"],()=>{this.clear(e),this.addItems(t,e)})}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var n,r,i,o,s,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.showInput());if("click"===(n=e&&e.type.toLowerCase())&&q("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(i=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(s=i,i=o,o=s),r=i;r<=o;r++)t=l.control.children[r],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);z(e)}else"click"===n&&q(I,e)||"keydown"===n&&q("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.hideInput(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,n=e.control.querySelector(".last-active");n&&k(n,"last-active"),S(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),k(t,"active")}clearActiveItems(){k(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,A(this.control_input,{"aria-activedescendant":t.getAttribute("id")}),A(t,{"aria-selected":"true"}),S(t,"active"),this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const n=this.dropdown_content,r=n.clientHeight,i=n.scrollTop||0,o=t.offsetHeight,s=t.getBoundingClientRect().top-n.getBoundingClientRect().top+i;s+o>r+i?this.scroll(s-r+o,e):s<i&&this.scroll(s,e)}scroll(t,e){const n=this.dropdown_content;e&&(n.style.scrollBehavior=e),n.scrollTop=t,n.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(k(this.activeOption,"active"),A(this.activeOption,{"aria-selected":null})),this.activeOption=null,A(this.control_input,{"aria-activedescendant":null})}selectAll(){"single"!==this.settings.mode&&(this.activeItems=this.controlChildren(),this.activeItems.length&&(S(this.activeItems,"active"),this.hideInput(),this.close()),this.focus())}inputState(){var t=this;t.settings.controlInput||(t.activeItems.length>0||!t.isFocused&&this.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0,S(t.wrapper,"input-hidden")):(t.isInputHidden=!1,k(t.wrapper,"input-hidden")))}hideInput(){this.inputState()}showInput(){this.inputState()}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||(t.ignoreFocus=!0,t.control_input.focus(),setTimeout(()=>{t.ignoreFocus=!1,t.onFocus()},0))}blur(){this.control_input.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,n,r,i=this,o=this.getSearchOptions();if(i.settings.score&&"function"!=typeof(r=i.settings.score.call(i,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');if(t!==i.lastQuery?(i.lastQuery=t,n=i.sifter.search(t,Object.assign(o,{score:r})),i.currentResults=n):n=Object.assign({},i.currentResults),i.settings.hideSelected)for(e=n.items.length-1;e>=0;e--){let t=D(n.items[e].id);t&&-1!==i.items.indexOf(t)&&n.items.splice(e,1)}return n}refreshOptions(t=!0){var e,n,r,i,o,s,a,l,u,c,d;const h={},p=[];var f,m=this,g=m.inputValue(),v=m.search(g),y=m.activeOption,_=m.settings.shouldOpen||!1,b=m.dropdown_content;for(y&&(u=y.dataset.value,c=y.closest("[data-group]")),i=v.items.length,"number"==typeof m.settings.maxOptions&&(i=Math.min(i,m.settings.maxOptions)),i>0&&(_=!0),e=0;e<i;e++){let t=v.items[e].id,i=m.options[t],a=m.getOption(t,!0);for(m.settings.hideSelected||a.classList.toggle("selected",m.items.includes(t)),o=i[m.settings.optgroupField]||"",n=0,r=(s=Array.isArray(o)?o:[o])&&s.length;n<r;n++)o=s[n],m.optgroups.hasOwnProperty(o)||(o=""),h.hasOwnProperty(o)||(h[o]=document.createDocumentFragment(),p.push(o)),n>0&&(a=a.cloneNode(!0),A(a,{id:i.$id+"-clone-"+n,"aria-selected":null}),a.classList.add("ts-cloned"),k(a,"active")),u==t&&c&&c.dataset.group===o&&(y=a),h[o].appendChild(a)}for(o of(this.settings.lockOptgroupOrder&&p.sort((t,e)=>(m.optgroups[t]&&m.optgroups[t].$order||0)-(m.optgroups[e]&&m.optgroups[e].$order||0)),a=document.createDocumentFragment(),p))if(m.optgroups.hasOwnProperty(o)&&h[o].children.length){let t=document.createDocumentFragment(),e=m.render("optgroup_header",m.optgroups[o]);W(t,e),W(t,h[o]);let n=m.render("optgroup",{group:m.optgroups[o],options:t});W(a,n)}else W(a,h[o]);if(b.innerHTML="",W(b,a),m.settings.highlight&&(f=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(f,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()})),v.query.length&&v.tokens.length))for(const t of v.tokens)L(b,t.regex);var w=t=>{let e=m.render(t,{input:g});return e&&(_=!0,b.insertBefore(e,b.firstChild)),e};if(m.settings.shouldLoad.call(m,g)?m.loading?w("loading"):0===v.items.length&&w("no_results"):w("not_loading"),(l=m.canCreate(g))&&(d=w("option_create")),m.hasOptions=v.items.length>0||l,_){if(v.items.length>0){if(!b.contains(y)&&"single"===m.settings.mode&&m.items.length&&(y=m.getOption(m.items[0])),!b.contains(y)){let t=0;d&&!m.settings.addPrecedence&&(t=1),y=m.selectable()[t]}}else d&&(y=d);t&&!m.isOpen&&(m.open(),m.scrollToOption(y,"auto")),m.setActiveOption(y)}else m.clearActiveOption(),t&&m.isOpen&&m.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t){var e,n=this;if(Array.isArray(t))for(const e of t)n.addOption(e);else(e=n.registerOption(t))&&(n.userOptions[e]=!0,n.lastQuery=null,n.trigger("option_add",e,t))}registerOption(t){var e=D(t[this.settings.valueField]);return null!==e&&!this.options.hasOwnProperty(e)&&(t.$order=t.$order||++this.order,t.$id=this.inputId+"-opt-"+t.$order,this.options[e]=t,e)}registerOptionGroup(t){var e=D(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var n;e[this.settings.optgroupValueField]=t,(n=this.registerOptionGroup(e))&&this.trigger("optgroup_add",n,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const n=this;var r,i;const o=D(t);if(null===o)return;const s=D(e[n.settings.valueField]),a=n.getOption(o),l=n.getItem(o);if(n.options.hasOwnProperty(o)){if("string"!=typeof s)throw new Error("Value must be set in option data");if(e.$order=e.$order||n.options[o].$order,delete n.options[o],n.uncacheValue(s),n.uncacheValue(o,!1),n.options[s]=e,a){if(n.dropdown_content.contains(a)){const t=n._render("option",e);M(a,t),n.activeOption===a&&n.setActiveOption(t)}a.remove()}l&&(-1!==(i=n.items.indexOf(o))&&n.items.splice(i,1,s),r=n._render("item",e),l.classList.contains("active")&&S(r,"active"),M(l,r)),n.lastQuery=null}}removeOption(t,e){const n=this;t=N(t),n.uncacheValue(t),delete n.userOptions[t],delete n.options[t],n.lastQuery=null,n.trigger("option_remove",t),n.removeItem(t,e)}clearOptions(){this.loadedSearches={},this.userOptions={},this.clearCache();var t={};for(let e in this.options)this.options.hasOwnProperty(e)&&this.items.indexOf(e)>=0&&(t[e]=this.options[e]);this.options=this.sifter.items=t,this.lastQuery=null,this.trigger("option_clear")}uncacheValue(t,e=!0){const n=this,r=n.renderCache.item,i=n.renderCache.option;if(r&&delete r[t],i&&delete i[t],e){const e=n.getOption(t);e&&e.remove()}}getOption(t,e=!1){var n=D(t),r=this.rendered("option",n);return!r&&e&&null!==n&&(r=this._render("option",this.options[n])),r}getAdjacent(t,e,n="option"){var r;if(!t)return null;r="item"==n?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let n=0;n<r.length;n++)if(r[n]==t)return e>0?r[n+1]:r[n-1];return null}getItem(t){if("object"==typeof t)return t;var e=D(t);return null!==e?this.control.querySelector(`[data-value="${U(e)}"]`):null}addItems(t,e){var n=this,r=Array.isArray(t)?t:[t];for(let t=0,i=(r=r.filter(t=>-1===n.items.indexOf(t))).length;t<i;t++)n.isPending=t<i-1,n.addItem(r[t],e)}addItem(t,e){V(this,e?[]:["change"],()=>{var n,r;const i=this,o=i.settings.mode,s=D(t);if((!s||-1===i.items.indexOf(s)||("single"===o&&i.close(),"single"!==o&&i.settings.duplicates))&&null!==s&&i.options.hasOwnProperty(s)&&("single"===o&&i.clear(e),"multi"!==o||!i.isFull())){if(n=i._render("item",i.options[s]),i.control.contains(n)&&(n=n.cloneNode(!0)),r=i.isFull(),i.items.splice(i.caretPos,0,s),i.insertAtCaret(n),i.isSetup){let t=i.selectable();if(!i.isPending&&i.settings.hideSelected){let t=i.getOption(s),e=i.getAdjacent(t,1);e&&i.setActiveOption(e)}i.isPending||i.refreshOptions(i.isFocused&&"single"!==o),!t.length||i.isFull()?i.close():i.isPending||i.positionDropdown(),i.trigger("item_add",s,n),i.isPending||i.updateOriginalInput({silent:e})}(!i.isPending||!r&&i.isFull())&&i.refreshState()}})}removeItem(t=null,e){const n=this;if(!(t=n.getItem(t)))return;var r,i;const o=t.dataset.value;r=O(t),t.remove(),t.classList.contains("active")&&(i=n.activeItems.indexOf(t),n.activeItems.splice(i,1),k(t,"active")),n.items.splice(r,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(o)&&n.removeOption(o,e),r<n.caretPos&&n.setCaret(n.caretPos-1),n.updateOriginalInput({silent:e}),n.refreshState(),n.positionDropdown(),n.trigger("item_remove",o,t)}createItem(t=null,e=!0,n=(()=>{})){var r,i=this,o=i.caretPos;if(t=t||i.inputValue(),!i.canCreate(t))return n(),!1;i.lock();var s=!1,a=t=>{if(i.unlock(),!t||"object"!=typeof t)return n();var r=D(t[i.settings.valueField]);if("string"!=typeof r)return n();i.setTextboxValue(),i.addOption(t),i.setCaret(o),i.addItem(r),i.refreshOptions(e&&"single"!==i.settings.mode),n(t),s=!0};return r="function"==typeof i.settings.create?i.settings.create.call(this,t,a):{[i.settings.labelField]:t,[i.settings.valueField]:t},s||a(r),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){var t=this;t.refreshValidityState();var e=t.isFull(),n=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);var r,i=t.control.classList;i.toggle("focus",t.isFocused),i.toggle("disabled",t.isDisabled),i.toggle("required",t.isRequired),i.toggle("invalid",t.isInvalid),i.toggle("locked",n),i.toggle("full",e),i.toggle("not-full",!e),i.toggle("input-active",t.isFocused&&!t.isInputHidden),i.toggle("dropdown-active",t.isOpen),i.toggle("has-options",(r=t.options,0===Object.keys(r).length)),i.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;if(t.input.checkValidity){this.isRequired&&(t.input.required=!0);var e=!t.input.checkValidity();t.isInvalid=e,t.control_input.required=e,this.isRequired&&(t.input.required=!e)}}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var n,r,i,o;if(e.is_select_tag){const t=[];function s(n,r,i){return n||(n=b('<option value="'+R(r)+'">'+R(i)+"</option>")),e.input.prepend(n),t.push(n),A(n,{selected:"true"}),n.selected=!0,n}if(e.input.querySelectorAll("option[selected]").forEach(t=>{A(t,{selected:null}),t.selected=!1}),0!=e.items.length||"single"!=e.settings.mode||e.isRequired)for(n=e.items.length-1;n>=0;n--)r=e.items[n],o=(i=e.options[r])[e.settings.labelField]||"",t.includes(i.$option)?s(e.input.querySelector(`option[value="${U(r)}"]:not([selected])`),r,o):i.$option=s(i.$option,r,o);else s(e.input.querySelector('option[value=""]'),"","")}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,A(t.control_input,{"aria-expanded":"true"}),t.refreshState(),x(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),x(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,n=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&(e.hideInput(),e.tab_key||e.blur())),e.isOpen=!1,A(e.control_input,{"aria-expanded":"false"}),x(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),n&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),n=t.offsetHeight+e.top+window.scrollY,r=e.left+window.scrollX;x(this.dropdown,{width:e.width+"px",top:n+"px",left:r+"px"})}}clear(t){var e=this;if(e.items.length){var n=e.controlChildren();for(const t of n)e.removeItem(t,!0);e.showInput(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){var e=this,n=Math.min(e.caretPos,e.items.length),r=e.control;0===n?r.insertBefore(t,r.firstChild):r.insertBefore(t,r.children[n]),e.setCaret(n+1)}deleteSelection(t){var e,n,r,i,o,s=this;e=t&&8===t.keyCode?-1:1,n={start:(o=s.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)};const a=[];if(s.activeItems.length){i=P(s.activeItems,e),r=O(i),e>0&&r++;for(const t of s.activeItems)a.push(t)}else if((s.isFocused||"single"===s.settings.mode)&&s.items.length){const t=s.controlChildren();e<0&&0===n.start&&0===n.length?a.push(t[s.caretPos-1]):e>0&&n.start===s.inputValue().length&&a.push(t[s.caretPos])}const l=a.map(t=>t.dataset.value);if(!l.length||"function"==typeof s.settings.onDelete&&!1===s.settings.onDelete.call(s,l,t))return!1;for(z(t,!0),void 0!==r&&s.setCaret(r);a.length;)s.removeItem(a.pop());return s.showInput(),s.positionDropdown(),s.refreshOptions(!1),!0}advanceSelection(t,e){var n,r,i,o=this;o.rtl&&(t*=-1),o.inputValue().length||(q(I,e)||q("shiftKey",e)?(i=(r=o.getLastActive(t))?r.classList.contains("active")?o.getAdjacent(r,t,"item"):r:t>0?o.control_input.nextElementSibling:o.control_input.previousElementSibling)&&(i.classList.contains("active")&&o.removeActiveItem(r),o.setActiveItemClass(i)):o.isFocused&&!o.activeItems.length?o.setCaret(o.caretPos+t):(r=o.getLastActive(t))&&(n=O(r),o.setCaret(t>0?n+1:n),o.setActiveItem()))}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var n=this.control.querySelectorAll(".active");return n?P(n,t):void 0}setCaret(t){var e=this;"single"===e.settings.mode||e.settings.controlInput?t=e.items.length:(t=Math.max(0,Math.min(e.items.length,t)))==e.caretPos||e.isPending||e.controlChildren().forEach((n,r)=>{r<t?e.control_input.insertAdjacentElement("beforebegin",n):e.control.appendChild(n)}),e.caretPos=t}controlChildren(){return Array.from(this.control.getElementsByClassName(this.settings.itemClass))}lock(){this.close(),this.isLocked=!0,this.refreshState()}unlock(){this.isLocked=!1,this.refreshState()}disable(){var t=this;t.input.disabled=!0,t.control_input.disabled=!0,t.control_input.tabIndex=-1,t.isDisabled=!0,t.lock()}enable(){var t=this;t.input.disabled=!1,t.control_input.disabled=!1,t.control_input.tabIndex=t.tabIndex,t.isDisabled=!1,t.unlock()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,k(t.input,"tomselected"),A(t.input,{hidden:null}),t.input.required=this.isRequired,t._destroy(),delete t.input.tomselect}render(t,e){return"function"!=typeof this.settings.render[t]?null:this._render(t,e)}_render(t,e){var n,r,i="";const o=this;return("option"===t||"item"===t)&&(i=N(e[o.settings.valueField]),r=o.rendered(t,i))||null==(r=o.settings.render[t].call(this,e,R))||(r=b(r),"option"===t||"option_create"===t?e[o.settings.disabledField]?A(r,{"aria-disabled":"true"}):A(r,{"data-selectable":""}):"optgroup"===t&&(n=e.group[o.settings.optgroupValueField],A(r,{"data-group":n}),e.group[o.settings.disabledField]&&A(r,{"data-disabled":""})),"option"!==t&&"item"!==t||(A(r,{"data-value":i}),"item"===t?S(r,o.settings.itemClass):(S(r,o.settings.optionClass),A(r,{role:"option",id:e.$id})),o.renderCache[t][i]=r)),r}rendered(t,e){return null!==e&&this.renderCache[t].hasOwnProperty(e)?this.renderCache[t][e]:null}clearCache(t){var e=this;for(let t in e.options){const n=e.getOption(t);n&&n.remove()}void 0===t?e.renderCache={item:{},option:{}}:e.renderCache[t]={}}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,n){var r=this,i=r[e];r[e]=function(){var e,o;return"after"===t&&(e=i.apply(r,arguments)),o=n.apply(r,arguments),"instead"===t?o:("before"===t&&(e=i.apply(r,arguments)),e)}}}return Z.define("change_listener",(function(){const t=this,e=e=>e.join(t.settings.delimiter);B(t.input,"change",()=>{var n=G(t.input,{delimiter:t.settings.delimiter});e(t.items)!=e(n.items)&&(t.setupOptions(n.options,n.optgroups),t.setValue(n.items))})})),Z.define("checkbox_options",(function(){var t=this,e=t.onOptionSelect;t.settings.hideSelected=!1;var n=function(t){setTimeout(()=>{var e=t.querySelector("input");t.classList.contains("selected")?e.checked=!0:e.checked=!1},1)};t.hook("after","setupTemplates",()=>{var e=t.settings.render.option;t.settings.render.option=(n,r)=>{var i=b(e.call(t,n,r)),o=document.createElement("input");o.addEventListener("click",(function(t){z(t)})),o.type="checkbox";const s=D(n[t.settings.valueField]);return s&&t.items.indexOf(s)>-1&&(o.checked=!0),i.prepend(o),i}}),t.on("item_remove",e=>{var r=t.getOption(e);r&&(r.classList.remove("selected"),n(r))}),t.hook("instead","onOptionSelect",(r,i)=>{if(i.classList.contains("selected"))return i.classList.remove("selected"),t.removeItem(i.dataset.value),t.refreshOptions(),void z(r,!0);e.call(t,r,i),n(i)})})),Z.define("clear_button",(function(t){const e=this,n=Object.assign({className:"clear-button",title:"Clear All",html:t=>`<div class="${t.className}" title="${t.title}">×</div>`},t);e.on("initialize",()=>{var t=b(n.html(n));t.addEventListener("click",t=>{e.clear(),t.preventDefault(),t.stopPropagation()}),e.control.appendChild(t)})})),Z.define("drag_drop",(function(){var t=this;if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===t.settings.mode){var e=t.lock,n=t.unlock;t.hook("instead","lock",()=>{var n=$(t.control).data("sortable");return n&&n.disable(),e.call(t)}),t.hook("instead","unlock",()=>{var e=$(t.control).data("sortable");return e&&e.enable(),n.call(t)}),t.on("initialize",()=>{var e=$(t.control).sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:t.isLocked,start:(t,n)=>{n.placeholder.css("width",n.helper.css("width")),e.css({overflow:"visible"})},stop:()=>{e.css({overflow:"hidden"});var n=[];e.children("[data-value]").each((function(){this.dataset.value&&n.push(this.dataset.value)})),t.setValue(n)}})})}})),Z.define("dropdown_header",(function(t){const e=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a class="'+t.closeClass+'">×</a></div></div>'},t);e.on("initialize",()=>{var t=b(n.html(n)),r=t.querySelector("."+n.closeClass);r&&r.addEventListener("click",t=>{z(t,!0),e.close()}),e.dropdown.insertBefore(t,e.dropdown.firstChild)})})),Z.define("dropdown_input",(function(){var t=this,e=t.settings.controlInput||'<input type="text" autocomplete="off" class="dropdown-input" />';e=b(e),t.settings.placeholder&&A(e,{placeholder:t.settings.placeholder}),t.settings.controlInput=e,t.settings.shouldOpen=!0,t.on("initialize",()=>{B(t.wrapper,"focus",e=>{t.onFocus(e)});const n=()=>{A(t.wrapper,{tabindex:t.input.disabled?"-1":t.tabIndex})};t.on("dropdown_close",n),t.on("dropdown_open",()=>A(t.wrapper,{tabindex:"-1"})),n(),B(t.wrapper,"keypress",e=>{if(!t.control.contains(e.target)&&!t.dropdown.contains(e.target))switch(e.keyCode){case 13:return void t.onClick()}});let r=b('<div class="dropdown-input-wrap">');r.appendChild(e),t.dropdown.insertBefore(r,t.dropdown.firstChild)})})),Z.define("input_autogrow",(function(){var t=this;t.on("initialize",()=>{var e=document.createElement("span"),n=t.control_input;e.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",t.wrapper.appendChild(e);for(const t of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])e.style[t]=n.style[t];var r=()=>{t.items.length>0?(e.textContent=n.value,n.style.width=e.clientWidth+"px"):n.style.width=""};r(),t.on("update item_add item_remove",r),B(n,"input",r),B(n,"keyup",r),B(n,"blur",r),B(n,"update",r)})})),Z.define("no_backspace_delete",(function(){var t=this,e=t.deleteSelection;this.hook("instead","deleteSelection",n=>!!t.activeItems.length&&e.call(t,n))})),Z.define("no_active_items",(function(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})})),Z.define("optgroup_columns",(function(){var t=this,e=t.onKeyDown;t.hook("instead","onKeyDown",n=>{var r,i,o,s;if(!t.isOpen||37!==n.keyCode&&39!==n.keyCode)return e.call(t,n);s=T(t.activeOption,"[data-group]"),r=O(t.activeOption,"[data-selectable]"),s&&(s=37===n.keyCode?s.previousSibling:s.nextSibling)&&(i=(o=s.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,r)])&&t.setActiveOption(i)})})),Z.define("remove_button",(function(t){const e=Object.assign({label:"×",title:"Remove",className:"remove",append:!0},t);var n=this;if(e.append){var r='<a href="javascript:void(0)" class="'+e.className+'" tabindex="-1" title="'+R(e.title)+'">'+e.label+"</a>";n.hook("after","setupTemplates",()=>{var t=n.settings.render.item;n.settings.render.item=(e,i)=>{var o=b(t.call(n,e,i)),s=b(r);return o.appendChild(s),B(s,"mousedown",t=>{z(t,!0)}),B(s,"click",t=>{if(z(t,!0),!n.isLocked){var e=o.dataset.value;n.removeItem(e),n.refreshOptions(!1)}}),o}})}})),Z.define("restore_on_backspace",(function(t){const e=this,n=Object.assign({text:t=>t[e.settings.labelField]},t);e.on("item_remove",(function(t){if(""===e.control_input.value.trim()){var r=e.options[t];r&&e.setTextboxValue(n.text.call(e,r))}}))})),Z.define("virtual_scroll",(function(){const t=this,e=t.canLoad,n=t.clearActiveOption,r=t.loadCallback;var i,o={},s=!1;if(!t.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";function a(e){return!("number"==typeof t.settings.maxOptions&&i.children.length>=t.settings.maxOptions||!(e in o)||!o[e])}t.settings.sortField=[{field:"$order"},{field:"$score"}],t.setNextUrl=function(t,e){o[t]=e},t.getUrl=function(e){if(e in o){const t=o[e];return o[e]=!1,t}return o={},t.settings.firstUrl(e)},t.hook("instead","clearActiveOption",()=>{if(!s)return n.call(t)}),t.hook("instead","canLoad",n=>n in o?a(n):e.call(t,n)),t.hook("instead","loadCallback",(e,n)=>{s||t.clearOptions(),r.call(t,e,n),s=!1}),t.hook("after","refreshOptions",()=>{const e=t.lastValue;var n;a(e)?(n=t.render("loading_more",{query:e}))&&n.setAttribute("data-selectable",""):e in o&&!i.querySelector(".no-results")&&(n=t.render("no_more_results",{query:e})),n&&(S(n,t.settings.optionClass),i.append(n))}),t.on("initialize",()=>{i=t.dropdown_content,t.settings.render=Object.assign({},{loading_more:function(){return'<div class="loading-more-results">Loading more results ... </div>'},no_more_results:function(){return'<div class="no-more-results">No more results</div>'}},t.settings.render),i.addEventListener("scroll",(function(){i.clientHeight/(i.scrollHeight-i.scrollTop)<.95||a(t.lastValue)&&(s||(s=!0,t.load.call(t,t.lastValue)))}))})})),Z}));var tomSelect=function(t,e){return new TomSelect(t,e)},module;!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSToggleState=e():t.HSToggleState=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="./src/js/hs-toggle-state.js")}({"./src/js/hs-toggle-state.js":
|
||
/*!***********************************!*\
|
||
!*** ./src/js/hs-toggle-state.js ***!
|
||
\***********************************/
|
||
/*! exports provided: default */function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.r(e),n.d(e,"default",(function(){return o}));
|
||
/*
|
||
* HSToggleState Plugin
|
||
* @version: 3.0.1 (Sun, 01 Aug 2021)
|
||
* @author: HtmlStream
|
||
* @event-namespace: .HSToggleState
|
||
* @license: Htmlstream Libraries (https://htmlstream.com/)
|
||
* Copyright 2021 Htmlstream
|
||
*/
|
||
var i={targetSelector:null,slaveSelector:null,classMap:{toggle:"toggled"}},o=function(){function t(e,n,r){var i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.collection=[],i=e instanceof HTMLElement?[e]:e instanceof Object?e:document.querySelectorAll(e);for(var o=0;o<i.length;o+=1)this.addToCollection(i[o],n,r||i[o].id);return!!this.collection.length&&(this._init(),this)}var e,n;return e=t,(n=[{key:"_init",value:function(){for(var t=this,e=function(e){var n,r=void 0;if(t.collection[e].hasOwnProperty("$initializedEl"))return"continue";r=t.collection[e].$el,n=t.collection[e].options,t.prepareObject(r,n);var i=document.querySelector(n.slaveSelector);r.addEventListener("click",(function(){r.classList.toggle(n.classMap.toggle),n.slaveSelector&&(r.classList.contains(n.classMap.toggle)?i.classList.add(n.classMap.toggle):i.classList.remove(n.classMap.toggle)),t.checkState(r,n)})),i&&i.addEventListener("click",(function(){document.querySelector('[data-hs-toggle-state-slave="'.concat(n.slaveSelector,'"]')).classList.remove(n.classMap.toggle)})),t.collection[e].$initializedEl=n},n=0;n<t.collection.length;n+=1)e(n)}},{key:"prepareObject",value:function(t,e){t.setAttribute("data-hs-toggle-state-slave",e.slaveSelector)}},{key:"checkState",value:function(t,e){var n=Array.from(document.querySelectorAll(e.targetSelector));t.classList.contains(e.classMap.toggle)?n.forEach((function(t){return t.checked=!0})):n.forEach((function(t){return t.checked=!1}))}},{key:"addToCollection",value:function(t,e,n){this.collection.push({$el:t,id:n||null,options:Object.assign({},i,t.hasAttribute("data-hs-toggle-state-options")?JSON.parse(t.getAttribute("data-hs-toggle-state-options")):{},e)})}},{key:"getItem",value:function(t){return"number"==typeof t?this.collection[t].$initializedEl:this.collection.find((function(e){return e.id===t})).$initializedEl}}])&&r(e.prototype,n),t}()}}).default})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HsNavScroller=e():t.HsNavScroller=e()}(window,(function(){return d={"./node_modules/velocity-animate/velocity.js":function(module,exports,__webpack_require__){eval('var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! VelocityJS.org (1.5.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */\r\n\r\n/*************************\r\n Velocity jQuery Shim\r\n *************************/\r\n\r\n/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */\r\n\r\n/* This file contains the jQuery functions that Velocity relies on, thereby removing Velocity\'s dependency on a full copy of jQuery, and allowing it to work in any environment. */\r\n/* These shimmed functions are only used if jQuery isn\'t present. If both this shim and jQuery are loaded, Velocity defaults to jQuery proper. */\r\n/* Browser support: Using this shim instead of jQuery proper removes support for IE8. */\r\n\r\n(function(window) {\r\n\t"use strict";\r\n\t/***************\r\n\t Setup\r\n\t ***************/\r\n\r\n\t/* If jQuery is already loaded, there\'s no point in loading this shim. */\r\n\tif (window.jQuery) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t/* jQuery base. */\r\n\tvar $ = function(selector, context) {\r\n\t\treturn new $.fn.init(selector, context);\r\n\t};\r\n\r\n\t/********************\r\n\t Private Methods\r\n\t ********************/\r\n\r\n\t/* jQuery */\r\n\t$.isWindow = function(obj) {\r\n\t\t/* jshint eqeqeq: false */\r\n\t\treturn obj && obj === obj.window;\r\n\t};\r\n\r\n\t/* jQuery */\r\n\t$.type = function(obj) {\r\n\t\tif (!obj) {\r\n\t\t\treturn obj + "";\r\n\t\t}\r\n\r\n\t\treturn typeof obj === "object" || typeof obj === "function" ?\r\n\t\t\t\tclass2type[toString.call(obj)] || "object" :\r\n\t\t\t\ttypeof obj;\r\n\t};\r\n\r\n\t/* jQuery */\r\n\t$.isArray = Array.isArray || function(obj) {\r\n\t\treturn $.type(obj) === "array";\r\n\t};\r\n\r\n\t/* jQuery */\r\n\tfunction isArraylike(obj) {\r\n\t\tvar length = obj.length,\r\n\t\t\t\ttype = $.type(obj);\r\n\r\n\t\tif (type === "function" || $.isWindow(obj)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (obj.nodeType === 1 && length) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn type === "array" || length === 0 || typeof length === "number" && length > 0 && (length - 1) in obj;\r\n\t}\r\n\r\n\t/***************\r\n\t $ Methods\r\n\t ***************/\r\n\r\n\t/* jQuery: Support removed for IE<9. */\r\n\t$.isPlainObject = function(obj) {\r\n\t\tvar key;\r\n\r\n\t\tif (!obj || $.type(obj) !== "object" || obj.nodeType || $.isWindow(obj)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tif (obj.constructor &&\r\n\t\t\t\t\t!hasOwn.call(obj, "constructor") &&\r\n\t\t\t\t\t!hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch (e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor (key in obj) {\r\n\t\t}\r\n\r\n\t\treturn key === undefined || hasOwn.call(obj, key);\r\n\t};\r\n\r\n\t/* jQuery */\r\n\t$.each = function(obj, callback, args) {\r\n\t\tvar value,\r\n\t\t\t\ti = 0,\r\n\t\t\t\tlength = obj.length,\r\n\t\t\t\tisArray = isArraylike(obj);\r\n\r\n\t\tif (args) {\r\n\t\t\tif (isArray) {\r\n\t\t\t\tfor (; i < length; i++) {\r\n\t\t\t\t\tvalue = callback.apply(obj[i], args);\r\n\r\n\t\t\t\t\tif (value === false) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (i in obj) {\r\n\t\t\t\t\tif (!obj.hasOwnProperty(i)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvalue = callback.apply(obj[i], args);\r\n\r\n\t\t\t\t\tif (value === false) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tif (isArray) {\r\n\t\t\t\tfor (; i < length; i++) {\r\n\t\t\t\t\tvalue = callback.call(obj[i], i, obj[i]);\r\n\r\n\t\t\t\t\tif (value === false) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (i in obj) {\r\n\t\t\t\t\tif (!obj.hasOwnProperty(i)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvalue = callback.call(obj[i], i, obj[i]);\r\n\r\n\t\t\t\t\tif (value === false) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn obj;\r\n\t};\r\n\r\n\t/* Custom */\r\n\t$.data = function(node, key, value) {\r\n\t\t/* $.getData() */\r\n\t\tif (value === undefined) {\r\n\t\t\tvar getId = node[$.expando],\r\n\t\t\t\t\tstore = getId && cache[getId];\r\n\r\n\t\t\tif (key === undefined) {\r\n\t\t\t\treturn store;\r\n\t\t\t} else if (store) {\r\n\t\t\t\tif (key in store) {\r\n\t\t\t\t\treturn store[key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/* $.setData() */\r\n\t\t} else if (key !== undefined) {\r\n\t\t\tvar setId = node[$.expando] || (node[$.expando] = ++$.uuid);\r\n\r\n\t\t\tcache[setId] = cache[setId] || {};\r\n\t\t\tcache[setId][key] = value;\r\n\r\n\t\t\treturn value;\r\n\t\t}\r\n\t};\r\n\r\n\t/* Custom */\r\n\t$.removeData = function(node, keys) {\r\n\t\tvar id = node[$.expando],\r\n\t\t\t\tstore = id && cache[id];\r\n\r\n\t\tif (store) {\r\n\t\t\t// Cleanup the entire store if no keys are provided.\r\n\t\t\tif (!keys) {\r\n\t\t\t\tdelete cache[id];\r\n\t\t\t} else {\r\n\t\t\t\t$.each(keys, function(_, key) {\r\n\t\t\t\t\tdelete store[key];\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/* jQuery */\r\n\t$.extend = function() {\r\n\t\tvar src, copyIsArray, copy, name, options, clone,\r\n\t\t\t\ttarget = arguments[0] || {},\r\n\t\t\t\ti = 1,\r\n\t\t\t\tlength = arguments.length,\r\n\t\t\t\tdeep = false;\r\n\r\n\t\tif (typeof target === "boolean") {\r\n\t\t\tdeep = target;\r\n\r\n\t\t\ttarget = arguments[i] || {};\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\tif (typeof target !== "object" && $.type(target) !== "function") {\r\n\t\t\ttarget = {};\r\n\t\t}\r\n\r\n\t\tif (i === length) {\r\n\t\t\ttarget = this;\r\n\t\t\ti--;\r\n\t\t}\r\n\r\n\t\tfor (; i < length; i++) {\r\n\t\t\tif ((options = arguments[i])) {\r\n\t\t\t\tfor (name in options) {\r\n\t\t\t\t\tif (!options.hasOwnProperty(name)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsrc = target[name];\r\n\t\t\t\t\tcopy = options[name];\r\n\r\n\t\t\t\t\tif (target === copy) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy)))) {\r\n\t\t\t\t\t\tif (copyIsArray) {\r\n\t\t\t\t\t\t\tcopyIsArray = false;\r\n\t\t\t\t\t\t\tclone = src && $.isArray(src) ? src : [];\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tclone = src && $.isPlainObject(src) ? src : {};\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ttarget[name] = $.extend(deep, clone, copy);\r\n\r\n\t\t\t\t\t} else if (copy !== undefined) {\r\n\t\t\t\t\t\ttarget[name] = copy;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\t/* jQuery 1.4.3 */\r\n\t$.queue = function(elem, type, data) {\r\n\t\tfunction $makeArray(arr, results) {\r\n\t\t\tvar ret = results || [];\r\n\r\n\t\t\tif (arr) {\r\n\t\t\t\tif (isArraylike(Object(arr))) {\r\n\t\t\t\t\t/* $.merge */\r\n\t\t\t\t\t(function(first, second) {\r\n\t\t\t\t\t\tvar len = +second.length,\r\n\t\t\t\t\t\t\t\tj = 0,\r\n\t\t\t\t\t\t\t\ti = first.length;\r\n\r\n\t\t\t\t\t\twhile (j < len) {\r\n\t\t\t\t\t\t\tfirst[i++] = second[j++];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (len !== len) {\r\n\t\t\t\t\t\t\twhile (second[j] !== undefined) {\r\n\t\t\t\t\t\t\t\tfirst[i++] = second[j++];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfirst.length = i;\r\n\r\n\t\t\t\t\t\treturn first;\r\n\t\t\t\t\t})(ret, typeof arr === "string" ? [arr] : arr);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t[].push.call(ret, arr);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn ret;\r\n\t\t}\r\n\r\n\t\tif (!elem) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\ttype = (type || "fx") + "queue";\r\n\r\n\t\tvar q = $.data(elem, type);\r\n\r\n\t\tif (!data) {\r\n\t\t\treturn q || [];\r\n\t\t}\r\n\r\n\t\tif (!q || $.isArray(data)) {\r\n\t\t\tq = $.data(elem, type, $makeArray(data));\r\n\t\t} else {\r\n\t\t\tq.push(data);\r\n\t\t}\r\n\r\n\t\treturn q;\r\n\t};\r\n\r\n\t/* jQuery 1.4.3 */\r\n\t$.dequeue = function(elems, type) {\r\n\t\t/* Custom: Embed element iteration. */\r\n\t\t$.each(elems.nodeType ? [elems] : elems, function(i, elem) {\r\n\t\t\ttype = type || "fx";\r\n\r\n\t\t\tvar queue = $.queue(elem, type),\r\n\t\t\t\t\tfn = queue.shift();\r\n\r\n\t\t\tif (fn === "inprogress") {\r\n\t\t\t\tfn = queue.shift();\r\n\t\t\t}\r\n\r\n\t\t\tif (fn) {\r\n\t\t\t\tif (type === "fx") {\r\n\t\t\t\t\tqueue.unshift("inprogress");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfn.call(elem, function() {\r\n\t\t\t\t\t$.dequeue(elem, type);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\t/******************\r\n\t $.fn Methods\r\n\t ******************/\r\n\r\n\t/* jQuery */\r\n\t$.fn = $.prototype = {\r\n\t\tinit: function(selector) {\r\n\t\t\t/* Just return the element wrapped inside an array; don\'t proceed with the actual jQuery node wrapping process. */\r\n\t\t\tif (selector.nodeType) {\r\n\t\t\t\tthis[0] = selector;\r\n\r\n\t\t\t\treturn this;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Error("Not a DOM node.");\r\n\t\t\t}\r\n\t\t},\r\n\t\toffset: function() {\r\n\t\t\t/* jQuery altered code: Dropped disconnected DOM node checking. */\r\n\t\t\tvar box = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : {top: 0, left: 0};\r\n\r\n\t\t\treturn {\r\n\t\t\t\ttop: box.top + (window.pageYOffset || document.scrollTop || 0) - (document.clientTop || 0),\r\n\t\t\t\tleft: box.left + (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || 0)\r\n\t\t\t};\r\n\t\t},\r\n\t\tposition: function() {\r\n\t\t\t/* jQuery */\r\n\t\t\tfunction offsetParentFn(elem) {\r\n\t\t\t\tvar offsetParent = elem.offsetParent;\r\n\r\n\t\t\t\twhile (offsetParent && (offsetParent.nodeName.toLowerCase() !== "html" && offsetParent.style && offsetParent.style.position.toLowerCase() === "static")) {\r\n\t\t\t\t\toffsetParent = offsetParent.offsetParent;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn offsetParent || document;\r\n\t\t\t}\r\n\r\n\t\t\t/* Zepto */\r\n\t\t\tvar elem = this[0],\r\n\t\t\t\t\toffsetParent = offsetParentFn(elem),\r\n\t\t\t\t\toffset = this.offset(),\r\n\t\t\t\t\tparentOffset = /^(?:body|html)$/i.test(offsetParent.nodeName) ? {top: 0, left: 0} : $(offsetParent).offset();\r\n\r\n\t\t\toffset.top -= parseFloat(elem.style.marginTop) || 0;\r\n\t\t\toffset.left -= parseFloat(elem.style.marginLeft) || 0;\r\n\r\n\t\t\tif (offsetParent.style) {\r\n\t\t\t\tparentOffset.top += parseFloat(offsetParent.style.borderTopWidth) || 0;\r\n\t\t\t\tparentOffset.left += parseFloat(offsetParent.style.borderLeftWidth) || 0;\r\n\t\t\t}\r\n\r\n\t\t\treturn {\r\n\t\t\t\ttop: offset.top - parentOffset.top,\r\n\t\t\t\tleft: offset.left - parentOffset.left\r\n\t\t\t};\r\n\t\t}\r\n\t};\r\n\r\n\t/**********************\r\n\t Private Variables\r\n\t **********************/\r\n\r\n\t/* For $.data() */\r\n\tvar cache = {};\r\n\t$.expando = "velocity" + (new Date().getTime());\r\n\t$.uuid = 0;\r\n\r\n\t/* For $.queue() */\r\n\tvar class2type = {},\r\n\t\t\thasOwn = class2type.hasOwnProperty,\r\n\t\t\ttoString = class2type.toString;\r\n\r\n\tvar types = "Boolean Number String Function Array Date RegExp Object Error".split(" ");\r\n\tfor (var i = 0; i < types.length; i++) {\r\n\t\tclass2type["[object " + types[i] + "]"] = types[i].toLowerCase();\r\n\t}\r\n\r\n\t/* Makes $(node) possible, without having to call init. */\r\n\t$.fn.init.prototype = $.fn;\r\n\r\n\t/* Globalize Velocity onto the window, and assign its Utilities property. */\r\n\twindow.Velocity = {Utilities: $};\r\n})(window);\r\n\r\n/******************\r\n Velocity.js\r\n ******************/\r\n\r\n(function(factory) {\r\n\t"use strict";\r\n\t/* CommonJS module. */\r\n\tif ( true && typeof module.exports === "object") {\r\n\t\tmodule.exports = factory();\r\n\t\t/* AMD module. */\r\n\t} else if (true) {\r\n\t\t!(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === \'function\' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\t\t/* Browser globals. */\r\n\t} else {}\r\n}(function() {\r\n\t"use strict";\r\n\treturn function(global, window, document, undefined) {\r\n\r\n\t\t/***************\r\n\t\t Summary\r\n\t\t ***************/\r\n\r\n\t\t/*\r\n\t\t - CSS: CSS stack that works independently from the rest of Velocity.\r\n\t\t - animate(): Core animation method that iterates over the targeted elements and queues the incoming call onto each element individually.\r\n\t\t - Pre-Queueing: Prepare the element for animation by instantiating its data cache and processing the call\'s options.\r\n\t\t - Queueing: The logic that runs once the call has reached its point of execution in the element\'s $.queue() stack.\r\n\t\t Most logic is placed here to avoid risking it becoming stale (if the element\'s properties have changed).\r\n\t\t - Pushing: Consolidation of the tween data followed by its push onto the global in-progress calls container.\r\n\t\t - tick(): The single requestAnimationFrame loop responsible for tweening all in-progress calls.\r\n\t\t - completeCall(): Handles the cleanup process for each Velocity call.\r\n\t\t */\r\n\r\n\t\t/*********************\r\n\t\t Helper Functions\r\n\t\t *********************/\r\n\r\n\t\t/* IE detection. Gist: https://gist.github.com/julianshapiro/9098609 */\r\n\t\tvar IE = (function() {\r\n\t\t\tif (document.documentMode) {\r\n\t\t\t\treturn document.documentMode;\r\n\t\t\t} else {\r\n\t\t\t\tfor (var i = 7; i > 4; i--) {\r\n\t\t\t\t\tvar div = document.createElement("div");\r\n\r\n\t\t\t\t\tdiv.innerHTML = "\x3c!--[if IE " + i + "]><span></span><![endif]--\x3e";\r\n\r\n\t\t\t\t\tif (div.getElementsByTagName("span").length) {\r\n\t\t\t\t\t\tdiv = null;\r\n\r\n\t\t\t\t\t\treturn i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn undefined;\r\n\t\t})();\r\n\r\n\t\t/* rAF shim. Gist: https://gist.github.com/julianshapiro/9497513 */\r\n\t\tvar rAFShim = (function() {\r\n\t\t\tvar timeLast = 0;\r\n\r\n\t\t\treturn window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) {\r\n\t\t\t\tvar timeCurrent = (new Date()).getTime(),\r\n\t\t\t\t\t\ttimeDelta;\r\n\r\n\t\t\t\t/* Dynamically set delay on a per-tick basis to match 60fps. */\r\n\t\t\t\t/* Technique by Erik Moller. MIT license: https://gist.github.com/paulirish/1579671 */\r\n\t\t\t\ttimeDelta = Math.max(0, 16 - (timeCurrent - timeLast));\r\n\t\t\t\ttimeLast = timeCurrent + timeDelta;\r\n\r\n\t\t\t\treturn setTimeout(function() {\r\n\t\t\t\t\tcallback(timeCurrent + timeDelta);\r\n\t\t\t\t}, timeDelta);\r\n\t\t\t};\r\n\t\t})();\r\n\r\n\t\tvar performance = (function() {\r\n\t\t\tvar perf = window.performance || {};\r\n\r\n\t\t\tif (typeof perf.now !== "function") {\r\n\t\t\t\tvar nowOffset = perf.timing && perf.timing.navigationStart ? perf.timing.navigationStart : (new Date()).getTime();\r\n\r\n\t\t\t\tperf.now = function() {\r\n\t\t\t\t\treturn (new Date()).getTime() - nowOffset;\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\treturn perf;\r\n\t\t})();\r\n\r\n\t\t/* Array compacting. Copyright Lo-Dash. MIT License: https://github.com/lodash/lodash/blob/master/LICENSE.txt */\r\n\t\tfunction compactSparseArray(array) {\r\n\t\t\tvar index = -1,\r\n\t\t\t\t\tlength = array ? array.length : 0,\r\n\t\t\t\t\tresult = [];\r\n\r\n\t\t\twhile (++index < length) {\r\n\t\t\t\tvar value = array[index];\r\n\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tresult.push(value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Shim for "fixing" IE\'s lack of support (IE < 9) for applying slice\r\n\t\t * on host objects like NamedNodeMap, NodeList, and HTMLCollection\r\n\t\t * (technically, since host objects have been implementation-dependent,\r\n\t\t * at least before ES2015, IE hasn\'t needed to work this way).\r\n\t\t * Also works on strings, fixes IE < 9 to allow an explicit undefined\r\n\t\t * for the 2nd argument (as in Firefox), and prevents errors when\r\n\t\t * called on other DOM objects.\r\n\t\t */\r\n\t\tvar _slice = (function() {\r\n\t\t\tvar slice = Array.prototype.slice;\r\n\r\n\t\t\ttry {\r\n\t\t\t\t// Can\'t be used with DOM elements in IE < 9\r\n\t\t\t\tslice.call(document.documentElement);\r\n\t\t\t\treturn slice;\r\n\t\t\t} catch (e) { // Fails in IE < 9\r\n\r\n\t\t\t\t// This will work for genuine arrays, array-like objects, \r\n\t\t\t\t// NamedNodeMap (attributes, entities, notations),\r\n\t\t\t\t// NodeList (e.g., getElementsByTagName), HTMLCollection (e.g., childNodes),\r\n\t\t\t\t// and will not fail on other DOM objects (as do DOM elements in IE < 9)\r\n\t\t\t\treturn function(begin, end) {\r\n\t\t\t\t\tvar len = this.length;\r\n\r\n\t\t\t\t\tif (typeof begin !== "number") {\r\n\t\t\t\t\t\tbegin = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// IE < 9 gets unhappy with an undefined end argument\r\n\t\t\t\t\tif (typeof end !== "number") {\r\n\t\t\t\t\t\tend = len;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// For native Array objects, we use the native slice function\r\n\t\t\t\t\tif (this.slice) {\r\n\t\t\t\t\t\treturn slice.call(this, begin, end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// For array like object we handle it ourselves.\r\n\t\t\t\t\tvar i,\r\n\t\t\t\t\t\t\tcloned = [],\r\n\t\t\t\t\t\t\t// Handle negative value for "begin"\r\n\t\t\t\t\t\t\tstart = (begin >= 0) ? begin : Math.max(0, len + begin),\r\n\t\t\t\t\t\t\t// Handle negative value for "end"\r\n\t\t\t\t\t\t\tupTo = end < 0 ? len + end : Math.min(end, len),\r\n\t\t\t\t\t\t\t// Actual expected size of the slice\r\n\t\t\t\t\t\t\tsize = upTo - start;\r\n\r\n\t\t\t\t\tif (size > 0) {\r\n\t\t\t\t\t\tcloned = new Array(size);\r\n\t\t\t\t\t\tif (this.charAt) {\r\n\t\t\t\t\t\t\tfor (i = 0; i < size; i++) {\r\n\t\t\t\t\t\t\t\tcloned[i] = this.charAt(start + i);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (i = 0; i < size; i++) {\r\n\t\t\t\t\t\t\t\tcloned[i] = this[start + i];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn cloned;\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t})();\r\n\r\n\t\t/* .indexOf doesn\'t exist in IE<9 */\r\n\t\tvar _inArray = (function() {\r\n\t\t\tif (Array.prototype.includes) {\r\n\t\t\t\treturn function(arr, val) {\r\n\t\t\t\t\treturn arr.includes(val);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\tif (Array.prototype.indexOf) {\r\n\t\t\t\treturn function(arr, val) {\r\n\t\t\t\t\treturn arr.indexOf(val) >= 0;\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\treturn function(arr, val) {\r\n\t\t\t\tfor (var i = 0; i < arr.length; i++) {\r\n\t\t\t\t\tif (arr[i] === val) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t});\r\n\r\n\t\tfunction sanitizeElements(elements) {\r\n\t\t\t/* Unwrap jQuery/Zepto objects. */\r\n\t\t\tif (Type.isWrapped(elements)) {\r\n\t\t\t\telements = _slice.call(elements);\r\n\t\t\t\t/* Wrap a single element in an array so that $.each() can iterate with the element instead of its node\'s children. */\r\n\t\t\t} else if (Type.isNode(elements)) {\r\n\t\t\t\telements = [elements];\r\n\t\t\t}\r\n\r\n\t\t\treturn elements;\r\n\t\t}\r\n\r\n\t\tvar Type = {\r\n\t\t\tisNumber: function(variable) {\r\n\t\t\t\treturn (typeof variable === "number");\r\n\t\t\t},\r\n\t\t\tisString: function(variable) {\r\n\t\t\t\treturn (typeof variable === "string");\r\n\t\t\t},\r\n\t\t\tisArray: Array.isArray || function(variable) {\r\n\t\t\t\treturn Object.prototype.toString.call(variable) === "[object Array]";\r\n\t\t\t},\r\n\t\t\tisFunction: function(variable) {\r\n\t\t\t\treturn Object.prototype.toString.call(variable) === "[object Function]";\r\n\t\t\t},\r\n\t\t\tisNode: function(variable) {\r\n\t\t\t\treturn variable && variable.nodeType;\r\n\t\t\t},\r\n\t\t\t/* Determine if variable is an array-like wrapped jQuery, Zepto or similar element, or even a NodeList etc. */\r\n\t\t\t/* NOTE: HTMLFormElements also have a length. */\r\n\t\t\tisWrapped: function(variable) {\r\n\t\t\t\treturn variable\r\n\t\t\t\t\t\t&& variable !== window\r\n\t\t\t\t\t\t&& Type.isNumber(variable.length)\r\n\t\t\t\t\t\t&& !Type.isString(variable)\r\n\t\t\t\t\t\t&& !Type.isFunction(variable)\r\n\t\t\t\t\t\t&& !Type.isNode(variable)\r\n\t\t\t\t\t\t&& (variable.length === 0 || Type.isNode(variable[0]));\r\n\t\t\t},\r\n\t\t\tisSVG: function(variable) {\r\n\t\t\t\treturn window.SVGElement && (variable instanceof window.SVGElement);\r\n\t\t\t},\r\n\t\t\tisEmptyObject: function(variable) {\r\n\t\t\t\tfor (var name in variable) {\r\n\t\t\t\t\tif (variable.hasOwnProperty(name)) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t/*****************\r\n\t\t Dependencies\r\n\t\t *****************/\r\n\r\n\t\tvar $,\r\n\t\t\t\tisJQuery = false;\r\n\r\n\t\tif (global.fn && global.fn.jquery) {\r\n\t\t\t$ = global;\r\n\t\t\tisJQuery = true;\r\n\t\t} else {\r\n\t\t\t$ = window.Velocity.Utilities;\r\n\t\t}\r\n\r\n\t\tif (IE <= 8 && !isJQuery) {\r\n\t\t\tthrow new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");\r\n\t\t} else if (IE <= 7) {\r\n\t\t\t/* Revert to jQuery\'s $.animate(), and lose Velocity\'s extra features. */\r\n\t\t\tjQuery.fn.velocity = jQuery.fn.animate;\r\n\r\n\t\t\t/* Now that $.fn.velocity is aliased, abort this Velocity declaration. */\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/*****************\r\n\t\t Constants\r\n\t\t *****************/\r\n\r\n\t\tvar DURATION_DEFAULT = 400,\r\n\t\t\t\tEASING_DEFAULT = "swing";\r\n\r\n\t\t/*************\r\n\t\t State\r\n\t\t *************/\r\n\r\n\t\tvar Velocity = {\r\n\t\t\t/* Container for page-wide Velocity state data. */\r\n\t\t\tState: {\r\n\t\t\t\t/* Detect mobile devices to determine if mobileHA should be turned on. */\r\n\t\t\t\tisMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent),\r\n\t\t\t\t/* The mobileHA option\'s behavior changes on older Android devices (Gingerbread, versions 2.3.3-2.3.7). */\r\n\t\t\t\tisAndroid: /Android/i.test(window.navigator.userAgent),\r\n\t\t\t\tisGingerbread: /Android 2\\.3\\.[3-7]/i.test(window.navigator.userAgent),\r\n\t\t\t\tisChrome: window.chrome,\r\n\t\t\t\tisFirefox: /Firefox/i.test(window.navigator.userAgent),\r\n\t\t\t\t/* Create a cached element for re-use when checking for CSS property prefixes. */\r\n\t\t\t\tprefixElement: document.createElement("div"),\r\n\t\t\t\t/* Cache every prefix match to avoid repeating lookups. */\r\n\t\t\t\tprefixMatches: {},\r\n\t\t\t\t/* Cache the anchor used for animating window scrolling. */\r\n\t\t\t\tscrollAnchor: null,\r\n\t\t\t\t/* Cache the browser-specific property names associated with the scroll anchor. */\r\n\t\t\t\tscrollPropertyLeft: null,\r\n\t\t\t\tscrollPropertyTop: null,\r\n\t\t\t\t/* Keep track of whether our RAF tick is running. */\r\n\t\t\t\tisTicking: false,\r\n\t\t\t\t/* Container for every in-progress call to Velocity. */\r\n\t\t\t\tcalls: [],\r\n\t\t\t\tdelayedElements: {\r\n\t\t\t\t\tcount: 0\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t/* Velocity\'s custom CSS stack. Made global for unit testing. */\r\n\t\t\tCSS: {/* Defined below. */},\r\n\t\t\t/* A shim of the jQuery utility functions used by Velocity -- provided by Velocity\'s optional jQuery shim. */\r\n\t\t\tUtilities: $,\r\n\t\t\t/* Container for the user\'s custom animation redirects that are referenced by name in place of the properties map argument. */\r\n\t\t\tRedirects: {/* Manually registered by the user. */},\r\n\t\t\tEasings: {/* Defined below. */},\r\n\t\t\t/* Attempt to use ES6 Promises by default. Users can override this with a third-party promises library. */\r\n\t\t\tPromise: window.Promise,\r\n\t\t\t/* Velocity option defaults, which can be overriden by the user. */\r\n\t\t\tdefaults: {\r\n\t\t\t\tqueue: "",\r\n\t\t\t\tduration: DURATION_DEFAULT,\r\n\t\t\t\teasing: EASING_DEFAULT,\r\n\t\t\t\tbegin: undefined,\r\n\t\t\t\tcomplete: undefined,\r\n\t\t\t\tprogress: undefined,\r\n\t\t\t\tdisplay: undefined,\r\n\t\t\t\tvisibility: undefined,\r\n\t\t\t\tloop: false,\r\n\t\t\t\tdelay: false,\r\n\t\t\t\tmobileHA: true,\r\n\t\t\t\t/* Advanced: Set to false to prevent property values from being cached between consecutive Velocity-initiated chain calls. */\r\n\t\t\t\t_cacheValues: true,\r\n\t\t\t\t/* Advanced: Set to false if the promise should always resolve on empty element lists. */\r\n\t\t\t\tpromiseRejectEmpty: true\r\n\t\t\t},\r\n\t\t\t/* A design goal of Velocity is to cache data wherever possible in order to avoid DOM requerying. Accordingly, each element has a data cache. */\r\n\t\t\tinit: function(element) {\r\n\t\t\t\t$.data(element, "velocity", {\r\n\t\t\t\t\t/* Store whether this is an SVG element, since its properties are retrieved and updated differently than standard HTML elements. */\r\n\t\t\t\t\tisSVG: Type.isSVG(element),\r\n\t\t\t\t\t/* Keep track of whether the element is currently being animated by Velocity.\r\n\t\t\t\t\t This is used to ensure that property values are not transferred between non-consecutive (stale) calls. */\r\n\t\t\t\t\tisAnimating: false,\r\n\t\t\t\t\t/* A reference to the element\'s live computedStyle object. Learn more here: https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle */\r\n\t\t\t\t\tcomputedStyle: null,\r\n\t\t\t\t\t/* Tween data is cached for each animation on the element so that data can be passed across calls --\r\n\t\t\t\t\t in particular, end values are used as subsequent start values in consecutive Velocity calls. */\r\n\t\t\t\t\ttweensContainer: null,\r\n\t\t\t\t\t/* The full root property values of each CSS hook being animated on this element are cached so that:\r\n\t\t\t\t\t 1) Concurrently-animating hooks sharing the same root can have their root values\' merged into one while tweening.\r\n\t\t\t\t\t 2) Post-hook-injection root values can be transferred over to consecutively chained Velocity calls as starting root values. */\r\n\t\t\t\t\trootPropertyValueCache: {},\r\n\t\t\t\t\t/* A cache for transform updates, which must be manually flushed via CSS.flushTransformCache(). */\r\n\t\t\t\t\ttransformCache: {}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\t/* A parallel to jQuery\'s $.css(), used for getting/setting Velocity\'s hooked CSS properties. */\r\n\t\t\thook: null, /* Defined below. */\r\n\t\t\t/* Velocity-wide animation time remapping for testing purposes. */\r\n\t\t\tmock: false,\r\n\t\t\tversion: {major: 1, minor: 5, patch: 2},\r\n\t\t\t/* Set to 1 or 2 (most verbose) to output debug info to console. */\r\n\t\t\tdebug: false,\r\n\t\t\t/* Use rAF high resolution timestamp when available */\r\n\t\t\ttimestamp: true,\r\n\t\t\t/* Pause all animations */\r\n\t\t\tpauseAll: function(queueName) {\r\n\t\t\t\tvar currentTime = (new Date()).getTime();\r\n\r\n\t\t\t\t$.each(Velocity.State.calls, function(i, activeCall) {\r\n\r\n\t\t\t\t\tif (activeCall) {\r\n\r\n\t\t\t\t\t\t/* If we have a queueName and this call is not on that queue, skip */\r\n\t\t\t\t\t\tif (queueName !== undefined && ((activeCall[2].queue !== queueName) || (activeCall[2].queue === false))) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Set call to paused */\r\n\t\t\t\t\t\tactiveCall[5] = {\r\n\t\t\t\t\t\t\tresume: false\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t/* Pause timers on any currently delayed calls */\r\n\t\t\t\t$.each(Velocity.State.delayedElements, function(k, element) {\r\n\t\t\t\t\tif (!element) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpauseDelayOnElement(element, currentTime);\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\t/* Resume all animations */\r\n\t\t\tresumeAll: function(queueName) {\r\n\t\t\t\tvar currentTime = (new Date()).getTime();\r\n\r\n\t\t\t\t$.each(Velocity.State.calls, function(i, activeCall) {\r\n\r\n\t\t\t\t\tif (activeCall) {\r\n\r\n\t\t\t\t\t\t/* If we have a queueName and this call is not on that queue, skip */\r\n\t\t\t\t\t\tif (queueName !== undefined && ((activeCall[2].queue !== queueName) || (activeCall[2].queue === false))) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Set call to resumed if it was paused */\r\n\t\t\t\t\t\tif (activeCall[5]) {\r\n\t\t\t\t\t\t\tactiveCall[5].resume = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t/* Resume timers on any currently delayed calls */\r\n\t\t\t\t$.each(Velocity.State.delayedElements, function(k, element) {\r\n\t\t\t\t\tif (!element) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tresumeDelayOnElement(element, currentTime);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t/* Retrieve the appropriate scroll anchor and property name for the browser: https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollY */\r\n\t\tif (window.pageYOffset !== undefined) {\r\n\t\t\tVelocity.State.scrollAnchor = window;\r\n\t\t\tVelocity.State.scrollPropertyLeft = "pageXOffset";\r\n\t\t\tVelocity.State.scrollPropertyTop = "pageYOffset";\r\n\t\t} else {\r\n\t\t\tVelocity.State.scrollAnchor = document.documentElement || document.body.parentNode || document.body;\r\n\t\t\tVelocity.State.scrollPropertyLeft = "scrollLeft";\r\n\t\t\tVelocity.State.scrollPropertyTop = "scrollTop";\r\n\t\t}\r\n\r\n\t\t/* Shorthand alias for jQuery\'s $.data() utility. */\r\n\t\tfunction Data(element) {\r\n\t\t\t/* Hardcode a reference to the plugin name. */\r\n\t\t\tvar response = $.data(element, "velocity");\r\n\r\n\t\t\t/* jQuery <=1.4.2 returns null instead of undefined when no match is found. We normalize this behavior. */\r\n\t\t\treturn response === null ? undefined : response;\r\n\t\t}\r\n\r\n\t\t/**************\r\n\t\t Delay Timer\r\n\t\t **************/\r\n\r\n\t\tfunction pauseDelayOnElement(element, currentTime) {\r\n\t\t\t/* Check for any delay timers, and pause the set timeouts (while preserving time data)\r\n\t\t\t to be resumed when the "resume" command is issued */\r\n\t\t\tvar data = Data(element);\r\n\t\t\tif (data && data.delayTimer && !data.delayPaused) {\r\n\t\t\t\tdata.delayRemaining = data.delay - currentTime + data.delayBegin;\r\n\t\t\t\tdata.delayPaused = true;\r\n\t\t\t\tclearTimeout(data.delayTimer.setTimeout);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction resumeDelayOnElement(element, currentTime) {\r\n\t\t\t/* Check for any paused timers and resume */\r\n\t\t\tvar data = Data(element);\r\n\t\t\tif (data && data.delayTimer && data.delayPaused) {\r\n\t\t\t\t/* If the element was mid-delay, re initiate the timeout with the remaining delay */\r\n\t\t\t\tdata.delayPaused = false;\r\n\t\t\t\tdata.delayTimer.setTimeout = setTimeout(data.delayTimer.next, data.delayRemaining);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\r\n\t\t/**************\r\n\t\t Easing\r\n\t\t **************/\r\n\r\n\t\t/* Step easing generator. */\r\n\t\tfunction generateStep(steps) {\r\n\t\t\treturn function(p) {\r\n\t\t\t\treturn Math.round(p * steps) * (1 / steps);\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\t/* Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */\r\n\t\tfunction generateBezier(mX1, mY1, mX2, mY2) {\r\n\t\t\tvar NEWTON_ITERATIONS = 4,\r\n\t\t\t\t\tNEWTON_MIN_SLOPE = 0.001,\r\n\t\t\t\t\tSUBDIVISION_PRECISION = 0.0000001,\r\n\t\t\t\t\tSUBDIVISION_MAX_ITERATIONS = 10,\r\n\t\t\t\t\tkSplineTableSize = 11,\r\n\t\t\t\t\tkSampleStepSize = 1.0 / (kSplineTableSize - 1.0),\r\n\t\t\t\t\tfloat32ArraySupported = "Float32Array" in window;\r\n\r\n\t\t\t/* Must contain four arguments. */\r\n\t\t\tif (arguments.length !== 4) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t/* Arguments must be numbers. */\r\n\t\t\tfor (var i = 0; i < 4; ++i) {\r\n\t\t\t\tif (typeof arguments[i] !== "number" || isNaN(arguments[i]) || !isFinite(arguments[i])) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* X values must be in the [0, 1] range. */\r\n\t\t\tmX1 = Math.min(mX1, 1);\r\n\t\t\tmX2 = Math.min(mX2, 1);\r\n\t\t\tmX1 = Math.max(mX1, 0);\r\n\t\t\tmX2 = Math.max(mX2, 0);\r\n\r\n\t\t\tvar mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\r\n\r\n\t\t\tfunction A(aA1, aA2) {\r\n\t\t\t\treturn 1.0 - 3.0 * aA2 + 3.0 * aA1;\r\n\t\t\t}\r\n\t\t\tfunction B(aA1, aA2) {\r\n\t\t\t\treturn 3.0 * aA2 - 6.0 * aA1;\r\n\t\t\t}\r\n\t\t\tfunction C(aA1) {\r\n\t\t\t\treturn 3.0 * aA1;\r\n\t\t\t}\r\n\r\n\t\t\tfunction calcBezier(aT, aA1, aA2) {\r\n\t\t\t\treturn ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\r\n\t\t\t}\r\n\r\n\t\t\tfunction getSlope(aT, aA1, aA2) {\r\n\t\t\t\treturn 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n\t\t\t}\r\n\r\n\t\t\tfunction newtonRaphsonIterate(aX, aGuessT) {\r\n\t\t\t\tfor (var i = 0; i < NEWTON_ITERATIONS; ++i) {\r\n\t\t\t\t\tvar currentSlope = getSlope(aGuessT, mX1, mX2);\r\n\r\n\t\t\t\t\tif (currentSlope === 0.0) {\r\n\t\t\t\t\t\treturn aGuessT;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar currentX = calcBezier(aGuessT, mX1, mX2) - aX;\r\n\t\t\t\t\taGuessT -= currentX / currentSlope;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn aGuessT;\r\n\t\t\t}\r\n\r\n\t\t\tfunction calcSampleValues() {\r\n\t\t\t\tfor (var i = 0; i < kSplineTableSize; ++i) {\r\n\t\t\t\t\tmSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction binarySubdivide(aX, aA, aB) {\r\n\t\t\t\tvar currentX, currentT, i = 0;\r\n\r\n\t\t\t\tdo {\r\n\t\t\t\t\tcurrentT = aA + (aB - aA) / 2.0;\r\n\t\t\t\t\tcurrentX = calcBezier(currentT, mX1, mX2) - aX;\r\n\t\t\t\t\tif (currentX > 0.0) {\r\n\t\t\t\t\t\taB = currentT;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\taA = currentT;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\r\n\r\n\t\t\t\treturn currentT;\r\n\t\t\t}\r\n\r\n\t\t\tfunction getTForX(aX) {\r\n\t\t\t\tvar intervalStart = 0.0,\r\n\t\t\t\t\t\tcurrentSample = 1,\r\n\t\t\t\t\t\tlastSample = kSplineTableSize - 1;\r\n\r\n\t\t\t\tfor (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\r\n\t\t\t\t\tintervalStart += kSampleStepSize;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t--currentSample;\r\n\r\n\t\t\t\tvar dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]),\r\n\t\t\t\t\t\tguessForT = intervalStart + dist * kSampleStepSize,\r\n\t\t\t\t\t\tinitialSlope = getSlope(guessForT, mX1, mX2);\r\n\r\n\t\t\t\tif (initialSlope >= NEWTON_MIN_SLOPE) {\r\n\t\t\t\t\treturn newtonRaphsonIterate(aX, guessForT);\r\n\t\t\t\t} else if (initialSlope === 0.0) {\r\n\t\t\t\t\treturn guessForT;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar _precomputed = false;\r\n\r\n\t\t\tfunction precompute() {\r\n\t\t\t\t_precomputed = true;\r\n\t\t\t\tif (mX1 !== mY1 || mX2 !== mY2) {\r\n\t\t\t\t\tcalcSampleValues();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar f = function(aX) {\r\n\t\t\t\tif (!_precomputed) {\r\n\t\t\t\t\tprecompute();\r\n\t\t\t\t}\r\n\t\t\t\tif (mX1 === mY1 && mX2 === mY2) {\r\n\t\t\t\t\treturn aX;\r\n\t\t\t\t}\r\n\t\t\t\tif (aX === 0) {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t\tif (aX === 1) {\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn calcBezier(getTForX(aX), mY1, mY2);\r\n\t\t\t};\r\n\r\n\t\t\tf.getControlPoints = function() {\r\n\t\t\t\treturn [{x: mX1, y: mY1}, {x: mX2, y: mY2}];\r\n\t\t\t};\r\n\r\n\t\t\tvar str = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")";\r\n\t\t\tf.toString = function() {\r\n\t\t\t\treturn str;\r\n\t\t\t};\r\n\r\n\t\t\treturn f;\r\n\t\t}\r\n\r\n\t\t/* Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */\r\n\t\t/* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass\r\n\t\t then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */\r\n\t\tvar generateSpringRK4 = (function() {\r\n\t\t\tfunction springAccelerationForState(state) {\r\n\t\t\t\treturn (-state.tension * state.x) - (state.friction * state.v);\r\n\t\t\t}\r\n\r\n\t\t\tfunction springEvaluateStateWithDerivative(initialState, dt, derivative) {\r\n\t\t\t\tvar state = {\r\n\t\t\t\t\tx: initialState.x + derivative.dx * dt,\r\n\t\t\t\t\tv: initialState.v + derivative.dv * dt,\r\n\t\t\t\t\ttension: initialState.tension,\r\n\t\t\t\t\tfriction: initialState.friction\r\n\t\t\t\t};\r\n\r\n\t\t\t\treturn {dx: state.v, dv: springAccelerationForState(state)};\r\n\t\t\t}\r\n\r\n\t\t\tfunction springIntegrateState(state, dt) {\r\n\t\t\t\tvar a = {\r\n\t\t\t\t\tdx: state.v,\r\n\t\t\t\t\tdv: springAccelerationForState(state)\r\n\t\t\t\t},\r\n\t\t\t\t\t\tb = springEvaluateStateWithDerivative(state, dt * 0.5, a),\r\n\t\t\t\t\t\tc = springEvaluateStateWithDerivative(state, dt * 0.5, b),\r\n\t\t\t\t\t\td = springEvaluateStateWithDerivative(state, dt, c),\r\n\t\t\t\t\t\tdxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx),\r\n\t\t\t\t\t\tdvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv);\r\n\r\n\t\t\t\tstate.x = state.x + dxdt * dt;\r\n\t\t\t\tstate.v = state.v + dvdt * dt;\r\n\r\n\t\t\t\treturn state;\r\n\t\t\t}\r\n\r\n\t\t\treturn function springRK4Factory(tension, friction, duration) {\r\n\r\n\t\t\t\tvar initState = {\r\n\t\t\t\t\tx: -1,\r\n\t\t\t\t\tv: 0,\r\n\t\t\t\t\ttension: null,\r\n\t\t\t\t\tfriction: null\r\n\t\t\t\t},\r\n\t\t\t\t\t\tpath = [0],\r\n\t\t\t\t\t\ttime_lapsed = 0,\r\n\t\t\t\t\t\ttolerance = 1 / 10000,\r\n\t\t\t\t\t\tDT = 16 / 1000,\r\n\t\t\t\t\t\thave_duration, dt, last_state;\r\n\r\n\t\t\t\ttension = parseFloat(tension) || 500;\r\n\t\t\t\tfriction = parseFloat(friction) || 20;\r\n\t\t\t\tduration = duration || null;\r\n\r\n\t\t\t\tinitState.tension = tension;\r\n\t\t\t\tinitState.friction = friction;\r\n\r\n\t\t\t\thave_duration = duration !== null;\r\n\r\n\t\t\t\t/* Calculate the actual time it takes for this animation to complete with the provided conditions. */\r\n\t\t\t\tif (have_duration) {\r\n\t\t\t\t\t/* Run the simulation without a duration. */\r\n\t\t\t\t\ttime_lapsed = springRK4Factory(tension, friction);\r\n\t\t\t\t\t/* Compute the adjusted time delta. */\r\n\t\t\t\t\tdt = time_lapsed / duration * DT;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdt = DT;\r\n\t\t\t\t}\r\n\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\t/* Next/step function .*/\r\n\t\t\t\t\tlast_state = springIntegrateState(last_state || initState, dt);\r\n\t\t\t\t\t/* Store the position. */\r\n\t\t\t\t\tpath.push(1 + last_state.x);\r\n\t\t\t\t\ttime_lapsed += 16;\r\n\t\t\t\t\t/* If the change threshold is reached, break. */\r\n\t\t\t\t\tif (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the\r\n\t\t\t\t computed path and returns a snapshot of the position according to a given percentComplete. */\r\n\t\t\t\treturn !have_duration ? time_lapsed : function(percentComplete) {\r\n\t\t\t\t\treturn path[ (percentComplete * (path.length - 1)) | 0 ];\r\n\t\t\t\t};\r\n\t\t\t};\r\n\t\t}());\r\n\r\n\t\t/* jQuery easings. */\r\n\t\tVelocity.Easings = {\r\n\t\t\tlinear: function(p) {\r\n\t\t\t\treturn p;\r\n\t\t\t},\r\n\t\t\tswing: function(p) {\r\n\t\t\t\treturn 0.5 - Math.cos(p * Math.PI) / 2;\r\n\t\t\t},\r\n\t\t\t/* Bonus "spring" easing, which is a less exaggerated version of easeInOutElastic. */\r\n\t\t\tspring: function(p) {\r\n\t\t\t\treturn 1 - (Math.cos(p * 4.5 * Math.PI) * Math.exp(-p * 6));\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t/* CSS3 and Robert Penner easings. */\r\n\t\t$.each(\r\n\t\t\t\t[\r\n\t\t\t\t\t["ease", [0.25, 0.1, 0.25, 1.0]],\r\n\t\t\t\t\t["ease-in", [0.42, 0.0, 1.00, 1.0]],\r\n\t\t\t\t\t["ease-out", [0.00, 0.0, 0.58, 1.0]],\r\n\t\t\t\t\t["ease-in-out", [0.42, 0.0, 0.58, 1.0]],\r\n\t\t\t\t\t["easeInSine", [0.47, 0, 0.745, 0.715]],\r\n\t\t\t\t\t["easeOutSine", [0.39, 0.575, 0.565, 1]],\r\n\t\t\t\t\t["easeInOutSine", [0.445, 0.05, 0.55, 0.95]],\r\n\t\t\t\t\t["easeInQuad", [0.55, 0.085, 0.68, 0.53]],\r\n\t\t\t\t\t["easeOutQuad", [0.25, 0.46, 0.45, 0.94]],\r\n\t\t\t\t\t["easeInOutQuad", [0.455, 0.03, 0.515, 0.955]],\r\n\t\t\t\t\t["easeInCubic", [0.55, 0.055, 0.675, 0.19]],\r\n\t\t\t\t\t["easeOutCubic", [0.215, 0.61, 0.355, 1]],\r\n\t\t\t\t\t["easeInOutCubic", [0.645, 0.045, 0.355, 1]],\r\n\t\t\t\t\t["easeInQuart", [0.895, 0.03, 0.685, 0.22]],\r\n\t\t\t\t\t["easeOutQuart", [0.165, 0.84, 0.44, 1]],\r\n\t\t\t\t\t["easeInOutQuart", [0.77, 0, 0.175, 1]],\r\n\t\t\t\t\t["easeInQuint", [0.755, 0.05, 0.855, 0.06]],\r\n\t\t\t\t\t["easeOutQuint", [0.23, 1, 0.32, 1]],\r\n\t\t\t\t\t["easeInOutQuint", [0.86, 0, 0.07, 1]],\r\n\t\t\t\t\t["easeInExpo", [0.95, 0.05, 0.795, 0.035]],\r\n\t\t\t\t\t["easeOutExpo", [0.19, 1, 0.22, 1]],\r\n\t\t\t\t\t["easeInOutExpo", [1, 0, 0, 1]],\r\n\t\t\t\t\t["easeInCirc", [0.6, 0.04, 0.98, 0.335]],\r\n\t\t\t\t\t["easeOutCirc", [0.075, 0.82, 0.165, 1]],\r\n\t\t\t\t\t["easeInOutCirc", [0.785, 0.135, 0.15, 0.86]]\r\n\t\t\t\t], function(i, easingArray) {\r\n\t\t\tVelocity.Easings[easingArray[0]] = generateBezier.apply(null, easingArray[1]);\r\n\t\t});\r\n\r\n\t\t/* Determine the appropriate easing type given an easing input. */\r\n\t\tfunction getEasing(value, duration) {\r\n\t\t\tvar easing = value;\r\n\r\n\t\t\t/* The easing option can either be a string that references a pre-registered easing,\r\n\t\t\t or it can be a two-/four-item array of integers to be converted into a bezier/spring function. */\r\n\t\t\tif (Type.isString(value)) {\r\n\t\t\t\t/* Ensure that the easing has been assigned to jQuery\'s Velocity.Easings object. */\r\n\t\t\t\tif (!Velocity.Easings[value]) {\r\n\t\t\t\t\teasing = false;\r\n\t\t\t\t}\r\n\t\t\t} else if (Type.isArray(value) && value.length === 1) {\r\n\t\t\t\teasing = generateStep.apply(null, value);\r\n\t\t\t} else if (Type.isArray(value) && value.length === 2) {\r\n\t\t\t\t/* springRK4 must be passed the animation\'s duration. */\r\n\t\t\t\t/* Note: If the springRK4 array contains non-numbers, generateSpringRK4() returns an easing\r\n\t\t\t\t function generated with default tension and friction values. */\r\n\t\t\t\teasing = generateSpringRK4.apply(null, value.concat([duration]));\r\n\t\t\t} else if (Type.isArray(value) && value.length === 4) {\r\n\t\t\t\t/* Note: If the bezier array contains non-numbers, generateBezier() returns false. */\r\n\t\t\t\teasing = generateBezier.apply(null, value);\r\n\t\t\t} else {\r\n\t\t\t\teasing = false;\r\n\t\t\t}\r\n\r\n\t\t\t/* Revert to the Velocity-wide default easing type, or fall back to "swing" (which is also jQuery\'s default)\r\n\t\t\t if the Velocity-wide default has been incorrectly modified. */\r\n\t\t\tif (easing === false) {\r\n\t\t\t\tif (Velocity.Easings[Velocity.defaults.easing]) {\r\n\t\t\t\t\teasing = Velocity.defaults.easing;\r\n\t\t\t\t} else {\r\n\t\t\t\t\teasing = EASING_DEFAULT;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn easing;\r\n\t\t}\r\n\r\n\t\t/*****************\r\n\t\t CSS Stack\r\n\t\t *****************/\r\n\r\n\t\t/* The CSS object is a highly condensed and performant CSS stack that fully replaces jQuery\'s.\r\n\t\t It handles the validation, getting, and setting of both standard CSS properties and CSS property hooks. */\r\n\t\t/* Note: A "CSS" shorthand is aliased so that our code is easier to read. */\r\n\t\tvar CSS = Velocity.CSS = {\r\n\t\t\t/*************\r\n\t\t\t RegEx\r\n\t\t\t *************/\r\n\r\n\t\t\tRegEx: {\r\n\t\t\t\tisHex: /^#([A-f\\d]{3}){1,2}$/i,\r\n\t\t\t\t/* Unwrap a property value\'s surrounding text, e.g. "rgba(4, 3, 2, 1)" ==> "4, 3, 2, 1" and "rect(4px 3px 2px 1px)" ==> "4px 3px 2px 1px". */\r\n\t\t\t\tvalueUnwrap: /^[A-z]+\\((.*)\\)$/i,\r\n\t\t\t\twrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,\r\n\t\t\t\t/* Split a multi-value property into an array of subvalues, e.g. "rgba(4, 3, 2, 1) 4px 3px 2px 1px" ==> [ "rgba(4, 3, 2, 1)", "4px", "3px", "2px", "1px" ]. */\r\n\t\t\t\tvalueSplit: /([A-z]+\\(.+\\))|(([A-z0-9#-.]+?)(?=\\s|$))/ig\r\n\t\t\t},\r\n\t\t\t/************\r\n\t\t\t Lists\r\n\t\t\t ************/\r\n\r\n\t\t\tLists: {\r\n\t\t\t\tcolors: ["fill", "stroke", "stopColor", "color", "backgroundColor", "borderColor", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "outlineColor"],\r\n\t\t\t\ttransformsBase: ["translateX", "translateY", "scale", "scaleX", "scaleY", "skewX", "skewY", "rotateZ"],\r\n\t\t\t\ttransforms3D: ["transformPerspective", "translateZ", "scaleZ", "rotateX", "rotateY"],\r\n\t\t\t\tunits: [\r\n\t\t\t\t\t"%", // relative\r\n\t\t\t\t\t"em", "ex", "ch", "rem", // font relative\r\n\t\t\t\t\t"vw", "vh", "vmin", "vmax", // viewport relative\r\n\t\t\t\t\t"cm", "mm", "Q", "in", "pc", "pt", "px", // absolute lengths\r\n\t\t\t\t\t"deg", "grad", "rad", "turn", // angles\r\n\t\t\t\t\t"s", "ms" // time\r\n\t\t\t\t],\r\n\t\t\t\tcolorNames: {\r\n\t\t\t\t\t"aliceblue": "240,248,255",\r\n\t\t\t\t\t"antiquewhite": "250,235,215",\r\n\t\t\t\t\t"aquamarine": "127,255,212",\r\n\t\t\t\t\t"aqua": "0,255,255",\r\n\t\t\t\t\t"azure": "240,255,255",\r\n\t\t\t\t\t"beige": "245,245,220",\r\n\t\t\t\t\t"bisque": "255,228,196",\r\n\t\t\t\t\t"black": "0,0,0",\r\n\t\t\t\t\t"blanchedalmond": "255,235,205",\r\n\t\t\t\t\t"blueviolet": "138,43,226",\r\n\t\t\t\t\t"blue": "0,0,255",\r\n\t\t\t\t\t"brown": "165,42,42",\r\n\t\t\t\t\t"burlywood": "222,184,135",\r\n\t\t\t\t\t"cadetblue": "95,158,160",\r\n\t\t\t\t\t"chartreuse": "127,255,0",\r\n\t\t\t\t\t"chocolate": "210,105,30",\r\n\t\t\t\t\t"coral": "255,127,80",\r\n\t\t\t\t\t"cornflowerblue": "100,149,237",\r\n\t\t\t\t\t"cornsilk": "255,248,220",\r\n\t\t\t\t\t"crimson": "220,20,60",\r\n\t\t\t\t\t"cyan": "0,255,255",\r\n\t\t\t\t\t"darkblue": "0,0,139",\r\n\t\t\t\t\t"darkcyan": "0,139,139",\r\n\t\t\t\t\t"darkgoldenrod": "184,134,11",\r\n\t\t\t\t\t"darkgray": "169,169,169",\r\n\t\t\t\t\t"darkgrey": "169,169,169",\r\n\t\t\t\t\t"darkgreen": "0,100,0",\r\n\t\t\t\t\t"darkkhaki": "189,183,107",\r\n\t\t\t\t\t"darkmagenta": "139,0,139",\r\n\t\t\t\t\t"darkolivegreen": "85,107,47",\r\n\t\t\t\t\t"darkorange": "255,140,0",\r\n\t\t\t\t\t"darkorchid": "153,50,204",\r\n\t\t\t\t\t"darkred": "139,0,0",\r\n\t\t\t\t\t"darksalmon": "233,150,122",\r\n\t\t\t\t\t"darkseagreen": "143,188,143",\r\n\t\t\t\t\t"darkslateblue": "72,61,139",\r\n\t\t\t\t\t"darkslategray": "47,79,79",\r\n\t\t\t\t\t"darkturquoise": "0,206,209",\r\n\t\t\t\t\t"darkviolet": "148,0,211",\r\n\t\t\t\t\t"deeppink": "255,20,147",\r\n\t\t\t\t\t"deepskyblue": "0,191,255",\r\n\t\t\t\t\t"dimgray": "105,105,105",\r\n\t\t\t\t\t"dimgrey": "105,105,105",\r\n\t\t\t\t\t"dodgerblue": "30,144,255",\r\n\t\t\t\t\t"firebrick": "178,34,34",\r\n\t\t\t\t\t"floralwhite": "255,250,240",\r\n\t\t\t\t\t"forestgreen": "34,139,34",\r\n\t\t\t\t\t"fuchsia": "255,0,255",\r\n\t\t\t\t\t"gainsboro": "220,220,220",\r\n\t\t\t\t\t"ghostwhite": "248,248,255",\r\n\t\t\t\t\t"gold": "255,215,0",\r\n\t\t\t\t\t"goldenrod": "218,165,32",\r\n\t\t\t\t\t"gray": "128,128,128",\r\n\t\t\t\t\t"grey": "128,128,128",\r\n\t\t\t\t\t"greenyellow": "173,255,47",\r\n\t\t\t\t\t"green": "0,128,0",\r\n\t\t\t\t\t"honeydew": "240,255,240",\r\n\t\t\t\t\t"hotpink": "255,105,180",\r\n\t\t\t\t\t"indianred": "205,92,92",\r\n\t\t\t\t\t"indigo": "75,0,130",\r\n\t\t\t\t\t"ivory": "255,255,240",\r\n\t\t\t\t\t"khaki": "240,230,140",\r\n\t\t\t\t\t"lavenderblush": "255,240,245",\r\n\t\t\t\t\t"lavender": "230,230,250",\r\n\t\t\t\t\t"lawngreen": "124,252,0",\r\n\t\t\t\t\t"lemonchiffon": "255,250,205",\r\n\t\t\t\t\t"lightblue": "173,216,230",\r\n\t\t\t\t\t"lightcoral": "240,128,128",\r\n\t\t\t\t\t"lightcyan": "224,255,255",\r\n\t\t\t\t\t"lightgoldenrodyellow": "250,250,210",\r\n\t\t\t\t\t"lightgray": "211,211,211",\r\n\t\t\t\t\t"lightgrey": "211,211,211",\r\n\t\t\t\t\t"lightgreen": "144,238,144",\r\n\t\t\t\t\t"lightpink": "255,182,193",\r\n\t\t\t\t\t"lightsalmon": "255,160,122",\r\n\t\t\t\t\t"lightseagreen": "32,178,170",\r\n\t\t\t\t\t"lightskyblue": "135,206,250",\r\n\t\t\t\t\t"lightslategray": "119,136,153",\r\n\t\t\t\t\t"lightsteelblue": "176,196,222",\r\n\t\t\t\t\t"lightyellow": "255,255,224",\r\n\t\t\t\t\t"limegreen": "50,205,50",\r\n\t\t\t\t\t"lime": "0,255,0",\r\n\t\t\t\t\t"linen": "250,240,230",\r\n\t\t\t\t\t"magenta": "255,0,255",\r\n\t\t\t\t\t"maroon": "128,0,0",\r\n\t\t\t\t\t"mediumaquamarine": "102,205,170",\r\n\t\t\t\t\t"mediumblue": "0,0,205",\r\n\t\t\t\t\t"mediumorchid": "186,85,211",\r\n\t\t\t\t\t"mediumpurple": "147,112,219",\r\n\t\t\t\t\t"mediumseagreen": "60,179,113",\r\n\t\t\t\t\t"mediumslateblue": "123,104,238",\r\n\t\t\t\t\t"mediumspringgreen": "0,250,154",\r\n\t\t\t\t\t"mediumturquoise": "72,209,204",\r\n\t\t\t\t\t"mediumvioletred": "199,21,133",\r\n\t\t\t\t\t"midnightblue": "25,25,112",\r\n\t\t\t\t\t"mintcream": "245,255,250",\r\n\t\t\t\t\t"mistyrose": "255,228,225",\r\n\t\t\t\t\t"moccasin": "255,228,181",\r\n\t\t\t\t\t"navajowhite": "255,222,173",\r\n\t\t\t\t\t"navy": "0,0,128",\r\n\t\t\t\t\t"oldlace": "253,245,230",\r\n\t\t\t\t\t"olivedrab": "107,142,35",\r\n\t\t\t\t\t"olive": "128,128,0",\r\n\t\t\t\t\t"orangered": "255,69,0",\r\n\t\t\t\t\t"orange": "255,165,0",\r\n\t\t\t\t\t"orchid": "218,112,214",\r\n\t\t\t\t\t"palegoldenrod": "238,232,170",\r\n\t\t\t\t\t"palegreen": "152,251,152",\r\n\t\t\t\t\t"paleturquoise": "175,238,238",\r\n\t\t\t\t\t"palevioletred": "219,112,147",\r\n\t\t\t\t\t"papayawhip": "255,239,213",\r\n\t\t\t\t\t"peachpuff": "255,218,185",\r\n\t\t\t\t\t"peru": "205,133,63",\r\n\t\t\t\t\t"pink": "255,192,203",\r\n\t\t\t\t\t"plum": "221,160,221",\r\n\t\t\t\t\t"powderblue": "176,224,230",\r\n\t\t\t\t\t"purple": "128,0,128",\r\n\t\t\t\t\t"red": "255,0,0",\r\n\t\t\t\t\t"rosybrown": "188,143,143",\r\n\t\t\t\t\t"royalblue": "65,105,225",\r\n\t\t\t\t\t"saddlebrown": "139,69,19",\r\n\t\t\t\t\t"salmon": "250,128,114",\r\n\t\t\t\t\t"sandybrown": "244,164,96",\r\n\t\t\t\t\t"seagreen": "46,139,87",\r\n\t\t\t\t\t"seashell": "255,245,238",\r\n\t\t\t\t\t"sienna": "160,82,45",\r\n\t\t\t\t\t"silver": "192,192,192",\r\n\t\t\t\t\t"skyblue": "135,206,235",\r\n\t\t\t\t\t"slateblue": "106,90,205",\r\n\t\t\t\t\t"slategray": "112,128,144",\r\n\t\t\t\t\t"snow": "255,250,250",\r\n\t\t\t\t\t"springgreen": "0,255,127",\r\n\t\t\t\t\t"steelblue": "70,130,180",\r\n\t\t\t\t\t"tan": "210,180,140",\r\n\t\t\t\t\t"teal": "0,128,128",\r\n\t\t\t\t\t"thistle": "216,191,216",\r\n\t\t\t\t\t"tomato": "255,99,71",\r\n\t\t\t\t\t"turquoise": "64,224,208",\r\n\t\t\t\t\t"violet": "238,130,238",\r\n\t\t\t\t\t"wheat": "245,222,179",\r\n\t\t\t\t\t"whitesmoke": "245,245,245",\r\n\t\t\t\t\t"white": "255,255,255",\r\n\t\t\t\t\t"yellowgreen": "154,205,50",\r\n\t\t\t\t\t"yellow": "255,255,0"\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t/************\r\n\t\t\t Hooks\r\n\t\t\t ************/\r\n\r\n\t\t\t/* Hooks allow a subproperty (e.g. "boxShadowBlur") of a compound-value CSS property\r\n\t\t\t (e.g. "boxShadow: X Y Blur Spread Color") to be animated as if it were a discrete property. */\r\n\t\t\t/* Note: Beyond enabling fine-grained property animation, hooking is necessary since Velocity only\r\n\t\t\t tweens properties with single numeric values; unlike CSS transitions, Velocity does not interpolate compound-values. */\r\n\t\t\tHooks: {\r\n\t\t\t\t/********************\r\n\t\t\t\t Registration\r\n\t\t\t\t ********************/\r\n\r\n\t\t\t\t/* Templates are a concise way of indicating which subproperties must be individually registered for each compound-value CSS property. */\r\n\t\t\t\t/* Each template consists of the compound-value\'s base name, its constituent subproperty names, and those subproperties\' default values. */\r\n\t\t\t\ttemplates: {\r\n\t\t\t\t\t"textShadow": ["Color X Y Blur", "black 0px 0px 0px"],\r\n\t\t\t\t\t"boxShadow": ["Color X Y Blur Spread", "black 0px 0px 0px 0px"],\r\n\t\t\t\t\t"clip": ["Top Right Bottom Left", "0px 0px 0px 0px"],\r\n\t\t\t\t\t"backgroundPosition": ["X Y", "0% 0%"],\r\n\t\t\t\t\t"transformOrigin": ["X Y Z", "50% 50% 0px"],\r\n\t\t\t\t\t"perspectiveOrigin": ["X Y", "50% 50%"]\r\n\t\t\t\t},\r\n\t\t\t\t/* A "registered" hook is one that has been converted from its template form into a live,\r\n\t\t\t\t tweenable property. It contains data to associate it with its root property. */\r\n\t\t\t\tregistered: {\r\n\t\t\t\t\t/* Note: A registered hook looks like this ==> textShadowBlur: [ "textShadow", 3 ],\r\n\t\t\t\t\t which consists of the subproperty\'s name, the associated root property\'s name,\r\n\t\t\t\t\t and the subproperty\'s position in the root\'s value. */\r\n\t\t\t\t},\r\n\t\t\t\t/* Convert the templates into individual hooks then append them to the registered object above. */\r\n\t\t\t\tregister: function() {\r\n\t\t\t\t\t/* Color hooks registration: Colors are defaulted to white -- as opposed to black -- since colors that are\r\n\t\t\t\t\t currently set to "transparent" default to their respective template below when color-animated,\r\n\t\t\t\t\t and white is typically a closer match to transparent than black is. An exception is made for text ("color"),\r\n\t\t\t\t\t which is almost always set closer to black than white. */\r\n\t\t\t\t\tfor (var i = 0; i < CSS.Lists.colors.length; i++) {\r\n\t\t\t\t\t\tvar rgbComponents = (CSS.Lists.colors[i] === "color") ? "0 0 0 1" : "255 255 255 1";\r\n\t\t\t\t\t\tCSS.Hooks.templates[CSS.Lists.colors[i]] = ["Red Green Blue Alpha", rgbComponents];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar rootProperty,\r\n\t\t\t\t\t\t\thookTemplate,\r\n\t\t\t\t\t\t\thookNames;\r\n\r\n\t\t\t\t\t/* In IE, color values inside compound-value properties are positioned at the end the value instead of at the beginning.\r\n\t\t\t\t\t Thus, we re-arrange the templates accordingly. */\r\n\t\t\t\t\tif (IE) {\r\n\t\t\t\t\t\tfor (rootProperty in CSS.Hooks.templates) {\r\n\t\t\t\t\t\t\tif (!CSS.Hooks.templates.hasOwnProperty(rootProperty)) {\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\thookTemplate = CSS.Hooks.templates[rootProperty];\r\n\t\t\t\t\t\t\thookNames = hookTemplate[0].split(" ");\r\n\r\n\t\t\t\t\t\t\tvar defaultValues = hookTemplate[1].match(CSS.RegEx.valueSplit);\r\n\r\n\t\t\t\t\t\t\tif (hookNames[0] === "Color") {\r\n\t\t\t\t\t\t\t\t/* Reposition both the hook\'s name and its default value to the end of their respective strings. */\r\n\t\t\t\t\t\t\t\thookNames.push(hookNames.shift());\r\n\t\t\t\t\t\t\t\tdefaultValues.push(defaultValues.shift());\r\n\r\n\t\t\t\t\t\t\t\t/* Replace the existing template for the hook\'s root property. */\r\n\t\t\t\t\t\t\t\tCSS.Hooks.templates[rootProperty] = [hookNames.join(" "), defaultValues.join(" ")];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* Hook registration. */\r\n\t\t\t\t\tfor (rootProperty in CSS.Hooks.templates) {\r\n\t\t\t\t\t\tif (!CSS.Hooks.templates.hasOwnProperty(rootProperty)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\thookTemplate = CSS.Hooks.templates[rootProperty];\r\n\t\t\t\t\t\thookNames = hookTemplate[0].split(" ");\r\n\r\n\t\t\t\t\t\tfor (var j in hookNames) {\r\n\t\t\t\t\t\t\tif (!hookNames.hasOwnProperty(j)) {\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tvar fullHookName = rootProperty + hookNames[j],\r\n\t\t\t\t\t\t\t\t\thookPosition = j;\r\n\r\n\t\t\t\t\t\t\t/* For each hook, register its full name (e.g. textShadowBlur) with its root property (e.g. textShadow)\r\n\t\t\t\t\t\t\t and the hook\'s position in its template\'s default value string. */\r\n\t\t\t\t\t\t\tCSS.Hooks.registered[fullHookName] = [rootProperty, hookPosition];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t/*****************************\r\n\t\t\t\t Injection and Extraction\r\n\t\t\t\t *****************************/\r\n\r\n\t\t\t\t/* Look up the root property associated with the hook (e.g. return "textShadow" for "textShadowBlur"). */\r\n\t\t\t\t/* Since a hook cannot be set directly (the browser won\'t recognize it), style updating for hooks is routed through the hook\'s root property. */\r\n\t\t\t\tgetRoot: function(property) {\r\n\t\t\t\t\tvar hookData = CSS.Hooks.registered[property];\r\n\r\n\t\t\t\t\tif (hookData) {\r\n\t\t\t\t\t\treturn hookData[0];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/* If there was no hook match, return the property name untouched. */\r\n\t\t\t\t\t\treturn property;\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tgetUnit: function(str, start) {\r\n\t\t\t\t\tvar unit = (str.substr(start || 0, 5).match(/^[a-z%]+/) || [])[0] || "";\r\n\r\n\t\t\t\t\tif (unit && _inArray(CSS.Lists.units, unit)) {\r\n\t\t\t\t\t\treturn unit;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn "";\r\n\t\t\t\t},\r\n\t\t\t\tfixColors: function(str) {\r\n\t\t\t\t\treturn str.replace(/(rgba?\\(\\s*)?(\\b[a-z]+\\b)/g, function($0, $1, $2) {\r\n\t\t\t\t\t\tif (CSS.Lists.colorNames.hasOwnProperty($2)) {\r\n\t\t\t\t\t\t\treturn ($1 ? $1 : "rgba(") + CSS.Lists.colorNames[$2] + ($1 ? "" : ",1)");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn $1 + $2;\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t\t/* Convert any rootPropertyValue, null or otherwise, into a space-delimited list of hook values so that\r\n\t\t\t\t the targeted hook can be injected or extracted at its standard position. */\r\n\t\t\t\tcleanRootPropertyValue: function(rootProperty, rootPropertyValue) {\r\n\t\t\t\t\t/* If the rootPropertyValue is wrapped with "rgb()", "clip()", etc., remove the wrapping to normalize the value before manipulation. */\r\n\t\t\t\t\tif (CSS.RegEx.valueUnwrap.test(rootPropertyValue)) {\r\n\t\t\t\t\t\trootPropertyValue = rootPropertyValue.match(CSS.RegEx.valueUnwrap)[1];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* If rootPropertyValue is a CSS null-value (from which there\'s inherently no hook value to extract),\r\n\t\t\t\t\t default to the root\'s default value as defined in CSS.Hooks.templates. */\r\n\t\t\t\t\t/* Note: CSS null-values include "none", "auto", and "transparent". They must be converted into their\r\n\t\t\t\t\t zero-values (e.g. textShadow: "none" ==> textShadow: "0px 0px 0px black") for hook manipulation to proceed. */\r\n\t\t\t\t\tif (CSS.Values.isCSSNullValue(rootPropertyValue)) {\r\n\t\t\t\t\t\trootPropertyValue = CSS.Hooks.templates[rootProperty][1];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn rootPropertyValue;\r\n\t\t\t\t},\r\n\t\t\t\t/* Extracted the hook\'s value from its root property\'s value. This is used to get the starting value of an animating hook. */\r\n\t\t\t\textractValue: function(fullHookName, rootPropertyValue) {\r\n\t\t\t\t\tvar hookData = CSS.Hooks.registered[fullHookName];\r\n\r\n\t\t\t\t\tif (hookData) {\r\n\t\t\t\t\t\tvar hookRoot = hookData[0],\r\n\t\t\t\t\t\t\t\thookPosition = hookData[1];\r\n\r\n\t\t\t\t\t\trootPropertyValue = CSS.Hooks.cleanRootPropertyValue(hookRoot, rootPropertyValue);\r\n\r\n\t\t\t\t\t\t/* Split rootPropertyValue into its constituent hook values then grab the desired hook at its standard position. */\r\n\t\t\t\t\t\treturn rootPropertyValue.toString().match(CSS.RegEx.valueSplit)[hookPosition];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/* If the provided fullHookName isn\'t a registered hook, return the rootPropertyValue that was passed in. */\r\n\t\t\t\t\t\treturn rootPropertyValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t/* Inject the hook\'s value into its root property\'s value. This is used to piece back together the root property\r\n\t\t\t\t once Velocity has updated one of its individually hooked values through tweening. */\r\n\t\t\t\tinjectValue: function(fullHookName, hookValue, rootPropertyValue) {\r\n\t\t\t\t\tvar hookData = CSS.Hooks.registered[fullHookName];\r\n\r\n\t\t\t\t\tif (hookData) {\r\n\t\t\t\t\t\tvar hookRoot = hookData[0],\r\n\t\t\t\t\t\t\t\thookPosition = hookData[1],\r\n\t\t\t\t\t\t\t\trootPropertyValueParts,\r\n\t\t\t\t\t\t\t\trootPropertyValueUpdated;\r\n\r\n\t\t\t\t\t\trootPropertyValue = CSS.Hooks.cleanRootPropertyValue(hookRoot, rootPropertyValue);\r\n\r\n\t\t\t\t\t\t/* Split rootPropertyValue into its individual hook values, replace the targeted value with hookValue,\r\n\t\t\t\t\t\t then reconstruct the rootPropertyValue string. */\r\n\t\t\t\t\t\trootPropertyValueParts = rootPropertyValue.toString().match(CSS.RegEx.valueSplit);\r\n\t\t\t\t\t\trootPropertyValueParts[hookPosition] = hookValue;\r\n\t\t\t\t\t\trootPropertyValueUpdated = rootPropertyValueParts.join(" ");\r\n\r\n\t\t\t\t\t\treturn rootPropertyValueUpdated;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/* If the provided fullHookName isn\'t a registered hook, return the rootPropertyValue that was passed in. */\r\n\t\t\t\t\t\treturn rootPropertyValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t/*******************\r\n\t\t\t Normalizations\r\n\t\t\t *******************/\r\n\r\n\t\t\t/* Normalizations standardize CSS property manipulation by pollyfilling browser-specific implementations (e.g. opacity)\r\n\t\t\t and reformatting special properties (e.g. clip, rgba) to look like standard ones. */\r\n\t\t\tNormalizations: {\r\n\t\t\t\t/* Normalizations are passed a normalization target (either the property\'s name, its extracted value, or its injected value),\r\n\t\t\t\t the targeted element (which may need to be queried), and the targeted property value. */\r\n\t\t\t\tregistered: {\r\n\t\t\t\t\tclip: function(type, element, propertyValue) {\r\n\t\t\t\t\t\tswitch (type) {\r\n\t\t\t\t\t\t\tcase "name":\r\n\t\t\t\t\t\t\t\treturn "clip";\r\n\t\t\t\t\t\t\t\t/* Clip needs to be unwrapped and stripped of its commas during extraction. */\r\n\t\t\t\t\t\t\tcase "extract":\r\n\t\t\t\t\t\t\t\tvar extracted;\r\n\r\n\t\t\t\t\t\t\t\t/* If Velocity also extracted this value, skip extraction. */\r\n\t\t\t\t\t\t\t\tif (CSS.RegEx.wrappedValueAlreadyExtracted.test(propertyValue)) {\r\n\t\t\t\t\t\t\t\t\textracted = propertyValue;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t/* Remove the "rect()" wrapper. */\r\n\t\t\t\t\t\t\t\t\textracted = propertyValue.toString().match(CSS.RegEx.valueUnwrap);\r\n\r\n\t\t\t\t\t\t\t\t\t/* Strip off commas. */\r\n\t\t\t\t\t\t\t\t\textracted = extracted ? extracted[1].replace(/,(\\s+)?/g, " ") : propertyValue;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\treturn extracted;\r\n\t\t\t\t\t\t\t\t/* Clip needs to be re-wrapped during injection. */\r\n\t\t\t\t\t\t\tcase "inject":\r\n\t\t\t\t\t\t\t\treturn "rect(" + propertyValue + ")";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tblur: function(type, element, propertyValue) {\r\n\t\t\t\t\t\tswitch (type) {\r\n\t\t\t\t\t\t\tcase "name":\r\n\t\t\t\t\t\t\t\treturn Velocity.State.isFirefox ? "filter" : "-webkit-filter";\r\n\t\t\t\t\t\t\tcase "extract":\r\n\t\t\t\t\t\t\t\tvar extracted = parseFloat(propertyValue);\r\n\r\n\t\t\t\t\t\t\t\t/* If extracted is NaN, meaning the value isn\'t already extracted. */\r\n\t\t\t\t\t\t\t\tif (!(extracted || extracted === 0)) {\r\n\t\t\t\t\t\t\t\t\tvar blurComponent = propertyValue.toString().match(/blur\\(([0-9]+[A-z]+)\\)/i);\r\n\r\n\t\t\t\t\t\t\t\t\t/* If the filter string had a blur component, return just the blur value and unit type. */\r\n\t\t\t\t\t\t\t\t\tif (blurComponent) {\r\n\t\t\t\t\t\t\t\t\t\textracted = blurComponent[1];\r\n\t\t\t\t\t\t\t\t\t\t/* If the component doesn\'t exist, default blur to 0. */\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\textracted = 0;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\treturn extracted;\r\n\t\t\t\t\t\t\t\t/* Blur needs to be re-wrapped during injection. */\r\n\t\t\t\t\t\t\tcase "inject":\r\n\t\t\t\t\t\t\t\t/* For the blur effect to be fully de-applied, it needs to be set to "none" instead of 0. */\r\n\t\t\t\t\t\t\t\tif (!parseFloat(propertyValue)) {\r\n\t\t\t\t\t\t\t\t\treturn "none";\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\treturn "blur(" + propertyValue + ")";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\t/* <=IE8 do not support the standard opacity property. They use filter:alpha(opacity=INT) instead. */\r\n\t\t\t\t\topacity: function(type, element, propertyValue) {\r\n\t\t\t\t\t\tif (IE <= 8) {\r\n\t\t\t\t\t\t\tswitch (type) {\r\n\t\t\t\t\t\t\t\tcase "name":\r\n\t\t\t\t\t\t\t\t\treturn "filter";\r\n\t\t\t\t\t\t\t\tcase "extract":\r\n\t\t\t\t\t\t\t\t\t/* <=IE8 return a "filter" value of "alpha(opacity=\\d{1,3})".\r\n\t\t\t\t\t\t\t\t\t Extract the value and convert it to a decimal value to match the standard CSS opacity property\'s formatting. */\r\n\t\t\t\t\t\t\t\t\tvar extracted = propertyValue.toString().match(/alpha\\(opacity=(.*)\\)/i);\r\n\r\n\t\t\t\t\t\t\t\t\tif (extracted) {\r\n\t\t\t\t\t\t\t\t\t\t/* Convert to decimal value. */\r\n\t\t\t\t\t\t\t\t\t\tpropertyValue = extracted[1] / 100;\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t/* When extracting opacity, default to 1 since a null value means opacity hasn\'t been set. */\r\n\t\t\t\t\t\t\t\t\t\tpropertyValue = 1;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\treturn propertyValue;\r\n\t\t\t\t\t\t\t\tcase "inject":\r\n\t\t\t\t\t\t\t\t\t/* Opacified elements are required to have their zoom property set to a non-zero value. */\r\n\t\t\t\t\t\t\t\t\telement.style.zoom = 1;\r\n\r\n\t\t\t\t\t\t\t\t\t/* Setting the filter property on elements with certain font property combinations can result in a\r\n\t\t\t\t\t\t\t\t\t highly unappealing ultra-bolding effect. There\'s no way to remedy this throughout a tween, but dropping the\r\n\t\t\t\t\t\t\t\t\t value altogether (when opacity hits 1) at leasts ensures that the glitch is gone post-tweening. */\r\n\t\t\t\t\t\t\t\t\tif (parseFloat(propertyValue) >= 1) {\r\n\t\t\t\t\t\t\t\t\t\treturn "";\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t/* As per the filter property\'s spec, convert the decimal value to a whole number and wrap the value. */\r\n\t\t\t\t\t\t\t\t\t\treturn "alpha(opacity=" + parseInt(parseFloat(propertyValue) * 100, 10) + ")";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t/* With all other browsers, normalization is not required; return the same values that were passed in. */\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tswitch (type) {\r\n\t\t\t\t\t\t\t\tcase "name":\r\n\t\t\t\t\t\t\t\t\treturn "opacity";\r\n\t\t\t\t\t\t\t\tcase "extract":\r\n\t\t\t\t\t\t\t\t\treturn propertyValue;\r\n\t\t\t\t\t\t\t\tcase "inject":\r\n\t\t\t\t\t\t\t\t\treturn propertyValue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t/*****************************\r\n\t\t\t\t Batched Registrations\r\n\t\t\t\t *****************************/\r\n\r\n\t\t\t\t/* Note: Batched normalizations extend the CSS.Normalizations.registered object. */\r\n\t\t\t\tregister: function() {\r\n\r\n\t\t\t\t\t/*****************\r\n\t\t\t\t\t Transforms\r\n\t\t\t\t\t *****************/\r\n\r\n\t\t\t\t\t/* Transforms are the subproperties contained by the CSS "transform" property. Transforms must undergo normalization\r\n\t\t\t\t\t so that they can be referenced in a properties map by their individual names. */\r\n\t\t\t\t\t/* Note: When transforms are "set", they are actually assigned to a per-element transformCache. When all transform\r\n\t\t\t\t\t setting is complete complete, CSS.flushTransformCache() must be manually called to flush the values to the DOM.\r\n\t\t\t\t\t Transform setting is batched in this way to improve performance: the transform style only needs to be updated\r\n\t\t\t\t\t once when multiple transform subproperties are being animated simultaneously. */\r\n\t\t\t\t\t/* Note: IE9 and Android Gingerbread have support for 2D -- but not 3D -- transforms. Since animating unsupported\r\n\t\t\t\t\t transform properties results in the browser ignoring the *entire* transform string, we prevent these 3D values\r\n\t\t\t\t\t from being normalized for these browsers so that tweening skips these properties altogether\r\n\t\t\t\t\t (since it will ignore them as being unsupported by the browser.) */\r\n\t\t\t\t\tif ((!IE || IE > 9) && !Velocity.State.isGingerbread) {\r\n\t\t\t\t\t\t/* Note: Since the standalone CSS "perspective" property and the CSS transform "perspective" subproperty\r\n\t\t\t\t\t\t share the same name, the latter is given a unique token within Velocity: "transformPerspective". */\r\n\t\t\t\t\t\tCSS.Lists.transformsBase = CSS.Lists.transformsBase.concat(CSS.Lists.transforms3D);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (var i = 0; i < CSS.Lists.transformsBase.length; i++) {\r\n\t\t\t\t\t\t/* Wrap the dynamically generated normalization function in a new scope so that transformName\'s value is\r\n\t\t\t\t\t\t paired with its respective function. (Otherwise, all functions would take the final for loop\'s transformName.) */\r\n\t\t\t\t\t\t(function() {\r\n\t\t\t\t\t\t\tvar transformName = CSS.Lists.transformsBase[i];\r\n\r\n\t\t\t\t\t\t\tCSS.Normalizations.registered[transformName] = function(type, element, propertyValue) {\r\n\t\t\t\t\t\t\t\tswitch (type) {\r\n\t\t\t\t\t\t\t\t\t/* The normalized property name is the parent "transform" property -- the property that is actually set in CSS. */\r\n\t\t\t\t\t\t\t\t\tcase "name":\r\n\t\t\t\t\t\t\t\t\t\treturn "transform";\r\n\t\t\t\t\t\t\t\t\t\t/* Transform values are cached onto a per-element transformCache object. */\r\n\t\t\t\t\t\t\t\t\tcase "extract":\r\n\t\t\t\t\t\t\t\t\t\t/* If this transform has yet to be assigned a value, return its null value. */\r\n\t\t\t\t\t\t\t\t\t\tif (Data(element) === undefined || Data(element).transformCache[transformName] === undefined) {\r\n\t\t\t\t\t\t\t\t\t\t\t/* Scale CSS.Lists.transformsBase default to 1 whereas all other transform properties default to 0. */\r\n\t\t\t\t\t\t\t\t\t\t\treturn /^scale/i.test(transformName) ? 1 : 0;\r\n\t\t\t\t\t\t\t\t\t\t\t/* When transform values are set, they are wrapped in parentheses as per the CSS spec.\r\n\t\t\t\t\t\t\t\t\t\t\t Thus, when extracting their values (for tween calculations), we strip off the parentheses. */\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\treturn Data(element).transformCache[transformName].replace(/[()]/g, "");\r\n\t\t\t\t\t\t\t\t\tcase "inject":\r\n\t\t\t\t\t\t\t\t\t\tvar invalid = false;\r\n\r\n\t\t\t\t\t\t\t\t\t\t/* If an individual transform property contains an unsupported unit type, the browser ignores the *entire* transform property.\r\n\t\t\t\t\t\t\t\t\t\t Thus, protect users from themselves by skipping setting for transform values supplied with invalid unit types. */\r\n\t\t\t\t\t\t\t\t\t\t/* Switch on the base transform type; ignore the axis by removing the last letter from the transform\'s name. */\r\n\t\t\t\t\t\t\t\t\t\tswitch (transformName.substr(0, transformName.length - 1)) {\r\n\t\t\t\t\t\t\t\t\t\t\t/* Whitelist unit types for each transform. */\r\n\t\t\t\t\t\t\t\t\t\t\tcase "translate":\r\n\t\t\t\t\t\t\t\t\t\t\t\tinvalid = !/(%|px|em|rem|vw|vh|\\d)$/i.test(propertyValue);\r\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t\t/* Since an axis-free "scale" property is supported as well, a little hack is used here to detect it by chopping off its last letter. */\r\n\t\t\t\t\t\t\t\t\t\t\tcase "scal":\r\n\t\t\t\t\t\t\t\t\t\t\tcase "scale":\r\n\t\t\t\t\t\t\t\t\t\t\t\t/* Chrome on Android has a bug in which scaled elements blur if their initial scale\r\n\t\t\t\t\t\t\t\t\t\t\t\t value is below 1 (which can happen with forcefeeding). Thus, we detect a yet-unset scale property\r\n\t\t\t\t\t\t\t\t\t\t\t\t and ensure that its first value is always 1. More info: http://stackoverflow.com/questions/10417890/css3-animations-with-transform-causes-blurred-elements-on-webkit/10417962#10417962 */\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (Velocity.State.isAndroid && Data(element).transformCache[transformName] === undefined && propertyValue < 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpropertyValue = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tinvalid = !/(\\d)$/i.test(propertyValue);\r\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\tcase "skew":\r\n\t\t\t\t\t\t\t\t\t\t\t\tinvalid = !/(deg|\\d)$/i.test(propertyValue);\r\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\tcase "rotate":\r\n\t\t\t\t\t\t\t\t\t\t\t\tinvalid = !/(deg|\\d)$/i.test(propertyValue);\r\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (!invalid) {\r\n\t\t\t\t\t\t\t\t\t\t\t/* As per the CSS spec, wrap the value in parentheses. */\r\n\t\t\t\t\t\t\t\t\t\t\tData(element).transformCache[transformName] = "(" + propertyValue + ")";\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t/* Although the value is set on the transformCache object, return the newly-updated value for the calling code to process as normal. */\r\n\t\t\t\t\t\t\t\t\t\treturn Data(element).transformCache[transformName];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t})();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/*************\r\n\t\t\t\t\t Colors\r\n\t\t\t\t\t *************/\r\n\r\n\t\t\t\t\t/* Since Velocity only animates a single numeric value per property, color animation is achieved by hooking the individual RGBA components of CSS color properties.\r\n\t\t\t\t\t Accordingly, color values must be normalized (e.g. "#ff0000", "red", and "rgb(255, 0, 0)" ==> "255 0 0 1") so that their components can be injected/extracted by CSS.Hooks logic. */\r\n\t\t\t\t\tfor (var j = 0; j < CSS.Lists.colors.length; j++) {\r\n\t\t\t\t\t\t/* Wrap the dynamically generated normalization function in a new scope so that colorName\'s value is paired with its respective function.\r\n\t\t\t\t\t\t (Otherwise, all functions would take the final for loop\'s colorName.) */\r\n\t\t\t\t\t\t(function() {\r\n\t\t\t\t\t\t\tvar colorName = CSS.Lists.colors[j];\r\n\r\n\t\t\t\t\t\t\t/* Note: In IE<=8, which support rgb but not rgba, color properties are reverted to rgb by stripping off the alpha component. */\r\n\t\t\t\t\t\t\tCSS.Normalizations.registered[colorName] = function(type, element, propertyValue) {\r\n\t\t\t\t\t\t\t\tswitch (type) {\r\n\t\t\t\t\t\t\t\t\tcase "name":\r\n\t\t\t\t\t\t\t\t\t\treturn colorName;\r\n\t\t\t\t\t\t\t\t\t\t/* Convert all color values into the rgb format. (Old IE can return hex values and color names instead of rgb/rgba.) */\r\n\t\t\t\t\t\t\t\t\tcase "extract":\r\n\t\t\t\t\t\t\t\t\t\tvar extracted;\r\n\r\n\t\t\t\t\t\t\t\t\t\t/* If the color is already in its hookable form (e.g. "255 255 255 1") due to having been previously extracted, skip extraction. */\r\n\t\t\t\t\t\t\t\t\t\tif (CSS.RegEx.wrappedValueAlreadyExtracted.test(propertyValue)) {\r\n\t\t\t\t\t\t\t\t\t\t\textracted = propertyValue;\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tvar converted,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolorNames = {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tblack: "rgb(0, 0, 0)",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tblue: "rgb(0, 0, 255)",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgray: "rgb(128, 128, 128)",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgreen: "rgb(0, 128, 0)",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tred: "rgb(255, 0, 0)",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twhite: "rgb(255, 255, 255)"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t/* Convert color names to rgb. */\r\n\t\t\t\t\t\t\t\t\t\t\tif (/^[A-z]+$/i.test(propertyValue)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (colorNames[propertyValue] !== undefined) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconverted = colorNames[propertyValue];\r\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/* If an unmatched color name is provided, default to black. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconverted = colorNames.black;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t/* Convert hex values to rgb. */\r\n\t\t\t\t\t\t\t\t\t\t\t} else if (CSS.RegEx.isHex.test(propertyValue)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tconverted = "rgb(" + CSS.Values.hexToRgb(propertyValue).join(" ") + ")";\r\n\t\t\t\t\t\t\t\t\t\t\t\t/* If the provided color doesn\'t match any of the accepted color formats, default to black. */\r\n\t\t\t\t\t\t\t\t\t\t\t} else if (!(/^rgba?\\(/i.test(propertyValue))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tconverted = colorNames.black;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t/* Remove the surrounding "rgb/rgba()" string then replace commas with spaces and strip\r\n\t\t\t\t\t\t\t\t\t\t\t repeated spaces (in case the value included spaces to begin with). */\r\n\t\t\t\t\t\t\t\t\t\t\textracted = (converted || propertyValue).toString().match(CSS.RegEx.valueUnwrap)[1].replace(/,(\\s+)?/g, " ");\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t/* So long as this isn\'t <=IE8, add a fourth (alpha) component if it\'s missing and default it to 1 (visible). */\r\n\t\t\t\t\t\t\t\t\t\tif ((!IE || IE > 8) && extracted.split(" ").length === 3) {\r\n\t\t\t\t\t\t\t\t\t\t\textracted += " 1";\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\treturn extracted;\r\n\t\t\t\t\t\t\t\t\tcase "inject":\r\n\t\t\t\t\t\t\t\t\t\t/* If we have a pattern then it might already have the right values */\r\n\t\t\t\t\t\t\t\t\t\tif (/^rgb/.test(propertyValue)) {\r\n\t\t\t\t\t\t\t\t\t\t\treturn propertyValue;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t/* If this is IE<=8 and an alpha component exists, strip it off. */\r\n\t\t\t\t\t\t\t\t\t\tif (IE <= 8) {\r\n\t\t\t\t\t\t\t\t\t\t\tif (propertyValue.split(" ").length === 4) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tpropertyValue = propertyValue.split(/\\s+/).slice(0, 3).join(" ");\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t/* Otherwise, add a fourth (alpha) component if it\'s missing and default it to 1 (visible). */\r\n\t\t\t\t\t\t\t\t\t\t} else if (propertyValue.split(" ").length === 3) {\r\n\t\t\t\t\t\t\t\t\t\t\tpropertyValue += " 1";\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t/* Re-insert the browser-appropriate wrapper("rgb/rgba()"), insert commas, and strip off decimal units\r\n\t\t\t\t\t\t\t\t\t\t on all values but the fourth (R, G, and B only accept whole numbers). */\r\n\t\t\t\t\t\t\t\t\t\treturn (IE <= 8 ? "rgb" : "rgba") + "(" + propertyValue.replace(/\\s+/g, ",").replace(/\\.(\\d)+(?=,)/g, "") + ")";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t})();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/**************\r\n\t\t\t\t\t Dimensions\r\n\t\t\t\t\t **************/\r\n\t\t\t\t\tfunction augmentDimension(name, element, wantInner) {\r\n\t\t\t\t\t\tvar isBorderBox = CSS.getPropertyValue(element, "boxSizing").toString().toLowerCase() === "border-box";\r\n\r\n\t\t\t\t\t\tif (isBorderBox === (wantInner || false)) {\r\n\t\t\t\t\t\t\t/* in box-sizing mode, the CSS width / height accessors already give the outerWidth / outerHeight. */\r\n\t\t\t\t\t\t\tvar i,\r\n\t\t\t\t\t\t\t\t\tvalue,\r\n\t\t\t\t\t\t\t\t\taugment = 0,\r\n\t\t\t\t\t\t\t\t\tsides = name === "width" ? ["Left", "Right"] : ["Top", "Bottom"],\r\n\t\t\t\t\t\t\t\t\tfields = ["padding" + sides[0], "padding" + sides[1], "border" + sides[0] + "Width", "border" + sides[1] + "Width"];\r\n\r\n\t\t\t\t\t\t\tfor (i = 0; i < fields.length; i++) {\r\n\t\t\t\t\t\t\t\tvalue = parseFloat(CSS.getPropertyValue(element, fields[i]));\r\n\t\t\t\t\t\t\t\tif (!isNaN(value)) {\r\n\t\t\t\t\t\t\t\t\taugment += value;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn wantInner ? -augment : augment;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfunction getDimension(name, wantInner) {\r\n\t\t\t\t\t\treturn function(type, element, propertyValue) {\r\n\t\t\t\t\t\t\tswitch (type) {\r\n\t\t\t\t\t\t\t\tcase "name":\r\n\t\t\t\t\t\t\t\t\treturn name;\r\n\t\t\t\t\t\t\t\tcase "extract":\r\n\t\t\t\t\t\t\t\t\treturn parseFloat(propertyValue) + augmentDimension(name, element, wantInner);\r\n\t\t\t\t\t\t\t\tcase "inject":\r\n\t\t\t\t\t\t\t\t\treturn (parseFloat(propertyValue) - augmentDimension(name, element, wantInner)) + "px";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t\tCSS.Normalizations.registered.innerWidth = getDimension("width", true);\r\n\t\t\t\t\tCSS.Normalizations.registered.innerHeight = getDimension("height", true);\r\n\t\t\t\t\tCSS.Normalizations.registered.outerWidth = getDimension("width");\r\n\t\t\t\t\tCSS.Normalizations.registered.outerHeight = getDimension("height");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t/************************\r\n\t\t\t CSS Property Names\r\n\t\t\t ************************/\r\n\r\n\t\t\tNames: {\r\n\t\t\t\t/* Camelcase a property name into its JavaScript notation (e.g. "background-color" ==> "backgroundColor").\r\n\t\t\t\t Camelcasing is used to normalize property names between and across calls. */\r\n\t\t\t\tcamelCase: function(property) {\r\n\t\t\t\t\treturn property.replace(/-(\\w)/g, function(match, subMatch) {\r\n\t\t\t\t\t\treturn subMatch.toUpperCase();\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t\t/* For SVG elements, some properties (namely, dimensional ones) are GET/SET via the element\'s HTML attributes (instead of via CSS styles). */\r\n\t\t\t\tSVGAttribute: function(property) {\r\n\t\t\t\t\tvar SVGAttributes = "width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";\r\n\r\n\t\t\t\t\t/* Certain browsers require an SVG transform to be applied as an attribute. (Otherwise, application via CSS is preferable due to 3D support.) */\r\n\t\t\t\t\tif (IE || (Velocity.State.isAndroid && !Velocity.State.isChrome)) {\r\n\t\t\t\t\t\tSVGAttributes += "|transform";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn new RegExp("^(" + SVGAttributes + ")$", "i").test(property);\r\n\t\t\t\t},\r\n\t\t\t\t/* Determine whether a property should be set with a vendor prefix. */\r\n\t\t\t\t/* If a prefixed version of the property exists, return it. Otherwise, return the original property name.\r\n\t\t\t\t If the property is not at all supported by the browser, return a false flag. */\r\n\t\t\t\tprefixCheck: function(property) {\r\n\t\t\t\t\t/* If this property has already been checked, return the cached value. */\r\n\t\t\t\t\tif (Velocity.State.prefixMatches[property]) {\r\n\t\t\t\t\t\treturn [Velocity.State.prefixMatches[property], true];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar vendors = ["", "Webkit", "Moz", "ms", "O"];\r\n\r\n\t\t\t\t\t\tfor (var i = 0, vendorsLength = vendors.length; i < vendorsLength; i++) {\r\n\t\t\t\t\t\t\tvar propertyPrefixed;\r\n\r\n\t\t\t\t\t\t\tif (i === 0) {\r\n\t\t\t\t\t\t\t\tpropertyPrefixed = property;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t/* Capitalize the first letter of the property to conform to JavaScript vendor prefix notation (e.g. webkitFilter). */\r\n\t\t\t\t\t\t\t\tpropertyPrefixed = vendors[i] + property.replace(/^\\w/, function(match) {\r\n\t\t\t\t\t\t\t\t\treturn match.toUpperCase();\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Check if the browser supports this property as prefixed. */\r\n\t\t\t\t\t\t\tif (Type.isString(Velocity.State.prefixElement.style[propertyPrefixed])) {\r\n\t\t\t\t\t\t\t\t/* Cache the match. */\r\n\t\t\t\t\t\t\t\tVelocity.State.prefixMatches[property] = propertyPrefixed;\r\n\r\n\t\t\t\t\t\t\t\treturn [propertyPrefixed, true];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* If the browser doesn\'t support this property in any form, include a false flag so that the caller can decide how to proceed. */\r\n\t\t\t\t\t\treturn [property, false];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t/************************\r\n\t\t\t CSS Property Values\r\n\t\t\t ************************/\r\n\r\n\t\t\tValues: {\r\n\t\t\t\t/* Hex to RGB conversion. Copyright Tim Down: http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb */\r\n\t\t\t\thexToRgb: function(hex) {\r\n\t\t\t\t\tvar shortformRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,\r\n\t\t\t\t\t\t\tlongformRegex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i,\r\n\t\t\t\t\t\t\trgbParts;\r\n\r\n\t\t\t\t\thex = hex.replace(shortformRegex, function(m, r, g, b) {\r\n\t\t\t\t\t\treturn r + r + g + g + b + b;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\trgbParts = longformRegex.exec(hex);\r\n\r\n\t\t\t\t\treturn rgbParts ? [parseInt(rgbParts[1], 16), parseInt(rgbParts[2], 16), parseInt(rgbParts[3], 16)] : [0, 0, 0];\r\n\t\t\t\t},\r\n\t\t\t\tisCSSNullValue: function(value) {\r\n\t\t\t\t\t/* The browser defaults CSS values that have not been set to either 0 or one of several possible null-value strings.\r\n\t\t\t\t\t Thus, we check for both falsiness and these special strings. */\r\n\t\t\t\t\t/* Null-value checking is performed to default the special strings to 0 (for the sake of tweening) or their hook\r\n\t\t\t\t\t templates as defined as CSS.Hooks (for the sake of hook injection/extraction). */\r\n\t\t\t\t\t/* Note: Chrome returns "rgba(0, 0, 0, 0)" for an undefined color whereas IE returns "transparent". */\r\n\t\t\t\t\treturn (!value || /^(none|auto|transparent|(rgba\\(0, ?0, ?0, ?0\\)))$/i.test(value));\r\n\t\t\t\t},\r\n\t\t\t\t/* Retrieve a property\'s default unit type. Used for assigning a unit type when one is not supplied by the user. */\r\n\t\t\t\tgetUnitType: function(property) {\r\n\t\t\t\t\tif (/^(rotate|skew)/i.test(property)) {\r\n\t\t\t\t\t\treturn "deg";\r\n\t\t\t\t\t} else if (/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(property)) {\r\n\t\t\t\t\t\t/* The above properties are unitless. */\r\n\t\t\t\t\t\treturn "";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/* Default to px for all other properties. */\r\n\t\t\t\t\t\treturn "px";\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t/* HTML elements default to an associated display type when they\'re not set to display:none. */\r\n\t\t\t\t/* Note: This function is used for correctly setting the non-"none" display value in certain Velocity redirects, such as fadeIn/Out. */\r\n\t\t\t\tgetDisplayType: function(element) {\r\n\t\t\t\t\tvar tagName = element && element.tagName.toString().toLowerCase();\r\n\r\n\t\t\t\t\tif (/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(tagName)) {\r\n\t\t\t\t\t\treturn "inline";\r\n\t\t\t\t\t} else if (/^(li)$/i.test(tagName)) {\r\n\t\t\t\t\t\treturn "list-item";\r\n\t\t\t\t\t} else if (/^(tr)$/i.test(tagName)) {\r\n\t\t\t\t\t\treturn "table-row";\r\n\t\t\t\t\t} else if (/^(table)$/i.test(tagName)) {\r\n\t\t\t\t\t\treturn "table";\r\n\t\t\t\t\t} else if (/^(tbody)$/i.test(tagName)) {\r\n\t\t\t\t\t\treturn "table-row-group";\r\n\t\t\t\t\t\t/* Default to "block" when no match is found. */\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn "block";\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t/* The class add/remove functions are used to temporarily apply a "velocity-animating" class to elements while they\'re animating. */\r\n\t\t\t\taddClass: function(element, className) {\r\n\t\t\t\t\tif (element) {\r\n\t\t\t\t\t\tif (element.classList) {\r\n\t\t\t\t\t\t\telement.classList.add(className);\r\n\t\t\t\t\t\t} else if (Type.isString(element.className)) {\r\n\t\t\t\t\t\t\t// Element.className is around 15% faster then set/getAttribute\r\n\t\t\t\t\t\t\telement.className += (element.className.length ? " " : "") + className;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Work around for IE strict mode animating SVG - and anything else that doesn\'t behave correctly - the same way jQuery does it\r\n\t\t\t\t\t\t\tvar currentClass = element.getAttribute(IE <= 7 ? "className" : "class") || "";\r\n\r\n\t\t\t\t\t\t\telement.setAttribute("class", currentClass + (currentClass ? " " : "") + className);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tremoveClass: function(element, className) {\r\n\t\t\t\t\tif (element) {\r\n\t\t\t\t\t\tif (element.classList) {\r\n\t\t\t\t\t\t\telement.classList.remove(className);\r\n\t\t\t\t\t\t} else if (Type.isString(element.className)) {\r\n\t\t\t\t\t\t\t// Element.className is around 15% faster then set/getAttribute\r\n\t\t\t\t\t\t\t// TODO: Need some jsperf tests on performance - can we get rid of the regex and maybe use split / array manipulation?\r\n\t\t\t\t\t\t\telement.className = element.className.toString().replace(new RegExp("(^|\\\\s)" + className.split(" ").join("|") + "(\\\\s|$)", "gi"), " ");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Work around for IE strict mode animating SVG - and anything else that doesn\'t behave correctly - the same way jQuery does it\r\n\t\t\t\t\t\t\tvar currentClass = element.getAttribute(IE <= 7 ? "className" : "class") || "";\r\n\r\n\t\t\t\t\t\t\telement.setAttribute("class", currentClass.replace(new RegExp("(^|\\s)" + className.split(" ").join("|") + "(\\s|$)", "gi"), " "));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t/****************************\r\n\t\t\t Style Getting & Setting\r\n\t\t\t ****************************/\r\n\r\n\t\t\t/* The singular getPropertyValue, which routes the logic for all normalizations, hooks, and standard CSS properties. */\r\n\t\t\tgetPropertyValue: function(element, property, rootPropertyValue, forceStyleLookup) {\r\n\t\t\t\t/* Get an element\'s computed property value. */\r\n\t\t\t\t/* Note: Retrieving the value of a CSS property cannot simply be performed by checking an element\'s\r\n\t\t\t\t style attribute (which only reflects user-defined values). Instead, the browser must be queried for a property\'s\r\n\t\t\t\t *computed* value. You can read more about getComputedStyle here: https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle */\r\n\t\t\t\tfunction computePropertyValue(element, property) {\r\n\t\t\t\t\t/* When box-sizing isn\'t set to border-box, height and width style values are incorrectly computed when an\r\n\t\t\t\t\t element\'s scrollbars are visible (which expands the element\'s dimensions). Thus, we defer to the more accurate\r\n\t\t\t\t\t offsetHeight/Width property, which includes the total dimensions for interior, border, padding, and scrollbar.\r\n\t\t\t\t\t We subtract border and padding to get the sum of interior + scrollbar. */\r\n\t\t\t\t\tvar computedValue = 0;\r\n\r\n\t\t\t\t\t/* IE<=8 doesn\'t support window.getComputedStyle, thus we defer to jQuery, which has an extensive array\r\n\t\t\t\t\t of hacks to accurately retrieve IE8 property values. Re-implementing that logic here is not worth bloating the\r\n\t\t\t\t\t codebase for a dying browser. The performance repercussions of using jQuery here are minimal since\r\n\t\t\t\t\t Velocity is optimized to rarely (and sometimes never) query the DOM. Further, the $.css() codepath isn\'t that slow. */\r\n\t\t\t\t\tif (IE <= 8) {\r\n\t\t\t\t\t\tcomputedValue = $.css(element, property); /* GET */\r\n\t\t\t\t\t\t/* All other browsers support getComputedStyle. The returned live object reference is cached onto its\r\n\t\t\t\t\t\t associated element so that it does not need to be refetched upon every GET. */\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/* Browsers do not return height and width values for elements that are set to display:"none". Thus, we temporarily\r\n\t\t\t\t\t\t toggle display to the element type\'s default value. */\r\n\t\t\t\t\t\tvar toggleDisplay = false;\r\n\r\n\t\t\t\t\t\tif (/^(width|height)$/.test(property) && CSS.getPropertyValue(element, "display") === 0) {\r\n\t\t\t\t\t\t\ttoggleDisplay = true;\r\n\t\t\t\t\t\t\tCSS.setPropertyValue(element, "display", CSS.Values.getDisplayType(element));\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tvar revertDisplay = function() {\r\n\t\t\t\t\t\t\tif (toggleDisplay) {\r\n\t\t\t\t\t\t\t\tCSS.setPropertyValue(element, "display", "none");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tif (!forceStyleLookup) {\r\n\t\t\t\t\t\t\tif (property === "height" && CSS.getPropertyValue(element, "boxSizing").toString().toLowerCase() !== "border-box") {\r\n\t\t\t\t\t\t\t\tvar contentBoxHeight = element.offsetHeight - (parseFloat(CSS.getPropertyValue(element, "borderTopWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "borderBottomWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingTop")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingBottom")) || 0);\r\n\t\t\t\t\t\t\t\trevertDisplay();\r\n\r\n\t\t\t\t\t\t\t\treturn contentBoxHeight;\r\n\t\t\t\t\t\t\t} else if (property === "width" && CSS.getPropertyValue(element, "boxSizing").toString().toLowerCase() !== "border-box") {\r\n\t\t\t\t\t\t\t\tvar contentBoxWidth = element.offsetWidth - (parseFloat(CSS.getPropertyValue(element, "borderLeftWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "borderRightWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingLeft")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingRight")) || 0);\r\n\t\t\t\t\t\t\t\trevertDisplay();\r\n\r\n\t\t\t\t\t\t\t\treturn contentBoxWidth;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tvar computedStyle;\r\n\r\n\t\t\t\t\t\t/* For elements that Velocity hasn\'t been called on directly (e.g. when Velocity queries the DOM on behalf\r\n\t\t\t\t\t\t of a parent of an element its animating), perform a direct getComputedStyle lookup since the object isn\'t cached. */\r\n\t\t\t\t\t\tif (Data(element) === undefined) {\r\n\t\t\t\t\t\t\tcomputedStyle = window.getComputedStyle(element, null); /* GET */\r\n\t\t\t\t\t\t\t/* If the computedStyle object has yet to be cached, do so now. */\r\n\t\t\t\t\t\t} else if (!Data(element).computedStyle) {\r\n\t\t\t\t\t\t\tcomputedStyle = Data(element).computedStyle = window.getComputedStyle(element, null); /* GET */\r\n\t\t\t\t\t\t\t/* If computedStyle is cached, use it. */\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcomputedStyle = Data(element).computedStyle;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side\'s color.\r\n\t\t\t\t\t\t Also, in all browsers, when border colors aren\'t all the same, a compound value is returned that Velocity isn\'t setup to parse.\r\n\t\t\t\t\t\t So, as a polyfill for querying individual border side colors, we just return the top border\'s color and animate all borders from that value. */\r\n\t\t\t\t\t\tif (property === "borderColor") {\r\n\t\t\t\t\t\t\tproperty = "borderTopColor";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* IE9 has a bug in which the "filter" property must be accessed from computedStyle using the getPropertyValue method\r\n\t\t\t\t\t\t instead of a direct property lookup. The getPropertyValue method is slower than a direct lookup, which is why we avoid it by default. */\r\n\t\t\t\t\t\tif (IE === 9 && property === "filter") {\r\n\t\t\t\t\t\t\tcomputedValue = computedStyle.getPropertyValue(property); /* GET */\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcomputedValue = computedStyle[property];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Fall back to the property\'s style value (if defined) when computedValue returns nothing,\r\n\t\t\t\t\t\t which can happen when the element hasn\'t been painted. */\r\n\t\t\t\t\t\tif (computedValue === "" || computedValue === null) {\r\n\t\t\t\t\t\t\tcomputedValue = element.style[property];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trevertDisplay();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* For top, right, bottom, and left (TRBL) values that are set to "auto" on elements of "fixed" or "absolute" position,\r\n\t\t\t\t\t defer to jQuery for converting "auto" to a numeric value. (For elements with a "static" or "relative" position, "auto" has the same\r\n\t\t\t\t\t effect as being set to 0, so no conversion is necessary.) */\r\n\t\t\t\t\t/* An example of why numeric conversion is necessary: When an element with "position:absolute" has an untouched "left"\r\n\t\t\t\t\t property, which reverts to "auto", left\'s value is 0 relative to its parent element, but is often non-zero relative\r\n\t\t\t\t\t to its *containing* (not parent) element, which is the nearest "position:relative" ancestor or the viewport (and always the viewport in the case of "position:fixed"). */\r\n\t\t\t\t\tif (computedValue === "auto" && /^(top|right|bottom|left)$/i.test(property)) {\r\n\t\t\t\t\t\tvar position = computePropertyValue(element, "position"); /* GET */\r\n\r\n\t\t\t\t\t\t/* For absolute positioning, jQuery\'s $.position() only returns values for top and left;\r\n\t\t\t\t\t\t right and bottom will have their "auto" value reverted to 0. */\r\n\t\t\t\t\t\t/* Note: A jQuery object must be created here since jQuery doesn\'t have a low-level alias for $.position().\r\n\t\t\t\t\t\t Not a big deal since we\'re currently in a GET batch anyway. */\r\n\t\t\t\t\t\tif (position === "fixed" || (position === "absolute" && /top|left/i.test(property))) {\r\n\t\t\t\t\t\t\t/* Note: jQuery strips the pixel unit from its returned values; we re-add it here to conform with computePropertyValue\'s behavior. */\r\n\t\t\t\t\t\t\tcomputedValue = $(element).position()[property] + "px"; /* GET */\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn computedValue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar propertyValue;\r\n\r\n\t\t\t\t/* If this is a hooked property (e.g. "clipLeft" instead of the root property of "clip"),\r\n\t\t\t\t extract the hook\'s value from a normalized rootPropertyValue using CSS.Hooks.extractValue(). */\r\n\t\t\t\tif (CSS.Hooks.registered[property]) {\r\n\t\t\t\t\tvar hook = property,\r\n\t\t\t\t\t\t\thookRoot = CSS.Hooks.getRoot(hook);\r\n\r\n\t\t\t\t\t/* If a cached rootPropertyValue wasn\'t passed in (which Velocity always attempts to do in order to avoid requerying the DOM),\r\n\t\t\t\t\t query the DOM for the root property\'s value. */\r\n\t\t\t\t\tif (rootPropertyValue === undefined) {\r\n\t\t\t\t\t\t/* Since the browser is now being directly queried, use the official post-prefixing property name for this lookup. */\r\n\t\t\t\t\t\trootPropertyValue = CSS.getPropertyValue(element, CSS.Names.prefixCheck(hookRoot)[0]); /* GET */\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* If this root has a normalization registered, peform the associated normalization extraction. */\r\n\t\t\t\t\tif (CSS.Normalizations.registered[hookRoot]) {\r\n\t\t\t\t\t\trootPropertyValue = CSS.Normalizations.registered[hookRoot]("extract", element, rootPropertyValue);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* Extract the hook\'s value. */\r\n\t\t\t\t\tpropertyValue = CSS.Hooks.extractValue(hook, rootPropertyValue);\r\n\r\n\t\t\t\t\t/* If this is a normalized property (e.g. "opacity" becomes "filter" in <=IE8) or "translateX" becomes "transform"),\r\n\t\t\t\t\t normalize the property\'s name and value, and handle the special case of transforms. */\r\n\t\t\t\t\t/* Note: Normalizing a property is mutually exclusive from hooking a property since hook-extracted values are strictly\r\n\t\t\t\t\t numerical and therefore do not require normalization extraction. */\r\n\t\t\t\t} else if (CSS.Normalizations.registered[property]) {\r\n\t\t\t\t\tvar normalizedPropertyName,\r\n\t\t\t\t\t\t\tnormalizedPropertyValue;\r\n\r\n\t\t\t\t\tnormalizedPropertyName = CSS.Normalizations.registered[property]("name", element);\r\n\r\n\t\t\t\t\t/* Transform values are calculated via normalization extraction (see below), which checks against the element\'s transformCache.\r\n\t\t\t\t\t At no point do transform GETs ever actually query the DOM; initial stylesheet values are never processed.\r\n\t\t\t\t\t This is because parsing 3D transform matrices is not always accurate and would bloat our codebase;\r\n\t\t\t\t\t thus, normalization extraction defaults initial transform values to their zero-values (e.g. 1 for scaleX and 0 for translateX). */\r\n\t\t\t\t\tif (normalizedPropertyName !== "transform") {\r\n\t\t\t\t\t\tnormalizedPropertyValue = computePropertyValue(element, CSS.Names.prefixCheck(normalizedPropertyName)[0]); /* GET */\r\n\r\n\t\t\t\t\t\t/* If the value is a CSS null-value and this property has a hook template, use that zero-value template so that hooks can be extracted from it. */\r\n\t\t\t\t\t\tif (CSS.Values.isCSSNullValue(normalizedPropertyValue) && CSS.Hooks.templates[property]) {\r\n\t\t\t\t\t\t\tnormalizedPropertyValue = CSS.Hooks.templates[property][1];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpropertyValue = CSS.Normalizations.registered[property]("extract", element, normalizedPropertyValue);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If a (numeric) value wasn\'t produced via hook extraction or normalization, query the DOM. */\r\n\t\t\t\tif (!/^[\\d-]/.test(propertyValue)) {\r\n\t\t\t\t\t/* For SVG elements, dimensional properties (which SVGAttribute() detects) are tweened via\r\n\t\t\t\t\t their HTML attribute values instead of their CSS style values. */\r\n\t\t\t\t\tvar data = Data(element);\r\n\r\n\t\t\t\t\tif (data && data.isSVG && CSS.Names.SVGAttribute(property)) {\r\n\t\t\t\t\t\t/* Since the height/width attribute values must be set manually, they don\'t reflect computed values.\r\n\t\t\t\t\t\t Thus, we use use getBBox() to ensure we always get values for elements with undefined height/width attributes. */\r\n\t\t\t\t\t\tif (/^(height|width)$/i.test(property)) {\r\n\t\t\t\t\t\t\t/* Firefox throws an error if .getBBox() is called on an SVG that isn\'t attached to the DOM. */\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tpropertyValue = element.getBBox()[property];\r\n\t\t\t\t\t\t\t} catch (error) {\r\n\t\t\t\t\t\t\t\tpropertyValue = 0;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t/* Otherwise, access the attribute value directly. */\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpropertyValue = element.getAttribute(property);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpropertyValue = computePropertyValue(element, CSS.Names.prefixCheck(property)[0]); /* GET */\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Since property lookups are for animation purposes (which entails computing the numeric delta between start and end values),\r\n\t\t\t\t convert CSS null-values to an integer of value 0. */\r\n\t\t\t\tif (CSS.Values.isCSSNullValue(propertyValue)) {\r\n\t\t\t\t\tpropertyValue = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (Velocity.debug >= 2) {\r\n\t\t\t\t\tconsole.log("Get " + property + ": " + propertyValue);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn propertyValue;\r\n\t\t\t},\r\n\t\t\t/* The singular setPropertyValue, which routes the logic for all normalizations, hooks, and standard CSS properties. */\r\n\t\t\tsetPropertyValue: function(element, property, propertyValue, rootPropertyValue, scrollData) {\r\n\t\t\t\tvar propertyName = property;\r\n\r\n\t\t\t\t/* In order to be subjected to call options and element queueing, scroll animation is routed through Velocity as if it were a standard CSS property. */\r\n\t\t\t\tif (property === "scroll") {\r\n\t\t\t\t\t/* If a container option is present, scroll the container instead of the browser window. */\r\n\t\t\t\t\tif (scrollData.container) {\r\n\t\t\t\t\t\tscrollData.container["scroll" + scrollData.direction] = propertyValue;\r\n\t\t\t\t\t\t/* Otherwise, Velocity defaults to scrolling the browser window. */\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (scrollData.direction === "Left") {\r\n\t\t\t\t\t\t\twindow.scrollTo(propertyValue, scrollData.alternateValue);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\twindow.scrollTo(scrollData.alternateValue, propertyValue);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t/* Transforms (translateX, rotateZ, etc.) are applied to a per-element transformCache object, which is manually flushed via flushTransformCache().\r\n\t\t\t\t\t Thus, for now, we merely cache transforms being SET. */\r\n\t\t\t\t\tif (CSS.Normalizations.registered[property] && CSS.Normalizations.registered[property]("name", element) === "transform") {\r\n\t\t\t\t\t\t/* Perform a normalization injection. */\r\n\t\t\t\t\t\t/* Note: The normalization logic handles the transformCache updating. */\r\n\t\t\t\t\t\tCSS.Normalizations.registered[property]("inject", element, propertyValue);\r\n\r\n\t\t\t\t\t\tpropertyName = "transform";\r\n\t\t\t\t\t\tpropertyValue = Data(element).transformCache[property];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/* Inject hooks. */\r\n\t\t\t\t\t\tif (CSS.Hooks.registered[property]) {\r\n\t\t\t\t\t\t\tvar hookName = property,\r\n\t\t\t\t\t\t\t\t\thookRoot = CSS.Hooks.getRoot(property);\r\n\r\n\t\t\t\t\t\t\t/* If a cached rootPropertyValue was not provided, query the DOM for the hookRoot\'s current value. */\r\n\t\t\t\t\t\t\trootPropertyValue = rootPropertyValue || CSS.getPropertyValue(element, hookRoot); /* GET */\r\n\r\n\t\t\t\t\t\t\tpropertyValue = CSS.Hooks.injectValue(hookName, propertyValue, rootPropertyValue);\r\n\t\t\t\t\t\t\tproperty = hookRoot;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Normalize names and values. */\r\n\t\t\t\t\t\tif (CSS.Normalizations.registered[property]) {\r\n\t\t\t\t\t\t\tpropertyValue = CSS.Normalizations.registered[property]("inject", element, propertyValue);\r\n\t\t\t\t\t\t\tproperty = CSS.Normalizations.registered[property]("name", element);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Assign the appropriate vendor prefix before performing an official style update. */\r\n\t\t\t\t\t\tpropertyName = CSS.Names.prefixCheck(property)[0];\r\n\r\n\t\t\t\t\t\t/* A try/catch is used for IE<=8, which throws an error when "invalid" CSS values are set, e.g. a negative width.\r\n\t\t\t\t\t\t Try/catch is avoided for other browsers since it incurs a performance overhead. */\r\n\t\t\t\t\t\tif (IE <= 8) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\telement.style[propertyName] = propertyValue;\r\n\t\t\t\t\t\t\t} catch (error) {\r\n\t\t\t\t\t\t\t\tif (Velocity.debug) {\r\n\t\t\t\t\t\t\t\t\tconsole.log("Browser does not support [" + propertyValue + "] for [" + propertyName + "]");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t/* SVG elements have their dimensional properties (width, height, x, y, cx, etc.) applied directly as attributes instead of as styles. */\r\n\t\t\t\t\t\t\t/* Note: IE8 does not support SVG elements, so it\'s okay that we skip it for SVG animation. */\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvar data = Data(element);\r\n\r\n\t\t\t\t\t\t\tif (data && data.isSVG && CSS.Names.SVGAttribute(property)) {\r\n\t\t\t\t\t\t\t\t/* Note: For SVG attributes, vendor-prefixed property names are never used. */\r\n\t\t\t\t\t\t\t\t/* Note: Not all CSS properties can be animated via attributes, but the browser won\'t throw an error for unsupported properties. */\r\n\t\t\t\t\t\t\t\telement.setAttribute(property, propertyValue);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\telement.style[propertyName] = propertyValue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (Velocity.debug >= 2) {\r\n\t\t\t\t\t\t\tconsole.log("Set " + property + " (" + propertyName + "): " + propertyValue);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Return the normalized property name and value in case the caller wants to know how these values were modified before being applied to the DOM. */\r\n\t\t\t\treturn [propertyName, propertyValue];\r\n\t\t\t},\r\n\t\t\t/* To increase performance by batching transform updates into a single SET, transforms are not directly applied to an element until flushTransformCache() is called. */\r\n\t\t\t/* Note: Velocity applies transform properties in the same order that they are chronogically introduced to the element\'s CSS styles. */\r\n\t\t\tflushTransformCache: function(element) {\r\n\t\t\t\tvar transformString = "",\r\n\t\t\t\t\t\tdata = Data(element);\r\n\r\n\t\t\t\t/* Certain browsers require that SVG transforms be applied as an attribute. However, the SVG transform attribute takes a modified version of CSS\'s transform string\r\n\t\t\t\t (units are dropped and, except for skewX/Y, subproperties are merged into their master property -- e.g. scaleX and scaleY are merged into scale(X Y). */\r\n\t\t\t\tif ((IE || (Velocity.State.isAndroid && !Velocity.State.isChrome)) && data && data.isSVG) {\r\n\t\t\t\t\t/* Since transform values are stored in their parentheses-wrapped form, we use a helper function to strip out their numeric values.\r\n\t\t\t\t\t Further, SVG transform properties only take unitless (representing pixels) values, so it\'s okay that parseFloat() strips the unit suffixed to the float value. */\r\n\t\t\t\t\tvar getTransformFloat = function(transformProperty) {\r\n\t\t\t\t\t\treturn parseFloat(CSS.getPropertyValue(element, transformProperty));\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t/* Create an object to organize all the transforms that we\'ll apply to the SVG element. To keep the logic simple,\r\n\t\t\t\t\t we process *all* transform properties -- even those that may not be explicitly applied (since they default to their zero-values anyway). */\r\n\t\t\t\t\tvar SVGTransforms = {\r\n\t\t\t\t\t\ttranslate: [getTransformFloat("translateX"), getTransformFloat("translateY")],\r\n\t\t\t\t\t\tskewX: [getTransformFloat("skewX")], skewY: [getTransformFloat("skewY")],\r\n\t\t\t\t\t\t/* If the scale property is set (non-1), use that value for the scaleX and scaleY values\r\n\t\t\t\t\t\t (this behavior mimics the result of animating all these properties at once on HTML elements). */\r\n\t\t\t\t\t\tscale: getTransformFloat("scale") !== 1 ? [getTransformFloat("scale"), getTransformFloat("scale")] : [getTransformFloat("scaleX"), getTransformFloat("scaleY")],\r\n\t\t\t\t\t\t/* Note: SVG\'s rotate transform takes three values: rotation degrees followed by the X and Y values\r\n\t\t\t\t\t\t defining the rotation\'s origin point. We ignore the origin values (default them to 0). */\r\n\t\t\t\t\t\trotate: [getTransformFloat("rotateZ"), 0, 0]\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t/* Iterate through the transform properties in the user-defined property map order.\r\n\t\t\t\t\t (This mimics the behavior of non-SVG transform animation.) */\r\n\t\t\t\t\t$.each(Data(element).transformCache, function(transformName) {\r\n\t\t\t\t\t\t/* Except for with skewX/Y, revert the axis-specific transform subproperties to their axis-free master\r\n\t\t\t\t\t\t properties so that they match up with SVG\'s accepted transform properties. */\r\n\t\t\t\t\t\tif (/^translate/i.test(transformName)) {\r\n\t\t\t\t\t\t\ttransformName = "translate";\r\n\t\t\t\t\t\t} else if (/^scale/i.test(transformName)) {\r\n\t\t\t\t\t\t\ttransformName = "scale";\r\n\t\t\t\t\t\t} else if (/^rotate/i.test(transformName)) {\r\n\t\t\t\t\t\t\ttransformName = "rotate";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Check that we haven\'t yet deleted the property from the SVGTransforms container. */\r\n\t\t\t\t\t\tif (SVGTransforms[transformName]) {\r\n\t\t\t\t\t\t\t/* Append the transform property in the SVG-supported transform format. As per the spec, surround the space-delimited values in parentheses. */\r\n\t\t\t\t\t\t\ttransformString += transformName + "(" + SVGTransforms[transformName].join(" ") + ")" + " ";\r\n\r\n\t\t\t\t\t\t\t/* After processing an SVG transform property, delete it from the SVGTransforms container so we don\'t\r\n\t\t\t\t\t\t\t re-insert the same master property if we encounter another one of its axis-specific properties. */\r\n\t\t\t\t\t\t\tdelete SVGTransforms[transformName];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar transformValue,\r\n\t\t\t\t\t\t\tperspective;\r\n\r\n\t\t\t\t\t/* Transform properties are stored as members of the transformCache object. Concatenate all the members into a string. */\r\n\t\t\t\t\t$.each(Data(element).transformCache, function(transformName) {\r\n\t\t\t\t\t\ttransformValue = Data(element).transformCache[transformName];\r\n\r\n\t\t\t\t\t\t/* Transform\'s perspective subproperty must be set first in order to take effect. Store it temporarily. */\r\n\t\t\t\t\t\tif (transformName === "transformPerspective") {\r\n\t\t\t\t\t\t\tperspective = transformValue;\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* IE9 only supports one rotation type, rotateZ, which it refers to as "rotate". */\r\n\t\t\t\t\t\tif (IE === 9 && transformName === "rotateZ") {\r\n\t\t\t\t\t\t\ttransformName = "rotate";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ttransformString += transformName + transformValue + " ";\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t/* If present, set the perspective subproperty first. */\r\n\t\t\t\t\tif (perspective) {\r\n\t\t\t\t\t\ttransformString = "perspective" + perspective + " " + transformString;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tCSS.setPropertyValue(element, "transform", transformString);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t/* Register hooks and normalizations. */\r\n\t\tCSS.Hooks.register();\r\n\t\tCSS.Normalizations.register();\r\n\r\n\t\t/* Allow hook setting in the same fashion as jQuery\'s $.css(). */\r\n\t\tVelocity.hook = function(elements, arg2, arg3) {\r\n\t\t\tvar value;\r\n\r\n\t\t\telements = sanitizeElements(elements);\r\n\r\n\t\t\t$.each(elements, function(i, element) {\r\n\t\t\t\t/* Initialize Velocity\'s per-element data cache if this element hasn\'t previously been animated. */\r\n\t\t\t\tif (Data(element) === undefined) {\r\n\t\t\t\t\tVelocity.init(element);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Get property value. If an element set was passed in, only return the value for the first element. */\r\n\t\t\t\tif (arg3 === undefined) {\r\n\t\t\t\t\tif (value === undefined) {\r\n\t\t\t\t\t\tvalue = CSS.getPropertyValue(element, arg2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/* Set property value. */\r\n\t\t\t\t} else {\r\n\t\t\t\t\t/* sPV returns an array of the normalized propertyName/propertyValue pair used to update the DOM. */\r\n\t\t\t\t\tvar adjustedSet = CSS.setPropertyValue(element, arg2, arg3);\r\n\r\n\t\t\t\t\t/* Transform properties don\'t automatically set. They have to be flushed to the DOM. */\r\n\t\t\t\t\tif (adjustedSet[0] === "transform") {\r\n\t\t\t\t\t\tVelocity.CSS.flushTransformCache(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvalue = adjustedSet;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn value;\r\n\t\t};\r\n\r\n\t\t/*****************\r\n\t\t Animation\r\n\t\t *****************/\r\n\r\n\t\tvar animate = function() {\r\n\t\t\tvar opts;\r\n\r\n\t\t\t/******************\r\n\t\t\t Call Chain\r\n\t\t\t ******************/\r\n\r\n\t\t\t/* Logic for determining what to return to the call stack when exiting out of Velocity. */\r\n\t\t\tfunction getChain() {\r\n\t\t\t\t/* If we are using the utility function, attempt to return this call\'s promise. If no promise library was detected,\r\n\t\t\t\t default to null instead of returning the targeted elements so that utility function\'s return value is standardized. */\r\n\t\t\t\tif (isUtility) {\r\n\t\t\t\t\treturn promiseData.promise || null;\r\n\t\t\t\t\t/* Otherwise, if we\'re using $.fn, return the jQuery-/Zepto-wrapped element set. */\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn elementsWrapped;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/*************************\r\n\t\t\t Arguments Assignment\r\n\t\t\t *************************/\r\n\r\n\t\t\t/* To allow for expressive CoffeeScript code, Velocity supports an alternative syntax in which "elements" (or "e"), "properties" (or "p"), and "options" (or "o")\r\n\t\t\t objects are defined on a container object that\'s passed in as Velocity\'s sole argument. */\r\n\t\t\t/* Note: Some browsers automatically populate arguments with a "properties" object. We detect it by checking for its default "names" property. */\r\n\t\t\tvar syntacticSugar = (arguments[0] && (arguments[0].p || (($.isPlainObject(arguments[0].properties) && !arguments[0].properties.names) || Type.isString(arguments[0].properties)))),\r\n\t\t\t\t\t/* Whether Velocity was called via the utility function (as opposed to on a jQuery/Zepto object). */\r\n\t\t\t\t\tisUtility,\r\n\t\t\t\t\t/* When Velocity is called via the utility function ($.Velocity()/Velocity()), elements are explicitly\r\n\t\t\t\t\t passed in as the first parameter. Thus, argument positioning varies. We normalize them here. */\r\n\t\t\t\t\telementsWrapped,\r\n\t\t\t\t\targumentIndex;\r\n\r\n\t\t\tvar elements,\r\n\t\t\t\t\tpropertiesMap,\r\n\t\t\t\t\toptions;\r\n\r\n\t\t\t/* Detect jQuery/Zepto elements being animated via the $.fn method. */\r\n\t\t\tif (Type.isWrapped(this)) {\r\n\t\t\t\tisUtility = false;\r\n\r\n\t\t\t\targumentIndex = 0;\r\n\t\t\t\telements = this;\r\n\t\t\t\telementsWrapped = this;\r\n\t\t\t\t/* Otherwise, raw elements are being animated via the utility function. */\r\n\t\t\t} else {\r\n\t\t\t\tisUtility = true;\r\n\r\n\t\t\t\targumentIndex = 1;\r\n\t\t\t\telements = syntacticSugar ? (arguments[0].elements || arguments[0].e) : arguments[0];\r\n\t\t\t}\r\n\r\n\t\t\t/***************\r\n\t\t\t Promises\r\n\t\t\t ***************/\r\n\r\n\t\t\tvar promiseData = {\r\n\t\t\t\tpromise: null,\r\n\t\t\t\tresolver: null,\r\n\t\t\t\trejecter: null\r\n\t\t\t};\r\n\r\n\t\t\t/* If this call was made via the utility function (which is the default method of invocation when jQuery/Zepto are not being used), and if\r\n\t\t\t promise support was detected, create a promise object for this call and store references to its resolver and rejecter methods. The resolve\r\n\t\t\t method is used when a call completes naturally or is prematurely stopped by the user. In both cases, completeCall() handles the associated\r\n\t\t\t call cleanup and promise resolving logic. The reject method is used when an invalid set of arguments is passed into a Velocity call. */\r\n\t\t\t/* Note: Velocity employs a call-based queueing architecture, which means that stopping an animating element actually stops the full call that\r\n\t\t\t triggered it -- not that one element exclusively. Similarly, there is one promise per call, and all elements targeted by a Velocity call are\r\n\t\t\t grouped together for the purposes of resolving and rejecting a promise. */\r\n\t\t\tif (isUtility && Velocity.Promise) {\r\n\t\t\t\tpromiseData.promise = new Velocity.Promise(function(resolve, reject) {\r\n\t\t\t\t\tpromiseData.resolver = resolve;\r\n\t\t\t\t\tpromiseData.rejecter = reject;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (syntacticSugar) {\r\n\t\t\t\tpropertiesMap = arguments[0].properties || arguments[0].p;\r\n\t\t\t\toptions = arguments[0].options || arguments[0].o;\r\n\t\t\t} else {\r\n\t\t\t\tpropertiesMap = arguments[argumentIndex];\r\n\t\t\t\toptions = arguments[argumentIndex + 1];\r\n\t\t\t}\r\n\r\n\t\t\telements = sanitizeElements(elements);\r\n\r\n\t\t\tif (!elements) {\r\n\t\t\t\tif (promiseData.promise) {\r\n\t\t\t\t\tif (!propertiesMap || !options || options.promiseRejectEmpty !== false) {\r\n\t\t\t\t\t\tpromiseData.rejecter();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpromiseData.resolver();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t/* The length of the element set (in the form of a nodeList or an array of elements) is defaulted to 1 in case a\r\n\t\t\t single raw DOM element is passed in (which doesn\'t contain a length property). */\r\n\t\t\tvar elementsLength = elements.length,\r\n\t\t\t\t\telementsIndex = 0;\r\n\r\n\t\t\t/***************************\r\n\t\t\t Argument Overloading\r\n\t\t\t ***************************/\r\n\r\n\t\t\t/* Support is included for jQuery\'s argument overloading: $.animate(propertyMap [, duration] [, easing] [, complete]).\r\n\t\t\t Overloading is detected by checking for the absence of an object being passed into options. */\r\n\t\t\t/* Note: The stop/finish/pause/resume actions do not accept animation options, and are therefore excluded from this check. */\r\n\t\t\tif (!/^(stop|finish|finishAll|pause|resume)$/i.test(propertiesMap) && !$.isPlainObject(options)) {\r\n\t\t\t\t/* The utility function shifts all arguments one position to the right, so we adjust for that offset. */\r\n\t\t\t\tvar startingArgumentPosition = argumentIndex + 1;\r\n\r\n\t\t\t\toptions = {};\r\n\r\n\t\t\t\t/* Iterate through all options arguments */\r\n\t\t\t\tfor (var i = startingArgumentPosition; i < arguments.length; i++) {\r\n\t\t\t\t\t/* Treat a number as a duration. Parse it out. */\r\n\t\t\t\t\t/* Note: The following RegEx will return true if passed an array with a number as its first item.\r\n\t\t\t\t\t Thus, arrays are skipped from this check. */\r\n\t\t\t\t\tif (!Type.isArray(arguments[i]) && (/^(fast|normal|slow)$/i.test(arguments[i]) || /^\\d/.test(arguments[i]))) {\r\n\t\t\t\t\t\toptions.duration = arguments[i];\r\n\t\t\t\t\t\t/* Treat strings and arrays as easings. */\r\n\t\t\t\t\t} else if (Type.isString(arguments[i]) || Type.isArray(arguments[i])) {\r\n\t\t\t\t\t\toptions.easing = arguments[i];\r\n\t\t\t\t\t\t/* Treat a function as a complete callback. */\r\n\t\t\t\t\t} else if (Type.isFunction(arguments[i])) {\r\n\t\t\t\t\t\toptions.complete = arguments[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/*********************\r\n\t\t\t Action Detection\r\n\t\t\t *********************/\r\n\r\n\t\t\t/* Velocity\'s behavior is categorized into "actions": Elements can either be specially scrolled into view,\r\n\t\t\t or they can be started, stopped, paused, resumed, or reversed . If a literal or referenced properties map is passed in as Velocity\'s\r\n\t\t\t first argument, the associated action is "start". Alternatively, "scroll", "reverse", "pause", "resume" or "stop" can be passed in \r\n\t\t\t instead of a properties map. */\r\n\t\t\tvar action;\r\n\r\n\t\t\tswitch (propertiesMap) {\r\n\t\t\t\tcase "scroll":\r\n\t\t\t\t\taction = "scroll";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase "reverse":\r\n\t\t\t\t\taction = "reverse";\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase "pause":\r\n\r\n\t\t\t\t\t/*******************\r\n\t\t\t\t\t Action: Pause\r\n\t\t\t\t\t *******************/\r\n\r\n\t\t\t\t\tvar currentTime = (new Date()).getTime();\r\n\r\n\t\t\t\t\t/* Handle delay timers */\r\n\t\t\t\t\t$.each(elements, function(i, element) {\r\n\t\t\t\t\t\tpauseDelayOnElement(element, currentTime);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t/* Pause and Resume are call-wide (not on a per element basis). Thus, calling pause or resume on a \r\n\t\t\t\t\t single element will cause any calls that containt tweens for that element to be paused/resumed\r\n\t\t\t\t\t as well. */\r\n\r\n\t\t\t\t\t/* Iterate through all calls and pause any that contain any of our elements */\r\n\t\t\t\t\t$.each(Velocity.State.calls, function(i, activeCall) {\r\n\r\n\t\t\t\t\t\tvar found = false;\r\n\t\t\t\t\t\t/* Inactive calls are set to false by the logic inside completeCall(). Skip them. */\r\n\t\t\t\t\t\tif (activeCall) {\r\n\t\t\t\t\t\t\t/* Iterate through the active call\'s targeted elements. */\r\n\t\t\t\t\t\t\t$.each(activeCall[1], function(k, activeElement) {\r\n\t\t\t\t\t\t\t\tvar queueName = (options === undefined) ? "" : options;\r\n\r\n\t\t\t\t\t\t\t\tif (queueName !== true && (activeCall[2].queue !== queueName) && !(options === undefined && activeCall[2].queue === false)) {\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t/* Iterate through the calls targeted by the stop command. */\r\n\t\t\t\t\t\t\t\t$.each(elements, function(l, element) {\r\n\t\t\t\t\t\t\t\t\t/* Check that this call was applied to the target element. */\r\n\t\t\t\t\t\t\t\t\tif (element === activeElement) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t/* Set call to paused */\r\n\t\t\t\t\t\t\t\t\t\tactiveCall[5] = {\r\n\t\t\t\t\t\t\t\t\t\t\tresume: false\r\n\t\t\t\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\t\t\t\t/* Once we match an element, we can bounce out to the next call entirely */\r\n\t\t\t\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t/* Proceed to check next call if we have already matched */\r\n\t\t\t\t\t\t\t\tif (found) {\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t/* Since pause creates no new tweens, exit out of Velocity. */\r\n\t\t\t\t\treturn getChain();\r\n\r\n\t\t\t\tcase "resume":\r\n\r\n\t\t\t\t\t/*******************\r\n\t\t\t\t\t Action: Resume\r\n\t\t\t\t\t *******************/\r\n\r\n\t\t\t\t\t/* Handle delay timers */\r\n\t\t\t\t\t$.each(elements, function(i, element) {\r\n\t\t\t\t\t\tresumeDelayOnElement(element, currentTime);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t/* Pause and Resume are call-wide (not on a per elemnt basis). Thus, calling pause or resume on a \r\n\t\t\t\t\t single element will cause any calls that containt tweens for that element to be paused/resumed\r\n\t\t\t\t\t as well. */\r\n\r\n\t\t\t\t\t/* Iterate through all calls and pause any that contain any of our elements */\r\n\t\t\t\t\t$.each(Velocity.State.calls, function(i, activeCall) {\r\n\t\t\t\t\t\tvar found = false;\r\n\t\t\t\t\t\t/* Inactive calls are set to false by the logic inside completeCall(). Skip them. */\r\n\t\t\t\t\t\tif (activeCall) {\r\n\t\t\t\t\t\t\t/* Iterate through the active call\'s targeted elements. */\r\n\t\t\t\t\t\t\t$.each(activeCall[1], function(k, activeElement) {\r\n\t\t\t\t\t\t\t\tvar queueName = (options === undefined) ? "" : options;\r\n\r\n\t\t\t\t\t\t\t\tif (queueName !== true && (activeCall[2].queue !== queueName) && !(options === undefined && activeCall[2].queue === false)) {\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t/* Skip any calls that have never been paused */\r\n\t\t\t\t\t\t\t\tif (!activeCall[5]) {\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t/* Iterate through the calls targeted by the stop command. */\r\n\t\t\t\t\t\t\t\t$.each(elements, function(l, element) {\r\n\t\t\t\t\t\t\t\t\t/* Check that this call was applied to the target element. */\r\n\t\t\t\t\t\t\t\t\tif (element === activeElement) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t/* Flag a pause object to be resumed, which will occur during the next tick. In\r\n\t\t\t\t\t\t\t\t\t\t addition, the pause object will at that time be deleted */\r\n\t\t\t\t\t\t\t\t\t\tactiveCall[5].resume = true;\r\n\r\n\t\t\t\t\t\t\t\t\t\t/* Once we match an element, we can bounce out to the next call entirely */\r\n\t\t\t\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t/* Proceed to check next call if we have already matched */\r\n\t\t\t\t\t\t\t\tif (found) {\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t/* Since resume creates no new tweens, exit out of Velocity. */\r\n\t\t\t\t\treturn getChain();\r\n\r\n\t\t\t\tcase "finish":\r\n\t\t\t\tcase "finishAll":\r\n\t\t\t\tcase "stop":\r\n\t\t\t\t\t/*******************\r\n\t\t\t\t\t Action: Stop\r\n\t\t\t\t\t *******************/\r\n\r\n\t\t\t\t\t/* Clear the currently-active delay on each targeted element. */\r\n\t\t\t\t\t$.each(elements, function(i, element) {\r\n\t\t\t\t\t\tif (Data(element) && Data(element).delayTimer) {\r\n\t\t\t\t\t\t\t/* Stop the timer from triggering its cached next() function. */\r\n\t\t\t\t\t\t\tclearTimeout(Data(element).delayTimer.setTimeout);\r\n\r\n\t\t\t\t\t\t\t/* Manually call the next() function so that the subsequent queue items can progress. */\r\n\t\t\t\t\t\t\tif (Data(element).delayTimer.next) {\r\n\t\t\t\t\t\t\t\tData(element).delayTimer.next();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tdelete Data(element).delayTimer;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* If we want to finish everything in the queue, we have to iterate through it\r\n\t\t\t\t\t\t and call each function. This will make them active calls below, which will\r\n\t\t\t\t\t\t cause them to be applied via the duration setting. */\r\n\t\t\t\t\t\tif (propertiesMap === "finishAll" && (options === true || Type.isString(options))) {\r\n\t\t\t\t\t\t\t/* Iterate through the items in the element\'s queue. */\r\n\t\t\t\t\t\t\t$.each($.queue(element, Type.isString(options) ? options : ""), function(_, item) {\r\n\t\t\t\t\t\t\t\t/* The queue array can contain an "inprogress" string, which we skip. */\r\n\t\t\t\t\t\t\t\tif (Type.isFunction(item)) {\r\n\t\t\t\t\t\t\t\t\titem();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t/* Clearing the $.queue() array is achieved by resetting it to []. */\r\n\t\t\t\t\t\t\t$.queue(element, Type.isString(options) ? options : "", []);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tvar callsToStop = [];\r\n\r\n\t\t\t\t\t/* When the stop action is triggered, the elements\' currently active call is immediately stopped. The active call might have\r\n\t\t\t\t\t been applied to multiple elements, in which case all of the call\'s elements will be stopped. When an element\r\n\t\t\t\t\t is stopped, the next item in its animation queue is immediately triggered. */\r\n\t\t\t\t\t/* An additional argument may be passed in to clear an element\'s remaining queued calls. Either true (which defaults to the "fx" queue)\r\n\t\t\t\t\t or a custom queue string can be passed in. */\r\n\t\t\t\t\t/* Note: The stop command runs prior to Velocity\'s Queueing phase since its behavior is intended to take effect *immediately*,\r\n\t\t\t\t\t regardless of the element\'s current queue state. */\r\n\r\n\t\t\t\t\t/* Iterate through every active call. */\r\n\t\t\t\t\t$.each(Velocity.State.calls, function(i, activeCall) {\r\n\t\t\t\t\t\t/* Inactive calls are set to false by the logic inside completeCall(). Skip them. */\r\n\t\t\t\t\t\tif (activeCall) {\r\n\t\t\t\t\t\t\t/* Iterate through the active call\'s targeted elements. */\r\n\t\t\t\t\t\t\t$.each(activeCall[1], function(k, activeElement) {\r\n\t\t\t\t\t\t\t\t/* If true was passed in as a secondary argument, clear absolutely all calls on this element. Otherwise, only\r\n\t\t\t\t\t\t\t\t clear calls associated with the relevant queue. */\r\n\t\t\t\t\t\t\t\t/* Call stopping logic works as follows:\r\n\t\t\t\t\t\t\t\t - options === true --\x3e stop current default queue calls (and queue:false calls), including remaining queued ones.\r\n\t\t\t\t\t\t\t\t - options === undefined --\x3e stop current queue:"" call and all queue:false calls.\r\n\t\t\t\t\t\t\t\t - options === false --\x3e stop only queue:false calls.\r\n\t\t\t\t\t\t\t\t - options === "custom" --\x3e stop current queue:"custom" call, including remaining queued ones (there is no functionality to only clear the currently-running queue:"custom" call). */\r\n\t\t\t\t\t\t\t\tvar queueName = (options === undefined) ? "" : options;\r\n\r\n\t\t\t\t\t\t\t\tif (queueName !== true && (activeCall[2].queue !== queueName) && !(options === undefined && activeCall[2].queue === false)) {\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t/* Iterate through the calls targeted by the stop command. */\r\n\t\t\t\t\t\t\t\t$.each(elements, function(l, element) {\r\n\t\t\t\t\t\t\t\t\t/* Check that this call was applied to the target element. */\r\n\t\t\t\t\t\t\t\t\tif (element === activeElement) {\r\n\t\t\t\t\t\t\t\t\t\t/* Optionally clear the remaining queued calls. If we\'re doing "finishAll" this won\'t find anything,\r\n\t\t\t\t\t\t\t\t\t\t due to the queue-clearing above. */\r\n\t\t\t\t\t\t\t\t\t\tif (options === true || Type.isString(options)) {\r\n\t\t\t\t\t\t\t\t\t\t\t/* Iterate through the items in the element\'s queue. */\r\n\t\t\t\t\t\t\t\t\t\t\t$.each($.queue(element, Type.isString(options) ? options : ""), function(_, item) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t/* The queue array can contain an "inprogress" string, which we skip. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (Type.isFunction(item)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/* Pass the item\'s callback a flag indicating that we want to abort from the queue call.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t (Specifically, the queue will resolve the call\'s associated promise then abort.) */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\titem(null, true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t/* Clearing the $.queue() array is achieved by resetting it to []. */\r\n\t\t\t\t\t\t\t\t\t\t\t$.queue(element, Type.isString(options) ? options : "", []);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (propertiesMap === "stop") {\r\n\t\t\t\t\t\t\t\t\t\t\t/* Since "reverse" uses cached start values (the previous call\'s endValues), these values must be\r\n\t\t\t\t\t\t\t\t\t\t\t changed to reflect the final value that the elements were actually tweened to. */\r\n\t\t\t\t\t\t\t\t\t\t\t/* Note: If only queue:false/queue:"custom" animations are currently running on an element, it won\'t have a tweensContainer\r\n\t\t\t\t\t\t\t\t\t\t\t object. Also, queue:false/queue:"custom" animations can\'t be reversed. */\r\n\t\t\t\t\t\t\t\t\t\t\tvar data = Data(element);\r\n\t\t\t\t\t\t\t\t\t\t\tif (data && data.tweensContainer && (queueName === true || queueName === "")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t$.each(data.tweensContainer, function(m, activeTween) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tactiveTween.endValue = activeTween.currentValue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tcallsToStop.push(i);\r\n\t\t\t\t\t\t\t\t\t\t} else if (propertiesMap === "finish" || propertiesMap === "finishAll") {\r\n\t\t\t\t\t\t\t\t\t\t\t/* To get active tweens to finish immediately, we forcefully shorten their durations to 1ms so that\r\n\t\t\t\t\t\t\t\t\t\t\t they finish upon the next rAf tick then proceed with normal call completion logic. */\r\n\t\t\t\t\t\t\t\t\t\t\tactiveCall[2].duration = 1;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t/* Prematurely call completeCall() on each matched active call. Pass an additional flag for "stop" to indicate\r\n\t\t\t\t\t that the complete callback and display:none setting should be skipped since we\'re completing prematurely. */\r\n\t\t\t\t\tif (propertiesMap === "stop") {\r\n\t\t\t\t\t\t$.each(callsToStop, function(i, j) {\r\n\t\t\t\t\t\t\tcompleteCall(j, true);\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif (promiseData.promise) {\r\n\t\t\t\t\t\t\t/* Immediately resolve the promise associated with this stop call since stop runs synchronously. */\r\n\t\t\t\t\t\t\tpromiseData.resolver(elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* Since we\'re stopping, and not proceeding with queueing, exit out of Velocity. */\r\n\t\t\t\t\treturn getChain();\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t/* Treat a non-empty plain object as a literal properties map. */\r\n\t\t\t\t\tif ($.isPlainObject(propertiesMap) && !Type.isEmptyObject(propertiesMap)) {\r\n\t\t\t\t\t\taction = "start";\r\n\r\n\t\t\t\t\t\t/****************\r\n\t\t\t\t\t\t Redirects\r\n\t\t\t\t\t\t ****************/\r\n\r\n\t\t\t\t\t\t/* Check if a string matches a registered redirect (see Redirects above). */\r\n\t\t\t\t\t} else if (Type.isString(propertiesMap) && Velocity.Redirects[propertiesMap]) {\r\n\t\t\t\t\t\topts = $.extend({}, options);\r\n\r\n\t\t\t\t\t\tvar durationOriginal = opts.duration,\r\n\t\t\t\t\t\t\t\tdelayOriginal = opts.delay || 0;\r\n\r\n\t\t\t\t\t\t/* If the backwards option was passed in, reverse the element set so that elements animate from the last to the first. */\r\n\t\t\t\t\t\tif (opts.backwards === true) {\r\n\t\t\t\t\t\t\telements = $.extend(true, [], elements).reverse();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Individually trigger the redirect for each element in the set to prevent users from having to handle iteration logic in their redirect. */\r\n\t\t\t\t\t\t$.each(elements, function(elementIndex, element) {\r\n\t\t\t\t\t\t\t/* If the stagger option was passed in, successively delay each element by the stagger value (in ms). Retain the original delay value. */\r\n\t\t\t\t\t\t\tif (parseFloat(opts.stagger)) {\r\n\t\t\t\t\t\t\t\topts.delay = delayOriginal + (parseFloat(opts.stagger) * elementIndex);\r\n\t\t\t\t\t\t\t} else if (Type.isFunction(opts.stagger)) {\r\n\t\t\t\t\t\t\t\topts.delay = delayOriginal + opts.stagger.call(element, elementIndex, elementsLength);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* If the drag option was passed in, successively increase/decrease (depending on the presense of opts.backwards)\r\n\t\t\t\t\t\t\t the duration of each element\'s animation, using floors to prevent producing very short durations. */\r\n\t\t\t\t\t\t\tif (opts.drag) {\r\n\t\t\t\t\t\t\t\t/* Default the duration of UI pack effects (callouts and transitions) to 1000ms instead of the usual default duration of 400ms. */\r\n\t\t\t\t\t\t\t\topts.duration = parseFloat(durationOriginal) || (/^(callout|transition)/.test(propertiesMap) ? 1000 : DURATION_DEFAULT);\r\n\r\n\t\t\t\t\t\t\t\t/* For each element, take the greater duration of: A) animation completion percentage relative to the original duration,\r\n\t\t\t\t\t\t\t\t B) 75% of the original duration, or C) a 200ms fallback (in case duration is already set to a low value).\r\n\t\t\t\t\t\t\t\t The end result is a baseline of 75% of the redirect\'s duration that increases/decreases as the end of the element set is approached. */\r\n\t\t\t\t\t\t\t\topts.duration = Math.max(opts.duration * (opts.backwards ? 1 - elementIndex / elementsLength : (elementIndex + 1) / elementsLength), opts.duration * 0.75, 200);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Pass in the call\'s opts object so that the redirect can optionally extend it. It defaults to an empty object instead of null to\r\n\t\t\t\t\t\t\t reduce the opts checking logic required inside the redirect. */\r\n\t\t\t\t\t\t\tVelocity.Redirects[propertiesMap].call(element, element, opts || {}, elementIndex, elementsLength, elements, promiseData.promise ? promiseData : undefined);\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t/* Since the animation logic resides within the redirect\'s own code, abort the remainder of this call.\r\n\t\t\t\t\t\t (The performance overhead up to this point is virtually non-existant.) */\r\n\t\t\t\t\t\t/* Note: The jQuery call chain is kept intact by returning the complete element set. */\r\n\t\t\t\t\t\treturn getChain();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar abortError = "Velocity: First argument (" + propertiesMap + ") was not a property map, a known action, or a registered redirect. Aborting.";\r\n\r\n\t\t\t\t\t\tif (promiseData.promise) {\r\n\t\t\t\t\t\t\tpromiseData.rejecter(new Error(abortError));\r\n\t\t\t\t\t\t} else if (window.console) {\r\n\t\t\t\t\t\t\tconsole.log(abortError);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn getChain();\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/**************************\r\n\t\t\t Call-Wide Variables\r\n\t\t\t **************************/\r\n\r\n\t\t\t/* A container for CSS unit conversion ratios (e.g. %, rem, and em ==> px) that is used to cache ratios across all elements\r\n\t\t\t being animated in a single Velocity call. Calculating unit ratios necessitates DOM querying and updating, and is therefore\r\n\t\t\t avoided (via caching) wherever possible. This container is call-wide instead of page-wide to avoid the risk of using stale\r\n\t\t\t conversion metrics across Velocity animations that are not immediately consecutively chained. */\r\n\t\t\tvar callUnitConversionData = {\r\n\t\t\t\tlastParent: null,\r\n\t\t\t\tlastPosition: null,\r\n\t\t\t\tlastFontSize: null,\r\n\t\t\t\tlastPercentToPxWidth: null,\r\n\t\t\t\tlastPercentToPxHeight: null,\r\n\t\t\t\tlastEmToPx: null,\r\n\t\t\t\tremToPx: null,\r\n\t\t\t\tvwToPx: null,\r\n\t\t\t\tvhToPx: null\r\n\t\t\t};\r\n\r\n\t\t\t/* A container for all the ensuing tween data and metadata associated with this call. This container gets pushed to the page-wide\r\n\t\t\t Velocity.State.calls array that is processed during animation ticking. */\r\n\t\t\tvar call = [];\r\n\r\n\t\t\t/************************\r\n\t\t\t Element Processing\r\n\t\t\t ************************/\r\n\r\n\t\t\t/* Element processing consists of three parts -- data processing that cannot go stale and data processing that *can* go stale (i.e. third-party style modifications):\r\n\t\t\t 1) Pre-Queueing: Element-wide variables, including the element\'s data storage, are instantiated. Call options are prepared. If triggered, the Stop action is executed.\r\n\t\t\t 2) Queueing: The logic that runs once this call has reached its point of execution in the element\'s $.queue() stack. Most logic is placed here to avoid risking it becoming stale.\r\n\t\t\t 3) Pushing: Consolidation of the tween data followed by its push onto the global in-progress calls container.\r\n\t\t\t `elementArrayIndex` allows passing index of the element in the original array to value functions.\r\n\t\t\t If `elementsIndex` were used instead the index would be determined by the elements\' per-element queue.\r\n\t\t\t */\r\n\t\t\tfunction processElement(element, elementArrayIndex) {\r\n\r\n\t\t\t\t/*************************\r\n\t\t\t\t Part I: Pre-Queueing\r\n\t\t\t\t *************************/\r\n\r\n\t\t\t\t/***************************\r\n\t\t\t\t Element-Wide Variables\r\n\t\t\t\t ***************************/\r\n\r\n\t\t\t\tvar /* The runtime opts object is the extension of the current call\'s options and Velocity\'s page-wide option defaults. */\r\n\t\t\t\t\t\topts = $.extend({}, Velocity.defaults, options),\r\n\t\t\t\t\t\t/* A container for the processed data associated with each property in the propertyMap.\r\n\t\t\t\t\t\t (Each property in the map produces its own "tween".) */\r\n\t\t\t\t\t\ttweensContainer = {},\r\n\t\t\t\t\t\telementUnitConversionData;\r\n\r\n\t\t\t\t/******************\r\n\t\t\t\t Element Init\r\n\t\t\t\t ******************/\r\n\r\n\t\t\t\tif (Data(element) === undefined) {\r\n\t\t\t\t\tVelocity.init(element);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/******************\r\n\t\t\t\t Option: Delay\r\n\t\t\t\t ******************/\r\n\r\n\t\t\t\t/* Since queue:false doesn\'t respect the item\'s existing queue, we avoid injecting its delay here (it\'s set later on). */\r\n\t\t\t\t/* Note: Velocity rolls its own delay function since jQuery doesn\'t have a utility alias for $.fn.delay()\r\n\t\t\t\t (and thus requires jQuery element creation, which we avoid since its overhead includes DOM querying). */\r\n\t\t\t\tif (parseFloat(opts.delay) && opts.queue !== false) {\r\n\t\t\t\t\t$.queue(element, opts.queue, function(next, clearQueue) {\r\n\t\t\t\t\t\tif (clearQueue === true) {\r\n\t\t\t\t\t\t\t/* Do not continue with animation queueing. */\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* This is a flag used to indicate to the upcoming completeCall() function that this queue entry was initiated by Velocity. See completeCall() for further details. */\r\n\t\t\t\t\t\tVelocity.velocityQueueEntryFlag = true;\r\n\r\n\t\t\t\t\t\t/* The ensuing queue item (which is assigned to the "next" argument that $.queue() automatically passes in) will be triggered after a setTimeout delay.\r\n\t\t\t\t\t\t The setTimeout is stored so that it can be subjected to clearTimeout() if this animation is prematurely stopped via Velocity\'s "stop" command, and\r\n\t\t\t\t\t\t delayBegin/delayTime is used to ensure we can "pause" and "resume" a tween that is still mid-delay. */\r\n\r\n\t\t\t\t\t\t/* Temporarily store delayed elements to facilite access for global pause/resume */\r\n\t\t\t\t\t\tvar callIndex = Velocity.State.delayedElements.count++;\r\n\t\t\t\t\t\tVelocity.State.delayedElements[callIndex] = element;\r\n\r\n\t\t\t\t\t\tvar delayComplete = (function(index) {\r\n\t\t\t\t\t\t\treturn function() {\r\n\t\t\t\t\t\t\t\t/* Clear the temporary element */\r\n\t\t\t\t\t\t\t\tVelocity.State.delayedElements[index] = false;\r\n\r\n\t\t\t\t\t\t\t\t/* Finally, issue the call */\r\n\t\t\t\t\t\t\t\tnext();\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t})(callIndex);\r\n\r\n\r\n\t\t\t\t\t\tData(element).delayBegin = (new Date()).getTime();\r\n\t\t\t\t\t\tData(element).delay = parseFloat(opts.delay);\r\n\t\t\t\t\t\tData(element).delayTimer = {\r\n\t\t\t\t\t\t\tsetTimeout: setTimeout(next, parseFloat(opts.delay)),\r\n\t\t\t\t\t\t\tnext: delayComplete\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*********************\r\n\t\t\t\t Option: Duration\r\n\t\t\t\t *********************/\r\n\r\n\t\t\t\t/* Support for jQuery\'s named durations. */\r\n\t\t\t\tswitch (opts.duration.toString().toLowerCase()) {\r\n\t\t\t\t\tcase "fast":\r\n\t\t\t\t\t\topts.duration = 200;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase "normal":\r\n\t\t\t\t\t\topts.duration = DURATION_DEFAULT;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase "slow":\r\n\t\t\t\t\t\topts.duration = 600;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t/* Remove the potential "ms" suffix and default to 1 if the user is attempting to set a duration of 0 (in order to produce an immediate style change). */\r\n\t\t\t\t\t\topts.duration = parseFloat(opts.duration) || 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/************************\r\n\t\t\t\t Global Option: Mock\r\n\t\t\t\t ************************/\r\n\r\n\t\t\t\tif (Velocity.mock !== false) {\r\n\t\t\t\t\t/* In mock mode, all animations are forced to 1ms so that they occur immediately upon the next rAF tick.\r\n\t\t\t\t\t Alternatively, a multiplier can be passed in to time remap all delays and durations. */\r\n\t\t\t\t\tif (Velocity.mock === true) {\r\n\t\t\t\t\t\topts.duration = opts.delay = 1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\topts.duration *= parseFloat(Velocity.mock) || 1;\r\n\t\t\t\t\t\topts.delay *= parseFloat(Velocity.mock) || 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*******************\r\n\t\t\t\t Option: Easing\r\n\t\t\t\t *******************/\r\n\r\n\t\t\t\topts.easing = getEasing(opts.easing, opts.duration);\r\n\r\n\t\t\t\t/**********************\r\n\t\t\t\t Option: Callbacks\r\n\t\t\t\t **********************/\r\n\r\n\t\t\t\t/* Callbacks must functions. Otherwise, default to null. */\r\n\t\t\t\tif (opts.begin && !Type.isFunction(opts.begin)) {\r\n\t\t\t\t\topts.begin = null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (opts.progress && !Type.isFunction(opts.progress)) {\r\n\t\t\t\t\topts.progress = null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (opts.complete && !Type.isFunction(opts.complete)) {\r\n\t\t\t\t\topts.complete = null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*********************************\r\n\t\t\t\t Option: Display & Visibility\r\n\t\t\t\t *********************************/\r\n\r\n\t\t\t\t/* Refer to Velocity\'s documentation (VelocityJS.org/#displayAndVisibility) for a description of the display and visibility options\' behavior. */\r\n\t\t\t\t/* Note: We strictly check for undefined instead of falsiness because display accepts an empty string value. */\r\n\t\t\t\tif (opts.display !== undefined && opts.display !== null) {\r\n\t\t\t\t\topts.display = opts.display.toString().toLowerCase();\r\n\r\n\t\t\t\t\t/* Users can pass in a special "auto" value to instruct Velocity to set the element to its default display value. */\r\n\t\t\t\t\tif (opts.display === "auto") {\r\n\t\t\t\t\t\topts.display = Velocity.CSS.Values.getDisplayType(element);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (opts.visibility !== undefined && opts.visibility !== null) {\r\n\t\t\t\t\topts.visibility = opts.visibility.toString().toLowerCase();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/**********************\r\n\t\t\t\t Option: mobileHA\r\n\t\t\t\t **********************/\r\n\r\n\t\t\t\t/* When set to true, and if this is a mobile device, mobileHA automatically enables hardware acceleration (via a null transform hack)\r\n\t\t\t\t on animating elements. HA is removed from the element at the completion of its animation. */\r\n\t\t\t\t/* Note: Android Gingerbread doesn\'t support HA. If a null transform hack (mobileHA) is in fact set, it will prevent other tranform subproperties from taking effect. */\r\n\t\t\t\t/* Note: You can read more about the use of mobileHA in Velocity\'s documentation: VelocityJS.org/#mobileHA. */\r\n\t\t\t\topts.mobileHA = (opts.mobileHA && Velocity.State.isMobile && !Velocity.State.isGingerbread);\r\n\r\n\t\t\t\t/***********************\r\n\t\t\t\t Part II: Queueing\r\n\t\t\t\t ***********************/\r\n\r\n\t\t\t\t/* When a set of elements is targeted by a Velocity call, the set is broken up and each element has the current Velocity call individually queued onto it.\r\n\t\t\t\t In this way, each element\'s existing queue is respected; some elements may already be animating and accordingly should not have this current Velocity call triggered immediately. */\r\n\t\t\t\t/* In each queue, tween data is processed for each animating property then pushed onto the call-wide calls array. When the last element in the set has had its tweens processed,\r\n\t\t\t\t the call array is pushed to Velocity.State.calls for live processing by the requestAnimationFrame tick. */\r\n\t\t\t\tfunction buildQueue(next) {\r\n\t\t\t\t\tvar data, lastTweensContainer;\r\n\r\n\t\t\t\t\t/*******************\r\n\t\t\t\t\t Option: Begin\r\n\t\t\t\t\t *******************/\r\n\r\n\t\t\t\t\t/* The begin callback is fired once per call -- not once per elemenet -- and is passed the full raw DOM element set as both its context and its first argument. */\r\n\t\t\t\t\tif (opts.begin && elementsIndex === 0) {\r\n\t\t\t\t\t\t/* We throw callbacks in a setTimeout so that thrown errors don\'t halt the execution of Velocity itself. */\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\topts.begin.call(elements, elements);\r\n\t\t\t\t\t\t} catch (error) {\r\n\t\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\t\tthrow error;\r\n\t\t\t\t\t\t\t}, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/*****************************************\r\n\t\t\t\t\t Tween Data Construction (for Scroll)\r\n\t\t\t\t\t *****************************************/\r\n\r\n\t\t\t\t\t/* Note: In order to be subjected to chaining and animation options, scroll\'s tweening is routed through Velocity as if it were a standard CSS property animation. */\r\n\t\t\t\t\tif (action === "scroll") {\r\n\t\t\t\t\t\t/* The scroll action uniquely takes an optional "offset" option -- specified in pixels -- that offsets the targeted scroll position. */\r\n\t\t\t\t\t\tvar scrollDirection = (/^x$/i.test(opts.axis) ? "Left" : "Top"),\r\n\t\t\t\t\t\t\t\tscrollOffset = parseFloat(opts.offset) || 0,\r\n\t\t\t\t\t\t\t\tscrollPositionCurrent,\r\n\t\t\t\t\t\t\t\tscrollPositionCurrentAlternate,\r\n\t\t\t\t\t\t\t\tscrollPositionEnd;\r\n\r\n\t\t\t\t\t\t/* Scroll also uniquely takes an optional "container" option, which indicates the parent element that should be scrolled --\r\n\t\t\t\t\t\t as opposed to the browser window itself. This is useful for scrolling toward an element that\'s inside an overflowing parent element. */\r\n\t\t\t\t\t\tif (opts.container) {\r\n\t\t\t\t\t\t\t/* Ensure that either a jQuery object or a raw DOM element was passed in. */\r\n\t\t\t\t\t\t\tif (Type.isWrapped(opts.container) || Type.isNode(opts.container)) {\r\n\t\t\t\t\t\t\t\t/* Extract the raw DOM element from the jQuery wrapper. */\r\n\t\t\t\t\t\t\t\topts.container = opts.container[0] || opts.container;\r\n\t\t\t\t\t\t\t\t/* Note: Unlike other properties in Velocity, the browser\'s scroll position is never cached since it so frequently changes\r\n\t\t\t\t\t\t\t\t (due to the user\'s natural interaction with the page). */\r\n\t\t\t\t\t\t\t\tscrollPositionCurrent = opts.container["scroll" + scrollDirection]; /* GET */\r\n\r\n\t\t\t\t\t\t\t\t/* $.position() values are relative to the container\'s currently viewable area (without taking into account the container\'s true dimensions\r\n\t\t\t\t\t\t\t\t -- say, for example, if the container was not overflowing). Thus, the scroll end value is the sum of the child element\'s position *and*\r\n\t\t\t\t\t\t\t\t the scroll container\'s current scroll position. */\r\n\t\t\t\t\t\t\t\tscrollPositionEnd = (scrollPositionCurrent + $(element).position()[scrollDirection.toLowerCase()]) + scrollOffset; /* GET */\r\n\t\t\t\t\t\t\t\t/* If a value other than a jQuery object or a raw DOM element was passed in, default to null so that this option is ignored. */\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\topts.container = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t/* If the window itself is being scrolled -- not a containing element -- perform a live scroll position lookup using\r\n\t\t\t\t\t\t\t the appropriate cached property names (which differ based on browser type). */\r\n\t\t\t\t\t\t\tscrollPositionCurrent = Velocity.State.scrollAnchor[Velocity.State["scrollProperty" + scrollDirection]]; /* GET */\r\n\t\t\t\t\t\t\t/* When scrolling the browser window, cache the alternate axis\'s current value since window.scrollTo() doesn\'t let us change only one value at a time. */\r\n\t\t\t\t\t\t\tscrollPositionCurrentAlternate = Velocity.State.scrollAnchor[Velocity.State["scrollProperty" + (scrollDirection === "Left" ? "Top" : "Left")]]; /* GET */\r\n\r\n\t\t\t\t\t\t\t/* Unlike $.position(), $.offset() values are relative to the browser window\'s true dimensions -- not merely its currently viewable area --\r\n\t\t\t\t\t\t\t and therefore end values do not need to be compounded onto current values. */\r\n\t\t\t\t\t\t\tscrollPositionEnd = $(element).offset()[scrollDirection.toLowerCase()] + scrollOffset; /* GET */\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Since there\'s only one format that scroll\'s associated tweensContainer can take, we create it manually. */\r\n\t\t\t\t\t\ttweensContainer = {\r\n\t\t\t\t\t\t\tscroll: {\r\n\t\t\t\t\t\t\t\trootPropertyValue: false,\r\n\t\t\t\t\t\t\t\tstartValue: scrollPositionCurrent,\r\n\t\t\t\t\t\t\t\tcurrentValue: scrollPositionCurrent,\r\n\t\t\t\t\t\t\t\tendValue: scrollPositionEnd,\r\n\t\t\t\t\t\t\t\tunitType: "",\r\n\t\t\t\t\t\t\t\teasing: opts.easing,\r\n\t\t\t\t\t\t\t\tscrollData: {\r\n\t\t\t\t\t\t\t\t\tcontainer: opts.container,\r\n\t\t\t\t\t\t\t\t\tdirection: scrollDirection,\r\n\t\t\t\t\t\t\t\t\talternateValue: scrollPositionCurrentAlternate\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\telement: element\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tif (Velocity.debug) {\r\n\t\t\t\t\t\t\tconsole.log("tweensContainer (scroll): ", tweensContainer.scroll, element);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/******************************************\r\n\t\t\t\t\t\t Tween Data Construction (for Reverse)\r\n\t\t\t\t\t\t ******************************************/\r\n\r\n\t\t\t\t\t\t/* Reverse acts like a "start" action in that a property map is animated toward. The only difference is\r\n\t\t\t\t\t\t that the property map used for reverse is the inverse of the map used in the previous call. Thus, we manipulate\r\n\t\t\t\t\t\t the previous call to construct our new map: use the previous map\'s end values as our new map\'s start values. Copy over all other data. */\r\n\t\t\t\t\t\t/* Note: Reverse can be directly called via the "reverse" parameter, or it can be indirectly triggered via the loop option. (Loops are composed of multiple reverses.) */\r\n\t\t\t\t\t\t/* Note: Reverse calls do not need to be consecutively chained onto a currently-animating element in order to operate on cached values;\r\n\t\t\t\t\t\t there is no harm to reverse being called on a potentially stale data cache since reverse\'s behavior is simply defined\r\n\t\t\t\t\t\t as reverting to the element\'s values as they were prior to the previous *Velocity* call. */\r\n\t\t\t\t\t} else if (action === "reverse") {\r\n\t\t\t\t\t\tdata = Data(element);\r\n\r\n\t\t\t\t\t\t/* Abort if there is no prior animation data to reverse to. */\r\n\t\t\t\t\t\tif (!data) {\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (!data.tweensContainer) {\r\n\t\t\t\t\t\t\t/* Dequeue the element so that this queue entry releases itself immediately, allowing subsequent queue entries to run. */\r\n\t\t\t\t\t\t\t$.dequeue(element, opts.queue);\r\n\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t/*********************\r\n\t\t\t\t\t\t\t Options Parsing\r\n\t\t\t\t\t\t\t *********************/\r\n\r\n\t\t\t\t\t\t\t/* If the element was hidden via the display option in the previous call,\r\n\t\t\t\t\t\t\t revert display to "auto" prior to reversal so that the element is visible again. */\r\n\t\t\t\t\t\t\tif (data.opts.display === "none") {\r\n\t\t\t\t\t\t\t\tdata.opts.display = "auto";\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (data.opts.visibility === "hidden") {\r\n\t\t\t\t\t\t\t\tdata.opts.visibility = "visible";\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* If the loop option was set in the previous call, disable it so that "reverse" calls aren\'t recursively generated.\r\n\t\t\t\t\t\t\t Further, remove the previous call\'s callback options; typically, users do not want these to be refired. */\r\n\t\t\t\t\t\t\tdata.opts.loop = false;\r\n\t\t\t\t\t\t\tdata.opts.begin = null;\r\n\t\t\t\t\t\t\tdata.opts.complete = null;\r\n\r\n\t\t\t\t\t\t\t/* Since we\'re extending an opts object that has already been extended with the defaults options object,\r\n\t\t\t\t\t\t\t we remove non-explicitly-defined properties that are auto-assigned values. */\r\n\t\t\t\t\t\t\tif (!options.easing) {\r\n\t\t\t\t\t\t\t\tdelete opts.easing;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (!options.duration) {\r\n\t\t\t\t\t\t\t\tdelete opts.duration;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* The opts object used for reversal is an extension of the options object optionally passed into this\r\n\t\t\t\t\t\t\t reverse call plus the options used in the previous Velocity call. */\r\n\t\t\t\t\t\t\topts = $.extend({}, data.opts, opts);\r\n\r\n\t\t\t\t\t\t\t/*************************************\r\n\t\t\t\t\t\t\t Tweens Container Reconstruction\r\n\t\t\t\t\t\t\t *************************************/\r\n\r\n\t\t\t\t\t\t\t/* Create a deepy copy (indicated via the true flag) of the previous call\'s tweensContainer. */\r\n\t\t\t\t\t\t\tlastTweensContainer = $.extend(true, {}, data ? data.tweensContainer : null);\r\n\r\n\t\t\t\t\t\t\t/* Manipulate the previous tweensContainer by replacing its end values and currentValues with its start values. */\r\n\t\t\t\t\t\t\tfor (var lastTween in lastTweensContainer) {\r\n\t\t\t\t\t\t\t\t/* In addition to tween data, tweensContainers contain an element property that we ignore here. */\r\n\t\t\t\t\t\t\t\tif (lastTweensContainer.hasOwnProperty(lastTween) && lastTween !== "element") {\r\n\t\t\t\t\t\t\t\t\tvar lastStartValue = lastTweensContainer[lastTween].startValue;\r\n\r\n\t\t\t\t\t\t\t\t\tlastTweensContainer[lastTween].startValue = lastTweensContainer[lastTween].currentValue = lastTweensContainer[lastTween].endValue;\r\n\t\t\t\t\t\t\t\t\tlastTweensContainer[lastTween].endValue = lastStartValue;\r\n\r\n\t\t\t\t\t\t\t\t\t/* Easing is the only option that embeds into the individual tween data (since it can be defined on a per-property basis).\r\n\t\t\t\t\t\t\t\t\t Accordingly, every property\'s easing value must be updated when an options object is passed in with a reverse call.\r\n\t\t\t\t\t\t\t\t\t The side effect of this extensibility is that all per-property easing values are forcefully reset to the new value. */\r\n\t\t\t\t\t\t\t\t\tif (!Type.isEmptyObject(options)) {\r\n\t\t\t\t\t\t\t\t\t\tlastTweensContainer[lastTween].easing = opts.easing;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif (Velocity.debug) {\r\n\t\t\t\t\t\t\t\t\t\tconsole.log("reverse tweensContainer (" + lastTween + "): " + JSON.stringify(lastTweensContainer[lastTween]), element);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\ttweensContainer = lastTweensContainer;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/*****************************************\r\n\t\t\t\t\t\t Tween Data Construction (for Start)\r\n\t\t\t\t\t\t *****************************************/\r\n\r\n\t\t\t\t\t} else if (action === "start") {\r\n\r\n\t\t\t\t\t\t/*************************\r\n\t\t\t\t\t\t Value Transferring\r\n\t\t\t\t\t\t *************************/\r\n\r\n\t\t\t\t\t\t/* If this queue entry follows a previous Velocity-initiated queue entry *and* if this entry was created\r\n\t\t\t\t\t\t while the element was in the process of being animated by Velocity, then this current call is safe to use\r\n\t\t\t\t\t\t the end values from the prior call as its start values. Velocity attempts to perform this value transfer\r\n\t\t\t\t\t\t process whenever possible in order to avoid requerying the DOM. */\r\n\t\t\t\t\t\t/* If values aren\'t transferred from a prior call and start values were not forcefed by the user (more on this below),\r\n\t\t\t\t\t\t then the DOM is queried for the element\'s current values as a last resort. */\r\n\t\t\t\t\t\t/* Note: Conversely, animation reversal (and looping) *always* perform inter-call value transfers; they never requery the DOM. */\r\n\r\n\t\t\t\t\t\tdata = Data(element);\r\n\r\n\t\t\t\t\t\t/* The per-element isAnimating flag is used to indicate whether it\'s safe (i.e. the data isn\'t stale)\r\n\t\t\t\t\t\t to transfer over end values to use as start values. If it\'s set to true and there is a previous\r\n\t\t\t\t\t\t Velocity call to pull values from, do so. */\r\n\t\t\t\t\t\tif (data && data.tweensContainer && data.isAnimating === true) {\r\n\t\t\t\t\t\t\tlastTweensContainer = data.tweensContainer;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/***************************\r\n\t\t\t\t\t\t Tween Data Calculation\r\n\t\t\t\t\t\t ***************************/\r\n\r\n\t\t\t\t\t\t/* This function parses property data and defaults endValue, easing, and startValue as appropriate. */\r\n\t\t\t\t\t\t/* Property map values can either take the form of 1) a single value representing the end value,\r\n\t\t\t\t\t\t or 2) an array in the form of [ endValue, [, easing] [, startValue] ].\r\n\t\t\t\t\t\t The optional third parameter is a forcefed startValue to be used instead of querying the DOM for\r\n\t\t\t\t\t\t the element\'s current value. Read Velocity\'s docmentation to learn more about forcefeeding: VelocityJS.org/#forcefeeding */\r\n\t\t\t\t\t\tvar parsePropertyValue = function(valueData, skipResolvingEasing) {\r\n\t\t\t\t\t\t\tvar endValue, easing, startValue;\r\n\r\n\t\t\t\t\t\t\t/* If we have a function as the main argument then resolve it first, in case it returns an array that needs to be split */\r\n\t\t\t\t\t\t\tif (Type.isFunction(valueData)) {\r\n\t\t\t\t\t\t\t\tvalueData = valueData.call(element, elementArrayIndex, elementsLength);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Handle the array format, which can be structured as one of three potential overloads:\r\n\t\t\t\t\t\t\t A) [ endValue, easing, startValue ], B) [ endValue, easing ], or C) [ endValue, startValue ] */\r\n\t\t\t\t\t\t\tif (Type.isArray(valueData)) {\r\n\t\t\t\t\t\t\t\t/* endValue is always the first item in the array. Don\'t bother validating endValue\'s value now\r\n\t\t\t\t\t\t\t\t since the ensuing property cycling logic does that. */\r\n\t\t\t\t\t\t\t\tendValue = valueData[0];\r\n\r\n\t\t\t\t\t\t\t\t/* Two-item array format: If the second item is a number, function, or hex string, treat it as a\r\n\t\t\t\t\t\t\t\t start value since easings can only be non-hex strings or arrays. */\r\n\t\t\t\t\t\t\t\tif ((!Type.isArray(valueData[1]) && /^[\\d-]/.test(valueData[1])) || Type.isFunction(valueData[1]) || CSS.RegEx.isHex.test(valueData[1])) {\r\n\t\t\t\t\t\t\t\t\tstartValue = valueData[1];\r\n\t\t\t\t\t\t\t\t\t/* Two or three-item array: If the second item is a non-hex string easing name or an array, treat it as an easing. */\r\n\t\t\t\t\t\t\t\t} else if ((Type.isString(valueData[1]) && !CSS.RegEx.isHex.test(valueData[1]) && Velocity.Easings[valueData[1]]) || Type.isArray(valueData[1])) {\r\n\t\t\t\t\t\t\t\t\teasing = skipResolvingEasing ? valueData[1] : getEasing(valueData[1], opts.duration);\r\n\r\n\t\t\t\t\t\t\t\t\t/* Don\'t bother validating startValue\'s value now since the ensuing property cycling logic inherently does that. */\r\n\t\t\t\t\t\t\t\t\tstartValue = valueData[2];\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tstartValue = valueData[1] || valueData[2];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t/* Handle the single-value format. */\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tendValue = valueData;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Default to the call\'s easing if a per-property easing type was not defined. */\r\n\t\t\t\t\t\t\tif (!skipResolvingEasing) {\r\n\t\t\t\t\t\t\t\teasing = easing || opts.easing;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* If functions were passed in as values, pass the function the current element as its context,\r\n\t\t\t\t\t\t\t plus the element\'s index and the element set\'s size as arguments. Then, assign the returned value. */\r\n\t\t\t\t\t\t\tif (Type.isFunction(endValue)) {\r\n\t\t\t\t\t\t\t\tendValue = endValue.call(element, elementArrayIndex, elementsLength);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (Type.isFunction(startValue)) {\r\n\t\t\t\t\t\t\t\tstartValue = startValue.call(element, elementArrayIndex, elementsLength);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Allow startValue to be left as undefined to indicate to the ensuing code that its value was not forcefed. */\r\n\t\t\t\t\t\t\treturn [endValue || 0, easing, startValue];\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\tvar fixPropertyValue = function(property, valueData) {\r\n\t\t\t\t\t\t\t/* In case this property is a hook, there are circumstances where we will intend to work on the hook\'s root property and not the hooked subproperty. */\r\n\t\t\t\t\t\t\tvar rootProperty = CSS.Hooks.getRoot(property),\r\n\t\t\t\t\t\t\t\t\trootPropertyValue = false,\r\n\t\t\t\t\t\t\t\t\t/* Parse out endValue, easing, and startValue from the property\'s data. */\r\n\t\t\t\t\t\t\t\t\tendValue = valueData[0],\r\n\t\t\t\t\t\t\t\t\teasing = valueData[1],\r\n\t\t\t\t\t\t\t\t\tstartValue = valueData[2],\r\n\t\t\t\t\t\t\t\t\tpattern;\r\n\r\n\t\t\t\t\t\t\t/**************************\r\n\t\t\t\t\t\t\t Start Value Sourcing\r\n\t\t\t\t\t\t\t **************************/\r\n\r\n\t\t\t\t\t\t\t/* Other than for the dummy tween property, properties that are not supported by the browser (and do not have an associated normalization) will\r\n\t\t\t\t\t\t\t inherently produce no style changes when set, so they are skipped in order to decrease animation tick overhead.\r\n\t\t\t\t\t\t\t Property support is determined via prefixCheck(), which returns a false flag when no supported is detected. */\r\n\t\t\t\t\t\t\t/* Note: Since SVG elements have some of their properties directly applied as HTML attributes,\r\n\t\t\t\t\t\t\t there is no way to check for their explicit browser support, and so we skip skip this check for them. */\r\n\t\t\t\t\t\t\tif ((!data || !data.isSVG) && rootProperty !== "tween" && CSS.Names.prefixCheck(rootProperty)[1] === false && CSS.Normalizations.registered[rootProperty] === undefined) {\r\n\t\t\t\t\t\t\t\tif (Velocity.debug) {\r\n\t\t\t\t\t\t\t\t\tconsole.log("Skipping [" + rootProperty + "] due to a lack of browser support.");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* If the display option is being set to a non-"none" (e.g. "block") and opacity (filter on IE<=8) is being\r\n\t\t\t\t\t\t\t animated to an endValue of non-zero, the user\'s intention is to fade in from invisible, thus we forcefeed opacity\r\n\t\t\t\t\t\t\t a startValue of 0 if its startValue hasn\'t already been sourced by value transferring or prior forcefeeding. */\r\n\t\t\t\t\t\t\tif (((opts.display !== undefined && opts.display !== null && opts.display !== "none") || (opts.visibility !== undefined && opts.visibility !== "hidden")) && /opacity|filter/.test(property) && !startValue && endValue !== 0) {\r\n\t\t\t\t\t\t\t\tstartValue = 0;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* If values have been transferred from the previous Velocity call, extract the endValue and rootPropertyValue\r\n\t\t\t\t\t\t\t for all of the current call\'s properties that were *also* animated in the previous call. */\r\n\t\t\t\t\t\t\t/* Note: Value transferring can optionally be disabled by the user via the _cacheValues option. */\r\n\t\t\t\t\t\t\tif (opts._cacheValues && lastTweensContainer && lastTweensContainer[property]) {\r\n\t\t\t\t\t\t\t\tif (startValue === undefined) {\r\n\t\t\t\t\t\t\t\t\tstartValue = lastTweensContainer[property].endValue + lastTweensContainer[property].unitType;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t/* The previous call\'s rootPropertyValue is extracted from the element\'s data cache since that\'s the\r\n\t\t\t\t\t\t\t\t instance of rootPropertyValue that gets freshly updated by the tweening process, whereas the rootPropertyValue\r\n\t\t\t\t\t\t\t\t attached to the incoming lastTweensContainer is equal to the root property\'s value prior to any tweening. */\r\n\t\t\t\t\t\t\t\trootPropertyValue = data.rootPropertyValueCache[rootProperty];\r\n\t\t\t\t\t\t\t\t/* If values were not transferred from a previous Velocity call, query the DOM as needed. */\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t/* Handle hooked properties. */\r\n\t\t\t\t\t\t\t\tif (CSS.Hooks.registered[property]) {\r\n\t\t\t\t\t\t\t\t\tif (startValue === undefined) {\r\n\t\t\t\t\t\t\t\t\t\trootPropertyValue = CSS.getPropertyValue(element, rootProperty); /* GET */\r\n\t\t\t\t\t\t\t\t\t\t/* Note: The following getPropertyValue() call does not actually trigger a DOM query;\r\n\t\t\t\t\t\t\t\t\t\t getPropertyValue() will extract the hook from rootPropertyValue. */\r\n\t\t\t\t\t\t\t\t\t\tstartValue = CSS.getPropertyValue(element, property, rootPropertyValue);\r\n\t\t\t\t\t\t\t\t\t\t/* If startValue is already defined via forcefeeding, do not query the DOM for the root property\'s value;\r\n\t\t\t\t\t\t\t\t\t\t just grab rootProperty\'s zero-value template from CSS.Hooks. This overwrites the element\'s actual\r\n\t\t\t\t\t\t\t\t\t\t root property value (if one is set), but this is acceptable since the primary reason users forcefeed is\r\n\t\t\t\t\t\t\t\t\t\t to avoid DOM queries, and thus we likewise avoid querying the DOM for the root property\'s value. */\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t/* Grab this hook\'s zero-value template, e.g. "0px 0px 0px black". */\r\n\t\t\t\t\t\t\t\t\t\trootPropertyValue = CSS.Hooks.templates[rootProperty][1];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t/* Handle non-hooked properties that haven\'t already been defined via forcefeeding. */\r\n\t\t\t\t\t\t\t\t} else if (startValue === undefined) {\r\n\t\t\t\t\t\t\t\t\tstartValue = CSS.getPropertyValue(element, property); /* GET */\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/**************************\r\n\t\t\t\t\t\t\t Value Data Extraction\r\n\t\t\t\t\t\t\t **************************/\r\n\r\n\t\t\t\t\t\t\tvar separatedValue,\r\n\t\t\t\t\t\t\t\t\tendValueUnitType,\r\n\t\t\t\t\t\t\t\t\tstartValueUnitType,\r\n\t\t\t\t\t\t\t\t\toperator = false;\r\n\r\n\t\t\t\t\t\t\t/* Separates a property value into its numeric value and its unit type. */\r\n\t\t\t\t\t\t\tvar separateValue = function(property, value) {\r\n\t\t\t\t\t\t\t\tvar unitType,\r\n\t\t\t\t\t\t\t\t\t\tnumericValue;\r\n\r\n\t\t\t\t\t\t\t\tnumericValue = (value || "0")\r\n\t\t\t\t\t\t\t\t\t\t.toString()\r\n\t\t\t\t\t\t\t\t\t\t.toLowerCase()\r\n\t\t\t\t\t\t\t\t\t\t/* Match the unit type at the end of the value. */\r\n\t\t\t\t\t\t\t\t\t\t.replace(/[%A-z]+$/, function(match) {\r\n\t\t\t\t\t\t\t\t\t\t\t/* Grab the unit type. */\r\n\t\t\t\t\t\t\t\t\t\t\tunitType = match;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t/* Strip the unit type off of value. */\r\n\t\t\t\t\t\t\t\t\t\t\treturn "";\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t/* If no unit type was supplied, assign one that is appropriate for this property (e.g. "deg" for rotateZ or "px" for width). */\r\n\t\t\t\t\t\t\t\tif (!unitType) {\r\n\t\t\t\t\t\t\t\t\tunitType = CSS.Values.getUnitType(property);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\treturn [numericValue, unitType];\r\n\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\tif (startValue !== endValue && Type.isString(startValue) && Type.isString(endValue)) {\r\n\t\t\t\t\t\t\t\tpattern = "";\r\n\t\t\t\t\t\t\t\tvar iStart = 0, // index in startValue\r\n\t\t\t\t\t\t\t\t\t\tiEnd = 0, // index in endValue\r\n\t\t\t\t\t\t\t\t\t\taStart = [], // array of startValue numbers\r\n\t\t\t\t\t\t\t\t\t\taEnd = [], // array of endValue numbers\r\n\t\t\t\t\t\t\t\t\t\tinCalc = 0, // Keep track of being inside a "calc()" so we don\'t duplicate it\r\n\t\t\t\t\t\t\t\t\t\tinRGB = 0, // Keep track of being inside an RGB as we can\'t use fractional values\r\n\t\t\t\t\t\t\t\t\t\tinRGBA = 0; // Keep track of being inside an RGBA as we must pass fractional for the alpha channel\r\n\r\n\t\t\t\t\t\t\t\tstartValue = CSS.Hooks.fixColors(startValue);\r\n\t\t\t\t\t\t\t\tendValue = CSS.Hooks.fixColors(endValue);\r\n\t\t\t\t\t\t\t\twhile (iStart < startValue.length && iEnd < endValue.length) {\r\n\t\t\t\t\t\t\t\t\tvar cStart = startValue[iStart],\r\n\t\t\t\t\t\t\t\t\t\t\tcEnd = endValue[iEnd];\r\n\r\n\t\t\t\t\t\t\t\t\tif (/[\\d\\.-]/.test(cStart) && /[\\d\\.-]/.test(cEnd)) {\r\n\t\t\t\t\t\t\t\t\t\tvar tStart = cStart, // temporary character buffer\r\n\t\t\t\t\t\t\t\t\t\t\t\ttEnd = cEnd, // temporary character buffer\r\n\t\t\t\t\t\t\t\t\t\t\t\tdotStart = ".", // Make sure we can only ever match a single dot in a decimal\r\n\t\t\t\t\t\t\t\t\t\t\t\tdotEnd = "."; // Make sure we can only ever match a single dot in a decimal\r\n\r\n\t\t\t\t\t\t\t\t\t\twhile (++iStart < startValue.length) {\r\n\t\t\t\t\t\t\t\t\t\t\tcStart = startValue[iStart];\r\n\t\t\t\t\t\t\t\t\t\t\tif (cStart === dotStart) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tdotStart = ".."; // Can never match two characters\r\n\t\t\t\t\t\t\t\t\t\t\t} else if (!/\\d/.test(cStart)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\ttStart += cStart;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\twhile (++iEnd < endValue.length) {\r\n\t\t\t\t\t\t\t\t\t\t\tcEnd = endValue[iEnd];\r\n\t\t\t\t\t\t\t\t\t\t\tif (cEnd === dotEnd) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tdotEnd = ".."; // Can never match two characters\r\n\t\t\t\t\t\t\t\t\t\t\t} else if (!/\\d/.test(cEnd)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\ttEnd += cEnd;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tvar uStart = CSS.Hooks.getUnit(startValue, iStart), // temporary unit type\r\n\t\t\t\t\t\t\t\t\t\t\t\tuEnd = CSS.Hooks.getUnit(endValue, iEnd); // temporary unit type\r\n\r\n\t\t\t\t\t\t\t\t\t\tiStart += uStart.length;\r\n\t\t\t\t\t\t\t\t\t\tiEnd += uEnd.length;\r\n\t\t\t\t\t\t\t\t\t\tif (uStart === uEnd) {\r\n\t\t\t\t\t\t\t\t\t\t\t// Same units\r\n\t\t\t\t\t\t\t\t\t\t\tif (tStart === tEnd) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Same numbers, so just copy over\r\n\t\t\t\t\t\t\t\t\t\t\t\tpattern += tStart + uStart;\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Different numbers, so store them\r\n\t\t\t\t\t\t\t\t\t\t\t\tpattern += "{" + aStart.length + (inRGB ? "!" : "") + "}" + uStart;\r\n\t\t\t\t\t\t\t\t\t\t\t\taStart.push(parseFloat(tStart));\r\n\t\t\t\t\t\t\t\t\t\t\t\taEnd.push(parseFloat(tEnd));\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t// Different units, so put into a "calc(from + to)" and animate each side to/from zero\r\n\t\t\t\t\t\t\t\t\t\t\tvar nStart = parseFloat(tStart),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tnEnd = parseFloat(tEnd);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tpattern += (inCalc < 5 ? "calc" : "") + "("\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ (nStart ? "{" + aStart.length + (inRGB ? "!" : "") + "}" : "0") + uStart\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ " + "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ (nEnd ? "{" + (aStart.length + (nStart ? 1 : 0)) + (inRGB ? "!" : "") + "}" : "0") + uEnd\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ ")";\r\n\t\t\t\t\t\t\t\t\t\t\tif (nStart) {\r\n\t\t\t\t\t\t\t\t\t\t\t\taStart.push(nStart);\r\n\t\t\t\t\t\t\t\t\t\t\t\taEnd.push(0);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (nEnd) {\r\n\t\t\t\t\t\t\t\t\t\t\t\taStart.push(0);\r\n\t\t\t\t\t\t\t\t\t\t\t\taEnd.push(nEnd);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} else if (cStart === cEnd) {\r\n\t\t\t\t\t\t\t\t\t\tpattern += cStart;\r\n\t\t\t\t\t\t\t\t\t\tiStart++;\r\n\t\t\t\t\t\t\t\t\t\tiEnd++;\r\n\t\t\t\t\t\t\t\t\t\t// Keep track of being inside a calc()\r\n\t\t\t\t\t\t\t\t\t\tif (inCalc === 0 && cStart === "c"\r\n\t\t\t\t\t\t\t\t\t\t\t\t|| inCalc === 1 && cStart === "a"\r\n\t\t\t\t\t\t\t\t\t\t\t\t|| inCalc === 2 && cStart === "l"\r\n\t\t\t\t\t\t\t\t\t\t\t\t|| inCalc === 3 && cStart === "c"\r\n\t\t\t\t\t\t\t\t\t\t\t\t|| inCalc >= 4 && cStart === "("\r\n\t\t\t\t\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\t\t\tinCalc++;\r\n\t\t\t\t\t\t\t\t\t\t} else if ((inCalc && inCalc < 5)\r\n\t\t\t\t\t\t\t\t\t\t\t\t|| inCalc >= 4 && cStart === ")" && --inCalc < 5) {\r\n\t\t\t\t\t\t\t\t\t\t\tinCalc = 0;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t// Keep track of being inside an rgb() / rgba()\r\n\t\t\t\t\t\t\t\t\t\tif (inRGB === 0 && cStart === "r"\r\n\t\t\t\t\t\t\t\t\t\t\t\t|| inRGB === 1 && cStart === "g"\r\n\t\t\t\t\t\t\t\t\t\t\t\t|| inRGB === 2 && cStart === "b"\r\n\t\t\t\t\t\t\t\t\t\t\t\t|| inRGB === 3 && cStart === "a"\r\n\t\t\t\t\t\t\t\t\t\t\t\t|| inRGB >= 3 && cStart === "("\r\n\t\t\t\t\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\t\t\tif (inRGB === 3 && cStart === "a") {\r\n\t\t\t\t\t\t\t\t\t\t\t\tinRGBA = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tinRGB++;\r\n\t\t\t\t\t\t\t\t\t\t} else if (inRGBA && cStart === ",") {\r\n\t\t\t\t\t\t\t\t\t\t\tif (++inRGBA > 3) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tinRGB = inRGBA = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} else if ((inRGBA && inRGB < (inRGBA ? 5 : 4))\r\n\t\t\t\t\t\t\t\t\t\t\t\t|| inRGB >= (inRGBA ? 4 : 3) && cStart === ")" && --inRGB < (inRGBA ? 5 : 4)) {\r\n\t\t\t\t\t\t\t\t\t\t\tinRGB = inRGBA = 0;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tinCalc = 0;\r\n\t\t\t\t\t\t\t\t\t\t// TODO: changing units, fixing colours\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (iStart !== startValue.length || iEnd !== endValue.length) {\r\n\t\t\t\t\t\t\t\t\tif (Velocity.debug) {\r\n\t\t\t\t\t\t\t\t\t\tconsole.error("Trying to pattern match mis-matched strings [\\"" + endValue + "\\", \\"" + startValue + "\\"]");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tpattern = undefined;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (pattern) {\r\n\t\t\t\t\t\t\t\t\tif (aStart.length) {\r\n\t\t\t\t\t\t\t\t\t\tif (Velocity.debug) {\r\n\t\t\t\t\t\t\t\t\t\t\tconsole.log("Pattern found \\"" + pattern + "\\" -> ", aStart, aEnd, "[" + startValue + "," + endValue + "]");\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tstartValue = aStart;\r\n\t\t\t\t\t\t\t\t\t\tendValue = aEnd;\r\n\t\t\t\t\t\t\t\t\t\tendValueUnitType = startValueUnitType = "";\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tpattern = undefined;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (!pattern) {\r\n\t\t\t\t\t\t\t\t/* Separate startValue. */\r\n\t\t\t\t\t\t\t\tseparatedValue = separateValue(property, startValue);\r\n\t\t\t\t\t\t\t\tstartValue = separatedValue[0];\r\n\t\t\t\t\t\t\t\tstartValueUnitType = separatedValue[1];\r\n\r\n\t\t\t\t\t\t\t\t/* Separate endValue, and extract a value operator (e.g. "+=", "-=") if one exists. */\r\n\t\t\t\t\t\t\t\tseparatedValue = separateValue(property, endValue);\r\n\t\t\t\t\t\t\t\tendValue = separatedValue[0].replace(/^([+-\\/*])=/, function(match, subMatch) {\r\n\t\t\t\t\t\t\t\t\toperator = subMatch;\r\n\r\n\t\t\t\t\t\t\t\t\t/* Strip the operator off of the value. */\r\n\t\t\t\t\t\t\t\t\treturn "";\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\tendValueUnitType = separatedValue[1];\r\n\r\n\t\t\t\t\t\t\t\t/* Parse float values from endValue and startValue. Default to 0 if NaN is returned. */\r\n\t\t\t\t\t\t\t\tstartValue = parseFloat(startValue) || 0;\r\n\t\t\t\t\t\t\t\tendValue = parseFloat(endValue) || 0;\r\n\r\n\t\t\t\t\t\t\t\t/***************************************\r\n\t\t\t\t\t\t\t\t Property-Specific Value Conversion\r\n\t\t\t\t\t\t\t\t ***************************************/\r\n\r\n\t\t\t\t\t\t\t\t/* Custom support for properties that don\'t actually accept the % unit type, but where pollyfilling is trivial and relatively foolproof. */\r\n\t\t\t\t\t\t\t\tif (endValueUnitType === "%") {\r\n\t\t\t\t\t\t\t\t\t/* A %-value fontSize/lineHeight is relative to the parent\'s fontSize (as opposed to the parent\'s dimensions),\r\n\t\t\t\t\t\t\t\t\t which is identical to the em unit\'s behavior, so we piggyback off of that. */\r\n\t\t\t\t\t\t\t\t\tif (/^(fontSize|lineHeight)$/.test(property)) {\r\n\t\t\t\t\t\t\t\t\t\t/* Convert % into an em decimal value. */\r\n\t\t\t\t\t\t\t\t\t\tendValue = endValue / 100;\r\n\t\t\t\t\t\t\t\t\t\tendValueUnitType = "em";\r\n\t\t\t\t\t\t\t\t\t\t/* For scaleX and scaleY, convert the value into its decimal format and strip off the unit type. */\r\n\t\t\t\t\t\t\t\t\t} else if (/^scale/.test(property)) {\r\n\t\t\t\t\t\t\t\t\t\tendValue = endValue / 100;\r\n\t\t\t\t\t\t\t\t\t\tendValueUnitType = "";\r\n\t\t\t\t\t\t\t\t\t\t/* For RGB components, take the defined percentage of 255 and strip off the unit type. */\r\n\t\t\t\t\t\t\t\t\t} else if (/(Red|Green|Blue)$/i.test(property)) {\r\n\t\t\t\t\t\t\t\t\t\tendValue = (endValue / 100) * 255;\r\n\t\t\t\t\t\t\t\t\t\tendValueUnitType = "";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/***************************\r\n\t\t\t\t\t\t\t Unit Ratio Calculation\r\n\t\t\t\t\t\t\t ***************************/\r\n\r\n\t\t\t\t\t\t\t/* When queried, the browser returns (most) CSS property values in pixels. Therefore, if an endValue with a unit type of\r\n\t\t\t\t\t\t\t %, em, or rem is animated toward, startValue must be converted from pixels into the same unit type as endValue in order\r\n\t\t\t\t\t\t\t for value manipulation logic (increment/decrement) to proceed. Further, if the startValue was forcefed or transferred\r\n\t\t\t\t\t\t\t from a previous call, startValue may also not be in pixels. Unit conversion logic therefore consists of two steps:\r\n\t\t\t\t\t\t\t 1) Calculating the ratio of %/em/rem/vh/vw relative to pixels\r\n\t\t\t\t\t\t\t 2) Converting startValue into the same unit of measurement as endValue based on these ratios. */\r\n\t\t\t\t\t\t\t/* Unit conversion ratios are calculated by inserting a sibling node next to the target node, copying over its position property,\r\n\t\t\t\t\t\t\t setting values with the target unit type then comparing the returned pixel value. */\r\n\t\t\t\t\t\t\t/* Note: Even if only one of these unit types is being animated, all unit ratios are calculated at once since the overhead\r\n\t\t\t\t\t\t\t of batching the SETs and GETs together upfront outweights the potential overhead\r\n\t\t\t\t\t\t\t of layout thrashing caused by re-querying for uncalculated ratios for subsequently-processed properties. */\r\n\t\t\t\t\t\t\t/* Todo: Shift this logic into the calls\' first tick instance so that it\'s synced with RAF. */\r\n\t\t\t\t\t\t\tvar calculateUnitRatios = function() {\r\n\r\n\t\t\t\t\t\t\t\t/************************\r\n\t\t\t\t\t\t\t\t Same Ratio Checks\r\n\t\t\t\t\t\t\t\t ************************/\r\n\r\n\t\t\t\t\t\t\t\t/* The properties below are used to determine whether the element differs sufficiently from this call\'s\r\n\t\t\t\t\t\t\t\t previously iterated element to also differ in its unit conversion ratios. If the properties match up with those\r\n\t\t\t\t\t\t\t\t of the prior element, the prior element\'s conversion ratios are used. Like most optimizations in Velocity,\r\n\t\t\t\t\t\t\t\t this is done to minimize DOM querying. */\r\n\t\t\t\t\t\t\t\tvar sameRatioIndicators = {\r\n\t\t\t\t\t\t\t\t\tmyParent: element.parentNode || document.body, /* GET */\r\n\t\t\t\t\t\t\t\t\tposition: CSS.getPropertyValue(element, "position"), /* GET */\r\n\t\t\t\t\t\t\t\t\tfontSize: CSS.getPropertyValue(element, "fontSize") /* GET */\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\t/* Determine if the same % ratio can be used. % is based on the element\'s position value and its parent\'s width and height dimensions. */\r\n\t\t\t\t\t\t\t\t\t\tsamePercentRatio = ((sameRatioIndicators.position === callUnitConversionData.lastPosition) && (sameRatioIndicators.myParent === callUnitConversionData.lastParent)),\r\n\t\t\t\t\t\t\t\t\t\t/* Determine if the same em ratio can be used. em is relative to the element\'s fontSize. */\r\n\t\t\t\t\t\t\t\t\t\tsameEmRatio = (sameRatioIndicators.fontSize === callUnitConversionData.lastFontSize);\r\n\r\n\t\t\t\t\t\t\t\t/* Store these ratio indicators call-wide for the next element to compare against. */\r\n\t\t\t\t\t\t\t\tcallUnitConversionData.lastParent = sameRatioIndicators.myParent;\r\n\t\t\t\t\t\t\t\tcallUnitConversionData.lastPosition = sameRatioIndicators.position;\r\n\t\t\t\t\t\t\t\tcallUnitConversionData.lastFontSize = sameRatioIndicators.fontSize;\r\n\r\n\t\t\t\t\t\t\t\t/***************************\r\n\t\t\t\t\t\t\t\t Element-Specific Units\r\n\t\t\t\t\t\t\t\t ***************************/\r\n\r\n\t\t\t\t\t\t\t\t/* Note: IE8 rounds to the nearest pixel when returning CSS values, thus we perform conversions using a measurement\r\n\t\t\t\t\t\t\t\t of 100 (instead of 1) to give our ratios a precision of at least 2 decimal values. */\r\n\t\t\t\t\t\t\t\tvar measurement = 100,\r\n\t\t\t\t\t\t\t\t\t\tunitRatios = {};\r\n\r\n\t\t\t\t\t\t\t\tif (!sameEmRatio || !samePercentRatio) {\r\n\t\t\t\t\t\t\t\t\tvar dummy = data && data.isSVG ? document.createElementNS("http://www.w3.org/2000/svg", "rect") : document.createElement("div");\r\n\r\n\t\t\t\t\t\t\t\t\tVelocity.init(dummy);\r\n\t\t\t\t\t\t\t\t\tsameRatioIndicators.myParent.appendChild(dummy);\r\n\r\n\t\t\t\t\t\t\t\t\t/* To accurately and consistently calculate conversion ratios, the element\'s cascaded overflow and box-sizing are stripped.\r\n\t\t\t\t\t\t\t\t\t Similarly, since width/height can be artificially constrained by their min-/max- equivalents, these are controlled for as well. */\r\n\t\t\t\t\t\t\t\t\t/* Note: Overflow must be also be controlled for per-axis since the overflow property overwrites its per-axis values. */\r\n\t\t\t\t\t\t\t\t\t$.each(["overflow", "overflowX", "overflowY"], function(i, property) {\r\n\t\t\t\t\t\t\t\t\t\tVelocity.CSS.setPropertyValue(dummy, property, "hidden");\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\tVelocity.CSS.setPropertyValue(dummy, "position", sameRatioIndicators.position);\r\n\t\t\t\t\t\t\t\t\tVelocity.CSS.setPropertyValue(dummy, "fontSize", sameRatioIndicators.fontSize);\r\n\t\t\t\t\t\t\t\t\tVelocity.CSS.setPropertyValue(dummy, "boxSizing", "content-box");\r\n\r\n\t\t\t\t\t\t\t\t\t/* width and height act as our proxy properties for measuring the horizontal and vertical % ratios. */\r\n\t\t\t\t\t\t\t\t\t$.each(["minWidth", "maxWidth", "width", "minHeight", "maxHeight", "height"], function(i, property) {\r\n\t\t\t\t\t\t\t\t\t\tVelocity.CSS.setPropertyValue(dummy, property, measurement + "%");\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t/* paddingLeft arbitrarily acts as our proxy property for the em ratio. */\r\n\t\t\t\t\t\t\t\t\tVelocity.CSS.setPropertyValue(dummy, "paddingLeft", measurement + "em");\r\n\r\n\t\t\t\t\t\t\t\t\t/* Divide the returned value by the measurement to get the ratio between 1% and 1px. Default to 1 since working with 0 can produce Infinite. */\r\n\t\t\t\t\t\t\t\t\tunitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth = (parseFloat(CSS.getPropertyValue(dummy, "width", null, true)) || 1) / measurement; /* GET */\r\n\t\t\t\t\t\t\t\t\tunitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight = (parseFloat(CSS.getPropertyValue(dummy, "height", null, true)) || 1) / measurement; /* GET */\r\n\t\t\t\t\t\t\t\t\tunitRatios.emToPx = callUnitConversionData.lastEmToPx = (parseFloat(CSS.getPropertyValue(dummy, "paddingLeft")) || 1) / measurement; /* GET */\r\n\r\n\t\t\t\t\t\t\t\t\tsameRatioIndicators.myParent.removeChild(dummy);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tunitRatios.emToPx = callUnitConversionData.lastEmToPx;\r\n\t\t\t\t\t\t\t\t\tunitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth;\r\n\t\t\t\t\t\t\t\t\tunitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t/***************************\r\n\t\t\t\t\t\t\t\t Element-Agnostic Units\r\n\t\t\t\t\t\t\t\t ***************************/\r\n\r\n\t\t\t\t\t\t\t\t/* Whereas % and em ratios are determined on a per-element basis, the rem unit only needs to be checked\r\n\t\t\t\t\t\t\t\t once per call since it\'s exclusively dependant upon document.body\'s fontSize. If this is the first time\r\n\t\t\t\t\t\t\t\t that calculateUnitRatios() is being run during this call, remToPx will still be set to its default value of null,\r\n\t\t\t\t\t\t\t\t so we calculate it now. */\r\n\t\t\t\t\t\t\t\tif (callUnitConversionData.remToPx === null) {\r\n\t\t\t\t\t\t\t\t\t/* Default to browsers\' default fontSize of 16px in the case of 0. */\r\n\t\t\t\t\t\t\t\t\tcallUnitConversionData.remToPx = parseFloat(CSS.getPropertyValue(document.body, "fontSize")) || 16; /* GET */\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t/* Similarly, viewport units are %-relative to the window\'s inner dimensions. */\r\n\t\t\t\t\t\t\t\tif (callUnitConversionData.vwToPx === null) {\r\n\t\t\t\t\t\t\t\t\tcallUnitConversionData.vwToPx = parseFloat(window.innerWidth) / 100; /* GET */\r\n\t\t\t\t\t\t\t\t\tcallUnitConversionData.vhToPx = parseFloat(window.innerHeight) / 100; /* GET */\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tunitRatios.remToPx = callUnitConversionData.remToPx;\r\n\t\t\t\t\t\t\t\tunitRatios.vwToPx = callUnitConversionData.vwToPx;\r\n\t\t\t\t\t\t\t\tunitRatios.vhToPx = callUnitConversionData.vhToPx;\r\n\r\n\t\t\t\t\t\t\t\tif (Velocity.debug >= 1) {\r\n\t\t\t\t\t\t\t\t\tconsole.log("Unit ratios: " + JSON.stringify(unitRatios), element);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\treturn unitRatios;\r\n\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\t/********************\r\n\t\t\t\t\t\t\t Unit Conversion\r\n\t\t\t\t\t\t\t ********************/\r\n\r\n\t\t\t\t\t\t\t/* The * and / operators, which are not passed in with an associated unit, inherently use startValue\'s unit. Skip value and unit conversion. */\r\n\t\t\t\t\t\t\tif (/[\\/*]/.test(operator)) {\r\n\t\t\t\t\t\t\t\tendValueUnitType = startValueUnitType;\r\n\t\t\t\t\t\t\t\t/* If startValue and endValue differ in unit type, convert startValue into the same unit type as endValue so that if endValueUnitType\r\n\t\t\t\t\t\t\t\t is a relative unit (%, em, rem), the values set during tweening will continue to be accurately relative even if the metrics they depend\r\n\t\t\t\t\t\t\t\t on are dynamically changing during the course of the animation. Conversely, if we always normalized into px and used px for setting values, the px ratio\r\n\t\t\t\t\t\t\t\t would become stale if the original unit being animated toward was relative and the underlying metrics change during the animation. */\r\n\t\t\t\t\t\t\t\t/* Since 0 is 0 in any unit type, no conversion is necessary when startValue is 0 -- we just start at 0 with endValueUnitType. */\r\n\t\t\t\t\t\t\t} else if ((startValueUnitType !== endValueUnitType) && startValue !== 0) {\r\n\t\t\t\t\t\t\t\t/* Unit conversion is also skipped when endValue is 0, but *startValueUnitType* must be used for tween values to remain accurate. */\r\n\t\t\t\t\t\t\t\t/* Note: Skipping unit conversion here means that if endValueUnitType was originally a relative unit, the animation won\'t relatively\r\n\t\t\t\t\t\t\t\t match the underlying metrics if they change, but this is acceptable since we\'re animating toward invisibility instead of toward visibility,\r\n\t\t\t\t\t\t\t\t which remains past the point of the animation\'s completion. */\r\n\t\t\t\t\t\t\t\tif (endValue === 0) {\r\n\t\t\t\t\t\t\t\t\tendValueUnitType = startValueUnitType;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t/* By this point, we cannot avoid unit conversion (it\'s undesirable since it causes layout thrashing).\r\n\t\t\t\t\t\t\t\t\t If we haven\'t already, we trigger calculateUnitRatios(), which runs once per element per call. */\r\n\t\t\t\t\t\t\t\t\telementUnitConversionData = elementUnitConversionData || calculateUnitRatios();\r\n\r\n\t\t\t\t\t\t\t\t\t/* The following RegEx matches CSS properties that have their % values measured relative to the x-axis. */\r\n\t\t\t\t\t\t\t\t\t/* Note: W3C spec mandates that all of margin and padding\'s properties (even top and bottom) are %-relative to the *width* of the parent element. */\r\n\t\t\t\t\t\t\t\t\tvar axis = (/margin|padding|left|right|width|text|word|letter/i.test(property) || /X$/.test(property) || property === "x") ? "x" : "y";\r\n\r\n\t\t\t\t\t\t\t\t\t/* In order to avoid generating n^2 bespoke conversion functions, unit conversion is a two-step process:\r\n\t\t\t\t\t\t\t\t\t 1) Convert startValue into pixels. 2) Convert this new pixel value into endValue\'s unit type. */\r\n\t\t\t\t\t\t\t\t\tswitch (startValueUnitType) {\r\n\t\t\t\t\t\t\t\t\t\tcase "%":\r\n\t\t\t\t\t\t\t\t\t\t\t/* Note: translateX and translateY are the only properties that are %-relative to an element\'s own dimensions -- not its parent\'s dimensions.\r\n\t\t\t\t\t\t\t\t\t\t\t Velocity does not include a special conversion process to account for this behavior. Therefore, animating translateX/Y from a % value\r\n\t\t\t\t\t\t\t\t\t\t\t to a non-% value will produce an incorrect start value. Fortunately, this sort of cross-unit conversion is rarely done by users in practice. */\r\n\t\t\t\t\t\t\t\t\t\t\tstartValue *= (axis === "x" ? elementUnitConversionData.percentToPxWidth : elementUnitConversionData.percentToPxHeight);\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\t\t\tcase "px":\r\n\t\t\t\t\t\t\t\t\t\t\t/* px acts as our midpoint in the unit conversion process; do nothing. */\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\t\t\tstartValue *= elementUnitConversionData[startValueUnitType + "ToPx"];\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t/* Invert the px ratios to convert into to the target unit. */\r\n\t\t\t\t\t\t\t\t\tswitch (endValueUnitType) {\r\n\t\t\t\t\t\t\t\t\t\tcase "%":\r\n\t\t\t\t\t\t\t\t\t\t\tstartValue *= 1 / (axis === "x" ? elementUnitConversionData.percentToPxWidth : elementUnitConversionData.percentToPxHeight);\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\t\t\tcase "px":\r\n\t\t\t\t\t\t\t\t\t\t\t/* startValue is already in px, do nothing; we\'re done. */\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\t\t\tstartValue *= 1 / elementUnitConversionData[endValueUnitType + "ToPx"];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/*********************\r\n\t\t\t\t\t\t\t Relative Values\r\n\t\t\t\t\t\t\t *********************/\r\n\r\n\t\t\t\t\t\t\t/* Operator logic must be performed last since it requires unit-normalized start and end values. */\r\n\t\t\t\t\t\t\t/* Note: Relative *percent values* do not behave how most people think; while one would expect "+=50%"\r\n\t\t\t\t\t\t\t to increase the property 1.5x its current value, it in fact increases the percent units in absolute terms:\r\n\t\t\t\t\t\t\t 50 points is added on top of the current % value. */\r\n\t\t\t\t\t\t\tswitch (operator) {\r\n\t\t\t\t\t\t\t\tcase "+":\r\n\t\t\t\t\t\t\t\t\tendValue = startValue + endValue;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase "-":\r\n\t\t\t\t\t\t\t\t\tendValue = startValue - endValue;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase "*":\r\n\t\t\t\t\t\t\t\t\tendValue = startValue * endValue;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase "/":\r\n\t\t\t\t\t\t\t\t\tendValue = startValue / endValue;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/**************************\r\n\t\t\t\t\t\t\t tweensContainer Push\r\n\t\t\t\t\t\t\t **************************/\r\n\r\n\t\t\t\t\t\t\t/* Construct the per-property tween object, and push it to the element\'s tweensContainer. */\r\n\t\t\t\t\t\t\ttweensContainer[property] = {\r\n\t\t\t\t\t\t\t\trootPropertyValue: rootPropertyValue,\r\n\t\t\t\t\t\t\t\tstartValue: startValue,\r\n\t\t\t\t\t\t\t\tcurrentValue: startValue,\r\n\t\t\t\t\t\t\t\tendValue: endValue,\r\n\t\t\t\t\t\t\t\tunitType: endValueUnitType,\r\n\t\t\t\t\t\t\t\teasing: easing\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tif (pattern) {\r\n\t\t\t\t\t\t\t\ttweensContainer[property].pattern = pattern;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (Velocity.debug) {\r\n\t\t\t\t\t\t\t\tconsole.log("tweensContainer (" + property + "): " + JSON.stringify(tweensContainer[property]), element);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t/* Create a tween out of each property, and append its associated data to tweensContainer. */\r\n\t\t\t\t\t\tfor (var property in propertiesMap) {\r\n\r\n\t\t\t\t\t\t\tif (!propertiesMap.hasOwnProperty(property)) {\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t/* The original property name\'s format must be used for the parsePropertyValue() lookup,\r\n\t\t\t\t\t\t\t but we then use its camelCase styling to normalize it for manipulation. */\r\n\t\t\t\t\t\t\tvar propertyName = CSS.Names.camelCase(property),\r\n\t\t\t\t\t\t\t\t\tvalueData = parsePropertyValue(propertiesMap[property]);\r\n\r\n\t\t\t\t\t\t\t/* Find shorthand color properties that have been passed a hex string. */\r\n\t\t\t\t\t\t\t/* Would be quicker to use CSS.Lists.colors.includes() if possible */\r\n\t\t\t\t\t\t\tif (_inArray(CSS.Lists.colors, propertyName)) {\r\n\t\t\t\t\t\t\t\t/* Parse the value data for each shorthand. */\r\n\t\t\t\t\t\t\t\tvar endValue = valueData[0],\r\n\t\t\t\t\t\t\t\t\t\teasing = valueData[1],\r\n\t\t\t\t\t\t\t\t\t\tstartValue = valueData[2];\r\n\r\n\t\t\t\t\t\t\t\tif (CSS.RegEx.isHex.test(endValue)) {\r\n\t\t\t\t\t\t\t\t\t/* Convert the hex strings into their RGB component arrays. */\r\n\t\t\t\t\t\t\t\t\tvar colorComponents = ["Red", "Green", "Blue"],\r\n\t\t\t\t\t\t\t\t\t\t\tendValueRGB = CSS.Values.hexToRgb(endValue),\r\n\t\t\t\t\t\t\t\t\t\t\tstartValueRGB = startValue ? CSS.Values.hexToRgb(startValue) : undefined;\r\n\r\n\t\t\t\t\t\t\t\t\t/* Inject the RGB component tweens into propertiesMap. */\r\n\t\t\t\t\t\t\t\t\tfor (var i = 0; i < colorComponents.length; i++) {\r\n\t\t\t\t\t\t\t\t\t\tvar dataArray = [endValueRGB[i]];\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (easing) {\r\n\t\t\t\t\t\t\t\t\t\t\tdataArray.push(easing);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (startValueRGB !== undefined) {\r\n\t\t\t\t\t\t\t\t\t\t\tdataArray.push(startValueRGB[i]);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\tfixPropertyValue(propertyName + colorComponents[i], dataArray);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t/* If we have replaced a shortcut color value then don\'t update the standard property name */\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tfixPropertyValue(propertyName, valueData);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Along with its property data, store a reference to the element itself onto tweensContainer. */\r\n\t\t\t\t\t\ttweensContainer.element = element;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/*****************\r\n\t\t\t\t\t Call Push\r\n\t\t\t\t\t *****************/\r\n\r\n\t\t\t\t\t/* Note: tweensContainer can be empty if all of the properties in this call\'s property map were skipped due to not\r\n\t\t\t\t\t being supported by the browser. The element property is used for checking that the tweensContainer has been appended to. */\r\n\t\t\t\t\tif (tweensContainer.element) {\r\n\t\t\t\t\t\t/* Apply the "velocity-animating" indicator class. */\r\n\t\t\t\t\t\tCSS.Values.addClass(element, "velocity-animating");\r\n\r\n\t\t\t\t\t\t/* The call array houses the tweensContainers for each element being animated in the current call. */\r\n\t\t\t\t\t\tcall.push(tweensContainer);\r\n\r\n\t\t\t\t\t\tdata = Data(element);\r\n\r\n\t\t\t\t\t\tif (data) {\r\n\t\t\t\t\t\t\t/* Store the tweensContainer and options if we\'re working on the default effects queue, so that they can be used by the reverse command. */\r\n\t\t\t\t\t\t\tif (opts.queue === "") {\r\n\r\n\t\t\t\t\t\t\t\tdata.tweensContainer = tweensContainer;\r\n\t\t\t\t\t\t\t\tdata.opts = opts;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Switch on the element\'s animating flag. */\r\n\t\t\t\t\t\t\tdata.isAnimating = true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Once the final element in this call\'s element set has been processed, push the call array onto\r\n\t\t\t\t\t\t Velocity.State.calls for the animation tick to immediately begin processing. */\r\n\t\t\t\t\t\tif (elementsIndex === elementsLength - 1) {\r\n\t\t\t\t\t\t\t/* Add the current call plus its associated metadata (the element set and the call\'s options) onto the global call container.\r\n\t\t\t\t\t\t\t Anything on this call container is subjected to tick() processing. */\r\n\t\t\t\t\t\t\tVelocity.State.calls.push([call, elements, opts, null, promiseData.resolver, null, 0]);\r\n\r\n\t\t\t\t\t\t\t/* If the animation tick isn\'t running, start it. (Velocity shuts it off when there are no active calls to process.) */\r\n\t\t\t\t\t\t\tif (Velocity.State.isTicking === false) {\r\n\t\t\t\t\t\t\t\tVelocity.State.isTicking = true;\r\n\r\n\t\t\t\t\t\t\t\t/* Start the tick loop. */\r\n\t\t\t\t\t\t\t\ttick();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\telementsIndex++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* When the queue option is set to false, the call skips the element\'s queue and fires immediately. */\r\n\t\t\t\tif (opts.queue === false) {\r\n\t\t\t\t\t/* Since this buildQueue call doesn\'t respect the element\'s existing queue (which is where a delay option would have been appended),\r\n\t\t\t\t\t we manually inject the delay property here with an explicit setTimeout. */\r\n\t\t\t\t\tif (opts.delay) {\r\n\r\n\t\t\t\t\t\t/* Temporarily store delayed elements to facilitate access for global pause/resume */\r\n\t\t\t\t\t\tvar callIndex = Velocity.State.delayedElements.count++;\r\n\t\t\t\t\t\tVelocity.State.delayedElements[callIndex] = element;\r\n\r\n\t\t\t\t\t\tvar delayComplete = (function(index) {\r\n\t\t\t\t\t\t\treturn function() {\r\n\t\t\t\t\t\t\t\t/* Clear the temporary element */\r\n\t\t\t\t\t\t\t\tVelocity.State.delayedElements[index] = false;\r\n\r\n\t\t\t\t\t\t\t\t/* Finally, issue the call */\r\n\t\t\t\t\t\t\t\tbuildQueue();\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t})(callIndex);\r\n\r\n\t\t\t\t\t\tData(element).delayBegin = (new Date()).getTime();\r\n\t\t\t\t\t\tData(element).delay = parseFloat(opts.delay);\r\n\t\t\t\t\t\tData(element).delayTimer = {\r\n\t\t\t\t\t\t\tsetTimeout: setTimeout(buildQueue, parseFloat(opts.delay)),\r\n\t\t\t\t\t\t\tnext: delayComplete\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tbuildQueue();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/* Otherwise, the call undergoes element queueing as normal. */\r\n\t\t\t\t\t/* Note: To interoperate with jQuery, Velocity uses jQuery\'s own $.queue() stack for queuing logic. */\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$.queue(element, opts.queue, function(next, clearQueue) {\r\n\t\t\t\t\t\t/* If the clearQueue flag was passed in by the stop command, resolve this call\'s promise. (Promises can only be resolved once,\r\n\t\t\t\t\t\t so it\'s fine if this is repeatedly triggered for each element in the associated call.) */\r\n\t\t\t\t\t\tif (clearQueue === true) {\r\n\t\t\t\t\t\t\tif (promiseData.promise) {\r\n\t\t\t\t\t\t\t\tpromiseData.resolver(elements);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Do not continue with animation queueing. */\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* This flag indicates to the upcoming completeCall() function that this queue entry was initiated by Velocity.\r\n\t\t\t\t\t\t See completeCall() for further details. */\r\n\t\t\t\t\t\tVelocity.velocityQueueEntryFlag = true;\r\n\r\n\t\t\t\t\t\tbuildQueue(next);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*********************\r\n\t\t\t\t Auto-Dequeuing\r\n\t\t\t\t *********************/\r\n\r\n\t\t\t\t/* As per jQuery\'s $.queue() behavior, to fire the first non-custom-queue entry on an element, the element\r\n\t\t\t\t must be dequeued if its queue stack consists *solely* of the current call. (This can be determined by checking\r\n\t\t\t\t for the "inprogress" item that jQuery prepends to active queue stack arrays.) Regardless, whenever the element\'s\r\n\t\t\t\t queue is further appended with additional items -- including $.delay()\'s or even $.animate() calls, the queue\'s\r\n\t\t\t\t first entry is automatically fired. This behavior contrasts that of custom queues, which never auto-fire. */\r\n\t\t\t\t/* Note: When an element set is being subjected to a non-parallel Velocity call, the animation will not begin until\r\n\t\t\t\t each one of the elements in the set has reached the end of its individually pre-existing queue chain. */\r\n\t\t\t\t/* Note: Unfortunately, most people don\'t fully grasp jQuery\'s powerful, yet quirky, $.queue() function.\r\n\t\t\t\t Lean more here: http://stackoverflow.com/questions/1058158/can-somebody-explain-jquery-queue-to-me */\r\n\t\t\t\tif ((opts.queue === "" || opts.queue === "fx") && $.queue(element)[0] !== "inprogress") {\r\n\t\t\t\t\t$.dequeue(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/**************************\r\n\t\t\t Element Set Iteration\r\n\t\t\t **************************/\r\n\r\n\t\t\t/* If the "nodeType" property exists on the elements variable, we\'re animating a single element.\r\n\t\t\t Place it in an array so that $.each() can iterate over it. */\r\n\t\t\t$.each(elements, function(i, element) {\r\n\t\t\t\t/* Ensure each element in a set has a nodeType (is a real element) to avoid throwing errors. */\r\n\t\t\t\tif (Type.isNode(element)) {\r\n\t\t\t\t\tprocessElement(element, i);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t/******************\r\n\t\t\t Option: Loop\r\n\t\t\t ******************/\r\n\r\n\t\t\t/* The loop option accepts an integer indicating how many times the element should loop between the values in the\r\n\t\t\t current call\'s properties map and the element\'s property values prior to this call. */\r\n\t\t\t/* Note: The loop option\'s logic is performed here -- after element processing -- because the current call needs\r\n\t\t\t to undergo its queue insertion prior to the loop option generating its series of constituent "reverse" calls,\r\n\t\t\t which chain after the current call. Two reverse calls (two "alternations") constitute one loop. */\r\n\t\t\topts = $.extend({}, Velocity.defaults, options);\r\n\t\t\topts.loop = parseInt(opts.loop, 10);\r\n\t\t\tvar reverseCallsCount = (opts.loop * 2) - 1;\r\n\r\n\t\t\tif (opts.loop) {\r\n\t\t\t\t/* Double the loop count to convert it into its appropriate number of "reverse" calls.\r\n\t\t\t\t Subtract 1 from the resulting value since the current call is included in the total alternation count. */\r\n\t\t\t\tfor (var x = 0; x < reverseCallsCount; x++) {\r\n\t\t\t\t\t/* Since the logic for the reverse action occurs inside Queueing and therefore this call\'s options object\r\n\t\t\t\t\t isn\'t parsed until then as well, the current call\'s delay option must be explicitly passed into the reverse\r\n\t\t\t\t\t call so that the delay logic that occurs inside *Pre-Queueing* can process it. */\r\n\t\t\t\t\tvar reverseOptions = {\r\n\t\t\t\t\t\tdelay: opts.delay,\r\n\t\t\t\t\t\tprogress: opts.progress\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t/* If a complete callback was passed into this call, transfer it to the loop redirect\'s final "reverse" call\r\n\t\t\t\t\t so that it\'s triggered when the entire redirect is complete (and not when the very first animation is complete). */\r\n\t\t\t\t\tif (x === reverseCallsCount - 1) {\r\n\t\t\t\t\t\treverseOptions.display = opts.display;\r\n\t\t\t\t\t\treverseOptions.visibility = opts.visibility;\r\n\t\t\t\t\t\treverseOptions.complete = opts.complete;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tanimate(elements, "reverse", reverseOptions);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/***************\r\n\t\t\t Chaining\r\n\t\t\t ***************/\r\n\r\n\t\t\t/* Return the elements back to the call chain, with wrapped elements taking precedence in case Velocity was called via the $.fn. extension. */\r\n\t\t\treturn getChain();\r\n\t\t};\r\n\r\n\t\t/* Turn Velocity into the animation function, extended with the pre-existing Velocity object. */\r\n\t\tVelocity = $.extend(animate, Velocity);\r\n\t\t/* For legacy support, also expose the literal animate method. */\r\n\t\tVelocity.animate = animate;\r\n\r\n\t\t/**************\r\n\t\t Timing\r\n\t\t **************/\r\n\r\n\t\t/* Ticker function. */\r\n\t\tvar ticker = window.requestAnimationFrame || rAFShim;\r\n\r\n\t\t/* Inactive browser tabs pause rAF, which results in all active animations immediately sprinting to their completion states when the tab refocuses.\r\n\t\t To get around this, we dynamically switch rAF to setTimeout (which the browser *doesn\'t* pause) when the tab loses focus. We skip this for mobile\r\n\t\t devices to avoid wasting battery power on inactive tabs. */\r\n\t\t/* Note: Tab focus detection doesn\'t work on older versions of IE, but that\'s okay since they don\'t support rAF to begin with. */\r\n\t\tif (!Velocity.State.isMobile && document.hidden !== undefined) {\r\n\t\t\tvar updateTicker = function() {\r\n\t\t\t\t/* Reassign the rAF function (which the global tick() function uses) based on the tab\'s focus state. */\r\n\t\t\t\tif (document.hidden) {\r\n\t\t\t\t\tticker = function(callback) {\r\n\t\t\t\t\t\t/* The tick function needs a truthy first argument in order to pass its internal timestamp check. */\r\n\t\t\t\t\t\treturn setTimeout(function() {\r\n\t\t\t\t\t\t\tcallback(true);\r\n\t\t\t\t\t\t}, 16);\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t/* The rAF loop has been paused by the browser, so we manually restart the tick. */\r\n\t\t\t\t\ttick();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tticker = window.requestAnimationFrame || rAFShim;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t/* Page could be sitting in the background at this time (i.e. opened as new tab) so making sure we use correct ticker from the start */\r\n\t\t\tupdateTicker();\r\n\r\n\t\t\t/* And then run check again every time visibility changes */\r\n\t\t\tdocument.addEventListener("visibilitychange", updateTicker);\r\n\t\t}\r\n\r\n\t\t/************\r\n\t\t Tick\r\n\t\t ************/\r\n\r\n\t\t/* Note: All calls to Velocity are pushed to the Velocity.State.calls array, which is fully iterated through upon each tick. */\r\n\t\tfunction tick(timestamp) {\r\n\t\t\t/* An empty timestamp argument indicates that this is the first tick occurence since ticking was turned on.\r\n\t\t\t We leverage this metadata to fully ignore the first tick pass since RAF\'s initial pass is fired whenever\r\n\t\t\t the browser\'s next tick sync time occurs, which results in the first elements subjected to Velocity\r\n\t\t\t calls being animated out of sync with any elements animated immediately thereafter. In short, we ignore\r\n\t\t\t the first RAF tick pass so that elements being immediately consecutively animated -- instead of simultaneously animated\r\n\t\t\t by the same Velocity call -- are properly batched into the same initial RAF tick and consequently remain in sync thereafter. */\r\n\t\t\tif (timestamp) {\r\n\t\t\t\t/* We normally use RAF\'s high resolution timestamp but as it can be significantly offset when the browser is\r\n\t\t\t\t under high stress we give the option for choppiness over allowing the browser to drop huge chunks of frames.\r\n\t\t\t\t We use performance.now() and shim it if it doesn\'t exist for when the tab is hidden. */\r\n\t\t\t\tvar timeCurrent = Velocity.timestamp && timestamp !== true ? timestamp : performance.now();\r\n\r\n\t\t\t\t/********************\r\n\t\t\t\t Call Iteration\r\n\t\t\t\t ********************/\r\n\r\n\t\t\t\tvar callsLength = Velocity.State.calls.length;\r\n\r\n\t\t\t\t/* To speed up iterating over this array, it is compacted (falsey items -- calls that have completed -- are removed)\r\n\t\t\t\t when its length has ballooned to a point that can impact tick performance. This only becomes necessary when animation\r\n\t\t\t\t has been continuous with many elements over a long period of time; whenever all active calls are completed, completeCall() clears Velocity.State.calls. */\r\n\t\t\t\tif (callsLength > 10000) {\r\n\t\t\t\t\tVelocity.State.calls = compactSparseArray(Velocity.State.calls);\r\n\t\t\t\t\tcallsLength = Velocity.State.calls.length;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Iterate through each active call. */\r\n\t\t\t\tfor (var i = 0; i < callsLength; i++) {\r\n\t\t\t\t\t/* When a Velocity call is completed, its Velocity.State.calls entry is set to false. Continue on to the next call. */\r\n\t\t\t\t\tif (!Velocity.State.calls[i]) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/************************\r\n\t\t\t\t\t Call-Wide Variables\r\n\t\t\t\t\t ************************/\r\n\r\n\t\t\t\t\tvar callContainer = Velocity.State.calls[i],\r\n\t\t\t\t\t\t\tcall = callContainer[0],\r\n\t\t\t\t\t\t\topts = callContainer[2],\r\n\t\t\t\t\t\t\ttimeStart = callContainer[3],\r\n\t\t\t\t\t\t\tfirstTick = !timeStart,\r\n\t\t\t\t\t\t\ttweenDummyValue = null,\r\n\t\t\t\t\t\t\tpauseObject = callContainer[5],\r\n\t\t\t\t\t\t\tmillisecondsEllapsed = callContainer[6];\r\n\r\n\r\n\r\n\t\t\t\t\t/* If timeStart is undefined, then this is the first time that this call has been processed by tick().\r\n\t\t\t\t\t We assign timeStart now so that its value is as close to the real animation start time as possible.\r\n\t\t\t\t\t (Conversely, had timeStart been defined when this call was added to Velocity.State.calls, the delay\r\n\t\t\t\t\t between that time and now would cause the first few frames of the tween to be skipped since\r\n\t\t\t\t\t percentComplete is calculated relative to timeStart.) */\r\n\t\t\t\t\t/* Further, subtract 16ms (the approximate resolution of RAF) from the current time value so that the\r\n\t\t\t\t\t first tick iteration isn\'t wasted by animating at 0% tween completion, which would produce the\r\n\t\t\t\t\t same style value as the element\'s current value. */\r\n\t\t\t\t\tif (!timeStart) {\r\n\t\t\t\t\t\ttimeStart = Velocity.State.calls[i][3] = timeCurrent - 16;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* If a pause object is present, skip processing unless it has been set to resume */\r\n\t\t\t\t\tif (pauseObject) {\r\n\t\t\t\t\t\tif (pauseObject.resume === true) {\r\n\t\t\t\t\t\t\t/* Update the time start to accomodate the paused completion amount */\r\n\t\t\t\t\t\t\ttimeStart = callContainer[3] = Math.round(timeCurrent - millisecondsEllapsed - 16);\r\n\r\n\t\t\t\t\t\t\t/* Remove pause object after processing */\r\n\t\t\t\t\t\t\tcallContainer[5] = null;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tmillisecondsEllapsed = callContainer[6] = timeCurrent - timeStart;\r\n\r\n\t\t\t\t\t/* The tween\'s completion percentage is relative to the tween\'s start time, not the tween\'s start value\r\n\t\t\t\t\t (which would result in unpredictable tween durations since JavaScript\'s timers are not particularly accurate).\r\n\t\t\t\t\t Accordingly, we ensure that percentComplete does not exceed 1. */\r\n\t\t\t\t\tvar percentComplete = Math.min((millisecondsEllapsed) / opts.duration, 1);\r\n\r\n\t\t\t\t\t/**********************\r\n\t\t\t\t\t Element Iteration\r\n\t\t\t\t\t **********************/\r\n\r\n\t\t\t\t\t/* For every call, iterate through each of the elements in its set. */\r\n\t\t\t\t\tfor (var j = 0, callLength = call.length; j < callLength; j++) {\r\n\t\t\t\t\t\tvar tweensContainer = call[j],\r\n\t\t\t\t\t\t\t\telement = tweensContainer.element;\r\n\r\n\t\t\t\t\t\t/* Check to see if this element has been deleted midway through the animation by checking for the\r\n\t\t\t\t\t\t continued existence of its data cache. If it\'s gone, or the element is currently paused, skip animating this element. */\r\n\t\t\t\t\t\tif (!Data(element)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tvar transformPropertyExists = false;\r\n\r\n\t\t\t\t\t\t/**********************************\r\n\t\t\t\t\t\t Display & Visibility Toggling\r\n\t\t\t\t\t\t **********************************/\r\n\r\n\t\t\t\t\t\t/* If the display option is set to non-"none", set it upfront so that the element can become visible before tweening begins.\r\n\t\t\t\t\t\t (Otherwise, display\'s "none" value is set in completeCall() once the animation has completed.) */\r\n\t\t\t\t\t\tif (opts.display !== undefined && opts.display !== null && opts.display !== "none") {\r\n\t\t\t\t\t\t\tif (opts.display === "flex") {\r\n\t\t\t\t\t\t\t\tvar flexValues = ["-webkit-box", "-moz-box", "-ms-flexbox", "-webkit-flex"];\r\n\r\n\t\t\t\t\t\t\t\t$.each(flexValues, function(i, flexValue) {\r\n\t\t\t\t\t\t\t\t\tCSS.setPropertyValue(element, "display", flexValue);\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tCSS.setPropertyValue(element, "display", opts.display);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Same goes with the visibility option, but its "none" equivalent is "hidden". */\r\n\t\t\t\t\t\tif (opts.visibility !== undefined && opts.visibility !== "hidden") {\r\n\t\t\t\t\t\t\tCSS.setPropertyValue(element, "visibility", opts.visibility);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/************************\r\n\t\t\t\t\t\t Property Iteration\r\n\t\t\t\t\t\t ************************/\r\n\r\n\t\t\t\t\t\t/* For every element, iterate through each property. */\r\n\t\t\t\t\t\tfor (var property in tweensContainer) {\r\n\t\t\t\t\t\t\t/* Note: In addition to property tween data, tweensContainer contains a reference to its associated element. */\r\n\t\t\t\t\t\t\tif (tweensContainer.hasOwnProperty(property) && property !== "element") {\r\n\t\t\t\t\t\t\t\tvar tween = tweensContainer[property],\r\n\t\t\t\t\t\t\t\t\t\tcurrentValue,\r\n\t\t\t\t\t\t\t\t\t\t/* Easing can either be a pre-genereated function or a string that references a pre-registered easing\r\n\t\t\t\t\t\t\t\t\t\t on the Velocity.Easings object. In either case, return the appropriate easing *function*. */\r\n\t\t\t\t\t\t\t\t\t\teasing = Type.isString(tween.easing) ? Velocity.Easings[tween.easing] : tween.easing;\r\n\r\n\t\t\t\t\t\t\t\t/******************************\r\n\t\t\t\t\t\t\t\t Current Value Calculation\r\n\t\t\t\t\t\t\t\t ******************************/\r\n\r\n\t\t\t\t\t\t\t\tif (Type.isString(tween.pattern)) {\r\n\t\t\t\t\t\t\t\t\tvar patternReplace = percentComplete === 1 ?\r\n\t\t\t\t\t\t\t\t\t\t\tfunction($0, index, round) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar result = tween.endValue[index];\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\treturn round ? Math.round(result) : result;\r\n\t\t\t\t\t\t\t\t\t\t\t} :\r\n\t\t\t\t\t\t\t\t\t\t\tfunction($0, index, round) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar startValue = tween.startValue[index],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttweenDelta = tween.endValue[index] - startValue,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tresult = startValue + (tweenDelta * easing(percentComplete, opts, tweenDelta));\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\treturn round ? Math.round(result) : result;\r\n\t\t\t\t\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\t\t\tcurrentValue = tween.pattern.replace(/{(\\d+)(!)?}/g, patternReplace);\r\n\t\t\t\t\t\t\t\t} else if (percentComplete === 1) {\r\n\t\t\t\t\t\t\t\t\t/* If this is the last tick pass (if we\'ve reached 100% completion for this tween),\r\n\t\t\t\t\t\t\t\t\t ensure that currentValue is explicitly set to its target endValue so that it\'s not subjected to any rounding. */\r\n\t\t\t\t\t\t\t\t\tcurrentValue = tween.endValue;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t/* Otherwise, calculate currentValue based on the current delta from startValue. */\r\n\t\t\t\t\t\t\t\t\tvar tweenDelta = tween.endValue - tween.startValue;\r\n\r\n\t\t\t\t\t\t\t\t\tcurrentValue = tween.startValue + (tweenDelta * easing(percentComplete, opts, tweenDelta));\r\n\t\t\t\t\t\t\t\t\t/* If no value change is occurring, don\'t proceed with DOM updating. */\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!firstTick && (currentValue === tween.currentValue)) {\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\ttween.currentValue = currentValue;\r\n\r\n\t\t\t\t\t\t\t\t/* If we\'re tweening a fake \'tween\' property in order to log transition values, update the one-per-call variable so that\r\n\t\t\t\t\t\t\t\t it can be passed into the progress callback. */\r\n\t\t\t\t\t\t\t\tif (property === "tween") {\r\n\t\t\t\t\t\t\t\t\ttweenDummyValue = currentValue;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t/******************\r\n\t\t\t\t\t\t\t\t\t Hooks: Part I\r\n\t\t\t\t\t\t\t\t\t ******************/\r\n\t\t\t\t\t\t\t\t\tvar hookRoot;\r\n\r\n\t\t\t\t\t\t\t\t\t/* For hooked properties, the newly-updated rootPropertyValueCache is cached onto the element so that it can be used\r\n\t\t\t\t\t\t\t\t\t for subsequent hooks in this call that are associated with the same root property. If we didn\'t cache the updated\r\n\t\t\t\t\t\t\t\t\t rootPropertyValue, each subsequent update to the root property in this tick pass would reset the previous hook\'s\r\n\t\t\t\t\t\t\t\t\t updates to rootPropertyValue prior to injection. A nice performance byproduct of rootPropertyValue caching is that\r\n\t\t\t\t\t\t\t\t\t subsequently chained animations using the same hookRoot but a different hook can use this cached rootPropertyValue. */\r\n\t\t\t\t\t\t\t\t\tif (CSS.Hooks.registered[property]) {\r\n\t\t\t\t\t\t\t\t\t\thookRoot = CSS.Hooks.getRoot(property);\r\n\r\n\t\t\t\t\t\t\t\t\t\tvar rootPropertyValueCache = Data(element).rootPropertyValueCache[hookRoot];\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (rootPropertyValueCache) {\r\n\t\t\t\t\t\t\t\t\t\t\ttween.rootPropertyValue = rootPropertyValueCache;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t/*****************\r\n\t\t\t\t\t\t\t\t\t DOM Update\r\n\t\t\t\t\t\t\t\t\t *****************/\r\n\r\n\t\t\t\t\t\t\t\t\t/* setPropertyValue() returns an array of the property name and property value post any normalization that may have been performed. */\r\n\t\t\t\t\t\t\t\t\t/* Note: To solve an IE<=8 positioning bug, the unit type is dropped when setting a property value of 0. */\r\n\t\t\t\t\t\t\t\t\tvar adjustedSetData = CSS.setPropertyValue(element, /* SET */\r\n\t\t\t\t\t\t\t\t\t\t\tproperty,\r\n\t\t\t\t\t\t\t\t\t\t\ttween.currentValue + (IE < 9 && parseFloat(currentValue) === 0 ? "" : tween.unitType),\r\n\t\t\t\t\t\t\t\t\t\t\ttween.rootPropertyValue,\r\n\t\t\t\t\t\t\t\t\t\t\ttween.scrollData);\r\n\r\n\t\t\t\t\t\t\t\t\t/*******************\r\n\t\t\t\t\t\t\t\t\t Hooks: Part II\r\n\t\t\t\t\t\t\t\t\t *******************/\r\n\r\n\t\t\t\t\t\t\t\t\t/* Now that we have the hook\'s updated rootPropertyValue (the post-processed value provided by adjustedSetData), cache it onto the element. */\r\n\t\t\t\t\t\t\t\t\tif (CSS.Hooks.registered[property]) {\r\n\t\t\t\t\t\t\t\t\t\t/* Since adjustedSetData contains normalized data ready for DOM updating, the rootPropertyValue needs to be re-extracted from its normalized form. ?? */\r\n\t\t\t\t\t\t\t\t\t\tif (CSS.Normalizations.registered[hookRoot]) {\r\n\t\t\t\t\t\t\t\t\t\t\tData(element).rootPropertyValueCache[hookRoot] = CSS.Normalizations.registered[hookRoot]("extract", null, adjustedSetData[1]);\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tData(element).rootPropertyValueCache[hookRoot] = adjustedSetData[1];\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t/***************\r\n\t\t\t\t\t\t\t\t\t Transforms\r\n\t\t\t\t\t\t\t\t\t ***************/\r\n\r\n\t\t\t\t\t\t\t\t\t/* Flag whether a transform property is being animated so that flushTransformCache() can be triggered once this tick pass is complete. */\r\n\t\t\t\t\t\t\t\t\tif (adjustedSetData[0] === "transform") {\r\n\t\t\t\t\t\t\t\t\t\ttransformPropertyExists = true;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/****************\r\n\t\t\t\t\t\t mobileHA\r\n\t\t\t\t\t\t ****************/\r\n\r\n\t\t\t\t\t\t/* If mobileHA is enabled, set the translate3d transform to null to force hardware acceleration.\r\n\t\t\t\t\t\t It\'s safe to override this property since Velocity doesn\'t actually support its animation (hooks are used in its place). */\r\n\t\t\t\t\t\tif (opts.mobileHA) {\r\n\t\t\t\t\t\t\t/* Don\'t set the null transform hack if we\'ve already done so. */\r\n\t\t\t\t\t\t\tif (Data(element).transformCache.translate3d === undefined) {\r\n\t\t\t\t\t\t\t\t/* All entries on the transformCache object are later concatenated into a single transform string via flushTransformCache(). */\r\n\t\t\t\t\t\t\t\tData(element).transformCache.translate3d = "(0px, 0px, 0px)";\r\n\r\n\t\t\t\t\t\t\t\ttransformPropertyExists = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (transformPropertyExists) {\r\n\t\t\t\t\t\t\tCSS.flushTransformCache(element);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* The non-"none" display value is only applied to an element once -- when its associated call is first ticked through.\r\n\t\t\t\t\t Accordingly, it\'s set to false so that it isn\'t re-processed by this call in the next tick. */\r\n\t\t\t\t\tif (opts.display !== undefined && opts.display !== "none") {\r\n\t\t\t\t\t\tVelocity.State.calls[i][2].display = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (opts.visibility !== undefined && opts.visibility !== "hidden") {\r\n\t\t\t\t\t\tVelocity.State.calls[i][2].visibility = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* Pass the elements and the timing data (percentComplete, msRemaining, timeStart, tweenDummyValue) into the progress callback. */\r\n\t\t\t\t\tif (opts.progress) {\r\n\t\t\t\t\t\topts.progress.call(callContainer[1],\r\n\t\t\t\t\t\t\t\tcallContainer[1],\r\n\t\t\t\t\t\t\t\tpercentComplete,\r\n\t\t\t\t\t\t\t\tMath.max(0, (timeStart + opts.duration) - timeCurrent),\r\n\t\t\t\t\t\t\t\ttimeStart,\r\n\t\t\t\t\t\t\t\ttweenDummyValue);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* If this call has finished tweening, pass its index to completeCall() to handle call cleanup. */\r\n\t\t\t\t\tif (percentComplete === 1) {\r\n\t\t\t\t\t\tcompleteCall(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* Note: completeCall() sets the isTicking flag to false when the last call on Velocity.State.calls has completed. */\r\n\t\t\tif (Velocity.State.isTicking) {\r\n\t\t\t\tticker(tick);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**********************\r\n\t\t Call Completion\r\n\t\t **********************/\r\n\r\n\t\t/* Note: Unlike tick(), which processes all active calls at once, call completion is handled on a per-call basis. */\r\n\t\tfunction completeCall(callIndex, isStopped) {\r\n\t\t\t/* Ensure the call exists. */\r\n\t\t\tif (!Velocity.State.calls[callIndex]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t/* Pull the metadata from the call. */\r\n\t\t\tvar call = Velocity.State.calls[callIndex][0],\r\n\t\t\t\t\telements = Velocity.State.calls[callIndex][1],\r\n\t\t\t\t\topts = Velocity.State.calls[callIndex][2],\r\n\t\t\t\t\tresolver = Velocity.State.calls[callIndex][4];\r\n\r\n\t\t\tvar remainingCallsExist = false;\r\n\r\n\t\t\t/*************************\r\n\t\t\t Element Finalization\r\n\t\t\t *************************/\r\n\r\n\t\t\tfor (var i = 0, callLength = call.length; i < callLength; i++) {\r\n\t\t\t\tvar element = call[i].element;\r\n\r\n\t\t\t\t/* If the user set display to "none" (intending to hide the element), set it now that the animation has completed. */\r\n\t\t\t\t/* Note: display:none isn\'t set when calls are manually stopped (via Velocity("stop"). */\r\n\t\t\t\t/* Note: Display gets ignored with "reverse" calls and infinite loops, since this behavior would be undesirable. */\r\n\t\t\t\tif (!isStopped && !opts.loop) {\r\n\t\t\t\t\tif (opts.display === "none") {\r\n\t\t\t\t\t\tCSS.setPropertyValue(element, "display", opts.display);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opts.visibility === "hidden") {\r\n\t\t\t\t\t\tCSS.setPropertyValue(element, "visibility", opts.visibility);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If the element\'s queue is empty (if only the "inprogress" item is left at position 0) or if its queue is about to run\r\n\t\t\t\t a non-Velocity-initiated entry, turn off the isAnimating flag. A non-Velocity-initiatied queue entry\'s logic might alter\r\n\t\t\t\t an element\'s CSS values and thereby cause Velocity\'s cached value data to go stale. To detect if a queue entry was initiated by Velocity,\r\n\t\t\t\t we check for the existence of our special Velocity.queueEntryFlag declaration, which minifiers won\'t rename since the flag\r\n\t\t\t\t is assigned to jQuery\'s global $ object and thus exists out of Velocity\'s own scope. */\r\n\t\t\t\tvar data = Data(element);\r\n\r\n\t\t\t\tif (opts.loop !== true && ($.queue(element)[1] === undefined || !/\\.velocityQueueEntryFlag/i.test($.queue(element)[1]))) {\r\n\t\t\t\t\t/* The element may have been deleted. Ensure that its data cache still exists before acting on it. */\r\n\t\t\t\t\tif (data) {\r\n\t\t\t\t\t\tdata.isAnimating = false;\r\n\t\t\t\t\t\t/* Clear the element\'s rootPropertyValueCache, which will become stale. */\r\n\t\t\t\t\t\tdata.rootPropertyValueCache = {};\r\n\r\n\t\t\t\t\t\tvar transformHAPropertyExists = false;\r\n\t\t\t\t\t\t/* If any 3D transform subproperty is at its default value (regardless of unit type), remove it. */\r\n\t\t\t\t\t\t$.each(CSS.Lists.transforms3D, function(i, transformName) {\r\n\t\t\t\t\t\t\tvar defaultValue = /^scale/.test(transformName) ? 1 : 0,\r\n\t\t\t\t\t\t\t\t\tcurrentValue = data.transformCache[transformName];\r\n\r\n\t\t\t\t\t\t\tif (data.transformCache[transformName] !== undefined && new RegExp("^\\\\(" + defaultValue + "[^.]").test(currentValue)) {\r\n\t\t\t\t\t\t\t\ttransformHAPropertyExists = true;\r\n\r\n\t\t\t\t\t\t\t\tdelete data.transformCache[transformName];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t/* Mobile devices have hardware acceleration removed at the end of the animation in order to avoid hogging the GPU\'s memory. */\r\n\t\t\t\t\t\tif (opts.mobileHA) {\r\n\t\t\t\t\t\t\ttransformHAPropertyExists = true;\r\n\t\t\t\t\t\t\tdelete data.transformCache.translate3d;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Flush the subproperty removals to the DOM. */\r\n\t\t\t\t\t\tif (transformHAPropertyExists) {\r\n\t\t\t\t\t\t\tCSS.flushTransformCache(element);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/* Remove the "velocity-animating" indicator class. */\r\n\t\t\t\t\t\tCSS.Values.removeClass(element, "velocity-animating");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*********************\r\n\t\t\t\t Option: Complete\r\n\t\t\t\t *********************/\r\n\r\n\t\t\t\t/* Complete is fired once per call (not once per element) and is passed the full raw DOM element set as both its context and its first argument. */\r\n\t\t\t\t/* Note: Callbacks aren\'t fired when calls are manually stopped (via Velocity("stop"). */\r\n\t\t\t\tif (!isStopped && opts.complete && !opts.loop && (i === callLength - 1)) {\r\n\t\t\t\t\t/* We throw callbacks in a setTimeout so that thrown errors don\'t halt the execution of Velocity itself. */\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\topts.complete.call(elements, elements);\r\n\t\t\t\t\t} catch (error) {\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tthrow error;\r\n\t\t\t\t\t\t}, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/**********************\r\n\t\t\t\t Promise Resolving\r\n\t\t\t\t **********************/\r\n\r\n\t\t\t\t/* Note: Infinite loops don\'t return promises. */\r\n\t\t\t\tif (resolver && opts.loop !== true) {\r\n\t\t\t\t\tresolver(elements);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/****************************\r\n\t\t\t\t Option: Loop (Infinite)\r\n\t\t\t\t ****************************/\r\n\r\n\t\t\t\tif (data && opts.loop === true && !isStopped) {\r\n\t\t\t\t\t/* If a rotateX/Y/Z property is being animated by 360 deg with loop:true, swap tween start/end values to enable\r\n\t\t\t\t\t continuous iterative rotation looping. (Otherise, the element would just rotate back and forth.) */\r\n\t\t\t\t\t$.each(data.tweensContainer, function(propertyName, tweenContainer) {\r\n\t\t\t\t\t\tif (/^rotate/.test(propertyName) && ((parseFloat(tweenContainer.startValue) - parseFloat(tweenContainer.endValue)) % 360 === 0)) {\r\n\t\t\t\t\t\t\tvar oldStartValue = tweenContainer.startValue;\r\n\r\n\t\t\t\t\t\t\ttweenContainer.startValue = tweenContainer.endValue;\r\n\t\t\t\t\t\t\ttweenContainer.endValue = oldStartValue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (/^backgroundPosition/.test(propertyName) && parseFloat(tweenContainer.endValue) === 100 && tweenContainer.unitType === "%") {\r\n\t\t\t\t\t\t\ttweenContainer.endValue = 0;\r\n\t\t\t\t\t\t\ttweenContainer.startValue = 100;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tVelocity(element, "reverse", {loop: true, delay: opts.delay});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/***************\r\n\t\t\t\t Dequeueing\r\n\t\t\t\t ***************/\r\n\r\n\t\t\t\t/* Fire the next call in the queue so long as this call\'s queue wasn\'t set to false (to trigger a parallel animation),\r\n\t\t\t\t which would have already caused the next call to fire. Note: Even if the end of the animation queue has been reached,\r\n\t\t\t\t $.dequeue() must still be called in order to completely clear jQuery\'s animation queue. */\r\n\t\t\t\tif (opts.queue !== false) {\r\n\t\t\t\t\t$.dequeue(element, opts.queue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/************************\r\n\t\t\t Calls Array Cleanup\r\n\t\t\t ************************/\r\n\r\n\t\t\t/* Since this call is complete, set it to false so that the rAF tick skips it. This array is later compacted via compactSparseArray().\r\n\t\t\t (For performance reasons, the call is set to false instead of being deleted from the array: http://www.html5rocks.com/en/tutorials/speed/v8/) */\r\n\t\t\tVelocity.State.calls[callIndex] = false;\r\n\r\n\t\t\t/* Iterate through the calls array to determine if this was the final in-progress animation.\r\n\t\t\t If so, set a flag to end ticking and clear the calls array. */\r\n\t\t\tfor (var j = 0, callsLength = Velocity.State.calls.length; j < callsLength; j++) {\r\n\t\t\t\tif (Velocity.State.calls[j] !== false) {\r\n\t\t\t\t\tremainingCallsExist = true;\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (remainingCallsExist === false) {\r\n\t\t\t\t/* tick() will detect this flag upon its next iteration and subsequently turn itself off. */\r\n\t\t\t\tVelocity.State.isTicking = false;\r\n\r\n\t\t\t\t/* Clear the calls array so that its length is reset. */\r\n\t\t\t\tdelete Velocity.State.calls;\r\n\t\t\t\tVelocity.State.calls = [];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/******************\r\n\t\t Frameworks\r\n\t\t ******************/\r\n\r\n\t\t/* Both jQuery and Zepto allow their $.fn object to be extended to allow wrapped elements to be subjected to plugin calls.\r\n\t\t If either framework is loaded, register a "velocity" extension pointing to Velocity\'s core animate() method. Velocity\r\n\t\t also registers itself onto a global container (window.jQuery || window.Zepto || window) so that certain features are\r\n\t\t accessible beyond just a per-element scope. This master object contains an .animate() method, which is later assigned to $.fn\r\n\t\t (if jQuery or Zepto are present). Accordingly, Velocity can both act on wrapped DOM elements and stand alone for targeting raw DOM elements. */\r\n\t\tglobal.Velocity = Velocity;\r\n\r\n\t\tif (global !== window) {\r\n\t\t\t/* Assign the element function to Velocity\'s core animate() method. */\r\n\t\t\tglobal.fn.velocity = animate;\r\n\t\t\t/* Assign the object function\'s defaults to Velocity\'s global defaults object. */\r\n\t\t\tglobal.fn.velocity.defaults = Velocity.defaults;\r\n\t\t}\r\n\r\n\t\t/***********************\r\n\t\t Packaged Redirects\r\n\t\t ***********************/\r\n\r\n\t\t/* slideUp, slideDown */\r\n\t\t$.each(["Down", "Up"], function(i, direction) {\r\n\t\t\tVelocity.Redirects["slide" + direction] = function(element, options, elementsIndex, elementsSize, elements, promiseData) {\r\n\t\t\t\tvar opts = $.extend({}, options),\r\n\t\t\t\t\t\tbegin = opts.begin,\r\n\t\t\t\t\t\tcomplete = opts.complete,\r\n\t\t\t\t\t\tinlineValues = {},\r\n\t\t\t\t\t\tcomputedValues = {height: "", marginTop: "", marginBottom: "", paddingTop: "", paddingBottom: ""};\r\n\r\n\t\t\t\tif (opts.display === undefined) {\r\n\t\t\t\t\t/* Show the element before slideDown begins and hide the element after slideUp completes. */\r\n\t\t\t\t\t/* Note: Inline elements cannot have dimensions animated, so they\'re reverted to inline-block. */\r\n\t\t\t\t\topts.display = (direction === "Down" ? (Velocity.CSS.Values.getDisplayType(element) === "inline" ? "inline-block" : "block") : "none");\r\n\t\t\t\t}\r\n\r\n\t\t\t\topts.begin = function() {\r\n\t\t\t\t\t/* If the user passed in a begin callback, fire it now. */\r\n\t\t\t\t\tif (elementsIndex === 0 && begin) {\r\n\t\t\t\t\t\tbegin.call(elements, elements);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* Cache the elements\' original vertical dimensional property values so that we can animate back to them. */\r\n\t\t\t\t\tfor (var property in computedValues) {\r\n\t\t\t\t\t\tif (!computedValues.hasOwnProperty(property)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tinlineValues[property] = element.style[property];\r\n\r\n\t\t\t\t\t\t/* For slideDown, use forcefeeding to animate all vertical properties from 0. For slideUp,\r\n\t\t\t\t\t\t use forcefeeding to start from computed values and animate down to 0. */\r\n\t\t\t\t\t\tvar propertyValue = CSS.getPropertyValue(element, property);\r\n\t\t\t\t\t\tcomputedValues[property] = (direction === "Down") ? [propertyValue, 0] : [0, propertyValue];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* Force vertical overflow content to clip so that sliding works as expected. */\r\n\t\t\t\t\tinlineValues.overflow = element.style.overflow;\r\n\t\t\t\t\telement.style.overflow = "hidden";\r\n\t\t\t\t};\r\n\r\n\t\t\t\topts.complete = function() {\r\n\t\t\t\t\t/* Reset element to its pre-slide inline values once its slide animation is complete. */\r\n\t\t\t\t\tfor (var property in inlineValues) {\r\n\t\t\t\t\t\tif (inlineValues.hasOwnProperty(property)) {\r\n\t\t\t\t\t\t\telement.style[property] = inlineValues[property];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* If the user passed in a complete callback, fire it now. */\r\n\t\t\t\t\tif (elementsIndex === elementsSize - 1) {\r\n\t\t\t\t\t\tif (complete) {\r\n\t\t\t\t\t\t\tcomplete.call(elements, elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (promiseData) {\r\n\t\t\t\t\t\t\tpromiseData.resolver(elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tVelocity(element, computedValues, opts);\r\n\t\t\t};\r\n\t\t});\r\n\r\n\t\t/* fadeIn, fadeOut */\r\n\t\t$.each(["In", "Out"], function(i, direction) {\r\n\t\t\tVelocity.Redirects["fade" + direction] = function(element, options, elementsIndex, elementsSize, elements, promiseData) {\r\n\t\t\t\tvar opts = $.extend({}, options),\r\n\t\t\t\t\t\tcomplete = opts.complete,\r\n\t\t\t\t\t\tpropertiesMap = {opacity: (direction === "In") ? 1 : 0};\r\n\r\n\t\t\t\t/* Since redirects are triggered individually for each element in the animated set, avoid repeatedly triggering\r\n\t\t\t\t callbacks by firing them only when the final element has been reached. */\r\n\t\t\t\tif (elementsIndex !== 0) {\r\n\t\t\t\t\topts.begin = null;\r\n\t\t\t\t}\r\n\t\t\t\tif (elementsIndex !== elementsSize - 1) {\r\n\t\t\t\t\topts.complete = null;\r\n\t\t\t\t} else {\r\n\t\t\t\t\topts.complete = function() {\r\n\t\t\t\t\t\tif (complete) {\r\n\t\t\t\t\t\t\tcomplete.call(elements, elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (promiseData) {\r\n\t\t\t\t\t\t\tpromiseData.resolver(elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If a display was passed in, use it. Otherwise, default to "none" for fadeOut or the element-specific default for fadeIn. */\r\n\t\t\t\t/* Note: We allow users to pass in "null" to skip display setting altogether. */\r\n\t\t\t\tif (opts.display === undefined) {\r\n\t\t\t\t\topts.display = (direction === "In" ? "auto" : "none");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tVelocity(this, propertiesMap, opts);\r\n\t\t\t};\r\n\t\t});\r\n\r\n\t\treturn Velocity;\r\n\t}((window.jQuery || window.Zepto || window), window, (window ? window.document : undefined));\r\n}));\r\n\r\n/******************\r\n Known Issues\r\n ******************/\r\n\r\n/* The CSS spec mandates that the translateX/Y/Z transforms are %-relative to the element itself -- not its parent.\r\n Velocity, however, doesn\'t make this distinction. Thus, converting to or from the % unit with these subproperties\r\n will produce an inaccurate conversion value. The same issue exists with the cx/cy attributes of SVG circles and ellipses. */\r\n\n\n//# sourceURL=webpack://HsNavScroller/./node_modules/velocity-animate/velocity.js?')},"./src/js/hs-nav-scroller.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return HsNavScroller; });\n/* harmony import */ var velocity_animate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! velocity-animate */ \"./node_modules/velocity-animate/velocity.js\");\n/* harmony import */ var velocity_animate__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(velocity_animate__WEBPACK_IMPORTED_MODULE_0__);\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n* HSNavScroller Plugin\n* @version: 2.0.0 (Sat, 06 Jul 2021)\n* @requires: Velocity 1.5.2 or later\n* @author: HtmlStream\n* @license: Htmlstream Libraries (https://htmlstream.com/)\n* Copyright 2021 Htmlstream\n*/\n\nvar dataAttributeName = 'data-hs-nav-scroller-options';\nvar defaults = {\n type: 'horizontal',\n target: '.active',\n offset: 0,\n delay: 20\n};\n\nvar HsNavScroller = /*#__PURE__*/function () {\n function HsNavScroller(el, options, id) {\n _classCallCheck(this, HsNavScroller);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(HsNavScroller, [{\n key: \"_init\",\n value: function _init() {\n var that = this;\n\n var _loop = function _loop(i) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty('$initializedEl')) {\n return \"continue\";\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options;\n\n if (_options.type == 'vertical') {\n velocity_animate__WEBPACK_IMPORTED_MODULE_0___default()(_$el, 'scroll', {\n container: _$el,\n offset: _$el.querySelector(_options.target).offsetTop - _options.offset,\n duration: _options.delay,\n axis: 'y'\n });\n } else if (_options.type == 'horizontal') {\n _options.nav = _$el.querySelector('.nav');\n _options.prev = _$el.querySelector('.hs-nav-scroller-arrow-prev');\n _options.next = _$el.querySelector('.hs-nav-scroller-arrow-next');\n _options.activeElementLeftPosition = _options.nav.querySelector(_options.target).offsetLeft;\n _options.scrollMaxLeft = parseInt((_options.nav.scrollWidth.toFixed() - _options.nav.clientWidth).toFixed());\n _options.scrollPosition = _options.nav.scrollLeft;\n\n if (_options.scrollPosition <= 0) {\n _options.prev.style.display = 'none';\n }\n\n if (_options.scrollMaxLeft <= 0) {\n _options.next.style.display = 'none';\n }\n\n that.onResize(_$el, _options);\n window.addEventListener('resize', function () {\n return that.onResize(_$el, _options);\n });\n\n var navRect = _options.nav.getBoundingClientRect(),\n prevRect = _options.prev.getBoundingClientRect(),\n nextRect = _options.next.getBoundingClientRect();\n\n if (_options.activeElementLeftPosition > navRect.width / 2) {\n velocity_animate__WEBPACK_IMPORTED_MODULE_0___default()(_options.nav, 'scroll', {\n container: _options.nav,\n offset: _options.activeElementLeftPosition - _options.offset - prevRect.width,\n duration: _options.delay,\n axis: 'x'\n });\n }\n\n _options.next.addEventListener('click', function () {\n velocity_animate__WEBPACK_IMPORTED_MODULE_0___default()(_options.nav, 'scroll', {\n container: _options.nav,\n offset: _options.scrollPosition + _options.nav.clientWidth - nextRect.width,\n duration: _options.delay,\n axis: 'x'\n });\n });\n\n _options.prev.addEventListener('click', function () {\n velocity_animate__WEBPACK_IMPORTED_MODULE_0___default()(_options.nav, 'scroll', {\n container: _options.nav,\n offset: _options.scrollPosition - _options.nav.clientWidth + prevRect.width,\n duration: _options.delay,\n axis: 'x'\n });\n });\n\n _options.nav.addEventListener('scroll', function () {\n var scrollMaxLeft = (parseInt(_options.nav.scrollWidth.toFixed()) - parseInt(_options.nav.clientWidth)).toFixed(),\n scrollPosition = _options.nav.scrollLeft; // Hide or Show Back Arrow\n\n if (scrollPosition <= 0) {\n _options.prev.style.display = 'none';\n } else {\n _options.prev.style.display = 'flex';\n } // Hide or Show Next Arrow\n\n\n if (scrollPosition >= scrollMaxLeft) {\n _options.next.style.display = 'none';\n } else {\n _options.next.style.display = 'flex';\n }\n });\n }\n };\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var _ret = _loop(i);\n\n if (_ret === \"continue\") continue;\n }\n }\n }, {\n key: \"onResize\",\n value: function onResize($el, settings) {\n var scrollMaxLeft = parseInt(settings.nav.scrollWidth.toFixed()) - parseInt(settings.nav.clientWidth.toFixed()),\n scrollPosition = settings.nav.scrollLeft;\n\n if (scrollPosition <= 0) {\n settings.prev.style.display = 'none';\n } else {\n settings.prev.style.display = 'flex';\n }\n\n if (scrollMaxLeft <= 0) {\n settings.next.style.display = 'none';\n } else {\n settings.next.style.display = 'flex';\n }\n }\n }, {\n key: \"addToCollection\",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: Object.assign({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: \"getItem\",\n value: function getItem(item) {\n if (typeof item === 'number') {\n return this.collection[item].$initializedEl;\n } else {\n return this.collection.find(function (el) {\n return el.id === item;\n }).$initializedEl;\n }\n }\n }]);\n\n return HsNavScroller;\n}();\n\n\n\n//# sourceURL=webpack://HsNavScroller/./src/js/hs-nav-scroller.js?")}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-nav-scroller.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSFileAttach=e():t.HSFileAttach=e()}(window,(function(){return d={"./src/js/hs-file-attach.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return HSFileAttach; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n* HSFileAttach Plugin\n* @version: 3.0.0 (Mon, 22 Feb 2021)\n* @author: HtmlStream\n* @event-namespace: .HSFileAttach\n* @license: Htmlstream Libraries (https://htmlstream.com/)\n* Copyright 2019 Htmlstream\n*/\nvar dataAttributeName = 'data-hs-file-attach-options';\nvar defaults = {\n textTarget: null,\n maxFileSize: 1024,\n // Infinity - off file size detection\n errorMessage: 'File is too big!',\n typeErrorMessage: 'Unsupported file type',\n mode: 'simple',\n targetAttr: null,\n resetTarget: null,\n allowTypes: []\n};\n\nvar HSFileAttach = /*#__PURE__*/function () {\n function HSFileAttach(el, options, id) {\n _classCallCheck(this, HSFileAttach);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(HSFileAttach, [{\n key: \"_init\",\n value: function _init() {\n var _this = this;\n\n var that = this;\n\n var _loop = function _loop(i) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty('$initializedEl')) {\n return \"continue\";\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options;\n _options.$target = document.querySelector(_options.textTarget);\n\n function getFileExtension(filename) {\n return /[.]/.exec(filename) ? /[^.]+$/.exec(filename)[0] : null;\n }\n\n _$el.addEventListener('change', function (e) {\n if (_$el.value === '') {\n return;\n }\n\n if (e.target.files[0].size > _options.maxFileSize * 1024) {\n alert(_options.errorMessage);\n return e.target.value = '';\n }\n\n if (_options.allowTypes.length > 0) {\n var type = '.' + getFileExtension(e.target.files[0].name);\n\n if (!type || !_options.allowTypes.includes(type.toLowerCase())) {\n alert(_options.typeErrorMessage);\n return e.target.value = '';\n }\n }\n\n if (_options.mode === 'image') {\n _this.image(_$el, _options);\n } else {\n _this.simple(_$el, _options);\n }\n });\n\n _options.resetTarget ? document.querySelector(_options.resetTarget).addEventListener('click', function () {\n _$el.value = '';\n\n _options.$target.setAttribute(_options.targetAttr, _options.resetImg);\n }) : null;\n };\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var _ret = _loop(i);\n\n if (_ret === \"continue\") continue;\n }\n }\n }, {\n key: \"simple\",\n value: function simple($el, settings) {\n settings.textContent = $el.value.replace(/.+[\\\\\\/]/, '');\n }\n }, {\n key: \"image\",\n value: function image($el, settings) {\n var reader;\n\n if ($el.files && $el.files[0]) {\n reader = new FileReader();\n\n reader.onload = function (e) {\n settings.$target.setAttribute(settings.targetAttr, e.target.result);\n };\n\n reader.readAsDataURL($el.files[0]);\n }\n }\n }, {\n key: \"addToCollection\",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: Object.assign({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: \"getItem\",\n value: function getItem(item) {\n if (typeof item === 'number') {\n return this.collection[item].$initializedEl;\n } else {\n return this.collection.find(function (el) {\n return el.id === item;\n }).$initializedEl;\n }\n }\n }]);\n\n return HSFileAttach;\n}();\n\n\n\n//# sourceURL=webpack://HSFileAttach/./src/js/hs-file-attach.js?")}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-file-attach.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSAddField=e():t.HSAddField=e()}(window,(function(){return d={"./src/js/hs-add-field.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSAddField; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n* HSAddField Plugin\n* @version: 2.0.1 (Jul, 31 Nov 2021)\n* @author: HtmlStream\n* @event-namespace: .HSAddField\n* @license: Htmlstream Libraries (https://htmlstream.com/)\n* Copyright 2021 Htmlstream\n*/\nvar dataAttributeName = \'data-hs-add-field-options\';\nvar defaults = {\n createTrigger: \'.js-create-field\',\n deleteTrigger: \'.js-delete-field\',\n limit: 5,\n defaultCreated: 1,\n nameSeparator: \'_\',\n addedField: function addedField() {},\n deletedField: function deletedField() {}\n};\n\nvar HSAddField = /*#__PURE__*/function () {\n function HSAddField(el, options, id) {\n _classCallCheck(this, HSAddField);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(HSAddField, [{\n key: "_init",\n value: function _init() {\n var that = this;\n\n var _loop = function _loop(i) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty(\'$initializedEl\')) {\n return "continue";\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options;\n _options.flags = {\n name: \'data-name\',\n "delete": \'data-hs-add-field-delete\'\n };\n _options.fieldsCount = 0;\n _options.fieldsCount = _options.defaultCreated;\n _options.tempalte = document.querySelector(_options.template);\n _options.contaienr = _$el.querySelector(_options.container);\n\n for (key = 0; key < _options.defaultCreated; key++) {\n that.addField(_$el, _options);\n }\n\n _$el.addEventListener(\'click\', function (e) {\n if (e.target.closest(_options.createTrigger)) {\n that.addField(_$el, _options);\n } else if (e.target.closest(_options.deleteTrigger)) {\n that.deleteField(_$el, _options, e.target.closest(_options.deleteTrigger).getAttribute(_options.flags["delete"]));\n }\n });\n };\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var key;\n\n var _ret = _loop(i);\n\n if (_ret === "continue") continue;\n }\n }\n }, {\n key: "addField",\n value: function addField($el, settings) {\n var that = this;\n\n if (settings.fieldsCount < settings.limit) {\n var field = settings.tempalte.cloneNode(true);\n field.removeAttribute(\'id\');\n field.style.display = null;\n settings.contaienr.appendChild(field);\n that.updateFieldsCount($el, settings);\n that.renderName($el, settings);\n that.renderKeys($el, settings);\n that.toggleCreateButton($el, settings);\n settings.addedField(field);\n }\n }\n }, {\n key: "deleteField",\n value: function deleteField($el, settings, index) {\n var that = this;\n\n if (settings.fieldsCount > 0) {\n settings.contaienr.childNodes[index].parentNode.removeChild(settings.contaienr.childNodes[index]);\n that.updateFieldsCount($el, settings);\n that.renderName($el, settings);\n that.renderKeys($el, settings);\n that.toggleCreateButton($el, settings);\n settings.deletedField();\n }\n }\n }, {\n key: "renderName",\n value: function renderName($el, settings) {\n settings.contaienr.childNodes.forEach(function (el, key) {\n if (el.nodeName === \'#text\') return;\n var field = el.querySelector("[".concat(settings.flags.name, "]"));\n if (!field) return;\n field.setAttribute(\'name\', "".concat(field.getAttribute(\'data-name\')).concat(settings.nameSeparator).concat(key));\n });\n }\n }, {\n key: "renderKeys",\n value: function renderKeys($el, settings) {\n settings.contaienr.childNodes.forEach(function (el, key) {\n if (el.nodeName === \'#text\') return;\n var deleteTrigger = el.querySelector(settings.deleteTrigger);\n deleteTrigger ? deleteTrigger.setAttribute(settings.flags["delete"], key) : null;\n });\n }\n }, {\n key: "updateFieldsCount",\n value: function updateFieldsCount($el, settings) {\n settings.fieldsCount = settings.contaienr.childNodes.length;\n }\n }, {\n key: "toggleCreateButton",\n value: function toggleCreateButton($el, settings) {\n var createTrigger = $el.querySelector(settings.createTrigger);\n\n if (settings.fieldsCount === settings.limit) {\n createTrigger.style.display = \'none\';\n } else {\n createTrigger.style.display = null;\n }\n }\n }, {\n key: "addToCollection",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: Object.assign({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: "getItem",\n value: function getItem(item) {\n if (typeof item === \'number\') {\n return this.collection[item].$initializedEl;\n } else {\n return this.collection.find(function (el) {\n return el.id === item;\n }).$initializedEl;\n }\n }\n }]);\n\n return HSAddField;\n}();\n\n\n\n//# sourceURL=webpack://HSAddField/./src/js/hs-add-field.js?')}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-add-field.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Quill=e():t.Quill=e()}("undefined"!=typeof self?self:this,(function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=45)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),s=n(48),a=n(49),l=n(50),u=n(51),c=n(52),d=n(11),h=n(29),p=n(30),f=n(28),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:u.default,Scroll:s.default,Block:l.default,Inline:a.default,Text:c.default,Attributor:{Attribute:d.default,Class:h.default,Style:p.default,Store:f.default}};e.default=g},function(t,e,n){"use strict";function r(t,e){var n;if(void 0===e&&(e=s.ANY),"string"==typeof t)n=c[t]||a[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&s.LEVEL&s.BLOCK?n=c.block:t&s.LEVEL&s.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=l[r[i]])break;n=n||u[t.tagName]}return null==n?null:e&s.LEVEL&n.scope&&e&s.TYPE&n.scope?n:null}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return i(e,t),e}(Error);e.ParchmentError=o;var s,a={},l={},u={},c={};e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(s=e.Scope||(e.Scope={})),e.create=function(t,e){var n=r(t);if(null==n)throw new o("Unable to create "+t+" blot");var i=n;return new i(t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(e),e)},e.find=function t(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:r?t(n.parentNode,r):null},e.query=r,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map((function(e){return t(e)}));var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new o("Invalid definition");if("abstract"===r.blotName)throw new o("Cannot register abstract class");if(c[r.blotName||r.attrName]=r,"string"==typeof r.keyName)a[r.keyName]=r;else if(null!=r.className&&(l[r.className]=r),null!=r.tagName){Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(t){return t.toUpperCase()})):r.tagName=r.tagName.toUpperCase();var i=Array.isArray(r.tagName)?r.tagName:[r.tagName];i.forEach((function(t){null!=u[t]&&null!=r.className||(u[t]=r)}))}return r}},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},a=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e,i=n.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!i&&!o)return!1;for(e in t);return void 0===e||n.call(t,e)},l=function(t,e){i&&"__proto__"===e.name?i(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},u=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(o)return o(t,e).value}return t[e]};t.exports=function t(){var e,n,r,i,o,c,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(null!=(e=arguments[h]))for(n in e)r=u(d,n),d!==(i=u(e,n))&&(f&&i&&(a(i)||(o=s(i)))?(o?(o=!1,c=r&&s(r)?r:[]):c=r&&a(r)?r:{},l(d,{name:n,newValue:t(f,c,i)})):void 0!==i&&l(d,{name:n,newValue:i}));return d}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,c.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:a(t.parent,e))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},c=r(n(2)),d=r(n(4)),h=r(n(0)),p=r(n(14)),f=r(n(5)),m=r(n(8)),g=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return s(e,t),l(e,[{key:"attach",value:function(){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new h.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new d.default).insert(this.value(),(0,c.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=h.default.query(t,h.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,r){this.format(n,r)}},{key:"insertAt",value:function(t,n,r){if("string"==typeof n&&n.endsWith("\n")){var i=h.default.create(v.blotName);this.parent.insertBefore(i,0===t?this:this.next),i.insertAt(0,n.slice(0,-1))}else u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r)}}]),e}(h.default.Embed);g.scope=h.default.Scope.BLOCK_BLOT;var v=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return s(e,t),l(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(h.default.Leaf).reduce((function(t,e){return 0===e.length()?t:t.insert(e.value(),a(e))}),new d.default).insert("\n",a(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,r,i){n<=0||(h.default.query(r,h.default.Scope.BLOCK)?t+n===this.length()&&this.format(r,i):u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),r,i),this.cache={})}},{key:"insertAt",value:function(t,n,r){if(null!=r)return u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);if(0!==n.length){var i=n.split("\n"),o=i.shift();o.length>0&&(t<this.length()-1||null==this.children.tail?u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});var s=this;i.reduce((function(t,e){return(s=s.split(t,!0)).insertAt(0,e),e.length}),t+o.length)}}},{key:"insertBefore",value:function(t,n){var r=this.children.head;u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),r instanceof p.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},i}}]),e}(h.default.Block);v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[f.default,h.default.Embed,m.default],e.bubbleFormats=a,e.BlockEmbed=g,e.default=v},function(t,e,n){var r=n(54),i=n(12),o=n(2),s=n(20),a=String.fromCharCode(0),l=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(i(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+s.length(e):e.delete?t-e.delete:t}),0)},l.prototype.length=function(){return this.reduce((function(t,e){return t+s.length(e)}),0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=s.iterator(this.ops),i=0;i<e&&r.hasNext();){var o;i<t?o=r.next(t-i):(o=r.next(e-i),n.push(o)),i+=s.length(o)}return new l(n)},l.prototype.compose=function(t){var e=s.iterator(this.ops),n=s.iterator(t.ops),r=[],o=n.peek();if(null!=o&&"number"==typeof o.retain&&null==o.attributes){for(var a=o.retain;"insert"===e.peekType()&&e.peekLength()<=a;)a-=e.peekLength(),r.push(e.next());o.retain-a>0&&n.next(o.retain-a)}for(var u=new l(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),d=e.next(c),h=n.next(c);if("number"==typeof h.retain){var p={};"number"==typeof d.retain?p.retain=c:p.insert=d.insert;var f=s.attributes.compose(d.attributes,h.attributes,"number"==typeof d.retain);if(f&&(p.attributes=f),u.push(p),!n.hasNext()&&i(u.ops[u.ops.length-1],p)){var m=new l(e.rest());return u.concat(m).chop()}}else"number"==typeof h.delete&&"number"==typeof d.retain&&u.push(h)}return u.chop()},l.prototype.concat=function(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),o=new l,u=r(n[0],n[1],e),c=s.iterator(this.ops),d=s.iterator(t.ops);return u.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(d.peekLength(),e),o.push(d.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),d.peekLength(),e);var a=c.next(n),l=d.next(n);i(a.insert,l.insert)?o.retain(n,s.attributes.diff(a.attributes,l.attributes)):o.push(l).delete(n)}e-=n}})),o.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=s.iterator(this.ops),r=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),a=s.length(o)-n.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(e,a)-a:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===t(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&t(r,{},i)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=s.iterator(this.ops),r=s.iterator(t.ops),i=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),a=n.next(o),u=r.next(o);if(a.delete)continue;u.delete?i.push(u):i.retain(o,s.attributes.transform(a.attributes,u.attributes,e))}else i.retain(s.length(n.next()));return i.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=s.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r<t||!e)&&(t+=i),r+=i):t-=Math.min(i,t-r)}return t},t.exports=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},l=r(n(8)),u=r(n(0)),c=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),s(e,[{key:"formatAt",value:function(t,n,r,i){if(e.compare(this.statics.blotName,r)<0&&u.default.query(r,u.default.Scope.BLOT)){var o=this.isolate(t,n);i&&o.wrap(r,i)}else a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,i)}},{key:"optimize",value:function(t){if(a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),i=e.order.indexOf(n);return r>=0||i>=0?r-i:t===n?0:t<n?-1:1}}]),e}(u.default.Inline);c.allowedChildren=[c,u.default.Embed,l.default],c.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if((e=(0,b.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==k.DEFAULTS.theme){if(e.theme=k.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=x.default;var n=(0,b.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=k.import("modules/"+e);return null==n?S.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,b.default)(!0,{},k.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function a(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===m.default.sources.USER)return new p.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,s=t();if(null!=i&&(!0===n&&(n=i.index),null==r?i=u(i,s,e):0!==r&&(i=u(i,n,r,e)),this.setSelection(i,m.default.sources.SILENT)),s.length()>0){var a,l,c=[m.default.events.TEXT_CHANGE,s,o,e];if((a=this.emitter).emit.apply(a,[m.default.events.EDITOR_CHANGE].concat(c)),e!==m.default.sources.SILENT)(l=this.emitter).emit.apply(l,c)}return s}function l(t,e,n,r,i){var o={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":c(n))?(o=n,i=r):"string"==typeof n&&(null!=r?o[n]=r:i=n),[t,e,o,i=i||m.default.sources.API]}function u(t,e,n,r){if(null==t)return null;var i=void 0,o=void 0;if(e instanceof p.default){var s=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==m.default.sources.USER)})),a=d(s,2);i=a[0],o=a[1]}else{var l=[t.index,t.index+t.length].map((function(t){return t<e||t===e&&r===m.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)})),u=d(l,2);i=u[0],o=u[1]}return new y.Range(i,o-i)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},h=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(53);var p=r(n(4)),f=r(n(57)),m=r(n(9)),g=r(n(7)),v=r(n(0)),y=n(22),_=r(y),b=r(n(2)),w=r(n(10)),x=r(n(32)),S=(0,w.default)("quill"),k=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o(this,t),this.options=s(e,r),this.container=this.options.container,null==this.container)return S.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new m.default,this.scroll=v.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new f.default(this.scroll),this.selection=new _.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(m.default.events.EDITOR_CHANGE,(function(t){t===m.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(m.default.events.SCROLL_UPDATE,(function(t,e){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;a.call(n,(function(){return n.editor.update(null,e,i)}),t)}));var l=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<p><br></p></div>");this.setContents(l),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return h(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),w.default.level(t)}},{key:"find",value:function(t){return t.__quill||v.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&S.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var i=t.attrName||t.blotName;"string"==typeof i?this.register("formats/"+i,t,e):Object.keys(t).forEach((function(r){n.register(r,t[r],e)}))}else null==this.imports[t]||r||S.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?v.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),h(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,i=l(t,e,n),o=d(i,4);return t=o[0],e=o[1],n=o[3],a.call(this,(function(){return r.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m.default.sources.API;return a.call(this,(function(){var r=n.getSelection(!0),o=new p.default;if(null==r)return o;if(v.default.query(t,v.default.Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,i({},t,e));else{if(0===r.length)return n.selection.format(t,e),o;o=n.editor.formatText(r.index,r.length,i({},t,e))}return n.setSelection(r,m.default.sources.SILENT),o}),r)}},{key:"formatLine",value:function(t,e,n,r,i){var o,s=this,u=l(t,e,n,r,i),c=d(u,4);return t=c[0],e=c[1],o=c[2],i=c[3],a.call(this,(function(){return s.editor.formatLine(t,e,o)}),i,t,0)}},{key:"formatText",value:function(t,e,n,r,i){var o,s=this,u=l(t,e,n,r,i),c=d(u,4);return t=c[0],e=c[1],o=c[2],i=c[3],a.call(this,(function(){return s.editor.formatText(t,e,o)}),i,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=l(t,e),r=d(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=l(t,e),r=d(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return a.call(this,(function(){return i.editor.insertEmbed(e,n,r)}),o,e)}},{key:"insertText",value:function(t,e,n,r,i){var o,s=this,u=l(t,0,n,r,i),c=d(u,4);return t=c[0],o=c[2],i=c[3],a.call(this,(function(){return s.editor.insertText(t,e,o)}),i,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,i=l(t,e,n),o=d(i,4);return t=o[0],e=o[1],n=o[3],a.call(this,(function(){return r.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m.default.sources.API;return a.call(this,(function(){t=new p.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),i=e.editor.applyDelta(t),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),i.delete(1)),r.compose(i)}),n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var i=l(e,n,r),o=d(i,4);e=o[0],n=o[1],r=o[3],this.selection.setRange(new y.Range(e,n),r),r!==m.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m.default.sources.API,n=(new p.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m.default.sources.API;return a.call(this,(function(){return t=new p.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();k.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},k.events=m.default.events,k.sources=m.default.sources,k.version="1.3.7",k.imports={delta:p.default,parchment:v.default,"core/module":g.default,"core/theme":x.default},e.expandConfig=s,e.overload=l,e.default=k},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.quill=e,this.options=n};i.DEFAULTS={},e.default=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(0)).default.Text);e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=r(n(58)),a=(0,r(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(t){document.addEventListener(t,(function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)}))}))}));var l=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.listeners={},t.on("error",a.error),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"emit",value:function(){a.log.apply(a,arguments),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];(this.listeners[t.type]||[]).forEach((function(e){var r=e.node,i=e.handler;(t.target===r||r.contains(t.target))&&i.apply(void 0,[t].concat(n))}))}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}(s.default);l.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},l.sources={API:"api",SILENT:"silent",USER:"user"},e.default=l},function(t,e,n){"use strict";function r(t){if(o.indexOf(t)<=o.indexOf(s)){for(var e,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(e=console)[t].apply(e,r)}}function i(t){return o.reduce((function(e,n){return e[n]=r.bind(console,n,t),e}),{})}Object.defineProperty(e,"__esModule",{value:!0});var o=["error","warn","log","info"],s="warn";r.level=i.level=function(t){s=t},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=i},function(t,e,n){function r(t){return null==t}function i(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}var o=Array.prototype.slice,s=n(55),a=n(56),l=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var u,c;if(r(t)||r(e))return!1;if(t.prototype!==e.prototype)return!1;if(a(t))return!!a(e)&&(t=o.call(t),e=o.call(e),l(t,e,n));if(i(t)){if(!i(e))return!1;if(t.length!==e.length)return!1;for(u=0;u<t.length;u++)if(t[u]!==e[u])return!1;return!0}try{var d=s(t),h=s(e)}catch(t){return!1}if(d.length!=h.length)return!1;for(d.sort(),h.sort(),u=d.length-1;u>=0;u--)if(d[u]!=h[u])return!1;for(u=d.length-1;u>=0;u--)if(c=d[u],!l(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var a=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},c=r(n(4)),d=r(n(0)),h=r(n(3)),p=r(n(5)),f=r(n(8)),m=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return s(e,t),e}(p.default);m.blotName="code",m.tagName="CODE";var g=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return s(e,t),l(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce((function(e,n){return e.insert(n).insert("\n",t.formats())}),new c.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var r=this.descendant(f.default,this.length()-1),i=a(r,1)[0];null!=i&&i.deleteAt(i.length()-1,1),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,r,i){if(0!==n&&null!=d.default.query(r,d.default.Scope.BLOCK)&&(r!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var o=this.newlineIndex(t);if(!(o<0||o>=t+n)){var s=this.newlineIndex(t,!0)+1,a=o-s+1,l=this.isolate(s,a),u=l.next;l.format(r,i),u instanceof e&&u.formatAt(0,t-s+n-a,r,i)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(f.default,t),i=a(r,2),o=i[0],s=i[1];o.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(d.default.create("text","\n")),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=d.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof d.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=u(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(h.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",e.Code=m,e.default=g},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"insertInto",value:function(t,n){0===t.children.length?function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(0)).default.Embed);s.blotName="break",s.tagName="BR",e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){var n=document.createElement("a");n.href=t;var r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},l=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),s(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=a(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return o(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(5)).default);l.blotName="link",l.tagName="A",l.SANITIZED_URL="about:blank",l.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=l,e.sanitize=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=r(n(25)),l=r(n(106)),u=0,c=function(){function t(e){var n=this;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(function(){n.togglePicker()})),this.label.addEventListener("keydown",(function(t){switch(t.keyCode){case a.default.keys.ENTER:n.togglePicker();break;case a.default.keys.ESCAPE:n.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return s(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),i(this.label,"aria-expanded"),i(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",(function(){e.selectItem(n,!0)})),n.addEventListener("keydown",(function(t){switch(t.keyCode){case a.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case a.default.keys.ESCAPE:e.escape(),t.preventDefault()}})),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=l.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+u,u+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach((function(n){var r=t.buildItem(n);e.appendChild(r),!0===n.selected&&t.selectItem(r)})),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach((function(e){t.container.setAttribute(e.name,e.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout((function(){return t.label.focus()}),1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":o(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";function r(t){var e=a.find(t);if(null==e)try{e=a.create(t)}catch(n){e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach((function(t){e.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(47),s=n(27),a=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return i(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.build=function(){var t=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(e){try{var n=r(e);t.insertBefore(n,t.children.head||void 0)}catch(t){if(t instanceof a.ParchmentError)return;throw t}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){var r=this.children.find(n),i=r[0],o=r[1];return null==t.blotName&&t(i)||null!=t.blotName&&i instanceof t?[i,o]:i instanceof e?i.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,(function(n,r,s){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&i.push(n),n instanceof e&&(i=i.concat(n.descendants(t,r,o))),o-=s})),i},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,(function(t,e,i){t.formatAt(e,i,n,r)}))},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),i=r[0],o=r[1];if(i)i.insertAt(o,e,n);else{var s=null==n?a.create("text",e):a.create(e,n);this.appendChild(s)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(e){return t instanceof e})))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=a.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),i=r[0],o=r[1],s=[[this,t]];return i instanceof e?s.concat(i.path(o,n)):(null!=i&&s.push([i,o]),s)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),(function(t,r,i){t=t.split(r,e),n.appendChild(t)})),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,i=[],o=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(i.push.apply(i,t.addedNodes),o.push.apply(o,t.removedNodes))})),o.forEach((function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=a.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),i.filter((function(t){return t.parentNode==n.domNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=a.find(t.nextSibling));var i=r(t);i.next==e&&null!=i.next||(null!=i.parent&&i.parent.removeChild(n),n.insertBefore(i,e||void 0))}))},e}(s.default);e.default=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),o=n(28),s=n(17),a=n(1),l=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new o.default(n.domNode),n}return r(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=a.query(t);n instanceof i.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,r){var i=t.prototype.wrap.call(this,n,r);return i instanceof e&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},e}(s.default);e.default=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(27),o=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=o.Scope.INLINE_BLOT,e}(i.default);e.default=s},function(t,e,n){function r(t){this.ops=t,this.index=0,this.offset=0}var i=n(12),o=n(2),s={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=o(!0,{},e);for(var i in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[i]&&void 0===e[i]&&(r[i]=t[i]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,r){return i(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new r(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=s.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),"number"==typeof e.retain?i.retain=t:"string"==typeof e.insert?i.insert=e.insert.substr(n,t):i.insert=e.insert,i}return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?s.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},r.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=s},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}function e(n,a,l,u,c){"object"==typeof a&&(l=a.depth,u=a.prototype,c=a.includeNonEnumerable,a=a.circular);var d=[],h=[],p="undefined"!=typeof Buffer;return void 0===a&&(a=!0),void 0===l&&(l=1/0),function n(l,f){if(null===l)return null;if(0===f)return l;var m,g;if("object"!=typeof l)return l;if(t(l,i))m=new i;else if(t(l,o))m=new o;else if(t(l,s))m=new s((function(t,e){l.then((function(e){t(n(e,f-1))}),(function(t){e(n(t,f-1))}))}));else if(e.__isArray(l))m=[];else if(e.__isRegExp(l))m=new RegExp(l.source,r(l)),l.lastIndex&&(m.lastIndex=l.lastIndex);else if(e.__isDate(l))m=new Date(l.getTime());else{if(p&&Buffer.isBuffer(l))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(m),m;t(l,Error)?m=Object.create(l):void 0===u?(g=Object.getPrototypeOf(l),m=Object.create(g)):(m=Object.create(u),g=u)}if(a){var v=d.indexOf(l);if(-1!=v)return h[v];d.push(l),h.push(m)}for(var y in t(l,i)&&l.forEach((function(t,e){var r=n(e,f-1),i=n(t,f-1);m.set(r,i)})),t(l,o)&&l.forEach((function(t){var e=n(t,f-1);m.add(e)})),l){var _;g&&(_=Object.getOwnPropertyDescriptor(g,y)),_&&null==_.set||(m[y]=n(l[y],f-1))}if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(l);for(y=0;y<b.length;y++){var w=b[y];(!(S=Object.getOwnPropertyDescriptor(l,w))||S.enumerable||c)&&(m[w]=n(l[w],f-1),S.enumerable||Object.defineProperty(m,w,{enumerable:!1}))}}if(c){var x=Object.getOwnPropertyNames(l);for(y=0;y<x.length;y++){var S,k=x[y];(S=Object.getOwnPropertyDescriptor(l,k))&&S.enumerable||(m[k]=n(l[k],f-1),Object.defineProperty(m,k,{enumerable:!1}))}}return m}(n,l)}function n(t){return Object.prototype.toString.call(t)}function r(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}var i,o,s;try{i=Map}catch(t){i=function(){}}try{o=Set}catch(t){o=function(){}}try{s=Promise}catch(t){s=function(){}}return e.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},e.__objToStr=n,e.__isDate=function(t){return"object"==typeof t&&"[object Date]"===n(t)},e.__isArray=function(t){return"object"==typeof t&&"[object Array]"===n(t)},e.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===n(t)},e.__getRegExpFlags=r,e}();"object"==typeof t&&t.exports&&(t.exports=n)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var a=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=r(n(0)),c=r(n(21)),d=r(n(12)),h=r(n(9)),p=(0,r(n(10)).default)("quill:selection"),f=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;o(this,t),this.index=e,this.length=n},m=function(){function t(e,n){var r=this;o(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=u.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,h.default.sources.USER),1)})),this.emitter.on(h.default.events.EDITOR_CHANGE,(function(t,e){t===h.default.events.TEXT_CHANGE&&e.length()>0&&r.update(h.default.sources.SILENT)})),this.emitter.on(h.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(h.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(h.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,i=n.startNode,o=n.startOffset,s=n.endNode,a=n.endOffset;r.setNativeRange(i,o,s,a)}})),this.update(h.default.sources.SILENT)}return l(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(h.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!u.default.query(t,u.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=u.default.find(n.start.node,!1);if(null==r)return;if(r instanceof u.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,i=this.scroll.leaf(t),o=a(i,2),s=o[0],l=o[1];if(null==s)return null;var u=s.position(l,!0),c=a(u,2);r=c[0],l=c[1];var d=document.createRange();if(e>0){d.setStart(r,l);var h=this.scroll.leaf(t+e),p=a(h,2);if(s=p[0],l=p[1],null==s)return null;var f=s.position(l,!0),m=a(f,2);return r=m[0],l=m[1],d.setEnd(r,l),d.getBoundingClientRect()}var g="left",v=void 0;return r instanceof Text?(l<r.data.length?(d.setStart(r,l),d.setEnd(r,l+1)):(d.setStart(r,l-1),d.setEnd(r,l),g="right"),v=d.getBoundingClientRect()):(v=s.domNode.getBoundingClientRect(),l>0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return p.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var r=n.map((function(t){var n=a(t,2),r=n[0],i=n[1],o=u.default.find(r,!0),s=o.offset(e.scroll);return 0===i?s:o instanceof u.default.Container?s+o.length():s+o.index(r,i)})),o=Math.min(Math.max.apply(Math,i(r)),this.scroll.length()-1),s=Math.min.apply(Math,[o].concat(i(r)));return new f(s,o-s)}},{key:"normalizeNative",value:function(t){if(!s(this.root,t.startContainer)||!t.collapsed&&!s(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],i=this.scroll.length();return n.forEach((function(t,n){t=Math.min(i-1,t);var o,s=e.scroll.leaf(t),l=a(s,2),u=l[0],c=l[1],d=u.position(c,0!==n),h=a(d,2);o=h[0],c=h[1],r.push(o,c)})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,i=this.scroll.line(Math.min(e.index,r)),o=a(i,1)[0],s=o;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,r));s=a(l,1)[0]}if(null!=o&&null!=s){var u=t.getBoundingClientRect();n.top<u.top?t.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var s=(this.getNativeRange()||{}).native;if(null==s||i||t!==s.startContainer||e!==s.startOffset||n!==s.endContainer||r!==s.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(t,e),a.setEnd(n,r),o.removeAllRanges(),o.addRange(a)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.default.sources.API;if("string"==typeof e&&(n=e,e=!1),p.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,i(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.default.sources.USER,e=this.lastRange,n=this.getRange(),r=a(n,2),i=r[0],o=r[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,d.default)(e,this.lastRange)){var s;!this.composing&&null!=o&&o.native.collapsed&&o.start.node!==this.cursor.textNode&&this.cursor.restore();var l,u=[h.default.events.SELECTION_CHANGE,(0,c.default)(this.lastRange),(0,c.default)(e),t];if((s=this.emitter).emit.apply(s,[h.default.events.EDITOR_CHANGE].concat(u)),t!==h.default.sources.SILENT)(l=this.emitter).emit.apply(l,u)}}}]),t}();e.Range=f,e.default=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var s=r(n(0)),a=n(3),l=r(a),u=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(s.default.Container);u.allowedChildren=[l.default,a.BlockEmbed,u],e.default=u},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),a=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"value",value:function(t){var n=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map((function(t){return("00"+parseInt(t).toString(16)).slice(-2)})).join(""):n}}]),e}(s.default.Attributor.Style),l=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),u=new a("color","color",{scope:s.default.Scope.INLINE});e.ColorAttributor=a,e.ColorClass=l,e.ColorStyle=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){var n,r=t===T.keys.LEFT?"prefix":"suffix";return i(n={key:t,shiftKey:e,altKey:null},r,/^$/),i(n,"handler",(function(n){var r=n.index;t===T.keys.RIGHT&&(r+=n.length+1);var i=this.quill.getLeaf(r);return!(f(i,1)[0]instanceof w.default.Embed&&(t===T.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,x.default.sources.USER):this.quill.setSelection(n.index-1,x.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,x.default.sources.USER):this.quill.setSelection(n.index+n.length+1,x.default.sources.USER),1))})),n}function s(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),r=f(n,1)[0],i={};if(0===e.offset){var o=this.quill.getLine(t.index-1),s=f(o,1)[0];if(null!=s&&s.length()>1){var a=r.formats(),l=this.quill.getFormat(t.index-1,1);i=b.default.attributes.diff(a,l)||{}}}var u=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-u,u,x.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index-u,u,i,x.default.sources.USER),this.quill.focus()}}function a(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},i=0,o=this.quill.getLine(t.index),s=f(o,1)[0];if(e.offset>=s.length()-1){var a=this.quill.getLine(t.index+1),l=f(a,1)[0];if(l){var u=s.formats(),c=this.quill.getFormat(t.index,1);r=b.default.attributes.diff(u,c)||{},i=l.length()}}this.quill.deleteText(t.index,n,x.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+i-1,n,r,x.default.sources.USER)}}function l(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),i=e[e.length-1].formats();n=b.default.attributes.diff(i,r)||{}}this.quill.deleteText(t,x.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,x.default.sources.USER),this.quill.setSelection(t.index,x.default.sources.SILENT),this.quill.focus()}function u(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce((function(t,n){return w.default.query(n,w.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",r,x.default.sources.USER),this.quill.setSelection(t.index+1,x.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],x.default.sources.USER))}))}function c(t){return{key:T.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=w.default.query("code-block"),r=e.index,i=e.length,o=this.quill.scroll.descendant(n,r),s=f(o,2),a=s[0],l=s[1];if(null!=a){var u=this.quill.getIndex(a),c=a.newlineIndex(l,!0)+1,d=a.newlineIndex(u+l+i),h=a.domNode.textContent.slice(c,d).split("\n");l=0,h.forEach((function(e,o){t?(a.insertAt(c+l,n.TAB),l+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):e.startsWith(n.TAB)&&(a.deleteAt(c+l,n.TAB.length),l-=n.TAB.length,0===o?r-=n.TAB.length:i-=n.TAB.length),l+=e.length+1})),this.quill.update(x.default.sources.USER),this.quill.setSelection(r,i,x.default.sources.SILENT)}}}}function d(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],x.default.sources.USER)}}}function h(t){if("string"==typeof t||"number"==typeof t)return h({key:t});if("object"===(void 0===t?"undefined":p(t))&&(t=(0,g.default)(t,!1)),"string"==typeof t.key)if(null!=T.keys[t.key.toUpperCase()])t.key=T.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[E]=t.shortKey,delete t.shortKey),t}Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},m=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),g=r(n(21)),v=r(n(12)),y=r(n(2)),_=r(n(4)),b=r(n(20)),w=r(n(0)),x=r(n(6)),S=r(n(10)),k=r(n(7)),C=(0,S.default)("quill:keyboard"),E=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",T=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.bindings={},Object.keys(r.options.bindings).forEach((function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&r.options.bindings[e]&&r.addBinding(r.options.bindings[e])})),r.addBinding({key:e.keys.ENTER,shiftKey:null},u),r.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},s),r.addBinding({key:e.keys.DELETE},{collapsed:!0},a)):(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},s),r.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},a)),r.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},l),r.addBinding({key:e.keys.DELETE},{collapsed:!1},l),r.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},s),r.listen(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),m(e,null,[{key:"match",value:function(t,e){return e=h(e),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&e.key===(t.which||t.keyCode)}}]),m(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=h(t);if(null==r||null==r.key)return C.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,y.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var r=n.which||n.keyCode,i=(t.bindings[r]||[]).filter((function(t){return e.match(n,t)}));if(0!==i.length){var o=t.quill.getSelection();if(null!=o&&t.quill.hasFocus()){var s=t.quill.getLine(o.index),a=f(s,2),l=a[0],u=a[1],c=t.quill.getLeaf(o.index),d=f(c,2),h=d[0],m=d[1],g=0===o.length?[h,m]:t.quill.getLeaf(o.index+o.length),y=f(g,2),_=y[0],b=y[1],x=h instanceof w.default.Text?h.value().slice(0,m):"",S=_ instanceof w.default.Text?_.value().slice(b):"",k={collapsed:0===o.length,empty:0===o.length&&l.length()<=1,format:t.quill.getFormat(o),offset:u,prefix:x,suffix:S};i.some((function(e){if(null!=e.collapsed&&e.collapsed!==k.collapsed)return!1;if(null!=e.empty&&e.empty!==k.empty)return!1;if(null!=e.offset&&e.offset!==k.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==k.format[t]})))return!1}else if("object"===p(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=k.format[t]:!1===e.format[t]?null==k.format[t]:(0,v.default)(e.format[t],k.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(k.prefix)||null!=e.suffix&&!e.suffix.test(k.suffix)||!0===e.handler.call(t,o,k))}))&&n.preventDefault()}}}}))}}]),e}(k.default);T.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},T.DEFAULTS={bindings:{bold:d("bold"),italic:d("italic"),underline:d("underline"),indent:{key:T.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",x.default.sources.USER)}},outdent:{key:T.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",x.default.sources.USER)}},"outdent backspace":{key:T.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",x.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,x.default.sources.USER)}},"indent code-block":c(!0),"outdent code-block":c(!1),"remove tab":{key:T.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,x.default.sources.USER)}},tab:{key:T.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new _.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,x.default.sources.SILENT)}},"list empty enter":{key:T.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,x.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,x.default.sources.USER)}},"checklist enter":{key:T.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=f(e,2),r=n[0],i=n[1],o=(0,y.default)({},r.formats(),{list:"checked"}),s=(new _.default).retain(t.index).insert("\n",o).retain(r.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,x.default.sources.USER),this.quill.setSelection(t.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:T.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=f(n,2),i=r[0],o=r[1],s=(new _.default).retain(t.index).insert("\n",e.format).retain(i.length()-o-1).retain(1,{header:null});this.quill.updateContents(s,x.default.sources.USER),this.quill.setSelection(t.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),i=f(r,2),o=i[0],s=i[1];if(s>n)return!0;var a=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(t.index," ",x.default.sources.USER),this.quill.history.cutoff();var l=(new _.default).retain(t.index-s).delete(n+1).retain(o.length()-2-s).retain(1,{list:a});this.quill.updateContents(l,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,x.default.sources.SILENT)}},"code exit":{key:T.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=f(e,2),r=n[0],i=n[1],o=(new _.default).retain(t.index+r.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(o,x.default.sources.USER)}},"embed left":o(T.keys.LEFT,!1),"embed left shift":o(T.keys.LEFT,!0),"embed right":o(T.keys.RIGHT,!1),"embed right shift":o(T.keys.RIGHT,!0)}},e.default=T,e.SHORTKEY=E},function(t,e,n){"use strict";t.exports={align:{"":n(75),center:n(76),right:n(77),justify:n(78)},background:n(79),blockquote:n(80),bold:n(81),clean:n(82),code:n(40),"code-block":n(40),color:n(83),direction:{"":n(84),rtl:n(85)},float:{center:n(86),full:n(87),left:n(88),right:n(89)},formula:n(90),header:{1:n(91),2:n(92)},italic:n(93),image:n(94),indent:{"+1":n(95),"-1":n(96)},link:n(97),list:{ordered:n(98),bullet:n(99),check:n(100)},script:{sub:n(101),super:n(102)},strike:n(103),underline:n(104),video:n(105)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,i){var o=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var s=r.create(this.statics.scope);o.wrap(s),s.format(n,i)}},t.prototype.insertAt=function(t,e,n){var i=null==n?r.create("text",e):r.create(e,n),o=this.split(t);this.parent.insertBefore(i,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(11),i=n(29),o=n(30),s=n(1),a=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=i.default.keys(this.domNode),a=o.default.keys(this.domNode);e.concat(n).concat(a).forEach((function(e){var n=s.query(e,s.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=a},function(t,e,n){"use strict";function r(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){r(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(r(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(11).default);e.default=o},function(t,e,n){"use strict";function r(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[r(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[r(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[r(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(11).default);e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=r(n(0)),l=r(n(8)),u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.selection=n,r.textNode=document.createTextNode(e.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),s(e,null,[{key:"value",value:function(){}}]),s(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var r=this,i=0;null!=r&&r.statics.scope!==a.default.Scope.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=e.CONTENTS.length,r.optimize(),r.formatAt(i,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),r=void 0,o=void 0,s=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var u=[t,n.start.offset,n.end.offset];r=u[0],o=u[1],s=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var c=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof l.default?(r=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=e.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var d=[o,s].map((function(t){return Math.max(0,Math.min(r.data.length,t-1))})),h=i(d,2);return o=h[0],s=h[1],{startNode:r,startOffset:o,endNode:r,endOffset:s}}}}},{key:"update",value:function(t,e){var n=this;if(t.some((function(t){return"characterData"===t.type&&t.target===n.textNode}))){var r=this.restore();r&&(e.range=r)}}},{key:"value",value:function(){return""}}]),e}(a.default.Embed);u.blotName="cursor",u.className="ql-cursor",u.tagName="span",u.CONTENTS="\ufeff",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(e,n){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.quill=e,this.options=n,this.modules={}}return r(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach((function(e){null==t.modules[e]&&t.addModule(e)}))}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();i.DEFAULTS={modules:{}},i.themes={default:i},e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=r(n(0)),s=r(n(8)),a="\ufeff",l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(t){n.contentNode.appendChild(t)})),n.leftGuard=document.createTextNode(a),n.rightGuard=document.createTextNode(a),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,r=t.data.split(a).join("");if(t===this.leftGuard)if(this.prev instanceof s.default){var i=this.prev.length();this.prev.insertAt(i,r),e={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this),e={startNode:n,startOffset:r.length};else t===this.rightGuard&&(this.next instanceof s.default?(this.next.insertAt(0,r),e={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this.next),e={startNode:n,startOffset:r.length}));return t.data=a,e}},{key:"update",value:function(t,e){var n=this;t.forEach((function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var r=n.restore(t.target);r&&(e.range=r)}}))}}]),e}(o.default.Embed);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),i={scope:r.default.Scope.BLOCK,whitelist:["right","center","justify"]},o=new r.default.Attributor.Attribute("align","align",i),s=new r.default.Attributor.Class("align","ql-align",i),a=new r.default.Attributor.Style("align","text-align",i);e.AlignAttribute=o,e.AlignClass=s,e.AlignStyle=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),i=n(24),o=new r.default.Attributor.Class("background","ql-bg",{scope:r.default.Scope.INLINE}),s=new i.ColorAttributor("background","background-color",{scope:r.default.Scope.INLINE});e.BackgroundClass=o,e.BackgroundStyle=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),i={scope:r.default.Scope.BLOCK,whitelist:["rtl"]},o=new r.default.Attributor.Attribute("direction","dir",i),s=new r.default.Attributor.Class("direction","ql-direction",i),a=new r.default.Attributor.Style("direction","direction",i);e.DirectionAttribute=o,e.DirectionClass=s,e.DirectionStyle=a},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),a={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},l=new s.default.Attributor.Class("font","ql-font",a),u=new(function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"value",value:function(t){return function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}(s.default.Attributor.Style))("font","font-family",a);e.FontStyle=u,e.FontClass=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),i=new r.default.Attributor.Class("size","ql-size",{scope:r.default.Scope.INLINE,whitelist:["small","large","huge"]}),o=new r.default.Attributor.Style("size","font-size",{scope:r.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=i,e.SizeStyle=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},a=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"optimize",value:function(t){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return s(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(5)).default);a.blotName="bold",a.tagName=["STRONG","B"],e.default=a},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},o=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(t){t.classList.add("ql-primary")})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"buildItem",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var r=this.label.querySelector(".ql-color-label"),o=t&&t.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=o:r.style.fill=o)}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(16)).default);e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),(function(t){t.innerHTML=n[t.getAttribute("data-value")||""]})),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"selectItem",value:function(t,n){(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(16)).default);e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(e,n){var r=this;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"})),this.hide()}return r(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=e+o+"px"),i.left<r.left&&(o=r.left-i.left,this.root.style.left=e+o+"px"),i.bottom>r.bottom){var s=i.bottom-i.top,a=t.bottom-t.top+s;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=r(n(2)),c=r(n(4)),d=r(n(9)),h=r(n(25)),p=r(n(32)),f=r(n(41)),m=r(n(42)),g=r(n(16)),v=r(n(43)),y=[!1,"center","right","justify"],_=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],b=[!1,"serif","monospace"],w=["1","2","3",!1],x=["small",!1,"large","huge"],S=function(t){function e(t,n){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,(function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach((function(t){t.container.contains(n.target)||t.close()}))})),r}return s(e,t),l(e,[{key:"addModule",value:function(t){var n=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach((function(t){(t.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}}))}))}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map((function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&a(t,y),new m.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&a(t,_,"background"===n?"#ffffff":"#000000"),new f.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?a(t,b):t.classList.contains("ql-header")?a(t,w):t.classList.contains("ql-size")&&a(t,x)),new g.default(t)}));this.quill.on(d.default.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(t){t.update()}))}))}}]),e}(p.default);S.DEFAULTS=(0,u.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",(function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var r=t.quill.getSelection(!0);t.quill.updateContents((new c.default).retain(r.index).delete(r.length).insert({image:n.target.result}),d.default.sources.USER),t.quill.setSelection(r.index+1,d.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}})),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var k=function(t){function e(t,n){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return s(e,t),l(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",(function(e){h.default.match(e,"enter")?(t.save(),e.preventDefault()):h.default.match(e,"escape")&&(t.cancel(),e.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,d.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,d.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":t=function(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t}(t);case"formula":if(!t)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,d.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",d.default.sources.USER),this.quill.setSelection(r+2,d.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(v.default);e.BaseTooltip=k,e.default=S},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(46)),o=n(34),s=n(36),a=n(62),l=r(n(63)),u=r(n(64)),c=n(65),d=r(c),h=n(35),p=n(24),f=n(37),m=n(38),g=r(n(39)),v=r(n(66)),y=r(n(15)),_=r(n(67)),b=r(n(68)),w=r(n(69)),x=r(n(70)),S=r(n(71)),k=n(13),C=r(k),E=r(n(72)),T=r(n(73)),P=r(n(74)),O=r(n(26)),A=r(n(16)),M=r(n(41)),L=r(n(42)),I=r(n(43)),j=r(n(107)),D=r(n(108));i.default.register({"attributors/attribute/direction":s.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":h.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":s.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":m.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":h.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":s.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":m.SizeStyle},!0),i.default.register({"formats/align":o.AlignClass,"formats/direction":s.DirectionClass,"formats/indent":a.IndentClass,"formats/background":h.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":f.FontClass,"formats/size":m.SizeClass,"formats/blockquote":l.default,"formats/code-block":C.default,"formats/header":u.default,"formats/list":d.default,"formats/bold":g.default,"formats/code":k.Code,"formats/italic":v.default,"formats/link":y.default,"formats/script":_.default,"formats/strike":b.default,"formats/underline":w.default,"formats/image":x.default,"formats/video":S.default,"formats/list/item":c.ListItem,"modules/formula":E.default,"modules/syntax":T.default,"modules/toolbar":P.default,"themes/bubble":j.default,"themes/snow":D.default,"ui/icons":O.default,"ui/picker":A.default,"ui/icon-picker":L.default,"ui/color-picker":M.default,"ui/tooltip":I.default},!0),e.default=i.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(0)),o=r(n(6)),s=n(3),a=r(s),l=r(n(14)),u=r(n(23)),c=r(n(31)),d=r(n(33)),h=r(n(5)),p=r(n(59)),f=r(n(8)),m=r(n(60)),g=r(n(61)),v=r(n(25));o.default.register({"blots/block":a.default,"blots/block/embed":s.BlockEmbed,"blots/break":l.default,"blots/container":u.default,"blots/cursor":c.default,"blots/embed":d.default,"blots/inline":h.default,"blots/scroll":p.default,"blots/text":f.default,"modules/clipboard":m.default,"modules/history":g.default,"modules/keyboard":v.default}),i.default.register(a.default,l.default,c.default,h.default,p.default,f.default),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(t<i||e&&t===i&&(null==n.next||0!==n.next.length()))return[n,t];t-=i}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var r,i=this.find(t),o=i[0],s=t-i[1],a=this.iterator(o);(r=a())&&s<t+e;){var l=r.length();t>s?n(r,t-s,Math.min(e,s+l-t)):n(r,0,Math.min(l,t+e-s)),s+=l}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),o=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},a=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,s),n.attach(),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,i){this.update(),t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var s=[].slice.call(this.observer.takeRecords());s.length>0;)e.push(s.pop());for(var a=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[o.DATA_KEY].mutations&&(t.domNode[o.DATA_KEY].mutations=[]),e&&a(t.parent))},l=function(t){null!=t.domNode[o.DATA_KEY]&&null!=t.domNode[o.DATA_KEY].mutations&&(t instanceof i.default&&t.children.forEach(l),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=o.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(a(o.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=o.find(t,!1);a(e,!1),e instanceof i.default&&e.children.forEach((function(t){a(t,!1)}))}))):"attributes"===t.type&&a(e.prev)),a(e))})),this.children.forEach(l),s=(u=[].slice.call(this.observer.takeRecords())).slice();s.length>0;)e.push(s.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=o.find(t.target,!0);return null==e?null:null==e.domNode[o.DATA_KEY].mutations?(e.domNode[o.DATA_KEY].mutations=[t],e):(e.domNode[o.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==r&&null!=t.domNode[o.DATA_KEY]&&t.update(t.domNode[o.DATA_KEY].mutations||[],n)})),null!=this.domNode[o.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[o.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=o.Scope.BLOCK_BLOT,e.tagName="DIV",e}(i.default);e.default=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),o=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach((function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,r,i){null!=this.formats()[r]||o.query(r,o.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=o.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),o=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var r=o.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=o.query(n,o.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,i){null!=o.query(r,o.Scope.BLOCK)?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=o.query(n,o.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var i=this.split(e),s=o.create(n,r);i.parent.insertBefore(s,i)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=o.Scope.BLOCK_BLOT,e.tagName="P",e}(i.default);e.default=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,i){0===e&&n===this.length()?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=i},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(19),o=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=o.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=o.Scope.INLINE_BLOT,e}(i.default);e.default=s},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:i.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;o<r;o++)if(e=n[o],t.call(i,e,o,n))return e}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(t,e){function n(t,e,n){if(t==e)return t?[[p,t]]:[];(n<0||t.length<n)&&(n=null);var i=s(t,e),o=t.substring(0,i);i=a(t=t.substring(i),e=e.substring(i));var l=t.substring(t.length-i),c=r(t=t.substring(0,t.length-i),e=e.substring(0,e.length-i));return o&&c.unshift([p,o]),l&&c.push([p,l]),function t(e){e.push([p,""]);for(var n,r=0,i=0,o=0,l="",u="";r<e.length;)switch(e[r][0]){case h:o++,u+=e[r][1],r++;break;case d:i++,l+=e[r][1],r++;break;case p:i+o>1?(0!==i&&0!==o&&(0!==(n=s(u,l))&&(r-i-o>0&&e[r-i-o-1][0]==p?e[r-i-o-1][1]+=u.substring(0,n):(e.splice(0,0,[p,u.substring(0,n)]),r++),u=u.substring(n),l=l.substring(n)),0!==(n=a(u,l))&&(e[r][1]=u.substring(u.length-n)+e[r][1],u=u.substring(0,u.length-n),l=l.substring(0,l.length-n))),0===i?e.splice(r-o,i+o,[h,u]):0===o?e.splice(r-i,i+o,[d,l]):e.splice(r-i-o,i+o,[d,l],[h,u]),r=r-i-o+(i?1:0)+(o?1:0)+1):0!==r&&e[r-1][0]==p?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,o=0,i=0,l="",u=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(r=1;r<e.length-1;)e[r-1][0]==p&&e[r+1][0]==p&&(e[r][1].substring(e[r][1].length-e[r-1][1].length)==e[r-1][1]?(e[r][1]=e[r-1][1]+e[r][1].substring(0,e[r][1].length-e[r-1][1].length),e[r+1][1]=e[r-1][1]+e[r+1][1],e.splice(r-1,1),c=!0):e[r][1].substring(0,e[r+1][1].length)==e[r+1][1]&&(e[r-1][1]+=e[r+1][1],e[r][1]=e[r][1].substring(e[r+1][1].length)+e[r+1][1],e.splice(r+1,1),c=!0)),r++;c&&t(e)}(c),null!=n&&(c=u(c,n)),function(t){for(var e=!1,n=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},r=2;r<t.length;r+=1)t[r-2][0]===p&&function(t){return t.charCodeAt(t.length-1)>=55296&&t.charCodeAt(t.length-1)<=56319}(t[r-2][1])&&t[r-1][0]===d&&n(t[r-1][1])&&t[r][0]===h&&n(t[r][1])&&(e=!0,t[r-1][1]=t[r-2][1].slice(-1)+t[r-1][1],t[r][1]=t[r-2][1].slice(-1)+t[r][1],t[r-2][1]=t[r-2][1].slice(0,-1));if(!e)return t;var i=[];for(r=0;r<t.length;r+=1)t[r][1].length>0&&i.push(t[r]);return i}(c)}function r(t,e){var r;if(!t)return[[h,e]];if(!e)return[[d,t]];var o=t.length>e.length?t:e,s=t.length>e.length?e:t,a=o.indexOf(s);if(-1!=a)return r=[[h,o.substring(0,a)],[p,s],[h,o.substring(a+s.length)]],t.length>e.length&&(r[0][0]=r[2][0]=d),r;if(1==s.length)return[[d,t],[h,e]];var u=l(t,e);if(u){var c=u[0],f=u[1],m=u[2],g=u[3],v=u[4],y=n(c,m),_=n(f,g);return y.concat([[p,v]],_)}return i(t,e)}function i(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),s=i,a=2*i,l=new Array(a),u=new Array(a),c=0;c<a;c++)l[c]=-1,u[c]=-1;l[s+1]=0,u[s+1]=0;for(var p=n-r,f=p%2!=0,m=0,g=0,v=0,y=0,_=0;_<i;_++){for(var b=-_+m;b<=_-g;b+=2){for(var w=s+b,x=(T=b==-_||b!=_&&l[w-1]<l[w+1]?l[w+1]:l[w-1]+1)-b;T<n&&x<r&&t.charAt(T)==e.charAt(x);)T++,x++;if(l[w]=T,T>n)g+=2;else if(x>r)m+=2;else if(f){if((C=s+p-b)>=0&&C<a&&-1!=u[C])if(T>=(k=n-u[C]))return o(t,e,T,x)}}for(var S=-_+v;S<=_-y;S+=2){for(var k,C=s+S,E=(k=S==-_||S!=_&&u[C-1]<u[C+1]?u[C+1]:u[C-1]+1)-S;k<n&&E<r&&t.charAt(n-k-1)==e.charAt(r-E-1);)k++,E++;if(u[C]=k,k>n)y+=2;else if(E>r)v+=2;else if(!f){if((w=s+p-S)>=0&&w<a&&-1!=l[w]){var T;x=s+(T=l[w])-w;if(T>=(k=n-k))return o(t,e,T,x)}}}}return[[d,t],[h,e]]}function o(t,e,r,i){var o=t.substring(0,r),s=e.substring(0,i),a=t.substring(r),l=e.substring(i),u=n(o,s),c=n(a,l);return u.concat(c)}function s(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;n<i;)t.substring(o,i)==e.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function a(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;n<i;)t.substring(t.length-i,t.length-o)==e.substring(e.length-i,e.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function l(t,e){function n(t,e,n){for(var r,i,o,l,u=t.substring(n,n+Math.floor(t.length/4)),c=-1,d="";-1!=(c=e.indexOf(u,c+1));){var h=s(t.substring(n),e.substring(c)),p=a(t.substring(0,n),e.substring(0,c));d.length<p+h&&(d=e.substring(c-p,c)+e.substring(c,c+h),r=t.substring(0,n-p),i=t.substring(n+h),o=e.substring(0,c-p),l=e.substring(c+h))}return 2*d.length>=t.length?[r,i,o,l,d]:null}var r=t.length>e.length?t:e,i=t.length>e.length?e:t;if(r.length<4||2*i.length<r.length)return null;var o,l,u,c,d,h=n(r,i,Math.ceil(r.length/4)),p=n(r,i,Math.ceil(r.length/2));return h||p?(o=p?h&&h[4].length>p[4].length?h:p:h,t.length>e.length?(l=o[0],u=o[1],c=o[2],d=o[3]):(c=o[0],d=o[1],l=o[2],u=o[3]),[l,u,c,d,o[4]]):null}function u(t,e){var n=function(t,e){if(0===e)return[p,t];for(var n=0,r=0;r<t.length;r++){var i=t[r];if(i[0]===d||i[0]===p){var o=n+i[1].length;if(e===o)return[r+1,t];if(e<o){t=t.slice();var s=e-n,a=[i[0],i[1].slice(0,s)],l=[i[0],i[1].slice(s)];return t.splice(r,1,a,l),[r+1,t]}n=o}}throw new Error("cursor_pos is out of bounds!")}(t,e),r=n[1],i=n[0],o=r[i],s=r[i+1];if(null==o)return t;if(o[0]!==p)return t;if(null!=s&&o[1]+s[1]===s[1]+o[1])return r.splice(i,2,s,o),c(r,i,2);if(null!=s&&0===s[1].indexOf(o[1])){r.splice(i,2,[s[0],o[1]],[0,o[1]]);var a=s[1].slice(o[1].length);return a.length>0&&r.splice(i+2,0,[s[0],a]),c(r,i,3)}return t}function c(t,e,n){for(var r=e+n-1;r>=0&&r>=e-1;r--)if(r+1<t.length){var i=t[r],o=t[r+1];i[0]===o[1]&&t.splice(r,2,[i[0],i[1]+o[1]])}return t}var d=-1,h=1,p=0,f=n;f.INSERT=h,f.DELETE=d,f.EQUAL=p,t.exports=f},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){function n(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function r(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}var i="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();(e=t.exports=i?n:r).supported=n,e.unsupported=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){return Object.keys(e).reduce((function(n,r){return null==t[r]||(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]]),n}),{})}Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=r(n(4)),u=r(n(20)),c=r(n(0)),d=r(n(13)),h=r(n(31)),p=n(3),f=r(p),m=r(n(14)),g=r(n(21)),v=r(n(12)),y=r(n(2)),_=/^[ -~]*$/,b=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.scroll=e,this.delta=this.getDelta()}return a(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var r=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce((function(t,e){if(1===e.insert){var n=(0,g.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,g.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)}),new l.default)}(t)).reduce((function(t,i){var a=i.retain||i.delete||i.insert.length||1,l=i.attributes||{};if(null!=i.insert){if("string"==typeof i.insert){var d=i.insert;d.endsWith("\n")&&n&&(n=!1,d=d.slice(0,-1)),t>=r&&!d.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,d);var h=e.scroll.line(t),m=s(h,2),g=m[0],v=m[1],_=(0,y.default)({},(0,p.bubbleFormats)(g));if(g instanceof f.default){var b=g.descendant(c.default.Leaf,v),w=s(b,1)[0];_=(0,y.default)(_,(0,p.bubbleFormats)(w))}l=u.default.attributes.diff(_,l)||{}}else if("object"===o(i.insert)){var x=Object.keys(i.insert)[0];if(null==x)return t;e.scroll.insertAt(t,x,i.insert[x])}r+=a}return Object.keys(l).forEach((function(n){e.scroll.formatAt(t,a,n,l[n])})),t+a}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new l.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(t,Math.max(e,1)),s=e;o.forEach((function(e){var o=e.length();if(e instanceof d.default){var a=t-e.offset(n.scroll),l=e.newlineIndex(a+s)-a+1;e.formatAt(a,l,i,r[i])}else e.format(i,r[i]);s-=o}))}})),this.scroll.optimize(),this.update((new l.default).retain(t).retain(e,(0,g.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e,i,r[i])})),this.update((new l.default).retain(t).retain(e,(0,g.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new l.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){var e=s(t,1)[0];e instanceof f.default?n.push(e):e instanceof c.default.Leaf&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(c.default.Leaf,t,e));var o=[n,r].map((function(t){if(0===t.length)return{};for(var e=(0,p.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=i((0,p.bubbleFormats)(n),e)}return e}));return y.default.apply(y.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new l.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e.length,i,r[i])})),this.update((new l.default).retain(t).insert(e,(0,g.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===f.default.blotName&&!(t.children.length>1)&&t.children.head instanceof m.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),i=s(r,2),o=i[0],a=i[1],u=0,c=new l.default;null!=o&&(u=o instanceof d.default?o.newlineIndex(a)-a+1:o.length()-a,c=o.delta().slice(a,a+u-1).insert("\n"));var h=this.getContents(t,e+u).diff((new l.default).insert(n).concat(c)),p=(new l.default).retain(t).concat(h);return this.applyDelta(p)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(_)&&c.default.find(e[0].target)){var i=c.default.find(e[0].target),o=(0,p.bubbleFormats)(i),s=i.offset(this.scroll),a=e[0].oldValue.replace(h.default.CONTENTS,""),u=(new l.default).insert(a),d=(new l.default).insert(i.value());t=(new l.default).retain(s).concat(u.diff(d,n)).reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new l.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,v.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();e.default=b},function(t,e){"use strict";function n(){}function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function i(){this._events=new n,this._eventsCount=0}var o=Object.prototype.hasOwnProperty,s="~";Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(s=!1)),i.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)o.call(t,e)&&n.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},i.prototype.listeners=function(t,e){var n=s?s+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},i.prototype.emit=function(t,e,n,r,i,o){var a=s?s+t:t;if(!this._events[a])return!1;var l,u,c=this._events[a],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,i),!0;case 6:return c.fn.call(c.context,e,n,r,i,o),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,n);break;case 4:c[u].fn.call(c[u].context,e,n,r);break;default:if(!l)for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},i.prototype.on=function(t,e,n){var i=new r(e,n||this),o=s?s+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):(this._events[o]=i,this._eventsCount++),this},i.prototype.once=function(t,e,n){var i=new r(e,n||this,!0),o=s?s+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):(this._events[o]=i,this._eventsCount++),this},i.prototype.removeListener=function(t,e,r,i){var o=s?s+t:t;if(!this._events[o])return this;if(!e)return 0==--this._eventsCount?this._events=new n:delete this._events[o],this;var a=this._events[o];if(a.fn)a.fn!==e||i&&!a.once||r&&a.context!==r||(0==--this._eventsCount?this._events=new n:delete this._events[o]);else{for(var l=0,u=[],c=a.length;l<c;l++)(a[l].fn!==e||i&&!a[l].once||r&&a[l].context!==r)&&u.push(a[l]);u.length?this._events[o]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new n:delete this._events[o]}return this},i.prototype.removeAllListeners=function(t){var e;return t?(e=s?s+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new n:delete this._events[e])):(this._events=new n,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prototype.setMaxListeners=function(){return this},i.prefixed=s,i.EventEmitter=i,void 0!==t&&(t.exports=i)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){return t instanceof d.default||t instanceof c.BlockEmbed}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},l=r(n(0)),u=r(n(9)),c=n(3),d=r(c),h=r(n(14)),p=r(n(13)),f=r(n(23)),m=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce((function(t,e){return t[e]=!0,t}),{})),r.domNode.addEventListener("DOMNodeInserted",(function(){})),r.optimize(),r.enable(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),s(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var r=this.line(t),i=o(r,2),s=i[0],l=i[1],u=this.line(t+n),d=o(u,1)[0];if(a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=d&&s!==d&&l>0){if(s instanceof c.BlockEmbed||d instanceof c.BlockEmbed)return void this.optimize();if(s instanceof p.default){var f=s.newlineIndex(s.length(),!0);if(f>-1&&(s=s.split(f+1))===d)return void this.optimize()}else if(d instanceof p.default){var m=d.newlineIndex(0);m>-1&&d.split(m+1)}var g=d.children.head instanceof h.default?null:d.children.head;s.moveChildren(d,g),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,i){(null==this.whitelist||this.whitelist[r])&&(a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,i),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==l.default.query(n,l.default.Scope.BLOCK)){var i=l.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var o=l.default.create(n,r);this.appendChild(o)}else a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===l.default.Scope.INLINE_BLOT){var r=l.default.create(this.statics.defaultChild);r.appendChild(t),t=r}a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(i,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return function t(e,n,r){var o=[],s=r;return e.children.forEachAt(n,r,(function(e,n,r){i(e)?o.push(e):e instanceof l.default.Container&&(o=o.concat(t(e,n,s))),s-=r})),o}(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(u.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=u.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(u.default.events.SCROLL_BEFORE_UPDATE,n,t),a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(u.default.events.SCROLL_UPDATE,n,t)}}}]),e}(l.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[d.default,c.BlockEmbed,f.default],e.default=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e,n){return"object"===(void 0===e?"undefined":m(e))?Object.keys(e).reduce((function(t,n){return o(t,n,e[n])}),t):t.reduce((function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,y.default)({},i({},e,n),r.attributes))}),new _.default)}function s(t){return t.nodeType!==Node.ELEMENT_NODE?{}:t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function a(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length<e.length;--r){var i=t.ops[r];if("string"!=typeof i.insert)break;n=i.insert+n}return n.slice(-1*e.length)===e}function l(t){return 0!==t.childNodes.length&&["block","list-item"].indexOf(s(t).display)>-1}function u(t,e,n){return o(n,t,!0)}function c(t,e){var n=b.default.Attributor.Attribute.keys(t),r=b.default.Attributor.Class.keys(t),i=b.default.Attributor.Style.keys(t),s={};return n.concat(r).concat(i).forEach((function(e){var n=b.default.query(e,b.default.Scope.ATTRIBUTE);null!=n&&(s[n.attrName]=n.value(t),s[n.attrName])||(null==(n=j[e])||n.attrName!==e&&n.keyName!==e||(s[n.attrName]=n.value(t)||void 0),null==(n=D[e])||n.attrName!==e&&n.keyName!==e||(n=D[e],s[n.attrName]=n.value(t)||void 0))})),Object.keys(s).length>0&&(e=o(e,s)),e}function d(t,e){var n=b.default.query(t);if(null==n)return e;if(n.prototype instanceof b.default.Embed){var r={},i=n.value(t);null!=i&&(r[n.blotName]=i,e=(new _.default).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=o(e,n.blotName,n.formats(t)));return e}function h(t,e){return a(e,"\n")||(l(t)||e.length()>0&&t.nextSibling&&l(t.nextSibling))&&e.insert("\n"),e}function p(t,e){if(l(t)&&null!=t.nextElementSibling&&!a(e,"\n\n")){var n=t.offsetHeight+parseFloat(s(t).marginTop)+parseFloat(s(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function f(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!s(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&l(t.parentNode)||null!=t.previousSibling&&l(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&l(t.parentNode)||null!=t.nextSibling&&l(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),y=r(n(2)),_=r(n(4)),b=r(n(0)),w=r(n(6)),x=r(n(10)),S=r(n(7)),k=n(34),C=n(35),E=r(n(13)),T=n(24),P=n(36),O=n(37),A=n(38),M=(0,x.default)("quill:clipboard"),L="__ql-matcher",I=[[Node.TEXT_NODE,f],[Node.TEXT_NODE,h],["br",function(t,e){return a(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,h],[Node.ELEMENT_NODE,d],[Node.ELEMENT_NODE,p],[Node.ELEMENT_NODE,c],[Node.ELEMENT_NODE,function(t,e){var n={},r=t.style||{};return r.fontStyle&&"italic"===s(t).fontStyle&&(n.italic=!0),r.fontWeight&&(s(t).fontWeight.startsWith("bold")||parseInt(s(t).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=o(e,n)),parseFloat(r.textIndent||0)>0&&(e=(new _.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=b.default.query(t);if(null==n||"list-item"!==n.blotName||!a(e,"\n"))return e;for(var r=-1,i=t.parentNode;!i.classList.contains("ql-clipboard");)"list"===(b.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?e:e.compose((new _.default).retain(e.length()-1).retain(1,{indent:r}))}],["b",u.bind(u,"bold")],["i",u.bind(u,"italic")],["style",function(){return new _.default}]],j=[k.AlignAttribute,P.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),D=[k.AlignStyle,C.BackgroundStyle,T.ColorStyle,P.DirectionStyle,O.FontStyle,A.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),N=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],I.concat(r.options.matchers).forEach((function(t){var e=g(t,2),i=e[0],o=e[1];(n.matchVisual||o!==p)&&r.addMatcher(i,o)})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),v(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[E.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new _.default).insert(n,i({},E.default.blotName,e[E.default.blotName]))}var r=this.prepareMatching(),o=g(r,2),s=o[0],l=o[1],u=function t(e,n,r){return e.nodeType===e.TEXT_NODE?r.reduce((function(t,n){return n(e,t)}),new _.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(i,o){var s=t(o,n,r);return o.nodeType===e.ELEMENT_NODE&&(s=n.reduce((function(t,e){return e(o,t)}),s),s=(o[L]||[]).reduce((function(t,e){return e(o,t)}),s)),i.concat(s)}),new _.default):new _.default}(this.container,s,l);return a(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new _.default).retain(u.length()-1).delete(1))),M.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,w.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new _.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),w.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new _.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(w.default.sources.SILENT),setTimeout((function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,w.default.sources.USER),e.quill.setSelection(r.length()-n.length,w.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=i,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(r){var i=g(r,2),o=i[0],s=i[1];switch(o){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(o),(function(t){t[L]=t[L]||[],t[L].push(s)}))}})),[e,n]}}]),e}(S.default);N.DEFAULTS={matchers:[],matchVisual:!0},e.default=N,e.matchAttributor=c,e.matchBlot=d,e.matchNewline=h,e.matchSpacing=p,e.matchText=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=t.reduce((function(t,e){return t+(e.delete||0)}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=s.default.query(t,s.default.Scope.BLOCK)})))}(t)&&(n-=1),n}Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=r(n(0)),a=r(n(6)),l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(a.default.events.EDITOR_CHANGE,(function(t,e,n,i){t!==a.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&i!==a.default.sources.USER?r.transform(e):r.record(e,n))})),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],a.default.sources.USER),this.ignoreChange=!1;var r=i(n[t]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),t=i.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(r(n(7)).default);l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=l,e.getLastChangeIndex=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},a=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),l=new(function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var r=this.value(t)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(t),!0):s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}(a.default.Attributor.Class))("indent","ql-indent",{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(3)).default);o.blotName="blockquote",o.tagName="blockquote",e.default=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(3)).default);s.blotName="header",s.tagName=["H1","H2","H3","H4","H5","H6"],e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},u=r(n(0)),c=r(n(3)),d=r(n(23)),h=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return s(e,t),a(e,[{key:"format",value:function(t,n){t!==p.blotName||n?l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(u.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:l(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}(c.default);h.blotName="list-item",h.tagName="LI";var p=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),r=function(e){if(e.target.parentNode===t){var r=n.statics.formats(t),i=u.default.find(e.target);"checked"===r?i.format("list","unchecked"):"unchecked"===r&&i.format("list","checked")}};return t.addEventListener("touchstart",r),t.addEventListener("mousedown",r),n}return s(e,t),a(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",r=l(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||r.setAttribute("data-checked","checked"===t),r}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),a(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(t,n){if(t instanceof h)l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),i=this.split(r);i.parent.insertBefore(t,i)}}},{key:"optimize",value:function(t){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=u.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(d.default);p.blotName="list",p.scope=u.default.Scope.BLOCK_BLOT,p.tagName=["OL","UL"],p.defaultChild="list-item",p.allowedChildren=[h],e.ListItem=h,e.default=p},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(39)).default);o.blotName="italic",o.tagName=["EM","I"],e.default=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(5)).default);s.blotName="script",s.tagName=["SUB","SUP"],e.default=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(5)).default);o.blotName="strike",o.tagName="S",e.default=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(5)).default);o.blotName="underline",o.tagName="U",e.default=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},a=function(t){return t&&t.__esModule?t:{default:t}}(n(0)),l=n(15),u=["alt","height","width"],c=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=s(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,l.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.default.Embed);c.blotName="image",c.tagName="IMG",e.default=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},a=n(3),l=function(t){return t&&t.__esModule?t:{default:t}}(n(15)),u=["height","width"],c=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=s(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return l.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.BlockEmbed);c.blotName="video",c.className="ql-video",c.tagName="IFRAME",e.default=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=r(n(33)),u=r(n(6)),c=r(n(7)),d=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return s(e,t),a(e,null,[{key:"create",value:function(t){var n=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}(l.default);d.blotName="formula",d.className="ql-formula",d.tagName="SPAN";var h=function(t){function e(){i(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return s(e,t),a(e,null,[{key:"register",value:function(){u.default.register(d,!0)}}]),e}(c.default);e.FormulaBlot=d,e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=r(n(0)),u=r(n(6)),c=r(n(7)),d=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return s(e,t),a(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(r(n(13)).default);d.className="ql-syntax";var h=new l.default.Attributor.Class("token","hljs",{scope:l.default.Scope.INLINE}),p=function(t){function e(t,n){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var s=null;return r.quill.on(u.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(s),s=setTimeout((function(){r.highlight(),s=null}),r.options.interval)})),r.highlight(),r}return s(e,t),a(e,null,[{key:"register",value:function(){u.default.register(h,!0),u.default.register(d,!0)}}]),a(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(u.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(d).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(u.default.sources.SILENT),null!=e&&this.quill.setSelection(e,u.default.sources.SILENT)}}}]),e}(c.default);p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=d,e.CodeToken=h,e.default=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function s(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((function(t){if("string"==typeof t)o(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?function(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach((function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)})),t.appendChild(r)}(n,e,r):o(n,e,r)}})),t.appendChild(n)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var a=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=r(n(4)),c=r(n(0)),d=r(n(6)),h=r(n(10)),p=r(n(7)),f=(0,h.default)("quill:toolbar"),m=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r,o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(o.options.container)){var l=document.createElement("div");s(l,o.options.container),t.container.parentNode.insertBefore(l,t.container),o.container=l}else"string"==typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach((function(t){o.addHandler(t,o.options.handlers[t])})),[].forEach.call(o.container.querySelectorAll("button, select"),(function(t){o.attach(t)})),o.quill.on(d.default.events.EDITOR_CHANGE,(function(t,e){t===d.default.events.SELECTION_CHANGE&&o.update(e)})),o.quill.on(d.default.events.SCROLL_OPTIMIZE,(function(){var t=o.quill.selection.getRange(),e=a(t,1)[0];o.update(e)})),o):(r=f.error("Container required for toolbar",o.options),i(o,r))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),l(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,(function(t){return 0===t.indexOf("ql-")}));if(n){if(n=n.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void f.warn("ignoring attaching to disabled format",n,t);if(null==c.default.query(n))return void f.warn("ignoring attaching to nonexistent format",n,t)}var r="SELECT"===t.tagName?"change":"click";t.addEventListener(r,(function(r){var i=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var o=t.options[t.selectedIndex];i=!o.hasAttribute("selected")&&(o.value||!1)}else i=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),r.preventDefault();e.quill.focus();var s=e.quill.selection.getRange(),l=a(s,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,i);else if(c.default.query(n).prototype instanceof c.default.Embed){if(!(i=prompt("Enter "+n)))return;e.quill.updateContents((new u.default).retain(l.index).delete(l.length).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,i)),d.default.sources.USER)}else e.quill.format(n,i,d.default.sources.USER);e.update(l)})),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((function(n){var r=a(n,2),i=r[0],o=r[1];if("SELECT"===o.tagName){var s=void 0;if(null==t)s=null;else if(null==e[i])s=o.querySelector("option[selected]");else if(!Array.isArray(e[i])){var l=e[i];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),s=o.querySelector('option[value="'+l+'"]')}null==s?(o.value="",o.selectedIndex=-1):s.selected=!0}else if(null==t)o.classList.remove("ql-active");else if(o.hasAttribute("value")){var u=e[i]===o.getAttribute("value")||null!=e[i]&&e[i].toString()===o.getAttribute("value")||null==e[i]&&!o.getAttribute("value");o.classList.toggle("ql-active",u)}else o.classList.toggle("ql-active",null!=e[i])}))}}]),e}(p.default);m.DEFAULTS={},m.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(e){null!=c.default.query(e,c.default.Scope.INLINE)&&t.quill.format(e,!1)}))}else this.quill.removeFormat(e,d.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",d.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,d.default.sources.USER),this.quill.format("direction",t,d.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),r=parseInt(n.indent||0);if("+1"===t||"-1"===t){var i="+1"===t?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,d.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,d.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,d.default.sources.USER):this.quill.format("list","unchecked",d.default.sources.USER):this.quill.format("list",t,d.default.sources.USER)}}},e.default=m,e.addControls=s},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var a=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=r(n(2)),c=r(n(9)),d=n(44),h=r(d),p=n(22),f=r(n(26)),m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(t){function e(t,n){i(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=m);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-bubble"),r}return s(e,t),l(e,[{key:"extendToolbar",value:function(t){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),f.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),f.default)}}]),e}(h.default);g.DEFAULTS=(0,u.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(t){function e(t,n){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.on(c.default.events.EDITOR_CHANGE,(function(t,e,n,i){if(t===c.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&i===c.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(e.index,e.length);if(1===o.length)r.position(r.quill.getBounds(e));else{var s=o[o.length-1],a=r.quill.getIndex(s),l=Math.min(s.length()-1,e.index+e.length-a),u=r.quill.getBounds(new p.Range(a,l));r.position(u)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return s(e,t),l(e,[{key:"listen",value:function(){var t=this;a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(c.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}(d.BaseTooltip);v.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=v,e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=r(n(2)),d=r(n(9)),h=n(44),p=r(h),f=r(n(15)),m=n(22),g=r(n(26)),v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],y=function(t){function e(t,n){i(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-snow"),r}return s(e,t),u(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),g.default),this.tooltip=new _(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(e,n){t.handlers.link.call(t,!n.format.link)}))}}]),e}(p.default);y.DEFAULTS=(0,c.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var _=function(t){function e(t,n){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return s(e,t),u(e,[{key:"listen",value:function(){var t=this;l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,d.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()})),this.quill.on(d.default.events.SELECTION_CHANGE,(function(e,n,r){if(null!=e){if(0===e.length&&r===d.default.sources.USER){var i=t.quill.scroll.descendant(f.default,e.index),o=a(i,2),s=o[0],l=o[1];if(null!=s){t.linkRange=new m.Range(e.index-l,s.length());var u=f.default.formats(s.domNode);return t.preview.textContent=u,t.preview.setAttribute("href",u),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}}))}},{key:"show",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}(h.BaseTooltip);_.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=y}]).default})),function(t,e){"object"==typeof exports&&void 0!==module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Swiper=e()}(this,(function(){"use strict";function t(t){return null!==t&&"object"==typeof t&&"constructor"in t&&t.constructor===Object}function e(n={},r={}){Object.keys(r).forEach(i=>{void 0===n[i]?n[i]=r[i]:t(r[i])&&t(n[i])&&Object.keys(r[i]).length>0&&e(n[i],r[i])})}const n={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function r(){const t="undefined"!=typeof document?document:{};return e(t,n),t}const i={document:n,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:t=>"undefined"==typeof setTimeout?(t(),null):setTimeout(t,0),cancelAnimationFrame(t){"undefined"!=typeof setTimeout&&clearTimeout(t)}};function o(){const t="undefined"!=typeof window?window:{};return e(t,i),t}class s extends Array{constructor(t){super(...t||[]),function(t){const e=t.__proto__;Object.defineProperty(t,"__proto__",{get:()=>e,set(t){e.__proto__=t}})}(this)}}function a(t=[]){const e=[];return t.forEach(t=>{Array.isArray(t)?e.push(...a(t)):e.push(t)}),e}function l(t,e){return Array.prototype.filter.call(t,e)}function u(t,e){const n=o(),i=r();let a=[];if(!e&&t instanceof s)return t;if(!t)return new s(a);if("string"==typeof t){const n=t.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){let t="div";0===n.indexOf("<li")&&(t="ul"),0===n.indexOf("<tr")&&(t="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(t="tr"),0===n.indexOf("<tbody")&&(t="table"),0===n.indexOf("<option")&&(t="select");const e=i.createElement(t);e.innerHTML=n;for(let t=0;t<e.childNodes.length;t+=1)a.push(e.childNodes[t])}else a=function(t,e){if("string"!=typeof t)return[t];const n=[],r=e.querySelectorAll(t);for(let t=0;t<r.length;t+=1)n.push(r[t]);return n}(t.trim(),e||i)}else if(t.nodeType||t===n||t===i)a.push(t);else if(Array.isArray(t)){if(t instanceof s)return t;a=t}return new s(function(t){const e=[];for(let n=0;n<t.length;n+=1)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(a))}u.fn=s.prototype;const c={addClass:function(...t){const e=a(t.map(t=>t.split(" ")));return this.forEach(t=>{t.classList.add(...e)}),this},removeClass:function(...t){const e=a(t.map(t=>t.split(" ")));return this.forEach(t=>{t.classList.remove(...e)}),this},hasClass:function(...t){const e=a(t.map(t=>t.split(" ")));return l(this,t=>e.filter(e=>t.classList.contains(e)).length>0).length>0},toggleClass:function(...t){const e=a(t.map(t=>t.split(" ")));this.forEach(t=>{e.forEach(e=>{t.classList.toggle(e)})})},attr:function(t,e){if(1===arguments.length&&"string"==typeof t)return this[0]?this[0].getAttribute(t):void 0;for(let n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(t,e);else for(const e in t)this[n][e]=t[e],this[n].setAttribute(e,t[e]);return this},removeAttr:function(t){for(let e=0;e<this.length;e+=1)this[e].removeAttribute(t);return this},transform:function(t){for(let e=0;e<this.length;e+=1)this[e].style.transform=t;return this},transition:function(t){for(let e=0;e<this.length;e+=1)this[e].style.transitionDuration="string"!=typeof t?t+"ms":t;return this},on:function(...t){let[e,n,r,i]=t;function o(t){const e=t.target;if(!e)return;const i=t.target.dom7EventData||[];if(i.indexOf(t)<0&&i.unshift(t),u(e).is(n))r.apply(e,i);else{const t=u(e).parents();for(let e=0;e<t.length;e+=1)u(t[e]).is(n)&&r.apply(t[e],i)}}function s(t){const e=t&&t.target&&t.target.dom7EventData||[];e.indexOf(t)<0&&e.unshift(t),r.apply(this,e)}"function"==typeof t[1]&&([e,r,i]=t,n=void 0),i||(i=!1);const a=e.split(" ");let l;for(let t=0;t<this.length;t+=1){const e=this[t];if(n)for(l=0;l<a.length;l+=1){const t=a[l];e.dom7LiveListeners||(e.dom7LiveListeners={}),e.dom7LiveListeners[t]||(e.dom7LiveListeners[t]=[]),e.dom7LiveListeners[t].push({listener:r,proxyListener:o}),e.addEventListener(t,o,i)}else for(l=0;l<a.length;l+=1){const t=a[l];e.dom7Listeners||(e.dom7Listeners={}),e.dom7Listeners[t]||(e.dom7Listeners[t]=[]),e.dom7Listeners[t].push({listener:r,proxyListener:s}),e.addEventListener(t,s,i)}}return this},off:function(...t){let[e,n,r,i]=t;"function"==typeof t[1]&&([e,r,i]=t,n=void 0),i||(i=!1);const o=e.split(" ");for(let t=0;t<o.length;t+=1){const e=o[t];for(let t=0;t<this.length;t+=1){const o=this[t];let s;if(!n&&o.dom7Listeners?s=o.dom7Listeners[e]:n&&o.dom7LiveListeners&&(s=o.dom7LiveListeners[e]),s&&s.length)for(let t=s.length-1;t>=0;t-=1){const n=s[t];r&&n.listener===r||r&&n.listener&&n.listener.dom7proxy&&n.listener.dom7proxy===r?(o.removeEventListener(e,n.proxyListener,i),s.splice(t,1)):r||(o.removeEventListener(e,n.proxyListener,i),s.splice(t,1))}}}return this},trigger:function(...t){const e=o(),n=t[0].split(" "),r=t[1];for(let i=0;i<n.length;i+=1){const o=n[i];for(let n=0;n<this.length;n+=1){const i=this[n];if(e.CustomEvent){const n=new e.CustomEvent(o,{detail:r,bubbles:!0,cancelable:!0});i.dom7EventData=t.filter((t,e)=>e>0),i.dispatchEvent(n),i.dom7EventData=[],delete i.dom7EventData}}}return this},transitionEnd:function(t){const e=this;return t&&e.on("transitionend",(function n(r){r.target===this&&(t.call(this,r),e.off("transitionend",n))})),this},outerWidth:function(t){if(this.length>0){if(t){const t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(t){if(this.length>0){if(t){const t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){const t=o();return this[0]?t.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){const t=o(),e=r(),n=this[0],i=n.getBoundingClientRect(),s=e.body,a=n.clientTop||s.clientTop||0,l=n.clientLeft||s.clientLeft||0,u=n===t?t.scrollY:n.scrollTop,c=n===t?t.scrollX:n.scrollLeft;return{top:i.top+u-a,left:i.left+c-l}}return null},css:function(t,e){const n=o();let r;if(1===arguments.length){if("string"!=typeof t){for(r=0;r<this.length;r+=1)for(const e in t)this[r].style[e]=t[e];return this}if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(t)}if(2===arguments.length&&"string"==typeof t){for(r=0;r<this.length;r+=1)this[r].style[t]=e;return this}return this},each:function(t){return t?(this.forEach((e,n)=>{t.apply(e,[e,n])}),this):this},html:function(t){if(void 0===t)return this[0]?this[0].innerHTML:null;for(let e=0;e<this.length;e+=1)this[e].innerHTML=t;return this},text:function(t){if(void 0===t)return this[0]?this[0].textContent.trim():null;for(let e=0;e<this.length;e+=1)this[e].textContent=t;return this},is:function(t){const e=o(),n=r(),i=this[0];let a,l;if(!i||void 0===t)return!1;if("string"==typeof t){if(i.matches)return i.matches(t);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(t);if(i.msMatchesSelector)return i.msMatchesSelector(t);for(a=u(t),l=0;l<a.length;l+=1)if(a[l]===i)return!0;return!1}if(t===n)return i===n;if(t===e)return i===e;if(t.nodeType||t instanceof s){for(a=t.nodeType?[t]:t,l=0;l<a.length;l+=1)if(a[l]===i)return!0;return!1}return!1},index:function(){let t,e=this[0];if(e){for(t=0;null!==(e=e.previousSibling);)1===e.nodeType&&(t+=1);return t}},eq:function(t){if(void 0===t)return this;const e=this.length;if(t>e-1)return u([]);if(t<0){const n=e+t;return u(n<0?[]:[this[n]])}return u([this[t]])},append:function(...t){let e;const n=r();for(let r=0;r<t.length;r+=1){e=t[r];for(let t=0;t<this.length;t+=1)if("string"==typeof e){const r=n.createElement("div");for(r.innerHTML=e;r.firstChild;)this[t].appendChild(r.firstChild)}else if(e instanceof s)for(let n=0;n<e.length;n+=1)this[t].appendChild(e[n]);else this[t].appendChild(e)}return this},prepend:function(t){const e=r();let n,i;for(n=0;n<this.length;n+=1)if("string"==typeof t){const r=e.createElement("div");for(r.innerHTML=t,i=r.childNodes.length-1;i>=0;i-=1)this[n].insertBefore(r.childNodes[i],this[n].childNodes[0])}else if(t instanceof s)for(i=0;i<t.length;i+=1)this[n].insertBefore(t[i],this[n].childNodes[0]);else this[n].insertBefore(t,this[n].childNodes[0]);return this},next:function(t){return this.length>0?t?this[0].nextElementSibling&&u(this[0].nextElementSibling).is(t)?u([this[0].nextElementSibling]):u([]):this[0].nextElementSibling?u([this[0].nextElementSibling]):u([]):u([])},nextAll:function(t){const e=[];let n=this[0];if(!n)return u([]);for(;n.nextElementSibling;){const r=n.nextElementSibling;t?u(r).is(t)&&e.push(r):e.push(r),n=r}return u(e)},prev:function(t){if(this.length>0){const e=this[0];return t?e.previousElementSibling&&u(e.previousElementSibling).is(t)?u([e.previousElementSibling]):u([]):e.previousElementSibling?u([e.previousElementSibling]):u([])}return u([])},prevAll:function(t){const e=[];let n=this[0];if(!n)return u([]);for(;n.previousElementSibling;){const r=n.previousElementSibling;t?u(r).is(t)&&e.push(r):e.push(r),n=r}return u(e)},parent:function(t){const e=[];for(let n=0;n<this.length;n+=1)null!==this[n].parentNode&&(t?u(this[n].parentNode).is(t)&&e.push(this[n].parentNode):e.push(this[n].parentNode));return u(e)},parents:function(t){const e=[];for(let n=0;n<this.length;n+=1){let r=this[n].parentNode;for(;r;)t?u(r).is(t)&&e.push(r):e.push(r),r=r.parentNode}return u(e)},closest:function(t){let e=this;return void 0===t?u([]):(e.is(t)||(e=e.parents(t).eq(0)),e)},find:function(t){const e=[];for(let n=0;n<this.length;n+=1){const r=this[n].querySelectorAll(t);for(let t=0;t<r.length;t+=1)e.push(r[t])}return u(e)},children:function(t){const e=[];for(let n=0;n<this.length;n+=1){const r=this[n].children;for(let n=0;n<r.length;n+=1)t&&!u(r[n]).is(t)||e.push(r[n])}return u(e)},filter:function(t){return u(l(this,t))},remove:function(){for(let t=0;t<this.length;t+=1)this[t].parentNode&&this[t].parentNode.removeChild(this[t]);return this}};function d(t,e=0){return setTimeout(t,e)}function h(){return Date.now()}function p(t,e="x"){const n=o();let r,i,s;const a=function(t){const e=o();let n;return e.getComputedStyle&&(n=e.getComputedStyle(t,null)),!n&&t.currentStyle&&(n=t.currentStyle),n||(n=t.style),n}(t);return n.WebKitCSSMatrix?(i=a.transform||a.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(t=>t.replace(",",".")).join(", ")),s=new n.WebKitCSSMatrix("none"===i?"":i)):(s=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=s.toString().split(",")),"x"===e&&(i=n.WebKitCSSMatrix?s.m41:16===r.length?parseFloat(r[12]):parseFloat(r[4])),"y"===e&&(i=n.WebKitCSSMatrix?s.m42:16===r.length?parseFloat(r[13]):parseFloat(r[5])),i||0}function f(t){return"object"==typeof t&&null!==t&&t.constructor&&"Object"===Object.prototype.toString.call(t).slice(8,-1)}function m(...t){const e=Object(t[0]),n=["__proto__","constructor","prototype"];for(let i=1;i<t.length;i+=1){const o=t[i];if(null!=o&&(r=o,!("undefined"!=typeof window&&void 0!==window.HTMLElement?r instanceof HTMLElement:r&&(1===r.nodeType||11===r.nodeType)))){const t=Object.keys(Object(o)).filter(t=>n.indexOf(t)<0);for(let n=0,r=t.length;n<r;n+=1){const r=t[n],i=Object.getOwnPropertyDescriptor(o,r);void 0!==i&&i.enumerable&&(f(e[r])&&f(o[r])?o[r].__swiper__?e[r]=o[r]:m(e[r],o[r]):!f(e[r])&&f(o[r])?(e[r]={},o[r].__swiper__?e[r]=o[r]:m(e[r],o[r])):e[r]=o[r])}}}var r;return e}function g(t,e,n){t.style.setProperty(e,n)}function v({swiper:t,targetPosition:e,side:n}){const r=o(),i=-t.translate;let s,a=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",r.cancelAnimationFrame(t.cssModeFrameID);const u=e>i?"next":"prev",c=(t,e)=>"next"===u&&t>=e||"prev"===u&&t<=e,d=()=>{s=(new Date).getTime(),null===a&&(a=s);const o=Math.max(Math.min((s-a)/l,1),0),u=.5-Math.cos(o*Math.PI)/2;let h=i+u*(e-i);if(c(h,e)&&(h=e),t.wrapperEl.scrollTo({[n]:h}),c(h,e))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[n]:h})}),void r.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=r.requestAnimationFrame(d)};d()}let y,_,b;function w(){return y||(y=function(){const t=o(),e=r();return{smoothScroll:e.documentElement&&"scrollBehavior"in e.documentElement.style,touch:!!("ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch),passiveListener:function(){let e=!1;try{const n=Object.defineProperty({},"passive",{get(){e=!0}});t.addEventListener("testPassiveListener",null,n)}catch(t){}return e}(),gestures:"ongesturestart"in t}}()),y}function x(t={}){return _||(_=function({userAgent:t}={}){const e=w(),n=o(),r=n.navigator.platform,i=t||n.navigator.userAgent,s={ios:!1,android:!1},a=n.screen.width,l=n.screen.height,u=i.match(/(Android);?[\s\/]+([\d.]+)?/);let c=i.match(/(iPad).*OS\s([\d_]+)/);const d=i.match(/(iPod)(.*OS\s([\d_]+))?/),h=!c&&i.match(/(iPhone\sOS|iOS)\s([\d_]+)/),p="Win32"===r;let f="MacIntel"===r;return!c&&f&&e.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${a}x${l}`)>=0&&(c=i.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),f=!1),u&&!p&&(s.os="android",s.android=!0),(c||h||d)&&(s.os="ios",s.ios=!0),s}(t)),_}function S(){return b||(b=function(){const t=o();return{isSafari:function(){const e=t.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)}}()),b}function k({swiper:t,runCallbacks:e,direction:n,step:r}){const{activeIndex:i,previousIndex:o}=t;let s=n;if(s||(s=i>o?"next":i<o?"prev":"reset"),t.emit("transition"+r),e&&i!==o){if("reset"===s)return void t.emit("slideResetTransition"+r);t.emit("slideChangeTransition"+r),"next"===s?t.emit("slideNextTransition"+r):t.emit("slidePrevTransition"+r)}}function C(t){const e=this,n=r(),i=o(),s=e.touchEventsData,{params:a,touches:l,enabled:c}=e;if(!c)return;if(e.animating&&a.preventInteractionOnTransition)return;!e.animating&&a.cssMode&&a.loop&&e.loopFix();let d=t;d.originalEvent&&(d=d.originalEvent);let p=u(d.target);if("wrapper"===a.touchEventsTarget&&!p.closest(e.wrapperEl).length)return;if(s.isTouchEvent="touchstart"===d.type,!s.isTouchEvent&&"which"in d&&3===d.which)return;if(!s.isTouchEvent&&"button"in d&&d.button>0)return;if(s.isTouched&&s.isMoved)return;a.noSwipingClass&&""!==a.noSwipingClass&&d.target&&d.target.shadowRoot&&t.path&&t.path[0]&&(p=u(t.path[0]));const f=a.noSwipingSelector?a.noSwipingSelector:"."+a.noSwipingClass,m=!(!d.target||!d.target.shadowRoot);if(a.noSwiping&&(m?function(t,e=this){return function e(n){return n&&n!==r()&&n!==o()?(n.assignedSlot&&(n=n.assignedSlot),n.closest(t)||e(n.getRootNode().host)):null}(e)}(f,d.target):p.closest(f)[0]))return void(e.allowClick=!0);if(a.swipeHandler&&!p.closest(a.swipeHandler)[0])return;l.currentX="touchstart"===d.type?d.targetTouches[0].pageX:d.pageX,l.currentY="touchstart"===d.type?d.targetTouches[0].pageY:d.pageY;const g=l.currentX,v=l.currentY,y=a.edgeSwipeDetection||a.iOSEdgeSwipeDetection,_=a.edgeSwipeThreshold||a.iOSEdgeSwipeThreshold;if(y&&(g<=_||g>=i.innerWidth-_)){if("prevent"!==y)return;t.preventDefault()}if(Object.assign(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),l.startX=g,l.startY=v,s.touchStartTime=h(),e.allowClick=!0,e.updateSize(),e.swipeDirection=void 0,a.threshold>0&&(s.allowThresholdMove=!1),"touchstart"!==d.type){let t=!0;p.is(s.focusableElements)&&(t=!1),n.activeElement&&u(n.activeElement).is(s.focusableElements)&&n.activeElement!==p[0]&&n.activeElement.blur();const r=t&&e.allowTouchMove&&a.touchStartPreventDefault;!a.touchStartForcePreventDefault&&!r||p[0].isContentEditable||d.preventDefault()}e.emit("touchStart",d)}function E(t){const e=r(),n=this,i=n.touchEventsData,{params:o,touches:s,rtlTranslate:a,enabled:l}=n;if(!l)return;let c=t;if(c.originalEvent&&(c=c.originalEvent),!i.isTouched)return void(i.startMoving&&i.isScrolling&&n.emit("touchMoveOpposite",c));if(i.isTouchEvent&&"touchmove"!==c.type)return;const d="touchmove"===c.type&&c.targetTouches&&(c.targetTouches[0]||c.changedTouches[0]),p="touchmove"===c.type?d.pageX:c.pageX,f="touchmove"===c.type?d.pageY:c.pageY;if(c.preventedByNestedSwiper)return s.startX=p,void(s.startY=f);if(!n.allowTouchMove)return n.allowClick=!1,void(i.isTouched&&(Object.assign(s,{startX:p,startY:f,currentX:p,currentY:f}),i.touchStartTime=h()));if(i.isTouchEvent&&o.touchReleaseOnEdges&&!o.loop)if(n.isVertical()){if(f<s.startY&&n.translate<=n.maxTranslate()||f>s.startY&&n.translate>=n.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(p<s.startX&&n.translate<=n.maxTranslate()||p>s.startX&&n.translate>=n.minTranslate())return;if(i.isTouchEvent&&e.activeElement&&c.target===e.activeElement&&u(c.target).is(i.focusableElements))return i.isMoved=!0,void(n.allowClick=!1);if(i.allowTouchCallbacks&&n.emit("touchMove",c),c.targetTouches&&c.targetTouches.length>1)return;s.currentX=p,s.currentY=f;const m=s.currentX-s.startX,g=s.currentY-s.startY;if(n.params.threshold&&Math.sqrt(m**2+g**2)<n.params.threshold)return;if(void 0===i.isScrolling){let t;n.isHorizontal()&&s.currentY===s.startY||n.isVertical()&&s.currentX===s.startX?i.isScrolling=!1:m*m+g*g>=25&&(t=180*Math.atan2(Math.abs(g),Math.abs(m))/Math.PI,i.isScrolling=n.isHorizontal()?t>o.touchAngle:90-t>o.touchAngle)}if(i.isScrolling&&n.emit("touchMoveOpposite",c),void 0===i.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(i.startMoving=!0)),i.isScrolling)return void(i.isTouched=!1);if(!i.startMoving)return;n.allowClick=!1,!o.cssMode&&c.cancelable&&c.preventDefault(),o.touchMoveStopPropagation&&!o.nested&&c.stopPropagation(),i.isMoved||(o.loop&&!o.cssMode&&n.loopFix(),i.startTranslate=n.getTranslate(),n.setTransition(0),n.animating&&n.$wrapperEl.trigger("webkitTransitionEnd transitionend"),i.allowMomentumBounce=!1,!o.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",c)),n.emit("sliderMove",c),i.isMoved=!0;let v=n.isHorizontal()?m:g;s.diff=v,v*=o.touchRatio,a&&(v=-v),n.swipeDirection=v>0?"prev":"next",i.currentTranslate=v+i.startTranslate;let y=!0,_=o.resistanceRatio;if(o.touchReleaseOnEdges&&(_=0),v>0&&i.currentTranslate>n.minTranslate()?(y=!1,o.resistance&&(i.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+i.startTranslate+v)**_)):v<0&&i.currentTranslate<n.maxTranslate()&&(y=!1,o.resistance&&(i.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-i.startTranslate-v)**_)),y&&(c.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),n.allowSlidePrev||n.allowSlideNext||(i.currentTranslate=i.startTranslate),o.threshold>0){if(!(Math.abs(v)>o.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,i.currentTranslate=i.startTranslate,void(s.diff=n.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}o.followFinger&&!o.cssMode&&((o.freeMode&&o.freeMode.enabled&&n.freeMode||o.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),n.params.freeMode&&o.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(i.currentTranslate),n.setTranslate(i.currentTranslate))}function T(t){const e=this,n=e.touchEventsData,{params:r,touches:i,rtlTranslate:o,slidesGrid:s,enabled:a}=e;if(!a)return;let l=t;if(l.originalEvent&&(l=l.originalEvent),n.allowTouchCallbacks&&e.emit("touchEnd",l),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&r.grabCursor&&e.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);r.grabCursor&&n.isMoved&&n.isTouched&&(!0===e.allowSlideNext||!0===e.allowSlidePrev)&&e.setGrabCursor(!1);const u=h(),c=u-n.touchStartTime;if(e.allowClick){const t=l.path||l.composedPath&&l.composedPath();e.updateClickedSlide(t&&t[0]||l.target),e.emit("tap click",l),c<300&&u-n.lastClickTime<300&&e.emit("doubleTap doubleClick",l)}if(n.lastClickTime=h(),d(()=>{e.destroyed||(e.allowClick=!0)}),!n.isTouched||!n.isMoved||!e.swipeDirection||0===i.diff||n.currentTranslate===n.startTranslate)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let p;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,p=r.followFinger?o?e.translate:-e.translate:-n.currentTranslate,r.cssMode)return;if(e.params.freeMode&&r.freeMode.enabled)return void e.freeMode.onTouchEnd({currentPos:p});let f=0,m=e.slidesSizesGrid[0];for(let t=0;t<s.length;t+=t<r.slidesPerGroupSkip?1:r.slidesPerGroup){const e=t<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==s[t+e]?p>=s[t]&&p<s[t+e]&&(f=t,m=s[t+e]-s[t]):p>=s[t]&&(f=t,m=s[s.length-1]-s[s.length-2])}const g=(p-s[f])/m,v=f<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(c>r.longSwipesMs){if(!r.longSwipes)return void e.slideTo(e.activeIndex);"next"===e.swipeDirection&&(g>=r.longSwipesRatio?e.slideTo(f+v):e.slideTo(f)),"prev"===e.swipeDirection&&(g>1-r.longSwipesRatio?e.slideTo(f+v):e.slideTo(f))}else{if(!r.shortSwipes)return void e.slideTo(e.activeIndex);!e.navigation||l.target!==e.navigation.nextEl&&l.target!==e.navigation.prevEl?("next"===e.swipeDirection&&e.slideTo(f+v),"prev"===e.swipeDirection&&e.slideTo(f)):l.target===e.navigation.nextEl?e.slideTo(f+v):e.slideTo(f)}}function P(){const t=this,{params:e,el:n}=t;if(n&&0===n.offsetWidth)return;e.breakpoints&&t.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:i,snapGrid:o}=t;t.allowSlideNext=!0,t.allowSlidePrev=!0,t.updateSize(),t.updateSlides(),t.updateSlidesClasses(),("auto"===e.slidesPerView||e.slidesPerView>1)&&t.isEnd&&!t.isBeginning&&!t.params.centeredSlides?t.slideTo(t.slides.length-1,0,!1,!0):t.slideTo(t.activeIndex,0,!1,!0),t.autoplay&&t.autoplay.running&&t.autoplay.paused&&t.autoplay.run(),t.allowSlidePrev=i,t.allowSlideNext=r,t.params.watchOverflow&&o!==t.snapGrid&&t.checkOverflow()}function O(t){const e=this;e.enabled&&(e.allowClick||(e.params.preventClicks&&t.preventDefault(),e.params.preventClicksPropagation&&e.animating&&(t.stopPropagation(),t.stopImmediatePropagation())))}function A(){const t=this,{wrapperEl:e,rtlTranslate:n,enabled:r}=t;if(!r)return;let i;t.previousTranslate=t.translate,t.isHorizontal()?t.translate=-e.scrollLeft:t.translate=-e.scrollTop,-0===t.translate&&(t.translate=0),t.updateActiveIndex(),t.updateSlidesClasses();const o=t.maxTranslate()-t.minTranslate();i=0===o?0:(t.translate-t.minTranslate())/o,i!==t.progress&&t.updateProgress(n?-t.translate:t.translate),t.emit("setTranslate",t.translate,!1)}Object.keys(c).forEach(t=>{Object.defineProperty(u.fn,t,{value:c[t],writable:!0})});let M=!1;function L(){}const I=(t,e)=>{const n=r(),{params:i,touchEvents:o,el:s,wrapperEl:a,device:l,support:u}=t,c=!!i.nested,d="on"===e?"addEventListener":"removeEventListener",h=e;if(u.touch){const e=!("touchstart"!==o.start||!u.passiveListener||!i.passiveListeners)&&{passive:!0,capture:!1};s[d](o.start,t.onTouchStart,e),s[d](o.move,t.onTouchMove,u.passiveListener?{passive:!1,capture:c}:c),s[d](o.end,t.onTouchEnd,e),o.cancel&&s[d](o.cancel,t.onTouchEnd,e)}else s[d](o.start,t.onTouchStart,!1),n[d](o.move,t.onTouchMove,c),n[d](o.end,t.onTouchEnd,!1);(i.preventClicks||i.preventClicksPropagation)&&s[d]("click",t.onClick,!0),i.cssMode&&a[d]("scroll",t.onScroll),i.updateOnWindowResize?t[h](l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",P,!0):t[h]("observerUpdate",P,!0)},j=(t,e)=>t.grid&&e.grid&&e.grid.rows>1;var D={init:!0,direction:"horizontal",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function N(t,e){return function(n={}){const r=Object.keys(n)[0],i=n[r];"object"==typeof i&&null!==i?(["navigation","pagination","scrollbar"].indexOf(r)>=0&&!0===t[r]&&(t[r]={auto:!0}),r in t&&"enabled"in i?(!0===t[r]&&(t[r]={enabled:!0}),"object"!=typeof t[r]||"enabled"in t[r]||(t[r].enabled=!0),t[r]||(t[r]={enabled:!1}),m(e,n)):m(e,n)):m(e,n)}}const R={eventsEmitter:{on(t,e,n){const r=this;if("function"!=typeof e)return r;const i=n?"unshift":"push";return t.split(" ").forEach(t=>{r.eventsListeners[t]||(r.eventsListeners[t]=[]),r.eventsListeners[t][i](e)}),r},once(t,e,n){const r=this;if("function"!=typeof e)return r;function i(...n){r.off(t,i),i.__emitterProxy&&delete i.__emitterProxy,e.apply(r,n)}return i.__emitterProxy=e,r.on(t,i,n)},onAny(t,e){const n=this;if("function"!=typeof t)return n;const r=e?"unshift":"push";return n.eventsAnyListeners.indexOf(t)<0&&n.eventsAnyListeners[r](t),n},offAny(t){const e=this;if(!e.eventsAnyListeners)return e;const n=e.eventsAnyListeners.indexOf(t);return n>=0&&e.eventsAnyListeners.splice(n,1),e},off(t,e){const n=this;return n.eventsListeners?(t.split(" ").forEach(t=>{void 0===e?n.eventsListeners[t]=[]:n.eventsListeners[t]&&n.eventsListeners[t].forEach((r,i)=>{(r===e||r.__emitterProxy&&r.__emitterProxy===e)&&n.eventsListeners[t].splice(i,1)})}),n):n},emit(...t){const e=this;if(!e.eventsListeners)return e;let n,r,i;return"string"==typeof t[0]||Array.isArray(t[0])?(n=t[0],r=t.slice(1,t.length),i=e):(n=t[0].events,r=t[0].data,i=t[0].context||e),r.unshift(i),(Array.isArray(n)?n:n.split(" ")).forEach(t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(e=>{e.apply(i,[t,...r])}),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach(t=>{t.apply(i,r)})}),e}},update:{updateSize:function(){const t=this;let e,n;const r=t.$el;e=void 0!==t.params.width&&null!==t.params.width?t.params.width:r[0].clientWidth,n=void 0!==t.params.height&&null!==t.params.height?t.params.height:r[0].clientHeight,0===e&&t.isHorizontal()||0===n&&t.isVertical()||(e=e-parseInt(r.css("padding-left")||0,10)-parseInt(r.css("padding-right")||0,10),n=n-parseInt(r.css("padding-top")||0,10)-parseInt(r.css("padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(n)&&(n=0),Object.assign(t,{width:e,height:n,size:t.isHorizontal()?e:n}))},updateSlides:function(){const t=this;function e(e){return t.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}function n(t,n){return parseFloat(t.getPropertyValue(e(n))||0)}const r=t.params,{$wrapperEl:i,size:o,rtlTranslate:s,wrongRTL:a}=t,l=t.virtual&&r.virtual.enabled,u=l?t.virtual.slides.length:t.slides.length,c=i.children("."+t.params.slideClass),d=l?t.virtual.slides.length:c.length;let h=[];const p=[],f=[];let m=r.slidesOffsetBefore;"function"==typeof m&&(m=r.slidesOffsetBefore.call(t));let v=r.slidesOffsetAfter;"function"==typeof v&&(v=r.slidesOffsetAfter.call(t));const y=t.snapGrid.length,_=t.slidesGrid.length;let b=r.spaceBetween,w=-m,x=0,S=0;if(void 0===o)return;"string"==typeof b&&b.indexOf("%")>=0&&(b=parseFloat(b.replace("%",""))/100*o),t.virtualSize=-b,s?c.css({marginLeft:"",marginBottom:"",marginTop:""}):c.css({marginRight:"",marginBottom:"",marginTop:""}),r.centeredSlides&&r.cssMode&&(g(t.wrapperEl,"--swiper-centered-offset-before",""),g(t.wrapperEl,"--swiper-centered-offset-after",""));const k=r.grid&&r.grid.rows>1&&t.grid;let C;k&&t.grid.initSlides(d);const E="auto"===r.slidesPerView&&r.breakpoints&&Object.keys(r.breakpoints).filter(t=>void 0!==r.breakpoints[t].slidesPerView).length>0;for(let i=0;i<d;i+=1){C=0;const s=c.eq(i);if(k&&t.grid.updateSlide(i,s,d,e),"none"!==s.css("display")){if("auto"===r.slidesPerView){E&&(c[i].style[e("width")]="");const o=getComputedStyle(s[0]),a=s[0].style.transform,l=s[0].style.webkitTransform;if(a&&(s[0].style.transform="none"),l&&(s[0].style.webkitTransform="none"),r.roundLengths)C=t.isHorizontal()?s.outerWidth(!0):s.outerHeight(!0);else{const t=n(o,"width"),e=n(o,"padding-left"),r=n(o,"padding-right"),i=n(o,"margin-left"),a=n(o,"margin-right"),l=o.getPropertyValue("box-sizing");if(l&&"border-box"===l)C=t+i+a;else{const{clientWidth:n,offsetWidth:o}=s[0];C=t+e+r+i+a+(o-n)}}a&&(s[0].style.transform=a),l&&(s[0].style.webkitTransform=l),r.roundLengths&&(C=Math.floor(C))}else C=(o-(r.slidesPerView-1)*b)/r.slidesPerView,r.roundLengths&&(C=Math.floor(C)),c[i]&&(c[i].style[e("width")]=C+"px");c[i]&&(c[i].swiperSlideSize=C),f.push(C),r.centeredSlides?(w=w+C/2+x/2+b,0===x&&0!==i&&(w=w-o/2-b),0===i&&(w=w-o/2-b),Math.abs(w)<.001&&(w=0),r.roundLengths&&(w=Math.floor(w)),S%r.slidesPerGroup==0&&h.push(w),p.push(w)):(r.roundLengths&&(w=Math.floor(w)),(S-Math.min(t.params.slidesPerGroupSkip,S))%t.params.slidesPerGroup==0&&h.push(w),p.push(w),w=w+C+b),t.virtualSize+=C+b,x=C,S+=1}}if(t.virtualSize=Math.max(t.virtualSize,o)+v,s&&a&&("slide"===r.effect||"coverflow"===r.effect)&&i.css({width:t.virtualSize+r.spaceBetween+"px"}),r.setWrapperSize&&i.css({[e("width")]:t.virtualSize+r.spaceBetween+"px"}),k&&t.grid.updateWrapperSize(C,h,e),!r.centeredSlides){const e=[];for(let n=0;n<h.length;n+=1){let i=h[n];r.roundLengths&&(i=Math.floor(i)),h[n]<=t.virtualSize-o&&e.push(i)}h=e,Math.floor(t.virtualSize-o)-Math.floor(h[h.length-1])>1&&h.push(t.virtualSize-o)}if(0===h.length&&(h=[0]),0!==r.spaceBetween){const n=t.isHorizontal()&&s?"marginLeft":e("marginRight");c.filter((t,e)=>!r.cssMode||e!==c.length-1).css({[n]:b+"px"})}if(r.centeredSlides&&r.centeredSlidesBounds){let t=0;f.forEach(e=>{t+=e+(r.spaceBetween?r.spaceBetween:0)}),t-=r.spaceBetween;const e=t-o;h=h.map(t=>t<0?-m:t>e?e+v:t)}if(r.centerInsufficientSlides){let t=0;if(f.forEach(e=>{t+=e+(r.spaceBetween?r.spaceBetween:0)}),t-=r.spaceBetween,t<o){const e=(o-t)/2;h.forEach((t,n)=>{h[n]=t-e}),p.forEach((t,n)=>{p[n]=t+e})}}if(Object.assign(t,{slides:c,snapGrid:h,slidesGrid:p,slidesSizesGrid:f}),r.centeredSlides&&r.cssMode&&!r.centeredSlidesBounds){g(t.wrapperEl,"--swiper-centered-offset-before",-h[0]+"px"),g(t.wrapperEl,"--swiper-centered-offset-after",t.size/2-f[f.length-1]/2+"px");const e=-t.snapGrid[0],n=-t.slidesGrid[0];t.snapGrid=t.snapGrid.map(t=>t+e),t.slidesGrid=t.slidesGrid.map(t=>t+n)}d!==u&&t.emit("slidesLengthChange"),h.length!==y&&(t.params.watchOverflow&&t.checkOverflow(),t.emit("snapGridLengthChange")),p.length!==_&&t.emit("slidesGridLengthChange"),r.watchSlidesProgress&&t.updateSlidesOffset()},updateAutoHeight:function(t){const e=this,n=[],r=e.virtual&&e.params.virtual.enabled;let i,o=0;"number"==typeof t?e.setTransition(t):!0===t&&e.setTransition(e.params.speed);const s=t=>r?e.slides.filter(e=>parseInt(e.getAttribute("data-swiper-slide-index"),10)===t)[0]:e.slides.eq(t)[0];if("auto"!==e.params.slidesPerView&&e.params.slidesPerView>1)if(e.params.centeredSlides)e.visibleSlides.each(t=>{n.push(t)});else for(i=0;i<Math.ceil(e.params.slidesPerView);i+=1){const t=e.activeIndex+i;if(t>e.slides.length&&!r)break;n.push(s(t))}else n.push(s(e.activeIndex));for(i=0;i<n.length;i+=1)if(void 0!==n[i]){const t=n[i].offsetHeight;o=t>o?t:o}o&&e.$wrapperEl.css("height",o+"px")},updateSlidesOffset:function(){const t=this,e=t.slides;for(let n=0;n<e.length;n+=1)e[n].swiperSlideOffset=t.isHorizontal()?e[n].offsetLeft:e[n].offsetTop},updateSlidesProgress:function(t=this&&this.translate||0){const e=this,n=e.params,{slides:r,rtlTranslate:i,snapGrid:o}=e;if(0===r.length)return;void 0===r[0].swiperSlideOffset&&e.updateSlidesOffset();let s=-t;i&&(s=t),r.removeClass(n.slideVisibleClass),e.visibleSlidesIndexes=[],e.visibleSlides=[];for(let t=0;t<r.length;t+=1){const a=r[t];let l=a.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(l-=r[0].swiperSlideOffset);const u=(s+(n.centeredSlides?e.minTranslate():0)-l)/(a.swiperSlideSize+n.spaceBetween),c=(s-o[0]+(n.centeredSlides?e.minTranslate():0)-l)/(a.swiperSlideSize+n.spaceBetween),d=-(s-l),h=d+e.slidesSizesGrid[t];(d>=0&&d<e.size-1||h>1&&h<=e.size||d<=0&&h>=e.size)&&(e.visibleSlides.push(a),e.visibleSlidesIndexes.push(t),r.eq(t).addClass(n.slideVisibleClass)),a.progress=i?-u:u,a.originalProgress=i?-c:c}e.visibleSlides=u(e.visibleSlides)},updateProgress:function(t){const e=this;if(void 0===t){const n=e.rtlTranslate?-1:1;t=e&&e.translate&&e.translate*n||0}const n=e.params,r=e.maxTranslate()-e.minTranslate();let{progress:i,isBeginning:o,isEnd:s}=e;const a=o,l=s;0===r?(i=0,o=!0,s=!0):(i=(t-e.minTranslate())/r,o=i<=0,s=i>=1),Object.assign(e,{progress:i,isBeginning:o,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&e.updateSlidesProgress(t),o&&!a&&e.emit("reachBeginning toEdge"),s&&!l&&e.emit("reachEnd toEdge"),(a&&!o||l&&!s)&&e.emit("fromEdge"),e.emit("progress",i)},updateSlidesClasses:function(){const t=this,{slides:e,params:n,$wrapperEl:r,activeIndex:i,realIndex:o}=t,s=t.virtual&&n.virtual.enabled;let a;e.removeClass(`${n.slideActiveClass} ${n.slideNextClass} ${n.slidePrevClass} ${n.slideDuplicateActiveClass} ${n.slideDuplicateNextClass} ${n.slideDuplicatePrevClass}`),a=s?t.$wrapperEl.find(`.${n.slideClass}[data-swiper-slide-index="${i}"]`):e.eq(i),a.addClass(n.slideActiveClass),n.loop&&(a.hasClass(n.slideDuplicateClass)?r.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${o}"]`).addClass(n.slideDuplicateActiveClass):r.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${o}"]`).addClass(n.slideDuplicateActiveClass));let l=a.nextAll("."+n.slideClass).eq(0).addClass(n.slideNextClass);n.loop&&0===l.length&&(l=e.eq(0),l.addClass(n.slideNextClass));let u=a.prevAll("."+n.slideClass).eq(0).addClass(n.slidePrevClass);n.loop&&0===u.length&&(u=e.eq(-1),u.addClass(n.slidePrevClass)),n.loop&&(l.hasClass(n.slideDuplicateClass)?r.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicateNextClass):r.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicateNextClass),u.hasClass(n.slideDuplicateClass)?r.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${u.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicatePrevClass):r.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${u.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicatePrevClass)),t.emitSlidesClasses()},updateActiveIndex:function(t){const e=this,n=e.rtlTranslate?e.translate:-e.translate,{slidesGrid:r,snapGrid:i,params:o,activeIndex:s,realIndex:a,snapIndex:l}=e;let u,c=t;if(void 0===c){for(let t=0;t<r.length;t+=1)void 0!==r[t+1]?n>=r[t]&&n<r[t+1]-(r[t+1]-r[t])/2?c=t:n>=r[t]&&n<r[t+1]&&(c=t+1):n>=r[t]&&(c=t);o.normalizeSlideIndex&&(c<0||void 0===c)&&(c=0)}if(i.indexOf(n)>=0)u=i.indexOf(n);else{const t=Math.min(o.slidesPerGroupSkip,c);u=t+Math.floor((c-t)/o.slidesPerGroup)}if(u>=i.length&&(u=i.length-1),c===s)return void(u!==l&&(e.snapIndex=u,e.emit("snapIndexChange")));const d=parseInt(e.slides.eq(c).attr("data-swiper-slide-index")||c,10);Object.assign(e,{snapIndex:u,realIndex:d,previousIndex:s,activeIndex:c}),e.emit("activeIndexChange"),e.emit("snapIndexChange"),a!==d&&e.emit("realIndexChange"),(e.initialized||e.params.runCallbacksOnInit)&&e.emit("slideChange")},updateClickedSlide:function(t){const e=this,n=e.params,r=u(t).closest("."+n.slideClass)[0];let i,o=!1;if(r)for(let t=0;t<e.slides.length;t+=1)if(e.slides[t]===r){o=!0,i=t;break}if(!r||!o)return e.clickedSlide=void 0,void(e.clickedIndex=void 0);e.clickedSlide=r,e.virtual&&e.params.virtual.enabled?e.clickedIndex=parseInt(u(r).attr("data-swiper-slide-index"),10):e.clickedIndex=i,n.slideToClickedSlide&&void 0!==e.clickedIndex&&e.clickedIndex!==e.activeIndex&&e.slideToClickedSlide()}},translate:{getTranslate:function(t=(this.isHorizontal()?"x":"y")){const{params:e,rtlTranslate:n,translate:r,$wrapperEl:i}=this;if(e.virtualTranslate)return n?-r:r;if(e.cssMode)return r;let o=p(i[0],t);return n&&(o=-o),o||0},setTranslate:function(t,e){const n=this,{rtlTranslate:r,params:i,$wrapperEl:o,wrapperEl:s,progress:a}=n;let l,u=0,c=0;n.isHorizontal()?u=r?-t:t:c=t,i.roundLengths&&(u=Math.floor(u),c=Math.floor(c)),i.cssMode?s[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-u:-c:i.virtualTranslate||o.transform(`translate3d(${u}px, ${c}px, 0px)`),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?u:c;const d=n.maxTranslate()-n.minTranslate();l=0===d?0:(t-n.minTranslate())/d,l!==a&&n.updateProgress(t),n.emit("setTranslate",n.translate,e)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(t=0,e=this.params.speed,n=!0,r=!0,i){const o=this,{params:s,wrapperEl:a}=o;if(o.animating&&s.preventInteractionOnTransition)return!1;const l=o.minTranslate(),u=o.maxTranslate();let c;if(c=r&&t>l?l:r&&t<u?u:t,o.updateProgress(c),s.cssMode){const t=o.isHorizontal();if(0===e)a[t?"scrollLeft":"scrollTop"]=-c;else{if(!o.support.smoothScroll)return v({swiper:o,targetPosition:-c,side:t?"left":"top"}),!0;a.scrollTo({[t?"left":"top"]:-c,behavior:"smooth"})}return!0}return 0===e?(o.setTransition(0),o.setTranslate(c),n&&(o.emit("beforeTransitionStart",e,i),o.emit("transitionEnd"))):(o.setTransition(e),o.setTranslate(c),n&&(o.emit("beforeTransitionStart",e,i),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(t){o&&!o.destroyed&&t.target===this&&(o.$wrapperEl[0].removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,n&&o.emit("transitionEnd"))}),o.$wrapperEl[0].addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(t,e){const n=this;n.params.cssMode||n.$wrapperEl.transition(t),n.emit("setTransition",t,e)},transitionStart:function(t=!0,e){const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),k({swiper:n,runCallbacks:t,direction:e,step:"Start"}))},transitionEnd:function(t=!0,e){const n=this,{params:r}=n;n.animating=!1,r.cssMode||(n.setTransition(0),k({swiper:n,runCallbacks:t,direction:e,step:"End"}))}},slide:{slideTo:function(t=0,e=this.params.speed,n=!0,r,i){if("number"!=typeof t&&"string"!=typeof t)throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof t}] given.`);if("string"==typeof t){const e=parseInt(t,10);if(!isFinite(e))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${t}] given.`);t=e}const o=this;let s=t;s<0&&(s=0);const{params:a,snapGrid:l,slidesGrid:u,previousIndex:c,activeIndex:d,rtlTranslate:h,wrapperEl:p,enabled:f}=o;if(o.animating&&a.preventInteractionOnTransition||!f&&!r&&!i)return!1;const m=Math.min(o.params.slidesPerGroupSkip,s);let g=m+Math.floor((s-m)/o.params.slidesPerGroup);g>=l.length&&(g=l.length-1),(d||a.initialSlide||0)===(c||0)&&n&&o.emit("beforeSlideChangeStart");const y=-l[g];if(o.updateProgress(y),a.normalizeSlideIndex)for(let t=0;t<u.length;t+=1){const e=-Math.floor(100*y),n=Math.floor(100*u[t]),r=Math.floor(100*u[t+1]);void 0!==u[t+1]?e>=n&&e<r-(r-n)/2?s=t:e>=n&&e<r&&(s=t+1):e>=n&&(s=t)}if(o.initialized&&s!==d){if(!o.allowSlideNext&&y<o.translate&&y<o.minTranslate())return!1;if(!o.allowSlidePrev&&y>o.translate&&y>o.maxTranslate()&&(d||0)!==s)return!1}let _;if(_=s>d?"next":s<d?"prev":"reset",h&&-y===o.translate||!h&&y===o.translate)return o.updateActiveIndex(s),a.autoHeight&&o.updateAutoHeight(),o.updateSlidesClasses(),"slide"!==a.effect&&o.setTranslate(y),"reset"!==_&&(o.transitionStart(n,_),o.transitionEnd(n,_)),!1;if(a.cssMode){const t=o.isHorizontal(),n=h?y:-y;if(0===e){const e=o.virtual&&o.params.virtual.enabled;e&&(o.wrapperEl.style.scrollSnapType="none",o._immediateVirtual=!0),p[t?"scrollLeft":"scrollTop"]=n,e&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._swiperImmediateVirtual=!1})}else{if(!o.support.smoothScroll)return v({swiper:o,targetPosition:n,side:t?"left":"top"}),!0;p.scrollTo({[t?"left":"top"]:n,behavior:"smooth"})}return!0}return 0===e?(o.setTransition(0),o.setTranslate(y),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",e,r),o.transitionStart(n,_),o.transitionEnd(n,_)):(o.setTransition(e),o.setTranslate(y),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",e,r),o.transitionStart(n,_),o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(t){o&&!o.destroyed&&t.target===this&&(o.$wrapperEl[0].removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,_))}),o.$wrapperEl[0].addEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onSlideToWrapperTransitionEnd))),!0},slideToLoop:function(t=0,e=this.params.speed,n=!0,r){const i=this;let o=t;return i.params.loop&&(o+=i.loopedSlides),i.slideTo(o,e,n,r)},slideNext:function(t=this.params.speed,e=!0,n){const r=this,{animating:i,enabled:o,params:s}=r;if(!o)return r;let a=s.slidesPerGroup;"auto"===s.slidesPerView&&1===s.slidesPerGroup&&s.slidesPerGroupAuto&&(a=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex<s.slidesPerGroupSkip?1:a;if(s.loop){if(i&&s.loopPreventsSlide)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}return r.slideTo(r.activeIndex+l,t,e,n)},slidePrev:function(t=this.params.speed,e=!0,n){const r=this,{params:i,animating:o,snapGrid:s,slidesGrid:a,rtlTranslate:l,enabled:u}=r;if(!u)return r;if(i.loop){if(o&&i.loopPreventsSlide)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}function c(t){return t<0?-Math.floor(Math.abs(t)):Math.floor(t)}const d=c(l?r.translate:-r.translate),h=s.map(t=>c(t));let p=s[h.indexOf(d)-1];if(void 0===p&&i.cssMode){let t;s.forEach((e,n)=>{d>=e&&(t=n)}),void 0!==t&&(p=s[t>0?t-1:t])}let f=0;return void 0!==p&&(f=a.indexOf(p),f<0&&(f=r.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(f=f-r.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),r.slideTo(f,t,e,n)},slideReset:function(t=this.params.speed,e=!0,n){return this.slideTo(this.activeIndex,t,e,n)},slideToClosest:function(t=this.params.speed,e=!0,n,r=.5){const i=this;let o=i.activeIndex;const s=Math.min(i.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){const t=i.snapGrid[a];l-t>(i.snapGrid[a+1]-t)*r&&(o+=i.params.slidesPerGroup)}else{const t=i.snapGrid[a-1];l-t<=(i.snapGrid[a]-t)*r&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,t,e,n)},slideToClickedSlide:function(){const t=this,{params:e,$wrapperEl:n}=t,r="auto"===e.slidesPerView?t.slidesPerViewDynamic():e.slidesPerView;let i,o=t.clickedIndex;if(e.loop){if(t.animating)return;i=parseInt(u(t.clickedSlide).attr("data-swiper-slide-index"),10),e.centeredSlides?o<t.loopedSlides-r/2||o>t.slides.length-t.loopedSlides+r/2?(t.loopFix(),o=n.children(`.${e.slideClass}[data-swiper-slide-index="${i}"]:not(.${e.slideDuplicateClass})`).eq(0).index(),d(()=>{t.slideTo(o)})):t.slideTo(o):o>t.slides.length-r?(t.loopFix(),o=n.children(`.${e.slideClass}[data-swiper-slide-index="${i}"]:not(.${e.slideDuplicateClass})`).eq(0).index(),d(()=>{t.slideTo(o)})):t.slideTo(o)}else t.slideTo(o)}},loop:{loopCreate:function(){const t=this,e=r(),{params:n,$wrapperEl:i}=t,o=i.children().length>0?u(i.children()[0].parentNode):i;o.children(`.${n.slideClass}.${n.slideDuplicateClass}`).remove();let s=o.children("."+n.slideClass);if(n.loopFillGroupWithBlank){const t=n.slidesPerGroup-s.length%n.slidesPerGroup;if(t!==n.slidesPerGroup){for(let r=0;r<t;r+=1){const t=u(e.createElement("div")).addClass(`${n.slideClass} ${n.slideBlankClass}`);o.append(t)}s=o.children("."+n.slideClass)}}"auto"!==n.slidesPerView||n.loopedSlides||(n.loopedSlides=s.length),t.loopedSlides=Math.ceil(parseFloat(n.loopedSlides||n.slidesPerView,10)),t.loopedSlides+=n.loopAdditionalSlides,t.loopedSlides>s.length&&(t.loopedSlides=s.length);const a=[],l=[];s.each((e,n)=>{const r=u(e);n<t.loopedSlides&&l.push(e),n<s.length&&n>=s.length-t.loopedSlides&&a.push(e),r.attr("data-swiper-slide-index",n)});for(let t=0;t<l.length;t+=1)o.append(u(l[t].cloneNode(!0)).addClass(n.slideDuplicateClass));for(let t=a.length-1;t>=0;t-=1)o.prepend(u(a[t].cloneNode(!0)).addClass(n.slideDuplicateClass))},loopFix:function(){const t=this;t.emit("beforeLoopFix");const{activeIndex:e,slides:n,loopedSlides:r,allowSlidePrev:i,allowSlideNext:o,snapGrid:s,rtlTranslate:a}=t;let l;t.allowSlidePrev=!0,t.allowSlideNext=!0;const u=-s[e]-t.getTranslate();e<r?(l=n.length-3*r+e,l+=r,t.slideTo(l,0,!1,!0)&&0!==u&&t.setTranslate((a?-t.translate:t.translate)-u)):e>=n.length-r&&(l=-n.length+e+r,l+=r,t.slideTo(l,0,!1,!0)&&0!==u&&t.setTranslate((a?-t.translate:t.translate)-u)),t.allowSlidePrev=i,t.allowSlideNext=o,t.emit("loopFix")},loopDestroy:function(){const{$wrapperEl:t,params:e,slides:n}=this;t.children(`.${e.slideClass}.${e.slideDuplicateClass},.${e.slideClass}.${e.slideBlankClass}`).remove(),n.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(t){const e=this;if(e.support.touch||!e.params.simulateTouch||e.params.watchOverflow&&e.isLocked||e.params.cssMode)return;const n="container"===e.params.touchEventsTarget?e.el:e.wrapperEl;n.style.cursor="move",n.style.cursor=t?"-webkit-grabbing":"-webkit-grab",n.style.cursor=t?"-moz-grabbin":"-moz-grab",n.style.cursor=t?"grabbing":"grab"},unsetGrabCursor:function(){const t=this;t.support.touch||t.params.watchOverflow&&t.isLocked||t.params.cssMode||(t["container"===t.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="")}},events:{attachEvents:function(){const t=this,e=r(),{params:n,support:i}=t;t.onTouchStart=C.bind(t),t.onTouchMove=E.bind(t),t.onTouchEnd=T.bind(t),n.cssMode&&(t.onScroll=A.bind(t)),t.onClick=O.bind(t),i.touch&&!M&&(e.addEventListener("touchstart",L),M=!0),I(t,"on")},detachEvents:function(){I(this,"off")}},breakpoints:{setBreakpoint:function(){const t=this,{activeIndex:e,initialized:n,loopedSlides:r=0,params:i,$el:o}=t,s=i.breakpoints;if(!s||s&&0===Object.keys(s).length)return;const a=t.getBreakpoint(s,t.params.breakpointsBase,t.el);if(!a||t.currentBreakpoint===a)return;const l=(a in s?s[a]:void 0)||t.originalParams,u=j(t,i),c=j(t,l),d=i.enabled;u&&!c?(o.removeClass(`${i.containerModifierClass}grid ${i.containerModifierClass}grid-column`),t.emitContainerClasses()):!u&&c&&(o.addClass(i.containerModifierClass+"grid"),(l.grid.fill&&"column"===l.grid.fill||!l.grid.fill&&"column"===i.grid.fill)&&o.addClass(i.containerModifierClass+"grid-column"),t.emitContainerClasses());const h=l.direction&&l.direction!==i.direction,p=i.loop&&(l.slidesPerView!==i.slidesPerView||h);h&&n&&t.changeDirection(),m(t.params,l);const f=t.params.enabled;Object.assign(t,{allowTouchMove:t.params.allowTouchMove,allowSlideNext:t.params.allowSlideNext,allowSlidePrev:t.params.allowSlidePrev}),d&&!f?t.disable():!d&&f&&t.enable(),t.currentBreakpoint=a,t.emit("_beforeBreakpoint",l),p&&n&&(t.loopDestroy(),t.loopCreate(),t.updateSlides(),t.slideTo(e-r+t.loopedSlides,0,!1)),t.emit("breakpoint",l)},getBreakpoint:function(t,e="window",n){if(!t||"container"===e&&!n)return;let r=!1;const i=o(),s="window"===e?i.innerHeight:n.clientHeight,a=Object.keys(t).map(t=>{if("string"==typeof t&&0===t.indexOf("@")){const e=parseFloat(t.substr(1));return{value:s*e,point:t}}return{value:t,point:t}});a.sort((t,e)=>parseInt(t.value,10)-parseInt(e.value,10));for(let t=0;t<a.length;t+=1){const{point:o,value:s}=a[t];"window"===e?i.matchMedia(`(min-width: ${s}px)`).matches&&(r=o):s<=n.clientWidth&&(r=o)}return r||"max"}},checkOverflow:{checkOverflow:function(){const t=this,{isLocked:e,params:n}=t,{slidesOffsetBefore:r}=n;if(r){const e=t.slides.length-1,n=t.slidesGrid[e]+t.slidesSizesGrid[e]+2*r;t.isLocked=t.size>n}else t.isLocked=1===t.snapGrid.length;!0===n.allowSlideNext&&(t.allowSlideNext=!t.isLocked),!0===n.allowSlidePrev&&(t.allowSlidePrev=!t.isLocked),e&&e!==t.isLocked&&(t.isEnd=!1),e!==t.isLocked&&t.emit(t.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const t=this,{classNames:e,params:n,rtl:r,$el:i,device:o,support:s}=t,a=function(t,e){const n=[];return t.forEach(t=>{"object"==typeof t?Object.keys(t).forEach(r=>{t[r]&&n.push(e+r)}):"string"==typeof t&&n.push(e+t)}),n}(["initialized",n.direction,{"pointer-events":!s.touch},{"free-mode":t.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:o.android},{ios:o.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides}],n.containerModifierClass);e.push(...a),i.addClass([...e].join(" ")),t.emitContainerClasses()},removeClasses:function(){const{$el:t,classNames:e}=this;t.removeClass(e.join(" ")),this.emitContainerClasses()}},images:{loadImage:function(t,e,n,r,i,s){const a=o();let l;function c(){s&&s()}u(t).parent("picture")[0]||t.complete&&i?c():e?(l=new a.Image,l.onload=c,l.onerror=c,r&&(l.sizes=r),n&&(l.srcset=n),e&&(l.src=e)):c()},preloadImages:function(){const t=this;function e(){null!=t&&t&&!t.destroyed&&(void 0!==t.imagesLoaded&&(t.imagesLoaded+=1),t.imagesLoaded===t.imagesToLoad.length&&(t.params.updateOnImagesReady&&t.update(),t.emit("imagesReady")))}t.imagesToLoad=t.$el.find("img");for(let n=0;n<t.imagesToLoad.length;n+=1){const r=t.imagesToLoad[n];t.loadImage(r,r.currentSrc||r.getAttribute("src"),r.srcset||r.getAttribute("srcset"),r.sizes||r.getAttribute("sizes"),!0,e)}}}},F={};class V{constructor(...t){let e,n;if(1===t.length&&t[0].constructor&&"Object"===Object.prototype.toString.call(t[0]).slice(8,-1)?n=t[0]:[e,n]=t,n||(n={}),n=m({},n),e&&!n.el&&(n.el=e),n.el&&u(n.el).length>1){const t=[];return u(n.el).each(e=>{const r=m({},n,{el:e});t.push(new V(r))}),t}const r=this;r.__swiper__=!0,r.support=w(),r.device=x({userAgent:n.userAgent}),r.browser=S(),r.eventsListeners={},r.eventsAnyListeners=[],r.modules=[...r.__modules__],n.modules&&Array.isArray(n.modules)&&r.modules.push(...n.modules);const i={};r.modules.forEach(t=>{t({swiper:r,extendParams:N(n,i),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),emit:r.emit.bind(r)})});const o=m({},D,i);return r.params=m({},o,F,n),r.originalParams=m({},r.params),r.passedParams=m({},n),r.params&&r.params.on&&Object.keys(r.params.on).forEach(t=>{r.on(t,r.params.on[t])}),r.params&&r.params.onAny&&r.onAny(r.params.onAny),r.$=u,Object.assign(r,{enabled:r.params.enabled,el:e,classNames:[],slides:u(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===r.params.direction,isVertical:()=>"vertical"===r.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEvents:function(){const t=["touchstart","touchmove","touchend","touchcancel"],e=["pointerdown","pointermove","pointerup"];return r.touchEventsTouch={start:t[0],move:t[1],end:t[2],cancel:t[3]},r.touchEventsDesktop={start:e[0],move:e[1],end:e[2]},r.support.touch||!r.params.simulateTouch?r.touchEventsTouch:r.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:r.params.focusableElements,lastClickTime:h(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.emit("_swiper"),r.params.init&&r.init(),r}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,e){const n=this;t=Math.min(Math.max(t,0),1);const r=n.minTranslate(),i=(n.maxTranslate()-r)*t+r;n.translateTo(i,void 0===e?0:e),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const e=t.el.className.split(" ").filter(e=>0===e.indexOf("swiper")||0===e.indexOf(t.params.containerModifierClass));t.emit("_containerClasses",e.join(" "))}getSlideClasses(t){const e=this;return t.className.split(" ").filter(t=>0===t.indexOf("swiper-slide")||0===t.indexOf(e.params.slideClass)).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const e=[];t.slides.each(n=>{const r=t.getSlideClasses(n);e.push({slideEl:n,classNames:r}),t.emit("_slideClass",n,r)}),t.emit("_slideClasses",e)}slidesPerViewDynamic(t="current",e=!1){const{params:n,slides:r,slidesGrid:i,slidesSizesGrid:o,size:s,activeIndex:a}=this;let l=1;if(n.centeredSlides){let t,e=r[a].swiperSlideSize;for(let n=a+1;n<r.length;n+=1)r[n]&&!t&&(e+=r[n].swiperSlideSize,l+=1,e>s&&(t=!0));for(let n=a-1;n>=0;n-=1)r[n]&&!t&&(e+=r[n].swiperSlideSize,l+=1,e>s&&(t=!0))}else if("current"===t)for(let t=a+1;t<r.length;t+=1)(e?i[t]+o[t]-i[a]<s:i[t]-i[a]<s)&&(l+=1);else for(let t=a-1;t>=0;t-=1)i[a]-i[t]<s&&(l+=1);return l}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:e,params:n}=t;function r(){const e=t.rtlTranslate?-1*t.translate:t.translate,n=Math.min(Math.max(e,t.maxTranslate()),t.minTranslate());t.setTranslate(n),t.updateActiveIndex(),t.updateSlidesClasses()}let i;n.breakpoints&&t.setBreakpoint(),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.params.freeMode&&t.params.freeMode.enabled?(r(),t.params.autoHeight&&t.updateAutoHeight()):(i=("auto"===t.params.slidesPerView||t.params.slidesPerView>1)&&t.isEnd&&!t.params.centeredSlides?t.slideTo(t.slides.length-1,0,!1,!0):t.slideTo(t.activeIndex,0,!1,!0),i||r()),n.watchOverflow&&e!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,e=!0){const n=this,r=n.params.direction;return t||(t="horizontal"===r?"vertical":"horizontal"),t===r||"horizontal"!==t&&"vertical"!==t||(n.$el.removeClass(`${n.params.containerModifierClass}${r}`).addClass(`${n.params.containerModifierClass}${t}`),n.emitContainerClasses(),n.params.direction=t,n.slides.each(e=>{"vertical"===t?e.style.width="":e.style.height=""}),n.emit("changeDirection"),e&&n.update()),n}mount(t){const e=this;if(e.mounted)return!0;const n=u(t||e.params.el);if(!(t=n[0]))return!1;t.swiper=e;const i=()=>"."+(e.params.wrapperClass||"").trim().split(" ").join(".");let o=(()=>{if(t&&t.shadowRoot&&t.shadowRoot.querySelector){const e=u(t.shadowRoot.querySelector(i()));return e.children=t=>n.children(t),e}return n.children(i())})();if(0===o.length&&e.params.createElements){const t=r().createElement("div");o=u(t),t.className=e.params.wrapperClass,n.append(t),n.children("."+e.params.slideClass).each(t=>{o.append(t)})}return Object.assign(e,{$el:n,el:t,$wrapperEl:o,wrapperEl:o[0],mounted:!0,rtl:"rtl"===t.dir.toLowerCase()||"rtl"===n.css("direction"),rtlTranslate:"horizontal"===e.params.direction&&("rtl"===t.dir.toLowerCase()||"rtl"===n.css("direction")),wrongRTL:"-webkit-box"===o.css("display")}),!0}init(t){const e=this;return e.initialized||!1===e.mount(t)||(e.emit("beforeInit"),e.params.breakpoints&&e.setBreakpoint(),e.addClasses(),e.params.loop&&e.loopCreate(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&&e.checkOverflow(),e.params.grabCursor&&e.enabled&&e.setGrabCursor(),e.params.preloadImages&&e.preloadImages(),e.params.loop?e.slideTo(e.params.initialSlide+e.loopedSlides,0,e.params.runCallbacksOnInit,!1,!0):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit,!1,!0),e.attachEvents(),e.initialized=!0,e.emit("init"),e.emit("afterInit")),e}destroy(t=!0,e=!0){const n=this,{params:r,$el:i,$wrapperEl:o,slides:s}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),r.loop&&n.loopDestroy(),e&&(n.removeClasses(),i.removeAttr("style"),o.removeAttr("style"),s&&s.length&&s.removeClass([r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(t=>{n.off(t)}),!1!==t&&(n.$el[0].swiper=null,function(t){const e=t;Object.keys(e).forEach(t=>{try{e[t]=null}catch(t){}try{delete e[t]}catch(t){}})}(n)),n.destroyed=!0),null}static extendDefaults(t){m(F,t)}static get extendedDefaults(){return F}static get defaults(){return D}static installModule(t){V.prototype.__modules__||(V.prototype.__modules__=[]);const e=V.prototype.__modules__;"function"==typeof t&&e.indexOf(t)<0&&e.push(t)}static use(t){return Array.isArray(t)?(t.forEach(t=>V.installModule(t)),V):(V.installModule(t),V)}}function z(t,e,n,i){const o=r();return t.params.createElements&&Object.keys(i).forEach(r=>{if(!n[r]&&!0===n.auto){let s=t.$el.children("."+i[r])[0];s||(s=o.createElement("div"),s.className=i[r],t.$el.append(s)),n[r]=s,e[r]=s}}),n}function B(t=""){return"."+t.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}function q(t){const e=this,{$wrapperEl:n,params:r}=e;if(r.loop&&e.loopDestroy(),"object"==typeof t&&"length"in t)for(let e=0;e<t.length;e+=1)t[e]&&n.append(t[e]);else n.append(t);r.loop&&e.loopCreate(),r.observer||e.update()}function H(t){const e=this,{params:n,$wrapperEl:r,activeIndex:i}=e;n.loop&&e.loopDestroy();let o=i+1;if("object"==typeof t&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&r.prepend(t[e]);o=i+t.length}else r.prepend(t);n.loop&&e.loopCreate(),n.observer||e.update(),e.slideTo(o,0,!1)}function $(t,e){const n=this,{$wrapperEl:r,params:i,activeIndex:o}=n;let s=o;i.loop&&(s-=n.loopedSlides,n.loopDestroy(),n.slides=r.children("."+i.slideClass));const a=n.slides.length;if(t<=0)return void n.prependSlide(e);if(t>=a)return void n.appendSlide(e);let l=s>t?s+1:s;const u=[];for(let e=a-1;e>=t;e-=1){const t=n.slides.eq(e);t.remove(),u.unshift(t)}if("object"==typeof e&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&r.append(e[t]);l=s>t?s+e.length:s}else r.append(e);for(let t=0;t<u.length;t+=1)r.append(u[t]);i.loop&&n.loopCreate(),i.observer||n.update(),i.loop?n.slideTo(l+n.loopedSlides,0,!1):n.slideTo(l,0,!1)}function U(t){const e=this,{params:n,$wrapperEl:r,activeIndex:i}=e;let o=i;n.loop&&(o-=e.loopedSlides,e.loopDestroy(),e.slides=r.children("."+n.slideClass));let s,a=o;if("object"==typeof t&&"length"in t){for(let n=0;n<t.length;n+=1)s=t[n],e.slides[s]&&e.slides.eq(s).remove(),s<a&&(a-=1);a=Math.max(a,0)}else s=t,e.slides[s]&&e.slides.eq(s).remove(),s<a&&(a-=1),a=Math.max(a,0);n.loop&&e.loopCreate(),n.observer||e.update(),n.loop?e.slideTo(a+e.loopedSlides,0,!1):e.slideTo(a,0,!1)}function W(){const t=this,e=[];for(let n=0;n<t.slides.length;n+=1)e.push(n);t.removeSlide(e)}function G(t){const{effect:e,swiper:n,on:r,setTranslate:i,setTransition:o,overwriteParams:s,perspective:a}=t;r("beforeInit",()=>{if(n.params.effect!==e)return;n.classNames.push(`${n.params.containerModifierClass}${e}`),a&&a()&&n.classNames.push(n.params.containerModifierClass+"3d");const t=s?s():{};Object.assign(n.params,t),Object.assign(n.originalParams,t)}),r("setTranslate",()=>{n.params.effect===e&&i()}),r("setTransition",(t,r)=>{n.params.effect===e&&o(r)})}function Y(t,e){return t.transformEl?e.find(t.transformEl).css({"backface-visibility":"hidden","-webkit-backface-visibility":"hidden"}):e}function Z({swiper:t,duration:e,transformEl:n,allSlides:r}){const{slides:i,activeIndex:o,$wrapperEl:s}=t;if(t.params.virtualTranslate&&0!==e){let e,a=!1;e=r?n?i.find(n):i:n?i.eq(o).find(n):i.eq(o),e.transitionEnd(()=>{if(a)return;if(!t||t.destroyed)return;a=!0,t.animating=!1;const e=["webkitTransitionEnd","transitionend"];for(let t=0;t<e.length;t+=1)s.trigger(e[t])})}}function K(t,e,n){const r="swiper-slide-shadow"+(n?"-"+n:""),i=t.transformEl?e.find(t.transformEl):e;let o=i.children("."+r);return o.length||(o=u(`<div class="swiper-slide-shadow${n?"-"+n:""}"></div>`),i.append(o)),o}Object.keys(R).forEach(t=>{Object.keys(R[t]).forEach(e=>{V.prototype[e]=R[t][e]})}),V.use([function({swiper:t,on:e,emit:n}){const r=o();let i=null;const s=()=>{t&&!t.destroyed&&t.initialized&&(n("beforeResize"),n("resize"))},a=()=>{t&&!t.destroyed&&t.initialized&&n("orientationchange")};e("init",()=>{t.params.resizeObserver&&void 0!==r.ResizeObserver?t&&!t.destroyed&&t.initialized&&(i=new ResizeObserver(e=>{const{width:n,height:r}=t;let i=n,o=r;e.forEach(({contentBoxSize:e,contentRect:n,target:r})=>{r&&r!==t.el||(i=n?n.width:(e[0]||e).inlineSize,o=n?n.height:(e[0]||e).blockSize)}),i===n&&o===r||s()}),i.observe(t.el)):(r.addEventListener("resize",s),r.addEventListener("orientationchange",a))}),e("destroy",()=>{i&&i.unobserve&&t.el&&(i.unobserve(t.el),i=null),r.removeEventListener("resize",s),r.removeEventListener("orientationchange",a)})},function({swiper:t,extendParams:e,on:n,emit:r}){const i=[],s=o(),a=(t,e={})=>{const n=new(s.MutationObserver||s.WebkitMutationObserver)(t=>{if(1===t.length)return void r("observerUpdate",t[0]);const e=function(){r("observerUpdate",t[0])};s.requestAnimationFrame?s.requestAnimationFrame(e):s.setTimeout(e,0)});n.observe(t,{attributes:void 0===e.attributes||e.attributes,childList:void 0===e.childList||e.childList,characterData:void 0===e.characterData||e.characterData}),i.push(n)};e({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",()=>{if(t.params.observer){if(t.params.observeParents){const e=t.$el.parents();for(let t=0;t<e.length;t+=1)a(e[t])}a(t.$el[0],{childList:t.params.observeSlideChildren}),a(t.$wrapperEl[0],{attributes:!1})}}),n("destroy",()=>{i.forEach(t=>{t.disconnect()}),i.splice(0,i.length)})}]);const X=[function({swiper:t,extendParams:e,on:n}){let r;function i(e,n){const r=t.params.virtual;if(r.cache&&t.virtual.cache[n])return t.virtual.cache[n];const i=r.renderSlide?u(r.renderSlide.call(t,e,n)):u(`<div class="${t.params.slideClass}" data-swiper-slide-index="${n}">${e}</div>`);return i.attr("data-swiper-slide-index")||i.attr("data-swiper-slide-index",n),r.cache&&(t.virtual.cache[n]=i),i}function o(e){const{slidesPerView:n,slidesPerGroup:r,centeredSlides:o}=t.params,{addSlidesBefore:s,addSlidesAfter:a}=t.params.virtual,{from:l,to:u,slides:c,slidesGrid:d,offset:h}=t.virtual;t.params.cssMode||t.updateActiveIndex();const p=t.activeIndex||0;let f,m,g;f=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",o?(m=Math.floor(n/2)+r+a,g=Math.floor(n/2)+r+s):(m=n+(r-1)+a,g=r+s);const v=Math.max((p||0)-g,0),y=Math.min((p||0)+m,c.length-1),_=(t.slidesGrid[v]||0)-(t.slidesGrid[0]||0);function b(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(Object.assign(t.virtual,{from:v,to:y,offset:_,slidesGrid:t.slidesGrid}),l===v&&u===y&&!e)return t.slidesGrid!==d&&_!==h&&t.slides.css(f,_+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:_,from:v,to:y,slides:function(){const t=[];for(let e=v;e<=y;e+=1)t.push(c[e]);return t}()}),void(t.params.virtual.renderExternalUpdate&&b());const w=[],x=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(let e=l;e<=u;e+=1)(e<v||e>y)&&t.$wrapperEl.find(`.${t.params.slideClass}[data-swiper-slide-index="${e}"]`).remove();for(let t=0;t<c.length;t+=1)t>=v&&t<=y&&(void 0===u||e?x.push(t):(t>u&&x.push(t),t<l&&w.push(t)));x.forEach(e=>{t.$wrapperEl.append(i(c[e],e))}),w.sort((t,e)=>e-t).forEach(e=>{t.$wrapperEl.prepend(i(c[e],e))}),t.$wrapperEl.children(".swiper-slide").css(f,_+"px"),b()}e({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}}),t.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]},n("beforeInit",()=>{t.params.virtual.enabled&&(t.virtual.slides=t.params.virtual.slides,t.classNames.push(t.params.containerModifierClass+"virtual"),t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0,t.params.initialSlide||o())}),n("setTranslate",()=>{t.params.virtual.enabled&&(t.params.cssMode&&!t._immediateVirtual?(clearTimeout(r),r=setTimeout(()=>{o()},100)):o())}),n("init update resize",()=>{t.params.virtual.enabled&&t.params.cssMode&&g(t.wrapperEl,"--swiper-virtual-size",t.virtualSize+"px")}),Object.assign(t.virtual,{appendSlide:function(e){if("object"==typeof e&&"length"in e)for(let n=0;n<e.length;n+=1)e[n]&&t.virtual.slides.push(e[n]);else t.virtual.slides.push(e);o(!0)},prependSlide:function(e){const n=t.activeIndex;let r=n+1,i=1;if(Array.isArray(e)){for(let n=0;n<e.length;n+=1)e[n]&&t.virtual.slides.unshift(e[n]);r=n+e.length,i=e.length}else t.virtual.slides.unshift(e);if(t.params.virtual.cache){const e=t.virtual.cache,n={};Object.keys(e).forEach(t=>{const r=e[t],o=r.attr("data-swiper-slide-index");o&&r.attr("data-swiper-slide-index",parseInt(o,10)+i),n[parseInt(t,10)+i]=r}),t.virtual.cache=n}o(!0),t.slideTo(r,0)},removeSlide:function(e){if(null==e)return;let n=t.activeIndex;if(Array.isArray(e))for(let r=e.length-1;r>=0;r-=1)t.virtual.slides.splice(e[r],1),t.params.virtual.cache&&delete t.virtual.cache[e[r]],e[r]<n&&(n-=1),n=Math.max(n,0);else t.virtual.slides.splice(e,1),t.params.virtual.cache&&delete t.virtual.cache[e],e<n&&(n-=1),n=Math.max(n,0);o(!0),t.slideTo(n,0)},removeAllSlides:function(){t.virtual.slides=[],t.params.virtual.cache&&(t.virtual.cache={}),o(!0),t.slideTo(0,0)},update:o})},function({swiper:t,extendParams:e,on:n,emit:i}){const s=r(),a=o();function l(e){if(!t.enabled)return;const{rtlTranslate:n}=t;let r=e;r.originalEvent&&(r=r.originalEvent);const o=r.keyCode||r.charCode,l=t.params.keyboard.pageUpDown,u=l&&33===o,c=l&&34===o,d=37===o,h=39===o,p=38===o,f=40===o;if(!t.allowSlideNext&&(t.isHorizontal()&&h||t.isVertical()&&f||c))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&d||t.isVertical()&&p||u))return!1;if(!(r.shiftKey||r.altKey||r.ctrlKey||r.metaKey||s.activeElement&&s.activeElement.nodeName&&("input"===s.activeElement.nodeName.toLowerCase()||"textarea"===s.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(u||c||d||h||p||f)){let e=!1;if(t.$el.parents("."+t.params.slideClass).length>0&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;const r=t.$el,i=r[0].clientWidth,o=r[0].clientHeight,s=a.innerWidth,l=a.innerHeight,u=t.$el.offset();n&&(u.left-=t.$el[0].scrollLeft);const c=[[u.left,u.top],[u.left+i,u.top],[u.left,u.top+o],[u.left+i,u.top+o]];for(let t=0;t<c.length;t+=1){const n=c[t];if(n[0]>=0&&n[0]<=s&&n[1]>=0&&n[1]<=l){if(0===n[0]&&0===n[1])continue;e=!0}}if(!e)return}t.isHorizontal()?((u||c||d||h)&&(r.preventDefault?r.preventDefault():r.returnValue=!1),((c||h)&&!n||(u||d)&&n)&&t.slideNext(),((u||d)&&!n||(c||h)&&n)&&t.slidePrev()):((u||c||p||f)&&(r.preventDefault?r.preventDefault():r.returnValue=!1),(c||f)&&t.slideNext(),(u||p)&&t.slidePrev()),i("keyPress",o)}}function c(){t.keyboard.enabled||(u(s).on("keydown",l),t.keyboard.enabled=!0)}function d(){t.keyboard.enabled&&(u(s).off("keydown",l),t.keyboard.enabled=!1)}t.keyboard={enabled:!1},e({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),n("init",()=>{t.params.keyboard.enabled&&c()}),n("destroy",()=>{t.keyboard.enabled&&d()}),Object.assign(t.keyboard,{enable:c,disable:d})},function({swiper:t,extendParams:e,on:n,emit:r}){const i=o();let s;e({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}}),t.mousewheel={enabled:!1};let a,l=h();const c=[];function p(){t.enabled&&(t.mouseEntered=!0)}function f(){t.enabled&&(t.mouseEntered=!1)}function m(e){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta||t.params.mousewheel.thresholdTime&&h()-l<t.params.mousewheel.thresholdTime||!(e.delta>=6&&h()-l<60)&&(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),r("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),r("scroll",e.raw)),l=(new i.Date).getTime(),1))}function g(e){let n=e,i=!0;if(!t.enabled)return;const o=t.params.mousewheel;t.params.cssMode&&n.preventDefault();let l=t.$el;if("container"!==t.params.mousewheel.eventsTarget&&(l=u(t.params.mousewheel.eventsTarget)),!t.mouseEntered&&!l[0].contains(n.target)&&!o.releaseOnEdges)return!0;n.originalEvent&&(n=n.originalEvent);let p=0;const f=t.rtlTranslate?-1:1,g=function(t){let e=0,n=0,r=0,i=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),r=10*e,i=10*n,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(r=t.deltaX),t.shiftKey&&!r&&(r=i,i=0),(r||i)&&t.deltaMode&&(1===t.deltaMode?(r*=40,i*=40):(r*=800,i*=800)),r&&!e&&(e=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:e,spinY:n,pixelX:r,pixelY:i}}(n);if(o.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(g.pixelX)>Math.abs(g.pixelY)))return!0;p=-g.pixelX*f}else{if(!(Math.abs(g.pixelY)>Math.abs(g.pixelX)))return!0;p=-g.pixelY}else p=Math.abs(g.pixelX)>Math.abs(g.pixelY)?-g.pixelX*f:-g.pixelY;if(0===p)return!0;o.invert&&(p=-p);let v=t.getTranslate()+p*o.sensitivity;if(v>=t.minTranslate()&&(v=t.minTranslate()),v<=t.maxTranslate()&&(v=t.maxTranslate()),i=!!t.params.loop||!(v===t.minTranslate()||v===t.maxTranslate()),i&&t.params.nested&&n.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:h(),delta:Math.abs(p),direction:Math.sign(p)},i=a&&e.time<a.time+500&&e.delta<=a.delta&&e.direction===a.direction;if(!i){a=void 0,t.params.loop&&t.loopFix();let l=t.getTranslate()+p*o.sensitivity;const u=t.isBeginning,h=t.isEnd;if(l>=t.minTranslate()&&(l=t.minTranslate()),l<=t.maxTranslate()&&(l=t.maxTranslate()),t.setTransition(0),t.setTranslate(l),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!u&&t.isBeginning||!h&&t.isEnd)&&t.updateSlidesClasses(),t.params.freeMode.sticky){clearTimeout(s),s=void 0,c.length>=15&&c.shift();const n=c.length?c[c.length-1]:void 0,r=c[0];if(c.push(e),n&&(e.delta>n.delta||e.direction!==n.direction))c.splice(0);else if(c.length>=15&&e.time-r.time<500&&r.delta-e.delta>=1&&e.delta<=6){const n=p>0?.8:.2;a=e,c.splice(0),s=d(()=>{t.slideToClosest(t.params.speed,!0,void 0,n)},0)}s||(s=d(()=>{a=e,c.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)},500))}if(i||r("scroll",n),t.params.autoplay&&t.params.autoplayDisableOnInteraction&&t.autoplay.stop(),l===t.minTranslate()||l===t.maxTranslate())return!0}}else{const n={time:h(),delta:Math.abs(p),direction:Math.sign(p),raw:e};c.length>=2&&c.shift();const r=c.length?c[c.length-1]:void 0;if(c.push(n),r?(n.direction!==r.direction||n.delta>r.delta||n.time>r.time+150)&&m(n):m(n),function(e){const n=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&n.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&n.releaseOnEdges)return!0;return!1}(n))return!0}return n.preventDefault?n.preventDefault():n.returnValue=!1,!1}function v(e){let n=t.$el;"container"!==t.params.mousewheel.eventsTarget&&(n=u(t.params.mousewheel.eventsTarget)),n[e]("mouseenter",p),n[e]("mouseleave",f),n[e]("wheel",g)}function y(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",g),!0):!t.mousewheel.enabled&&(v("on"),t.mousewheel.enabled=!0,!0)}function _(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,g),!0):!!t.mousewheel.enabled&&(v("off"),t.mousewheel.enabled=!1,!0)}n("init",()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&_(),t.params.mousewheel.enabled&&y()}),n("destroy",()=>{t.params.cssMode&&y(),t.mousewheel.enabled&&_()}),Object.assign(t.mousewheel,{enable:y,disable:_})},function({swiper:t,extendParams:e,on:n,emit:r}){function i(e){let n;return e&&(n=u(e),t.params.uniqueNavElements&&"string"==typeof e&&n.length>1&&1===t.$el.find(e).length&&(n=t.$el.find(e))),n}function o(e,n){const r=t.params.navigation;e&&e.length>0&&(e[n?"addClass":"removeClass"](r.disabledClass),e[0]&&"BUTTON"===e[0].tagName&&(e[0].disabled=n),t.params.watchOverflow&&t.enabled&&e[t.isLocked?"addClass":"removeClass"](r.lockClass))}function s(){if(t.params.loop)return;const{$nextEl:e,$prevEl:n}=t.navigation;o(n,t.isBeginning),o(e,t.isEnd)}function a(e){e.preventDefault(),t.isBeginning&&!t.params.loop||t.slidePrev()}function l(e){e.preventDefault(),t.isEnd&&!t.params.loop||t.slideNext()}function c(){const e=t.params.navigation;if(t.params.navigation=z(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;const n=i(e.nextEl),r=i(e.prevEl);n&&n.length>0&&n.on("click",l),r&&r.length>0&&r.on("click",a),Object.assign(t.navigation,{$nextEl:n,nextEl:n&&n[0],$prevEl:r,prevEl:r&&r[0]}),t.enabled||(n&&n.addClass(e.lockClass),r&&r.addClass(e.lockClass))}function d(){const{$nextEl:e,$prevEl:n}=t.navigation;e&&e.length&&(e.off("click",l),e.removeClass(t.params.navigation.disabledClass)),n&&n.length&&(n.off("click",a),n.removeClass(t.params.navigation.disabledClass))}e({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}}),t.navigation={nextEl:null,$nextEl:null,prevEl:null,$prevEl:null},n("init",()=>{c(),s()}),n("toEdge fromEdge lock unlock",()=>{s()}),n("destroy",()=>{d()}),n("enable disable",()=>{const{$nextEl:e,$prevEl:n}=t.navigation;e&&e[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass),n&&n[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass)}),n("click",(e,n)=>{const{$nextEl:i,$prevEl:o}=t.navigation,s=n.target;if(t.params.navigation.hideOnClick&&!u(s).is(o)&&!u(s).is(i)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===s||t.pagination.el.contains(s)))return;let e;i?e=i.hasClass(t.params.navigation.hiddenClass):o&&(e=o.hasClass(t.params.navigation.hiddenClass)),r(!0===e?"navigationShow":"navigationHide"),i&&i.toggleClass(t.params.navigation.hiddenClass),o&&o.toggleClass(t.params.navigation.hiddenClass)}}),Object.assign(t.navigation,{update:s,init:c,destroy:d})},function({swiper:t,extendParams:e,on:n,emit:r}){const i="swiper-pagination";let o;e({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:t=>t,formatFractionTotal:t=>t,bulletClass:i+"-bullet",bulletActiveClass:i+"-bullet-active",modifierClass:i+"-",currentClass:i+"-current",totalClass:i+"-total",hiddenClass:i+"-hidden",progressbarFillClass:i+"-progressbar-fill",progressbarOppositeClass:i+"-progressbar-opposite",clickableClass:i+"-clickable",lockClass:i+"-lock",horizontalClass:i+"-horizontal",verticalClass:i+"-vertical"}}),t.pagination={el:null,$el:null,bullets:[]};let s=0;function a(){return!t.params.pagination.el||!t.pagination.el||!t.pagination.$el||0===t.pagination.$el.length}function l(e,n){const{bulletActiveClass:r}=t.params.pagination;e[n]().addClass(`${r}-${n}`)[n]().addClass(`${r}-${n}-${n}`)}function c(){const e=t.rtl,n=t.params.pagination;if(a())return;const i=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,c=t.pagination.$el;let d;const h=t.params.loop?Math.ceil((i-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(d=Math.ceil((t.activeIndex-t.loopedSlides)/t.params.slidesPerGroup),d>i-1-2*t.loopedSlides&&(d-=i-2*t.loopedSlides),d>h-1&&(d-=h),d<0&&"bullets"!==t.params.paginationType&&(d=h+d)):d=void 0!==t.snapIndex?t.snapIndex:t.activeIndex||0,"bullets"===n.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const r=t.pagination.bullets;let i,a,h;if(n.dynamicBullets&&(o=r.eq(0)[t.isHorizontal()?"outerWidth":"outerHeight"](!0),c.css(t.isHorizontal()?"width":"height",o*(n.dynamicMainBullets+4)+"px"),n.dynamicMainBullets>1&&void 0!==t.previousIndex&&(s+=d-t.previousIndex,s>n.dynamicMainBullets-1?s=n.dynamicMainBullets-1:s<0&&(s=0)),i=d-s,a=i+(Math.min(r.length,n.dynamicMainBullets)-1),h=(a+i)/2),r.removeClass(["","-next","-next-next","-prev","-prev-prev","-main"].map(t=>`${n.bulletActiveClass}${t}`).join(" ")),c.length>1)r.each(t=>{const e=u(t),r=e.index();r===d&&e.addClass(n.bulletActiveClass),n.dynamicBullets&&(r>=i&&r<=a&&e.addClass(n.bulletActiveClass+"-main"),r===i&&l(e,"prev"),r===a&&l(e,"next"))});else{const e=r.eq(d),o=e.index();if(e.addClass(n.bulletActiveClass),n.dynamicBullets){const e=r.eq(i),s=r.eq(a);for(let t=i;t<=a;t+=1)r.eq(t).addClass(n.bulletActiveClass+"-main");if(t.params.loop)if(o>=r.length-n.dynamicMainBullets){for(let t=n.dynamicMainBullets;t>=0;t-=1)r.eq(r.length-t).addClass(n.bulletActiveClass+"-main");r.eq(r.length-n.dynamicMainBullets-1).addClass(n.bulletActiveClass+"-prev")}else l(e,"prev"),l(s,"next");else l(e,"prev"),l(s,"next")}}if(n.dynamicBullets){const i=Math.min(r.length,n.dynamicMainBullets+4),s=(o*i-o)/2-h*o,a=e?"right":"left";r.css(t.isHorizontal()?a:"top",s+"px")}}if("fraction"===n.type&&(c.find(B(n.currentClass)).text(n.formatFractionCurrent(d+1)),c.find(B(n.totalClass)).text(n.formatFractionTotal(h))),"progressbar"===n.type){let e;e=n.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const r=(d+1)/h;let i=1,o=1;"horizontal"===e?i=r:o=r,c.find(B(n.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${i}) scaleY(${o})`).transition(t.params.speed)}"custom"===n.type&&n.renderCustom?(c.html(n.renderCustom(t,d+1,h)),r("paginationRender",c[0])):r("paginationUpdate",c[0]),t.params.watchOverflow&&t.enabled&&c[t.isLocked?"addClass":"removeClass"](n.lockClass)}function d(){const e=t.params.pagination;if(a())return;const n=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,i=t.pagination.$el;let o="";if("bullets"===e.type){let r=t.params.loop?Math.ceil((n-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&!t.params.loop&&r>n&&(r=n);for(let n=0;n<r;n+=1)e.renderBullet?o+=e.renderBullet.call(t,n,e.bulletClass):o+=`<${e.bulletElement} class="${e.bulletClass}"></${e.bulletElement}>`;i.html(o),t.pagination.bullets=i.find(B(e.bulletClass))}"fraction"===e.type&&(o=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`,i.html(o)),"progressbar"===e.type&&(o=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`,i.html(o)),"custom"!==e.type&&r("paginationRender",t.pagination.$el[0])}function h(){t.params.pagination=z(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let n=u(e.el);0!==n.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&n.length>1&&(n=t.$el.find(e.el),n.length>1&&(n=n.filter(e=>u(e).parents(".swiper")[0]===t.el))),"bullets"===e.type&&e.clickable&&n.addClass(e.clickableClass),n.addClass(e.modifierClass+e.type),n.addClass(e.modifierClass+t.params.direction),"bullets"===e.type&&e.dynamicBullets&&(n.addClass(`${e.modifierClass}${e.type}-dynamic`),s=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&n.addClass(e.progressbarOppositeClass),e.clickable&&n.on("click",B(e.bulletClass),(function(e){e.preventDefault();let n=u(this).index()*t.params.slidesPerGroup;t.params.loop&&(n+=t.loopedSlides),t.slideTo(n)})),Object.assign(t.pagination,{$el:n,el:n[0]}),t.enabled||n.addClass(e.lockClass))}function p(){const e=t.params.pagination;if(a())return;const n=t.pagination.$el;n.removeClass(e.hiddenClass),n.removeClass(e.modifierClass+e.type),n.removeClass(e.modifierClass+t.params.direction),t.pagination.bullets&&t.pagination.bullets.removeClass&&t.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&n.off("click",B(e.bulletClass))}n("init",()=>{h(),d(),c()}),n("activeIndexChange",()=>{(t.params.loop||void 0===t.snapIndex)&&c()}),n("snapIndexChange",()=>{t.params.loop||c()}),n("slidesLengthChange",()=>{t.params.loop&&(d(),c())}),n("snapGridLengthChange",()=>{t.params.loop||(d(),c())}),n("destroy",()=>{p()}),n("enable disable",()=>{const{$el:e}=t.pagination;e&&e[t.enabled?"removeClass":"addClass"](t.params.pagination.lockClass)}),n("lock unlock",()=>{c()}),n("click",(e,n)=>{const i=n.target,{$el:o}=t.pagination;if(t.params.pagination.el&&t.params.pagination.hideOnClick&&o.length>0&&!u(i).hasClass(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&i===t.navigation.nextEl||t.navigation.prevEl&&i===t.navigation.prevEl))return;const e=o.hasClass(t.params.pagination.hiddenClass);r(!0===e?"paginationShow":"paginationHide"),o.toggleClass(t.params.pagination.hiddenClass)}}),Object.assign(t.pagination,{render:d,update:c,init:h,destroy:p})},function({swiper:t,extendParams:e,on:n,emit:i}){const o=r();let s,a,l,c,h=!1,p=null,f=null;function m(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:n,progress:r}=t,{$dragEl:i,$el:o}=e,s=t.params.scrollbar;let u=a,c=(l-a)*r;n?(c=-c,c>0?(u=a-c,c=0):-c+a>l&&(u=l+c)):c<0?(u=a+c,c=0):c+a>l&&(u=l-c),t.isHorizontal()?(i.transform(`translate3d(${c}px, 0, 0)`),i[0].style.width=u+"px"):(i.transform(`translate3d(0px, ${c}px, 0)`),i[0].style.height=u+"px"),s.hide&&(clearTimeout(p),o[0].style.opacity=1,p=setTimeout(()=>{o[0].style.opacity=0,o.transition(400)},1e3))}function g(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{$dragEl:n,$el:r}=e;n[0].style.width="",n[0].style.height="",l=t.isHorizontal()?r[0].offsetWidth:r[0].offsetHeight,c=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),a="auto"===t.params.scrollbar.dragSize?l*c:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?n[0].style.width=a+"px":n[0].style.height=a+"px",r[0].style.display=c>=1?"none":"",t.params.scrollbar.hide&&(r[0].style.opacity=0),t.params.watchOverflow&&t.enabled&&e.$el[t.isLocked?"addClass":"removeClass"](t.params.scrollbar.lockClass)}function v(e){return t.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY}function y(e){const{scrollbar:n,rtlTranslate:r}=t,{$el:i}=n;let o;o=(v(e)-i.offset()[t.isHorizontal()?"left":"top"]-(null!==s?s:a/2))/(l-a),o=Math.max(Math.min(o,1),0),r&&(o=1-o);const u=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*o;t.updateProgress(u),t.setTranslate(u),t.updateActiveIndex(),t.updateSlidesClasses()}function _(e){const n=t.params.scrollbar,{scrollbar:r,$wrapperEl:o}=t,{$el:a,$dragEl:l}=r;h=!0,s=e.target===l[0]||e.target===l?v(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),o.transition(100),l.transition(100),y(e),clearTimeout(f),a.transition(0),n.hide&&a.css("opacity",1),t.params.cssMode&&t.$wrapperEl.css("scroll-snap-type","none"),i("scrollbarDragStart",e)}function b(e){const{scrollbar:n,$wrapperEl:r}=t,{$el:o,$dragEl:s}=n;h&&(e.preventDefault?e.preventDefault():e.returnValue=!1,y(e),r.transition(0),o.transition(0),s.transition(0),i("scrollbarDragMove",e))}function w(e){const n=t.params.scrollbar,{scrollbar:r,$wrapperEl:o}=t,{$el:s}=r;h&&(h=!1,t.params.cssMode&&(t.$wrapperEl.css("scroll-snap-type",""),o.transition("")),n.hide&&(clearTimeout(f),f=d(()=>{s.css("opacity",0),s.transition(400)},1e3)),i("scrollbarDragEnd",e),n.snapOnRelease&&t.slideToClosest())}function x(e){const{scrollbar:n,touchEventsTouch:r,touchEventsDesktop:i,params:s,support:a}=t,l=n.$el[0],u=!(!a.passiveListener||!s.passiveListeners)&&{passive:!1,capture:!1},c=!(!a.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};if(!l)return;const d="on"===e?"addEventListener":"removeEventListener";a.touch?(l[d](r.start,_,u),l[d](r.move,b,u),l[d](r.end,w,c)):(l[d](i.start,_,u),o[d](i.move,b,u),o[d](i.end,w,c))}function S(){const{scrollbar:e,$el:n}=t;t.params.scrollbar=z(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const r=t.params.scrollbar;if(!r.el)return;let i=u(r.el);t.params.uniqueNavElements&&"string"==typeof r.el&&i.length>1&&1===n.find(r.el).length&&(i=n.find(r.el));let o=i.find("."+t.params.scrollbar.dragClass);0===o.length&&(o=u(`<div class="${t.params.scrollbar.dragClass}"></div>`),i.append(o)),Object.assign(e,{$el:i,el:i[0],$dragEl:o,dragEl:o[0]}),r.draggable&&t.params.scrollbar.el&&x("on"),i&&i[t.enabled?"removeClass":"addClass"](t.params.scrollbar.lockClass)}function k(){t.params.scrollbar.el&&x("off")}e({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}}),t.scrollbar={el:null,dragEl:null,$el:null,$dragEl:null},n("init",()=>{S(),g(),m()}),n("update resize observerUpdate lock unlock",()=>{g()}),n("setTranslate",()=>{m()}),n("setTransition",(e,n)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&t.scrollbar.$dragEl.transition(e)}(n)}),n("enable disable",()=>{const{$el:e}=t.scrollbar;e&&e[t.enabled?"removeClass":"addClass"](t.params.scrollbar.lockClass)}),n("destroy",()=>{k()}),Object.assign(t.scrollbar,{updateSize:g,setTranslate:m,init:S,destroy:k})},function({swiper:t,extendParams:e,on:n}){e({parallax:{enabled:!1}});const r=(e,n)=>{const{rtl:r}=t,i=u(e),o=r?-1:1,s=i.attr("data-swiper-parallax")||"0";let a=i.attr("data-swiper-parallax-x"),l=i.attr("data-swiper-parallax-y");const c=i.attr("data-swiper-parallax-scale"),d=i.attr("data-swiper-parallax-opacity");if(a||l?(a=a||"0",l=l||"0"):t.isHorizontal()?(a=s,l="0"):(l=s,a="0"),a=a.indexOf("%")>=0?parseInt(a,10)*n*o+"%":a*n*o+"px",l=l.indexOf("%")>=0?parseInt(l,10)*n+"%":l*n+"px",null!=d){const t=d-(d-1)*(1-Math.abs(n));i[0].style.opacity=t}if(null==c)i.transform(`translate3d(${a}, ${l}, 0px)`);else{const t=c-(c-1)*(1-Math.abs(n));i.transform(`translate3d(${a}, ${l}, 0px) scale(${t})`)}},i=()=>{const{$el:e,slides:n,progress:i,snapGrid:o}=t;e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(t=>{r(t,i)}),n.each((e,n)=>{let s=e.progress;t.params.slidesPerGroup>1&&"auto"!==t.params.slidesPerView&&(s+=Math.ceil(n/2)-i*(o.length-1)),s=Math.min(Math.max(s,-1),1),u(e).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(t=>{r(t,s)})})};n("beforeInit",()=>{t.params.parallax.enabled&&(t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0)}),n("init",()=>{t.params.parallax.enabled&&i()}),n("setTranslate",()=>{t.params.parallax.enabled&&i()}),n("setTransition",(e,n)=>{t.params.parallax.enabled&&((e=t.params.speed)=>{const{$el:n}=t;n.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(t=>{const n=u(t);let r=parseInt(n.attr("data-swiper-parallax-duration"),10)||e;0===e&&(r=0),n.transition(r)})})(n)})},function({swiper:t,extendParams:e,on:n,emit:r}){const i=o();e({zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),t.zoom={enabled:!1};let s,a,l,c=1,d=!1;const h={$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},f={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},m={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let g=1;function v(t){if(t.targetTouches.length<2)return 1;const e=t.targetTouches[0].pageX,n=t.targetTouches[0].pageY,r=t.targetTouches[1].pageX,i=t.targetTouches[1].pageY;return Math.sqrt((r-e)**2+(i-n)**2)}function y(e){const n=t.support,r=t.params.zoom;if(a=!1,l=!1,!n.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;a=!0,h.scaleStart=v(e)}h.$slideEl&&h.$slideEl.length||(h.$slideEl=u(e.target).closest("."+t.params.slideClass),0===h.$slideEl.length&&(h.$slideEl=t.slides.eq(t.activeIndex)),h.$imageEl=h.$slideEl.find("."+r.containerClass).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),h.$imageWrapEl=h.$imageEl.parent("."+r.containerClass),h.maxRatio=h.$imageWrapEl.attr("data-swiper-zoom")||r.maxRatio,0!==h.$imageWrapEl.length)?(h.$imageEl&&h.$imageEl.transition(0),d=!0):h.$imageEl=void 0}function _(e){const n=t.support,r=t.params.zoom,i=t.zoom;if(!n.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;l=!0,h.scaleMove=v(e)}h.$imageEl&&0!==h.$imageEl.length?(n.gestures?i.scale=e.scale*c:i.scale=h.scaleMove/h.scaleStart*c,i.scale>h.maxRatio&&(i.scale=h.maxRatio-1+(i.scale-h.maxRatio+1)**.5),i.scale<r.minRatio&&(i.scale=r.minRatio+1-(r.minRatio-i.scale+1)**.5),h.$imageEl.transform(`translate3d(0,0,0) scale(${i.scale})`)):"gesturechange"===e.type&&y(e)}function b(e){const n=t.device,r=t.support,i=t.params.zoom,o=t.zoom;if(!r.gestures){if(!a||!l)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!n.android)return;a=!1,l=!1}h.$imageEl&&0!==h.$imageEl.length&&(o.scale=Math.max(Math.min(o.scale,h.maxRatio),i.minRatio),h.$imageEl.transition(t.params.speed).transform(`translate3d(0,0,0) scale(${o.scale})`),c=o.scale,d=!1,1===o.scale&&(h.$slideEl=void 0))}function w(e){const n=t.zoom;if(!h.$imageEl||0===h.$imageEl.length)return;if(t.allowClick=!1,!f.isTouched||!h.$slideEl)return;f.isMoved||(f.width=h.$imageEl[0].offsetWidth,f.height=h.$imageEl[0].offsetHeight,f.startX=p(h.$imageWrapEl[0],"x")||0,f.startY=p(h.$imageWrapEl[0],"y")||0,h.slideWidth=h.$slideEl[0].offsetWidth,h.slideHeight=h.$slideEl[0].offsetHeight,h.$imageWrapEl.transition(0));const r=f.width*n.scale,i=f.height*n.scale;if(!(r<h.slideWidth&&i<h.slideHeight)){if(f.minX=Math.min(h.slideWidth/2-r/2,0),f.maxX=-f.minX,f.minY=Math.min(h.slideHeight/2-i/2,0),f.maxY=-f.minY,f.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,f.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!f.isMoved&&!d){if(t.isHorizontal()&&(Math.floor(f.minX)===Math.floor(f.startX)&&f.touchesCurrent.x<f.touchesStart.x||Math.floor(f.maxX)===Math.floor(f.startX)&&f.touchesCurrent.x>f.touchesStart.x))return void(f.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(f.minY)===Math.floor(f.startY)&&f.touchesCurrent.y<f.touchesStart.y||Math.floor(f.maxY)===Math.floor(f.startY)&&f.touchesCurrent.y>f.touchesStart.y))return void(f.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),f.isMoved=!0,f.currentX=f.touchesCurrent.x-f.touchesStart.x+f.startX,f.currentY=f.touchesCurrent.y-f.touchesStart.y+f.startY,f.currentX<f.minX&&(f.currentX=f.minX+1-(f.minX-f.currentX+1)**.8),f.currentX>f.maxX&&(f.currentX=f.maxX-1+(f.currentX-f.maxX+1)**.8),f.currentY<f.minY&&(f.currentY=f.minY+1-(f.minY-f.currentY+1)**.8),f.currentY>f.maxY&&(f.currentY=f.maxY-1+(f.currentY-f.maxY+1)**.8),m.prevPositionX||(m.prevPositionX=f.touchesCurrent.x),m.prevPositionY||(m.prevPositionY=f.touchesCurrent.y),m.prevTime||(m.prevTime=Date.now()),m.x=(f.touchesCurrent.x-m.prevPositionX)/(Date.now()-m.prevTime)/2,m.y=(f.touchesCurrent.y-m.prevPositionY)/(Date.now()-m.prevTime)/2,Math.abs(f.touchesCurrent.x-m.prevPositionX)<2&&(m.x=0),Math.abs(f.touchesCurrent.y-m.prevPositionY)<2&&(m.y=0),m.prevPositionX=f.touchesCurrent.x,m.prevPositionY=f.touchesCurrent.y,m.prevTime=Date.now(),h.$imageWrapEl.transform(`translate3d(${f.currentX}px, ${f.currentY}px,0)`)}}function x(){const e=t.zoom;h.$slideEl&&t.previousIndex!==t.activeIndex&&(h.$imageEl&&h.$imageEl.transform("translate3d(0,0,0) scale(1)"),h.$imageWrapEl&&h.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,c=1,h.$slideEl=void 0,h.$imageEl=void 0,h.$imageWrapEl=void 0)}function S(e){const n=t.zoom,r=t.params.zoom;if(h.$slideEl||(e&&e.target&&(h.$slideEl=u(e.target).closest("."+t.params.slideClass)),h.$slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?h.$slideEl=t.$wrapperEl.children("."+t.params.slideActiveClass):h.$slideEl=t.slides.eq(t.activeIndex)),h.$imageEl=h.$slideEl.find("."+r.containerClass).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),h.$imageWrapEl=h.$imageEl.parent("."+r.containerClass)),!h.$imageEl||0===h.$imageEl.length||!h.$imageWrapEl||0===h.$imageWrapEl.length)return;let o,s,a,l,d,p,m,g,v,y,_,b,w,x,S,k,C,E;t.params.cssMode&&(t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.touchAction="none"),h.$slideEl.addClass(""+r.zoomedSlideClass),void 0===f.touchesStart.x&&e?(o="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,s="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(o=f.touchesStart.x,s=f.touchesStart.y),n.scale=h.$imageWrapEl.attr("data-swiper-zoom")||r.maxRatio,c=h.$imageWrapEl.attr("data-swiper-zoom")||r.maxRatio,e?(C=h.$slideEl[0].offsetWidth,E=h.$slideEl[0].offsetHeight,a=h.$slideEl.offset().left+i.scrollX,l=h.$slideEl.offset().top+i.scrollY,d=a+C/2-o,p=l+E/2-s,v=h.$imageEl[0].offsetWidth,y=h.$imageEl[0].offsetHeight,_=v*n.scale,b=y*n.scale,w=Math.min(C/2-_/2,0),x=Math.min(E/2-b/2,0),S=-w,k=-x,m=d*n.scale,g=p*n.scale,m<w&&(m=w),m>S&&(m=S),g<x&&(g=x),g>k&&(g=k)):(m=0,g=0),h.$imageWrapEl.transition(300).transform(`translate3d(${m}px, ${g}px,0)`),h.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${n.scale})`)}function k(){const e=t.zoom,n=t.params.zoom;h.$slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?h.$slideEl=t.$wrapperEl.children("."+t.params.slideActiveClass):h.$slideEl=t.slides.eq(t.activeIndex),h.$imageEl=h.$slideEl.find("."+n.containerClass).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),h.$imageWrapEl=h.$imageEl.parent("."+n.containerClass)),h.$imageEl&&0!==h.$imageEl.length&&h.$imageWrapEl&&0!==h.$imageWrapEl.length&&(t.params.cssMode&&(t.wrapperEl.style.overflow="",t.wrapperEl.style.touchAction=""),e.scale=1,c=1,h.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),h.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),h.$slideEl.removeClass(""+n.zoomedSlideClass),h.$slideEl=void 0)}function C(e){const n=t.zoom;n.scale&&1!==n.scale?k():S(e)}function E(){const e=t.support;return{passiveListener:!("touchstart"!==t.touchEvents.start||!e.passiveListener||!t.params.passiveListeners)&&{passive:!0,capture:!1},activeListenerWithCapture:!e.passiveListener||{passive:!1,capture:!0}}}function T(){return"."+t.params.slideClass}function P(e){const{passiveListener:n}=E(),r=T();t.$wrapperEl[e]("gesturestart",r,y,n),t.$wrapperEl[e]("gesturechange",r,_,n),t.$wrapperEl[e]("gestureend",r,b,n)}function O(){s||(s=!0,P("on"))}function A(){s&&(s=!1,P("off"))}function M(){const e=t.zoom;if(e.enabled)return;e.enabled=!0;const n=t.support,{passiveListener:r,activeListenerWithCapture:i}=E(),o=T();n.gestures?(t.$wrapperEl.on(t.touchEvents.start,O,r),t.$wrapperEl.on(t.touchEvents.end,A,r)):"touchstart"===t.touchEvents.start&&(t.$wrapperEl.on(t.touchEvents.start,o,y,r),t.$wrapperEl.on(t.touchEvents.move,o,_,i),t.$wrapperEl.on(t.touchEvents.end,o,b,r),t.touchEvents.cancel&&t.$wrapperEl.on(t.touchEvents.cancel,o,b,r)),t.$wrapperEl.on(t.touchEvents.move,"."+t.params.zoom.containerClass,w,i)}function L(){const e=t.zoom;if(!e.enabled)return;const n=t.support;e.enabled=!1;const{passiveListener:r,activeListenerWithCapture:i}=E(),o=T();n.gestures?(t.$wrapperEl.off(t.touchEvents.start,O,r),t.$wrapperEl.off(t.touchEvents.end,A,r)):"touchstart"===t.touchEvents.start&&(t.$wrapperEl.off(t.touchEvents.start,o,y,r),t.$wrapperEl.off(t.touchEvents.move,o,_,i),t.$wrapperEl.off(t.touchEvents.end,o,b,r),t.touchEvents.cancel&&t.$wrapperEl.off(t.touchEvents.cancel,o,b,r)),t.$wrapperEl.off(t.touchEvents.move,"."+t.params.zoom.containerClass,w,i)}Object.defineProperty(t.zoom,"scale",{get:()=>g,set(t){if(g!==t){const e=h.$imageEl?h.$imageEl[0]:void 0,n=h.$slideEl?h.$slideEl[0]:void 0;r("zoomChange",t,e,n)}g=t}}),n("init",()=>{t.params.zoom.enabled&&M()}),n("destroy",()=>{L()}),n("touchStart",(e,n)=>{t.zoom.enabled&&function(e){const n=t.device;h.$imageEl&&0!==h.$imageEl.length&&(f.isTouched||(n.android&&e.cancelable&&e.preventDefault(),f.isTouched=!0,f.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,f.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))}(n)}),n("touchEnd",(e,n)=>{t.zoom.enabled&&function(){const e=t.zoom;if(!h.$imageEl||0===h.$imageEl.length)return;if(!f.isTouched||!f.isMoved)return f.isTouched=!1,void(f.isMoved=!1);f.isTouched=!1,f.isMoved=!1;let n=300,r=300;const i=m.x*n,o=f.currentX+i,s=m.y*r,a=f.currentY+s;0!==m.x&&(n=Math.abs((o-f.currentX)/m.x)),0!==m.y&&(r=Math.abs((a-f.currentY)/m.y));const l=Math.max(n,r);f.currentX=o,f.currentY=a;const u=f.width*e.scale,c=f.height*e.scale;f.minX=Math.min(h.slideWidth/2-u/2,0),f.maxX=-f.minX,f.minY=Math.min(h.slideHeight/2-c/2,0),f.maxY=-f.minY,f.currentX=Math.max(Math.min(f.currentX,f.maxX),f.minX),f.currentY=Math.max(Math.min(f.currentY,f.maxY),f.minY),h.$imageWrapEl.transition(l).transform(`translate3d(${f.currentX}px, ${f.currentY}px,0)`)}()}),n("doubleTap",(e,n)=>{!t.animating&&t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&C(n)}),n("transitionEnd",()=>{t.zoom.enabled&&t.params.zoom.enabled&&x()}),n("slideChange",()=>{t.zoom.enabled&&t.params.zoom.enabled&&t.params.cssMode&&x()}),Object.assign(t.zoom,{enable:M,disable:L,in:S,out:k,toggle:C})},function({swiper:t,extendParams:e,on:n,emit:r}){e({lazy:{checkInView:!1,enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,scrollingElement:"",elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}}),t.lazy={};let i=!1,s=!1;function a(e,n=!0){const i=t.params.lazy;if(void 0===e)return;if(0===t.slides.length)return;const o=t.virtual&&t.params.virtual.enabled?t.$wrapperEl.children(`.${t.params.slideClass}[data-swiper-slide-index="${e}"]`):t.slides.eq(e),s=o.find(`.${i.elementClass}:not(.${i.loadedClass}):not(.${i.loadingClass})`);!o.hasClass(i.elementClass)||o.hasClass(i.loadedClass)||o.hasClass(i.loadingClass)||s.push(o[0]),0!==s.length&&s.each(e=>{const s=u(e);s.addClass(i.loadingClass);const l=s.attr("data-background"),c=s.attr("data-src"),d=s.attr("data-srcset"),h=s.attr("data-sizes"),p=s.parent("picture");t.loadImage(s[0],c||l,d,h,!1,()=>{if(null!=t&&t&&(!t||t.params)&&!t.destroyed){if(l?(s.css("background-image",`url("${l}")`),s.removeAttr("data-background")):(d&&(s.attr("srcset",d),s.removeAttr("data-srcset")),h&&(s.attr("sizes",h),s.removeAttr("data-sizes")),p.length&&p.children("source").each(t=>{const e=u(t);e.attr("data-srcset")&&(e.attr("srcset",e.attr("data-srcset")),e.removeAttr("data-srcset"))}),c&&(s.attr("src",c),s.removeAttr("data-src"))),s.addClass(i.loadedClass).removeClass(i.loadingClass),o.find("."+i.preloaderClass).remove(),t.params.loop&&n){const e=o.attr("data-swiper-slide-index");o.hasClass(t.params.slideDuplicateClass)?a(t.$wrapperEl.children(`[data-swiper-slide-index="${e}"]:not(.${t.params.slideDuplicateClass})`).index(),!1):a(t.$wrapperEl.children(`.${t.params.slideDuplicateClass}[data-swiper-slide-index="${e}"]`).index(),!1)}r("lazyImageReady",o[0],s[0]),t.params.autoHeight&&t.updateAutoHeight()}}),r("lazyImageLoad",o[0],s[0])})}function l(){const{$wrapperEl:e,params:n,slides:r,activeIndex:i}=t,o=t.virtual&&n.virtual.enabled,l=n.lazy;let c=n.slidesPerView;function d(t){if(o){if(e.children(`.${n.slideClass}[data-swiper-slide-index="${t}"]`).length)return!0}else if(r[t])return!0;return!1}function h(t){return o?u(t).attr("data-swiper-slide-index"):u(t).index()}if("auto"===c&&(c=0),s||(s=!0),t.params.watchSlidesProgress)e.children("."+n.slideVisibleClass).each(t=>{a(o?u(t).attr("data-swiper-slide-index"):u(t).index())});else if(c>1)for(let t=i;t<i+c;t+=1)d(t)&&a(t);else a(i);if(l.loadPrevNext)if(c>1||l.loadPrevNextAmount&&l.loadPrevNextAmount>1){const t=l.loadPrevNextAmount,e=c,n=Math.min(i+e+Math.max(t,e),r.length),o=Math.max(i-Math.max(e,t),0);for(let t=i+c;t<n;t+=1)d(t)&&a(t);for(let t=o;t<i;t+=1)d(t)&&a(t)}else{const t=e.children("."+n.slideNextClass);t.length>0&&a(h(t));const r=e.children("."+n.slidePrevClass);r.length>0&&a(h(r))}}function c(){const e=o();if(!t||t.destroyed)return;const n=t.params.lazy.scrollingElement?u(t.params.lazy.scrollingElement):u(e),r=n[0]===e,s=r?e.innerWidth:n[0].offsetWidth,a=r?e.innerHeight:n[0].offsetHeight,d=t.$el.offset(),{rtlTranslate:h}=t;let p=!1;h&&(d.left-=t.$el[0].scrollLeft);const f=[[d.left,d.top],[d.left+t.width,d.top],[d.left,d.top+t.height],[d.left+t.width,d.top+t.height]];for(let t=0;t<f.length;t+=1){const e=f[t];if(e[0]>=0&&e[0]<=s&&e[1]>=0&&e[1]<=a){if(0===e[0]&&0===e[1])continue;p=!0}}const m=!("touchstart"!==t.touchEvents.start||!t.support.passiveListener||!t.params.passiveListeners)&&{passive:!0,capture:!1};p?(l(),n.off("scroll",c,m)):i||(i=!0,n.on("scroll",c,m))}n("beforeInit",()=>{t.params.lazy.enabled&&t.params.preloadImages&&(t.params.preloadImages=!1)}),n("init",()=>{t.params.lazy.enabled&&(t.params.lazy.checkInView?c():l())}),n("scroll",()=>{t.params.freeMode&&t.params.freeMode.enabled&&!t.params.freeMode.sticky&&l()}),n("scrollbarDragMove resize _freeModeNoMomentumRelease",()=>{t.params.lazy.enabled&&(t.params.lazy.checkInView?c():l())}),n("transitionStart",()=>{t.params.lazy.enabled&&(t.params.lazy.loadOnTransitionStart||!t.params.lazy.loadOnTransitionStart&&!s)&&(t.params.lazy.checkInView?c():l())}),n("transitionEnd",()=>{t.params.lazy.enabled&&!t.params.lazy.loadOnTransitionStart&&(t.params.lazy.checkInView?c():l())}),n("slideChange",()=>{const{lazy:e,cssMode:n,watchSlidesProgress:r,touchReleaseOnEdges:i,resistanceRatio:o}=t.params;e.enabled&&(n||r&&(i||0===o))&&l()}),Object.assign(t.lazy,{load:l,loadInSlide:a})},function({swiper:t,extendParams:e,on:n}){function r(t,e){const n=function(){let t,e,n;return(r,i)=>{for(e=-1,t=r.length;t-e>1;)n=t+e>>1,r[n]<=i?e=n:t=n;return t}}();let r,i;return this.x=t,this.y=e,this.lastIndex=t.length-1,this.interpolate=function(t){return t?(i=n(this.x,t),r=i-1,(t-this.x[r])*(this.y[i]-this.y[r])/(this.x[i]-this.x[r])+this.y[r]):0},this}function i(){t.controller.control&&t.controller.spline&&(t.controller.spline=void 0,delete t.controller.spline)}e({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},n("beforeInit",()=>{t.controller.control=t.params.controller.control}),n("update",()=>{i()}),n("resize",()=>{i()}),n("observerUpdate",()=>{i()}),n("setTranslate",(e,n,r)=>{t.controller.control&&t.controller.setTranslate(n,r)}),n("setTransition",(e,n,r)=>{t.controller.control&&t.controller.setTransition(n,r)}),Object.assign(t.controller,{setTranslate:function(e,n){const i=t.controller.control;let o,s;const a=t.constructor;function l(e){const n=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(function(e){t.controller.spline||(t.controller.spline=t.params.loop?new r(t.slidesGrid,e.slidesGrid):new r(t.snapGrid,e.snapGrid))}(e),s=-t.controller.spline.interpolate(-n)),s&&"container"!==t.params.controller.by||(o=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()),s=(n-t.minTranslate())*o+e.minTranslate()),t.params.controller.inverse&&(s=e.maxTranslate()-s),e.updateProgress(s),e.setTranslate(s,t),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(i))for(let t=0;t<i.length;t+=1)i[t]!==n&&i[t]instanceof a&&l(i[t]);else i instanceof a&&n!==i&&l(i)},setTransition:function(e,n){const r=t.constructor,i=t.controller.control;let o;function s(n){n.setTransition(e,t),0!==e&&(n.transitionStart(),n.params.autoHeight&&d(()=>{n.updateAutoHeight()}),n.$wrapperEl.transitionEnd(()=>{i&&(n.params.loop&&"slide"===t.params.controller.by&&n.loopFix(),n.transitionEnd())}))}if(Array.isArray(i))for(o=0;o<i.length;o+=1)i[o]!==n&&i[o]instanceof r&&s(i[o]);else i instanceof r&&n!==i&&s(i)}})},function({swiper:t,extendParams:e,on:n}){e({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group"}});let r=null;function i(t){const e=r;0!==e.length&&(e.html(""),e.html(t))}function o(t){t.attr("tabIndex","0")}function s(t){t.attr("tabIndex","-1")}function a(t,e){t.attr("role",e)}function l(t,e){t.attr("aria-roledescription",e)}function c(t,e){t.attr("aria-label",e)}function d(t){t.attr("aria-disabled",!0)}function h(t){t.attr("aria-disabled",!1)}function p(e){if(13!==e.keyCode&&32!==e.keyCode)return;const n=t.params.a11y,r=u(e.target);t.navigation&&t.navigation.$nextEl&&r.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?i(n.lastSlideMessage):i(n.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&r.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?i(n.firstSlideMessage):i(n.prevSlideMessage)),t.pagination&&r.is(B(t.params.pagination.bulletClass))&&r[0].click()}function f(){if(t.params.loop||!t.navigation)return;const{$nextEl:e,$prevEl:n}=t.navigation;n&&n.length>0&&(t.isBeginning?(d(n),s(n)):(h(n),o(n))),e&&e.length>0&&(t.isEnd?(d(e),s(e)):(h(e),o(e)))}function m(){return t.pagination&&t.params.pagination.clickable&&t.pagination.bullets&&t.pagination.bullets.length}const g=(t,e,n)=>{o(t),"BUTTON"!==t[0].tagName&&(a(t,"button"),t.on("keydown",p)),c(t,n),function(t,e){t.attr("aria-controls",e)}(t,e)};n("beforeInit",()=>{r=u(`<span class="${t.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`)}),n("afterInit",()=>{t.params.a11y.enabled&&(function(){const e=t.params.a11y;t.$el.append(r);const n=t.$el;e.containerRoleDescriptionMessage&&l(n,e.containerRoleDescriptionMessage),e.containerMessage&&c(n,e.containerMessage);const i=t.$wrapperEl,o=i.attr("id")||"swiper-wrapper-"+function(t=16){return"x".repeat(t).replace(/x/g,()=>Math.round(16*Math.random()).toString(16))}(16),s=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var d;d=o,i.attr("id",d),function(t,e){t.attr("aria-live",e)}(i,s),e.itemRoleDescriptionMessage&&l(u(t.slides),e.itemRoleDescriptionMessage),a(u(t.slides),e.slideRole);const h=t.params.loop?t.slides.filter(e=>!e.classList.contains(t.params.slideDuplicateClass)).length:t.slides.length;let f,v;t.slides.each((n,r)=>{const i=u(n),o=t.params.loop?parseInt(i.attr("data-swiper-slide-index"),10):r;c(i,e.slideLabelMessage.replace(/\{\{index\}\}/,o+1).replace(/\{\{slidesLength\}\}/,h))}),t.navigation&&t.navigation.$nextEl&&(f=t.navigation.$nextEl),t.navigation&&t.navigation.$prevEl&&(v=t.navigation.$prevEl),f&&f.length&&g(f,o,e.nextSlideMessage),v&&v.length&&g(v,o,e.prevSlideMessage),m()&&t.pagination.$el.on("keydown",B(t.params.pagination.bulletClass),p)}(),f())}),n("toEdge",()=>{t.params.a11y.enabled&&f()}),n("fromEdge",()=>{t.params.a11y.enabled&&f()}),n("paginationUpdate",()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;m()&&t.pagination.bullets.each(n=>{const r=u(n);o(r),t.params.pagination.renderBullet||(a(r,"button"),c(r,e.paginationBulletMessage.replace(/\{\{index\}\}/,r.index()+1)))})}()}),n("destroy",()=>{t.params.a11y.enabled&&function(){let e,n;r&&r.length>0&&r.remove(),t.navigation&&t.navigation.$nextEl&&(e=t.navigation.$nextEl),t.navigation&&t.navigation.$prevEl&&(n=t.navigation.$prevEl),e&&e.off("keydown",p),n&&n.off("keydown",p),m()&&t.pagination.$el.off("keydown",B(t.params.pagination.bulletClass),p)}()})},function({swiper:t,extendParams:e,on:n}){e({history:{enabled:!1,root:"",replaceState:!1,key:"slides"}});let r=!1,i={};const s=t=>t.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),a=t=>{const e=o();let n;n=t?new URL(t):e.location;const r=n.pathname.slice(1).split("/").filter(t=>""!==t),i=r.length;return{key:r[i-2],value:r[i-1]}},l=(e,n)=>{const i=o();if(!r||!t.params.history.enabled)return;let a;a=t.params.url?new URL(t.params.url):i.location;const l=t.slides.eq(n);let u=s(l.attr("data-history"));if(t.params.history.root.length>0){let n=t.params.history.root;"/"===n[n.length-1]&&(n=n.slice(0,n.length-1)),u=`${n}/${e}/${u}`}else a.pathname.includes(e)||(u=`${e}/${u}`);const c=i.history.state;c&&c.value===u||(t.params.history.replaceState?i.history.replaceState({value:u},null,u):i.history.pushState({value:u},null,u))},u=(e,n,r)=>{if(n)for(let i=0,o=t.slides.length;i<o;i+=1){const o=t.slides.eq(i);if(s(o.attr("data-history"))===n&&!o.hasClass(t.params.slideDuplicateClass)){const n=o.index();t.slideTo(n,e,r)}}else t.slideTo(0,e,r)},c=()=>{i=a(t.params.url),u(t.params.speed,t.paths.value,!1)};n("init",()=>{t.params.history.enabled&&(()=>{const e=o();if(t.params.history){if(!e.history||!e.history.pushState)return t.params.history.enabled=!1,void(t.params.hashNavigation.enabled=!0);r=!0,i=a(t.params.url),(i.key||i.value)&&(u(0,i.value,t.params.runCallbacksOnInit),t.params.history.replaceState||e.addEventListener("popstate",c))}})()}),n("destroy",()=>{t.params.history.enabled&&(()=>{const e=o();t.params.history.replaceState||e.removeEventListener("popstate",c)})()}),n("transitionEnd _freeModeNoMomentumRelease",()=>{r&&l(t.params.history.key,t.activeIndex)}),n("slideChange",()=>{r&&t.params.cssMode&&l(t.params.history.key,t.activeIndex)})},function({swiper:t,extendParams:e,emit:n,on:i}){let s=!1;const a=r(),l=o();e({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}});const c=()=>{n("hashChange");const e=a.location.hash.replace("#","");if(e!==t.slides.eq(t.activeIndex).attr("data-hash")){const n=t.$wrapperEl.children(`.${t.params.slideClass}[data-hash="${e}"]`).index();if(void 0===n)return;t.slideTo(n)}},d=()=>{if(s&&t.params.hashNavigation.enabled)if(t.params.hashNavigation.replaceState&&l.history&&l.history.replaceState)l.history.replaceState(null,null,"#"+t.slides.eq(t.activeIndex).attr("data-hash")||""),n("hashSet");else{const e=t.slides.eq(t.activeIndex),r=e.attr("data-hash")||e.attr("data-history");a.location.hash=r||"",n("hashSet")}};i("init",()=>{t.params.hashNavigation.enabled&&(()=>{if(!t.params.hashNavigation.enabled||t.params.history&&t.params.history.enabled)return;s=!0;const e=a.location.hash.replace("#","");if(e){const n=0;for(let r=0,i=t.slides.length;r<i;r+=1){const i=t.slides.eq(r);if((i.attr("data-hash")||i.attr("data-history"))===e&&!i.hasClass(t.params.slideDuplicateClass)){const e=i.index();t.slideTo(e,n,t.params.runCallbacksOnInit,!0)}}}t.params.hashNavigation.watchState&&u(l).on("hashchange",c)})()}),i("destroy",()=>{t.params.hashNavigation.enabled&&t.params.hashNavigation.watchState&&u(l).off("hashchange",c)}),i("transitionEnd _freeModeNoMomentumRelease",()=>{s&&d()}),i("slideChange",()=>{s&&t.params.cssMode&&d()})},function({swiper:t,extendParams:e,on:n,emit:i}){let o;function s(){const e=t.slides.eq(t.activeIndex);let n=t.params.autoplay.delay;e.attr("data-swiper-autoplay")&&(n=e.attr("data-swiper-autoplay")||t.params.autoplay.delay),clearTimeout(o),o=d(()=>{let e;t.params.autoplay.reverseDirection?t.params.loop?(t.loopFix(),e=t.slidePrev(t.params.speed,!0,!0),i("autoplay")):t.isBeginning?t.params.autoplay.stopOnLastSlide?l():(e=t.slideTo(t.slides.length-1,t.params.speed,!0,!0),i("autoplay")):(e=t.slidePrev(t.params.speed,!0,!0),i("autoplay")):t.params.loop?(t.loopFix(),e=t.slideNext(t.params.speed,!0,!0),i("autoplay")):t.isEnd?t.params.autoplay.stopOnLastSlide?l():(e=t.slideTo(0,t.params.speed,!0,!0),i("autoplay")):(e=t.slideNext(t.params.speed,!0,!0),i("autoplay")),(t.params.cssMode&&t.autoplay.running||!1===e)&&s()},n)}function a(){return void 0===o&&!t.autoplay.running&&(t.autoplay.running=!0,i("autoplayStart"),s(),!0)}function l(){return!!t.autoplay.running&&void 0!==o&&(o&&(clearTimeout(o),o=void 0),t.autoplay.running=!1,i("autoplayStop"),!0)}function u(e){t.autoplay.running&&(t.autoplay.paused||(o&&clearTimeout(o),t.autoplay.paused=!0,0!==e&&t.params.autoplay.waitForTransition?["transitionend","webkitTransitionEnd"].forEach(e=>{t.$wrapperEl[0].addEventListener(e,h)}):(t.autoplay.paused=!1,s())))}function c(){const e=r();"hidden"===e.visibilityState&&t.autoplay.running&&u(),"visible"===e.visibilityState&&t.autoplay.paused&&(s(),t.autoplay.paused=!1)}function h(e){t&&!t.destroyed&&t.$wrapperEl&&e.target===t.$wrapperEl[0]&&(["transitionend","webkitTransitionEnd"].forEach(e=>{t.$wrapperEl[0].removeEventListener(e,h)}),t.autoplay.paused=!1,t.autoplay.running?s():l())}function p(){t.params.autoplay.disableOnInteraction?l():u(),["transitionend","webkitTransitionEnd"].forEach(e=>{t.$wrapperEl[0].removeEventListener(e,h)})}function f(){t.params.autoplay.disableOnInteraction||(t.autoplay.paused=!1,s())}t.autoplay={running:!1,paused:!1},e({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}}),n("init",()=>{t.params.autoplay.enabled&&(a(),r().addEventListener("visibilitychange",c),t.params.autoplay.pauseOnMouseEnter&&(t.$el.on("mouseenter",p),t.$el.on("mouseleave",f)))}),n("beforeTransitionStart",(e,n,r)=>{t.autoplay.running&&(r||!t.params.autoplay.disableOnInteraction?t.autoplay.pause(n):l())}),n("sliderFirstMove",()=>{t.autoplay.running&&(t.params.autoplay.disableOnInteraction?l():u())}),n("touchEnd",()=>{t.params.cssMode&&t.autoplay.paused&&!t.params.autoplay.disableOnInteraction&&s()}),n("destroy",()=>{t.$el.off("mouseenter",p),t.$el.off("mouseleave",f),t.autoplay.running&&l(),r().removeEventListener("visibilitychange",c)}),Object.assign(t.autoplay,{pause:u,run:s,start:a,stop:l})},function({swiper:t,extendParams:e,on:n}){e({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let r=!1,i=!1;function o(){const e=t.thumbs.swiper;if(!e)return;const n=e.clickedIndex,r=e.clickedSlide;if(r&&u(r).hasClass(t.params.thumbs.slideThumbActiveClass))return;if(null==n)return;let i;if(i=e.params.loop?parseInt(u(e.clickedSlide).attr("data-swiper-slide-index"),10):n,t.params.loop){let e=t.activeIndex;t.slides.eq(e).hasClass(t.params.slideDuplicateClass)&&(t.loopFix(),t._clientLeft=t.$wrapperEl[0].clientLeft,e=t.activeIndex);const n=t.slides.eq(e).prevAll(`[data-swiper-slide-index="${i}"]`).eq(0).index(),r=t.slides.eq(e).nextAll(`[data-swiper-slide-index="${i}"]`).eq(0).index();i=void 0===n?r:void 0===r?n:r-e<e-n?r:n}t.slideTo(i)}function s(){const{thumbs:e}=t.params;if(r)return!1;r=!0;const n=t.constructor;if(e.swiper instanceof n)t.thumbs.swiper=e.swiper,Object.assign(t.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(t.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1});else if(f(e.swiper)){const r=Object.assign({},e.swiper);Object.assign(r,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper=new n(r),i=!0}return t.thumbs.swiper.$el.addClass(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",o),!0}function a(e){const n=t.thumbs.swiper;if(!n)return;const r="auto"===n.params.slidesPerView?n.slidesPerViewDynamic():n.params.slidesPerView,i=t.params.thumbs.autoScrollOffset,o=i&&!n.params.loop;if(t.realIndex!==n.realIndex||o){let s,a,l=n.activeIndex;if(n.params.loop){n.slides.eq(l).hasClass(n.params.slideDuplicateClass)&&(n.loopFix(),n._clientLeft=n.$wrapperEl[0].clientLeft,l=n.activeIndex);const e=n.slides.eq(l).prevAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index(),r=n.slides.eq(l).nextAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index();s=void 0===e?r:void 0===r?e:r-l==l-e?n.params.slidesPerGroup>1?r:l:r-l<l-e?r:e,a=t.activeIndex>t.previousIndex?"next":"prev"}else s=t.realIndex,a=s>t.previousIndex?"next":"prev";o&&(s+="next"===a?i:-1*i),n.visibleSlidesIndexes&&n.visibleSlidesIndexes.indexOf(s)<0&&(n.params.centeredSlides?s=s>l?s-Math.floor(r/2)+1:s+Math.floor(r/2)-1:s>l&&n.params.slidesPerGroup,n.slideTo(s,e?0:void 0))}let s=1;const a=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(s=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(s=1),s=Math.floor(s),n.slides.removeClass(a),n.params.loop||n.params.virtual&&n.params.virtual.enabled)for(let e=0;e<s;e+=1)n.$wrapperEl.children(`[data-swiper-slide-index="${t.realIndex+e}"]`).addClass(a);else for(let e=0;e<s;e+=1)n.slides.eq(t.realIndex+e).addClass(a)}t.thumbs={swiper:null},n("beforeInit",()=>{const{thumbs:e}=t.params;e&&e.swiper&&(s(),a(!0))}),n("slideChange update resize observerUpdate",()=>{t.thumbs.swiper&&a()}),n("setTransition",(e,n)=>{const r=t.thumbs.swiper;r&&r.setTransition(n)}),n("beforeDestroy",()=>{const e=t.thumbs.swiper;e&&i&&e&&e.destroy()}),Object.assign(t.thumbs,{init:s,update:a})},function({swiper:t,extendParams:e,emit:n,once:r}){e({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(t,{freeMode:{onTouchMove:function(){const{touchEventsData:e,touches:n}=t;0===e.velocities.length&&e.velocities.push({position:n[t.isHorizontal()?"startX":"startY"],time:e.touchStartTime}),e.velocities.push({position:n[t.isHorizontal()?"currentX":"currentY"],time:h()})},onTouchEnd:function({currentPos:e}){const{params:i,$wrapperEl:o,rtlTranslate:s,snapGrid:a,touchEventsData:l}=t,u=h()-l.touchStartTime;if(e<-t.minTranslate())t.slideTo(t.activeIndex);else if(e>-t.maxTranslate())t.slides.length<a.length?t.slideTo(a.length-1):t.slideTo(t.slides.length-1);else{if(i.freeMode.momentum){if(l.velocities.length>1){const e=l.velocities.pop(),n=l.velocities.pop(),r=e.position-n.position,o=e.time-n.time;t.velocity=r/o,t.velocity/=2,Math.abs(t.velocity)<i.freeMode.minimumVelocity&&(t.velocity=0),(o>150||h()-e.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=i.freeMode.momentumVelocityRatio,l.velocities.length=0;let e=1e3*i.freeMode.momentumRatio;const u=t.velocity*e;let c=t.translate+u;s&&(c=-c);let d,p=!1;const f=20*Math.abs(t.velocity)*i.freeMode.momentumBounceRatio;let m;if(c<t.maxTranslate())i.freeMode.momentumBounce?(c+t.maxTranslate()<-f&&(c=t.maxTranslate()-f),d=t.maxTranslate(),p=!0,l.allowMomentumBounce=!0):c=t.maxTranslate(),i.loop&&i.centeredSlides&&(m=!0);else if(c>t.minTranslate())i.freeMode.momentumBounce?(c-t.minTranslate()>f&&(c=t.minTranslate()+f),d=t.minTranslate(),p=!0,l.allowMomentumBounce=!0):c=t.minTranslate(),i.loop&&i.centeredSlides&&(m=!0);else if(i.freeMode.sticky){let e;for(let t=0;t<a.length;t+=1)if(a[t]>-c){e=t;break}c=Math.abs(a[e]-c)<Math.abs(a[e-1]-c)||"next"===t.swipeDirection?a[e]:a[e-1],c=-c}if(m&&r("transitionEnd",()=>{t.loopFix()}),0!==t.velocity){if(e=s?Math.abs((-c-t.translate)/t.velocity):Math.abs((c-t.translate)/t.velocity),i.freeMode.sticky){const n=Math.abs((s?-c:c)-t.translate),r=t.slidesSizesGrid[t.activeIndex];e=n<r?i.speed:n<2*r?1.5*i.speed:2.5*i.speed}}else if(i.freeMode.sticky)return void t.slideToClosest();i.freeMode.momentumBounce&&p?(t.updateProgress(d),t.setTransition(e),t.setTranslate(c),t.transitionStart(!0,t.swipeDirection),t.animating=!0,o.transitionEnd(()=>{t&&!t.destroyed&&l.allowMomentumBounce&&(n("momentumBounce"),t.setTransition(i.speed),setTimeout(()=>{t.setTranslate(d),o.transitionEnd(()=>{t&&!t.destroyed&&t.transitionEnd()})},0))})):t.velocity?(n("_freeModeNoMomentumRelease"),t.updateProgress(c),t.setTransition(e),t.setTranslate(c),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,o.transitionEnd(()=>{t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(c),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(i.freeMode.sticky)return void t.slideToClosest();i.freeMode&&n("_freeModeNoMomentumRelease")}(!i.freeMode.momentum||u>=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}}}})},function({swiper:t,extendParams:e}){let n,r,i;e({grid:{rows:1,fill:"column"}}),t.grid={initSlides:e=>{const{slidesPerView:o}=t.params,{rows:s,fill:a}=t.params.grid;r=n/s,i=Math.floor(e/s),n=Math.floor(e/s)===e/s?e:Math.ceil(e/s)*s,"auto"!==o&&"row"===a&&(n=Math.max(n,o*s))},updateSlide:(e,o,s,a)=>{const{slidesPerGroup:l,spaceBetween:u}=t.params,{rows:c,fill:d}=t.params.grid;let h,p,f;if("row"===d&&l>1){const t=Math.floor(e/(l*c)),r=e-c*l*t,i=0===t?l:Math.min(Math.ceil((s-t*c*l)/c),l);f=Math.floor(r/i),p=r-f*i+t*l,h=p+f*n/c,o.css({"-webkit-order":h,order:h})}else"column"===d?(p=Math.floor(e/c),f=e-p*c,(p>i||p===i&&f===c-1)&&(f+=1,f>=c&&(f=0,p+=1))):(f=Math.floor(e/r),p=e-f*r);o.css(a("margin-top"),0!==f?u&&u+"px":"")},updateWrapperSize:(e,r,i)=>{const{spaceBetween:o,centeredSlides:s,roundLengths:a}=t.params,{rows:l}=t.params.grid;if(t.virtualSize=(e+o)*n,t.virtualSize=Math.ceil(t.virtualSize/l)-o,t.$wrapperEl.css({[i("width")]:t.virtualSize+o+"px"}),s){r.splice(0,r.length);const e=[];for(let n=0;n<r.length;n+=1){let i=r[n];a&&(i=Math.floor(i)),r[n]<t.virtualSize+r[0]&&e.push(i)}r.push(...e)}}}},function({swiper:t}){Object.assign(t,{appendSlide:q.bind(t),prependSlide:H.bind(t),addSlide:$.bind(t),removeSlide:U.bind(t),removeAllSlides:W.bind(t)})},function({swiper:t,extendParams:e,on:n}){e({fadeEffect:{crossFade:!1,transformEl:null}}),G({effect:"fade",swiper:t,on:n,setTranslate:()=>{const{slides:e}=t,n=t.params.fadeEffect;for(let r=0;r<e.length;r+=1){const e=t.slides.eq(r);let i=-e[0].swiperSlideOffset;t.params.virtualTranslate||(i-=t.translate);let o=0;t.isHorizontal()||(o=i,i=0);const s=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e[0].progress),0):1+Math.min(Math.max(e[0].progress,-1),0);Y(n,e).css({opacity:s}).transform(`translate3d(${i}px, ${o}px, 0px)`)}},setTransition:e=>{const{transformEl:n}=t.params.fadeEffect;(n?t.slides.find(n):t.slides).transition(e),Z({swiper:t,duration:e,transformEl:n,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function({swiper:t,extendParams:e,on:n}){e({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}}),G({effect:"cube",swiper:t,on:n,setTranslate:()=>{const{$el:e,$wrapperEl:n,slides:r,width:i,height:o,rtlTranslate:s,size:a,browser:l}=t,c=t.params.cubeEffect,d=t.isHorizontal(),h=t.virtual&&t.params.virtual.enabled;let p,f=0;c.shadow&&(d?(p=n.find(".swiper-cube-shadow"),0===p.length&&(p=u('<div class="swiper-cube-shadow"></div>'),n.append(p)),p.css({height:i+"px"})):(p=e.find(".swiper-cube-shadow"),0===p.length&&(p=u('<div class="swiper-cube-shadow"></div>'),e.append(p))));for(let t=0;t<r.length;t+=1){const e=r.eq(t);let n=t;h&&(n=parseInt(e.attr("data-swiper-slide-index"),10));let i=90*n,o=Math.floor(i/360);s&&(i=-i,o=Math.floor(-i/360));const l=Math.max(Math.min(e[0].progress,1),-1);let p=0,m=0,g=0;n%4==0?(p=4*-o*a,g=0):(n-1)%4==0?(p=0,g=4*-o*a):(n-2)%4==0?(p=a+4*o*a,g=a):(n-3)%4==0&&(p=-a,g=3*a+4*a*o),s&&(p=-p),d||(m=p,p=0);const v=`rotateX(${d?0:-i}deg) rotateY(${d?i:0}deg) translate3d(${p}px, ${m}px, ${g}px)`;if(l<=1&&l>-1&&(f=90*n+90*l,s&&(f=90*-n-90*l)),e.transform(v),c.slideShadows){let t=d?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),n=d?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===t.length&&(t=u(`<div class="swiper-slide-shadow-${d?"left":"top"}"></div>`),e.append(t)),0===n.length&&(n=u(`<div class="swiper-slide-shadow-${d?"right":"bottom"}"></div>`),e.append(n)),t.length&&(t[0].style.opacity=Math.max(-l,0)),n.length&&(n[0].style.opacity=Math.max(l,0))}}if(n.css({"-webkit-transform-origin":`50% 50% -${a/2}px`,"transform-origin":`50% 50% -${a/2}px`}),c.shadow)if(d)p.transform(`translate3d(0px, ${i/2+c.shadowOffset}px, ${-i/2}px) rotateX(90deg) rotateZ(0deg) scale(${c.shadowScale})`);else{const t=Math.abs(f)-90*Math.floor(Math.abs(f)/90),e=1.5-(Math.sin(2*t*Math.PI/360)/2+Math.cos(2*t*Math.PI/360)/2),n=c.shadowScale,r=c.shadowScale/e,i=c.shadowOffset;p.transform(`scale3d(${n}, 1, ${r}) translate3d(0px, ${o/2+i}px, ${-o/2/r}px) rotateX(-90deg)`)}const m=l.isSafari||l.isWebView?-a/2:0;n.transform(`translate3d(0px,0,${m}px) rotateX(${t.isHorizontal()?0:f}deg) rotateY(${t.isHorizontal()?-f:0}deg)`)},setTransition:e=>{const{$el:n,slides:r}=t;r.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.cubeEffect.shadow&&!t.isHorizontal()&&n.find(".swiper-cube-shadow").transition(e)},perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function({swiper:t,extendParams:e,on:n}){e({flipEffect:{slideShadows:!0,limitRotation:!0,transformEl:null}}),G({effect:"flip",swiper:t,on:n,setTranslate:()=>{const{slides:e,rtlTranslate:n}=t,r=t.params.flipEffect;for(let i=0;i<e.length;i+=1){const o=e.eq(i);let s=o[0].progress;t.params.flipEffect.limitRotation&&(s=Math.max(Math.min(o[0].progress,1),-1));const a=o[0].swiperSlideOffset;let l=-180*s,u=0,c=t.params.cssMode?-a-t.translate:-a,d=0;if(t.isHorizontal()?n&&(l=-l):(d=c,c=0,u=-l,l=0),o[0].style.zIndex=-Math.abs(Math.round(s))+e.length,r.slideShadows){let e=t.isHorizontal()?o.find(".swiper-slide-shadow-left"):o.find(".swiper-slide-shadow-top"),n=t.isHorizontal()?o.find(".swiper-slide-shadow-right"):o.find(".swiper-slide-shadow-bottom");0===e.length&&(e=K(r,o,t.isHorizontal()?"left":"top")),0===n.length&&(n=K(r,o,t.isHorizontal()?"right":"bottom")),e.length&&(e[0].style.opacity=Math.max(-s,0)),n.length&&(n[0].style.opacity=Math.max(s,0))}const h=`translate3d(${c}px, ${d}px, 0px) rotateX(${u}deg) rotateY(${l}deg)`;Y(r,o).transform(h)}},setTransition:e=>{const{transformEl:n}=t.params.flipEffect;(n?t.slides.find(n):t.slides).transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),Z({swiper:t,duration:e,transformEl:n})},perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function({swiper:t,extendParams:e,on:n}){e({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0,transformEl:null}}),G({effect:"coverflow",swiper:t,on:n,setTranslate:()=>{const{width:e,height:n,slides:r,slidesSizesGrid:i}=t,o=t.params.coverflowEffect,s=t.isHorizontal(),a=t.translate,l=s?e/2-a:n/2-a,u=s?o.rotate:-o.rotate,c=o.depth;for(let t=0,e=r.length;t<e;t+=1){const e=r.eq(t),n=i[t],a=(l-e[0].swiperSlideOffset-n/2)/n*o.modifier;let d=s?u*a:0,h=s?0:u*a,p=-c*Math.abs(a),f=o.stretch;"string"==typeof f&&-1!==f.indexOf("%")&&(f=parseFloat(o.stretch)/100*n);let m=s?0:f*a,g=s?f*a:0,v=1-(1-o.scale)*Math.abs(a);Math.abs(g)<.001&&(g=0),Math.abs(m)<.001&&(m=0),Math.abs(p)<.001&&(p=0),Math.abs(d)<.001&&(d=0),Math.abs(h)<.001&&(h=0),Math.abs(v)<.001&&(v=0);const y=`translate3d(${g}px,${m}px,${p}px) rotateX(${h}deg) rotateY(${d}deg) scale(${v})`;if(Y(o,e).transform(y),e[0].style.zIndex=1-Math.abs(Math.round(a)),o.slideShadows){let t=s?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),n=s?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===t.length&&(t=K(o,e,s?"left":"top")),0===n.length&&(n=K(o,e,s?"right":"bottom")),t.length&&(t[0].style.opacity=a>0?a:0),n.length&&(n[0].style.opacity=-a>0?-a:0)}}},setTransition:e=>{const{transformEl:n}=t.params.coverflowEffect;(n?t.slides.find(n):t.slides).transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function({swiper:t,extendParams:e,on:n}){e({creativeEffect:{transformEl:null,limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const r=t=>"string"==typeof t?t:t+"px";G({effect:"creative",swiper:t,on:n,setTranslate:()=>{const{slides:e,$wrapperEl:n,slidesSizesGrid:i}=t,o=t.params.creativeEffect,{progressMultiplier:s}=o,a=t.params.centeredSlides;if(a){const e=i[0]/2-t.params.slidesOffsetBefore||0;n.transform(`translateX(calc(50% - ${e}px))`)}for(let n=0;n<e.length;n+=1){const i=e.eq(n),l=i[0].progress,u=Math.min(Math.max(i[0].progress,-o.limitProgress),o.limitProgress);let c=u;a||(c=Math.min(Math.max(i[0].originalProgress,-o.limitProgress),o.limitProgress));const d=i[0].swiperSlideOffset,h=[t.params.cssMode?-d-t.translate:-d,0,0],p=[0,0,0];let f=!1;t.isHorizontal()||(h[1]=h[0],h[0]=0);let m={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};u<0?(m=o.next,f=!0):u>0&&(m=o.prev,f=!0),h.forEach((t,e)=>{h[e]=`calc(${t}px + (${r(m.translate[e])} * ${Math.abs(u*s)}))`}),p.forEach((t,e)=>{p[e]=m.rotate[e]*Math.abs(u*s)}),i[0].style.zIndex=-Math.abs(Math.round(l))+e.length;const g=h.join(", "),v=`rotateX(${p[0]}deg) rotateY(${p[1]}deg) rotateZ(${p[2]}deg)`,y=c<0?`scale(${1+(1-m.scale)*c*s})`:`scale(${1-(1-m.scale)*c*s})`,_=c<0?1+(1-m.opacity)*c*s:1-(1-m.opacity)*c*s,b=`translate3d(${g}) ${v} ${y}`;if(f&&m.shadow||!f){let t=i.children(".swiper-slide-shadow");if(0===t.length&&m.shadow&&(t=K(o,i)),t.length){const e=o.shadowPerProgress?u*(1/o.limitProgress):u;t[0].style.opacity=Math.min(Math.max(Math.abs(e),0),1)}}const w=Y(o,i);w.transform(b).css({opacity:_}),m.origin&&w.css("transform-origin",m.origin)}},setTransition:e=>{const{transformEl:n}=t.params.creativeEffect;(n?t.slides.find(n):t.slides).transition(e).find(".swiper-slide-shadow").transition(e),Z({swiper:t,duration:e,transformEl:n,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})},function({swiper:t,extendParams:e,on:n}){e({cardsEffect:{slideShadows:!0,transformEl:null}}),G({effect:"cards",swiper:t,on:n,setTranslate:()=>{const{slides:e,activeIndex:n}=t,r=t.params.cardsEffect,{startTranslate:i,isTouched:o}=t.touchEventsData,s=t.translate;for(let a=0;a<e.length;a+=1){const l=e.eq(a),u=l[0].progress,c=Math.min(Math.max(u,-4),4);let d=l[0].swiperSlideOffset;t.params.centeredSlides&&!t.params.cssMode&&t.$wrapperEl.transform(`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&&t.params.cssMode&&(d-=e[0].swiperSlideOffset);let h=t.params.cssMode?-d-t.translate:-d,p=0;const f=-100*Math.abs(c);let m=1,g=-2*c,v=8-.75*Math.abs(c);const y=(a===n||a===n-1)&&c>0&&c<1&&(o||t.params.cssMode)&&s<i,_=(a===n||a===n+1)&&c<0&&c>-1&&(o||t.params.cssMode)&&s>i;if(y||_){const t=(1-Math.abs((Math.abs(c)-.5)/.5))**.5;g+=-28*c*t,m+=-.5*t,v+=96*t,p=-25*t*Math.abs(c)+"%"}if(h=c<0?`calc(${h}px + (${v*Math.abs(c)}%))`:c>0?`calc(${h}px + (-${v*Math.abs(c)}%))`:h+"px",!t.isHorizontal()){const t=p;p=h,h=t}const b=`\n translate3d(${h}, ${p}, ${f}px)\n rotateZ(${g}deg)\n scale(${c<0?""+(1+(1-m)*c):""+(1-(1-m)*c)})\n `;if(r.slideShadows){let t=l.find(".swiper-slide-shadow");0===t.length&&(t=K(r,l)),t.length&&(t[0].style.opacity=Math.min(Math.max((Math.abs(c)-.5)/.5,0),1))}l[0].style.zIndex=-Math.abs(Math.round(u))+e.length,Y(r,l).transform(b)}},setTransition:e=>{const{transformEl:n}=t.params.cardsEffect;(n?t.slides.find(n):t.slides).transition(e).find(".swiper-slide-shadow").transition(e),Z({swiper:t,duration:e,transformEl:n})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}];return V.use(X),V})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSStickyBlock=e():t.HSStickyBlock=e()}(window,(function(){return d={"./src/js/hs-sticky-block.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSStickyBlock; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\n/*\n* HSStickyBlock Plugin\n* @version: 3.0.0 (Wed, 24 Nov 2021)\n* @author: HtmlStream\n* @event-namespace: .HSStickyBlock\n* @license: Htmlstream Libraries (https://htmlstream.com/)\n* Copyright 2021 Htmlstream\n*/\nvar isNumeric = function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n},\n offset = function offset(el) {\n el = _typeof(el) === "object" ? el : document.querySelector(el);\n return {\n top: el ? window.pageYOffset + el.getBoundingClientRect().top : 0,\n left: el ? el.getBoundingClientRect().left : 0\n };\n},\n css = function css(el, style) {\n el = _typeof(el) === "object" ? el : document.querySelector(el);\n\n for (var property in style) {\n el.style[property] = style[property];\n }\n};\n\nvar dataAttributeName = \'data-hs-sticky-block-options\';\nvar defaults = {\n parentSelector: null,\n parentWidth: null,\n parentPaddingLeft: null,\n parentOffsetLeft: null,\n targetSelector: null,\n targetHeight: 0,\n stickyHeight: null,\n stickyOffsetTop: 0,\n stickyOffsetBottom: 0,\n windowOffsetTop: 0,\n startPoint: null,\n endPoint: null,\n resolutionsList: {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n },\n breakpoint: \'lg\',\n styles: {\n position: \'fixed\'\n },\n classMap: {\n kill: \'hs-kill-sticky\'\n }\n};\n\nvar HSStickyBlock = /*#__PURE__*/function () {\n function HSStickyBlock(el, options, id) {\n _classCallCheck(this, HSStickyBlock);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(HSStickyBlock, [{\n key: "_init",\n value: function _init() {\n var _this = this;\n\n var that = this;\n\n var _loop = function _loop(i) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty(\'$initializedEl\')) {\n return "continue";\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options;\n Array(\'resize\', \'scroll\').forEach(function (evt) {\n return window.addEventListener(evt, function () {\n return _this.update(_$el, _options);\n }, false);\n });\n that.collection[i].$initializedEl = _options;\n };\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var _ret = _loop(i);\n\n if (_ret === "continue") continue;\n }\n }\n }, {\n key: "update",\n value: function update($el, settings) {\n var that = this;\n\n that._setRules($el, settings);\n }\n }, {\n key: "_updateOptions",\n value: function _updateOptions($el, settings) {\n var parentSelector = document.querySelector(settings.parentSelector),\n targetSelector = document.querySelector(settings.targetSelector);\n settings.windowOffsetTop = window.pageYOffset;\n settings.startPointPos = offset(settings.startPoint).top;\n settings.endPointPos = offset(settings.endPoint).top;\n settings.parentWidth = parentSelector ? parentSelector.clientWidth : 0;\n settings.parentPaddingLeft = parentSelector ? parseInt(window.getComputedStyle(parentSelector).paddingLeft) : 0;\n settings.parentOffsetLeft = offset(parentSelector).left;\n settings.targetHeight = targetSelector ? targetSelector.offsetHeight : 0;\n settings.stickyHeight = $el.offsetHeight;\n }\n }, {\n key: "_setRules",\n value: function _setRules($el, settings) {\n var that = this;\n\n that._kill($el, settings);\n\n that._updateOptions($el, settings);\n\n if (!$el.classList.contains(settings.classMap.kill)) {\n if (settings.windowOffsetTop >= settings.startPointPos - settings.targetHeight - settings.stickyOffsetTop && settings.windowOffsetTop <= settings.endPointPos - settings.targetHeight - settings.stickyOffsetTop) {\n that._add($el, settings);\n\n that._top($el, settings);\n\n that._parentSetHeight($el, settings);\n } else {\n that._reset($el);\n\n that._parentRemoveHeight($el, settings);\n }\n\n if (settings.windowOffsetTop >= settings.endPointPos - settings.targetHeight - settings.stickyHeight - settings.stickyOffsetTop - settings.stickyOffsetBottom) {\n that._bottom($el, settings);\n }\n }\n }\n }, {\n key: "_add",\n value: function _add($el, settings) {\n css($el, {\n position: settings.styles.position,\n left: settings.parentOffsetLeft + settings.parentPaddingLeft + \'px\',\n width: settings.parentWidth + \'px\'\n });\n }\n }, {\n key: "_top",\n value: function _top($el, settings) {\n css($el, {\n top: settings.stickyOffsetTop + settings.targetHeight + \'px\'\n });\n }\n }, {\n key: "_bottom",\n value: function _bottom($el, settings) {\n css($el, {\n top: settings.endPointPos - settings.windowOffsetTop - settings.stickyHeight - settings.stickyOffsetBottom + \'px\'\n });\n }\n }, {\n key: "_reset",\n value: function _reset($el, settings) {\n css($el, {\n position: \'\',\n top: \'\',\n bottom: \'\',\n left: \'\',\n width: \'\'\n });\n }\n }, {\n key: "_kill",\n value: function _kill($el, settings) {\n var that = this;\n\n if (window.innerWidth < settings.resolutionsList[settings.breakpoint]) {\n $el.classList.add(settings.classMap.kill);\n\n that._reset($el);\n\n that._parentRemoveHeight($el, settings);\n } else {\n $el.classList.remove(settings.classMap.kill);\n }\n }\n }, {\n key: "_parentSetHeight",\n value: function _parentSetHeight($el, settings) {\n css(settings.parentSelector, {\n height: settings.stickyHeight + \'px\'\n });\n }\n }, {\n key: "_parentRemoveHeight",\n value: function _parentRemoveHeight($el, settings) {\n css(settings.parentSelector, {\n height: \'\'\n });\n }\n }, {\n key: "addToCollection",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: Object.assign({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: "getItem",\n value: function getItem(item) {\n if (typeof item === \'number\') {\n return this.collection[item].$initializedEl;\n } else {\n return this.collection.find(function (el) {\n return el.id === item;\n }).$initializedEl;\n }\n }\n }]);\n\n return HSStickyBlock;\n}();\n\n\n\n//# sourceURL=webpack://HSStickyBlock/./src/js/hs-sticky-block.js?')}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-sticky-block.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),
|
||
/*!
|
||
*
|
||
* typed.js - A JavaScript Typing Animation Library
|
||
* Author: Matt Boldt <me@mattboldt.com>
|
||
* Version: v2.0.12
|
||
* Url: https://github.com/mattboldt/typed.js
|
||
* License(s): MIT
|
||
*
|
||
*/
|
||
function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Typed=e():t.Typed=e()}(this,(function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(1),o=n(3),s=function(){function t(e,n){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),i.initializer.load(this,n,e),this.begin()}return r(t,[{key:"toggle",value:function(){this.pause.status?this.start():this.stop()}},{key:"stop",value:function(){this.typingComplete||this.pause.status||(this.toggleBlinking(!0),this.pause.status=!0,this.options.onStop(this.arrayPos,this))}},{key:"start",value:function(){this.typingComplete||this.pause.status&&(this.pause.status=!1,this.pause.typewrite?this.typewrite(this.pause.curString,this.pause.curStrPos):this.backspace(this.pause.curString,this.pause.curStrPos),this.options.onStart(this.arrayPos,this))}},{key:"destroy",value:function(){this.reset(!1),this.options.onDestroy(this)}},{key:"reset",value:function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0];clearInterval(this.timeout),this.replaceText(""),this.cursor&&this.cursor.parentNode&&(this.cursor.parentNode.removeChild(this.cursor),this.cursor=null),this.strPos=0,this.arrayPos=0,this.curLoop=0,t&&(this.insertCursor(),this.options.onReset(this),this.begin())}},{key:"begin",value:function(){var t=this;this.options.onBegin(this),this.typingComplete=!1,this.shuffleStringsIfNeeded(this),this.insertCursor(),this.bindInputFocusEvents&&this.bindFocusEvents(),this.timeout=setTimeout((function(){t.currentElContent&&0!==t.currentElContent.length?t.backspace(t.currentElContent,t.currentElContent.length):t.typewrite(t.strings[t.sequence[t.arrayPos]],t.strPos)}),this.startDelay)}},{key:"typewrite",value:function(t,e){var n=this;this.fadeOut&&this.el.classList.contains(this.fadeOutClass)&&(this.el.classList.remove(this.fadeOutClass),this.cursor&&this.cursor.classList.remove(this.fadeOutClass));var r=this.humanizer(this.typeSpeed),i=1;return!0===this.pause.status?void this.setPauseStatus(t,e,!0):void(this.timeout=setTimeout((function(){e=o.htmlParser.typeHtmlChars(t,e,n);var r=0,s=t.substr(e);if("^"===s.charAt(0)&&/^\^\d+/.test(s)){var a=1;a+=(s=/\d+/.exec(s)[0]).length,r=parseInt(s),n.temporaryPause=!0,n.options.onTypingPaused(n.arrayPos,n),t=t.substring(0,e)+t.substring(e+a),n.toggleBlinking(!0)}if("`"===s.charAt(0)){for(;"`"!==t.substr(e+i).charAt(0)&&(i++,!(e+i>t.length)););var l=t.substring(0,e),u=t.substring(l.length+1,e+i),c=t.substring(e+i+1);t=l+u+c,i--}n.timeout=setTimeout((function(){n.toggleBlinking(!1),e>=t.length?n.doneTyping(t,e):n.keepTyping(t,e,i),n.temporaryPause&&(n.temporaryPause=!1,n.options.onTypingResumed(n.arrayPos,n))}),r)}),r))}},{key:"keepTyping",value:function(t,e,n){0===e&&(this.toggleBlinking(!1),this.options.preStringTyped(this.arrayPos,this)),e+=n;var r=t.substr(0,e);this.replaceText(r),this.typewrite(t,e)}},{key:"doneTyping",value:function(t,e){var n=this;this.options.onStringTyped(this.arrayPos,this),this.toggleBlinking(!0),this.arrayPos===this.strings.length-1&&(this.complete(),!1===this.loop||this.curLoop===this.loopCount)||(this.timeout=setTimeout((function(){n.backspace(t,e)}),this.backDelay))}},{key:"backspace",value:function(t,e){var n=this;if(!0!==this.pause.status){if(this.fadeOut)return this.initFadeOut();this.toggleBlinking(!1);var r=this.humanizer(this.backSpeed);this.timeout=setTimeout((function(){e=o.htmlParser.backSpaceHtmlChars(t,e,n);var r=t.substr(0,e);if(n.replaceText(r),n.smartBackspace){var i=n.strings[n.arrayPos+1];i&&r===i.substr(0,e)?n.stopNum=e:n.stopNum=0}e>n.stopNum?(e--,n.backspace(t,e)):e<=n.stopNum&&(n.arrayPos++,n.arrayPos===n.strings.length?(n.arrayPos=0,n.options.onLastStringBackspaced(),n.shuffleStringsIfNeeded(),n.begin()):n.typewrite(n.strings[n.sequence[n.arrayPos]],e))}),r)}else this.setPauseStatus(t,e,!1)}},{key:"complete",value:function(){this.options.onComplete(this),this.loop?this.curLoop++:this.typingComplete=!0}},{key:"setPauseStatus",value:function(t,e,n){this.pause.typewrite=n,this.pause.curString=t,this.pause.curStrPos=e}},{key:"toggleBlinking",value:function(t){this.cursor&&(this.pause.status||this.cursorBlinking!==t&&(this.cursorBlinking=t,t?this.cursor.classList.add("typed-cursor--blink"):this.cursor.classList.remove("typed-cursor--blink")))}},{key:"humanizer",value:function(t){return Math.round(Math.random()*t/2)+t}},{key:"shuffleStringsIfNeeded",value:function(){this.shuffle&&(this.sequence=this.sequence.sort((function(){return Math.random()-.5})))}},{key:"initFadeOut",value:function(){var t=this;return this.el.className+=" "+this.fadeOutClass,this.cursor&&(this.cursor.className+=" "+this.fadeOutClass),setTimeout((function(){t.arrayPos++,t.replaceText(""),t.strings.length>t.arrayPos?t.typewrite(t.strings[t.sequence[t.arrayPos]],0):(t.typewrite(t.strings[0],0),t.arrayPos=0)}),this.fadeOutDelay)}},{key:"replaceText",value:function(t){this.attr?this.el.setAttribute(this.attr,t):this.isInput?this.el.value=t:"html"===this.contentType?this.el.innerHTML=t:this.el.textContent=t}},{key:"bindFocusEvents",value:function(){var t=this;this.isInput&&(this.el.addEventListener("focus",(function(e){t.stop()})),this.el.addEventListener("blur",(function(e){t.el.value&&0!==t.el.value.length||t.start()})))}},{key:"insertCursor",value:function(){this.showCursor&&(this.cursor||(this.cursor=document.createElement("span"),this.cursor.className="typed-cursor",this.cursor.setAttribute("aria-hidden",!0),this.cursor.innerHTML=this.cursorChar,this.el.parentNode&&this.el.parentNode.insertBefore(this.cursor,this.el.nextSibling)))}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(t){return t&&t.__esModule?t:{default:t}}(n(2)),s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return i(t,[{key:"load",value:function(t,e,n){if(t.el="string"==typeof n?document.querySelector(n):n,t.options=r({},o.default,e),t.isInput="input"===t.el.tagName.toLowerCase(),t.attr=t.options.attr,t.bindInputFocusEvents=t.options.bindInputFocusEvents,t.showCursor=!t.isInput&&t.options.showCursor,t.cursorChar=t.options.cursorChar,t.cursorBlinking=!0,t.elContent=t.attr?t.el.getAttribute(t.attr):t.el.textContent,t.contentType=t.options.contentType,t.typeSpeed=t.options.typeSpeed,t.startDelay=t.options.startDelay,t.backSpeed=t.options.backSpeed,t.smartBackspace=t.options.smartBackspace,t.backDelay=t.options.backDelay,t.fadeOut=t.options.fadeOut,t.fadeOutClass=t.options.fadeOutClass,t.fadeOutDelay=t.options.fadeOutDelay,t.isPaused=!1,t.strings=t.options.strings.map((function(t){return t.trim()})),"string"==typeof t.options.stringsElement?t.stringsElement=document.querySelector(t.options.stringsElement):t.stringsElement=t.options.stringsElement,t.stringsElement){t.strings=[],t.stringsElement.style.display="none";var i=Array.prototype.slice.apply(t.stringsElement.children),s=i.length;if(s)for(var a=0;a<s;a+=1){var l=i[a];t.strings.push(l.innerHTML.trim())}}for(var a in t.strPos=0,t.arrayPos=0,t.stopNum=0,t.loop=t.options.loop,t.loopCount=t.options.loopCount,t.curLoop=0,t.shuffle=t.options.shuffle,t.sequence=[],t.pause={status:!1,typewrite:!0,curString:"",curStrPos:0},t.typingComplete=!1,t.strings)t.sequence[a]=a;t.currentElContent=this.getCurrentElContent(t),t.autoInsertCss=t.options.autoInsertCss,this.appendAnimationCss(t)}},{key:"getCurrentElContent",value:function(t){return t.attr?t.el.getAttribute(t.attr):t.isInput?t.el.value:"html"===t.contentType?t.el.innerHTML:t.el.textContent}},{key:"appendAnimationCss",value:function(t){var e="data-typed-js-css";if(t.autoInsertCss&&(t.showCursor||t.fadeOut)&&!document.querySelector("["+e+"]")){var n=document.createElement("style");n.type="text/css",n.setAttribute(e,!0);var r="";t.showCursor&&(r+="\n .typed-cursor{\n opacity: 1;\n }\n .typed-cursor.typed-cursor--blink{\n animation: typedjsBlink 0.7s infinite;\n -webkit-animation: typedjsBlink 0.7s infinite;\n animation: typedjsBlink 0.7s infinite;\n }\n @keyframes typedjsBlink{\n 50% { opacity: 0.0; }\n }\n @-webkit-keyframes typedjsBlink{\n 0% { opacity: 1; }\n 50% { opacity: 0.0; }\n 100% { opacity: 1; }\n }\n "),t.fadeOut&&(r+="\n .typed-fade-out{\n opacity: 0;\n transition: opacity .25s;\n }\n .typed-cursor.typed-cursor--blink.typed-fade-out{\n -webkit-animation: 0;\n animation: 0;\n }\n "),0!==n.length&&(n.innerHTML=r,document.body.appendChild(n))}}}]),t}();e.default=s;var a=new s;e.initializer=a},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,smartBackspace:!0,shuffle:!1,backDelay:700,fadeOut:!1,fadeOutClass:"typed-fade-out",fadeOutDelay:500,loop:!1,loopCount:1/0,showCursor:!0,cursorChar:"|",autoInsertCss:!0,attr:null,bindInputFocusEvents:!1,contentType:"html",onBegin:function(t){},onComplete:function(t){},preStringTyped:function(t,e){},onStringTyped:function(t,e){},onLastStringBackspaced:function(t){},onTypingPaused:function(t,e){},onTypingResumed:function(t,e){},onReset:function(t){},onStop:function(t,e){},onStart:function(t,e){},onDestroy:function(t){}},t.exports=e.default},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,[{key:"typeHtmlChars",value:function(t,e,n){if("html"!==n.contentType)return e;var r=t.substr(e).charAt(0);if("<"===r||"&"===r){var i;for(i="<"===r?">":";";t.substr(e+1).charAt(0)!==i&&!(++e+1>t.length););e++}return e}},{key:"backSpaceHtmlChars",value:function(t,e,n){if("html"!==n.contentType)return e;var r=t.substr(e).charAt(0);if(">"===r||";"===r){var i;for(i=">"===r?"<":"&";t.substr(e-1).charAt(0)!==i&&!(--e<0););e--}return e}}]),t}();e.default=r;var i=new r;e.htmlParser=i}])})),function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var r,i="fslightbox-",o="".concat(i,"styles"),s="".concat(i,"cursor-grabbing"),a="".concat(i,"full-dimension"),l="".concat(i,"flex-centered"),u="".concat(i,"open"),c="".concat(i,"transform-transition"),d="".concat(i,"absoluted"),h="".concat(i,"slide-btn"),p="".concat(h,"-container"),f="".concat(i,"fade-in"),m="".concat(i,"fade-out"),g=f+"-strong",v=m+"-strong",y="".concat(i,"opacity-"),_="".concat(y,"1"),b="".concat(i,"source");function w(t){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function x(t){var e,n=t.props,r=0,i={};this.getSourceTypeFromLocalStorageByUrl=function(t){return e[t]?e[t]:o(t)},this.handleReceivedSourceTypeForUrl=function(t,n){!1===i[n]&&(r--,"invalid"!==t?i[n]=t:delete i[n],0===r&&(function(t,e){for(var n in e)t[n]=e[n]}(e,i),localStorage.setItem("fslightbox-types",JSON.stringify(e))))};var o=function(t){r++,i[t]=!1};n.disableLocalStorage?(this.getSourceTypeFromLocalStorageByUrl=function(){},this.handleReceivedSourceTypeForUrl=function(){}):(e=JSON.parse(localStorage.getItem("fslightbox-types")))||(e={},this.getSourceTypeFromLocalStorageByUrl=o)}function S(t,e,n,r){var i=t.data,o=t.elements.sources,s=n/r,a=0;this.adjustSize=function(){if((a=i.maxSourceWidth/s)<i.maxSourceHeight)return n<i.maxSourceWidth&&(a=r),l();a=r>i.maxSourceHeight?i.maxSourceHeight:r,l()};var l=function(){o[e].style.width=a*s+"px",o[e].style.height=a+"px"}}function k(t,e){var n=this,r=t.collections.sourceSizers,i=t.elements,o=i.sourceAnimationWrappers,s=i.sourceMainWrappers,a=i.sources,l=t.resolve;function u(t,n){r[e]=l(S,[e,t,n]),r[e].adjustSize()}this.runActions=function(t,r){a[e].classList.add(_),o[e].classList.add(g),s[e].removeChild(s[e].firstChild),u(t,r),n.runActions=u}}function C(t,e){var n,r=this,i=t.elements.sources,o=t.props,s=(0,t.resolve)(k,[e]);this.handleImageLoad=function(t){var e=t.target,n=e.naturalWidth,r=e.naturalHeight;s.runActions(n,r)},this.handleVideoLoad=function(t){var e=t.target,r=e.videoWidth,i=e.videoHeight;n=!0,s.runActions(r,i)},this.handleNotMetaDatedVideoLoad=function(){n||r.handleYoutubeLoad()},this.handleYoutubeLoad=function(){var t=1920,e=1080;o.maxYoutubeDimensions&&(t=o.maxYoutubeDimensions.width,e=o.maxYoutubeDimensions.height),s.runActions(t,e)},this.handleCustomLoad=function(){setTimeout((function(){var t=i[e];s.runActions(t.offsetWidth,t.offsetHeight)}))}}function E(t,e,n){var r=t.elements.sources,i=t.props.customClasses,o=i[e]?i[e]:"";r[e].className=n+" "+o}function T(t,e){var n=t.elements.sources,r=t.props.customAttributes;for(var i in r[e])n[e].setAttribute(i,r[e][i])}function P(t,e){var n=t.collections.sourceLoadHandlers,r=t.elements,i=r.sources,o=r.sourceAnimationWrappers,s=t.props.sources;i[e]=document.createElement("img"),E(t,e,b),i[e].src=s[e],i[e].onload=n[e].handleImageLoad,T(t,e),o[e].appendChild(i[e])}function O(t,e){var n=t.collections.sourceLoadHandlers,r=t.elements,i=r.sources,o=r.sourceAnimationWrappers,s=t.props,a=s.sources,l=s.videosPosters;i[e]=document.createElement("video"),E(t,e,b),i[e].src=a[e],i[e].onloadedmetadata=function(t){n[e].handleVideoLoad(t)},i[e].controls=!0,T(t,e),l[e]&&(i[e].poster=l[e]);var u=document.createElement("source");u.src=a[e],i[e].appendChild(u),setTimeout(n[e].handleNotMetaDatedVideoLoad,3e3),o[e].appendChild(i[e])}function A(t,e){var n=t.collections.sourceLoadHandlers,r=t.elements,o=r.sources,s=r.sourceAnimationWrappers,a=t.props.sources;o[e]=document.createElement("iframe"),E(t,e,"".concat(b," ").concat(i,"youtube-iframe")),o[e].src="https://www.youtube.com/embed/".concat(a[e].match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/)[2],"?enablejsapi=1"),o[e].allowFullscreen=!0,T(t,e),s[e].appendChild(o[e]),n[e].handleYoutubeLoad()}function M(t,e){var n=t.collections.sourceLoadHandlers,r=t.elements,i=r.sources,o=r.sourceAnimationWrappers,s=t.props.sources;i[e]=s[e],E(t,e,"".concat(i[e].className," ").concat(b)),o[e].appendChild(i[e]),n[e].handleCustomLoad()}function L(t,e){var n=t.elements,r=n.sources,o=n.sourceAnimationWrappers,s=n.sourceMainWrappers;t.props.sources,r[e]=document.createElement("div"),r[e].className="".concat(i,"invalid-file-wrapper ").concat(l),r[e].innerHTML="Invalid source",o[e].classList.add(g),o[e].appendChild(r[e]),s[e].removeChild(s[e].firstChild)}function I(t){var e=t.collections,n=e.sourceLoadHandlers,r=e.sourcesRenderFunctions,i=t.core.sourceDisplayFacade,o=t.resolve;this.runActionsForSourceTypeAndIndex=function(e,s){var a;switch("invalid"!==e&&(n[s]=o(C,[s])),e){case"image":a=P;break;case"video":a=O;break;case"youtube":a=A;break;case"custom":a=M;break;default:a=L}r[s]=function(){return a(t,s)},i.displaySourcesWhichShouldBeDisplayed()}}function j(){var t,e,n,r=function(t){var e=document.createElement("a");return e.href=t,"www.youtube.com"===e.hostname},i=function(t){return t.slice(0,t.indexOf("/"))};function o(){if(4!==n.readyState){if(2===n.readyState){var t;switch(i(n.getResponseHeader("content-type"))){case"image":t="image";break;case"video":t="video";break;default:t="invalid"}n.onreadystatechange=null,n.abort(),e(t)}}else e("invalid")}this.setUrlToCheck=function(e){t=e},this.getSourceType=function(i){if(r(t))return i("youtube");e=i,(n=new XMLHttpRequest).onreadystatechange=o,n.open("GET",t,!0),n.send()}}function D(t,e,n){var r=t.props,i=r.types,o=r.type,s=r.sources,a=t.resolve;this.getTypeSetByClientForIndex=function(t){var e;return i&&i[t]?e=i[t]:o&&(e=o),e},this.retrieveTypeWithXhrForIndex=function(t){var r=a(j);r.setUrlToCheck(s[t]),r.getSourceType((function(r){e.handleReceivedSourceTypeForUrl(r,s[t]),n.runActionsForSourceTypeAndIndex(r,t)}))}}function N(t,e){var n=t.componentsServices.hideSourceLoaderIfNotYetCollection,r=t.elements,i=r.sourceWrappersContainer,o=r.sourceMainWrappers;o[e]=document.createElement("div"),o[e].className="".concat(d," ").concat(a," ").concat(l),o[e].innerHTML='<div class="fslightbox-loader"><div></div><div></div><div></div><div></div></div>';var s=o[e].firstChild;n[e]=function(){o[e].contains(s)&&o[e].removeChild(s)},i.appendChild(o[e]),function(t,e){var n=t.elements,r=n.sourceMainWrappers,i=n.sourceAnimationWrappers;i[e]=document.createElement("div"),r[e].appendChild(i[e])}(t,e)}function R(t,e,n,r){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttributeNS(null,"width",e),o.setAttributeNS(null,"height",e),o.setAttributeNS(null,"viewBox",n);var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttributeNS(null,"class","".concat(i,"svg-path")),s.setAttributeNS(null,"d",r),o.appendChild(s),t.appendChild(o),o}function F(t,e){var n=document.createElement("div");return n.className="".concat(i,"toolbar-button ").concat(l),n.title=e,t.appendChild(n),n}function V(t){var e=t.props.sources,n=t.elements.container,r=document.createElement("div");r.className="".concat(i,"nav"),n.appendChild(r),function(t,e){var n=document.createElement("div");n.className="".concat(i,"toolbar"),e.appendChild(n),function(t,e){var n=t.componentsServices,r=t.core.fullscreenToggler,i=t.data,o="M4.5 11H3v4h4v-1.5H4.5V11zM3 7h1.5V4.5H7V3H3v4zm10.5 6.5H11V15h4v-4h-1.5v2.5zM11 3v1.5h2.5V7H15V3h-4z",s=F(e);s.title="Enter fullscreen";var a=R(s,"20px","0 0 18 18",o);n.enterFullscreen=function(){i.isFullscreenOpen=!0,s.title="Exit fullscreen",a.setAttributeNS(null,"width","24px"),a.setAttributeNS(null,"height","24px"),a.setAttributeNS(null,"viewBox","0 0 950 1024"),a.firstChild.setAttributeNS(null,"d","M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z")},n.exitFullscreen=function(){i.isFullscreenOpen=!1,s.title="Enter fullscreen",a.setAttributeNS(null,"width","20px"),a.setAttributeNS(null,"height","20px"),a.setAttributeNS(null,"viewBox","0 0 18 18"),a.firstChild.setAttributeNS(null,"d",o)},s.onclick=function(){i.isFullscreenOpen?r.exitFullscreen():r.enterFullscreen()}}(t,n),function(t,e){var n=F(e,"Close");n.onclick=t.core.lightboxCloser.closeLightbox,R(n,"20px","0 0 24 24","M 4.7070312 3.2929688 L 3.2929688 4.7070312 L 10.585938 12 L 3.2929688 19.292969 L 4.7070312 20.707031 L 12 13.414062 L 19.292969 20.707031 L 20.707031 19.292969 L 13.414062 12 L 20.707031 4.7070312 L 19.292969 3.2929688 L 12 10.585938 L 4.7070312 3.2929688 z")}(t,n)}(t,r),e.length>1&&function(t,e){var n=t.componentsServices,r=t.props.sources,o=(t.stageIndexes,document.createElement("div"));o.className="".concat(i,"slide-number-container");var s=document.createElement("div");s.className=l;var a=document.createElement("span");n.setSlideNumber=function(t){return a.innerHTML=t};var u=document.createElement("span");u.className="".concat(i,"slash");var c=document.createElement("div");c.innerHTML=r.length,o.appendChild(s),s.appendChild(a),s.appendChild(u),s.appendChild(c),e.appendChild(o),setTimeout((function(){s.offsetWidth>55&&(o.style.justifyContent="flex-start")}))}(t,r)}function z(t,e){var n=this,r=t.elements.sourceMainWrappers,i=t.props,o=0;this.byValue=function(t){return o=t,n},this.negative=function(){s(-a())},this.zero=function(){s(0)},this.positive=function(){s(a())};var s=function(t){r[e].style.transform="translateX(".concat(t+o,"px)"),o=0},a=function(){return(1+i.slideDistance)*innerWidth}}function B(t,e,n,r){var i=t.elements.container,o=n.charAt(0).toUpperCase()+n.slice(1),s=document.createElement("div");s.className="".concat(p," ").concat(p,"-").concat(n),s.title="".concat(o," slide"),s.onclick=e,function(t,e){var n=document.createElement("div");n.className="".concat(h," ").concat(l),R(n,"20px","0 0 20 20",e),t.appendChild(n)}(s,r),i.appendChild(s)}function q(t,e){var n=t.classList;n.contains(e)&&n.remove(e)}function H(t){var e=this,n=t.core,r=n.eventsDispatcher,i=n.fullscreenToggler,o=n.globalEventsController,s=n.scrollbarRecompensor,a=t.data,l=t.elements,c=t.props,d=t.sourcePointerProps;this.isLightboxFadingOut=!1,this.runActions=function(){e.isLightboxFadingOut=!0,l.container.classList.add(v),o.removeListeners(),c.exitFullscreenOnClose&&a.isFullscreenOpen&&i.exitFullscreen(),setTimeout((function(){e.isLightboxFadingOut=!1,d.isPointering=!1,l.container.classList.remove(v),document.documentElement.classList.remove(u),s.removeRecompense(),document.body.removeChild(l.container),r.dispatch("onClose")}),270)}}function $(t){var e=t.core,n=e.lightboxCloser,r=e.fullscreenToggler,i=e.slideChangeFacade;this.listener=function(t){switch(t.key){case"Escape":n.closeLightbox();break;case"ArrowLeft":i.changeToPrevious();break;case"ArrowRight":i.changeToNext();break;case"F11":t.preventDefault(),r.enterFullscreen()}}}function U(t){var e=t.collections.sourceMainWrappersTransformers,n=t.elements,r=t.sourcePointerProps,i=t.stageIndexes;function o(t,n){e[t].byValue(r.swipedX)[n]()}this.runActionsForEvent=function(t){var e,a,l;n.container.contains(n.slideSwipingHoverer)||n.container.appendChild(n.slideSwipingHoverer),e=n.container,a=s,(l=e.classList).contains(a)||l.add(a),r.swipedX=t.screenX-r.downScreenX,o(i.current,"zero"),void 0!==i.previous&&r.swipedX>0?o(i.previous,"negative"):void 0!==i.next&&r.swipedX<0&&o(i.next,"positive")}}function W(t){var e=t.props.sources,n=t.resolve,r=t.sourcePointerProps,i=n(U);1===e.length?this.listener=function(){r.swipedX=1}:this.listener=function(t){r.isPointering&&i.runActionsForEvent(t)}}function G(t){var e=t.collections.sourceMainWrappersTransformers,n=t.core.slideIndexChanger,r=t.elements.sourceMainWrappers,i=t.stageIndexes;this.runPositiveSwipedXActions=function(){void 0===i.previous||(o("positive"),n.changeTo(i.previous)),o("zero")},this.runNegativeSwipedXActions=function(){void 0===i.next||(o("negative"),n.changeTo(i.next)),o("zero")};var o=function(t){r[i.current].classList.add(c),e[i.current][t]()}}function Y(t,e){t.contains(e)&&t.removeChild(e)}function Z(t){var e=t.core.lightboxCloser,n=t.elements,r=t.resolve,i=t.sourcePointerProps,o=r(G);this.runNoSwipeActions=function(){Y(n.container,n.slideSwipingHoverer),i.isSourceDownEventTarget||e.closeLightbox(),i.isPointering=!1},this.runActions=function(){i.swipedX>0?o.runPositiveSwipedXActions():o.runNegativeSwipedXActions(),Y(n.container,n.slideSwipingHoverer),n.container.classList.remove(s),i.isPointering=!1}}function K(t){var e=t.resolve,n=t.sourcePointerProps,r=e(Z);this.listener=function(){n.isPointering&&(n.swipedX?r.runActions():r.runNoSwipeActions())}}function X(t){var e,n,r;n=(e=t).core.classFacade,r=e.elements,n.removeFromEachElementClassIfContains=function(t,e){for(var n=0;n<r[t].length;n++)q(r[t][n],e)},function(t){var e=t.core.eventsDispatcher,n=t.props;e.dispatch=function(t){n[t]&&n[t]()}}(t),function(t){var e=t.componentsServices,n=t.core.fullscreenToggler;n.enterFullscreen=function(){e.enterFullscreen();var t=document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},n.exitFullscreen=function(){e.exitFullscreen(),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()}}(t),function(t){var e=t.core,n=e.globalEventsController,r=e.windowResizeActioner,i=t.resolve,o=i($),s=i(W),a=i(K);n.attachListeners=function(){document.addEventListener("pointermove",s.listener),document.addEventListener("pointerup",a.listener),addEventListener("resize",r.runActions),document.addEventListener("keydown",o.listener)},n.removeListeners=function(){document.removeEventListener("pointermove",s.listener),document.removeEventListener("pointerup",a.listener),removeEventListener("resize",r.runActions),document.removeEventListener("keydown",o.listener)}}(t),function(t){var e=t.core.lightboxCloser,n=(0,t.resolve)(H);e.closeLightbox=function(){n.isLightboxFadingOut||n.runActions()}}(t),J(t),function(t){var e=t.data,n=t.core.scrollbarRecompensor;function r(){document.body.offsetHeight>innerHeight&&(document.body.style.marginRight=e.scrollbarWidth+"px")}n.addRecompense=function(){"complete"===document.readyState?r():addEventListener("load",(function(){r(),n.addRecompense=r}))},n.removeRecompense=function(){document.body.style.removeProperty("margin-right")}}(t),function(t){var e=t.core,n=e.slideChangeFacade,r=e.slideIndexChanger,i=e.stageManager;t.props.sources.length>1?(n.changeToPrevious=function(){r.jumpTo(i.getPreviousSlideIndex())},n.changeToNext=function(){r.jumpTo(i.getNextSlideIndex())}):(n.changeToPrevious=function(){},n.changeToNext=function(){})}(t),function(t){var e,n,r=t.collections.sourceMainWrappersTransformers,i=t.componentsServices,o=t.core,s=o.classFacade,a=o.slideIndexChanger,l=o.sourceDisplayFacade,u=o.stageManager,d=t.elements.sourceAnimationWrappers,h=t.stageIndexes,p=(e=function(){s.removeFromEachElementClassIfContains("sourceAnimationWrappers",m)},300,n=[],function(){n.push(!0),setTimeout((function(){n.pop(),n.length||e()}),300)});a.changeTo=function(t){h.current=t,u.updateStageIndexes(),i.setSlideNumber(t+1),l.displaySourcesWhichShouldBeDisplayed()},a.jumpTo=function(t){var e=h.current;a.changeTo(t),s.removeFromEachElementClassIfContains("sourceMainWrappers",c),q(d[e],g),q(d[e],f),d[e].classList.add(m),q(d[t],g),q(d[t],m),d[t].classList.add(f),p(),r[t].zero(),setTimeout((function(){e!==h.current&&r[e].negative()}),270)}}(t),function(t){var e=t.core,n=e.classFacade,r=e.sourcesPointerDown,i=t.elements.sources,o=t.sourcePointerProps,s=t.stageIndexes;r.listener=function(t){"VIDEO"!==t.target.tagName&&t.preventDefault(),o.isPointering=!0,o.downScreenX=t.screenX,o.swipedX=0;var e=i[s.current];e&&e.contains(t.target)?o.isSourceDownEventTarget=!0:o.isSourceDownEventTarget=!1,n.removeFromEachElementClassIfContains("sourceMainWrappers",c)}}(t),function(t){var e=t.collections.sourcesRenderFunctions,n=t.core.sourceDisplayFacade,r=t.props,i=t.stageIndexes;function o(t){e[t]&&(e[t](),delete e[t])}n.displaySourcesWhichShouldBeDisplayed=function(){if(r.loadOnlyCurrentSource)o(i.current);else for(var t in i)o(i[t])}}(t),function(t){var e=t.stageIndexes,n=t.core.stageManager,r=t.props.sources.length-1;n.getPreviousSlideIndex=function(){return 0===e.current?r:e.current-1},n.getNextSlideIndex=function(){return e.current===r?0:e.current+1},n.updateStageIndexes=0===r?function(){}:1===r?function(){0===e.current?(e.next=1,delete e.previous):(e.previous=0,delete e.next)}:function(){e.previous=n.getPreviousSlideIndex(),e.next=n.getNextSlideIndex()},n.isSourceInStage=r<=2?function(){return!0}:function(t){var n=e.current;if(0===n&&t===r||n===r&&0===t)return!0;var i=n-t;return-1===i||0===i||1===i}}(t),function(t){var e=t.collections,n=e.sourceMainWrappersTransformers,r=e.sourceSizers,i=t.core.windowResizeActioner,o=t.data,s=t.elements.sourceMainWrappers,a=t.props,l=t.stageIndexes;i.runActions=function(){innerWidth<992?o.maxSourceWidth=innerWidth:o.maxSourceWidth=.9*innerWidth,o.maxSourceHeight=.9*innerHeight;for(var t=0;t<a.sources.length;t++)q(s[t],c),t!==l.current&&n[t].negative(),r[t]&&r[t].adjustSize()}}(t)}function Q(t){var e=t.core.eventsDispatcher,n=t.data,r=t.elements,o=t.props.sources;n.isInitialized=!0,n.scrollbarWidth=function(t){var e=t.props.disableLocalStorage;if(!e){var n=localStorage.getItem("fslightbox-scrollbar-width");if(n)return n}var r=function(){var t=document.createElement("div"),e=t.style;return e.visibility="hidden",e.width="100px",e.msOverflowStyle="scrollbar",e.overflow="scroll",t}(),i=function(){var t=document.createElement("div");return t.style.width="100%",t}();document.body.appendChild(r);var o=r.offsetWidth;r.appendChild(i);var s=i.offsetWidth;document.body.removeChild(r);var a=o-s;return e||localStorage.setItem("fslightbox-scrollbar-width",a.toString()),a}(t),function(t){for(var e=t.collections.sourceMainWrappersTransformers,n=t.props.sources,r=t.resolve,i=0;i<n.length;i++)e[i]=r(z,[i])}(t),X(t),r.container=document.createElement("div"),r.container.className="".concat(i,"container ").concat(a," ").concat(g),function(t){var e=t.elements;e.slideSwipingHoverer=document.createElement("div"),e.slideSwipingHoverer.className="".concat(i,"slide-swiping-hoverer ").concat(a," ").concat(d)}(t),V(t),function(t){var e=t.core.sourcesPointerDown,n=t.elements,r=t.props.sources,i=document.createElement("div");i.className="".concat(d," ").concat(a),n.container.appendChild(i),i.addEventListener("pointerdown",e.listener),n.sourceWrappersContainer=i;for(var o=0;o<r.length;o++)N(t,o)}(t),o.length>1&&function(t){var e=t.core.slideChangeFacade;B(t,e.changeToPrevious,"previous","M18.271,9.212H3.615l4.184-4.184c0.306-0.306,0.306-0.801,0-1.107c-0.306-0.306-0.801-0.306-1.107,0L1.21,9.403C1.194,9.417,1.174,9.421,1.158,9.437c-0.181,0.181-0.242,0.425-0.209,0.66c0.005,0.038,0.012,0.071,0.022,0.109c0.028,0.098,0.075,0.188,0.142,0.271c0.021,0.026,0.021,0.061,0.045,0.085c0.015,0.016,0.034,0.02,0.05,0.033l5.484,5.483c0.306,0.307,0.801,0.307,1.107,0c0.306-0.305,0.306-0.801,0-1.105l-4.184-4.185h14.656c0.436,0,0.788-0.353,0.788-0.788S18.707,9.212,18.271,9.212z"),B(t,e.changeToNext,"next","M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788S1.293,9.212,1.729,9.212z")}(t),function(t){for(var e=t.props.sources,n=t.resolve,r=n(x),i=n(I),o=n(D,[r,i]),s=0;s<e.length;s++)if("string"==typeof e[s]){var a=o.getTypeSetByClientForIndex(s);if(a)i.runActionsForSourceTypeAndIndex(a,s);else{var l=r.getSourceTypeFromLocalStorageByUrl(e[s]);l?i.runActionsForSourceTypeAndIndex(l,s):o.retrieveTypeWithXhrForIndex(s)}}else i.runActionsForSourceTypeAndIndex("custom",s)}(t),e.dispatch("onInit")}function J(t){var e=t.collections.sourceMainWrappersTransformers,n=t.componentsServices,r=t.core,i=r.eventsDispatcher,o=r.lightboxOpener,s=r.globalEventsController,a=r.scrollbarRecompensor,l=r.sourceDisplayFacade,c=r.stageManager,d=r.windowResizeActioner,h=t.data,p=t.elements,f=t.stageIndexes;o.open=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;f.current=r,h.isInitialized?i.dispatch("onShow"):Q(t),c.updateStageIndexes(),l.displaySourcesWhichShouldBeDisplayed(),n.setSlideNumber(r+1),document.body.appendChild(p.container),document.documentElement.classList.add(u),a.addRecompense(),s.attachListeners(),d.runActions(),e[f.current].zero(),i.dispatch("onOpen")}}function tt(t,e,n){return(tt=et()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&nt(i,n.prototype),i}).apply(null,arguments)}function et(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function nt(t,e){return(nt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function rt(t){return function(t){if(Array.isArray(t))return it(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return it(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?it(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ot(){for(var t=document.getElementsByTagName("a"),e=function(e){if(!t[e].hasAttribute("data-fslightbox"))return"continue";var n=t[e].getAttribute("data-fslightbox"),r=t[e].getAttribute("href");fsLightboxInstances[n]||(fsLightboxInstances[n]=new FsLightbox);var i=null;"#"===r.charAt(0)?(i=document.getElementById(r.substring(1)).cloneNode(!0)).removeAttribute("id"):i=r,fsLightboxInstances[n].props.sources.push(i),fsLightboxInstances[n].elements.a.push(t[e]);var o=fsLightboxInstances[n].props.sources.length-1;t[e].onclick=function(t){t.preventDefault(),fsLightboxInstances[n].open(o)},d("types","data-type"),d("videosPosters","data-video-poster"),d("customClasses","data-class"),d("customClasses","data-custom-class");for(var s=["href","data-fslightbox","data-type","data-video-poster","data-class","data-custom-class"],a=t[e].attributes,l=fsLightboxInstances[n].props.customAttributes,u=0;u<a.length;u++)if(-1===s.indexOf(a[u].name)&&"data-"===a[u].name.substr(0,5)){l[o]||(l[o]={});var c=a[u].name.substr(5);l[o][c]=a[u].value}function d(r,i){t[e].hasAttribute(i)&&(fsLightboxInstances[n].props[r][o]=t[e].getAttribute(i))}},n=0;n<t.length;n++)e(n);var r=Object.keys(fsLightboxInstances);window.fsLightbox=fsLightboxInstances[r[r.length-1]]}"object"===("undefined"==typeof document?"undefined":w(document))&&((r=document.createElement("style")).className=o,r.appendChild(document.createTextNode(".fslightbox-absoluted{position:absolute;top:0;left:0}.fslightbox-fade-in{animation:fslightbox-fade-in .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out{animation:fslightbox-fade-out .3s ease}.fslightbox-fade-in-strong{animation:fslightbox-fade-in-strong .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out-strong{animation:fslightbox-fade-out-strong .3s ease}@keyframes fslightbox-fade-in{from{opacity:.65}to{opacity:1}}@keyframes fslightbox-fade-out{from{opacity:.35}to{opacity:0}}@keyframes fslightbox-fade-in-strong{from{opacity:.3}to{opacity:1}}@keyframes fslightbox-fade-out-strong{from{opacity:1}to{opacity:0}}.fslightbox-cursor-grabbing{cursor:grabbing}.fslightbox-full-dimension{width:100%;height:100%}.fslightbox-open{overflow:hidden;height:100%}.fslightbox-flex-centered{display:flex;justify-content:center;align-items:center}.fslightbox-opacity-0{opacity:0!important}.fslightbox-opacity-1{opacity:1!important}.fslightbox-scrollbarfix{padding-right:17px}.fslightbox-transform-transition{transition:transform .3s}.fslightbox-container{font-family:Arial,sans-serif;position:fixed;top:0;left:0;background:linear-gradient(rgba(30,30,30,.9),#000 1810%);touch-action:pinch-zoom;z-index:1000000000;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fslightbox-container *{box-sizing:border-box}.fslightbox-svg-path{transition:fill .15s ease;fill:#ddd}.fslightbox-nav{height:45px;width:100%;position:absolute;top:0;left:0}.fslightbox-slide-number-container{display:flex;justify-content:center;align-items:center;position:relative;height:100%;font-size:15px;color:#d7d7d7;z-index:0;max-width:55px;text-align:left}.fslightbox-slide-number-container .fslightbox-flex-centered{height:100%}.fslightbox-slash{display:block;margin:0 5px;width:1px;height:12px;transform:rotate(15deg);background:#fff}.fslightbox-toolbar{position:absolute;z-index:3;right:0;top:0;height:100%;display:flex;background:rgba(35,35,35,.65)}.fslightbox-toolbar-button{height:100%;width:45px;cursor:pointer}.fslightbox-toolbar-button:hover .fslightbox-svg-path{fill:#fff}.fslightbox-slide-btn-container{display:flex;align-items:center;padding:12px 12px 12px 6px;position:absolute;top:50%;cursor:pointer;z-index:3;transform:translateY(-50%)}@media (min-width:476px){.fslightbox-slide-btn-container{padding:22px 22px 22px 6px}}@media (min-width:768px){.fslightbox-slide-btn-container{padding:30px 30px 30px 6px}}.fslightbox-slide-btn-container:hover .fslightbox-svg-path{fill:#f1f1f1}.fslightbox-slide-btn{padding:9px;font-size:26px;background:rgba(35,35,35,.65)}@media (min-width:768px){.fslightbox-slide-btn{padding:10px}}@media (min-width:1600px){.fslightbox-slide-btn{padding:11px}}.fslightbox-slide-btn-container-previous{left:0}@media (max-width:475.99px){.fslightbox-slide-btn-container-previous{padding-left:3px}}.fslightbox-slide-btn-container-next{right:0;padding-left:12px;padding-right:3px}@media (min-width:476px){.fslightbox-slide-btn-container-next{padding-left:22px}}@media (min-width:768px){.fslightbox-slide-btn-container-next{padding-left:30px}}@media (min-width:476px){.fslightbox-slide-btn-container-next{padding-right:6px}}.fslightbox-down-event-detector{position:absolute;z-index:1}.fslightbox-slide-swiping-hoverer{z-index:4}.fslightbox-invalid-file-wrapper{font-size:22px;color:#eaebeb;margin:auto}.fslightbox-video{object-fit:cover}.fslightbox-youtube-iframe{border:0}.fslightbox-loader{display:block;margin:auto;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:67px;height:67px}.fslightbox-loader div{box-sizing:border-box;display:block;position:absolute;width:54px;height:54px;margin:6px;border:5px solid;border-color:#999 transparent transparent transparent;border-radius:50%;animation:fslightbox-loader 1.2s cubic-bezier(.5,0,.5,1) infinite}.fslightbox-loader div:nth-child(1){animation-delay:-.45s}.fslightbox-loader div:nth-child(2){animation-delay:-.3s}.fslightbox-loader div:nth-child(3){animation-delay:-.15s}@keyframes fslightbox-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fslightbox-source{position:relative;z-index:2;opacity:0}")),document.head.appendChild(r)),window.FsLightbox=function(){var t=this;this.props={sources:[],customAttributes:[],customClasses:[],types:[],videosPosters:[],slideDistance:.3},this.data={isInitialized:!1,isFullscreenOpen:!1,maxSourceWidth:0,maxSourceHeight:0,scrollbarWidth:0},this.sourcePointerProps={downScreenX:null,isPointering:!1,isSourceDownEventTarget:!1,swipedX:0},this.stageIndexes={},this.elements={a:[],container:null,slideSwipingHoverer:null,sourceWrappersContainer:null,sources:[],sourceMainWrappers:[],sourceAnimationWrappers:[]},this.componentsServices={enterFullscreen:null,exitFullscreen:null,hideSourceLoaderIfNotYetCollection:[],setSlideNumber:function(){}},this.resolve=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.unshift(t),tt(e,rt(n))},this.collections={sourceMainWrappersTransformers:[],sourceLoadHandlers:[],sourcesRenderFunctions:[],sourceSizers:[]},this.core={classFacade:{},eventsDispatcher:{},fullscreenToggler:{},globalEventsController:{},lightboxCloser:{},lightboxOpener:{},lightboxUpdater:{},scrollbarRecompensor:{},slideChangeFacade:{},slideIndexChanger:{},sourcesPointerDown:{},sourceDisplayFacade:{},stageManager:{},windowResizeActioner:{}},J(this),this.open=function(e){return t.core.lightboxOpener.open(e)},this.close=function(){return t.core.lightboxCloser.closeLightbox()}},window.fsLightboxInstances={},ot(),window.refreshFsLightbox=function(){for(var t in fsLightboxInstances){var e=fsLightboxInstances[t].props;fsLightboxInstances[t]=new FsLightbox,fsLightboxInstances[t].props=e,fsLightboxInstances[t].props.sources=[],fsLightboxInstances[t].elements.a=[]}ot()}}])})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSSwitchText=e():t.HSSwitchText=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="./src/js/hs-switch-text.js")}({"./src/js/hs-switch-text.js":
|
||
/*!**********************************!*\
|
||
!*** ./src/js/hs-switch-text.js ***!
|
||
\**********************************/
|
||
/*! exports provided: default */function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.r(e),n.d(e,"default",(function(){return o}));var i={target:null,eventType:"change",afterChange:null,startUpdateOnChange:!1},o=function(){function t(e,n,r){var i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.collection=[],i=e instanceof HTMLElement?[e]:e instanceof Object?e:document.querySelectorAll(e);for(var o=0;o<i.length;o+=1)this.addToCollection(i[o],n,r||i[o].id);return!!this.collection.length&&(this._init(),this)}var e,n;return e=t,(n=[{key:"_init",value:function(){for(var t=this,e=function(e){var n=void 0,r=void 0;if(t.collection[e].hasOwnProperty("$initializedEl"))return"continue";n=t.collection[e].$el,r=t.collection[e].options,n.addEventListener(r.eventType,(function(){for(var t=0;t<r.target.length;t++)document.querySelector(r.target[t].selector).innerHTML=r.target[t].text;"function"==typeof r.afterChange&&r.afterChange()})),t.collection[e].$initializedEl=r},n=0;n<t.collection.length;n+=1)e(n)}},{key:"addToCollection",value:function(t,e,n){this.collection.push({$el:t,id:n||null,options:Object.assign({},i,t.hasAttribute("data-hs-switch-text-options")?JSON.parse(t.getAttribute("data-hs-switch-text-options")):{},e)})}},{key:"getItem",value:function(t){return"number"==typeof t?this.collection[t].$initializedEl:this.collection.find((function(e){return e.id===t})).$initializedEl}}])&&r(e.prototype,n),t}()}}).default})),function(t,e){"object"==typeof exports&&void 0!==module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).noUiSlider={})}(this,(function(t){"use strict";function e(t){return"object"==typeof t&&"function"==typeof t.to}function n(t){t.parentElement.removeChild(t)}function r(t){return null!=t}function i(t){t.preventDefault()}function o(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function s(t,e,n){0<n&&(c(t,e),setTimeout((function(){d(t,e)}),n))}function a(t){return Math.max(Math.min(t,100),0)}function l(t){return Array.isArray(t)?t:[t]}function u(t){return 1<(t=(t=String(t)).split(".")).length?t[1].length:0}function c(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function d(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function h(t){var e=void 0!==window.pageXOffset,n="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:(n?t.documentElement:t.body).scrollLeft,y:e?window.pageYOffset:(n?t.documentElement:t.body).scrollTop}}function p(t,e){return 100/(e-t)}function f(t,e,n){return 100*e/(t[n+1]-t[n])}function m(t,e){for(var n=1;t>=e[n];)n+=1;return n}t.PipsMode=void 0,(Z=t.PipsMode||(t.PipsMode={})).Range="range",Z.Steps="steps",Z.Positions="positions",Z.Count="count",Z.Values="values",t.PipsType=void 0,(Z=t.PipsType||(t.PipsType={}))[Z.None=-1]="None",Z[Z.NoValue=0]="NoValue",Z[Z.LargeValue=1]="LargeValue",Z[Z.SmallValue=2]="SmallValue";var g=(v.prototype.getDistance=function(t){for(var e=[],n=0;n<this.xNumSteps.length-1;n++)e[n]=f(this.xVal,t,n);return e},v.prototype.getAbsoluteDistance=function(t,e,n){var r=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[r+1];)r++;else t===this.xPct[this.xPct.length-1]&&(r=this.xPct.length-2);n||t!==this.xPct[r+1]||r++;for(var i,o=1,s=(e=null===e?[]:e)[r],a=0,l=0,u=0,c=n?(t-this.xPct[r])/(this.xPct[r+1]-this.xPct[r]):(this.xPct[r+1]-t)/(this.xPct[r+1]-this.xPct[r]);0<s;)i=this.xPct[r+1+u]-this.xPct[r+u],100<e[r+u]*o+100-100*c?(a=i*c,o=(s-100*c)/e[r+u],c=1):(a=e[r+u]*i/100*o,o=0),n?(l-=a,1<=this.xPct.length+u&&u--):(l+=a,1<=this.xPct.length-u&&u++),s=e[r+u]*o;return t+l},v.prototype.toStepping=function(t){return function(t,e,n){if(n>=t.slice(-1)[0])return 100;var r=t[(o=m(n,t))-1],i=t[o],o=(t=e[o-1],e[o]);return t+(n=n,f(i=[r,i],i[0]<0?n+Math.abs(i[0]):n-i[0],0)/p(t,o))}(this.xVal,this.xPct,t)},v.prototype.fromStepping=function(t){return function(t,e,n){if(100<=n)return t.slice(-1)[0];var r,i=t[(r=m(n,e))-1],o=t[r];return(n-(t=e[r-1]))*p(t,r=e[r])*((o=[i,o])[1]-o[0])/100+o[0]}(this.xVal,this.xPct,t)},v.prototype.getStep=function(t){return function(t,e,n,r){if(100===r)return r;var i=m(r,t),o=t[i-1],s=t[i];return n?(s-o)/2<r-o?s:o:e[i-1]?t[i-1]+(t=r-t[i-1],i=e[i-1],Math.round(t/i)*i):r}(this.xPct,this.xSteps,this.snap,t)},v.prototype.getDefaultStep=function(t,e,n){var r=m(t,this.xPct);return(100===t||e&&t===this.xPct[r-1])&&(r=Math.max(r-1,1)),(this.xVal[r]-this.xVal[r-1])/n},v.prototype.getNearbySteps=function(t){return t=m(t,this.xPct),{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},v.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(u);return Math.max.apply(null,t)},v.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},v.prototype.convert=function(t){return this.getStep(this.toStepping(t))},v.prototype.handleEntryPoint=function(t,e){if(!o(t="min"===t?0:"max"===t?100:parseFloat(t))||!o(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(t),this.xVal.push(e[0]),e=Number(e[1]),t?this.xSteps.push(!isNaN(e)&&e):isNaN(e)||(this.xSteps[0]=e),this.xHighestCompleteStep.push(0)},v.prototype.handleStepPoint=function(t,e){e&&(this.xVal[t]!==this.xVal[t+1]?(this.xSteps[t]=f([this.xVal[t],this.xVal[t+1]],e,0)/p(this.xPct[t],this.xPct[t+1]),e=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],e=Math.ceil(Number(e.toFixed(3))-1),e=this.xVal[t]+this.xNumSteps[t]*e,this.xHighestCompleteStep[t]=e):this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t])},v);function v(t,e,n){var r;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.snap=e;var i=[];for(Object.keys(t).forEach((function(e){i.push([l(t[e]),e])})),i.sort((function(t,e){return t[0][0]-e[0][0]})),r=0;r<i.length;r++)this.handleEntryPoint(i[r][1],i[r][0]);for(this.xNumSteps=this.xSteps.slice(0),r=0;r<this.xNumSteps.length;r++)this.handleStepPoint(r,this.xNumSteps[r])}var y={to:function(t){return void 0===t?"":t.toFixed(2)},from:Number},_={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},b=".__tooltips",w=".__aria";function x(t,e){if(!o(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function S(t,e){if(!o(e))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");t.keyboardPageMultiplier=e}function k(t,e){if(!o(e))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");t.keyboardMultiplier=e}function C(t,e){if(!o(e))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");t.keyboardDefaultStep=e}function E(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new g(e,t.snap||!1,t.singleStep)}function T(t,e){if(e=l(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function P(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.");t.snap=e}function O(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.");t.animate=e}function A(t,e){if("number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.");t.animationDuration=e}function M(t,e){var n,r=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(n=1;n<t.handles;n++)r.push(e);r.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");r=e}t.connect=r}function L(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function I(t,e){if(!o(e))throw new Error("noUiSlider: 'margin' option must be numeric.");0!==e&&(t.margin=t.spectrum.getDistance(e))}function j(t,e){if(!o(e))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getDistance(e),!t.limit||t.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function D(t,e){var n;if(!o(e)&&!Array.isArray(e))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(e)&&2!==e.length&&!o(e[0])&&!o(e[1]))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==e){for(Array.isArray(e)||(e=[e,e]),t.padding=[t.spectrum.getDistance(e[0]),t.spectrum.getDistance(e[1])],n=0;n<t.spectrum.xNumSteps.length-1;n++)if(t.padding[0][n]<0||t.padding[1][n]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var r=e[0]+e[1];e=t.spectrum.xVal[0];if(1<r/(t.spectrum.xVal[t.spectrum.xVal.length-1]-e))throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function N(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function R(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=0<=e.indexOf("tap"),r=0<=e.indexOf("drag"),i=0<=e.indexOf("fixed"),o=0<=e.indexOf("snap"),s=0<=e.indexOf("hover"),a=0<=e.indexOf("unconstrained");e=0<=e.indexOf("drag-all");if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");I(t,t.start[1]-t.start[0])}if(a&&(t.margin||t.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:n||o,drag:r,dragAll:e,fixed:i,snap:o,hover:s,unconstrained:a}}function F(t,n){if(!1!==n)if(!0===n||e(n)){t.tooltips=[];for(var r=0;r<t.handles;r++)t.tooltips.push(n)}else{if((n=l(n)).length!==t.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");n.forEach((function(t){if("boolean"!=typeof t&&!e(t))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")})),t.tooltips=n}}function V(t,e){if(e.length!==t.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");t.handleAttributes=e}function z(t,n){if(!e(n))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");t.ariaFormat=n}function B(t,n){if(!e(r=n)||"function"!=typeof r.from)throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");var r;t.format=n}function q(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");t.keyboardSupport=e}function H(t,e){t.documentElement=e}function $(t,e){if("string"!=typeof e&&!1!==e)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function U(t,e){if("object"!=typeof e)throw new Error("noUiSlider: 'cssClasses' must be an object.");"string"==typeof t.cssPrefix?(t.cssClasses={},Object.keys(e).forEach((function(n){t.cssClasses[n]=t.cssPrefix+e[n]}))):t.cssClasses=e}function W(t){var e={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:y,format:y},n={step:{r:!1,t:x},keyboardPageMultiplier:{r:!1,t:S},keyboardMultiplier:{r:!1,t:k},keyboardDefaultStep:{r:!1,t:C},start:{r:!0,t:T},connect:{r:!0,t:M},direction:{r:!0,t:N},snap:{r:!1,t:P},animate:{r:!1,t:O},animationDuration:{r:!1,t:A},range:{r:!0,t:E},orientation:{r:!1,t:L},margin:{r:!1,t:I},limit:{r:!1,t:j},padding:{r:!1,t:D},behaviour:{r:!0,t:R},ariaFormat:{r:!1,t:z},format:{r:!1,t:B},tooltips:{r:!1,t:F},keyboardSupport:{r:!0,t:q},documentElement:{r:!1,t:H},cssPrefix:{r:!0,t:$},cssClasses:{r:!0,t:U},handleAttributes:{r:!1,t:V}},i={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:_,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};t.format&&!t.ariaFormat&&(t.ariaFormat=t.format),Object.keys(n).forEach((function(o){if(r(t[o])||void 0!==i[o])n[o].t(e,(r(t[o])?t:i)[o]);else if(n[o].r)throw new Error("noUiSlider: '"+o+"' is required.")})),e.pips=t.pips;var o=void 0!==(s=document.createElement("div")).style.msTransform,s=void 0!==s.style.transform;return e.transformRule=s?"transform":o?"msTransform":"webkitTransform",e.style=[["left","top"],["right","bottom"]][e.dir][e.ort],e}function G(e,o,u){var p,f,m,g,v,y,_,x=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},S=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}(),k=e,C=o.spectrum,E=[],T=[],P=[],O=0,A={},M=e.ownerDocument,L=o.documentElement||M.documentElement,I=M.body,j="rtl"===M.dir||1===o.ort?0:100;function D(t,e){var n=M.createElement("div");return e&&c(n,e),t.appendChild(n),n}function N(t,e){t=D(t,o.cssClasses.origin);var n,r=D(t,o.cssClasses.handle);return D(r,o.cssClasses.touchArea),r.setAttribute("data-handle",String(e)),o.keyboardSupport&&(r.setAttribute("tabindex","0"),r.addEventListener("keydown",(function(t){return function(t,e){if(V()||z(e))return!1;var n=["Left","Right"],r=["Down","Up"],i=["PageDown","PageUp"],s=["Home","End"];o.dir&&!o.ort?n.reverse():o.ort&&!o.dir&&(r.reverse(),i.reverse());var a=t.key.replace("Arrow",""),l=a===i[0],u=a===i[1];i=a===r[0]||a===n[0]||l,r=a===r[1]||a===n[1]||u,n=a===s[0],s=a===s[1];if(!(i||r||n||s))return!0;if(t.preventDefault(),r||i){var c=i?0:1;if(null===(c=pt(e)[c]))return!1;!1===c&&(c=C.getDefaultStep(T[e],i,o.keyboardDefaultStep)),c*=u||l?o.keyboardPageMultiplier:o.keyboardMultiplier,c=Math.max(c,1e-7),c*=i?-1:1,c=E[e]+c}else c=s?o.spectrum.xVal[o.spectrum.xVal.length-1]:o.spectrum.xVal[0];return lt(e,C.toStepping(c),!0,!0),nt("slide",e),nt("update",e),nt("change",e),nt("set",e),!1}(t,e)}))),void 0!==o.handleAttributes&&(n=o.handleAttributes[e],Object.keys(n).forEach((function(t){r.setAttribute(t,n[t])}))),r.setAttribute("role","slider"),r.setAttribute("aria-orientation",o.ort?"vertical":"horizontal"),0===e?c(r,o.cssClasses.handleLower):e===o.handles-1&&c(r,o.cssClasses.handleUpper),t}function R(t,e){return!!e&&D(t,o.cssClasses.connect)}function F(t,e){return!(!o.tooltips||!o.tooltips[e])&&D(t.firstChild,o.cssClasses.tooltip)}function V(){return k.hasAttribute("disabled")}function z(t){return f[t].hasAttribute("disabled")}function B(){v&&(et("update"+b),v.forEach((function(t){t&&n(t)})),v=null)}function q(){B(),v=f.map(F),tt("update"+b,(function(t,e,n){v&&o.tooltips&&!1!==v[e]&&(t=t[e],!0!==o.tooltips[e]&&(t=o.tooltips[e].to(n[e])),v[e].innerHTML=t)}))}function H(t,e){return t.map((function(t){return C.fromStepping(e?C.getStep(t):t)}))}function $(){g&&(n(g),g=null)}function U(e){$();var n=function(e){var n=function(e){if(e.mode===t.PipsMode.Range||e.mode===t.PipsMode.Steps)return C.xVal;if(e.mode!==t.PipsMode.Count)return e.mode===t.PipsMode.Positions?H(e.values,e.stepped):e.mode===t.PipsMode.Values?e.stepped?e.values.map((function(t){return C.fromStepping(C.getStep(C.toStepping(t)))})):e.values:[];if(e.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var n=e.values-1,r=100/n,i=[];n--;)i[n]=n*r;return i.push(100),H(i,e.stepped)}(e),r={},i=C.xVal[0],o=C.xVal[C.xVal.length-1],s=!1,a=!1,l=0;return(n=n.slice().sort((function(t,e){return t-e})).filter((function(t){return!this[t]&&(this[t]=!0)}),{}))[0]!==i&&(n.unshift(i),s=!0),n[n.length-1]!==o&&(n.push(o),a=!0),n.forEach((function(i,o){i=i;var u,c,d,h,p,f,m,g,v=n[o+1],y=e.mode===t.PipsMode.Steps,_=(_=y?C.xNumSteps[o]:_)||v-i;for(void 0===v&&(v=i),_=Math.max(_,1e-7),u=i;u<=v;u=Number((u+_).toFixed(7))){for(f=(h=(d=C.toStepping(u))-l)/(e.density||1),g=h/(m=Math.round(f)),c=1;c<=m;c+=1)r[(p=l+c*g).toFixed(5)]=[C.fromStepping(p),0];f=-1<n.indexOf(u)?t.PipsType.LargeValue:y?t.PipsType.SmallValue:t.PipsType.NoValue,!o&&s&&u!==v&&(f=0),u===v&&a||(r[d.toFixed(5)]=[u,f]),l=d}})),r}(e),r=e.filter;e=e.format||{to:function(t){return String(Math.round(t))}};return g=k.appendChild(function(e,n,r){var i,s=M.createElement("div"),a=((i={})[t.PipsType.None]="",i[t.PipsType.NoValue]=o.cssClasses.valueNormal,i[t.PipsType.LargeValue]=o.cssClasses.valueLarge,i[t.PipsType.SmallValue]=o.cssClasses.valueSub,i),l=((i={})[t.PipsType.None]="",i[t.PipsType.NoValue]=o.cssClasses.markerNormal,i[t.PipsType.LargeValue]=o.cssClasses.markerLarge,i[t.PipsType.SmallValue]=o.cssClasses.markerSub,i),u=[o.cssClasses.valueHorizontal,o.cssClasses.valueVertical],d=[o.cssClasses.markerHorizontal,o.cssClasses.markerVertical];function h(t,e){var n=e===o.cssClasses.value;return e+" "+(n?u:d)[o.ort]+" "+(n?a:l)[t]}return c(s,o.cssClasses.pips),c(s,0===o.ort?o.cssClasses.pipsHorizontal:o.cssClasses.pipsVertical),Object.keys(e).forEach((function(i){var a,l,u;l=e[a=i][0],u=e[i][1],(u=n?n(l,u):u)!==t.PipsType.None&&((i=D(s,!1)).className=h(u,o.cssClasses.marker),i.style[o.style]=a+"%",u>t.PipsType.NoValue&&((i=D(s,!1)).className=h(u,o.cssClasses.value),i.setAttribute("data-value",String(l)),i.style[o.style]=a+"%",i.innerHTML=String(r.to(l))))})),s}(n,r,e))}function G(){var t=p.getBoundingClientRect(),e="offset"+["Width","Height"][o.ort];return 0===o.ort?t.width||p[e]:t.height||p[e]}function Y(t,e,n,r){function i(i){var s,a=function(t,e,n){var r=0===t.type.indexOf("touch"),i=0===t.type.indexOf("mouse"),o=0===t.type.indexOf("pointer"),s=0,a=0;if(0===t.type.indexOf("MSPointer")&&(o=!0),"mousedown"===t.type&&!t.buttons&&!t.touches)return!1;if(r){var l=function(e){return(e=e.target)===n||n.contains(e)||t.composed&&t.composedPath().shift()===n};if("touchstart"===t.type){if(1<(r=Array.prototype.filter.call(t.touches,l)).length)return!1;s=r[0].pageX,a=r[0].pageY}else{if(!(l=Array.prototype.find.call(t.changedTouches,l)))return!1;s=l.pageX,a=l.pageY}}return e=e||h(M),(i||o)&&(s=t.clientX+e.x,a=t.clientY+e.y),t.pageOffset=e,t.points=[s,a],t.cursor=i||o,t}(i,r.pageOffset,r.target||e);return!!a&&!(V()&&!r.doNotReject)&&(s=k,i=o.cssClasses.tap,!((s.classList?s.classList.contains(i):new RegExp("\\b"+i+"\\b").test(s.className))&&!r.doNotReject)&&!(t===x.start&&void 0!==a.buttons&&1<a.buttons)&&(!r.hover||!a.buttons)&&(S||a.preventDefault(),a.calcPoint=a.points[o.ort],void n(a,r)))}var s=[];return t.split(" ").forEach((function(t){e.addEventListener(t,i,!!S&&{passive:!0}),s.push([t,i])})),s}function Z(t){var e,n,r=a(r=100*(t-(r=p,e=o.ort,n=r.getBoundingClientRect(),r=(t=r.ownerDocument).documentElement,t=h(t),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(t.x=0),e?n.top+t.y-r.clientTop:n.left+t.x-r.clientLeft))/G());return o.dir?100-r:r}function K(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&Q(t,e)}function X(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return Q(t,e);ot(0<(t=(o.dir?-1:1)*(t.calcPoint-e.startCalcPoint)),100*t/e.baseSize,e.locations,e.handleNumbers,e.connect)}function Q(t,e){e.handle&&(d(e.handle,o.cssClasses.active),--O),e.listeners.forEach((function(t){L.removeEventListener(t[0],t[1])})),0===O&&(d(k,o.cssClasses.drag),at(),t.cursor&&(I.style.cursor="",I.removeEventListener("selectstart",i))),e.handleNumbers.forEach((function(t){nt("change",t),nt("set",t),nt("end",t)}))}function J(t,e){var n,r,s,a;e.handleNumbers.some(z)||(1===e.handleNumbers.length&&(a=f[e.handleNumbers[0]].children[0],O+=1,c(a,o.cssClasses.active)),t.stopPropagation(),r=Y(x.move,L,X,{target:t.target,handle:a,connect:e.connect,listeners:n=[],startCalcPoint:t.calcPoint,baseSize:G(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:T.slice()}),s=Y(x.end,L,Q,{target:t.target,handle:a,listeners:n,doNotReject:!0,handleNumbers:e.handleNumbers}),a=Y("mouseout",L,K,{target:t.target,handle:a,listeners:n,doNotReject:!0,handleNumbers:e.handleNumbers}),n.push.apply(n,r.concat(s,a)),t.cursor&&(I.style.cursor=getComputedStyle(t.target).cursor,1<f.length&&c(k,o.cssClasses.drag),I.addEventListener("selectstart",i,!1)),e.handleNumbers.forEach((function(t){nt("start",t)})))}function tt(t,e){A[t]=A[t]||[],A[t].push(e),"update"===t.split(".")[0]&&f.forEach((function(t,e){nt("update",e)}))}function et(t){var e=t&&t.split(".")[0],n=e?t.substring(e.length):t;Object.keys(A).forEach((function(t){var r=t.split(".")[0],i=t.substring(r.length);e&&e!==r||n&&n!==i||((r=i)!==w&&r!==b||n===i)&&delete A[t]}))}function nt(t,e,n){Object.keys(A).forEach((function(r){var i=r.split(".")[0];t===i&&A[r].forEach((function(t){t.call(ft,E.map(o.format.to),e,E.slice(),n||!1,T.slice(),ft)}))}))}function rt(t,e,n,r,i,s){var l;return 1<f.length&&!o.events.unconstrained&&(r&&0<e&&(l=C.getAbsoluteDistance(t[e-1],o.margin,!1),n=Math.max(n,l)),i&&e<f.length-1&&(l=C.getAbsoluteDistance(t[e+1],o.margin,!0),n=Math.min(n,l))),1<f.length&&o.limit&&(r&&0<e&&(l=C.getAbsoluteDistance(t[e-1],o.limit,!1),n=Math.min(n,l)),i&&e<f.length-1&&(l=C.getAbsoluteDistance(t[e+1],o.limit,!0),n=Math.max(n,l))),o.padding&&(0===e&&(l=C.getAbsoluteDistance(0,o.padding[0],!1),n=Math.max(n,l)),e===f.length-1&&(l=C.getAbsoluteDistance(100,o.padding[1],!0),n=Math.min(n,l))),!((n=a(n=C.getStep(n)))===t[e]&&!s)&&n}function it(t,e){var n=o.ort;return(n?e:t)+", "+(n?t:e)}function ot(t,e,n,r,i){var o=n.slice(),s=r[0],a=[!t,t],l=[t,!t];r=r.slice(),t&&r.reverse(),1<r.length?r.forEach((function(t,n){!1===(n=rt(o,t,o[t]+e,a[n],l[n],!1))?e=0:(e=n-o[t],o[t]=n)})):a=l=[!0];var u=!1;r.forEach((function(t,r){u=lt(t,n[t]+e,a[r],l[r])||u})),u&&(r.forEach((function(t){nt("update",t),nt("slide",t)})),null!=i&&nt("drag",s))}function st(t,e){return o.dir?100-t-e:t}function at(){P.forEach((function(t){var e=50<T[t]?-1:1;e=3+(f.length+e*t);f[t].style.zIndex=String(e)}))}function lt(t,e,n,r,i){return!1!==(e=i?e:rt(T,t,e,n,r,!1))&&(e=e,T[t=t]=e,E[t]=C.fromStepping(e),e="translate("+it(st(e,0)-j+"%","0")+")",f[t].style[o.transformRule]=e,ut(t),ut(t+1),!0)}function ut(t){var e,n;m[t]&&(n=100,e="translate("+it(st(e=(e=0)!==t?T[t-1]:e,n=(n=t!==m.length-1?T[t]:n)-e)+"%","0")+")",n="scale("+it(n/100,"1")+")",m[t].style[o.transformRule]=e+" "+n)}function ct(t,e){return null===t||!1===t||void 0===t?T[e]:("number"==typeof t&&(t=String(t)),!1===(t=!1!==(t=o.format.from(t))?C.toStepping(t):t)||isNaN(t)?T[e]:t)}function dt(t,e,n){var r=l(t);t=void 0===T[0];e=void 0===e||e,o.animate&&!t&&s(k,o.cssClasses.tap,o.animationDuration),P.forEach((function(t){lt(t,ct(r[t],t),!0,!1,n)}));var i,a=1===P.length?0:1;for(t&&C.hasNoSize()&&(n=!0,T[0]=0,1<P.length&&(i=100/(P.length-1),P.forEach((function(t){T[t]=t*i}))));a<P.length;++a)P.forEach((function(t){lt(t,T[t],!0,!0,n)}));at(),P.forEach((function(t){nt("update",t),null!==r[t]&&e&&nt("set",t)}))}function ht(t){return(t=void 0!==t&&t)?1===E.length?E[0]:E.slice(0):1===(t=E.map(o.format.to)).length?t[0]:t}function pt(t){var e=T[t],n=C.getNearbySteps(e),r=E[t],i=n.thisStep.step;t=null;return o.snap?[r-n.stepBefore.startValue||null,n.stepAfter.startValue-r||null]:(!1!==i&&r+i>n.stepAfter.startValue&&(i=n.stepAfter.startValue-r),t=r>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&r-n.stepBefore.highestStep,100===e?i=null:0===e&&(t=null),e=C.countStepDecimals(),null!==i&&!1!==i&&(i=Number(i.toFixed(e))),[t=null!==t&&!1!==t?Number(t.toFixed(e)):t,i])}c(y=k,o.cssClasses.target),0===o.dir?c(y,o.cssClasses.ltr):c(y,o.cssClasses.rtl),0===o.ort?c(y,o.cssClasses.horizontal):c(y,o.cssClasses.vertical),c(y,"rtl"===getComputedStyle(y).direction?o.cssClasses.textDirectionRtl:o.cssClasses.textDirectionLtr),p=D(y,o.cssClasses.base),function(t,e){var n=D(e,o.cssClasses.connects);f=[],(m=[]).push(R(n,t[0]));for(var r=0;r<o.handles;r++)f.push(N(e,r)),P[r]=r,m.push(R(n,t[r+1]))}(o.connect,p),(_=o.events).fixed||f.forEach((function(t,e){Y(x.start,t.children[0],J,{handleNumbers:[e]})})),_.tap&&Y(x.start,p,(function(t){t.stopPropagation();var e,n,r,i=Z(t.calcPoint),a=(e=i,r=!(n=100),f.forEach((function(t,i){var o,s;z(i)||(o=T[i],((s=Math.abs(o-e))<n||s<=n&&o<e||100===s&&100===n)&&(r=i,n=s))})),r);!1!==a&&(o.events.snap||s(k,o.cssClasses.tap,o.animationDuration),lt(a,i,!0,!0),at(),nt("slide",a,!0),nt("update",a,!0),o.events.snap?J(t,{handleNumbers:[a]}):(nt("change",a,!0),nt("set",a,!0)))}),{}),_.hover&&Y(x.move,p,(function(t){t=Z(t.calcPoint),t=C.getStep(t);var e=C.fromStepping(t);Object.keys(A).forEach((function(t){"hover"===t.split(".")[0]&&A[t].forEach((function(t){t.call(ft,e)}))}))}),{hover:!0}),_.drag&&m.forEach((function(t,e){var n,r,i,s,a;!1!==t&&0!==e&&e!==m.length-1&&(n=f[e-1],r=f[e],i=[t],s=[n,r],a=[e-1,e],c(t,o.cssClasses.draggable),_.fixed&&(i.push(n.children[0]),i.push(r.children[0])),_.dragAll&&(s=f,a=P),i.forEach((function(e){Y(x.start,e,J,{handles:s,handleNumbers:a,connect:t})})))})),dt(o.start),o.pips&&U(o.pips),o.tooltips&&q(),et("update"+w),tt("update"+w,(function(t,e,n,r,i){P.forEach((function(t){var e=f[t],r=rt(T,t,0,!0,!0,!0),s=rt(T,t,100,!0,!0,!0),a=i[t];t=String(o.ariaFormat.to(n[t])),r=C.fromStepping(r).toFixed(1),s=C.fromStepping(s).toFixed(1),a=C.fromStepping(a).toFixed(1);e.children[0].setAttribute("aria-valuemin",r),e.children[0].setAttribute("aria-valuemax",s),e.children[0].setAttribute("aria-valuenow",a),e.children[0].setAttribute("aria-valuetext",t)}))}));var ft={destroy:function(){for(et(w),et(b),Object.keys(o.cssClasses).forEach((function(t){d(k,o.cssClasses[t])}));k.firstChild;)k.removeChild(k.firstChild);delete k.noUiSlider},steps:function(){return P.map(pt)},on:tt,off:et,get:ht,set:dt,setHandle:function(t,e,n,r){if(!(0<=(t=Number(t))&&t<P.length))throw new Error("noUiSlider: invalid handle number, got: "+t);lt(t,ct(e,t),!0,!0,r),nt("update",t),n&&nt("set",t)},reset:function(t){dt(o.start,t)},__moveHandles:function(t,e,n){ot(t,e,T,n)},options:u,updateOptions:function(t,e){var n=ht(),i=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];i.forEach((function(e){void 0!==t[e]&&(u[e]=t[e])}));var s=W(u);i.forEach((function(e){void 0!==t[e]&&(o[e]=s[e])})),C=s.spectrum,o.margin=s.margin,o.limit=s.limit,o.padding=s.padding,o.pips?U(o.pips):$(),(o.tooltips?q:B)(),T=[],dt(r(t.start)?t.start:n,e)},target:k,removePips:$,removeTooltips:B,getPositions:function(){return T.slice()},getTooltips:function(){return v},getOrigins:function(){return f},pips:U};return ft}function Y(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");return e=G(t,W(e),e),t.noUiSlider=e}var Z={__spectrum:g,cssClasses:_,create:Y};t.create=Y,t.cssClasses=_,t.default=Z,Object.defineProperty(t,"__esModule",{value:!0})})),appear=function(){"use strict";var t=null,e=0,n={};return addEventListener("scroll",(function(){var r=window.scrollY||window.pageYOffset;null!=t&&(n.velocity=r-t,n.delta=n.velocity>=0?n.velocity:-1*n.velocity),t=r,e&&clearTimeout(e),e=setTimeout((function(){t=null}),30)}),!1),function(t){return function(){function t(){n.delta<m.delta.speed&&(l||(l=!0,i(),setTimeout((function(){l=!1}),m.delta.timeout))),function(t,e){return function(){var n=this,r=arguments;clearTimeout(a),a=setTimeout((function(){t.apply(n,r)}),e)}}((function(){i()}),m.debounce)()}function e(){i(),addEventListener("scroll",t,!1),addEventListener("resize",t,!1)}function r(){removeEventListener("scroll",t,!1),removeEventListener("resize",t,!1)}function i(){u||(d.forEach((function(t,e){t&&function(t,e){var n=t.getBoundingClientRect();return n.top+n.height>=0&&n.left+n.width>=0&&n.bottom-n.height<=(window.innerHeight||document.documentElement.clientHeight)+e&&n.right-n.width<=(window.innerWidth||document.documentElement.clientWidth)+e}(t,m.bounds)?h[e]&&(h[e]=!1,p++,m.appear&&m.appear(t),m.disappear||m.reappear||(d[e]=null)):(!1===h[e]&&(m.disappear&&m.disappear(t),f++,m.reappear||(d[e]=null)),h[e]=!0)})),m.reappear||m.appear&&(!m.appear||p!==s)||m.disappear&&(!m.disappear||f!==s)||(u=!0,r(),m.done&&m.done()))}function o(){var t;if(!c&&(c=!0,m.init&&m.init(),t="function"==typeof m.elements?m.elements():m.elements)){s=t.length;for(var n=0;s>n;n+=1)d.push(t[n]),h.push(!0);e()}}var s,a,l,u,c=!1,d=[],h=[],p=0,f=0,m={};return function(t){return m={init:(t=t||{}).init,elements:t.elements,appear:t.appear,disappear:t.disappear,done:t.done,reappear:t.reappear,bounds:t.bounds||0,debounce:t.debounce||50,delta:{speed:t.deltaSpeed||50,timeout:t.deltaTimeout||500}},addEventListener("DOMContentLoaded",o,!1),("complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState)&&o(),{trigger:function(){i()},pause:function(){r()},resume:function(){e()},destroy:function(){d=[],a&&clearTimeout(a),r()}}}}()(t)}}(),function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define([],e):t.Circles=e()}(this,(function(){"use strict";var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)},e=function(t){var e=t.id;if(this._el=document.getElementById(e),null!==this._el){this._radius=t.radius||10,this._duration=void 0===t.duration?500:t.duration,this._value=1e-7,this._maxValue=t.maxValue||100,this._text=void 0===t.text?function(t){return this.htmlifyNumber(t)}:t.text,this._strokeWidth=t.width||10,this._colors=t.colors||["#EEE","#F00"],this._svg=null,this._movingPath=null,this._wrapContainer=null,this._textContainer=null,this._wrpClass=t.wrpClass||"circles-wrp",this._textClass=t.textClass||"circles-text",this._valClass=t.valueStrokeClass||"circles-valueStroke",this._maxValClass=t.maxValueStrokeClass||"circles-maxValueStroke",this._styleWrapper=!1!==t.styleWrapper,this._styleText=!1!==t.styleText;var n=Math.PI/180*270;this._start=-Math.PI/180*90,this._startPrecise=this._precise(this._start),this._circ=n-this._start,this._generate().update(t.value||0)}};return e.prototype={VERSION:"0.0.6",_generate:function(){return this._svgSize=2*this._radius,this._radiusAdjusted=this._radius-this._strokeWidth/2,this._generateSvg()._generateText()._generateWrapper(),this._el.innerHTML="",this._el.appendChild(this._wrapContainer),this},_setPercentage:function(t){this._movingPath.setAttribute("d",this._calculatePath(t,!0)),this._textContainer.innerHTML=this._getText(this.getValueFromPercent(t))},_generateWrapper:function(){return this._wrapContainer=document.createElement("div"),this._wrapContainer.className=this._wrpClass,this._styleWrapper&&(this._wrapContainer.style.position="relative",this._wrapContainer.style.display="inline-block"),this._wrapContainer.appendChild(this._svg),this._wrapContainer.appendChild(this._textContainer),this},_generateText:function(){if(this._textContainer=document.createElement("div"),this._textContainer.className=this._textClass,this._styleText){var t={position:"absolute",top:0,left:0,textAlign:"center",width:"100%",fontSize:.7*this._radius+"px",height:this._svgSize+"px",lineHeight:this._svgSize+"px"};for(var e in t)this._textContainer.style[e]=t[e]}return this._textContainer.innerHTML=this._getText(0),this},_getText:function(t){return this._text?(void 0===t&&(t=this._value),t=parseFloat(t.toFixed(2)),"function"==typeof this._text?this._text.call(this,t):this._text):""},_generateSvg:function(){return this._svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._svg.setAttribute("xmlns","http://www.w3.org/2000/svg"),this._svg.setAttribute("width",this._svgSize),this._svg.setAttribute("height",this._svgSize),this._generatePath(100,!1,this._colors[0],this._maxValClass)._generatePath(1,!0,this._colors[1],this._valClass),this._movingPath=this._svg.getElementsByTagName("path")[1],this},_generatePath:function(t,e,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("fill","transparent"),i.setAttribute("stroke",n),i.setAttribute("stroke-width",this._strokeWidth),i.setAttribute("d",this._calculatePath(t,e)),i.setAttribute("class",r),this._svg.appendChild(i),this},_calculatePath:function(t,e){var n=this._start+t/100*this._circ,r=this._precise(n);return this._arc(r,e)},_arc:function(t,e){var n=t-.001,r=t-this._startPrecise<Math.PI?0:1;return["M",this._radius+this._radiusAdjusted*Math.cos(this._startPrecise),this._radius+this._radiusAdjusted*Math.sin(this._startPrecise),"A",this._radiusAdjusted,this._radiusAdjusted,0,r,1,this._radius+this._radiusAdjusted*Math.cos(n),this._radius+this._radiusAdjusted*Math.sin(n),e?"":"Z"].join(" ")},_precise:function(t){return Math.round(1e3*t)/1e3},htmlifyNumber:function(t,e,n){e=e||"circles-integer",n=n||"circles-decimals";var r=(t+"").split("."),i='<span class="'+e+'">'+r[0]+"</span>";return r.length>1&&(i+='.<span class="'+n+'">'+r[1].substring(0,2)+"</span>"),i},updateRadius:function(t){return this._radius=t,this._generate().update(!0)},updateWidth:function(t){return this._strokeWidth=t,this._generate().update(!0)},updateColors:function(t){this._colors=t;var e=this._svg.getElementsByTagName("path");return e[0].setAttribute("stroke",t[0]),e[1].setAttribute("stroke",t[1]),this},getPercent:function(){return 100*this._value/this._maxValue},getValueFromPercent:function(t){return this._maxValue*t/100},getValue:function(){return this._value},getMaxValue:function(){return this._maxValue},update:function(e,n){if(!0===e)return this._setPercentage(this.getPercent()),this;if(this._value==e||isNaN(e))return this;void 0===n&&(n=this._duration);var r,i,o,s,a=this,l=a.getPercent(),u=1;return this._value=Math.min(this._maxValue,Math.max(0,e)),n?(r=a.getPercent(),i=r>l,u+=r%1,o=Math.floor(Math.abs(r-l)/u),s=n/o,function e(n){if(i?l+=u:l-=u,i&&l>=r||!i&&l<=r)t((function(){a._setPercentage(r)}));else{t((function(){a._setPercentage(l)}));var o=Date.now(),c=o-n;c>=s?e(o):setTimeout((function(){e(Date.now())}),s-c)}}(Date.now()),this):(this._setPercentage(this.getPercent()),this)}},e.create=function(t){return new e(t)},e})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSVideoBg=e():t.HSVideoBg=e()}(window,(function(){return d={"./src/js/hs-video-bg.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return HSVideoBg; });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./src/js/utils/index.js\");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n* HSVideoBg Plugin\n* @version: 3.0.0 (Wed, 17 Mar 2021)\n* @author: HtmlStream\n* @event-namespace: .HSVideoBg\n* @license: Htmlstream Libraries (https://htmlstream.com/)\n* Copyright 2021 Htmlstream\n*/\n\n\nvar HSVideoBg = /*#__PURE__*/function () {\n function HSVideoBg(el, settings) {\n _classCallCheck(this, HSVideoBg);\n\n this.$el = typeof el === \"string\" ? document.querySelector(el) : el;\n this.defaults = {\n type: 'default',\n videoId: null,\n isLoop: true,\n ratio: 1.5\n };\n this.dataSettings = this.$el.hasAttribute('data-hs-video-bg-options') ? JSON.parse(this.$el.getAttribute('data-hs-video-bg-options')) : {};\n this.settings = Object.assign({}, this.defaults, this.dataSettings, settings);\n }\n\n _createClass(HSVideoBg, [{\n key: \"init\",\n value: function init() {\n var _this = this;\n\n this._prepareObject();\n\n if (this.settings.type === 'you-tube') {\n this._APICreating('//www.youtube.com/player_api', 'YT', 'YTDetect').then(function () {\n var newYT;\n\n if (typeof window.onYouTubeIframeAPIReady === 'function') {\n setTimeout(function () {\n newYT = new YT.Player(_this.$el.querySelector('.hs-video-bg-video > div'), {\n videoId: _this.settings.videoId,\n playerVars: {\n autoplay: true,\n controls: 0,\n showinfo: 0,\n enablejsapi: 1,\n modestbranding: 1,\n iv_load_policy: 3,\n loop: _this.settings.isLoop,\n playlist: _this.settings.videoId,\n origin: window.location.origin\n },\n events: {\n onReady: function onReady(e) {\n e.target.mute();\n\n _this._ratioCalc();\n\n window.addEventListener('resize', function () {\n _this._ratioCalc();\n });\n Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"fadeOut\"])(_this.$el.querySelector('.hs-video-bg-preview'), 400);\n }\n }\n });\n }, 100);\n } else {\n window.onYouTubeIframeAPIReady = function () {\n newYT = new YT.Player(_this.$el.querySelector('.hs-video-bg-video > div'), {\n videoId: _this.settings.videoId,\n playerVars: {\n autoplay: true,\n controls: 0,\n showinfo: 0,\n enablejsapi: 1,\n modestbranding: 1,\n iv_load_policy: 3,\n loop: _this.settings.isLoop,\n playlist: _this.settings.videoId,\n origin: window.location.origin\n },\n events: {\n onReady: function onReady(e) {\n e.target.mute();\n\n _this._ratioCalc();\n\n window.addEventListener('resize', function () {\n _this._ratioCalc();\n });\n Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"fadeOut\"])(_this.$el.querySelector('.hs-video-bg-preview'), 400);\n }\n }\n });\n };\n }\n });\n } else if (this.settings.type === 'vimeo') {\n this._APICreating('//player.vimeo.com/api/player.js', 'Vimeo', 'VimeoDetect').then(function () {\n var newVimeo = new Vimeo.Player(_this.$el.querySelector('.hs-video-bg-video'), {\n id: _this.settings.videoId,\n loop: _this.settings.isLoop,\n title: false,\n portrait: false,\n byline: false,\n autoplay: true,\n autopause: false,\n muted: true\n });\n newVimeo.play().then(function () {\n _this._ratioCalc();\n\n window.addEventListener('resize', function () {\n _this._ratioCalc();\n });\n Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"fadeOut\"])(_this.$el.querySelector('.hs-video-bg-preview'), 400);\n });\n });\n } else {\n window.addEventListener('resize', function () {\n _this._ratioCalc();\n });\n setTimeout(function () {\n _this._ratioCalc();\n });\n }\n }\n }, {\n key: \"_prepareObject\",\n value: function _prepareObject() {\n var _this2 = this;\n\n this.$el.style.position = 'relative';\n\n if (this.settings.type === 'you-tube') {\n this.$el.insertAdjacentHTML('beforeend', '<div class=\"hs-video-bg-video\"><div></div></div>');\n } else if (this.settings.type === 'vimeo') {\n this.$el.insertAdjacentHTML('beforeend', '<div class=\"hs-video-bg-video\"></div>');\n } else {\n this.$el.insertAdjacentHTML('beforeend', \"\\n\\t\\t\\t\\t<div class=\\\"hs-video-bg-video\\\">\\n\\t\\t\\t\\t\\t<video poster=\\\"\\\" autoplay muted \".concat(this.settings.isLoop ? 'loop' : '', \">\\n\\t\\t\\t\\t\\t\\t<source src=\\\"\").concat(this.settings.videoId, \".mp4\\\" type=\\\"video/mp4\\\">\\n\\t\\t\\t\\t\\t\\t<source src=\\\"\").concat(this.settings.videoId, \".webm\\\" type=\\\"video/webm\\\">\\n\\t\\t\\t\\t\\t\\t<source src=\\\"\").concat(this.settings.videoId, \".ogv\\\" type=\\\"video/ogg\\\">\\n\\t\\t\\t\\t\\t\\tYour browser doesn't support HTML5 video.\\n\\t\\t\\t\\t\\t</video>\\n </div>\\n\\t\\t\\t\"));\n }\n\n if (this.settings.type === 'you-tube') {\n this.$el.insertAdjacentHTML('beforeend', \"<div class=\\\"hs-video-bg-preview\\\" style=\\\"background-image: url(//img.youtube.com/vi/\".concat(this.settings.videoId, \"/maxresdefault.jpg);\\\"></div>\"));\n } else if (this.settings.type === 'vimeo') {\n fetch(\"//www.vimeo.com/api/v2/video/\".concat(this.settings.videoId, \".json?callback=?\")).then(function (data) {\n _this2.$el.insertAdjacentHTML('beforeend', \"<div class=\\\"hs-video-bg-preview\\\" style=\\\"background-image: url(\".concat(data[0].thumbnail_large, \");\\\"></div>\"));\n });\n } else {\n return false;\n }\n }\n }, {\n key: \"_ratioCalc\",\n value: function _ratioCalc() {\n var _ratio = this.$el.clientWidth / this.$el.clientHeight;\n\n var $videoBg = this.$el.querySelector('.hs-video-bg-video');\n if (!$videoBg) return false;\n\n if (this.settings.type === 'you-tube' || this.settings.type === 'vimeo') {\n if (this.$el.clientHeight < this.$el.clientWidth && window.innerWidth > 768) {\n $videoBg.style.width = _ratio * this.$el.clientWidth * this.settings.ratio;\n $videoBg.style.height = _ratio * this.$el.clientHeight * this.settings.ratio;\n } else {\n $videoBg.style.width = _ratio * this.$el.clientWidth;\n $videoBg.style.height = '130%';\n }\n }\n }\n }, {\n key: \"_APICreating\",\n value: function _APICreating(scriptUrl, globalName, globalNameDetect) {\n if (window[globalNameDetect]) {\n return Promise.resolve();\n }\n\n return new Promise(function (resolve, reject) {\n var script = document.createElement('script'),\n before = document.querySelector('script');\n script.src = scriptUrl;\n before.parentNode.insertBefore(script, before);\n\n script.onload = function () {\n !globalName || window[globalName] ? resolve() : reject(Error('window.' + globalName + ' undefined'));\n };\n\n script.onerror = function () {\n reject(Error('Error loading ' + globalName || false));\n };\n });\n }\n }]);\n\n return HSVideoBg;\n}();\n\n\n\n//# sourceURL=webpack://HSVideoBg/./src/js/hs-video-bg.js?")},"./src/js/utils/index.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fadeOut\", function() { return fadeOut; });\nfunction fadeOut(el, time) {\n if (!el || el.offsetParent === null) return el;\n\n if (!time) {\n return el.style.display = 'none';\n }\n\n var intervalID = setInterval(function () {\n if (!el.style.opacity) {\n el.style.opacity = 1;\n }\n\n if (el.style.opacity > 0) {\n el.style.opacity -= 0.1;\n } else {\n clearInterval(intervalID);\n el.style.display = 'none';\n }\n }, time / 10);\n}\n\n//# sourceURL=webpack://HSVideoBg/./src/js/utils/index.js?")}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-video-bg.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSToggleSwitch=e():t.HSToggleSwitch=e()}(window,(function(){return d={"./node_modules/countup.js/dist/countUp.min.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CountUp", function() { return CountUp; });\nvar __assign=undefined&&undefined.__assign||function(){return(__assign=Object.assign||function(t){for(var i,a=1,s=arguments.length;a<s;a++)for(var n in i=arguments[a])Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);return t}).apply(this,arguments)},CountUp=function(){function t(t,i,a){var s=this;this.target=t,this.endVal=i,this.options=a,this.version="2.0.7",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:""},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.count=function(t){s.startTime||(s.startTime=t);var i=t-s.startTime;s.remaining=s.duration-i,s.useEasing?s.countDown?s.frameVal=s.startVal-s.easingFn(i,0,s.startVal-s.endVal,s.duration):s.frameVal=s.easingFn(i,s.startVal,s.endVal-s.startVal,s.duration):s.countDown?s.frameVal=s.startVal-(s.startVal-s.endVal)*(i/s.duration):s.frameVal=s.startVal+(s.endVal-s.startVal)*(i/s.duration),s.countDown?s.frameVal=s.frameVal<s.endVal?s.endVal:s.frameVal:s.frameVal=s.frameVal>s.endVal?s.endVal:s.frameVal,s.frameVal=Number(s.frameVal.toFixed(s.options.decimalPlaces)),s.printValue(s.frameVal),i<s.duration?s.rAF=requestAnimationFrame(s.count):null!==s.finalEndVal?s.update(s.finalEndVal):s.callback&&s.callback()},this.formatNumber=function(t){var i,a,n,e,r,o=t<0?"-":"";if(i=Math.abs(t).toFixed(s.options.decimalPlaces),n=(a=(i+="").split("."))[0],e=a.length>1?s.options.decimal+a[1]:"",s.options.useGrouping){r="";for(var l=0,h=n.length;l<h;++l)0!==l&&l%3==0&&(r=s.options.separator+r),r=n[h-l-1]+r;n=r}return s.options.numerals&&s.options.numerals.length&&(n=n.replace(/[0-9]/g,function(t){return s.options.numerals[+t]}),e=e.replace(/[0-9]/g,function(t){return s.options.numerals[+t]})),o+s.options.prefix+n+e+s.options.suffix},this.easeOutExpo=function(t,i,a,s){return a*(1-Math.pow(2,-10*t/s))*1024/1023+i},this.options=__assign(__assign({},this.defaults),a),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(i),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el="string"==typeof t?document.getElementById(t):t,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined"}return t.prototype.determineDirectionAndSmartEasing=function(){var t=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>t;var i=t-this.startVal;if(Math.abs(i)>this.options.smartEasingThreshold){this.finalEndVal=t;var a=this.countDown?1:-1;this.endVal=t+a*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=t,this.finalEndVal=null;this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},t.prototype.start=function(t){this.error||(this.callback=t,this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},t.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},t.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},t.prototype.update=function(t){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(t),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,this.finalEndVal||this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},t.prototype.printValue=function(t){var i=this.formattingFn(t);"INPUT"===this.el.tagName?this.el.value=i:"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=i:this.el.innerHTML=i},t.prototype.ensureNumber=function(t){return"number"==typeof t&&!isNaN(t)},t.prototype.validateValue=function(t){var i=Number(t);return this.ensureNumber(i)?i:(this.error="[CountUp] invalid start or end value: "+t,null)},t.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},t}();\n\n//# sourceURL=webpack://HSToggleSwitch/./node_modules/countup.js/dist/countUp.min.js?')},"./src/js/hs-toggle-switch.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSToggleSwitch; });\n/* harmony import */ var countup_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! countup.js */ "./node_modules/countup.js/dist/countUp.min.js");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n* HSToggleSwitch Plugin\n* @version: 1.0.0 (Mon, 12 Dec 2019)\n* @requires: countup.js v2.0.4\n* @author: HtmlStream\n* @event-namespace: .HSToggleSwitch\n* @license: Htmlstream Libraries (https://htmlstream.com/)\n* Copyright 2019 Htmlstream\n*/\n\nvar dataAttributeName = \'data-hs-toggle-switch-options\';\nvar dataAttributeItemName = \'data-hs-toggle-switch-item-options\';\nvar defaults = {\n mode: \'toggle-count\',\n targetSelector: undefined,\n isChecked: false,\n eventType: \'change\'\n};\n\nvar HSToggleSwitch = /*#__PURE__*/function () {\n function HSToggleSwitch(el, options, id) {\n _classCallCheck(this, HSToggleSwitch);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(HSToggleSwitch, [{\n key: "_init",\n value: function _init() {\n var that = this;\n\n var _loop = function _loop(i) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty(\'$initializedEl\')) {\n return "continue";\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options;\n _options.isChecked = _$el.checked;\n _options.$targets = document.querySelectorAll(_options.targetSelector);\n\n if (_options.mode === \'toggle-count\') {\n if (_options.isChecked) {\n _options.isChecked = true;\n\n _options.$targets.forEach(function ($target) {\n var currentDataSettings = $target.hasAttribute(dataAttributeItemName) ? JSON.parse($target.getAttribute(dataAttributeItemName)) : {};\n $target.innerHTML = currentDataSettings.max;\n });\n }\n\n _$el.addEventListener(_options.eventType, function () {\n return that._toggleCount(_options);\n });\n }\n };\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var _ret = _loop(i);\n\n if (_ret === "continue") continue;\n }\n } // Toggle Count\n\n }, {\n key: "_toggleCount",\n value: function _toggleCount(settings) {\n if (settings.isChecked) {\n this._countDownEach(settings);\n } else {\n this._countUpEach(settings);\n }\n }\n }, {\n key: "_countUpEach",\n value: function _countUpEach(settings) {\n var _this = this;\n\n settings.isChecked = true;\n settings.$targets.forEach(function ($target) {\n var currentDataSettings = $target.hasAttribute(dataAttributeItemName) ? JSON.parse($target.getAttribute(dataAttributeItemName)) : {};\n var currentDefaults = {\n duration: .5,\n useEasing: false\n },\n currentOptions = {};\n currentOptions = Object.assign({}, currentDefaults, currentDataSettings);\n\n _this._countUp($target, currentOptions);\n });\n }\n }, {\n key: "_countDownEach",\n value: function _countDownEach(settings) {\n var _this2 = this;\n\n settings.isChecked = false;\n settings.$targets.forEach(function ($target) {\n var currentDataSettings = $target.hasAttribute(dataAttributeItemName) ? JSON.parse($target.getAttribute(dataAttributeItemName)) : {};\n var currentDefaults = {\n duration: .5,\n useEasing: false\n },\n currentOptions = {};\n currentOptions = Object.assign({}, currentDefaults, currentDataSettings);\n\n _this2._countDown($target, currentOptions);\n });\n }\n }, {\n key: "_countUp",\n value: function _countUp(el, data) {\n var defaults = {\n startVal: data.min\n };\n var options = Object.assign({}, defaults, data);\n var countUp = new countup_js__WEBPACK_IMPORTED_MODULE_0__["CountUp"](el, data.max, options);\n countUp.start();\n }\n }, {\n key: "_countDown",\n value: function _countDown(el, data) {\n var defaults = {\n startVal: data.max\n };\n var options = Object.assign({}, defaults, data);\n var countUp = new countup_js__WEBPACK_IMPORTED_MODULE_0__["CountUp"](el, data.min, options);\n countUp.start();\n }\n }, {\n key: "addToCollection",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: Object.assign({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: "getItem",\n value: function getItem(item) {\n if (typeof item === \'number\') {\n return this.collection[item].$initializedEl;\n } else {\n return this.collection.find(function (el) {\n return el.id === item;\n }).$initializedEl;\n }\n }\n }]);\n\n return HSToggleSwitch;\n}();\n\n\n\n//# sourceURL=webpack://HSToggleSwitch/./src/js/hs-toggle-switch.js?')}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-toggle-switch.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSScrollspy=e():t.HSScrollspy=e()}(window,(function(){return d={"./src/js/hs-scrollspy.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSScrollspy; });\nfunction _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\r\n* HSScrollspy Plugin\r\n* @version: 1.0.0 (Wed, 24 Nov 2021)\r\n* @author: HtmlStream\r\n* @event-namespace: .HSScrollspy\r\n* @license: Htmlstream Libraries (https://htmlstream.com/)\r\n* Copyright 2021 Htmlstream\r\n*/\nvar HSScrollspy = /*#__PURE__*/function () {\n function HSScrollspy(elem, settings) {\n _classCallCheck(this, HSScrollspy);\n\n this.$el = typeof elem === \'string\' ? document.querySelector(elem) : elem;\n this.defaults = {\n disableCollapse: null,\n scrollOffset: 0,\n collapsibleNav: null,\n resolutionsList: {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n },\n resetOffset: null,\n breakpoint: \'lg\',\n scrollspyContainer: document.body\n };\n this.dataSettings = this.$el.hasAttribute(\'data-hs-scrollspy-options\') ? JSON.parse(this.$el.getAttribute(\'data-hs-scrollspy-options\')) : {}, this.settings = Object.assign({}, this.defaults, this.dataSettings, settings);\n this.init();\n }\n\n _createClass(HSScrollspy, [{\n key: "init",\n value: function init() {\n var _this = this;\n\n this.scrollSpyInstance = bootstrap.ScrollSpy.getInstance(this.settings.scrollspyContainer);\n var nav = _typeof(this.scrollSpyInstance._config.target) === \'object\' ? this.scrollSpyInstance._config.target : document.querySelector(this.scrollSpyInstance._config.target);\n\n if (this.settings.disableCollapse === null && this.$el.classList.contains(\'collapse\')) {\n this.settings.disableCollapse = false;\n }\n\n nav.addEventListener(\'click\', function (e) {\n if (!e.target.closest(\'a:not([href="#"]):not([href="#0"])\')) return;\n e.preventDefault();\n\n if (_this.settings.disableCollapse === false && window.innerWidth < _this.settings.resolutionsList[_this.settings.breakpoint]) {\n new bootstrap.Collapse(_this.$el).hide();\n return _this.$el.addEventListener(\'hidden.bs.collapse\', function () {\n _this.smoothScroll(e);\n });\n } else {\n _this.smoothScroll(e);\n }\n });\n }\n }, {\n key: "smoothScroll",\n value: function smoothScroll(e) {\n var offset = this.settings.resetOffset && window.innerWidth < this.settings.resolutionsList[this.settings.resetOffset] ? 0 : this.scrollSpyInstance._config.offset;\n window.scroll({\n top: document.querySelector(e.target.hash).offsetTop - offset - this.settings.scrollOffset,\n left: 0,\n behavior: \'smooth\'\n });\n }\n }]);\n\n return HSScrollspy;\n}();\n\n\n\n//# sourceURL=webpack://HSScrollspy/./src/js/hs-scrollspy.js?')}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-scrollspy.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),function(t,e){"object"==typeof exports&&void 0!==module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.L={})}(this,(function(t){"use strict";function e(t){for(var e,n,r=1,i=arguments.length;r<i;r++)for(e in n=arguments[r])t[e]=n[e];return t}var n=Object.create||function(t){return r.prototype=t,new r};function r(){}function i(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var r=n.call(arguments,2);return function(){return t.apply(e,r.length?r.concat(n.call(arguments)):arguments)}}var o=0;function s(t){return t._leaflet_id=t._leaflet_id||++o,t._leaflet_id}function a(t,e,n){var r,i,o=function(){r=!1,i&&(s.apply(n,i),i=!1)},s=function(){r?i=arguments:(t.apply(n,arguments),setTimeout(o,e),r=!0)};return s}function l(t,e,n){var r=e[1],i=e[0],o=r-i;return t===r&&n?t:((t-i)%o+o)%o+i}function u(){return!1}function c(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function d(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function h(t){return d(t).split(/\s+/)}function p(t,e){for(var r in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?n(t.options):{}),e)t.options[r]=e[r];return t.options}function f(t,e,n){var r=[];for(var i in t)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(t[i]));return(e&&-1!==e.indexOf("?")?"&":"?")+r.join("&")}var m=/\{ *([\w_-]+) *\}/g;function g(t,e){return t.replace(m,(function(t,n){var r=e[n];if(void 0===r)throw new Error("No value provided for variable "+t);return"function"==typeof r&&(r=r(e)),r}))}var v=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var _="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var S=window.requestAnimationFrame||b("RequestAnimationFrame")||x,k=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,e,n){if(!n||S!==x)return S.call(window,i(t,e));t.call(e)}function E(t){t&&k.call(window,t)}var T={extend:e,create:n,bind:i,lastId:o,stamp:s,throttle:a,wrapNum:l,falseFn:u,formatNum:c,trim:d,splitWords:h,setOptions:p,getParamString:f,template:g,isArray:v,indexOf:y,emptyImageUrl:_,requestFn:S,cancelFn:k,requestAnimFrame:C,cancelAnimFrame:E};function P(){}P.extend=function(t){function r(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var i=r.__super__=this.prototype,o=n(i);for(var s in(o.constructor=r).prototype=o,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(r[s]=this[s]);return t.statics&&(e(r,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=v(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),e.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=e(n(o.options),t.options)),e(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},r},P.include=function(t){return e(this.prototype,t),this},P.mergeOptions=function(t){return e(this.prototype.options,t),this},P.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var O={on:function(t,e,n){if("object"==typeof t)for(var r in t)this._on(r,t[r],e);else for(var i=0,o=(t=h(t)).length;i<o;i++)this._on(t[i],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var r in t)this._off(r,t[r],e);else for(var i=0,o=(t=h(t)).length;i<o;i++)this._off(t[i],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var r=this._events[t];r||(r=[],this._events[t]=r),n===this&&(n=void 0);for(var i={fn:e,ctx:n},o=r,s=0,a=o.length;s<a;s++)if(o[s].fn===e&&o[s].ctx===n)return;o.push(i)},_off:function(t,e,n){var r,i,o;if(this._events&&(r=this._events[t]))if(e){if(n===this&&(n=void 0),r)for(i=0,o=r.length;i<o;i++){var s=r[i];if(s.ctx===n&&s.fn===e)return s.fn=u,this._firingCount&&(this._events[t]=r=r.slice()),void r.splice(i,1)}}else{for(i=0,o=r.length;i<o;i++)r[i].fn=u;delete this._events[t]}},fire:function(t,n,r){if(!this.listens(t,r))return this;var i=e({},n,{type:t,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,a=o.length;s<a;s++){var l=o[s];l.fn.call(l.ctx||this,i)}this._firingCount--}}return r&&this._propagateEvent(i),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var r in t)this.once(r,t[r],e);return this}var o=i((function(){this.off(t,e,n).off(t,o,n)}),this);return this.on(t,e,n).on(t,o,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var n in this._eventParents)this._eventParents[n].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};O.addEventListener=O.on,O.removeEventListener=O.clearAllEventListeners=O.off,O.addOneTimeEventListener=O.once,O.fireEvent=O.fire,O.hasEventListeners=O.listens;var A=P.extend(O);function M(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var I=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function j(t,e,n){return t instanceof M?t:v(t)?new M(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new M(t.x,t.y):new M(t,e,n)}function D(t,e){if(t)for(var n=e?[t,e]:t,r=0,i=n.length;r<i;r++)this.extend(n[r])}function N(t,e){return!t||t instanceof D?t:new D(t,e)}function R(t,e){if(t)for(var n=e?[t,e]:t,r=0,i=n.length;r<i;r++)this.extend(n[r])}function F(t,e){return t instanceof R?t:new R(t,e)}function V(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function z(t,e,n){return t instanceof V?t:v(t)&&"object"!=typeof t[0]?3===t.length?new V(t[0],t[1],t[2]):2===t.length?new V(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new V(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new V(t,e,n)}M.prototype={clone:function(){return new M(this.x,this.y)},add:function(t){return this.clone()._add(j(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(j(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new M(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new M(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=I(this.x),this.y=I(this.y),this},distanceTo:function(t){var e=(t=j(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=j(t)).x===this.x&&t.y===this.y},contains:function(t){return t=j(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},D.prototype={extend:function(t){return t=j(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new M((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new M(this.min.x,this.max.y)},getTopRight:function(){return new M(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t=("number"==typeof t[0]||t instanceof M?j:N)(t))instanceof D?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,n=this.max,r=t.min,i=t.max,o=i.x>=e.x&&r.x<=n.x,s=i.y>=e.y&&r.y<=n.y;return o&&s},overlaps:function(t){t=N(t);var e=this.min,n=this.max,r=t.min,i=t.max,o=i.x>e.x&&r.x<n.x,s=i.y>e.y&&r.y<n.y;return o&&s},isValid:function(){return!(!this.min||!this.max)}},R.prototype={extend:function(t){var e,n,r=this._southWest,i=this._northEast;if(t instanceof V)n=e=t;else{if(!(t instanceof R))return t?this.extend(z(t)||F(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return r||i?(r.lat=Math.min(e.lat,r.lat),r.lng=Math.min(e.lng,r.lng),i.lat=Math.max(n.lat,i.lat),i.lng=Math.max(n.lng,i.lng)):(this._southWest=new V(e.lat,e.lng),this._northEast=new V(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,r=Math.abs(e.lat-n.lat)*t,i=Math.abs(e.lng-n.lng)*t;return new R(new V(e.lat-r,e.lng-i),new V(n.lat+r,n.lng+i))},getCenter:function(){return new V((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new V(this.getNorth(),this.getWest())},getSouthEast:function(){return new V(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t=("number"==typeof t[0]||t instanceof V||"lat"in t?z:F)(t);var e,n,r=this._southWest,i=this._northEast;return t instanceof R?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=r.lat&&n.lat<=i.lat&&e.lng>=r.lng&&n.lng<=i.lng},intersects:function(t){t=F(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),o=i.lat>=e.lat&&r.lat<=n.lat,s=i.lng>=e.lng&&r.lng<=n.lng;return o&&s},overlaps:function(t){t=F(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),o=i.lat>e.lat&&r.lat<n.lat,s=i.lng>e.lng&&r.lng<n.lng;return o&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=F(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}};var B,q={latLngToPoint:function(t,e){var n=this.projection.project(t),r=this.scale(e);return this.transformation._transform(n,r)},pointToLatLng:function(t,e){var n=this.scale(e),r=this.transformation.untransform(t,n);return this.projection.unproject(r)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new D(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!(V.prototype={equals:function(t,e){return!!t&&(t=z(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,z(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return F([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new V(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new V(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),r=e.lat-n.lat,i=e.lng-n.lng;if(0==r&&0==i)return t;var o=t.getSouthWest(),s=t.getNorthEast();return new R(new V(o.lat-r,o.lng-i),new V(s.lat-r,s.lng-i))}},H=e({},q,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,r=t.lat*n,i=e.lat*n,o=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=o*o+Math.cos(r)*Math.cos(i)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),$=6378137,U={R:$,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,t.lat),-n),i=Math.sin(r*e);return new M(this.R*t.lng*e,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(t){var e=180/Math.PI;return new V((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:new D([-(B=$*Math.PI),-B],[B,B])};function W(t,e,n,r){if(v(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=r}function G(t,e,n,r){return new W(t,e,n,r)}W.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new M((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Y,Z=e({},H,{code:"EPSG:3857",projection:U,transformation:G(Y=.5/(Math.PI*U.R),.5,-Y,.5)}),K=e({},Z,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Q(t,e){for(var n,r,i,o,s="",a=0,l=t.length;a<l;a++){for(n=0,r=(i=t[a]).length;n<r;n++)s+=(n?"L":"M")+(o=i[n]).x+" "+o.y;s+=e?At?"z":"x":""}return s||"M0 0"}var J=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),rt=Lt("webkit"),it=Lt("android"),ot=Lt("android 2")||Lt("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=it&&Lt("Google")&&st<537&&!("AudioNode"in window),lt=!!window.opera,ut=!nt&&Lt("chrome"),ct=Lt("gecko")&&!rt&&!lt&&!tt,dt=!ut&&Lt("safari"),ht=Lt("phantom"),pt="OTransition"in J,ft=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in J,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!ot,vt="MozPerspective"in J,yt=!window.L_DISABLE_3D&&(mt||gt||vt)&&!pt&&!ht,_t="undefined"!=typeof orientation||Lt("mobile"),bt=_t&&rt,wt=_t&>,xt=!window.PointerEvent&&window.MSPointerEvent,St=!(!window.PointerEvent&&!xt),kt=!window.L_NO_TOUCH&&(St||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Ct=_t&<,Et=_t&&ct,Tt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Pt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t}(),Ot=!!document.createElement("canvas").getContext,At=!(!document.createElementNS||!X("svg").createSVGRect),Mt=!At&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Lt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var It={ie:tt,ielt9:et,edge:nt,webkit:rt,android:it,android23:ot,androidStock:at,opera:lt,chrome:ut,gecko:ct,safari:dt,phantom:ht,opera12:pt,win:ft,ie3d:mt,webkit3d:gt,gecko3d:vt,any3d:yt,mobile:_t,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:xt,pointer:St,touch:kt,mobileOpera:Ct,mobileGecko:Et,retina:Tt,passiveEvents:Pt,canvas:Ot,svg:At,vml:Mt},jt=xt?"MSPointerDown":"pointerdown",Dt=xt?"MSPointerMove":"pointermove",Nt=xt?"MSPointerUp":"pointerup",Rt=xt?"MSPointerCancel":"pointercancel",Ft={},Vt=!1;function zt(t,e,n,r){function o(t){$t(t,a)}var s,a,l,u,c,d,h,p;function f(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||$t(t,u)}return"touchstart"===e?(c=t,d=n,h=r,p=i((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Re(t),$t(t,d)})),c["_leaflet_touchstart"+h]=p,c.addEventListener(jt,p,!1),Vt||(document.addEventListener(jt,Bt,!0),document.addEventListener(Dt,qt,!0),document.addEventListener(Nt,Ht,!0),document.addEventListener(Rt,Ht,!0),Vt=!0)):"touchmove"===e?(u=n,(l=t)["_leaflet_touchmove"+r]=f,l.addEventListener(Dt,f,!1)):"touchend"===e&&(a=n,(s=t)["_leaflet_touchend"+r]=o,s.addEventListener(Nt,o,!1),s.addEventListener(Rt,o,!1)),this}function Bt(t){Ft[t.pointerId]=t}function qt(t){Ft[t.pointerId]&&(Ft[t.pointerId]=t)}function Ht(t){delete Ft[t.pointerId]}function $t(t,e){for(var n in t.touches=[],Ft)t.touches.push(Ft[n]);t.changedTouches=[t],e(t)}var Ut,Wt,Gt,Yt,Zt,Kt,Xt=xt?"MSPointerDown":St?"pointerdown":"touchstart",Qt=xt?"MSPointerUp":St?"pointerup":"touchend",Jt="_leaflet_",te=ge(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ee=ge(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ne="webkitTransition"===ee||"OTransition"===ee?ee+"End":"transitionend";function re(t){return"string"==typeof t?document.getElementById(t):t}function ie(t,e){var n,r=t.style[e]||t.currentStyle&&t.currentStyle[e];return r&&"auto"!==r||!document.defaultView||(r=(n=document.defaultView.getComputedStyle(t,null))?n[e]:null),"auto"===r?null:r}function oe(t,e,n){var r=document.createElement(t);return r.className=e||"",n&&n.appendChild(r),r}function se(t){var e=t.parentNode;e&&e.removeChild(t)}function ae(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function le(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ue(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ce(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=fe(t);return 0<n.length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function de(t,e){var n;if(void 0!==t.classList)for(var r=h(e),i=0,o=r.length;i<o;i++)t.classList.add(r[i]);else ce(t,e)||pe(t,((n=fe(t))?n+" ":"")+e)}function he(t,e){void 0!==t.classList?t.classList.remove(e):pe(t,d((" "+fe(t)+" ").replace(" "+e+" "," ")))}function pe(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function fe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function me(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,r="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(r)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+r+"(opacity="+e+")"}(t,e)}function ge(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function ve(t,e,n){var r=e||new M(0,0);t.style[te]=(mt?"translate("+r.x+"px,"+r.y+"px)":"translate3d("+r.x+"px,"+r.y+"px,0)")+(n?" scale("+n+")":"")}function ye(t,e){t._leaflet_pos=e,yt?ve(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function _e(t){return t._leaflet_pos||new M(0,0)}function be(){Te(window,"dragstart",Re)}function we(){Oe(window,"dragstart",Re)}function xe(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Se(),Kt=(Zt=t).style.outline,t.style.outline="none",Te(window,"keydown",Se))}function Se(){Zt&&(Zt.style.outline=Kt,Kt=Zt=void 0,Oe(window,"keydown",Se))}function ke(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function Ce(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}Yt="onselectstart"in document?(Gt=function(){Te(window,"selectstart",Re)},function(){Oe(window,"selectstart",Re)}):(Wt=ge(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),Gt=function(){var t;Wt&&(t=document.documentElement.style,Ut=t[Wt],t[Wt]="none")},function(){Wt&&(document.documentElement.style[Wt]=Ut,Ut=void 0)});var Ee={TRANSFORM:te,TRANSITION:ee,TRANSITION_END:ne,get:re,getStyle:ie,create:oe,remove:se,empty:ae,toFront:le,toBack:ue,hasClass:ce,addClass:de,removeClass:he,setClass:pe,getClass:fe,setOpacity:me,testProp:ge,setTransform:ve,setPosition:ye,getPosition:_e,disableTextSelection:Gt,enableTextSelection:Yt,disableImageDrag:be,enableImageDrag:we,preventOutline:xe,restoreOutline:Se,getSizedParentNode:ke,getScale:Ce};function Te(t,e,n,r){if("object"==typeof e)for(var i in e)Le(t,i,e[i],n);else for(var o=0,s=(e=h(e)).length;o<s;o++)Le(t,e[o],n,r);return this}var Pe="_leaflet_events";function Oe(t,e,n,r){if("object"==typeof e)for(var i in e)Ie(t,i,e[i],n);else if(e)for(var o=0,s=(e=h(e)).length;o<s;o++)Ie(t,e[o],n,r);else{for(var a in t[Pe])Ie(t,a,t[Pe][a]);delete t[Pe]}return this}function Ae(){return St&&!nt&&!dt}var Me={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Le(t,e,n,r){var i=e+s(n)+(r?"_"+s(r):"");if(t[Pe]&&t[Pe][i])return this;var o,a,l,u,c,d,h=function(e){return n.call(r||t,e||window.event)},p=h;function f(t){if(St){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(1<t.touches.length)return;var e=Date.now(),n=e-(u||e);c=t.touches?t.touches[0]:t,d=0<n&&n<=250,u=e}function m(t){if(d&&!c.cancelBubble){if(St){if("mouse"===t.pointerType)return;var e,n,r={};for(n in c)e=c[n],r[n]=e&&e.bind?e.bind(c):e;c=r}c.type="dblclick",c.button=0,a(c),u=null}}St&&0===e.indexOf("touch")?zt(t,e,h,i):kt&&"dblclick"===e&&!Ae()?(a=h,d=!1,(o=t)[Jt+Xt+(l=i)]=f,o[Jt+Qt+l]=m,o[Jt+"dblclick"+l]=a,o.addEventListener(Xt,f,!!Pt&&{passive:!1}),o.addEventListener(Qt,m,!!Pt&&{passive:!1}),o.addEventListener("dblclick",a,!1)):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Me[e]||e,h,!!Pt&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(h=function(e){e=e||window.event,Ue(t,e)&&p(e)},t.addEventListener(Me[e],h,!1)):t.addEventListener(e,p,!1):"attachEvent"in t&&t.attachEvent("on"+e,h),t[Pe]=t[Pe]||{},t[Pe][i]=h}function Ie(t,e,n,r){var i,o,a,l,u,c,d,h,p=e+s(n)+(r?"_"+s(r):""),f=t[Pe]&&t[Pe][p];if(!f)return this;St&&0===e.indexOf("touch")?(h=(c=t)["_leaflet_"+(d=e)+p],"touchstart"===d?c.removeEventListener(jt,h,!1):"touchmove"===d?c.removeEventListener(Dt,h,!1):"touchend"===d&&(c.removeEventListener(Nt,h,!1),c.removeEventListener(Rt,h,!1))):kt&&"dblclick"===e&&!Ae()?(a=(i=t)[Jt+Xt+(o=p)],l=i[Jt+Qt+o],u=i[Jt+"dblclick"+o],i.removeEventListener(Xt,a,!!Pt&&{passive:!1}),i.removeEventListener(Qt,l,!!Pt&&{passive:!1}),i.removeEventListener("dblclick",u,!1)):"removeEventListener"in t?t.removeEventListener(Me[e]||e,f,!1):"detachEvent"in t&&t.detachEvent("on"+e,f),t[Pe][p]=null}function je(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,$e(t),this}function De(t){return Le(t,"wheel",je),this}function Ne(t){return Te(t,"mousedown touchstart dblclick",je),Le(t,"click",He),this}function Re(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Fe(t){return Re(t),je(t),this}function Ve(t,e){if(!e)return new M(t.clientX,t.clientY);var n=Ce(e),r=n.boundingClientRect;return new M((t.clientX-r.left)/n.x-e.clientLeft,(t.clientY-r.top)/n.y-e.clientTop)}var ze=ft&&ut?2*window.devicePixelRatio:ct?window.devicePixelRatio:1;function Be(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/ze:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var qe={};function He(t){qe[t.type]=!0}function $e(t){var e=qe[t.type];return qe[t.type]=!1,e}function Ue(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var We={on:Te,off:Oe,stopPropagation:je,disableScrollPropagation:De,disableClickPropagation:Ne,preventDefault:Re,stop:Fe,getMousePosition:Ve,getWheelDelta:Be,fakeStop:He,skipped:$e,isExternalTarget:Ue,addListener:Te,removeListener:Oe},Ge=A.extend({run:function(t,e,n,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=_e(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),ye(this._el,n),this.fire("step")},_complete:function(){E(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ye=A.extend({options:{crs:Z,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(z(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ee&&yt&&!Ct&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Te(this._proxy,ne,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,n,r){return n=void 0===n?this._zoom:this._limitZoom(n),t=this._limitCenter(z(t),n,this.options.maxBounds),r=r||{},this._stop(),this._loaded&&!r.reset&&!0!==r&&(void 0!==r.animate&&(r.zoom=e({animate:r.animate},r.zoom),r.pan=e({animate:r.animate,duration:r.duration},r.pan)),this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,r.zoom):this._tryAnimatedPan(t,r.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,n),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var r=this.getZoomScale(e),i=this.getSize().divideBy(2),o=(t instanceof M?t:this.latLngToContainerPoint(t)).subtract(i).multiplyBy(1-1/r),s=this.containerPointToLatLng(i.add(o));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():F(t);var n=j(e.paddingTopLeft||e.padding||[0,0]),r=j(e.paddingBottomRight||e.padding||[0,0]),i=this.getBoundsZoom(t,!1,n.add(r));if((i="number"==typeof e.maxZoom?Math.min(e.maxZoom,i):i)===1/0)return{center:t.getCenter(),zoom:i};var o=r.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),i),a=this.project(t.getNorthEast(),i);return{center:this.unproject(s.add(a).divideBy(2).add(o),i),zoom:i}},fitBounds:function(t,e){if(!(t=F(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){return e=e||{},(t=j(t).round()).x||t.y?(!0===e.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new Ge,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate?(de(this._mapPane,"leaflet-pan-anim"),n=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend");var n},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!yt)return this.setView(t,e,n);this._stop();var r=this.project(this.getCenter()),i=this.project(t),o=this.getSize(),s=this._zoom;t=z(t),e=void 0===e?s:e;var a=Math.max(o.x,o.y),l=a*this.getZoomScale(s,e),u=i.distanceTo(r)||1,c=1.42,d=c*c;function h(t){var e=(l*l-a*a+(t?-1:1)*d*d*u*u)/(2*(t?l:a)*d*u),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}var m=h(0);function g(t){return a*(f(m)*(p(e=m+c*t)/f(e))-p(m))/d;var e}var v=Date.now(),y=(h(1)-m)/c,_=n.duration?1e3*n.duration:1e3*y*.8;return this._moveStart(!0,n.noMoveStart),function n(){var o,l,d=(Date.now()-v)/_,h=(o=d,(1-Math.pow(1-o,1.5))*y);d<=1?(this._flyToFrame=C(n,this),this._move(this.unproject(r.add(i.subtract(r).multiplyBy(g(h)/u)),s),this.getScaleZoom(a/(l=h,a*(f(m)/f(m+c*l))),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=F(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,F(t));return n.equals(r)||this.panTo(r,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n,r,i=j((e=e||{}).paddingTopLeft||e.padding||[0,0]),o=j(e.paddingBottomRight||e.padding||[0,0]),s=this.getCenter(),a=this.project(s),l=this.project(t),u=this.getPixelBounds(),c=u.getSize().divideBy(2),d=N([u.min.add(i),u.max.subtract(o)]);return d.contains(l)||(this._enforcingBounds=!0,n=a.subtract(l),r=j(l.x+n.x,l.y+n.y),(l.x<d.min.x||l.x>d.max.x)&&(r.x=a.x-n.x,0<n.x?r.x+=c.x-i.x:r.x-=c.x-o.x),(l.y<d.min.y||l.y>d.max.y)&&(r.y=a.y-n.y,0<n.y?r.y+=c.y-i.y:r.y-=c.y-o.y),this.panTo(this.unproject(r),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),o=n.divideBy(2).round(),s=r.divideBy(2).round(),a=o.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=i(this._handleGeolocationResponse,this),r=i(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,r,t):navigator.geolocation.getCurrentPosition(n,r,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e,n=new V(t.coords.latitude,t.coords.longitude),r=n.toBounds(2*t.coords.accuracy),i=this._locateOptions;i.setView&&(e=this.getBoundsZoom(r),this.setView(n,i.maxZoom?Math.min(e,i.maxZoom):e));var o={latlng:n,bounds:r,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(o[s]=t.coords[s]);this.fire("locationfound",o)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),se(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(E(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)se(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=oe("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=F(t),n=j(n||[0,0]);var r=this.getZoom()||0,i=this.getMinZoom(),o=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),u=N(this.project(a,r),this.project(s,r)).getSize(),c=yt?this.options.zoomSnap:1,d=l.x/u.x,h=l.y/u.y,p=e?Math.max(d,h):Math.min(d,h);r=this.getScaleZoom(p,r);return c&&(r=Math.round(r/(c/100))*(c/100),r=e?Math.ceil(r/c)*c:Math.floor(r/c)*c),Math.max(i,Math.min(o,r))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new M(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new D(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var r=n.zoom(t*n.scale(e));return isNaN(r)?1/0:r},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(z(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(j(t),e)},layerPointToLatLng:function(t){var e=j(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(z(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(z(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(F(t))},distance:function(t,e){return this.options.crs.distance(z(t),z(e))},containerPointToLayerPoint:function(t){return j(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return j(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(j(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(z(t)))},mouseEventToContainerPoint:function(t){return Ve(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=re(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Te(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&yt,de(t,"leaflet-container"+(kt?" leaflet-touch":"")+(Tt?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(dt?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ie(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ye(this._mapPane,new M(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(de(t.markerPane,"leaflet-zoom-hide"),de(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ye(this._mapPane,new M(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r,!1)._move(t,e)._moveEnd(r),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ye(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?Oe:Te;e((this._targets[s(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),yt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,r=[],i="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,a=!1;o;){if((n=this._targets[s(o)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(i&&!Ue(o,t))break;if(r.push(n),i)break}if(o===this._container)break;o=o.parentNode}return r.length||a||i||!Ue(o,t)||(r=[this]),r},_handleDOMEvent:function(t){var e;this._loaded&&!$e(t)&&("mousedown"!==(e=t.type)&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||xe(t.target||t.srcElement),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,r){var i;if("click"===t.type&&((i=e({},t)).type="preclick",this._fireDOMEvent(i,i.type,r)),!t._stopped&&(r=(r||[]).concat(this._findEventTargets(t,n))).length){var o=r[0];"contextmenu"===n&&o.listens(n,!0)&&Re(t);var s,a={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(s=o.getLatLng&&(!o._radius||o._radius<=10),a.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?o.getLatLng():this.layerPointToLatLng(a.layerPoint));for(var l=0;l<r.length;l++)if(r[l].fire(n,a,!0),a.originalEvent._stopped||!1===r[l].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,n))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return _e(this._mapPane)||new M(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var r=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(r)},_latLngBoundsToNewLayerBounds:function(t,e,n){var r=this._getNewPixelOrigin(n,e);return N([this.project(t.getSouthWest(),e)._subtract(r),this.project(t.getNorthWest(),e)._subtract(r),this.project(t.getSouthEast(),e)._subtract(r),this.project(t.getNorthEast(),e)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var r=this.project(t,e),i=this.getSize().divideBy(2),o=new D(r.subtract(i),r.add(i)),s=this._getBoundsOffset(o,n,e);return s.round().equals([0,0])?t:this.unproject(r.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),r=new D(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(r,e))},_getBoundsOffset:function(t,e,n){var r=N(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),i=r.min.subtract(t.min),o=r.max.subtract(t.max);return new M(this._rebound(i.x,-o.x),this._rebound(i.y,-o.y))},_rebound:function(t,e){return 0<t+e?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),r=yt?this.options.zoomSnap:1;return r&&(t=Math.round(t/r)*r),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){he(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=oe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=te,n=this._proxy.style[e];ve(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){se(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ve(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(e),i=this._getCenterOffset(t)._divideBy(1-1/r);return!(!0!==n.animate&&!this.getSize().contains(i)||(C((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,de(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:r}),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&he(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),C((function(){this._moveEnd(!0)}),this))}});function Ze(t){return new Ke(t)}var Ke=P.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),r=t._controlCorners[n];return de(e,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(e,r.firstChild):r.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(se(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}});Ye.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=oe("div",e+"control-container",this._container);function r(r,i){var o=e+r+" "+e+i;t[r+i]=oe("div",o,n)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)se(this._controlCorners[t]);se(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Xe=Ke.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,r){return n<r?-1:r<n?1:0}},initialize:function(t,e,n){for(var r in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[r],r);for(r in e)this._addLayer(e[r],r,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Ke.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){de(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(de(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):he(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return he(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=oe("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ne(e),De(e);var r=this._section=oe("section",t+"-list");n&&(this._map.on("click",this.collapse,this),it||Te(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var i=this._layersLink=oe("a",t+"-toggle",e);i.href="#",i.title="Layers",kt?(Te(i,"click",Fe),Te(i,"click",this.expand,this)):Te(i,"focus",this.expand,this),n||this.expand(),this._baseLayersList=oe("div",t+"-base",r),this._separator=oe("div",t+"-separator",r),this._overlaysList=oe("div",t+"-overlays",r),e.appendChild(r)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(i((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ae(this._baseLayersList),ae(this._overlaysList),this._layerControlInputs=[];for(var t,e,n,r=0,i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,r+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&1<r,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(s(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",r=document.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(t){var e,n=document.createElement("label"),r=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=r):e=this._createRadioElement("leaflet-base-layers_"+s(this),r),this._layerControlInputs.push(e),e.layerId=s(t.layer),Te(e,"click",this._onInputClick,this);var i=document.createElement("span");i.innerHTML=" "+t.name;var o=document.createElement("div");return n.appendChild(o),o.appendChild(e),o.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,r=[],i=[];this._handlingClick=!0;for(var o=n.length-1;0<=o;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?r.push(e):t.checked||i.push(e);for(o=0;o<i.length;o++)this._map.hasLayer(i[o])&&this._map.removeLayer(i[o]);for(o=0;o<r.length;o++)this._map.hasLayer(r[o])||this._map.addLayer(r[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,r=this._map.getZoom(),i=n.length-1;0<=i;i--)t=n[i],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&r<e.options.minZoom||void 0!==e.options.maxZoom&&r>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Qe=Ke.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=oe("div",e+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,r,i){var o=oe("a",n,r);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Ne(o),Te(o,"click",Fe),Te(o,"click",i,this),Te(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";he(this._zoomInButton,e),he(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMinZoom()||de(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMaxZoom()||de(this._zoomInButton,e)}});Ye.mergeOptions({zoomControl:!0}),Ye.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Qe,this.addControl(this.zoomControl))}));var Je=Ke.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=oe("div",e),r=this.options;return this._addScales(r,e+"-line",n),t.on(r.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=oe("div",e,n)),t.imperial&&(this._iScale=oe("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,r,i=3.2808399*t;5280<i?(e=i/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" ft",r/i))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(10<=n?10:5<=n?5:3<=n?3:2<=n?2:1)}}),tn=Ke.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=oe("div","leaflet-control-attribution"),Ne(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});Ye.mergeOptions({attributionControl:!0}),Ye.addInitHook((function(){this.options.attributionControl&&(new tn).addTo(this)})),Ke.Layers=Xe,Ke.Zoom=Qe,Ke.Scale=Je,Ke.Attribution=tn,Ze.layers=function(t,e,n){return new Xe(t,e,n)},Ze.zoom=function(t){return new Qe(t)},Ze.scale=function(t){return new Je(t)},Ze.attribution=function(t){return new tn(t)};var en=P.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});en.addTo=function(t,e){return t.addHandler(e,this),this};var nn,rn={Events:O},on=kt?"touchstart mousedown":"mousedown",sn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},an={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ln=A.extend({options:{clickTolerance:3},initialize:function(t,e,n,r){p(this,r),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Te(this._dragStartTarget,on,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ln._dragging===this&&this.finishDrag(),Oe(this._dragStartTarget,on,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,n;!t._simulated&&this._enabled&&(this._moved=!1,ce(this._element,"leaflet-zoom-anim")||ln._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((ln._dragging=this)._preventOutline&&xe(this._element),be(),Gt(),this._moving||(this.fire("down"),e=t.touches?t.touches[0]:t,n=ke(this._element),this._startPoint=new M(e.clientX,e.clientY),this._parentScale=Ce(n),Te(document,an[t.type],this._onMove,this),Te(document,sn[t.type],this._onUp,this))))},_onMove:function(t){var e,n;!t._simulated&&this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:((n=new M((e=t.touches&&1===t.touches.length?t.touches[0]:t).clientX,e.clientY)._subtract(this._startPoint)).x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Re(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=_e(this._element).subtract(n),de(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),de(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,E(this._animRequest),this._lastEvent=t,this._animRequest=C(this._updatePosition,this,!0))))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ye(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in he(document.body,"leaflet-dragging"),this._lastTarget&&(he(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),an)Oe(document,an[t],this._onMove,this),Oe(document,sn[t],this._onUp,this);we(),Yt(),this._moved&&this._moving&&(E(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,ln._dragging=!1}});function un(t,e){if(!e||!t.length)return t.slice();var n=e*e;return function(t,e){var n=t.length,r=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);r[0]=r[n-1]=1,function t(e,n,r,i,o){var s,a,l,u=0;for(a=i+1;a<=o-1;a++)u<(l=fn(e[a],e[i],e[o],!0))&&(s=a,u=l);r<u&&(n[s]=1,t(e,n,r,i,s),t(e,n,r,s,o))}(t,r,e,0,n-1);var i,o=[];for(i=0;i<n;i++)r[i]&&o.push(t[i]);return o}(t=function(t,e){for(var n=[t[0]],r=1,i=0,o=t.length;r<o;r++)(function(t,e){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r})(t[r],t[i])>e&&(n.push(t[r]),i=r);return i<o-1&&n.push(t[o-1]),n}(t,n),n)}function cn(t,e,n){return Math.sqrt(fn(t,e,n,!0))}function dn(t,e,n,r,i){var o,s,a,l=r?nn:pn(t,n),u=pn(e,n);for(nn=u;;){if(!(l|u))return[t,e];if(l&u)return!1;a=pn(s=hn(t,e,o=l||u,n,i),n),o===l?(t=s,l=a):(e=s,u=a)}}function hn(t,e,n,r,i){var o,s,a=e.x-t.x,l=e.y-t.y,u=r.min,c=r.max;return 8&n?(o=t.x+a*(c.y-t.y)/l,s=c.y):4&n?(o=t.x+a*(u.y-t.y)/l,s=u.y):2&n?(o=c.x,s=t.y+l*(c.x-t.x)/a):1&n&&(o=u.x,s=t.y+l*(u.x-t.x)/a),new M(o,s,i)}function pn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function fn(t,e,n,r){var i,o=e.x,s=e.y,a=n.x-o,l=n.y-s,u=a*a+l*l;return 0<u&&(1<(i=((t.x-o)*a+(t.y-s)*l)/u)?(o=n.x,s=n.y):0<i&&(o+=a*i,s+=l*i)),a=t.x-o,l=t.y-s,r?a*a+l*l:new M(o,s)}function mn(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function gn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),mn(t)}var vn={simplify:un,pointToSegmentDistance:cn,closestPointOnSegment:function(t,e,n){return fn(t,e,n)},clipSegment:dn,_getEdgeIntersection:hn,_getBitCode:pn,_sqClosestPointOnSegment:fn,isFlat:mn,_flat:gn};function yn(t,e,n){for(var r,i,o,s,a,l,u,c=[1,4,2,8],d=0,h=t.length;d<h;d++)t[d]._code=pn(t[d],e);for(o=0;o<4;o++){for(l=c[o],r=[],d=0,i=(h=t.length)-1;d<h;i=d++)s=t[d],a=t[i],s._code&l?a._code&l||((u=hn(a,s,l,e,n))._code=pn(u,e),r.push(u)):(a._code&l&&((u=hn(a,s,l,e,n))._code=pn(u,e),r.push(u)),r.push(s));t=r}return t}var _n,bn={clipPolygon:yn},wn={project:function(t){return new M(t.lng,t.lat)},unproject:function(t){return new V(t.y,t.x)},bounds:new D([-180,-90],[180,90])},xn={R:6378137,R_MINOR:6356752.314245179,bounds:new D([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,r=t.lat*e,i=this.R_MINOR/n,o=Math.sqrt(1-i*i),s=o*Math.sin(r),a=Math.tan(Math.PI/4-r/2)/Math.pow((1-s)/(1+s),o/2);r=-n*Math.log(Math.max(a,1e-10));return new M(t.lng*e*n,r)},unproject:function(t){for(var e,n=180/Math.PI,r=this.R,i=this.R_MINOR/r,o=Math.sqrt(1-i*i),s=Math.exp(-t.y/r),a=Math.PI/2-2*Math.atan(s),l=0,u=.1;l<15&&1e-7<Math.abs(u);l++)e=o*Math.sin(a),e=Math.pow((1-e)/(1+e),o/2),a+=u=Math.PI/2-2*Math.atan(s*e)-a;return new V(a*n,t.x*n/r)}},Sn={LonLat:wn,Mercator:xn,SphericalMercator:U},kn=e({},H,{code:"EPSG:3395",projection:xn,transformation:G(_n=.5/(Math.PI*xn.R),.5,-_n,.5)}),Cn=e({},H,{code:"EPSG:4326",projection:wn,transformation:G(1/180,1,-1/180,.5)}),En=e({},q,{projection:wn,transformation:G(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,r=e.lat-t.lat;return Math.sqrt(n*n+r*r)},infinite:!0});q.Earth=H,q.EPSG3395=kn,q.EPSG3857=Z,q.EPSG900913=K,q.EPSG4326=Cn,q.Simple=En;var Tn=A.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[s(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[s(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e,n=t.target;n.hasLayer(this)&&(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents&&(e=this.getEvents(),n.on(e,this),this.once("remove",(function(){n.off(e,this)}),this)),this.onAdd(n),this.getAttribution&&n.attributionControl&&n.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),n.fire("layeradd",{layer:this}))}});Ye.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(t);return this._layers[e]||((this._layers[e]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=s(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return!!t&&s(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?v(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var r in this._zoomBoundLayers){var i=this._zoomBoundLayers[r].options;t=void 0===i.minZoom?t:Math.min(t,i.minZoom),e=void 0===i.maxZoom?e:Math.max(e,i.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Pn=Tn.extend({initialize:function(t,e){var n,r;if(p(this,e),this._layers={},t)for(n=0,r=t.length;n<r;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,r=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,r);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:s}),On=Pn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Pn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Pn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new R;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),An=P.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var r=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(r,t),r},_setIconStyles:function(t,e){var n=this.options,r=n[e+"Size"];"number"==typeof r&&(r=[r,r]);var i=j(r),o=j("shadow"===e&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),i&&(t.style.width=i.x+"px",t.style.height=i.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Tt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Mn=An.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Mn.imagePath||(Mn.imagePath=this._detectIconPath()),(this.options.imagePath||Mn.imagePath)+An.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=oe("div","leaflet-default-icon-path",document.body),e=ie(t,"background-image")||ie(t,"backgroundImage");return document.body.removeChild(t),null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ln=en.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ln(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),de(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&he(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e,n=this._marker,r=n._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=_e(n._icon),a=r.getPixelBounds(),l=r.getPixelOrigin(),u=N(a.min._subtract(l).add(o),a.max._subtract(l).subtract(o));u.contains(s)||(e=j((Math.max(u.max.x,s.x)-u.max.x)/(a.max.x-u.max.x)-(Math.min(u.min.x,s.x)-u.min.x)/(a.min.x-u.min.x),(Math.max(u.max.y,s.y)-u.max.y)/(a.max.y-u.max.y)-(Math.min(u.min.y,s.y)-u.min.y)/(a.min.y-u.min.y)).multiplyBy(i),r.panBy(e,{animate:!1}),this._draggable._newPos._add(e),this._draggable._startPos._add(e),ye(n._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(E(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,r=_e(e._icon),i=e._map.layerPointToLatLng(r);n&&ye(n,r),e._latlng=i,t.latlng=i,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){E(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),In=Tn.extend({options:{icon:new Mn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=z(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=z(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),r=!1;n!==this._icon&&(this._icon&&this._removeIcon(),r=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),de(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var i=t.icon.createShadow(this._shadow),o=!1;i!==this._shadow&&(this._removeShadow(),o=!0),i&&(de(i,e),i.alt=""),this._shadow=i,t.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),i&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),se(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&se(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&ye(this._icon,t),this._shadow&&ye(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){var t;this.options.interactive&&(de(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ln&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ln(this),t&&this.dragging.enable()))},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&me(this._icon,t),this._shadow&&me(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),jn=Tn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return p(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Dn=jn.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=z(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=z(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return jn.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),r=[t+n,e+n];this._pxBounds=new D(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Nn=Dn.extend({initialize:function(t,n,r){if("number"==typeof n&&(n=e({},r,{radius:n})),p(this,n),this._latlng=z(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new R(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:jn.prototype.setStyle,_project:function(){var t,e,n,r,i,o,s,a,l=this._latlng.lng,u=this._latlng.lat,c=this._map,d=c.options.crs;d.distance===H.distance?(t=Math.PI/180,e=this._mRadius/H.R/t,n=c.project([u+e,l]),r=c.project([u-e,l]),i=n.add(r).divideBy(2),o=c.unproject(i).lat,s=Math.acos((Math.cos(e*t)-Math.sin(u*t)*Math.sin(o*t))/(Math.cos(u*t)*Math.cos(o*t)))/t,!isNaN(s)&&0!==s||(s=e/Math.cos(Math.PI/180*u)),this._point=i.subtract(c.getPixelOrigin()),this._radius=isNaN(s)?0:i.x-c.project([o,l-s]).x,this._radiusY=i.y-n.y):(a=d.unproject(d.project(this._latlng).subtract([this._mRadius,0])),this._point=c.latLngToLayerPoint(this._latlng),this._radius=this._point.x-c.latLngToLayerPoint(a).x),this._updateBounds()}}),Rn=jn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,r=1/0,i=null,o=fn,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],u=1,c=l.length;u<c;u++){var d=o(t,e=l[u-1],n=l[u],!0);d<r&&(r=d,i=o(t,e,n))}return i&&(i.distance=Math.sqrt(r)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,r,i,o,s,a=this._rings[0],l=a.length;if(!l)return null;for(e=t=0;t<l-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(r=t=0;t<l-1;t++)if(i=a[t],o=a[t+1],e<(r+=n=i.distanceTo(o)))return s=(r-e)/n,this._map.layerPointToLatLng([o.x-s*(o.x-i.x),o.y-s*(o.y-i.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=z(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return mn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=mn(t),r=0,i=t.length;r<i;r++)n?(e[r]=z(t[r]),this._bounds.extend(e[r])):e[r]=this._convertLatLngs(t[r]);return e},_project:function(){var t=new D;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new M(t,t);this._pxBounds=new D([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var r,i,o=t[0]instanceof V,s=t.length;if(o){for(i=[],r=0;r<s;r++)i[r]=this._map.latLngToLayerPoint(t[r]),n.extend(i[r]);e.push(i)}else for(r=0;r<s;r++)this._projectLatlngs(t[r],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var e,n,r,i,o=this._parts,s=0,a=0,l=this._rings.length;s<l;s++)for(e=0,n=(i=this._rings[s]).length;e<n-1;e++)(r=dn(i[e],i[e+1],t,e,!0))&&(o[a]=o[a]||[],o[a].push(r[0]),r[1]===i[e+1]&&e!==n-2||(o[a].push(r[1]),a++))},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,r=t.length;n<r;n++)t[n]=un(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,r,i,o,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,o=this._parts.length;n<o;n++)for(r=0,i=(s=(a=this._parts[n]).length)-1;r<s;i=r++)if((e||0!==r)&&cn(t,a[i],a[r])<=l)return!0;return!1}});Rn._flat=gn;var Fn=Rn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,r,i,o,s,a,l,u=this._rings[0],c=u.length;if(!c)return null;for(t=o=s=a=0,e=c-1;t<c;e=t++)n=u[t],r=u[e],i=n.y*r.x-r.y*n.x,s+=(n.x+r.x)*i,a+=(n.y+r.y)*i,o+=3*i;return l=0===o?u[0]:[s/o,a/o],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=Rn.prototype._convertLatLngs.call(this,t),n=e.length;return 2<=n&&e[0]instanceof V&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){Rn.prototype._setLatLngs.call(this,t),mn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return mn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new M(e,e);t=new D(t.min.subtract(n),t.max.add(n));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var r,i=0,o=this._rings.length;i<o;i++)(r=yn(this._rings[i],t,!0)).length&&this._parts.push(r)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,r,i,o,s,a,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,a=this._parts.length;i<a;i++)for(o=0,s=(l=(e=this._parts[i]).length)-1;o<l;s=o++)n=e[o],r=e[s],n.y>t.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(u=!u);return u||Rn.prototype._containsPoint.call(this,t,!0)}}),Vn=On.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,r,i=v(t)?t:t.features;if(i){for(e=0,n=i.length;e<n;e++)((r=i[e]).geometries||r.geometry||r.features||r.coordinates)&&this.addData(r);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var s=zn(t,o);return s?(s.feature=Gn(t),s.defaultOptions=s.options,this.resetStyle(s),o.onEachFeature&&o.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function zn(t,e){var n,r,i,o,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||qn;if(!a&&!s)return null;switch(s.type){case"Point":return Bn(u,t,n=c(a),e);case"MultiPoint":for(i=0,o=a.length;i<o;i++)n=c(a[i]),l.push(Bn(u,t,n,e));return new On(l);case"LineString":case"MultiLineString":return r=Hn(a,"LineString"===s.type?0:1,c),new Rn(r,e);case"Polygon":case"MultiPolygon":return r=Hn(a,"Polygon"===s.type?1:2,c),new Fn(r,e);case"GeometryCollection":for(i=0,o=s.geometries.length;i<o;i++){var d=zn({geometry:s.geometries[i],type:"Feature",properties:t.properties},e);d&&l.push(d)}return new On(l);default:throw new Error("Invalid GeoJSON object.")}}function Bn(t,e,n,r){return t?t(e,n):new In(n,r&&r.markersInheritOptions&&r)}function qn(t){return new V(t[1],t[0],t[2])}function Hn(t,e,n){for(var r,i=[],o=0,s=t.length;o<s;o++)r=e?Hn(t[o],e-1,n):(n||qn)(t[o]),i.push(r);return i}function $n(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function Un(t,e,n,r){for(var i=[],o=0,s=t.length;o<s;o++)i.push(e?Un(t[o],e-1,n,r):$n(t[o],r));return!e&&n&&i.push(i[0]),i}function Wn(t,n){return t.feature?e({},t.feature,{geometry:n}):Gn(n)}function Gn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Yn={toGeoJSON:function(t){return Wn(this,{type:"Point",coordinates:$n(this.getLatLng(),t)})}};function Zn(t,e){return new Vn(t,e)}In.include(Yn),Nn.include(Yn),Dn.include(Yn),Rn.include({toGeoJSON:function(t){var e=!mn(this._latlngs);return Wn(this,{type:(e?"Multi":"")+"LineString",coordinates:Un(this._latlngs,e?1:0,!1,t)})}}),Fn.include({toGeoJSON:function(t){var e=!mn(this._latlngs),n=e&&!mn(this._latlngs[0]),r=Un(this._latlngs,n?2:e?1:0,!0,t);return e||(r=[r]),Wn(this,{type:(n?"Multi":"")+"Polygon",coordinates:r})}}),Pn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),Wn(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,r=[];return this.eachLayer((function(e){var i,o;e.toGeoJSON&&(i=e.toGeoJSON(t),n?r.push(i.geometry):"FeatureCollection"===(o=Gn(i)).type?r.push.apply(r,o.features):r.push(o))})),n?Wn(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});var Kn=Zn,Xn=Tn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=F(e),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(de(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){se(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&le(this._image),this},bringToBack:function(){return this._map&&ue(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=F(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:oe("img");de(e,"leaflet-image-layer"),this._zoomAnimated&&de(e,"leaflet-zoom-animated"),this.options.className&&de(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=i(this.fire,this,"load"),e.onerror=i(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ve(this._image,n,e)},_reset:function(){var t=this._image,e=new D(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();ye(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){me(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Qn=Xn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:oe("video");if(de(e,"leaflet-image-layer"),this._zoomAnimated&&de(e,"leaflet-zoom-animated"),this.options.className&&de(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=i(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),r=[],o=0;o<n.length;o++)r.push(n[o].src);this._url=0<n.length?r:[e.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var s=0;s<this._url.length;s++){var a=oe("source");a.src=this._url[s],e.appendChild(a)}}}}),Jn=Xn.extend({_initImage:function(){var t=this._image=this._url;de(t,"leaflet-image-layer"),this._zoomAnimated&&de(t,"leaflet-zoom-animated"),this.options.className&&de(t,this.options.className),t.onselectstart=u,t.onmousemove=u}}),tr=Tn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){p(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&me(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&me(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(me(this._container,0),this._removeTimeout=setTimeout(i(se,void 0,this._container),200)):se(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=z(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&le(this._container),this},bringToBack:function(){return this._map&&ue(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof Tn||(n=e,e=t),e instanceof On)for(var r in t._layers){e=t._layers[r];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){var t,e,n,r,i;this._map&&(t=this._map.latLngToLayerPoint(this._latlng),e=j(this.options.offset),n=this._getAnchor(),this._zoomAnimated?ye(this._container,t.add(n)):e=e.add(t).add(n),r=this._containerBottom=-e.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+e.x,this._container.style.bottom=r+"px",this._container.style.left=i+"px")},_getAnchor:function(){return[0,0]}}),er=tr.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){tr.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof jn||this._source.on("preclick",je))},onRemove:function(t){tr.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof jn||this._source.off("preclick",je))},getEvents:function(){var t=tr.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,e="leaflet-popup",n=this._container=oe("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),r=this._wrapper=oe("div",e+"-content-wrapper",n);this._contentNode=oe("div",e+"-content",r),Ne(n),De(this._contentNode),Te(n,"contextmenu",je),this._tipContainer=oe("div",e+"-tip-container",n),this._tip=oe("div",e+"-tip",this._tipContainer),this.options.closeButton&&((t=this._closeButton=oe("a",e+"-close-button",n)).href="#close",t.innerHTML="×",Te(t,"click",this._onCloseButtonClick,this))},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth);n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var r=t.offsetHeight,i=this.options.maxHeight,o="leaflet-popup-scrolled";i&&i<r?(e.height=i+"px",de(t,o)):he(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();ye(this._container,e.add(n))},_adjustPan:function(){var t,e,n,r,i,o,s,a,l,u,c,d;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),t=this._map,e=parseInt(ie(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,r=this._containerWidth,(i=new M(this._containerLeft,-n-this._containerBottom))._add(_e(this._container)),o=t.layerPointToContainerPoint(i),s=j(this.options.autoPanPadding),a=j(this.options.autoPanPaddingTopLeft||s),l=j(this.options.autoPanPaddingBottomRight||s),u=t.getSize(),d=c=0,o.x+r+l.x>u.x&&(c=o.x+r-u.x+l.x),o.x-c-a.x<0&&(c=o.x-a.x),o.y+n+l.y>u.y&&(d=o.y+n-u.y+l.y),o.y-d-a.y<0&&(d=o.y-a.y),(c||d)&&t.fire("autopanstart").panBy([c,d]))},_onCloseButtonClick:function(t){this._close(),Fe(t)},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ye.mergeOptions({closePopupOnClick:!0}),Ye.include({openPopup:function(t,e,n){return t instanceof er||(t=new er(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Tn.include({bindPopup:function(t,e){return t instanceof er?(p(t,e),(this._popup=t)._source=this):(this._popup&&!e||(this._popup=new er(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Fe(t),e instanceof jn?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var nr=tr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){tr.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){tr.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=tr.prototype.getEvents.call(this);return kt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=oe("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n=this._map,r=this._container,i=n.latLngToContainerPoint(n.getCenter()),o=n.layerPointToContainerPoint(t),s=this.options.direction,a=r.offsetWidth,l=r.offsetHeight,u=j(this.options.offset),c=this._getAnchor(),d="top"===s?(e=a/2,l):"bottom"===s?(e=a/2,0):(e="center"===s?a/2:"right"===s?0:"left"===s?a:o.x<i.x?(s="right",0):(s="left",a+2*(u.x+c.x)),l/2);t=t.subtract(j(e,d,!0)).add(u).add(c),he(r,"leaflet-tooltip-right"),he(r,"leaflet-tooltip-left"),he(r,"leaflet-tooltip-top"),he(r,"leaflet-tooltip-bottom"),de(r,"leaflet-tooltip-"+s),ye(r,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&me(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return j(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ye.include({openTooltip:function(t,e,n){return t instanceof nr||(t=new nr(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Tn.include({bindTooltip:function(t,e){return t instanceof nr?(p(t,e),(this._tooltip=t)._source=this):(this._tooltip&&!e||(this._tooltip=new nr(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){var e,n;!t&&this._tooltipHandlersAdded||(e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),kt&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t)},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(de(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(he(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,r=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),r=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(r)}});var rr=An.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e,n=t&&"DIV"===t.tagName?t:document.createElement("div"),r=this.options;return r.html instanceof Element?(ae(n),n.appendChild(r.html)):n.innerHTML=!1!==r.html?r.html:"",r.bgPos&&(e=j(r.bgPos),n.style.backgroundPosition=-e.x+"px "+-e.y+"px"),this._setIconStyles(n,"icon"),n},createShadow:function(){return null}});An.Default=Mn;var ir=Tn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:_t,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),se(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(le(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ue(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof M?t:new M(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,r=-t(-1/0,1/0),i=0,o=n.length;i<o;i++)e=n[i].style.zIndex,n[i]!==this._container&&e&&(r=t(r,+e));isFinite(r)&&(this.options.zIndex=r+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!et){me(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var r in this._tiles){var i,o=this._tiles[r];o.current&&o.loaded&&(i=Math.min(1,(t-o.loaded)/200),me(o.el,i),i<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0))}n&&!this._noPrune&&this._pruneTiles(),e&&(E(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=oe("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(se(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[t],i=this._map;return r||((r=this._levels[t]={}).el=oe("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=e,r.origin=i.project(i.unproject(i.getPixelOrigin()),t).round(),r.zoom=t,this._setZoomTransform(r,i.getCenter(),i.getZoom()),r.el.offsetWidth,this._onCreateLevel(r)),this._level=r}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var t,e,n,r=this._map.getZoom();if(r>this.options.maxZoom||r<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(n=this._tiles[t]).retain=n.current;for(t in this._tiles)(n=this._tiles[t]).current&&!n.active&&(e=n.coords,this._retainParent(e.x,e.y,e.z,e.z-5)||this._retainChildren(e.x,e.y,e.z,e.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)se(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,r){var i=Math.floor(t/2),o=Math.floor(e/2),s=n-1,a=new M(+i,+o);a.z=+s;var l=this._tileCoordsToKey(a),u=this._tiles[l];return u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),r<s&&this._retainParent(i,o,s,r))},_retainChildren:function(t,e,n,r){for(var i=2*t;i<2*t+2;i++)for(var o=2*e;o<2*e+2;o++){var s=new M(i,o);s.z=n+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<r&&this._retainChildren(i,o,n+1,r))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,r){var i=Math.round(e),o=(i=void 0!==this.options.maxZoom&&i>this.options.maxZoom||void 0!==this.options.minZoom&&i<this.options.minZoom?void 0:this._clampZoom(i),this.options.updateWhenZooming&&i!==this._tileZoom);r&&!o||(this._tileZoom=i,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==i&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var r=this._map.getZoomScale(n,t.zoom),i=t.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(e,n)).round();yt?ve(t.el,i,r):ye(t.el,i)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),r=this._tileZoom,i=this._map.getPixelWorldBounds(this._tileZoom);i&&(this._globalTileRange=this._pxBoundsToTileRange(i)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],r).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],r).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],r).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],r).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),r=e.getZoomScale(n,this._tileZoom),i=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*r);return new D(i.subtract(o),i.add(o))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var r=this._getTiledPixelBounds(t),i=this._pxBoundsToTileRange(r),o=i.getCenter(),s=[],a=this.options.keepBuffer,l=new D(i.getBottomLeft().subtract([a,-a]),i.getTopRight().add([a,-a]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new M(c.x,c.y))||(this._tiles[u].current=!1)}if(1<Math.abs(n-this._tileZoom))this._setView(t,n);else{for(var d=i.min.y;d<=i.max.y;d++)for(var h=i.min.x;h<=i.max.x;h++){var p,f=new M(h,d);f.z=this._tileZoom,this._isValidTile(f)&&((p=this._tiles[this._tileCoordsToKey(f)])?p.current=!0:s.push(f))}if(s.sort((function(t,e){return t.distanceTo(o)-e.distanceTo(o)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(h=0;h<s.length;h++)this._addTile(s[h],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(t);return F(this.options.bounds).overlaps(r)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),r=t.scaleBy(n),i=r.add(n);return[e.unproject(r,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new R(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new M(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(se(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){de(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,et&&this.options.opacity<1&&me(t,this.options.opacity),it&&!ot&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),r=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&C(i(this._tileReady,this,t,null,o)),ye(o,n),this._tiles[r]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var r=this._tileCoordsToKey(t);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(me(n.el,0),E(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(de(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new M(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new D(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),or=ir.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Tt&&0<e.maxZoom&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),it||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Te(n,"load",i(this._tileOnLoad,this,e,n)),Te(n,"error",i(this._tileOnError,this,e,n)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var n,r={r:Tt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(n=this._globalTileRange.max.y-t.y,this.options.tms&&(r.y=n),r["-y"]=n),g(this._url,e(r,this.options))},_tileOnLoad:function(t,e){et?setTimeout(i(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var r=this.options.errorTileUrl;r&&e.getAttribute("src")!==r&&(e.src=r),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,e.complete||(e.src=_,se(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",_),ir.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==_))return ir.prototype._tileReady.call(this,t,e,n)}});function sr(t,e){return new or(t,e)}var ar=or.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var r=e({},this.defaultWmsParams);for(var i in n)i in this.options||(r[i]=n[i]);var o=(n=p(this,n)).detectRetina&&Tt?2:1,s=this.getTileSize();r.width=s.x*o,r.height=s.y*o,this.wmsParams=r},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[e]=this._crs.code,or.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,r=N(n.project(e[0]),n.project(e[1])),i=r.min,o=r.max,s=(1.3<=this._wmsVersion&&this._crs===Cn?[i.y,i.x,o.y,o.x]:[i.x,i.y,o.x,o.y]).join(","),a=or.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,n){return e(this.wmsParams,t),n||this.redraw(),this}});or.WMS=ar,sr.wms=function(t,e){return new ar(t,e)};var lr=Tn.extend({options:{padding:.1,tolerance:0},initialize:function(t){p(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&de(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),r=_e(this._container),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=this._map.project(t,e).subtract(o),a=i.multiplyBy(-n).add(r).add(i).subtract(s);yt?ve(this._container,a,n):ye(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new D(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ur=lr.extend({getEvents:function(){var t=lr.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){lr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Te(t,"mousemove",this._onMouseMove,this),Te(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Te(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,se(this._container),Oe(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){var t,e,n,r;this._map._animatingZoom&&this._bounds||(lr.prototype._update.call(this),t=this._bounds,e=this._container,n=t.getSize(),r=Tt?2:1,ye(e,t.min),e.width=r*n.x,e.height=r*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Tt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){lr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);var e=(this._layers[s(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,r=e.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete t._order,delete this._layers[s(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){for(var e,n=t.options.dashArray.split(/[, ]+/),r=[],i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;r.push(e)}t.options._dashArray=r}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){var e;t._pxBounds&&(e=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new D,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e])))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t,e=this._redrawBounds;e?(t=e.getSize(),this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var t,e,n=this._redrawBounds;this._ctx.save(),n&&(e=n.getSize(),this._ctx.beginPath(),this._ctx.rect(n.min.x,n.min.y,e.x,e.y),this._ctx.clip()),this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)t=r.layer,(!n||t._pxBounds&&t._pxBounds.intersects(n))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,r,i,o,s=t._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(r=0,i=s[n].length;r<i;r++)o=s[n][r],l[r?"lineTo":"moveTo"](o.x,o.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){var e,n,r,i;this._drawing&&!t._empty()&&(e=t._point,n=this._ctx,r=Math.max(Math.round(t._radius),1),1!=(i=(Math.max(Math.round(t._radiusY),1)||r)/r)&&(n.save(),n.scale(1,i)),n.beginPath(),n.arc(e.x,e.y/i,r,0,2*Math.PI,!1),1!=i&&n.restore(),this._fillStroke(n,t))},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,r=this._map.mouseEventToLayerPoint(t),i=this._drawFirst;i;i=i.next)(e=i.layer).options.interactive&&e._containsPoint(r)&&(("click"===t.type||"preclick"!==t.type)&&this._map._draggableMoved(e)||(n=e));n&&(He(t),this._fireEvent([n],t))},_onMouseMove:function(t){var e;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(e=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,e))},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(he(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,r,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(e)&&(r=n);r!==this._hoveredLayer&&(this._handleMouseOut(t),r&&(de(this._container,"leaflet-interactive"),this._fireEvent([r],t,"mouseover"),this._hoveredLayer=r)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(i((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e,n,r=t._order;r&&(e=r.next,n=r.prev,e&&((e.prev=n)?n.next=e:e&&(this._drawFirst=e),r.prev=this._drawLast,(this._drawLast.next=r).next=null,this._drawLast=r,this._requestRedraw(t)))},_bringToBack:function(t){var e,n,r=t._order;r&&(e=r.next,(n=r.prev)&&((n.next=e)?e.prev=n:n&&(this._drawLast=n),r.prev=null,r.next=this._drawFirst,this._drawFirst.prev=r,this._drawFirst=r,this._requestRedraw(t)))}});function cr(t){return Ot?new ur(t):null}var dr=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),hr={_initContainer:function(){this._container=oe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(lr.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=dr("shape");de(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=dr("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;se(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,r=t.options,i=t._container;i.stroked=!!r.stroke,i.filled=!!r.fill,r.stroke?(e=e||(t._stroke=dr("stroke")),i.appendChild(e),e.weight=r.weight+"px",e.color=r.color,e.opacity=r.opacity,r.dashArray?e.dashStyle=v(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=r.lineCap.replace("butt","flat"),e.joinstyle=r.lineJoin):e&&(i.removeChild(e),t._stroke=null),r.fill?(n=n||(t._fill=dr("fill")),i.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(i.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),r=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+r+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){le(t._container)},_bringToBack:function(t){ue(t._container)}},pr=Mt?dr:X,fr=lr.extend({getEvents:function(){var t=lr.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=pr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=pr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){se(this._container),Oe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,e,n;this._map._animatingZoom&&this._bounds||(lr.prototype._update.call(this),e=(t=this._bounds).getSize(),n=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),ye(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=pr("path");t.options.className&&de(e,t.options.className),t.options.interactive&&de(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){se(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Q(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),r="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",i=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+r+2*n+",0 "+r+2*-n+",0 ";this._setPath(t,i)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){le(t._path)},_bringToBack:function(t){ue(t._path)}});function mr(t){return At||Mt?new fr(t):null}Mt&&fr.include(hr),Ye.include({getRenderer:function(t){var e=(e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&cr(t)||mr(t)}});var gr=Fn.extend({initialize:function(t,e){Fn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=F(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});fr.create=pr,fr.pointsToPath=Q,Vn.geometryToLayer=zn,Vn.coordsToLatLng=qn,Vn.coordsToLatLngs=Hn,Vn.latLngToCoords=$n,Vn.latLngsToCoords=Un,Vn.getFeature=Wn,Vn.asFeature=Gn,Ye.mergeOptions({boxZoom:!0});var vr=en.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Oe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){se(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Gt(),be(),this._startPoint=this._map.mouseEventToContainerPoint(t),Te(document,{contextmenu:Fe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=oe("div","leaflet-zoom-box",this._container),de(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new D(this._point,this._startPoint),n=e.getSize();ye(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(se(this._box),he(this._container,"leaflet-crosshair")),Yt(),we(),Oe(document,{contextmenu:Fe,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){var e;1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0),e=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ye.addInitHook("addHandler","boxZoom",vr),Ye.mergeOptions({doubleClickZoom:!0});var yr=en.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),r=e.options.zoomDelta,i=t.originalEvent.shiftKey?n-r:n+r;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}});Ye.addInitHook("addHandler","doubleClickZoom",yr),Ye.mergeOptions({dragging:!0,inertia:!ot,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var _r=en.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new ln(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),de(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){he(this._map._container,"leaflet-grab"),he(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=F(this._map.options.maxBounds),this._offsetLimit=N(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,n;this._map.options.inertia&&(e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(n),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){var t,e;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit,t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-e+n)%t+e-n,o=(r+e+n)%t-e-n,s=Math.abs(i+n)<Math.abs(o+n)?i:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e,n,r,i,o,s,a,l,u,c=this._map,d=c.options,h=!d.inertia||this._times.length<2;c.fire("dragend",t),h?c.fire("moveend"):(this._prunePositions(+new Date),e=this._lastPos.subtract(this._positions[0]),n=(this._lastTime-this._times[0])/1e3,r=d.easeLinearity,o=(i=e.multiplyBy(r/n)).distanceTo([0,0]),s=Math.min(d.inertiaMaxSpeed,o),a=i.multiplyBy(s/o),l=s/(d.inertiaDeceleration*r),(u=a.multiplyBy(-l/2).round()).x||u.y?(u=c._limitOffset(u,c.options.maxBounds),C((function(){c.panBy(u,{duration:l,easeLinearity:r,noMoveStart:!0,animate:!0})}))):c.fire("moveend"))}});Ye.addInitHook("addHandler","dragging",_r),Ye.mergeOptions({keyboard:!0,keyboardPanDelta:80});var br=en.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Te(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Oe(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){var t,e,n,r;this._focused||(t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,r=t.scrollLeft||e.scrollLeft,this._map._container.focus(),window.scrollTo(r,n))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var e=this._panKeys={},n=this.keyCodes,r=0,i=n.left.length;r<i;r++)e[n.left[r]]=[-1*t,0];for(r=0,i=n.right.length;r<i;r++)e[n.right[r]]=[t,0];for(r=0,i=n.down.length;r<i;r++)e[n.down[r]]=[0,t];for(r=0,i=n.up.length;r<i;r++)e[n.up[r]]=[0,-1*t]},_setZoomDelta:function(t){for(var e=this._zoomKeys={},n=this.keyCodes,r=0,i=n.zoomIn.length;r<i;r++)e[n.zoomIn[r]]=t;for(r=0,i=n.zoomOut.length;r<i;r++)e[n.zoomOut[r]]=-t},_addHooks:function(){Te(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Oe(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,r=this._map;if(n in this._panKeys)r._panAnim&&r._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=j(e).multiplyBy(3)),r.panBy(e),r.options.maxBounds&&r.panInsideBounds(r.options.maxBounds));else if(n in this._zoomKeys)r.setZoom(r.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!r._popup||!r._popup.options.closeOnEscapeKey)return;r.closePopup()}Fe(t)}}});Ye.addInitHook("addHandler","keyboard",br),Ye.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var wr=en.extend({addHooks:function(){Te(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Oe(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Be(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var r=Math.max(n-(new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),r),Fe(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var r=this._delta/(4*this._map.options.wheelPxPerZoomLevel),i=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,o=n?Math.ceil(i/n)*n:i,s=t._limitZoom(e+(0<this._delta?o:-o))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});Ye.addInitHook("addHandler","scrollWheelZoom",wr),Ye.mergeOptions({tap:!0,tapTolerance:15});var xr=en.extend({addHooks:function(){Te(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Oe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Re(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new M(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&de(n,"leaflet-active"),this._holdTimeout=setTimeout(i((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),Te(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){var e,n;clearTimeout(this._holdTimeout),Oe(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches&&((n=(e=t.changedTouches[0]).target)&&n.tagName&&"a"===n.tagName.toLowerCase()&&he(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e))},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new M(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!kt||St&&!dt||Ye.addInitHook("addHandler","tap",xr),Ye.mergeOptions({touchZoom:kt&&!ot,bounceAtZoomLimits:!0});var Sr=en.extend({addHooks:function(){de(this._map._container,"leaflet-touch-zoom"),Te(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){he(this._map._container,"leaflet-touch-zoom"),Oe(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e,n,r=this._map;!t.touches||2!==t.touches.length||r._animatingZoom||this._zooming||(e=r.mouseEventToContainerPoint(t.touches[0]),n=r.mouseEventToContainerPoint(t.touches[1]),this._centerPoint=r.getSize()._divideBy(2),this._startLatLng=r.containerPointToLatLng(this._centerPoint),"center"!==r.options.touchZoom&&(this._pinchStartLatLng=r.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=r.getZoom(),this._moved=!1,this._zooming=!0,r._stop(),Te(document,"touchmove",this._onTouchMove,this),Te(document,"touchend",this._onTouchEnd,this),Re(t))},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(r)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&1<o)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{var s=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(1==o&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),E(this._animRequest);var a=i(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=C(a,this,!0),Re(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),Oe(document,"touchmove",this._onTouchMove,this),Oe(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ye.addInitHook("addHandler","touchZoom",Sr),Ye.BoxZoom=vr,Ye.DoubleClickZoom=yr,Ye.Drag=_r,Ye.Keyboard=br,Ye.ScrollWheelZoom=wr,Ye.Tap=xr,Ye.TouchZoom=Sr,t.version="1.7.1",t.Control=Ke,t.control=Ze,t.Browser=It,t.Evented=A,t.Mixin=rn,t.Util=T,t.Class=P,t.Handler=en,t.extend=e,t.bind=i,t.stamp=s,t.setOptions=p,t.DomEvent=We,t.DomUtil=Ee,t.PosAnimation=Ge,t.Draggable=ln,t.LineUtil=vn,t.PolyUtil=bn,t.Point=M,t.point=j,t.Bounds=D,t.bounds=N,t.Transformation=W,t.transformation=G,t.Projection=Sn,t.LatLng=V,t.latLng=z,t.LatLngBounds=R,t.latLngBounds=F,t.CRS=q,t.GeoJSON=Vn,t.geoJSON=Zn,t.geoJson=Kn,t.Layer=Tn,t.LayerGroup=Pn,t.layerGroup=function(t,e){return new Pn(t,e)},t.FeatureGroup=On,t.featureGroup=function(t,e){return new On(t,e)},t.ImageOverlay=Xn,t.imageOverlay=function(t,e,n){return new Xn(t,e,n)},t.VideoOverlay=Qn,t.videoOverlay=function(t,e,n){return new Qn(t,e,n)},t.SVGOverlay=Jn,t.svgOverlay=function(t,e,n){return new Jn(t,e,n)},t.DivOverlay=tr,t.Popup=er,t.popup=function(t,e){return new er(t,e)},t.Tooltip=nr,t.tooltip=function(t,e){return new nr(t,e)},t.Icon=An,t.icon=function(t){return new An(t)},t.DivIcon=rr,t.divIcon=function(t){return new rr(t)},t.Marker=In,t.marker=function(t,e){return new In(t,e)},t.TileLayer=or,t.tileLayer=sr,t.GridLayer=ir,t.gridLayer=function(t){return new ir(t)},t.SVG=fr,t.svg=mr,t.Renderer=lr,t.Canvas=ur,t.canvas=cr,t.Path=jn,t.CircleMarker=Dn,t.circleMarker=function(t,e){return new Dn(t,e)},t.Circle=Nn,t.circle=function(t,e,n){return new Nn(t,e,n)},t.Polyline=Rn,t.polyline=function(t,e){return new Rn(t,e)},t.Polygon=Fn,t.polygon=function(t,e){return new Fn(t,e)},t.Rectangle=gr,t.rectangle=function(t,e){return new gr(t,e)},t.Map=Ye,t.map=function(t,e){return new Ye(t,e)};var kr=window.L;t.noConflict=function(){return window.L=kr,this},window.L=t})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSVideoPlayer=e():t.HSVideoPlayer=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="./src/js/hs-video-player.js")}({"./src/js/hs-video-player.js":
|
||
/*!***********************************!*\
|
||
!*** ./src/js/hs-video-player.js ***!
|
||
\***********************************/
|
||
/*! exports provided: default */function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.r(e),n.d(e,"default",(function(){return o}));
|
||
/*
|
||
* HSVideoPlayer Plugin
|
||
* @version: 3.0.0 (Wed, 17 Mar 2021)
|
||
* @author: HtmlStream
|
||
* @event-namespace: .HSVideoPlayer
|
||
* @license: Htmlstream Libraries (https://htmlstream.com/)
|
||
* Copyright 2021 Htmlstream
|
||
*/
|
||
var i={parentSelector:null,targetSelector:null,classMap:{toggle:"video-player-played"},videoType:"you-tube",videoId:null,isAutoplay:!1,isMuted:!1,youTubeAPISrc:"//www.youtube.com/player_api",isYouTubeAPICreated:!1,vimeoAPISrc:"//player.vimeo.com/api/player.js",isVimeoAPICreated:!1},o=function(){function t(e,n,r){var i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.collection=[],i=e instanceof HTMLElement?[e]:e instanceof Object?e:document.querySelectorAll(e);for(var o=0;o<i.length;o+=1)this.addToCollection(i[o],n,r||i[o].id);return!!this.collection.length&&(this._init(),this)}var e,n;return e=t,(n=[{key:"_init",value:function(){for(var t=this,e=function(e){var n,r=void 0;if(t.collection[e].hasOwnProperty("$initializedEl"))return"continue";r=t.collection[e].$el,"you-tube"===(n=t.collection[e].options).videoType&&t._youTubeAPI(r,n),"vimeo"===n.videoType&&t._vimeoAPI(r,n),r.addEventListener("click",(function(){document.querySelector(n.parentSelector).classList.toggle(n.classMap.toggle),"vimeo"===n.videoType?t._vimeoPlayer(r,n):"html5"===n.videoType?t._html5Player(r,n):t._youTubePlayer(r,n)})),t.collection[e].$initializedEl=n},n=0;n<t.collection.length;n+=1)e(n)}},{key:"_youTubeAPI",value:function(t,e){if(!e.isYouTubeAPICreated){var n=document.createElement("script"),r=document.getElementsByTagName("script")[0];n.src=e.youTubeAPISrc,r.parentNode.insertBefore(n,r),e.isYouTubeAPICreated=!0}}},{key:"_vimeoAPI",value:function(t,e){if(!e.isVimeoAPICreated){var n=document.createElement("script"),r=document.querySelector("script");n.src=e.vimeoAPISrc,r.parentNode.insertBefore(n,r),e.isVimeoAPICreated=!0}}},{key:"_youTubePlayer",value:function(t,e){var n=Object.assign({},{videoId:e.videoId,playerVars:{origin:window.location.origin,autoplay:!0===e.isAutoplay?1:0}},e.specificAPIOptions);new YT.Player(e.targetSelector.slice(1,e.targetSelector.length),n)}},{key:"_vimeoPlayer",value:function(t,e){var n=Object.assign({},{id:e.videoId,autoplay:!0===e.isAutoplay?1:0,muted:!0===e.isMuted?1:0},e.specificAPIOptions),r=document.getElementById(e.targetSelector.slice(1,e.targetSelector.length));new Vimeo.Player(r,n).on("loaded",(function(){var t=r.querySelector("iframe");t.style.height="100%",t.style.width="100%"}))}},{key:"_html5Player",value:function(t,e){document.querySelector(e.targetSelector).insertAdjacentHTML("beforeend",'\n\t\t\t\t<video class="pfx-hero-bg-video__item" style="width:100%;height:100%;" playsinline '.concat(!0===e.isAutoplay?"autoplay ":"").concat(!0===e.isMuted?"muted ":"").concat(!0===e.isLoop?"loop":"",'>\n\t\t\t\t\t<source src="').concat(e.videoId,'.mp4" type="video/mp4">\n\t\t\t\t\t<source src="').concat(e.videoId,'.ogg" type="video/ogg">\n\t\t\t\t\t<source src="').concat(e.videoId,'.webm" type="video/webm">\n\t\t\t\t\tYour browser doesn\'t support HTML5 video tag.\n\t\t\t\t</video>'))}},{key:"addToCollection",value:function(t,e,n){this.collection.push({$el:t,id:n||null,options:Object.assign({},i,t.hasAttribute("data-hs-video-player-options")?JSON.parse(t.getAttribute("data-hs-video-player-options")):{},e)})}},{key:"getItem",value:function(t){return"number"==typeof t?this.collection[t].$initializedEl:this.collection.find((function(e){return e.id===t})).$initializedEl}}])&&r(e.prototype,n),t}()}}).default})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSTogglePassword=e():t.HSTogglePassword=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="./src/js/hs-toggle-password.js")}({"./src/js/hs-toggle-password.js":
|
||
/*!**************************************!*\
|
||
!*** ./src/js/hs-toggle-password.js ***!
|
||
\**************************************/
|
||
/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _default; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n* HSTogglePassword Plugin\n* @version: 1.0.0 (Sat, 30 Jul 2021)\n* @requires: tom-select 1.7.26\n* @author: HtmlStream\n* @event-namespace: .HSTogglePassword\n* @license: Htmlstream Libraries (https://htmlstream.com/)\n* Copyright 2021 Htmlstream\n*/\nvar dataAttributeName = \'data-hs-toggle-password-options\';\nvar defaults = {\n classChangeTarget: null,\n defaultClass: null,\n showClass: null,\n show: false\n};\n\nvar _default = /*#__PURE__*/function () {\n function _default(el, options, id) {\n _classCallCheck(this, _default);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(_default, [{\n key: "_init",\n value: function _init() {\n var that = this;\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty(\'$initializedEl\')) {\n continue;\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options;\n\n if (Array.isArray(_options.target)) {\n (function () {\n var targets = [];\n\n _options.target.forEach(function (target) {\n targets.push(document.querySelector(target));\n });\n\n _options.target = targets;\n _options.classChangeTarget = _options.classChangeTarget ? document.querySelector(_options.classChangeTarget) : _options.target;\n })();\n } else {\n _options.target = document.querySelector(_options.target);\n _options.classChangeTarget = _options.classChangeTarget ? document.querySelector(_options.classChangeTarget) : _options.target;\n }\n\n if (_options.show) {\n _$el.type = "text";\n }\n\n that._toggleClass(_options, _options.show);\n\n that._showPassword(_$el, _options);\n }\n }\n }, {\n key: "_showPassword",\n value: function _showPassword(el, config) {\n var that = this,\n $target = config.target;\n\n if (Array.isArray($target)) {\n $target.forEach(function (target) {\n target.addEventListener(\'click\', function (event) {\n if (el.type === "password") {\n el.type = "text";\n\n that._toggleClass(config, true);\n } else {\n el.type = "password";\n\n that._toggleClass(config, false);\n }\n });\n });\n } else {\n $target.addEventListener(\'click\', function (event) {\n if (el.type === "password") {\n el.type = "text";\n\n that._toggleClass(config, true);\n } else {\n el.type = "password";\n\n that._toggleClass(config, false);\n }\n });\n }\n }\n }, {\n key: "_toggleClass",\n value: function _toggleClass(config) {\n var _this = this;\n\n var isShow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var that = this,\n $target = config.classChangeTarget;\n\n if (Array.isArray($target)) {\n $target.forEach(function (target) {\n if (isShow) {\n _this._removeClasses(target, config.defaultClass);\n\n _this._addClasses(target, config.showClass);\n } else {\n _this._removeClasses(target, config.showClass);\n\n _this._addClasses(target, config.defaultClass);\n }\n });\n } else {\n if (isShow) {\n this._removeClasses($target, config.defaultClass);\n\n this._addClasses($target, config.showClass);\n } else {\n this._removeClasses($target, config.showClass);\n\n this._addClasses($target, config.defaultClass);\n }\n }\n }\n }, {\n key: "_addClasses",\n value: function _addClasses($target, classes) {\n if (classes && classes.trim().indexOf(\' \') != -1) {\n var array = classes.split(\' \');\n\n for (var i = 0, length = array.length; i < length; i++) {\n $target.classList.add(array[i]);\n }\n } else {\n $target.classList.add(classes);\n }\n }\n }, {\n key: "_removeClasses",\n value: function _removeClasses($target, classes) {\n if (classes && classes.trim().indexOf(\' \') != -1) {\n var array = classes.split(\' \');\n\n for (var i = 0, length = array.length; i < length; i++) {\n $target.classList.remove(array[i]);\n }\n } else {\n $target.classList.remove(classes);\n }\n }\n }, {\n key: "addToCollection",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: Object.assign({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: "getItem",\n value: function getItem(item) {\n if (typeof item === \'number\') {\n return this.collection[item].$initializedEl;\n } else {\n return this.collection.find(function (el) {\n return el.id === item;\n }).$initializedEl;\n }\n }\n }]);\n\n return _default;\n}();\n\n\n\n//# sourceURL=webpack://HSTogglePassword/./src/js/hs-toggle-password.js?')}}).default}));var countdown=function(t){"use strict";var e=Math.ceil,n=Math.floor;function r(t,e){var n=t.getTime();return t.setMonth(t.getMonth()+e),Math.round((t.getTime()-n)/864e5)}function i(t){var e=t.getTime(),n=new Date(e);return n.setMonth(t.getMonth()+1),Math.round((n.getTime()-e)/864e5)}function o(t,e){if(e=e instanceof Date||null!==e&&isFinite(e)?new Date(+e):new Date,!t)return e;var n=+t.value||0;return n?(e.setTime(e.getTime()+n),e):((n=+t.milliseconds||0)&&e.setMilliseconds(e.getMilliseconds()+n),(n=+t.seconds||0)&&e.setSeconds(e.getSeconds()+n),(n=+t.minutes||0)&&e.setMinutes(e.getMinutes()+n),(n=+t.hours||0)&&e.setHours(e.getHours()+n),(n=+t.weeks||0)&&(n*=7),(n+=+t.days||0)&&e.setDate(e.getDate()+n),(n=+t.months||0)&&e.setMonth(e.getMonth()+n),(n=+t.millennia||0)&&(n*=10),(n+=+t.centuries||0)&&(n*=10),(n+=+t.decades||0)&&(n*=10),(n+=+t.years||0)&&e.setFullYear(e.getFullYear()+n),e)}var s,a,l,u,c,d,h,p;function f(t,e){return h(t)+(1===t?s[e]:a[e])}function m(){}function g(t,e,n,r,o,s){return t[n]>=0&&(e+=t[n],delete t[n]),(e/=o)+1<=1?0:t[r]>=0?(t[r]=+(t[r]+e).toFixed(s),function(t,e){switch(e){case"seconds":if(60!==t.seconds||isNaN(t.minutes))return;t.minutes++,t.seconds=0;case"minutes":if(60!==t.minutes||isNaN(t.hours))return;t.hours++,t.minutes=0;case"hours":if(24!==t.hours||isNaN(t.days))return;t.days++,t.hours=0;case"days":if(7!==t.days||isNaN(t.weeks))return;t.weeks++,t.days=0;case"weeks":if(t.weeks!==i(t.refMonth)/7||isNaN(t.months))return;t.months++,t.weeks=0;case"months":if(12!==t.months||isNaN(t.years))return;t.years++,t.months=0;case"years":if(10!==t.years||isNaN(t.decades))return;t.decades++,t.years=0;case"decades":if(10!==t.decades||isNaN(t.centuries))return;t.centuries++,t.decades=0;case"centuries":if(10!==t.centuries||isNaN(t.millennia))return;t.millennia++,t.centuries=0}}(t,r),0):e}function v(t,e){var n,r,o,s=g(t,0,"milliseconds","seconds",1e3,e);if(s&&((s=g(t,s,"seconds","minutes",60,e))&&(s=g(t,s,"minutes","hours",60,e))&&(s=g(t,s,"hours","days",24,e))&&(s=g(t,s,"days","weeks",7,e))&&(s=g(t,s,"weeks","months",i(t.refMonth)/7,e))&&(s=g(t,s,"months","years",(n=t.refMonth,r=n.getTime(),(o=new Date(r)).setFullYear(n.getFullYear()+1),Math.round((o.getTime()-r)/864e5)/i(t.refMonth)),e))&&(s=g(t,s,"years","decades",10,e))&&(s=g(t,s,"decades","centuries",10,e))&&(s=g(t,s,"centuries","millennia",10,e))))throw new Error("Fractional unit overflow")}function y(t,i,o,s,a,l){var u=new Date;if(t.start=i=i||u,t.end=o=o||u,t.units=s,t.value=o.getTime()-i.getTime(),t.value<0){var c=o;o=i,i=c}t.refMonth=new Date(i.getFullYear(),i.getMonth(),15,12,0,0);try{t.millennia=0,t.centuries=0,t.decades=0,t.years=o.getFullYear()-i.getFullYear(),t.months=o.getMonth()-i.getMonth(),t.weeks=0,t.days=o.getDate()-i.getDate(),t.hours=o.getHours()-i.getHours(),t.minutes=o.getMinutes()-i.getMinutes(),t.seconds=o.getSeconds()-i.getSeconds(),t.milliseconds=o.getMilliseconds()-i.getMilliseconds(),function(t){var i;for(t.milliseconds<0?(i=e(-t.milliseconds/1e3),t.seconds-=i,t.milliseconds+=1e3*i):t.milliseconds>=1e3&&(t.seconds+=n(t.milliseconds/1e3),t.milliseconds%=1e3),t.seconds<0?(i=e(-t.seconds/60),t.minutes-=i,t.seconds+=60*i):t.seconds>=60&&(t.minutes+=n(t.seconds/60),t.seconds%=60),t.minutes<0?(i=e(-t.minutes/60),t.hours-=i,t.minutes+=60*i):t.minutes>=60&&(t.hours+=n(t.minutes/60),t.minutes%=60),t.hours<0?(i=e(-t.hours/24),t.days-=i,t.hours+=24*i):t.hours>=24&&(t.days+=n(t.hours/24),t.hours%=24);t.days<0;)t.months--,t.days+=r(t.refMonth,1);t.days>=7&&(t.weeks+=n(t.days/7),t.days%=7),t.months<0?(i=e(-t.months/12),t.years-=i,t.months+=12*i):t.months>=12&&(t.years+=n(t.months/12),t.months%=12),t.years>=10&&(t.decades+=n(t.years/10),t.years%=10,t.decades>=10&&(t.centuries+=n(t.decades/10),t.decades%=10,t.centuries>=10&&(t.millennia+=n(t.centuries/10),t.centuries%=10)))}(t),function(t,e,i,o){var s=0;!(1024&e)||s>=i?(t.centuries+=10*t.millennia,delete t.millennia):t.millennia&&s++,!(512&e)||s>=i?(t.decades+=10*t.centuries,delete t.centuries):t.centuries&&s++,!(256&e)||s>=i?(t.years+=10*t.decades,delete t.decades):t.decades&&s++,!(128&e)||s>=i?(t.months+=12*t.years,delete t.years):t.years&&s++,!(64&e)||s>=i?(t.months&&(t.days+=r(t.refMonth,t.months)),delete t.months,t.days>=7&&(t.weeks+=n(t.days/7),t.days%=7)):t.months&&s++,!(32&e)||s>=i?(t.days+=7*t.weeks,delete t.weeks):t.weeks&&s++,!(16&e)||s>=i?(t.hours+=24*t.days,delete t.days):t.days&&s++,!(8&e)||s>=i?(t.minutes+=60*t.hours,delete t.hours):t.hours&&s++,!(4&e)||s>=i?(t.seconds+=60*t.minutes,delete t.minutes):t.minutes&&s++,!(2&e)||s>=i?(t.milliseconds+=1e3*t.seconds,delete t.seconds):t.seconds&&s++,1&e&&!(s>=i)||v(t,o)}(t,s,a,l)}finally{delete t.refMonth}return t}function _(t,e,n,r,i){var s;n=+n||222,r=r>0?r:NaN,i=i>0?i<20?Math.round(i):20:0;var a=null;"function"==typeof t?(s=t,t=null):t instanceof Date||(null!==t&&isFinite(t)?t=new Date(+t):("object"==typeof a&&(a=t),t=null));var l=null;if("function"==typeof e?(s=e,e=null):e instanceof Date||(null!==e&&isFinite(e)?e=new Date(+e):("object"==typeof e&&(l=e),e=null)),a&&(t=o(a,e)),l&&(e=o(l,t)),!t&&!e)return new m;if(!s)return y(new m,t,e,n,r,i);var u,c=function(t){return 1&t?1e3/30:2&t?1e3:4&t?6e4:8&t?36e5:16&t?864e5:6048e5}(n),d=function(){s(y(new m,t,e,n,r,i),u)};return d(),u=setInterval(d,c)}m.prototype.toString=function(t){var e=p(this),n=e.length;if(!n)return t?""+t:c;if(1===n)return e[0];var r=l+e.pop();return e.join(u)+r},m.prototype.toHTML=function(t,e){t=t||"span";var n=p(this),r=n.length;if(!r)return(e=e||c)?"<"+t+">"+e+"</"+t+">":e;for(var i=0;i<r;i++)n[i]="<"+t+">"+n[i]+"</"+t+">";if(1===r)return n[0];var o=l+n.pop();return n.join(u)+o},m.prototype.addTo=function(t){return o(this,t)},p=function(t){var e=[],n=t.millennia;return n&&e.push(d(n,10)),(n=t.centuries)&&e.push(d(n,9)),(n=t.decades)&&e.push(d(n,8)),(n=t.years)&&e.push(d(n,7)),(n=t.months)&&e.push(d(n,6)),(n=t.weeks)&&e.push(d(n,5)),(n=t.days)&&e.push(d(n,4)),(n=t.hours)&&e.push(d(n,3)),(n=t.minutes)&&e.push(d(n,2)),(n=t.seconds)&&e.push(d(n,1)),(n=t.milliseconds)&&e.push(d(n,0)),e},_.MILLISECONDS=1,_.SECONDS=2,_.MINUTES=4,_.HOURS=8,_.DAYS=16,_.WEEKS=32,_.MONTHS=64,_.YEARS=128,_.DECADES=256,_.CENTURIES=512,_.MILLENNIA=1024,_.DEFAULTS=222,_.ALL=2047;var b=_.setFormat=function(t){if(t){if("singular"in t||"plural"in t){var e=t.singular||[];e.split&&(e=e.split("|"));var n=t.plural||[];n.split&&(n=n.split("|"));for(var r=0;r<=10;r++)s[r]=e[r]||s[r],a[r]=n[r]||a[r]}"string"==typeof t.last&&(l=t.last),"string"==typeof t.delim&&(u=t.delim),"string"==typeof t.empty&&(c=t.empty),"function"==typeof t.formatNumber&&(h=t.formatNumber),"function"==typeof t.formatter&&(d=t.formatter)}},w=_.resetFormat=function(){s=" millisecond| second| minute| hour| day| week| month| year| decade| century| millennium".split("|"),a=" milliseconds| seconds| minutes| hours| days| weeks| months| years| decades| centuries| millennia".split("|"),l=" and ",u=", ",c="",h=function(t){return t},d=f};return _.setLabels=function(t,e,n,r,i,o,s){b({singular:t,plural:e,last:n,delim:r,empty:i,formatNumber:o,formatter:s})},_.resetLabels=w,w(),t&&t.exports?t.exports=_:"function"==typeof window.define&&void 0!==window.define.amd&&window.define("countdown",[],(function(){return _})),_}(module),List;!function(t,e){"object"==typeof exports&&void 0!==module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Shuffle=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=r(t);if(e){var s=r(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return o(this,n)}}var a={exports:{}};function l(){}l.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function i(){r.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],i=[];if(r&&e)for(var o=0,s=r.length;o<s;o++)r[o].fn!==e&&r[o].fn._!==e&&i.push(r[o]);return i.length?n[t]=i:delete n[t],this}},a.exports=l,a.exports.TinyEmitter=l;var u=a.exports,c="undefined"!=typeof Element?Element.prototype:{},d=c.matches||c.matchesSelector||c.webkitMatchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector,h=function(t,e){if(!t||1!==t.nodeType)return!1;if(d)return d.call(t,e);for(var n=t.parentNode.querySelectorAll(e),r=0;r<n.length;r++)if(n[r]==t)return!0;return!1};var p=function(t,e){var n,r,i,o,s=0;return function(){n=this,r=arguments;var t=new Date-s;return o||(t>=e?a():o=setTimeout(a,e-t)),i};function a(){o=0,s=+new Date,i=t.apply(n,r),n=null,r=null}};function f(){}function m(t){return parseFloat(t)||0}var g=function(){function e(n,r){t(this,e),this.x=m(n),this.y=m(r)}return n(e,null,[{key:"equals",value:function(t,e){return t.x===e.x&&t.y===e.y}}]),e}(),v=function(){function e(n,r,i,o,s){t(this,e),this.id=s,this.left=n,this.top=r,this.width=i,this.height=o}return n(e,null,[{key:"intersects",value:function(t,e){return t.left<e.left+e.width&&e.left<t.left+t.width&&t.top<e.top+e.height&&e.top<t.top+t.height}}]),e}(),y={BASE:"shuffle",SHUFFLE_ITEM:"shuffle-item",VISIBLE:"shuffle-item--visible",HIDDEN:"shuffle-item--hidden"},_=0,b=function(){function e(n,r){t(this,e),_+=1,this.id=_,this.element=n,this.isRTL=r,this.isVisible=!0,this.isHidden=!1}return n(e,[{key:"show",value:function(){this.isVisible=!0,this.element.classList.remove(y.HIDDEN),this.element.classList.add(y.VISIBLE),this.element.removeAttribute("aria-hidden")}},{key:"hide",value:function(){this.isVisible=!1,this.element.classList.remove(y.VISIBLE),this.element.classList.add(y.HIDDEN),this.element.setAttribute("aria-hidden",!0)}},{key:"init",value:function(){this.addClasses([y.SHUFFLE_ITEM,y.VISIBLE]),this.applyCss(e.Css.INITIAL),this.applyCss(this.isRTL?e.Css.DIRECTION.rtl:e.Css.DIRECTION.ltr),this.scale=e.Scale.VISIBLE,this.point=new g}},{key:"addClasses",value:function(t){var e=this;t.forEach((function(t){e.element.classList.add(t)}))}},{key:"removeClasses",value:function(t){var e=this;t.forEach((function(t){e.element.classList.remove(t)}))}},{key:"applyCss",value:function(t){var e=this;Object.keys(t).forEach((function(n){e.element.style[n]=t[n]}))}},{key:"dispose",value:function(){this.removeClasses([y.HIDDEN,y.VISIBLE,y.SHUFFLE_ITEM]),this.element.removeAttribute("style"),this.element=null}}]),e}();b.Css={INITIAL:{position:"absolute",top:0,visibility:"visible",willChange:"transform"},DIRECTION:{ltr:{left:0},rtl:{right:0}},VISIBLE:{before:{opacity:1,visibility:"visible"},after:{transitionDelay:""}},HIDDEN:{before:{opacity:0},after:{visibility:"hidden",transitionDelay:""}}},b.Scale={VISIBLE:1,HIDDEN:.001};var w=null,x=function(){if(null!==w)return w;var t=document.body||document.documentElement,e=document.createElement("div");e.style.cssText="width:10px;padding:2px;box-sizing:border-box;",t.appendChild(e);var n=window.getComputedStyle(e,null).width;return w=10===Math.round(m(n)),t.removeChild(e),w};function S(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.getComputedStyle(t,null),r=m(n[e]);return x()||"width"!==e?x()||"height"!==e||(r+=m(n.paddingTop)+m(n.paddingBottom)+m(n.borderTopWidth)+m(n.borderBottomWidth)):r+=m(n.paddingLeft)+m(n.paddingRight)+m(n.borderLeftWidth)+m(n.borderRightWidth),r}var k={reverse:!1,by:null,compare:null,randomize:!1,key:"element"};function C(t,e){var n=Object.assign({},k,e),r=Array.from(t),i=!1;return t.length?n.randomize?function(t){for(var e=t.length;e;){e-=1;var n=Math.floor(Math.random()*(e+1)),r=t[n];t[n]=t[e],t[e]=r}return t}(t):("function"==typeof n.by?t.sort((function(t,e){if(i)return 0;var r=n.by(t[n.key]),o=n.by(e[n.key]);return void 0===r&&void 0===o?(i=!0,0):r<o||"sortFirst"===r||"sortLast"===o?-1:r>o||"sortLast"===r||"sortFirst"===o?1:0})):"function"==typeof n.compare&&t.sort(n.compare),i?r:(n.reverse&&t.reverse(),t)):[]}var E={},T=0;function P(t){return!!E[t]&&(E[t].element.removeEventListener("transitionend",E[t].listener),E[t]=null,!0)}function O(t,e){var n="transitionend"+(T+=1),r=function(t){t.currentTarget===t.target&&(P(n),e(t))};return t.addEventListener("transitionend",r),E[n]={element:t,listener:r},n}function A(t){return Math.max.apply(Math,t)}function M(t,e,n,r){var i=t/e;return Math.abs(Math.round(i)-i)<r&&(i=Math.round(i)),Math.min(Math.ceil(i),n)}function L(t,e,n){if(1===e)return t;for(var r=[],i=0;i<=n-e;i++)r.push(A(t.slice(i,i+e)));return r}function I(t,e){for(var n,r=(n=t,Math.min.apply(Math,n)),i=0,o=t.length;i<o;i++)if(t[i]>=r-e&&t[i]<=r+e)return i;return 0}function j(t,e){var n={};t.forEach((function(t){n[t.top]?n[t.top].push(t):n[t.top]=[t]}));var r=[],i=[],o=[];return Object.keys(n).forEach((function(t){var s=n[t];i.push(s);var a,l=s[s.length-1],u=l.left+l.width,c=Math.round((e-u)/2),d=s,h=!1;if(c>0){var p=[];(h=s.every((function(t){var e=new v(t.left+c,t.top,t.width,t.height,t.id),n=!r.some((function(t){return v.intersects(e,t)}));return p.push(e),n})))&&(d=p)}if(!h&&s.some((function(t){return r.some((function(e){var n=v.intersects(t,e);return n&&(a=e),n}))}))){var f=o.findIndex((function(t){return t.includes(a)}));o.splice(f,1,i[f])}r=r.concat(d),o.push(d)})),[].concat.apply([],o).sort((function(t,e){return t.id-e.id})).map((function(t){return new g(t.left,t.top)}))}function D(t){return Array.from(new Set(t))}var N=0,R=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(o,e);var r=s(o);function o(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,o),(n=r.call(this)).options=Object.assign({},o.options,i),n.options.delimeter&&(n.options.delimiter=n.options.delimeter),n.lastSort={},n.group=o.ALL_ITEMS,n.lastFilter=o.ALL_ITEMS,n.isEnabled=!0,n.isDestroyed=!1,n.isInitialized=!1,n._transitions=[],n.isTransitioning=!1,n._queue=[];var s=n._getElementOption(e);if(!s)throw new TypeError("Shuffle needs to be initialized with an element.");return n.element=s,n.id="shuffle_"+N,N+=1,n._init(),n.isInitialized=!0,n}return n(o,[{key:"_init",value:function(){if(this.items=this._getItems(),this.sortedItems=this.items,this.options.sizer=this._getElementOption(this.options.sizer),this.element.classList.add(o.Classes.BASE),this._initItems(this.items),this._onResize=this._getResizeFunction(),window.addEventListener("resize",this._onResize),"complete"!==document.readyState){var t=this.layout.bind(this);window.addEventListener("load",(function e(){window.removeEventListener("load",e),t()}))}var e=window.getComputedStyle(this.element,null),n=o.getSize(this.element).width;this._validateStyles(e),this._setColumns(n),this.filter(this.options.group,this.options.initialSort),this.element.offsetWidth,this.setItemTransitions(this.items),this.element.style.transition="height ".concat(this.options.speed,"ms ").concat(this.options.easing)}},{key:"_getResizeFunction",value:function(){var t=this._handleResize.bind(this);return this.options.throttle?this.options.throttle(t,this.options.throttleTime):t}},{key:"_getElementOption",value:function(t){return"string"==typeof t?this.element.querySelector(t):t&&t.nodeType&&1===t.nodeType?t:t&&t.jquery?t[0]:null}},{key:"_validateStyles",value:function(t){"static"===t.position&&(this.element.style.position="relative"),"hidden"!==t.overflow&&(this.element.style.overflow="hidden")}},{key:"_filter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lastFilter,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.items,n=this._getFilteredSets(t,e);return this._toggleFilterClasses(n),this.lastFilter=t,"string"==typeof t&&(this.group=t),n}},{key:"_getFilteredSets",value:function(t,e){var n=this,r=[],i=[];return t===o.ALL_ITEMS?r=e:e.forEach((function(e){n._doesPassFilter(t,e.element)?r.push(e):i.push(e)})),{visible:r,hidden:i}}},{key:"_doesPassFilter",value:function(t,e){if("function"==typeof t)return t.call(e,e,this);var n=e.getAttribute("data-"+o.FILTER_ATTRIBUTE_KEY),r=this.options.delimiter?n.split(this.options.delimiter):JSON.parse(n);function i(t){return r.includes(t)}return Array.isArray(t)?this.options.filterMode===o.FilterMode.ANY?t.some(i):t.every(i):r.includes(t)}},{key:"_toggleFilterClasses",value:function(t){var e=t.visible,n=t.hidden;e.forEach((function(t){t.show()})),n.forEach((function(t){t.hide()}))}},{key:"_initItems",value:function(t){t.forEach((function(t){t.init()}))}},{key:"_disposeItems",value:function(t){t.forEach((function(t){t.dispose()}))}},{key:"_updateItemCount",value:function(){this.visibleItems=this._getFilteredItems().length}},{key:"setItemTransitions",value:function(t){var e=this.options,n=e.speed,r=e.easing,i=this.options.useTransforms?["transform"]:["top","left"],o=Object.keys(b.Css.HIDDEN.before).map((function(t){return t.replace(/([A-Z])/g,(function(t,e){return"-".concat(e.toLowerCase())}))})),s=i.concat(o).join();t.forEach((function(t){t.element.style.transitionDuration=n+"ms",t.element.style.transitionTimingFunction=r,t.element.style.transitionProperty=s}))}},{key:"_getItems",value:function(){var t=this;return Array.from(this.element.children).filter((function(e){return h(e,t.options.itemSelector)})).map((function(e){return new b(e,t.options.isRTL)}))}},{key:"_mergeNewItems",value:function(t){var e=Array.from(this.element.children);return C(this.items.concat(t),{by:function(t){return e.indexOf(t)}})}},{key:"_getFilteredItems",value:function(){return this.items.filter((function(t){return t.isVisible}))}},{key:"_getConcealedItems",value:function(){return this.items.filter((function(t){return!t.isVisible}))}},{key:"_getColumnSize",value:function(t,e){var n;return 0===(n="function"==typeof this.options.columnWidth?this.options.columnWidth(t):this.options.sizer?o.getSize(this.options.sizer).width:this.options.columnWidth?this.options.columnWidth:this.items.length>0?o.getSize(this.items[0].element,!0).width:t)&&(n=t),n+e}},{key:"_getGutterSize",value:function(t){return"function"==typeof this.options.gutterWidth?this.options.gutterWidth(t):this.options.sizer?S(this.options.sizer,"marginLeft"):this.options.gutterWidth}},{key:"_setColumns",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.getSize(this.element).width,e=this._getGutterSize(t),n=this._getColumnSize(t,e),r=(t+e)/n;Math.abs(Math.round(r)-r)<this.options.columnThreshold&&(r=Math.round(r)),this.cols=Math.max(Math.floor(r||0),1),this.containerWidth=t,this.colWidth=n}},{key:"_setContainerSize",value:function(){this.element.style.height=this._getContainerSize()+"px"}},{key:"_getContainerSize",value:function(){return A(this.positions)}},{key:"_getStaggerAmount",value:function(t){return Math.min(t*this.options.staggerAmount,this.options.staggerAmountMax)}},{key:"_dispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.isDestroyed||(e.shuffle=this,this.emit(t,e))}},{key:"_resetCols",value:function(){var t=this.cols;for(this.positions=[];t;)t-=1,this.positions.push(0)}},{key:"_layout",value:function(t){var e=this,n=this._getNextPositions(t),r=0;t.forEach((function(t,i){function o(){t.applyCss(b.Css.VISIBLE.after)}if(g.equals(t.point,n[i])&&!t.isHidden)return t.applyCss(b.Css.VISIBLE.before),void o();t.point=n[i],t.scale=b.Scale.VISIBLE,t.isHidden=!1;var s=e.getStylesForTransition(t,b.Css.VISIBLE.before);s.transitionDelay=e._getStaggerAmount(r)+"ms",e._queue.push({item:t,styles:s,callback:o}),r+=1}))}},{key:"_getNextPositions",value:function(t){var e=this;if(this.options.isCentered){var n=t.map((function(t,n){var r=o.getSize(t.element,!0),i=e._getItemPosition(r);return new v(i.x,i.y,r.width,r.height,n)}));return this.getTransformedPositions(n,this.containerWidth)}return t.map((function(t){return e._getItemPosition(o.getSize(t.element,!0))}))}},{key:"_getItemPosition",value:function(t){return function(t){for(var e=t.itemSize,n=t.positions,r=t.gridSize,i=t.total,o=t.threshold,s=t.buffer,a=M(e.width,r,i,o),l=L(n,a,i),u=I(l,s),c=new g(r*u,l[u]),d=l[u]+e.height,h=0;h<a;h++)n[u+h]=d;return c}({itemSize:t,positions:this.positions,gridSize:this.colWidth,total:this.cols,threshold:this.options.columnThreshold,buffer:this.options.buffer})}},{key:"getTransformedPositions",value:function(t,e){return j(t,e)}},{key:"_shrink",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getConcealedItems(),n=0;e.forEach((function(e){function r(){e.applyCss(b.Css.HIDDEN.after)}if(e.isHidden)return e.applyCss(b.Css.HIDDEN.before),void r();e.scale=b.Scale.HIDDEN,e.isHidden=!0;var i=t.getStylesForTransition(e,b.Css.HIDDEN.before);i.transitionDelay=t._getStaggerAmount(n)+"ms",t._queue.push({item:e,styles:i,callback:r}),n+=1}))}},{key:"_handleResize",value:function(){this.isEnabled&&!this.isDestroyed&&this.update()}},{key:"getStylesForTransition",value:function(t,e){var n=Object.assign({},e);if(this.options.useTransforms){var r=this.options.isRTL?"-":"",i=this.options.roundTransforms?Math.round(t.point.x):t.point.x,o=this.options.roundTransforms?Math.round(t.point.y):t.point.y;n.transform="translate(".concat(r).concat(i,"px, ").concat(o,"px) scale(").concat(t.scale,")")}else this.options.isRTL?n.right=t.point.x+"px":n.left=t.point.x+"px",n.top=t.point.y+"px";return n}},{key:"_whenTransitionDone",value:function(t,e,n){var r=O(t,(function(t){e(),n(null,t)}));this._transitions.push(r)}},{key:"_getTransitionFunction",value:function(t){var e=this;return function(n){t.item.applyCss(t.styles),e._whenTransitionDone(t.item.element,t.callback,n)}}},{key:"_processQueue",value:function(){this.isTransitioning&&this._cancelMovement();var t=this.options.speed>0,e=this._queue.length>0;e&&t&&this.isInitialized?this._startTransitions(this._queue):e?(this._styleImmediately(this._queue),this._dispatch(o.EventType.LAYOUT)):this._dispatch(o.EventType.LAYOUT),this._queue.length=0}},{key:"_startTransitions",value:function(t){var e=this;this.isTransitioning=!0,function(t,e,n){n||("function"==typeof e?(n=e,e=null):n=f);var r=t&&t.length;if(!r)return n(null,[]);var i=!1,o=new Array(r);function s(t){return function(e,s){if(!i){if(e)return n(e,o),void(i=!0);o[t]=s,--r||n(null,o)}}}t.forEach(e?function(t,n){t.call(e,s(n))}:function(t,e){t(s(e))})}(t.map((function(t){return e._getTransitionFunction(t)})),this._movementFinished.bind(this))}},{key:"_cancelMovement",value:function(){this._transitions.forEach(P),this._transitions.length=0,this.isTransitioning=!1}},{key:"_styleImmediately",value:function(t){if(t.length){var e=t.map((function(t){return t.item.element}));o._skipTransitions(e,(function(){t.forEach((function(t){t.item.applyCss(t.styles),t.callback()}))}))}}},{key:"_movementFinished",value:function(){this._transitions.length=0,this.isTransitioning=!1,this._dispatch(o.EventType.LAYOUT)}},{key:"filter",value:function(t,e){this.isEnabled&&((!t||t&&0===t.length)&&(t=o.ALL_ITEMS),this._filter(t),this._shrink(),this._updateItemCount(),this.sort(e))}},{key:"sort",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lastSort;if(this.isEnabled){this._resetCols();var e=C(this._getFilteredItems(),t);this.sortedItems=e,this._layout(e),this._processQueue(),this._setContainerSize(),this.lastSort=t}}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isEnabled&&(t||this._setColumns(),this.sort())}},{key:"layout",value:function(){this.update(!0)}},{key:"add",value:function(t){var e=this,n=D(t).map((function(t){return new b(t,e.options.isRTL)}));this._initItems(n),this._resetCols();var r=C(this._mergeNewItems(n),this.lastSort),i=this._filter(this.lastFilter,r),o=function(t){return n.includes(t)},s=function(t){t.scale=b.Scale.HIDDEN,t.isHidden=!0,t.applyCss(b.Css.HIDDEN.before),t.applyCss(b.Css.HIDDEN.after)},a=this._getNextPositions(i.visible);i.visible.forEach((function(t,n){o(t)&&(t.point=a[n],s(t),t.applyCss(e.getStylesForTransition(t,{})))})),i.hidden.forEach((function(t){o(t)&&s(t)})),this.element.offsetWidth,this.setItemTransitions(n),this.items=this._mergeNewItems(n),this.filter(this.lastFilter)}},{key:"disable",value:function(){this.isEnabled=!1}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isEnabled=!0,t&&this.update()}},{key:"remove",value:function(t){var e=this;if(t.length){var n=D(t),r=n.map((function(t){return e.getItemByElement(t)})).filter((function(t){return!!t}));this._toggleFilterClasses({visible:[],hidden:r}),this._shrink(r),this.sort(),this.items=this.items.filter((function(t){return!r.includes(t)})),this._updateItemCount(),this.once(o.EventType.LAYOUT,(function(){e._disposeItems(r),n.forEach((function(t){t.parentNode.removeChild(t)})),e._dispatch(o.EventType.REMOVED,{collection:n})}))}}},{key:"getItemByElement",value:function(t){return this.items.find((function(e){return e.element===t}))}},{key:"resetItems",value:function(){var t=this;this._disposeItems(this.items),this.isInitialized=!1,this.items=this._getItems(),this._initItems(this.items),this.once(o.EventType.LAYOUT,(function(){t.setItemTransitions(t.items),t.isInitialized=!0})),this.filter(this.lastFilter)}},{key:"destroy",value:function(){this._cancelMovement(),window.removeEventListener("resize",this._onResize),this.element.classList.remove("shuffle"),this.element.removeAttribute("style"),this._disposeItems(this.items),this.items.length=0,this._transitions.length=0,this.options.sizer=null,this.element=null,this.isDestroyed=!0,this.isEnabled=!1}}],[{key:"getSize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=window.getComputedStyle(t,null),r=S(t,"width",n),i=S(t,"height",n);if(e){var o=S(t,"marginLeft",n),s=S(t,"marginRight",n),a=S(t,"marginTop",n),l=S(t,"marginBottom",n);r+=o+s,i+=a+l}return{width:r,height:i}}},{key:"_skipTransitions",value:function(t,e){var n=t.map((function(t){var e=t.style,n=e.transitionDuration,r=e.transitionDelay;return e.transitionDuration="0ms",e.transitionDelay="0ms",{duration:n,delay:r}}));e(),t[0].offsetWidth,t.forEach((function(t,e){t.style.transitionDuration=n[e].duration,t.style.transitionDelay=n[e].delay}))}}]),o}(u);return R.ShuffleItem=b,R.ALL_ITEMS="all",R.FILTER_ATTRIBUTE_KEY="groups",R.EventType={LAYOUT:"shuffle:layout",REMOVED:"shuffle:removed"},R.Classes=y,R.FilterMode={ANY:"any",ALL:"all"},R.options={group:R.ALL_ITEMS,speed:250,easing:"cubic-bezier(0.4, 0.0, 0.2, 1)",itemSelector:"*",sizer:null,gutterWidth:0,columnWidth:0,delimiter:null,buffer:0,columnThreshold:.01,initialSort:null,throttle:p,throttleTime:300,staggerAmount:15,staggerAmountMax:150,useTransforms:!0,filterMode:R.FilterMode.ANY,isCentered:!1,isRTL:!1,roundTransforms:!0},R.Point=g,R.Rect=v,R.__sorter=C,R.__getColumnSpan=M,R.__getAvailablePositions=L,R.__getShortColumn=I,R.__getCenteredPositions=j,R})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSCountCharacters=e():t.HSCountCharacters=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="./src/js/hs-count-characters.js")}({"./src/js/hs-count-characters.js":
|
||
/*!***************************************!*\
|
||
!*** ./src/js/hs-count-characters.js ***!
|
||
\***************************************/
|
||
/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSCountCharacters; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n* HSCountCharacters Plugin\n* @version: 1.0.1 (Sun, 1 Aug 2021)\n* @author: HtmlStream\n* @event-namespace: .HSCountCharacters\n* @license: Htmlstream Libraries (https://htmlstream.com/)\n* Copyright 2021 Htmlstream\n*/\nvar dataAttributeName = \'data-hs-count-characters-options\';\nvar defaults = {};\n\nvar HSCountCharacters = /*#__PURE__*/function () {\n function HSCountCharacters(el, options, id) {\n _classCallCheck(this, HSCountCharacters);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(HSCountCharacters, [{\n key: "_init",\n value: function _init() {\n var that = this;\n\n var _loop = function _loop(i) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty(\'$initializedEl\')) {\n return "continue";\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options;\n _options.output = document.querySelector(_options.output);\n _options.maxLength = _$el.hasAttribute(\'maxlength\') ? \'/ \' + _$el.getAttribute(\'maxlength\') : \'\';\n\n that._updateOutput(_$el, _options);\n\n _$el.addEventListener(\'input\', function () {\n that._updateOutput(_$el, _options);\n });\n\n that.collection[i].$initializedEl = _options;\n };\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var _ret = _loop(i);\n\n if (_ret === "continue") continue;\n }\n }\n }, {\n key: "_updateOutput",\n value: function _updateOutput($el, settings) {\n settings.output.innerHTML = "".concat($el.value.length, " ").concat(settings.maxLength);\n }\n }, {\n key: "addToCollection",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: Object.assign({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: "getItem",\n value: function getItem(item) {\n if (typeof item === \'number\') {\n return this.collection[item].$initializedEl;\n } else {\n return this.collection.find(function (el) {\n return el.id === item;\n }).$initializedEl;\n }\n }\n }]);\n\n return HSCountCharacters;\n}();\n\n\n\n//# sourceURL=webpack://HSCountCharacters/./src/js/hs-count-characters.js?')}}).default})),function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(self,(function(){return function(){var t={3099:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},6077:function(t,e,n){var r=n(111);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},1223:function(t,e,n){var r=n(5112),i=n(30),o=n(3070),s=r("unscopables"),a=Array.prototype;null==a[s]&&o.f(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},1530:function(t,e,n){"use strict";var r=n(8710).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},5787:function(t){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},9670:function(t,e,n){var r=n(111);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},4019:function(t){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},260:function(t,e,n){"use strict";var r,i=n(4019),o=n(9781),s=n(7854),a=n(111),l=n(6656),u=n(648),c=n(8880),d=n(1320),h=n(3070).f,p=n(9518),f=n(7674),m=n(5112),g=n(9711),v=s.Int8Array,y=v&&v.prototype,_=s.Uint8ClampedArray,b=_&&_.prototype,w=v&&p(v),x=y&&p(y),S=Object.prototype,k=S.isPrototypeOf,C=m("toStringTag"),E=g("TYPED_ARRAY_TAG"),T=i&&!!f&&"Opera"!==u(s.opera),P=!1,O={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},A={BigInt64Array:8,BigUint64Array:8},M=function(t){if(!a(t))return!1;var e=u(t);return l(O,e)||l(A,e)};for(r in O)s[r]||(T=!1);if((!T||"function"!=typeof w||w===Function.prototype)&&(w=function(){throw TypeError("Incorrect invocation")},T))for(r in O)s[r]&&f(s[r],w);if((!T||!x||x===S)&&(x=w.prototype,T))for(r in O)s[r]&&f(s[r].prototype,x);if(T&&p(b)!==x&&f(b,x),o&&!l(x,C))for(r in P=!0,h(x,C,{get:function(){return a(this)?this[E]:void 0}}),O)s[r]&&c(s[r],E,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:T,TYPED_ARRAY_TAG:P&&E,aTypedArray:function(t){if(M(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(f){if(k.call(w,t))return t}else for(var e in O)if(l(O,r)){var n=s[e];if(n&&(t===n||k.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n){if(o){if(n)for(var r in O){var i=s[r];i&&l(i.prototype,t)&&delete i.prototype[t]}x[t]&&!n||d(x,t,n?e:T&&y[t]||e)}},exportTypedArrayStaticMethod:function(t,e,n){var r,i;if(o){if(f){if(n)for(r in O)(i=s[r])&&l(i,t)&&delete i[t];if(w[t]&&!n)return;try{return d(w,t,n?e:T&&v[t]||e)}catch(t){}}for(r in O)!(i=s[r])||i[t]&&!n||d(i,t,e)}},isView:function(t){if(!a(t))return!1;var e=u(t);return"DataView"===e||l(O,e)||l(A,e)},isTypedArray:M,TypedArray:w,TypedArrayPrototype:x}},3331:function(t,e,n){"use strict";var r=n(7854),i=n(9781),o=n(4019),s=n(8880),a=n(2248),l=n(7293),u=n(5787),c=n(9958),d=n(7466),h=n(7067),p=n(1179),f=n(9518),m=n(7674),g=n(8006).f,v=n(3070).f,y=n(1285),_=n(8003),b=n(9909),w=b.get,x=b.set,S="ArrayBuffer",k="DataView",C="Wrong index",E=r.ArrayBuffer,T=E,P=r.DataView,O=P&&P.prototype,A=Object.prototype,M=r.RangeError,L=p.pack,I=p.unpack,j=function(t){return[255&t]},D=function(t){return[255&t,t>>8&255]},N=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},R=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},F=function(t){return L(t,23,4)},V=function(t){return L(t,52,8)},z=function(t,e){v(t.prototype,e,{get:function(){return w(this)[e]}})},B=function(t,e,n,r){var i=h(n),o=w(t);if(i+e>o.byteLength)throw M(C);var s=w(o.buffer).bytes,a=i+o.byteOffset,l=s.slice(a,a+e);return r?l:l.reverse()},q=function(t,e,n,r,i,o){var s=h(n),a=w(t);if(s+e>a.byteLength)throw M(C);for(var l=w(a.buffer).bytes,u=s+a.byteOffset,c=r(+i),d=0;d<e;d++)l[u+d]=c[o?d:e-d-1]};if(o){if(!l((function(){E(1)}))||!l((function(){new E(-1)}))||l((function(){return new E,new E(1.5),new E(NaN),E.name!=S}))){for(var H,$=(T=function(t){return u(this,T),new E(h(t))}).prototype=E.prototype,U=g(E),W=0;U.length>W;)(H=U[W++])in T||s(T,H,E[H]);$.constructor=T}m&&f(O)!==A&&m(O,A);var G=new P(new T(2)),Y=O.setInt8;G.setInt8(0,2147483648),G.setInt8(1,2147483649),!G.getInt8(0)&&G.getInt8(1)||a(O,{setInt8:function(t,e){Y.call(this,t,e<<24>>24)},setUint8:function(t,e){Y.call(this,t,e<<24>>24)}},{unsafe:!0})}else T=function(t){u(this,T,S);var e=h(t);x(this,{bytes:y.call(new Array(e),0),byteLength:e}),i||(this.byteLength=e)},P=function(t,e,n){u(this,P,k),u(t,T,k);var r=w(t).byteLength,o=c(e);if(o<0||o>r)throw M("Wrong offset");if(o+(n=void 0===n?r-o:d(n))>r)throw M("Wrong length");x(this,{buffer:t,byteLength:n,byteOffset:o}),i||(this.buffer=t,this.byteLength=n,this.byteOffset=o)},i&&(z(T,"byteLength"),z(P,"buffer"),z(P,"byteLength"),z(P,"byteOffset")),a(P.prototype,{getInt8:function(t){return B(this,1,t)[0]<<24>>24},getUint8:function(t){return B(this,1,t)[0]},getInt16:function(t){var e=B(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=B(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return R(B(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return R(B(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return I(B(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return I(B(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){q(this,1,t,j,e)},setUint8:function(t,e){q(this,1,t,j,e)},setInt16:function(t,e){q(this,2,t,D,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){q(this,2,t,D,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){q(this,4,t,N,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){q(this,4,t,N,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){q(this,4,t,F,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){q(this,8,t,V,e,arguments.length>2?arguments[2]:void 0)}});_(T,S),_(P,k),t.exports={ArrayBuffer:T,DataView:P}},1048:function(t,e,n){"use strict";var r=n(7908),i=n(1400),o=n(7466),s=Math.min;t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),l=i(t,a),u=i(e,a),c=arguments.length>2?arguments[2]:void 0,d=s((void 0===c?a:i(c,a))-u,a-l),h=1;for(u<l&&l<u+d&&(h=-1,u+=d-1,l+=d-1);d-- >0;)u in n?n[l]=n[u]:delete n[l],l+=h,u+=h;return n}},1285:function(t,e,n){"use strict";var r=n(7908),i=n(1400),o=n(7466);t.exports=function(t){for(var e=r(this),n=o(e.length),s=arguments.length,a=i(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,u=void 0===l?n:i(l,n);u>a;)e[a++]=t;return e}},8533:function(t,e,n){"use strict";var r=n(2092).forEach,i=n(9341)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},8457:function(t,e,n){"use strict";var r=n(9974),i=n(7908),o=n(3411),s=n(7659),a=n(7466),l=n(6135),u=n(1246);t.exports=function(t){var e,n,c,d,h,p,f=i(t),m="function"==typeof this?this:Array,g=arguments.length,v=g>1?arguments[1]:void 0,y=void 0!==v,_=u(f),b=0;if(y&&(v=r(v,g>2?arguments[2]:void 0,2)),null==_||m==Array&&s(_))for(n=new m(e=a(f.length));e>b;b++)p=y?v(f[b],b):f[b],l(n,b,p);else for(h=(d=_.call(f)).next,n=new m;!(c=h.call(d)).done;b++)p=y?o(d,v,[c.value,b],!0):c.value,l(n,b,p);return n.length=b,n}},1318:function(t,e,n){var r=n(5656),i=n(7466),o=n(1400),s=function(t){return function(e,n,s){var a,l=r(e),u=i(l.length),c=o(s,u);if(t&&n!=n){for(;u>c;)if((a=l[c++])!=a)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},2092:function(t,e,n){var r=n(9974),i=n(8361),o=n(7908),s=n(7466),a=n(5417),l=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,c=4==t,d=6==t,h=7==t,p=5==t||d;return function(f,m,g,v){for(var y,_,b=o(f),w=i(b),x=r(m,g,3),S=s(w.length),k=0,C=v||a,E=e?C(f,S):n||h?C(f,0):void 0;S>k;k++)if((p||k in w)&&(_=x(y=w[k],k,b),t))if(e)E[k]=_;else if(_)switch(t){case 3:return!0;case 5:return y;case 6:return k;case 2:l.call(E,y)}else switch(t){case 4:return!1;case 7:l.call(E,y)}return d?-1:u||c?c:E}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterOut:u(7)}},6583:function(t,e,n){"use strict";var r=n(5656),i=n(9958),o=n(7466),s=n(9341),a=Math.min,l=[].lastIndexOf,u=!!l&&1/[1].lastIndexOf(1,-0)<0,c=s("lastIndexOf"),d=u||!c;t.exports=d?function(t){if(u)return l.apply(this,arguments)||0;var e=r(this),n=o(e.length),s=n-1;for(arguments.length>1&&(s=a(s,i(arguments[1]))),s<0&&(s=n+s);s>=0;s--)if(s in e&&e[s]===t)return s||0;return-1}:l},1194:function(t,e,n){var r=n(7293),i=n(5112),o=n(7392),s=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:function(t,e,n){"use strict";var r=n(7293);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},3671:function(t,e,n){var r=n(3099),i=n(7908),o=n(8361),s=n(7466),a=function(t){return function(e,n,a,l){r(n);var u=i(e),c=o(u),d=s(u.length),h=t?d-1:0,p=t?-1:1;if(a<2)for(;;){if(h in c){l=c[h],h+=p;break}if(h+=p,t?h<0:d<=h)throw TypeError("Reduce of empty array with no initial value")}for(;t?h>=0:d>h;h+=p)h in c&&(l=n(l,c[h],h,u));return l}};t.exports={left:a(!1),right:a(!0)}},5417:function(t,e,n){var r=n(111),i=n(3157),o=n(5112)("species");t.exports=function(t,e){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},3411:function(t,e,n){var r=n(9670),i=n(9212);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){throw i(t),e}}},7072:function(t,e,n){var r=n(5112)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},4326:function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},648:function(t,e,n){var r=n(1694),i=n(4326),o=n(5112)("toStringTag"),s="Arguments"==i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:s?i(e):"Object"==(r=i(e))&&"function"==typeof e.callee?"Arguments":r}},9920:function(t,e,n){var r=n(6656),i=n(3887),o=n(1236),s=n(3070);t.exports=function(t,e){for(var n=i(e),a=s.f,l=o.f,u=0;u<n.length;u++){var c=n[u];r(t,c)||a(t,c,l(e,c))}}},8544:function(t,e,n){var r=n(7293);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:function(t,e,n){"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),s=n(8003),a=n(7497),l=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),s(t,u,!1,!0),a[u]=l,t}},8880:function(t,e,n){var r=n(9781),i=n(3070),o=n(9114);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9114:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:function(t,e,n){"use strict";var r=n(7593),i=n(3070),o=n(9114);t.exports=function(t,e,n){var s=r(e);s in t?i.f(t,s,o(0,n)):t[s]=n}},654:function(t,e,n){"use strict";var r=n(2109),i=n(4994),o=n(9518),s=n(7674),a=n(8003),l=n(8880),u=n(1320),c=n(5112),d=n(1913),h=n(7497),p=n(3383),f=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,g=c("iterator"),v="keys",y="values",_="entries",b=function(){return this};t.exports=function(t,e,n,c,p,w,x){i(n,e,c);var S,k,C,E=function(t){if(t===p&&M)return M;if(!m&&t in O)return O[t];switch(t){case v:case y:case _:return function(){return new n(this,t)}}return function(){return new n(this)}},T=e+" Iterator",P=!1,O=t.prototype,A=O[g]||O["@@iterator"]||p&&O[p],M=!m&&A||E(p),L="Array"==e&&O.entries||A;if(L&&(S=o(L.call(new t)),f!==Object.prototype&&S.next&&(d||o(S)===f||(s?s(S,f):"function"!=typeof S[g]&&l(S,g,b)),a(S,T,!0,!0),d&&(h[T]=b))),p==y&&A&&A.name!==y&&(P=!0,M=function(){return A.call(this)}),d&&!x||O[g]===M||l(O,g,M),h[e]=M,p)if(k={values:E(y),keys:w?M:E(v),entries:E(_)},x)for(C in k)(m||P||!(C in O))&&u(O,C,k[C]);else r({target:e,proto:!0,forced:m||P},k);return k}},9781:function(t,e,n){var r=n(7293);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:function(t,e,n){var r=n(7854),i=n(111),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},8324:function(t){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:function(t,e,n){var r=n(5005);t.exports=r("navigator","userAgent")||""},7392:function(t,e,n){var r,i,o=n(7854),s=n(8113),a=o.process,l=a&&a.versions,u=l&&l.v8;u?i=(r=u.split("."))[0]+r[1]:s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,n){var r=n(7854),i=n(1236).f,o=n(8880),s=n(1320),a=n(3505),l=n(9920),u=n(4705);t.exports=function(t,e){var n,c,d,h,p,f=t.target,m=t.global,g=t.stat;if(n=m?r:g?r[f]||a(f,{}):(r[f]||{}).prototype)for(c in e){if(h=e[c],d=t.noTargetGet?(p=i(n,c))&&p.value:n[c],!u(m?c:f+(g?".":"#")+c,t.forced)&&void 0!==d){if(typeof h==typeof d)continue;l(h,d)}(t.sham||d&&d.sham)&&o(h,"sham",!0),s(n,c,h,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:function(t,e,n){"use strict";n(4916);var r=n(1320),i=n(7293),o=n(5112),s=n(2261),a=n(8880),l=o("species"),u=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),c="$0"==="a".replace(/./,"$0"),d=o("replace"),h=!!/./[d]&&""===/./[d]("a","$0"),p=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,d){var f=o(t),m=!i((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),g=m&&!i((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return e=!0,null},n[f](""),!e}));if(!m||!g||"replace"===t&&(!u||!c||h)||"split"===t&&!p){var v=/./[f],y=n(f,""[t],(function(t,e,n,r,i){return e.exec===s?m&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:h}),_=y[0],b=y[1];r(String.prototype,t,_),r(RegExp.prototype,f,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}d&&a(RegExp.prototype[f],"sham",!0)}},9974:function(t,e,n){var r=n(3099);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},5005:function(t,e,n){var r=n(857),i=n(7854),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t])||o(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},1246:function(t,e,n){var r=n(648),i=n(7497),o=n(5112)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},8554:function(t,e,n){var r=n(9670),i=n(1246);t.exports=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return r(e.call(t))}},647:function(t,e,n){var r=n(7908),i=Math.floor,o="".replace,s=/\$([$&'`]|\d\d?|<[^>]*>)/g,a=/\$([$&'`]|\d\d?)/g;t.exports=function(t,e,n,l,u,c){var d=n+t.length,h=l.length,p=a;return void 0!==u&&(u=r(u),p=s),o.call(c,p,(function(r,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(d);case"<":s=u[o.slice(1,-1)];break;default:var a=+o;if(0===a)return r;if(a>h){var c=i(a/10);return 0===c?r:c<=h?void 0===l[c-1]?o.charAt(1):l[c-1]+o.charAt(1):r}s=l[a-1]}return void 0===s?"":s}))}},7854:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(t){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},3501:function(t){t.exports={}},490:function(t,e,n){var r=n(5005);t.exports=r("document","documentElement")},4664:function(t,e,n){var r=n(9781),i=n(7293),o=n(317);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},1179:function(t){var e=Math.abs,n=Math.pow,r=Math.floor,i=Math.log,o=Math.LN2;t.exports={pack:function(t,s,a){var l,u,c,d=new Array(a),h=8*a-s-1,p=(1<<h)-1,f=p>>1,m=23===s?n(2,-24)-n(2,-77):0,g=t<0||0===t&&1/t<0?1:0,v=0;for((t=e(t))!=t||t===1/0?(u=t!=t?1:0,l=p):(l=r(i(t)/o),t*(c=n(2,-l))<1&&(l--,c*=2),(t+=l+f>=1?m/c:m*n(2,1-f))*c>=2&&(l++,c/=2),l+f>=p?(u=0,l=p):l+f>=1?(u=(t*c-1)*n(2,s),l+=f):(u=t*n(2,f-1)*n(2,s),l=0));s>=8;d[v++]=255&u,u/=256,s-=8);for(l=l<<s|u,h+=s;h>0;d[v++]=255&l,l/=256,h-=8);return d[--v]|=128*g,d},unpack:function(t,e){var r,i=t.length,o=8*i-e-1,s=(1<<o)-1,a=s>>1,l=o-7,u=i-1,c=t[u--],d=127&c;for(c>>=7;l>0;d=256*d+t[u],u--,l-=8);for(r=d&(1<<-l)-1,d>>=-l,l+=e;l>0;r=256*r+t[u],u--,l-=8);if(0===d)d=1-a;else{if(d===s)return r?NaN:c?-1/0:1/0;r+=n(2,e),d-=a}return(c?-1:1)*r*n(2,d-e)}}},8361:function(t,e,n){var r=n(7293),i=n(4326),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},9587:function(t,e,n){var r=n(111),i=n(7674);t.exports=function(t,e,n){var o,s;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(s=o.prototype)&&s!==n.prototype&&i(t,s),t}},2788:function(t,e,n){var r=n(5465),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},9909:function(t,e,n){var r,i,o,s=n(8536),a=n(7854),l=n(111),u=n(8880),c=n(6656),d=n(5465),h=n(6200),p=n(3501),f=a.WeakMap;if(s){var m=d.state||(d.state=new f),g=m.get,v=m.has,y=m.set;r=function(t,e){return e.facade=t,y.call(m,t,e),e},i=function(t){return g.call(m,t)||{}},o=function(t){return v.call(m,t)}}else{var _=h("state");p[_]=!0,r=function(t,e){return e.facade=t,u(t,_,e),e},i=function(t){return c(t,_)?t[_]:{}},o=function(t){return c(t,_)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},7659:function(t,e,n){var r=n(5112),i=n(7497),o=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},3157:function(t,e,n){var r=n(4326);t.exports=Array.isArray||function(t){return"Array"==r(t)}},4705:function(t,e,n){var r=n(7293),i=/#|\.prototype\./,o=function(t,e){var n=a[s(t)];return n==u||n!=l&&("function"==typeof e?r(e):!!e)},s=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},a=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},111:function(t){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},1913:function(t){t.exports=!1},7850:function(t,e,n){var r=n(111),i=n(4326),o=n(5112)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},9212:function(t,e,n){var r=n(9670);t.exports=function(t){var e=t.return;if(void 0!==e)return r(e.call(t)).value}},3383:function(t,e,n){"use strict";var r,i,o,s=n(7293),a=n(9518),l=n(8880),u=n(6656),c=n(5112),d=n(1913),h=c("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):p=!0);var f=null==r||s((function(){var t={};return r[h].call(t)!==t}));f&&(r={}),d&&!f||u(r,h)||l(r,h,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},7497:function(t){t.exports={}},133:function(t,e,n){var r=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},590:function(t,e,n){var r=n(7293),i=n(5112),o=n(1913),s=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8536:function(t,e,n){var r=n(7854),i=n(2788),o=r.WeakMap;t.exports="function"==typeof o&&/native code/.test(i(o))},1574:function(t,e,n){"use strict";var r=n(9781),i=n(7293),o=n(1956),s=n(5181),a=n(5296),l=n(7908),u=n(8361),c=Object.assign,d=Object.defineProperty;t.exports=!c||i((function(){if(r&&1!==c({b:1},c(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||o(c({},e)).join("")!=i}))?function(t,e){for(var n=l(t),i=arguments.length,c=1,d=s.f,h=a.f;i>c;)for(var p,f=u(arguments[c++]),m=d?o(f).concat(d(f)):o(f),g=m.length,v=0;g>v;)p=m[v++],r&&!h.call(f,p)||(n[p]=f[p]);return n}:c},30:function(t,e,n){var r,i=n(9670),o=n(6048),s=n(748),a=n(3501),l=n(490),u=n(317),c=n(6200)("IE_PROTO"),d=function(){},h=function(t){return"<script>"+t+"<\/script>"},p=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;p=r?function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=u("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F);for(var n=s.length;n--;)delete p.prototype[s[n]];return p()};a[c]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=i(t),n=new d,d.prototype=null,n[c]=t):n=p(),void 0===e?n:o(n,e)}},6048:function(t,e,n){var r=n(9781),i=n(3070),o=n(9670),s=n(1956);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=s(e),a=r.length,l=0;a>l;)i.f(t,n=r[l++],e[n]);return t}},3070:function(t,e,n){var r=n(9781),i=n(4664),o=n(9670),s=n(7593),a=Object.defineProperty;e.f=r?a:function(t,e,n){if(o(t),e=s(e,!0),o(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:function(t,e,n){var r=n(9781),i=n(5296),o=n(9114),s=n(5656),a=n(7593),l=n(6656),u=n(4664),c=Object.getOwnPropertyDescriptor;e.f=r?c:function(t,e){if(t=s(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(l(t,e))return o(!i.f.call(t,e),t[e])}},8006:function(t,e,n){var r=n(6324),i=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},5181:function(t,e){e.f=Object.getOwnPropertySymbols},9518:function(t,e,n){var r=n(6656),i=n(7908),o=n(6200),s=n(8544),a=o("IE_PROTO"),l=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=i(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},6324:function(t,e,n){var r=n(6656),i=n(5656),o=n(1318).indexOf,s=n(3501);t.exports=function(t,e){var n,a=i(t),l=0,u=[];for(n in a)!r(s,n)&&r(a,n)&&u.push(n);for(;e.length>l;)r(a,n=e[l++])&&(~o(u,n)||u.push(n));return u}},1956:function(t,e,n){var r=n(6324),i=n(748);t.exports=Object.keys||function(t){return r(t,i)}},5296:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},7674:function(t,e,n){var r=n(9670),i=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},288:function(t,e,n){"use strict";var r=n(1694),i=n(648);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},3887:function(t,e,n){var r=n(5005),i=n(8006),o=n(5181),s=n(9670);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(s(t)),n=o.f;return n?e.concat(n(t)):e}},857:function(t,e,n){var r=n(7854);t.exports=r},2248:function(t,e,n){var r=n(1320);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},1320:function(t,e,n){var r=n(7854),i=n(8880),o=n(6656),s=n(3505),a=n(2788),l=n(9909),u=l.get,c=l.enforce,d=String(String).split("String");(t.exports=function(t,e,n,a){var l,u=!!a&&!!a.unsafe,h=!!a&&!!a.enumerable,p=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||i(n,"name",e),(l=c(n)).source||(l.source=d.join("string"==typeof e?e:""))),t!==r?(u?!p&&t[e]&&(h=!0):delete t[e],h?t[e]=n:i(t,e,n)):h?t[e]=n:s(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||a(this)}))},7651:function(t,e,n){var r=n(4326),i=n(2261);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},2261:function(t,e,n){"use strict";var r,i,o=n(7066),s=n(2999),a=RegExp.prototype.exec,l=String.prototype.replace,u=a,c=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),d=s.UNSUPPORTED_Y||s.BROKEN_CARET,h=void 0!==/()??/.exec("")[1];(c||h||d)&&(u=function(t){var e,n,r,i,s=this,u=d&&s.sticky,p=o.call(s),f=s.source,m=0,g=t;return u&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),g=String(t).slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==t[s.lastIndex-1])&&(f="(?: "+f+")",g=" "+g,m++),n=new RegExp("^(?:"+f+")",p)),h&&(n=new RegExp("^"+f+"$(?!\\s)",p)),c&&(e=s.lastIndex),r=a.call(u?n:s,g),u?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=s.lastIndex,s.lastIndex+=r[0].length):s.lastIndex=0:c&&r&&(s.lastIndex=s.global?r.index+r[0].length:e),h&&r&&r.length>1&&l.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=u},7066:function(t,e,n){"use strict";var r=n(9670);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},2999:function(t,e,n){"use strict";var r=n(7293);function i(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},4488:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},3505:function(t,e,n){var r=n(7854),i=n(8880);t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},6340:function(t,e,n){"use strict";var r=n(5005),i=n(3070),o=n(5112),s=n(9781),a=o("species");t.exports=function(t){var e=r(t),n=i.f;s&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},8003:function(t,e,n){var r=n(3070).f,i=n(6656),o=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},6200:function(t,e,n){var r=n(2309),i=n(9711),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:function(t,e,n){var r=n(7854),i=n(3505),o="__core-js_shared__",s=r[o]||i(o,{});t.exports=s},2309:function(t,e,n){var r=n(1913),i=n(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.9.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(t,e,n){var r=n(9670),i=n(3099),o=n(5112)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[o])?e:i(n)}},8710:function(t,e,n){var r=n(9958),i=n(4488),o=function(t){return function(e,n){var o,s,a=String(i(e)),l=r(n),u=a.length;return l<0||l>=u?t?"":void 0:(o=a.charCodeAt(l))<55296||o>56319||l+1===u||(s=a.charCodeAt(l+1))<56320||s>57343?t?a.charAt(l):o:t?a.slice(l,l+2):s-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},3197:function(t){"use strict";var e=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",o=Math.floor,s=String.fromCharCode,a=function(t){return t+22+75*(t<26)},l=function(t,e,n){var r=0;for(t=n?o(t/700):t>>1,t+=o(t/e);t>455;r+=36)t=o(t/35);return o(r+36*t/(t+38))},u=function(t){var n,r,u=[],c=(t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=t.charCodeAt(n++);56320==(64512&o)?e.push(((1023&i)<<10)+(1023&o)+65536):(e.push(i),n--)}else e.push(i)}return e}(t)).length,d=128,h=0,p=72;for(n=0;n<t.length;n++)(r=t[n])<128&&u.push(s(r));var f=u.length,m=f;for(f&&u.push("-");m<c;){var g=e;for(n=0;n<t.length;n++)(r=t[n])>=d&&r<g&&(g=r);var v=m+1;if(g-d>o((e-h)/v))throw RangeError(i);for(h+=(g-d)*v,d=g,n=0;n<t.length;n++){if((r=t[n])<d&&++h>e)throw RangeError(i);if(r==d){for(var y=h,_=36;;_+=36){var b=_<=p?1:_>=p+26?26:_-p;if(y<b)break;var w=y-b,x=36-b;u.push(s(a(b+w%x))),y=o(w/x)}u.push(s(a(y))),p=l(h,v,m==f),h=0,++m}}++h,++d}return u.join("")};t.exports=function(t){var e,i,o=[],s=t.toLowerCase().replace(r,".").split(".");for(e=0;e<s.length;e++)i=s[e],o.push(n.test(i)?"xn--"+u(i):i);return o.join(".")}},6091:function(t,e,n){var r=n(7293),i=n(1361);t.exports=function(t){return r((function(){return!!i[t]()||"
"!="
"[t]()||i[t].name!==t}))}},3111:function(t,e,n){var r=n(4488),i="["+n(1361)+"]",o=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$"),a=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(o,"")),2&t&&(n=n.replace(s,"")),n}};t.exports={start:a(1),end:a(2),trim:a(3)}},1400:function(t,e,n){var r=n(9958),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},7067:function(t,e,n){var r=n(9958),i=n(7466);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length or index");return n}},5656:function(t,e,n){var r=n(8361),i=n(4488);t.exports=function(t){return r(i(t))}},9958:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},7466:function(t,e,n){var r=n(9958),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},7908:function(t,e,n){var r=n(4488);t.exports=function(t){return Object(r(t))}},4590:function(t,e,n){var r=n(3002);t.exports=function(t,e){var n=r(t);if(n%e)throw RangeError("Wrong offset");return n}},3002:function(t,e,n){var r=n(9958);t.exports=function(t){var e=r(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},7593:function(t,e,n){var r=n(111);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},1694:function(t,e,n){var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},9843:function(t,e,n){"use strict";var r=n(2109),i=n(7854),o=n(9781),s=n(3832),a=n(260),l=n(3331),u=n(5787),c=n(9114),d=n(8880),h=n(7466),p=n(7067),f=n(4590),m=n(7593),g=n(6656),v=n(648),y=n(111),_=n(30),b=n(7674),w=n(8006).f,x=n(7321),S=n(2092).forEach,k=n(6340),C=n(3070),E=n(1236),T=n(9909),P=n(9587),O=T.get,A=T.set,M=C.f,L=E.f,I=Math.round,j=i.RangeError,D=l.ArrayBuffer,N=l.DataView,R=a.NATIVE_ARRAY_BUFFER_VIEWS,F=a.TYPED_ARRAY_TAG,V=a.TypedArray,z=a.TypedArrayPrototype,B=a.aTypedArrayConstructor,q=a.isTypedArray,H="BYTES_PER_ELEMENT",$="Wrong length",U=function(t,e){for(var n=0,r=e.length,i=new(B(t))(r);r>n;)i[n]=e[n++];return i},W=function(t,e){M(t,e,{get:function(){return O(this)[e]}})},G=function(t){var e;return t instanceof D||"ArrayBuffer"==(e=v(t))||"SharedArrayBuffer"==e},Y=function(t,e){return q(t)&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Z=function(t,e){return Y(t,e=m(e,!0))?c(2,t[e]):L(t,e)},K=function(t,e,n){return!(Y(t,e=m(e,!0))&&y(n)&&g(n,"value"))||g(n,"get")||g(n,"set")||n.configurable||g(n,"writable")&&!n.writable||g(n,"enumerable")&&!n.enumerable?M(t,e,n):(t[e]=n.value,t)};o?(R||(E.f=Z,C.f=K,W(z,"buffer"),W(z,"byteOffset"),W(z,"byteLength"),W(z,"length")),r({target:"Object",stat:!0,forced:!R},{getOwnPropertyDescriptor:Z,defineProperty:K}),t.exports=function(t,e,n){var o=t.match(/\d+$/)[0]/8,a=t+(n?"Clamped":"")+"Array",l="get"+t,c="set"+t,m=i[a],g=m,v=g&&g.prototype,C={},E=function(t,e){M(t,e,{get:function(){return function(t,e){var n=O(t);return n.view[l](e*o+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,r){var i=O(t);n&&(r=(r=I(r))<0?0:r>255?255:255&r),i.view[c](e*o+i.byteOffset,r,!0)}(this,e,t)},enumerable:!0})};R?s&&(g=e((function(t,e,n,r){return u(t,g,a),P(y(e)?G(e)?void 0!==r?new m(e,f(n,o),r):void 0!==n?new m(e,f(n,o)):new m(e):q(e)?U(g,e):x.call(g,e):new m(p(e)),t,g)})),b&&b(g,V),S(w(m),(function(t){t in g||d(g,t,m[t])})),g.prototype=v):(g=e((function(t,e,n,r){u(t,g,a);var i,s,l,c=0,d=0;if(y(e)){if(!G(e))return q(e)?U(g,e):x.call(g,e);i=e,d=f(n,o);var m=e.byteLength;if(void 0===r){if(m%o)throw j($);if((s=m-d)<0)throw j($)}else if((s=h(r)*o)+d>m)throw j($);l=s/o}else l=p(e),i=new D(s=l*o);for(A(t,{buffer:i,byteOffset:d,byteLength:s,length:l,view:new N(i)});c<l;)E(t,c++)})),b&&b(g,V),v=g.prototype=_(z)),v.constructor!==g&&d(v,"constructor",g),F&&d(v,F,a),C[a]=g,r({global:!0,forced:g!=m,sham:!R},C),H in g||d(g,H,o),H in v||d(v,H,o),k(a)}):t.exports=function(){}},3832:function(t,e,n){var r=n(7854),i=n(7293),o=n(7072),s=n(260).NATIVE_ARRAY_BUFFER_VIEWS,a=r.ArrayBuffer,l=r.Int8Array;t.exports=!s||!i((function(){l(1)}))||!i((function(){new l(-1)}))||!o((function(t){new l,new l(null),new l(1.5),new l(t)}),!0)||i((function(){return 1!==new l(new a(2),1,void 0).length}))},3074:function(t,e,n){var r=n(260).aTypedArrayConstructor,i=n(6707);t.exports=function(t,e){for(var n=i(t,t.constructor),o=0,s=e.length,a=new(r(n))(s);s>o;)a[o]=e[o++];return a}},7321:function(t,e,n){var r=n(7908),i=n(7466),o=n(1246),s=n(7659),a=n(9974),l=n(260).aTypedArrayConstructor;t.exports=function(t){var e,n,u,c,d,h,p=r(t),f=arguments.length,m=f>1?arguments[1]:void 0,g=void 0!==m,v=o(p);if(null!=v&&!s(v))for(h=(d=v.call(p)).next,p=[];!(c=h.call(d)).done;)p.push(c.value);for(g&&f>2&&(m=a(m,arguments[2],2)),n=i(p.length),u=new(l(this))(n),e=0;n>e;e++)u[e]=g?m(p[e],e):p[e];return u}},9711:function(t){var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},3307:function(t,e,n){var r=n(133);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:function(t,e,n){var r=n(7854),i=n(2309),o=n(6656),s=n(9711),a=n(133),l=n(3307),u=i("wks"),c=r.Symbol,d=l?c:c&&c.withoutSetter||s;t.exports=function(t){return o(u,t)||(a&&o(c,t)?u[t]=c[t]:u[t]=d("Symbol."+t)),u[t]}},1361:function(t){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},8264:function(t,e,n){"use strict";var r=n(2109),i=n(7854),o=n(3331),s=n(6340),a=o.ArrayBuffer;r({global:!0,forced:i.ArrayBuffer!==a},{ArrayBuffer:a}),s("ArrayBuffer")},2222:function(t,e,n){"use strict";var r=n(2109),i=n(7293),o=n(3157),s=n(111),a=n(7908),l=n(7466),u=n(6135),c=n(5417),d=n(1194),h=n(5112),p=n(7392),f=h("isConcatSpreadable"),m=9007199254740991,g="Maximum allowed index exceeded",v=p>=51||!i((function(){var t=[];return t[f]=!1,t.concat()[0]!==t})),y=d("concat"),_=function(t){if(!s(t))return!1;var e=t[f];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,forced:!v||!y},{concat:function(t){var e,n,r,i,o,s=a(this),d=c(s,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(_(o=-1===e?s:arguments[e])){if(h+(i=l(o.length))>m)throw TypeError(g);for(n=0;n<i;n++,h++)n in o&&u(d,h,o[n])}else{if(h>=m)throw TypeError(g);u(d,h++,o)}return d.length=h,d}})},7327:function(t,e,n){"use strict";var r=n(2109),i=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},2772:function(t,e,n){"use strict";var r=n(2109),i=n(1318).indexOf,o=n(9341),s=[].indexOf,a=!!s&&1/[1].indexOf(1,-0)<0,l=o("indexOf");r({target:"Array",proto:!0,forced:a||!l},{indexOf:function(t){return a?s.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},6992:function(t,e,n){"use strict";var r=n(5656),i=n(1223),o=n(7497),s=n(9909),a=n(654),l="Array Iterator",u=s.set,c=s.getterFor(l);t.exports=a(Array,"Array",(function(t,e){u(this,{type:l,target:r(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},1249:function(t,e,n){"use strict";var r=n(2109),i=n(2092).map;r({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},7042:function(t,e,n){"use strict";var r=n(2109),i=n(111),o=n(3157),s=n(1400),a=n(7466),l=n(5656),u=n(6135),c=n(5112),d=n(1194)("slice"),h=c("species"),p=[].slice,f=Math.max;r({target:"Array",proto:!0,forced:!d},{slice:function(t,e){var n,r,c,d=l(this),m=a(d.length),g=s(t,m),v=s(void 0===e?m:e,m);if(o(d)&&("function"!=typeof(n=d.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[h])&&(n=void 0):n=void 0,n===Array||void 0===n))return p.call(d,g,v);for(r=new(void 0===n?Array:n)(f(v-g,0)),c=0;g<v;g++,c++)g in d&&u(r,c,d[g]);return r.length=c,r}})},561:function(t,e,n){"use strict";var r=n(2109),i=n(1400),o=n(9958),s=n(7466),a=n(7908),l=n(5417),u=n(6135),c=n(1194)("splice"),d=Math.max,h=Math.min,p=9007199254740991,f="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!c},{splice:function(t,e){var n,r,c,m,g,v,y=a(this),_=s(y.length),b=i(t,_),w=arguments.length;if(0===w?n=r=0:1===w?(n=0,r=_-b):(n=w-2,r=h(d(o(e),0),_-b)),_+n-r>p)throw TypeError(f);for(c=l(y,r),m=0;m<r;m++)(g=b+m)in y&&u(c,m,y[g]);if(c.length=r,n<r){for(m=b;m<_-r;m++)v=m+n,(g=m+r)in y?y[v]=y[g]:delete y[v];for(m=_;m>_-r+n;m--)delete y[m-1]}else if(n>r)for(m=_-r;m>b;m--)v=m+n-1,(g=m+r-1)in y?y[v]=y[g]:delete y[v];for(m=0;m<n;m++)y[m+b]=arguments[m+2];return y.length=_-r+n,c}})},8309:function(t,e,n){var r=n(9781),i=n(3070).f,o=Function.prototype,s=o.toString,a=/^\s*function ([^ (]*)/,l="name";r&&!(l in o)&&i(o,l,{configurable:!0,get:function(){try{return s.call(this).match(a)[1]}catch(t){return""}}})},489:function(t,e,n){var r=n(2109),i=n(7293),o=n(7908),s=n(9518),a=n(8544);r({target:"Object",stat:!0,forced:i((function(){s(1)})),sham:!a},{getPrototypeOf:function(t){return s(o(t))}})},1539:function(t,e,n){var r=n(1694),i=n(1320),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},4916:function(t,e,n){"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:function(t,e,n){"use strict";var r=n(1320),i=n(9670),o=n(7293),s=n(7066),a="toString",l=RegExp.prototype,u=l.toString,c=o((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),d=u.name!=a;(c||d)&&r(RegExp.prototype,a,(function(){var t=i(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in l)?s.call(t):n)}),{unsafe:!0})},8783:function(t,e,n){"use strict";var r=n(8710).charAt,i=n(9909),o=n(654),s="String Iterator",a=i.set,l=i.getterFor(s);o(String,"String",(function(t){a(this,{type:s,string:String(t),index:0})}),(function(){var t,e=l(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},4723:function(t,e,n){"use strict";var r=n(7007),i=n(9670),o=n(7466),s=n(4488),a=n(1530),l=n(7651);r("match",1,(function(t,e,n){return[function(e){var n=s(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var s=i(t),u=String(this);if(!s.global)return l(s,u);var c=s.unicode;s.lastIndex=0;for(var d,h=[],p=0;null!==(d=l(s,u));){var f=String(d[0]);h[p]=f,""===f&&(s.lastIndex=a(u,o(s.lastIndex),c)),p++}return 0===p?null:h}]}))},5306:function(t,e,n){"use strict";var r=n(7007),i=n(9670),o=n(7466),s=n(9958),a=n(4488),l=n(1530),u=n(647),c=n(7651),d=Math.max,h=Math.min;r("replace",2,(function(t,e,n,r){var p=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,f=r.REPLACE_KEEPS_$0,m=p?"$":"$0";return[function(n,r){var i=a(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):e.call(String(i),n,r)},function(t,r){if(!p&&f||"string"==typeof r&&-1===r.indexOf(m)){var a=n(e,t,this,r);if(a.done)return a.value}var g=i(t),v=String(this),y="function"==typeof r;y||(r=String(r));var _=g.global;if(_){var b=g.unicode;g.lastIndex=0}for(var w=[];;){var x=c(g,v);if(null===x)break;if(w.push(x),!_)break;""===String(x[0])&&(g.lastIndex=l(v,o(g.lastIndex),b))}for(var S,k="",C=0,E=0;E<w.length;E++){x=w[E];for(var T=String(x[0]),P=d(h(s(x.index),v.length),0),O=[],A=1;A<x.length;A++)O.push(void 0===(S=x[A])?S:String(S));var M=x.groups;if(y){var L=[T].concat(O,P,v);void 0!==M&&L.push(M);var I=String(r.apply(void 0,L))}else I=u(T,v,P,O,M,r);P>=C&&(k+=v.slice(C,P)+I,C=P+T.length)}return k+v.slice(C)}]}))},3123:function(t,e,n){"use strict";var r=n(7007),i=n(7850),o=n(9670),s=n(4488),a=n(6707),l=n(1530),u=n(7466),c=n(7651),d=n(2261),h=n(7293),p=[].push,f=Math.min,m=4294967295,g=!h((function(){return!RegExp(m,"y")}));r("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(s(this)),o=void 0===n?m:n>>>0;if(0===o)return[];if(void 0===t)return[r];if(!i(t))return e.call(r,t,o);for(var a,l,u,c=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,g=new RegExp(t.source,h+"g");(a=d.call(g,r))&&!((l=g.lastIndex)>f&&(c.push(r.slice(f,a.index)),a.length>1&&a.index<r.length&&p.apply(c,a.slice(1)),u=a[0].length,f=l,c.length>=o));)g.lastIndex===a.index&&g.lastIndex++;return f===r.length?!u&&g.test("")||c.push(""):c.push(r.slice(f)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=s(this),o=null==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var s=n(r,t,this,i,r!==e);if(s.done)return s.value;var d=o(t),h=String(this),p=a(d,RegExp),v=d.unicode,y=(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.unicode?"u":"")+(g?"y":"g"),_=new p(g?d:"^(?:"+d.source+")",y),b=void 0===i?m:i>>>0;if(0===b)return[];if(0===h.length)return null===c(_,h)?[h]:[];for(var w=0,x=0,S=[];x<h.length;){_.lastIndex=g?x:0;var k,C=c(_,g?h:h.slice(x));if(null===C||(k=f(u(_.lastIndex+(g?0:x)),h.length))===w)x=l(h,x,v);else{if(S.push(h.slice(w,x)),S.length===b)return S;for(var E=1;E<=C.length-1;E++)if(S.push(C[E]),S.length===b)return S;x=w=k}}return S.push(h.slice(w)),S}]}),!g)},3210:function(t,e,n){"use strict";var r=n(2109),i=n(3111).trim;r({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return i(this)}})},2990:function(t,e,n){"use strict";var r=n(260),i=n(1048),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(t,e){return i.call(o(this),t,e,arguments.length>2?arguments[2]:void 0)}))},8927:function(t,e,n){"use strict";var r=n(260),i=n(2092).every,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},3105:function(t,e,n){"use strict";var r=n(260),i=n(1285),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(t){return i.apply(o(this),arguments)}))},5035:function(t,e,n){"use strict";var r=n(260),i=n(2092).filter,o=n(3074),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(t){var e=i(s(this),t,arguments.length>1?arguments[1]:void 0);return o(this,e)}))},7174:function(t,e,n){"use strict";var r=n(260),i=n(2092).findIndex,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},4345:function(t,e,n){"use strict";var r=n(260),i=n(2092).find,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},2846:function(t,e,n){"use strict";var r=n(260),i=n(2092).forEach,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(t){i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},4731:function(t,e,n){"use strict";var r=n(260),i=n(1318).includes,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},7209:function(t,e,n){"use strict";var r=n(260),i=n(1318).indexOf,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},6319:function(t,e,n){"use strict";var r=n(7854),i=n(260),o=n(6992),s=n(5112)("iterator"),a=r.Uint8Array,l=o.values,u=o.keys,c=o.entries,d=i.aTypedArray,h=i.exportTypedArrayMethod,p=a&&a.prototype[s],f=!!p&&("values"==p.name||null==p.name),m=function(){return l.call(d(this))};h("entries",(function(){return c.call(d(this))})),h("keys",(function(){return u.call(d(this))})),h("values",m,!f),h(s,m,!f)},8867:function(t,e,n){"use strict";var r=n(260),i=r.aTypedArray,o=r.exportTypedArrayMethod,s=[].join;o("join",(function(t){return s.apply(i(this),arguments)}))},7789:function(t,e,n){"use strict";var r=n(260),i=n(6583),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(t){return i.apply(o(this),arguments)}))},3739:function(t,e,n){"use strict";var r=n(260),i=n(2092).map,o=n(6707),s=r.aTypedArray,a=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("map",(function(t){return i(s(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(a(o(t,t.constructor)))(e)}))}))},4483:function(t,e,n){"use strict";var r=n(260),i=n(3671).right,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(t){return i(o(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},9368:function(t,e,n){"use strict";var r=n(260),i=n(3671).left,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(t){return i(o(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},2056:function(t,e,n){"use strict";var r=n(260),i=r.aTypedArray,o=r.exportTypedArrayMethod,s=Math.floor;o("reverse",(function(){for(var t,e=this,n=i(e).length,r=s(n/2),o=0;o<r;)t=e[o],e[o++]=e[--n],e[n]=t;return e}))},3462:function(t,e,n){"use strict";var r=n(260),i=n(7466),o=n(4590),s=n(7908),a=n(7293),l=r.aTypedArray;(0,r.exportTypedArrayMethod)("set",(function(t){l(this);var e=o(arguments.length>1?arguments[1]:void 0,1),n=this.length,r=s(t),a=i(r.length),u=0;if(a+e>n)throw RangeError("Wrong length");for(;u<a;)this[e+u]=r[u++]}),a((function(){new Int8Array(1).set({})})))},678:function(t,e,n){"use strict";var r=n(260),i=n(6707),o=n(7293),s=r.aTypedArray,a=r.aTypedArrayConstructor,l=r.exportTypedArrayMethod,u=[].slice;l("slice",(function(t,e){for(var n=u.call(s(this),t,e),r=i(this,this.constructor),o=0,l=n.length,c=new(a(r))(l);l>o;)c[o]=n[o++];return c}),o((function(){new Int8Array(1).slice()})))},7462:function(t,e,n){"use strict";var r=n(260),i=n(2092).some,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},3824:function(t,e,n){"use strict";var r=n(260),i=r.aTypedArray,o=r.exportTypedArrayMethod,s=[].sort;o("sort",(function(t){return s.call(i(this),t)}))},5021:function(t,e,n){"use strict";var r=n(260),i=n(7466),o=n(1400),s=n(6707),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(t,e){var n=a(this),r=n.length,l=o(t,r);return new(s(n,n.constructor))(n.buffer,n.byteOffset+l*n.BYTES_PER_ELEMENT,i((void 0===e?r:o(e,r))-l))}))},2974:function(t,e,n){"use strict";var r=n(7854),i=n(260),o=n(7293),s=r.Int8Array,a=i.aTypedArray,l=i.exportTypedArrayMethod,u=[].toLocaleString,c=[].slice,d=!!s&&o((function(){u.call(new s(1))}));l("toLocaleString",(function(){return u.apply(d?c.call(a(this)):a(this),arguments)}),o((function(){return[1,2].toLocaleString()!=new s([1,2]).toLocaleString()}))||!o((function(){s.prototype.toLocaleString.call([1,2])})))},5016:function(t,e,n){"use strict";var r=n(260).exportTypedArrayMethod,i=n(7293),o=n(7854).Uint8Array,s=o&&o.prototype||{},a=[].toString,l=[].join;i((function(){a.call({})}))&&(a=function(){return l.call(this)});var u=s.toString!=a;r("toString",a,u)},2472:function(t,e,n){n(9843)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},4747:function(t,e,n){var r=n(7854),i=n(8324),o=n(8533),s=n(8880);for(var a in i){var l=r[a],u=l&&l.prototype;if(u&&u.forEach!==o)try{s(u,"forEach",o)}catch(t){u.forEach=o}}},3948:function(t,e,n){var r=n(7854),i=n(8324),o=n(6992),s=n(8880),a=n(5112),l=a("iterator"),u=a("toStringTag"),c=o.values;for(var d in i){var h=r[d],p=h&&h.prototype;if(p){if(p[l]!==c)try{s(p,l,c)}catch(t){p[l]=c}if(p[u]||s(p,u,d),i[d])for(var f in o)if(p[f]!==o[f])try{s(p,f,o[f])}catch(t){p[f]=o[f]}}}},1637:function(t,e,n){"use strict";n(6992);var r=n(2109),i=n(5005),o=n(590),s=n(1320),a=n(2248),l=n(8003),u=n(4994),c=n(9909),d=n(5787),h=n(6656),p=n(9974),f=n(648),m=n(9670),g=n(111),v=n(30),y=n(9114),_=n(8554),b=n(1246),w=n(5112),x=i("fetch"),S=i("Headers"),k=w("iterator"),C="URLSearchParams",E="URLSearchParamsIterator",T=c.set,P=c.getterFor(C),O=c.getterFor(E),A=/\+/g,M=Array(4),L=function(t){return M[t-1]||(M[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},I=function(t){try{return decodeURIComponent(t)}catch(e){return t}},j=function(t){var e=t.replace(A," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(L(n--),I);return e}},D=/[!'()~]|%20/g,N={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},R=function(t){return N[t]},F=function(t){return encodeURIComponent(t).replace(D,R)},V=function(t,e){if(e)for(var n,r,i=e.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),t.push({key:j(r.shift()),value:j(r.join("="))}))},z=function(t){this.entries.length=0,V(this.entries,t)},B=function(t,e){if(t<e)throw TypeError("Not enough arguments")},q=u((function(t,e){T(this,{type:E,iterator:_(P(t).entries),kind:e})}),"Iterator",(function(){var t=O(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n})),H=function(){d(this,H,C);var t,e,n,r,i,o,s,a,l,u=arguments.length>0?arguments[0]:void 0,c=this,p=[];if(T(c,{type:C,entries:p,updateURL:function(){},updateSearchParams:z}),void 0!==u)if(g(u))if("function"==typeof(t=b(u)))for(n=(e=t.call(u)).next;!(r=n.call(e)).done;){if((s=(o=(i=_(m(r.value))).next).call(i)).done||(a=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");p.push({key:s.value+"",value:a.value+""})}else for(l in u)h(u,l)&&p.push({key:l,value:u[l]+""});else V(p,"string"==typeof u?"?"===u.charAt(0)?u.slice(1):u:u+"")},$=H.prototype;a($,{append:function(t,e){B(arguments.length,2);var n=P(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){B(arguments.length,1);for(var e=P(this),n=e.entries,r=t+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;e.updateURL()},get:function(t){B(arguments.length,1);for(var e=P(this).entries,n=t+"",r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){B(arguments.length,1);for(var e=P(this).entries,n=t+"",r=[],i=0;i<e.length;i++)e[i].key===n&&r.push(e[i].value);return r},has:function(t){B(arguments.length,1);for(var e=P(this).entries,n=t+"",r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){B(arguments.length,1);for(var n,r=P(this),i=r.entries,o=!1,s=t+"",a=e+"",l=0;l<i.length;l++)(n=i[l]).key===s&&(o?i.splice(l--,1):(o=!0,n.value=a));o||i.push({key:s,value:a}),r.updateURL()},sort:function(){var t,e,n,r=P(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(t=o[n],e=0;e<n;e++)if(i[e].key>t.key){i.splice(e,0,t);break}e===n&&i.push(t)}r.updateURL()},forEach:function(t){for(var e,n=P(this).entries,r=p(t,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new q(this,"keys")},values:function(){return new q(this,"values")},entries:function(){return new q(this,"entries")}},{enumerable:!0}),s($,k,$.entries),s($,"toString",(function(){for(var t,e=P(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(F(t.key)+"="+F(t.value));return n.join("&")}),{enumerable:!0}),l(H,C),r({global:!0,forced:!o},{URLSearchParams:H}),o||"function"!=typeof x||"function"!=typeof S||r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,n,r,i=[t];return arguments.length>1&&(g(e=arguments[1])&&(n=e.body,f(n)===C&&((r=e.headers?new S(e.headers):new S).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=v(e,{body:y(0,String(n)),headers:y(0,r)}))),i.push(e)),x.apply(this,i)}}),t.exports={URLSearchParams:H,getState:P}},285:function(t,e,n){"use strict";n(8783);var r,i=n(2109),o=n(9781),s=n(590),a=n(7854),l=n(6048),u=n(1320),c=n(5787),d=n(6656),h=n(1574),p=n(8457),f=n(8710).codeAt,m=n(3197),g=n(8003),v=n(1637),y=n(9909),_=a.URL,b=v.URLSearchParams,w=v.getState,x=y.set,S=y.getterFor("URL"),k=Math.floor,C=Math.pow,E="Invalid scheme",T="Invalid host",P="Invalid port",O=/[A-Za-z]/,A=/[\d+-.A-Za-z]/,M=/\d/,L=/^(0x|0X)/,I=/^[0-7]+$/,j=/^\d+$/,D=/^[\dA-Fa-f]+$/,N=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,R=/[\u0000\t\u000A\u000D #/:?@[\\]]/,F=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,V=/[\t\u000A\u000D]/g,z=function(t,e){var n,r,i;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return T;if(!(n=q(e.slice(1,-1))))return T;t.host=n}else if(K(t)){if(e=m(e),N.test(e))return T;if(null===(n=B(e)))return T;t.host=n}else{if(R.test(e))return T;for(n="",r=p(e),i=0;i<r.length;i++)n+=Y(r[i],$);t.host=n}},B=function(t){var e,n,r,i,o,s,a,l=t.split(".");if(l.length&&""==l[l.length-1]&&l.pop(),(e=l.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=l[r]))return t;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=L.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)s=0;else{if(!(10==o?j:8==o?I:D).test(i))return t;s=parseInt(i,o)}n.push(s)}for(r=0;r<e;r++)if(s=n[r],r==e-1){if(s>=C(256,5-e))return null}else if(s>255)return null;for(a=n.pop(),r=0;r<n.length;r++)a+=n[r]*C(256,3-r);return a},q=function(t){var e,n,r,i,o,s,a,l=[0,0,0,0,0,0,0,0],u=0,c=null,d=0,h=function(){return t.charAt(d)};if(":"==h()){if(":"!=t.charAt(1))return;d+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(e=n=0;n<4&&D.test(h());)e=16*e+parseInt(h(),16),d++,n++;if("."==h()){if(0==n)return;if(d-=n,u>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;d++}if(!M.test(h()))return;for(;M.test(h());){if(o=parseInt(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;d++}l[u]=256*l[u]+i,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(d++,!h())return}else if(h())return;l[u++]=e}else{if(null!==c)return;d++,c=++u}}if(null!==c)for(s=u-c,u=7;0!=u&&s>0;)a=l[u],l[u--]=l[c+s-1],l[c+--s]=a;else if(8!=u)return;return l},H=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=k(t/256);return e.join(".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},$={},U=h({},$,{" ":1,'"':1,"<":1,">":1,"`":1}),W=h({},U,{"#":1,"?":1,"{":1,"}":1}),G=h({},W,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(t,e){var n=f(t,0);return n>32&&n<127&&!d(e,t)?t:encodeURIComponent(t)},Z={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(t){return d(Z,t.scheme)},X=function(t){return""!=t.username||""!=t.password},Q=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},J=function(t,e){var n;return 2==t.length&&O.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},tt=function(t){var e;return t.length>1&&J(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},et=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&J(e[0],!0)||e.pop()},nt=function(t){return"."===t||"%2e"===t.toLowerCase()},rt={},it={},ot={},st={},at={},lt={},ut={},ct={},dt={},ht={},pt={},ft={},mt={},gt={},vt={},yt={},_t={},bt={},wt={},xt={},St={},kt=function(t,e,n,i){var o,s,a,l,u,c=n||rt,h=0,f="",m=!1,g=!1,v=!1;for(n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(F,"")),e=e.replace(V,""),o=p(e);h<=o.length;){switch(s=o[h],c){case rt:if(!s||!O.test(s)){if(n)return E;c=ot;continue}f+=s.toLowerCase(),c=it;break;case it:if(s&&(A.test(s)||"+"==s||"-"==s||"."==s))f+=s.toLowerCase();else{if(":"!=s){if(n)return E;f="",c=ot,h=0;continue}if(n&&(K(t)!=d(Z,f)||"file"==f&&(X(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=f,n)return void(K(t)&&Z[t.scheme]==t.port&&(t.port=null));f="","file"==t.scheme?c=gt:K(t)&&i&&i.scheme==t.scheme?c=st:K(t)?c=ct:"/"==o[h+1]?(c=at,h++):(t.cannotBeABaseURL=!0,t.path.push(""),c=wt)}break;case ot:if(!i||i.cannotBeABaseURL&&"#"!=s)return E;if(i.cannotBeABaseURL&&"#"==s){t.scheme=i.scheme,t.path=i.path.slice(),t.query=i.query,t.fragment="",t.cannotBeABaseURL=!0,c=St;break}c="file"==i.scheme?gt:lt;continue;case st:if("/"!=s||"/"!=o[h+1]){c=lt;continue}c=dt,h++;break;case at:if("/"==s){c=ht;break}c=bt;continue;case lt:if(t.scheme=i.scheme,s==r)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query=i.query;else if("/"==s||"\\"==s&&K(t))c=ut;else if("?"==s)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query="",c=xt;else{if("#"!=s){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.path.pop(),c=bt;continue}t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query=i.query,t.fragment="",c=St}break;case ut:if(!K(t)||"/"!=s&&"\\"!=s){if("/"!=s){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,c=bt;continue}c=ht}else c=dt;break;case ct:if(c=dt,"/"!=s||"/"!=f.charAt(h+1))continue;h++;break;case dt:if("/"!=s&&"\\"!=s){c=ht;continue}break;case ht:if("@"==s){m&&(f="%40"+f),m=!0,a=p(f);for(var y=0;y<a.length;y++){var _=a[y];if(":"!=_||v){var b=Y(_,G);v?t.password+=b:t.username+=b}else v=!0}f=""}else if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&K(t)){if(m&&""==f)return"Invalid authority";h-=p(f).length+1,f="",c=pt}else f+=s;break;case pt:case ft:if(n&&"file"==t.scheme){c=yt;continue}if(":"!=s||g){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&K(t)){if(K(t)&&""==f)return T;if(n&&""==f&&(X(t)||null!==t.port))return;if(l=z(t,f))return l;if(f="",c=_t,n)return;continue}"["==s?g=!0:"]"==s&&(g=!1),f+=s}else{if(""==f)return T;if(l=z(t,f))return l;if(f="",c=mt,n==ft)return}break;case mt:if(!M.test(s)){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&K(t)||n){if(""!=f){var w=parseInt(f,10);if(w>65535)return P;t.port=K(t)&&w===Z[t.scheme]?null:w,f=""}if(n)return;c=_t;continue}return P}f+=s;break;case gt:if(t.scheme="file","/"==s||"\\"==s)c=vt;else{if(!i||"file"!=i.scheme){c=bt;continue}if(s==r)t.host=i.host,t.path=i.path.slice(),t.query=i.query;else if("?"==s)t.host=i.host,t.path=i.path.slice(),t.query="",c=xt;else{if("#"!=s){tt(o.slice(h).join(""))||(t.host=i.host,t.path=i.path.slice(),et(t)),c=bt;continue}t.host=i.host,t.path=i.path.slice(),t.query=i.query,t.fragment="",c=St}}break;case vt:if("/"==s||"\\"==s){c=yt;break}i&&"file"==i.scheme&&!tt(o.slice(h).join(""))&&(J(i.path[0],!0)?t.path.push(i.path[0]):t.host=i.host),c=bt;continue;case yt:if(s==r||"/"==s||"\\"==s||"?"==s||"#"==s){if(!n&&J(f))c=bt;else if(""==f){if(t.host="",n)return;c=_t}else{if(l=z(t,f))return l;if("localhost"==t.host&&(t.host=""),n)return;f="",c=_t}continue}f+=s;break;case _t:if(K(t)){if(c=bt,"/"!=s&&"\\"!=s)continue}else if(n||"?"!=s)if(n||"#"!=s){if(s!=r&&(c=bt,"/"!=s))continue}else t.fragment="",c=St;else t.query="",c=xt;break;case bt:if(s==r||"/"==s||"\\"==s&&K(t)||!n&&("?"==s||"#"==s)){if(".."===(u=(u=f).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(et(t),"/"==s||"\\"==s&&K(t)||t.path.push("")):nt(f)?"/"==s||"\\"==s&&K(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&J(f)&&(t.host&&(t.host=""),f=f.charAt(0)+":"),t.path.push(f)),f="","file"==t.scheme&&(s==r||"?"==s||"#"==s))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==s?(t.query="",c=xt):"#"==s&&(t.fragment="",c=St)}else f+=Y(s,W);break;case wt:"?"==s?(t.query="",c=xt):"#"==s?(t.fragment="",c=St):s!=r&&(t.path[0]+=Y(s,$));break;case xt:n||"#"!=s?s!=r&&("'"==s&&K(t)?t.query+="%27":t.query+="#"==s?"%23":Y(s,$)):(t.fragment="",c=St);break;case St:s!=r&&(t.fragment+=Y(s,U))}h++}},Ct=function(t){var e,n,r=c(this,Ct,"URL"),i=arguments.length>1?arguments[1]:void 0,s=String(t),a=x(r,{type:"URL"});if(void 0!==i)if(i instanceof Ct)e=S(i);else if(n=kt(e={},String(i)))throw TypeError(n);if(n=kt(a,s,null,e))throw TypeError(n);var l=a.searchParams=new b,u=w(l);u.updateSearchParams(a.query),u.updateURL=function(){a.query=String(l)||null},o||(r.href=Tt.call(r),r.origin=Pt.call(r),r.protocol=Ot.call(r),r.username=At.call(r),r.password=Mt.call(r),r.host=Lt.call(r),r.hostname=It.call(r),r.port=jt.call(r),r.pathname=Dt.call(r),r.search=Nt.call(r),r.searchParams=Rt.call(r),r.hash=Ft.call(r))},Et=Ct.prototype,Tt=function(){var t=S(this),e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,s=t.path,a=t.query,l=t.fragment,u=e+":";return null!==i?(u+="//",X(t)&&(u+=n+(r?":"+r:"")+"@"),u+=H(i),null!==o&&(u+=":"+o)):"file"==e&&(u+="//"),u+=t.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(u+="?"+a),null!==l&&(u+="#"+l),u},Pt=function(){var t=S(this),e=t.scheme,n=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&K(t)?e+"://"+H(t.host)+(null!==n?":"+n:""):"null"},Ot=function(){return S(this).scheme+":"},At=function(){return S(this).username},Mt=function(){return S(this).password},Lt=function(){var t=S(this),e=t.host,n=t.port;return null===e?"":null===n?H(e):H(e)+":"+n},It=function(){var t=S(this).host;return null===t?"":H(t)},jt=function(){var t=S(this).port;return null===t?"":String(t)},Dt=function(){var t=S(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},Nt=function(){var t=S(this).query;return t?"?"+t:""},Rt=function(){return S(this).searchParams},Ft=function(){var t=S(this).fragment;return t?"#"+t:""},Vt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&l(Et,{href:Vt(Tt,(function(t){var e=S(this),n=String(t),r=kt(e,n);if(r)throw TypeError(r);w(e.searchParams).updateSearchParams(e.query)})),origin:Vt(Pt),protocol:Vt(Ot,(function(t){var e=S(this);kt(e,String(t)+":",rt)})),username:Vt(At,(function(t){var e=S(this),n=p(String(t));if(!Q(e)){e.username="";for(var r=0;r<n.length;r++)e.username+=Y(n[r],G)}})),password:Vt(Mt,(function(t){var e=S(this),n=p(String(t));if(!Q(e)){e.password="";for(var r=0;r<n.length;r++)e.password+=Y(n[r],G)}})),host:Vt(Lt,(function(t){var e=S(this);e.cannotBeABaseURL||kt(e,String(t),pt)})),hostname:Vt(It,(function(t){var e=S(this);e.cannotBeABaseURL||kt(e,String(t),ft)})),port:Vt(jt,(function(t){var e=S(this);Q(e)||(""==(t=String(t))?e.port=null:kt(e,t,mt))})),pathname:Vt(Dt,(function(t){var e=S(this);e.cannotBeABaseURL||(e.path=[],kt(e,t+"",_t))})),search:Vt(Nt,(function(t){var e=S(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",kt(e,t,xt)),w(e.searchParams).updateSearchParams(e.query)})),searchParams:Vt(Rt),hash:Vt(Ft,(function(t){var e=S(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",kt(e,t,St)):e.fragment=null}))}),u(Et,"toJSON",(function(){return Tt.call(this)}),{enumerable:!0}),u(Et,"toString",(function(){return Tt.call(this)}),{enumerable:!0}),_){var zt=_.createObjectURL,Bt=_.revokeObjectURL;zt&&u(Ct,"createObjectURL",(function(t){return zt.apply(_,arguments)})),Bt&&u(Ct,"revokeObjectURL",(function(t){return Bt.apply(_,arguments)}))}g(Ct,"URL"),i({global:!0,forced:!s,sham:!o},{URL:Ct})}},e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return function(){"use strict";function t(t,n){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,l=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,s=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw s}}}}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.r(r),n.d(r,{Dropzone:function(){return y},default:function(){return S}}),n(2222),n(7327),n(2772),n(6992),n(1249),n(7042),n(561),n(8264),n(8309),n(489),n(1539),n(4916),n(9714),n(8783),n(4723),n(5306),n(3123),n(3210),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(4747),n(3948),n(285);var i=function(){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e)}var n;return(n=[{key:"on",value:function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this}},{key:"emit",value:function(e){this._callbacks=this._callbacks||{};for(var n=this._callbacks[e],r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(n){var s,a=t(n,!0);try{for(a.s();!(s=a.n()).done;){var l=s.value;l.apply(this,i)}}catch(t){a.e(t)}finally{a.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+e,{args:i})),this}},{key:"makeEvent",value:function(t,e){var n={bubbles:!0,cancelable:!0,detail:e};if("function"==typeof window.CustomEvent)return new CustomEvent(t,n);var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r}},{key:"off",value:function(t,e){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1===arguments.length)return delete this._callbacks[t],this;for(var r=0;r<n.length;r++){var i=n[r];if(i===e){n.splice(r,1);break}}return this}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),e}();function o(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var a={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(t,e,n){if(n)return{dzuuid:n.file.upload.uuid,dzchunkindex:n.index,dztotalfilesize:n.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:n.file.upload.totalChunkCount,dzchunkbyteoffset:n.index*this.options.chunkSize}},accept:function(t,e){return e()},chunksUploaded:function(t,e){e()},fallback:function(){var t;this.element.className="".concat(this.element.className," dz-browser-not-supported");var e,n=o(this.element.getElementsByTagName("div"),!0);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(/(^| )dz-message($| )/.test(r.className)){t=r,r.className="dz-message";break}}}catch(t){n.e(t)}finally{n.f()}t||(t=y.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(t));var i=t.getElementsByTagName("span")[0];return i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t,e,n,r){var i={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},o=t.width/t.height;null==e&&null==n?(e=i.srcWidth,n=i.srcHeight):null==e?e=n*o:null==n&&(n=e/o);var s=(e=Math.min(e,i.srcWidth))/(n=Math.min(n,i.srcHeight));if(i.srcWidth>e||i.srcHeight>n)if("crop"===r)o>s?(i.srcHeight=t.height,i.srcWidth=i.srcHeight*s):(i.srcWidth=t.width,i.srcHeight=i.srcWidth/s);else{if("contain"!==r)throw new Error("Unknown resizeMethod '".concat(r,"'"));o>s?n=e/o:e=n*o}return i.srcX=(t.width-i.srcWidth)/2,i.srcY=(t.height-i.srcHeight)/2,i.trgWidth=e,i.trgHeight=n,i},transformFile:function(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:'<div class="dz-preview dz-file-preview"> <div class="dz-image"><img data-dz-thumbnail/></div> <div class="dz-details"> <div class="dz-size"><span data-dz-size></span></div> <div class="dz-filename"><span data-dz-name></span></div> </div> <div class="dz-progress"> <span class="dz-upload" data-dz-uploadprogress></span> </div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Check</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path> </g> </svg> </div> <div class="dz-error-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Error</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475"> <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path> </g> </g> </svg> </div> </div> ',drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:function(t){},dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:function(t){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var e=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){t.previewElement=y.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement);var n,r=o(t.previewElement.querySelectorAll("[data-dz-name]"),!0);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.textContent=t.name}}catch(t){r.e(t)}finally{r.f()}var s,a=o(t.previewElement.querySelectorAll("[data-dz-size]"),!0);try{for(a.s();!(s=a.n()).done;)(i=s.value).innerHTML=this.filesize(t.size)}catch(t){a.e(t)}finally{a.f()}this.options.addRemoveLinks&&(t._removeLink=y.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),t.previewElement.appendChild(t._removeLink));var l,u=function(n){return n.preventDefault(),n.stopPropagation(),t.status===y.UPLOADING?y.confirm(e.options.dictCancelUploadConfirmation,(function(){return e.removeFile(t)})):e.options.dictRemoveFileConfirmation?y.confirm(e.options.dictRemoveFileConfirmation,(function(){return e.removeFile(t)})):e.removeFile(t)},c=o(t.previewElement.querySelectorAll("[data-dz-remove]"),!0);try{for(c.s();!(l=c.n()).done;)l.value.addEventListener("click",u)}catch(t){c.e(t)}finally{c.f()}}},removedfile:function(t){return null!=t.previewElement&&null!=t.previewElement.parentNode&&t.previewElement.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){if(t.previewElement){t.previewElement.classList.remove("dz-file-preview");var n,r=o(t.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.alt=t.name,i.src=e}}catch(t){r.e(t)}finally{r.f()}return setTimeout((function(){return t.previewElement.classList.add("dz-image-preview")}),1)}},error:function(t,e){if(t.previewElement){t.previewElement.classList.add("dz-error"),"string"!=typeof e&&e.error&&(e=e.error);var n,r=o(t.previewElement.querySelectorAll("[data-dz-errormessage]"),!0);try{for(r.s();!(n=r.n()).done;)n.value.textContent=e}catch(t){r.e(t)}finally{r.f()}}},errormultiple:function(){},processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(t,e,n){if(t.previewElement){var r,i=o(t.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0);try{for(i.s();!(r=i.n()).done;){var s=r.value;"PROGRESS"===s.nodeName?s.value=e:s.style.width="".concat(e,"%")}}catch(t){i.e(t)}finally{i.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(t){return this.emit("error",t,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(t){if(t._removeLink&&(t._removeLink.innerHTML=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}};function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),t}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(t,e){return!e||"object"!==l(e)&&"function"!=typeof e?g(t):e}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=v(e);if(n){var i=v(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)});function o(t,e){var n,i,s;if(d(this,o),(n=r.call(this)).element=t,n.version=o.version,n.clickableElements=[],n.listeners=[],n.files=[],"string"==typeof n.element&&(n.element=document.querySelector(n.element)),!n.element||null==n.element.nodeType)throw new Error("Invalid dropzone element.");if(n.element.dropzone)throw new Error("Dropzone already attached.");o.instances.push(g(n)),n.element.dropzone=g(n);var l=null!=(s=o.optionsForElement(n.element))?s:{};if(n.options=o.extend({},a,l,null!=e?e:{}),n.options.previewTemplate=n.options.previewTemplate.replace(/\n*/g,""),n.options.forceFallback||!o.isBrowserSupported())return m(n,n.options.fallback.call(g(n)));if(null==n.options.url&&(n.options.url=n.element.getAttribute("action")),!n.options.url)throw new Error("No URL provided.");if(n.options.acceptedFiles&&n.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(n.options.uploadMultiple&&n.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return n.options.acceptedMimeTypes&&(n.options.acceptedFiles=n.options.acceptedMimeTypes,delete n.options.acceptedMimeTypes),null!=n.options.renameFilename&&(n.options.renameFile=function(t){return n.options.renameFilename.call(g(n),t.name,t)}),"string"==typeof n.options.method&&(n.options.method=n.options.method.toUpperCase()),(i=n.getExistingFallback())&&i.parentNode&&i.parentNode.removeChild(i),!1!==n.options.previewsContainer&&(n.options.previewsContainer?n.previewsContainer=o.getElement(n.options.previewsContainer,"previewsContainer"):n.previewsContainer=n.element),n.options.clickable&&(!0===n.options.clickable?n.clickableElements=[n.element]:n.clickableElements=o.getElements(n.options.clickable,"clickable")),n.init(),n}return p(o,[{key:"getAcceptedFiles",value:function(){return this.files.filter((function(t){return t.accepted})).map((function(t){return t}))}},{key:"getRejectedFiles",value:function(){return this.files.filter((function(t){return!t.accepted})).map((function(t){return t}))}},{key:"getFilesWithStatus",value:function(t){return this.files.filter((function(e){return e.status===t})).map((function(t){return t}))}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(o.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(o.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(o.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter((function(t){return t.status===o.UPLOADING||t.status===o.QUEUED})).map((function(t){return t}))}},{key:"init",value:function(){var t=this;"form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(o.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length&&function e(){t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null===t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!==t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!==t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.setAttribute("tabindex","-1"),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",o.getElement(t.options.hiddenInputContainer,"hiddenInputContainer").appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",(function(){var n=t.hiddenFileInput.files;if(n.length){var r,i=u(n,!0);try{for(i.s();!(r=i.n()).done;){var o=r.value;t.addFile(o)}}catch(t){i.e(t)}finally{i.f()}}t.emit("addedfiles",n),e()}))}(),this.URL=null!==window.URL?window.URL:window.webkitURL;var e,n=u(this.events,!0);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.on(r,this.options[r])}}catch(t){n.e(t)}finally{n.f()}this.on("uploadprogress",(function(){return t.updateTotalUploadProgress()})),this.on("removedfile",(function(){return t.updateTotalUploadProgress()})),this.on("canceled",(function(e){return t.emit("complete",e)})),this.on("complete",(function(e){if(0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout((function(){return t.emit("queuecomplete")}),0)}));var i=function(t){if(function(t){if(t.dataTransfer.types)for(var e=0;e<t.dataTransfer.types.length;e++)if("Files"===t.dataTransfer.types[e])return!0;return!1}(t))return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(e){return t.emit("dragstart",e)},dragenter:function(e){return i(e),t.emit("dragenter",e)},dragover:function(e){var n;try{n=e.dataTransfer.effectAllowed}catch(t){}return e.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",i(e),t.emit("dragover",e)},dragleave:function(e){return t.emit("dragleave",e)},drop:function(e){return i(e),t.drop(e)},dragend:function(e){return t.emit("dragend",e)}}}],this.clickableElements.forEach((function(e){return t.listeners.push({element:e,events:{click:function(n){return(e!==t.element||n.target===t.element||o.elementInside(n.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})})),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,o.instances.splice(o.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var t,e=0,n=0;if(this.getActiveFiles().length){var r,i=u(this.getActiveFiles(),!0);try{for(i.s();!(r=i.n()).done;){var o=r.value;e+=o.upload.bytesSent,n+=o.upload.total}}catch(t){i.e(t)}finally{i.f()}t=100*e/n}else t=100;return this.emit("totaluploadprogress",t,n,e)}},{key:"_getParamName",value:function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(t,"]"):"")}},{key:"_renameFile",value:function(t){return"function"!=typeof this.options.renameFile?t.name:this.options.renameFile(t)}},{key:"getFallbackForm",value:function(){var t,e;if(t=this.getExistingFallback())return t;var n='<div class="dz-fallback">';this.options.dictFallbackText&&(n+="<p>".concat(this.options.dictFallbackText,"</p>")),n+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var r=o.createElement(n);return"FORM"!==this.element.tagName?(e=o.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>'))).appendChild(r):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:r}},{key:"getExistingFallback",value:function(){for(var t=function(t){var e,n=u(t,!0);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(/(^| )fallback($| )/.test(r.className))return r}}catch(t){n.e(t)}finally{n.f()}},e=0,n=["div","form"];e<n.length;e++){var r,i=n[e];if(r=t(this.element.getElementsByTagName(i)))return r}}},{key:"setupEventListeners",value:function(){return this.listeners.map((function(t){return function(){var e=[];for(var n in t.events){var r=t.events[n];e.push(t.element.addEventListener(n,r,!1))}return e}()}))}},{key:"removeEventListeners",value:function(){return this.listeners.map((function(t){return function(){var e=[];for(var n in t.events){var r=t.events[n];e.push(t.element.removeEventListener(n,r,!1))}return e}()}))}},{key:"disable",value:function(){var t=this;return this.clickableElements.forEach((function(t){return t.classList.remove("dz-clickable")})),this.removeEventListeners(),this.disabled=!0,this.files.map((function(e){return t.cancelUpload(e)}))}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach((function(t){return t.classList.add("dz-clickable")})),this.setupEventListeners()}},{key:"filesize",value:function(t){var e=0,n="b";if(t>0){for(var r=["tb","gb","mb","kb","b"],i=0;i<r.length;i++){var o=r[i];if(t>=Math.pow(this.options.filesizeBase,4-i)/10){e=t/Math.pow(this.options.filesizeBase,4-i),n=o;break}}e=Math.round(10*e)/10}return"<strong>".concat(e,"</strong> ").concat(this.options.dictFileSizeUnits[n])}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(t){if(t.dataTransfer){this.emit("drop",t);for(var e=[],n=0;n<t.dataTransfer.files.length;n++)e[n]=t.dataTransfer.files[n];if(e.length){var r=t.dataTransfer.items;r&&r.length&&null!=r[0].webkitGetAsEntry?this._addFilesFromItems(r):this.handleFiles(e)}this.emit("addedfiles",e)}}},{key:"paste",value:function(t){if(null!=(null!=(e=null!=t?t.clipboardData:void 0)?function(t){return t.items}(e):void 0)){var e;this.emit("paste",t);var n=t.clipboardData.items;return n.length?this._addFilesFromItems(n):void 0}}},{key:"handleFiles",value:function(t){var e,n=u(t,!0);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.addFile(r)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_addFilesFromItems",value:function(t){var e=this;return function(){var n,r=[],i=u(t,!0);try{for(i.s();!(n=i.n()).done;){var o,s=n.value;null!=s.webkitGetAsEntry&&(o=s.webkitGetAsEntry())?o.isFile?r.push(e.addFile(s.getAsFile())):o.isDirectory?r.push(e._addFilesFromDirectory(o,o.name)):r.push(void 0):null==s.getAsFile||null!=s.kind&&"file"!==s.kind?r.push(void 0):r.push(e.addFile(s.getAsFile()))}}catch(t){i.e(t)}finally{i.f()}return r}()}},{key:"_addFilesFromDirectory",value:function(t,e){var n=this,r=t.createReader(),i=function(t){return n=function(e){return e.log(t)},null!=(e=console)&&"function"==typeof e.log?n(e):void 0;var e,n};return function t(){return r.readEntries((function(r){if(r.length>0){var i,o=u(r,!0);try{for(o.s();!(i=o.n()).done;){var s=i.value;s.isFile?s.file((function(t){if(!n.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath="".concat(e,"/").concat(t.name),n.addFile(t)})):s.isDirectory&&n._addFilesFromDirectory(s,"".concat(e,"/").concat(s.name))}}catch(t){o.e(t)}finally{o.f()}t()}return null}),i)}()}},{key:"accept",value:function(t,e){this.options.maxFilesize&&t.size>1024*this.options.maxFilesize*1024?e(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):o.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,e):e(this.options.dictInvalidFileType)}},{key:"addFile",value:function(t){var e=this;t.upload={uuid:o.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=o.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,(function(n){n?(t.accepted=!1,e._errorProcessing([t],n)):(t.accepted=!0,e.options.autoQueue&&e.enqueueFile(t)),e._updateMaxFilesReachedClass()}))}},{key:"enqueueFiles",value:function(t){var e,n=u(t,!0);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.enqueueFile(r)}}catch(t){n.e(t)}finally{n.f()}return null}},{key:"enqueueFile",value:function(t){var e=this;if(t.status!==o.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=o.QUEUED,this.options.autoProcessQueue)return setTimeout((function(){return e.processQueue()}),0)}},{key:"_enqueueThumbnail",value:function(t){var e=this;if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout((function(){return e._processThumbnailQueue()}),0)}},{key:"_processThumbnailQueue",value:function(){var t=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(function(n){return t.emit("thumbnail",e,n),t._processingThumbnail=!1,t._processThumbnailQueue()}))}}},{key:"removeFile",value:function(t){if(t.status===o.UPLOADING&&this.cancelUpload(t),this.files=_(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(t){null==t&&(t=!1);var e,n=u(this.files.slice(),!0);try{for(n.s();!(e=n.n()).done;){var r=e.value;(r.status!==o.UPLOADING||t)&&this.removeFile(r)}}catch(t){n.e(t)}finally{n.f()}return null}},{key:"resizeImage",value:function(t,e,n,r,i){var s=this;return this.createThumbnail(t,e,n,r,!0,(function(e,n){if(null==n)return i(t);var r=s.options.resizeMimeType;null==r&&(r=t.type);var a=n.toDataURL(r,s.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(a=x.restore(t.dataURL,a)),i(o.dataURItoBlob(a))}))}},{key:"createThumbnail",value:function(t,e,n,r,i,o){var s=this,a=new FileReader;a.onload=function(){t.dataURL=a.result,"image/svg+xml"!==t.type?s.createThumbnailFromUrl(t,e,n,r,i,o):null!=o&&o(a.result)},a.readAsDataURL(t)}},{key:"displayExistingFile",value:function(t,e,n,r){var i=this,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this.emit("addedfile",t),this.emit("complete",t),o){var s=function(e){i.emit("thumbnail",t,e),n&&n()};t.dataURL=e,this.createThumbnailFromUrl(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,s,r)}else this.emit("thumbnail",t,e),n&&n()}},{key:"createThumbnailFromUrl",value:function(t,e,n,r,i,o,s){var a=this,l=document.createElement("img");return s&&(l.crossOrigin=s),i="from-image"!=getComputedStyle(document.body).imageOrientation&&i,l.onload=function(){var s=function(t){return t(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&i&&(s=function(t){return EXIF.getData(l,(function(){return t(EXIF.getTag(this,"Orientation"))}))}),s((function(i){t.width=l.width,t.height=l.height;var s=a.options.resize.call(a,t,e,n,r),u=document.createElement("canvas"),c=u.getContext("2d");switch(u.width=s.trgWidth,u.height=s.trgHeight,i>4&&(u.width=s.trgHeight,u.height=s.trgWidth),i){case 2:c.translate(u.width,0),c.scale(-1,1);break;case 3:c.translate(u.width,u.height),c.rotate(Math.PI);break;case 4:c.translate(0,u.height),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-u.width);break;case 7:c.rotate(.5*Math.PI),c.translate(u.height,-u.width),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-u.height,0)}w(c,l,null!=s.srcX?s.srcX:0,null!=s.srcY?s.srcY:0,s.srcWidth,s.srcHeight,null!=s.trgX?s.trgX:0,null!=s.trgY?s.trgY:0,s.trgWidth,s.trgHeight);var d=u.toDataURL("image/png");if(null!=o)return o(d,u)}))},null!=o&&(l.onerror=o),l.src=t.dataURL}},{key:"processQueue",value:function(){var t=this.options.parallelUploads,e=this.getUploadingFiles().length,n=e;if(!(e>=t)){var r=this.getQueuedFiles();if(r.length>0){if(this.options.uploadMultiple)return this.processFiles(r.slice(0,t-e));for(;n<t;){if(!r.length)return;this.processFile(r.shift()),n++}}}}},{key:"processFile",value:function(t){return this.processFiles([t])}},{key:"processFiles",value:function(t){var e,n=u(t,!0);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.processing=!0,r.status=o.UPLOADING,this.emit("processing",r)}}catch(t){n.e(t)}finally{n.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)}},{key:"_getFilesWithXhr",value:function(t){return this.files.filter((function(e){return e.xhr===t})).map((function(t){return t}))}},{key:"cancelUpload",value:function(t){if(t.status===o.UPLOADING){var e,n=this._getFilesWithXhr(t.xhr),r=u(n,!0);try{for(r.s();!(e=r.n()).done;)e.value.status=o.CANCELED}catch(t){r.e(t)}finally{r.f()}void 0!==t.xhr&&t.xhr.abort();var i,s=u(n,!0);try{for(s.s();!(i=s.n()).done;){var a=i.value;this.emit("canceled",a)}}catch(t){s.e(t)}finally{s.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else t.status!==o.ADDED&&t.status!==o.QUEUED||(t.status=o.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(t){if("function"==typeof t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.apply(this,n)}return t}},{key:"uploadFile",value:function(t){return this.uploadFiles([t])}},{key:"uploadFiles",value:function(t){var e=this;this._transformFiles(t,(function(n){if(e.options.chunking){var r=n[0];t[0].upload.chunked=e.options.chunking&&(e.options.forceChunking||r.size>e.options.chunkSize),t[0].upload.totalChunkCount=Math.ceil(r.size/e.options.chunkSize)}if(t[0].upload.chunked){var i=t[0],s=n[0];i.upload.chunks=[];var a=function(){for(var n=0;void 0!==i.upload.chunks[n];)n++;if(!(n>=i.upload.totalChunkCount)){var r=n*e.options.chunkSize,a=Math.min(r+e.options.chunkSize,s.size),l={name:e._getParamName(0),data:s.webkitSlice?s.webkitSlice(r,a):s.slice(r,a),filename:i.upload.filename,chunkIndex:n};i.upload.chunks[n]={file:i,index:n,dataBlock:l,status:o.UPLOADING,progress:0,retries:0},e._uploadData(t,[l])}};if(i.upload.finishedChunkUpload=function(n,r){var s=!0;n.status=o.SUCCESS,n.dataBlock=null,n.xhr=null;for(var l=0;l<i.upload.totalChunkCount;l++){if(void 0===i.upload.chunks[l])return a();i.upload.chunks[l].status!==o.SUCCESS&&(s=!1)}s&&e.options.chunksUploaded(i,(function(){e._finished(t,r,null)}))},e.options.parallelChunkUploads)for(var l=0;l<i.upload.totalChunkCount;l++)a();else a()}else{for(var u=[],c=0;c<t.length;c++)u[c]={name:e._getParamName(c),data:n[c],filename:t[c].upload.filename};e._uploadData(t,u)}}))}},{key:"_getChunk",value:function(t,e){for(var n=0;n<t.upload.totalChunkCount;n++)if(void 0!==t.upload.chunks[n]&&t.upload.chunks[n].xhr===e)return t.upload.chunks[n]}},{key:"_uploadData",value:function(t,e){var n,r=this,i=new XMLHttpRequest,s=u(t,!0);try{for(s.s();!(n=s.n()).done;)n.value.xhr=i}catch(t){s.e(t)}finally{s.f()}t[0].upload.chunked&&(t[0].upload.chunks[e[0].chunkIndex].xhr=i);var a=this.resolveOption(this.options.method,t),l=this.resolveOption(this.options.url,t);i.open(a,l,!0),this.resolveOption(this.options.timeout,t)&&(i.timeout=this.resolveOption(this.options.timeout,t)),i.withCredentials=!!this.options.withCredentials,i.onload=function(e){r._finishedUploading(t,i,e)},i.ontimeout=function(){r._handleUploadError(t,i,"Request timedout after ".concat(r.options.timeout/1e3," seconds"))},i.onerror=function(){r._handleUploadError(t,i)},(null!=i.upload?i.upload:i).onprogress=function(e){return r._updateFilesUploadProgress(t,i,e)};var c={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var d in this.options.headers&&o.extend(c,this.options.headers),c){var h=c[d];h&&i.setRequestHeader(d,h)}var p=new FormData;if(this.options.params){var f=this.options.params;for(var m in"function"==typeof f&&(f=f.call(this,t,i,t[0].upload.chunked?this._getChunk(t[0],i):null)),f){var g=f[m];if(Array.isArray(g))for(var v=0;v<g.length;v++)p.append(m,g[v]);else p.append(m,g)}}var y,_=u(t,!0);try{for(_.s();!(y=_.n()).done;){var b=y.value;this.emit("sending",b,i,p)}}catch(t){_.e(t)}finally{_.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",t,i,p),this._addFormElementData(p);for(var w=0;w<e.length;w++){var x=e[w];p.append(x.name,x.data,x.filename)}this.submitRequest(i,p,t)}},{key:"_transformFiles",value:function(t,e){for(var n=this,r=[],i=0,o=function(o){n.options.transformFile.call(n,t[o],(function(n){r[o]=n,++i===t.length&&e(r)}))},s=0;s<t.length;s++)o(s)}},{key:"_addFormElementData",value:function(t){if("FORM"===this.element.tagName){var e,n=u(this.element.querySelectorAll("input, textarea, select, button"),!0);try{for(n.s();!(e=n.n()).done;){var r=e.value,i=r.getAttribute("name"),o=r.getAttribute("type");if(o&&(o=o.toLowerCase()),null!=i)if("SELECT"===r.tagName&&r.hasAttribute("multiple")){var s,a=u(r.options,!0);try{for(a.s();!(s=a.n()).done;){var l=s.value;l.selected&&t.append(i,l.value)}}catch(t){a.e(t)}finally{a.f()}}else(!o||"checkbox"!==o&&"radio"!==o||r.checked)&&t.append(i,r.value)}}catch(t){n.e(t)}finally{n.f()}}}},{key:"_updateFilesUploadProgress",value:function(t,e,n){if(t[0].upload.chunked){var r=t[0],i=this._getChunk(r,e);n?(i.progress=100*n.loaded/n.total,i.total=n.total,i.bytesSent=n.loaded):(i.progress=100,i.bytesSent=i.total),r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var o=0;o<r.upload.totalChunkCount;o++)r.upload.chunks[o]&&void 0!==r.upload.chunks[o].progress&&(r.upload.progress+=r.upload.chunks[o].progress,r.upload.total+=r.upload.chunks[o].total,r.upload.bytesSent+=r.upload.chunks[o].bytesSent);r.upload.progress=r.upload.progress/r.upload.totalChunkCount,this.emit("uploadprogress",r,r.upload.progress,r.upload.bytesSent)}else{var s,a=u(t,!0);try{for(a.s();!(s=a.n()).done;){var l=s.value;l.upload.total&&l.upload.bytesSent&&l.upload.bytesSent==l.upload.total||(n?(l.upload.progress=100*n.loaded/n.total,l.upload.total=n.total,l.upload.bytesSent=n.loaded):(l.upload.progress=100,l.upload.bytesSent=l.upload.total),this.emit("uploadprogress",l,l.upload.progress,l.upload.bytesSent))}}catch(t){a.e(t)}finally{a.f()}}}},{key:"_finishedUploading",value:function(t,e,n){var r;if(t[0].status!==o.CANCELED&&4===e.readyState){if("arraybuffer"!==e.responseType&&"blob"!==e.responseType&&(r=e.responseText,e.getResponseHeader("content-type")&&~e.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(t){n=t,r="Invalid JSON response from server."}this._updateFilesUploadProgress(t,e),200<=e.status&&e.status<300?t[0].upload.chunked?t[0].upload.finishedChunkUpload(this._getChunk(t[0],e),r):this._finished(t,r,n):this._handleUploadError(t,e,r)}}},{key:"_handleUploadError",value:function(t,e,n){if(t[0].status!==o.CANCELED){if(t[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(t[0],e);if(r.retries++<this.options.retryChunksLimit)return void this._uploadData(t,[r.dataBlock]);console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(t,n||this.options.dictResponseError.replace("{{statusCode}}",e.status),e)}}},{key:"submitRequest",value:function(t,e,n){1==t.readyState?t.send(e):console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.")}},{key:"_finished",value:function(t,e,n){var r,i=u(t,!0);try{for(i.s();!(r=i.n()).done;){var s=r.value;s.status=o.SUCCESS,this.emit("success",s,e,n),this.emit("complete",s)}}catch(t){i.e(t)}finally{i.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",t,e,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(t,e,n){var r,i=u(t,!0);try{for(i.s();!(r=i.n()).done;){var s=r.value;s.status=o.ERROR,this.emit("error",s,e,n),this.emit("complete",s)}}catch(t){i.e(t)}finally{i.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",t,e,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=i,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var s=o[i];for(var a in s){var l=s[a];t[a]=l}}return t}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}}]),o}(i);y.initClass(),y.version="5.9.3",y.options={},y.optionsForElement=function(t){return t.getAttribute("id")?y.options[b(t.getAttribute("id"))]:void 0},y.instances=[],y.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},y.autoDiscover=!0,y.discover=function(){var t;if(document.querySelectorAll)t=document.querySelectorAll(".dropzone");else{t=[];var e=function(e){return function(){var n,r=[],i=u(e,!0);try{for(i.s();!(n=i.n()).done;){var o=n.value;/(^| )dropzone($| )/.test(o.className)?r.push(t.push(o)):r.push(void 0)}}catch(t){i.e(t)}finally{i.f()}return r}()};e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))}return function(){var e,n=[],r=u(t,!0);try{for(r.s();!(e=r.n()).done;){var i=e.value;!1!==y.optionsForElement(i)?n.push(new y(i)):n.push(void 0)}}catch(t){r.e(t)}finally{r.f()}return n}()},y.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],y.isBrowserSupported=function(){var t=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a")){void 0!==y.blacklistedBrowsers&&(y.blockedBrowsers=y.blacklistedBrowsers);var e,n=u(y.blockedBrowsers,!0);try{for(n.s();!(e=n.n()).done;)e.value.test(navigator.userAgent)&&(t=!1)}catch(t){n.e(t)}finally{n.f()}}else t=!1;else t=!1;return t},y.dataURItoBlob=function(t){for(var e=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(e.length),i=new Uint8Array(r),o=0,s=e.length,a=0<=s;a?o<=s:o>=s;a?o++:o--)i[o]=e.charCodeAt(o);return new Blob([r],{type:n})};var _=function(t,e){return t.filter((function(t){return t!==e})).map((function(t){return t}))},b=function(t){return t.replace(/[\-_](\w)/g,(function(t){return t.charAt(1).toUpperCase()}))};y.createElement=function(t){var e=document.createElement("div");return e.innerHTML=t,e.childNodes[0]},y.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},y.getElement=function(t,e){var n;if("string"==typeof t?n=document.querySelector(t):null!=t.nodeType&&(n=t),null==n)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector or a plain HTML element."));return n},y.getElements=function(t,e){var n,r;if(t instanceof Array){r=[];try{var i,o=u(t,!0);try{for(o.s();!(i=o.n()).done;)n=i.value,r.push(this.getElement(n,e))}catch(t){o.e(t)}finally{o.f()}}catch(t){r=null}}else if("string"==typeof t){r=[];var s,a=u(document.querySelectorAll(t),!0);try{for(a.s();!(s=a.n()).done;)n=s.value,r.push(n)}catch(t){a.e(t)}finally{a.f()}}else null!=t.nodeType&&(r=[t]);if(null==r||!r.length)throw new Error("Invalid `".concat(e,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return r},y.confirm=function(t,e,n){return window.confirm(t)?e():null!=n?n():void 0},y.isValidFile=function(t,e){if(!e)return!0;e=e.split(",");var n,r=t.type,i=r.replace(/\/.*$/,""),o=u(e,!0);try{for(o.s();!(n=o.n()).done;){var s=n.value;if("."===(s=s.trim()).charAt(0)){if(-1!==t.name.toLowerCase().indexOf(s.toLowerCase(),t.name.length-s.length))return!0}else if(/\/\*$/.test(s)){if(i===s.replace(/\/.*$/,""))return!0}else if(r===s)return!0}}catch(t){o.e(t)}finally{o.f()}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(t){return this.each((function(){return new y(this,t)}))}),y.ADDED="added",y.QUEUED="queued",y.ACCEPTED=y.QUEUED,y.UPLOADING="uploading",y.PROCESSING=y.UPLOADING,y.CANCELED="canceled",y.ERROR="error",y.SUCCESS="success";var w=function(t,e,n,r,i,o,s,a,l,u){var c=function(t){t.naturalWidth;var e=t.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=e;var r=n.getContext("2d");r.drawImage(t,0,0);for(var i=r.getImageData(1,0,1,e).data,o=0,s=e,a=e;a>o;)0===i[4*(a-1)+3]?s=a:o=a,a=s+o>>1;var l=a/e;return 0===l?1:l}(e);return t.drawImage(e,n,r,i,o,s,a,l,u/c)},x=function(){function t(){d(this,t)}return p(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(t){for(var e="",n=void 0,r=void 0,i="",o=void 0,s=void 0,a=void 0,l="",u=0;o=(n=t[u++])>>2,s=(3&n)<<4|(r=t[u++])>>4,a=(15&r)<<2|(i=t[u++])>>6,l=63&i,isNaN(r)?a=l=64:isNaN(i)&&(l=64),e=e+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(l),n=r=i="",o=s=a=l="",u<t.length;);return e}},{key:"restore",value:function(t,e){if(!t.match("data:image/jpeg;base64,"))return e;var n=this.decode64(t.replace("data:image/jpeg;base64,","")),r=this.slice2Segments(n),i=this.exifManipulation(e,r);return"data:image/jpeg;base64,".concat(this.encode64(i))}},{key:"exifManipulation",value:function(t,e){var n=this.getExifArray(e),r=this.insertExif(t,n);return new Uint8Array(r)}},{key:"getExifArray",value:function(t){for(var e=void 0,n=0;n<t.length;){if(255===(e=t[n])[0]&225===e[1])return e;n++}return[]}},{key:"insertExif",value:function(t,e){var n=t.replace("data:image/jpeg;base64,",""),r=this.decode64(n),i=r.indexOf(255,3),o=r.slice(0,i),s=r.slice(i);return o.concat(e).concat(s)}},{key:"slice2Segments",value:function(t){for(var e=0,n=[];!(255===t[e]&218===t[e+1]);){if(255===t[e]&216===t[e+1])e+=2;else{var r=e+(256*t[e+2]+t[e+3])+2,i=t.slice(e,r);n.push(i),e=r}if(e>t.length)break}return n}},{key:"decode64",value:function(t){var e=void 0,n=void 0,r="",i=void 0,o=void 0,s="",a=0,l=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(t)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");e=this.KEY_STR.indexOf(t.charAt(a++))<<2|(i=this.KEY_STR.indexOf(t.charAt(a++)))>>4,n=(15&i)<<4|(o=this.KEY_STR.indexOf(t.charAt(a++)))>>2,r=(3&o)<<6|(s=this.KEY_STR.indexOf(t.charAt(a++))),l.push(e),64!==o&&l.push(n),64!==s&&l.push(r),e=n=r="",i=o=s="",a<t.length;);return l}}]),t}();x.initClass(),y._autoDiscoverFunction=function(){if(y.autoDiscover)return y.discover()},function(t,e){var n=!1,r=!0,i=t.document,o=i.documentElement,s=i.addEventListener?"addEventListener":"attachEvent",a=i.addEventListener?"removeEventListener":"detachEvent",l=i.addEventListener?"":"on",u=function r(o){if("readystatechange"!==o.type||"complete"===i.readyState)return("load"===o.type?t:i)[a](l+o.type,r,!1),!n&&(n=!0)?e.call(t,o.type||o):void 0};if("complete"!==i.readyState){if(i.createEventObject&&o.doScroll){try{r=!t.frameElement}catch(t){}r&&function t(){try{o.doScroll("left")}catch(e){return void setTimeout(t,50)}return u("poll")}()}i[s](l+"DOMContentLoaded",u,!1),i[s](l+"readystatechange",u,!1),t[s](l+"load",u,!1)}}(window,y._autoDiscoverFunction),window.Dropzone=y;var S=y}(),r}()})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSStepForm=e():t.HSStepForm=e()}(window,(function(){return d={"./src/js/hs-step-form.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return HSStepForm; });\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n* HSStepForm Plugin\n* @version: 3.0.1 (Sun, 1 Aug 2021)\n* @author: HtmlStream\n* @event-namespace: .HSStepForm\n* @license: Htmlstream Libraries (https://htmlstream.com/)\n* Copyright 2021 Htmlstream\n*/\nvar dataAttributeName = 'data-hs-step-form-options';\nvar defaults = {\n progressSelector: null,\n progressItems: null,\n stepsSelector: null,\n stepsItems: null,\n stepsActiveItem: null,\n nextSelector: '[data-hs-step-form-next-options]',\n prevSelector: '[data-hs-step-form-prev-options]',\n endSelector: null,\n isValidate: false,\n classMap: {\n active: 'active',\n checked: 'is-valid',\n error: 'is-invalid',\n required: 'js-step-required',\n focus: 'focus'\n },\n finish: function finish() {},\n preventNextStep: function preventNextStep() {\n return new Promise(function (resolve, reject) {\n resolve();\n });\n },\n onNextStep: function onNextStep() {},\n onPrevStep: function onPrevStep() {}\n};\n\nvar HSStepForm = /*#__PURE__*/function () {\n function HSStepForm(el, options, id) {\n _classCallCheck(this, HSStepForm);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(HSStepForm, [{\n key: \"_init\",\n value: function _init() {\n var that = this;\n\n var _loop = function _loop(i) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty('$initializedEl')) {\n return \"continue\";\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options;\n _options.progressItems = _$el.querySelector(_options.progressSelector).children;\n _options.stepsItems = _$el.querySelector(_options.stepsSelector).children;\n _options.stepsActiveItem = _$el.querySelector(_options.stepsSelector).querySelector(\".\".concat(_options.classMap.active));\n\n that._prepareObject(_$el, _options);\n\n _$el.querySelectorAll(_options.nextSelector).forEach(function (item) {\n item.addEventListener('click', function () {\n that._nextClickEvents(_$el, _options, item);\n });\n });\n\n _$el.querySelectorAll(_options.prevSelector).forEach(function (item) {\n item.addEventListener('click', function () {\n that._prevClickEvents(_$el, _options, item);\n });\n });\n\n _$el.querySelectorAll(_options.endSelector).forEach(function (item) {\n item.addEventListener('click', function () {\n that._endClickEvents(_$el, _options);\n });\n });\n\n that.collection[i].$initializedEl = _options;\n };\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var _ret = _loop(i);\n\n if (_ret === \"continue\") continue;\n }\n }\n }, {\n key: \"_prepareObject\",\n value: function _prepareObject($el, settings) {\n $el.querySelector(settings.stepsSelector).querySelectorAll(\":scope > :not(.\".concat(settings.classMap.active, \")\")).forEach(function (item) {\n item.style.display = 'none';\n });\n\n settings.progressItems[_toConsumableArray(settings.stepsActiveItem.parentNode.children).indexOf(settings.stepsActiveItem)].classList.add(settings.classMap.active, settings.classMap.focus);\n }\n }, {\n key: \"_endClickEvents\",\n value: function _endClickEvents($el, settings) {\n var isValid = true;\n\n if (settings.isValidate) {\n $el.classList.remove('was-validated');\n settings.progressItems[settings.progressItems.length - 1].classList.remove(settings.classMap.error);\n Array.from($el.elements).forEach(function (item) {\n if (item.offsetParent !== null && !item.checkValidity()) {\n isValid = false;\n settings.progressItems[settings.progressItems.length - 1].classList.add(settings.classMap.error);\n\n if (settings.validator) {\n settings.validator.updateFieldStete(item);\n $el.classList.add('was-validated');\n }\n }\n });\n }\n\n if (isValid) {\n return settings.finish($el, settings);\n }\n }\n }, {\n key: \"_nextClickEvents\",\n value: function _nextClickEvents($el, settings, nextEl) {\n var _this = this;\n\n var nextDataSettings = nextEl.hasAttribute('data-hs-step-form-next-options') ? JSON.parse(nextEl.getAttribute('data-hs-step-form-next-options')) : {};\n var nextItemDefaults = {\n targetSelector: null\n },\n nextItemOptions = Object.assign({}, nextItemDefaults, nextDataSettings);\n var targetSelector = $el.querySelector(nextItemOptions.targetSelector);\n\n var targetIndex = _toConsumableArray(targetSelector.parentNode.children).indexOf(targetSelector);\n\n for (var i = 0; i < settings.progressItems.length; i++) {\n if (settings.isValidate) {\n if (settings.validator) {\n $el.classList.remove('was-validated');\n }\n\n if (targetIndex > i) {\n settings.progressItems[i].classList.add(settings.classMap.error);\n var requiredSelector = settings.progressItems[i].querySelector(settings.nextSelector).getAttribute('data-hs-step-form-next-options');\n\n var _iterator = _createForOfIteratorHelper(settings.stepsItems),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var item = _step.value;\n item.classList.remove(settings.classMap.active);\n item.style.display = 'none';\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n var newTargetSelector = $el.querySelector(JSON.parse(requiredSelector).targetSelector);\n newTargetSelector.classList.add(settings.classMap.active);\n newTargetSelector.style.display = 'block';\n var isValid = true;\n Array.from($el.elements).forEach(function (item) {\n if (item.offsetParent !== null && !item.checkValidity()) {\n isValid = false;\n\n if (settings.validator) {\n settings.validator.updateFieldStete(item);\n $el.classList.add('was-validated');\n }\n }\n });\n\n if (!isValid) {\n settings.progressItems[i].classList.remove(settings.classMap.checked);\n return false;\n } else {\n settings.progressItems[i].classList.remove(settings.classMap.error);\n }\n }\n\n if (targetIndex > i && settings.isValidate) {\n settings.progressItems[i].classList.add(settings.classMap.checked);\n }\n } else {\n if (targetIndex > i && settings.isValidate) {\n settings.progressItems[i].classList.add(settings.classMap.checked);\n }\n\n if (targetIndex > i && !settings.isValidate) {\n settings.progressItems[i].classList.add(settings.classMap.active);\n }\n }\n }\n\n settings.preventNextStep($el).then(function () {\n var _iterator2 = _createForOfIteratorHelper(settings.progressItems),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _item = _step2.value;\n\n _item.classList.remove(settings.classMap.active, settings.classMap.focus);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n settings.progressItems[targetIndex].classList.add(settings.classMap.active, settings.classMap.focus);\n\n var _iterator3 = _createForOfIteratorHelper(settings.stepsItems),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var _item2 = _step3.value;\n\n _item2.classList.remove(settings.classMap.active);\n\n _item2.style.display = 'none';\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n targetSelector.classList.add(settings.classMap.active);\n\n _this.fadeIn(targetSelector, 400);\n\n return settings.onNextStep();\n });\n }\n }, {\n key: \"_prevClickEvents\",\n value: function _prevClickEvents($el, settings, prevEl) {\n var prevDataSettings = prevEl.hasAttribute('data-hs-step-form-prev-options') ? JSON.parse(prevEl.getAttribute('data-hs-step-form-prev-options')) : {};\n var prevItemDefaults = {\n targetSelector: null\n },\n prevItemOptions = Object.assign({}, prevItemDefaults, prevDataSettings);\n var targetSelector = $el.querySelector(prevItemOptions.targetSelector);\n\n var targetIndex = _toConsumableArray(targetSelector.parentNode.children).indexOf(targetSelector);\n\n for (var i = 0; i < settings.progressItems.length; i++) {\n if (settings.isValidate) {\n if (targetIndex > i) {\n settings.progressItems[i].classList.add(settings.classMap.error);\n var requiredSelector = settings.progressItems[i].querySelector(settings.nextSelector).getAttribute('data-hs-step-form-next-options');\n\n var _iterator4 = _createForOfIteratorHelper(settings.stepsItems),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var item = _step4.value;\n item.classList.remove(settings.classMap.active);\n item.style.display = 'none';\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n var newTargetSelector = $el.querySelector(JSON.parse(requiredSelector).targetSelector);\n newTargetSelector.classList.add(settings.classMap.active);\n newTargetSelector.style.display = 'block';\n var isValid = true;\n Array.from($el.elements).forEach(function (item) {\n if (item.offsetParent !== null && !item.checkValidity()) {\n isValid = false;\n }\n });\n\n if (!isValid) {\n settings.progressItems[i].classList.remove(settings.classMap.checked);\n return false;\n } else {\n settings.progressItems[i].classList.remove(settings.classMap.error);\n }\n }\n\n if (targetIndex > i && settings.isValidate) {\n settings.progressItems[i].classList.add(settings.classMap.checked);\n }\n } else {\n if (targetIndex > i && settings.isValidate) {\n settings.progressItems[i].classList.add(settings.classMap.checked);\n }\n\n if (targetIndex > i && !settings.isValidate) {\n settings.progressItems[i].classList.add(settings.classMap.active);\n }\n }\n }\n\n var _iterator5 = _createForOfIteratorHelper(settings.progressItems),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var _item3 = _step5.value;\n\n _item3.classList.remove(settings.classMap.active, settings.classMap.focus);\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n settings.progressItems[targetIndex].classList.add(settings.classMap.active, settings.classMap.focus);\n\n var _iterator6 = _createForOfIteratorHelper(settings.stepsItems),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var _item4 = _step6.value;\n\n _item4.classList.remove(settings.classMap.active);\n\n _item4.style.display = 'none';\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n targetSelector.classList.add(settings.classMap.active);\n this.fadeIn(targetSelector, 400);\n return settings.onPrevStep();\n }\n }, {\n key: \"fadeIn\",\n value: function fadeIn(el, time) {\n el.style.opacity = 0;\n el.style.display = 'block';\n var last = +new Date();\n\n var tick = function tick() {\n el.style.opacity = +el.style.opacity + (new Date() - last) / time;\n last = +new Date();\n\n if (+el.style.opacity < 1) {\n window.requestAnimationFrame && requestAnimationFrame(tick) || setTimeout(tick, 16);\n }\n };\n\n tick();\n }\n }, {\n key: \"addToCollection\",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: Object.assign({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: \"getItem\",\n value: function getItem(item) {\n if (typeof item === 'number') {\n return this.collection[item].$initializedEl;\n } else {\n return this.collection.find(function (el) {\n return el.id === item;\n }).$initializedEl;\n }\n }\n }]);\n\n return HSStepForm;\n}();\n\n\n\n//# sourceURL=webpack://HSStepForm/./src/js/hs-step-form.js?")}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-step-form.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),function(t,e){"object"==typeof exports&&void 0!==module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],(function(t){return e(function(){try{return t("moment")}catch(t){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(t,e){return t(e={exports:{}}),e.exports}((function(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);var i=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var o in i)if(i.hasOwnProperty(o)){if(!("channels"in i[o]))throw new Error("missing channels property: "+o);if(!("labels"in i[o]))throw new Error("missing channel labels property: "+o);if(i[o].labels.length!==i[o].channels)throw new Error("channel and label counts mismatch: "+o);var s=i[o].channels,a=i[o].labels;delete i[o].channels,delete i[o].labels,Object.defineProperty(i[o],"channels",{value:s}),Object.defineProperty(i[o],"labels",{value:a})}i.rgb.hsl=function(t){var e,n,r=t[0]/255,i=t[1]/255,o=t[2]/255,s=Math.min(r,i,o),a=Math.max(r,i,o),l=a-s;return a===s?e=0:r===a?e=(i-o)/l:i===a?e=2+(o-r)/l:o===a&&(e=4+(r-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(s+a)/2,[e,100*(a===s?0:n<=.5?l/(a+s):l/(2-a-s)),100*n]},i.rgb.hsv=function(t){var e,n,r,i,o,s=t[0]/255,a=t[1]/255,l=t[2]/255,u=Math.max(s,a,l),c=u-Math.min(s,a,l),d=function(t){return(u-t)/6/c+.5};return 0===c?i=o=0:(o=c/u,e=d(s),n=d(a),r=d(l),s===u?i=r-n:a===u?i=1/3+e-r:l===u&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*u]},i.rgb.hwb=function(t){var e=t[0],n=t[1],r=t[2];return[i.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(n,r))*100,100*(r=1-1/255*Math.max(e,Math.max(n,r)))]},i.rgb.cmyk=function(t){var e,n=t[0]/255,r=t[1]/255,i=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-r,1-i)))/(1-e)||0),100*((1-r-e)/(1-e)||0),100*((1-i-e)/(1-e)||0),100*e]},i.rgb.keyword=function(t){var r=n[t];if(r)return r;var i,o,s,a=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=(o=t,s=e[l],Math.pow(o[0]-s[0],2)+Math.pow(o[1]-s[1],2)+Math.pow(o[2]-s[2],2));u<a&&(a=u,i=l)}return i},i.keyword.rgb=function(t){return e[t]},i.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*e+.7152*n+.0722*r),100*(.0193*e+.1192*n+.9505*r)]},i.rgb.lab=function(t){var e=i.rgb.xyz(t),n=e[0],r=e[1],o=e[2];return r/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},i.hsl.rgb=function(t){var e,n,r,i,o,s=t[0]/360,a=t[1]/100,l=t[2]/100;if(0===a)return[o=255*l,o,o];e=2*l-(n=l<.5?l*(1+a):l+a-l*a),i=[0,0,0];for(var u=0;u<3;u++)(r=s+1/3*-(u-1))<0&&r++,r>1&&r--,o=6*r<1?e+6*(n-e)*r:2*r<1?n:3*r<2?e+(n-e)*(2/3-r)*6:e,i[u]=255*o;return i},i.hsl.hsv=function(t){var e=t[0],n=t[1]/100,r=t[2]/100,i=n,o=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=o<=1?o:2-o,[e,100*(0===r?2*i/(o+i):2*n/(r+n)),(r+n)/2*100]},i.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,r=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*r*(1-n),a=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,s];case 1:return[a,r,s];case 2:return[s,r,l];case 3:return[s,a,r];case 4:return[l,s,r];case 5:return[r,s,a]}},i.hsv.hsl=function(t){var e,n,r,i=t[0],o=t[1]/100,s=t[2]/100,a=Math.max(s,.01);return r=(2-o)*s,n=o*a,[i,100*(n=(n/=(e=(2-o)*a)<=1?e:2-e)||0),100*(r/=2)]},i.hwb.rgb=function(t){var e,n,r,i,o,s,a,l=t[0]/360,u=t[1]/100,c=t[2]/100,d=u+c;switch(d>1&&(u/=d,c/=d),r=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(r=1-r),i=u+r*((n=1-c)-u),e){default:case 6:case 0:o=n,s=i,a=u;break;case 1:o=i,s=n,a=u;break;case 2:o=u,s=n,a=i;break;case 3:o=u,s=i,a=n;break;case 4:o=i,s=u,a=n;break;case 5:o=n,s=u,a=i}return[255*o,255*s,255*a]},i.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},i.xyz.rgb=function(t){var e,n,r,i=t[0]/100,o=t[1]/100,s=t[2]/100;return n=-.9689*i+1.8758*o+.0415*s,r=.0557*i+-.204*o+1.057*s,e=(e=3.2406*i+-1.5372*o+-.4986*s)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},i.xyz.lab=function(t){var e=t[0],n=t[1],r=t[2];return n/=100,r/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},i.lab.xyz=function(t){var e,n,r,i=t[0];e=t[1]/500+(n=(i+16)/116),r=n-t[2]/200;var o=Math.pow(n,3),s=Math.pow(e,3),a=Math.pow(r,3);return n=o>.008856?o:(n-16/116)/7.787,e=s>.008856?s:(e-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,[e*=95.047,n*=100,r*=108.883]},i.lab.lch=function(t){var e,n=t[0],r=t[1],i=t[2];return(e=360*Math.atan2(i,r)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(r*r+i*i),e]},i.lch.lab=function(t){var e,n=t[0],r=t[1];return e=t[2]/360*2*Math.PI,[n,r*Math.cos(e),r*Math.sin(e)]},i.rgb.ansi16=function(t){var e=t[0],n=t[1],r=t[2],o=1 in arguments?arguments[1]:i.rgb.hsv(t)[2];if(0===(o=Math.round(o/50)))return 30;var s=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===o&&(s+=60),s},i.hsv.ansi16=function(t){return i.rgb.ansi16(i.hsv.rgb(t),t[2])},i.rgb.ansi256=function(t){var e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},i.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},i.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},i.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},i.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},i.rgb.hcg=function(t){var e,n=t[0]/255,r=t[1]/255,i=t[2]/255,o=Math.max(Math.max(n,r),i),s=Math.min(Math.min(n,r),i),a=o-s;return e=a<=0?0:o===n?(r-i)/a%6:o===r?2+(i-n)/a:4+(n-r)/a+4,e/=6,[360*(e%=1),100*a,100*(a<1?s/(1-a):0)]},i.hsl.hcg=function(t){var e,n=t[1]/100,r=t[2]/100,i=0;return(e=r<.5?2*n*r:2*n*(1-r))<1&&(i=(r-.5*e)/(1-e)),[t[0],100*e,100*i]},i.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=e*n,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},i.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100;if(0===n)return[255*r,255*r,255*r];var i,o=[0,0,0],s=e%1*6,a=s%1,l=1-a;switch(Math.floor(s)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[255*(n*o[0]+i),255*(n*o[1]+i),255*(n*o[2]+i)]},i.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),r=0;return n>0&&(r=e/n),[t[0],100*r,100*n]},i.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[t[0],100*r,100*n]},i.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},i.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,r=n-e,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},i.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},i.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},i.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},i.gray.hsl=i.gray.hsv=function(t){return[0,0,t[0]]},i.gray.hwb=function(t){return[0,100,t[0]]},i.gray.cmyk=function(t){return[0,0,0,t[0]]},i.gray.lab=function(t){return[t[0],0,0]},i.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},i.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));function r(t){var e=function(){for(var t={},e=Object.keys(n),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),o=Object.keys(n[i]),s=o.length,a=0;a<s;a++){var l=o[a],u=e[l];-1===u.distance&&(u.distance=e[i].distance+1,u.parent=i,r.unshift(l))}return e}function i(t,e){return function(n){return e(t(n))}}function o(t,e){for(var r=[e[t].parent,t],o=n[e[t].parent][t],s=e[t].parent;e[s].parent;)r.unshift(e[s].parent),o=i(n[e[s].parent][s],o),s=e[s].parent;return o.conversion=r,o}n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;var s={};Object.keys(n).forEach((function(t){s[t]={},Object.defineProperty(s[t],"channels",{value:n[t].channels}),Object.defineProperty(s[t],"labels",{value:n[t].labels});var e=function(t){for(var e=r(t),n={},i=Object.keys(e),s=i.length,a=0;a<s;a++){var l=i[a];null!==e[l].parent&&(n[l]=o(l,e))}return n}(t);Object.keys(e).forEach((function(n){var r=e[n];s[t][n]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var r=n.length,i=0;i<r;i++)n[i]=Math.round(n[i]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(r),s[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(r)}))}));var a=s,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={getRgba:c,getHsla:d,getRgb:function(t){var e=c(t);return e&&e.slice(0,3)},getHsl:function(t){var e=d(t);return e&&e.slice(0,3)},getHwb:h,getAlpha:function(t){var e=c(t);return e||(e=d(t))||(e=h(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?p(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:p,percentString:function(t,e){return e<1||t[3]&&t[3]<1?f(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:f,hslString:function(t,e){return e<1||t[3]&&t[3]<1?m(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:m,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return y[t.slice(0,3)]}};function c(t){if(t){var e=[0,0,0],n=1,r=t.match(/^#([a-fA-F0-9]{3,4})$/i),i="";if(r){i=(r=r[1])[3];for(var o=0;o<e.length;o++)e[o]=parseInt(r[o]+r[o],16);i&&(n=Math.round(parseInt(i+i,16)/255*100)/100)}else if(r=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(i=r[2],r=r[1],o=0;o<e.length;o++)e[o]=parseInt(r.slice(2*o,2*o+2),16);i&&(n=Math.round(parseInt(i,16)/255*100)/100)}else if(r=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=parseInt(r[o+1]);n=parseFloat(r[4])}else if(r=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=Math.round(2.55*parseFloat(r[o+1]));n=parseFloat(r[4])}else if(r=t.match(/(\w+)/)){if("transparent"==r[1])return[0,0,0,0];if(!(e=l[r[1]]))return}for(o=0;o<e.length;o++)e[o]=g(e[o],0,255);return n=n||0==n?g(n,0,1):1,e[3]=n,e}}function d(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[g(parseInt(e[1]),0,360),g(parseFloat(e[2]),0,100),g(parseFloat(e[3]),0,100),g(isNaN(n)?1:n,0,1)]}}}function h(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[g(parseInt(e[1]),0,360),g(parseFloat(e[2]),0,100),g(parseFloat(e[3]),0,100),g(isNaN(n)?1:n,0,1)]}}}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function f(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function g(t,e,n){return Math.min(Math.max(e,t),n)}function v(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var y={};for(var _ in l)y[l[_]]=_;var b=function(t){return t instanceof b?t:this instanceof b?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=u.getRgba(t))?this.setValues("rgb",e):(e=u.getHsla(t))?this.setValues("hsl",e):(e=u.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new b(t);var e};b.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return u.hexString(this.values.rgb)},rgbString:function(){return u.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return u.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return u.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return u.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return u.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return u.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return u.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var r=t[n]/255;e[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,r=void 0===e?.5:e,i=2*r-1,o=this.alpha()-n.alpha(),s=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,a=1-s;return this.rgb(s*this.red()+a*n.red(),s*this.green()+a*n.green(),s*this.blue()+a*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new b,r=this.values,i=n.values;for(var o in r)r.hasOwnProperty(o)&&(t=r[o],"[object Array]"===(e={}.toString.call(t))?i[o]=t.slice(0):"[object Number]"===e?i[o]=t:console.error("unexpected color value:",t));return n}},b.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},b.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},b.prototype.getValues=function(t){for(var e=this.values,n={},r=0;r<t.length;r++)n[t.charAt(r)]=e[t][r];return 1!==e.alpha&&(n.a=e.alpha),n},b.prototype.setValues=function(t,e){var n,r,i=this.values,o=this.spaces,s=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)i[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)i[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[o[t][0]]){var u=o[t];for(n=0;n<t.length;n++)i[t][n]=e[u[n]];l=e.alpha}if(i.alpha=Math.max(0,Math.min(1,void 0===l?i.alpha:l)),"alpha"===t)return!1;for(n=0;n<t.length;n++)r=Math.max(0,Math.min(s[t][n],i[t][n])),i[t][n]=Math.round(r);for(var c in o)c!==t&&(i[c]=a[t][c](i[t]));return!0},b.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},b.prototype.setChannel=function(t,e,n){var r=this.values[t];return void 0===n?r[e]:(n===r[e]||(r[e]=n,this.setValues(t,r)),this)},"undefined"!=typeof window&&(window.Color=b);var w=b;function x(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var S,k={noop:function(){},uid:(S=0,function(){return S++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return k.valueOrDefault(k.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,r){var i,o,s;if(k.isArray(t))if(o=t.length,r)for(i=o-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<o;i++)e.call(n,t[i],i);else if(k.isObject(t))for(o=(s=Object.keys(t)).length,i=0;i<o;i++)e.call(n,t[s[i]],s[i])},arrayEquals:function(t,e){var n,r,i,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(i=t[n],o=e[n],i instanceof Array&&o instanceof Array){if(!k.arrayEquals(i,o))return!1}else if(i!==o)return!1;return!0},clone:function(t){if(k.isArray(t))return t.map(k.clone);if(k.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),r=n.length,i=0;i<r;++i)e[n[i]]=k.clone(t[n[i]]);return e}return t},_merger:function(t,e,n,r){if(x(t)){var i=e[t],o=n[t];k.isObject(i)&&k.isObject(o)?k.merge(i,o,r):e[t]=k.clone(o)}},_mergerIf:function(t,e,n){if(x(t)){var r=e[t],i=n[t];k.isObject(r)&&k.isObject(i)?k.mergeIf(r,i):e.hasOwnProperty(t)||(e[t]=k.clone(i))}},merge:function(t,e,n){var r,i,o,s,a,l=k.isArray(e)?e:[e],u=l.length;if(!k.isObject(t))return t;for(r=(n=n||{}).merger||k._merger,i=0;i<u;++i)if(e=l[i],k.isObject(e))for(a=0,s=(o=Object.keys(e)).length;a<s;++a)r(o[a],t,e,n);return t},mergeIf:function(t,e){return k.merge(t,e,{merger:k._mergerIf})},extend:Object.assign||function(t){return k.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},r=function(){this.constructor=n};return r.prototype=e.prototype,n.prototype=new r,n.extend=k.inherits,t&&k.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,r){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+r+'" instead')}},C=k;k.callCallback=k.callback,k.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},k.getValueOrDefault=k.valueOrDefault,k.getValueAtIndexOrDefault=k.valueAtIndexOrDefault;var E={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1===t?1:(n||(n=.3),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1===t?1:(n||(n=.3),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),t<1?r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-E.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*E.easeInBounce(2*t):.5*E.easeOutBounce(2*t-1)+.5}},T={effects:E};C.easingEffects=E;var P=Math.PI,O=P/180,A=2*P,M=P/2,L=P/4,I=2*P/3,j={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,r,i,o){if(o){var s=Math.min(o,i/2,r/2),a=e+s,l=n+s,u=e+r-s,c=n+i-s;t.moveTo(e,l),a<u&&l<c?(t.arc(a,l,s,-P,-M),t.arc(u,l,s,-M,0),t.arc(u,c,s,0,M),t.arc(a,c,s,M,P)):a<u?(t.moveTo(a,n),t.arc(u,l,s,-M,M),t.arc(a,l,s,M,P+M)):l<c?(t.arc(a,l,s,-P,0),t.arc(a,c,s,0,P)):t.arc(a,l,s,-P,P),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,r,i)},drawPoint:function(t,e,n,r,i,o){var s,a,l,u,c,d=(o||0)*O;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(s=e.toString())||"[object HTMLCanvasElement]"===s))return t.save(),t.translate(r,i),t.rotate(d),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(r,i,n,0,A),t.closePath();break;case"triangle":t.moveTo(r+Math.sin(d)*n,i-Math.cos(d)*n),d+=I,t.lineTo(r+Math.sin(d)*n,i-Math.cos(d)*n),d+=I,t.lineTo(r+Math.sin(d)*n,i-Math.cos(d)*n),t.closePath();break;case"rectRounded":u=n-(c=.516*n),a=Math.cos(d+L)*u,l=Math.sin(d+L)*u,t.arc(r-a,i-l,c,d-P,d-M),t.arc(r+l,i-a,c,d-M,d),t.arc(r+a,i+l,c,d,d+M),t.arc(r-l,i+a,c,d+M,d+P),t.closePath();break;case"rect":if(!o){u=Math.SQRT1_2*n,t.rect(r-u,i-u,2*u,2*u);break}d+=L;case"rectRot":a=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-a,i-l),t.lineTo(r+l,i-a),t.lineTo(r+a,i+l),t.lineTo(r-l,i+a),t.closePath();break;case"crossRot":d+=L;case"cross":a=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-a,i-l),t.lineTo(r+a,i+l),t.moveTo(r+l,i-a),t.lineTo(r-l,i+a);break;case"star":a=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-a,i-l),t.lineTo(r+a,i+l),t.moveTo(r+l,i-a),t.lineTo(r-l,i+a),d+=L,a=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-a,i-l),t.lineTo(r+a,i+l),t.moveTo(r+l,i-a),t.lineTo(r-l,i+a);break;case"line":a=Math.cos(d)*n,l=Math.sin(d)*n,t.moveTo(r-a,i-l),t.lineTo(r+a,i+l);break;case"dash":t.moveTo(r,i),t.lineTo(r+Math.cos(d)*n,i+Math.sin(d)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,r){var i=n.steppedLine;if(i){if("middle"===i){var o=(e.x+n.x)/2;t.lineTo(o,r?n.y:e.y),t.lineTo(o,r?e.y:n.y)}else"after"===i&&!r||"after"!==i&&r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(r?e.controlPointPreviousX:e.controlPointNextX,r?e.controlPointPreviousY:e.controlPointNextY,r?n.controlPointNextX:n.controlPointPreviousX,r?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},D=j;C.clear=j.clear,C.drawRoundedRectangle=function(t){t.beginPath(),j.roundedRect.apply(j,arguments)};var N={_set:function(t,e){return C.merge(this[t]||(this[t]={}),e)}};N._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var R=N,F=C.valueOrDefault,V={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,r,i;return C.isObject(t)?(e=+t.top||0,n=+t.right||0,r=+t.bottom||0,i=+t.left||0):e=n=r=i=+t||0,{top:e,right:n,bottom:r,left:i,height:e+r,width:i+n}},_parseFont:function(t){var e=R.global,n=F(t.fontSize,e.defaultFontSize),r={family:F(t.fontFamily,e.defaultFontFamily),lineHeight:C.options.toLineHeight(F(t.lineHeight,e.defaultLineHeight),n),size:n,style:F(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return r.string=function(t){return!t||C.isNullOrUndef(t.size)||C.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r},resolve:function(t,e,n,r){var i,o,s,a=!0;for(i=0,o=t.length;i<o;++i)if(void 0!==(s=t[i])&&(void 0!==e&&"function"==typeof s&&(s=s(e),a=!1),void 0!==n&&C.isArray(s)&&(s=s[n],a=!1),void 0!==s))return r&&!a&&(r.cacheable=!1),s}},z={_factorize:function(t){var e,n=[],r=Math.sqrt(t);for(e=1;e<r;e++)t%e==0&&(n.push(e),n.push(t/e));return r===(0|r)&&n.push(r),n.sort((function(t,e){return t-e})).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},B=z;C.log10=z.log10;var q=C,H=T,$=D,U=V,W=B;q.easing=H,q.canvas=$,q.options=U,q.math=W,q.rtl={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,r;"ltr"!==e&&"rtl"!==e||(r=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};var G=function(t){q.extend(this,t),this.initialize.apply(this,arguments)};q.extend(G.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=q.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,r=e._start,i=e._view;return n&&1!==t?(i||(i=e._view={}),r||(r=e._start={}),function(t,e,n,r){var i,o,s,a,l,u,c,d,h,p=Object.keys(n);for(i=0,o=p.length;i<o;++i)if(u=n[s=p[i]],e.hasOwnProperty(s)||(e[s]=u),(a=e[s])!==u&&"_"!==s[0]){if(t.hasOwnProperty(s)||(t[s]=a),(c=typeof u)==typeof(l=t[s]))if("string"===c){if((d=w(l)).valid&&(h=w(u)).valid){e[s]=h.mix(d,r).rgbString();continue}}else if(q.isFinite(l)&&q.isFinite(u)){e[s]=l+(u-l)*r;continue}e[s]=u}}(r,i,n,t),e):(e._view=q.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return q.isNumber(this._model.x)&&q.isNumber(this._model.y)}}),G.extend=q.inherits;var Y=G,Z=Y.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),K=Z;Object.defineProperty(Z.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Z.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),R._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:q.noop,onComplete:q.noop}});var X={animations:[],request:null,addAnimation:function(t,e,n,r){var i,o,s=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,r||(t.animating=!0),i=0,o=s.length;i<o;++i)if(s[i].chart===t)return void(s[i]=e);s.push(e),1===s.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=q.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=q.requestAnimFrame.call(window,(function(){t.request=null,t.startDigest()})))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,r,i=this.animations,o=0;o<i.length;)e=(t=i[o]).chart,n=t.numSteps,r=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(r,n),q.callback(t.render,[e,t],e),q.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(q.callback(t.onAnimationComplete,[t],e),e.animating=!1,i.splice(o,1)):++o}},Q=q.options.resolve,J=["push","pop","shift","splice","unshift"];function tt(t,e){var n=t._chartjs;if(n){var r=n.listeners,i=r.indexOf(e);-1!==i&&r.splice(i,1),r.length>0||(J.forEach((function(e){delete t[e]})),delete t._chartjs)}}var et=function(t,e){this.initialize(t,e)};q.extend(et.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,r=this.getDataset(),i=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!r.xAxisID||(t.xAxisID=r.xAxisID||i.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!r.yAxisID||(t.yAxisID=r.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&tt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),r=this.getDataset().data||[],i=n.data;for(t=0,e=r.length;t<e;++t)i[t]=i[t]||this.createMetaData(t);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,r=n.getDataset(),i=r.data||(r.data=[]);n._data!==i&&(n._data&&tt(n._data,n),i&&Object.isExtensible(i)&&(e=n,(t=i)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),J.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),r=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),i=r.apply(this,e);return q.each(t._chartjs.listeners,(function(t){"function"==typeof t[n]&&t[n].apply(t,e)})),i}})})))),n._data=i),n.resyncElements()},_configure:function(){this._config=q.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&q._merger(t,e,n)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:q.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],r=n.length,i=0;i<r;++i)n[i].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,r=0;for(t.dataset&&t.dataset.draw();r<n;++r)e[r].draw()},getStyle:function(t){var e,n=this.getMeta(),r=n.dataset;return this._configure(),r&&void 0===t?e=this._resolveDatasetElementOptions(r||{}):(t=t||0,e=this._resolveDataElementOptions(n.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,r,i,o,s=this,a=s.chart,l=s._config,u=t.custom||{},c=a.options.elements[s.datasetElementType.prototype._type]||{},d=s._datasetElementOptions,h={},p={chart:a,dataset:s.getDataset(),datasetIndex:s.index,hover:e};for(n=0,r=d.length;n<r;++n)i=d[n],o=e?"hover"+i.charAt(0).toUpperCase()+i.slice(1):i,h[i]=Q([u[o],l[o],c[o]],p);return h},_resolveDataElementOptions:function(t,e){var n=this,r=t&&t.custom,i=n._cachedDataOpts;if(i&&!r)return i;var o,s,a,l,u=n.chart,c=n._config,d=u.options.elements[n.dataElementType.prototype._type]||{},h=n._dataElementOptions,p={},f={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},m={cacheable:!r};if(r=r||{},q.isArray(h))for(s=0,a=h.length;s<a;++s)p[l=h[s]]=Q([r[l],c[l],d[l]],f,e,m);else for(s=0,a=(o=Object.keys(h)).length;s<a;++s)p[l=o[s]]=Q([r[l],c[h[l]],c[l],d[l]],f,e,m);return m.cacheable&&(n._cachedDataOpts=Object.freeze(p)),p},removeHoverStyle:function(t){q.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,r=t.custom||{},i=t._model,o=q.getHoverColor;t.$previousStyle={backgroundColor:i.backgroundColor,borderColor:i.borderColor,borderWidth:i.borderWidth},i.backgroundColor=Q([r.hoverBackgroundColor,e.hoverBackgroundColor,o(i.backgroundColor)],void 0,n),i.borderColor=Q([r.hoverBorderColor,e.hoverBorderColor,o(i.borderColor)],void 0,n),i.borderWidth=Q([r.hoverBorderWidth,e.hoverBorderWidth,i.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,r,i,o,s=this.getMeta().dataset,a={};if(s){for(o=s._model,i=this._resolveDatasetElementOptions(s,!0),t=0,e=(r=Object.keys(i)).length;t<e;++t)a[n=r[t]]=o[n],o[n]=i[n];s.$previousStyle=a}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,n=t.data.length,r=e.length;r<n?t.data.splice(r,n-r):r>n&&this.insertElements(n,r-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),et.extend=q.inherits;var nt=et,rt=2*Math.PI;function it(t,e){var n=e.startAngle,r=e.endAngle,i=e.pixelMargin,o=i/e.outerRadius,s=e.x,a=e.y;t.beginPath(),t.arc(s,a,e.outerRadius,n-o,r+o),e.innerRadius>i?(o=i/e.innerRadius,t.arc(s,a,e.innerRadius-i,r+o,n-o,!0)):t.arc(s,a,i,r+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}R._set("global",{elements:{arc:{backgroundColor:R.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var ot=Y.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var r=q.getAngleFromPoint(n,{x:t,y:e}),i=r.angle,o=r.distance,s=n.startAngle,a=n.endAngle;a<s;)a+=rt;for(;i>a;)i-=rt;for(;i<s;)i+=rt;var l=i>=s&&i<=a,u=o>=n.innerRadius&&o<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,i={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/rt)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,i.fullCircles){for(i.endAngle=i.startAngle+rt,e.beginPath(),e.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),e.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),e.closePath(),t=0;t<i.fullCircles;++t)e.fill();i.endAngle=i.startAngle+n.circumference%rt}e.beginPath(),e.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),e.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&function(t,e,n){var r="inner"===e.borderAlign;r?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,r){var i,o=n.endAngle;for(r&&(n.endAngle=n.startAngle+rt,it(t,n),n.endAngle=o,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=rt,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+rt,n.startAngle,!0),i=0;i<n.fullCircles;++i)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+rt),i=0;i<n.fullCircles;++i)t.stroke()}(t,e,n,r),r&&it(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}(e,n,i),e.restore()}}),st=q.valueOrDefault,at=R.global.defaultColor;R._set("global",{elements:{line:{tension:.4,backgroundColor:at,borderWidth:3,borderColor:at,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var lt=Y.extend({_type:"line",draw:function(){var t,e,n,r=this,i=r._view,o=r._chart.ctx,s=i.spanGaps,a=r._children.slice(),l=R.global,u=l.elements.line,c=-1,d=r._loop;if(a.length){if(r._loop){for(t=0;t<a.length;++t)if(e=q.previousItem(a,t),!a[t]._view.skip&&e._view.skip){a=a.slice(t).concat(a.slice(0,t)),d=s;break}d&&a.push(a[0])}for(o.save(),o.lineCap=i.borderCapStyle||u.borderCapStyle,o.setLineDash&&o.setLineDash(i.borderDash||u.borderDash),o.lineDashOffset=st(i.borderDashOffset,u.borderDashOffset),o.lineJoin=i.borderJoinStyle||u.borderJoinStyle,o.lineWidth=st(i.borderWidth,u.borderWidth),o.strokeStyle=i.borderColor||l.defaultColor,o.beginPath(),(n=a[0]._view).skip||(o.moveTo(n.x,n.y),c=0),t=1;t<a.length;++t)n=a[t]._view,e=-1===c?q.previousItem(a,t):a[c],n.skip||(c!==t-1&&!s||-1===c?o.moveTo(n.x,n.y):q.canvas.lineTo(o,e._view,n),c=t);d&&o.closePath(),o.stroke(),o.restore()}}}),ut=q.valueOrDefault,ct=R.global.defaultColor;function dt(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}R._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ct,borderColor:ct,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var ht=Y.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:dt,inXRange:dt,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,r=e.pointStyle,i=e.rotation,o=e.radius,s=e.x,a=e.y,l=R.global,u=l.defaultColor;e.skip||(void 0===t||q.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=ut(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,q.canvas.drawPoint(n,r,o,s,a,i))}}),pt=R.global.defaultColor;function ft(t){return t&&void 0!==t.width}function mt(t){var e,n,r,i,o;return ft(t)?(o=t.width/2,e=t.x-o,n=t.x+o,r=Math.min(t.y,t.base),i=Math.max(t.y,t.base)):(o=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),r=t.y-o,i=t.y+o),{left:e,top:r,right:n,bottom:i}}function gt(t,e,n){return t===e?n:t===n?e:t}function vt(t,e,n){var r=null===e,i=null===n,o=!(!t||r&&i)&&mt(t);return o&&(r||e>=o.left&&e<=o.right)&&(i||n>=o.top&&n<=o.bottom)}R._set("global",{elements:{rectangle:{backgroundColor:pt,borderColor:pt,borderSkipped:"bottom",borderWidth:0}}});var yt=Y.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=mt(t),n=e.right-e.left,r=e.bottom-e.top,i=function(t,e,n){var r,i,o,s,a=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=gt(e,"left","right")):t.base<t.y&&(e=gt(e,"bottom","top")),n[e]=!0,n):n}(t);return q.isObject(a)?(r=+a.top||0,i=+a.right||0,o=+a.bottom||0,s=+a.left||0):r=i=o=s=+a||0,{t:l.top||r<0?0:r>n?n:r,r:l.right||i<0?0:i>e?e:i,b:l.bottom||o<0?0:o>n?n:o,l:l.left||s<0?0:s>e?e:s}}(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b}}}(e),r=n.outer,i=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(r.x,r.y,r.w,r.h),r.w===i.w&&r.h===i.h||(t.save(),t.beginPath(),t.rect(r.x,r.y,r.w,r.h),t.clip(),t.fillStyle=e.borderColor,t.rect(i.x,i.y,i.w,i.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return vt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return ft(n)?vt(n,t,null):vt(n,null,e)},inXRange:function(t){return vt(this._view,t,null)},inYRange:function(t){return vt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return ft(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return ft(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),_t={},bt=ot,wt=lt,xt=ht,St=yt;_t.Arc=bt,_t.Line=wt,_t.Point=xt,_t.Rectangle=St;var kt=q._deprecated,Ct=q.valueOrDefault;R._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),R._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Et=nt.extend({dataElementType:_t.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;nt.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,kt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),kt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),kt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),kt("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),kt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,r=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=r.length;e<n;++e)this.updateElement(r[e],e,t)},updateElement:function(t,e,n){var r=this,i=r.getMeta(),o=r.getDataset(),s=r._resolveDataElementOptions(t,e);t._xScale=r.getScaleForId(i.xAxisID),t._yScale=r.getScaleForId(i.yAxisID),t._datasetIndex=r.index,t._index=e,t._model={backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderSkipped:s.borderSkipped,borderWidth:s.borderWidth,datasetLabel:o.label,label:r.chart.data.labels[e]},q.isArray(o.data[e])&&(t._model.borderSkipped=null),r._updateElementGeometry(t,e,n,s),t.pivot()},_updateElementGeometry:function(t,e,n,r){var i=this,o=t._model,s=i._getValueScale(),a=s.getBasePixel(),l=s.isHorizontal(),u=i._ruler||i.getRuler(),c=i.calculateBarValuePixels(i.index,e,r),d=i.calculateBarIndexPixels(i.index,e,u,r);o.horizontal=l,o.base=n?a:c.base,o.x=l?n?a:c.head:d.center,o.y=l?d.center:n?a:c.head,o.height=l?d.size:void 0,o.width=l?void 0:d.size},_getStacks:function(t){var e,n,r=this._getIndexScale(),i=r._getMatchingVisibleMetas(this._type),o=r.options.stacked,s=i.length,a=[];for(e=0;e<s&&(n=i[e],(!1===o||-1===a.indexOf(n.stack)||void 0===o&&void 0===n.stack)&&a.push(n.stack),n.index!==t);++e);return a},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),r=void 0!==e?n.indexOf(e):-1;return-1===r?n.length-1:r},getRuler:function(){var t,e,n=this._getIndexScale(),r=[];for(t=0,e=this.getMeta().data.length;t<e;++t)r.push(n.getPixelForValue(null,t,this.index));return{pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,n){var r,i,o,s,a,l,u,c=this.chart,d=this._getValueScale(),h=d.isHorizontal(),p=c.data.datasets,f=d._getMatchingVisibleMetas(this._type),m=d._parseValue(p[t].data[e]),g=n.minBarLength,v=d.options.stacked,y=this.getMeta().stack,_=void 0===m.start?0:m.max>=0&&m.min>=0?m.min:m.max,b=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,w=f.length;if(v||void 0===v&&void 0!==y)for(r=0;r<w&&(i=f[r]).index!==t;++r)i.stack===y&&(o=void 0===(u=d._parseValue(p[i.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(m.min<0&&o<0||m.max>=0&&o>0)&&(_+=o));return s=d.getPixelForValue(_),l=(a=d.getPixelForValue(_+b))-s,void 0!==g&&Math.abs(l)<g&&(l=g,a=b>=0&&!h||b<0&&h?s-g:s+g),{size:l,base:s,head:a,center:a+l/2}},calculateBarIndexPixels:function(t,e,n,r){var i="flex"===r.barThickness?function(t,e,n){var r,i=e.pixels,o=i[t],s=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null,l=n.categoryPercentage;return null===s&&(s=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-s),r=o-(o-Math.min(s,a))/2*l,{chunk:Math.abs(a-s)/2*l/e.stackCount,ratio:n.barPercentage,start:r}}(e,n,r):function(t,e,n){var r,i,o=n.barThickness,s=e.stackCount,a=e.pixels[t],l=q.isNullOrUndef(o)?function(t,e){var n,r,i,o,s=t._length;for(i=1,o=e.length;i<o;++i)s=Math.min(s,Math.abs(e[i]-e[i-1]));for(i=0,o=t.getTicks().length;i<o;++i)r=t.getPixelForTick(i),s=i>0?Math.min(s,Math.abs(r-n)):s,n=r;return s}(e.scale,e.pixels):-1;return q.isNullOrUndef(o)?(r=l*n.categoryPercentage,i=n.barPercentage):(r=o*s,i=1),{chunk:r/s,ratio:i,start:a-r/2}}(e,n,r),o=this.getStackIndex(t,this.getMeta().stack),s=i.start+i.chunk*o+i.chunk/2,a=Math.min(Ct(r.maxBarThickness,1/0),i.chunk*i.ratio);return{base:s-a/2,head:s+a/2,center:s,size:a}},draw:function(){var t=this.chart,e=this._getValueScale(),n=this.getMeta().data,r=this.getDataset(),i=n.length,o=0;for(q.canvas.clipArea(t.ctx,t.chartArea);o<i;++o){var s=e._parseValue(r.data[o]);isNaN(s.min)||isNaN(s.max)||n[o].draw()}q.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=this,e=q.extend({},nt.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,r=t._getValueScale().options;return e.barPercentage=Ct(n.barPercentage,e.barPercentage),e.barThickness=Ct(n.barThickness,e.barThickness),e.categoryPercentage=Ct(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=Ct(n.maxBarThickness,e.maxBarThickness),e.minBarLength=Ct(r.minBarLength,e.minBarLength),e}}),Tt=q.valueOrDefault,Pt=q.options.resolve;R._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",r=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+r.r+")"}}}});var Ot=nt.extend({dataElementType:_t.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta().data;q.each(n,(function(n,r){e.updateElement(n,r,t)}))},updateElement:function(t,e,n){var r=this,i=r.getMeta(),o=t.custom||{},s=r.getScaleForId(i.xAxisID),a=r.getScaleForId(i.yAxisID),l=r._resolveDataElementOptions(t,e),u=r.getDataset().data[e],c=r.index,d=n?s.getPixelForDecimal(.5):s.getPixelForValue("object"==typeof u?u:NaN,e,c),h=n?a.getBasePixel():a.getPixelForValue(u,e,c);t._xScale=s,t._yScale=a,t._options=l,t._datasetIndex=c,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:o.skip||isNaN(d)||isNaN(h),x:d,y:h},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,r=q.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Tt(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=Tt(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=Tt(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,r=n.chart,i=n.getDataset(),o=t.custom||{},s=i.data[e]||{},a=nt.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:r,dataIndex:e,dataset:i,datasetIndex:n.index};return n._cachedDataOpts===a&&(a=q.extend({},a)),a.radius=Pt([o.radius,s.r,n._config.radius,r.options.elements.point.radius],l,e),a}}),At=q.valueOrDefault,Mt=Math.PI,Lt=2*Mt,It=Mt/2;R._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,r,i=document.createElement("ul"),o=t.data,s=o.datasets,a=o.labels;if(i.setAttribute("class",t.id+"-legend"),s.length)for(e=0,n=s[0].data.length;e<n;++e)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=s[0].backgroundColor[e],a[e]&&r.appendChild(document.createTextNode(a[e]));return i.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,r){var i=t.getDatasetMeta(0),o=i.controller.getStyle(r);return{text:n,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,hidden:isNaN(e.datasets[0].data[r])||i.data[r].hidden,index:r}})):[]}},onClick:function(t,e){var n,r,i,o=e.index,s=this.chart;for(n=0,r=(s.data.datasets||[]).length;n<r;++n)(i=s.getDatasetMeta(n)).data[o]&&(i.data[o].hidden=!i.data[o].hidden);s.update()}},cutoutPercentage:50,rotation:-It,circumference:Lt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],r=": "+e.datasets[t.datasetIndex].data[t.index];return q.isArray(n)?(n=n.slice())[0]+=r:n+=r,n}}}});var jt=nt.extend({dataElementType:_t.Arc,linkScales:q.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,r,i,o=this,s=o.chart,a=s.chartArea,l=s.options,u=1,c=1,d=0,h=0,p=o.getMeta(),f=p.data,m=l.cutoutPercentage/100||0,g=l.circumference,v=o._getRingWeight(o.index);if(g<Lt){var y=l.rotation%Lt,_=(y+=y>=Mt?-Lt:y<-Mt?Lt:0)+g,b=Math.cos(y),w=Math.sin(y),x=Math.cos(_),S=Math.sin(_),k=y<=0&&_>=0||_>=Lt,C=y<=It&&_>=It||_>=Lt+It,E=y<=-It&&_>=-It||_>=Mt+It,T=y===-Mt||_>=Mt?-1:Math.min(b,b*m,x,x*m),P=E?-1:Math.min(w,w*m,S,S*m),O=k?1:Math.max(b,b*m,x,x*m),A=C?1:Math.max(w,w*m,S,S*m);u=(O-T)/2,c=(A-P)/2,d=-(O+T)/2,h=-(A+P)/2}for(r=0,i=f.length;r<i;++r)f[r]._options=o._resolveDataElementOptions(f[r],r);for(s.borderWidth=o.getMaxBorderWidth(),e=(a.right-a.left-s.borderWidth)/u,n=(a.bottom-a.top-s.borderWidth)/c,s.outerRadius=Math.max(Math.min(e,n)/2,0),s.innerRadius=Math.max(s.outerRadius*m,0),s.radiusLength=(s.outerRadius-s.innerRadius)/(o._getVisibleDatasetWeightTotal()||1),s.offsetX=d*s.outerRadius,s.offsetY=h*s.outerRadius,p.total=o.calculateTotal(),o.outerRadius=s.outerRadius-s.radiusLength*o._getRingWeightOffset(o.index),o.innerRadius=Math.max(o.outerRadius-s.radiusLength*v,0),r=0,i=f.length;r<i;++r)o.updateElement(f[r],r,t)},updateElement:function(t,e,n){var r=this,i=r.chart,o=i.chartArea,s=i.options,a=s.animation,l=(o.left+o.right)/2,u=(o.top+o.bottom)/2,c=s.rotation,d=s.rotation,h=r.getDataset(),p=n&&a.animateRotate||t.hidden?0:r.calculateCircumference(h.data[e])*(s.circumference/Lt),f=n&&a.animateScale?0:r.innerRadius,m=n&&a.animateScale?0:r.outerRadius,g=t._options||{};q.extend(t,{_datasetIndex:r.index,_index:e,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:l+i.offsetX,y:u+i.offsetY,startAngle:c,endAngle:d,circumference:p,outerRadius:m,innerRadius:f,label:q.valueAtIndexOrDefault(h.label,e,i.data.labels[e])}});var v=t._model;n&&a.animateRotate||(v.startAngle=0===e?s.rotation:r.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),r=0;return q.each(n.data,(function(n,i){t=e.data[i],isNaN(t)||n.hidden||(r+=Math.abs(t))})),r},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Lt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,r,i,o,s,a,l,u=0,c=this.chart;if(!t)for(e=0,n=c.data.datasets.length;e<n;++e)if(c.isDatasetVisible(e)){t=(r=c.getDatasetMeta(e)).data,e!==this.index&&(o=r.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)i=t[e],o?(o._configure(),s=o._resolveDataElementOptions(i,e)):s=i._options,"inner"!==s.borderAlign&&(a=s.borderWidth,u=(l=s.hoverBorderWidth)>(u=a>u?a:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,r=q.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=At(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=At(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=At(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(At(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});R._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),R._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Dt=Et.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Nt=q.valueOrDefault,Rt=q.options.resolve,Ft=q.canvas._isPointInArea;function Vt(t,e){var n=t&&t.options.ticks||{},r=n.reverse,i=void 0===n.min?e:0,o=void 0===n.max?e:0;return{start:r?o:i,end:r?i:o}}function zt(t,e,n){var r=n/2,i=Vt(t,r),o=Vt(e,r);return{top:o.end,right:i.end,bottom:o.start,left:i.start}}function Bt(t){var e,n,r,i;return q.isObject(t)?(e=t.top,n=t.right,r=t.bottom,i=t.left):e=n=r=i=t,{top:e,right:n,bottom:r,left:i}}R._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var qt=nt.extend({datasetElementType:_t.Line,dataElementType:_t.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,r=this,i=r.getMeta(),o=i.dataset,s=i.data||[],a=r.chart.options,l=r._config,u=r._showLine=Nt(l.showLine,a.showLines);for(r._xScale=r.getScaleForId(i.xAxisID),r._yScale=r.getScaleForId(i.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=r._yScale,o._datasetIndex=r.index,o._children=s,o._model=r._resolveDatasetElementOptions(o),o.pivot()),e=0,n=s.length;e<n;++e)r.updateElement(s[e],e,t);for(u&&0!==o._model.tension&&r.updateBezierControlPoints(),e=0,n=s.length;e<n;++e)s[e].pivot()},updateElement:function(t,e,n){var r,i,o=this,s=o.getMeta(),a=t.custom||{},l=o.getDataset(),u=o.index,c=l.data[e],d=o._xScale,h=o._yScale,p=s.dataset._model,f=o._resolveDataElementOptions(t,e);r=d.getPixelForValue("object"==typeof c?c:NaN,e,u),i=n?h.getBasePixel():o.calculatePointY(c,e,u),t._xScale=d,t._yScale=h,t._options=f,t._datasetIndex=u,t._index=e,t._model={x:r,y:i,skip:a.skip||isNaN(r)||isNaN(i),radius:f.radius,pointStyle:f.pointStyle,rotation:f.rotation,backgroundColor:f.backgroundColor,borderColor:f.borderColor,borderWidth:f.borderWidth,tension:Nt(a.tension,p?p.tension:0),steppedLine:!!p&&p.steppedLine,hitRadius:f.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,r=t.custom||{},i=e.chart.options,o=i.elements.line,s=nt.prototype._resolveDatasetElementOptions.apply(e,arguments);return s.spanGaps=Nt(n.spanGaps,i.spanGaps),s.tension=Nt(n.lineTension,o.tension),s.steppedLine=Rt([r.steppedLine,n.steppedLine,o.stepped]),s.clip=Bt(Nt(n.clip,zt(e._xScale,e._yScale,s.borderWidth))),s},calculatePointY:function(t,e,n){var r,i,o,s,a,l,u,c=this.chart,d=this._yScale,h=0,p=0;if(d.options.stacked){for(a=+d.getRightValue(t),u=(l=c._getSortedVisibleDatasetMetas()).length,r=0;r<u&&(o=l[r]).index!==n;++r)i=c.data.datasets[o.index],"line"===o.type&&o.yAxisID===d.id&&((s=+d.getRightValue(i.data[e]))<0?p+=s||0:h+=s||0);return a<0?d.getPixelForValue(p+a):d.getPixelForValue(h+a)}return d.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,r,i=this.chart,o=this.getMeta(),s=o.dataset._model,a=i.chartArea,l=o.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(s.spanGaps&&(l=l.filter((function(t){return!t._model.skip}))),"monotone"===s.cubicInterpolationMode)q.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,r=q.splineCurve(q.previousItem(l,t)._model,n,q.nextItem(l,t)._model,s.tension),n.controlPointPreviousX=r.previous.x,n.controlPointPreviousY=r.previous.y,n.controlPointNextX=r.next.x,n.controlPointNextY=r.next.y;if(i.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,Ft(n,a)&&(t>0&&Ft(l[t-1]._model,a)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,a.left,a.right),n.controlPointPreviousY=u(n.controlPointPreviousY,a.top,a.bottom)),t<l.length-1&&Ft(l[t+1]._model,a)&&(n.controlPointNextX=u(n.controlPointNextX,a.left,a.right),n.controlPointNextY=u(n.controlPointNextY,a.top,a.bottom)))},draw:function(){var t,e=this.chart,n=this.getMeta(),r=n.data||[],i=e.chartArea,o=e.canvas,s=0,a=r.length;for(this._showLine&&(t=n.dataset._model.clip,q.canvas.clipArea(e.ctx,{left:!1===t.left?0:i.left-t.left,right:!1===t.right?o.width:i.right+t.right,top:!1===t.top?0:i.top-t.top,bottom:!1===t.bottom?o.height:i.bottom+t.bottom}),n.dataset.draw(),q.canvas.unclipArea(e.ctx));s<a;++s)r[s].draw(i)},setHoverStyle:function(t){var e=t._model,n=t._options,r=q.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Nt(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=Nt(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=Nt(n.hoverBorderWidth,n.borderWidth),e.radius=Nt(n.hoverRadius,n.radius)}}),Ht=q.options.resolve;R._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,r,i=document.createElement("ul"),o=t.data,s=o.datasets,a=o.labels;if(i.setAttribute("class",t.id+"-legend"),s.length)for(e=0,n=s[0].data.length;e<n;++e)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=s[0].backgroundColor[e],a[e]&&r.appendChild(document.createTextNode(a[e]));return i.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,r){var i=t.getDatasetMeta(0),o=i.controller.getStyle(r);return{text:n,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,hidden:isNaN(e.datasets[0].data[r])||i.data[r].hidden,index:r}})):[]}},onClick:function(t,e){var n,r,i,o=e.index,s=this.chart;for(n=0,r=(s.data.datasets||[]).length;n<r;++n)(i=s.getDatasetMeta(n)).data[o].hidden=!i.data[o].hidden;s.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var $t=nt.extend({dataElementType:_t.Arc,linkScales:q.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,r,i=this,o=i.getDataset(),s=i.getMeta(),a=i.chart.options.startAngle||0,l=i._starts=[],u=i._angles=[],c=s.data;for(i._updateRadius(),s.count=i.countVisibleElements(),e=0,n=o.data.length;e<n;e++)l[e]=a,r=i._computeAngle(e),u[e]=r,a+=r;for(e=0,n=c.length;e<n;++e)c[e]._options=i._resolveDataElementOptions(c[e],e),i.updateElement(c[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,r=e.options,i=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(i/2,0),e.innerRadius=Math.max(r.cutoutPercentage?e.outerRadius/100*r.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var r=this,i=r.chart,o=r.getDataset(),s=i.options,a=s.animation,l=i.scale,u=i.data.labels,c=l.xCenter,d=l.yCenter,h=s.startAngle,p=t.hidden?0:l.getDistanceFromCenterForValue(o.data[e]),f=r._starts[e],m=f+(t.hidden?0:r._angles[e]),g=a.animateScale?0:l.getDistanceFromCenterForValue(o.data[e]),v=t._options||{};q.extend(t,{_datasetIndex:r.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:c,y:d,innerRadius:0,outerRadius:n?g:p,startAngle:n&&a.animateRotate?h:f,endAngle:n&&a.animateRotate?h:m,label:q.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return q.each(e.data,(function(e,r){isNaN(t.data[r])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,r=q.getHoverColor,i=q.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=i(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=i(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=i(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,r=e.getDataset(),i=e.getMeta();if(isNaN(r.data[t])||i.data[t].hidden)return 0;var o={chart:e.chart,dataIndex:t,dataset:r,datasetIndex:e.index};return Ht([e.chart.options.elements.arc.angle,2*Math.PI/n],o,t)}});R._set("pie",q.clone(R.doughnut)),R._set("pie",{cutoutPercentage:0});var Ut=jt,Wt=q.valueOrDefault;R._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Gt=nt.extend({datasetElementType:_t.Line,dataElementType:_t.Point,linkScales:q.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,r=this,i=r.getMeta(),o=i.dataset,s=i.data||[],a=r.chart.scale,l=r._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=a,o._datasetIndex=r.index,o._children=s,o._loop=!0,o._model=r._resolveDatasetElementOptions(o),o.pivot(),e=0,n=s.length;e<n;++e)r.updateElement(s[e],e,t);for(r.updateBezierControlPoints(),e=0,n=s.length;e<n;++e)s[e].pivot()},updateElement:function(t,e,n){var r=this,i=t.custom||{},o=r.getDataset(),s=r.chart.scale,a=s.getPointPositionForValue(e,o.data[e]),l=r._resolveDataElementOptions(t,e),u=r.getMeta().dataset._model,c=n?s.xCenter:a.x,d=n?s.yCenter:a.y;t._scale=s,t._options=l,t._datasetIndex=r.index,t._index=e,t._model={x:c,y:d,skip:i.skip||isNaN(c)||isNaN(d),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Wt(i.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,r=nt.prototype._resolveDatasetElementOptions.apply(t,arguments);return r.spanGaps=Wt(e.spanGaps,n.spanGaps),r.tension=Wt(e.lineTension,n.elements.line.tension),r},updateBezierControlPoints:function(){var t,e,n,r,i=this.getMeta(),o=this.chart.chartArea,s=i.data||[];function a(t,e,n){return Math.max(Math.min(t,n),e)}for(i.dataset._model.spanGaps&&(s=s.filter((function(t){return!t._model.skip}))),t=0,e=s.length;t<e;++t)n=s[t]._model,r=q.splineCurve(q.previousItem(s,t,!0)._model,n,q.nextItem(s,t,!0)._model,n.tension),n.controlPointPreviousX=a(r.previous.x,o.left,o.right),n.controlPointPreviousY=a(r.previous.y,o.top,o.bottom),n.controlPointNextX=a(r.next.x,o.left,o.right),n.controlPointNextY=a(r.next.y,o.top,o.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,r=q.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Wt(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=Wt(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=Wt(n.hoverBorderWidth,n.borderWidth),e.radius=Wt(n.hoverRadius,n.radius)}});R._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),R._set("global",{datasets:{scatter:{showLine:!1}}});var Yt={bar:Et,bubble:Ot,doughnut:jt,horizontalBar:Dt,line:qt,polarArea:$t,pie:Ut,radar:Gt,scatter:qt};function Zt(t,e){return t.native?{x:t.x,y:t.y}:q.getRelativePosition(t,e)}function Kt(t,e){var n,r,i,o,s,a,l=t._getSortedVisibleDatasetMetas();for(r=0,o=l.length;r<o;++r)for(i=0,s=(n=l[r].data).length;i<s;++i)(a=n[i])._view.skip||e(a)}function Xt(t,e){var n=[];return Kt(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function Qt(t,e,n,r){var i=Number.POSITIVE_INFINITY,o=[];return Kt(t,(function(t){if(!n||t.inRange(e.x,e.y)){var s=t.getCenterPoint(),a=r(e,s);a<i?(o=[t],i=a):a===i&&o.push(t)}})),o}function Jt(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,r){var i=e?Math.abs(t.x-r.x):0,o=n?Math.abs(t.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function te(t,e,n){var r=Zt(e,t);n.axis=n.axis||"x";var i=Jt(n.axis),o=n.intersect?Xt(t,r):Qt(t,r,!1,i),s=[];return o.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[o[0]._index];e&&!e._view.skip&&s.push(e)})),s):[]}var ee={modes:{single:function(t,e){var n=Zt(e,t),r=[];return Kt(t,(function(t){if(t.inRange(n.x,n.y))return r.push(t),r})),r.slice(0,1)},label:te,index:te,dataset:function(t,e,n){var r=Zt(e,t);n.axis=n.axis||"xy";var i=Jt(n.axis),o=n.intersect?Xt(t,r):Qt(t,r,!1,i);return o.length>0&&(o=t.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(t,e){return te(t,e,{intersect:!1})},point:function(t,e){return Xt(t,Zt(e,t))},nearest:function(t,e,n){var r=Zt(e,t);n.axis=n.axis||"xy";var i=Jt(n.axis);return Qt(t,r,n.intersect,i)},x:function(t,e,n){var r=Zt(e,t),i=[],o=!1;return Kt(t,(function(t){t.inXRange(r.x)&&i.push(t),t.inRange(r.x,r.y)&&(o=!0)})),n.intersect&&!o&&(i=[]),i},y:function(t,e,n){var r=Zt(e,t),i=[],o=!1;return Kt(t,(function(t){t.inYRange(r.y)&&i.push(t),t.inRange(r.x,r.y)&&(o=!0)})),n.intersect&&!o&&(i=[]),i}}},ne=q.extend;function re(t,e){return q.where(t,(function(t){return t.pos===e}))}function ie(t,e){return t.sort((function(t,n){var r=e?n:t,i=e?t:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight}))}function oe(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function se(t,e,n){var r,i,o=n.box,s=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?o.height:o.width,t[n.pos]+=n.size,o.getPadding){var a=o.getPadding();s.top=Math.max(s.top,a.top),s.left=Math.max(s.left,a.left),s.bottom=Math.max(s.bottom,a.bottom),s.right=Math.max(s.right,a.right)}if(r=e.outerWidth-oe(s,t,"left","right"),i=e.outerHeight-oe(s,t,"top","bottom"),r!==t.w||i!==t.h){t.w=r,t.h=i;var l=n.horizontal?[r,t.w]:[i,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function ae(t,e){var n=e.maxPadding;return function(t){var r={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){r[t]=Math.max(e[t],n[t])})),r}(t?["left","right"]:["top","bottom"])}function le(t,e,n){var r,i,o,s,a,l,u=[];for(r=0,i=t.length;r<i;++r)(s=(o=t[r]).box).update(o.width||e.w,o.height||e.h,ae(o.horizontal,e)),se(e,n,o)&&(l=!0,u.length&&(a=!0)),s.fullWidth||u.push(o);return a&&le(u,e,n)||l}function ue(t,e,n){var r,i,o,s,a=n.padding,l=e.x,u=e.y;for(r=0,i=t.length;r<i;++r)s=(o=t[r]).box,o.horizontal?(s.left=s.fullWidth?a.left:e.left,s.right=s.fullWidth?n.outerWidth-a.right:e.left+e.w,s.top=u,s.bottom=u+s.height,s.width=s.right-s.left,u=s.bottom):(s.left=l,s.right=l+s.width,s.top=e.top,s.bottom=e.top+e.h,s.height=s.bottom-s.top,l=s.right);e.x=l,e.y=u}R._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ce,de={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var r,i=["fullWidth","position","weight"],o=i.length,s=0;s<o;++s)r=i[s],n.hasOwnProperty(r)&&(e[r]=n[r])},update:function(t,e,n){if(t){var r=t.options.layout||{},i=q.options.toPadding(r.padding),o=e-i.width,s=n-i.height,a=function(t){var e=function(t){var e,n,r,i=[];for(e=0,n=(t||[]).length;e<n;++e)r=t[e],i.push({index:e,box:r,pos:r.position,horizontal:r.isHorizontal(),weight:r.weight});return i}(t),n=ie(re(e,"left"),!0),r=ie(re(e,"right")),i=ie(re(e,"top"),!0),o=ie(re(e,"bottom"));return{leftAndTop:n.concat(i),rightAndBottom:r.concat(o),chartArea:re(e,"chartArea"),vertical:n.concat(r),horizontal:i.concat(o)}}(t.boxes),l=a.vertical,u=a.horizontal,c=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:o,vBoxMaxWidth:o/2/l.length,hBoxMaxHeight:s/2}),d=ne({maxPadding:ne({},i),w:o,h:s,x:i.left,y:i.top},i);!function(t,e){var n,r,i;for(n=0,r=t.length;n<r;++n)(i=t[n]).width=i.horizontal?i.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,i.height=i.horizontal&&e.hBoxMaxHeight}(l.concat(u),c),le(l,d,c),le(u,d,c)&&le(l,d,c),function(t){var e=t.maxPadding;function n(n){var r=Math.max(e[n]-t[n],0);return t[n]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(d),ue(a.leftAndTop,d,c),d.x+=d.w,d.y+=d.h,ue(a.rightAndBottom,d,c),t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h},q.each(a.chartArea,(function(e){var n=e.box;ne(n,t.chartArea),n.update(d.w,d.h)}))}}},he=(ce=Object.freeze({__proto__:null,default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&ce.default||ce,pe="$chartjs",fe="chartjs-size-monitor",me="chartjs-render-monitor",ge=["animationstart","webkitAnimationStart"],ve={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ye(t,e){var n=q.getStyle(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var _e=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function be(t,e,n){t.addEventListener(e,n,_e)}function we(t,e,n){t.removeEventListener(e,n,_e)}function xe(t,e,n,r,i){return{type:t,chart:e,native:i||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function Se(t){var e=document.createElement("div");return e.className=t||"",e}var ke={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[pe]||(t[pe]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(e)),t.appendChild(r)}}(e.host?e:document.head,he)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[pe]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var o=ye(t,"width");void 0!==o&&(t.width=o)}if(null===r||""===r)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=ye(t,"height");void 0!==o&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[pe]){var n=e[pe].initial;["height","width"].forEach((function(t){var r=n[t];q.isNullOrUndef(r)?e.removeAttribute(t):e.setAttribute(t,r)})),q.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[pe]}},addEventListener:function(t,e,n){var r=t.canvas;if("resize"!==e){var i=n[pe]||(n[pe]={});be(r,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=ve[t.type]||t.type,r=q.getRelativePosition(t,e);return xe(n,e,r.x,r.y,t)}(e,t))})}else!function(t,e,n){var r,i,o,s,a=t[pe]||(t[pe]={}),l=a.resizer=function(t){var e=Se(fe),n=Se(fe+"-expand"),r=Se(fe+"-shrink");n.appendChild(Se()),r.appendChild(Se()),e.appendChild(n),e.appendChild(r),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var i=function(){e._reset(),t()};return be(n,"scroll",i.bind(n,"expand")),be(r,"scroll",i.bind(r,"shrink")),e}((r=function(){if(a.resizer){var r=n.options.maintainAspectRatio&&t.parentNode,i=r?r.clientWidth:0;e(xe("resize",n)),r&&r.clientWidth<i&&n.canvas&&e(xe("resize",n))}},o=!1,s=[],function(){s=Array.prototype.slice.call(arguments),i=i||this,o||(o=!0,q.requestAnimFrame.call(window,(function(){o=!1,r.apply(i,s)})))}));!function(t,e){var n=t[pe]||(t[pe]={}),r=n.renderProxy=function(t){"chartjs-render-animation"===t.animationName&&e()};q.each(ge,(function(e){be(t,e,r)})),n.reflow=!!t.offsetParent,t.classList.add(me)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}}))}(r,n,t)},removeEventListener:function(t,e,n){var r=t.canvas;if("resize"!==e){var i=((n[pe]||{}).proxies||{})[t.id+"_"+e];i&&we(r,e,i)}else!function(t){var e=t[pe]||{},n=e.resizer;delete e.resizer,function(t){var e=t[pe]||{},n=e.renderProxy;n&&(q.each(ge,(function(e){we(t,e,n)})),delete e.renderProxy),t.classList.remove(me)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}(r)}};q.addEvent=be,q.removeEvent=we;var Ce=ke._enabled?ke:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Ee=q.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ce);R._set("global",{plugins:{}});var Te={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var r,i,o,s,a,l=this.descriptors(t),u=l.length;for(r=0;r<u;++r)if("function"==typeof(a=(o=(i=l[r]).plugin)[e])&&((s=[t].concat(n||[])).push(i.options),!1===a.apply(o,s)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],r=[],i=t&&t.config||{},o=i.options&&i.options.plugins||{};return this._plugins.concat(i.plugins||[]).forEach((function(t){if(-1===n.indexOf(t)){var e=t.id,i=o[e];!1!==i&&(!0===i&&(i=q.clone(R.global.plugins[e])),n.push(t),r.push({plugin:t,options:i||{}}))}})),e.descriptors=r,e.id=this._cacheId,r},_invalidate:function(t){delete t.$plugins}},Pe={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=q.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?q.merge(Object.create(null),[R.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=q.extend(this.defaults[t],e))},addScalesToLayout:function(t){q.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,de.addBox(t,e)}))}},Oe=q.valueOrDefault,Ae=q.rtl.getRtlAdapter;R._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:q.noop,title:function(t,e){var n="",r=e.labels,i=r?r.length:0;if(t.length>0){var o=t[0];o.label?n=o.label:o.xLabel?n=o.xLabel:i>0&&o.index<i&&(n=r[o.index])}return n},afterTitle:q.noop,beforeBody:q.noop,beforeLabel:q.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),q.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:q.noop,afterBody:q.noop,beforeFooter:q.noop,footer:q.noop,afterFooter:q.noop}}});var Me={average:function(t){if(!t.length)return!1;var e,n,r=0,i=0,o=0;for(e=0,n=t.length;e<n;++e){var s=t[e];if(s&&s.hasValue()){var a=s.tooltipPosition();r+=a.x,i+=a.y,++o}}return{x:r/o,y:i/o}},nearest:function(t,e){var n,r,i,o=e.x,s=e.y,a=Number.POSITIVE_INFINITY;for(n=0,r=t.length;n<r;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),c=q.distanceBetweenPoints(e,u);c<a&&(a=c,i=l)}}if(i){var d=i.tooltipPosition();o=d.x,s=d.y}return{x:o,y:s}}};function Le(t,e){return e&&(q.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ie(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function je(t){var e=R.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Oe(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Oe(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Oe(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Oe(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Oe(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Oe(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Oe(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Oe(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Oe(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function De(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ne(t){return Le([],Ie(t))}var Re=Y.extend({initialize:function(){this._model=je(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,r=n.beforeTitle.apply(t,arguments),i=n.title.apply(t,arguments),o=n.afterTitle.apply(t,arguments),s=[];return s=Le(s,Ie(r)),s=Le(s,Ie(i)),Le(s,Ie(o))},getBeforeBody:function(){return Ne(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,r=n._options.callbacks,i=[];return q.each(t,(function(t){var o={before:[],lines:[],after:[]};Le(o.before,Ie(r.beforeLabel.call(n,t,e))),Le(o.lines,r.label.call(n,t,e)),Le(o.after,Ie(r.afterLabel.call(n,t,e))),i.push(o)})),i},getAfterBody:function(){return Ne(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),r=e.footer.apply(t,arguments),i=e.afterFooter.apply(t,arguments),o=[];return o=Le(o,Ie(n)),o=Le(o,Ie(r)),Le(o,Ie(i))},update:function(t){var e,n,r,i,o,s,a,l,u,c,d=this,h=d._options,p=d._model,f=d._model=je(h),m=d._active,g=d._data,v={xAlign:p.xAlign,yAlign:p.yAlign},y={x:p.x,y:p.y},_={width:p.width,height:p.height},b={x:p.caretX,y:p.caretY};if(m.length){f.opacity=1;var w=[],x=[];b=Me[h.position].call(d,m,d._eventPosition);var S=[];for(e=0,n=m.length;e<n;++e)S.push((i=void 0,o=void 0,void 0,void 0,l=void 0,u=void 0,c=void 0,i=(r=m[e])._xScale,o=r._yScale||r._scale,s=r._index,a=r._datasetIndex,u=(l=r._chart.getDatasetMeta(a).controller)._getIndexScale(),c=l._getValueScale(),{xLabel:i?i.getLabelForIndex(s,a):"",yLabel:o?o.getLabelForIndex(s,a):"",label:u?""+u.getLabelForIndex(s,a):"",value:c?""+c.getLabelForIndex(s,a):"",index:s,datasetIndex:a,x:r._model.x,y:r._model.y}));h.filter&&(S=S.filter((function(t){return h.filter(t,g)}))),h.itemSort&&(S=S.sort((function(t,e){return h.itemSort(t,e,g)}))),q.each(S,(function(t){w.push(h.callbacks.labelColor.call(d,t,d._chart)),x.push(h.callbacks.labelTextColor.call(d,t,d._chart))})),f.title=d.getTitle(S,g),f.beforeBody=d.getBeforeBody(S,g),f.body=d.getBody(S,g),f.afterBody=d.getAfterBody(S,g),f.footer=d.getFooter(S,g),f.x=b.x,f.y=b.y,f.caretPadding=h.caretPadding,f.labelColors=w,f.labelTextColors=x,f.dataPoints=S,y=function(t,e,n,r){var i=t.x,o=t.y,s=t.caretSize,a=t.caretPadding,l=t.cornerRadius,u=n.xAlign,c=n.yAlign,d=s+a,h=l+a;return"right"===u?i-=e.width:"center"===u&&((i-=e.width/2)+e.width>r.width&&(i=r.width-e.width),i<0&&(i=0)),"top"===c?o+=d:o-="bottom"===c?e.height+d:e.height/2,"center"===c?"left"===u?i+=d:"right"===u&&(i-=d):"left"===u?i-=h:"right"===u&&(i+=h),{x:i,y:o}}(f,_=function(t,e){var n=t._chart.ctx,r=2*e.yPadding,i=0,o=e.body,s=o.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);s+=e.beforeBody.length+e.afterBody.length;var a=e.title.length,l=e.footer.length,u=e.titleFontSize,c=e.bodyFontSize,d=e.footerFontSize;r+=a*u,r+=a?(a-1)*e.titleSpacing:0,r+=a?e.titleMarginBottom:0,r+=s*c,r+=s?(s-1)*e.bodySpacing:0,r+=l?e.footerMarginTop:0,r+=l*d,r+=l?(l-1)*e.footerSpacing:0;var h=0,p=function(t){i=Math.max(i,n.measureText(t).width+h)};return n.font=q.fontString(u,e._titleFontStyle,e._titleFontFamily),q.each(e.title,p),n.font=q.fontString(c,e._bodyFontStyle,e._bodyFontFamily),q.each(e.beforeBody.concat(e.afterBody),p),h=e.displayColors?c+2:0,q.each(o,(function(t){q.each(t.before,p),q.each(t.lines,p),q.each(t.after,p)})),h=0,n.font=q.fontString(d,e._footerFontStyle,e._footerFontFamily),q.each(e.footer,p),{width:i+=2*e.xPadding,height:r}}(this,f),v=function(t,e){var n,r,i,o,s,a=t._model,l=t._chart,u=t._chart.chartArea,c="center",d="center";a.y<e.height?d="top":a.y>l.height-e.height&&(d="bottom");var h=(u.left+u.right)/2,p=(u.top+u.bottom)/2;"center"===d?(n=function(t){return t<=h},r=function(t){return t>h}):(n=function(t){return t<=e.width/2},r=function(t){return t>=l.width-e.width/2}),i=function(t){return t+e.width+a.caretSize+a.caretPadding>l.width},o=function(t){return t-e.width-a.caretSize-a.caretPadding<0},s=function(t){return t<=p?"top":"bottom"},n(a.x)?(c="left",i(a.x)&&(c="center",d=s(a.y))):r(a.x)&&(c="right",o(a.x)&&(c="center",d=s(a.y)));var f=t._options;return{xAlign:f.xAlign?f.xAlign:c,yAlign:f.yAlign?f.yAlign:d}}(this,_),d._chart)}else f.opacity=0;return f.xAlign=v.xAlign,f.yAlign=v.yAlign,f.x=y.x,f.y=y.y,f.width=_.width,f.height=_.height,f.caretX=b.x,f.caretY=b.y,d._model=f,t&&h.custom&&h.custom.call(d,f),d},drawCaret:function(t,e){var n=this._chart.ctx,r=this._view,i=this.getCaretPosition(t,e,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(t,e,n){var r,i,o,s,a,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,p=t.x,f=t.y,m=e.width,g=e.height;if("center"===h)a=f+g/2,"left"===d?(i=(r=p)-u,o=r,s=a+u,l=a-u):(i=(r=p+m)+u,o=r,s=a-u,l=a+u);else if("left"===d?(r=(i=p+c+u)-u,o=i+u):"right"===d?(r=(i=p+m-c-u)-u,o=i+u):(r=(i=n.caretX)-u,o=i+u),"top"===h)a=(s=f)-u,l=s;else{a=(s=f+g)+u,l=s;var v=o;o=r,r=v}return{x1:r,x2:i,x3:o,y1:s,y2:a,y3:l}},drawTitle:function(t,e,n){var r,i,o,s=e.title,a=s.length;if(a){var l=Ae(e.rtl,e.x,e.width);for(t.x=De(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",r=e.titleFontSize,i=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=q.fontString(r,e._titleFontStyle,e._titleFontFamily),o=0;o<a;++o)n.fillText(s[o],l.x(t.x),t.y+r/2),t.y+=r+i,o+1===a&&(t.y+=e.titleMarginBottom-i)}},drawBody:function(t,e,n){var r,i,o,s,a,l,u,c,d=e.bodyFontSize,h=e.bodySpacing,p=e._bodyAlign,f=e.body,m=e.displayColors,g=0,v=m?De(e,"left"):0,y=Ae(e.rtl,e.x,e.width),_=function(e){n.fillText(e,y.x(t.x+g),t.y+d/2),t.y+=d+h},b=y.textAlign(p);for(n.textAlign=p,n.textBaseline="middle",n.font=q.fontString(d,e._bodyFontStyle,e._bodyFontFamily),t.x=De(e,b),n.fillStyle=e.bodyFontColor,q.each(e.beforeBody,_),g=m&&"right"!==b?"center"===p?d/2+1:d+2:0,a=0,u=f.length;a<u;++a){for(r=f[a],i=e.labelTextColors[a],o=e.labelColors[a],n.fillStyle=i,q.each(r.before,_),l=0,c=(s=r.lines).length;l<c;++l){if(m){var w=y.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(y.leftForLtr(w,d),t.y,d,d),n.lineWidth=1,n.strokeStyle=o.borderColor,n.strokeRect(y.leftForLtr(w,d),t.y,d,d),n.fillStyle=o.backgroundColor,n.fillRect(y.leftForLtr(y.xPlus(w,1),d-2),t.y+1,d-2,d-2),n.fillStyle=i}_(s[l])}q.each(r.after,_)}g=0,q.each(e.afterBody,_),t.y-=h},drawFooter:function(t,e,n){var r,i,o=e.footer,s=o.length;if(s){var a=Ae(e.rtl,e.x,e.width);for(t.x=De(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=a.textAlign(e._footerAlign),n.textBaseline="middle",r=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=q.fontString(r,e._footerFontStyle,e._footerFontFamily),i=0;i<s;++i)n.fillText(o[i],a.x(t.x),t.y+r/2),t.y+=r+e.footerSpacing}},drawBackground:function(t,e,n,r){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var i=e.xAlign,o=e.yAlign,s=t.x,a=t.y,l=r.width,u=r.height,c=e.cornerRadius;n.beginPath(),n.moveTo(s+c,a),"top"===o&&this.drawCaret(t,r),n.lineTo(s+l-c,a),n.quadraticCurveTo(s+l,a,s+l,a+c),"center"===o&&"right"===i&&this.drawCaret(t,r),n.lineTo(s+l,a+u-c),n.quadraticCurveTo(s+l,a+u,s+l-c,a+u),"bottom"===o&&this.drawCaret(t,r),n.lineTo(s+c,a+u),n.quadraticCurveTo(s,a+u,s,a+u-c),"center"===o&&"left"===i&&this.drawCaret(t,r),n.lineTo(s,a+c),n.quadraticCurveTo(s,a,s+c,a),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},r={x:e.x,y:e.y},i=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(r,e,t,n),r.y+=e.yPadding,q.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(r,e,t),this.drawBody(r,e,t),this.drawFooter(r,e,t),q.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,r.mode,r),r.reverse&&n._active.reverse()),(e=!q.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),Fe=Me,Ve=Re;Ve.positioners=Fe;var ze=q.valueOrDefault;function Be(){return q.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,r){if("xAxes"===t||"yAxes"===t){var i,o,s,a=n[t].length;for(e[t]||(e[t]=[]),i=0;i<a;++i)s=n[t][i],o=ze(s.type,"xAxes"===t?"category":"linear"),i>=e[t].length&&e[t].push({}),!e[t][i].type||s.type&&s.type!==e[t][i].type?q.merge(e[t][i],[Pe.getScaleDefaults(o),s]):q.merge(e[t][i],s)}else q._merger(t,e,n,r)}})}function qe(){return q.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,r){var i=e[t]||Object.create(null),o=n[t];"scales"===t?e[t]=Be(i,o):"scale"===t?e[t]=q.merge(i,[Pe.getScaleDefaults(o.type),o]):q._merger(t,e,n,r)}})}function He(t){var e=t.options;q.each(t.scales,(function(e){de.removeBox(t,e)})),e=qe(R.global,R[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function $e(t,e,n){var r,i=function(t){return t.id===r};do{r=e+n++}while(q.findIndex(t,i)>=0);return r}function Ue(t){return"top"===t||"bottom"===t}function We(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}R._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Ge=function(t,e){return this.construct(t,e),this};q.extend(Ge.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=qe(R.global,R[t.type],t.options||{}),t}(e);var r=Ee.acquireContext(t,e),i=r&&r.canvas,o=i&&i.height,s=i&&i.width;n.id=q.uid(),n.ctx=r,n.canvas=i,n.config=e,n.width=s,n.height=o,n.aspectRatio=o?s/o:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Ge.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),r&&i?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Te.notify(t,"beforeInit"),q.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Te.notify(t,"afterInit"),t},clear:function(){return q.canvas.clear(this),this},stop:function(){return X.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,r=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(q.getMaximumWidth(r))),s=Math.max(0,Math.floor(i?o/i:q.getMaximumHeight(r)));if((e.width!==o||e.height!==s)&&(r.width=e.width=o,r.height=e.height=s,r.style.width=o+"px",r.style.height=s+"px",q.retinaScale(e,n.devicePixelRatio),!t)){var a={width:o,height:s};Te.notify(e,"resize",[a]),n.onResize&&n.onResize(e,a),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;q.each(e.xAxes,(function(t,n){t.id||(t.id=$e(e.xAxes,"x-axis-",n))})),q.each(e.yAxes,(function(t,n){t.id||(t.id=$e(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},r=[],i=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(r=r.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&r.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),q.each(r,(function(e){var r=e.options,o=r.id,s=ze(r.type,e.dtype);Ue(r.position)!==Ue(e.dposition)&&(r.position=e.dposition),i[o]=!0;var a=null;if(o in n&&n[o].type===s)(a=n[o]).options=r,a.ctx=t.ctx,a.chart=t;else{var l=Pe.getScaleConstructor(s);if(!l)return;a=new l({id:o,type:s,options:r,ctx:t.ctx,chart:t}),n[a.id]=a}a.mergeTicksOptions(),e.isDefault&&(t.scale=a)})),q.each(i,(function(t,e){t||delete n[e]})),t.scales=n,Pe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,r=[],i=n.data.datasets;for(t=0,e=i.length;t<e;t++){var o=i[t],s=n.getDatasetMeta(t),a=o.type||n.config.type;if(s.type&&s.type!==a&&(n.destroyDatasetMeta(t),s=n.getDatasetMeta(t)),s.type=a,s.order=o.order||0,s.index=t,s.controller)s.controller.updateIndex(t),s.controller.linkScales();else{var l=Yt[s.type];if(void 0===l)throw new Error('"'+s.type+'" is not a chart type.');s.controller=new l(n,t),r.push(s.controller)}}return r},resetElements:function(){var t=this;q.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,r=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),He(r),Te._invalidate(r),!1!==Te.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var i=r.buildOrUpdateControllers();for(e=0,n=r.data.datasets.length;e<n;e++)r.getDatasetMeta(e).controller.buildOrUpdateElements();r.updateLayout(),r.options.animation&&r.options.animation.duration&&q.each(i,(function(t){t.reset()})),r.updateDatasets(),r.tooltip.initialize(),r.lastActive=[],Te.notify(r,"afterUpdate"),r._layers.sort(We("z","_idx")),r._bufferedRender?r._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:r.render(t)}},updateLayout:function(){var t=this;!1!==Te.notify(t,"beforeLayout")&&(de.update(this,this.width,this.height),t._layers=[],q.each(t.boxes,(function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}),t),t._layers.forEach((function(t,e){t._idx=e})),Te.notify(t,"afterScaleUpdate"),Te.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Te.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Te.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==Te.notify(this,"beforeDatasetUpdate",[n])&&(e.controller._update(),Te.notify(this,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,r=ze(t.duration,n&&n.duration),i=t.lazy;if(!1!==Te.notify(e,"beforeRender")){var o=function(t){Te.notify(e,"afterRender"),q.callback(n&&n.onComplete,[t],e)};if(n&&r){var s=new K({numSteps:r/16.66,easing:t.easing||n.easing,render:function(t,e){var n=q.easing.effects[e.easing],r=e.currentStep,i=r/e.numSteps;t.draw(n(i),i,r)},onAnimationProgress:n.onProgress,onAnimationComplete:o});X.addAnimation(e,s,r,i)}else e.draw(),o(new K({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,r=this;if(r.clear(),q.isNullOrUndef(t)&&(t=1),r.transition(t),!(r.width<=0||r.height<=0)&&!1!==Te.notify(r,"beforeDraw",[t])){for(n=r._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(r.chartArea);for(r.drawDatasets(t);e<n.length;++e)n[e].draw(r.chartArea);r._drawTooltip(t),Te.notify(r,"afterDraw",[t])}},transition:function(t){for(var e=0,n=(this.data.datasets||[]).length;e<n;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,r=[];for(e=0,n=(this.data.datasets||[]).length;e<n;++e)t&&!this.isDatasetVisible(e)||r.push(this.getDatasetMeta(e));return r.sort(We("order","index")),r},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==Te.notify(this,"beforeDatasetsDraw",[t])){for(n=(e=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(e[n],t);Te.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Te.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Te.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Te.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Te.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ee.modes.single(this,t)},getElementsAtEvent:function(t){return ee.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ee.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var r=ee.modes[e];return"function"==typeof r?r(this,t,n):[]},getDatasetAtEvent:function(t){return ee.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],r=n._meta&&n._meta[e];r&&(r.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,r=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);r&&(n.unbindEvents(),q.canvas.clear(n),Ee.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Te.notify(n,"destroy"),delete Ge.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ve({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};q.each(t.options.events,(function(r){Ee.addEventListener(t,r,n),e[r]=n})),t.options.responsive&&(n=function(){t.resize()},Ee.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,q.each(e,(function(e,n){Ee.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var r,i,o,s=n?"set":"remove";for(i=0,o=t.length;i<o;++i)(r=t[i])&&this.getDatasetMeta(r._datasetIndex).controller[s+"HoverStyle"](r);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+s+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Te.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var r=e.handleEvent(t);n&&(r=n._start?n.handleEvent(t):r|n.handleEvent(t)),Te.notify(e,"afterEvent",[t]);var i=e._bufferedRequest;return i?e.render(i):r&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,r=n.options||{},i=r.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,i.mode,i),q.callback(r.onHover||r.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||r.onClick&&r.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,i.mode,!1),n.active.length&&i.mode&&n.updateHoverStyle(n.active,i.mode,!0),e=!q.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),Ge.instances={};var Ye=Ge;function Ze(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Ke(t){this.options=t||{}}Ge.Controller=Ge,Ge.types={},q.configMerge=qe,q.scaleMerge=Be,q.extend(Ke.prototype,{formats:Ze,parse:Ze,format:Ze,add:Ze,diff:Ze,startOf:Ze,endOf:Ze,_create:function(t){return t}}),Ke.override=function(t){q.extend(Ke.prototype,t)};var Xe={_date:Ke},Qe={formatters:{values:function(t){return q.isArray(t)?t:""+t},linear:function(t,e,n){var r=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&t!==Math.floor(t)&&(r=t-Math.floor(t));var i=q.log10(Math.abs(r)),o="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var s=q.log10(Math.abs(t)),a=Math.floor(s)-Math.floor(i);a=Math.max(Math.min(a,20),0),o=t.toExponential(a)}else{var l=-1*Math.floor(i);l=Math.max(Math.min(l,20),0),o=t.toFixed(l)}else o="0";return o},logarithmic:function(t,e,n){var r=t/Math.pow(10,Math.floor(q.log10(t)));return 0===t?"0":1===r||2===r||5===r||0===e||e===n.length-1?t.toExponential():""}}},Je=q.isArray,tn=q.isNullOrUndef,en=q.valueOrDefault,nn=q.valueAtIndexOrDefault;function rn(t,e,n){var r,i=t.getTicks().length,o=Math.min(e,i-1),s=t.getPixelForTick(o),a=t._startPixel,l=t._endPixel;if(!(n&&(r=1===i?Math.max(s-a,l-s):0===e?(t.getPixelForTick(1)-s)/2:(s-t.getPixelForTick(o-1))/2,(s+=o<e?r:-r)<a-1e-6||s>l+1e-6)))return s}function on(t){return t.drawTicks?t.tickMarkLength:0}function sn(t){var e,n;return t.display?(e=q.options._parseFont(t),n=q.options.toPadding(t.padding),e.lineHeight+n.height):0}function an(t,e){return q.extend(q.options._parseFont({fontFamily:en(e.fontFamily,t.fontFamily),fontSize:en(e.fontSize,t.fontSize),fontStyle:en(e.fontStyle,t.fontStyle),lineHeight:en(e.lineHeight,t.lineHeight)}),{color:q.options.resolve([e.fontColor,t.fontColor,R.global.defaultFontColor])})}function ln(t){var e=an(t,t.minor);return{minor:e,major:t.major.enabled?an(t,t.major):e}}function un(t){var e,n,r,i=[];for(n=0,r=t.length;n<r;++n)void 0!==(e=t[n])._index&&i.push(e);return i}function cn(t,e,n,r){var i,o,s,a,l=en(n,0),u=Math.min(en(r,t.length),t.length),c=0;for(e=Math.ceil(e),r&&(e=(i=r-n)/Math.floor(i/e)),a=l;a<0;)c++,a=Math.round(l+c*e);for(o=Math.max(l,0);o<u;o++)s=t[o],o===a?(s._index=o,c++,a=Math.round(l+c*e)):delete s.label}R._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:Qe.formatters.values,minor:{},major:{}}});var dn=Y.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){q.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var r,i,o,s,a,l=this,u=l.options.ticks,c=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=q.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),s=l.buildTicks()||[],(!(s=l.afterBuildTicks(s)||s)||!s.length)&&l.ticks)for(s=[],r=0,i=l.ticks.length;r<i;++r)s.push({value:l.ticks[r],major:!1});return l._ticks=s,a=c<s.length,o=l._convertTicksToLabels(a?function(t,e){for(var n=[],r=t.length/e,i=0,o=t.length;i<o;i+=r)n.push(t[Math.floor(i)]);return n}(s,c):s),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(s):s,a&&(o=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=o,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,r=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,r=!r),n._startPixel=t,n._endPixel=e,n._reversePixels=r,n._length=e-t},afterUpdate:function(){q.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){q.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){q.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){q.callback(this.options.beforeDataLimits,[this])},determineDataLimits:q.noop,afterDataLimits:function(){q.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){q.callback(this.options.beforeBuildTicks,[this])},buildTicks:q.noop,afterBuildTicks:function(t){var e=this;return Je(t)&&t.length?q.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=q.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){q.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){q.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){q.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,r,i,o,s,a=this,l=a.options,u=l.ticks,c=a.getTicks().length,d=u.minRotation||0,h=u.maxRotation,p=d;!a._isVisible()||!u.display||d>=h||c<=1||!a.isHorizontal()?a.labelRotation=d:(e=(t=a._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,r=Math.min(a.maxWidth,a.chart.width-e),e+6>(i=l.offset?a.maxWidth/c:r/(c-1))&&(i=r/(c-(l.offset?.5:1)),o=a.maxHeight-on(l.gridLines)-u.padding-sn(l.scaleLabel),s=Math.sqrt(e*e+n*n),p=q.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/i,1)),Math.asin(Math.min(o/s,1))-Math.asin(n/s))),p=Math.max(d,Math.min(h,p))),a.labelRotation=p)},afterCalculateTickRotation:function(){q.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){q.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,r=t.options,i=r.ticks,o=r.scaleLabel,s=r.gridLines,a=t._isVisible(),l="bottom"===r.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:a&&(e.width=on(s)+sn(o)),u?a&&(e.height=on(s)+sn(o)):e.height=t.maxHeight,i.display&&a){var c=ln(i),d=t._getLabelSizes(),h=d.first,p=d.last,f=d.widest,m=d.highest,g=.4*c.minor.lineHeight,v=i.padding;if(u){var y=0!==t.labelRotation,_=q.toRadians(t.labelRotation),b=Math.cos(_),w=Math.sin(_),x=w*f.width+b*(m.height-(y?m.offset:0))+(y?0:g);e.height=Math.min(t.maxHeight,e.height+x+v);var S,k,C=t.getPixelForTick(0)-t.left,E=t.right-t.getPixelForTick(t.getTicks().length-1);y?(S=l?b*h.width+w*h.offset:w*(h.height-h.offset),k=l?w*(p.height-p.offset):b*p.width+w*p.offset):(S=h.width/2,k=p.width/2),t.paddingLeft=Math.max((S-C)*t.width/(t.width-C),0)+3,t.paddingRight=Math.max((k-E)*t.width/(t.width-E),0)+3}else{var T=i.mirror?0:f.width+v+g;e.width=Math.min(t.maxWidth,e.width+T),t.paddingTop=h.height/2,t.paddingBottom=p.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){q.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(tn(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,r,i=this;for(i.ticks=t.map((function(t){return t.value})),i.beforeTickToLabelConversion(),e=i.convertTicksToLabels(t)||i.ticks,i.afterTickToLabelConversion(),n=0,r=t.length;n<r;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=function(t,e,n,r){var i,o,s,a,l,u,c,d,h,p,f,m,g,v=n.length,y=[],_=[],b=[],w=0,x=0;for(i=0;i<v;++i){if(a=n[i].label,l=n[i].major?e.major:e.minor,t.font=u=l.string,c=r[u]=r[u]||{data:{},gc:[]},d=l.lineHeight,h=p=0,tn(a)||Je(a)){if(Je(a))for(o=0,s=a.length;o<s;++o)f=a[o],tn(f)||Je(f)||(h=q.measureText(t,c.data,c.gc,h,f),p+=d)}else h=q.measureText(t,c.data,c.gc,h,a),p=d;y.push(h),_.push(p),b.push(d/2),w=Math.max(h,w),x=Math.max(p,x)}function S(t){return{width:y[t]||0,height:_[t]||0,offset:b[t]||0}}return function(t,e){q.each(t,(function(t){var n,r=t.gc,i=r.length/2;if(i>e){for(n=0;n<i;++n)delete t.data[r[n]];r.splice(0,i)}}))}(r,v),m=y.indexOf(w),g=_.indexOf(x),{first:S(0),last:S(v-1),widest:S(m),highest:S(g)}}(t.ctx,ln(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,r,i;return Je(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),r=Math.min(e,n),i=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),r=t,i=t),{min:r,max:i,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:q.noop,getPixelForValue:q.noop,getValueForPixel:q.noop,getPixelForTick:function(t){var e=this.options.offset,n=this._ticks.length,r=1/Math.max(n-(e?0:1),1);return t<0||t>n-1?null:this.getPixelForDecimal(t*r+(e?r/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,r,i,o=this.options.ticks,s=this._length,a=o.maxTicksLimit||s/this._tickSize()+1,l=o.major.enabled?function(t){var e,n,r=[];for(e=0,n=t.length;e<n;e++)t[e].major&&r.push(e);return r}(t):[],u=l.length,c=l[0],d=l[u-1];if(u>a)return function(t,e,n){var r,i,o=0,s=e[0];for(n=Math.ceil(n),r=0;r<t.length;r++)i=t[r],r===s?(i._index=r,s=e[++o*n]):delete i.label}(t,l,u/a),un(t);if(r=function(t,e,n,r){var i,o,s,a,l=function(t){var e,n,r=t.length;if(r<2)return!1;for(n=t[0],e=1;e<r;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/r;if(!l)return Math.max(u,1);for(s=0,a=(i=q.math._factorize(l)).length-1;s<a;s++)if((o=i[s])>u)return o;return Math.max(u,1)}(l,t,0,a),u>0){for(e=0,n=u-1;e<n;e++)cn(t,r,l[e],l[e+1]);return i=u>1?(d-c)/(u-1):null,cn(t,r,q.isNullOrUndef(i)?0:c-i,c),cn(t,r,d,q.isNullOrUndef(i)?t.length:d+i),un(t)}return cn(t,r),un(t)},_tickSize:function(){var t=this.options.ticks,e=q.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),i=this._getLabelSizes(),o=t.autoSkipPadding||0,s=i?i.widest.width+o:0,a=i?i.highest.height+o:0;return this.isHorizontal()?a*n>s*r?s/n:a/r:a*r<s*n?a/n:s/r},_isVisible:function(){var t,e,n,r=this.chart,i=this.options.display;if("auto"!==i)return!!i;for(t=0,e=r.data.datasets.length;t<e;++t)if(r.isDatasetVisible(t)&&((n=r.getDatasetMeta(t)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,r,i,o,s,a,l,u,c,d,h,p,f,m,g,v,y=this,_=y.chart,b=y.options,w=b.gridLines,x=b.position,S=w.offsetGridLines,k=y.isHorizontal(),C=y._ticksToDraw,E=C.length+(S?1:0),T=on(w),P=[],O=w.drawBorder?nn(w.lineWidth,0,0):0,A=O/2,M=q._alignPixel,L=function(t){return M(_,t,O)};for("top"===x?(e=L(y.bottom),a=y.bottom-T,u=e-A,d=L(t.top)+A,p=t.bottom):"bottom"===x?(e=L(y.top),d=t.top,p=L(t.bottom)-A,a=e+A,u=y.top+T):"left"===x?(e=L(y.right),s=y.right-T,l=e-A,c=L(t.left)+A,h=t.right):(e=L(y.left),c=t.left,h=L(t.right)-A,s=e+A,l=y.left+T),n=0;n<E;++n)r=C[n]||{},tn(r.label)&&n<C.length||(n===y.zeroLineIndex&&b.offset===S?(f=w.zeroLineWidth,m=w.zeroLineColor,g=w.zeroLineBorderDash||[],v=w.zeroLineBorderDashOffset||0):(f=nn(w.lineWidth,n,1),m=nn(w.color,n,"rgba(0,0,0,0.1)"),g=w.borderDash||[],v=w.borderDashOffset||0),void 0!==(i=rn(y,r._index||n,S))&&(o=M(_,i,f),k?s=l=c=h=o:a=u=d=p=o,P.push({tx1:s,ty1:a,tx2:l,ty2:u,x1:c,y1:d,x2:h,y2:p,width:f,color:m,borderDash:g,borderDashOffset:v})));return P.ticksLength=E,P.borderValue=e,P},_computeLabelItems:function(){var t,e,n,r,i,o,s,a,l,u,c,d,h=this,p=h.options,f=p.ticks,m=p.position,g=f.mirror,v=h.isHorizontal(),y=h._ticksToDraw,_=ln(f),b=f.padding,w=on(p.gridLines),x=-q.toRadians(h.labelRotation),S=[];for("top"===m?(o=h.bottom-w-b,s=x?"left":"center"):"bottom"===m?(o=h.top+w+b,s=x?"right":"center"):"left"===m?(i=h.right-(g?0:w)-b,s=g?"left":"right"):(i=h.left+(g?0:w)+b,s=g?"right":"left"),t=0,e=y.length;t<e;++t)r=(n=y[t]).label,tn(r)||(a=h.getPixelForTick(n._index||t)+f.labelOffset,u=(l=n.major?_.major:_.minor).lineHeight,c=Je(r)?r.length:1,v?(i=a,d="top"===m?((x?1:.5)-c)*u:(x?0:.5)*u):(o=a,d=(1-c)*u/2),S.push({x:i,y:o,rotation:x,label:r,font:l,textOffset:d,textAlign:s}));return S},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var r,i,o,s,a,l=e.ctx,u=e.chart,c=q._alignPixel,d=n.drawBorder?nn(n.lineWidth,0,0):0,h=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(o=0,s=h.length;o<s;++o)r=(a=h[o]).width,i=a.color,r&&i&&(l.save(),l.lineWidth=r,l.strokeStyle=i,l.setLineDash&&(l.setLineDash(a.borderDash),l.lineDashOffset=a.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(a.tx1,a.ty1),l.lineTo(a.tx2,a.ty2)),n.drawOnChartArea&&(l.moveTo(a.x1,a.y1),l.lineTo(a.x2,a.y2)),l.stroke(),l.restore());if(d){var p,f,m,g,v=d,y=nn(n.lineWidth,h.ticksLength-1,1),_=h.borderValue;e.isHorizontal()?(p=c(u,e.left,v)-v/2,f=c(u,e.right,y)+y/2,m=g=_):(m=c(u,e.top,v)-v/2,g=c(u,e.bottom,y)+y/2,p=f=_),l.lineWidth=d,l.strokeStyle=nn(n.color,0),l.beginPath(),l.moveTo(p,m),l.lineTo(f,g),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,r,i,o,s,a,l,u=t.ctx,c=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,r=c.length;e<r;++e){if(s=(o=c[e]).font,u.save(),u.translate(o.x,o.y),u.rotate(o.rotation),u.font=s.string,u.fillStyle=s.color,u.textBaseline="middle",u.textAlign=o.textAlign,a=o.label,l=o.textOffset,Je(a))for(n=0,i=a.length;n<i;++n)u.fillText(""+a[n],0,l),l+=s.lineHeight;else u.fillText(a,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,r=n.scaleLabel;if(r.display){var i,o,s=en(r.fontColor,R.global.defaultFontColor),a=q.options._parseFont(r),l=q.options.toPadding(r.padding),u=a.lineHeight/2,c=n.position,d=0;if(t.isHorizontal())i=t.left+t.width/2,o="bottom"===c?t.bottom-u-l.bottom:t.top+u+l.top;else{var h="left"===c;i=h?t.left+u+l.top:t.right-u-l.top,o=t.top+t.height/2,d=h?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(i,o),e.rotate(d),e.textAlign="center",e.textBaseline="middle",e.fillStyle=s,e.font=a.string,e.fillText(r.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,r=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==r&&t.draw===t._draw?[{z:r,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter((function(r){return(!t||r.type===t)&&(n?r.xAxisID===e.id:r.yAxisID===e.id)}))}});dn.prototype._draw=dn.prototype.draw;var hn=dn,pn=q.isNullOrUndef,fn=hn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),r=e.options.ticks,i=r.min,o=r.max,s=0,a=n.length-1;void 0!==i&&(t=n.indexOf(i))>=0&&(s=t),void 0!==o&&(t=n.indexOf(o))>=0&&(a=t),e.minIndex=s,e.maxIndex=a,e.min=n[s],e.max=n[a]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;hn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var r,i,o,s=this;return pn(e)||pn(n)||(t=s.chart.data.datasets[n].data[e]),pn(t)||(r=s.isHorizontal()?t.x:t.y),(void 0!==r||void 0!==t&&isNaN(e))&&(i=s._getLabels(),t=q.valueOrDefault(r,t),e=-1!==(o=i.indexOf(t))?o:e,isNaN(e)&&(e=t)),s.getPixelForDecimal((e-s._startValue)/s._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}});fn._defaults={position:"bottom"};var mn=q.noop,gn=q.isNullOrUndef,vn=hn.extend({getRightValue:function(t){return"string"==typeof t?+t:hn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=q.sign(t.min),r=q.sign(t.max);n<0&&r<0?t.max=0:n>0&&r>0&&(t.min=0)}var i=void 0!==e.min||void 0!==e.suggestedMin,o=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),i!==o&&t.min>=t.max&&(i?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,r=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),r=r||11),r&&(t=Math.min(r,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:mn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:q.valueOrDefault(e.fixedStepSize,e.stepSize)},i=t.ticks=function(t,e){var n,r,i,o,s=[],a=t.stepSize,l=a||1,u=t.maxTicks-1,c=t.min,d=t.max,h=t.precision,p=e.min,f=e.max,m=q.niceNum((f-p)/u/l)*l;if(m<1e-14&&gn(c)&&gn(d))return[p,f];(o=Math.ceil(f/m)-Math.floor(p/m))>u&&(m=q.niceNum(o*m/u/l)*l),a||gn(h)?n=Math.pow(10,q._decimalPlaces(m)):(n=Math.pow(10,h),m=Math.ceil(m*n)/n),r=Math.floor(p/m)*m,i=Math.ceil(f/m)*m,a&&(!gn(c)&&q.almostWhole(c/m,m/1e3)&&(r=c),!gn(d)&&q.almostWhole(d/m,m/1e3)&&(i=d)),o=(i-r)/m,o=q.almostEquals(o,Math.round(o),m/1e3)?Math.round(o):Math.ceil(o),r=Math.round(r*n)/n,i=Math.round(i*n)/n,s.push(gn(c)?r:c);for(var g=1;g<o;++g)s.push(Math.round((r+g*m)*n)/n);return s.push(gn(d)?i:d),s}(r,t);t.handleDirectionalChanges(),t.max=q.max(i),t.min=q.min(i),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),hn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),r=e.min,i=e.max;hn.prototype._configure.call(e),e.options.offset&&n.length&&(r-=t=(i-r)/Math.max(n.length-1,1)/2,i+=t),e._startValue=r,e._endValue=i,e._valueRange=i-r}}),yn={position:"left",ticks:{callback:Qe.formatters.linear}};function _n(t,e,n,r){var i,o,s=t.options,a=function(t,e,n){var r=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[r]&&(t[r]={pos:[],neg:[]}),t[r]}(e,s.stacked,n),l=a.pos,u=a.neg,c=r.length;for(i=0;i<c;++i)o=t._parseValue(r[i]),isNaN(o.min)||isNaN(o.max)||n.data[i].hidden||(l[i]=l[i]||0,u[i]=u[i]||0,s.relativePoints?l[i]=100:o.min<0||o.max<0?u[i]+=o.min:l[i]+=o.max)}function bn(t,e,n){var r,i,o=n.length;for(r=0;r<o;++r)i=t._parseValue(n[r]),isNaN(i.min)||isNaN(i.max)||e.data[r].hidden||(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}var wn=vn.extend({determineDataLimits:function(){var t,e,n,r,i=this,o=i.options,s=i.chart.data.datasets,a=i._getMatchingVisibleMetas(),l=o.stacked,u={},c=a.length;if(i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<c;++t)l=void 0!==(e=a[t]).stack;for(t=0;t<c;++t)n=s[(e=a[t]).index].data,l?_n(i,u,e,n):bn(i,e,n);q.each(u,(function(t){r=t.pos.concat(t.neg),i.min=Math.min(i.min,q.min(r)),i.max=Math.max(i.max,q.max(r))})),i.min=q.isFinite(i.min)&&!isNaN(i.min)?i.min:0,i.max=q.isFinite(i.max)&&!isNaN(i.max)?i.max:1,i.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=q.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((+this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),xn=yn;wn._defaults=xn;var Sn=q.valueOrDefault,kn=q.math.log10,Cn={position:"left",ticks:{callback:Qe.formatters.logarithmic}};function En(t,e){return q.isFinite(t)&&t>=0?t:e}var Tn=hn.extend({determineDataLimits:function(){var t,e,n,r,i,o,s=this,a=s.options,l=s.chart,u=l.data.datasets,c=s.isHorizontal();function d(t){return c?t.xAxisID===s.id:t.yAxisID===s.id}s.min=Number.POSITIVE_INFINITY,s.max=Number.NEGATIVE_INFINITY,s.minNotZero=Number.POSITIVE_INFINITY;var h=a.stacked;if(void 0===h)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&d(e)&&void 0!==e.stack){h=!0;break}if(a.stacked||h){var p={};for(t=0;t<u.length;t++){var f=[(e=l.getDatasetMeta(t)).type,void 0===a.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&d(e))for(void 0===p[f]&&(p[f]=[]),i=0,o=(r=u[t].data).length;i<o;i++){var m=p[f];n=s._parseValue(r[i]),isNaN(n.min)||isNaN(n.max)||e.data[i].hidden||n.min<0||n.max<0||(m[i]=m[i]||0,m[i]+=n.max)}}q.each(p,(function(t){if(t.length>0){var e=q.min(t),n=q.max(t);s.min=Math.min(s.min,e),s.max=Math.max(s.max,n)}}))}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&d(e))for(i=0,o=(r=u[t].data).length;i<o;i++)n=s._parseValue(r[i]),isNaN(n.min)||isNaN(n.max)||e.data[i].hidden||n.min<0||n.max<0||(s.min=Math.min(n.min,s.min),s.max=Math.max(n.max,s.max),0!==n.min&&(s.minNotZero=Math.min(n.min,s.minNotZero)));s.min=q.isFinite(s.min)?s.min:null,s.max=q.isFinite(s.max)?s.max:null,s.minNotZero=q.isFinite(s.minNotZero)?s.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=En(e.min,t.min),t.max=En(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(kn(t.min))-1),t.max=Math.pow(10,Math.floor(kn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(kn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(kn(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(kn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),r={min:En(e.min),max:En(e.max)},i=t.ticks=function(t,e){var n,r,i=[],o=Sn(t.min,Math.pow(10,Math.floor(kn(e.min)))),s=Math.floor(kn(e.max)),a=Math.ceil(e.max/Math.pow(10,s));0===o?(n=Math.floor(kn(e.minNotZero)),r=Math.floor(e.minNotZero/Math.pow(10,n)),i.push(o),o=r*Math.pow(10,n)):(n=Math.floor(kn(o)),r=Math.floor(o/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{i.push(o),10==++r&&(r=1,l=++n>=0?1:l),o=Math.round(r*Math.pow(10,n)*l)/l}while(n<s||n===s&&r<a);var u=Sn(t.max,o);return i.push(u),i}(r,t);t.max=q.max(i),t.min=q.min(i),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&i.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),hn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(kn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;hn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Sn(t.options.ticks.fontSize,R.global.defaultFontSize)/t._length),t._startValue=kn(e),t._valueOffset=n,t._valueRange=(kn(t.max)-kn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(kn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Pn=Cn;Tn._defaults=Pn;var On=q.valueOrDefault,An=q.valueAtIndexOrDefault,Mn=q.options.resolve,Ln={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Qe.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function In(t){var e=t.ticks;return e.display&&t.display?On(e.fontSize,R.global.defaultFontSize)+2*e.backdropPaddingY:0}function jn(t,e,n,r,i){return t===r||t===i?{start:e-n/2,end:e+n/2}:t<r||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function Dn(t){return 0===t||180===t?"center":t<180?"left":"right"}function Nn(t,e,n,r){var i,o,s=n.y+r/2;if(q.isArray(e))for(i=0,o=e.length;i<o;++i)t.fillText(e[i],n.x,s),s+=r;else t.fillText(e,n.x,s)}function Rn(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Fn(t){return q.isNumber(t)?t:0}var Vn=vn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=In(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;q.each(e.data.datasets,(function(i,o){if(e.isDatasetVisible(o)){var s=e.getDatasetMeta(o);q.each(i.data,(function(e,i){var o=+t.getRightValue(e);isNaN(o)||s.data[i].hidden||(n=Math.min(o,n),r=Math.max(o,r))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=r===Number.NEGATIVE_INFINITY?0:r,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/In(this.options))},convertTicksToLabels:function(){var t=this;vn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=q.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,r,i=q.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},s={};t.ctx.font=i.string,t._pointLabelSizes=[];var a,l,u,c=t.chart.data.labels.length;for(e=0;e<c;e++){r=t.getPointPosition(e,t.drawingArea+5),a=t.ctx,l=i.lineHeight,u=t.pointLabels[e],n=q.isArray(u)?{w:q.longestText(a,a.font,u),h:u.length*l}:{w:a.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var d=t.getIndexAngle(e),h=q.toDegrees(d)%360,p=jn(h,r.x,n.w,0,180),f=jn(h,r.y,n.h,90,270);p.start<o.l&&(o.l=p.start,s.l=d),p.end>o.r&&(o.r=p.end,s.r=d),f.start<o.t&&(o.t=f.start,s.t=d),f.end>o.b&&(o.b=f.end,s.b=d)}t.setReductions(t.drawingArea,o,s)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var r=this,i=e.l/Math.sin(n.l),o=Math.max(e.r-r.width,0)/Math.sin(n.r),s=-e.t/Math.cos(n.t),a=-Math.max(e.b-(r.height-r.paddingTop),0)/Math.cos(n.b);i=Fn(i),o=Fn(o),s=Fn(s),a=Fn(a),r.drawingArea=Math.min(Math.floor(t-(i+o)/2),Math.floor(t-(s+a)/2)),r.setCenterPoint(i,o,s,a)},setCenterPoint:function(t,e,n,r){var i=this,o=i.width-e-i.drawingArea,s=t+i.drawingArea,a=n+i.drawingArea,l=i.height-i.paddingTop-r-i.drawingArea;i.xCenter=Math.floor((s+o)/2+i.left),i.yCenter=Math.floor((a+l)/2+i.top+i.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(q.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,r=this,i=r.ctx,o=r.options,s=o.gridLines,a=o.angleLines,l=On(a.lineWidth,s.lineWidth),u=On(a.color,s.color);if(o.pointLabels.display&&function(t){var e=t.ctx,n=t.options,r=n.pointLabels,i=In(n),o=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),s=q.options._parseFont(r);e.save(),e.font=s.string,e.textBaseline="middle";for(var a=t.chart.data.labels.length-1;a>=0;a--){var l=0===a?i/2:0,u=t.getPointPosition(a,o+l+5),c=An(r.fontColor,a,R.global.defaultFontColor);e.fillStyle=c;var d=t.getIndexAngle(a),h=q.toDegrees(d);e.textAlign=Dn(h),Rn(h,t._pointLabelSizes[a],u),Nn(e,t.pointLabels[a],u,s.lineHeight)}e.restore()}(r),s.display&&q.each(r.ticks,(function(t,n){0!==n&&(e=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),function(t,e,n,r){var i,o=t.ctx,s=e.circular,a=t.chart.data.labels.length,l=An(e.color,r-1),u=An(e.lineWidth,r-1);if((s||a)&&l&&u){if(o.save(),o.strokeStyle=l,o.lineWidth=u,o.setLineDash&&(o.setLineDash(e.borderDash||[]),o.lineDashOffset=e.borderDashOffset||0),o.beginPath(),s)o.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{i=t.getPointPosition(0,n),o.moveTo(i.x,i.y);for(var c=1;c<a;c++)i=t.getPointPosition(c,n),o.lineTo(i.x,i.y)}o.closePath(),o.stroke(),o.restore()}}(r,s,e,n))})),a.display&&l&&u){for(i.save(),i.lineWidth=l,i.strokeStyle=u,i.setLineDash&&(i.setLineDash(Mn([a.borderDash,s.borderDash,[]])),i.lineDashOffset=Mn([a.borderDashOffset,s.borderDashOffset,0])),t=r.chart.data.labels.length-1;t>=0;t--)e=r.getDistanceFromCenterForValue(o.ticks.reverse?r.min:r.max),n=r.getPointPosition(t,e),i.beginPath(),i.moveTo(r.xCenter,r.yCenter),i.lineTo(n.x,n.y),i.stroke();i.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var r,i,o=t.getIndexAngle(0),s=q.options._parseFont(n),a=On(n.fontColor,R.global.defaultFontColor);e.save(),e.font=s.string,e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",q.each(t.ticks,(function(o,l){(0!==l||n.reverse)&&(r=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(i=e.measureText(o).width,e.fillStyle=n.backdropColor,e.fillRect(-i/2-n.backdropPaddingX,-r-s.size/2-n.backdropPaddingY,i+2*n.backdropPaddingX,s.size+2*n.backdropPaddingY)),e.fillStyle=a,e.fillText(o,0,-r))})),e.restore()}},_drawTitle:q.noop}),zn=Ln;Vn._defaults=zn;var Bn=q._deprecated,qn=q.options.resolve,Hn=q.valueOrDefault,$n=Number.MIN_SAFE_INTEGER||-9007199254740991,Un=Number.MAX_SAFE_INTEGER||9007199254740991,Wn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Gn=Object.keys(Wn);function Yn(t,e){return t-e}function Zn(t){return q.valueOrDefault(t.time.min,t.ticks.min)}function Kn(t){return q.valueOrDefault(t.time.max,t.ticks.max)}function Xn(t,e,n,r){var i=function(t,e,n){for(var r,i,o,s=0,a=t.length-1;s>=0&&s<=a;){if(i=t[(r=s+a>>1)-1]||null,o=t[r],!i)return{lo:null,hi:o};if(o[e]<n)s=r+1;else{if(!(i[e]>n))return{lo:i,hi:o};a=r-1}}return{lo:o,hi:null}}(t,e,n),o=i.lo?i.hi?i.lo:t[t.length-2]:t[0],s=i.lo?i.hi?i.hi:t[t.length-1]:t[1],a=s[e]-o[e],l=a?(n-o[e])/a:0,u=(s[r]-o[r])*l;return o[r]+u}function Qn(t,e){var n=t._adapter,r=t.options.time,i=r.parser,o=i||r.format,s=e;return"function"==typeof i&&(s=i(s)),q.isFinite(s)||(s="string"==typeof o?n.parse(s,o):n.parse(s)),null!==s?+s:(i||"function"!=typeof o||(s=o(e),q.isFinite(s)||(s=n.parse(s))),s)}function Jn(t,e){if(q.isNullOrUndef(e))return null;var n=t.options.time,r=Qn(t,t.getRightValue(e));return null===r||n.round&&(r=+t._adapter.startOf(r,n.round)),r}function tr(t,e,n,r){var i,o,s,a=Gn.length;for(i=Gn.indexOf(t);i<a-1;++i)if(s=(o=Wn[Gn[i]]).steps?o.steps:Un,o.common&&Math.ceil((n-e)/(s*o.size))<=r)return Gn[i];return Gn[a-1]}function er(t,e,n){var r,i,o=[],s={},a=e.length;for(r=0;r<a;++r)s[i=e[r]]=r,o.push({value:i,major:!1});return 0!==a&&n?function(t,e,n,r){var i,o,s=t._adapter,a=+s.startOf(e[0].value,r),l=e[e.length-1].value;for(i=a;i<=l;i=+s.add(i,1,r))(o=n[i])>=0&&(e[o].major=!0);return e}(t,o,s,n):o}var nr=hn.extend({initialize:function(){this.mergeTicksOptions(),hn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),r=t._adapter=new Xe._date(e.adapters.date);return Bn("time scale",n.format,"time.format","time.parser"),Bn("time scale",n.min,"time.min","ticks.min"),Bn("time scale",n.max,"time.max","ticks.max"),q.mergeIf(n.displayFormats,r.formats()),hn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),hn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,r,i,o,s,a=this,l=a.chart,u=a._adapter,c=a.options,d=c.time.unit||"day",h=Un,p=$n,f=[],m=[],g=[],v=a._getLabels();for(t=0,n=v.length;t<n;++t)g.push(Jn(a,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(i=l.data.datasets[t].data,q.isObject(i[0]))for(m[t]=[],e=0,r=i.length;e<r;++e)o=Jn(a,i[e]),f.push(o),m[t][e]=o;else m[t]=g.slice(0),s||(f=f.concat(g),s=!0);else m[t]=[];g.length&&(h=Math.min(h,g[0]),p=Math.max(p,g[g.length-1])),f.length&&(f=n>1?function(t){var e,n,r,i={},o=[];for(e=0,n=t.length;e<n;++e)i[r=t[e]]||(i[r]=!0,o.push(r));return o}(f).sort(Yn):f.sort(Yn),h=Math.min(h,f[0]),p=Math.max(p,f[f.length-1])),h=Jn(a,Zn(c))||h,p=Jn(a,Kn(c))||p,h=h===Un?+u.startOf(Date.now(),d):h,p=p===$n?+u.endOf(Date.now(),d)+1:p,a.min=Math.min(h,p),a.max=Math.max(h+1,p),a._table=[],a._timestamps={data:f,datasets:m,labels:g}},buildTicks:function(){var t,e,n,r=this,i=r.min,o=r.max,s=r.options,a=s.ticks,l=s.time,u=r._timestamps,c=[],d=r.getLabelCapacity(i),h=a.source,p=s.distribution;for(u="data"===h||"auto"===h&&"series"===p?u.data:"labels"===h?u.labels:function(t,e,n,r){var i,o=t._adapter,s=t.options,a=s.time,l=a.unit||tr(a.minUnit,e,n,r),u=qn([a.stepSize,a.unitStepSize,1]),c="week"===l&&a.isoWeekday,d=e,h=[];if(c&&(d=+o.startOf(d,"isoWeek",c)),d=+o.startOf(d,c?"day":l),o.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(i=d;i<n;i=+o.add(i,u,l))h.push(i);return i!==n&&"ticks"!==s.bounds||h.push(i),h}(r,i,o,d),"ticks"===s.bounds&&u.length&&(i=u[0],o=u[u.length-1]),i=Jn(r,Zn(s))||i,o=Jn(r,Kn(s))||o,t=0,e=u.length;t<e;++t)(n=u[t])>=i&&n<=o&&c.push(n);return r.min=i,r.max=o,r._unit=l.unit||(a.autoSkip?tr(l.minUnit,r.min,r.max,d):function(t,e,n,r,i){var o,s;for(o=Gn.length-1;o>=Gn.indexOf(n);o--)if(s=Gn[o],Wn[s].common&&t._adapter.diff(i,r,s)>=e-1)return s;return Gn[n?Gn.indexOf(n):0]}(r,c.length,l.minUnit,r.min,r.max)),r._majorUnit=a.major.enabled&&"year"!==r._unit?function(t){for(var e=Gn.indexOf(t)+1,n=Gn.length;e<n;++e)if(Wn[Gn[e]].common)return Gn[e]}(r._unit):void 0,r._table=function(t,e,n,r){if("linear"===r||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var i,o,s,a,l,u=[],c=[e];for(i=0,o=t.length;i<o;++i)(a=t[i])>e&&a<n&&c.push(a);for(c.push(n),i=0,o=c.length;i<o;++i)l=c[i+1],s=c[i-1],a=c[i],void 0!==s&&void 0!==l&&Math.round((l+s)/2)===a||u.push({time:a,pos:i/(o-1)});return u}(r._timestamps.data,i,o,p),r._offsets=function(t,e,n,r,i){var o,s,a=0,l=0;return i.offset&&e.length&&(o=Xn(t,"time",e[0],"pos"),a=1===e.length?1-o:(Xn(t,"time",e[1],"pos")-o)/2,s=Xn(t,"time",e[e.length-1],"pos"),l=1===e.length?s:(s-Xn(t,"time",e[e.length-2],"pos"))/2),{start:a,end:l,factor:1/(a+1+l)}}(r._table,c,0,0,s),a.reverse&&c.reverse(),er(r,c,r._majorUnit)},getLabelForIndex:function(t,e){var n=this,r=n._adapter,i=n.chart.data,o=n.options.time,s=i.labels&&t<i.labels.length?i.labels[t]:"",a=i.datasets[e].data[t];return q.isObject(a)&&(s=n.getRightValue(a)),o.tooltipFormat?r.format(Qn(n,s),o.tooltipFormat):"string"==typeof s?s:r.format(Qn(n,s),o.displayFormats.datetime)},tickFormatFunction:function(t,e,n,r){var i=this._adapter,o=this.options,s=o.time.displayFormats,a=s[this._unit],l=this._majorUnit,u=s[l],c=n[e],d=o.ticks,h=l&&u&&c&&c.major,p=i.format(t,r||(h?u:a)),f=h?d.major:d.minor,m=qn([f.callback,f.userCallback,d.callback,d.userCallback]);return m?m(p,e,n):p},convertTicksToLabels:function(t){var e,n,r=[];for(e=0,n=t.length;e<n;++e)r.push(this.tickFormatFunction(t[e].value,e,t));return r},getPixelForOffset:function(t){var e=this._offsets,n=Xn(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+n)*e.factor)},getPixelForValue:function(t,e,n){var r=null;if(void 0!==e&&void 0!==n&&(r=this._timestamps.datasets[n][e]),null===r&&(r=Jn(this,t)),null!==r)return this.getPixelForOffset(r)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end,r=Xn(this._table,"pos",n,"time");return this._adapter._create(r)},_getLabelSize:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,r=q.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),i=Math.cos(r),o=Math.sin(r),s=Hn(e.fontSize,R.global.defaultFontSize);return{w:n*i+s*o,h:n*o+s*i}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=e.tickFormatFunction(t,0,er(e,[t],e._majorUnit),i),s=e._getLabelSize(o),a=Math.floor(e.isHorizontal()?e.width/s.w:e.height/s.h);return e.options.offset&&a--,a>0?a:1}});nr._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var rr={category:fn,linear:wn,logarithmic:Tn,radialLinear:Vn,time:nr},ir={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Xe._date.override("function"==typeof t?{_id:"moment",formats:function(){return ir},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,r){return t(e).add(n,r).valueOf()},diff:function(e,n,r){return t(e).diff(t(n),r)},startOf:function(e,n,r){return e=t(e),"isoWeek"===n?e.isoWeekday(r).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),R._set("global",{plugins:{filler:{propagate:!0}}});var or={dataset:function(t){var e=t.fill,n=t.chart,r=n.getDatasetMeta(e),i=r&&n.isDatasetVisible(e)&&r.dataset._children||[],o=i.length||0;return o?function(t,e){return e<o&&i[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,r=e?e.y:null;return q.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===r?t.y:r}}}};function sr(t,e,n){var r,i=t._model||{},o=i.fill;if(void 0===o&&(o=!!i.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(r=parseFloat(o,10),isFinite(r)&&Math.floor(r)===r)return"-"!==o[0]&&"+"!==o[0]||(r=e+r),!(r===e||r<0||r>=n)&&r;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function ar(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,r,i,o,s=t.el._scale,a=s.options,l=s.chart.data.labels.length,u=t.fill,c=[];if(!l)return null;for(e=a.ticks.reverse?s.max:s.min,n=a.ticks.reverse?s.min:s.max,r=s.getPointPositionForValue(0,e),i=0;i<l;++i)o="start"===u||"end"===u?s.getPointPositionForValue(i,"start"===u?e:n):s.getBasePosition(i),a.gridLines.circular&&(o.cx=r.x,o.cy=r.y,o.angle=s.getIndexAngle(i)-Math.PI/2),c.push(o);return c}(t):function(t){var e,n=t.el._model||{},r=t.el._scale||{},i=t.fill,o=null;if(isFinite(i))return null;if("start"===i?o=void 0===n.scaleBottom?r.bottom:n.scaleBottom:"end"===i?o=void 0===n.scaleTop?r.top:n.scaleTop:void 0!==n.scaleZero?o=n.scaleZero:r.getBasePixel&&(o=r.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if(q.isFinite(o))return{x:(e=r.isHorizontal())?o:null,y:e?null:o}}return null}(t)}function lr(t,e,n){var r,i=t[e].fill,o=[e];if(!n)return i;for(;!1!==i&&-1===o.indexOf(i);){if(!isFinite(i))return i;if(!(r=t[i]))return!1;if(r.visible)return i;o.push(i),i=r.fill}return!1}function ur(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),or[n](t))}function cr(t){return t&&!t.skip}function dr(t,e,n,r,i){var o,s,a,l;if(r&&i){for(t.moveTo(e[0].x,e[0].y),o=1;o<r;++o)q.canvas.lineTo(t,e[o-1],e[o]);if(void 0===n[0].angle)for(t.lineTo(n[i-1].x,n[i-1].y),o=i-1;o>0;--o)q.canvas.lineTo(t,n[o],n[o-1],!0);else for(s=n[0].cx,a=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-s,2)+Math.pow(n[0].y-a,2)),o=i-1;o>0;--o)t.arc(s,a,l,n[o].angle,n[o-1].angle,!0)}}function hr(t,e,n,r,i,o){var s,a,l,u,c,d,h,p,f=e.length,m=r.spanGaps,g=[],v=[],y=0,_=0;for(t.beginPath(),s=0,a=f;s<a;++s)c=n(u=e[l=s%f]._view,l,r),d=cr(u),h=cr(c),o&&void 0===p&&d&&(a=f+(p=s+1)),d&&h?(y=g.push(u),_=v.push(c)):y&&_&&(m?(d&&g.push(u),h&&v.push(c)):(dr(t,g,v,y,_),y=_=0,g=[],v=[]));dr(t,g,v,y,_),t.closePath(),t.fillStyle=i,t.fill()}var pr={id:"filler",afterDatasetsUpdate:function(t,e){var n,r,i,o,s=(t.data.datasets||[]).length,a=e.propagate,l=[];for(r=0;r<s;++r)o=null,(i=(n=t.getDatasetMeta(r)).dataset)&&i._model&&i instanceof _t.Line&&(o={visible:t.isDatasetVisible(r),fill:sr(i,r,s),chart:t,el:i}),n.$filler=o,l.push(o);for(r=0;r<s;++r)(o=l[r])&&(o.fill=lr(l,r,a),o.boundary=ar(o),o.mapper=ur(o))},beforeDatasetsDraw:function(t){var e,n,r,i,o,s,a,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(i=(r=e.el)._view,o=r._children||[],s=e.mapper,a=i.backgroundColor||R.global.defaultColor,s&&a&&o.length&&(q.canvas.clipArea(u,t.chartArea),hr(u,o,s,i,a,r._loop),q.canvas.unclipArea(u)))}},fr=q.rtl.getRtlAdapter,mr=q.noop,gr=q.valueOrDefault;function vr(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}R._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,r=this.chart,i=r.getDatasetMeta(n);i.hidden=null===i.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},r=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var i=n.controller.getStyle(r?0:void 0);return{text:e[n.index].label,fillStyle:i.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,r,i=document.createElement("ul"),o=t.data.datasets;for(i.setAttribute("class",t.id+"-legend"),e=0,n=o.length;e<n;e++)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[e].backgroundColor,o[e].label&&r.appendChild(document.createTextNode(o[e].label));return i.outerHTML}});var yr=Y.extend({initialize:function(t){q.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:mr,update:function(t,e,n){var r=this;return r.beforeUpdate(),r.maxWidth=t,r.maxHeight=e,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:mr,beforeSetDimensions:mr,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:mr,beforeBuildLabels:mr,buildLabels:function(){var t=this,e=t.options.labels||{},n=q.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:mr,beforeFit:mr,fit:function(){var t=this,e=t.options,n=e.labels,r=e.display,i=t.ctx,o=q.options._parseFont(n),s=o.size,a=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=r?10:0):(l.width=r?10:0,l.height=t.maxHeight),r){if(i.font=o.string,u){var c=t.lineWidths=[0],d=0;i.textAlign="left",i.textBaseline="middle",q.each(t.legendItems,(function(t,e){var r=vr(n,s)+s/2+i.measureText(t.text).width;(0===e||c[c.length-1]+r+2*n.padding>l.width)&&(d+=s+n.padding,c[c.length-(e>0?0:1)]=0),a[e]={left:0,top:0,width:r,height:s},c[c.length-1]+=r+n.padding})),l.height+=d}else{var h=n.padding,p=t.columnWidths=[],f=t.columnHeights=[],m=n.padding,g=0,v=0;q.each(t.legendItems,(function(t,e){var r=vr(n,s)+s/2+i.measureText(t.text).width;e>0&&v+s+2*h>l.height&&(m+=g+n.padding,p.push(g),f.push(v),g=0,v=0),g=Math.max(g,r),v+=s+h,a[e]={left:0,top:0,width:r,height:s}})),m+=g,p.push(g),f.push(v),l.width+=m}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:mr,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,r=R.global,i=r.defaultColor,o=r.elements.line,s=t.height,a=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var c,d=fr(e.rtl,t.left,t.minSize.width),h=t.ctx,p=gr(n.fontColor,r.defaultFontColor),f=q.options._parseFont(n),m=f.size;h.textAlign=d.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=p,h.fillStyle=p,h.font=f.string;var g=vr(n,m),v=t.legendHitBoxes,y=function(t,r){switch(e.align){case"start":return n.padding;case"end":return t-r;default:return(t-r+n.padding)/2}},_=t.isHorizontal();c=_?{x:t.left+y(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+y(s,a[0]),line:0},q.rtl.overrideTextDirection(t.ctx,e.textDirection);var b=m+n.padding;q.each(t.legendItems,(function(e,r){var p=h.measureText(e.text).width,f=g+m/2+p,w=c.x,x=c.y;d.setWidth(t.minSize.width),_?r>0&&w+f+n.padding>t.left+t.minSize.width&&(x=c.y+=b,c.line++,w=c.x=t.left+y(l,u[c.line])):r>0&&x+b>t.top+t.minSize.height&&(w=c.x=w+t.columnWidths[c.line]+n.padding,c.line++,x=c.y=t.top+y(s,a[c.line]));var S=d.x(w);!function(t,e,r){if(!(isNaN(g)||g<=0)){h.save();var s=gr(r.lineWidth,o.borderWidth);if(h.fillStyle=gr(r.fillStyle,i),h.lineCap=gr(r.lineCap,o.borderCapStyle),h.lineDashOffset=gr(r.lineDashOffset,o.borderDashOffset),h.lineJoin=gr(r.lineJoin,o.borderJoinStyle),h.lineWidth=s,h.strokeStyle=gr(r.strokeStyle,i),h.setLineDash&&h.setLineDash(gr(r.lineDash,o.borderDash)),n&&n.usePointStyle){var a=g*Math.SQRT2/2,l=d.xPlus(t,g/2),u=e+m/2;q.canvas.drawPoint(h,r.pointStyle,a,l,u,r.rotation)}else h.fillRect(d.leftForLtr(t,g),e,g,m),0!==s&&h.strokeRect(d.leftForLtr(t,g),e,g,m);h.restore()}}(S,x,e),v[r].left=d.leftForLtr(S,v[r].width),v[r].top=x,function(t,e,n,r){var i=m/2,o=d.xPlus(t,g+i),s=e+i;h.fillText(n.text,o,s),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(o,s),h.lineTo(d.xPlus(o,r),s),h.stroke())}(S,x,e,p),_?c.x+=f+n.padding:c.y+=b})),q.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,r,i,o=this;if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)for(i=o.legendHitBoxes,n=0;n<i.length;++n)if(t>=(r=i[n]).left&&t<=r.left+r.width&&e>=r.top&&e<=r.top+r.height)return o.legendItems[n];return null},handleEvent:function(t){var e,n=this,r=n.options,i="mouseup"===t.type?"click":t.type;if("mousemove"===i){if(!r.onHover&&!r.onLeave)return}else{if("click"!==i)return;if(!r.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===i?e&&r.onClick&&r.onClick.call(n,t.native,e):(r.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),r.onHover&&e&&r.onHover.call(n,t.native,e))}});function _r(t,e){var n=new yr({ctx:t.ctx,options:e,chart:t});de.configure(t,n,e),de.addBox(t,n),t.legend=n}var br={id:"legend",_element:yr,beforeInit:function(t){var e=t.options.legend;e&&_r(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(q.mergeIf(e,R.global.legend),n?(de.configure(t,n,e),n.options=e):_r(t,e)):n&&(de.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},wr=q.noop;R._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var xr=Y.extend({initialize:function(t){q.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:wr,update:function(t,e,n){var r=this;return r.beforeUpdate(),r.maxWidth=t,r.maxHeight=e,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:wr,beforeSetDimensions:wr,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:wr,beforeBuildLabels:wr,buildLabels:wr,afterBuildLabels:wr,beforeFit:wr,fit:function(){var t,e=this,n=e.options,r=e.minSize={},i=e.isHorizontal();n.display?(t=(q.isArray(n.text)?n.text.length:1)*q.options._parseFont(n).lineHeight+2*n.padding,e.width=r.width=i?e.maxWidth:t,e.height=r.height=i?t:e.maxHeight):e.width=r.width=e.height=r.height=0},afterFit:wr,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var r,i,o,s=q.options._parseFont(n),a=s.lineHeight,l=a/2+n.padding,u=0,c=t.top,d=t.left,h=t.bottom,p=t.right;e.fillStyle=q.valueOrDefault(n.fontColor,R.global.defaultFontColor),e.font=s.string,t.isHorizontal()?(i=d+(p-d)/2,o=c+l,r=p-d):(i="left"===n.position?d+l:p-l,o=c+(h-c)/2,r=h-c,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(i,o),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var f=n.text;if(q.isArray(f))for(var m=0,g=0;g<f.length;++g)e.fillText(f[g],0,m,r),m+=a;else e.fillText(f,0,0,r);e.restore()}}});function Sr(t,e){var n=new xr({ctx:t.ctx,options:e,chart:t});de.configure(t,n,e),de.addBox(t,n),t.titleBlock=n}var kr={},Cr=pr,Er=br,Tr={id:"title",_element:xr,beforeInit:function(t){var e=t.options.title;e&&Sr(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(q.mergeIf(e,R.global.title),n?(de.configure(t,n,e),n.options=e):Sr(t,e)):n&&(de.removeBox(t,n),delete t.titleBlock)}};for(var Pr in kr.filler=Cr,kr.legend=Er,kr.title=Tr,Ye.helpers=q,function(){function t(t,e,n){var r;return"string"==typeof t?(r=parseInt(t,10),-1!==t.indexOf("%")&&(r=r/100*e.parentNode[n])):r=t,r}function e(t){return null!=t&&"none"!==t}function n(n,r,i){var o=document.defaultView,s=q._getParentNode(n),a=o.getComputedStyle(n)[r],l=o.getComputedStyle(s)[r],u=e(a),c=e(l),d=Number.POSITIVE_INFINITY;return u||c?Math.min(u?t(a,n,i):d,c?t(l,s,i):d):"none"}q.where=function(t,e){if(q.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return q.each(t,(function(t){e(t)&&n.push(t)})),n},q.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var r=0,i=t.length;r<i;++r)if(e.call(n,t[r],r,t))return r;return-1},q.findNextWhere=function(t,e,n){q.isNullOrUndef(n)&&(n=-1);for(var r=n+1;r<t.length;r++){var i=t[r];if(e(i))return i}},q.findPreviousWhere=function(t,e,n){q.isNullOrUndef(n)&&(n=t.length);for(var r=n-1;r>=0;r--){var i=t[r];if(e(i))return i}},q.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},q.almostEquals=function(t,e,n){return Math.abs(t-e)<n},q.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},q.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},q.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},q.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},q.toRadians=function(t){return t*(Math.PI/180)},q.toDegrees=function(t){return t*(180/Math.PI)},q._decimalPlaces=function(t){if(q.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},q.getAngleFromPoint=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r),o=Math.atan2(r,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:i}},q.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},q.aliasPixel=function(t){return t%2==0?0:.5},q._alignPixel=function(t,e,n){var r=t.currentDevicePixelRatio,i=n/2;return Math.round((e-i)*r)/r+i},q.splineCurve=function(t,e,n,r){var i=t.skip?e:t,o=e,s=n.skip?e:n,a=Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)),l=Math.sqrt(Math.pow(s.x-o.x,2)+Math.pow(s.y-o.y,2)),u=a/(a+l),c=l/(a+l),d=r*(u=isNaN(u)?0:u),h=r*(c=isNaN(c)?0:c);return{previous:{x:o.x-d*(s.x-i.x),y:o.y-d*(s.y-i.y)},next:{x:o.x+h*(s.x-i.x),y:o.y+h*(s.y-i.y)}}},q.EPSILON=Number.EPSILON||1e-14,q.splineCurveMonotone=function(t){var e,n,r,i,o,s,a,l,u,c=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),d=c.length;for(e=0;e<d;++e)if(!(r=c[e]).model.skip){if(n=e>0?c[e-1]:null,(i=e<d-1?c[e+1]:null)&&!i.model.skip){var h=i.model.x-r.model.x;r.deltaK=0!==h?(i.model.y-r.model.y)/h:0}!n||n.model.skip?r.mK=r.deltaK:!i||i.model.skip?r.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(r.deltaK)?r.mK=0:r.mK=(n.deltaK+r.deltaK)/2}for(e=0;e<d-1;++e)r=c[e],i=c[e+1],r.model.skip||i.model.skip||(q.almostEquals(r.deltaK,0,this.EPSILON)?r.mK=i.mK=0:(o=r.mK/r.deltaK,s=i.mK/r.deltaK,(l=Math.pow(o,2)+Math.pow(s,2))<=9||(a=3/Math.sqrt(l),r.mK=o*a*r.deltaK,i.mK=s*a*r.deltaK)));for(e=0;e<d;++e)(r=c[e]).model.skip||(n=e>0?c[e-1]:null,i=e<d-1?c[e+1]:null,n&&!n.model.skip&&(u=(r.model.x-n.model.x)/3,r.model.controlPointPreviousX=r.model.x-u,r.model.controlPointPreviousY=r.model.y-u*r.mK),i&&!i.model.skip&&(u=(i.model.x-r.model.x)/3,r.model.controlPointNextX=r.model.x+u,r.model.controlPointNextY=r.model.y+u*r.mK))},q.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},q.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},q.niceNum=function(t,e){var n=Math.floor(q.log10(t)),r=t/Math.pow(10,n);return(e?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},q.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},q.getRelativePosition=function(t,e){var n,r,i=t.originalEvent||t,o=t.target||t.srcElement,s=o.getBoundingClientRect(),a=i.touches;a&&a.length>0?(n=a[0].clientX,r=a[0].clientY):(n=i.clientX,r=i.clientY);var l=parseFloat(q.getStyle(o,"padding-left")),u=parseFloat(q.getStyle(o,"padding-top")),c=parseFloat(q.getStyle(o,"padding-right")),d=parseFloat(q.getStyle(o,"padding-bottom")),h=s.right-s.left-l-c,p=s.bottom-s.top-u-d;return{x:n=Math.round((n-s.left-l)/h*o.width/e.currentDevicePixelRatio),y:r=Math.round((r-s.top-u)/p*o.height/e.currentDevicePixelRatio)}},q.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},q.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},q._calculatePadding=function(t,e,n){return(e=q.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},q._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},q.getMaximumWidth=function(t){var e=q._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,r=n-q._calculatePadding(e,"padding-left",n)-q._calculatePadding(e,"padding-right",n),i=q.getConstraintWidth(t);return isNaN(i)?r:Math.min(r,i)},q.getMaximumHeight=function(t){var e=q._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,r=n-q._calculatePadding(e,"padding-top",n)-q._calculatePadding(e,"padding-bottom",n),i=q.getConstraintHeight(t);return isNaN(i)?r:Math.min(r,i)},q.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},q.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=t.canvas,i=t.height,o=t.width;r.height=i*n,r.width=o*n,t.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=i+"px",r.style.width=o+"px")}},q.fontString=function(t,e,n){return e+" "+t+"px "+n},q.longestText=function(t,e,n,r){var i=(r=r||{}).data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},o=r.garbageCollect=[],r.font=e),t.font=e;var s,a,l,u,c,d=0,h=n.length;for(s=0;s<h;s++)if(null!=(u=n[s])&&!0!==q.isArray(u))d=q.measureText(t,i,o,d,u);else if(q.isArray(u))for(a=0,l=u.length;a<l;a++)null==(c=u[a])||q.isArray(c)||(d=q.measureText(t,i,o,d,c));var p=o.length/2;if(p>n.length){for(s=0;s<p;s++)delete i[o[s]];o.splice(0,p)}return d},q.measureText=function(t,e,n,r,i){var o=e[i];return o||(o=e[i]=t.measureText(i).width,n.push(i)),o>r&&(r=o),r},q.numberOfLabelLines=function(t){var e=1;return q.each(t,(function(t){q.isArray(t)&&t.length>e&&(e=t.length)})),e},q.color=w?function(t){return t instanceof CanvasGradient&&(t=R.global.defaultColor),w(t)}:function(t){return console.error("Color.js not found!"),t},q.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:q.color(t).saturate(.5).darken(.1).rgbString()}}(),Ye._adapters=Xe,Ye.Animation=K,Ye.animationService=X,Ye.controllers=Yt,Ye.DatasetController=nt,Ye.defaults=R,Ye.Element=Y,Ye.elements=_t,Ye.Interaction=ee,Ye.layouts=de,Ye.platform=Ee,Ye.plugins=Te,Ye.Scale=hn,Ye.scaleService=Pe,Ye.Ticks=Qe,Ye.Tooltip=Ve,Ye.helpers.each(rr,(function(t,e){Ye.scaleService.registerScaleType(e,t,t._defaults)})),kr)kr.hasOwnProperty(Pr)&&Ye.plugins.register(kr[Pr]);Ye.platform.initialize();var Or=Ye;return"undefined"!=typeof window&&(window.Chart=Ye),Ye.Chart=Ye,Ye.Legend=kr.legend._element,Ye.Title=kr.title._element,Ye.pluginService=Ye.plugins,Ye.PluginBase=Ye.Element.extend({}),Ye.canvasHelpers=Ye.helpers.canvas,Ye.layoutService=Ye.layouts,Ye.LinearScaleBase=vn,Ye.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){Ye[t]=function(e,n){return new Ye(e,Ye.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Or})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.HSQuantityCounter=e():t.HSQuantityCounter=e()}(window,(function(){return d={"./src/js/hs-quantity-counter.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HSQuantityCounter; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar dataAttributeName = \'data-hs-quantity-counter-options\';\nvar defaults = {\n classMap: {\n plus: \'.js-plus\',\n minus: \'.js-minus\',\n result: \'.js-result\'\n },\n resultVal: null\n};\n\nvar HSQuantityCounter = /*#__PURE__*/function () {\n function HSQuantityCounter(el, options, id) {\n _classCallCheck(this, HSQuantityCounter);\n\n this.collection = [];\n var that = this;\n var elems;\n\n if (el instanceof HTMLElement) {\n elems = [el];\n } else if (el instanceof Object) {\n elems = el;\n } else {\n elems = document.querySelectorAll(el);\n }\n\n for (var i = 0; i < elems.length; i += 1) {\n that.addToCollection(elems[i], options, id || elems[i].id);\n }\n\n if (!that.collection.length) {\n return false;\n } // initialization calls\n\n\n that._init();\n\n return this;\n }\n\n _createClass(HSQuantityCounter, [{\n key: "_init",\n value: function _init() {\n var that = this;\n\n var _loop = function _loop(i) {\n var _$el = void 0;\n\n var _options = void 0;\n\n if (that.collection[i].hasOwnProperty(\'$initializedEl\')) {\n return "continue";\n }\n\n _$el = that.collection[i].$el;\n _options = that.collection[i].options; // Change Default Values\n\n _options.resultVal = parseInt(_$el.querySelector(_options.classMap.result).value); // Plus Click Events\n\n _$el.querySelector(_options.classMap.plus).addEventListener(\'click\', function () {\n that._plusClickEvents(_$el, _options);\n }); // Minus Click Events\n\n\n _$el.querySelector(_options.classMap.minus).addEventListener(\'click\', function () {\n that._minusClickEvents(_$el, _options);\n });\n };\n\n for (var i = 0; i < that.collection.length; i += 1) {\n var _ret = _loop(i);\n\n if (_ret === "continue") continue;\n }\n }\n }, {\n key: "_plusClickEvents",\n value: function _plusClickEvents($el, settings) {\n settings.resultVal += 1;\n $el.querySelector(settings.classMap.result).value++;\n }\n }, {\n key: "_minusClickEvents",\n value: function _minusClickEvents($el, settings) {\n if (settings.resultVal >= 1) {\n settings.resultVal -= 1;\n $el.querySelector(settings.classMap.result).value--;\n } else {\n return false;\n }\n }\n }, {\n key: "addToCollection",\n value: function addToCollection(item, options, id) {\n this.collection.push({\n $el: item,\n id: id || null,\n options: Object.assign({}, defaults, item.hasAttribute(dataAttributeName) ? JSON.parse(item.getAttribute(dataAttributeName)) : {}, options)\n });\n }\n }, {\n key: "getItem",\n value: function getItem(item) {\n if (typeof item === \'number\') {\n return this.collection[item].$initializedEl;\n } else {\n return this.collection.find(function (el) {\n return el.id === item;\n }).$initializedEl;\n }\n }\n }]);\n\n return HSQuantityCounter;\n}();\n\n\n\n//# sourceURL=webpack://HSQuantityCounter/./src/js/hs-quantity-counter.js?')}},e={},f.m=d,f.c=e,f.d=function(t,e,n){f.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return f.d(e,"a",e),e},f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.p="",f(f.s="./src/js/hs-quantity-counter.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e})),List=function(){var t={"./src/add-async.js":function(t){t.exports=function(t){return function e(n,r,i){var o=n.splice(0,50);i=(i=i||[]).concat(t.add(o)),n.length>0?setTimeout((function(){e(n,r,i)}),1):(t.update(),r(i))}}},"./src/filter.js":function(t){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var n=t.items,r=0,i=n.length;r<i;r++){var o=n[r];e(o)?o.filtered=!0:o.filtered=!1}}return t.update(),t.trigger("filterComplete"),t.visibleItems}}},"./src/fuzzy-search.js":function(t,e,n){n("./src/utils/classes.js");var r=n("./src/utils/events.js"),i=n("./src/utils/extend.js"),o=n("./src/utils/to-string.js"),s=n("./src/utils/get-by-class.js"),a=n("./src/utils/fuzzy.js");t.exports=function(t,e){e=i({location:0,distance:100,threshold:.4,multiSearch:!0,searchClass:"fuzzy-search"},e=e||{});var n={search:function(r,i){for(var o=e.multiSearch?r.replace(/ +$/,"").split(/ +/):[r],s=0,a=t.items.length;s<a;s++)n.item(t.items[s],i,o)},item:function(t,e,r){for(var i=!0,o=0;o<r.length;o++){for(var s=!1,a=0,l=e.length;a<l;a++)n.values(t.values(),e[a],r[o])&&(s=!0);s||(i=!1)}t.found=i},values:function(t,n,r){if(t.hasOwnProperty(n)){var i=o(t[n]).toLowerCase();if(a(i,r,e))return!0}return!1}};return r.bind(s(t.listContainer,e.searchClass),"keyup",t.utils.events.debounce((function(e){var r=e.target||e.srcElement;t.search(r.value,n.search)}),t.searchDelay)),function(e,r){t.search(e,r,n.search)}}},"./src/index.js":function(t,e,n){var r=n("./node_modules/string-natural-compare/natural-compare.js"),i=n("./src/utils/get-by-class.js"),o=n("./src/utils/extend.js"),s=n("./src/utils/index-of.js"),a=n("./src/utils/events.js"),l=n("./src/utils/to-string.js"),u=n("./src/utils/classes.js"),c=n("./src/utils/get-attribute.js"),d=n("./src/utils/to-array.js");t.exports=function(t,e,h){var p,f=this,m=n("./src/item.js")(f),g=n("./src/add-async.js")(f),v=n("./src/pagination.js")(f);p={start:function(){f.listClass="list",f.searchClass="search",f.sortClass="sort",f.page=1e4,f.i=1,f.items=[],f.visibleItems=[],f.matchingItems=[],f.searched=!1,f.filtered=!1,f.searchColumns=void 0,f.searchDelay=0,f.handlers={updated:[]},f.valueNames=[],f.utils={getByClass:i,extend:o,indexOf:s,events:a,toString:l,naturalSort:r,classes:u,getAttribute:c,toArray:d},f.utils.extend(f,e),f.listContainer="string"==typeof t?document.getElementById(t):t,f.listContainer&&(f.list=i(f.listContainer,f.listClass,!0),f.parse=n("./src/parse.js")(f),f.templater=n("./src/templater.js")(f),f.search=n("./src/search.js")(f),f.filter=n("./src/filter.js")(f),f.sort=n("./src/sort.js")(f),f.fuzzySearch=n("./src/fuzzy-search.js")(f,e.fuzzySearch),this.handlers(),this.items(),this.pagination(),f.update())},handlers:function(){for(var t in f.handlers)f[t]&&f.handlers.hasOwnProperty(t)&&f.on(t,f[t])},items:function(){f.parse(f.list),void 0!==h&&f.add(h)},pagination:function(){if(void 0!==e.pagination){!0===e.pagination&&(e.pagination=[{}]),void 0===e.pagination[0]&&(e.pagination=[e.pagination]);for(var t=0,n=e.pagination.length;t<n;t++)v(e.pagination[t])}}},this.reIndex=function(){f.items=[],f.visibleItems=[],f.matchingItems=[],f.searched=!1,f.filtered=!1,f.parse(f.list)},this.toJSON=function(){for(var t=[],e=0,n=f.items.length;e<n;e++)t.push(f.items[e].values());return t},this.add=function(t,e){if(0!==t.length){if(!e){var n=[],r=!1;void 0===t[0]&&(t=[t]);for(var i=0,o=t.length;i<o;i++){var s;r=f.items.length>f.page,s=new m(t[i],void 0,r),f.items.push(s),n.push(s)}return f.update(),n}g(t.slice(0),e)}},this.show=function(t,e){return this.i=t,this.page=e,f.update(),f},this.remove=function(t,e,n){for(var r=0,i=0,o=f.items.length;i<o;i++)f.items[i].values()[t]==e&&(f.templater.remove(f.items[i],n),f.items.splice(i,1),o--,i--,r++);return f.update(),r},this.get=function(t,e){for(var n=[],r=0,i=f.items.length;r<i;r++){var o=f.items[r];o.values()[t]==e&&n.push(o)}return n},this.size=function(){return f.items.length},this.clear=function(){return f.templater.clear(),f.items=[],f},this.on=function(t,e){return f.handlers[t].push(e),f},this.off=function(t,e){var n=f.handlers[t],r=s(n,e);return r>-1&&n.splice(r,1),f},this.trigger=function(t){for(var e=f.handlers[t].length;e--;)f.handlers[t][e](f);return f},this.reset={filter:function(){for(var t=f.items,e=t.length;e--;)t[e].filtered=!1;return f},search:function(){for(var t=f.items,e=t.length;e--;)t[e].found=!1;return f}},this.update=function(){var t=f.items,e=t.length;f.visibleItems=[],f.matchingItems=[],f.templater.clear();for(var n=0;n<e;n++)t[n].matching()&&f.matchingItems.length+1>=f.i&&f.visibleItems.length<f.page?(t[n].show(),f.visibleItems.push(t[n]),f.matchingItems.push(t[n])):t[n].matching()?(f.matchingItems.push(t[n]),t[n].hide()):t[n].hide();return f.trigger("updated"),f},p.start()}},"./src/item.js":function(t){t.exports=function(t){return function(e,n,r){var i=this;this._values={},this.found=!1,this.filtered=!1,this.values=function(e,n){if(void 0===e)return i._values;for(var r in e)i._values[r]=e[r];!0!==n&&t.templater.set(i,i.values())},this.show=function(){t.templater.show(i)},this.hide=function(){t.templater.hide(i)},this.matching=function(){return t.filtered&&t.searched&&i.found&&i.filtered||t.filtered&&!t.searched&&i.filtered||!t.filtered&&t.searched&&i.found||!t.filtered&&!t.searched},this.visible=function(){return!(!i.elm||i.elm.parentNode!=t.list)},function(e,n,r){if(void 0===n)r?i.values(e,r):i.values(e);else{i.elm=n;var o=t.templater.get(i,e);i.values(o)}}(e,n,r)}}},"./src/pagination.js":function(t,e,n){var r=n("./src/utils/classes.js"),i=n("./src/utils/events.js"),o=n("./src/index.js");t.exports=function(t){var e=!1,n=function(n,i){if(t.page<1)return t.listContainer.style.display="none",void(e=!0);e&&(t.listContainer.style.display="block");var o,a=t.matchingItems.length,l=t.i,u=t.page,c=Math.ceil(a/u),d=Math.ceil(l/u),h=i.innerWindow||2,p=i.left||i.outerWindow||0,f=i.right||i.outerWindow||0;f=c-f,n.clear();for(var m=1;m<=c;m++){var g=d===m?"active":"";s.number(m,p,f,d,h)?(o=n.add({page:m,dotted:!1})[0],g&&r(o.elm).add(g),o.elm.firstChild.setAttribute("data-i",m),o.elm.firstChild.setAttribute("data-page",u)):s.dotted(n,m,p,f,d,h,n.size())&&(o=n.add({page:"...",dotted:!0})[0],r(o.elm).add("disabled"))}},s={number:function(t,e,n,r,i){return this.left(t,e)||this.right(t,n)||this.innerWindow(t,r,i)},left:function(t,e){return t<=e},right:function(t,e){return t>e},innerWindow:function(t,e,n){return t>=e-n&&t<=e+n},dotted:function(t,e,n,r,i,o,s){return this.dottedLeft(t,e,n,r,i,o)||this.dottedRight(t,e,n,r,i,o,s)},dottedLeft:function(t,e,n,r,i,o){return e==n+1&&!this.innerWindow(e,i,o)&&!this.right(e,r)},dottedRight:function(t,e,n,r,i,o,s){return!t.items[s-1].values().dotted&&e==r&&!this.innerWindow(e,i,o)&&!this.right(e,r)}};return function(e){var r=new o(t.listContainer.id,{listClass:e.paginationClass||"pagination",item:e.item||"<li><a class='page' href='#'></a></li>",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});i.bind(r.listContainer,"click",(function(e){var n=e.target||e.srcElement,r=t.utils.getAttribute(n,"data-page"),i=t.utils.getAttribute(n,"data-i");i&&t.show((i-1)*r+1,r)})),t.on("updated",(function(){n(r,e)})),n(r,e)}}},"./src/parse.js":function(t,e,n){t.exports=function(t){var e=n("./src/item.js")(t),r=function(n,r){for(var i=0,o=n.length;i<o;i++)t.items.push(new e(r,n[i]))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=function(t){for(var e=t.childNodes,n=[],r=0,i=e.length;r<i;r++)void 0===e[r].data&&n.push(e[r]);return n}(t.list),n=t.valueNames;t.indexAsync?function e(n,i){var o=n.splice(0,50);r(o,i),n.length>0?setTimeout((function(){e(n,i)}),1):(t.update(),t.trigger("parseComplete"))}(e,n):r(e,n)}}},"./src/search.js":function(t){t.exports=function(t){var e,n,r,i={resetList:function(){t.i=1,t.templater.clear(),r=void 0},setOptions:function(t){2==t.length&&t[1]instanceof Array?e=t[1]:2==t.length&&"function"==typeof t[1]?(e=void 0,r=t[1]):3==t.length?(e=t[1],r=t[2]):e=void 0},setColumns:function(){0!==t.items.length&&void 0===e&&(e=void 0===t.searchColumns?i.toArray(t.items[0].values()):t.searchColumns)},setSearchString:function(e){e=(e=t.utils.toString(e).toLowerCase()).replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),n=e},toArray:function(t){var e=[];for(var n in t)e.push(n);return e}},o=function(){for(var r,i=[],o=n;null!==(r=o.match(/"([^"]+)"/));)i.push(r[1]),o=o.substring(0,r.index)+o.substring(r.index+r[0].length);(o=o.trim()).length&&(i=i.concat(o.split(/\s+/)));for(var s=0,a=t.items.length;s<a;s++){var l=t.items[s];if(l.found=!1,i.length){for(var u=0,c=i.length;u<c;u++){for(var d=!1,h=0,p=e.length;h<p;h++){var f=l.values(),m=e[h];if(f.hasOwnProperty(m)&&void 0!==f[m]&&null!==f[m]&&-1!==("string"!=typeof f[m]?f[m].toString():f[m]).toLowerCase().indexOf(i[u])){d=!0;break}}if(!d)break}l.found=d}}},s=function(){t.reset.search(),t.searched=!1},a=function(a){return t.trigger("searchStart"),i.resetList(),i.setSearchString(a),i.setOptions(arguments),i.setColumns(),""===n?s():(t.searched=!0,r?r(n,e):o()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",t.utils.events.debounce((function(e){var n=e.target||e.srcElement;""===n.value&&!t.searched||a(n.value)}),t.searchDelay)),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",(function(t){""===(t.target||t.srcElement).value&&a("")})),a}},"./src/sort.js":function(t){t.exports=function(t){var e={els:void 0,clear:function(){for(var n=0,r=e.els.length;n<r;n++)t.utils.classes(e.els[n]).remove("asc"),t.utils.classes(e.els[n]).remove("desc")},getOrder:function(e){var n=t.utils.getAttribute(e,"data-order");return"asc"==n||"desc"==n?n:t.utils.classes(e).has("desc")?"asc":t.utils.classes(e).has("asc")?"desc":"asc"},getInSensitive:function(e,n){var r=t.utils.getAttribute(e,"data-insensitive");n.insensitive="false"!==r},setOrder:function(n){for(var r=0,i=e.els.length;r<i;r++){var o=e.els[r];if(t.utils.getAttribute(o,"data-sort")===n.valueName){var s=t.utils.getAttribute(o,"data-order");"asc"==s||"desc"==s?s==n.order&&t.utils.classes(o).add(n.order):t.utils.classes(o).add(n.order)}}}},n=function(){t.trigger("sortStart");var n={},r=arguments[0].currentTarget||arguments[0].srcElement||void 0;r?(n.valueName=t.utils.getAttribute(r,"data-sort"),e.getInSensitive(r,n),n.order=e.getOrder(r)):((n=arguments[1]||n).valueName=arguments[0],n.order=n.order||"asc",n.insensitive=void 0===n.insensitive||n.insensitive),e.clear(),e.setOrder(n);var i,o=n.sortFunction||t.sortFunction||null,s="desc"===n.order?-1:1;i=o?function(t,e){return o(t,e,n)*s}:function(e,r){var i=t.utils.naturalSort;return i.alphabet=t.alphabet||n.alphabet||void 0,!i.alphabet&&n.insensitive&&(i=t.utils.naturalSort.caseInsensitive),i(e.values()[n.valueName],r.values()[n.valueName])*s},t.items.sort(i),t.update(),t.trigger("sortComplete")};return t.handlers.sortStart=t.handlers.sortStart||[],t.handlers.sortComplete=t.handlers.sortComplete||[],e.els=t.utils.getByClass(t.listContainer,t.sortClass),t.utils.events.bind(e.els,"click",n),t.on("searchStart",e.clear),t.on("filterStart",e.clear),n}},"./src/templater.js":function(t){var e=function(t){var e,n=this,r=function(t){if("string"==typeof t){if(/<tr[\s>]/g.exec(t)){var e=document.createElement("tbody");return e.innerHTML=t,e.firstElementChild}if(-1!==t.indexOf("<")){var n=document.createElement("div");return n.innerHTML=t,n.firstElementChild}}},i=function(e,n,r){var i=void 0,o=function(e){for(var n=0,r=t.valueNames.length;n<r;n++){var i=t.valueNames[n];if(i.data){for(var o=i.data,s=0,a=o.length;s<a;s++)if(o[s]===e)return{data:e}}else{if(i.attr&&i.name&&i.name==e)return i;if(i===e)return e}}}(n);o&&(o.data?e.elm.setAttribute("data-"+o.data,r):o.attr&&o.name?(i=t.utils.getByClass(e.elm,o.name,!0))&&i.setAttribute(o.attr,r):(i=t.utils.getByClass(e.elm,o,!0))&&(i.innerHTML=r))};this.get=function(e,r){n.create(e);for(var i={},o=0,s=r.length;o<s;o++){var a=void 0,l=r[o];if(l.data)for(var u=0,c=l.data.length;u<c;u++)i[l.data[u]]=t.utils.getAttribute(e.elm,"data-"+l.data[u]);else l.attr&&l.name?(a=t.utils.getByClass(e.elm,l.name,!0),i[l.name]=a?t.utils.getAttribute(a,l.attr):""):(a=t.utils.getByClass(e.elm,l,!0),i[l]=a?a.innerHTML:"")}return i},this.set=function(t,e){if(!n.create(t))for(var r in e)e.hasOwnProperty(r)&&i(t,r,e[r])},this.create=function(t){return void 0===t.elm&&(t.elm=e(t.values()),n.set(t,t.values()),!0)},this.remove=function(e){e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.show=function(e){n.create(e),t.list.appendChild(e.elm)},this.hide=function(e){void 0!==e.elm&&e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.clear=function(){if(t.list.hasChildNodes())for(;t.list.childNodes.length>=1;)t.list.removeChild(t.list.firstChild)},function(){var n;if("function"!=typeof t.item){if(!(n="string"==typeof t.item?-1===t.item.indexOf("<")?document.getElementById(t.item):r(t.item):function(){for(var e=t.list.childNodes,n=0,r=e.length;n<r;n++)if(void 0===e[n].data)return e[n].cloneNode(!0)}()))throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template.");n=function(e,n){var r=e.cloneNode(!0);r.removeAttribute("id");for(var i=0,o=n.length;i<o;i++){var s=void 0,a=n[i];if(a.data)for(var l=0,u=a.data.length;l<u;l++)r.setAttribute("data-"+a.data[l],"");else a.attr&&a.name?(s=t.utils.getByClass(r,a.name,!0))&&s.setAttribute(a.attr,""):(s=t.utils.getByClass(r,a,!0))&&(s.innerHTML="")}return r}(n,t.valueNames),e=function(){return n.cloneNode(!0)}}else e=function(e){var n=t.item(e);return r(n)}}()};t.exports=function(t){return new e(t)}},"./src/utils/classes.js":function(t,e,n){var r=n("./src/utils/index-of.js"),i=/\s+/;function o(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}Object.prototype.toString,t.exports=function(t){return new o(t)},o.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array();return~r(e,t)||e.push(t),this.el.className=e.join(" "),this},o.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),n=r(e,t);return~n&&e.splice(n,1),this.el.className=e.join(" "),this},o.prototype.toggle=function(t,e){return this.list?(void 0!==e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(void 0!==e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},o.prototype.array=function(){var t=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(i);return""===t[0]&&t.shift(),t},o.prototype.has=o.prototype.contains=function(t){return this.list?this.list.contains(t):!!~r(this.array(),t)}},"./src/utils/events.js":function(t,e,n){var r=window.addEventListener?"addEventListener":"attachEvent",i=window.removeEventListener?"removeEventListener":"detachEvent",o="addEventListener"!==r?"on":"",s=n("./src/utils/to-array.js");e.bind=function(t,e,n,i){for(var a=0,l=(t=s(t)).length;a<l;a++)t[a][r](o+e,n,i||!1)},e.unbind=function(t,e,n,r){for(var a=0,l=(t=s(t)).length;a<l;a++)t[a][i](o+e,n,r||!1)},e.debounce=function(t,e,n){var r;return e?function(){var i=this,o=arguments,s=function(){r=null,n||t.apply(i,o)},a=n&&!r;clearTimeout(r),r=setTimeout(s,e),a&&t.apply(i,o)}:t}},"./src/utils/extend.js":function(t){t.exports=function(t){for(var e,n=Array.prototype.slice.call(arguments,1),r=0;e=n[r];r++)if(e)for(var i in e)t[i]=e[i];return t}},"./src/utils/fuzzy.js":function(t){t.exports=function(t,e,n){var r=n.location||0,i=n.distance||100,o=n.threshold||.4;if(e===t)return!0;if(e.length>32)return!1;var s=r,a=function(){var t,n={};for(t=0;t<e.length;t++)n[e.charAt(t)]=0;for(t=0;t<e.length;t++)n[e.charAt(t)]|=1<<e.length-t-1;return n}();function l(t,n){var r=t/e.length,o=Math.abs(s-n);return i?r+o/i:o?1:r}var u=o,c=t.indexOf(e,s);-1!=c&&(u=Math.min(l(0,c),u),-1!=(c=t.lastIndexOf(e,s+e.length))&&(u=Math.min(l(0,c),u)));var d,h,p=1<<e.length-1;c=-1;for(var f,m=e.length+t.length,g=0;g<e.length;g++){for(d=0,h=m;d<h;)l(g,s+h)<=u?d=h:m=h,h=Math.floor((m-d)/2+d);m=h;var v=Math.max(1,s-h+1),y=Math.min(s+h,t.length)+e.length,_=Array(y+2);_[y+1]=(1<<g)-1;for(var b=y;b>=v;b--){var w=a[t.charAt(b-1)];if(_[b]=0===g?(_[b+1]<<1|1)&w:(_[b+1]<<1|1)&w|(f[b+1]|f[b])<<1|1|f[b+1],_[b]&p){var x=l(g,b-1);if(x<=u){if(u=x,!((c=b-1)>s))break;v=Math.max(1,2*s-c)}}}if(l(g+1,s)>u)break;f=_}return!(c<0)}},"./src/utils/get-attribute.js":function(t){t.exports=function(t,e){var n=t.getAttribute&&t.getAttribute(e)||null;if(!n)for(var r=t.attributes,i=r.length,o=0;o<i;o++)void 0!==r[o]&&r[o].nodeName===e&&(n=r[o].nodeValue);return n}},"./src/utils/get-by-class.js":function(t){t.exports=function(t,e,n,r){return(r=r||{}).test&&r.getElementsByClassName||!r.test&&document.getElementsByClassName?function(t,e,n){return n?t.getElementsByClassName(e)[0]:t.getElementsByClassName(e)}(t,e,n):r.test&&r.querySelector||!r.test&&document.querySelector?function(t,e,n){return e="."+e,n?t.querySelector(e):t.querySelectorAll(e)}(t,e,n):function(t,e,n){for(var r=[],i=t.getElementsByTagName("*"),o=i.length,s=new RegExp("(^|\\s)"+e+"(\\s|$)"),a=0,l=0;a<o;a++)if(s.test(i[a].className)){if(n)return i[a];r[l]=i[a],l++}return r}(t,e,n)}},"./src/utils/index-of.js":function(t){var e=[].indexOf;t.exports=function(t,n){if(e)return t.indexOf(n);for(var r=0,i=t.length;r<i;++r)if(t[r]===n)return r;return-1}},"./src/utils/to-array.js":function(t){t.exports=function(t){if(void 0===t)return[];if(null===t)return[null];if(t===window)return[window];if("string"==typeof t)return[t];if(function(t){return"[object Array]"===Object.prototype.toString.call(t)}(t))return t;if("number"!=typeof t.length)return[t];if("function"==typeof t&&t instanceof Function)return[t];for(var e=[],n=0,r=t.length;n<r;n++)(Object.prototype.hasOwnProperty.call(t,n)||n in t)&&e.push(t[n]);return e.length?e:[]}},"./src/utils/to-string.js":function(t){t.exports=function(t){return(t=null===(t=void 0===t?"":t)?"":t).toString()}},"./node_modules/string-natural-compare/natural-compare.js":function(t){"use strict";var e,n,r=0;function i(t){return t>=48&&t<=57}function o(t,e){for(var o=(t+="").length,s=(e+="").length,a=0,l=0;a<o&&l<s;){var u=t.charCodeAt(a),c=e.charCodeAt(l);if(i(u)){if(!i(c))return u-c;for(var d=a,h=l;48===u&&++d<o;)u=t.charCodeAt(d);for(;48===c&&++h<s;)c=e.charCodeAt(h);for(var p=d,f=h;p<o&&i(t.charCodeAt(p));)++p;for(;f<s&&i(e.charCodeAt(f));)++f;var m=p-d-f+h;if(m)return m;for(;d<p;)if(m=t.charCodeAt(d++)-e.charCodeAt(h++))return m;a=p,l=f}else{if(u!==c)return u<r&&c<r&&-1!==n[u]&&-1!==n[c]?n[u]-n[c]:u-c;++a,++l}}return a>=o&&l<s&&o>=s?-1:l>=s&&a<o&&s>=o?1:o-s}o.caseInsensitive=o.i=function(t,e){return o((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(o,{alphabet:{get:function(){return e},set:function(t){n=[];var i=0;if(e=t)for(;i<e.length;i++)n[e.charCodeAt(i)]=i;for(r=n.length,i=0;i<r;i++)void 0===n[i]&&(n[i]=-1)}}}),t.exports=o}},e={};return function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}("./src/index.js")}();var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var t=/\blang(?:uage)?-(\w+)\b/i,e=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(t){return t instanceof r?new r(t.type,n.util.encode(t.content),t.alias):"Array"===n.util.type(t)?t.map(n.util.encode):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).match(/\[object (\w+)\]/)[1]},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++e}),t.__id},clone:function(t,e){var r=n.util.type(t);switch(e=e||{},r){case"Object":if(e[n.util.objId(t)])return e[n.util.objId(t)];var i={};for(var o in e[n.util.objId(t)]=i,t)t.hasOwnProperty(o)&&(i[o]=n.util.clone(t[o],e));return i;case"Array":if(e[n.util.objId(t)])return e[n.util.objId(t)];i=[];return e[n.util.objId(t)]=i,t.forEach((function(t,r){i[r]=n.util.clone(t,e)})),i}return t}},languages:{extend:function(t,e){var r=n.util.clone(n.languages[t]);for(var i in e)r[i]=e[i];return r},insertBefore:function(t,e,r,i){var o=(i=i||n.languages)[t];if(2==arguments.length){for(var s in r=arguments[1])r.hasOwnProperty(s)&&(o[s]=r[s]);return o}var a={};for(var l in o)if(o.hasOwnProperty(l)){if(l==e)for(var s in r)r.hasOwnProperty(s)&&(a[s]=r[s]);a[l]=o[l]}return n.languages.DFS(n.languages,(function(e,n){n===i[t]&&e!=t&&(this[e]=a)})),i[t]=a},DFS:function(t,e,r,i){for(var o in i=i||{},t)t.hasOwnProperty(o)&&(e.call(t,o,t[o],r||o),"Object"!==n.util.type(t[o])||i[n.util.objId(t[o])]?"Array"!==n.util.type(t[o])||i[n.util.objId(t[o])]||(i[n.util.objId(t[o])]=!0,n.languages.DFS(t[o],e,o,i)):(i[n.util.objId(t[o])]=!0,n.languages.DFS(t[o],e,null,i)))}},plugins:{},highlightAll:function(t,e){n.highlightAllUnder(document,t,e)},highlightAllUnder:function(t,e,r){var i={callback:r,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",i);for(var o,s=i.elements||t.querySelectorAll(i.selector),a=0;o=s[a++];)n.highlightElement(o,!0===e,i.callback)},highlightElement:function(e,r,i){for(var o,s,a=e;a&&!t.test(a.className);)a=a.parentNode;a&&(o=(a.className.match(t)||[,""])[1].toLowerCase(),s=n.languages[o]),e.className=e.className.replace(t,"").replace(/\s+/g," ")+" language-"+o,e.parentNode&&(a=e.parentNode,/pre/i.test(a.nodeName)&&(a.className=a.className.replace(t,"").replace(/\s+/g," ")+" language-"+o));var l={element:e,language:o,grammar:s,code:e.textContent};if(n.hooks.run("before-sanity-check",l),!l.code||!l.grammar)return l.code&&(n.hooks.run("before-highlight",l),l.element.textContent=l.code,n.hooks.run("after-highlight",l)),void n.hooks.run("complete",l);if(n.hooks.run("before-highlight",l),r&&_self.Worker){var u=new Worker(n.filename);u.onmessage=function(t){l.highlightedCode=t.data,n.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,i&&i.call(l.element),n.hooks.run("after-highlight",l),n.hooks.run("complete",l)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else l.highlightedCode=n.highlight(l.code,l.grammar,l.language),n.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,i&&i.call(e),n.hooks.run("after-highlight",l),n.hooks.run("complete",l)},highlight:function(t,e,i){var o={code:t,grammar:e,language:i};return n.hooks.run("before-tokenize",o),o.tokens=n.tokenize(o.code,o.grammar),n.hooks.run("after-tokenize",o),r.stringify(n.util.encode(o.tokens),o.language)},matchGrammar:function(t,e,r,i,o,s,a){var l=n.Token;for(var u in r)if(r.hasOwnProperty(u)&&r[u]){if(u==a)return;var c=r[u];c="Array"===n.util.type(c)?c:[c];for(var d=0;d<c.length;++d){var h=c[d],p=h.inside,f=!!h.lookbehind,m=!!h.greedy,g=0,v=h.alias;if(m&&!h.pattern.global){var y=h.pattern.toString().match(/[imuy]*$/)[0];h.pattern=RegExp(h.pattern.source,y+"g")}h=h.pattern||h;for(var _=i,b=o;_<e.length;b+=e[_].length,++_){var w=e[_];if(e.length>t.length)return;if(!(w instanceof l)){if(m&&_!=e.length-1){if(h.lastIndex=b,!(T=h.exec(t)))break;for(var x=T.index+(f?T[1].length:0),S=T.index+T[0].length,k=_,C=b,E=e.length;E>k&&(S>C||!e[k].type&&!e[k-1].greedy);++k)x>=(C+=e[k].length)&&(++_,b=C);if(e[_]instanceof l)continue;P=k-_,w=t.slice(b,C),T.index-=b}else{h.lastIndex=0;var T=h.exec(w),P=1}if(T){f&&(g=T[1]?T[1].length:0);S=(x=T.index+g)+(T=T[0].slice(g)).length;var O=w.slice(0,x),A=w.slice(S),M=[_,P];O&&(++_,b+=O.length,M.push(O));var L=new l(u,p?n.tokenize(T,p):T,v,T,m);if(M.push(L),A&&M.push(A),Array.prototype.splice.apply(e,M),1!=P&&n.matchGrammar(t,e,r,_,b,!0,u),s)break}else if(s)break}}}}},tokenize:function(t,e){var r=[t],i=e.rest;if(i){for(var o in i)e[o]=i[o];delete e.rest}return n.matchGrammar(t,r,e,0,0,!1),r},hooks:{all:{},add:function(t,e){var r=n.hooks.all;r[t]=r[t]||[],r[t].push(e)},run:function(t,e){var r=n.hooks.all[t];if(r&&r.length)for(var i,o=0;i=r[o++];)i(e)}}},r=n.Token=function(t,e,n,r,i){this.type=t,this.content=e,this.alias=n,this.length=0|(r||"").length,this.greedy=!!i};if(r.stringify=function(t,e,i){if("string"==typeof t)return t;if("Array"===n.util.type(t))return t.map((function(n){return r.stringify(n,e,t)})).join("");var o={type:t.type,content:r.stringify(t.content,e,i),tag:"span",classes:["token",t.type],attributes:{},language:e,parent:i};if(t.alias){var s="Array"===n.util.type(t.alias)?t.alias:[t.alias];Array.prototype.push.apply(o.classes,s)}n.hooks.run("wrap",o);var a=Object.keys(o.attributes).map((function(t){return t+'="'+(o.attributes[t]||"").replace(/"/g,""")+'"'})).join(" ");return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+(a?" "+a:"")+">"+o.content+"</"+o.tag+">"},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",(function(t){var e=JSON.parse(t.data),r=e.language,i=e.code,o=e.immediateClose;_self.postMessage(n.highlight(i,n.languages[r],r)),o&&_self.close()}),!1),_self.Prism):_self.Prism;var i=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return i&&(n.filename=i.src,n.manual||i.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();void 0!==module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/(^|[^\\])["']/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&/,"&"))})),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\s\S]*?>)[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/[a-z0-9_]+(?=\()/i,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,function:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\s\S]*?>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript,Prism.languages.css.selector={pattern:/[^{}\s][^{}]*(?=\s*\{)/,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","function",{hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,number:/[\d%.]+/}),Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,commit_sha1:/^commit \w{40}$/m},Prism.languages.icon={comment:/#.*/,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n_]|\\.|_(?!\1)(?:\r\n|[\s\S]))*\1/,greedy:!0},number:/\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,"builtin-keyword":{pattern:/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,alias:"variable"},directive:{pattern:/\$\w+/,alias:"builtin"},keyword:/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,function:/(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,operator:/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,punctuation:/[\[\](){},;]/},Prism.languages.json={property:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,punctuation:/[{}[\]);,]/,operator:/:/g,boolean:/\b(?:true|false)\b/i,null:/\bnull\b/i},Prism.languages.jsonp=Prism.languages.json,function(t){t.languages.sass=t.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),t.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete t.languages.sass.atrule;var e=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];t.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:e,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:e,operator:n,important:t.languages.sass.important}}}),delete t.languages.sass.property,delete t.languages.sass.important,delete t.languages.sass.selector,t.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(Prism),Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)*url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|&|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.scss.property={pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/i,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}},Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:/\bnull\b/,operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss,function(){if("undefined"!=typeof self&&self.Prism&&self.document){var t=[],e={},n=function(){};Prism.plugins.toolbar={};var r=Prism.plugins.toolbar.registerButton=function(n,r){var i;i="function"==typeof r?r:function(t){var e;return"function"==typeof r.onClick?((e=document.createElement("button")).type="button",e.addEventListener("click",(function(){r.onClick.call(this,t)}))):"string"==typeof r.url?(e=document.createElement("a")).href=r.url:e=document.createElement("span"),e.textContent=r.text,e},t.push(e[n]=i)},i=Prism.plugins.toolbar.hook=function(r){var i=r.element.parentNode;if(i&&/pre/i.test(i.nodeName)&&!i.parentNode.classList.contains("code-toolbar")){var o=document.createElement("div");o.classList.add("code-toolbar"),i.parentNode.insertBefore(o,i),o.appendChild(i);var s=document.createElement("div");s.classList.add("toolbar"),document.body.hasAttribute("data-toolbar-order")&&(t=document.body.getAttribute("data-toolbar-order").split(",").map((function(t){return e[t]||n}))),t.forEach((function(t){var e=t(r);if(e){var n=document.createElement("div");n.classList.add("toolbar-item"),n.appendChild(e),s.appendChild(n)}})),o.appendChild(s)}};r("label",(function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-label")){var n,r,i=e.getAttribute("data-label");try{r=document.querySelector("template#"+i)}catch(t){}return r?n=r.content:(e.hasAttribute("data-url")?(n=document.createElement("a")).href=e.getAttribute("data-url"):n=document.createElement("span"),n.textContent=i),n}})),Prism.hooks.add("complete",i)}}(),function(){function t(t){this.defaults=r({},t)}function e(t){return t.replace(/-(\w)/g,(function(t,e){return e.toUpperCase()}))}function n(t){for(var e=0,n=0;n<t.length;++n)t.charCodeAt(n)=="\t".charCodeAt(0)&&(e+=3);return t.length+e}var r=Object.assign||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t};t.prototype={setDefaults:function(t){this.defaults=r(this.defaults,t)},normalize:function(t,n){for(var i in n=r(this.defaults,n)){var o=e(i);"normalize"!==i&&"setDefaults"!==o&&n[i]&&this[o]&&(t=this[o].call(this,t,n[i]))}return t},leftTrim:function(t){return t.replace(/^\s+/,"")},rightTrim:function(t){return t.replace(/\s+$/,"")},tabsToSpaces:function(t,e){return e=0|e||4,t.replace(/\t/g,new Array(++e).join(" "))},spacesToTabs:function(t,e){return e=0|e||4,t.replace(new RegExp(" {"+e+"}","g"),"\t")},removeTrailing:function(t){return t.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(t){return t.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(t){var e=t.match(/^[^\S\n\r]*(?=\S)/gm);return e&&e[0].length?(e.sort((function(t,e){return t.length-e.length})),e[0].length?t.replace(new RegExp("^"+e[0],"gm"),""):t):t},indent:function(t,e){return t.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++e).join("\t")+"$&")},breakLines:function(t,e){e=!0===e?80:0|e||80;for(var r=t.split("\n"),i=0;i<r.length;++i)if(!(n(r[i])<=e)){for(var o=r[i].split(/(\s+)/g),s=0,a=0;a<o.length;++a){var l=n(o[a]);(s+=l)>e&&(o[a]="\n"+o[a],s=l)}r[i]=o.join("")}return r.join("\n")}},void 0!==module&&module.exports&&(module.exports=t),void 0!==Prism&&(Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",(function(t){var e=Prism.plugins.NormalizeWhitespace;if(!t.settings||!1!==t.settings["whitespace-normalization"]){if((!t.element||!t.element.parentNode)&&t.code)return void(t.code=e.normalize(t.code,t.settings));var n=t.element.parentNode,r=/\bno-whitespace-normalization\b/;if(t.code&&n&&"pre"===n.nodeName.toLowerCase()&&!r.test(n.className)&&!r.test(t.element.className)){for(var i=n.childNodes,o="",s="",a=!1,l=0;l<i.length;++l){var u=i[l];u==t.element?a=!0:"#text"===u.nodeName&&(a?s+=u.nodeValue:o+=u.nodeValue,n.removeChild(u),--l)}if(t.element.children.length&&Prism.plugins.KeepMarkup){var c=o+t.element.innerHTML+s;t.element.innerHTML=e.normalize(c,t.settings),t.code=t.element.textContent}else t.code=o+t.code+s,t.code=e.normalize(t.code,t.settings)}}})))}(),function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return void console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.");var t=window.ClipboardJS||void 0;t||"function"!=typeof require||(t=require("clipboard"));var e=[];if(!t){var n=document.createElement("script"),r=document.querySelector("head");n.onload=function(){if(t=window.ClipboardJS)for(;e.length;)e.pop()()},n.src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",r.appendChild(n)}Prism.plugins.toolbar.registerButton("copy-to-clipboard",(function(n){function r(){var e=new t(o,{text:function(){return n.code}});e.on("success",(function(){o.textContent="Copied!",i()})),e.on("error",(function(){o.textContent="Press Ctrl+C to copy",i()}))}function i(){setTimeout((function(){o.textContent="Copy"}),5e3)}var o=document.createElement("a");return o.textContent="Copy",t?r():e.push(r),o}))}}(),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.wNumb=t()}((function(){"use strict";var t=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function e(t){return t.split("").reverse().join("")}function n(t,e){return t.substring(0,e.length)===e}function r(t,e,n){if((t[e]||t[n])&&t[e]===t[n])throw new Error(e)}function i(t){return"number"==typeof t&&isFinite(t)}function o(t,n,r,o,s,a,l,u,c,d,h,p){var f,m,g,v=p,y="",_="";return a&&(p=a(p)),!!i(p)&&(!1!==t&&0===parseFloat(p.toFixed(t))&&(p=0),p<0&&(f=!0,p=Math.abs(p)),!1!==t&&(p=function(t,e){return t=t.toString().split("e"),(+((t=(t=Math.round(+(t[0]+"e"+(t[1]?+t[1]+e:e)))).toString().split("e"))[0]+"e"+(t[1]?t[1]-e:-e))).toFixed(e)}(p,t)),-1!==(p=p.toString()).indexOf(".")?(g=(m=p.split("."))[0],r&&(y=r+m[1])):g=p,n&&(g=e((g=e(g).match(/.{1,3}/g)).join(e(n)))),f&&u&&(_+=u),o&&(_+=o),f&&c&&(_+=c),_+=g,_+=y,s&&(_+=s),d&&(_=d(_,v)),_)}function s(t,e,r,o,s,a,l,u,c,d,h,p){var f,m="";return h&&(p=h(p)),!(!p||"string"!=typeof p)&&(u&&n(p,u)&&(p=p.replace(u,""),f=!0),o&&n(p,o)&&(p=p.replace(o,"")),c&&n(p,c)&&(p=p.replace(c,""),f=!0),s&&function(t,e){return t.slice(-1*e.length)===e}(p,s)&&(p=p.slice(0,-1*s.length)),e&&(p=p.split(e).join("")),r&&(p=p.replace(r,".")),f&&(m+="-"),""!==(m=(m+=p).replace(/[^0-9\.\-.]/g,""))&&(m=Number(m),l&&(m=l(m)),!!i(m)&&m))}function a(e,n,r){var i,o=[];for(i=0;i<t.length;i+=1)o.push(e[t[i]]);return o.push(r),n.apply("",o)}return function e(n){if(!(this instanceof e))return new e(n);"object"==typeof n&&(n=function(e){var n,i,o,s={};for(void 0===e.suffix&&(e.suffix=e.postfix),n=0;n<t.length;n+=1)if(void 0===(o=e[i=t[n]]))"negative"!==i||s.negativeBefore?"mark"===i&&"."!==s.thousand?s[i]=".":s[i]=!1:s[i]="-";else if("decimals"===i){if(!(0<=o&&o<8))throw new Error(i);s[i]=o}else if("encoder"===i||"decoder"===i||"edit"===i||"undo"===i){if("function"!=typeof o)throw new Error(i);s[i]=o}else{if("string"!=typeof o)throw new Error(i);s[i]=o}return r(s,"mark","thousand"),r(s,"prefix","negative"),r(s,"prefix","negativeBefore"),s}(n),this.to=function(t){return a(n,o,t)},this.from=function(t){return a(n,s,t)})}})); |