/*! For license information please see 4.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{1:function(t,e,i){"use strict";function n(t,e,i,n,r,o,s,a){var l,h="function"==typeof t?t.options:t;if(e&&(h.render=e,h.staticRenderFns=i,h._compiled=!0),n&&(h.functional=!0),o&&(h._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},h._ssrRegister=l):r&&(l=a?function(){r.call(this,(h.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(h.functional){h._injectStyles=l;var c=h.render;h.render=function(t,e){return l.call(e),c(t,e)}}else{var u=h.beforeCreate;h.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:h}}i.r(e),i.d(e,"default",(function(){return n}))},132:function(t,e,i){(function(i){var n,r=function(){this._tweens={},this._tweensAddedDuringUpdate={}};r.prototype={getAll:function(){return Object.keys(this._tweens).map((function(t){return this._tweens[t]}).bind(this))},removeAll:function(){this._tweens={}},add:function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},remove:function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},update:function(t,e){var i=Object.keys(this._tweens);if(0===i.length)return!1;for(t=void 0!==t?t:s.now();i.length>0;){this._tweensAddedDuringUpdate={};for(var n=0;n1?1:i,n=this._easingFunction(i),this._valuesEnd)if(void 0!==this._valuesStart[e]){var r=this._valuesStart[e]||0,o=this._valuesEnd[e];o instanceof Array?this._object[e]=this._interpolationFunction(o,n):("string"==typeof o&&(o="+"===o.charAt(0)||"-"===o.charAt(0)?r+parseFloat(o):parseFloat(o)),"number"==typeof o&&(this._object[e]=r+(o-r)*n))}if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object,i),1===i){if(this._repeat>0){for(e in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat){if("string"==typeof this._valuesEnd[e]&&(this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(this._valuesEnd[e])),this._yoyo){var s=this._valuesStartRepeat[e];this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=s}this._valuesStart[e]=this._valuesStartRepeat[e]}return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,null!==this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}null!==this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,l=this._chainedTweens.length;a1?o(t[i],t[i-1],i-n):o(t[r],t[r+1>i?i:r+1],n-r)},Bezier:function(t,e){for(var i=0,n=t.length-1,r=Math.pow,o=s.Interpolation.Utils.Bernstein,a=0;a<=n;a++)i+=r(1-e,n-a)*r(e,a)*t[a]*o(n,a);return i},CatmullRom:function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n),o=s.Interpolation.Utils.CatmullRom;return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),o(t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i],n-r)):e<0?t[0]-(o(t[0],t[0],t[1],t[1],-n)-t[0]):e>1?t[i]-(o(t[i],t[i],t[i-1],t[i-1],n-i)-t[i]):o(t[r?r-1:0],t[r],t[i1;i--)e*=i;return o[t]=e,e}),CatmullRom:function(t,e,i,n,r){var o=.5*(i-t),s=.5*(n-e),a=r*r;return(2*e-2*i+o+s)*(r*a)+(-3*e+3*i-2*o-s)*a+o*r+e}}},void 0===(n=(function(){return s}).apply(e,[]))||(t.exports=n)}).call(this,i(30))},26:function(t,e,i){(function(){var t="‎",i="‏",n="ltr",r="rtl",o="bidi",s="",a={Hebrew:["0590","05FF"],Arabic:["0600","06FF"],NKo:["07C0","07FF"],Syriac:["0700","074F"],Thaana:["0780","07BF"],Tifinagh:["2D30","2D7F"]};function l(e){if(void 0===e)throw new Error("TypeError missing argument");if("string"!=typeof e)throw new Error("TypeError getDirection expects strings");if(""===e)return s;if(e.indexOf(t)>-1&&e.indexOf(i)>-1)return o;if(e.indexOf(t)>-1)return n;if(e.indexOf(i)>-1)return r;var a=h(e,r),l=h(e,n);return a&&l?o:l?n:a?r:s}function h(t,e){var i,o,s,l,h=!1,u=!1,f=!1;for(f=t.search(/[0-9]/)>-1,t=t.replace(/[\s\n\0\f\t\v\'\"\-0-9\+\?\!]+/gm,""),i=0;ir&&n0&&(a=r?r/2.5*(c/8):0,l=(h=s.abs(t)+a)/c),{destination:s.round(a),duration:l}};var a=n("transform");return t.extend(t,{hasTransform:!1!==a,hasPerspective:n("perspective")in e,hasTouch:"ontouchstart"in r,hasPointer:!(!r.PointerEvent&&!r.MSPointerEvent),hasTransition:n("transition")in e}),t.isBadAndroid=function(){var t=r.navigator.appVersion;if(/Android/.test(t)&&!/Chrome\/\d/.test(t)){var e=t.match(/Safari\/(\d+.\d)/);return!(e&&"object"==typeof e&&e.length>=2)||parseFloat(e[1])<535.19}return!1}(),t.extend(t.style={},{transform:a,transitionTimingFunction:n("transitionTimingFunction"),transitionDuration:n("transitionDuration"),transitionDelay:n("transitionDelay"),transformOrigin:n("transformOrigin")}),t.hasClass=function(t,e){return new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)},t.addClass=function(e,i){if(!t.hasClass(e,i)){var n=e.className.split(" ");n.push(i),e.className=n.join(" ")}},t.removeClass=function(e,i){if(t.hasClass(e,i)){var n=new RegExp("(^|\\s)"+i+"(\\s|$)","g");e.className=e.className.replace(n," ")}},t.offset=function(t){for(var e=-t.offsetLeft,i=-t.offsetTop;t=t.offsetParent;)e-=t.offsetLeft,i-=t.offsetTop;return{left:e,top:i}},t.preventDefaultException=function(t,e){for(var i in e)if(e[i].test(t[i]))return!0;return!1},t.extend(t.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),t.extend(t.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(t){return s.sqrt(1- --t*t)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(t){var e=4;return(t-=1)*t*((e+1)*t+e)+1}},bounce:{style:"",fn:function(t){return(t/=1)<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}},elastic:{style:"",fn:function(t){var e=.22;return 0===t?0:1==t?1:.4*s.pow(2,-10*t)*s.sin((t-e/4)*(2*s.PI)/e)+1}}}),t.tap=function(t,e){var i=o.createEvent("Event");i.initEvent(e,!0,!0),i.pageX=t.pageX,i.pageY=t.pageY,t.target.dispatchEvent(i)},t.click=function(t){var e,i=t.target;/(SELECT|INPUT|TEXTAREA)/i.test(i.tagName)||((e=o.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,t.view,1,i.screenX,i.screenY,i.clientX,i.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,0,null),e._constructed=!0,i.dispatchEvent(e))},t}();function h(t,e){for(var i in this.wrapper="string"==typeof t?o.querySelector(t):t,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!l.hasPointer,disableTouch:l.hasPointer||!l.hasTouch,disableMouse:l.hasPointer||l.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:void 0===r.onmousedown},e)this.options[i]=e[i];this.translateZ=this.options.HWCompositing&&l.hasPerspective?" translateZ(0)":"",this.options.useTransition=l.hasTransition&&this.options.useTransition,this.options.useTransform=l.hasTransform&&this.options.useTransform,this.options.eventPassthrough=!0===this.options.eventPassthrough?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"!=this.options.eventPassthrough&&this.options.scrollY,this.options.scrollX="horizontal"!=this.options.eventPassthrough&&this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?l.ease[this.options.bounceEasing]||l.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,!0===this.options.tap&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,3==this.options.probeType&&(this.options.useTransition=!1),this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function c(t,e,i){var n=o.createElement("div"),r=o.createElement("div");return!0===i&&(n.style.cssText="position:absolute;z-index:9999",r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),r.className="iScrollIndicator","h"==t?(!0===i&&(n.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",r.style.height="100%"),n.className="iScrollHorizontalScrollbar"):(!0===i&&(n.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",r.style.width="100%"),n.className="iScrollVerticalScrollbar"),n.style.cssText+=";overflow:hidden",e||(n.style.pointerEvents="none"),n.appendChild(r),n}function u(t,e){for(var i in this.wrapper="string"==typeof e.el?o.querySelector(e.el):e.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=t,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0},e)this.options[i]=e[i];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(l.addEvent(this.indicator,"touchstart",this),l.addEvent(r,"touchend",this)),this.options.disablePointer||(l.addEvent(this.indicator,l.prefixPointerEvent("pointerdown"),this),l.addEvent(r,l.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(l.addEvent(this.indicator,"mousedown",this),l.addEvent(r,"mouseup",this))),this.options.fade){this.wrapperStyle[l.style.transform]=this.scroller.translateZ;var n=l.style.transitionDuration;this.wrapperStyle[n]=l.isBadAndroid?"0.0001ms":"0ms";var s=this;l.isBadAndroid&&a((function(){"0.0001ms"===s.wrapperStyle[n]&&(s.wrapperStyle[n]="0s")})),this.wrapperStyle.opacity="0"}}h.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(t){t.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(t){if(1!=l.eventType[t.type]&&0!==(t.which?t.button:t.button<2?0:4==t.button?1:2))return;if(this.enabled&&(!this.initiated||l.eventType[t.type]===this.initiated)){!this.options.preventDefault||l.isBadAndroid||l.preventDefaultException(t.target,this.options.preventDefaultException)||t.preventDefault();var e,i=t.touches?t.touches[0]:t;this.initiated=l.eventType[t.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=l.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,e=this.getComputedPosition(),this._translate(s.round(e.x),s.round(e.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=i.pageX,this.pointY=i.pageY,this._execEvent("beforeScrollStart")}},_move:function(t){if(this.enabled&&l.eventType[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault();var e,i,n,r,o=t.touches?t.touches[0]:t,a=o.pageX-this.pointX,h=o.pageY-this.pointY,c=l.getTime();if(this.pointX=o.pageX,this.pointY=o.pageY,this.distX+=a,this.distY+=h,n=s.abs(this.distX),r=s.abs(this.distY),!(c-this.endTime>300&&n<10&&r<10)){if(this.directionLocked||this.options.freeScroll||(n>r+this.options.directionLockThreshold?this.directionLocked="h":r>=n+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)t.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);h=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)t.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);a=0}a=this.hasHorizontalScroll?a:0,h=this.hasVerticalScroll?h:0,e=this.x+a,i=this.y+h,(e>0||e0?0:this.maxScrollX),(i>0||i0?0:this.maxScrollY),this.directionX=a>0?-1:a<0?1:0,this.directionY=h>0?-1:h<0?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(e,i),c-this.startTime>300&&(this.startTime=c,this.startX=this.x,this.startY=this.y,1==this.options.probeType&&this._execEvent("scroll")),this.options.probeType>1&&this._execEvent("scroll")}}},_end:function(t){if(this.enabled&&l.eventType[t.type]===this.initiated){this.options.preventDefault&&!l.preventDefaultException(t.target,this.options.preventDefaultException)&&t.preventDefault();t.changedTouches&&t.changedTouches[0];var e,i,n=l.getTime()-this.startTime,r=s.round(this.x),o=s.round(this.y),a=s.abs(r-this.startX),h=s.abs(o-this.startY),c=0,u="";if(this.isInTransition=0,this.initiated=0,this.endTime=l.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(r,o),!this.moved)return this.options.tap&&l.tap(t,this.options.tap),this.options.click&&l.click(t),void this._execEvent("scrollCancel");if(this._events.flick&&n<200&&a<100&&h<100)this._execEvent("flick");else{if(this.options.momentum&&n<300&&(e=this.hasHorizontalScroll?l.momentum(this.x,this.startX,n,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:r,duration:0},i=this.hasVerticalScroll?l.momentum(this.y,this.startY,n,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:o,duration:0},r=e.destination,o=i.destination,c=s.max(e.duration,i.duration),this.isInTransition=1),this.options.snap){var f=this._nearestSnap(r,o);this.currentPage=f,c=this.options.snapSpeed||s.max(s.max(s.min(s.abs(r-f.x),1e3),s.min(s.abs(o-f.y),1e3)),300),r=f.x,o=f.y,this.directionX=0,this.directionY=0,u=this.options.bounceEasing}if(r!=this.x||o!=this.y)return(r>0||r0||o0?e=0:this.x0?i=0:this.y-1&&this._events[t].splice(i,1)}},_execEvent:function(t){if(this._events[t]){var e=0,i=this._events[t].length;if(i)for(;e0;var r=this.options.useTransition&&n.style;!i||r?(r&&(this._transitionTimingFunction(n.style),this._transitionTime(i)),this._translate(t,e)):this._animate(t,e,i,n.fn)},scrollToElement:function(t,e,i,n,r){if(t=t.nodeType?t:this.scroller.querySelector(t)){var o=l.offset(t);o.left-=this.wrapperOffset.left,o.top-=this.wrapperOffset.top,!0===i&&(i=s.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===n&&(n=s.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),o.left-=i||0,o.top-=n||0,o.left=o.left>0?0:o.left0?0:o.top0?n--:e<0&&n++,i>0?r--:i<0&&r++,void this.goToPage(n,r);n=this.x+s.round(this.hasHorizontalScroll?e:0),r=this.y+s.round(this.hasVerticalScroll?i:0),this.directionX=e>0?-1:e<0?1:0,this.directionY=i>0?-1:i<0?1:0,n>0?n=0:n0?r=0:r1&&this._execEvent("scroll")}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",(function(){var t,e,i,n,r,o,a=0,l=0,h=0,c=this.options.snapStepX||this.wrapperWidth,u=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(!0===this.options.snap)for(i=s.round(c/2),n=s.round(u/2);h>-this.scrollerWidth;){for(this.pages[a]=[],t=0,r=0;r>-this.scrollerHeight;)this.pages[a][t]={x:s.max(h,this.maxScrollX),y:s.max(r,this.maxScrollY),width:c,height:u,cx:h-i,cy:r-n},r-=u,t++;h-=c,a++}else for(t=(o=this.options.snap).length,e=-1;athis.maxScrollX&&l++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1==0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=s.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=s.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}})),this.on("flick",(function(){var t=this.options.snapSpeed||s.max(s.max(s.min(s.abs(this.x-this.startX),1e3),s.min(s.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,t)}))},_nearestSnap:function(t,e){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var i=0,n=this.pages.length,r=0;if(s.abs(t-this.absStartX)0?t=0:t0?e=0:e=this.pages[i][0].cx){t=this.pages[i][0].x;break}for(n=this.pages[i].length;r=this.pages[0][r].cy){e=this.pages[0][r].y;break}return i==this.currentPage.pageX&&((i+=this.directionX)<0?i=0:i>=this.pages.length&&(i=this.pages.length-1),t=this.pages[i][0].x),r==this.currentPage.pageY&&((r+=this.directionY)<0?r=0:r>=this.pages[0].length&&(r=this.pages[0].length-1),e=this.pages[0][r].y),{x:t,y:e,pageX:i,pageY:r}},goToPage:function(t,e,i,n){n=n||this.options.bounceEasing,t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),e>=this.pages[t].length?e=this.pages[t].length-1:e<0&&(e=0);var r=this.pages[t][e].x,o=this.pages[t][e].y;i=void 0===i?this.options.snapSpeed||s.max(s.max(s.min(s.abs(r-this.x),1e3),s.min(s.abs(o-this.y),1e3)),300):i,this.currentPage={x:r,y:o,pageX:t,pageY:e},this.scrollTo(r,o,i,n)},next:function(t,e){var i=this.currentPage.pageX,n=this.currentPage.pageY;++i>=this.pages.length&&this.hasVerticalScroll&&(i=0,n++),this.goToPage(i,n,t,e)},prev:function(t,e){var i=this.currentPage.pageX,n=this.currentPage.pageY;--i<0&&this.hasVerticalScroll&&(i=0,n--),this.goToPage(i,n,t,e)},_initKeys:function(t){var e,i={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(e in this.options.keyBindings)"string"==typeof this.options.keyBindings[e]&&(this.options.keyBindings[e]=this.options.keyBindings[e].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(e in i)this.options.keyBindings[e]=this.options.keyBindings[e]||i[e];l.addEvent(r,"keydown",this),this.on("destroy",(function(){l.removeEvent(r,"keydown",this)}))},_key:function(t){if(this.enabled){var e,i=this.options.snap,n=i?this.currentPage.pageX:this.x,r=i?this.currentPage.pageY:this.y,o=l.getTime(),a=this.keyTime||0,h=.25;switch(this.options.useTransition&&this.isInTransition&&(e=this.getComputedPosition(),this._translate(s.round(e.x),s.round(e.y)),this.isInTransition=!1),this.keyAcceleration=o-a<200?s.min(this.keyAcceleration+h,50):0,t.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?n+=i?1:this.wrapperWidth:r+=i?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?n-=i?1:this.wrapperWidth:r-=i?1:this.wrapperHeight;break;case this.options.keyBindings.end:n=i?this.pages.length-1:this.maxScrollX,r=i?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:n=0,r=0;break;case this.options.keyBindings.left:n+=i?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:r+=i?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:n-=i?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:r-=i?1:5+this.keyAcceleration>>0;break;default:return}i?this.goToPage(n,r):(n>0?(n=0,this.keyAcceleration=0):n0?(r=0,this.keyAcceleration=0):r=c)return r.isAnimating=!1,r._translate(t,e),void(r.resetPosition(r.options.bounceTime)||r._execEvent("scrollEnd"));p=n(g=(g-h)/i),f=(t-o)*p+o,d=(e-s)*p+s,r._translate(f,d),r.isAnimating&&a(u),3==r.options.probeType&&r._execEvent("scroll")}this.isAnimating=!0,u()},handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(t);break;case"keydown":this._key(t);break;case"click":this.enabled&&!t._constructed&&(t.preventDefault(),t.stopPropagation())}}},u.prototype={handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(l.removeEvent(this.indicator,"touchstart",this),l.removeEvent(this.indicator,l.prefixPointerEvent("pointerdown"),this),l.removeEvent(this.indicator,"mousedown",this),l.removeEvent(r,"touchmove",this),l.removeEvent(r,l.prefixPointerEvent("pointermove"),this),l.removeEvent(r,"mousemove",this),l.removeEvent(r,"touchend",this),l.removeEvent(r,l.prefixPointerEvent("pointerup"),this),l.removeEvent(r,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(t){var e=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=e.pageX,this.lastPointY=e.pageY,this.startTime=l.getTime(),this.options.disableTouch||l.addEvent(r,"touchmove",this),this.options.disablePointer||l.addEvent(r,l.prefixPointerEvent("pointermove"),this),this.options.disableMouse||l.addEvent(r,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(t){var e,i,n,r,o=t.touches?t.touches[0]:t,s=l.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,e=o.pageX-this.lastPointX,this.lastPointX=o.pageX,i=o.pageY-this.lastPointY,this.lastPointY=o.pageY,n=this.x+e,r=this.y+i,this._pos(n,r),1==this.scroller.options.probeType&&s-this.startTime>300?(this.startTime=s,this.scroller._execEvent("scroll")):this.scroller.options.probeType>1&&this.scroller._execEvent("scroll"),t.preventDefault(),t.stopPropagation()},_end:function(t){if(this.initiated){if(this.initiated=!1,t.preventDefault(),t.stopPropagation(),l.removeEvent(r,"touchmove",this),l.removeEvent(r,l.prefixPointerEvent("pointermove"),this),l.removeEvent(r,"mousemove",this),this.scroller.options.snap){var e=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),i=this.options.snapSpeed||s.max(s.max(s.min(s.abs(this.scroller.x-e.x),1e3),s.min(s.abs(this.scroller.y-e.y),1e3)),300);this.scroller.x==e.x&&this.scroller.y==e.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=e,this.scroller.scrollTo(e.x,e.y,i,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(t){t=t||0;var e=l.style.transitionDuration;if(this.indicatorStyle[e]=t+"ms",!t&&l.isBadAndroid){this.indicatorStyle[e]="0.0001ms";var i=this;a((function(){"0.0001ms"===i.indicatorStyle[e]&&(i.indicatorStyle[e]="0s")}))}},transitionTimingFunction:function(t){this.indicatorStyle[l.style.transitionTimingFunction]=t},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(l.addClass(this.wrapper,"iScrollBothScrollbars"),l.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(l.removeClass(this.wrapper,"iScrollBothScrollbars"),l.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=s.max(s.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=8-this.indicatorWidth,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=s.max(s.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=8-this.indicatorHeight,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var t=this.options.listenX&&s.round(this.sizeRatioX*this.scroller.x)||0,e=this.options.listenY&&s.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(tthis.maxBoundaryX?"scale"==this.options.shrink?(this.width=s.max(this.indicatorWidth-(t-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",t=this.maxPosX+this.indicatorWidth-this.width):t=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),ethis.maxBoundaryY?"scale"==this.options.shrink?(this.height=s.max(this.indicatorHeight-3*(e-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",e=this.maxPosY+this.indicatorHeight-this.height):e=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=t,this.y=e,this.scroller.options.useTransform?this.indicatorStyle[l.style.transform]="translate("+t+"px,"+e+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=t+"px",this.indicatorStyle.top=e+"px")},_pos:function(t,e){t<0?t=0:t>this.maxPosX&&(t=this.maxPosX),e<0?e=0:e>this.maxPosY&&(e=this.maxPosY),t=this.options.listenX?s.round(t/this.sizeRatioX):this.scroller.x,e=this.options.listenY?s.round(e/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(t,e)},fade:function(t,e){if(!e||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var i=t?250:500,n=t?0:300;t=t?"1":"0",this.wrapperStyle[l.style.transitionDuration]=i+"ms",this.fadeTimeout=setTimeout((function(t){this.wrapperStyle.opacity=t,this.visible=+t}).bind(this,t),n)}}},h.utils=l,t.exports?t.exports=h:void 0===(n=(function(){return h}).call(e,i,e,t))||(t.exports=n)}(window,document,Math)},64:function(t,e,i){var n;n=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,(function(e){return t[e]}).bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=6)}([function(t,e){function i(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var i=t.hasAttribute("readonly");i||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),i||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),r=document.createRange();r.selectNodeContents(t),n.removeAllRanges(),n.addRange(r),e=n.toString()}return e}t.exports=i},function(t,e){function i(){}i.prototype={on:function(t,e,i){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){var n=this;function r(){n.off(t,r),e.apply(i,arguments)}return r._=e,this.on(t,r,i)},emit:function(t){for(var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),n=0,r=i.length;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=i+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=r()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=r()(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":o(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}(),h=i(1),c=i.n(h),u=i(2),f=i.n(u),d="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},p=function(){function t(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=f()(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return A("action",t)}},{key:"defaultTarget",value:function(t){var e=A("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return A("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,i=!!document.queryCommandSupported;return e.forEach((function(t){i=i&&!!document.queryCommandSupported(t)})),i}}]),e}(c.a);function A(t,e){var i="data-clipboard-"+t;if(e.hasAttribute(i))return e.getAttribute(i)}e.default=y}]).default},t.exports=n()},743:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=a(i(744)),o=a(i(745)),s=a(i(747));function a(t){return t&&t.__esModule?t:{default:t}}var l=void 0;e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=(0,r.default)();if(l||(l=(0,o.default)(a)),e.events)throw new Error("Event handlers cannot be overwritten.");if("string"==typeof t&&!document.getElementById(t))throw new Error('Element "'+t+'" does not exist.');e.events=s.default.proxyEvents(a);var h=new Promise((function(i){"object"===(void 0===t?"undefined":n(t))&&t.playVideo instanceof Function?i(t):l.then((function(n){var r=new n.Player(t,e);return a.on("ready",(function(){i(r)})),null}))})),c=s.default.promisifyPlayer(h,i);return c.on=a.on,c.off=a.off,c},t.exports=e.default},744:function(t,e,i){"use strict";var n;n=function(){var t={},e={};return t.on=function(t,i){var n={name:t,handler:i};return e[t]=e[t]||[],e[t].unshift(n),n},t.off=function(t){var i=e[t.name].indexOf(t);-1!==i&&e[t.name].splice(i,1)},t.trigger=function(t,i){var n,r=e[t];if(r)for(n=r.length;n--;)r[n].handler(i)},t},t.exports=n},745:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(i(746));function r(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){return new Promise((function(e){if(window.YT&&window.YT.Player&&window.YT.Player instanceof Function)e(window.YT);else{var i="http:"===window.location.protocol?"http:":"https:";(0,n.default)(i+"//www.youtube.com/iframe_api",(function(e){e&&t.trigger("error",e)}));var r=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){r&&r(),e(window.YT)}}}))},t.exports=e.default},746:function(t,e){function i(t,e){for(var i in e)t.setAttribute(i,e[i])}function n(t,e){t.onload=function(){this.onerror=this.onload=null,e(null,t)},t.onerror=function(){this.onerror=this.onload=null,e(new Error("Failed to load "+this.src),t)}}function r(t,e){t.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,e(null,t))}}t.exports=function(t,e,o){var s=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");"function"==typeof e&&(o=e,e={}),e=e||{},o=o||function(){},a.type=e.type||"text/javascript",a.charset=e.charset||"utf8",a.async=!("async"in e)||!!e.async,a.src=t,e.attrs&&i(a,e.attrs),e.text&&(a.text=""+e.text),("onload"in a?n:r)(a,o),a.onload||n(a,o),s.appendChild(a)}},747:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(i(748)),r=a(i(751)),o=a(i(752)),s=a(i(753));function a(t){return t&&t.__esModule?t:{default:t}}var l=(0,n.default)("youtube-player"),h={proxyEvents:function(t){var e={},i=function(i){var n="on"+i.slice(0,1).toUpperCase()+i.slice(1);e[n]=function(e){l('event "%s"',n,e),t.trigger(i,e)}},n=!0,r=!1,s=void 0;try{for(var a,h=o.default[Symbol.iterator]();!(n=(a=h.next()).done);n=!0){i(a.value)}}catch(c){r=!0,s=c}finally{try{!n&&h.return&&h.return()}finally{if(r)throw s}}return e},promisifyPlayer:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={},n=function(n){e&&s.default[n]?i[n]=function(){for(var e=arguments.length,i=Array(e),r=0;r=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){var i=this.useColors;if(t[0]=(i?"%c":"")+this.namespace+(i?" %c":" ")+t[0]+(i?"%c ":" ")+"+"+e.humanize(this.diff),i){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(r++,"%c"===t&&(o=r))})),t.splice(o,0,n)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(i){}}function l(){var t;try{t=e.storage.debug}catch(i){}return!t&&void 0!==n&&"env"in n&&(t=Object({NODE_ENV:"production",VERSION_TAG:"4.3.109",BUILD_NUM:"535"}).DEBUG),t}function h(){try{return window.localStorage}catch(t){}}(e=t.exports=i(749)).log=s,e.formatArgs=o,e.save=a,e.load=l,e.useColors=r,e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:h(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(l())}).call(this,i(30))},749:function(t,e,i){var n;function r(t){var i,n=0;for(i in t)n=(n<<5)-n+t.charCodeAt(i),n|=0;return e.colors[Math.abs(n)%e.colors.length]}function o(t){function i(){if(i.enabled){var t=i,r=+new Date,o=r-(n||r);t.diff=o,t.prev=n,t.curr=r,n=r;for(var s=new Array(arguments.length),a=0;a100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function l(t){return t>=o?Math.round(t/o)+"d":t>=r?Math.round(t/r)+"h":t>=n?Math.round(t/n)+"m":t>=i?Math.round(t/i)+"s":t+"ms"}function h(t){return c(t,o,"day")||c(t,r,"hour")||c(t,n,"minute")||c(t,i,"second")||t+" ms"}function c(t,e,i){if(!(t0)return a(t);if("number"===i&&!1===isNaN(t))return e.long?h(t):l(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},751:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["cueVideoById","loadVideoById","cueVideoByUrl","loadVideoByUrl","playVideo","pauseVideo","stopVideo","getVideoLoadedFraction","cuePlaylist","loadPlaylist","nextVideo","previousVideo","playVideoAt","setShuffle","setLoop","getPlaylist","getPlaylistIndex","setOption","mute","unMute","isMuted","setVolume","getVolume","seekTo","getPlayerState","getPlaybackRate","setPlaybackRate","getAvailablePlaybackRates","getPlaybackQuality","setPlaybackQuality","getAvailableQualityLevels","getCurrentTime","getDuration","removeEventListener","getVideoUrl","getVideoEmbedCode","getOptions","getOption","addEventListener","destroy","setSize","getIframe"],t.exports=e.default},752:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["ready","stateChange","playbackQualityChange","playbackRateChange","error","apiChange","volumeChange"],t.exports=e.default},753:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(i(754));function r(t){return t&&t.__esModule?t:{default:t}}e.default={pauseVideo:{acceptableStates:[n.default.ENDED,n.default.PAUSED],stateChangeRequired:!1},playVideo:{acceptableStates:[n.default.ENDED,n.default.PLAYING],stateChangeRequired:!1},seekTo:{acceptableStates:[n.default.ENDED,n.default.PLAYING,n.default.PAUSED],stateChangeRequired:!0,timeout:3e3}},t.exports=e.default},754:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={BUFFERING:3,ENDED:0,PAUSED:2,PLAYING:1,UNSTARTED:-1,VIDEO_CUED:5},t.exports=e.default},756:function(t,e,i){"use strict";i.r(e),(function(t,i){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},e=t.id,i=t.url,n=e||i;if(!n)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(h(n))return"https://vimeo.com/".concat(n);if(c(n))return n.replace("http:","https:");if(e)throw new TypeError("“".concat(e,"” is not a valid video id."));throw new TypeError("“".concat(n,"” is not a vimeo.com url."))}var f=void 0!==Array.prototype.indexOf,d="undefined"!=typeof window&&void 0!==window.postMessage;if(!(s||f&&d))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function g(t,e){return t(e={exports:{}},e.exports),e.exports}!function(t){if(!t.WeakMap){var e=Object.prototype.hasOwnProperty,i=function(t,e,i){Object.defineProperty?Object.defineProperty(t,e,{configurable:!0,writable:!0,value:i}):t[e]=i};t.WeakMap=function(){function t(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(i(this,"_id",o("_WeakMap")),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function r(t,i){if(!n(t)||!e.call(t,"_id"))throw new TypeError(i+" method called on incompatible receiver "+typeof t)}function o(t){return t+"_"+s()+"."+s()}function s(){return Math.random().toString().substring(2)}return i(t.prototype,"delete",(function(t){if(r(this,"delete"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t)&&(delete t[this._id],!0)})),i(t.prototype,"get",(function(t){if(r(this,"get"),n(t)){var e=t[this._id];return e&&e[0]===t?e[1]:void 0}})),i(t.prototype,"has",(function(t){if(r(this,"has"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t)})),i(t.prototype,"set",(function(t,e){if(r(this,"set"),!n(t))throw new TypeError("Invalid value used as weak map key");var o=t[this._id];return o&&o[0]===t?(o[1]=e,this):(i(t,this._id,[t,e]),this)})),i(t,"_polyfill",!0),t}()}function n(t){return Object(t)===t}}("undefined"!=typeof self?self:"undefined"!=typeof window?window:p);var m=g((function(t){var e,n,r;r=function(){var t,e,n,r=Object.prototype.toString,o=void 0!==i?function(t){return i(t)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(t,e,i,n){return Object.defineProperty(t,e,{value:i,writable:!0,configurable:!1!==n})}}catch(v){t=function(t,e,i){return t[e]=i,t}}function s(t,i){n.add(t,i),e||(e=o(n.drain))}function a(t){var e,i=typeof t;return null==t||"object"!=i&&"function"!=i||(e=t.then),"function"==typeof e&&e}function l(){for(var t=0;t0&&s(l,i))}catch(v){u.call(new d(i),v)}}}function u(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&s(l,e))}function f(t,e,i,n){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return _.reduce((function(e,i){var n=t.getAttribute("data-vimeo-".concat(i));return(n||""===n)&&(e[i]=""===n?1:n),e}),e)}function I(t,e){var i=t.html;if(!e)throw new TypeError("An element must be provided");if(null!==e.getAttribute("data-vimeo-initialized"))return e.querySelector("iframe");var n=document.createElement("div");return n.innerHTML=i,e.appendChild(n.firstChild),e.setAttribute("data-vimeo-initialized","true"),e.querySelector("iframe")}function S(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,r){if(!c(t))throw new TypeError("“".concat(t,"” is not a vimeo.com url."));var o="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(t));for(var s in e)e.hasOwnProperty(s)&&(o+="&".concat(s,"=").concat(encodeURIComponent(e[s])));var a="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;a.open("GET",o,!0),a.onload=function(){if(404!==a.status)if(403!==a.status)try{var e=JSON.parse(a.responseText);if(403===e.domain_status_code)return I(e,i),void r(new Error("“".concat(t,"” is not embeddable.")));n(e)}catch(o){r(o)}else r(new Error("“".concat(t,"” is not embeddable.")));else r(new Error("“".concat(t,"” was not found.")))},a.onerror=function(){var t=a.status?" (".concat(a.status,")"):"";r(new Error("There was an error fetching the embed code from Vimeo".concat(t,".")))},a.send()}))}function k(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),i=function(t){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(t))};e.forEach((function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var e=x(t);S(u(e),e,t).then((function(e){return I(e,t)})).catch(i)}catch(n){i(n)}}))}function T(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if(!window.VimeoPlayerResizeEmbeds_){window.VimeoPlayerResizeEmbeds_=!0;var e=function(e){if(c(e.origin)&&e.data&&"spacechange"===e.data.event)for(var i=t.querySelectorAll("iframe"),n=0;n=8&&r<10&&(n=JSON.stringify(n)),t.element.contentWindow.postMessage(n,t.origin)}}function P(t,e){var i,n=[];if((e=C(e)).event){if("error"===e.event)A(t,e.data.method).forEach((function(i){var n=new Error(e.data.message);n.name=e.data.name,i.reject(n),w(t,e.data.method,i)}));n=A(t,"event:".concat(e.event)),i=e.data}else if(e.method){var r=b(t,e.method);r&&(n.push(r),i=e.value)}n.forEach((function(e){try{if("function"==typeof e)return void e.call(t,i);e.resolve(i)}catch(n){}}))}function M(){var t=function(){for(var t,e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,n=e.length,r={};i1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,t),window.jQuery&&e instanceof jQuery&&(e.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),e=e[0]),"undefined"!=typeof document&&"string"==typeof e&&(e=document.getElementById(e)),!l(e))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==e.nodeName){var o=e.querySelector("iframe");o&&(e=o)}if("IFRAME"===e.nodeName&&!c(e.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(Q.has(e))return Q.get(e);this._window=e.ownerDocument.defaultView,this.element=e,this.origin="*";var s=new m((function(t,n){if(i._onMessage=function(e){if(c(e.origin)&&i.element.contentWindow===e.source){"*"===i.origin&&(i.origin=e.origin);var r=C(e.data);if(r&&"error"===r.event&&r.data&&"ready"===r.data.method){var o=new Error(r.data.message);return o.name=r.data.name,void n(o)}var s=r&&"ready"===r.event,a=r&&"ping"===r.method;if(s||a)return i.element.setAttribute("data-ready","true"),void t();P(i,r)}},i._window.addEventListener("message",i._onMessage),"IFRAME"!==i.element.nodeName){var o=x(e,r);S(u(o),o,e).then((function(t){var n=I(t,e);return i.element=n,i._originalElement=e,E(e,n),Q.set(i.element,i),t})).catch(n)}}));if(D.set(this,s),Q.set(this.element,this),"IFRAME"===this.element.nodeName&&B(this,"ping"),Y.isEnabled){var a=function(){return Y.exit()};this.fullscreenchangeHandler=function(){Y.isFullscreen?y(i,"event:exitFullscreen",a):w(i,"event:exitFullscreen",a),i.ready().then((function(){B(i,"fullscreenchange",Y.isFullscreen)}))},Y.on("fullscreenchange",this.fullscreenchangeHandler)}return this}return o(t,[{key:"callMethod",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new m((function(n,r){return e.ready().then((function(){y(e,t,{resolve:n,reject:r}),B(e,t,i)})).catch(r)}))}},{key:"get",value:function(t){var e=this;return new m((function(i,n){return t=a(t,"get"),e.ready().then((function(){y(e,t,{resolve:i,reject:n}),B(e,t)})).catch(n)}))}},{key:"set",value:function(t,e){var i=this;return new m((function(n,r){if(t=a(t,"set"),null==e)throw new TypeError("There must be a value to set.");return i.ready().then((function(){y(i,t,{resolve:n,reject:r}),B(i,t,e)})).catch(r)}))}},{key:"on",value:function(t,e){if(!t)throw new TypeError("You must pass an event name.");if(!e)throw new TypeError("You must pass a callback function.");if("function"!=typeof e)throw new TypeError("The callback must be a function.");0===A(this,"event:".concat(t)).length&&this.callMethod("addEventListener",t).catch((function(){})),y(this,"event:".concat(t),e)}},{key:"off",value:function(t,e){if(!t)throw new TypeError("You must pass an event name.");if(e&&"function"!=typeof e)throw new TypeError("The callback must be a function.");w(this,"event:".concat(t),e)&&this.callMethod("removeEventListener",t).catch((function(t){}))}},{key:"loadVideo",value:function(t){return this.callMethod("loadVideo",t)}},{key:"ready",value:function(){var t=D.get(this)||new m((function(t,e){e(new Error("Unknown player. Probably unloaded."))}));return m.resolve(t)}},{key:"addCuePoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:t,data:e})}},{key:"removeCuePoint",value:function(t){return this.callMethod("removeCuePoint",t)}},{key:"enableTextTrack",value:function(t,e){if(!t)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:t,kind:e})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return Y.isEnabled?Y.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return Y.isEnabled?Y.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return Y.isEnabled?m.resolve(Y.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var t=this;return new m((function(e){if(D.delete(t),Q.delete(t.element),t._originalElement&&(Q.delete(t._originalElement),t._originalElement.removeAttribute("data-vimeo-initialized")),t.element&&"IFRAME"===t.element.nodeName&&t.element.parentNode&&(t.element.parentNode.parentNode&&t._originalElement&&t._originalElement!==t.element.parentNode?t.element.parentNode.parentNode.removeChild(t.element.parentNode):t.element.parentNode.removeChild(t.element)),t.element&&"DIV"===t.element.nodeName&&t.element.parentNode){t.element.removeAttribute("data-vimeo-initialized");var i=t.element.querySelector("iframe");i&&i.parentNode&&(i.parentNode.parentNode&&t._originalElement&&t._originalElement!==i.parentNode?i.parentNode.parentNode.removeChild(i.parentNode):i.parentNode.removeChild(i))}t._window.removeEventListener("message",t._onMessage),Y.isEnabled&&Y.off("fullscreenchange",t.fullscreenchangeHandler),e()}))}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(t){return this.set("autopause",t)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(t){return this.set("cameraProps",t)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(t){return this.set("color",t)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(t){return this.set("currentTime",t)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(t){return this.set("loop",t)}},{key:"setMuted",value:function(t){return this.set("muted",t)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(t){return this.set("playbackRate",t)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(t){return this.set("quality",t)}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(t){return this.set("volume",t)}}]),t}();s||(Y=M(),k(),T()),e.default=O}).call(this,i(7),i(320).setImmediate)},765:function(t,e,i){var n,r;r=function(){return function(){function t(e,i,r){function o(a,l){if(!i[a]){if(!e[a]){if(!l&&"function"==typeof n&&n)return n(a,!0);if(s)return s(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[a]={exports:{}};e[a][0].call(c.exports,(function(t){return o(e[a][1][t]||t)}),c,c.exports,t,e,i,r)}return i[a].exports}for(var s="function"==typeof n&&n,a=0;a=0,wasm:e.indexOf("wasm")>=0};r.call(this,i),this.features={js:i.js,wasm:i.wasm&&this.has_wasm()},this.use(o),this.use(s)}n(a,r),a.prototype.resizeAndUnsharp=function(t,e){var i=this.resize(t,e);return t.unsharpAmount&&this.unsharp_mask(i,t.toWidth,t.toHeight,t.unsharpAmount,t.unsharpRadius,t.unsharpThreshold),i},e.exports=a},{"./mm_resize":4,inherits:15,multimath:16,"multimath/lib/unsharp_mask":19}],2:[function(t,e,i){"use strict";function n(t){return t<0?0:t>255?255:t}function r(t,e,i,r,o,s){var a,l,h,c,u,f,d,p,g,m,v,y=0,A=0;for(g=0;g0;d--)c=c+(v=s[u++])*t[p+3]|0,h=h+v*t[p+2]|0,l=l+v*t[p+1]|0,a=a+v*t[p]|0,p=p+4|0;e[A+3]=n(c+8192>>14),e[A+2]=n(h+8192>>14),e[A+1]=n(l+8192>>14),e[A]=n(a+8192>>14),A=A+4*r|0}A=4*(g+1)|0,y=(g+1)*i*4|0}}function o(t,e,i,r,o,s){var a,l,h,c,u,f,d,p,g,m,v,y=0,A=0;for(g=0;g0;d--)c=c+(v=s[u++])*t[p+3]|0,h=h+v*t[p+2]|0,l=l+v*t[p+1]|0,a=a+v*t[p]|0,p=p+4|0;e[A+3]=n(c+8192>>14),e[A+2]=n(h+8192>>14),e[A+1]=n(l+8192>>14),e[A]=n(a+8192>>14),A=A+4*r|0}A=4*(g+1)|0,y=(g+1)*i*4|0}}e.exports={convolveHorizontally:r,convolveVertically:o}},{}],3:[function(t,e,i){"use strict";e.exports="AGFzbQEAAAABFAJgBn9/f39/fwBgB39/f39/f38AAg8BA2VudgZtZW1vcnkCAAEDAwIAAQQEAXAAAAcZAghjb252b2x2ZQAACmNvbnZvbHZlSFYAAQkBAArmAwLBAwEQfwJAIANFDQAgBEUNACAFQQRqIRVBACEMQQAhDQNAIA0hDkEAIRFBACEHA0AgB0ECaiESAn8gBSAHQQF0IgdqIgZBAmouAQAiEwRAQQAhCEEAIBNrIRQgFSAHaiEPIAAgDCAGLgEAakECdGohEEEAIQlBACEKQQAhCwNAIBAoAgAiB0EYdiAPLgEAIgZsIAtqIQsgB0H/AXEgBmwgCGohCCAHQRB2Qf8BcSAGbCAKaiEKIAdBCHZB/wFxIAZsIAlqIQkgD0ECaiEPIBBBBGohECAUQQFqIhQNAAsgEiATagwBC0EAIQtBACEKQQAhCUEAIQggEgshByABIA5BAnRqIApBgMAAakEOdSIGQf8BIAZB/wFIG0EQdEGAgPwHcUEAIAZBAEobIAtBgMAAakEOdSIGQf8BIAZB/wFIG0EYdEEAIAZBAEobciAJQYDAAGpBDnUiBkH/ASAGQf8BSBtBCHRBgP4DcUEAIAZBAEobciAIQYDAAGpBDnUiBkH/ASAGQf8BSBtB/wFxQQAgBkEAShtyNgIAIA4gA2ohDiARQQFqIhEgBEcNAAsgDCACaiEMIA1BAWoiDSADRw0ACwsLIQACQEEAIAIgAyAEIAUgABAAIAJBACAEIAUgBiABEAALCw=="},{}],4:[function(t,e,i){"use strict";e.exports={name:"resize",fn:t("./resize"),wasm_fn:t("./resize_wasm"),wasm_src:t("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(t,e,i){"use strict";var n=t("./resize_filter_gen"),r=t("./convolve").convolveHorizontally,o=t("./convolve").convolveVertically;function s(t,e,i){for(var n=3,r=e*i*4|0;n>1]+=o(1-y),w=0;w0&&0===d[b];)b--;if(E=h+w,_=b-w+1,C[B++]=E,C[B++]=_,P)for(m=w;m<=b;m++)C[B++]=d[m];else C.set(d.subarray(w,b+1),B),B+=_}else C[B++]=0,C[B++]=0}return C}},{"./resize_filter_info":7}],7:[function(t,e,i){"use strict";e.exports=[{win:.5,filter:function(t){return t>=-.5&&t<.5?1:0}},{win:1,filter:function(t){if(t<=-1||t>=1)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*(.54+.46*Math.cos(e/1))}},{win:2,filter:function(t){if(t<=-2||t>=2)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/2)/(e/2)}},{win:3,filter:function(t){if(t<=-3||t>=3)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/3)/(e/3)}}]},{}],8:[function(t,e,i){"use strict";var n=t("./resize_filter_gen");function r(t,e,i){for(var n=3,r=e*i*4|0;n>8&255}}e.exports=function(t){var e=t.src,i=t.width,o=t.height,s=t.toWidth,l=t.toHeight,h=t.scaleX||t.toWidth/t.width,c=t.scaleY||t.toHeight/t.height,u=t.offsetX||0,f=t.offsetY||0,d=t.dest||new Uint8Array(s*l*4),p=void 0===t.quality?3:t.quality,g=t.alpha||!1,m=n(p,i,s,h,u),v=n(p,o,l,c,f),y=0,A=this.__align(y+Math.max(e.byteLength,d.byteLength)),w=this.__align(A+o*s*4),b=this.__align(w+m.byteLength),E=b+v.byteLength,_=this.__instance("resize",E),x=new Uint8Array(this.__memory.buffer),I=new Uint32Array(this.__memory.buffer),S=new Uint32Array(e.buffer);return I.set(S),a(m,x,w),a(v,x,b),(_.exports.convolveHV||_.exports._convolveHV)(w,b,A,i,o,s,l),new Uint32Array(d.buffer).set(new Uint32Array(this.__memory.buffer,0,l*s)),g||r(d,s,l),d}},{"./resize_filter_gen":6}],9:[function(t,e,i){"use strict";var n=100;function r(t,e){this.create=t,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=e||2e3}r.prototype.acquire=function(){var t,e=this;return 0!==this.available.length?t=this.available.pop():((t=this.create()).id=this.lastId++,t.release=function(){return e.release(t)}),this.acquired[t.id]=t,t},r.prototype.release=function(t){var e=this;delete this.acquired[t.id],t.lastUsed=Date.now(),this.available.push(t),0===this.timeoutId&&(this.timeoutId=setTimeout((function(){return e.gc()}),n))},r.prototype.gc=function(){var t=this,e=Date.now();this.available=this.available.filter((function(i){return!(e-i.lastUsed>t.idle&&(i.destroy(),1))})),0!==this.available.length?this.timeoutId=setTimeout((function(){return t.gc()}),n):this.timeoutId=0},e.exports=r},{}],10:[function(t,e,i){"use strict";var n=2;e.exports=function(t,e,i,r,o,s){var a=i/t,l=r/e,h=(2*s+n+1)/o;if(h>.5)return[[i,r]];var c=Math.ceil(Math.log(Math.min(a,l))/Math.log(h));if(c<=1)return[[i,r]];for(var u=[],f=0;f=t.toWidth&&(a=t.toWidth-e),(i=s-t.destTileBorder)<0&&(i=0),i+(l=s+f+t.destTileBorder-i)>=t.toHeight&&(l=t.toHeight-i),d={toX:e,toY:i,toWidth:a,toHeight:l,toInnerX:n,toInnerY:s,toInnerWidth:u,toInnerHeight:f,offsetX:e/h-r(e/h),offsetY:i/c-r(i/c),scaleX:h,scaleY:c,x:r(e/h),y:r(i/c),width:o(a/h),height:o(l/c)},p.push(d);return p}},{}],12:[function(t,e,i){"use strict";function n(t){return Object.prototype.toString.call(t)}e.exports.isCanvas=function(t){var e=n(t);return"[object HTMLCanvasElement]"===e||"[object OffscreenCanvas]"===e||"[object Canvas]"===e},e.exports.isImage=function(t){return"[object HTMLImageElement]"===n(t)},e.exports.limiter=function(t){var e=0,i=[];function n(){e=0;g--)l=a*m+s*v+h*y+c*A,c=h,h=l,s=a,a=t[u],e[f]=i[d]+h,u--,d--,f-=o}}function u(t,e,i,n){if(n){var r=new Uint16Array(t.length),o=new Float32Array(Math.max(e,i)),s=h(n);c(t,r,o,s,e,i,n),c(r,t,o,s,i,e,n)}}e.exports=u},{}],15:[function(t,e,i){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}}},{}],16:[function(t,e,i){"use strict";var n=t("object-assign"),r=t("./lib/base64decode"),o=t("./lib/wa_detect"),s={js:!0,wasm:!0};function a(t){if(!(this instanceof a))return new a(t);var e=n({},s,t||{});if(this.options=e,this.__cache={},this.__init_promise=null,this.__modules=e.modules||{},this.__memory=null,this.__wasm={},this.__isLE=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0],!this.options.js&&!this.options.wasm)throw new Error('mathlib: at least "js" or "wasm" should be enabled')}a.prototype.has_wasm=o,a.prototype.use=function(t){return this.__modules[t.name]=t,this.options.wasm&&this.has_wasm()&&t.wasm_fn?this[t.name]=t.wasm_fn:this[t.name]=t.fn,this},a.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(new Error('mathlib: only "wasm" was enabled, but it\'s not supported'));var t=this;return this.__init_promise=Promise.all(Object.keys(t.__modules).map((function(e){var i=t.__modules[e];return t.options.wasm&&t.has_wasm()&&i.wasm_fn?t.__wasm[e]?null:WebAssembly.compile(t.__base64decode(i.wasm_src)).then((function(i){t.__wasm[e]=i})):null}))).then((function(){return t})),this.__init_promise},a.prototype.__base64decode=r,a.prototype.__reallocate=function(t){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(t/65536)}),this.__memory;var e=this.__memory.buffer.byteLength;return e>2),o=0,s=0,a=0;a>16&255,r[s++]=o>>8&255,r[s++]=255&o),o=o<<6|n.indexOf(e.charAt(a));var l=i%4*6;return 0===l?(r[s++]=o>>16&255,r[s++]=o>>8&255,r[s++]=255&o):18===l?(r[s++]=o>>10&255,r[s++]=o>>2&255):12===l&&(r[s++]=o>>4&255),r}},{}],18:[function(t,e,i){"use strict";e.exports=function(t,e,i){for(var n,r,o,s,a,l=e*i,h=new Uint16Array(l),c=0;c=r&&n>=o?n:r>=o&&r>=n?r:o,s=n<=r&&n<=o?n:r<=o&&r<=n?r:o,h[c]=257*(a+s)>>1;return h}},{}],19:[function(t,e,i){"use strict";e.exports={name:"unsharp_mask",fn:t("./unsharp_mask"),wasm_fn:t("./unsharp_mask_wasm"),wasm_src:t("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":20,"./unsharp_mask_wasm":21,"./unsharp_mask_wasm_base64":22}],20:[function(t,e,i){"use strict";var n=t("glur/mono16"),r=t("./hsl_l16");e.exports=function(t,e,i,o,s,a){var l,h,c,u,f,d,p,g,m,v,y,A,w;if(!(0===o||s<.5)){s>2&&(s=2);var b=r(t,e,i),E=new Uint16Array(b);n(E,e,i,s);for(var _=o/100*4096+.5|0,x=257*a|0,I=e*i,S=0;S=x&&(l=t[w=4*S],h=t[w+1],c=t[w+2],d=257*((g=l>=h&&l>=c?l:h>=l&&h>=c?h:c)+(p=l<=h&&l<=c?l:h<=l&&h<=c?h:c))>>1,p===g?u=f=0:(f=d<=32767?4095*(g-p)/(g+p)|0:4095*(g-p)/(510-g-p)|0,u=l===g?65535*(h-c)/(6*(g-p))|0:h===g?21845+(65535*(c-l)/(6*(g-p))|0):43690+(65535*(l-h)/(6*(g-p))|0)),(d+=_*A+2048>>12)>65535?d=65535:d<0&&(d=0),0===f?l=h=c=d>>8:(m=2*d-(v=d<=32767?d*(4096+f)+2048>>12:d+((65535-d)*f+2048>>12))>>8,v>>=8,l=(y=u+21845&65535)>=43690?m:y>=32767?m+(6*(v-m)*(43690-y)+32768>>16):y>=10922?v:m+(6*(v-m)*y+32768>>16),h=(y=65535&u)>=43690?m:y>=32767?m+(6*(v-m)*(43690-y)+32768>>16):y>=10922?v:m+(6*(v-m)*y+32768>>16),c=(y=u-21845&65535)>=43690?m:y>=32767?m+(6*(v-m)*(43690-y)+32768>>16):y>=10922?v:m+(6*(v-m)*y+32768>>16)),t[w]=l,t[w+1]=h,t[w+2]=c)}}},{"./hsl_l16":18,"glur/mono16":14}],21:[function(t,e,i){"use strict";e.exports=function(t,e,i,n,r,o){if(!(0===n||r<.5)){r>2&&(r=2);var s=e*i,a=4*s,l=2*s,h=2*s,c=4*Math.max(e,i),u=32,f=0,d=a,p=d+l,g=p+h,m=g+h,v=m+c,y=this.__instance("unsharp_mask",a+l+2*h+c+u,{exp:Math.exp}),A=new Uint32Array(t.buffer);new Uint32Array(this.__memory.buffer).set(A);var w=y.exports.hsl_l16||y.exports._hsl_l16;w(f,d,e,i),(w=y.exports.blurMono16||y.exports._blurMono16)(d,p,g,m,v,e,i,r),(w=y.exports.unsharp||y.exports._unsharp)(f,f,d,p,e,i,n,o),A.set(new Uint32Array(this.__memory.buffer,0,s))}}},{}],22:[function(t,e,i){"use strict";e.exports="AGFzbQEAAAABMQZgAXwBfGACfX8AYAZ/f39/f38AYAh/f39/f39/fQBgBH9/f38AYAh/f39/f39/fwACGQIDZW52A2V4cAAAA2VudgZtZW1vcnkCAAEDBgUBAgMEBQQEAXAAAAdMBRZfX2J1aWxkX2dhdXNzaWFuX2NvZWZzAAEOX19nYXVzczE2X2xpbmUAAgpibHVyTW9ubzE2AAMHaHNsX2wxNgAEB3Vuc2hhcnAABQkBAAqJEAXZAQEGfAJAIAFE24a6Q4Ia+z8gALujIgOaEAAiBCAEoCIGtjgCECABIANEAAAAAAAAAMCiEAAiBbaMOAIUIAFEAAAAAAAA8D8gBKEiAiACoiAEIAMgA6CiRAAAAAAAAPA/oCAFoaMiArY4AgAgASAEIANEAAAAAAAA8L+gIAKioiIHtjgCBCABIAQgA0QAAAAAAADwP6AgAqKiIgO2OAIIIAEgBSACoiIEtow4AgwgASACIAegIAVEAAAAAAAA8D8gBqGgIgKjtjgCGCABIAMgBKEgAqO2OAIcCwu3AwMDfwR9CHwCQCADKgIUIQkgAyoCECEKIAMqAgwhCyADKgIIIQwCQCAEQX9qIgdBAEgiCA0AIAIgAC8BALgiDSADKgIYu6IiDiAJuyIQoiAOIAq7IhGiIA0gAyoCBLsiEqIgAyoCALsiEyANoqCgoCIPtjgCACACQQRqIQIgAEECaiEAIAdFDQAgBCEGA0AgAiAOIBCiIA8iDiARoiANIBKiIBMgAC8BALgiDaKgoKAiD7Y4AgAgAkEEaiECIABBAmohACAGQX9qIgZBAUoNAAsLAkAgCA0AIAEgByAFbEEBdGogAEF+ai8BACIIuCINIAu7IhGiIA0gDLsiEqKgIA0gAyoCHLuiIg4gCrsiE6KgIA4gCbsiFKKgIg8gAkF8aioCALugqzsBACAHRQ0AIAJBeGohAiAAQXxqIQBBACAFQQF0ayEHIAEgBSAEQQF0QXxqbGohBgNAIAghAyAALwEAIQggBiANIBGiIAO4Ig0gEqKgIA8iECAToqAgDiAUoqAiDyACKgIAu6CrOwEAIAYgB2ohBiAAQX5qIQAgAkF8aiECIBAhDiAEQX9qIgRBAUoNAAsLCwvfAgIDfwZ8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIgyaEAAiDSANoCIPtjgCECAEIAxEAAAAAAAAAMCiEAAiDraMOAIUIAREAAAAAAAA8D8gDaEiCyALoiANIAwgDKCiRAAAAAAAAPA/oCAOoaMiC7Y4AgAgBCANIAxEAAAAAAAA8L+gIAuioiIQtjgCBCAEIA0gDEQAAAAAAADwP6AgC6KiIgy2OAIIIAQgDiALoiINtow4AgwgBCALIBCgIA5EAAAAAAAA8D8gD6GgIgujtjgCGCAEIAwgDaEgC6O2OAIcIAYEQCAFQQF0IQogBiEJIAIhCANAIAAgCCADIAQgBSAGEAIgACAKaiEAIAhBAmohCCAJQX9qIgkNAAsLIAVFDQAgBkEBdCEIIAUhAANAIAIgASADIAQgBiAFEAIgAiAIaiECIAFBAmohASAAQX9qIgANAAsLC7wBAQV/IAMgAmwiAwRAQQAgA2shBgNAIAAoAgAiBEEIdiIHQf8BcSECAn8gBEH/AXEiAyAEQRB2IgRB/wFxIgVPBEAgAyIIIAMgAk8NARoLIAQgBCAHIAIgA0kbIAIgBUkbQf8BcQshCAJAIAMgAk0EQCADIAVNDQELIAQgByAEIAMgAk8bIAIgBUsbQf8BcSEDCyAAQQRqIQAgASADIAhqQYECbEEBdjsBACABQQJqIQEgBkEBaiIGDQALCwvTBgEKfwJAIAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6CqIQ0gBSAEbCILBEAgB0GBAmwhDgNAQQAgAi8BACADLwEAayIGQQF0IgdrIAcgBkEASBsgDk8EQCAAQQJqLQAAIQUCfyAALQAAIgYgAEEBai0AACIESSIJRQRAIAYiCCAGIAVPDQEaCyAFIAUgBCAEIAVJGyAGIARLGwshCAJ/IAYgBE0EQCAGIgogBiAFTQ0BGgsgBSAFIAQgBCAFSxsgCRsLIgogCGoiD0GBAmwiEEEBdiERQQAhDAJ/QQAiCSAIIApGDQAaIAggCmsiCUH/H2wgD0H+AyAIayAKayAQQYCABEkbbSEMIAYgCEYEQCAEIAVrQf//A2wgCUEGbG0MAQsgBSAGayAGIARrIAQgCEYiBhtB//8DbCAJQQZsbUHVqgFBqtUCIAYbagshCSARIAcgDWxBgBBqQQx1aiIGQQAgBkEAShsiBkH//wMgBkH//wNIGyEGAkACfwJAIAxB//8DcSIFBEAgBkH//wFKDQEgBUGAIGogBmxBgBBqQQx2DAILIAZBCHYiBiEFIAYhBAwCCyAFIAZB//8Dc2xBgBBqQQx2IAZqCyIFQQh2IQcgBkEBdCAFa0EIdiIGIQQCQCAJQdWqAWpB//8DcSIFQanVAksNACAFQf//AU8EQEGq1QIgBWsgByAGa2xBBmxBgIACakEQdiAGaiEEDAELIAchBCAFQanVAEsNACAFIAcgBmtsQQZsQYCAAmpBEHYgBmohBAsCfyAGIgUgCUH//wNxIghBqdUCSw0AGkGq1QIgCGsgByAGa2xBBmxBgIACakEQdiAGaiAIQf//AU8NABogByIFIAhBqdUASw0AGiAIIAcgBmtsQQZsQYCAAmpBEHYgBmoLIQUgCUGr1QJqQf//A3EiCEGp1QJLDQAgCEH//wFPBEBBqtUCIAhrIAcgBmtsQQZsQYCAAmpBEHYgBmohBgwBCyAIQanVAEsEQCAHIQYMAQsgCCAHIAZrbEEGbEGAgAJqQRB2IAZqIQYLIAEgBDoAACABQQFqIAU6AAAgAUECaiAGOgAACyADQQJqIQMgAkECaiECIABBBGohACABQQRqIQEgC0F/aiILDQALCwsL"},{}],23:[function(t,e,i){"use strict";var n;e.exports=function(){if(void 0!==n)return n;if(n=!1,"undefined"==typeof WebAssembly)return n;try{var t=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),e=new WebAssembly.Module(t);return 0!==new WebAssembly.Instance(e,{}).exports.test(4)&&(n=!0),n}catch(i){}return n}},{}],24:[function(t,e,i){"use strict";var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function a(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(r){return!1}}e.exports=a()?Object.assign:function(t,e){for(var i,a,l=s(t),h=1;ht.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0)}catch(S){}var A=1;"undefined"!=typeof navigator&&(A=Math.min(navigator.hardwareConcurrency||1,4));var w,b,E={tile:1024,concurrency:A,features:["js","wasm","ww"],idle:2e3},_={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0};function x(){return{value:c(p),destroy:function(){if(this.value.terminate(),"undefined"!=typeof window){var t=window.URL||window.webkitURL||window.mozURL||window.msURL;t&&t.revokeObjectURL&&this.value.objectURL&&t.revokeObjectURL(this.value.objectURL)}}}}function I(t){if(!(this instanceof I))return new I(t);this.options=h({},E,t||{});var e="lk_".concat(this.options.concurrency);this.__limit=v[e]||d.limiter(this.options.concurrency),v[e]||(v[e]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}I.prototype.init=function(){var e=this;if(this.__initPromise)return this.__initPromise;if(!1!==w&&!0!==w&&(w=!1,"undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray))try{new ImageData(new Uint8ClampedArray(400),10,10),w=!0}catch(s){}!1!==b&&!0!==b&&(b=!1,"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?b=!0:this.debug("ImageBitmap does not support .close(), disabled")));var i=this.options.features.slice();if(i.indexOf("all")>=0&&(i=["cib","wasm","js","ww"]),this.__requested_features=i,this.__mathlib=new u(i),i.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{t("webworkify")((function(){})).terminate(),this.features.ww=!0;var n="wp_".concat(JSON.stringify(this.options));v[n]?this.__workersPool=v[n]:(this.__workersPool=new f(x,this.options.idle),v[n]=this.__workersPool)}catch(s){}var r,o=this.__mathlib.init().then((function(t){h(e.features,t.features)}));return r=b?d.cib_support().then((function(t){e.features.cib&&i.indexOf("cib")<0?e.debug("createImageBitmap() resize supported, but disabled by config"):i.indexOf("cib")>=0&&(e.features.cib=t)})):Promise.resolve(!1),this.__initPromise=Promise.all([o,r]).then((function(){return e})),this.__initPromise},I.prototype.resize=function(t,e,i){var r=this;this.debug("Start resize...");var o=h({},_);if(isNaN(i)?i&&(o=h(o,i)):o=h(o,{quality:i}),o.toWidth=e.width,o.toHeight=e.height,o.width=t.naturalWidth||t.width,o.height=t.naturalHeight||t.height,0===e.width||0===e.height)return Promise.reject(new Error("Invalid output size: ".concat(e.width,"x").concat(e.height)));o.unsharpRadius>2&&(o.unsharpRadius=2);var s=!1,a=null;o.cancelToken&&(a=o.cancelToken.then((function(t){throw s=!0,t}),(function(t){throw s=!0,t})));var l=3,c=Math.ceil(Math.max(l,2.5*o.unsharpRadius|0));return this.init().then((function(){if(s)return a;if(r.features.cib){var i=e.getContext("2d",{alpha:Boolean(o.alpha)});return r.debug("Resize via createImageBitmap()"),createImageBitmap(t,{resizeWidth:o.toWidth,resizeHeight:o.toHeight,resizeQuality:d.cib_quality_name(o.quality)}).then((function(t){if(s)return a;if(!o.unsharpAmount)return i.drawImage(t,0,0),t.close(),i=null,r.debug("Finished!"),e;r.debug("Unsharp result");var n=document.createElement("canvas");n.width=o.toWidth,n.height=o.toHeight;var l=n.getContext("2d",{alpha:Boolean(o.alpha)});l.drawImage(t,0,0),t.close();var h=l.getImageData(0,0,o.toWidth,o.toHeight);return r.__mathlib.unsharp_mask(h.data,o.toWidth,o.toHeight,o.unsharpAmount,o.unsharpRadius,o.unsharpThreshold),i.putImageData(h,0,0),h=l=n=i=null,r.debug("Finished!"),e}))}var l={},u=function(t){return Promise.resolve().then((function(){return r.features.ww?new Promise((function(e,i){var n=r.__workersPool.acquire();a&&a.catch((function(t){return i(t)})),n.value.onmessage=function(t){n.release(),t.data.err?i(t.data.err):e(t.data.result)},n.value.postMessage({opts:t,features:r.__requested_features,preload:{wasm_nodule:r.__mathlib.__}},[t.src.buffer])})):r.__mathlib.resizeAndUnsharp(t,l)}))},f=function(t,e,i){var n,o,l,h=function(e){return r.__limit((function(){if(s)return a;var h;if(d.isCanvas(t))r.debug("Get tile pixel data"),h=n.getImageData(e.x,e.y,e.width,e.height);else{r.debug("Draw tile imageBitmap/image to temporary canvas");var c=document.createElement("canvas");c.width=e.width,c.height=e.height;var f=c.getContext("2d",{alpha:Boolean(i.alpha)});f.globalCompositeOperation="copy",f.drawImage(o||t,e.x,e.y,e.width,e.height,0,0,e.width,e.height),r.debug("Get tile pixel data"),h=f.getImageData(0,0,e.width,e.height),f=c=null}var p={src:h.data,width:e.width,height:e.height,toWidth:e.toWidth,toHeight:e.toHeight,scaleX:e.scaleX,scaleY:e.scaleY,offsetX:e.offsetX,offsetY:e.offsetY,quality:i.quality,alpha:i.alpha,unsharpAmount:i.unsharpAmount,unsharpRadius:i.unsharpRadius,unsharpThreshold:i.unsharpThreshold};return r.debug("Invoke resize math"),Promise.resolve().then((function(){return u(p)})).then((function(t){if(s)return a;var i;if(h=null,r.debug("Convert raw rgba tile result to ImageData"),w)i=new ImageData(new Uint8ClampedArray(t),e.toWidth,e.toHeight);else if((i=l.createImageData(e.toWidth,e.toHeight)).data.set)i.data.set(t);else for(var n=i.data.length-1;n>=0;n--)i.data[n]=t[n];return r.debug("Draw tile"),y?l.putImageData(i,e.toX,e.toY,e.toInnerX-e.toX,e.toInnerY-e.toY,e.toInnerWidth+1e-5,e.toInnerHeight+1e-5):l.putImageData(i,e.toX,e.toY,e.toInnerX-e.toX,e.toInnerY-e.toY,e.toInnerWidth,e.toInnerHeight),null}))}))};return Promise.resolve().then((function(){if(l=e.getContext("2d",{alpha:Boolean(i.alpha)}),d.isCanvas(t))return n=t.getContext("2d",{alpha:Boolean(i.alpha)}),null;if(d.isImage(t))return b?(r.debug("Decode image via createImageBitmap"),createImageBitmap(t).then((function(t){o=t})).catch((function(t){return null}))):null;throw new Error('".from" should be image or canvas')})).then((function(){if(s)return a;r.debug("Calculate tiles");var t=m({width:i.width,height:i.height,srcTileSize:r.options.tile,toWidth:i.toWidth,toHeight:i.toHeight,destTileBorder:c}).map((function(t){return h(t)}));function n(){o&&(o.close(),o=null)}return r.debug("Process tiles"),Promise.all(t).then((function(){return r.debug("Finished!"),n(),e}),(function(t){throw n(),t}))}))};return function t(e,i,r,o){if(s)return a;var l,c=n(e.shift(),2),u=c[0],d=c[1],p=0===e.length;return o=h({},o,{toWidth:u,toHeight:d,quality:p?o.quality:Math.min(1,o.quality)}),p||((l=document.createElement("canvas")).width=u,l.height=d),f(i,p?r:l,o).then((function(){return p?r:(o.width=u,o.height=d,t(e,l,r,o))}))}(g(o.width,o.height,o.toWidth,o.toHeight,r.options.tile,c),t,e,o)}))},I.prototype.resizeBuffer=function(t){var e=this,i=h({},_,t);return this.init().then((function(){return e.__mathlib.resizeAndUnsharp(i)}))},I.prototype.toBlob=function(t,e,i){return e=e||"image/png",new Promise((function(n){if(t.toBlob)t.toBlob((function(t){return n(t)}),e,i);else if(t.convertToBlob)n(t.convertToBlob({type:e,quality:i}));else{for(var r=atob(t.toDataURL(e,i).split(",")[1]),o=r.length,s=new Uint8Array(o),a=0;a